aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/c_src/asn1_erl_nif.c4
-rw-r--r--lib/asn1/doc/src/asn1ct.xml94
-rw-r--r--lib/asn1/src/Makefile5
-rw-r--r--lib/asn1/src/asn1_db.erl257
-rw-r--r--lib/asn1/src/asn1ct.erl433
-rw-r--r--lib/asn1/src/asn1ct_check.erl59
-rw-r--r--lib/asn1/src/asn1ct_gen.erl11
-rw-r--r--lib/asn1/src/asn1ct_gen_ber_bin_v2.erl4
-rw-r--r--lib/asn1/src/asn1ct_name.erl89
-rw-r--r--lib/asn1/src/asn1ct_parser2.erl37
-rw-r--r--lib/asn1/src/asn1ct_table.erl76
-rw-r--r--lib/asn1/src/asn1ct_value.erl79
-rw-r--r--lib/asn1/test/Makefile44
-rw-r--r--lib/asn1/test/asn1_SUITE.erl1511
-rw-r--r--lib/asn1/test/asn1_SUITE.erl.src2392
-rw-r--r--lib/asn1/test/asn1_app_test.erl4
-rw-r--r--lib/asn1/test/asn1_bin_particular_SUITE.erl.src2
-rw-r--r--lib/asn1/test/asn1_common_SUITE.erl.src95
-rw-r--r--lib/asn1/test/asn1_particular_SUITE.erl.src10
-rw-r--r--lib/asn1/test/asn1_test_lib.erl60
-rw-r--r--lib/asn1/test/ber_decode_error.erl13
-rw-r--r--lib/asn1/test/h323test.erl142
-rw-r--r--lib/asn1/test/pem_performance.erl (renamed from lib/asn1/test/asn1_bin_v2_particular_SUITE.erl.src)294
-rw-r--r--lib/asn1/test/testChoExtension.erl12
-rw-r--r--lib/asn1/test/testChoExternal.erl14
-rw-r--r--lib/asn1/test/testChoOptional.erl15
-rw-r--r--lib/asn1/test/testChoOptionalImplicitTag.erl14
-rw-r--r--lib/asn1/test/testChoPrim.erl13
-rw-r--r--lib/asn1/test/testChoRecursive.erl13
-rw-r--r--lib/asn1/test/testChoTypeRefCho.erl14
-rw-r--r--lib/asn1/test/testChoTypeRefPrim.erl14
-rw-r--r--lib/asn1/test/testChoTypeRefSeq.erl13
-rw-r--r--lib/asn1/test/testChoTypeRefSet.erl13
-rw-r--r--lib/asn1/test/testChoiceIndefinite.erl15
-rw-r--r--lib/asn1/test/testCompactBitString.erl20
-rw-r--r--lib/asn1/test/testConstraints.erl15
-rw-r--r--lib/asn1/test/testContextSwitchingTypes.erl20
-rw-r--r--lib/asn1/test/testDER.erl11
-rw-r--r--lib/asn1/test/testDeepTConstr.erl17
-rw-r--r--lib/asn1/test/testDef.erl13
-rw-r--r--lib/asn1/test/testDoubleEllipses.erl14
-rw-r--r--lib/asn1/test/testEnumExt.erl11
-rw-r--r--lib/asn1/test/testExternal.erl35
-rw-r--r--lib/asn1/test/testINSTANCE_OF.erl15
-rw-r--r--lib/asn1/test/testInfObj.erl40
-rw-r--r--lib/asn1/test/testInfObjectClass.erl16
-rw-r--r--lib/asn1/test/testMegaco.erl23
-rw-r--r--lib/asn1/test/testMergeCompile.erl22
-rw-r--r--lib/asn1/test/testMvrasn6.erl44
-rw-r--r--lib/asn1/test/testNBAPsystem.erl87
-rw-r--r--lib/asn1/test/testOpenTypeImplicitTag.erl13
-rw-r--r--lib/asn1/test/testParamBasic.erl20
-rw-r--r--lib/asn1/test/testParameterizedInfObj.erl14
-rw-r--r--lib/asn1/test/testPrim.erl15
-rw-r--r--lib/asn1/test/testPrimExternal.erl13
-rw-r--r--lib/asn1/test/testPrimStrings.erl19
-rw-r--r--lib/asn1/test/testRANAP.erl52
-rw-r--r--lib/asn1/test/testROSE.erl36
-rw-r--r--lib/asn1/test/testSSLspecs.erl71
-rw-r--r--lib/asn1/test/testSelectionTypes.erl11
-rw-r--r--lib/asn1/test/testSeq2738.erl11
-rw-r--r--lib/asn1/test/testSeqDefault.erl12
-rw-r--r--lib/asn1/test/testSeqExtension.erl13
-rw-r--r--lib/asn1/test/testSeqIndefinite.erl11
-rw-r--r--lib/asn1/test/testSeqOf.erl15
-rw-r--r--lib/asn1/test/testSeqOfCho.erl14
-rw-r--r--lib/asn1/test/testSeqOfIndefinite.erl34
-rw-r--r--lib/asn1/test/testSeqOfTag.erl15
-rw-r--r--lib/asn1/test/testSeqOptional.erl13
-rw-r--r--lib/asn1/test/testSeqPrim.erl12
-rw-r--r--lib/asn1/test/testSeqSetDefaultVal.erl11
-rw-r--r--lib/asn1/test/testSeqTag.erl13
-rw-r--r--lib/asn1/test/testSeqTypeRefCho.erl13
-rw-r--r--lib/asn1/test/testSeqTypeRefSeq.erl12
-rw-r--r--lib/asn1/test/testSeqTypeRefSet.erl12
-rw-r--r--lib/asn1/test/testSetDefault.erl13
-rw-r--r--lib/asn1/test/testSetExternal.erl14
-rw-r--r--lib/asn1/test/testSetIndefinite.erl11
-rw-r--r--lib/asn1/test/testSetOf.erl12
-rw-r--r--lib/asn1/test/testSetOfCho.erl12
-rw-r--r--lib/asn1/test/testSetOfExternal.erl12
-rw-r--r--lib/asn1/test/testSetOfTag.erl12
-rw-r--r--lib/asn1/test/testSetOptional.erl16
-rw-r--r--lib/asn1/test/testSetPrim.erl12
-rw-r--r--lib/asn1/test/testSetTag.erl13
-rw-r--r--lib/asn1/test/testSetTypeRefCho.erl12
-rw-r--r--lib/asn1/test/testSetTypeRefPrim.erl12
-rw-r--r--lib/asn1/test/testSetTypeRefSeq.erl12
-rw-r--r--lib/asn1/test/testSetTypeRefSet.erl12
-rw-r--r--lib/asn1/test/testTCAP.erl38
-rw-r--r--lib/asn1/test/testTcapsystem.erl90
-rw-r--r--lib/asn1/test/testTimer.erl8
-rw-r--r--lib/asn1/test/testTypeValueNotation.erl91
-rw-r--r--lib/asn1/test/testX420.erl39
-rw-r--r--lib/asn1/test/test_bad_values.erl29
-rw-r--r--lib/asn1/test/test_compile_options.erl13
-rw-r--r--lib/asn1/test/test_driver_load.erl23
-rw-r--r--lib/asn1/test/test_inline.erl81
-rw-r--r--lib/asn1/test/test_modified_x420.erl12
-rw-r--r--lib/asn1/test/test_partial_incomplete_decode.erl39
-rw-r--r--lib/asn1/test/test_selective_decode.erl11
-rw-r--r--lib/asn1/test/test_special_decode_performance.erl19
-rw-r--r--lib/asn1/test/test_undecoded_rest.erl60
-rw-r--r--lib/asn1/test/test_x691.erl17
-rw-r--r--lib/common_test/doc/src/ct_hooks_chapter.xml10
-rw-r--r--lib/common_test/priv/ct_default.css10
-rw-r--r--lib/common_test/src/Makefile3
-rw-r--r--lib/common_test/src/common_test.app.src6
-rw-r--r--lib/common_test/src/ct.erl37
-rw-r--r--lib/common_test/src/ct_framework.erl321
-rw-r--r--lib/common_test/src/ct_hooks.erl9
-rw-r--r--lib/common_test/src/ct_logs.erl278
-rw-r--r--lib/common_test/src/ct_repeat.erl2
-rw-r--r--lib/common_test/src/ct_run.erl142
-rw-r--r--lib/common_test/src/ct_testspec.erl18
-rw-r--r--lib/common_test/src/ct_util.erl23
-rw-r--r--lib/common_test/src/ct_util.hrl3
-rw-r--r--lib/common_test/src/cth_log_redirect.erl15
-rw-r--r--lib/common_test/src/cth_surefire.erl199
-rw-r--r--lib/common_test/src/vts.erl4
-rw-r--r--lib/common_test/test/Makefile1
-rw-r--r--lib/common_test/test/ct_error_SUITE.erl70
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/misc_error_1_SUITE.erl154
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl70
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl7
-rw-r--r--lib/common_test/test/ct_group_info_SUITE.erl172
-rw-r--r--lib/common_test/test/ct_groups_test_2_SUITE.erl8
-rw-r--r--lib/common_test/test/ct_hooks_SUITE.erl59
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_no_config_SUITE.erl64
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl548
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/verify_config_cth.erl130
-rw-r--r--lib/common_test/test/ct_priv_dir_SUITE.erl277
-rw-r--r--lib/common_test/test/ct_priv_dir_SUITE_data/auto_per_run.spec5
-rw-r--r--lib/common_test/test/ct_priv_dir_SUITE_data/auto_per_tc.spec5
-rw-r--r--lib/common_test/test/ct_priv_dir_SUITE_data/default.spec3
-rw-r--r--lib/common_test/test/ct_priv_dir_SUITE_data/manual_per_tc.spec5
-rw-r--r--lib/common_test/test/ct_priv_dir_SUITE_data/priv_dir_SUITE.erl127
-rw-r--r--lib/common_test/test/ct_test_server_if_1_SUITE.erl17
-rw-r--r--lib/common_test/vsn.mk2
-rw-r--r--lib/compiler/src/sys_core_fold.erl124
-rw-r--r--lib/compiler/src/v3_codegen.erl17
-rw-r--r--lib/compiler/src/v3_core.erl7
-rw-r--r--lib/compiler/src/v3_kernel.erl254
-rw-r--r--lib/compiler/src/v3_kernel.hrl1
-rw-r--r--lib/compiler/src/v3_life.erl97
-rw-r--r--lib/compiler/test/core_SUITE.erl5
-rw-r--r--lib/compiler/test/core_SUITE_data/seq_in_guard.core66
-rw-r--r--lib/compiler/test/core_fold_SUITE.erl21
-rw-r--r--lib/debugger/src/dbg_iserver.erl7
-rw-r--r--lib/debugger/test/int_break_SUITE.erl5
-rw-r--r--lib/dialyzer/src/dialyzer_analysis_callgraph.erl59
-rw-r--r--lib/dialyzer/src/dialyzer_behaviours.erl12
-rw-r--r--lib/dialyzer/src/dialyzer_callgraph.erl44
-rw-r--r--lib/dialyzer/src/dialyzer_codeserver.erl17
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl66
-rw-r--r--lib/dialyzer/src/dialyzer_gui.erl10
-rw-r--r--lib/dialyzer/src/dialyzer_gui_wx.erl10
-rw-r--r--lib/dialyzer/src/dialyzer_plt.erl37
-rw-r--r--lib/dialyzer/src/dialyzer_races.erl21
-rw-r--r--lib/dialyzer/src/dialyzer_succ_typings.erl34
-rw-r--r--lib/dialyzer/src/dialyzer_typesig.erl153
-rw-r--r--lib/dialyzer/test/Makefile2
-rw-r--r--lib/dialyzer/test/behaviour_SUITE_data/results/sample_behaviour16
-rw-r--r--lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl37
-rw-r--r--lib/dialyzer/test/behaviour_SUITE_data/src/sample_behaviour/sample_callback_wrong.erl3
-rw-r--r--lib/dialyzer/test/dialyzer_common.erl11
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/multiple_wrong_opaques2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl8
-rw-r--r--lib/dialyzer/test/options1_SUITE_data/results/compiler1
-rw-r--r--lib/dialyzer/test/r9c_SUITE_data/results/inets1
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/cerl_hipeify2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/inf_loop22
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/no_local_return3
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/no_local_return.erl12
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/on_load.erl11
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl23
-rw-r--r--lib/hipe/Makefile21
-rw-r--r--lib/hipe/amd64/Makefile3
-rw-r--r--lib/hipe/arm/Makefile3
-rw-r--r--lib/hipe/boot_ebin/.gitignore0
-rw-r--r--lib/hipe/cerl/Makefile3
-rw-r--r--lib/hipe/cerl/erl_types.erl11
-rw-r--r--lib/hipe/doc/Makefile3
-rw-r--r--lib/hipe/doc/src/Makefile3
-rw-r--r--lib/hipe/flow/Makefile3
-rw-r--r--lib/hipe/icode/Makefile3
-rw-r--r--lib/hipe/main/Makefile3
-rw-r--r--lib/hipe/native.mk4
-rw-r--r--lib/hipe/opt/Makefile3
-rw-r--r--lib/hipe/ppc/Makefile3
-rw-r--r--lib/hipe/regalloc/Makefile3
-rw-r--r--lib/hipe/rtl/Makefile3
-rw-r--r--lib/hipe/sparc/Makefile3
-rw-r--r--lib/hipe/util/Makefile3
-rw-r--r--lib/hipe/x86/Makefile3
-rw-r--r--lib/ic/src/ic_noc.erl19
-rw-r--r--lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src21
-rw-r--r--lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src21
-rw-r--r--lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src24
-rw-r--r--lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src17
-rw-r--r--lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src17
-rw-r--r--lib/ic/test/java_client_erl_server_SUITE_data/Makefile.src17
-rw-r--r--lib/ic/vsn.mk2
-rw-r--r--lib/inets/doc/src/Makefile1
-rw-r--r--lib/inets/doc/src/book.xml4
-rw-r--r--lib/inets/doc/src/fascicules.xml2
-rw-r--r--lib/inets/doc/src/ftp_client.xml4
-rw-r--r--lib/inets/doc/src/http_uri.xml160
-rw-r--r--lib/inets/doc/src/httpc.xml31
-rw-r--r--lib/inets/doc/src/httpd.xml545
-rw-r--r--lib/inets/doc/src/httpd_conf.xml58
-rw-r--r--lib/inets/doc/src/httpd_socket.xml29
-rw-r--r--lib/inets/doc/src/httpd_util.xml4
-rw-r--r--lib/inets/doc/src/inets_services.xml4
-rw-r--r--lib/inets/doc/src/mod_alias.xml92
-rw-r--r--lib/inets/doc/src/mod_auth.xml133
-rw-r--r--lib/inets/doc/src/notes.xml102
-rw-r--r--lib/inets/doc/src/notes_history.xml4
-rw-r--r--lib/inets/doc/src/part.xml4
-rw-r--r--lib/inets/doc/src/part_notes.xml4
-rw-r--r--lib/inets/doc/src/part_notes_history.xml4
-rw-r--r--lib/inets/doc/src/ref_man.xml9
-rw-r--r--lib/inets/doc/src/tftp.xml191
-rw-r--r--lib/inets/src/http_client/httpc.erl82
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl23
-rw-r--r--lib/inets/src/http_client/httpc_manager.erl62
-rw-r--r--lib/inets/src/http_client/httpc_response.erl16
-rw-r--r--lib/inets/src/http_lib/http_uri.erl127
-rw-r--r--lib/inets/src/http_server/Makefile2
-rw-r--r--lib/inets/src/http_server/httpd_conf.erl110
-rw-r--r--lib/inets/src/http_server/httpd_response.erl27
-rw-r--r--lib/inets/src/http_server/httpd_script_env.erl57
-rw-r--r--lib/inets/src/http_server/httpd_sup.erl19
-rw-r--r--lib/inets/src/http_server/mod_get.erl16
-rw-r--r--lib/inets/src/inets_app/Makefile3
-rw-r--r--lib/inets/src/inets_app/inets.app.src5
-rw-r--r--lib/inets/src/inets_app/inets.appup.src114
-rw-r--r--lib/inets/src/inets_app/inets.erl267
-rw-r--r--lib/inets/src/inets_app/inets.mk2
-rw-r--r--lib/inets/src/inets_app/inets_app.erl2
-rw-r--r--lib/inets/src/inets_app/inets_internal.hrl6
-rw-r--r--lib/inets/src/inets_app/inets_sup.erl10
-rw-r--r--lib/inets/src/inets_app/inets_trace.erl357
-rw-r--r--lib/inets/test/httpc_SUITE.erl282
-rw-r--r--lib/inets/test/httpd_SUITE.erl188
-rw-r--r--lib/inets/test/httpd_basic_SUITE.erl37
-rw-r--r--lib/inets/test/httpd_mod.erl29
-rw-r--r--lib/inets/test/httpd_test_lib.erl40
-rw-r--r--lib/inets/test/inets_test_lib.erl285
-rw-r--r--lib/inets/test/inets_test_lib.hrl5
-rw-r--r--lib/inets/vsn.mk2
-rw-r--r--lib/kernel/doc/src/error_logger.xml2
-rw-r--r--lib/kernel/doc/src/gen_tcp.xml4
-rw-r--r--lib/kernel/doc/src/inet.xml2
-rw-r--r--lib/kernel/doc/src/kernel_app.xml2
-rw-r--r--lib/kernel/src/auth.erl12
-rw-r--r--lib/kernel/src/disk_log.erl10
-rw-r--r--lib/kernel/src/erts_debug.erl20
-rw-r--r--lib/kernel/src/gen_tcp.erl6
-rw-r--r--lib/kernel/src/global.erl10
-rw-r--r--lib/kernel/src/inet.erl6
-rw-r--r--lib/kernel/test/code_SUITE.erl3
-rw-r--r--lib/kernel/test/gen_tcp_misc_SUITE.erl53
-rw-r--r--lib/kernel/test/sendfile_SUITE.erl86
-rw-r--r--lib/kernel/test/zlib_SUITE.erl19
-rw-r--r--lib/megaco/doc/src/notes.xml73
-rw-r--r--lib/megaco/examples/meas/meas.sh.skel.src3
-rw-r--r--lib/megaco/examples/meas/megaco_codec_mstone1.erl3
-rw-r--r--lib/megaco/examples/meas/megaco_codec_mstone2.erl5
-rw-r--r--lib/megaco/examples/meas/megaco_codec_mstone_lib.erl13
-rw-r--r--lib/megaco/examples/meas/mstone1.sh.skel.src25
-rw-r--r--lib/megaco/src/app/megaco.appup.src13
-rw-r--r--lib/megaco/test/megaco_mess_test.erl30
-rw-r--r--lib/megaco/vsn.mk4
-rw-r--r--lib/mnesia/doc/src/company.erl45
-rw-r--r--lib/mnesia/doc/src/company_o.erl20
-rw-r--r--lib/observer/doc/src/etop.xml31
-rw-r--r--lib/observer/priv/erlang_observer.pngbin4351 -> 2679 bytes
-rw-r--r--lib/observer/src/Makefile1
-rw-r--r--lib/observer/src/etop.erl6
-rw-r--r--lib/observer/src/observer_app_wx.erl147
-rw-r--r--lib/observer/src/observer_lib.erl2
-rw-r--r--lib/observer/src/observer_perf_wx.erl575
-rw-r--r--lib/observer/src/observer_wx.erl33
-rw-r--r--lib/public_key/src/public_key.appup.src12
-rw-r--r--lib/public_key/vsn.mk2
-rw-r--r--lib/reltool/doc/src/reltool.xml11
-rw-r--r--lib/reltool/src/reltool.erl6
-rw-r--r--lib/reltool/src/reltool.hrl18
-rw-r--r--lib/reltool/src/reltool_app_win.erl6
-rw-r--r--lib/reltool/src/reltool_mod_win.erl8
-rw-r--r--lib/reltool/src/reltool_server.erl1965
-rw-r--r--lib/reltool/src/reltool_sys_win.erl321
-rw-r--r--lib/reltool/src/reltool_target.erl80
-rw-r--r--lib/reltool/src/reltool_utils.erl77
-rw-r--r--lib/reltool/test/Makefile3
-rw-r--r--lib/reltool/test/reltool.spec1
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE.erl266
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/Makefile.src28
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/ebin/x.app7
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x1.erl5
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x2.erl5
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x3.erl5
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/ebin/y.app7
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y1.erl5
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y2.erl5
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y3.erl5
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/ebin/z.app7
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/src/z1.erl5
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/ebin/a.app1
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a.erl49
-rw-r--r--lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl37
-rw-r--r--lib/reltool/test/reltool_server_SUITE.erl1622
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/Makefile.src29
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/ebin/x.app7
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x1.erl5
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x2.erl5
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x3.erl5
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/ebin/y.app7
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/src/y1.erl5
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/src/y2.erl5
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/z-1.0/ebin/z.app7
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dependencies/z-1.0/src/z1.erl5
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dupl_mod/a-1.0/ebin/a.app7
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/ebin/someapp.app6
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl26
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/ebin/a.app1
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/src/a.erl49
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl37
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/sort_apps/x-1.0/ebin/x.app7
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/sort_apps/y-1.0/ebin/y.app7
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/sort_apps/z-1.0/ebin/z.app8
-rw-r--r--lib/reltool/test/reltool_test_lib.erl6
-rw-r--r--lib/reltool/test/reltool_test_lib.hrl34
-rw-r--r--lib/reltool/test/reltool_wx_SUITE.erl43
-rw-r--r--lib/runtime_tools/src/observer_backend.erl20
-rw-r--r--lib/sasl/doc/src/rel.xml4
-rw-r--r--lib/sasl/src/systools_make.erl60
-rw-r--r--lib/sasl/test/systools_SUITE.erl133
-rw-r--r--lib/snmp/doc/src/notes.xml138
-rw-r--r--lib/snmp/doc/src/snmp.xml28
-rw-r--r--lib/snmp/doc/src/snmp_app.xml12
-rw-r--r--lib/snmp/doc/src/snmp_config.xml12
-rw-r--r--lib/snmp/doc/src/snmp_generic.xml81
-rw-r--r--lib/snmp/doc/src/snmp_manager_netif.xml43
-rw-r--r--lib/snmp/doc/src/snmpa.xml32
-rw-r--r--lib/snmp/doc/src/snmpm.xml34
-rw-r--r--lib/snmp/doc/src/snmpm_network_interface_filter.xml9
-rw-r--r--lib/snmp/examples/ex2/snmp_ex2_manager.erl13
-rw-r--r--lib/snmp/include/snmp_types.hrl25
-rw-r--r--lib/snmp/src/agent/snmp_community_mib.erl19
-rw-r--r--lib/snmp/src/agent/snmp_framework_mib.erl27
-rw-r--r--lib/snmp/src/agent/snmp_notification_mib.erl19
-rw-r--r--lib/snmp/src/agent/snmp_standard_mib.erl28
-rw-r--r--lib/snmp/src/agent/snmp_target_mib.erl8
-rw-r--r--lib/snmp/src/agent/snmp_user_based_sm_mib.erl6
-rw-r--r--lib/snmp/src/agent/snmp_view_based_acm_mib.erl2
-rw-r--r--lib/snmp/src/agent/snmpa.erl24
-rw-r--r--lib/snmp/src/agent/snmpa_agent.erl2
-rw-r--r--lib/snmp/src/agent/snmpa_local_db.erl4
-rw-r--r--lib/snmp/src/agent/snmpa_mib.erl2
-rw-r--r--lib/snmp/src/app/snmp.app.src3
-rw-r--r--lib/snmp/src/app/snmp.appup.src525
-rw-r--r--lib/snmp/src/app/snmp.erl7
-rw-r--r--lib/snmp/src/compile/snmpc_lib.erl36
-rw-r--r--lib/snmp/src/manager/depend.mk9
-rw-r--r--lib/snmp/src/manager/modules.mk3
-rw-r--r--lib/snmp/src/manager/snmpm.erl25
-rw-r--r--lib/snmp/src/manager/snmpm_config.erl2
-rw-r--r--lib/snmp/src/manager/snmpm_mpd.erl6
-rw-r--r--lib/snmp/src/manager/snmpm_net_if_mt.erl1259
-rw-r--r--lib/snmp/src/misc/snmp_conf.erl17
-rw-r--r--lib/snmp/src/misc/snmp_config.erl93
-rw-r--r--lib/snmp/src/misc/snmp_log.erl110
-rw-r--r--lib/snmp/src/misc/snmp_verbosity.erl6
-rw-r--r--lib/snmp/test/Makefile3
-rw-r--r--lib/snmp/test/exp/.gitignore0
-rw-r--r--lib/snmp/test/exp/snmp_agent_bl_test.erl (renamed from lib/snmp/test/snmp_agent_bl_test.erl)0
-rw-r--r--lib/snmp/test/exp/snmp_agent_ms_test.erl (renamed from lib/snmp/test/snmp_agent_ms_test.erl)0
-rw-r--r--lib/snmp/test/exp/snmp_agent_mt_test.erl (renamed from lib/snmp/test/snmp_agent_mt_test.erl)0
-rw-r--r--lib/snmp/test/exp/snmp_agent_v1_test.erl (renamed from lib/snmp/test/snmp_agent_v1_test.erl)0
-rw-r--r--lib/snmp/test/exp/snmp_agent_v2_test.erl (renamed from lib/snmp/test/snmp_agent_v2_test.erl)0
-rw-r--r--lib/snmp/test/exp/snmp_agent_v3_test.erl (renamed from lib/snmp/test/snmp_agent_v3_test.erl)0
-rw-r--r--lib/snmp/test/modules.mk3
-rw-r--r--lib/snmp/test/snmp_SUITE.erl47
-rw-r--r--lib/snmp/test/snmp_agent_test.erl461
-rw-r--r--lib/snmp/test/snmp_agent_test_lib.erl211
-rw-r--r--lib/snmp/test/snmp_app_test.erl41
-rw-r--r--lib/snmp/test/snmp_compiler_test.erl109
-rw-r--r--lib/snmp/test/snmp_log_test.erl27
-rw-r--r--lib/snmp/test/snmp_manager_test.erl294
-rw-r--r--lib/snmp/test/snmp_test_data/Test3.mib123
-rw-r--r--lib/snmp/test/snmp_test_lib.erl99
-rw-r--r--lib/snmp/test/test-mibs/RMON-MIB.mib7782
-rw-r--r--lib/snmp/vsn.mk2
-rw-r--r--lib/ssh/doc/src/ssh.xml13
-rw-r--r--lib/ssh/src/Makefile2
-rw-r--r--lib/ssh/src/ssh.app.src2
-rw-r--r--lib/ssh/src/ssh.appup.src26
-rw-r--r--lib/ssh/src/ssh.erl246
-rw-r--r--lib/ssh/src/ssh_acceptor.erl8
-rw-r--r--lib/ssh/src/ssh_auth.erl2
-rw-r--r--lib/ssh/src/ssh_connect.hrl6
-rw-r--r--lib/ssh/src/ssh_connection.erl6
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl253
-rw-r--r--lib/ssh/src/ssh_connection_manager.erl145
-rw-r--r--lib/ssh/src/ssh_connection_sup.erl113
-rw-r--r--lib/ssh/src/ssh_sftpd.erl14
-rw-r--r--lib/ssh/src/ssh_subsystem_sup.erl14
-rw-r--r--lib/ssh/src/ssh_system_sup.erl2
-rw-r--r--lib/ssh/src/ssh_transport.erl5
-rw-r--r--lib/ssh/src/sshc_sup.erl26
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl95
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE.erl114
-rw-r--r--lib/ssh/test/ssh_sftpd_SUITE.erl92
-rw-r--r--lib/ssh/test/ssh_test_lib.erl18
-rw-r--r--lib/ssh/test/ssh_to_openssh_SUITE.erl14
-rw-r--r--lib/ssh/vsn.mk2
-rw-r--r--lib/ssl/doc/src/ssl.xml4
-rw-r--r--lib/ssl/src/ssl.appup.src22
-rw-r--r--lib/ssl/vsn.mk2
-rw-r--r--lib/stdlib/doc/src/digraph_utils.xml4
-rw-r--r--lib/stdlib/doc/src/ets.xml2
-rw-r--r--lib/stdlib/doc/src/gen_event.xml61
-rw-r--r--lib/stdlib/doc/src/gen_fsm.xml55
-rw-r--r--lib/stdlib/doc/src/gen_server.xml39
-rw-r--r--lib/stdlib/doc/src/lists.xml2
-rw-r--r--lib/stdlib/doc/src/supervisor.xml44
-rw-r--r--lib/stdlib/doc/src/supervisor_bridge.xml7
-rw-r--r--lib/stdlib/src/digraph_utils.erl4
-rw-r--r--lib/stdlib/src/gen.erl22
-rw-r--r--lib/stdlib/src/gen_event.erl10
-rw-r--r--lib/stdlib/src/gen_fsm.erl25
-rw-r--r--lib/stdlib/src/gen_server.erl23
-rw-r--r--lib/stdlib/src/supervisor.erl193
-rw-r--r--lib/stdlib/test/Makefile2
-rw-r--r--lib/stdlib/test/digraph_utils_SUITE.erl5
-rw-r--r--lib/stdlib/test/dummy_via.erl94
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE.erl8
-rw-r--r--lib/stdlib/test/gen_event_SUITE.erl26
-rw-r--r--lib/stdlib/test/gen_fsm_SUITE.erl71
-rw-r--r--lib/stdlib/test/gen_server_SUITE.erl62
-rw-r--r--lib/stdlib/test/io_proto_SUITE.erl2
-rw-r--r--lib/stdlib/test/qlc_SUITE.erl22
-rw-r--r--lib/stdlib/test/supervisor_SUITE.erl122
-rw-r--r--lib/stdlib/test/supervisor_deadlock.erl45
-rw-r--r--lib/test_server/src/test_server.erl185
-rw-r--r--lib/test_server/src/test_server_ctrl.erl288
-rw-r--r--lib/test_server/src/test_server_h.erl44
-rw-r--r--lib/test_server/src/ts.erl25
-rw-r--r--lib/test_server/vsn.mk2
-rw-r--r--lib/tools/test/xref_SUITE.erl10
-rw-r--r--lib/wx/.gitignore2
-rw-r--r--lib/wx/Makefile54
-rw-r--r--lib/wx/Notes60
-rw-r--r--lib/wx/README35
-rw-r--r--lib/wx/TODO30
-rw-r--r--lib/wx/api_gen/Makefile4
-rw-r--r--lib/wx/api_gen/README15
-rw-r--r--lib/wx/api_gen/gen_util.erl14
-rw-r--r--lib/wx/api_gen/gl_gen.erl22
-rw-r--r--lib/wx/api_gen/gl_gen_erl.erl436
-rw-r--r--lib/wx/api_gen/gl_scan_doc.erl286
-rw-r--r--lib/wx/api_gen/glapi.conf8
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.erl26
-rw-r--r--lib/wx/api_gen/wx_gen.erl9
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl52
-rw-r--r--lib/wx/api_gen/wx_gen_erl.erl574
-rw-r--r--lib/wx/api_gen/wxapi.conf68
-rw-r--r--lib/wx/c_src/Makefile.in14
-rw-r--r--lib/wx/c_src/gen/gl_fdefs.h886
-rw-r--r--lib/wx/c_src/gen/gl_finit.h456
-rw-r--r--lib/wx/c_src/gen/gl_funcs.cpp2832
-rw-r--r--lib/wx/c_src/gen/glu_finit.h2
-rw-r--r--lib/wx/c_src/gen/wxe_derived_dest.h23
-rw-r--r--lib/wx/c_src/gen/wxe_events.cpp16
-rw-r--r--lib/wx/c_src/gen/wxe_funcs.cpp158
-rw-r--r--lib/wx/c_src/gen/wxe_macros.h5478
-rw-r--r--lib/wx/c_src/wxe_return.cpp12
-rw-r--r--lib/wx/c_src/wxe_return.h4
-rw-r--r--lib/wx/doc/src/Makefile63
-rw-r--r--lib/wx/examples/Makefile26
-rw-r--r--lib/wx/examples/demo/Makefile29
-rw-r--r--lib/wx/examples/simple/Makefile26
-rw-r--r--lib/wx/examples/sudoku/Makefile29
-rw-r--r--lib/wx/examples/xrc/Makefile10
-rw-r--r--lib/wx/include/gl.hrl1329
-rw-r--r--lib/wx/include/glu.hrl4
-rw-r--r--lib/wx/include/wx.hrl448
-rwxr-xr-xlib/wx/install.es302
-rw-r--r--lib/wx/src/Makefile5
-rw-r--r--lib/wx/src/gen/gl.erl17693
-rw-r--r--lib/wx/src/gen/glu.erl667
-rw-r--r--lib/wx/src/gen/wxAcceleratorEntry.erl47
-rw-r--r--lib/wx/src/gen/wxAcceleratorTable.erl14
-rw-r--r--lib/wx/src/gen/wxArtProvider.erl24
-rw-r--r--lib/wx/src/gen/wxAuiDockArt.erl4
-rw-r--r--lib/wx/src/gen/wxAuiManager.erl130
-rw-r--r--lib/wx/src/gen/wxAuiManagerEvent.erl46
-rw-r--r--lib/wx/src/gen/wxAuiNotebook.erl100
-rw-r--r--lib/wx/src/gen/wxAuiNotebookEvent.erl22
-rw-r--r--lib/wx/src/gen/wxAuiPaneInfo.erl332
-rw-r--r--lib/wx/src/gen/wxAuiTabArt.erl4
-rw-r--r--lib/wx/src/gen/wxBitmap.erl152
-rw-r--r--lib/wx/src/gen/wxBitmapButton.erl56
-rw-r--r--lib/wx/src/gen/wxBitmapDataObject.erl32
-rw-r--r--lib/wx/src/gen/wxBoxSizer.erl12
-rw-r--r--lib/wx/src/gen/wxBrush.erl55
-rw-r--r--lib/wx/src/gen/wxBufferedDC.erl78
-rw-r--r--lib/wx/src/gen/wxBufferedPaintDC.erl45
-rw-r--r--lib/wx/src/gen/wxButton.erl42
-rw-r--r--lib/wx/src/gen/wxCalendarCtrl.erl114
-rw-r--r--lib/wx/src/gen/wxCalendarDateAttr.erl112
-rw-r--r--lib/wx/src/gen/wxCalendarEvent.erl10
-rw-r--r--lib/wx/src/gen/wxCaret.erl62
-rw-r--r--lib/wx/src/gen/wxCheckBox.erl59
-rw-r--r--lib/wx/src/gen/wxCheckListBox.erl33
-rw-r--r--lib/wx/src/gen/wxChildFocusEvent.erl7
-rw-r--r--lib/wx/src/gen/wxChoice.erl46
-rw-r--r--lib/wx/src/gen/wxChoicebook.erl114
-rw-r--r--lib/wx/src/gen/wxClientDC.erl23
-rw-r--r--lib/wx/src/gen/wxClipboard.erl46
-rw-r--r--lib/wx/src/gen/wxCloseEvent.erl25
-rw-r--r--lib/wx/src/gen/wxColourData.erl29
-rw-r--r--lib/wx/src/gen/wxColourDialog.erl29
-rw-r--r--lib/wx/src/gen/wxColourPickerCtrl.erl53
-rw-r--r--lib/wx/src/gen/wxColourPickerEvent.erl7
-rw-r--r--lib/wx/src/gen/wxComboBox.erl92
-rw-r--r--lib/wx/src/gen/wxCommandEvent.erl31
-rw-r--r--lib/wx/src/gen/wxContextMenuEvent.erl10
-rw-r--r--lib/wx/src/gen/wxControl.erl10
-rw-r--r--lib/wx/src/gen/wxControlWithItems.erl67
-rw-r--r--lib/wx/src/gen/wxCursor.erl37
-rw-r--r--lib/wx/src/gen/wxDC.erl376
-rw-r--r--lib/wx/src/gen/wxDataObject.erl4
-rw-r--r--lib/wx/src/gen/wxDateEvent.erl7
-rw-r--r--lib/wx/src/gen/wxDatePickerCtrl.erl33
-rw-r--r--lib/wx/src/gen/wxDialog.erl66
-rw-r--r--lib/wx/src/gen/wxDirDialog.erl31
-rw-r--r--lib/wx/src/gen/wxDirPickerCtrl.erl42
-rw-r--r--lib/wx/src/gen/wxDisplayChangedEvent.erl4
-rw-r--r--lib/wx/src/gen/wxEraseEvent.erl7
-rw-r--r--lib/wx/src/gen/wxEvent.erl34
-rw-r--r--lib/wx/src/gen/wxEvtHandler.erl28
-rw-r--r--lib/wx/src/gen/wxFileDataObject.erl14
-rw-r--r--lib/wx/src/gen/wxFileDialog.erl63
-rw-r--r--lib/wx/src/gen/wxFileDirPickerEvent.erl7
-rw-r--r--lib/wx/src/gen/wxFilePickerCtrl.erl44
-rw-r--r--lib/wx/src/gen/wxFindReplaceData.erl29
-rw-r--r--lib/wx/src/gen/wxFindReplaceDialog.erl29
-rw-r--r--lib/wx/src/gen/wxFlexGridSizer.erl61
-rw-r--r--lib/wx/src/gen/wxFocusEvent.erl7
-rw-r--r--lib/wx/src/gen/wxFont.erl102
-rw-r--r--lib/wx/src/gen/wxFontData.erl50
-rw-r--r--lib/wx/src/gen/wxFontDialog.erl17
-rw-r--r--lib/wx/src/gen/wxFontPickerCtrl.erl46
-rw-r--r--lib/wx/src/gen/wxFontPickerEvent.erl7
-rw-r--r--lib/wx/src/gen/wxFrame.erl96
-rw-r--r--lib/wx/src/gen/wxGBSizerItem.erl4
-rw-r--r--lib/wx/src/gen/wxGLCanvas.erl60
-rw-r--r--lib/wx/src/gen/wxGauge.erl62
-rw-r--r--lib/wx/src/gen/wxGenericDirCtrl.erl83
-rw-r--r--lib/wx/src/gen/wxGraphicsBrush.erl4
-rw-r--r--lib/wx/src/gen/wxGraphicsContext.erl267
-rw-r--r--lib/wx/src/gen/wxGraphicsFont.erl4
-rw-r--r--lib/wx/src/gen/wxGraphicsMatrix.erl66
-rw-r--r--lib/wx/src/gen/wxGraphicsObject.erl18
-rw-r--r--lib/wx/src/gen/wxGraphicsPath.erl124
-rw-r--r--lib/wx/src/gen/wxGraphicsPen.erl4
-rw-r--r--lib/wx/src/gen/wxGraphicsRenderer.erl51
-rw-r--r--lib/wx/src/gen/wxGrid.erl796
-rw-r--r--lib/wx/src/gen/wxGridBagSizer.erl210
-rw-r--r--lib/wx/src/gen/wxGridCellAttr.erl73
-rw-r--r--lib/wx/src/gen/wxGridCellBoolEditor.erl19
-rw-r--r--lib/wx/src/gen/wxGridCellBoolRenderer.erl8
-rw-r--r--lib/wx/src/gen/wxGridCellChoiceEditor.erl18
-rw-r--r--lib/wx/src/gen/wxGridCellEditor.erl43
-rw-r--r--lib/wx/src/gen/wxGridCellFloatEditor.erl17
-rw-r--r--lib/wx/src/gen/wxGridCellFloatRenderer.erl29
-rw-r--r--lib/wx/src/gen/wxGridCellNumberEditor.erl20
-rw-r--r--lib/wx/src/gen/wxGridCellNumberRenderer.erl8
-rw-r--r--lib/wx/src/gen/wxGridCellRenderer.erl10
-rw-r--r--lib/wx/src/gen/wxGridCellStringRenderer.erl8
-rw-r--r--lib/wx/src/gen/wxGridCellTextEditor.erl11
-rw-r--r--lib/wx/src/gen/wxGridEvent.erl28
-rw-r--r--lib/wx/src/gen/wxGridSizer.erl43
-rw-r--r--lib/wx/src/gen/wxHelpEvent.erl22
-rw-r--r--lib/wx/src/gen/wxHtmlEasyPrinting.erl74
-rw-r--r--lib/wx/src/gen/wxHtmlLinkEvent.erl7
-rw-r--r--lib/wx/src/gen/wxHtmlWindow.erl92
-rw-r--r--lib/wx/src/gen/wxIcon.erl37
-rw-r--r--lib/wx/src/gen/wxIconBundle.erl42
-rw-r--r--lib/wx/src/gen/wxIconizeEvent.erl7
-rw-r--r--lib/wx/src/gen/wxIdleEvent.erl30
-rw-r--r--lib/wx/src/gen/wxImage.erl452
-rw-r--r--lib/wx/src/gen/wxImageList.erl82
-rw-r--r--lib/wx/src/gen/wxJoystickEvent.erl55
-rw-r--r--lib/wx/src/gen/wxKeyEvent.erl46
-rw-r--r--lib/wx/src/gen/wxLayoutAlgorithm.erl35
-rw-r--r--lib/wx/src/gen/wxListBox.erl66
-rw-r--r--lib/wx/src/gen/wxListCtrl.erl300
-rw-r--r--lib/wx/src/gen/wxListEvent.erl43
-rw-r--r--lib/wx/src/gen/wxListItem.erl89
-rw-r--r--lib/wx/src/gen/wxListItemAttr.erl38
-rw-r--r--lib/wx/src/gen/wxListView.erl34
-rw-r--r--lib/wx/src/gen/wxListbook.erl114
-rw-r--r--lib/wx/src/gen/wxLogNull.erl8
-rw-r--r--lib/wx/src/gen/wxMDIChildFrame.erl45
-rw-r--r--lib/wx/src/gen/wxMDIClientWindow.erl26
-rw-r--r--lib/wx/src/gen/wxMDIParentFrame.erl60
-rw-r--r--lib/wx/src/gen/wxMask.erl46
-rw-r--r--lib/wx/src/gen/wxMaximizeEvent.erl4
-rw-r--r--lib/wx/src/gen/wxMemoryDC.erl29
-rw-r--r--lib/wx/src/gen/wxMenu.erl334
-rw-r--r--lib/wx/src/gen/wxMenuBar.erl89
-rw-r--r--lib/wx/src/gen/wxMenuEvent.erl13
-rw-r--r--lib/wx/src/gen/wxMenuItem.erl99
-rw-r--r--lib/wx/src/gen/wxMessageDialog.erl17
-rw-r--r--lib/wx/src/gen/wxMiniFrame.erl30
-rw-r--r--lib/wx/src/gen/wxMirrorDC.erl21
-rw-r--r--lib/wx/src/gen/wxMouseCaptureChangedEvent.erl7
-rw-r--r--lib/wx/src/gen/wxMouseEvent.erl127
-rw-r--r--lib/wx/src/gen/wxMoveEvent.erl7
-rw-r--r--lib/wx/src/gen/wxMultiChoiceDialog.erl24
-rw-r--r--lib/wx/src/gen/wxNavigationKeyEvent.erl28
-rw-r--r--lib/wx/src/gen/wxNcPaintEvent.erl4
-rw-r--r--lib/wx/src/gen/wxNotebook.erl123
-rw-r--r--lib/wx/src/gen/wxNotebookEvent.erl16
-rw-r--r--lib/wx/src/gen/wxNotifyEvent.erl13
-rw-r--r--lib/wx/src/gen/wxPageSetupDialog.erl21
-rw-r--r--lib/wx/src/gen/wxPageSetupDialogData.erl111
-rw-r--r--lib/wx/src/gen/wxPaintDC.erl23
-rw-r--r--lib/wx/src/gen/wxPaintEvent.erl4
-rw-r--r--lib/wx/src/gen/wxPalette.erl27
-rw-r--r--lib/wx/src/gen/wxPaletteChangedEvent.erl10
-rw-r--r--lib/wx/src/gen/wxPanel.erl32
-rw-r--r--lib/wx/src/gen/wxPasswordEntryDialog.erl18
-rw-r--r--lib/wx/src/gen/wxPen.erl54
-rw-r--r--lib/wx/src/gen/wxPickerBase.erl52
-rw-r--r--lib/wx/src/gen/wxPostScriptDC.erl28
-rw-r--r--lib/wx/src/gen/wxPreviewCanvas.erl4
-rw-r--r--lib/wx/src/gen/wxPreviewControlBar.erl29
-rw-r--r--lib/wx/src/gen/wxPreviewFrame.erl30
-rw-r--r--lib/wx/src/gen/wxPrintData.erl80
-rw-r--r--lib/wx/src/gen/wxPrintDialog.erl34
-rw-r--r--lib/wx/src/gen/wxPrintDialogData.erl83
-rw-r--r--lib/wx/src/gen/wxPrintPreview.erl67
-rw-r--r--lib/wx/src/gen/wxPrinter.erl45
-rw-r--r--lib/wx/src/gen/wxPrintout.erl66
-rw-r--r--lib/wx/src/gen/wxProgressDialog.erl32
-rw-r--r--lib/wx/src/gen/wxQueryNewPaletteEvent.erl10
-rw-r--r--lib/wx/src/gen/wxRadioBox.erl118
-rw-r--r--lib/wx/src/gen/wxRadioButton.erl38
-rw-r--r--lib/wx/src/gen/wxRegion.erl166
-rw-r--r--lib/wx/src/gen/wxSashEvent.erl19
-rw-r--r--lib/wx/src/gen/wxSashLayoutWindow.erl59
-rw-r--r--lib/wx/src/gen/wxSashWindow.erl56
-rw-r--r--lib/wx/src/gen/wxScreenDC.erl20
-rw-r--r--lib/wx/src/gen/wxScrollBar.erl56
-rw-r--r--lib/wx/src/gen/wxScrollEvent.erl10
-rw-r--r--lib/wx/src/gen/wxScrollWinEvent.erl10
-rw-r--r--lib/wx/src/gen/wxScrolledWindow.erl67
-rw-r--r--lib/wx/src/gen/wxSetCursorEvent.erl19
-rw-r--r--lib/wx/src/gen/wxShowEvent.erl10
-rw-r--r--lib/wx/src/gen/wxSingleChoiceDialog.erl27
-rw-r--r--lib/wx/src/gen/wxSizeEvent.erl7
-rw-r--r--lib/wx/src/gen/wxSizer.erl402
-rw-r--r--lib/wx/src/gen/wxSizerFlags.erl46
-rw-r--r--lib/wx/src/gen/wxSizerItem.erl134
-rw-r--r--lib/wx/src/gen/wxSlider.erl65
-rw-r--r--lib/wx/src/gen/wxSpinButton.erl47
-rw-r--r--lib/wx/src/gen/wxSpinCtrl.erl71
-rw-r--r--lib/wx/src/gen/wxSpinEvent.erl10
-rw-r--r--lib/wx/src/gen/wxSplashScreen.erl25
-rw-r--r--lib/wx/src/gen/wxSplitterEvent.erl19
-rw-r--r--lib/wx/src/gen/wxSplitterWindow.erl115
-rw-r--r--lib/wx/src/gen/wxStaticBitmap.erl36
-rw-r--r--lib/wx/src/gen/wxStaticBox.erl30
-rw-r--r--lib/wx/src/gen/wxStaticBoxSizer.erl29
-rw-r--r--lib/wx/src/gen/wxStaticLine.erl37
-rw-r--r--lib/wx/src/gen/wxStaticText.erl39
-rw-r--r--lib/wx/src/gen/wxStatusBar.erl88
-rw-r--r--lib/wx/src/gen/wxStdDialogButtonSizer.erl23
-rw-r--r--lib/wx/src/gen/wxStyledTextCtrl.erl1414
-rw-r--r--lib/wx/src/gen/wxStyledTextEvent.erl76
-rw-r--r--lib/wx/src/gen/wxSysColourChangedEvent.erl4
-rw-r--r--lib/wx/src/gen/wxSystemOptions.erl32
-rw-r--r--lib/wx/src/gen/wxSystemSettings.erl33
-rw-r--r--lib/wx/src/gen/wxTaskBarIcon.erl102
-rw-r--r--lib/wx/src/gen/wxTaskBarIconEvent.erl64
-rw-r--r--lib/wx/src/gen/wxTextAttr.erl103
-rw-r--r--lib/wx/src/gen/wxTextCtrl.erl186
-rw-r--r--lib/wx/src/gen/wxTextDataObject.erl22
-rw-r--r--lib/wx/src/gen/wxTextEntryDialog.erl24
-rw-r--r--lib/wx/src/gen/wxToggleButton.erl38
-rw-r--r--lib/wx/src/gen/wxToolBar.erl269
-rw-r--r--lib/wx/src/gen/wxToolTip.erl24
-rw-r--r--lib/wx/src/gen/wxToolbook.erl114
-rw-r--r--lib/wx/src/gen/wxTopLevelWindow.erl91
-rw-r--r--lib/wx/src/gen/wxTreeCtrl.erl318
-rw-r--r--lib/wx/src/gen/wxTreeEvent.erl28
-rw-r--r--lib/wx/src/gen/wxTreebook.erl136
-rw-r--r--lib/wx/src/gen/wxUpdateUIEvent.erl61
-rw-r--r--lib/wx/src/gen/wxWindow.erl796
-rw-r--r--lib/wx/src/gen/wxWindowCreateEvent.erl4
-rw-r--r--lib/wx/src/gen/wxWindowDC.erl23
-rw-r--r--lib/wx/src/gen/wxWindowDestroyEvent.erl4
-rw-r--r--lib/wx/src/gen/wxXmlResource.erl103
-rw-r--r--lib/wx/src/gen/wx_misc.erl78
-rw-r--r--lib/wx/src/gen/wxe_debug.hrl5479
-rw-r--r--lib/wx/src/gen/wxe_funcs.hrl5477
-rw-r--r--lib/wx/src/wx.erl162
-rw-r--r--lib/wx/src/wxe_master.erl11
-rw-r--r--lib/wx/test/Makefile12
-rw-r--r--lib/wx/test/wx_class_SUITE.erl16
-rw-r--r--lib/xmerl/include/xmerl_xlink.hrl26
-rw-r--r--lib/xmerl/src/Makefile1
-rw-r--r--lib/xmerl/src/xmerl_sax_parser.erl3
-rw-r--r--lib/xmerl/src/xmerl_sax_parser_base.erlsrc3
719 files changed, 59586 insertions, 35308 deletions
diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c
index accd368af1..dbff14f9b3 100644
--- a/lib/asn1/c_src/asn1_erl_nif.c
+++ b/lib/asn1/c_src/asn1_erl_nif.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2002-2011. All Rights Reserved.
+ * Copyright Ericsson AB 2002-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -1197,7 +1197,7 @@ static ERL_NIF_TERM encode_per_complete(ErlNifEnv* env, int argc,
ErlNifBinary out_binary;
int complete_len;
if (!enif_inspect_iolist_as_binary(env, argv[0], &in_binary))
- return enif_make_atom(env, "badarg");
+ return enif_make_badarg(env);
if (!enif_alloc_binary(in_binary.size, &out_binary))
return enif_make_atom(env, "alloc_binary_failed");
diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml
index 0b9ec3df7f..3be58cbc8e 100644
--- a/lib/asn1/doc/src/asn1ct.xml
+++ b/lib/asn1/doc/src/asn1ct.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -44,15 +44,15 @@
</description>
<funcs>
<func>
- <name>compile(Asn1module) -> ok | {error,Reason}</name>
- <name>compile(Asn1module , Options) -> ok | {error,Reason}</name>
+ <name>compile(Asn1module) -> ok | {error, Reason}</name>
+ <name>compile(Asn1module, Options) -> ok | {error, Reason}</name>
<fsummary>Compile an ASN.1 module and generate encode/decode functions according to the encoding rules BER or PER.</fsummary>
<type>
<v>Asn1module = atom() | string()</v>
<v>Options = [Option| OldOption]</v>
- <v>Option = ber_bin | per_bin | uper_bin | der | compact_bit_string |
- noobj | {n2n,EnumTypeName} |{outdir,Dir} | {i,IncludeDir} | optimize |
- nif | asn1config | undec_rest | {inline,OutputName} | inline |
+ <v>Option = ber_bin | per_bin | uper_bin | der | compact_bit_string |
+ noobj | {n2n, EnumTypeName} |{outdir, Dir} | {i, IncludeDir} | optimize |
+ nif | asn1config | undec_rest | {inline, OutputName} | inline |
{macro_name_prefix, Prefix} | {record_name_prefix, Prefix} | verbose | warnings_as_errors</v>
<v>OldOption = ber | per</v>
<v>Reason = term()</v>
@@ -158,7 +158,7 @@ File3.asn </pre>
of the BIT STRING type in Erlang. The notation:
</p>
<pre>
-BitString = {Unused,Binary},
+BitString = {Unused, Binary},
Unused = integer(),
Binary = binary()
</pre>
@@ -172,7 +172,7 @@ Binary = binary()
</seealso>.
</p>
</item>
- <tag><c>{n2n,EnumTypeName}</c></tag>
+ <tag><c>{n2n, EnumTypeName}</c></tag>
<item>
<p>
Tells the compiler to generate functions for conversion between
@@ -190,17 +190,17 @@ Binary = binary()
<c>.erl</c> file. If this option is omitted the generated Erlang module
will be compiled.</p>
</item>
- <tag><c>{i,IncludeDir}</c></tag>
+ <tag><c>{i, IncludeDir}</c></tag>
<item>
<p>Adds <c>IncludeDir</c> to the search-path for
<c>.asn1db</c> and asn1 source files. The compiler tries
to open a <c>.asn1db</c> file when a module imports
definitions from another ASN.1 module. If no
<c>.asn1db</c> file is found the asn1 source file is
- parsed. Several <c>{i,IncludeDir}</c> can be given.
+ parsed. Several <c>{i, IncludeDir}</c> can be given.
</p>
</item>
- <tag><c>{outdir,Dir}</c></tag>
+ <tag><c>{outdir, Dir}</c></tag>
<item>
<p>Specifies the directory <c>Dir</c> where all generated files
shall be placed. If omitted the files are placed in the
@@ -251,11 +251,11 @@ Binary = binary()
also have some following bytes. Now it is possible to get
those following bytes returned together with the decoded
value. If an asn1 spec is compiled with this option a tuple
- <c>{ok,Value,Rest}</c> is returned. <c>Rest</c> may be a
+ <c>{ok, Value, Rest}</c> is returned. <c>Rest</c> may be a
list or a binary. Earlier versions of the compiler ignored
those following bytes.</p>
</item>
- <tag><c>{inline,OutputName}</c></tag>
+ <tag><c>{inline, OutputName}</c></tag>
<item>
<p>Compiling with this option gives one output module
containing all asn1 run-time functionality. The asn1 specs
@@ -267,7 +267,7 @@ Binary = binary()
by the <c>igor</c> module of <c>syntax_tools</c>. By default
the functions generated from the first asn1 spec in the
<c>.set.asn</c> are exported, unless a
- <c>{export,[atom()]}</c> or <c>{export_all,true}</c> option
+ <c>{export, [atom()]}</c> or <c>{export_all, true}</c> option
are provided. The list of atoms are names of chosen asn1
specs from the <c>.set.asn</c> file. </p>
<p>When used together with <c>nif</c> for <c>ber_bin</c>, the
@@ -278,7 +278,7 @@ Binary = binary()
<tag><c>inline</c></tag>
<item>
<p>It is also possible to use the sole argument <c>inline</c>.
- It is as <c>{inline,OutputName}</c>, but the output file gets the
+ It is as <c>{inline, OutputName}</c>, but the output file gets the
default name of the source <c>.set.asn</c> file.</p>
</item>
<tag><c>{macro_name_prefix, Prefix}</c></tag>
@@ -322,7 +322,7 @@ Binary = binary()
</desc>
</func>
<func>
- <name>encode(Module,Type,Value)-> {ok,Bytes} | {error,Reason}</name>
+ <name>encode(Module, Type, Value)-> {ok, Bytes} | {error, Reason}</name>
<fsummary>Encode an ASN.1 value.</fsummary>
<type>
<v>Module = Type = atom()</v>
@@ -337,13 +337,13 @@ Binary = binary()
encode function only performs rudimentary tests that the input
<c>Value</c>
is a correct instance of <c>Type</c>. The length of strings is for example
- not always checked. Returns <c>{ok,Bytes}</c> if successful or
- <c>{error,Reason}</c> if an error occurred.
+ not always checked. Returns <c>{ok, Bytes}</c> if successful or
+ <c>{error, Reason}</c> if an error occurred.
</p>
</desc>
</func>
<func>
- <name>decode(Module,Type,Bytes) -> {ok,Value}|{error,Reason}</name>
+ <name>decode(Module, Type, Bytes) -> {ok, Value} | {error, Reason}</name>
<fsummary>Decode from Bytes into an ASN.1 value.</fsummary>
<type>
<v>Module = Type = atom()</v>
@@ -352,11 +352,11 @@ Binary = binary()
</type>
<desc>
<p>Decodes <c>Type</c> from <c>Module</c> from the list of bytes
- <c>Bytes</c>. Returns <c>{ok,Value}</c> if successful.</p>
+ <c>Bytes</c>. Returns <c>{ok, Value}</c> if successful.</p>
</desc>
</func>
<func>
- <name>value(Module ,Type) -> {ok,Value} | {error,Reason}</name>
+ <name>value(Module, Type) -> {ok, Value} | {error, Reason}</name>
<fsummary>Create an ASN.1 value for test purposes.</fsummary>
<type>
<v>Module = Type = atom()</v>
@@ -371,26 +371,48 @@ Binary = binary()
</desc>
</func>
<func>
- <name>test(Module) -> ok | {error,Reason}</name>
- <name>test(Module,Type) -> ok | {error,Reason}</name>
- <name>test(Module,Type,Value) -> ok | {error,Reason}</name>
- <fsummary>Perform a test of encode and decode for types in an ASN.1 module.</fsummary>
+ <name>test(Module) -> ok | {error, Reason}</name>
+ <name>test(Module, Type | Options) -> ok | {error, Reason}</name>
+ <name>test(Module, Type, Value | Options) -> ok | {error, Reason}</name>
+ <fsummary>Perform a test of encode and decode for types in an ASN.1 module.</fsummary>
+ <type>
+ <v>Module = Type = atom()</v>
+ <v>Value = term()</v>
+ <v>Options = [{i, IncludeDir}]</v>
+ <v>Reason = term()</v>
+ </type>
<desc>
- <p>Performs a test of encode and decode of all types in <c>Module</c>.
+ <p>Performs a test of encode and decode of types in <c>Module</c>.
The generated functions are called by this function.
This function is useful during test to secure that the generated
- encode and decode functions and the general runtime support work
- as expected. <br></br>
-<c>test/1</c> iterates over all types in <c>Module</c>. <br></br>
-<c>test/2</c> tests type <c>Type</c> with a random value. <br></br>
-<c><![CDATA[test/3 tests type <c>Type]]></c> with <c>Value</c>. <br></br>
+ encode and decode functions and the general runtime support work
+ as expected.</p>
+
+ <list type="bulleted">
+ <item>
+ <p><c>test/1</c> iterates over all types in <c>Module</c>.</p>
+ </item>
+ <item>
+ <p><c>test/2</c> tests type <c>Type</c> with a random value.</p>
+ </item>
+ <item>
+ <p><c>test/3</c> tests type <c>Type</c> with <c>Value</c>.</p>
+ </item>
+ </list>
- Schematically the following happens for each type in the module.</p>
- <p></p>
+ <p>Schematically the following happens for each type in the module:
<code type="none">
-{ok,Value} = asn1ct:value(Module,Type),
-{ok,Bytes} = asn1ct:encode(Module,Type,Value),
-{ok,Value} = asn1ct:decode(Module,Type,Bytes). </code>
+{ok, Value} = asn1ct:value(Module, Type),
+{ok, Bytes} = asn1ct:encode(Module, Type, Value),
+{ok, Value} = asn1ct:decode(Module, Type, Bytes).</code></p>
+
+ <p>The <c>test</c> functions utilizes the <c>*.asn1db</c> files
+ for all included modules. If they are located in a different
+ directory than the current working directory, use the include
+ option to add paths. This is only needed when automatically
+ generating values. For static values using <c>Value</c> no
+ options are needed.</p>
+
</desc>
</func>
</funcs>
diff --git a/lib/asn1/src/Makefile b/lib/asn1/src/Makefile
index 3a59773d93..5614cbea91 100644
--- a/lib/asn1/src/Makefile
+++ b/lib/asn1/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2011. All Rights Reserved.
+# Copyright Ericsson AB 1997-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -58,7 +58,8 @@ CT_MODULES= \
asn1ct_gen_ber_bin_v2 \
asn1ct_value \
asn1ct_tok \
- asn1ct_parser2
+ asn1ct_parser2 \
+ asn1ct_table
RT_MODULES= \
asn1rt \
diff --git a/lib/asn1/src/asn1_db.erl b/lib/asn1/src/asn1_db.erl
index f680b3d064..0862ef6e02 100644
--- a/lib/asn1/src/asn1_db.erl
+++ b/lib/asn1/src/asn1_db.erl
@@ -1,167 +1,146 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%%
-module(asn1_db).
-%-compile(export_all).
--export([dbnew/1,dbsave/2,dbload/1,dbput/3,dbget/2,dbget_all/1]).
--export([dbget_all_mod/1,dbstop/0,dbclear/0,dberase_module/1,dbstart/1,stop_server/1]).
-%% internal exports
--export([dbloop0/1,dbloop/2]).
-%% Db stuff
-dbstart(Includes) ->
- start_server(asn1db, asn1_db, dbloop0, [Includes]).
+-export([dbstart/1,dbnew/1,dbsave/2,dbload/1,dbput/3,dbget/2,dbget_all/1]).
+-export([dbget_all_mod/1,dbclear/0,dberase_module/1,dbstop/0]).
-dbloop0(Includes) ->
- dbloop(Includes, ets:new(asn1, [set,named_table])).
-
-opentab(Tab,Mod,[]) ->
- opentab(Tab,Mod,["."]);
-opentab(Tab,Mod,Includes) ->
- Base = lists:concat([Mod,".asn1db"]),
- opentab2(Tab,Base,Mod,Includes,ok).
+-record(state, {parent, monitor, includes, table}).
-opentab2(_Tab,_Base,_Mod,[],Error) ->
- Error;
-opentab2(Tab,Base,Mod,[Ih|It],_Error) ->
- File = filename:join(Ih,Base),
- case ets:file2tab(File) of
- {ok,Modtab} ->
- ets:insert(Tab,{Mod, Modtab}),
- {ok,Modtab};
- NewErr ->
- opentab2(Tab,Base,Mod,It,NewErr)
+%% Interface
+dbstart(Includes) ->
+ Parent = self(),
+ case get(?MODULE) of
+ undefined ->
+ put(?MODULE, spawn_link(fun() -> init(Parent, Includes) end)),
+ true;
+ _Pid ->
+ req({new_includes, Includes})
end.
-
-dbloop(Includes, Tab) ->
+dbnew(Module) -> req({new, Module}).
+dbsave(OutFile, Module) -> req({save, OutFile, Module}).
+dbload(Module) -> req({load, Module}).
+dbput(Module, K, V) -> req({set, Module, K, V}).
+dbget(Module, K) -> req({get, Module, K}).
+dbget_all(K) -> req({get_all, K}).
+dbget_all_mod(Mod) -> req({all_mod, Mod}).
+dbclear() -> req(clear).
+dberase_module({module,M}) -> req({delete_mod, M}).
+dbstop() -> Resp = req(stop), erase(?MODULE), Resp.
+
+%% Internal functions
+req(Request) ->
+ get(?MODULE) ! {self(), Request},
+ receive {?MODULE, Reply} -> Reply after 5000 -> exit(db_timeout) end.
+
+reply(From, Response) ->
+ From ! {?MODULE, Response}.
+
+init(Parent, Includes) ->
+ MRef = erlang:monitor(process, Parent),
+ loop(#state{parent = Parent, monitor = MRef, includes = Includes,
+ table = ets:new(?MODULE, [])}).
+
+loop(#state{parent = Parent, monitor = MRef, table = Table,
+ includes = Includes} = State) ->
receive
- {From,{set, Mod, K2, V}} ->
- [{_,Modtab}] = ets:lookup(Tab,Mod),
- ets:insert(Modtab,{K2, V}),
- From ! {asn1db, ok},
- dbloop(Includes, Tab);
- {From, {get, Mod, K2}} ->
- Result = case ets:lookup(Tab,Mod) of
- [] ->
- opentab(Tab,Mod,Includes);
- [{_,Modtab}] -> {ok,Modtab}
- end,
- case Result of
- {ok,Newtab} ->
- From ! {asn1db, lookup(Newtab, K2)};
- _Error ->
- From ! {asn1db, undefined}
- end,
- dbloop(Includes, Tab);
- {From, {all_mod, Mod}} ->
- [{_,Modtab}] = ets:lookup(Tab,Mod),
- From ! {asn1db, ets:tab2list(Modtab)},
- dbloop(Includes, Tab);
- {From, {delete_mod, Mod}} ->
- [{_,Modtab}] = ets:lookup(Tab,Mod),
- ets:delete(Modtab),
- ets:delete(Tab,Mod),
- From ! {asn1db, ok},
- dbloop(Includes, Tab);
- {From, {save, OutFile,Mod}} ->
- [{_,Mtab}] = ets:lookup(Tab,Mod),
- From ! {asn1db, ets:tab2file(Mtab,OutFile)},
- dbloop(Includes,Tab);
- {From, {load, Mod}} ->
- Result = case ets:lookup(Tab,Mod) of
- [] ->
- opentab(Tab,Mod,Includes);
- [{_,Modtab}] -> {ok,Modtab}
- end,
- From ! {asn1db,Result},
- dbloop(Includes,Tab);
- {From, {new, Mod}} ->
- case ets:lookup(Tab,Mod) of
- [{_,Modtab}] ->
- ets:delete(Modtab);
- _ ->
- true
- end,
- Tabname = list_to_atom(lists:concat(["asn1_",Mod])),
- ets:new(Tabname, [set,named_table]),
- ets:insert(Tab,{Mod,Tabname}),
- From ! {asn1db, ok},
- dbloop(Includes,Tab);
- {From, stop} ->
- From ! {asn1db, ok}; %% nothing to store
- {From, clear} ->
- ModTabList = [Mt||{_,Mt} <- ets:tab2list(Tab)],
- lists:foreach(fun(T) -> ets:delete(T) end,ModTabList),
- ets:delete(Tab),
- From ! {asn1db, cleared},
- dbloop(Includes, ets:new(asn1, [set]));
- {From,{new_includes,[NewIncludes]}} ->
- From ! {asn1db,done},
- dbloop(NewIncludes,Tab)
+ {From, {set, Mod, K2, V}} ->
+ [{_, Modtab}] = ets:lookup(Table, Mod),
+ ets:insert(Modtab, {K2, V}),
+ reply(From, ok),
+ loop(State);
+ {From, {get, Mod, K2}} ->
+ Result = case ets:lookup(Table, Mod) of
+ [] -> opentab(Table, Mod, Includes);
+ [{_, Modtab}] -> {ok, Modtab}
+ end,
+ case Result of
+ {ok, Newtab} -> reply(From, lookup(Newtab, K2));
+ _Error -> reply(From, undefined)
+ end,
+ loop(State);
+ {From, {all_mod, Mod}} ->
+ [{_, Modtab}] = ets:lookup(Table, Mod),
+ reply(From, ets:tab2list(Modtab)),
+ loop(State);
+ {From, {delete_mod, Mod}} ->
+ [{_, Modtab}] = ets:lookup(Table, Mod),
+ ets:delete(Modtab),
+ ets:delete(Table, Mod),
+ reply(From, ok),
+ loop(State);
+ {From, {save, OutFile, Mod}} ->
+ [{_,Mtab}] = ets:lookup(Table, Mod),
+ reply(From, ets:tab2file(Mtab, OutFile)),
+ loop(State);
+ {From, {load, Mod}} ->
+ Result = case ets:lookup(Table, Mod) of
+ [] -> opentab(Table, Mod, Includes);
+ [{_, Modtab}] -> {ok, Modtab}
+ end,
+ reply(From, Result),
+ loop(State);
+ {From, {new, Mod}} ->
+ case ets:lookup(Table, Mod) of
+ [{_, Modtab}] -> ets:delete(Modtab);
+ _ -> true
+ end,
+ ModTableId = ets:new(list_to_atom(lists:concat(["asn1_",Mod])), []),
+ ets:insert(Table, {Mod, ModTableId}),
+ reply(From, ok),
+ loop(State);
+ {From, clear} ->
+ [ets:delete(Mt) || {_, Mt} <- ets:tab2list(Table)],
+ ets:delete(Table),
+ reply(From, cleared),
+ loop(State#state{table = ets:new(asn1, [set])});
+ {From, {new_includes, NewIncludes}} ->
+ reply(From, true),
+ loop(State#state{includes = NewIncludes});
+ {From, stop} ->
+ reply(From, stopped); %% Nothing to store
+ {'DOWN', MRef, process, Parent, Reason} ->
+ exit(Reason)
end.
+opentab(Tab, Mod, []) ->
+ opentab(Tab, Mod, ["."]);
+opentab(Tab, Mod, Includes) ->
+ Base = lists:concat([Mod, ".asn1db"]),
+ opentab2(Tab, Base, Mod, Includes, ok).
-%%all(Tab, K) ->
-%% pickup(K, ets:match(Tab, {{K, '$1'}, '$2'})).
-%%pickup(K, []) -> [];
-%%pickup(K, [[V1,V2] |T]) ->
-%% [{{K,V1},V2} | pickup(K, T)].
+opentab2(_Tab, _Base, _Mod, [], Error) ->
+ Error;
+opentab2(Tab, Base, Mod, [Ih|It], _Error) ->
+ File = filename:join(Ih, Base),
+ case ets:file2tab(File) of
+ {ok, Modtab} ->
+ ets:insert(Tab, {Mod, Modtab}),
+ {ok, Modtab};
+ NewErr ->
+ opentab2(Tab, Base, Mod, It, NewErr)
+ end.
lookup(Tab, K) ->
case ets:lookup(Tab, K) of
- [] -> undefined;
- [{K,V}] -> V
+ [] -> undefined;
+ [{K,V}] -> V
end.
-
-
-dbnew(Module) -> req({new,Module}).
-dbsave(OutFile,Module) -> req({save,OutFile,Module}).
-dbload(Module) -> req({load,Module}).
-
-dbput(Module,K,V) -> req({set, Module, K, V}).
-dbget(Module,K) -> req({get, Module, K}).
-dbget_all(K) -> req({get_all, K}).
-dbget_all_mod(Mod) -> req({all_mod,Mod}).
-dbstop() -> stop_server(asn1db).
-dbclear() -> req(clear).
-dberase_module({module,M})->
- req({delete_mod, M}).
-
-req(R) ->
- asn1db ! {self(), R},
- receive {asn1db, Reply} -> Reply end.
-
-stop_server(Name) ->
- stop_server(Name, whereis(Name)).
-stop_server(_, undefined) -> stopped;
-stop_server(Name, _Pid) ->
- Name ! {self(), stop},
- receive {Name, _} -> stopped end.
-
-
-start_server(Name,Mod,Fun,Args) ->
- case whereis(Name) of
- undefined ->
- register(Name, spawn(Mod,Fun, Args));
- _Pid ->
- req({new_includes,Args})
- end.
-
-
diff --git a/lib/asn1/src/asn1ct.erl b/lib/asn1/src/asn1ct.erl
index 85bb5b2f28..2d17f73a2c 100644
--- a/lib/asn1/src/asn1ct.erl
+++ b/lib/asn1/src/asn1ct.erl
@@ -1,7 +1,8 @@
+%% vim: tabstop=8:shiftwidth=4
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,13 +25,13 @@
%%-compile(export_all).
%% Public exports
-export([compile/1, compile/2]).
--export([start/0, start/1, stop/0]).
+-export([start/0, start/1]).
-export([encode/2, encode/3, decode/3]).
--export([test/1, test/2, test/3, value/2]).
+-export([test/1, test/2, test/3, value/2, value/3]).
%% Application internal exports
-export([compile_asn/3,compile_asn1/3,compile_py/3,compile/3,
- value/1,vsn/0,
- create_ets_table/2,get_name_of_def/1,get_pos_of_def/1]).
+ vsn/0,
+ get_name_of_def/1,get_pos_of_def/1]).
-export([read_config_data/1,get_gen_state_field/1,get_gen_state/0,
partial_inc_dec_toptype/1,save_gen_state/1,update_gen_state/2,
get_tobe_refed_func/1,reset_gen_state/0,is_function_generated/1,
@@ -93,25 +94,24 @@ compile(File,Options) when is_list(Options) ->
end,
Options1 = optimize_ber_bin(Options),
Options2 = includes(File,Options1),
- Includes=[I||{i,I}<-Options2],
- case (catch input_file_type(File,Includes)) of
- {single_file,SuffixedFile} -> %% "e.g. "/tmp/File.asn"
- (catch compile1(SuffixedFile,Options2));
- {multiple_files_file,SetBase,FileName} ->
- FileList = get_file_list(FileName,Includes),
-%% io:format("FileList: ~p~n",[FileList]),
- case FileList of
- L when is_list(L) ->
- (catch compile_set(SetBase,FileList,Options2));
- Err ->
- Err
- end;
- Err = {input_file_error,_Reason} ->
- {error,Err};
- Err2 -> Err2
+ Includes = strip_includes(Options2),
+ in_process(fun() -> compile_proc(File, Includes, Options2) end).
+
+compile_proc(File, Includes, Options) ->
+ case input_file_type(File, Includes) of
+ {single_file, SuffixedFile} -> %% "e.g. "/tmp/File.asn"
+ compile1(SuffixedFile, Options);
+ {multiple_files_file, SetBase, FileName} ->
+ case get_file_list(FileName, Includes) of
+ FileList when is_list(FileList) ->
+ compile_set(SetBase, FileList, Options);
+ Err ->
+ Err
+ end;
+ Err = {input_file_error, _Reason} ->
+ {error, Err}
end.
-
compile1(File,Options) when is_list(Options) ->
verbose("Erlang ASN.1 version ~p compiling ~p ~n",[?vsn,File],Options),
verbose("Compiler Options: ~p~n",[Options],Options),
@@ -121,13 +121,13 @@ compile1(File,Options) when is_list(Options) ->
DbFile = outfile(Base,"asn1db",Options),
Includes = [I || {i,I} <- Options],
EncodingRule = get_rule(Options),
- create_ets_table(asn1_functab,[named_table]),
+ asn1ct_table:new(asn1_functab),
Continue1 = scan(File,Options),
Continue2 = parse(Continue1,File,Options),
Continue3 = check(Continue2,File,OutFile,Includes,EncodingRule,
DbFile,Options,[]),
Continue4 = generate(Continue3,OutFile,EncodingRule,Options),
- delete_tables([asn1_functab]),
+ asn1ct_table:delete(asn1_functab),
Ret = compile_erl(Continue4,OutFile,Options),
case inline(is_inline(Options),
inline_output(Options,filename:rootname(File)),
@@ -189,7 +189,7 @@ compile_set(SetBase,Files,Options)
DbFile = outfile(SetBase,"asn1db",Options),
Includes = [I || {i,I} <- Options],
EncodingRule = get_rule(Options),
- create_ets_table(asn1_functab,[named_table]),
+ asn1ct_table:new(asn1_functab),
ScanRes = scan_set(Files,Options),
ParseRes = parse_set(ScanRes,Options),
Result =
@@ -214,7 +214,7 @@ compile_set(SetBase,Files,Options)
{error,{'unexpected error in scan/parse phase',
lists:map(fun(X)->element(3,X) end,Other)}}
end,
- delete_tables([asn1_functab]),
+ asn1ct_table:delete(asn1_functab),
Result.
check_set(ParseRes,SetBase,OutFile,Includes,EncRule,DbFile,
@@ -226,7 +226,7 @@ check_set(ParseRes,SetBase,OutFile,Includes,EncRule,DbFile,
Options,InputModules),
Continue2 = generate(Continue1,OutFile,EncRule,Options),
- delete_tables([renamed_defs,original_imports,automatic_tags]),
+ asn1ct_table:delete([renamed_defs, original_imports, automatic_tags]),
Ret = compile_erl(Continue2,OutFile,Options),
case inline(is_inline(Options),
@@ -247,12 +247,11 @@ check_set(ParseRes,SetBase,OutFile,Includes,EncRule,DbFile,
merge_modules(ParseRes,CommonName) ->
ModuleList = lists:map(fun(X)->element(2,X) end,ParseRes),
NewModuleList = remove_name_collisions(ModuleList),
- case ets:info(renamed_defs,size) of
- 0 -> ets:delete(renamed_defs);
- _ -> ok
+ case asn1ct_table:size(renamed_defs) of
+ 0 -> asn1ct_table:delete(renamed_defs);
+ _ -> ok
end,
save_imports(NewModuleList),
-% io:format("~p~n~p~n~p~n~n",[ets:lookup(original_imports,'M1'),ets:lookup(original_imports,'M2'),ets:tab2list(original_imports)]),
TypeOrVal = lists:append(lists:map(fun(X)->X#module.typeorval end,
NewModuleList)),
InputMNameList = lists:map(fun(X)->X#module.name end,
@@ -272,7 +271,7 @@ merge_modules(ParseRes,CommonName) ->
%% causes an exit if duplicate definition names exist in a module
remove_name_collisions(Modules) ->
- create_ets_table(renamed_defs,[named_table]),
+ asn1ct_table:new(renamed_defs),
%% Name duplicates in the same module is not allowed.
lists:foreach(fun exit_if_nameduplicate/1,Modules),
%% Then remove duplicates in different modules and return the
@@ -304,7 +303,8 @@ remove_name_collisions2(ModName,[T|Ts],Ms,Acc) ->
%% rename T
NewT = set_name_of_def(ModName,Name,T), %rename def
warn_renamed_def(ModName,get_name_of_def(NewT),Name),
- ets:insert(renamed_defs,{get_name_of_def(NewT),Name,ModName}),
+ asn1ct_table:insert(renamed_defs,
+ {get_name_of_def(NewT), Name, ModName}),
remove_name_collisions2(ModName,Ts,NewMs,[NewT|Acc]);
{NewMs,?dupl_equaldefs} -> % name duplicates, but identical defs
%% keep name of T
@@ -328,8 +328,8 @@ discover_dupl_in_mods(Name,Def,[M=#module{name=N,typeorval=TorV}|Ms],
%% rename def
NewT=set_name_of_def(N,Name,T),
warn_renamed_def(N,get_name_of_def(NewT),Name),
- ets:insert(renamed_defs,{get_name_of_def(NewT),
- Name,N}),
+ asn1ct_table:insert(renamed_defs,
+ {get_name_of_def(NewT), Name, N}),
{NewT,?dupl_uniquedefs bor RenamedOrDupl};
{Name,equal} ->
%% delete def
@@ -484,8 +484,9 @@ save_imports(ModuleList)->
[] ->
ok;
ImportsList2 ->
- create_ets_table(original_imports,[named_table]),
- lists:foreach(fun(X) -> ets:insert(original_imports,X) end,ImportsList2)
+ asn1ct_table:new(original_imports),
+ lists:foreach(fun(X) -> asn1ct_table:insert(original_imports, X) end,
+ ImportsList2)
end.
@@ -561,7 +562,7 @@ check_tagdefault(ModList) ->
case have_same_tagdefault(ModList) of
{true,TagDefault} -> TagDefault;
{false,TagDefault} ->
- create_ets_table(automatic_tags,[named_table]),
+ asn1ct_table:new(automatic_tags),
save_automatic_tagged_types(ModList),
TagDefault
end.
@@ -588,7 +589,7 @@ save_automatic_tagged_types([#module{tagdefault='AUTOMATIC',
typeorval=TorV}|Ms]) ->
Fun =
fun(T) ->
- ets:insert(automatic_tags,{get_name_of_def(T)})
+ asn1ct_table:insert(automatic_tags, {get_name_of_def(T)})
end,
lists:foreach(Fun,TorV),
save_automatic_tagged_types(Ms);
@@ -827,22 +828,14 @@ generate({true,{M,_Module,GenTOrV}},OutFile,EncodingRule,Options) ->
_ -> ok
end,
put(encoding_options,Options),
- create_ets_table(check_functions,[named_table]),
+ asn1ct_table:new(check_functions),
%% create decoding function names and taglists for partial decode
- %% For the time being leave errors unnoticed !!!!!!!!!
-% io:format("Options: ~p~n",[Options]),
- case catch specialized_decode_prepare(EncodingRule,M,GenTOrV,Options) of
- {error, enoent} -> ok;
- {error, Reason} -> warning("Error in configuration "
- "file: ~n~p~n",[Reason],Options,
- "Error in configuration file");
- {'EXIT',Reason} -> warning("Internal error when "
- "analyzing configuration "
- "file: ~n~p~n",[Reason],Options,
- "Internal error when "
- "analyzing configuration");
- _ -> ok
+ case specialized_decode_prepare(EncodingRule,M,GenTOrV,Options) of
+ {error, Reason} -> warning("Error in configuration file: ~n~p~n",
+ [Reason], Options,
+ "Error in configuration file");
+ _ -> ok
end,
Result =
@@ -859,7 +852,7 @@ generate({true,{M,_Module,GenTOrV}},OutFile,EncodingRule,Options) ->
erase(encoding_options),
erase(tlv_format), % used in ber_bin, optimize
erase(class_default_type),% used in ber_bin, optimize
- ets:delete(check_functions),
+ asn1ct_table:delete(check_functions),
case Result of
{error,_} ->
{false,Result};
@@ -1181,17 +1174,28 @@ optimize_ber_bin(Options) ->
end.
includes(File,Options) ->
- Dir = filename:dirname(File),
- Options2 =
- case lists:member({i,"."},Options) of
- false -> Options ++ [{i,"."}];
- _ -> Options
- end,
- case lists:member({i,Dir}, Options2) of
- false -> Options2 ++ [{i,Dir}];
- _ -> Options2
+ Options2 = include_append(".", Options),
+ Options3 = include_append(filename:dirname(File), Options2),
+ case proplists:get_value(outdir, Options) of
+ undefined -> Options3;
+ OutDir -> include_prepend(OutDir, Options3)
+ end.
+
+include_append(Dir, Options) ->
+ option_add({i, Dir}, Options, fun(Opts) -> Opts ++ [{i, Dir}] end).
+
+include_prepend(Dir, Options) ->
+ option_add({i, Dir}, Options, fun(Opts) -> [{i, Dir}|Opts] end).
+
+option_add(Option, Options, Fun) ->
+ case lists:member(Option, Options) of
+ true -> Options;
+ false -> Fun(Options)
end.
+strip_includes(Includes) ->
+ [I || {i, I} <- Includes].
+
is_inline(Options) ->
case lists:member(inline,Options) of
true -> true;
@@ -1221,10 +1225,7 @@ compile_py(File,OutFile,Options) ->
compile(lists:concat([File,".py"]),OutFile,Options).
compile(File, _OutFile, Options) ->
- case catch compile(File, make_erl_options(Options)) of
- Exit = {'EXIT',_Reason} ->
- error("~p~n~s~n",[Exit,"error"],Options),
- error;
+ case compile(File, make_erl_options(Options)) of
{error,_Reason} ->
%% case occurs due to error in asn1ct_parser2,asn1ct_check
%% io:format("~p~n",[_Reason]),
@@ -1237,10 +1238,7 @@ compile(File, _OutFile, Options) ->
ok;
ScanRes when is_list(ScanRes) ->
io:format("~p~n",[ScanRes]),
- ok;
- Unknown ->
- error("~p~n~s~n",[Unknown,"error"],Options),
- error
+ ok
end.
%% Converts generic compiler options to specific options.
@@ -1339,17 +1337,6 @@ start() ->
start(Includes) when is_list(Includes) ->
asn1_db:dbstart(Includes).
-stop() ->
- save(),
- asn1_db:stop_server(ns),
- asn1_db:stop_server(rand),
- stopped.
-
-save() ->
- asn1_db:dbstop().
-
-%%clear() ->
-%% asn1_db:dbclear().
encode(Module,Term) ->
asn1rt:encode(Module,Term).
@@ -1365,94 +1352,116 @@ decode(Module,Type,Bytes) ->
asn1rt:decode(Module,Type,Bytes).
-test(Module) ->
- start(),
- M = asn1_db:dbget(Module,'MODULE'),
- {Types,_Values,_Ptypes,_Classes,_Objects,_ObjectSets} = M#module.typeorval,
- test_each(Module,Types).
-
-test_each(Module,[Type | Rest]) ->
- case test(Module,Type) of
- {ok,_Result} ->
- test_each(Module,Rest);
- Error ->
- Error
+test(Module) -> test_module(Module, []).
+
+test(Module, [] = Options) -> test_module(Module, Options);
+test(Module, [{i, _}|_] = Options) -> test_module(Module, Options);
+test(Module, Type) -> test_type(Module, Type, []).
+
+test(Module, Type, [] = Options) -> test_type(Module, Type, Options);
+test(Module, Type, [{i, _}|_] = Options) -> test_type(Module, Type, Options);
+test(Module, Type, Value) -> test_value(Module, Type, Value).
+
+test_module(Module, Includes) ->
+ in_process(fun() ->
+ start(strip_includes(Includes)),
+ case check(Module, Includes) of
+ {ok, NewTypes} -> test_each(Module, NewTypes);
+ Error -> Error
+ end
+ end).
+
+test_each(Module, [Type|Rest]) ->
+ case test_type(Module, Type) of
+ {ok, _Result} -> test_each(Module, Rest);
+ Error -> Error
end;
test_each(_,[]) ->
ok.
-test(Module,Type) ->
- io:format("~p:~p~n",[Module,Type]),
- case (catch value(Module,Type)) of
- {ok,Val} ->
- %% io:format("asn1ct:test/2: ~w~n",[Val]),
- test(Module,Type,Val);
- {'EXIT',Reason} ->
- {error,{asn1,{value,Reason}}}
+test_type(Module, Type, Includes) ->
+ in_process(fun() ->
+ start(strip_includes(Includes)),
+ case check(Module, Includes) of
+ {ok, _NewTypes} -> test_type(Module, Type);
+ Error -> Error
+ end
+ end).
+
+test_type(Module, Type) ->
+ case get_value(Module, Type) of
+ {ok, Val} -> test_value(Module, Type, Val);
+ {error, Reason} -> {error, {asn1, {value, Reason}}}
end.
+test_value(Module, Type, Value) ->
+ in_process(fun() ->
+ case catch encode(Module, Type, Value) of
+ {ok, Bytes} ->
+ M = to_atom(Module),
+ NewBytes = prepare_bytes(M:encoding_rule(), Bytes),
+ case decode(Module, Type, NewBytes) of
+ {ok, Value} ->
+ {ok, {Module, Type, Value}};
+ {ok, Res} ->
+ {error, {asn1,
+ {encode_decode_mismatch,
+ {{Module, Type, Value}, Res}}}};
+ Error ->
+ {error, {asn1,
+ {{decode,
+ {Module, Type, Value}, Error}}}}
+ end;
+ Error ->
+ {error, {asn1,
+ {encode, {{Module, Type, Value}, Error}}}}
+ end
+ end).
+
+value(Module, Type) -> value(Module, Type, []).
+
+value(Module, Type, Includes) ->
+ in_process(fun() ->
+ start(strip_includes(Includes)),
+ case check(Module, Includes) of
+ {ok, _NewTypes} -> get_value(Module, Type);
+ Error -> Error
+ end
+ end).
+
+get_value(Module, Type) ->
+ case asn1ct_value:from_type(Module, Type) of
+ {error, Reason} -> {error, Reason};
+ Result -> {ok, Result}
+ end.
-test(Module,Type,Value) ->
- case catch encode(Module,Type,Value) of
- {ok,Bytes} ->
- %% io:format("test 1: ~p~n",[{Bytes}]),
- M = if
- is_list(Module) ->
- list_to_atom(Module);
- true ->
- Module
- end,
- NewBytes =
- case M:encoding_rule() of
- ber ->
- lists:flatten(Bytes);
- ber_bin when is_binary(Bytes) ->
- Bytes;
- ber_bin ->
- list_to_binary(Bytes);
- ber_bin_v2 when is_binary(Bytes) ->
- Bytes;
- ber_bin_v2 ->
- list_to_binary(Bytes);
- per ->
- lists:flatten(Bytes);
- per_bin when is_binary(Bytes) ->
- Bytes;
- per_bin ->
- list_to_binary(Bytes);
- uper_bin ->
- Bytes
- end,
- case decode(Module,Type,NewBytes) of
- {ok,Value} ->
- {ok,{Module,Type,Value}};
- {ok,Res} ->
- {error,{asn1,{encode_decode_mismatch,
- {{Module,Type,Value},Res}}}};
- Error ->
- {error,{asn1,{{decode,
- {Module,Type,Value},Error}}}}
- end;
- Error ->
- {error,{asn1,{encode,{{Module,Type,Value},Error}}}}
+check(Module, Includes) ->
+ case asn1_db:dbget(Module,'MODULE') of
+ undefined ->
+ {error, {file_not_found, lists:concat([Module, ".asn1db"])}};
+ M ->
+ TypeOrVal = M#module.typeorval,
+ State = #state{mname = M#module.name,
+ module = M#module{typeorval=[]},
+ options = Includes},
+ case asn1ct_check:check(State, TypeOrVal) of
+ {ok, {NewTypes, _, _, _, _, _}, _} -> {ok, NewTypes};
+ {error, Reason} -> {error, Reason}
+ end
end.
-value(Module) ->
- start(),
- M = asn1_db:dbget(Module,'MODULE'),
- {Types,_Values,_Ptypes,_Classes,_Objects,_ObjectSets} = M#module.typeorval,
- lists:map(fun(A) ->value(Module,A) end,Types).
+to_atom(Term) when is_list(Term) -> list_to_atom(Term);
+to_atom(Term) when is_atom(Term) -> Term.
-value(Module,Type) ->
- start(),
- case catch asn1ct_value:get_type(Module,Type,no) of
- {error,Reason} ->
- {error,Reason};
- {'EXIT',Reason} ->
- {error,Reason};
- Result ->
- {ok,Result}
- end.
+prepare_bytes(ber, Bytes) -> lists:flatten(Bytes);
+prepare_bytes(ber_bin, Bytes) when is_binary(Bytes) -> Bytes;
+prepare_bytes(ber_bin, Bytes) -> list_to_binary(Bytes);
+prepare_bytes(ber_bin_v2, Bytes) when is_binary(Bytes) -> Bytes;
+prepare_bytes(ber_bin_v2, Bytes) -> list_to_binary(Bytes);
+prepare_bytes(per, Bytes) -> lists:flatten(Bytes);
+prepare_bytes(per_bin, Bytes) when is_binary(Bytes) -> Bytes;
+prepare_bytes(per_bin, Bytes) -> list_to_binary(Bytes);
+prepare_bytes(uper_bin, Bytes) -> Bytes.
vsn() ->
?vsn.
@@ -1484,38 +1493,6 @@ print_listing([],_) ->
ok.
-%% functions to administer ets tables
-
-%% Always creates a new table
-create_ets_table(Name,Options) when is_atom(Name) ->
- case ets:info(Name) of
- undefined ->
- ets:new(Name,Options);
- _ ->
- ets:delete(Name),
- ets:new(Name,Options)
- end.
-
-%% Creates a new ets table only if no table exists
-create_if_no_table(Name,Options) ->
- case ets:info(Name) of
- undefined ->
- %% create a new table
- create_ets_table(Name,Options);
- _ -> ok
- end.
-
-
-delete_tables([Table|Ts]) ->
- case ets:info(Table) of
- undefined -> ok;
- _ -> ets:delete(Table)
- end,
- delete_tables(Ts);
-delete_tables([]) ->
- ok.
-
-
specialized_decode_prepare(Erule,M,TsAndVs,Options) ->
case lists:member(asn1config,Options) of
true ->
@@ -1534,26 +1511,26 @@ partial_decode_prepare(ber_bin_v2,M,TsAndVs,Options) when is_tuple(TsAndVs) ->
_ -> M#module.name
end,
%% io:format("ModName: ~p~nM#module.name: ~p~n~n",[ModName,M#module.name]),
- CfgList = read_config_file(ModName),
- SelectedDecode = get_config_info(CfgList,selective_decode),
- ExclusiveDecode = get_config_info(CfgList,exclusive_decode),
- CommandList =
- create_partial_decode_gen_info(M#module.name,SelectedDecode),
- %% To convert CommandList to a proper list for the driver change
- %% the list:[[choosen,Tag1],skip,[skip_optional,Tag2]] to L =
- %% [5,2,Tag1,0,1,Tag2] where 5 is the length, and call
- %% port_control(asn1_driver_port,3,[L| Bin])
- save_config(partial_decode,CommandList),
- save_gen_state(selective_decode,SelectedDecode),
-% io:format("selective_decode: CommandList:~n~p~nSelectedDecode:~n~p~n",
-% [CommandList,SelectedDecode]),
- CommandList2 =
- create_partial_inc_decode_gen_info(M#module.name,ExclusiveDecode),
-% io:format("partial_incomplete_decode = ~p~n",[CommandList2]),
- Part_inc_tlv_tags = tlv_tags(CommandList2),
-% io:format("partial_incomplete_decode: tlv_tags = ~p~n",[Part_inc_tlv_tags]),
- save_config(partial_incomplete_decode,Part_inc_tlv_tags),
- save_gen_state(exclusive_decode,ExclusiveDecode,Part_inc_tlv_tags);
+ case read_config_file(ModName) of
+ no_config_file ->
+ ok;
+ CfgList ->
+ SelectedDecode = get_config_info(CfgList,selective_decode),
+ ExclusiveDecode = get_config_info(CfgList,exclusive_decode),
+ CommandList = create_partial_decode_gen_info(M#module.name,
+ SelectedDecode),
+ %% To convert CommandList to a proper list for the driver change
+ %% the list:[[choosen,Tag1],skip,[skip_optional,Tag2]] to L =
+ %% [5,2,Tag1,0,1,Tag2] where 5 is the length, and call
+ %% port_control(asn1_driver_port,3,[L| Bin])
+ save_config(partial_decode,CommandList),
+ save_gen_state(selective_decode,SelectedDecode),
+ CommandList2 = create_partial_inc_decode_gen_info(M#module.name,
+ ExclusiveDecode),
+ Part_inc_tlv_tags = tlv_tags(CommandList2),
+ save_config(partial_incomplete_decode,Part_inc_tlv_tags),
+ save_gen_state(exclusive_decode,ExclusiveDecode,Part_inc_tlv_tags)
+ end;
partial_decode_prepare(_,_,_,_) ->
ok.
@@ -2032,7 +2009,7 @@ read_config_file(ModuleName) ->
read_config_file1(ModuleName,[]) ->
case filename:extension(ModuleName) of
".asn1config" ->
- throw({error,enoent});
+ no_config_file;
_ ->
read_config_file(lists:concat([ModuleName,".asn1config"]))
end;
@@ -2061,14 +2038,14 @@ get_config_info(CfgList,InfoType) ->
%% Before saving anything check if a table exists
%% The record gen_state is saved with the key {asn1_config,gen_state}
save_config(Key,Info) ->
- create_if_no_table(asn1_general,[named_table]),
- ets:insert(asn1_general,{{asn1_config,Key},Info}).
+ asn1ct_table:new_reuse(asn1_general),
+ asn1ct_table:insert(asn1_general, {{asn1_config, Key}, Info}).
read_config_data(Key) ->
- case ets:info(asn1_general) of
- undefined -> undefined;
- _ ->
- case ets:lookup(asn1_general,{asn1_config,Key}) of
+ case asn1ct_table:exists(asn1_general) of
+ false -> undefined;
+ true ->
+ case asn1ct_table:lookup(asn1_general,{asn1_config,Key}) of
[{_,Data}] -> Data;
Err -> % Err is [] when nothing was saved in the ets table
%% io:format("strange data from config file ~w~n",[Err]),
@@ -2595,3 +2572,21 @@ is_werr(S) when is_record(S, state) ->
is_werr(S#state.options);
is_werr(O) ->
lists:member(warnings_as_errors, O).
+
+
+in_process(Fun) ->
+ Parent = self(),
+ Pid = spawn_link(fun() -> process(Parent, Fun) end),
+ receive
+ {Pid, Result} -> Result;
+ {Pid, Class, Reason, Stack} ->
+ ST = try throw(x) catch throw:x -> erlang:get_stacktrace() end,
+ erlang:raise(Class, Reason, Stack ++ ST)
+ end.
+
+process(Parent, Fun) ->
+ try
+ Parent ! {self(), Fun()}
+ catch Class:Reason ->
+ Parent ! {self(), Class, Reason, erlang:get_stacktrace()}
+ end.
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 105fc02819..c223561f12 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -1,7 +1,8 @@
+%% vim: tabstop=8:shiftwidth=4
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -94,8 +95,8 @@ check(S,{Types,Values,ParameterizedTypes,Classes,Objects,ObjectSets}) ->
_Perror = checkp(S,ParameterizedTypes,[]), % must do this before the templates are used
%% table to save instances of parameterized objects,object sets
- asn1ct:create_ets_table(parameterized_objects,[named_table]),
- asn1ct:create_ets_table(inlined_objects,[named_table]),
+ asn1ct_table:new(parameterized_objects),
+ asn1ct_table:new(inlined_objects),
Terror = checkt(S,Types,[]),
@@ -144,17 +145,17 @@ check(S,{Types,Values,ParameterizedTypes,Classes,Objects,ObjectSets}) ->
NewObjectSets,
[],[],[]),
?dbg("checko finished with errors:~n~p~n~n",[Oerror]),
- InlinedObjTuples = ets:tab2list(inlined_objects),
+ InlinedObjTuples = asn1ct_table:to_list(inlined_objects),
InlinedObjects = lists:map(Element2,InlinedObjTuples),
- ets:delete(inlined_objects),
- ParameterizedElems = ets:tab2list(parameterized_objects),
+ asn1ct_table:delete(inlined_objects),
+ ParameterizedElems = asn1ct_table:to_list(parameterized_objects),
ParObjectSets = lists:filter(fun({_OSName,objectset,_}) -> true;
(_)-> false end,ParameterizedElems),
ParObjectSetNames = lists:map(Element1,ParObjectSets),
ParTypes = lists:filter(fun({_TypeName,type,_}) -> true;
(_) -> false end, ParameterizedElems),
ParTypesNames = lists:map(Element1,ParTypes),
- ets:delete(parameterized_objects),
+ asn1ct_table:delete(parameterized_objects),
put(asn1_reference,undefined),
Exporterror = check_exports(S,S#state.module),
@@ -4923,12 +4924,7 @@ get_referenced(S,Emod,Ename,Pos) ->
%% May be an imported entity in module Emod or Emod may not exist
case asn1_db:dbget(Emod,'MODULE') of
undefined ->
- case parse_and_save(S,Emod) of
- ok ->
- get_referenced(S,Emod,Ename,Pos);
- _ ->
- throw({error,{asn1,{module_not_found,Emod}}})
- end;
+ throw({error,{asn1,{module_not_found,Emod}}});
_ ->
NewS = update_state(S,Emod),
get_imported(NewS,Ename,Emod,Pos)
@@ -4970,13 +4966,7 @@ get_imported(S,Name,Module,Pos) ->
parse_and_save(S,Imodule),
case asn1_db:dbget(Imodule,'MODULE') of
undefined ->
- case parse_and_save(S,Imodule) of
- ok ->
- %% check with cover
- get_referenced(S,Module,Name,Pos);
- _ ->
- throw({error,{asn1,{module_not_found,Imodule}}})
- end;
+ throw({error,{asn1,{module_not_found,Imodule}}});
Im when is_record(Im,module) ->
case is_exported(Im,Name) of
false ->
@@ -5116,16 +5106,16 @@ renamed_reference(S,#'Externaltypereference'{type=Name,module=Module}) ->
renamed_reference(S,Name,Module) ->
%% first check if there is a renamed type in this module
%% second check if any type was imported with this name
- case ets:info(renamed_defs) of
- undefined -> undefined;
- _ ->
- case ets:match(renamed_defs,{'$1',Name,Module}) of
+ case asn1ct_table:exists(renamed_defs) of
+ false -> undefined;
+ true ->
+ case asn1ct_table:match(renamed_defs, {'$1',Name,Module}) of
[] ->
- case ets:info(original_imports) of
- undefined ->
+ case asn1ct_table:exists(original_imports) of
+ false ->
undefined;
- _ ->
- case ets:match(original_imports,{Module,'$1'}) of
+ true ->
+ case asn1ct_table:match(original_imports, {Module,'$1'}) of
[] ->
undefined;
[[ImportsList]] ->
@@ -6005,17 +5995,12 @@ tag_nums_root2([],Ext,Root2) ->
[0,Ext,Root2].
is_automatic_tagged_in_multi_file(Name) ->
- case ets:info(automatic_tags) of
- undefined ->
+ case asn1ct_table:exists(automatic_tags) of
+ false ->
%% this case when not multifile compilation
false;
- _ ->
-% case ets:member(automatic_tags,Name) of
- case ets:lookup(automatic_tags,Name) of
-% true ->
-% true;
-% _ ->
-% false
+ true ->
+ case asn1ct_table:lookup(automatic_tags, Name) of
[] -> false;
_ -> true
end
diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl
index 0f8833f716..fda4e1c6d9 100644
--- a/lib/asn1/src/asn1ct_gen.erl
+++ b/lib/asn1/src/asn1ct_gen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -169,7 +169,7 @@ pgen_objectsets(Rtmod,Erules,Module,[H|T]) ->
pgen_objectsets(Rtmod,Erules,Module,T).
pgen_check_defaultval(Erules,Module) ->
- CheckObjects = ets:tab2list(check_functions),
+ CheckObjects = asn1ct_table:to_list(check_functions),
case get(asndebug) of
true ->
FileName = lists:concat([Module,".table"]),
@@ -1598,7 +1598,7 @@ gen_check_call(TopType,Cname,Type,InnerType,WhatKind,DefaultValue,Element) ->
NameList = [Cname|TopType],
Name = list2name(NameList ++ [check]),
emit({"'",Name,"'(",DefaultValue,", ",Element,")"}),
- ets:insert(check_functions,{Name,Type}),
+ asn1ct_table:insert(check_functions, {Name, Type}),
%% Must look for check functions in InnerType,
%% that may be referenced or internal defined
%% constructed types not used elsewhere.
@@ -1744,10 +1744,9 @@ lookahead_reference(#'Externaltypereference'{module=M,type=T}) ->
end.
insert_once(Table,Object) ->
- _Info = ets:info(Table),
- case ets:lookup(Table,element(1,Object)) of
+ case asn1ct_table:lookup(Table, element(1, Object)) of
[] ->
- ets:insert(Table,Object); %returns true
+ asn1ct_table:insert(Table, Object); %returns true
_ -> false
end.
diff --git a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
index 365bb84d52..597fb0030b 100644
--- a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
+++ b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1834,7 +1834,7 @@ mk_object_val(Val, Ack, Len) ->
mk_object_val(Val bsr 7, [((Val band 127) bor 128) | Ack], Len + 1).
add_func(F={_Func,_Arity}) ->
- ets:insert(asn1_functab,{F}).
+ asn1ct_table:insert(asn1_functab, {F}).
%% For BER the ExtensionAdditionGroup notation has no impact on the encoding/decoding
%% and therefore we only filter away the ExtensionAdditionGroup start and end markers
diff --git a/lib/asn1/src/asn1ct_name.erl b/lib/asn1/src/asn1ct_name.erl
index a6aa4255cc..3ab6f7b0ed 100644
--- a/lib/asn1/src/asn1ct_name.erl
+++ b/lib/asn1/src/asn1ct_name.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,8 +20,7 @@
-module(asn1ct_name).
%%-compile(export_all).
--export([name_server_loop/1,
- start/0,
+-export([start/0,
stop/0,
push/1,
pop/1,
@@ -35,38 +34,50 @@
new/1]).
start() ->
- start_server(asn1_ns, asn1ct_name,name_server_loop,[[]]).
+ Parent = self(),
+ case get(?MODULE) of
+ undefined ->
+ put(?MODULE, spawn_link(fun() ->
+ Ref = monitor(process, Parent),
+ name_server_loop({Ref,Parent},[])
+ end)),
+ ok;
+ _Pid ->
+ already_started
+ end.
-stop() -> stop_server(asn1_ns).
+stop() ->
+ req(stop),
+ erase(?MODULE).
-name_server_loop(Vars) ->
+name_server_loop({Ref, Parent} = Monitor,Vars) ->
%% io:format("name -- ~w~n",[Vars]),
receive
{From,{current,Variable}} ->
- From ! {asn1_ns,get_curr(Vars,Variable)},
- name_server_loop(Vars);
+ From ! {?MODULE,get_curr(Vars,Variable)},
+ name_server_loop(Monitor,Vars);
{From,{pop,Variable}} ->
- From ! {asn1_ns,done},
- name_server_loop(pop_var(Vars,Variable));
+ From ! {?MODULE,done},
+ name_server_loop(Monitor,pop_var(Vars,Variable));
{From,{push,Variable}} ->
- From ! {asn1_ns,done},
- name_server_loop(push_var(Vars,Variable));
+ From ! {?MODULE,done},
+ name_server_loop(Monitor,push_var(Vars,Variable));
{From,{delete,Variable}} ->
- From ! {asn1_ns,done},
- name_server_loop(delete_var(Vars,Variable));
+ From ! {?MODULE,done},
+ name_server_loop(Monitor,delete_var(Vars,Variable));
{From,{new,Variable}} ->
- From ! {asn1_ns,done},
- name_server_loop(new_var(Vars,Variable));
+ From ! {?MODULE,done},
+ name_server_loop(Monitor,new_var(Vars,Variable));
{From,{prev,Variable}} ->
- From ! {asn1_ns,get_prev(Vars,Variable)},
- name_server_loop(Vars);
+ From ! {?MODULE,get_prev(Vars,Variable)},
+ name_server_loop(Monitor,Vars);
{From,{next,Variable}} ->
- From ! {asn1_ns,get_next(Vars,Variable)},
- name_server_loop(Vars);
+ From ! {?MODULE,get_next(Vars,Variable)},
+ name_server_loop(Monitor,Vars);
+ {'DOWN', Ref, process, Parent, Reason} ->
+ exit(Reason);
{From,stop} ->
- unregister(asn1_ns),
- From ! {asn1_ns,stopped},
- exit(normal)
+ From ! {?MODULE,stopped}
end.
active(V) ->
@@ -76,12 +87,16 @@ active(V) ->
end.
req(Req) ->
- asn1_ns ! {self(), Req},
- receive {asn1_ns, Reply} -> Reply end.
+ get(?MODULE) ! {self(), Req},
+ receive
+ {?MODULE, Reply} -> Reply
+ after 5000 ->
+ exit(name_server_timeout)
+ end.
pop(V) -> req({pop,V}).
push(V) -> req({push,V}).
-clear() -> req(stop), start().
+clear() -> stop(), start().
curr(V) -> req({current,V}).
new(V) -> req({new,V}).
delete(V) -> req({delete,V}).
@@ -209,25 +224,3 @@ get_next(Vars,Variable) ->
_ ->
none
end.
-
-
-stop_server(Name) ->
- stop_server(Name, whereis(Name)).
-stop_server(_Name, undefined) -> stopped;
-stop_server(Name, _Pid) ->
- Name ! {self(), stop},
- receive {Name, _} -> stopped end.
-
-
-start_server(Name,Mod,Fun,Args) ->
- case whereis(Name) of
- undefined ->
- case catch register(Name, spawn(Mod,Fun, Args)) of
- {'EXIT',{badarg,_}} ->
- start_server(Name,Mod,Fun,Args);
- _ ->
- ok
- end;
- _Pid ->
- already_started
- end.
diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl
index 224a535e87..007d390a1b 100644
--- a/lib/asn1/src/asn1ct_parser2.erl
+++ b/lib/asn1/src/asn1ct_parser2.erl
@@ -1,7 +1,8 @@
+%% vim: tabstop=8:shiftwidth=4
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -81,14 +82,15 @@ parse_ModuleDefinition([{typereference,L1,ModuleIdentifier}|Rest0]) ->
case Rest3 of
[{'::=',_L7}, {'BEGIN',_L8}|Rest4] ->
{Exports, Rest5} = parse_Exports(Rest4),
- {Imports, Rest6} = parse_Imports(Rest5),
+ {{imports, Imports}, Rest6} = parse_Imports(Rest5),
+ put({get(asn1_module), imports}, Imports),
{#module{ pos = L1,
name = ModuleIdentifier,
defid = [], % fix this
tagdefault = TagDefault,
extensiondefault = ExtensionDefault,
exports = Exports,
- imports = Imports},Rest6};
+ imports = {imports, Imports}}, Rest6};
_ -> throw({asn1_error,{get_line(hd(Rest3)),get(asn1_module),
[got,get_token(hd(Rest3)),expected,"::= BEGIN"]}})
end;
@@ -717,12 +719,12 @@ parse_DefinedType(Tokens=[{typereference,L1,TypeName},
{'EXIT',_Reason} ->
Rest2 = [T2,T3|Rest],
{#type{def = #'Externaltypereference'{pos=L1,
- module=get(asn1_module),
+ module=resolve_module(TypeName),
type=TypeName}},Rest2};
{asn1_error,_} ->
Rest2 = [T2,T3|Rest],
{#type{def = #'Externaltypereference'{pos=L1,
- module=get(asn1_module),
+ module=resolve_module(TypeName),
type=TypeName}},Rest2};
Result ->
Result
@@ -735,7 +737,7 @@ parse_DefinedType([{typereference,L1,Module},{'.',_},{typereference,_,TypeName}|
parse_DefinedType([{typereference,L1,TypeName}|Rest]) ->
case is_pre_defined_class(TypeName) of
false ->
- {#type{def = #'Externaltypereference'{pos=L1,module=get(asn1_module),
+ {#type{def = #'Externaltypereference'{pos=L1,module=resolve_module(TypeName),
type=TypeName}},Rest};
_ ->
throw({asn1_error,
@@ -758,6 +760,21 @@ parse_SelectionType(Tokens) ->
[got,get_token(hd(Tokens)),expected,'identifier <']}}).
+resolve_module(Type) ->
+ Current = get(asn1_module),
+ Imports = get({Current, imports}),
+ resolve_module(Type, Current, Imports).
+
+resolve_module(_Type, Current, undefined) ->
+ Current;
+resolve_module(Type, Current, Imports) ->
+ case [Mod || #'SymbolsFromModule'{symbols = S, module = Mod} <- Imports,
+ #'Externaltypereference'{type = T} <- S,
+ Type == T] of
+ [#'Externaltypereference'{type = Mod}] -> Mod;
+ [] -> Current
+ end.
+
%% --------------------------
@@ -1539,7 +1556,7 @@ parse_DefinedObjectSet([{typereference,L1,ModuleName},{'.',_},
{{objectset,L1,#'Externaltypereference'{pos=L2,module=ModuleName,
type=ObjSetName}},Rest};
parse_DefinedObjectSet([{typereference,L1,ObjSetName}|Rest]) ->
- {{objectset,L1,#'Externaltypereference'{pos=L1,module=get(asn1_module),
+ {{objectset,L1,#'Externaltypereference'{pos=L1,module=resolve_module(ObjSetName),
type=ObjSetName}},Rest};
parse_DefinedObjectSet(Tokens) ->
throw({asn1_error,{get_line(hd(Tokens)),get(asn1_module),
@@ -3203,17 +3220,17 @@ prioritize_error(ErrList) ->
tref2Exttref(#typereference{pos=Pos,val=Name}) ->
#'Externaltypereference'{pos=Pos,
- module=get(asn1_module),
+ module=resolve_module(Name),
type=Name}.
tref2Exttref(Pos,Name) ->
#'Externaltypereference'{pos=Pos,
- module=get(asn1_module),
+ module=resolve_module(Name),
type=Name}.
identifier2Extvalueref(#identifier{pos=Pos,val=Name}) ->
#'Externalvaluereference'{pos=Pos,
- module=get(asn1_module),
+ module=resolve_module(Name),
value=Name}.
%% lookahead_assignment/1 checks that the next sequence of tokens
diff --git a/lib/asn1/src/asn1ct_table.erl b/lib/asn1/src/asn1ct_table.erl
new file mode 100644
index 0000000000..a5eb6d0413
--- /dev/null
+++ b/lib/asn1/src/asn1ct_table.erl
@@ -0,0 +1,76 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+-module(asn1ct_table).
+
+%% Table abstraction module for ASN.1 compiler
+
+-export([new/1]).
+-export([new/2]).
+-export([new_reuse/1]).
+-export([new_reuse/2]).
+-export([exists/1]).
+-export([size/1]).
+-export([insert/2]).
+-export([lookup/2]).
+-export([match/2]).
+-export([to_list/1]).
+-export([delete/1]). % TODO: Remove (since we run in a separate process)
+
+
+%% Always creates a new table
+new(Table) -> new(Table, []).
+new(Table, Options) ->
+ TableId = case get(Table) of
+ undefined ->
+ ets:new(Table, Options);
+ _ ->
+ delete(Table),
+ ets:new(Table, Options)
+ end,
+ put(Table, TableId).
+
+%% Only create it if it doesn't exist yet
+new_reuse(Table) -> new_reuse(Table, []).
+new_reuse(Table, Options) ->
+ not exists(Table) andalso new(Table, Options).
+
+exists(Table) -> get(Table) =/= undefined.
+
+size(Table) -> ets:info(get(Table), size).
+
+insert(Table, Tuple) -> ets:insert(get(Table), Tuple).
+
+lookup(Table, Key) -> ets:lookup(get(Table), Key).
+
+match(Table, MatchSpec) -> ets:match(get(Table), MatchSpec).
+
+to_list(Table) -> ets:tab2list(get(Table)).
+
+delete(Tables) when is_list(Tables) ->
+ [delete(T) || T <- Tables],
+ true;
+delete(Table) when is_atom(Table) ->
+ case get(Table) of
+ undefined ->
+ true;
+ TableId ->
+ ets:delete(TableId),
+ erase(Table)
+ end.
diff --git a/lib/asn1/src/asn1ct_value.erl b/lib/asn1/src/asn1ct_value.erl
index d099376b1b..9013baef92 100644
--- a/lib/asn1/src/asn1ct_value.erl
+++ b/lib/asn1/src/asn1ct_value.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,58 +25,58 @@
-include("asn1_records.hrl").
%-compile(export_all).
--export([get_type/3]).
--export([i_random/1]).
-
+-export([from_type/2]).
%% Generate examples of values ******************************
%%****************************************x
-get_type(M,Typename,Tellname) ->
+from_type(M,Typename) ->
case asn1_db:dbget(M,Typename) of
undefined ->
- {asn1_error,{not_found,{M,Typename}}};
+ {error,{not_found,{M,Typename}}};
Tdef when is_record(Tdef,typedef) ->
Type = Tdef#typedef.typespec,
- get_type(M,[Typename],Type,Tellname);
+ from_type(M,[Typename],Type);
+ Vdef when is_record(Vdef,valuedef) ->
+ from_value(Vdef);
Err ->
- {asn1_error,{other,Err}}
+ {error,{other,Err}}
end.
-get_type(M,Typename,Type,Tellname) when is_record(Type,type) ->
+from_type(M,Typename,Type) when is_record(Type,type) ->
InnerType = get_inner(Type#type.def),
case asn1ct_gen:type(InnerType) of
#'Externaltypereference'{module=Emod,type=Etype} ->
- get_type(Emod,Etype,Tellname);
+ from_type(Emod,Etype);
{_,user} ->
- case Tellname of
- yes -> {Typename,get_type(M,InnerType,no)};
- no -> get_type(M,InnerType,no)
- end;
+ from_type(M,InnerType);
{notype,_} ->
true;
{primitive,bif} ->
- get_type_prim(Type,get_encoding_rule(M));
+ from_type_prim(Type,get_encoding_rule(M));
'ASN1_OPEN_TYPE' ->
case Type#type.constraint of
[#'Externaltypereference'{type=TrefConstraint}] ->
- get_type(M,TrefConstraint,no);
+ from_type(M,TrefConstraint);
_ ->
ERule = get_encoding_rule(M),
open_type_value(ERule)
end;
{constructed,bif} when Typename == ['EXTERNAL'] ->
- Val=get_type_constructed(M,Typename,InnerType,Type),
+ Val=from_type_constructed(M,Typename,InnerType,Type),
asn1rt_check:transform_to_EXTERNAL1994(Val);
{constructed,bif} ->
- get_type_constructed(M,Typename,InnerType,Type)
+ from_type_constructed(M,Typename,InnerType,Type)
end;
-get_type(M,Typename,#'ComponentType'{name = Name,typespec = Type},_) ->
- get_type(M,[Name|Typename],Type,no);
-get_type(_,_,_,_) -> % 'EXTENSIONMARK'
+from_type(M,Typename,#'ComponentType'{name = Name,typespec = Type}) ->
+ from_type(M,[Name|Typename],Type);
+from_type(_,_,_) -> % 'EXTENSIONMARK'
undefined.
+from_value(#valuedef{type = #type{def = 'INTEGER'}, value = Val}) ->
+ Val.
+
get_inner(A) when is_atom(A) -> A;
get_inner(Ext) when is_record(Ext,'Externaltypereference') -> Ext;
get_inner({typereference,_Pos,Name}) -> Name;
@@ -93,7 +93,7 @@ get_inner(T) when is_tuple(T) ->
-get_type_constructed(M,Typename,InnerType,D) when is_record(D,type) ->
+from_type_constructed(M,Typename,InnerType,D) when is_record(D,type) ->
case InnerType of
'SET' ->
get_sequence(M,Typename,D);
@@ -132,7 +132,7 @@ get_components(M,Typename,{Root,Ext}) ->
%% Should enhance this *** HERE *** with proper handling of extensions
get_components(M,Typename,[H|T]) ->
- [get_type(M,Typename,H,no)|
+ [from_type(M,Typename,H)|
get_components(M,Typename,T)];
get_components(_,_,[]) ->
[].
@@ -145,10 +145,10 @@ get_choice(M,Typename,Type) ->
{CompList,ExtList} -> % Should be enhanced to handle extensions too
CList = CompList ++ ExtList,
C = lists:nth(random(length(CList)),CList),
- {C#'ComponentType'.name,get_type(M,Typename,C,no)};
+ {C#'ComponentType'.name,from_type(M,Typename,C)};
CompList when is_list(CompList) ->
C = lists:nth(random(length(CompList)),CompList),
- {C#'ComponentType'.name,get_type(M,Typename,C,no)}
+ {C#'ComponentType'.name,from_type(M,Typename,C)}
end.
get_sequence_of(M,Typename,Type,TypeSuffix) ->
@@ -157,14 +157,14 @@ get_sequence_of(M,Typename,Type,TypeSuffix) ->
C = Type#type.constraint,
S = size_random(C),
NewTypeName = [TypeSuffix|Typename],
- gen_list(M,NewTypeName,Oftype,no,S).
+ gen_list(M,NewTypeName,Oftype,S).
-gen_list(_,_,_,_,0) ->
+gen_list(_,_,_,0) ->
[];
-gen_list(M,Typename,Oftype,Tellname,N) ->
- [get_type(M,Typename,Oftype,no)|gen_list(M,Typename,Oftype,Tellname,N-1)].
+gen_list(M,Typename,Oftype,N) ->
+ [from_type(M,Typename,Oftype)|gen_list(M,Typename,Oftype,N-1)].
-get_type_prim(D,Erule) ->
+from_type_prim(D,Erule) ->
C = D#type.constraint,
case D#type.def of
'INTEGER' ->
@@ -198,6 +198,7 @@ get_type_prim(D,Erule) ->
NN = [X||{X,_} <- NNew],
case NN of
[] ->
+ io:format(user, "Enum = ~p~n", [Enum]),
asn1_EMPTY;
_ ->
case C of
@@ -412,14 +413,20 @@ adjust_list1(Len,Orig,[Oh|Ot],Acc) ->
adjust_list1(Len-1,Orig,Ot,[Oh|Acc]).
-get_constraint(C,Key) ->
- case lists:keysearch(Key,1,C) of
- false ->
- no;
- {value,{_,V}} ->
- V
+get_constraint(C, Key) ->
+ case lists:keyfind(Key, 1, C) of
+ false -> no;
+ {'ValueRange', {Lb, Ub}} -> {check_external(Lb), check_external(Ub)};
+ {'SizeConstraint', N} -> N;
+ {Key, Value} -> Value
end.
+check_external(ExtRef) when is_record(ExtRef, 'Externalvaluereference') ->
+ #'Externalvaluereference'{module = Emod, value = Evalue} = ExtRef,
+ from_type(Emod, Evalue);
+check_external(Value) ->
+ Value.
+
get_encoding_rule(M) ->
Mod =
if is_list(M) ->
diff --git a/lib/asn1/test/Makefile b/lib/asn1/test/Makefile
index 7ecd544d4b..1621abbec9 100644
--- a/lib/asn1/test/Makefile
+++ b/lib/asn1/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2011. All Rights Reserved.
+# Copyright Ericsson AB 1997-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -28,11 +28,10 @@ MODULES= \
h323test \
choice_extension \
ber_decode_error \
- testExternal \
testPrim \
- testPrimStrings \
+ testPrimStrings \
testCompactBitString \
- testPrimExternal \
+ testPrimExternal \
testChoPrim \
testChoExtension \
testChoExternal \
@@ -86,15 +85,12 @@ MODULES= \
testMergeCompile \
testDeepTConstr \
testTimer \
- testRANAP \
testMegaco \
- testMvrasn6 \
testSeqSetDefaultVal \
testParamBasic \
testContextSwitchingTypes \
testTypeValueNotation \
testOpenTypeImplicitTag \
- testROSE \
testINSTANCE_OF \
test_partial_incomplete_decode \
testDER \
@@ -108,7 +104,6 @@ MODULES= \
test_inline \
testTcapsystem \
testNBAPsystem \
- test_bad_values \
test_compile_options \
testDoubleEllipses \
test_modified_x420 \
@@ -118,16 +113,9 @@ MODULES= \
asn1_app_test \
asn1_appup_test \
asn1_wrapper \
- asn1_SUITE \
- asn1_bin_SUITE \
- asn1_bin_v2_SUITE
+ asn1_SUITE
SUITE= asn1_SUITE.erl
-SUITE_BIN= asn1_bin_SUITE.erl
-SUITE_BIN_V2= asn1_bin_v2_SUITE.erl
-SUITE_SRC= asn1_SUITE.erl.src
-SUITE_BIN_SRC= asn1_bin_SUITE.erl.src
-SUITE_BIN_V2_SRC= asn1_bin_SUITE.erl.src
ERL_FILES= $(MODULES:%=%.erl)
@@ -156,30 +144,10 @@ $(EMAKEFILE): $(ERL_FILES) $(HRL_FILES)
tests debug opt: $(SUITE) $(SUITE_BIN) $(SUITE_BIN_V2) $(EMAKEFILE)
clean:
- rm -f $(SUITE) $(SUITE_BIN) $(SUITE_BIN_V2)
rm -f core
docs:
-#-----------------------------------------------------
-# Special Targets
-#-----------------------------------------------------
-$(SUITE): $(SUITE_SRC)
- sed -e 's;%BIN%;;' -e 's;%PER%;per;' -e 's;%BER%;ber;' $< > $@
- cat asn1_common_SUITE.erl.src >> $@
- cat asn1_particular_SUITE.erl.src >> $@
-
-
-$(SUITE_BIN): $(SUITE_SRC)
- sed -e 's;%BIN%;bin_;' -e 's;%PER%;per_bin;' -e 's;%BER%;ber_bin;' $< > $@
- echo "common() -> []." >> $@
- cat asn1_bin_particular_SUITE.erl.src >> $@
-
-$(SUITE_BIN_V2): $(SUITE_SRC)
- sed -e 's;%BIN%;bin_v2_;' -e 's;%PER%;per_bin;' -e 's;%BER%;ber_bin_v2;' $< > $@
- echo "common() -> []." >> $@
- cat asn1_bin_v2_particular_SUITE.erl.src >> $@
-
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
@@ -190,15 +158,11 @@ release_spec: opt
release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DIR) $(RELSYSDIR)/asn1_SUITE_data
- $(INSTALL_DIR) $(RELSYSDIR)/asn1_bin_SUITE_data
- $(INSTALL_DIR) $(RELSYSDIR)/asn1_bin_v2_SUITE_data
$(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) asn1.spec asn1.cover $(INSTALL_PROGS) $(RELSYSDIR)
chmod -R u+w $(RELSYSDIR)
cd asn1_SUITE_data; tar cfh $(RELSYSDIR)/asn1_SUITE_data.tar *
cd $(RELSYSDIR)/asn1_SUITE_data; tar xf $(RELSYSDIR)/asn1_SUITE_data.tar
- cd $(RELSYSDIR)/asn1_bin_SUITE_data; tar xf $(RELSYSDIR)/asn1_SUITE_data.tar
- cd $(RELSYSDIR)/asn1_bin_v2_SUITE_data; tar xf $(RELSYSDIR)/asn1_SUITE_data.tar
rm $(RELSYSDIR)/asn1_SUITE_data.tar
release_docs_spec:
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl
new file mode 100644
index 0000000000..3b9a7532c0
--- /dev/null
+++ b/lib/asn1/test/asn1_SUITE.erl
@@ -0,0 +1,1511 @@
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%% Purpose: Test suite for the ASN.1 application
+
+-module(asn1_SUITE).
+
+-define(only_per(Func),
+ if Rule == per orelse Rule == per_bin -> Func;
+ true -> ok
+ end).
+-define(only_ber(Func),
+ if Rule == ber orelse Rule == ber_bin orelse Rule == ber_bin_v2 -> Func;
+ true -> ok
+ end).
+-define(only_uper(Func),
+ case Rule of
+ uper_bin -> Func;
+ _ -> ok
+ end).
+-define(only_per_nif(Func),
+ case {Rule, lists:member(optimize, Opts)} of
+ {per_bin, true} -> Func;
+ _ -> ok
+ end).
+-define(only_ber_nif(Func),
+ case {Rule, lists:member(nif, Opts)} of
+ {ber_bin_v2, true} -> Func;
+ _ -> ok
+ end).
+
+-compile(export_all).
+
+-include_lib("test_server/include/test_server.hrl").
+
+%%------------------------------------------------------------------------------
+%% Suite definition
+%%------------------------------------------------------------------------------
+
+suite() -> [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [{group, parallel},
+ {group, app_test},
+ {group, appup_test},
+
+ % TODO: Investigate parallel running of these:
+ testComment,
+ testName2Number,
+ ticket_7407,
+ ticket7904,
+
+ {group, performance}].
+
+groups() ->
+ [{compile, parallel([]),
+ [c_syntax,
+ c_string,
+ c_implicit_before_choice]},
+
+ {ber, parallel([]),
+ [ber_choiceinseq,
+ % Uses 'SOpttest'
+ {group, [], [ber_optional,
+ ber_optional_keyed_list]}]},
+
+ {app_test, [], [{asn1_app_test, all}]},
+
+ {appup_test, [], [{asn1_appup_test, all}]},
+
+ {parallel, parallel([]),
+ [{group, compile},
+ {group, ber},
+ % Uses 'P-Record', 'Constraints', 'MEDIA-GATEWAY-CONTROL'...
+ {group, [], [parse,
+ test_driver_load,
+ test_undecoded_rest,
+ test_inline,
+ specialized_decodes,
+ special_decode_performance,
+ testMegaco,
+ testConstraints,
+ testCompactBitString]},
+ default,
+ % Uses 'Def', 'MULTIMEDIA-SYSTEM-CONTROL', 'H323-MESSAGES', 'Prim',
+ % 'Real'
+ {group, [], [testPrim,
+ rtUI,
+ testPrimStrings,
+ testInvokeMod,
+ per,
+ ber_other,
+ h323test,
+ per_GeneralString]},
+ testChoPrim,
+ testChoExtension,
+ testChoOptional,
+ testChoOptionalImplicitTag,
+ testChoRecursive,
+ testChoTypeRefCho,
+ testChoTypeRefPrim,
+ testChoTypeRefSeq,
+ testChoTypeRefSet,
+ testDef,
+ testOpt,
+ testSeqDefault,
+ % Uses 'External'
+ {group, [], [testChoExternal,
+ testPrimExternal,
+ testSeqExtension,
+ testSeqExternal,
+ testSeqOfExternal,
+ testSeqOfTag,
+ testSeqTag,
+ testSetExtension,
+ testSetExternal,
+ testSetOfExternal,
+ testSetOfTag,
+ testSetTag]},
+ testSeqOptional,
+ testSeqPrim,
+ testSeqTypeRefCho,
+ % Uses 'SeqTypeRefPrim'
+ {group, [], [testSeqTypeRefPrim,
+ testTypeValueNotation]},
+ testSeqTypeRefSeq,
+ testSeqTypeRefSet,
+ % Uses 'SeqOf'
+ {group, [], [testSeqOf,
+ testSeqOfIndefinite]}, % Uses 'Mvrasn*'
+ testSeqOfCho,
+ testSetDefault,
+ testExtensionAdditionGroup,
+ testSetOptional,
+ testSetPrim,
+ testSetTypeRefCho,
+ testSetTypeRefPrim,
+ testSetTypeRefSeq,
+ testSetTypeRefSet,
+ testSetOf,
+ testSetOfCho,
+ testEnumExt,
+ value_test,
+ value_bad_enum_test,
+ testSeq2738,
+ % Uses 'Constructed'
+ {group, [], [constructed,
+ ber_decode_error]},
+ % Uses 'SeqSetIndefinite'
+ {group, [], [testSeqIndefinite,
+ testSetIndefinite]},
+ testChoiceIndefinite,
+ per_open_type,
+ testInfObjectClass,
+ testParameterizedInfObj,
+ testMergeCompile,
+ testobj,
+ testDeepTConstr,
+ testExport,
+ testImport,
+ % Uses 'ParamBasic'
+ {group, [], [testParamBasic,
+ testDER]},
+ testMvrasn6,
+ testContextSwitchingTypes,
+ testOpenTypeImplicitTag,
+ duplicate_tags,
+ testROSE,
+ testINSTANCE_OF,
+ testTCAP,
+ test_ParamTypeInfObj,
+ test_WS_ParamClass,
+ test_Defed_ObjectIdentifier,
+ testSelectionType,
+ testSSLspecs,
+ testNortel,
+ % Uses 'PKCS7'
+ {group, [], [test_modified_x420,
+ testX420]},
+ testTcapsystem,
+ testNBAPsystem,
+ test_compile_options,
+ testDoubleEllipses,
+ test_x691,
+ ticket_6143,
+ testExtensionAdditionGroup,
+ test_OTP_9688]},
+
+ {performance, [],
+ [testTimer_ber,
+ testTimer_ber_bin,
+ testTimer_ber_bin_opt,
+ testTimer_ber_bin_opt_driver,
+ testTimer_per,
+ testTimer_per_bin,
+ testTimer_per_bin_opt,
+ testTimer_uper_bin,
+ smp]}].
+
+parallel(Options) ->
+ case erlang:system_info(smp_support) andalso
+ erlang:system_info(schedulers) > 1 of
+ true -> [parallel|Options];
+ false -> Options
+ end.
+
+%%------------------------------------------------------------------------------
+%% Init/end
+%%------------------------------------------------------------------------------
+
+init_per_suite(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ true = code:add_patha(PrivDir),
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+init_per_testcase(Func, Config) ->
+ CaseDir = filename:join([?config(priv_dir, Config), ?MODULE, Func]),
+ ok = filelib:ensure_dir(filename:join([CaseDir, dummy_file])),
+ true = code:add_patha(CaseDir),
+
+ Dog = case Func of
+ testX420 -> test_server:timetrap({minutes, 90});
+ _ -> test_server:timetrap({minutes, 60})
+ end,
+ [{case_dir, CaseDir}, {watchdog, Dog}|Config].
+
+end_per_testcase(_Func, Config) ->
+ true = code:del_path(?config(case_dir, Config)),
+ test_server:timetrap_cancel(?config(watchdog, Config)).
+
+%%------------------------------------------------------------------------------
+%% Test runners
+%%------------------------------------------------------------------------------
+
+test(Config, TestF) ->
+ test(Config, TestF, [per,
+ per_bin,
+ {per_bin, [optimize]},
+ uper_bin,
+ ber,
+ ber_bin,
+ ber_bin_v2,
+ % TODO: {ber_bin_v2, [optimize, nif]} ?
+ {ber_bin_v2, [nif]}]).
+
+test(Config, TestF, Rules) ->
+ Fun = fun(C, R, O) ->
+ M = element(2, erlang:fun_info(TestF, module)),
+ F = element(2, erlang:fun_info(TestF, name)),
+ io:format("Running ~p:~p with ~p...~n", [M, F, {R, O}]),
+ try
+ TestF(C, R, O)
+ catch
+ Class:Reason ->
+ NewReason = {Reason, [{rule, R}, {options, O}]},
+ erlang:raise(Class, NewReason,
+ erlang:get_stacktrace())
+ end
+ end,
+ Result = [run_case(Config, Fun, rule(Rule), opts(Rule)) || Rule <- Rules],
+ case lists:usort(Result) of
+ [true|_Skips] -> true; % At least one test ran
+ Skips -> {skip, [R || {skip, R} <- Skips]} % All skipped
+ end.
+
+rule(A) when is_atom(A) -> A;
+rule({A, _Opts} ) -> A.
+
+opts(Rule) when is_atom(Rule) -> [];
+opts({_Rule, Opts}) -> Opts.
+
+run_case(Config, Fun, Rule, Opts) ->
+ CaseDir = ?config(case_dir, Config),
+ Dir = filename:join([CaseDir, join(Rule, Opts)]),
+ ok = filelib:ensure_dir(filename:join([Dir, dummy_file])),
+ replace_path(CaseDir, Dir),
+ NewConfig = lists:keyreplace(case_dir, 1, Config, {case_dir, Dir}),
+
+ % Run the actual test function
+ Result = Fun(NewConfig, Rule, Opts),
+
+ replace_path(Dir, CaseDir),
+ case Result of
+ {skip, _Reason} -> Result;
+ _ -> true
+ end.
+
+replace_path(PathA, PathB) ->
+ true = code:del_path(PathA),
+ true = code:add_patha(PathB).
+
+join(Rule, Opts) ->
+ string:join([atom_to_list(Rule)|lists:map(fun atom_to_list/1, Opts)], "_").
+
+case_dir([], _Dir) ->
+ exit(no_case_dir);
+case_dir([{case_dir, _}|Config], Dir) ->
+ [{case_dir, Dir}|Config];
+case_dir([C|Config], Opt) ->
+ [C|case_dir(Config, Opt)].
+
+%%------------------------------------------------------------------------------
+%% Test cases
+%%------------------------------------------------------------------------------
+
+testPrim(Config) -> test(Config, fun testPrim/3).
+testPrim(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["Prim", "Real"], Config, [Rule|Opts]),
+ testPrim:bool(Rule),
+ testPrim:int(Rule),
+ testPrim:enum(Rule),
+ testPrim:obj_id(Rule),
+ testPrim:rel_oid(Rule),
+ testPrim:null(Rule),
+ testPrim:real(Rule).
+
+testCompactBitString(Config) -> test(Config, fun testCompactBitString/3).
+testCompactBitString(Config, Rule, Opts) ->
+ asn1_test_lib:compile("PrimStrings", Config,
+ [Rule, compact_bit_string|Opts]),
+ testCompactBitString:compact_bit_string(Rule),
+ ?only_uper(testCompactBitString:bit_string_unnamed(Rule)),
+ ?only_per(testCompactBitString:bit_string_unnamed(Rule)),
+ ?only_per_nif(testCompactBitString:ticket_7734(Rule)),
+ ?only_per_nif(asn1_test_lib:compile("Constraints", Config,
+ [Rule, compact_bit_string|Opts])),
+ ?only_per_nif(testCompactBitString:otp_4869(Rule)).
+
+testPrimStrings(Config) -> test(Config, fun testPrimStrings/3).
+testPrimStrings(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["PrimStrings", "BitStr"], Config, [Rule|Opts]),
+ testPrimStrings_cases(Rule),
+ ?only_ber(testPrimStrings:more_strings(Rule)).
+
+testPrimStrings_cases(Rule) ->
+ testPrimStrings:bit_string(Rule),
+ testPrimStrings:bit_string_unnamed(Rule),
+ testPrimStrings:octet_string(Rule),
+ testPrimStrings:numeric_string(Rule),
+ testPrimStrings:other_strings(Rule),
+ testPrimStrings:universal_string(Rule),
+ testPrimStrings:bmp_string(Rule),
+ testPrimStrings:times(Rule),
+ testPrimStrings:utf8_string(Rule).
+
+testPrimExternal(Config) -> test(Config, fun testPrimExternal/3).
+testPrimExternal(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "PrimExternal"], Config,
+ [Rule|Opts]),
+ testPrimExternal:external(Rule),
+ ?only_ber_nif(asn1_test_lib:compile_all(["PrimStrings", "BitStr"], Config,
+ [Rule|Opts])),
+ ?only_ber_nif(testPrimStrings_cases(Rule)),
+ ?only_ber_nif(testPrimStrings:more_strings(Rule)).
+
+testChoPrim(Config) -> test(Config, fun testChoPrim/3).
+testChoPrim(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoPrim", Config, [Rule|Opts]),
+ testChoPrim:bool(Rule),
+ testChoPrim:int(Rule).
+
+testChoExtension(Config) -> test(Config, fun testChoExtension/3).
+testChoExtension(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoExtension", Config, [Rule|Opts]),
+ testChoExtension:extension(Rule).
+
+testChoExternal(Config) -> test(Config, fun testChoExternal/3).
+testChoExternal(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "ChoExternal"], Config, [Rule|Opts]),
+ testChoExternal:external(Rule).
+
+testChoOptional(Config) -> test(Config, fun testChoOptional/3).
+testChoOptional(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoOptional", Config, [Rule|Opts]),
+ testChoOptional:optional(Rule).
+
+testChoOptionalImplicitTag(Config) ->
+ test(Config, fun testChoOptionalImplicitTag/3,
+ [ber, ber_bin, ber_bin_v2]).
+testChoOptionalImplicitTag(Config, Rule, Opts) ->
+ %% Only meaningful for ber & co
+ asn1_test_lib:compile("ChoOptionalImplicitTag", Config, [Rule|Opts]),
+ testChoOptionalImplicitTag:optional(Rule).
+
+testChoRecursive(Config) -> test(Config, fun testChoRecursive/3).
+testChoRecursive(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoRecursive", Config, [Rule|Opts]),
+ testChoRecursive:recursive(Rule).
+
+testChoTypeRefCho(Config) -> test(Config, fun testChoTypeRefCho/3).
+testChoTypeRefCho(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoTypeRefCho", Config, [Rule|Opts]),
+ testChoTypeRefCho:choice(Rule).
+
+testChoTypeRefPrim(Config) -> test(Config, fun testChoTypeRefPrim/3).
+testChoTypeRefPrim(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoTypeRefPrim", Config, [Rule|Opts]),
+ testChoTypeRefPrim:prim(Rule).
+
+testChoTypeRefSeq(Config) -> test(Config, fun testChoTypeRefSeq/3).
+testChoTypeRefSeq(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoTypeRefSeq", Config, [Rule|Opts]),
+ testChoTypeRefSeq:seq(Rule).
+
+testChoTypeRefSet(Config) -> test(Config, fun testChoTypeRefSet/3).
+testChoTypeRefSet(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoTypeRefSet", Config, [Rule|Opts]),
+ testChoTypeRefSet:set(Rule).
+
+testDef(Config) -> test(Config, fun testDef/3).
+testDef(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Def", Config, [Rule|Opts]),
+ testDef:main(Rule).
+
+testOpt(Config) -> test(Config, fun testOpt/3).
+testOpt(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Opt", Config, [Rule|Opts]),
+ testOpt:main(Rule).
+
+testEnumExt(Config) -> test(Config, fun testEnumExt/3).
+testEnumExt(Config, Rule, Opts) ->
+ asn1_test_lib:compile("EnumExt", Config, [Rule|Opts]),
+ testEnumExt:main(Rule).
+
+%% Test of OTP-2523 ENUMERATED with extensionmark.
+testSeqDefault(Config) -> test(Config, fun testSeqDefault/3).
+testSeqDefault(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqDefault", Config, [Rule|Opts]),
+ testSeqDefault:main(Rule).
+
+testSeqExtension(Config) -> test(Config, fun testSeqExtension/3).
+testSeqExtension(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SeqExtension"], Config,
+ [Rule|Opts]),
+ testSeqExtension:main(Rule).
+
+testSeqExternal(Config) -> test(Config, fun testSeqExternal/3).
+testSeqExternal(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SeqExternal"], Config, [Rule|Opts]),
+ testSeqExternal:main(Rule).
+
+testSeqOptional(Config) -> test(Config, fun testSeqOptional/3).
+testSeqOptional(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqOptional", Config, [Rule|Opts]),
+ testSeqOptional:main(Rule).
+
+testSeqPrim(Config) -> test(Config, fun testSeqPrim/3).
+testSeqPrim(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqPrim", Config, [Rule|Opts]),
+ testSeqPrim:main(Rule).
+
+%% Test of OTP-2738 Detect corrupt optional component.
+testSeq2738(Config) -> test(Config, fun testSeq2738/3).
+testSeq2738(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Seq2738", Config, [Rule|Opts]),
+ testSeq2738:main(Rule).
+
+testSeqTag(Config) -> test(Config, fun testSeqTag/3).
+testSeqTag(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SeqTag"], Config, [Rule|Opts]),
+ testSeqTag:main(Rule).
+
+testSeqTypeRefCho(Config) -> test(Config, fun testSeqTypeRefCho/3).
+testSeqTypeRefCho(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqTypeRefCho", Config, [Rule|Opts]),
+ testSeqTypeRefCho:main(Rule).
+
+testSeqTypeRefPrim(Config) -> test(Config, fun testSeqTypeRefPrim/3).
+testSeqTypeRefPrim(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqTypeRefPrim", Config, [Rule|Opts]),
+ testSeqTypeRefPrim:main(Rule).
+
+testSeqTypeRefSeq(Config) -> test(Config, fun testSeqTypeRefSeq/3).
+testSeqTypeRefSeq(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqTypeRefSeq", Config, [Rule|Opts]),
+ testSeqTypeRefSeq:main(Rule).
+
+testSeqTypeRefSet(Config) -> test(Config, fun testSeqTypeRefSet/3).
+testSeqTypeRefSet(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqTypeRefSet", Config, [Rule|Opts]),
+ testSeqTypeRefSet:main(Rule).
+
+testSeqOf(Config) -> test(Config, fun testSeqOf/3).
+testSeqOf(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["SeqOf", "SeqOfEnum", "XSeqOf"], Config,
+ [Rule|Opts]),
+ testSeqOf:main(Rule).
+
+testSeqOfCho(Config) -> test(Config, fun testSeqOfCho/3).
+testSeqOfCho(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqOfCho", Config, [Rule|Opts]),
+ testSeqOfCho:main(Rule).
+
+testSeqOfIndefinite(Config) ->
+ test(Config, fun testSeqOfIndefinite/3,
+ [ber, ber_bin, ber_bin_v2, {ber_bin_v2, [nif]}]).
+testSeqOfIndefinite(Config, Rule, Opts) ->
+ Files = ["Mvrasn-Constants-1", "Mvrasn-DataTypes-1", "Mvrasn-21-4",
+ "Mvrasn-20-4", "Mvrasn-19-4", "Mvrasn-18-4", "Mvrasn-17-4",
+ "Mvrasn-15-4", "Mvrasn-14-4", "Mvrasn-11-4", "SeqOf"],
+ asn1_test_lib:compile_all(Files, Config, [Rule|Opts]),
+ testSeqOfIndefinite:main().
+
+testSeqOfExternal(Config) -> test(Config, fun testSeqOfExternal/3).
+testSeqOfExternal(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SeqOfExternal"], Config,
+ [Rule|Opts]),
+ testSeqOfExternal:main(Rule).
+
+testSeqOfTag(Config) -> test(Config, fun testSeqOfTag/3).
+testSeqOfTag(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SeqOfTag"], Config, [Rule|Opts]),
+ testSeqOfTag:main(Rule).
+
+testSetDefault(Config) -> test(Config, fun testSetDefault/3).
+testSetDefault(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetDefault", Config, [Rule|Opts]),
+ testSetDefault:main(Rule).
+
+testParamBasic(Config) -> test(Config, fun testParamBasic/3).
+testParamBasic(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ParamBasic", Config, [Rule|Opts]),
+ testParamBasic:main(Rule).
+
+testSetExtension(Config) -> test(Config, fun testSetExtension/3).
+testSetExtension(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SetExtension"], Config,
+ [Rule|Opts]),
+ testSetExtension:main(Rule).
+
+testSetExternal(Config) -> test(Config, fun testSetExternal/3).
+testSetExternal(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SetExternal"], Config, [Rule|Opts]),
+ testSetExternal:main(Rule).
+
+testSetOptional(Config) -> test(Config, fun testSetOptional/3).
+testSetOptional(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetOptional", Config, [Rule|Opts]),
+ testSetOptional:ticket_7533(Rule),
+ testSetOptional:main(Rule).
+
+testSetPrim(Config) -> test(Config, fun testSetPrim/3).
+testSetPrim(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetPrim", Config, [Rule|Opts]),
+ testSetPrim:main(Rule).
+
+testSetTag(Config) -> test(Config, fun testSetTag/3).
+testSetTag(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SetTag"], Config, [Rule|Opts]),
+ testSetTag:main(Rule).
+
+testSetTypeRefCho(Config) -> test(Config, fun testSetTypeRefCho/3).
+testSetTypeRefCho(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetTypeRefCho", Config, [Rule|Opts]),
+ testSetTypeRefCho:main(Rule).
+
+testSetTypeRefPrim(Config) -> test(Config, fun testSetTypeRefPrim/3).
+testSetTypeRefPrim(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetTypeRefPrim", Config, [Rule|Opts]),
+ testSetTypeRefPrim:main(Rule).
+
+testSetTypeRefSeq(Config) -> test(Config, fun testSetTypeRefSeq/3).
+testSetTypeRefSeq(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetTypeRefSeq", Config, [Rule|Opts]),
+ testSetTypeRefSeq:main(Rule).
+
+testSetTypeRefSet(Config) -> test(Config, fun testSetTypeRefSet/3).
+testSetTypeRefSet(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetTypeRefSet", Config, [Rule|Opts]),
+ testSetTypeRefSet:main(Rule).
+
+testSetOf(Config) -> test(Config, fun testSetOf/3).
+testSetOf(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetOf", Config, [Rule|Opts]),
+ testSetOf:main(Rule).
+
+testSetOfCho(Config) -> test(Config, fun testSetOfCho/3).
+testSetOfCho(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SetOfCho", Config, [Rule|Opts]),
+ testSetOfCho:main(Rule).
+
+testSetOfExternal(Config) -> test(Config, fun testSetOfExternal/3).
+testSetOfExternal(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SetOfExternal"], Config,
+ [Rule|Opts]),
+ testSetOfExternal:main(Rule).
+
+testSetOfTag(Config) -> test(Config, fun testSetOfTag/3).
+testSetOfTag(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["External", "SetOfTag"], Config, [Rule|Opts]),
+ testSetOfTag:main(Rule).
+
+c_syntax(Config) ->
+ DataDir = ?config(data_dir, Config),
+ [{error, _} = asn1ct:compile(filename:join(DataDir, F))
+ || F <-["Syntax",
+ "BadTypeEnding",
+ "BadValueAssignment1",
+ "BadValueAssignment2",
+ "BadValueSet",
+ "ChoiceBadExtension",
+ "EnumerationBadExtension",
+ "Example",
+ "Export1",
+ "MissingEnd",
+ "SequenceBadComma",
+ "SequenceBadComponentName",
+ "SequenceBadComponentType",
+ "SeqBadComma"]].
+
+c_string(Config) ->
+ test(Config, fun c_string/3, [per, per_bin, ber, ber_bin, ber_bin_v2]).
+c_string(Config, Rule, Opts) ->
+ asn1_test_lib:compile("String", Config, [Rule|Opts]).
+
+c_implicit_before_choice(Config) ->
+ test(Config, fun c_implicit_before_choice/3,
+ [ber, ber_bin, ber_bin_v2]).
+c_implicit_before_choice(Config, Rule, Opts) ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ {error, _R2} = asn1ct:compile(filename:join(DataDir, "CCSNARG3"),
+ [Rule, {outdir, CaseDir}|Opts]).
+
+parse(Config) ->
+ [asn1_test_lib:compile(M, Config, [abs]) || M <- test_modules()].
+
+per(Config) ->
+ test(Config, fun per/3, [per, per_bin, {per_bin, [optimize]}]).
+per(Config, Rule, Opts) ->
+ [module_test(M, Config, Rule, Opts) || M <- per_modules()].
+
+ber_other(Config) ->
+ test(Config, fun ber_other/3, [ber, ber_bin, ber_bin_v2]).
+ber_other(Config, Rule, Opts) ->
+ [module_test(M, Config, Rule, Opts) || M <- ber_modules()].
+
+
+module_test(M, Config, Rule, Opts) ->
+ asn1_test_lib:compile(M, Config, [Rule|Opts]),
+ case asn1ct:test(list_to_atom(M), [{i, ?config(case_dir, Config)}]) of
+ ok -> ok;
+ Error ->
+ erlang:error({test_failed, M, Opts, Error})
+ end.
+
+
+ber_choiceinseq(Config) ->
+ test(Config, fun ber_choiceinseq/3, [ber, ber_bin, ber_bin_v2]).
+ber_choiceinseq(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoiceInSeq", Config, [Rule|Opts]).
+
+ber_optional(Config) ->
+ test(Config, fun ber_optional/3, [ber, ber_bin, ber_bin_v2]).
+ber_optional(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SOpttest", Config, [Rule|Opts]),
+ V = {'S', {'A', 10, asn1_NOVALUE, asn1_NOVALUE},
+ {'B', asn1_NOVALUE, asn1_NOVALUE, asn1_NOVALUE},
+ {'C', asn1_NOVALUE, 111, asn1_NOVALUE}},
+ {ok, B} = asn1_wrapper:encode('SOpttest', 'S', V),
+ Bytes = lists:flatten(B),
+ V2 = asn1_wrapper:decode('SOpttest', 'S', Bytes),
+ V = element(2, V2).
+
+ber_optional_keyed_list(Config) ->
+ test(Config, fun ber_optional_keyed_list/3, [ber, ber_bin]).
+ber_optional_keyed_list(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SOpttest", Config, [Rule, keyed_list|Opts]),
+ Vrecord = {'S', {'A', 10, asn1_NOVALUE, asn1_NOVALUE},
+ {'B', asn1_NOVALUE, asn1_NOVALUE, asn1_NOVALUE},
+ {'C', asn1_NOVALUE, 111, asn1_NOVALUE}},
+ V = [{a, [{scriptKey, 10}]},
+ {b, []},
+ {c, [{callingPartysCategory, 111}]}],
+ {ok, B} = asn1_wrapper:encode('SOpttest', 'S', V),
+ Bytes = lists:flatten(B),
+ V2 = asn1_wrapper:decode('SOpttest', 'S', Bytes),
+ Vrecord = element(2, V2).
+
+%% records used by test-case default
+-record('Def1', {bool0,
+ bool1 = asn1_DEFAULT,
+ bool2 = asn1_DEFAULT,
+ bool3 = asn1_DEFAULT}).
+
+default(Config) -> test(Config, fun default/3).
+default(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Def", Config, [Rule|Opts]),
+ {ok, Bytes1} = asn1_wrapper:encode('Def', 'Def1', #'Def1'{bool0 = true}),
+ {ok, {'Def1', true, false, false, false}} =
+ asn1_wrapper:decode('Def', 'Def1', lists:flatten(Bytes1)),
+
+ {ok, Bytes2} = asn1_wrapper:encode('Def', 'Def1', #'Def1'{bool0 = true,
+ bool2 = false}),
+ {ok, {'Def1', true, false, false, false}} =
+ asn1_wrapper:decode('Def', 'Def1', lists:flatten(Bytes2)).
+
+value_test(Config) -> test(Config, fun value_test/3).
+value_test(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ObjIdValues", Config, [Rule|Opts]),
+ {ok, _} = asn1ct:test('ObjIdValues', 'ObjIdType',
+ 'ObjIdValues':'mobileDomainId'()).
+
+value_bad_enum_test(Config) ->
+ case ?MODULE of
+ asn1_SUITE ->
+ {error, _} = asn1ct:compile(?config(data_dir, Config)
+ ++ "BadEnumValue1",
+ [{outdir, ?config(case_dir, Config)}]);
+ _ -> {skip, "Runs in asn1_SUITE only"}
+ end.
+
+constructed(Config) ->
+ test(Config, fun constructed/3, [ber, ber_bin, ber_bin_v2]).
+constructed(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Constructed", Config, [Rule|Opts]),
+ {ok, B} = asn1_wrapper:encode('Constructed', 'S', {'S', false}),
+ [40, 3, 1, 1, 0] = lists:flatten(B),
+ {ok, B1} = asn1_wrapper:encode('Constructed', 'S2', {'S2', false}),
+ [40, 5, 48, 3, 1, 1, 0] = lists:flatten(B1),
+ {ok, B2} = asn1_wrapper:encode('Constructed', 'I', 10),
+ [136, 1, 10] = lists:flatten(B2).
+
+ber_decode_error(Config) ->
+ test(Config, fun ber_decode_error/3, [ber, ber_bin, ber_bin_v2]).
+ber_decode_error(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Constructed", Config, [Rule|Opts]),
+ ber_decode_error:run(Opts).
+
+h323test(Config) -> test(Config, fun h323test/3).
+h323test(Config, Rule, Opts) ->
+ Files = ["H235-SECURITY-MESSAGES", "H323-MESSAGES",
+ "MULTIMEDIA-SYSTEM-CONTROL"],
+ asn1_test_lib:compile_all(Files, Config, [Rule|Opts]),
+ h323test:run(Rule).
+
+per_GeneralString(Config) ->
+ test(Config, fun per_GeneralString/3, [per, per_bin]).
+per_GeneralString(Config, Rule, Opts) ->
+ asn1_test_lib:compile("MULTIMEDIA-SYSTEM-CONTROL", Config, [Rule|Opts]),
+ UI = [109, 64, 1, 57],
+ {ok, _V} = asn1_wrapper:decode('MULTIMEDIA-SYSTEM-CONTROL',
+ 'MultimediaSystemControlMessage', UI).
+
+per_open_type(Config) -> test(Config, fun per_open_type/3, [per, per_bin]).
+per_open_type(Config, Rule, Opts) ->
+ asn1_test_lib:compile("OpenType", Config, [Rule|Opts]),
+ {ok, _} = asn1ct:test('OpenType', 'Ot', {'Stype', 10, true}).
+
+testConstraints(Config) -> test(Config, fun testConstraints/3).
+testConstraints(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Constraints", Config, [Rule|Opts]),
+ testConstraints:int_constraints(Rule).
+
+
+testSeqIndefinite(Config) ->
+ test(Config, fun testSeqIndefinite/3, [ber, ber_bin, ber_bin_v2,
+ {ber_bin_v2, [nif]}]).
+testSeqIndefinite(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqSetIndefinite", Config, [Rule|Opts]),
+ testSeqIndefinite:main(Rule).
+
+
+testSetIndefinite(Config) ->
+ test(Config, fun testSetIndefinite/3, [ber, ber_bin, ber_bin_v2,
+ {ber_bin_v2, [nif]}]).
+testSetIndefinite(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SeqSetIndefinite", Config, [Rule|Opts]),
+ testSetIndefinite:main(Rule).
+
+
+testChoiceIndefinite(Config) ->
+ test(Config, fun testChoiceIndefinite/3, [ber, ber_bin, ber_bin_v2,
+ {ber_bin_v2, [nif]}]).
+testChoiceIndefinite(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ChoiceIndef", Config, [Rule|Opts]),
+ testChoiceIndefinite:main(Rule).
+
+testInfObjectClass(Config) -> test(Config, fun testInfObjectClass/3).
+testInfObjectClass(Config, Rule, Opts) ->
+ Files = ["ErrorClass", "InfClass"],
+ InfObjFiles = ["RANAPextract1", "InfObj", "MAP-ExtensionDataTypes",
+ "Objects", "INAPv2extract"],
+ RANAPFiles = ["RANAP-CommonDataTypes", "RANAP-Constants",
+ "RANAP-Containers", "RANAP-IEs", "RANAP-PDU-Contents",
+ "RANAP-PDU-Descriptions"],
+ asn1_test_lib:compile_all(Files ++ InfObjFiles ++ RANAPFiles, Config,
+ [Rule|Opts]),
+ testInfObjectClass:main(Rule),
+ testInfObj:main(Rule).
+
+testParameterizedInfObj(Config) ->
+ test(Config, fun testParameterizedInfObj/3).
+testParameterizedInfObj(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Param", Config, [Rule|Opts]),
+ testParameterizedInfObj:main(Rule).
+
+testMergeCompile(Config) -> test(Config, fun testMergeCompile/3).
+testMergeCompile(Config, Rule, Opts) ->
+ Files = ["MS.set.asn", "RANAPSET.set.asn1", "Mvrasn4.set.asn",
+ "Mvrasn6.set.asn"],
+ asn1_test_lib:compile_all(Files, Config, [Rule|Opts]),
+ testMergeCompile:main(Rule),
+ testMergeCompile:mvrasn(Rule).
+
+testobj(Config) -> test(Config, fun testobj/3).
+testobj(Config, Rule, Opts) ->
+ asn1_test_lib:compile("RANAP", Config, [Rule|Opts]),
+ asn1_test_lib:compile_erlang("testobj", Config, []),
+ ok = testobj:run(),
+ ok = testParameterizedInfObj:ranap(Rule).
+
+testDeepTConstr(Config) -> test(Config, fun testDeepTConstr/3).
+testDeepTConstr(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["TConstrChoice", "TConstr"], Config,
+ [Rule|Opts]),
+ testDeepTConstr:main(Rule).
+
+testInvokeMod(Config) -> test(Config, fun testInvokeMod/3).
+testInvokeMod(Config, Rule, Opts) ->
+ asn1_test_lib:compile("PrimStrings", Config, [Rule|Opts]),
+ {ok, _Result2} = 'PrimStrings':encode('Bs1', [1, 0, 1, 0]).
+
+testExport(Config) ->
+ case ?MODULE of
+ asn1_SUITE ->
+ {error, {asn1, _Reason}} =
+ asn1ct:compile(filename:join(?config(data_dir, Config),
+ "IllegalExport"),
+ [{outdir, ?config(case_dir, Config)}]);
+ _ ->
+ {skip, "Runs in asn1_SUITE only"}
+ end.
+
+testImport(Config) ->
+ test(Config, fun testImport/3, [ber, ber_bin, ber_bin_v2]).
+testImport(Config, Rule, Opts) ->
+ {error, _} = asn1ct:compile(filename:join(?config(data_dir, Config),
+ "ImportsFrom"),
+ [Rule, {outdir, ?config(priv_dir, Config)}
+ |Opts]).
+
+testMegaco(Config) -> test(Config, fun testMegaco/3).
+testMegaco(Config, Rule, Opts) ->
+ {ok, Module1, Module2} = testMegaco:compile(Config, Rule, Opts),
+ ok = testMegaco:main(Module1, Config),
+ ok = testMegaco:main(Module2, Config).
+
+testMvrasn6(Config) -> test(Config, fun testMvrasn6/3).
+testMvrasn6(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["Mvrasn-21-4", "Mvrasn-20-6", "Mvrasn-19-6",
+ "Mvrasn-15-6", "Mvrasn-18-6", "Mvrasn-14-6",
+ "Mvrasn-11-6"], Config, [Rule|Opts]).
+
+testContextSwitchingTypes(Config) ->
+ test(Config, fun testContextSwitchingTypes/3).
+testContextSwitchingTypes(Config, Rule, Opts) ->
+ asn1_test_lib:compile("ContextSwitchingTypes", Config, [Rule|Opts]),
+ testContextSwitchingTypes:test(Config).
+
+testTypeValueNotation(Config) -> test(Config, fun testTypeValueNotation/3).
+testTypeValueNotation(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["SeqTypeRefPrim", "ValueTest"], Config,
+ [Rule|Opts]),
+ testTypeValueNotation:main(Rule, Opts).
+
+testOpenTypeImplicitTag(Config) ->
+ test(Config, fun testOpenTypeImplicitTag/3).
+testOpenTypeImplicitTag(Config, Rule, Opts) ->
+ asn1_test_lib:compile("OpenTypeImplicitTag", Config, [Rule|Opts]),
+ testOpenTypeImplicitTag:main(Rule).
+
+duplicate_tags(Config) ->
+ case ?MODULE of
+ asn1_SUITE ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ {error, {asn1, [{error, {type, _, _, 'SeqOpt1Imp', {asn1, {duplicates_of_the_tags, _}}}}]}} =
+ asn1ct:compile(filename:join(DataDir, "SeqOptional2"),
+ [abs, {outdir, CaseDir}]);
+ _ ->
+ {skip, "Runs in asn1_SUITE only"}
+ end.
+
+rtUI(Config) -> test(Config, fun rtUI/3, [per, per_bin, ber,
+ ber_bin, ber_bin_v2]).
+rtUI(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Prim", Config, [Rule|Opts]),
+ {ok, _} = asn1rt:info('Prim').
+
+testROSE(Config) -> test(Config, fun testROSE/3).
+testROSE(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Remote-Operations-Merged.set.asn1", Config,
+ [Rule|Opts]).
+
+testINSTANCE_OF(Config) -> test(Config, fun testINSTANCE_OF/3).
+testINSTANCE_OF(Config, Rule, Opts) ->
+ asn1_test_lib:compile("INSTANCEOF.asn1", Config, [Rule|Opts]),
+ testINSTANCE_OF:main(Rule).
+
+testTCAP(Config) ->
+ test(Config, fun testTCAP/3,
+ [ber, ber_bin, ber_bin_v2, {ber_bin_v2, [nif]}]).
+testTCAP(Config, Rule, Opts) ->
+ testTCAP:compile(Config, [Rule|Opts]),
+ testTCAP:test(Rule, Config),
+ case Rule of
+ ber_bin_v2 -> testTCAP:compile_asn1config(Config, [Rule, asn1config]),
+ testTCAP:test_asn1config();
+ _ -> ok
+ end.
+
+testDER(Config) ->
+ test(Config, fun testDER/3, [ber, ber_bin, ber_bin_v2]).
+testDER(Config, Rule, Opts) ->
+ asn1_test_lib:compile("DERSpec", Config, [Rule, der|Opts]),
+ testDER:test(),
+ asn1_test_lib:compile("ParamBasic", Config, [Rule, der|Opts]),
+ testParamBasic:main(der),
+ asn1_test_lib:compile("Default", Config, [Rule, der|Opts]),
+ testSeqSetDefaultVal:main(Rule).
+
+specialized_decodes(Config) ->
+ test(Config, fun specialized_decodes/3, [ber_bin_v2]).
+specialized_decodes(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["PartialDecSeq.asn",
+ "PartialDecSeq2.asn",
+ "PartialDecSeq3.asn",
+ "PartialDecMyHTTP.asn",
+ "MEDIA-GATEWAY-CONTROL.asn",
+ "P-Record"],
+ Config, [Rule, optimize, asn1config|Opts]),
+ test_partial_incomplete_decode:test(Config),
+ test_selective_decode:test().
+
+special_decode_performance(Config) ->
+ test(Config, fun special_decode_performance/3,
+ [{ber_bin, [optimize]}, {ber_bin_v2, [optimize, nif]}]).
+special_decode_performance(Config, Rule, Opts) ->
+ Files = ["MEDIA-GATEWAY-CONTROL", "PartialDecSeq"],
+ asn1_test_lib:compile_all(Files, Config, [Rule, asn1config|Opts]),
+ test_special_decode_performance:go(all).
+
+
+test_driver_load(Config) ->
+ test(Config, fun test_driver_load/3, [{per_bin, [optimize]}]).
+test_driver_load(Config, Rule, Opts) ->
+ asn1_test_lib:compile("P-Record", Config, [Rule|Opts]),
+ test_driver_load:test(5).
+
+test_ParamTypeInfObj(Config) ->
+ asn1_test_lib:compile("IN-CS-1-Datatypes", Config, [ber_bin]).
+
+test_WS_ParamClass(Config) ->
+ asn1_test_lib:compile("InformationFramework", Config, [ber_bin]).
+
+test_Defed_ObjectIdentifier(Config) ->
+ asn1_test_lib:compile("UsefulDefinitions", Config, [ber_bin]).
+
+testSelectionType(Config) -> test(Config, fun testSelectionType/3).
+testSelectionType(Config, Rule, Opts) ->
+ asn1_test_lib:compile("SelectionType", Config, [Rule|Opts]),
+ {ok, _} = testSelectionTypes:test().
+
+testSSLspecs(Config) ->
+ test(Config, fun testSSLspecs/3, [ber, ber_bin, ber_bin_v2, {ber_bin_v2, [optimize]}]).
+testSSLspecs(Config, Rule, Opts) ->
+ ok = testSSLspecs:compile(Config,
+ [Rule, compact_bit_string, der|Opts]),
+ testSSLspecs:run(Rule),
+
+ case code:which(asn1ct) of
+ cover_compiled ->
+ ok;
+ _ ->
+ ok = testSSLspecs:compile_inline(Config, Rule),
+ ok = testSSLspecs:run_inline(Rule)
+ end.
+
+testNortel(Config) -> test(Config, fun testNortel/3).
+testNortel(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Nortel", Config, [Rule|Opts]).
+
+test_undecoded_rest(Config) -> test(Config, fun test_undecoded_rest/3).
+test_undecoded_rest(Config, Rule, Opts) ->
+ asn1_test_lib:compile("P-Record", Config, [Rule|Opts]),
+ ok = test_undecoded_rest:test([], Config),
+ asn1_test_lib:compile("P-Record", Config, [Rule,undec_rest|Opts]),
+ case Rule of
+ ber_bin_v2 -> ok;
+ _ -> test_undecoded_rest:test(undec_rest, Config)
+ end.
+
+test_inline(Config) ->
+ test(Config, fun test_inline/3, [ber, ber_bin, ber_bin_v2]).
+test_inline(Config, Rule, Opts) ->
+ case code:which(asn1ct) of
+ cover_compiled ->
+ {skip, "Not runnable when cover compiled"};
+ _ ->
+ test_inline:compile(Config, Opts),
+ test_inline:main(Config, Rule),
+ test_inline:inline1(Config, Rule, Opts),
+ test_inline:performance2()
+ end.
+
+testTcapsystem(Config) ->
+ test(Config, fun testTcapsystem/3, [ber, ber_bin, ber_bin_v2]).
+testTcapsystem(Config, Rule, Opts) ->
+ testTcapsystem:compile(Config, [Rule|Opts]).
+
+testNBAPsystem(Config) -> test(Config, fun testNBAPsystem/3,
+ [per, per_bin, {per_bin, [optimize]}]).
+testNBAPsystem(Config, Rule, Opts) ->
+ testNBAPsystem:compile(Config, [Rule|Opts]),
+ testNBAPsystem:test(Rule, Config).
+
+test_compile_options(Config) ->
+ case code:which(asn1ct) of
+ cover_compiled ->
+ {skip, "Not runnable when cover compiled"};
+ _ ->
+ ok = test_compile_options:wrong_path(Config),
+ ok = test_compile_options:path(Config),
+ ok = test_compile_options:noobj(Config),
+ ok = test_compile_options:record_name_prefix(Config),
+ ok = test_compile_options:verbose(Config),
+ ok = test_compile_options:warnings_as_errors(Config)
+ end.
+
+testDoubleEllipses(Config) -> test(Config, fun testDoubleEllipses/3).
+testDoubleEllipses(Config, Rule, Opts) ->
+ asn1_test_lib:compile("DoubleEllipses", Config, [Rule|Opts]),
+ testDoubleEllipses:main(Rule).
+
+test_modified_x420(Config) ->
+ Files = [filename:join(modified_x420, F) || F <- ["PKCS7",
+ "InformationFramework",
+ "AuthenticationFramework"]],
+ asn1_test_lib:compile_all(Files, Config, [der]),
+ test_modified_x420:test_io(Config).
+
+testX420(Config) ->
+ test(Config, fun testX420/3, [ber, ber_bin, ber_bin_v2]).
+testX420(Config, Rule, Opts) ->
+ testX420:compile(Rule, [der|Opts], Config),
+ ok = testX420:ticket7759(Rule, Config),
+ testX420:compile(Rule, Opts, Config).
+
+test_x691(Config) ->
+ test(Config, fun test_x691/3,
+ [per, per_bin, uper_bin, {per_bin, [optimize]}]).
+test_x691(Config, Rule, Opts) ->
+ Files = ["P-RecordA1", "P-RecordA2", "P-RecordA3"],
+ asn1_test_lib:compile_all(Files, Config, [Rule|Opts]),
+ test_x691:cases(Rule, case Rule of
+ uper_bin -> unaligned;
+ _ -> aligned
+ end),
+ asn1_test_lib:ticket_7708(Config, []),
+ asn1_test_lib:ticket_7763(Config).
+
+ticket_6143(Config) ->
+ ok = test_compile_options:ticket_6143(Config).
+
+testExtensionAdditionGroup(Config) ->
+ %% FIXME problems with automatic tags [ber_bin], [ber_bin, optimize]
+ test(Config, fun testExtensionAdditionGroup/3,
+ [per_bin, {per_bin, [optimize]}, uper_bin]).
+testExtensionAdditionGroup(Config, Rule, Opts) ->
+ asn1_test_lib:compile("Extension-Addition-Group", Config, [Rule|Opts]),
+ asn1_test_lib:compile_erlang("extensionAdditionGroup", Config,
+ [debug_info]),
+ extensionAdditionGroup:run([Rule|Opts]),
+ extensionAdditionGroup:run2([Rule|Opts]),
+ asn1_test_lib:compile("EUTRA-RRC-Definitions", Config, [Rule, {record_name_prefix, "RRC-"}|Opts]),
+ extensionAdditionGroup:run3([Rule|Opts]).
+
+% parse_modules() ->
+% ["ImportsFrom"].
+
+per_modules() ->
+ [X || X <- test_modules()].
+
+ber_modules() ->
+ [X || X <- test_modules(),
+ X =/= "CommonDataTypes",
+ X =/= "DS-EquipmentUser-CommonFunctionOrig-TransmissionPath",
+ X =/= "H323-MESSAGES",
+ X =/= "H235-SECURITY-MESSAGES",
+ X =/= "MULTIMEDIA-SYSTEM-CONTROL"].
+
+test_modules() ->
+ ["BitStr",
+ "CAP",
+ "CommonDataTypes",
+ "Constraints",
+ "ContextSwitchingTypes",
+ "DS-EquipmentUser-CommonFunctionOrig-TransmissionPath",
+ "Enum",
+ "From",
+ "H235-SECURITY-MESSAGES",
+ "H323-MESSAGES",
+ "Import",
+ "Int",
+ "MAP-commonDataTypes",
+ "Null",
+ "Octetstr",
+ "One",
+ "P-Record",
+ "P",
+ "Person",
+ "PrimStrings",
+ "Real",
+ "XSeq",
+ "XSeqOf",
+ "XSet",
+ "XSetOf",
+ "String",
+ "SwCDR",
+ "Time",
+ "SeqSetLib", % must be compiled before Seq and Set
+ "Seq",
+ "Set",
+ "SetOf",
+ "SeqOf",
+ "Prim",
+ "Cho",
+ "Def",
+ "Opt",
+ "ELDAPv3",
+ "LDAP"].
+
+test_OTP_9688(Config) ->
+ PrivDir = ?config(case_dir, Config),
+ Data = "
+OTP-9688 DEFINITIONS ::= BEGIN
+
+ foo INTEGER ::= 1
+ bar INTEGER ::= 42
+
+ Baz ::= INTEGER {x-y-z1(foo), x-y-z2(bar)}
+ Qux ::= SEQUENCE {flerpInfo SEQUENCE {x INTEGER (-10 | -9 | (0..4))} OPTIONAL}
+
+END
+",
+ File = filename:join(PrivDir, "OTP-9688.asn1"),
+ ok = file:write_file(File, Data),
+ %% Does it compile with changes to asn1ct_check and asn1ct_gen_per_rt2ct?
+ %% (see ticket)
+ ok = asn1ct:compile(File, [{outdir, PrivDir}]).
+
+
+timer_compile(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["H235-SECURITY-MESSAGES", "H323-MESSAGES"],
+ Config, [Rule|Opts]).
+
+testTimer_ber(suite) -> [];
+testTimer_ber(Config) ->
+ timer_compile(Config,ber,[]),
+ testTimer:go(Config,ber).
+
+testTimer_ber_bin(suite) -> [];
+testTimer_ber_bin(Config) ->
+ timer_compile(Config,ber_bin,[]),
+ testTimer:go(Config,ber_bin).
+
+testTimer_ber_bin_opt(suite) -> [];
+testTimer_ber_bin_opt(Config) ->
+ timer_compile(Config,ber_bin,[optimize]),
+ testTimer:go(Config,ber_bin).
+
+testTimer_ber_bin_opt_driver(suite) -> [];
+testTimer_ber_bin_opt_driver(Config) ->
+ timer_compile(Config,ber_bin,[optimize,driver]),
+ testTimer:go(Config,ber_bin).
+
+testTimer_per(suite) -> [];
+testTimer_per(Config) ->
+ timer_compile(Config,per,[]),
+ testTimer:go(Config,per).
+
+testTimer_per_bin(suite) -> [];
+testTimer_per_bin(Config) ->
+ timer_compile(Config,per_bin,[]),
+ testTimer:go(Config,per_bin).
+
+testTimer_per_bin_opt(suite) -> [];
+testTimer_per_bin_opt(Config) ->
+ timer_compile(Config,per_bin,[optimize]),
+ testTimer:go(Config,per_bin).
+
+
+testTimer_uper_bin(suite) -> [];
+testTimer_uper_bin(Config) ->
+ timer_compile(Config,uper_bin,[]),
+ {comment,_} = testTimer:go(Config,uper_bin).
+
+%% Test of multiple-line comment, OTP-8043
+testComment(suite) -> [];
+testComment(Config) ->
+ asn1_test_lib:compile("Comment", Config, []),
+ {ok,Enc} = asn1_wrapper:encode('Comment','Seq',{'Seq',12,true}),
+ {ok,{'Seq',12,true}} = asn1_wrapper:decode('Comment','Seq',Enc),
+ ok.
+
+testName2Number(suite) -> [];
+testName2Number(Config) ->
+ N2NOptions = [{n2n,Type} || Type <- ['CauseMisc', 'CauseProtocol',
+ 'CauseRadioNetwork',
+ 'CauseTransport','CauseNas']],
+ asn1_test_lib:compile("S1AP-IEs", Config, N2NOptions),
+
+ 0 = 'S1AP-IEs':name2num_CauseMisc('control-processing-overload'),
+ 'unknown-PLMN' = 'S1AP-IEs':num2name_CauseMisc(5),
+ ok.
+
+ticket_7407(Config) ->
+ asn1_test_lib:compile("EUTRA-extract-7407", Config, [uper_bin]),
+ asn1_test_lib:ticket_7407_code(true),
+
+ asn1_test_lib:compile("EUTRA-extract-7407", Config,
+ [uper_bin, no_final_padding]),
+ asn1_test_lib:ticket_7407_code(false).
+
+smp(suite) -> [];
+smp(Config) ->
+ case erlang:system_info(smp_support) of
+ true ->
+ NumOfProcs = erlang:system_info(schedulers),
+ io:format("smp starting ~p workers\n",[NumOfProcs]),
+
+ Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
+ ok = testNBAPsystem:compile(Config, [per_bin, optimize]),
+
+ enc_dec(NumOfProcs,Msg,2),
+
+ N = 10000,
+
+ {Time1,ok} = timer:tc(?MODULE,enc_dec,[NumOfProcs,Msg, N]),
+ {Time1S,ok} = timer:tc(?MODULE,enc_dec,[1, Msg, NumOfProcs * N]),
+
+ ok = testNBAPsystem:compile(Config, [ber_bin, optimize, nif]),
+ {Time3,ok} = timer:tc(?MODULE,enc_dec,[NumOfProcs,Msg, N]),
+
+ {Time3S,ok} = timer:tc(?MODULE,enc_dec,[1, Msg, NumOfProcs * N]),
+
+ {comment,lists:flatten(
+ io_lib:format(
+ "Encode/decode time parallell with ~p cores: ~p [microsecs]~n"
+ "Encode/decode time sequential: ~p [microsecs]",
+ [NumOfProcs,Time1+Time3,Time1S+Time3S]))};
+ false ->
+ {skipped,"No smp support"}
+ end.
+
+per_performance(Config) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ NifDir = filename:join(PrivDir,"nif"),
+ ErlDir = filename:join(PrivDir,"erl"),
+ file:make_dir(NifDir),file:make_dir(ErlDir),
+
+ Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
+ ok = testNBAPsystem:compile([{priv_dir,NifDir}|Config],
+ [per_bin, optimize]),
+ ok = testNBAPsystem:compile([{priv_dir,ErlDir}|Config],
+ [per_bin]),
+
+ Modules = ['NBAP-CommonDataTypes',
+ 'NBAP-Constants',
+ 'NBAP-Containers',
+ 'NBAP-IEs',
+ 'NBAP-PDU-Contents',
+ 'NBAP-PDU-Discriptions'],
+
+
+ PreNif = fun() ->
+ code:add_patha(NifDir),
+ lists:foreach(fun(M) ->
+ code:purge(M),
+ code:load_file(M)
+ end,Modules)
+ end,
+
+ PreErl = fun() ->
+ code:add_patha(ErlDir),
+ lists:foreach(fun(M) ->
+ code:purge(M),
+ code:load_file(M)
+ end,Modules)
+ end,
+
+ Func = fun() ->
+ element(1,timer:tc(
+ asn1_wrapper,encode,['NBAP-PDU-Discriptions',
+ 'NBAP-PDU',
+ Msg]))
+ end,
+
+ nif_vs_erlang_performance({{{PreNif,Func},{PreErl,Func}},100000,32}).
+
+ber_performance(Config) ->
+
+ Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
+ ok = testNBAPsystem:compile(Config, [ber_bin, optimize, nif]),
+
+
+ BerFun = fun() ->
+ {ok,B} = asn1_wrapper:encode('NBAP-PDU-Discriptions',
+ 'NBAP-PDU', Msg),
+ asn1_wrapper:decode(
+ 'NBAP-PDU-Discriptions',
+ 'NBAP-PDU',
+ B)
+ end,
+ nif_vs_erlang_performance({BerFun,100000,32}).
+
+cert_pem_performance(Config) when is_list(Config) ->
+ cert_pem_performance({100000, 32});
+cert_pem_performance({N,S}) ->
+ nif_vs_erlang_performance({fun pem_performance:cert_pem/0,N,S}).
+
+dsa_pem_performance(Config) when is_list(Config) ->
+ dsa_pem_performance({100000, 32});
+dsa_pem_performance({N,S}) ->
+ nif_vs_erlang_performance({fun pem_performance:dsa_pem/0,N,S}).
+
+
+nif_vs_erlang_performance({{TC1,TC2},N,Sched}) ->
+ random:seed({123,456,789}),
+ io:format("Running a ~p sample with ~p max procs...~n~n",[N,Sched]),
+
+ {True,False} = exec(TC1,TC2,Sched,N+1),
+
+ io:format("~ndone!~n"),
+
+ io:format("~n"),TStats = print_stats(strip(True,N div 20)),
+ io:format("~n"),FStats = print_stats(strip(False,N div 20)),
+ Str = io_lib:format("~nNifs are ~.3f% faster than erlang!~n",
+ [(element(2,FStats) - element(2,TStats)) /
+ element(2,FStats) * 100]),
+ io:format(Str),
+ {comment, lists:flatten(Str)};
+nif_vs_erlang_performance({T,N,Sched}) ->
+ PTC1 = fun() ->
+ application:set_env(asn1, nif_loadable, true)
+ end,
+ PTC2 = fun() ->
+ application:set_env(asn1, nif_loadable, false)
+ end,
+ TC = fun() ->
+ element(1,timer:tc(T))
+ end,
+ nif_vs_erlang_performance({{{PTC1,TC},{PTC2,TC}},N,Sched}).
+
+
+print_stats(Data) ->
+ Length = length(Data),
+ Mean = lists:sum(Data) / Length,
+ Variance = lists:foldl(fun(N,Acc) -> math:pow(N - Mean, 2)+Acc end, 0, Data),
+ StdDev = math:sqrt(Variance / Length),
+ Median = lists:nth(round(Length/2),Data),
+ Min = lists:min(Data),
+ Max = lists:max(Data),
+ if Length < 20 ->
+ io:format("Data: ~w~n",[Data]);
+ true ->
+ ok
+ end,
+ io:format("Length: ~p~nMean: ~p~nStdDev: ~p~nMedian: ~p~nMin: ~p~nMax: ~p~n",
+ [Length,Mean,StdDev,Median,Min,Max]),
+ {Length,Mean,StdDev,Median,Min,Max}.
+
+collect(Acc) ->
+ receive
+ {Tag,Val} ->
+ Prev = proplists:get_value(Tag,Acc,[]),
+ collect(lists:keystore(Tag,1,Acc,{Tag,[Val|Prev]}))
+ after 100 ->
+ Acc
+ end.
+
+exec(One,Two,Max,N) ->
+ exec(One,Two,Max,N,{[],[]}).
+exec(_,_,_,1,{D1,D2}) ->
+ {lists:flatten(D1),lists:flatten(D2)};
+exec({PreOne,One} = O,{PreTwo,Two} = T,MaxProcs, N, {D1,D2}) ->
+ Num = random:uniform(round(N/2)),
+ if Num rem 3 == 0 ->
+ timer:sleep(Num rem 1000);
+ true ->
+ ok
+ end,
+ Procs = random:uniform(MaxProcs),
+ io:format("\tBatch: ~p items in ~p processes, ~p left~n",[Num,Procs,N-Num]),
+ if Num rem 2 == 1 ->
+ erlang:garbage_collect(),
+ PreOne(),
+ MoreOne = pexec(One, Num, Procs, []),
+ erlang:garbage_collect(),
+ PreTwo(),
+ MoreTwo = pexec(Two, Num, Procs, []);
+ true ->
+ erlang:garbage_collect(),
+ PreTwo(),
+ MoreTwo = pexec(Two, Num, Procs, []),
+ erlang:garbage_collect(),
+ PreOne(),
+ MoreOne = pexec(One, Num, Procs, [])
+ end,
+ exec(O,T,MaxProcs,N-Num,{[MoreOne|D1],
+ [MoreTwo|D2]}).
+
+pexec(_Fun, _, 0, []) ->
+ [];
+pexec(Fun, _, 0, [{Ref,Pid}|Rest]) ->
+ receive
+ {data,D} ->
+ [D|pexec(Fun,0,0,[{Ref,Pid}|Rest])];
+ {'DOWN', Ref, process, Pid, normal} ->
+ pexec(Fun, 0,0,Rest)
+ end;
+pexec(Fun, 0, 1, AccProcs) ->
+ pexec(Fun, 0, 0, AccProcs);
+pexec(Fun, N, 1, AccProcs) ->
+ [Fun()|pexec(Fun, N - 1, 1, AccProcs)];
+pexec(Fun, N, Procs, AccProcs) ->
+ S = self(),
+ Pid = spawn(fun() ->
+ S ! {data,pexec(Fun,N,1,[])}
+ end),
+ Ref = erlang:monitor(process, Pid),
+ pexec(Fun, N, Procs - 1, [{Ref,Pid}|AccProcs]).
+
+strip(Data,Num) ->
+ {_,R} = lists:split(Num,lists:sort(Data)),
+ element(2,lists:split(Num,lists:reverse(R))).
+
+faster(A,B) ->
+ (B - A)/B * 100.
+
+enc_dec(1, Msg, N) ->
+ worker_loop(N, Msg);
+enc_dec(NumOfProcs,Msg, N) ->
+ pforeach(fun(_) ->
+ worker_loop(N, Msg)
+ end, [I || I <- lists:seq(1,NumOfProcs)]).
+
+worker_loop(0, _Msg) ->
+ ok;
+worker_loop(N, Msg) ->
+ {ok,B}=asn1_wrapper:encode('NBAP-PDU-Discriptions',
+ 'NBAP-PDU',
+ Msg),
+ {ok,_Msg}=asn1_wrapper:decode('NBAP-PDU-Discriptions',
+ 'NBAP-PDU',
+ B),
+ worker_loop(N - 1, Msg).
+
+
+pforeach(Fun, List) ->
+ pforeach(Fun, List, []).
+pforeach(Fun, [], [{Pid,Ref}|Pids]) ->
+ receive
+ {'DOWN', Ref, process, Pid, normal} ->
+ pforeach(Fun, [], Pids)
+ end;
+pforeach(Fun, [H|T], Pids) ->
+ Pid = spawn(fun() -> Fun(H) end),
+ Ref = erlang:monitor(process, Pid),
+ pforeach(Fun, T, [{Pid, Ref}|Pids]);
+pforeach(_Fun,[],[]) ->
+ ok.
+
+-record('InitiatingMessage',{procedureCode,criticality,value}).
+-record('Iu-ReleaseCommand',{first,second}).
+
+ticket7904(Config) ->
+ asn1_test_lib:compile("RANAPextract1", Config, [per_bin, optimize]),
+
+ Val1 = #'InitiatingMessage'{procedureCode=1,
+ criticality=ignore,
+ value=#'Iu-ReleaseCommand'{
+ first=13,
+ second=true}},
+
+ {ok,_} = 'RANAPextract1':encode('InitiatingMessage', Val1),
+ {ok,_} = 'RANAPextract1':encode('InitiatingMessage', Val1).
diff --git a/lib/asn1/test/asn1_SUITE.erl.src b/lib/asn1/test/asn1_SUITE.erl.src
deleted file mode 100644
index 3f51b125ec..0000000000
--- a/lib/asn1/test/asn1_SUITE.erl.src
+++ /dev/null
@@ -1,2392 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
-%%% Purpose : Test suite for the ASN.1 application
-
--module(asn1_%BIN%SUITE).
--define(PER,'%PER%').
--define(BER,'%BER%').
--define(ber_driver(Erule,Func),
- case Erule of
- ber_bin_v2 ->
- Func;
- _ -> ok
- end).
--define(per_optimize(Erule),
- case Erule of
- ber_bin_v2 ->[optimize];
- _ -> []
- end).
--define(per_bit_opt(FuncCall),
- case ?BER of
- ber_bin_v2 -> FuncCall;
-% _ -> {skip,"only for bit optimized per_bin"}
- _ -> ok
- end).
--define(uper_bin(FuncCall),
- case ?PER of
- per -> FuncCall;
- _ -> ok
- end).
-
--compile(export_all).
-%%-export([Function/Arity, ...]).
-
--include_lib("test_server/include/test_server.hrl").
-
-%% records used by test-case default
--record('Def1',{
-bool0, bool1 = asn1_DEFAULT, bool2 = asn1_DEFAULT, bool3 = asn1_DEFAULT}).
-
-%-record('Def2',{
-%bool10, bool11 = asn1_DEFAULT, bool12 = asn1_DEFAULT, bool13}).
-
-%-record('Def3',{
-%bool30 = asn1_DEFAULT, bool31 = asn1_DEFAULT, bool32 = asn1_DEFAULT, bool33 = asn1_DEFAULT}).
-
-suite() -> [{ct_hooks,[ts_install_cth]}].
-
-all() -> [{group,compile},parse,default_per,default_ber,default_per_opt,per,
- {group,ber},testPrim,
- testPrimStrings, testPrimExternal, testChoPrim,
- testChoExtension, testChoExternal, testChoOptional,
- testChoOptionalImplicitTag, testChoRecursive,
- testChoTypeRefCho, testChoTypeRefPrim, testChoTypeRefSeq,
- testChoTypeRefSet, testDef, testOpt, testSeqDefault,
- testSeqExtension, testSeqExternal, testSeqOptional,
- testSeqPrim, testSeqTag, testSeqTypeRefCho,
- testSeqTypeRefPrim, testSeqTypeRefSeq, testSeqTypeRefSet,
- testSeqOf, testSeqOfIndefinite, testSeqOfCho,
- testSeqOfExternal, testSetDefault, testSetExtension,
- testExtensionAdditionGroup,
- testSetExternal, testSeqOfTag, testSetOptional, testSetPrim,
- testSetTag, testSetTypeRefCho, testSetTypeRefPrim,
- testSetTypeRefSeq, testSetTypeRefSet, testSetOf, testSetOfCho,
- testSetOfExternal, testSetOfTag, testEnumExt, value_test,
- testSeq2738, constructed, ber_decode_error,
- h323test, testSeqIndefinite, testSetIndefinite,
- testChoiceIndefinite,
- per_GeneralString, per_open_type, testInfObjectClass,
- testParameterizedInfObj, testMergeCompile, testobj,
- testDeepTConstr, testConstraints,
- testInvokeMod, testExport, testImport, testCompactBitString,
- testMegaco, testParamBasic, testMvrasn6,
- testContextSwitchingTypes, testTypeValueNotation,
- testOpenTypeImplicitTag,duplicate_tags,rtUI,testROSE,
- testINSTANCE_OF,testTCAP,testDER,specialized_decodes,
- special_decode_performance,test_driver_load,
- test_ParamTypeInfObj, test_WS_ParamClass,
- test_Defed_ObjectIdentifier, testSelectionType,
- testSSLspecs, testNortel,test_undecoded_rest,
- test_inline, testTcapsystem, testNBAPsystem,
- test_compile_options,testDoubleEllipses, test_modified_x420,
- testX420, test_x691,ticket_6143, testExtensionAdditionGroup,
- test_OTP_9688
- ] ++ common() ++ particular().
-
-groups() ->
- [
- {compile, [],
- [c_syntax, c_string_per, c_string_ber,
- c_implicit_before_choice]},
- {ber, [],
- [ber_choiceinseq, ber_optional, ber_optional_keyed_list,
- ber_other]},
- {app_test, [], [{asn1_app_test, all}]},
- {appup_test, [], [{asn1_appup_test, all}]}
- ].
-
-init_per_suite(Config) ->
- io:format("code:lib_dir(asn1) = ~p~n",[code:lib_dir(asn1)]),
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
-
-%all(suite) -> [test_inline,testNBAPsystem,test_compile_options,ticket_6143].
-
-
-init_per_testcase(Func,Config) ->
- %%?line test_server:format("Func: ~p~n",[Func]),
- ?line {ok, _} = file:read_file_info(filename:join([?config(priv_dir,Config)])),
- ?line code:add_patha(?config(priv_dir,Config)),
- Dog=
- case Func of
- testX420 ->
- test_server:timetrap({minutes,60}); % 60 minutes
- _ ->
- test_server:timetrap({minutes,30}) % 60 minutes
- end,
-%% Dog=test_server:timetrap(1800000), % 30 minutes
- [{watchdog, Dog}|Config].
-
-end_per_testcase(_Func,Config) ->
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog).
-
-
-testPrim(suite) -> [];
-testPrim(Config) ->
- ?line testPrim:compile(Config,?BER,[]),
- ?line testPrim_cases(?BER),
- ?line ?ber_driver(?BER,testPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testPrim_cases(?BER)),
- ?line testPrim:compile(Config,?PER,[]),
- ?line testPrim_cases(?PER),
- ?line ?per_bit_opt(testPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testPrim_cases(?PER)),
- ?line ?uper_bin(testPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testPrim_cases(uper_bin)),
- ?line testPrim:compile(Config,?PER,[optimize]),
- ?line testPrim_cases(?PER).
-
-testPrim_cases(Rules) ->
- ?line testPrim:bool(Rules),
- ?line testPrim:int(Rules),
- ?line testPrim:enum(Rules),
- ?line testPrim:obj_id(Rules),
- ?line testPrim:rel_oid(Rules),
- ?line testPrim:null(Rules),
- ?line testPrim:real(Rules).
-
-
-testCompactBitString(suite) -> [];
-testCompactBitString(Config) ->
-
- ?line testCompactBitString:compile(Config,?BER,[compact_bit_string]),
- ?line testCompactBitString:compact_bit_string(?BER),
-
- ?line ?ber_driver(?BER,testCompactBitString:compile(Config,?BER,[compact_bit_string,driver])),
- ?line ?ber_driver(?BER,testCompactBitString:compact_bit_string(?BER)),
-
- ?line testCompactBitString:compile(Config,?PER,[compact_bit_string]),
- ?line testCompactBitString:compact_bit_string(?PER),
- ?line testCompactBitString:bit_string_unnamed(?PER),
-
- ?line ?per_bit_opt(testCompactBitString:compile(Config,?PER,
- [compact_bit_string,optimize])),
- ?line ?per_bit_opt(testCompactBitString:compact_bit_string(?PER)),
- ?line ?per_bit_opt(testCompactBitString:bit_string_unnamed(?PER)),
- ?line ?per_bit_opt(testCompactBitString:ticket_7734(?PER)),
-
- ?line ?uper_bin(testCompactBitString:compile(Config,uper_bin,
- [compact_bit_string])),
- ?line ?uper_bin(testCompactBitString:compact_bit_string(uper_bin)),
- ?line ?uper_bin(testCompactBitString:bit_string_unnamed(uper_bin)),
-
- ?line testCompactBitString:compile(Config,?PER,[optimize,compact_bit_string]),
- ?line testCompactBitString:compact_bit_string(?PER),
- ?line testCompactBitString:bit_string_unnamed(?PER),
-
- ?line testCompactBitString:otp_4869(?PER).
-
-
-testPrimStrings(suite) -> [];
-testPrimStrings(Config) ->
-
- ?line testPrimStrings:compile(Config,?BER,[]),
- ?line testPrimStrings_cases(?BER),
- ?line testPrimStrings:more_strings(?BER), %% these are not implemented in per yet
- ?line ?ber_driver(?BER,testPrimStrings:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testPrimStrings_cases(?BER)),
- ?line ?ber_driver(?BER,testPrimStrings:more_strings(?BER)),
-
- ?line testPrimStrings:compile(Config,?PER,[]),
- ?line testPrimStrings_cases(?PER),
-
- ?line ?per_bit_opt(testPrimStrings:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testPrimStrings_cases(?PER)),
-
- ?line ?uper_bin(testPrimStrings:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testPrimStrings_cases(uper_bin)),
-
- ?line testPrimStrings:compile(Config,?PER,[optimize]),
- ?line testPrimStrings_cases(?PER).
-
-testPrimStrings_cases(Rules) ->
- ?line testPrimStrings:bit_string(Rules),
- ?line testPrimStrings:bit_string_unnamed(Rules),
- ?line testPrimStrings:octet_string(Rules),
- ?line testPrimStrings:numeric_string(Rules),
- ?line testPrimStrings:other_strings(Rules),
- ?line testPrimStrings:universal_string(Rules),
- ?line testPrimStrings:bmp_string(Rules),
- ?line testPrimStrings:times(Rules),
- ?line testPrimStrings:utf8_string(Rules).
-
-
-
-testPrimExternal(suite) -> [];
-testPrimExternal(Config) ->
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testPrimExternal:compile(Config,?BER,[]),
- ?line testPrimExternal_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testPrimExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testPrimExternal_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testPrimExternal:compile(Config,?PER,[]),
- ?line testPrimExternal_cases(?PER),
-
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testPrimExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testPrimExternal_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testPrimExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testPrimExternal_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testPrimExternal:compile(Config,?PER,[optimize]),
- ?line testPrimExternal_cases(?PER).
-
-testPrimExternal_cases(Rules) ->
- ?line testPrimExternal:external(Rules).
-
-
-
-
-testChoPrim(suite) -> [];
-testChoPrim(Config) ->
-
- ?line testChoPrim:compile(Config,?BER,[]),
- ?line testChoPrim_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoPrim_cases(?BER)),
-
- ?line testChoPrim:compile(Config,?PER,[]),
- ?line testChoPrim_cases(?PER),
-
- ?line ?per_bit_opt(testChoPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoPrim_cases(?PER)),
-
- ?line ?uper_bin(testChoPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoPrim_cases(uper_bin)),
-
- ?line testChoPrim:compile(Config,?PER,[optimize]),
- ?line testChoPrim_cases(?PER).
-
-testChoPrim_cases(Rules) ->
- ?line testChoPrim:bool(Rules),
- ?line testChoPrim:int(Rules).
-
-
-
-testChoExtension(suite) -> [];
-testChoExtension(Config) ->
-
- ?line testChoExtension:compile(Config,?BER,[]),
- ?line testChoExtension_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoExtension:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoExtension_cases(?BER)),
-
- ?line testChoExtension:compile(Config,?PER,[]),
- ?line testChoExtension_cases(?PER),
-
- ?line ?per_bit_opt(testChoExtension:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoExtension_cases(?PER)),
-
- ?line ?uper_bin(testChoExtension:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoExtension_cases(uper_bin)),
-
- ?line testChoExtension:compile(Config,?PER,[optimize]),
- ?line testChoExtension_cases(?PER).
-
-testChoExtension_cases(Rules) ->
- ?line testChoExtension:extension(Rules).
-
-
-
-testChoExternal(suite) -> [];
-testChoExternal(Config) ->
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testChoExternal:compile(Config,?BER,[]),
- ?line testChoExternal_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoExternal_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testChoExternal:compile(Config,?PER,[]),
- ?line testChoExternal_cases(?PER),
-
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoExternal_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoExternal_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testChoExternal:compile(Config,?PER,[optimize]),
- ?line testChoExternal_cases(?PER).
-
-
-testChoExternal_cases(Rules) ->
- ?line testChoExternal:external(Rules).
-
-
-
-testChoOptional(suite) -> [];
-testChoOptional(Config) ->
-
- ?line testChoOptional:compile(Config,?BER,[]),
- ?line testChoOptional_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoOptional:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoOptional_cases(?BER)),
-
- ?line testChoOptional:compile(Config,?PER,[]),
- ?line testChoOptional_cases(?PER),
-
- ?line ?per_bit_opt(testChoOptional:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoOptional_cases(?PER)),
-
- ?line ?uper_bin(testChoOptional:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoOptional_cases(uper_bin)),
-
- ?line testChoOptional:compile(Config,?PER,[optimize]),
- ?line testChoOptional_cases(?PER).
-
-testChoOptional_cases(Rules) ->
- ?line testChoOptional:optional(Rules).
-
-testChoOptionalImplicitTag(suite) -> [];
-testChoOptionalImplicitTag(Config) ->
- %% Only meaningful for ?BER
- ?line testChoOptionalImplicitTag:compile(Config,?BER),
- ?line testChoOptionalImplicitTag:optional(?BER).
-
-
-testChoRecursive(suite) -> [];
-testChoRecursive(Config) ->
-
- ?line testChoRecursive:compile(Config,?BER,[]),
- ?line testChoRecursive_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoRecursive:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoRecursive_cases(?BER)),
-
- ?line testChoRecursive:compile(Config,?PER,[]),
- ?line testChoRecursive_cases(?PER),
-
- ?line ?per_bit_opt(testChoRecursive:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoRecursive_cases(?PER)),
-
- ?line ?uper_bin(testChoRecursive:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoRecursive_cases(uper_bin)),
-
- ?line testChoRecursive:compile(Config,?PER,[optimize]),
- ?line testChoRecursive_cases(?PER).
-
-testChoRecursive_cases(Rules) ->
- ?line testChoRecursive:recursive(Rules).
-
-
-
-testChoTypeRefCho(suite) -> [];
-testChoTypeRefCho(Config) ->
-
- ?line testChoTypeRefCho:compile(Config,?BER,[]),
- ?line testChoTypeRefCho_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoTypeRefCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoTypeRefCho_cases(?BER)),
-
- ?line testChoTypeRefCho:compile(Config,?PER,[]),
- ?line testChoTypeRefCho_cases(?PER),
-
- ?line ?per_bit_opt(testChoTypeRefCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoTypeRefCho_cases(?PER)),
-
- ?line ?uper_bin(testChoTypeRefCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoTypeRefCho_cases(uper_bin)),
-
- ?line testChoTypeRefCho:compile(Config,?PER,[optimize]),
- ?line testChoTypeRefCho_cases(?PER).
-
-testChoTypeRefCho_cases(Rules) ->
- ?line testChoTypeRefCho:choice(Rules).
-
-
-
-testChoTypeRefPrim(suite) -> [];
-testChoTypeRefPrim(Config) ->
-
- ?line testChoTypeRefPrim:compile(Config,?BER,[]),
- ?line testChoTypeRefPrim_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoTypeRefPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoTypeRefPrim_cases(?BER)),
-
- ?line testChoTypeRefPrim:compile(Config,?PER,[]),
- ?line testChoTypeRefPrim_cases(?PER),
-
- ?line ?per_bit_opt(testChoTypeRefPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoTypeRefPrim_cases(?PER)),
-
- ?line ?uper_bin(testChoTypeRefPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoTypeRefPrim_cases(uper_bin)),
-
- ?line testChoTypeRefPrim:compile(Config,?PER,[optimize]),
- ?line testChoTypeRefPrim_cases(?PER).
-
-testChoTypeRefPrim_cases(Rules) ->
- ?line testChoTypeRefPrim:prim(Rules).
-
-
-
-testChoTypeRefSeq(suite) -> [];
-testChoTypeRefSeq(Config) ->
-
- ?line testChoTypeRefSeq:compile(Config,?BER,[]),
- ?line testChoTypeRefSeq_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoTypeRefSeq:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoTypeRefSeq_cases(?BER)),
-
- ?line testChoTypeRefSeq:compile(Config,?PER,[]),
- ?line testChoTypeRefSeq_cases(?PER),
-
- ?line ?per_bit_opt(testChoTypeRefSeq:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoTypeRefSeq_cases(?PER)),
-
- ?line ?uper_bin(testChoTypeRefSeq:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoTypeRefSeq_cases(uper_bin)),
-
- ?line testChoTypeRefSeq:compile(Config,?PER,[optimize]),
- ?line testChoTypeRefSeq_cases(?PER).
-
-testChoTypeRefSeq_cases(Rules) ->
- ?line testChoTypeRefSeq:seq(Rules).
-
-
-
-testChoTypeRefSet(suite) -> [];
-testChoTypeRefSet(Config) ->
-
- ?line testChoTypeRefSet:compile(Config,?BER,[]),
- ?line testChoTypeRefSet_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoTypeRefSet:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoTypeRefSet_cases(?BER)),
-
- ?line testChoTypeRefSet:compile(Config,?PER,[]),
- ?line testChoTypeRefSet_cases(?PER),
-
- ?line ?per_bit_opt(testChoTypeRefSet:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoTypeRefSet_cases(?PER)),
-
- ?line ?uper_bin(testChoTypeRefSet:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoTypeRefSet_cases(uper_bin)),
-
- ?line testChoTypeRefSet:compile(Config,?PER,[optimize]),
- ?line testChoTypeRefSet_cases(?PER).
-
-testChoTypeRefSet_cases(Rules) ->
- ?line testChoTypeRefSet:set(Rules).
-
-
-
-testDef(suite) -> [];
-testDef(Config) ->
-
- ?line testDef:compile(Config,?BER,[]),
- ?line testDef_cases(?BER),
-
- ?line ?ber_driver(?BER,testDef:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testDef_cases(?BER)),
-
- ?line testDef:compile(Config,?PER,[]),
- ?line testDef_cases(?PER),
-
- ?line ?per_bit_opt(testDef:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testDef_cases(?PER)),
-
- ?line ?uper_bin(testDef:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testDef_cases(uper_bin)),
-
- ?line testDef:compile(Config,?PER,[optimize]),
- ?line testDef_cases(?PER).
-
-testDef_cases(Rules) ->
- ?line testDef:main(Rules).
-
-
-
-testOpt(suite) -> [];
-testOpt(Config) ->
-
- ?line testOpt:compile(Config,?BER),
- ?line testOpt_cases(?BER),
-
- ?line testOpt:compile(Config,?PER),
- ?line testOpt_cases(?PER).
-
-testOpt_cases(Rules) ->
- ?line testOpt:main(Rules).
-
-
-testEnumExt(suite) -> [];
-testEnumExt(Config) ->
-
- ?line testEnumExt:compile(Config,?BER,[]),
- ?line testEnumExt:main(?BER),
-
- ?line ?ber_driver(?BER,testEnumExt:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testEnumExt:main(?BER)),
-
- ?line testEnumExt:compile(Config,?PER,[]),
- ?line testEnumExt:main(?PER),
-
- ?line ?per_bit_opt(testEnumExt:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testEnumExt:main(?PER)),
-
- ?line ?uper_bin(testEnumExt:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testEnumExt:main(uper_bin)),
-
- ?line testEnumExt:compile(Config,?PER,[optimize]),
- ?line testEnumExt:main(?PER).
-
-testSeqDefault(doc) -> ["Test of OTP-2523 ENUMERATED with extensionmark."];
-testSeqDefault(suite) -> [];
-testSeqDefault(Config) ->
-
- ?line testSeqDefault:compile(Config,?BER,[]),
- ?line testSeqDefault_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqDefault:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqDefault_cases(?BER)),
-
- ?line testSeqDefault:compile(Config,?PER,[]),
- ?line testSeqDefault_cases(?PER),
-
- ?line ?per_bit_opt(testSeqDefault:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqDefault_cases(?PER)),
-
- ?line ?uper_bin(testSeqDefault:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqDefault_cases(uper_bin)),
-
- ?line testSeqDefault:compile(Config,?PER,[optimize]),
- ?line testSeqDefault_cases(?PER).
-
-testSeqDefault_cases(Rules) ->
- ?line testSeqDefault:main(Rules).
-
-
-
-testSeqExtension(suite) -> [];
-testSeqExtension(Config) ->
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqExtension:compile(Config,?BER,[]),
- ?line testSeqExtension_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqExtension:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqExtension_cases(?BER)).
-
-testSeqExtension_cases(Rules) ->
- ?line testSeqExtension:main(Rules).
-
-
-
-testSeqExternal(suite) -> [];
-testSeqExternal(Config) ->
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqExternal:compile(Config,?BER,[]),
- ?line testSeqExternal_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqExternal_cases(?BER)).
-
-testSeqExternal_cases(Rules) ->
- ?line testSeqExternal:main(Rules).
-
-
-testSeqOptional(suite) -> [];
-testSeqOptional(Config) ->
-
- ?line testSeqOptional:compile(Config,?BER,[]),
- ?line testSeqOptional_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqOptional:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOptional_cases(?BER)),
-
- ?line testSeqOptional:compile(Config,?PER,[]),
- ?line testSeqOptional_cases(?PER),
-
- ?line ?per_bit_opt(testSeqOptional:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOptional_cases(?PER)),
-
- ?line ?uper_bin(testSeqOptional:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOptional_cases(uper_bin)),
-
- ?line testSeqOptional:compile(Config,?PER,[optimize]),
- ?line testSeqOptional_cases(?PER).
-
-testSeqOptional_cases(Rules) ->
- ?line testSeqOptional:main(Rules).
-
-
-
-testSeqPrim(suite) -> [];
-testSeqPrim(Config) ->
-
- ?line testSeqPrim:compile(Config,?BER,[]),
- ?line testSeqPrim_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqPrim_cases(?BER)),
-
- ?line testSeqPrim:compile(Config,?PER,[]),
- ?line testSeqPrim_cases(?PER),
-
- ?line ?per_bit_opt(testSeqPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqPrim_cases(?PER)),
-
- ?line ?uper_bin(testSeqPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqPrim_cases(uper_bin)),
-
- ?line testSeqPrim:compile(Config,?PER,[optimize]),
- ?line testSeqPrim_cases(?PER).
-
-testSeqPrim_cases(Rules) ->
- ?line testSeqPrim:main(Rules).
-
-
-testSeq2738(doc) -> ["Test of OTP-2738 Detect corrupt optional component."];
-testSeq2738(suite) -> [];
-testSeq2738(Config) ->
-
- ?line testSeq2738:compile(Config,?BER,[]),
- ?line testSeq2738_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeq2738:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeq2738_cases(?BER)),
-
- ?line testSeq2738:compile(Config,?PER,[]),
- ?line testSeq2738_cases(?PER),
-
- ?line ?per_bit_opt(testSeq2738:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeq2738_cases(?PER)),
-
- ?line ?uper_bin(testSeq2738:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeq2738_cases(uper_bin)),
-
- ?line testSeq2738:compile(Config,?PER,[optimize]),
- ?line testSeq2738_cases(?PER).
-
-testSeq2738_cases(Rules) ->
- ?line testSeq2738:main(Rules).
-
-
-testSeqTag(suite) -> [];
-testSeqTag(Config) ->
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqTag:compile(Config,?BER,[]),
- ?line testSeqTag_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTag_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSeqTag:compile(Config,?PER,[]),
- ?line testSeqTag_cases(?PER),
-
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTag_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTag_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSeqTag:compile(Config,?PER,[optimize]),
- ?line testSeqTag_cases(?PER).
-
-testSeqTag_cases(Rules) ->
- ?line testSeqTag:main(Rules).
-
-
-
-
-testSeqTypeRefCho(suite) -> [];
-testSeqTypeRefCho(Config) ->
-
- ?line testSeqTypeRefCho:compile(Config,?BER,[]),
- ?line testSeqTypeRefCho_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqTypeRefCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTypeRefCho_cases(?BER)),
-
- ?line testSeqTypeRefCho:compile(Config,?PER,[]),
- ?line testSeqTypeRefCho_cases(?PER),
-
- ?line ?per_bit_opt(testSeqTypeRefCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTypeRefCho_cases(?PER)),
-
- ?line ?uper_bin(testSeqTypeRefCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTypeRefCho_cases(uper_bin)),
-
- ?line testSeqTypeRefCho:compile(Config,?PER,[optimize]),
- ?line testSeqTypeRefCho_cases(?PER).
-
-testSeqTypeRefCho_cases(Rules) ->
- ?line testSeqTypeRefCho:main(Rules).
-
-
-
-testSeqTypeRefPrim(suite) -> [];
-testSeqTypeRefPrim(Config) ->
-
- ?line testSeqTypeRefPrim:compile(Config,?BER,[]),
- ?line testSeqTypeRefPrim_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqTypeRefPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTypeRefPrim_cases(?BER)),
-
- ?line testSeqTypeRefPrim:compile(Config,?PER,[]),
- ?line testSeqTypeRefPrim_cases(?PER),
-
- ?line ?per_bit_opt(testSeqTypeRefPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTypeRefPrim_cases(?PER)),
-
- ?line ?uper_bin(testSeqTypeRefPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTypeRefPrim_cases(uper_bin)),
-
- ?line testSeqTypeRefPrim:compile(Config,?PER,[optimize]),
- ?line testSeqTypeRefPrim_cases(?PER).
-
-testSeqTypeRefPrim_cases(Rules) ->
- ?line testSeqTypeRefPrim:main(Rules).
-
-
-
-testSeqTypeRefSeq(suite) -> [];
-testSeqTypeRefSeq(Config) ->
-
- ?line testSeqTypeRefSeq:compile(Config,?BER,[]),
- ?line testSeqTypeRefSeq_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqTypeRefSeq:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTypeRefSeq_cases(?BER)),
-
- ?line testSeqTypeRefSeq:compile(Config,?PER,[]),
- ?line testSeqTypeRefSeq_cases(?PER),
-
- ?line ?per_bit_opt(testSeqTypeRefSeq:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTypeRefSeq_cases(?PER)),
-
- ?line ?uper_bin(testSeqTypeRefSeq:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTypeRefSeq_cases(uper_bin)),
-
- ?line testSeqTypeRefSeq:compile(Config,?PER,[optimize]),
- ?line testSeqTypeRefSeq_cases(?PER).
-
-testSeqTypeRefSeq_cases(Rules) ->
- ?line testSeqTypeRefSeq:main(Rules).
-
-
-
-testSeqTypeRefSet(suite) -> [];
-testSeqTypeRefSet(Config) ->
-
- ?line testSeqTypeRefSet:compile(Config,?BER,[]),
- ?line testSeqTypeRefSet_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqTypeRefSet:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTypeRefSet_cases(?BER)),
-
- ?line testSeqTypeRefSet:compile(Config,?PER,[]),
- ?line testSeqTypeRefSet_cases(?PER),
-
- ?line ?per_bit_opt(testSeqTypeRefSet:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTypeRefSet_cases(?PER)),
-
- ?line ?uper_bin(testSeqTypeRefSet:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTypeRefSet_cases(uper_bin)),
-
- ?line testSeqTypeRefSet:compile(Config,?PER,[optimize]),
- ?line testSeqTypeRefSet_cases(?PER).
-
-testSeqTypeRefSet_cases(Rules) ->
- ?line testSeqTypeRefSet:main(Rules).
-
-
-
-
-testSeqOf(suite) -> [];
-testSeqOf(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSeqOf:compile(Config,?BER,[]),
- ?line testSeqOf_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqOf:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOf_cases(?BER)),
-
- ?line testSeqOf:compile(Config,?PER,[]),
- ?line testSeqOf_cases(?PER),
-
- ?line ?per_bit_opt(testSeqOf:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOf_cases(?PER)),
-
- ?line ?uper_bin(testSeqOf:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOf_cases(uper_bin)),
-
- ?line testSeqOf:compile(Config,?PER,[optimize]),
- ?line testSeqOf_cases(?PER).
-
-testSeqOf_cases(Rules) ->
- ?line testSeqOf:main(Rules).
-
-
-
-
-testSeqOfCho(suite) -> [];
-testSeqOfCho(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSeqOfCho:compile(Config,?BER,[]),
- ?line testSeqOfCho_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqOfCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfCho_cases(?BER)),
-
- ?line testSeqOfCho:compile(Config,?PER,[]),
- ?line testSeqOfCho_cases(?PER),
-
- ?line ?per_bit_opt(testSeqOfCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfCho_cases(?PER)),
-
- ?line ?uper_bin(testSeqOfCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfCho_cases(uper_bin)),
-
- ?line testSeqOfCho:compile(Config,?PER,[optimize]),
- ?line testSeqOfCho_cases(?PER).
-
-testSeqOfIndefinite(suite) -> [];
-testSeqOfIndefinite(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSeqOfIndefinite:compile(Config,?BER,[]),
- ?line testSeqOfIndefinite:main(),
-
- ?line ?ber_driver(?BER,testSeqOfIndefinite:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfIndefinite:main()).
-
-testSeqOfCho_cases(Rules) ->
- ?line testSeqOfCho:main(Rules).
-
-
-testSeqOfExternal(suite) -> [];
-testSeqOfExternal(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqOfExternal:compile(Config,?BER,[]),
- ?line testSeqOfExternal_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfExternal_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSeqOfExternal:compile(Config,?PER,[]),
- ?line testSeqOfExternal_cases(?PER),
-
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfExternal_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfExternal_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSeqOfExternal:compile(Config,?PER,[optimize]),
- ?line testSeqOfExternal_cases(?PER).
-
-testSeqOfExternal_cases(Rules) ->
- ?line testSeqOfExternal:main(Rules).
-
-
-
-testSeqOfTag(suite) -> [];
-testSeqOfTag(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqOfTag:compile(Config,?BER,[]),
- ?line testSeqOfTag_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfTag_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSeqOfTag:compile(Config,?PER,[]),
- ?line testSeqOfTag_cases(?PER),
-
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfTag_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfTag_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSeqOfTag:compile(Config,?PER,[optimize]),
- ?line testSeqOfTag_cases(?PER).
-
-testSeqOfTag_cases(Rules) ->
- ?line testSeqOfTag:main(Rules).
-
-
-
-
-testSetDefault(suite) -> [];
-testSetDefault(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetDefault:compile(Config,?BER,[]),
- ?line testSetDefault_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetDefault:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetDefault_cases(?BER)),
-
- ?line testSetDefault:compile(Config,?PER,[]),
- ?line testSetDefault_cases(?PER),
-
- ?line ?per_bit_opt(testSetDefault:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetDefault_cases(?PER)),
-
- ?line ?uper_bin(testSetDefault:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetDefault_cases(uper_bin)),
-
- ?line testSetDefault:compile(Config,?PER,[optimize]),
- ?line testSetDefault_cases(?PER).
-
-testSetDefault_cases(Rules) ->
- ?line testSetDefault:main(Rules).
-
-
-testParamBasic(suite) -> [];
-testParamBasic(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testParamBasic:compile(Config,?BER,[]),
- ?line testParamBasic_cases(?BER),
-
- ?line ?ber_driver(?BER,testParamBasic:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testParamBasic_cases(?BER)),
-
- ?line testParamBasic:compile(Config,?PER,[]),
- ?line testParamBasic_cases(?PER),
-
- ?line ?per_bit_opt(testParamBasic:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testParamBasic_cases(?PER)),
-
- ?line ?uper_bin(testParamBasic:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testParamBasic_cases(uper_bin)),
-
- ?line testParamBasic:compile(Config,?PER,[optimize]),
- ?line testParamBasic_cases(?PER).
-
-
-testParamBasic_cases(Rules) ->
- ?line testParamBasic:main(Rules).
-
-testSetExtension(suite) -> [];
-testSetExtension(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetExtension:compile(Config,?BER,[]),
- ?line testSetExtension_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetExtension:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetExtension_cases(?BER)).
-
-testSetExtension_cases(Rules) ->
- ?line testSetExtension:main(Rules).
-
-
-testSetExternal(suite) -> [];
-testSetExternal(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetExternal:compile(Config,?BER,[]),
- ?line testSetExternal_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetExternal_cases(?BER)).
-
-testSetExternal_cases(Rules) ->
- ?line testSetExternal:main(Rules).
-
-
-testSetOptional(suite) -> [];
-testSetOptional(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetOptional:compile(Config,?BER,[]),
- ?line testSetOptional_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetOptional:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOptional_cases(?BER)),
-
- ?line testSetOptional:compile(Config,?PER,[]),
- ?line testSetOptional_cases(?PER),
-
- ?line ?per_bit_opt(testSetOptional:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOptional_cases(?PER)),
-
- ?line ?uper_bin(testSetOptional:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOptional_cases(uper_bin)),
-
- ?line testSetOptional:compile(Config,?PER,[optimize]),
- ?line testSetOptional_cases(?PER).
-
-testSetOptional_cases(Rules) ->
- ?line ok = testSetOptional:ticket_7533(Rules),
- ?line ok = testSetOptional:main(Rules).
-
-
-
-
-testSetPrim(suite) -> [];
-testSetPrim(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetPrim:compile(Config,?BER,[]),
- ?line testSetPrim_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetPrim_cases(?BER)),
-
- ?line testSetPrim:compile(Config,?PER,[]),
- ?line testSetPrim_cases(?PER),
-
- ?line ?per_bit_opt(testSetPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetPrim_cases(?PER)),
-
- ?line ?uper_bin(testSetPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetPrim_cases(uper_bin)),
-
- ?line testSetPrim:compile(Config,?PER,[optimize]),
- ?line testSetPrim_cases(?PER).
-
-testSetPrim_cases(Rules) ->
- ?line testSetPrim:main(Rules).
-
-
-
-testSetTag(suite) -> [];
-testSetTag(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetTag:compile(Config,?BER,[]),
- ?line testSetTag_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTag_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSetTag:compile(Config,?PER,[]),
- ?line testSetTag_cases(?PER),
-
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTag_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTag_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSetTag:compile(Config,?PER,[optimize]),
- ?line testSetTag_cases(?PER).
-
-testSetTag_cases(Rules) ->
- ?line testSetTag:main(Rules).
-
-
-
-testSetTypeRefCho(suite) -> [];
-testSetTypeRefCho(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetTypeRefCho:compile(Config,?BER,[]),
- ?line testSetTypeRefCho_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetTypeRefCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTypeRefCho_cases(?BER)),
-
- ?line testSetTypeRefCho:compile(Config,?PER,[]),
- ?line testSetTypeRefCho_cases(?PER),
-
- ?line ?per_bit_opt(testSetTypeRefCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTypeRefCho_cases(?PER)),
-
- ?line ?uper_bin(testSetTypeRefCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTypeRefCho_cases(uper_bin)),
-
- ?line testSetTypeRefCho:compile(Config,?PER,[optimize]),
- ?line testSetTypeRefCho_cases(?PER).
-
-testSetTypeRefCho_cases(Rules) ->
- ?line testSetTypeRefCho:main(Rules).
-
-
-
-testSetTypeRefPrim(suite) -> [];
-testSetTypeRefPrim(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetTypeRefPrim:compile(Config,?BER,[]),
- ?line testSetTypeRefPrim_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetTypeRefPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTypeRefPrim_cases(?BER)),
-
- ?line testSetTypeRefPrim:compile(Config,?PER,[]),
- ?line testSetTypeRefPrim_cases(?PER),
-
- ?line ?per_bit_opt(testSetTypeRefPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTypeRefPrim_cases(?PER)),
-
- ?line ?uper_bin(testSetTypeRefPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTypeRefPrim_cases(uper_bin)),
-
- ?line testSetTypeRefPrim:compile(Config,?PER,[optimize]),
- ?line testSetTypeRefPrim_cases(?PER).
-
-testSetTypeRefPrim_cases(Rules) ->
- ?line testSetTypeRefPrim:main(Rules).
-
-
-
-testSetTypeRefSeq(suite) -> [];
-testSetTypeRefSeq(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetTypeRefSeq:compile(Config,?BER,[]),
- ?line testSetTypeRefSeq_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetTypeRefSeq:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTypeRefSeq_cases(?BER)),
-
- ?line testSetTypeRefSeq:compile(Config,?PER,[]),
- ?line testSetTypeRefSeq_cases(?PER),
-
- ?line ?per_bit_opt(testSetTypeRefSeq:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTypeRefSeq_cases(?PER)),
-
- ?line ?uper_bin(testSetTypeRefSeq:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTypeRefSeq_cases(uper_bin)),
-
- ?line testSetTypeRefSeq:compile(Config,?PER,[optimize]),
- ?line testSetTypeRefSeq_cases(?PER).
-
-testSetTypeRefSeq_cases(Rules) ->
- ?line testSetTypeRefSeq:main(Rules).
-
-
-
-testSetTypeRefSet(suite) -> [];
-testSetTypeRefSet(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetTypeRefSet:compile(Config,?BER,[]),
- ?line testSetTypeRefSet_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetTypeRefSet:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTypeRefSet_cases(?BER)),
-
- ?line testSetTypeRefSet:compile(Config,?PER,[]),
- ?line testSetTypeRefSet_cases(?PER),
-
- ?line ?per_bit_opt(testSetTypeRefSet:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTypeRefSet_cases(?PER)),
-
- ?line ?uper_bin(testSetTypeRefSet:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTypeRefSet_cases(uper_bin)),
-
- ?line testSetTypeRefSet:compile(Config,?PER,[optimize]),
- ?line testSetTypeRefSet_cases(?PER).
-
-testSetTypeRefSet_cases(Rules) ->
- ?line testSetTypeRefSet:main(Rules).
-
-
-
-testSetOf(suite) -> [];
-testSetOf(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetOf:compile(Config,?BER,[]),
- ?line testSetOf_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetOf:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOf_cases(?BER)),
-
- ?line testSetOf:compile(Config,?PER,[]),
- ?line testSetOf_cases(?PER),
-
- ?line ?per_bit_opt(testSetOf:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOf_cases(?PER)),
-
- ?line ?uper_bin(testSetOf:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOf_cases(uper_bin)),
-
- ?line testSetOf:compile(Config,?PER,[optimize]),
- ?line testSetOf_cases(?PER).
-
-testSetOf_cases(Rules) ->
- ?line testSetOf:main(Rules).
-
-
-
-testSetOfCho(suite) -> [];
-testSetOfCho(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetOfCho:compile(Config,?BER,[]),
- ?line testSetOfCho_cases(?BER),
-
- ?line ?ber_driver(?BER,testSetOfCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfCho_cases(?BER)),
-
- ?line testSetOfCho:compile(Config,?PER,[]),
- ?line testSetOfCho_cases(?PER),
-
- ?line ?per_bit_opt(testSetOfCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfCho_cases(?PER)),
-
- ?line ?uper_bin(testSetOfCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfCho_cases(uper_bin)),
-
- ?line testSetOfCho:compile(Config,?PER,[optimize]),
- ?line testSetOfCho_cases(?PER).
-
-testSetOfCho_cases(Rules) ->
- ?line testSetOfCho:main(Rules).
-
-
-testSetOfExternal(suite) -> [];
-testSetOfExternal(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetOfExternal:compile(Config,?BER,[]),
- ?line testSetOfExternal_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfExternal_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSetOfExternal:compile(Config,?PER,[]),
- ?line testSetOfExternal_cases(?PER),
-
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfExternal_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfExternal_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSetOfExternal:compile(Config,?PER,[optimize]),
- ?line testSetOfExternal_cases(?PER).
-
-testSetOfExternal_cases(Rules) ->
- ?line testSetOfExternal:main(Rules).
-
-
-
-
-testSetOfTag(suite) -> [];
-testSetOfTag(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetOfTag:compile(Config,?BER,[]),
- ?line testSetOfTag_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfTag_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSetOfTag:compile(Config,?PER,[]),
- ?line testSetOfTag_cases(?PER),
-
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfTag_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfTag_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSetOfTag:compile(Config,?PER,[optimize]),
- ?line testSetOfTag_cases(?PER).
-
-testSetOfTag_cases(Rules) ->
- ?line testSetOfTag:main(Rules).
-
-
-sequence(suite) -> [{sequence,all}].
-
-c_syntax(suite) -> [];
-c_syntax(Config) ->
- ?line DataDir% ?line testExternal:compile(Config,?PER),
-% ?line testPrimExternal:compile(Config,?PER),
-% ?line testPrimExternal_cases(?PER).
- = ?config(data_dir,Config),
- ?line _TempDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line {error,_R1} = asn1ct:compile(filename:join(DataDir,"Syntax")),
- ?line {error,_R2} = asn1ct:compile(filename:join(DataDir,"BadTypeEnding")),
- ?line {error,_R3} = asn1ct:compile(filename:join(DataDir,
- "BadValueAssignment1")),
- ?line {error,_R4} = asn1ct:compile(filename:join(DataDir,
- "BadValueAssignment2")),
- ?line {error,_R5} = asn1ct:compile(filename:join(DataDir,
- "BadValueSet")),
- ?line {error,_R6} = asn1ct:compile(filename:join(DataDir,
- "ChoiceBadExtension")),
- ?line {error,_R7} = asn1ct:compile(filename:join(DataDir,
- "EnumerationBadExtension")),
- ?line {error,_R8} = asn1ct:compile(filename:join(DataDir,
- "Example")),
- ?line {error,_R9} = asn1ct:compile(filename:join(DataDir,
- "Export1")),
- ?line {error,_R10} = asn1ct:compile(filename:join(DataDir,
- "MissingEnd")),
- ?line {error,_R11} = asn1ct:compile(filename:join(DataDir,
- "SequenceBadComma")),
- ?line {error,_R12} = asn1ct:compile(filename:join(DataDir,
- "SequenceBadComponentName")),
- ?line {error,_R13} = asn1ct:compile(filename:join(DataDir,
- "SequenceBadComponentType")),
- ?line {error,_R14} = asn1ct:compile(filename:join(DataDir,
- "SeqBadComma")).
-
-
-c_string_per(suite) -> [];
-c_string_per(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line TempDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"String"),[?PER,{outdir,TempDir}]).
-
-c_string_ber(suite) -> [];
-c_string_ber(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line TempDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"String"),[?BER,{outdir,TempDir}]).
-
-
-c_implicit_before_choice(suite) -> [];
-c_implicit_before_choice(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line TempDir = ?config(priv_dir,Config),
- ?line {error,_R2} = asn1ct:compile(filename:join(DataDir,"CCSNARG3"),[?BER,{outdir,TempDir}]).
-
-parse(suite) -> [];
-parse(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- M1 = test_modules(),
-% M2 = parse_modules(),
- ?line ok = parse1(M1,DataDir,OutDir).
-
-parse1([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[abs,{outdir,OutDir}]),
- parse1(T,DataDir,OutDir);
-parse1([],_,_) ->
- ok.
-
-per(suite) -> [];
-per(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = per1(per_modules(),DataDir,OutDir),
- ?line ?per_bit_opt(per1_bit_opt(per_modules(),DataDir,OutDir)),
- ?line ok = per1_opt(per_modules(),DataDir,OutDir).
-
-
-per1([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[?PER,{outdir,OutDir}]),
- ?line ok = asn1ct:test(list_to_atom(M)),
- per1(T,DataDir,OutDir);
-per1([],_,_) ->
- ok.
-
-per1_bit_opt([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[?PER,optimize,{outdir,OutDir}]),
- ?line ok = asn1ct:test(list_to_atom(M)),
- per1_bit_opt(T,DataDir,OutDir);
-per1_bit_opt([],_,_) ->
- ok.
-
-per1_opt([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[?PER,optimized,{outdir,OutDir}]),
- ?line ok = asn1ct:test(list_to_atom(M)),
- per1_opt(T,DataDir,OutDir);
-per1_opt([],_,_) ->
- ok.
-
-ber_choiceinseq(suite) ->[];
-ber_choiceinseq(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"ChoiceInSeq"),[?BER,{outdir,OutDir}]).
-
-ber_optional(suite) ->[];
-ber_optional(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"SOpttest"),[?BER,{outdir,OutDir}]),
- ?line V = {'S',{'A',10,asn1_NOVALUE,asn1_NOVALUE},
- {'B',asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
- {'C',asn1_NOVALUE,111,asn1_NOVALUE}},
- ?line {ok,B} = asn1_wrapper:encode('SOpttest','S',V),
- ?line Bytes = lists:flatten(B),
- ?line V2 = asn1_wrapper:decode('SOpttest','S',Bytes),
- ?line ok = eq(V,element(2,V2)).
-
-ber_optional_keyed_list(suite) ->[];
-ber_optional_keyed_list(Config) ->
- case ?BER of
- ber_bin_v2 -> ok;
- _ ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"SOpttest"),
- [?BER,keyed_list,{outdir,OutDir}]),
- ?line Vrecord = {'S',{'A',10,asn1_NOVALUE,asn1_NOVALUE},
- {'B',asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
- {'C',asn1_NOVALUE,111,asn1_NOVALUE}},
- ?line V = [ {a,[{scriptKey,10}]},
- {b,[]},
- {c,[{callingPartysCategory,111}]} ],
- ?line {ok,B} = asn1_wrapper:encode('SOpttest','S',V),
- ?line Bytes = lists:flatten(B),
- ?line V2 = asn1_wrapper:decode('SOpttest','S',Bytes),
- ?line ok = eq(Vrecord,element(2,V2))
- end.
-
-
-eq(V,V) ->
- ok.
-
-
-ber_other(suite) ->[];
-ber_other(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = ber1(ber_modules(),DataDir,OutDir).
-
-
-ber1([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[?BER,{outdir,OutDir}]),
- ?line ok = asn1ct:test(list_to_atom(M)),
- ber1(T,DataDir,OutDir);
-ber1([],_,_) ->
- ok.
-
-default_per(suite) ->[];
-default_per(Config) ->
- default1(?PER,Config,[]).
-
-default_per_opt(suite) -> [];
-default_per_opt(Config) ->
- ?per_bit_opt(default1(?PER,Config,[optimize])),
- default1(?PER,Config,[optimize]).
-
-default_ber(suite) ->[];
-default_ber(Config) ->
- default1(?BER,Config,[]).
-
-default1(Rule,Config,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Def",[Rule,{outdir,OutDir}]++Options),
- ?line {ok,Bytes1} = asn1_wrapper:encode('Def','Def1',#'Def1'{bool0 = true,
- bool1 = true,
- bool2 = true,
- bool3 = true}),
- ?line {ok,{'Def1',true,true,true,true}} = asn1_wrapper:decode('Def','Def1',lists:flatten(Bytes1)),
-
- ?line {ok,Bytes2} = asn1_wrapper:encode('Def','Def1',#'Def1'{bool0 = true}),
- ?line {ok,{'Def1',true,false,false,false}} = asn1_wrapper:decode('Def','Def1',lists:flatten(Bytes2)),
-
- ?line {ok,Bytes3} = asn1_wrapper:encode('Def','Def1',#'Def1'{bool0 = true,bool2=false}),
- ?line {ok,{'Def1',true,false,false,false}} = asn1_wrapper:decode('Def','Def1',lists:flatten(Bytes3)).
-
-
-value_test(suite) ->[];
-value_test(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ObjIdValues",[?BER,{outdir,OutDir}]),
- ?line {ok,_} = asn1_wrapper:encode('ObjIdValues','ObjIdType','ObjIdValues':'mobileDomainId'()),
- ?line ok = asn1ct:compile(DataDir ++ "ObjIdValues",[?PER,{outdir,OutDir}]),
- ?line {ok,_} = asn1_wrapper:encode('ObjIdValues','ObjIdType','ObjIdValues':'mobileDomainId'()),
- ?line ok = test_bad_values:tests(Config),
- ok.
-
-
-constructed(suite) ->
- [];
-constructed(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Constructed",[?BER,{outdir,OutDir}]),
- ?line {ok,B} = asn1_wrapper:encode('Constructed','S',{'S',false}),
- ?line [40,3,1,1,0] = lists:flatten(B),
- ?line {ok,B1} = asn1_wrapper:encode('Constructed','S2',{'S2',false}),
- ?line [40,5,48,3,1,1,0] = lists:flatten(B1),
- ?line {ok,B2} = asn1_wrapper:encode('Constructed','I',10),
- ?line [136,1,10] = lists:flatten(B2),
- ok.
-
-ber_decode_error(suite) -> [];
-ber_decode_error(Config) ->
- ?line ok = ber_decode_error:compile(Config,?BER,[]),
- ?line ok = ber_decode_error:run([]),
-
- ?line ok = ?ber_driver(?BER,ber_decode_error:compile(Config,?BER,[driver])),
- ?line ok = ?ber_driver(?BER,ber_decode_error:run([driver])),
- ok.
-
-h323test(suite) ->
- [];
-h323test(Config) ->
- ?line ok = h323test:compile(Config,?PER,[]),
- ?line ok = h323test:run(?PER),
- ?line ?per_bit_opt(h323test:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(h323test:run(?PER)),
- ?line ?uper_bin(h323test:compile(Config,uper_bin,[])),
- ?line ?uper_bin(h323test:run(uper_bin)),
- ?line ok = h323test:compile(Config,?PER,[optimize]),
- ?line ok = h323test:run(?PER),
- ok.
-
-per_GeneralString(suite) ->
- [];
-per_GeneralString(Config) ->
- case erlang:module_loaded('MULTIMEDIA-SYSTEM-CONTROL') of
- true ->
- ok;
- false ->
- h323test:compile(Config,?PER,[])
- end,
- UI = [109,64,1,57],
- ?line {ok,_V} = asn1_wrapper:decode('MULTIMEDIA-SYSTEM-CONTROL',
- 'MultimediaSystemControlMessage',UI).
-
-per_open_type(suite) ->
- [];
-per_open_type(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line ok = asn1ct:compile(DataDir ++ "OpenType",[?PER,{outdir,OutDir}]),
- Stype = {'Stype',10,true},
- ?line {ok,Bytes} = asn1_wrapper:encode('OpenType','Ot',Stype),
- ?line {ok,Stype} = asn1_wrapper:decode('OpenType','Ot',Bytes),
-
- ?line ?per_bit_opt(ok = asn1ct:compile(DataDir ++ "OpenType",
- [?PER,optimize,{outdir,OutDir}])),
- ?line ?per_bit_opt({ok,Bytes}=asn1_wrapper:encode('OpenType','Ot',Stype)),
- ?line ?per_bit_opt({ok,Stype}=asn1_wrapper:decode('OpenType','Ot',Bytes)),
-
- ?line ?uper_bin(ok = asn1ct:compile(DataDir ++ "OpenType",
- [uper_bin,{outdir,OutDir}])),
- ?line ?uper_bin({ok,Bytes}=asn1_wrapper:encode('OpenType','Ot',Stype)),
- ?line ?uper_bin({ok,Stype}=asn1_wrapper:decode('OpenType','Ot',Bytes)),
-
- ?line ok = asn1ct:compile(DataDir ++ "OpenType",
- [?PER,optimize,{outdir,OutDir}]),
- ?line {ok,Bytes} = asn1_wrapper:encode('OpenType','Ot',Stype),
- ?line {ok,Stype} = asn1_wrapper:decode('OpenType','Ot',Bytes).
-
-testConstraints(suite) ->
- [];
-testConstraints(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testConstraints:compile(Config,?BER,[]),
- ?line testConstraints:int_constraints(?BER),
-
- ?line ?ber_driver(?BER,testConstraints:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testConstraints:int_constraints(?BER)),
-
- ?line testConstraints:compile(Config,?PER,[]),
- ?line testConstraints:int_constraints(?PER),
- ?line testConstraints:refed_NNL_name(?PER),
-
- ?line ?per_bit_opt(testConstraints:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testConstraints:int_constraints(?PER)),
- ?line ?per_bit_opt(testConstraints:refed_NNL_name(?PER)),
-
- ?line ?uper_bin(testConstraints:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testConstraints:int_constraints(uper_bin)),
- ?line ?uper_bin(testConstraints:refed_NNL_name(uper_bin)),
-
- ?line testConstraints:compile(Config,?PER,[optimize]),
- ?line testConstraints:int_constraints(?PER),
- ?line testConstraints:refed_NNL_name(?PER).
-
-testSeqIndefinite(suite) -> [];
-testSeqIndefinite(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSeqIndefinite:compile(Config,?BER,[]),
- ?line testSeqIndefinite:main(?BER),
-
- ?line ?ber_driver(?BER,testSeqIndefinite:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqIndefinite:main(?BER)).
-
-testSetIndefinite(suite) -> [];
-testSetIndefinite(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetIndefinite:compile(Config,?BER,[]),
- ?line testSetIndefinite:main(?BER),
-
- ?line ?ber_driver(?BER,testSetIndefinite:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetIndefinite:main(?BER)).
-
-testChoiceIndefinite(suite) -> [];
-testChoiceIndefinite(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testChoiceIndefinite:compile(Config,?BER,[]),
- ?line testChoiceIndefinite:main(?BER),
-
- ?line ?ber_driver(?BER,testChoiceIndefinite:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoiceIndefinite:main(?BER)).
-
-testInfObjectClass(suite) ->
- [];
-testInfObjectClass(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testInfObjectClass:compile(Config,?PER,[]),
- ?line testInfObjectClass:main(?PER),
- ?line testInfObj:compile(Config,?PER,[]),
- ?line testInfObj:main(?PER),
-
- ?line ?per_bit_opt(testInfObjectClass:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testInfObjectClass:main(?PER)),
- ?line ?per_bit_opt(testInfObj:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testInfObj:main(?PER)),
-
- ?line ?uper_bin(testInfObjectClass:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testInfObjectClass:main(uper_bin)),
- ?line ?uper_bin(testInfObj:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testInfObj:main(uper_bin)),
-
- ?line testInfObjectClass:compile(Config,?PER,[optimize]),
- ?line testInfObjectClass:main(?PER),
- ?line testInfObj:compile(Config,?PER,[optimize]),
- ?line testInfObj:main(?PER),
-
- ?line testInfObjectClass:compile(Config,?BER,[]),
- ?line testInfObjectClass:main(?BER),
- ?line testInfObj:compile(Config,?BER,[]),
- ?line testInfObj:main(?BER),
-
- ?line ?ber_driver(?BER,testInfObjectClass:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testInfObjectClass:main(?BER)),
- ?line ?ber_driver(?BER,testInfObj:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testInfObj:main(?BER)),
-
- ?line testInfObj:compile_RANAPfiles(Config,?PER,[]),
-
- ?line ?per_bit_opt(testInfObj:compile_RANAPfiles(Config,?PER,[optimize])),
-
- ?line ?uper_bin(testInfObj:compile_RANAPfiles(Config,uper_bin,[])),
-
- ?line testInfObj:compile_RANAPfiles(Config,?PER,[optimize]),
-
- ?line testInfObj:compile_RANAPfiles(Config,?BER,[]).
-
-testParameterizedInfObj(suite) ->
- [];
-testParameterizedInfObj(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testParameterizedInfObj:compile(Config,?PER,[]),
- ?line testParameterizedInfObj:main(?PER),
-
- ?line ?per_bit_opt(testParameterizedInfObj:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testParameterizedInfObj:main(?PER)),
-
- ?line ?uper_bin(testParameterizedInfObj:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testParameterizedInfObj:main(uper_bin)),
-
- ?line testParameterizedInfObj:compile(Config,?PER,[optimize]),
- ?line testParameterizedInfObj:main(?PER),
-
- ?line testParameterizedInfObj:compile(Config,?BER,[]),
- ?line testParameterizedInfObj:main(?BER),
-
- ?line ?ber_driver(?BER,testParameterizedInfObj:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testParameterizedInfObj:main(?BER)).
-
-testMergeCompile(suite) ->
- [];
-testMergeCompile(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testMergeCompile:compile(Config,?PER,[]),
- ?line testMergeCompile:main(?PER),
- ?line testMergeCompile:mvrasn(?PER),
-
- ?line ?per_bit_opt(testMergeCompile:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testMergeCompile:main(?PER)),
- ?line ?per_bit_opt(testMergeCompile:mvrasn(?PER)),
-
- ?line ?uper_bin(testMergeCompile:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testMergeCompile:main(uper_bin)),
- ?line ?uper_bin(testMergeCompile:mvrasn(uper_bin)),
-
- ?line testMergeCompile:compile(Config,?BER,[]),
- ?line testMergeCompile:main(?BER),
- ?line testMergeCompile:mvrasn(?BER),
-
- ?line ?ber_driver(?BER,testMergeCompile:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testMergeCompile:main(?BER)),
- ?line ?ber_driver(?BER,testMergeCompile:mvrasn(?BER)).
-
-testobj(suite) ->
- [];
-testobj(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = testRANAP:compile(Config,?PER,[]),
- ?line ok = testRANAP:testobj(?PER),
- ?line ok = testParameterizedInfObj:ranap(?PER),
-
- ?line ?per_bit_opt(ok = testRANAP:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(ok = testRANAP:testobj(?PER)),
- ?line ?per_bit_opt(ok = testParameterizedInfObj:ranap(?PER)),
-
- ?line ?uper_bin(ok = testRANAP:compile(Config,uper_bin,[])),
- ?line ?uper_bin(ok = testRANAP:testobj(uper_bin)),
- ?line ?uper_bin(ok = testParameterizedInfObj:ranap(uper_bin)),
-
- ?line ok = testRANAP:compile(Config,?PER,[optimize]),
- ?line ok = testRANAP:testobj(?PER),
- ?line ok = testParameterizedInfObj:ranap(?PER),
-
- ?line ok = testRANAP:compile(Config,?BER,[]),
- ?line ok = testRANAP:testobj(?BER),
- ?line ok = testParameterizedInfObj:ranap(?BER),
-
- ?line ?ber_driver(?BER,testRANAP:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testRANAP:testobj(?BER)),
- ?line ?ber_driver(?BER,testParameterizedInfObj:ranap(?BER)).
-
-
-testDeepTConstr(suite) ->
- [];
-testDeepTConstr(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testDeepTConstr:compile(Config,?PER,[]),
- ?line testDeepTConstr:main(?PER),
-
- ?line ?per_bit_opt(testDeepTConstr:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testDeepTConstr:main(?PER)),
-
- ?line ?uper_bin(testDeepTConstr:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testDeepTConstr:main(uper_bin)),
-
- ?line testDeepTConstr:compile(Config,?PER,[optimize]),
- ?line testDeepTConstr:main(?PER),
-
- ?line testDeepTConstr:compile(Config,?BER,[]),
- ?line testDeepTConstr:main(?BER),
-
- ?line ?ber_driver(?BER,testDeepTConstr:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testDeepTConstr:main(?BER)).
-
-testInvokeMod(suite) ->
- [];
-testInvokeMod(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(filename:join(DataDir,"PrimStrings"),[{outdir,OutDir}]),
- ?line {ok,_Result1} = 'PrimStrings':encode('Bs1',[1,0,1,0]),
- ?line ok = asn1ct:compile(filename:join(DataDir,"PrimStrings"),[?PER,{outdir,OutDir}]),
- ?line {ok,_Result2} = 'PrimStrings':encode('Bs1',[1,0,1,0]).
-
-testExport(suite) ->
- [];
-testExport(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line {error,{asn1,_Reason}} = asn1ct:compile(filename:join(DataDir,"IllegalExport"),[{outdir,OutDir}]).
-
-testImport(suite) ->
- [];
-testImport(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line _OutDir = ?config(priv_dir,Config),
- ?line {error,_} = asn1ct:compile(filename:join(DataDir,"ImportsFrom"),[?BER]),
- ok.
-
-testMegaco(suite) ->
- [];
-testMegaco(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
- io:format("Config: ~p~n",[Config]),
- ?line {ok,ModuleName1,ModuleName2} = testMegaco:compile(Config,?BER,[]),
- ?line ok = testMegaco:main(ModuleName1,Config),
- ?line ok = testMegaco:main(ModuleName2,Config),
-
- case ?BER of
- ber_bin_v2 ->
- ?line {ok,ModuleName3,ModuleName4} = testMegaco:compile(Config,?BER,[driver]),
- ?line ok = testMegaco:main(ModuleName3,Config),
- ?line ok = testMegaco:main(ModuleName4,Config);
- _-> ok
- end,
-
- ?line {ok,ModuleName5,ModuleName6} = testMegaco:compile(Config,?PER,[]),
- ?line ok = testMegaco:main(ModuleName5,Config),
- ?line ok = testMegaco:main(ModuleName6,Config),
-
- ?line ?per_bit_opt({ok,ModuleName5,ModuleName6} = testMegaco:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(ok = testMegaco:main(ModuleName5,Config)),
- ?line ?per_bit_opt(ok = testMegaco:main(ModuleName6,Config)),
-
- ?line ?uper_bin({ok,ModuleName5,ModuleName6} = testMegaco:compile(Config,uper_bin,[])),
- ?line ?uper_bin(ok = testMegaco:main(ModuleName5,Config)),
- ?line ?uper_bin(ok = testMegaco:main(ModuleName6,Config)),
-
- ?line {ok,ModuleName7,ModuleName8} = testMegaco:compile(Config,?PER,[optimize]),
- ?line ok = testMegaco:main(ModuleName7,Config),
- ?line ok = testMegaco:main(ModuleName8,Config).
-
-
-testMvrasn6(suite) -> [];
-testMvrasn6(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testMvrasn6:compile(Config,?BER),
- ?line testMvrasn6:main().
-
-testContextSwitchingTypes(suite) -> [];
-testContextSwitchingTypes(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testContextSwitchingTypes:compile(Config,?BER,[]),
- ?line testContextSwitchingTypes:test(),
-
- ?line ?ber_driver(?BER,testContextSwitchingTypes:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testContextSwitchingTypes:test()),
-
- ?line testContextSwitchingTypes:compile(Config,?PER,[]),
- ?line testContextSwitchingTypes:test(),
-
- ?line ?per_bit_opt(testContextSwitchingTypes:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testContextSwitchingTypes:test()),
-
- ?line ?uper_bin(testContextSwitchingTypes:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testContextSwitchingTypes:test()),
-
- ?line testContextSwitchingTypes:compile(Config,?PER,[optimize]),
- ?line testContextSwitchingTypes:test().
-
-testTypeValueNotation(suite) -> [];
-testTypeValueNotation(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- case ?BER of
- Ber when Ber == ber; Ber == ber_bin ->
- ?line testTypeValueNotation:compile(Config,?BER,[]),
- ?line testTypeValueNotation:main(?BER,dummy);
- _ ->
- ok
- end,
-
- ?line ?ber_driver(?BER,testTypeValueNotation:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testTypeValueNotation:main(?BER,optimize)),
-
- case ?BER of
- Ber2 when Ber2 == ber; Ber2 == ber_bin ->
- ?line testTypeValueNotation:compile(Config,?PER,[]),
- ?line testTypeValueNotation:main(?PER,dummy);
- _ ->
- ok
- end,
-
- ?line ?per_bit_opt(testTypeValueNotation:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testTypeValueNotation:main(?PER,optimize)),
-
- ?line ?uper_bin(testTypeValueNotation:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testTypeValueNotation:main(uper_bin,optimize)),
- case ?BER of
- Ber3 when Ber3 == ber; Ber3 == ber_bin ->
- ?line testTypeValueNotation:compile(Config,?PER,[optimize]),
- ?line testTypeValueNotation:main(?PER,optimize);
- _ ->
- ok
- end.
-
-testOpenTypeImplicitTag(suite) -> [];
-testOpenTypeImplicitTag(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testOpenTypeImplicitTag:compile(Config,?BER,[]),
- ?line testOpenTypeImplicitTag:main(?BER),
-
- ?line ?ber_driver(?BER,testOpenTypeImplicitTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testOpenTypeImplicitTag:main(?BER)),
-
- ?line testOpenTypeImplicitTag:compile(Config,?PER,[]),
- ?line testOpenTypeImplicitTag:main(?PER),
-
- ?line ?per_bit_opt(testOpenTypeImplicitTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testOpenTypeImplicitTag:main(?PER)),
-
- ?line ?uper_bin(testOpenTypeImplicitTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testOpenTypeImplicitTag:main(uper_bin)),
-
- ?line testOpenTypeImplicitTag:compile(Config,?PER,[optimize]),
- ?line testOpenTypeImplicitTag:main(?PER).
-
-duplicate_tags(suite) -> [];
-duplicate_tags(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- {error,{asn1,[{error,{type,_,_,'SeqOpt1Imp',{asn1,{duplicates_of_the_tags,_}}}}]}} =
- asn1ct:compile(filename:join(DataDir,"SeqOptional2"),[abs]),
- ok.
-
-rtUI(suite) -> [];
-rtUI(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Prim"),[?BER]),
- ?line {ok,_} = asn1rt:info('Prim'),
-
- ?line ok = asn1ct:compile(filename:join(DataDir,"Prim"),[?PER]),
- ?line {ok,_} = asn1rt:info('Prim').
-
-testROSE(suite) -> [];
-testROSE(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testROSE:compile(Config,?BER,[]),
-
- ?line testROSE:compile(Config,?PER,[]),
- ?line ?per_bit_opt(testROSE:compile(Config,?PER,[optimize])),
- ?line ?uper_bin(testROSE:compile(Config,uper_bin,[])),
- ?line testROSE:compile(Config,?PER,[optimize]).
-
-testINSTANCE_OF(suite) -> [];
-testINSTANCE_OF(Config) ->
- ?line testINSTANCE_OF:compile(Config,?BER,[]),
- ?line testINSTANCE_OF:main(?BER),
-
- ?line ?ber_driver(?BER,testINSTANCE_OF:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testINSTANCE_OF:main(?BER)),
-
- ?line testINSTANCE_OF:compile(Config,?PER,[]),
- ?line testINSTANCE_OF:main(?PER),
-
- ?line ?per_bit_opt(testINSTANCE_OF:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testINSTANCE_OF:main(?PER)),
-
- ?line ?uper_bin(testINSTANCE_OF:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testINSTANCE_OF:main(uper_bin)),
-
- ?line testINSTANCE_OF:compile(Config,?PER,[optimize]),
- ?line testINSTANCE_OF:main(?PER).
-
-testTCAP(suite) -> [];
-testTCAP(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testTCAP:compile(Config,?BER,[]),
- ?line testTCAP:test(?BER,Config),
-
- ?line ?ber_driver(?BER,testTCAP:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testTCAP:test(?BER,Config)),
-
- ?line ?ber_driver(?BER,testTCAP:compile_asn1config(Config,?BER,[asn1config])),
- ?line ?ber_driver(?BER,testTCAP:test_asn1config()).
-
-testDER(suite) ->[];
-testDER(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testDER:compile(Config,?BER,[]),
- ?line testDER:test(),
-
- ?line ?ber_driver(?BER,testDER:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testDER:test()),
-
- ?line testParamBasic:compile_der(Config,?BER),
- ?line testParamBasic_cases(der),
-
-
- ?line testSeqSetDefaultVal:compile(Config,?BER),
- ?line testSeqSetDefaultVal_cases(?BER).
-
-testSeqSetDefaultVal_cases(?BER) ->
- ?line testSeqSetDefaultVal:main(?BER).
-
-
-specialized_decodes(suite) -> [];
-specialized_decodes(Config) ->
- ?line test_partial_incomplete_decode:compile(Config,?BER,[optimize]),
- ?line test_partial_incomplete_decode:test(?BER,Config),
- ?line test_selective_decode:test(?BER,Config).
-
-special_decode_performance(suite) ->[];
-special_decode_performance(Config) ->
- ?line ?ber_driver(?BER,test_special_decode_performance:compile(Config,?BER)),
- ?line ?ber_driver(?BER,test_special_decode_performance:go(all)).
-
-
-test_driver_load(suite) -> [];
-test_driver_load(Config) ->
- ?line test_driver_load:compile(Config,?PER),
- ?line test_driver_load:test(?PER,5).
-
-test_ParamTypeInfObj(suite) -> [];
-test_ParamTypeInfObj(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line ok = asn1ct:compile(filename:join(DataDir,"IN-CS-1-Datatypes"),[ber_bin]).
-
-test_WS_ParamClass(suite) -> [];
-test_WS_ParamClass(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line ok = asn1ct:compile(filename:join(DataDir,"InformationFramework"),
- [ber_bin]).
-
-test_Defed_ObjectIdentifier(suite) -> [];
-test_Defed_ObjectIdentifier(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line ok = asn1ct:compile(filename:join(DataDir,"UsefulDefinitions"),
- [ber_bin]).
-
-testSelectionType(suite) -> [];
-testSelectionType(Config) ->
-
- ?line ok = testSelectionTypes:compile(Config,?BER,[]),
- ?line {ok,_} = testSelectionTypes:test(),
-
- ?line ok = testSelectionTypes:compile(Config,?PER,[]),
- ?line {ok,_} = testSelectionTypes:test().
-
-testSSLspecs(suite) -> [];
-testSSLspecs(Config) ->
-
- ?line ok = testSSLspecs:compile(Config,?BER,
- [optimize,compact_bit_string,der]),
- ?line testSSLspecs:run(?BER),
-
- case code:which(asn1ct) of
- cover_compiled ->
- ok;
- _ ->
- ?line ok = testSSLspecs:compile_inline(Config,?BER),
- ?line ok = testSSLspecs:run_inline(?BER)
- end.
-
-testNortel(suite) -> [];
-testNortel(Config) ->
- ?line DataDir = ?config(data_dir,Config),
-
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),[?BER]),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),
- [?BER,optimize]),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),
- [?BER,optimize,driver]),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),[?PER]),
- ?line ?per_bit_opt(ok = asn1ct:compile(filename:join(DataDir,"Nortel"),
- [?PER,optimize])),
- ?line ?uper_bin(ok = asn1ct:compile(filename:join(DataDir,"Nortel"),[uper_bin])),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),
- [?PER,optimize]).
-test_undecoded_rest(suite) -> [];
-test_undecoded_rest(Config) ->
-
- ?line ok = test_undecoded_rest:compile(Config,?BER,[]),
- ?line ok = test_undecoded_rest:test([]),
-
- ?line ok = test_undecoded_rest:compile(Config,?BER,[undec_rest]),
- ?line ok = test_undecoded_rest:test(undec_rest),
-
- ?line ok = test_undecoded_rest:compile(Config,?PER,[]),
- ?line ok = test_undecoded_rest:test([]),
-
- ?line ?per_bit_opt(ok = test_undecoded_rest:compile(Config,?PER,[optimize,undec_rest])),
- ?line ?per_bit_opt(ok = test_undecoded_rest:test(undec_rest)),
-
- ?line ?uper_bin(ok = test_undecoded_rest:compile(Config,uper_bin,[undec_rest])),
- ?line ?uper_bin(ok = test_undecoded_rest:test(undec_rest)),
-
- ?line ok = test_undecoded_rest:compile(Config,?PER,[undec_rest]),
- ?line ok = test_undecoded_rest:test(undec_rest).
-
-test_inline(suite) -> [];
-test_inline(Config) ->
- case code:which(asn1ct) of
- cover_compiled ->
- {skip,"Not runnable when cover compiled"};
- _ ->
- ?line ok=test_inline:compile(Config,?BER,[]),
- ?line test_inline:main(?BER),
- ?line test_inline:inline1(Config,?BER,[]),
- ?line test_inline:performance2()
- end.
-
-%test_inline_prf(suite) -> [];
-%test_inline_prf(Config) ->
-% ?line test_inline:performance(Config).
-
-testTcapsystem(suite) -> [];
-testTcapsystem(Config) ->
- ?line ok=testTcapsystem:compile(Config,?BER,[]).
-
-testNBAPsystem(suite) -> [];
-testNBAPsystem(Config) ->
- ?line ok=testNBAPsystem:compile(Config,?PER,?per_optimize(?BER)),
- ?line ok=testNBAPsystem:test(?PER,Config).
-
-test_compile_options(suite) -> [];
-test_compile_options(Config) ->
- case code:which(asn1ct) of
- cover_compiled ->
- {skip,"Not runnable when cover compiled"};
- _ ->
- ?line ok = test_compile_options:wrong_path(Config),
- ?line ok = test_compile_options:path(Config),
- ?line ok = test_compile_options:noobj(Config),
- ?line ok = test_compile_options:record_name_prefix(Config),
- ?line ok = test_compile_options:verbose(Config),
- ?line ok = test_compile_options:warnings_as_errors(Config)
- end.
-
-testDoubleEllipses(suite) -> [];
-testDoubleEllipses(Config) ->
- ?line testDoubleEllipses:compile(Config,?BER,[]),
- ?line testDoubleEllipses:main(?BER),
- ?line ?ber_driver(?BER,testDoubleEllipses:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testDoubleEllipses:main(?BER)),
- ?line ?per_bit_opt(testDoubleEllipses:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testDoubleEllipses:main(?PER)),
- ?line ?uper_bin(testDoubleEllipses:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testDoubleEllipses:main(uper_bin)),
- ?line testDoubleEllipses:compile(Config,?PER,?per_optimize(?BER)),
- ?line testDoubleEllipses:main(?PER).
-
-test_modified_x420(suite) -> [];
-test_modified_x420(Config) ->
- ?line test_modified_x420:compile(Config),
- ?line test_modified_x420:test_io(Config).
-
-testX420(suite) -> [];
-testX420(Config) ->
- ?line testX420:compile(?BER,[der],Config),
- ?line ok = testX420:ticket7759(?BER,Config),
- ?line testX420:compile(?PER,[],Config).
-
-test_x691(suite) -> [];
-test_x691(Config) ->
- case ?PER of
- per ->
- ?line ok = test_x691:compile(Config,uper_bin,[]),
- ?line true = test_x691:cases(uper_bin,unaligned),
- ?line ok = test_x691:compile(Config,?PER,[]),
- ?line true = test_x691:cases(?PER,aligned),
-%% ?line ok = asn1_test_lib:ticket_7678(Config,[]),
- ?line ok = asn1_test_lib:ticket_7708(Config,[]),
- ?line ok = asn1_test_lib:ticket_7763(Config);
- _ ->
- ?line ok = test_x691:compile(Config,?PER,?per_optimize(?BER)),
- ?line true = test_x691:cases(?PER,aligned)
- end.
-%% ?line ok = asn1_test_lib:ticket_7876(Config,?PER,[]),
-%% ?line ok = asn1_test_lib:ticket_7876(Config,?PER,[compact_bit_string]),
-%% ?line ok = asn1_test_lib:ticket_7876(Config,?PER,[optimize]),
-%% ?line ok = asn1_test_lib:ticket_7876(Config,?PER,[optimize,compact_bit_string]).
-
-
-ticket_6143(suite) -> [];
-ticket_6143(Config) ->
- ?line ok = test_compile_options:ticket_6143(Config).
-
-testExtensionAdditionGroup(suite) -> [];
-testExtensionAdditionGroup(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line PrivDir = ?config(priv_dir,Config),
- ?line Path = code:get_path(),
- ?line code:add_patha(PrivDir),
- DoIt = fun(Erule) ->
- ?line ok = asn1ct:compile(filename:join(DataDir,"Extension-Addition-Group"),Erule ++ [{outdir,PrivDir}]),
- ?line {ok,_M} = compile:file(filename:join(DataDir,"extensionAdditionGroup"),[{i,PrivDir},{outdir,PrivDir},debug_info]),
- ?line ok = extensionAdditionGroup:run(Erule),
- ?line ok = extensionAdditionGroup:run2(Erule),
- ?line ok = asn1ct:compile(filename:join(DataDir,"EUTRA-RRC-Definitions"),Erule ++ [{record_name_prefix,"RRC-"},{outdir,PrivDir}]),
- ?line ok = extensionAdditionGroup:run3(Erule)
- end,
- ?line [DoIt(Rule)|| Rule <- [[per_bin],[per_bin,optimize],[uper_bin]]],
- %% FIXME problems with automatic tags [ber_bin],[ber_bin,optimize]
- ?line code:set_path(Path).
-
-
-
-% parse_modules() ->
-% ["ImportsFrom"].
-
-per_modules() ->
- [X || X <- test_modules()].
-ber_modules() ->
- [X || X <- test_modules(),
- X =/= "CommonDataTypes",
- X =/= "DS-EquipmentUser-CommonFunctionOrig-TransmissionPath",
- X =/= "H323-MESSAGES",
- X =/= "H235-SECURITY-MESSAGES",
- X =/= "MULTIMEDIA-SYSTEM-CONTROL"].
-test_modules() ->
- _Modules = [
- "BitStr",
- "CAP",
- "CommonDataTypes",
- "Constraints",
- "ContextSwitchingTypes",
- "DS-EquipmentUser-CommonFunctionOrig-TransmissionPath",
- "Enum",
- "From",
- "H235-SECURITY-MESSAGES",
- "H323-MESSAGES",
- %%"MULTIMEDIA-SYSTEM-CONTROL", recursive type , problem for asn1ct:value
- "Import",
- "Int",
- "MAP-commonDataTypes",
-% ambigous tags "MAP-insertSubscriberData-def",
- "Null",
- "Octetstr",
- "One",
- "P-Record",
- "P",
-% "PDUs",
- "Person",
- "PrimStrings",
- "Real",
- "XSeq",
- "XSeqOf",
- "XSet",
- "XSetOf",
- "String",
- "SwCDR",
-% "Syntax",
- "Time"
-% ANY "Tst",
-% "Two",
-% errors that should be detected "UndefType"
-] ++
- [
- "SeqSetLib", % must be compiled before Seq and Set
- "Seq",
- "Set",
- "SetOf",
- "SeqOf",
- "Prim",
- "Cho",
- "Def",
- "Opt",
- "ELDAPv3",
- "LDAP"
- ].
-
-test_OTP_9688(Config) ->
- Asn1Mod = "OTP-9688.asn1",
- %%DataDir = ?config(data_dir,Config),
- PrivDir = ?config(priv_dir,Config),
- Data = "
-OTP-9688 DEFINITIONS ::= BEGIN
-
- foo INTEGER ::= 1
- bar INTEGER ::= 42
-
- Baz ::= INTEGER {x-y-z1(foo), x-y-z2(bar)}
- Qux ::= SEQUENCE {flerpInfo SEQUENCE {x INTEGER (-10 | -9 | (0..4))} OPTIONAL}
-
-END
-",
- File = filename:join(PrivDir,Asn1Mod),
- ok = file:write_file(File, Data),
- %% Does it compile with changes to asn1ct_check and asn1ct_gen_per_rt2ct?
- %% (see ticket)
- ok = asn1ct:compile(File, [{outdir, PrivDir}]).
diff --git a/lib/asn1/test/asn1_app_test.erl b/lib/asn1/test/asn1_app_test.erl
index c3797f08b2..2c31c3259d 100644
--- a/lib/asn1/test/asn1_app_test.erl
+++ b/lib/asn1/test/asn1_app_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -138,7 +138,7 @@ check_asn1ct_modules(Extra) ->
asn1ct_name,asn1ct_constructed_per,asn1ct_constructed_ber,
asn1ct_gen_ber,asn1ct_constructed_ber_bin_v2,
asn1ct_gen_ber_bin_v2,asn1ct_value,
- asn1ct_tok,asn1ct_parser2],
+ asn1ct_tok,asn1ct_parser2,asn1ct_table],
case Extra -- ASN1CTMods of
[] ->
ok;
diff --git a/lib/asn1/test/asn1_bin_particular_SUITE.erl.src b/lib/asn1/test/asn1_bin_particular_SUITE.erl.src
deleted file mode 100644
index 0e153238ad..0000000000
--- a/lib/asn1/test/asn1_bin_particular_SUITE.erl.src
+++ /dev/null
@@ -1,2 +0,0 @@
-
-particular() -> [].
diff --git a/lib/asn1/test/asn1_common_SUITE.erl.src b/lib/asn1/test/asn1_common_SUITE.erl.src
deleted file mode 100644
index 12512606d8..0000000000
--- a/lib/asn1/test/asn1_common_SUITE.erl.src
+++ /dev/null
@@ -1,95 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
-
-common() -> [{group,app_test}, {group,appup_test},testTimer_ber,testTimer_ber_bin,
- testTimer_ber_bin_opt, testTimer_ber_bin_opt_driver, testTimer_per,
- testTimer_per_bin, testTimer_per_bin_opt, testTimer_uper_bin,
- testComment,testName2Number].
-
-
-testTimer_ber(suite) -> [];
-testTimer_ber(Config) ->
- ?line testTimer:compile(Config,ber,[]),
- ?line testTimer:go(Config,ber).
-
-testTimer_ber_bin(suite) -> [];
-testTimer_ber_bin(Config) ->
- ?line testTimer:compile(Config,ber_bin,[]),
- ?line testTimer:go(Config,ber_bin).
-
-testTimer_ber_bin_opt(suite) -> [];
-testTimer_ber_bin_opt(Config) ->
- ?line testTimer:compile(Config,ber_bin,[optimize]),
- ?line testTimer:go(Config,ber_bin).
-
-testTimer_ber_bin_opt_driver(suite) -> [];
-testTimer_ber_bin_opt_driver(Config) ->
- ?line testTimer:compile(Config,ber_bin,[optimize,driver]),
- ?line testTimer:go(Config,ber_bin).
-
-testTimer_per(suite) -> [];
-testTimer_per(Config) ->
- ?line testTimer:compile(Config,per,[]),
- ?line testTimer:go(Config,per).
-
-testTimer_per_bin(suite) -> [];
-testTimer_per_bin(Config) ->
- ?line testTimer:compile(Config,per_bin,[]),
- ?line testTimer:go(Config,per_bin).
-
-testTimer_per_bin_opt(suite) -> [];
-testTimer_per_bin_opt(Config) ->
- ?line testTimer:compile(Config,per_bin,[optimize]),
- ?line testTimer:go(Config,per_bin).
-
-
-testTimer_uper_bin(suite) -> [];
-testTimer_uper_bin(Config) ->
- ?line ok=testTimer:compile(Config,uper_bin,[]),
- ?line {comment,_} = testTimer:go(Config,uper_bin).
-
-%% Test of multiple-line comment, OTP-8043
-testComment(suite) -> [];
-testComment(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
-
- ?line ok = asn1ct:compile(DataDir ++ "Comment",[{outdir,OutDir}]),
-
- ?line {ok,Enc} = asn1_wrapper:encode('Comment','Seq',{'Seq',12,true}),
- ?line {ok,{'Seq',12,true}} = asn1_wrapper:decode('Comment','Seq',Enc),
- ok.
-
-testName2Number(suite) -> [];
-testName2Number(Config) ->
- DataDir = ?config(data_dir,Config),
- OutDir = ?config(priv_dir,Config),
- N2NOptions = [{n2n,Type}|| Type <-
- ['CauseMisc','CauseProtocol',
- %% 'CauseNetwork',
- 'CauseRadioNetwork',
- 'CauseTransport','CauseNas']],
- ?line ok = asn1ct:compile(DataDir ++ "S1AP-IEs",[{outdir,OutDir}]++N2NOptions),
- ?line true = code:add_patha(OutDir),
-
- ?line 0 = 'S1AP-IEs':name2num_CauseMisc('control-processing-overload'),
- ?line 'unknown-PLMN' = 'S1AP-IEs':num2name_CauseMisc(5),
- ok.
-
diff --git a/lib/asn1/test/asn1_particular_SUITE.erl.src b/lib/asn1/test/asn1_particular_SUITE.erl.src
deleted file mode 100644
index df76de914d..0000000000
--- a/lib/asn1/test/asn1_particular_SUITE.erl.src
+++ /dev/null
@@ -1,10 +0,0 @@
-
-particular() -> [ticket_7407].
-
-ticket_7407(suite) -> [];
-ticket_7407(Config) ->
- ?line ok = asn1_test_lib:ticket_7407_compile(Config,[]),
- ?line ok = asn1_test_lib:ticket_7407_code(true),
-
- ?line ok = asn1_test_lib:ticket_7407_compile(Config,[no_final_padding]),
- ?line ok = asn1_test_lib:ticket_7407_code(false). \ No newline at end of file
diff --git a/lib/asn1/test/asn1_test_lib.erl b/lib/asn1/test/asn1_test_lib.erl
index 26cbdeb940..96c04a9436 100644
--- a/lib/asn1/test/asn1_test_lib.erl
+++ b/lib/asn1/test/asn1_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,11 +19,67 @@
%%
-module(asn1_test_lib).
+-export([compile/3]).
+-export([compile_all/3]).
+-export([compile_erlang/3]).
+
-export([ticket_7407_compile/2,ticket_7407_code/1, ticket_7678/2,
- ticket_7708/2, ticket_7763/1, ticket_7876/3]).
+ ticket_7708/2, ticket_7763/1, ticket_7876/3]).
-include_lib("test_server/include/test_server.hrl").
+compile(File, Config, Options) -> compile_all([File], Config, Options).
+
+compile_all(Files, Config, Options) ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ [compile_file(filename:join(DataDir, F), [{outdir, CaseDir}|Options])
+ || F <- Files],
+ ok.
+
+compile_file(File, Options) ->
+ try
+ ok = asn1ct:compile(File, Options),
+ case should_load(File, Options) of
+ false ->
+ ok;
+ {module, Module} ->
+ code:purge(Module),
+ true = code:soft_purge(Module),
+ {module, Module} = code:load_file(Module)
+ end
+ catch
+ Class:Reason ->
+ erlang:error({compile_failed, {File, Options}, {Class, Reason}})
+ end.
+
+compile_erlang(Mod, Config, Options) ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ M = list_to_atom(Mod),
+ {ok, M} = compile:file(filename:join(DataDir, Mod),
+ [{i, CaseDir}, {outdir, CaseDir}|Options]).
+
+should_load(File, Options) ->
+ should_load(File, lists:member(abs, Options),
+ proplists:lookup(inline, Options)).
+
+should_load(_File, true, _Inline) ->
+ false;
+should_load(_File, _Abs, {inline, Module}) when Module /= true ->
+ {module, Module};
+should_load(File, _Abs, _Inline) ->
+ {module, list_to_atom(strip_extension(filename:basename(File)))}.
+
+strip_extension(File) ->
+ strip_extension(File, filename:extension(File)).
+
+strip_extension(File, "") ->
+ File;
+strip_extension(File, Ext) when Ext == ".asn"; Ext == ".set"; Ext == ".asn1"->
+ strip_extension(filename:rootname(File));
+strip_extension(File, _Ext) ->
+ File.
ticket_7407_compile(Config,Option) ->
diff --git a/lib/asn1/test/ber_decode_error.erl b/lib/asn1/test/ber_decode_error.erl
index a566e0b07f..ff6e386a88 100644
--- a/lib/asn1/test/ber_decode_error.erl
+++ b/lib/asn1/test/ber_decode_error.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,19 +19,10 @@
%%
-module(ber_decode_error).
--export([run/1, compile/3]).
+-export([run/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Constructed",
- [Rules,{outdir,OutDir}]++Options).
-
-
run([]) ->
?line {ok,B} = asn1_wrapper:encode('Constructed','S3',{'S3',17}),
?line [T,L|V] = lists:flatten(B),
diff --git a/lib/asn1/test/h323test.erl b/lib/asn1/test/h323test.erl
index 5545dd45b9..b7a7d6e4df 100644
--- a/lib/asn1/test/h323test.erl
+++ b/lib/asn1/test/h323test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,58 +19,20 @@
%%
-module(h323test).
--compile(export_all).
--export([compile/3,run/1]).
+-export([run/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "H235-SECURITY-MESSAGES",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "H323-MESSAGES",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "MULTIMEDIA-SYSTEM-CONTROL",[Rules,{outdir,OutDir}]++Options).
-
-run(per_bin) ->
- run();
-run(per) ->
- run();
-run(_Rules) ->
- ok.
+run(per_bin) -> run();
+run(per) -> run();
+run(_Rules) -> ok.
run() ->
- ?line alerting(),
- ?line connect(),
+ alerting(),
+ connect(),
ok.
-arq() ->
- _AdmissionRequest = "27900007086000340036003300320038003700370101805337010180533600AC1F38C60693000D000445367AE75C5740120300AC1F38C6415004E0200100110000D7D22EA88D511C0200AC1F38C6C0580100".
-
-
-t0() ->
- Setup = "00B8060008914A0001010180533622C000000000074572696373736F6E0356302E3100010180533700AC1F38C206B80045367AE75C5740120300AC1F38C6415000411C110000D7D22EA88D511C0200AC1F3806C0583802150000080E1403001E80800A04000100AC1F38C661A820400000060401004E1403001E80801114000100AC1F38C72EE000AC1F38C72EE00100010063AA34AB"
-,
- ByteList = hexstr2bytes(Setup),
- asn1_wrapper:decode('H323-MESSAGES','H323-UU-PDU',ByteList).
-
-t1() ->
- AdmissionRequest = "27900007086000340036003300320038003700370101805337010180533600AC1F38C60693000D000445367AE75C5740120300AC1F38C6415004E0200100110000D7D22EA88D511C0200AC1F38C6C0580100",
- ByteList = hexstr2bytes(AdmissionRequest),
- asn1_wrapper:decode('H323-MESSAGES','RasMessage',ByteList).
-
-t2() ->
- Cs = "080200040504038090A56C059132303033700591323030347E00930500B8060008914A0001010180533622C000000000074572696373736F6E0356302E3100010180533700AC1F38C206B80045367AE75C5740120300AC1F38C6415000411C110000D7D22EA88D511C0200AC1F3806C0583802150000080E1403001E80800A04000100AC1F38C661A820400000060401004E1403001E80801114000100AC1F38C72EE000AC1F38C72EE00100010063AA34AB",
- ByteList = hexstr2bytes(Cs),
- asn1_wrapper:decode('H323-MESSAGES','H323-UU-PDU',ByteList).
-
-t3() ->
- Cs = "10b8060008914a0002044003004d0067006f006e018085cc22c0b500534c164d6963726f736f6674ae204e65744d656574696e67ae0003332e3000000101808c990088e1293a06b8001689edc5bf23d3118c2d00c04f4b1cd0000c07000a00000204dc40b500534c3c0200000028000000000000001b0000008138427484ccd211b4e300a0c90d0660100000001289edc5bf23d3118c2d00c04f4b1cd00000000000000000a615d9ee",
- ByteList = hexstr2bytes(Cs),
- asn1_wrapper:decode('H323-MESSAGES','H323-UU-PDU',ByteList).
-
dec_alerting() ->
Cs = "0380060008914a0002020120110000000000000000000000000000000000",
- _Slask="E83AE983",
ByteList = hexstr2bytes(Cs),
asn1_wrapper:decode('H323-MESSAGES','H323-UserInformation',ByteList).
@@ -78,95 +40,31 @@ enc_alerting(V) ->
asn1_wrapper:encode('H323-MESSAGES','H323-UserInformation',V).
alerting() ->
- ?line {ok,V} = dec_alerting(),
- ?line {ok,B} = enc_alerting(V),
- ?line ByteList = lists:flatten(B),
- ?line {ok,V} = asn1_wrapper:decode('H323-MESSAGES','H323-UserInformation',ByteList).
+ {ok,V} = dec_alerting(),
+ {ok,B} = enc_alerting(V),
+ ByteList = lists:flatten(B),
+ {ok,V} = asn1_wrapper:decode('H323-MESSAGES','H323-UserInformation',ByteList).
dec_connect() ->
Cs = "02c0060008914a00020088e1293a04a322c0b500534c164d6963726f736f6674ae204e65744d656474696e67ae0003332e3000001689edc5bf23d3118c2d00c04f4b1cd00900110000000000000000000000000000000000",
- _Slask="2f530a3f",
ByteList = hexstr2bytes(Cs),
asn1_wrapper:decode('H323-MESSAGES','H323-UserInformation',ByteList).
-
+
enc_connect(V) ->
asn1_wrapper:encode('H323-MESSAGES','H323-UserInformation',V).
connect() ->
- ?line {ok,V} = dec_connect(),
- ?line {ok,B} = enc_connect(V),
- ?line ByteList = lists:flatten(B),
- ?line {ok,V} = asn1_wrapper:decode('H323-MESSAGES','H323-UserInformation',ByteList).
+ {ok,V} = dec_connect(),
+ {ok,B} = enc_connect(V),
+ ByteList = lists:flatten(B),
+ {ok,V} = asn1_wrapper:decode('H323-MESSAGES','H323-UserInformation',ByteList).
-dec_h245_TCS() ->
- Cs ="02700106000881750003"
- "800d00003c000100000100000100000e"
- "807fff04b5428080010180000e483060"
- "0100800c96a88000002020b500534c48"
- "020000000000f4010000f40101000400"
- "0000000002000100401f000000100000"
- "000104002000f4010700000100000002"
- "00ff00000000c0004000f0000000cc01"
- "30ff880118ff00008000012040b38000"
- "0220c0b38000032020b500534c280200"
- "00000000a0000000a000040010000000"
- "000070000100401f0000580200000c00"
- "1000000000008000042020b500534c28"
- "020000000000a0000000a00004001000"
- "0000000071000100401f00003a070000"
- "25001000000000008000052020b50053"
- "4c280200000000008000000080000500"
- "14000000000072000100401f00000809"
- "000025001000000000008000062020b5"
- "00534c28020000000000800000008000"
- "050014000000000073000100401f0000"
- "7f0a00002b0010000000000080000722"
- "000b40000909a00120390c000a099001"
- "20390c000b09880120390c000c08a220"
- "3940000d089220390004800602070007"
- "00060004000500020001000000030000"
- "0a00000e800702070007000600040005"
- "000200010000000300000900000e8008"
- "02070007000600040005000200010000"
- "000300000c00000e8009020700070006"
- "00040005000200010000000300000b00"
- "000e800a020700070006000400050002"
- "00010000000300000d00000e0300000b"
- "01003280299d93369631bc",
- ByteList = hexstr2bytes(Cs),
- asn1_wrapper:decode('MULTIMEDIA-SYSTEM-CONTROL',
- 'MultimediaSystemControlMessage',ByteList).
-
- hexstr2bytes([D1,D2|T]) ->
+hexstr2bytes([D1,D2|T]) ->
[dig2num(D1)*16+dig2num(D2)|hexstr2bytes(T)];
hexstr2bytes([]) ->
[].
-dig2num(D) when D >= $0, D =< $9 ->
- D - $0;
-dig2num(D) when D >= $a, D =< $f ->
- 10 + D - $a;
-dig2num(D) when D >= $A, D =< $F ->
- 10 + D - $A.
-
-bytes2hexstr(Bytes) ->
- bytes2hexstr(Bytes,[]).
-
-bytes2hexstr([B|Bytes],Acc) ->
- D1 = num2dig(B bsr 4),
- D2 = num2dig(B band 15),
- bytes2hexstr(Bytes,[D2,D1|Acc]);
-bytes2hexstr([],Acc) ->
- lists:reverse(Acc).
-
-num2dig(Num) when Num =< 9 ->
- $0 + Num;
-num2dig(Num) ->
- $a + Num - 10.
-
-
-
-
-
-
+dig2num(D) when D >= $0, D =< $9 -> D - $0;
+dig2num(D) when D >= $a, D =< $f -> 10 + D - $a;
+dig2num(D) when D >= $A, D =< $F -> 10 + D - $A.
diff --git a/lib/asn1/test/asn1_bin_v2_particular_SUITE.erl.src b/lib/asn1/test/pem_performance.erl
index 4c3c8c7808..87b8cbd61d 100644
--- a/lib/asn1/test/asn1_bin_v2_particular_SUITE.erl.src
+++ b/lib/asn1/test/pem_performance.erl
@@ -1,276 +1,22 @@
-
-particular() -> [smp, ticket7904].
-
-
-smp(suite) -> [];
-smp(Config) ->
- case erlang:system_info(smp_support) of
- true ->
- NumOfProcs = erlang:system_info(schedulers),
- io:format("smp starting ~p workers\n",[NumOfProcs]),
-
- ?line Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
- ?line ok = testNBAPsystem:compile(Config,per_bin,[optimize]),
-
- enc_dec(NumOfProcs,Msg,2),
-
- N = 10000,
-
- ?line {Time1,ok} = timer:tc(?MODULE,enc_dec,[NumOfProcs,Msg, N]),
- ?line {Time1S,ok} = timer:tc(?MODULE,enc_dec,[1, Msg, NumOfProcs * N]),
-
- ?line ok = testNBAPsystem:compile(Config,ber_bin,[optimize,nif]),
- ?line {Time3,ok} = timer:tc(?MODULE,enc_dec,[NumOfProcs,Msg, N]),
-
- ?line {Time3S,ok} = timer:tc(?MODULE,enc_dec,[1, Msg, NumOfProcs * N]),
-
- {comment,lists:flatten(
- io_lib:format(
- "Encode/decode time parallell with ~p cores: ~p [microsecs]~n"
- "Encode/decode time sequential: ~p [microsecs]",
- [NumOfProcs,Time1+Time3,Time1S+Time3S]))};
- false ->
- {skipped,"No smp support"}
- end.
-
-per_performance(Config) ->
- PrivDir = proplists:get_value(priv_dir, Config),
- NifDir = filename:join(PrivDir,"nif"),
- ErlDir = filename:join(PrivDir,"erl"),
- file:make_dir(NifDir),file:make_dir(ErlDir),
-
- ?line Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
- ?line ok = testNBAPsystem:compile([{priv_dir,NifDir}|Config],per_bin,
- [optimize]),
- ?line ok = testNBAPsystem:compile([{priv_dir,ErlDir}|Config],per_bin,
- []),
-
- Modules = ['NBAP-CommonDataTypes',
- 'NBAP-Constants',
- 'NBAP-Containers',
- 'NBAP-IEs',
- 'NBAP-PDU-Contents',
- 'NBAP-PDU-Discriptions'],
-
-
- PreNif = fun() ->
- code:add_patha(NifDir),
- lists:foreach(fun(M) ->
- code:purge(M),
- code:load_file(M)
- end,Modules)
- end,
-
- PreErl = fun() ->
- code:add_patha(ErlDir),
- lists:foreach(fun(M) ->
- code:purge(M),
- code:load_file(M)
- end,Modules)
- end,
-
- Func = fun() ->
- element(1,timer:tc(
- asn1_wrapper,encode,['NBAP-PDU-Discriptions',
- 'NBAP-PDU',
- Msg]))
- end,
-
- nif_vs_erlang_performance({{{PreNif,Func},{PreErl,Func}},100000,32}).
-
-ber_performance(Config) ->
-
- ?line Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
- ?line ok = testNBAPsystem:compile(Config,ber_bin,[optimize,nif]),
-
-
- BerFun = fun() ->
- {ok,B} = asn1_wrapper:encode('NBAP-PDU-Discriptions',
- 'NBAP-PDU', Msg),
- asn1_wrapper:decode(
- 'NBAP-PDU-Discriptions',
- 'NBAP-PDU',
- B)
- end,
- nif_vs_erlang_performance({BerFun,100000,32}).
-
-cert_pem_performance(Config) when is_list(Config) ->
- cert_pem_performance({100000, 32});
-cert_pem_performance({N,S}) ->
- nif_vs_erlang_performance({fun cert_pem/0,N,S}).
-
-dsa_pem_performance(Config) when is_list(Config) ->
- cert_pem_performance({100000, 32});
-dsa_pem_performance({N,S}) ->
- nif_vs_erlang_performance({fun dsa_pem/0,N,S}).
-
-
-nif_vs_erlang_performance({{TC1,TC2},N,Sched}) ->
- random:seed({123,456,789}),
- io:format("Running a ~p sample with ~p max procs...~n~n",[N,Sched]),
-
- {True,False} = exec(TC1,TC2,Sched,N+1),
-
- io:format("~ndone!~n"),
-
- io:format("~n"),TStats = print_stats(strip(True,N div 20)),
- io:format("~n"),FStats = print_stats(strip(False,N div 20)),
- Str = io_lib:format("~nNifs are ~.3f% faster than erlang!~n",
- [(element(2,FStats) - element(2,TStats)) /
- element(2,FStats) * 100]),
- io:format(Str),
- {comment, lists:flatten(Str)};
-nif_vs_erlang_performance({T,N,Sched}) ->
- PTC1 = fun() ->
- application:set_env(asn1, nif_loadable, true)
- end,
- PTC2 = fun() ->
- application:set_env(asn1, nif_loadable, false)
- end,
- TC = fun() ->
- element(1,timer:tc(T))
- end,
- nif_vs_erlang_performance({{{PTC1,TC},{PTC2,TC}},N,Sched}).
-
-
-print_stats(Data) ->
- Length = length(Data),
- Mean = lists:sum(Data) / Length,
- Variance = lists:foldl(fun(N,Acc) -> math:pow(N - Mean, 2)+Acc end, 0, Data),
- StdDev = math:sqrt(Variance / Length),
- Median = lists:nth(round(Length/2),Data),
- Min = lists:min(Data),
- Max = lists:max(Data),
- if Length < 20 ->
- io:format("Data: ~w~n",[Data]);
- true ->
- ok
- end,
- io:format("Length: ~p~nMean: ~p~nStdDev: ~p~nMedian: ~p~nMin: ~p~nMax: ~p~n",
- [Length,Mean,StdDev,Median,Min,Max]),
- {Length,Mean,StdDev,Median,Min,Max}.
-
-collect(Acc) ->
- receive
- {Tag,Val} ->
- Prev = proplists:get_value(Tag,Acc,[]),
- collect(lists:keystore(Tag,1,Acc,{Tag,[Val|Prev]}))
- after 100 ->
- Acc
- end.
-
-exec(One,Two,Max,N) ->
- exec(One,Two,Max,N,{[],[]}).
-exec(_,_,_,1,{D1,D2}) ->
- {lists:flatten(D1),lists:flatten(D2)};
-exec({PreOne,One} = O,{PreTwo,Two} = T,MaxProcs, N, {D1,D2}) ->
- Num = random:uniform(round(N/2)),
- if Num rem 3 == 0 ->
- timer:sleep(Num rem 1000);
- true ->
- ok
- end,
- Procs = random:uniform(MaxProcs),
- io:format("\tBatch: ~p items in ~p processes, ~p left~n",[Num,Procs,N-Num]),
- if Num rem 2 == 1 ->
- erlang:garbage_collect(),
- PreOne(),
- MoreOne = pexec(One, Num, Procs, []),
- erlang:garbage_collect(),
- PreTwo(),
- MoreTwo = pexec(Two, Num, Procs, []);
- true ->
- erlang:garbage_collect(),
- PreTwo(),
- MoreTwo = pexec(Two, Num, Procs, []),
- erlang:garbage_collect(),
- PreOne(),
- MoreOne = pexec(One, Num, Procs, [])
- end,
- exec(O,T,MaxProcs,N-Num,{[MoreOne|D1],
- [MoreTwo|D2]}).
-
-pexec(_Fun, _, 0, []) ->
- [];
-pexec(Fun, _, 0, [{Ref,Pid}|Rest]) ->
- receive
- {data,D} ->
- [D|pexec(Fun,0,0,[{Ref,Pid}|Rest])];
- {'DOWN', Ref, process, Pid, normal} ->
- pexec(Fun, 0,0,Rest)
- end;
-pexec(Fun, 0, 1, AccProcs) ->
- pexec(Fun, 0, 0, AccProcs);
-pexec(Fun, N, 1, AccProcs) ->
- [Fun()|pexec(Fun, N - 1, 1, AccProcs)];
-pexec(Fun, N, Procs, AccProcs) ->
- S = self(),
- Pid = spawn(fun() ->
- S ! {data,pexec(Fun,N,1,[])}
- end),
- Ref = erlang:monitor(process, Pid),
- pexec(Fun, N, Procs - 1, [{Ref,Pid}|AccProcs]).
-
-strip(Data,Num) ->
- {_,R} = lists:split(Num,lists:sort(Data)),
- element(2,lists:split(Num,lists:reverse(R))).
-
-faster(A,B) ->
- (B - A)/B * 100.
-
-enc_dec(1, Msg, N) ->
- worker_loop(N, Msg);
-enc_dec(NumOfProcs,Msg, N) ->
- pforeach(fun(_) ->
- worker_loop(N, Msg)
- end, [I || I <- lists:seq(1,NumOfProcs)]).
-
-worker_loop(0, _Msg) ->
- ok;
-worker_loop(N, Msg) ->
- ?line {ok,B}=asn1_wrapper:encode('NBAP-PDU-Discriptions',
- 'NBAP-PDU',
- Msg),
- ?line {ok,_Msg}=asn1_wrapper:decode('NBAP-PDU-Discriptions',
- 'NBAP-PDU',
- B),
- worker_loop(N - 1, Msg).
-
-
-pforeach(Fun, List) ->
- pforeach(Fun, List, []).
-pforeach(Fun, [], [{Pid,Ref}|Pids]) ->
- receive
- {'DOWN', Ref, process, Pid, normal} ->
- pforeach(Fun, [], Pids)
- end;
-pforeach(Fun, [H|T], Pids) ->
- Pid = spawn(fun() -> Fun(H) end),
- Ref = erlang:monitor(process, Pid),
- pforeach(Fun, T, [{Pid, Ref}|Pids]);
-pforeach(_Fun,[],[]) ->
- ok.
-
--record('InitiatingMessage',{procedureCode,criticality,value}).
--record('Iu-ReleaseCommand',{first,second}).
-
-ticket7904(suite) -> [];
-ticket7904(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
-
- ?line ok = asn1ct:compile(DataDir ++
- "RANAPextract1",[per_bin,optimize,{outdir,OutDir}]),
-
- Val1 = #'InitiatingMessage'{procedureCode=1,
- criticality=ignore,
- value=#'Iu-ReleaseCommand'{
- first=13,
- second=true}},
-
- ?line {ok,_} = 'RANAPextract1':encode('InitiatingMessage', Val1),
- asn1rt:unload_driver(),
- ?line {ok,_} = 'RANAPextract1':encode('InitiatingMessage', Val1).
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+
+-module([cert_pem/0]).
+-module([dsa_pem/0]).
cert_pem() ->
'OTP-PUB-KEY':decode('Certificate',<<48,130,3,184,48,130,3,33,160,3,2,1,2,2,1,1,48,13,6,9,42,134,72,134,247,13,1,1,5,5,0,48,129,131,49,14,48,12,6,3,85,4,3,19,5,111,116,112,67,65,49,19,48,17,6,3,85,4,11,19,10,69,114,108,97,110,103,32,79,84,80,49,20,48,18,6,3,85,4,10,19,11,69,114,105,99,115,115,111,110,32,65,66,49,11,48,9,6,3,85,4,6,19,2,83,69,49,18,48,16,6,3,85,4,7,19,9,83,116,111,99,107,104,111,108,109,49,37,48,35,6,9,42,134,72,134,247,13,1,9,1,22,22,112,101,116,101,114,64,101,114,105,120,46,101,114,105,99,115,115,111,110,46,115,101,48,30,23,13,48,56,48,49,48,57,48,56,50,57,51,48,90,23,13,49,55,49,49,49,55,48,56,50,57,51,48,90,48,129,132,49,15,48,13,6,3,85,4,3,19,6,99,108,105,101,110,116,49,19,48,17,6,3,85,4,11,19,10,69,114,108,97,110,103,32,79,84,80,49,20,48,18,6,3,85,4,10,19,11,69,114,105,99,115,115,111,110,32,65,66,49,11,48,9,6,3,85,4,6,19,2,83,69,49,18,48,16,6,3,85,4,7,19,9,83,116,111,99,107,104,111,108,109,49,37,48,35,6,9,42,134,72,134,247,13,1,9,1,22,22,112,101,116,101,114,64,101,114,105,120,46,101,114,105,99,115,115,111,110,46,115,101,48,129,159,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,129,141,0,48,129,137,2,129,129,0,245,56,68,254,220,239,193,190,63,221,182,60,67,77,121,163,214,136,137,183,139,8,166,30,100,27,45,17,126,58,15,173,151,218,75,224,148,14,22,164,10,100,186,183,104,175,197,97,96,182,146,150,106,129,140,100,194,106,90,62,133,233,155,46,155,33,101,220,83,193,182,232,240,99,253,249,114,8,159,172,143,77,179,132,229,205,29,110,185,233,224,52,25,149,249,100,80,229,199,125,23,106,146,233,159,26,13,8,161,206,221,43,240,149,42,45,194,190,85,6,235,152,220,219,160,32,144,67,2,3,1,0,1,163,130,1,55,48,130,1,51,48,9,6,3,85,29,19,4,2,48,0,48,11,6,3,85,29,15,4,4,3,2,5,224,48,29,6,3,85,29,14,4,22,4,20,26,59,44,5,72,211,158,214,23,34,30,241,125,27,123,115,93,163,231,120,48,129,179,6,3,85,29,35,4,129,171,48,129,168,128,20,6,171,128,52,58,164,184,118,178,189,157,46,40,229,109,145,222,125,1,155,161,129,140,164,129,137,48,129,134,49,17,48,15,6,3,85,4,3,19,8,101,114,108,97,110,103,67,65,49,19,48,17,6,3,85,4,11,19,10,69,114,108,97,110,103,32,79,84,80,49,20,48,18,6,3,85,4,10,19,11,69,114,105,99,115,115,111,110,32,65,66,49,18,48,16,6,3,85,4,7,19,9,83,116,111,99,107,104,111,108,109,49,11,48,9,6,3,85,4,6,19,2,83,69,49,37,48,35,6,9,42,134,72,134,247,13,1,9,1,22,22,112,101,116,101,114,64,101,114,105,120,46,101,114,105,99,115,115,111,110,46,115,101,130,1,1,48,33,6,3,85,29,17,4,26,48,24,129,22,112,101,116,101,114,64,101,114,105,120,46,101,114,105,99,115,115,111,110,46,115,101,48,33,6,3,85,29,18,4,26,48,24,129,22,112,101,116,101,114,64,101,114,105,120,46,101,114,105,99,115,115,111,110,46,115,101,48,13,6,9,42,134,72,134,247,13,1,1,5,5,0,3,129,129,0,93,11,112,227,121,15,121,179,247,135,110,216,17,197,84,18,149,166,147,142,190,178,0,209,190,0,142,233,144,100,194,205,220,182,73,204,108,42,95,23,48,63,4,120,239,42,194,25,184,35,117,107,96,229,18,45,76,122,125,40,171,210,132,50,146,178,160,55,17,35,255,208,114,30,47,55,185,154,155,165,204,180,14,143,20,234,6,234,201,225,72,235,5,87,61,255,250,23,217,1,144,246,98,221,223,102,49,168,177,13,70,241,26,27,254,251,217,14,244,18,242,197,151,50,186,214,15,42>>).
@@ -288,4 +34,4 @@ dsa_pem() ->
{1,2,840,10040,4,1},
<<48,130,1,31,2,129,129,0,183,179,230,217,37,99,144,157,21,228,204,162,207,61,246,144,58,139,139,184,184,43,108,206,0,115,173,208,100,233,201,121,21,90,179,119,53,140,25,52,34,202,121,211,164,107,43,56,68,162,159,51,244,232,138,126,164,109,121,89,237,142,57,28,32,188,44,67,253,111,121,104,40,141,211,255,140,118,37,234,150,201,155,160,16,17,51,59,26,249,41,129,16,211,119,128,95,254,182,235,132,0,92,206,93,77,106,217,201,132,203,4,75,201,246,204,216,162,1,84,79,211,10,21,152,195,103,145,2,21,0,213,30,184,86,247,16,247,69,192,241,35,138,84,57,140,3,71,65,206,233,2,129,129,0,148,179,24,63,74,91,128,25,96,29,5,78,223,246,175,0,121,86,54,178,42,231,98,241,147,180,157,60,149,160,50,243,227,76,175,89,234,203,252,242,76,108,9,204,157,182,59,206,227,127,99,215,42,156,194,78,116,25,7,62,243,169,45,5,101,179,247,127,199,144,135,103,23,42,154,125,231,248,154,101,175,155,101,42,232,41,80,41,47,128,208,11,31,106,63,12,202,207,135,80,200,136,250,171,31,118,52,91,200,138,112,111,179,23,214,123,21,118,194,179,0,185,217,52,197,182,236,13>>},
{0,
- <<2,129,128,124,66,0,111,121,139,142,209,95,136,95,237,177,150,248,252,49,135,117,100,155,232,138,244,132,89,40,5,70,125,202,96,78,239,76,37,125,149,82,64,107,54,227,73,25,180,227,41,0,234,73,47,80,242,242,129,250,61,68,62,39,38,156,193,146,40,241,247,106,215,223,202,194,110,130,62,186,90,18,28,196,174,99,47,193,61,130,100,150,25,248,115,164,231,153,99,46,69,66,139,33,187,51,49,35,219,234,29,44,172,166,247,42,16,177,187,9,162,81,243,33,26,100,46,78,57,203,135>>}}).
+ <<2,129,128,124,66,0,111,121,139,142,209,95,136,95,237,177,150,248,252,49,135,117,100,155,232,138,244,132,89,40,5,70,125,202,96,78,239,76,37,125,149,82,64,107,54,227,73,25,180,227,41,0,234,73,47,80,242,242,129,250,61,68,62,39,38,156,193,146,40,241,247,106,215,223,202,194,110,130,62,186,90,18,28,196,174,99,47,193,61,130,100,150,25,248,115,164,231,153,99,46,69,66,139,33,187,51,49,35,219,234,29,44,172,166,247,42,16,177,187,9,162,81,243,33,26,100,46,78,57,203,135>>}}).
diff --git a/lib/asn1/test/testChoExtension.erl b/lib/asn1/test/testChoExtension.erl
index 5e149ed247..b75cfb6831 100644
--- a/lib/asn1/test/testChoExtension.erl
+++ b/lib/asn1/test/testChoExtension.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,21 +19,11 @@
%%
-module(testChoExtension).
--export([compile/3]).
-export([extension/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoExtension",[Rules,{outdir,OutDir}] ++ Options).
-
-
-
extension(_Rules) ->
?line {ok,Bytes1} = asn1_wrapper:encode('ChoExtension','ChoExt1',{'ChoExt1',{bool,true}}),
diff --git a/lib/asn1/test/testChoExternal.erl b/lib/asn1/test/testChoExternal.erl
index b6586b616b..b2d171f9c7 100644
--- a/lib/asn1/test/testChoExternal.erl
+++ b/lib/asn1/test/testChoExternal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,12 +28,12 @@
-compile(Config,Rules,Optimize) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoExternal",[Rules,{outdir,OutDir}]++Optimize).
+compile(Config, Rules, Optimize) ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ true = code:add_patha(CaseDir),
+ ok = asn1ct:compile(DataDir ++ "ChoExternal",
+ [Rules, {outdir, CaseDir}] ++ Optimize).
diff --git a/lib/asn1/test/testChoOptional.erl b/lib/asn1/test/testChoOptional.erl
index 61a1955d28..cbb8134e51 100644
--- a/lib/asn1/test/testChoOptional.erl
+++ b/lib/asn1/test/testChoOptional.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,29 +19,16 @@
%%
-module(testChoOptional).
-
--export([compile/3]).
-export([optional/1]).
%-include("ChoOptional.hrl").
-include_lib("test_server/include/test_server.hrl").
-include("External.hrl").
-
-record('Seq1',{bool, int = asn1_NOVALUE, cho = asn1_NOVALUE}).
-record('Seq2',{int = asn1_NOVALUE, cho = asn1_NOVALUE, bool}).
-record('Seq3',{cho = asn1_NOVALUE, int = asn1_NOVALUE, bool}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoOptional",[Rules,{outdir,OutDir}]++Options).
-
-
-
optional(_Rules) ->
?line {ok,Bytes11} = asn1_wrapper:encode('ChoOptional','Seq1',#'Seq1'{bool = true}),
diff --git a/lib/asn1/test/testChoOptionalImplicitTag.erl b/lib/asn1/test/testChoOptionalImplicitTag.erl
index e28353cb5a..efe335cabd 100644
--- a/lib/asn1/test/testChoOptionalImplicitTag.erl
+++ b/lib/asn1/test/testChoOptionalImplicitTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,28 +20,16 @@
-module(testChoOptionalImplicitTag).
--export([compile/2]).
-export([optional/1]).
%-include("ChoOptional.hrl").
-include_lib("test_server/include/test_server.hrl").
-include("External.hrl").
-
-record('Seq1',{bool, int = asn1_NOVALUE, cho = asn1_NOVALUE}).
-record('Seq2',{int = asn1_NOVALUE, cho = asn1_NOVALUE, bool}).
-record('Seq3',{cho = asn1_NOVALUE, int = asn1_NOVALUE, bool}).
-
-compile(Config,Rules) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoOptionalImplicitTag",[Rules,{outdir,OutDir}]).
-
-
-
optional(_Rules) ->
?line {ok,Bytes11} = asn1_wrapper:encode('ChoOptionalImplicitTag','Seq1',#'Seq1'{bool = true}),
diff --git a/lib/asn1/test/testChoPrim.erl b/lib/asn1/test/testChoPrim.erl
index f037db1c5d..936a38f76c 100644
--- a/lib/asn1/test/testChoPrim.erl
+++ b/lib/asn1/test/testChoPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,22 +19,11 @@
%%
-module(testChoPrim).
--export([compile/3]).
-export([bool/1]).
-export([int/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoPrim",[Rules,{outdir,OutDir}]++Options).
-
-
-
bool(Rules) ->
?line {ok,Bytes11} = asn1_wrapper:encode('ChoPrim','ChoCon',{bool0,true}),
diff --git a/lib/asn1/test/testChoRecursive.erl b/lib/asn1/test/testChoRecursive.erl
index 36e23e2e03..22be26cbce 100644
--- a/lib/asn1/test/testChoRecursive.erl
+++ b/lib/asn1/test/testChoRecursive.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testChoRecursive).
--export([compile/3]).
-export([recursive/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -28,16 +27,6 @@
-record('ChoRec_something',{a, b, c}).
-record('ChoRec2_something',{a, b, c}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoRecursive",[Rules,{outdir,OutDir}]++Options).
-
-
-
recursive(_Rules) ->
?line {ok,Bytes11} = asn1_wrapper:encode('ChoRecursive','ChoRec',{'ChoRec',{something,
diff --git a/lib/asn1/test/testChoTypeRefCho.erl b/lib/asn1/test/testChoTypeRefCho.erl
index f381d9078d..9bd732f462 100644
--- a/lib/asn1/test/testChoTypeRefCho.erl
+++ b/lib/asn1/test/testChoTypeRefCho.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,22 +19,10 @@
%%
-module(testChoTypeRefCho).
--export([compile/3]).
-export([choice/1]).
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoTypeRefCho",[Rules,{outdir,OutDir}]++Options).
-
-
-
choice(_Rules) ->
?line {ok,Bytes11} = asn1_wrapper:encode('ChoTypeRefCho','ChoTRcho',{choCho,{choInt,88}}),
diff --git a/lib/asn1/test/testChoTypeRefPrim.erl b/lib/asn1/test/testChoTypeRefPrim.erl
index 8fb9ed9f02..edef6192fe 100644
--- a/lib/asn1/test/testChoTypeRefPrim.erl
+++ b/lib/asn1/test/testChoTypeRefPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,22 +19,10 @@
%%
-module(testChoTypeRefPrim).
--export([compile/3]).
-export([prim/1]).
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoTypeRefPrim",[Rules,{outdir,OutDir}]++Options).
-
-
-
prim(_Rules) ->
?line {ok,Bytes11} = asn1_wrapper:encode('ChoTypeRefPrim','ChoTR',{bool,true}),
diff --git a/lib/asn1/test/testChoTypeRefSeq.erl b/lib/asn1/test/testChoTypeRefSeq.erl
index 45d6209e79..bf2b66c73e 100644
--- a/lib/asn1/test/testChoTypeRefSeq.erl
+++ b/lib/asn1/test/testChoTypeRefSeq.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testChoTypeRefSeq).
--export([compile/3]).
-export([seq/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -28,16 +27,6 @@
-record('ChoSeqImp',{seqInt, seqOs}).
-record('ChoSeqExp',{seqInt, seqOs}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoTypeRefSeq",[Rules,{outdir,OutDir}]++Options).
-
-
-
seq(_Rules) ->
?line {ok,Bytes1} =
diff --git a/lib/asn1/test/testChoTypeRefSet.erl b/lib/asn1/test/testChoTypeRefSet.erl
index 9869549d7a..8a3e8bdbb0 100644
--- a/lib/asn1/test/testChoTypeRefSet.erl
+++ b/lib/asn1/test/testChoTypeRefSet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testChoTypeRefSet).
--export([compile/3]).
-export([set/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -28,16 +27,6 @@
-record('ChoSetImp',{setInt, setOs}).
-record('ChoSetExp',{setInt, setOs}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoTypeRefSet",[Rules,{outdir,OutDir}]++Options).
-
-
-
set(_Rules) ->
?line {ok,Bytes1} =
diff --git a/lib/asn1/test/testChoiceIndefinite.erl b/lib/asn1/test/testChoiceIndefinite.erl
index e5f3ee51c8..630efcf27a 100644
--- a/lib/asn1/test/testChoiceIndefinite.erl
+++ b/lib/asn1/test/testChoiceIndefinite.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,20 +19,10 @@
%%
-module(testChoiceIndefinite).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoiceIndef",
- [Rules,{outdir,OutDir}]++Options).
-
main(per_bin) -> ok;
main(per) -> ok;
main(ber_bin_v2) ->
@@ -50,6 +40,3 @@ main(ber) ->
?line {ok,V} = asn1_wrapper:decode('ChoiceIndef','Seq',B),
?line {ok,V} = asn1_wrapper:decode('ChoiceIndef','Seq',Bi),
ok.
-
-
-
diff --git a/lib/asn1/test/testCompactBitString.erl b/lib/asn1/test/testCompactBitString.erl
index cd5586602b..9563a31bf3 100644
--- a/lib/asn1/test/testCompactBitString.erl
+++ b/lib/asn1/test/testCompactBitString.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,29 +19,11 @@
%%
-module(testCompactBitString).
--export([compile/3]).
-export([compact_bit_string/1, bit_string_unnamed/1,otp_4869/1,
ticket_7734/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Option) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "PrimStrings",
- [Rules,{outdir,OutDir}]++Option),
- case Rules of
- per_bin ->
- ?line ok = asn1ct:compile(DataDir ++ "Constraints",
- [Rules,{outdir,OutDir}]++Option);
- _ -> ok
- end.
-
-
-
compact_bit_string(Rules) ->
%%==========================================================
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl
index dcbc04f8d8..cb15a24359 100644
--- a/lib/asn1/test/testConstraints.erl
+++ b/lib/asn1/test/testConstraints.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,24 +19,11 @@
%%
-module(testConstraints).
--export([compile/3]).
-export([int_constraints/1,refed_NNL_name/1]).
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Constraints",[Rules,{outdir,OutDir}]++Options).
-
-
-
-
int_constraints(Rules) ->
%%==========================================================
diff --git a/lib/asn1/test/testContextSwitchingTypes.erl b/lib/asn1/test/testContextSwitchingTypes.erl
index 7d05e5c352..4f67942922 100644
--- a/lib/asn1/test/testContextSwitchingTypes.erl
+++ b/lib/asn1/test/testContextSwitchingTypes.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,29 +19,19 @@
%%
-module(testContextSwitchingTypes).
--export([compile/3]).
--export([test/0]).
+-export([test/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ContextSwitchingTypes",
- [Rules,{outdir,OutDir}]++Options).
-
-
-test() ->
+test(Config) ->
?line ValT = 'ContextSwitchingTypes':'val1-T'(),
?line {ok,Bytes1} =
asn1_wrapper:encode('ContextSwitchingTypes','T',ValT),
?line {ok,Result1} =
asn1_wrapper:decode('ContextSwitchingTypes','T',Bytes1),
?line ok = check_EXTERNAL(Result1),
- ?line {ok,ValT2} = asn1ct:value('ContextSwitchingTypes','T'),
+ ?line {ok,ValT2} = asn1ct:value('ContextSwitchingTypes','T',
+ [{i, ?config(case_dir, Config)}]),
?line {ok,Bytes1_2} =
asn1_wrapper:encode('ContextSwitchingTypes','T',ValT2),
?line {ok,Result1_2} =
diff --git a/lib/asn1/test/testDER.erl b/lib/asn1/test/testDER.erl
index 630f7ecc14..395116bd34 100644
--- a/lib/asn1/test/testDER.erl
+++ b/lib/asn1/test/testDER.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,19 +19,10 @@
%%
-module(testDER).
--export([compile/3]).
-export([test/0]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "DERSpec",
- [Rule,der,{outdir,OutDir}]++Options).
-
test() ->
Val = {'Set',12,{version,214},true},
?line {ok,Bin}=asn1_wrapper:encode('DERSpec','Set',Val),
diff --git a/lib/asn1/test/testDeepTConstr.erl b/lib/asn1/test/testDeepTConstr.erl
index 53d2b3040e..aa3afbb58f 100644
--- a/lib/asn1/test/testDeepTConstr.erl
+++ b/lib/asn1/test/testDeepTConstr.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,23 +21,10 @@
-module(testDeepTConstr).
--export([compile/3,main/1]).
+-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "TConstrChoice",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++
- "TConstr",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Erule) ->
Val1 = {'FilterItem',
{substrings,
diff --git a/lib/asn1/test/testDef.erl b/lib/asn1/test/testDef.erl
index 7942a358be..48f0015008 100644
--- a/lib/asn1/test/testDef.erl
+++ b/lib/asn1/test/testDef.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testDef).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -37,16 +36,6 @@
bool32 = asn1_DEFAULT,
bool33 = asn1_DEFAULT}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Def",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} = asn1_wrapper:encode('Def','Def1',#'Def1'{bool0 = true,
diff --git a/lib/asn1/test/testDoubleEllipses.erl b/lib/asn1/test/testDoubleEllipses.erl
index 20be4ea215..9030a99ce2 100644
--- a/lib/asn1/test/testDoubleEllipses.erl
+++ b/lib/asn1/test/testDoubleEllipses.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testDoubleEllipses).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -34,17 +33,6 @@
-record('SetAlt',{a,d,b,e,c,f,g}).
-record('SetAltV2',{a,d,b,e,h,i,c,f,g}).
-
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "DoubleEllipses",[Rules,{outdir,OutDir}]++Options).
-
-
main(_Rules) ->
%% SEQUENCE
?line {ok,Bytes} =
diff --git a/lib/asn1/test/testEnumExt.erl b/lib/asn1/test/testEnumExt.erl
index 4ea0f3b8a1..c97116413a 100644
--- a/lib/asn1/test/testEnumExt.erl
+++ b/lib/asn1/test/testEnumExt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,19 +19,10 @@
%%
-module(testEnumExt).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "EnumExt",[Rules,{outdir,OutDir}]++Options).
-
-
main(Rules) when Rules == per; Rules == per_bin; Rules == uper_bin ->
io:format("main(~p)~n",[Rules]),
B32=[32],B64=[64],
diff --git a/lib/asn1/test/testExternal.erl b/lib/asn1/test/testExternal.erl
deleted file mode 100644
index 6e1fa0ee7d..0000000000
--- a/lib/asn1/test/testExternal.erl
+++ /dev/null
@@ -1,35 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
--module(testExternal).
-
--export([compile/3]).
-
--include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line test_server:format("Rules ~p~n",[Rules]),
- ?line ok = asn1ct:compile(DataDir ++ "External",[Rules,{outdir,OutDir}]++Options).
-
-
diff --git a/lib/asn1/test/testINSTANCE_OF.erl b/lib/asn1/test/testINSTANCE_OF.erl
index 6ae656da44..5986a00ec5 100644
--- a/lib/asn1/test/testINSTANCE_OF.erl
+++ b/lib/asn1/test/testINSTANCE_OF.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,21 +19,10 @@
%%
-module(testINSTANCE_OF).
--export([compile/3,main/1]).
+-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "INSTANCEOF.asn1",
- [Rules,{outdir,OutDir}]++Opt).
-
-
main(Erule) ->
?line {ok,Integer} = asn1_wrapper:encode('INSTANCEOF','Int',3),
diff --git a/lib/asn1/test/testInfObj.erl b/lib/asn1/test/testInfObj.erl
index 9d73be9f23..03e70c730a 100644
--- a/lib/asn1/test/testInfObj.erl
+++ b/lib/asn1/test/testInfObj.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
-module(testInfObj).
--export([compile/3,main/1,compile_RANAPfiles/3]).
+-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -28,42 +28,6 @@
-record('InitiatingMessage2',{procedureCode,criticality,value}).
-record('Iu-ReleaseCommand',{first,second}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "RANAPextract1",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "InfObj",[Rules,{outdir,OutDir}]++Options),
- %% test case for OTP-4792 optional open type
- ?line ok = asn1ct:compile(DataDir ++ "MAP-ExtensionDataTypes",[Rules,{outdir,OutDir}]++Options),
- %% OTP-6707
- ?line ok = asn1ct:compile(DataDir ++ "Objects",[Rules,{outdir,OutDir}]++Options),
- %% OTP-6717
- ?line ok = asn1ct:compile(DataDir ++ "INAPv2extract",[Rules,{outdir,OutDir}]++Options).
-
-
-compile_RANAPfiles(Config,Rules,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-CommonDataTypes",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-Constants",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-Containers",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-IEs",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-PDU-Contents",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-PDU-Descriptions",
- [Rules,{outdir,OutDir}]++Options).
-
-
main(_Erule) ->
Val1 = #'InitiatingMessage'{procedureCode=1,
criticality=ignore,
diff --git a/lib/asn1/test/testInfObjectClass.erl b/lib/asn1/test/testInfObjectClass.erl
index 07ebb7dbd0..e639066246 100644
--- a/lib/asn1/test/testInfObjectClass.erl
+++ b/lib/asn1/test/testInfObjectClass.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,22 +21,10 @@
-module(testInfObjectClass).
--export([compile/3,main/1]).
+-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ErrorClass",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "InfClass",[Rules,{outdir,OutDir}]++Options).
-
-
main(Rule) ->
%% this test is added for OTP-4591, to test that elements in decoded
%% value has terms in right order.
diff --git a/lib/asn1/test/testMegaco.erl b/lib/asn1/test/testMegaco.erl
index ca2b1062d1..f4edcebb7e 100644
--- a/lib/asn1/test/testMegaco.erl
+++ b/lib/asn1/test/testMegaco.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -108,24 +108,17 @@ compile(_Config,ber,[optimize]) ->
compile(_Config,per,[optimize]) ->
{ok,no_module,no_module};
compile(Config,Erule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "MEDIA-GATEWAY-CONTROL.asn",
- [Erule,{outdir,OutDir}]++Options),
-
- ?line ok = asn1ct:compile(DataDir ++
- "OLD-MEDIA-GATEWAY-CONTROL.asn",
- [Erule,{outdir,OutDir}]++Options),
+ asn1_test_lib:compile("MEDIA-GATEWAY-CONTROL.asn", Config, [Erule|Options]),
+ asn1_test_lib:compile("OLD-MEDIA-GATEWAY-CONTROL.asn", Config, [Erule|Options]),
{ok,'OLD-MEDIA-GATEWAY-CONTROL','MEDIA-GATEWAY-CONTROL'}.
main(no_module,_) -> ok;
-main('OLD-MEDIA-GATEWAY-CONTROL',_) ->
+main('OLD-MEDIA-GATEWAY-CONTROL',Config) ->
% Msg = msg11(),
- {ok,Msg} = asn1ct:value('OLD-MEDIA-GATEWAY-CONTROL','MegacoMessage'),
+ CaseDir = ?config(case_dir, Config),
+ {ok,Msg} = asn1ct:value('OLD-MEDIA-GATEWAY-CONTROL','MegacoMessage',
+ [{i, CaseDir}]),
?line {ok,Bytes} = asn1_wrapper:encode('OLD-MEDIA-GATEWAY-CONTROL',
'MegacoMessage',Msg),
?line {ok,Msg} = asn1_wrapper:decode('OLD-MEDIA-GATEWAY-CONTROL',
@@ -176,7 +169,7 @@ request(Mid, TransId, ContextId, CmdReq) when is_list(CmdReq) ->
msg11() ->
TimeStamp = #'TimeNotation'{date = "19990729",
- time = "22010001"},
+ time = "22012001"},
Parm = #'EventParameter'{eventParameterName = "ds",
value = "916135551212"},
diff --git a/lib/asn1/test/testMergeCompile.erl b/lib/asn1/test/testMergeCompile.erl
index 733cbc0eef..31aa3518f6 100644
--- a/lib/asn1/test/testMergeCompile.erl
+++ b/lib/asn1/test/testMergeCompile.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,31 +20,13 @@
-module(testMergeCompile).
--export([compile/3,main/1,mvrasn/1]).
+-export([main/1,mvrasn/1]).
-include_lib("test_server/include/test_server.hrl").
-record('InitiatingMessage',{procedureCode,criticality,value}).
-record('Iu-ReleaseCommand',{protocolIEs,protocolExtensions}).
-compile(Config,Erule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "MS.set.asn",[Erule,{outdir,OutDir}]++Options),
-
- ?line ok = asn1ct:compile(DataDir ++
- "RANAPSET.set.asn1",[Erule,{outdir,OutDir}]++Options),
-
- ?line ok = asn1ct:compile(filename:join([DataDir,"Mvrasn4.set.asn"]),
- [Erule,{outdir,OutDir}]++Options),
-
- ?line ok = asn1ct:compile(filename:join([DataDir,"Mvrasn6.set.asn"]),
- [Erule,{outdir,OutDir}]++Options).
-
-
main(Erule) ->
%% test of module MS.set.asn that tests OTP-4492: different tagdefault in
%% modules and types with same name in modules
diff --git a/lib/asn1/test/testMvrasn6.erl b/lib/asn1/test/testMvrasn6.erl
deleted file mode 100644
index eaa667e6d7..0000000000
--- a/lib/asn1/test/testMvrasn6.erl
+++ /dev/null
@@ -1,44 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
--module(testMvrasn6).
-
--export([compile/2]).
--export([main/0]).
-
--include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line Options = [Rules,{outdir,OutDir}],
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-21-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-20-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-19-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-15-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-18-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-14-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-11-6",Options).
-
-
-main() ->
- ok.
-
diff --git a/lib/asn1/test/testNBAPsystem.erl b/lib/asn1/test/testNBAPsystem.erl
index 1269f94060..4e8381e51e 100644
--- a/lib/asn1/test/testNBAPsystem.erl
+++ b/lib/asn1/test/testNBAPsystem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,7 @@
%%
-module(testNBAPsystem).
--export([compile/3,test/2,cell_setup_req_msg/0]).
+-export([compile/2,test/2,cell_setup_req_msg/0]).
-include_lib("test_server/include/test_server.hrl").
@@ -78,19 +78,15 @@ powerRaiseLimit, dLPowerAveragingWindowSize, 'iE-Extensions' = asn1_NOVALUE}).
id, criticality, extensionValue}).
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line DataDir2 = filename:join([DataDir,nbapsystem]),
-
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-CommonDataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-IEs.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-PDU-Contents.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-PDU-Discriptions.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-Constants.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-Containers.asn"]),[Rules,{outdir,OutDir}]++Opt).
+compile(Config, Options) ->
+ [asn1_test_lib:compile(filename:join([nbapsystem, M]), Config, Options)
+ || M <- ["NBAP-CommonDataTypes.asn",
+ "NBAP-IEs.asn",
+ "NBAP-PDU-Contents.asn",
+ "NBAP-PDU-Discriptions.asn",
+ "NBAP-Constants.asn",
+ "NBAP-Containers.asn"]],
+ ok.
test(_Erule,Config) ->
@@ -291,13 +287,7 @@ protocolIEs_051107() ->
criticality = ignore,
extensionValue = 'hsdpa-non-capable'}.
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-compare(V,V) ->
+compare(V,V) ->
ok;
compare(V,L) when is_list(L) ->
compare(V,list_to_binary(L));
@@ -306,52 +296,7 @@ compare(_,_) ->
check_record_names(Msg,Config) ->
DataDir = ?config(data_dir,Config),
- OutDir = ?config(priv_dir,Config),
- io:format("check_record_names: compiling ~p~ninclude directory: ~p~n",
- [filename:join([DataDir,"test_records"]),OutDir]),
- ?line {ok,test_records} = compile:file(filename:join([DataDir,"test_records"]),
- [{i,OutDir}]),
- io:format("check_record_names: calling test_records:'check_record_names_OTP-5812'/1~n",[]),
- ?line ok = test_records:'check_record_names_OTP-5812'(Msg).
-
-% check_record_names({initiatingMessage,
-% #'InitiatingMessage'{procedureID = ProcedureID,
-% criticality = _Criticality,
-% messageDiscriminator = _MessageDisc,
-% transactionID = _TransactionID,
-% value = Value}}) ->
-
-% ?line ok = check_record_ProcedureID(ProcedureID),
-% ?line ok = check_record_Value(Value).
-
-% check_record_ProcedureID(#'ProcedureID'{}) ->
-% ok;
-% check_record_ProcedureID(_) -> false.
-
-% check_record_Value(#'ResourceStatusIndication'{protocolIEs = ProtocolIEs}) ->
-% ?line ok = check_record_ProtocolIEs(ProtocolIEs);
-% check_record_Value(_) -> false.
-
-% check_record_ProtocolIEs(#'ProtocolIE-Field'{value =IndicationType}) ->
-% ?line ok = check_record_NFResourceStatusInd(IndicationType);
-% check_record_ProtocolIEs(_) -> false.
-
-% check_record_NFResourceStatusInd({'no-Failure',#'No-Failure-ResourceStatusInd'{'local-Cell-InformationList'=[LCI]}}) ->
-% ?line ok = check_record_LCInfoResourceStatusInd(LCI);
-% check_record_NFResourceStatusInd(_) -> false.
-
-% check_record_LCInfoResourceStatusInd(#'Local-Cell-InformationItem-ResourceStatusInd'{commonChannelsCapacityConsumptionLaw=[CCCCL],dedicatedChannelsCapacityConsumptionLaw=[DCCCL],'iE-Extensions' = [LCIRE]}) ->
-% ?line ok = check_record_CCCCL(CCCCL),
-% ?line ok = check_record_DCCCL(DCCCL),
-% ?line ok = check_record_LCIRE(LCIRE).
-
-% check_record_CCCCL(#'CommonChannelsCapacityConsumptionLaw_SEQOF'{}) ->
-% ok;
-% check_record_CCCCL(_) -> false.
-
-% check_record_DCCCL(#'DedicatedChannelsCapacityConsumptionLaw_SEQOF'{}) ->
-% ok;
-% check_record_DCCCL(_) -> false.
-% check_record_LCIRE(#'ProtocolExtensionField'{}) ->
-% ok;
-% check_record_LCIRE(_) -> false.
+ CaseDir = ?config(case_dir,Config),
+ {ok, test_records} = compile:file(filename:join([DataDir, "test_records"]),
+ [{i, CaseDir}]),
+ ok = test_records:'check_record_names_OTP-5812'(Msg).
diff --git a/lib/asn1/test/testOpenTypeImplicitTag.erl b/lib/asn1/test/testOpenTypeImplicitTag.erl
index 8662744ed3..a37d8004ef 100644
--- a/lib/asn1/test/testOpenTypeImplicitTag.erl
+++ b/lib/asn1/test/testOpenTypeImplicitTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,21 +19,10 @@
%%
-module(testOpenTypeImplicitTag).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "OpenTypeImplicitTag",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes1} =
diff --git a/lib/asn1/test/testParamBasic.erl b/lib/asn1/test/testParamBasic.erl
index 4ba0029b54..b5780195b8 100644
--- a/lib/asn1/test/testParamBasic.erl
+++ b/lib/asn1/test/testParamBasic.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,8 +19,6 @@
%%
-module(testParamBasic).
--export([compile/3]).
--export([compile_der/2]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -30,22 +28,6 @@
-record('T21',{number, string}).
-record('T22',{number, string}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ParamBasic",
- [Rules,{outdir,OutDir}]++Options).
-
-compile_der(Config,Rules) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ParamBasic",
- [der,Rules,{outdir,OutDir}]).
-
main(Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testParameterizedInfObj.erl b/lib/asn1/test/testParameterizedInfObj.erl
index b95d627d58..68faf08a61 100644
--- a/lib/asn1/test/testParameterizedInfObj.erl
+++ b/lib/asn1/test/testParameterizedInfObj.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
-module(testParameterizedInfObj).
--export([compile/3,main/1,ranap/1]).
+-export([main/1,ranap/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,16 +31,6 @@
-record('Iu-ReleaseCommand',{protocolIEs,protocolExtensions}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "Param",[Rules,{outdir,OutDir}]++Options).
-% ?line ok = asn1ct:compile(DataDir ++ "RANAP-CommonDataTypes",[Rules,{outdir,OutDir}]++Options).
-
-
main(Erule) ->
PERVal = #'AllocationOrRetentionPriority'
{priorityLevel = true,
diff --git a/lib/asn1/test/testPrim.erl b/lib/asn1/test/testPrim.erl
index 39c1e4d1d8..0d4427ba69 100644
--- a/lib/asn1/test/testPrim.erl
+++ b/lib/asn1/test/testPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testPrim).
--export([compile/3]).
-export([bool/1]).
-export([int/1]).
-export([enum/1]).
@@ -30,18 +29,6 @@
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Prim",
- [Rules,{outdir,OutDir}] ++ Opt),
- ?line ok = asn1ct:compile(DataDir ++ "Real",
- [Rules,{outdir,OutDir}] ++ Opt).
-
bool(Rules) ->
%%==========================================================
diff --git a/lib/asn1/test/testPrimExternal.erl b/lib/asn1/test/testPrimExternal.erl
index 23633177eb..65c3c3a31a 100644
--- a/lib/asn1/test/testPrimExternal.erl
+++ b/lib/asn1/test/testPrimExternal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,21 +19,10 @@
%%
-module(testPrimExternal).
--export([compile/3]).
-export([external/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "PrimExternal",[Rules,{outdir,OutDir}]++Options).
-
-
-
external(_Rules) ->
diff --git a/lib/asn1/test/testPrimStrings.erl b/lib/asn1/test/testPrimStrings.erl
index 33652d6554..b1c5172b95 100644
--- a/lib/asn1/test/testPrimStrings.erl
+++ b/lib/asn1/test/testPrimStrings.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testPrimStrings).
--export([compile/3]).
-export([bit_string/1]).
-export([bit_string_unnamed/1]).
-export([octet_string/1]).
@@ -33,22 +32,6 @@
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Option) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "PrimStrings",
- [Rules,{outdir,OutDir}]++Option),
- ?line {ok,IO} = file:open(test_config,write),
- io:format(IO,"~p.~n",[Config]),
- file:close(IO),
- ?line ok = asn1ct:compile(DataDir ++ "BitStr",
- [Rules, {outdir,OutDir}]++Option).
-
-
-
bit_string(Rules) ->
%%==========================================================
diff --git a/lib/asn1/test/testRANAP.erl b/lib/asn1/test/testRANAP.erl
deleted file mode 100644
index 52a58d850b..0000000000
--- a/lib/asn1/test/testRANAP.erl
+++ /dev/null
@@ -1,52 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
-
--module(testRANAP).
-
--export([compile/3,testobj/1]).
-
--include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Erule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(filename:join(DataDir,"RANAP"),[Erule,{outdir,OutDir}]++Options),
- ?line {ok,testobj} = compile:file(filename:join(DataDir,"testobj"),[{i,OutDir},{outdir,OutDir}]++Options),
- ok.
-
-testobj(_Erule) ->
- ?line ok = testobj:run_com_id(),
- ?line ok = testobj:run_dir_tsf_2cn(),
- ?line ok = testobj:run_dir_tsf_2rnc(),
- ?line ok = testobj:run_init_ue(),
- ?line ok = testobj:run_iu_rel_cmd(),
- ?line ok = testobj:run_iu_rel_cmp(),
- ?line ok = testobj:run_rab_ass_rsp_delete(),
- ?line ok = testobj:run_rab_ass_rsp_setup(),
- ?line ok = testobj:run_rab_create(),
- ?line ok = testobj:run_rab_rel(),
- ?line ok = testobj:run_reset(),
- ?line ok = testobj:run_reset_res(),
- ?line ok = testobj:run_sm_cmd(),
- ?line ok = testobj:run_sm_cmp(),
- ?line ok = testobj:run_sm_rej().
diff --git a/lib/asn1/test/testROSE.erl b/lib/asn1/test/testROSE.erl
deleted file mode 100644
index a692ec7682..0000000000
--- a/lib/asn1/test/testROSE.erl
+++ /dev/null
@@ -1,36 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
--module(testROSE).
-
--export([compile/3]).
-
--include_lib("test_server/include/test_server.hrl").
-
-
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Merged.set.asn1",
- [Rules,{outdir,OutDir}]++Opt).
-
diff --git a/lib/asn1/test/testSSLspecs.erl b/lib/asn1/test/testSSLspecs.erl
index 10623af51e..51ef134e5f 100644
--- a/lib/asn1/test/testSSLspecs.erl
+++ b/lib/asn1/test/testSSLspecs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,58 +20,37 @@
-module(testSSLspecs).
--export([compile/3,run/1,compile_inline/2,run_inline/1]).
+-export([compile/2,run/1,compile_inline/2,run_inline/1]).
-include_lib("test_server/include/test_server.hrl").
+compile(Config, Options) ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ NewOptions = [{i, DataDir}, {i, CaseDir}|Options],
-compile(Config,Rules,Options) ->
+ asn1_test_lib:compile_all(["SSL-PKIX", "PKIXAttributeCertificate"],
+ Config, NewOptions),
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "SSL-PKIX",[Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "PKIXAttributeCertificate",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
%% test case for OTP-4792 optional open type
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Algorithms88",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Explicit88",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Implicit88",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
+ asn1_test_lib:compile_all(["PKIX1Algorithms88", "PKIX1Explicit88",
+ "PKIX1Implicit88"],
+ Config, NewOptions),
+
%% OTP-6698, OTP-6702
- ?line ok = remove_db_files(OutDir),
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Explicit93",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Implicit93",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options).
-
-compile_inline(Config,Rule) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- case Rule of
- BER when BER==ber_bin;BER==ber_bin_v2 ->
- Options = [der,compact_bit_string,optimize,
- asn1config,inline],
- ?line ok = remove_db_file_inline(OutDir),
- ?line ok = asn1ct:compile(DataDir ++ "OTP-PKIX.set.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options);
- _ ->
- ok
- end.
+ ok = remove_db_files(CaseDir),
+ asn1_test_lib:compile_all(["PKIX1Explicit93", "PKIX1Implicit93"],
+ Config, NewOptions).
+
+compile_inline(Config, Rule) when Rule == ber_bin; Rule == ber_bin_v2 ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ Options = [{i, CaseDir}, {i, DataDir}, Rule,
+ der, compact_bit_string, optimize, asn1config, inline],
+ ok = remove_db_file_inline(CaseDir),
+ asn1_test_lib:compile("OTP-PKIX.set.asn", Config, Options);
+compile_inline(_Config, _Rule) ->
+ ok.
remove_db_files(Dir) ->
?line ok = remove_db_file(Dir ++ "PKIX1Explicit93.asn1db"),
diff --git a/lib/asn1/test/testSelectionTypes.erl b/lib/asn1/test/testSelectionTypes.erl
index 893c31622f..6d1641388f 100644
--- a/lib/asn1/test/testSelectionTypes.erl
+++ b/lib/asn1/test/testSelectionTypes.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,19 +19,10 @@
%%
-module(testSelectionTypes).
--export([compile/3]).
-export([test/0]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SelectionType",
- [Rule,{outdir,OutDir}]++Options).
-
test() ->
Val = ["PrintableString","PrintableString","PrintableString"],
?line {ok,Bin}=asn1_wrapper:encode('SelectionType','MendeleyevTable',Val),
diff --git a/lib/asn1/test/testSeq2738.erl b/lib/asn1/test/testSeq2738.erl
index 9cf9c8fcb4..cddfe4b311 100644
--- a/lib/asn1/test/testSeq2738.erl
+++ b/lib/asn1/test/testSeq2738.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeq2738).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -32,14 +31,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Seq2738",[Rules,{outdir,OutDir}]++Options).
-
-
main(_Rules) ->
?line {ok,Bytes} =
diff --git a/lib/asn1/test/testSeqDefault.erl b/lib/asn1/test/testSeqDefault.erl
index edf07cf1c1..a772b749bd 100644
--- a/lib/asn1/test/testSeqDefault.erl
+++ b/lib/asn1/test/testSeqDefault.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSeqDefault).
-include("External.hrl").
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -37,15 +36,6 @@
-record('SeqIn',{boolIn, intIn}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqDefault",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSeqExtension.erl b/lib/asn1/test/testSeqExtension.erl
index 538e2c250b..7c77ab87e9 100644
--- a/lib/asn1/test/testSeqExtension.erl
+++ b/lib/asn1/test/testSeqExtension.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSeqExtension).
-include("External.hrl").
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,16 +30,6 @@
-record('SeqExt4',{bool, int}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqExtension",
- [Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSeqIndefinite.erl b/lib/asn1/test/testSeqIndefinite.erl
index 9285d7b368..25742474bb 100644
--- a/lib/asn1/test/testSeqIndefinite.erl
+++ b/lib/asn1/test/testSeqIndefinite.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,20 +19,11 @@
%%
-module(testSeqIndefinite).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqSetIndefinite",
- [Rules,{outdir,OutDir}]++Options).
-
main(per_bin) -> ok;
main(per) -> ok;
main(ber_bin_v2) ->
diff --git a/lib/asn1/test/testSeqOf.erl b/lib/asn1/test/testSeqOf.erl
index 961e2d89d9..0c0bbc3e66 100644
--- a/lib/asn1/test/testSeqOf.erl
+++ b/lib/asn1/test/testSeqOf.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqOf).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -35,18 +34,6 @@
-record('SeqEmp',{seq1}).
-record('Empty',{}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqOf",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "SeqOfEnum",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "XSeqOf",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSeqOfCho.erl b/lib/asn1/test/testSeqOfCho.erl
index 05bd45580f..5b83c8bf21 100644
--- a/lib/asn1/test/testSeqOfCho.erl
+++ b/lib/asn1/test/testSeqOfCho.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqOfCho).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,17 +30,6 @@
-record('SeqOfChoEmbDef_SEQOF',{bool1, int1, seq1 = asn1_DEFAULT}).
-record('SeqOfChoEmbOpt_SEQOF',{bool1, int1, seq1 = asn1_NOVALUE}).
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqOfCho",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSeqOfIndefinite.erl b/lib/asn1/test/testSeqOfIndefinite.erl
index 0221581cf1..01ef36e0b4 100644
--- a/lib/asn1/test/testSeqOfIndefinite.erl
+++ b/lib/asn1/test/testSeqOfIndefinite.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,42 +19,10 @@
%%
-module(testSeqOfIndefinite).
--export([compile/3]).
-export([main/0]).
-include_lib("test_server/include/test_server.hrl").
-%-record('Seq1',{bool1, int1, seq1 = asn1_DEFAULT}).
-%-record('Seq2',{seq2 = asn1_DEFAULT, bool2, int2}).
-%-record('Seq3',{bool3, seq3 = asn1_DEFAULT, int3}).
-%-record('Seq4',{seq41 = asn1_DEFAULT, seq42 = asn1_DEFAULT, seq43 = asn1_DEFAULT}).
-%-record('SeqIn',{boolIn, intIn}).
-%-record('SeqCho',{bool1, int1, seq1 = asn1_DEFAULT}).
-%-record('SeqChoInline',{bool1, int1, seq1 = asn1_DEFAULT}).
-%-record('SeqChoOfInline_SEQOF',{bool1, int1, seq1 = asn1_DEFAULT}).
-%-record('SeqEmp',{seq1}).
-%-record('Empty',{}).
-
-
-
-compile(Config,Rules,Opts) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line Options = [Rules,{outdir,OutDir}]++Opts,
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-Constants-1",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-DataTypes-1",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-21-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-20-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-19-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-18-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-17-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-15-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-14-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-11-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "SeqOf",Options).
-
main() ->
?line ok = test(isd),
?line ok = test(isd2),
diff --git a/lib/asn1/test/testSeqOfTag.erl b/lib/asn1/test/testSeqOfTag.erl
index 4f56ab717b..2359df0c59 100644
--- a/lib/asn1/test/testSeqOfTag.erl
+++ b/lib/asn1/test/testSeqOfTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,8 +19,6 @@
%%
-module(testSeqOfTag).
-
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -45,17 +43,6 @@
-record('Imp',{os, bool}).
-record('Exp',{os, bool}).
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqOfTag",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSeqOptional.erl b/lib/asn1/test/testSeqOptional.erl
index 0125c9fb3e..8013f3c685 100644
--- a/lib/asn1/test/testSeqOptional.erl
+++ b/lib/asn1/test/testSeqOptional.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSeqOptional).
-include("External.hrl").
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -37,16 +36,6 @@
-record('SeqIn',{boolIn, intIn}).
-record('SeqChoOpt',{int, cho = asn1_NOVALUE}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqOptional",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSeqPrim.erl b/lib/asn1/test/testSeqPrim.erl
index ec48d1b779..c2451a7cd1 100644
--- a/lib/asn1/test/testSeqPrim.erl
+++ b/lib/asn1/test/testSeqPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqPrim).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -27,15 +26,6 @@
-record('Seq',{bool, boolCon, boolPri, boolApp, boolExpCon, boolExpPri, boolExpApp}).
-record('Empty',{}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqPrim",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSeqSetDefaultVal.erl b/lib/asn1/test/testSeqSetDefaultVal.erl
index 5a1a443ebc..ab484db5f2 100644
--- a/lib/asn1/test/testSeqSetDefaultVal.erl
+++ b/lib/asn1/test/testSeqSetDefaultVal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSeqSetDefaultVal).
-include("External.hrl").
--export([compile/2]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -95,14 +94,6 @@
-record('S4_b',{ba = asn1_DEFAULT,
bb = asn1_DEFAULT}).
-
-compile(Config,Rules) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Default",
- [Rules,der,{outdir,OutDir}]).
-
main(_Rules) ->
?line {ok,[48,0]} =
diff --git a/lib/asn1/test/testSeqTag.erl b/lib/asn1/test/testSeqTag.erl
index 60d3629840..9fdaae35dd 100644
--- a/lib/asn1/test/testSeqTag.erl
+++ b/lib/asn1/test/testSeqTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqTag).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -35,16 +34,6 @@
-record('Imp',{os, bool}).
-record('Exp',{os, bool}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTag",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSeqTypeRefCho.erl b/lib/asn1/test/testSeqTypeRefCho.erl
index 9262fd1bfd..4b9eac7034 100644
--- a/lib/asn1/test/testSeqTypeRefCho.erl
+++ b/lib/asn1/test/testSeqTypeRefCho.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqTypeRefCho).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -27,16 +26,6 @@
-record('SeqTRcho',{seqCho, seqChoE, 'seqCho-E', 'seqChoE-E'}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTypeRefCho",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSeqTypeRefSeq.erl b/lib/asn1/test/testSeqTypeRefSeq.erl
index 51b0f13c57..57ec6c19b1 100644
--- a/lib/asn1/test/testSeqTypeRefSeq.erl
+++ b/lib/asn1/test/testSeqTypeRefSeq.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqTypeRefSeq).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -46,15 +45,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTypeRefSeq",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSeqTypeRefSet.erl b/lib/asn1/test/testSeqTypeRefSet.erl
index a704ce3403..c06a0e7a2b 100644
--- a/lib/asn1/test/testSeqTypeRefSet.erl
+++ b/lib/asn1/test/testSeqTypeRefSet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqTypeRefSet).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,15 +30,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTypeRefSet",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes41} =
diff --git a/lib/asn1/test/testSetDefault.erl b/lib/asn1/test/testSetDefault.erl
index e36894327c..8aa205e0f0 100644
--- a/lib/asn1/test/testSetDefault.erl
+++ b/lib/asn1/test/testSetDefault.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetDefault).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -30,16 +29,6 @@
-record('SetIn',{boolIn, intIn}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetDefault",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetExternal.erl b/lib/asn1/test/testSetExternal.erl
index 41f32dcd90..30cddcacfb 100644
--- a/lib/asn1/test/testSetExternal.erl
+++ b/lib/asn1/test/testSetExternal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSetExternal).
-include("External.hrl").
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -33,17 +32,6 @@
%-record('Imp',{os, bool}).
%-record('Exp',{os, bool}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetExternal",
- [Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetIndefinite.erl b/lib/asn1/test/testSetIndefinite.erl
index bf8b242860..d8e2b6a9cf 100644
--- a/lib/asn1/test/testSetIndefinite.erl
+++ b/lib/asn1/test/testSetIndefinite.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,20 +19,11 @@
%%
-module(testSetIndefinite).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqSetIndefinite",
- [Rules,{outdir,OutDir}]++Options).
-
main(per_bin) -> ok;
main(per) -> ok;
main(ber_bin_v2) ->
diff --git a/lib/asn1/test/testSetOf.erl b/lib/asn1/test/testSetOf.erl
index 0769b9a344..08723fb468 100644
--- a/lib/asn1/test/testSetOf.erl
+++ b/lib/asn1/test/testSetOf.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetOf).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -37,15 +36,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOf",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetOfCho.erl b/lib/asn1/test/testSetOfCho.erl
index 474742fbdb..c89bf9596e 100644
--- a/lib/asn1/test/testSetOfCho.erl
+++ b/lib/asn1/test/testSetOfCho.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetOfCho).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -33,15 +32,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOfCho",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetOfExternal.erl b/lib/asn1/test/testSetOfExternal.erl
index 9e2b01c698..6b280a2595 100644
--- a/lib/asn1/test/testSetOfExternal.erl
+++ b/lib/asn1/test/testSetOfExternal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSetOfExternal).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -32,15 +31,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOfExternal",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetOfTag.erl b/lib/asn1/test/testSetOfTag.erl
index c101306d7a..2c7a2f5473 100644
--- a/lib/asn1/test/testSetOfTag.erl
+++ b/lib/asn1/test/testSetOfTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSetOfTag).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -47,15 +46,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOfTag",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetOptional.erl b/lib/asn1/test/testSetOptional.erl
index 035fa70424..4692941524 100644
--- a/lib/asn1/test/testSetOptional.erl
+++ b/lib/asn1/test/testSetOptional.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSetOptional).
-include("External.hrl").
--export([compile/3]).
-export([main/1]).
-export([ticket_7533/1,decoder/4]).
-include_lib("test_server/include/test_server.hrl").
@@ -36,16 +35,6 @@
-record('SetOpt3Exp',{bool3 = asn1_NOVALUE, set3 = asn1_NOVALUE, int3 = asn1_NOVALUE}).
-record('SetIn',{boolIn, intIn}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOptional",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
@@ -204,9 +193,8 @@ ticket_7533(Ber) when Ber == ber; Ber == ber_bin ->
io:format("Decode result: ~p~n",[Result]),
ok
after 10000 ->
- exit(Pid,normal),
io:format("Decode timeout~n",[]),
- error
+ exit(Pid,normal)
end;
ticket_7533(_) ->
ok.
diff --git a/lib/asn1/test/testSetPrim.erl b/lib/asn1/test/testSetPrim.erl
index e093c918e3..3234b65135 100644
--- a/lib/asn1/test/testSetPrim.erl
+++ b/lib/asn1/test/testSetPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetPrim).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -27,15 +26,6 @@
-record('Set',{bool, boolCon, boolPri, boolApp, boolExpCon, boolExpPri, boolExpApp}).
-record('Empty',{}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetPrim",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSetTag.erl b/lib/asn1/test/testSetTag.erl
index 8df3e36815..8b9364d603 100644
--- a/lib/asn1/test/testSetTag.erl
+++ b/lib/asn1/test/testSetTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTag).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -35,16 +34,6 @@
-record('Imp',{os, bool}).
-record('Exp',{os, bool}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTag",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSetTypeRefCho.erl b/lib/asn1/test/testSetTypeRefCho.erl
index 1f68a8fbc4..a0989926c7 100644
--- a/lib/asn1/test/testSetTypeRefCho.erl
+++ b/lib/asn1/test/testSetTypeRefCho.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTypeRefCho).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -28,15 +27,6 @@
-record('SetTRcho',{setCho, setChoE, 'setCho-E', 'setChoE-E'}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTypeRefCho",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSetTypeRefPrim.erl b/lib/asn1/test/testSetTypeRefPrim.erl
index e6cec260e5..9c7fbd803e 100644
--- a/lib/asn1/test/testSetTypeRefPrim.erl
+++ b/lib/asn1/test/testSetTypeRefPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTypeRefPrim).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -27,15 +26,6 @@
-record('SetTR',{octStr, octStrI, octStrE, 'octStr-I', 'octStrI-I', 'octStrE-I', 'octStr-E', 'octStrI-E', 'octStrE-E'}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTypeRefPrim",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSetTypeRefSeq.erl b/lib/asn1/test/testSetTypeRefSeq.erl
index 0c1c9400bf..a3ef4b188d 100644
--- a/lib/asn1/test/testSetTypeRefSeq.erl
+++ b/lib/asn1/test/testSetTypeRefSeq.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTypeRefSeq).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,15 +30,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTypeRefSeq",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes41} =
diff --git a/lib/asn1/test/testSetTypeRefSet.erl b/lib/asn1/test/testSetTypeRefSet.erl
index 6544e77458..ce77316ef8 100644
--- a/lib/asn1/test/testSetTypeRefSet.erl
+++ b/lib/asn1/test/testSetTypeRefSet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTypeRefSet).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -46,15 +45,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTypeRefSet",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testTCAP.erl b/lib/asn1/test/testTCAP.erl
index 5e29938a16..878ce7c070 100644
--- a/lib/asn1/test/testTCAP.erl
+++ b/lib/asn1/test/testTCAP.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,33 +19,23 @@
%%
-module(testTCAP).
--export([compile/3,test/2,compile_asn1config/3,test_asn1config/0]).
+-export([compile/2,test/2,compile_asn1config/2,test_asn1config/0]).
-include_lib("test_server/include/test_server.hrl").
+compile(Config, Options) ->
+ Files = ["Remote-Operations-Information-Objects",
+ "TCAPMessages",
+ "TCAPMessages-simple",
+ "TCAPPackage"],
+ asn1_test_lib:compile_all(Files, Config, Options),
+ asn1_test_lib:compile_erlang("TCAPPackage_msg", Config, []).
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Information-Objects",[Rules,{outdir,OutDir}]++Opt),
-% ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Generic-ROS-PDUs",[Rules,{outdir,OutDir}]++Opt),
-% ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Useful-Definitions",[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "TCAPMessages",[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "TCAPMessages-simple",[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "TCAPPackage",[Rules,{outdir,OutDir}]++Opt),
- ?line compile:file(filename:join([DataDir,"TCAPPackage_msg"]),[{i,OutDir},{outdir,OutDir}]).
-
-compile_asn1config(Config,Rules,Opt) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "TCAPPackage",
- [Rules,{outdir,OutDir},{i,DataDir}]++Opt).
+compile_asn1config(Config, Options) ->
+ Files = ["Remote-Operations-Information-Objects",
+ "TCAPPackage"],
+ asn1_test_lib:compile_all(Files, Config, Options),
+ asn1_test_lib:compile_erlang("TCAPPackage_msg", Config, []).
test(Erule,_Config) when Erule==ber;Erule==ber_bin;Erule==ber_bin_v2 ->
% ?line OutDir = ?config(priv_dir,Config),
diff --git a/lib/asn1/test/testTcapsystem.erl b/lib/asn1/test/testTcapsystem.erl
index 2f13c11cd4..4979a385b2 100644
--- a/lib/asn1/test/testTcapsystem.erl
+++ b/lib/asn1/test/testTcapsystem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,54 +19,46 @@
%%
-module(testTcapsystem).
--export([compile/3]).
+-export([compile/2]).
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line DataDir2 = filename:join([DataDir,tcapsystem]),
-
- ?line ok = asn1ct:compile(filename:join([DataDir2,"DialoguePDUs.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ApplicationContexts.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-BS-Code.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-CallHandlingOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-CH-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-CommonDataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-DialogueInformation.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ER-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-Errors.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ExtensionDataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-GR-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-Group-Call-Operations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-LCS-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-LocationServiceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-MobileServiceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-MS-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-OM-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-OperationAndMaintenanceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-Protocol.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SecureTransportOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ShortMessageServiceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SM-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SS-Code.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SS-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ST-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SupplementaryServiceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-TS-Code.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MobileDomainDefinitions.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"Remote-Operations-Generic-ROS-PDUs.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"Remote-Operations-Information-Objects.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"Remote-Operations-Useful-Definitions.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"TCAP-Examples.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"TCAPMessages.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"TCAP-Tools.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"TC-Notation-Extensions.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"UnidialoguePDUs.asn"]),[Rules,{outdir,OutDir}]++Opt).
-
-
+compile(Config, Options) ->
+ [asn1_test_lib:compile(filename:join([tcapsystem, M]), Config, Options)
+ || M <- ["DialoguePDUs.asn",
+ "MAP-ApplicationContexts.asn",
+ "MAP-BS-Code.asn",
+ "MAP-CallHandlingOperations.asn",
+ "MAP-CH-DataTypes.asn",
+ "MAP-CommonDataTypes.asn",
+ "MAP-DialogueInformation.asn",
+ "MAP-ER-DataTypes.asn",
+ "MAP-Errors.asn",
+ "MAP-ExtensionDataTypes.asn",
+ "MAP-GR-DataTypes.asn",
+ "MAP-Group-Call-Operations.asn",
+ "MAP-LCS-DataTypes.asn",
+ "MAP-LocationServiceOperations.asn",
+ "MAP-MobileServiceOperations.asn",
+ "MAP-MS-DataTypes.asn",
+ "MAP-OM-DataTypes.asn",
+ "MAP-OperationAndMaintenanceOperations.asn",
+ "MAP-Protocol.asn",
+ "MAP-SecureTransportOperations.asn",
+ "MAP-ShortMessageServiceOperations.asn",
+ "MAP-SM-DataTypes.asn",
+ "MAP-SS-Code.asn",
+ "MAP-SS-DataTypes.asn",
+ "MAP-ST-DataTypes.asn",
+ "MAP-SupplementaryServiceOperations.asn",
+ "MAP-TS-Code.asn",
+ "MobileDomainDefinitions.asn",
+ "Remote-Operations-Generic-ROS-PDUs.asn",
+ "Remote-Operations-Information-Objects.asn",
+ "Remote-Operations-Useful-Definitions.asn",
+ "TCAP-Examples.asn",
+ "TCAPMessages.asn",
+ "TCAP-Tools.asn",
+ "TC-Notation-Extensions.asn",
+ "UnidialoguePDUs.asn"]],
+ ok.
diff --git a/lib/asn1/test/testTimer.erl b/lib/asn1/test/testTimer.erl
index 74002e16e9..2d3b777558 100644
--- a/lib/asn1/test/testTimer.erl
+++ b/lib/asn1/test/testTimer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,12 +26,6 @@
-define(times, 5000).
-compile(Config,Enc,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ok = asn1ct:compile(DataDir++"H235-SECURITY-MESSAGES",[Enc,{outdir,OutDir}]++Options),
- ok = asn1ct:compile(DataDir++"H323-MESSAGES",[Enc,{outdir,OutDir}]++Options).
-
val() ->
_Value = {'H323-UserInformation',{'H323-UU-PDU',
{callProceeding,
diff --git a/lib/asn1/test/testTypeValueNotation.erl b/lib/asn1/test/testTypeValueNotation.erl
index f0699370e0..cd5223ef23 100644
--- a/lib/asn1/test/testTypeValueNotation.erl
+++ b/lib/asn1/test/testTypeValueNotation.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,60 +19,43 @@
%%
-module(testTypeValueNotation).
--export([compile/3]).
-export([main/2]).
-include_lib("test_server/include/test_server.hrl").
--record('Seq',{octstr, int, bool, enum, bitstr, null, oid, vstr}).
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTypeRefPrim",
- [Rules,{outdir,OutDir}]++Options),
- %% OTP-6695
- ?line ok = asn1ct:compile(DataDir ++ "ValueTest",
- [Rules,{outdir,OutDir}]++Options).
-
-
-main(Rules,Option) ->
-
- io:format("testTypeValueNotation:main/2 with arguments:~nRules: ~w, Option: ~w~n",[Rules,Option]),
- Value1 = #'Seq'{octstr = [1,2,3,4],
- int = 12,
- bool = true,
- enum = a,
- bitstr = [1,0,1,0],
- null = 'NULL',
- oid = {1,2,55},
- vstr = "Hello World"},
- Value2 = #'Seq'{octstr = {'OctStr',[1,2,3,4]},
- int = {'Int',12},
- bool = {'Bool',true},
- enum = {'Enum',a},
- bitstr = {'BitStr',[1,0,1,0]},
- null = {'Null','NULL'},
- oid = {'OId',{1,2,55}},
- vstr = {'VStr',"Hello World"}},
- case Option of
- optimize when Rules == per_bin; Rules == ber_bin ; Rules == uper_bin; Rules == ber_bin_v2 ->
- ?line {ok,Bytes} =
- asn1_wrapper:encode('SeqTypeRefPrim','Seq',Value1),
- ?line {error,_Reason} =
- asn1_wrapper:encode('SeqTypeRefPrim','Seq',Value2),
- ?line {ok,Value1} =
- asn1_wrapper:decode('SeqTypeRefPrim','Seq',Bytes);
- _ ->
- ?line {ok,Bytes} =
- asn1_wrapper:encode('SeqTypeRefPrim','Seq',Value1),
- ?line {ok,Bytes} =
- asn1_wrapper:encode('SeqTypeRefPrim','Seq',Value2),
- ?line {ok,Value1} =
- asn1_wrapper:decode('SeqTypeRefPrim','Seq',Bytes)
- end,
-
- ok.
+-record('Seq', {octstr, int, bool, enum, bitstr, null, oid, vstr}).
+
+main(Rule, Option) ->
+ Value1 = #'Seq'{octstr = [1, 2, 3, 4],
+ int = 12,
+ bool = true,
+ enum = a,
+ bitstr = [1, 0, 1, 0],
+ null = 'NULL',
+ oid = {1, 2, 55},
+ vstr = "Hello World"},
+ Value2 = #'Seq'{octstr = {'OctStr', [1, 2, 3, 4]},
+ int = {'Int', 12},
+ bool = {'Bool', true},
+ enum = {'Enum', a},
+ bitstr = {'BitStr', [1, 0, 1, 0]},
+ null = {'Null', 'NULL'},
+ oid = {'OId', {1, 2, 55}},
+ vstr = {'VStr', "Hello World"}},
+ main(Rule, Option, Value1, Value2).
+
+%% Value2 will fail for ber_bin_v2, per_bin with nifs (optimize) and uper_bin
+main(ber_bin_v2, _, Value1, Value2) -> encode_fail(Value1, Value2);
+main(per_bin, [optimize], Value1, Value2) -> encode_fail(Value1, Value2);
+main(uper_bin, [], Value1, Value2) -> encode_fail(Value1, Value2);
+main(_, _, Value1, Value2) -> encode_normal(Value1, Value2).
+
+encode_normal(Value1, Value2) ->
+ {ok, Bytes} = asn1_wrapper:encode('SeqTypeRefPrim', 'Seq', Value1),
+ {ok, Bytes} = asn1_wrapper:encode('SeqTypeRefPrim', 'Seq', Value2),
+ {ok, Value1} = asn1_wrapper:decode('SeqTypeRefPrim', 'Seq', Bytes).
+
+encode_fail(Value1, Value2) ->
+ {ok, Bytes} = asn1_wrapper:encode('SeqTypeRefPrim', 'Seq', Value1),
+ {error, _Reason} = asn1_wrapper:encode('SeqTypeRefPrim', 'Seq', Value2),
+ {ok, Value1} = asn1_wrapper:decode('SeqTypeRefPrim', 'Seq', Bytes).
diff --git a/lib/asn1/test/testX420.erl b/lib/asn1/test/testX420.erl
index 1d18e76c48..abdbbfe536 100644
--- a/lib/asn1/test/testX420.erl
+++ b/lib/asn1/test/testX420.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,32 +26,21 @@
-include_lib("test_server/include/test_server.hrl").
-compile(Erule,Options,Config) ->
-
+compile(Erule, Options, Config) ->
Specs = specs(),
- ?line 99 = length(Specs),
- ?line ok = compile_loop(Erule,Specs,Options,Config).
-
-
+ 99 = length(Specs),
+ ok = compile_loop(Erule,Specs,Options,Config).
-compile_loop(_Erule,[],_Options,_Config) ->
+compile_loop(_Erule, [], _Options, _Config) ->
ok;
-compile_loop(Erule,[Spec|Specs],Options,Config)
- when Erule == ber; Erule == ber_bin; Erule == ber_bin_v2;
- Erule == per ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
-
- case asn1ct:compile(DataDir ++ "/x420/" ++ Spec,[Erule,{outdir,OutDir},
- {i,OutDir}]++Options) of
- ok ->
- compile_loop(Erule,Specs,Options,Config);
- Error ->
- Error
- end;
-compile_loop(_Erule,_Specs,_Options,_Config) ->
- ok.%%{skip,io_lib:format("Not tested for ~p",[Erule])}.
+compile_loop(Erule, [Spec|Specs], Options, Config)
+ when Erule == ber; Erule == ber_bin; Erule == ber_bin_v2; Erule == per ->
+ CaseDir = ?config(case_dir, Config),
+ asn1_test_lib:compile(filename:join([x420, Spec]), Config,
+ [Erule, {i, CaseDir}]),
+ compile_loop(Erule, Specs, Options, Config);
+compile_loop(_Erule, _Specs, _Options, _Config) ->
+ ok.
specs() ->
@@ -91,7 +80,7 @@ specs() ->
"Protected-Part-Descriptors", "ProtocolObjectIdentifiers",
"Raster-Gr-Coding-Attributes", "Raster-Gr-Presentation-Attributes",
"Raster-Gr-Profile-Attributes", "Reliable-Transfer-APDU",
- "Remote-Operations-Abstract-Syntaxes",
+ "Remote-Operations-Abstract-Syntaxes",
"Remote-Operations-Generic-ROS-PDUs",
"Remote-Operations-Information-Objects-extensions",
"Remote-Operations-Information-Objects",
diff --git a/lib/asn1/test/test_bad_values.erl b/lib/asn1/test/test_bad_values.erl
deleted file mode 100644
index d379a509ab..0000000000
--- a/lib/asn1/test/test_bad_values.erl
+++ /dev/null
@@ -1,29 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
--module(test_bad_values).
-
--export([tests/1]).
--include_lib("test_server/include/test_server.hrl").
-
-tests(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line {error,_R} = asn1ct:compile(DataDir ++ "BadEnumValue1",[{outdir,OutDir}]),
- ok.
diff --git a/lib/asn1/test/test_compile_options.erl b/lib/asn1/test/test_compile_options.erl
index a622d5bfd2..4e732308d8 100644
--- a/lib/asn1/test/test_compile_options.erl
+++ b/lib/asn1/test/test_compile_options.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,10 +40,7 @@ wrong_path(Config) ->
comp(Parent,Config) ->
DataDir = ?config(data_dir,Config),
OutDir = ?config(priv_dir,Config),
- %%?line true = code:add_patha(?config(priv_dir,Config)),
- io:format("DataDir: ~p~n",[DataDir]),
?line Err=asn1ct:compile(DataDir++"NoImport",[{i,OutDir},{i,filename:join([DataDir,"subdir"])},{outdir,OutDir}]),
- io:format("compiling process terminated with value: ~p~n",[Err]),
Parent!Err.
%% OTP-5701
@@ -67,13 +64,7 @@ path(Config) ->
file:set_cwd(CWD),
ok.
-ticket_6143(Config) ->
- DataDir = ?config(data_dir,Config),
- OutDir = ?config(priv_dir,Config),
- io:format("DataDir: ~p~n",[DataDir]),
-
- ?line ok=asn1ct:compile(filename:join([DataDir,"AA1"]),[{i,DataDir},{outdir,OutDir}]),
- ok.
+ticket_6143(Config) -> asn1_test_lib:compile("AA1", Config, []).
noobj(Config) ->
DataDir = ?config(data_dir,Config),
diff --git a/lib/asn1/test/test_driver_load.erl b/lib/asn1/test/test_driver_load.erl
index 965f2473e9..e0e6602046 100644
--- a/lib/asn1/test/test_driver_load.erl
+++ b/lib/asn1/test/test_driver_load.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,29 +19,16 @@
%%
-module(test_driver_load).
--export([compile/2,test/2,encode/0]).
+-export([test/1,encode/0]).
-include_lib("test_server/include/test_server.hrl").
-test(per_bin,0) ->
+test(0) ->
ok;
-test(per_bin,N) ->
+test(N) ->
spawn(?MODULE,encode,[]),
- test(per_bin,N-1);
-test(_,_) ->
- ok.
-
-compile(Config,per_bin) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "P-Record",
- [per_bin,optimize,{outdir,OutDir}]);
-compile(_,Erule) ->
- {skip,lists:concat(["not implemented for version: ",Erule])}.
-
+ test(N-1).
encode() ->
?line Msg = msg(),
diff --git a/lib/asn1/test/test_inline.erl b/lib/asn1/test/test_inline.erl
index b7ec0d8921..62625572e3 100644
--- a/lib/asn1/test/test_inline.erl
+++ b/lib/asn1/test/test_inline.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,7 @@
%%
-module(test_inline).
--export([compile/3,main/1,inline1/3,performance/1,performance2/0]).
+-export([compile/2,main/2,inline1/3,performance/1,performance2/0]).
-export([mvrasn_inlined_encdec/2,mvrasn_encdec/2,
mi_encdec/2,m_encdec/2]).
@@ -27,52 +27,38 @@
-define(times, 5000).
-define(times2, 50000).
-compile(Config,_Rules,Opt) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line true = code:add_patha(DataDir),
-
- ?line ok=asn1ct:compile(DataDir++"Mvrasn.set.asn",[{inline,mvrasn_inlined},{outdir,OutDir}]++Opt),
- ?line ok=asn1ct:compile(DataDir++"Mvrasn-11-6.asn",[{outdir,OutDir}]++Opt),
+compile(Config, Options) ->
+ CaseDir = ?config(case_dir, Config),
+ asn1_test_lib:compile("Mvrasn.set.asn", Config, [{inline, mvrasn_inlined}|Options]),
+ asn1_test_lib:compile("Mod.set.asn", Config, [{inline, m}|Options]),
+ ok = remove_inlined_files(CaseDir, [filename:join([CaseDir, X])||X<-["m.erl", "m.beam"]]),
+ asn1_test_lib:compile("Mod.set.asn", Config, [inline|Options]),
+ ok = remove_inlined_files(CaseDir, []).
- ?line ok=asn1ct:compile(DataDir++"Mod.set.asn",[{inline,m},{outdir,OutDir}]++Opt),
- ?line ok=remove_inlined_files(OutDir,[filename:join([OutDir,X])||X<-["m.erl","m.beam"]]),
- ?line ok=asn1ct:compile(DataDir++"Mod.set.asn",[inline,{outdir,OutDir}]++Opt),
- ?line ok=remove_inlined_files(OutDir,[]).
-
-inline1(Config,Rule,Opt) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
-
- ?line ok=asn1ct:compile(DataDir++"P-Record",
- [{inline,'inlined_P_Record'},
- {outdir,OutDir}]++Opt),
- ?line test_inline1(),
-
- ?line ok=remove_inlined_files2(OutDir,ber_bin_v2),
+inline1(Config, Rule, Opt) ->
+ CaseDir = ?config(case_dir, Config),
+
+ asn1_test_lib:compile("P-Record", Config, [{inline, 'inlined_P_Record'}|Opt]),
+ test_inline1(),
+
+ ok=remove_inlined_files2(CaseDir, ber_bin_v2),
case Rule of
- ber_bin_v2 ->
- ?line ok=asn1ct:compile(DataDir++"P-Record",
- [inline,asn1config,ber_bin,optimize,
- {outdir,OutDir}]++Opt),
- ?line test_inline2(Rule,'P-Record'),
- ?line remove_inlined_files3(OutDir,Rule),
- io:format("compiling ~p~nwith ~p~n",
- [DataDir ++ "p_record.set.asn",
- [inline,asn1config,ber_bin,optimize,{outdir,OutDir}]++Opt]),
- ?line ok = asn1ct:compile(DataDir ++ "p_record.set.asn",
- [inline,asn1config,ber_bin,optimize,
- {outdir,OutDir}]++Opt),
- ?line test_inline2(Rule,'p_record'),
- ?line remove_inlined_files4(OutDir,Rule);
- _ ->
- ok
+ ber_bin_v2 ->
+ asn1_test_lib:compile("P-Record", Config,
+ [ber_bin, inline, asn1config, optimize|Opt]),
+ test_inline2(Rule, 'P-Record'),
+ remove_inlined_files3(CaseDir, Rule),
+ asn1_test_lib:compile("p_record.set.asn", Config,
+ [ber_bin, inline, asn1config, optimize|Opt]),
+ test_inline2(Rule, 'p_record'),
+ remove_inlined_files4(CaseDir, Rule);
+ _ ->
+ ok
end.
-main(_Erule) ->
- ?line Val = val(),
+main(Config, _Erule) ->
+ Val = val(Config),
?line {ok,Bytes}=asn1_wrapper:encode(mvrasn_inlined,'InsertSubscriberDataArg',Val),
?line {ok,_Val2}=asn1_wrapper:decode(mvrasn_inlined,'InsertSubscriberDataArg',Bytes).
@@ -94,14 +80,13 @@ test_inline2(ber_bin_v2,Mod) ->
test_inline2(_,_) ->
ok.
-val() ->
- ?line {ok,Val} = asn1ct:value('Mvrasn-11-6','InsertSubscriberDataArg'),
+val(Config) ->
+ {ok,Val} = asn1ct:value('Mvrasn','InsertSubscriberDataArg',
+ [{i, ?config(case_dir, Config)}]),
Val.
performance(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line true = code:add_patha(?config(data_dir,Config)),
- ?line Val = val(),
+ Val = val(Config),
%% warm up
timer:tc(?MODULE,mvrasn_inlined_encdec,[2,Val]),
%% performance test
diff --git a/lib/asn1/test/test_modified_x420.erl b/lib/asn1/test/test_modified_x420.erl
index 4e96db070b..2e9dfeee87 100644
--- a/lib/asn1/test/test_modified_x420.erl
+++ b/lib/asn1/test/test_modified_x420.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,18 +20,10 @@
-module(test_modified_x420).
%-compile(export_all).
--export([compile/1, test_io/1]).
+-export([test_io/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
-
- ok = asn1ct:compile(filename:join([DataDir,modified_x420,"PKCS7"]),[der,{outdir,OutDir}]),
- ok = asn1ct:compile(filename:join([DataDir,modified_x420,"InformationFramework"]),[der,{outdir,OutDir}]),
- ok = asn1ct:compile(filename:join([DataDir,modified_x420,"AuthenticationFramework"]),[der,{outdir,OutDir}]).
-
test_io(Config) ->
io:format("~p~n~n", [catch test(Config)]).
diff --git a/lib/asn1/test/test_partial_incomplete_decode.erl b/lib/asn1/test/test_partial_incomplete_decode.erl
index a2e0a96bd8..df56c27115 100644
--- a/lib/asn1/test/test_partial_incomplete_decode.erl
+++ b/lib/asn1/test/test_partial_incomplete_decode.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,40 +19,11 @@
%%
-module(test_partial_incomplete_decode).
--export([compile/3,test/2]).
+-export([test/1]).
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rule,Opt) when Rule == ber_bin_v2 ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "PartialDecSeq.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "PartialDecSeq2.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "PartialDecSeq3.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "PartialDecMyHTTP.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "MEDIA-GATEWAY-CONTROL.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "P-Record",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt);
-compile(_,Rule,_) ->
- {skip,lists:concat(["not implemented yet for version: ",Rule])}.
-
-test(ber_bin_v2,Config) ->
+test(Config) ->
FMsg = msg('F'),
?line {ok,Bytes} = asn1_wrapper:encode('PartialDecSeq','F',FMsg),
?line {ok,_} = asn1_wrapper:decode('PartialDecSeq','F',Bytes),
@@ -110,9 +81,7 @@ test(ber_bin_v2,Config) ->
%% test of MEDIA-GATEWAY-CONTROL
test_megaco(Config),
- ok;
-test(Erule,_) ->
- {skip,lists:concat(["not implemented yet for version: ",Erule])}.
+ ok.
test_megaco(Config) ->
?line DataDir = ?config(data_dir,Config),
diff --git a/lib/asn1/test/test_selective_decode.erl b/lib/asn1/test/test_selective_decode.erl
index e1e101b622..bb348611da 100644
--- a/lib/asn1/test/test_selective_decode.erl
+++ b/lib/asn1/test/test_selective_decode.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,12 +19,12 @@
%%
-module(test_selective_decode).
--export([test/2]).
+-export([test/0]).
-include_lib("test_server/include/test_server.hrl").
-test(ber_bin_v2,_Config) ->
+test() ->
FMsg = msg('F'),
?line {ok,Bytes} = asn1_wrapper:encode('PartialDecSeq','F',FMsg),
?line {ok,3} =
@@ -48,10 +48,7 @@ test(ber_bin_v2,_Config) ->
?line {ok,Bytes4} = asn1_wrapper:encode('P-Record','PersonnelRecord',
PRecMsg),
?line {ok,_} = 'P-Record':sel_dec(list_to_binary(Bytes4)),
-
- ok;
-test(Erule,_) ->
- {skip,lists:concat(["not implemented yet for version: ",Erule])}.
+ ok.
diff --git a/lib/asn1/test/test_special_decode_performance.erl b/lib/asn1/test/test_special_decode_performance.erl
index 60a95a3675..4ac0ff2b27 100644
--- a/lib/asn1/test/test_special_decode_performance.erl
+++ b/lib/asn1/test/test_special_decode_performance.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,25 +19,10 @@
%%
-module(test_special_decode_performance).
--export([compile/2,go/1,loop2/4,loop1/5]).
+-export([go/1,loop2/4,loop1/5]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rule) when Rule==ber_bin_v2 ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line asn1ct:compile(DataDir++"MEDIA-GATEWAY-CONTROL",
- [ber_bin,optimize,asn1config,{outdir,OutDir},
- {i,DataDir}]),
- ?line asn1ct:compile(DataDir++"PartialDecSeq",
- [ber_bin,optimize,asn1config,{outdir,OutDir},
- {i,DataDir}]);
-compile(_,Rule) ->
- {skip,lists:concat(["not implemented yet for version: ",Rule])}.
-
go(all) ->
{Time_S_s,Time_S_e,Time_S_c}=go(10000,'PartialDecSeq'),
{Time_MGC_s,Time_MGC_e,Time_MGC_c}=go(10000,'MEDIA-GATEWAY-CONTROL'),
diff --git a/lib/asn1/test/test_undecoded_rest.erl b/lib/asn1/test/test_undecoded_rest.erl
index 647fe2bb1c..36fd26ed59 100644
--- a/lib/asn1/test/test_undecoded_rest.erl
+++ b/lib/asn1/test/test_undecoded_rest.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,47 +19,35 @@
%%
-module(test_undecoded_rest).
--export([compile/3,test/1]).
+-export([test/2]).
-include_lib("test_server/include/test_server.hrl").
%% testing OTP-5104
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "P-Record",[Rules,{outdir,OutDir}]++Opt).
-
-
-test(Opt) ->
- ?line {ok,Msg} = asn1ct:value('P-Record','PersonnelRecord'),
- ?line {ok,Bytes} = asn1_wrapper:encode('P-Record','PersonnelRecord',Msg),
- Bytes2 =
- fun(B) when is_list(B) ->
- B ++ [55,55,55];
- (B) when is_binary(B) ->
- iolist_to_binary([B,<<55,55,55>>])
- end (Bytes),
-
+test(Opt, Config) ->
+ {ok, Msg} = asn1ct:value('P-Record', 'PersonnelRecord',
+ [{i, ?config(case_dir, Config)}]),
+ {ok, Bytes} = asn1_wrapper:encode('P-Record', 'PersonnelRecord', Msg),
+ Bytes2 = if is_list(Bytes) ->
+ Bytes ++ [55, 55, 55];
+ is_binary(Bytes) ->
+ iolist_to_binary([Bytes, <<55, 55, 55>>])
+ end,
case Opt of
- undec_rest ->
- ?line {ok,Msg,R}=asn1_wrapper:decode('P-Record','PersonnelRecord',
- Bytes2),
- ?line case R of
- <<55,55,55>> ->ok;
- [55,55,55] -> ok;
- BStr when is_bitstring(BStr) ->
- PadLen = (8 - (bit_size(BStr) rem 8)) rem 8,
- case <<0:PadLen,BStr/bitstring>> of
- <<0,55,55,55>> -> ok
- end
- end;
- _ ->
- ?line {ok,Msg} = asn1_wrapper:decode('P-Record','PersonnelRecord',
- Bytes2)
+ undec_rest ->
+ {ok, Msg, R} = asn1_wrapper:decode('P-Record', 'PersonnelRecord',
+ Bytes2),
+ case R of
+ <<55, 55, 55>> -> ok;
+ [55, 55, 55] -> ok;
+ BStr when is_bitstring(BStr) ->
+ PadLen = (8 - (bit_size(BStr) rem 8)) rem 8,
+ <<0, 55, 55, 55>> = <<0:PadLen, BStr/bitstring>>
+ end;
+ _ ->
+ {ok, Msg} = asn1_wrapper:decode('P-Record', 'PersonnelRecord',
+ Bytes2)
end,
ok.
diff --git a/lib/asn1/test/test_x691.erl b/lib/asn1/test/test_x691.erl
index bc8a3495d8..dcfa211d80 100644
--- a/lib/asn1/test/test_x691.erl
+++ b/lib/asn1/test/test_x691.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,25 +19,10 @@
%%
-module(test_x691).
--export([compile/3]).
-export([cases/2]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Option) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "P-RecordA1",
- [Rules, {outdir,OutDir}]++Option),
- ?line ok = asn1ct:compile(DataDir ++ "P-RecordA2",
- [Rules, {outdir,OutDir}]++Option),
- ?line ok = asn1ct:compile(DataDir ++ "P-RecordA3",
- [Rules, {outdir,OutDir}]++Option).
-
-
cases(Erule,Variant) ->
MsgA1 = a1(),
?line {ok,B1} = asn1_wrapper:encode('P-RecordA1','PersonnelRecord',MsgA1),
diff --git a/lib/common_test/doc/src/ct_hooks_chapter.xml b/lib/common_test/doc/src/ct_hooks_chapter.xml
index 8505ee8469..c5b4fd0073 100644
--- a/lib/common_test/doc/src/ct_hooks_chapter.xml
+++ b/lib/common_test/doc/src/ct_hooks_chapter.xml
@@ -429,6 +429,16 @@ terminate(State) ->
<seealso marker="sasl:sasl_app">SASL</seealso> events report
using the normal SASL mechanisms. </cell>
</row>
+ <row>
+ <cell>cth_surefire</cell>
+ <cell>no</cell>
+ <cell>Captures all test results and outputs them as surefire XML into
+ a file. The file which is created is by default called junit_report.xml.
+ The name can be by setting the path option for this hook. e.g.
+ <code>-ct_hooks cth_surefix [{path,"/tmp/report.xml"}]</code>
+ Surefire XML can forinstance be used by Jenkins to display test
+ results.</cell>
+ </row>
</table>
</section>
diff --git a/lib/common_test/priv/ct_default.css b/lib/common_test/priv/ct_default.css
index 75f8d5db8a..8ae6990cd8 100644
--- a/lib/common_test/priv/ct_default.css
+++ b/lib/common_test/priv/ct_default.css
@@ -81,13 +81,21 @@ div.copyright {
color: #000000;
}
-div.ct_internal {
+div.ct_internal {
background: lightgrey; color: black;
font-family: "Monaco", "Andale Mono", "Consolas", monospace;
font-size: .95em;
margin: .2em 0 0 0;
}
+div.ct_error_notify {
+ background: #CC0000;
+ color: #FFFFFF;
+ font-family: "Monaco", "Andale Mono", "Consolas", monospace;
+ font-size: 1.05em;
+ margin: .2em 0 0 0;
+}
+
div.default {
background: lightgreen; color: black;
font-family: "Monaco", "Andale Mono", "Consolas", monospace;
diff --git a/lib/common_test/src/Makefile b/lib/common_test/src/Makefile
index 125aa828fb..e9555de35a 100644
--- a/lib/common_test/src/Makefile
+++ b/lib/common_test/src/Makefile
@@ -69,7 +69,8 @@ MODULES= \
ct_slave \
ct_hooks\
ct_hooks_lock\
- cth_log_redirect
+ cth_log_redirect\
+ cth_surefire
TARGET_MODULES= $(MODULES:%=$(EBIN)/%)
BEAM_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
diff --git a/lib/common_test/src/common_test.app.src b/lib/common_test/src/common_test.app.src
index 7fba484b18..bdd48fbc6b 100644
--- a/lib/common_test/src/common_test.app.src
+++ b/lib/common_test/src/common_test.app.src
@@ -25,6 +25,8 @@
ct_framework,
ct_ftp,
ct_gen_conn,
+ ct_hooks,
+ ct_hooks_lock,
ct_logs,
ct_make,
ct_master,
@@ -45,7 +47,9 @@
ct_config,
ct_config_plain,
ct_config_xml,
- ct_slave
+ ct_slave,
+ cth_log_redirect,
+ cth_surefire
]},
{registered, [ct_logs,
ct_util_server,
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index e0e82283c4..63a8adbc63 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -64,7 +64,7 @@
print/1, print/2, print/3,
pal/1, pal/2, pal/3,
capture_start/0, capture_stop/0, capture_get/0, capture_get/1,
- fail/1, fail/2, comment/1, comment/2,
+ fail/1, fail/2, comment/1, comment/2, make_priv_dir/0,
testcases/2, userdata/2, userdata/3,
timetrap/1, get_timetrap_info/0, sleep/1]).
@@ -585,8 +585,16 @@ capture_get([]) ->
%%% @doc Terminate a test case with the given error
%%% <code>Reason</code>.
fail(Reason) ->
- exit({test_case_failed,Reason}).
-
+ try
+ exit({test_case_failed,Reason})
+ catch
+ Class:R ->
+ case erlang:get_stacktrace() of
+ [{?MODULE,fail,1,_}|Stk] -> ok;
+ Stk -> ok
+ end,
+ erlang:raise(Class, R, Stk)
+ end.
%%%-----------------------------------------------------------------
%%% @spec fail(Format, Args) -> void()
@@ -599,13 +607,21 @@ fail(Reason) ->
fail(Format, Args) ->
try io_lib:format(Format, Args) of
Str ->
- exit({test_case_failed,lists:flatten(Str)})
+ try
+ exit({test_case_failed,lists:flatten(Str)})
+ catch
+ Class:R ->
+ case erlang:get_stacktrace() of
+ [{?MODULE,fail,2,_}|Stk] -> ok;
+ Stk -> ok
+ end,
+ erlang:raise(Class, R, Stk)
+ end
catch
_:BadArgs ->
exit({BadArgs,{?MODULE,fail,[Format,Args]}})
end.
-
%%%-----------------------------------------------------------------
%%% @spec comment(Comment) -> void()
%%% Comment = term()
@@ -657,6 +673,15 @@ send_html_comment(Comment) ->
ct_util:set_testdata({comment,Html}),
test_server:comment(Html).
+%%%-----------------------------------------------------------------
+%%% @spec make_priv_dir() -> ok | {error,Reason}
+%%% Reason = term()
+%%% @doc If the test has been started with the create_priv_dir
+%%% option set to manual_per_tc, in order for the test case to use
+%%% the private directory, it must first create it by calling
+%%% this function.
+make_priv_dir() ->
+ test_server:make_priv_dir().
%%%-----------------------------------------------------------------
%%% @spec get_target_name(Handle) -> {ok,TargetName} | {error,Reason}
@@ -845,6 +870,8 @@ get_status() ->
get_testdata(Key) ->
case catch ct_util:get_testdata(Key) of
+ {error,ct_util_server_not_running} ->
+ no_tests_running;
Error = {error,_Reason} ->
Error;
{'EXIT',_Reason} ->
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl
index c24a7c238b..187794e78b 100644
--- a/lib/common_test/src/ct_framework.erl
+++ b/lib/common_test/src/ct_framework.erl
@@ -29,7 +29,8 @@
-export([get_logopts/0, format_comment/1, get_html_wrapper/3]).
--export([error_in_suite/1, ct_init_per_group/2, ct_end_per_group/2]).
+-export([error_in_suite/1, init_per_suite/1, end_per_suite/1,
+ init_per_group/2, end_per_group/2]).
-export([make_all_conf/3, make_conf/5]).
@@ -54,6 +55,7 @@
init_tc(Mod,Func,Config) ->
%% in case Mod == ct_framework, lookup the suite name
Suite = get_suite_name(Mod, Config),
+
%% check if previous testcase was interpreted and has left
%% a "dead" trace window behind - if so, kill it
case ct_util:get_testdata(interpret) of
@@ -63,27 +65,17 @@ init_tc(Mod,Func,Config) ->
_ ->
ok
end,
- %% check if we need to add defaults explicitly because
- %% there's no init_per_suite exported from Mod
- {InitFailed,DoInit} =
- case ct_util:get_testdata(curr_tc) of
- {Suite,{suite0_failed,_}=Failure} ->
- {Failure,false};
- {?MODULE,_} -> % should not really happen
- {false,false};
- {Suite,_} -> % Func is not 1st case in suite
- {false,false};
- _ when Func == init_per_suite -> % defaults will be added anyway
- {false,false};
- _ -> % first case in suite
- {false,true}
- end,
- case InitFailed of
- false ->
+
+ case ct_util:get_testdata(curr_tc) of
+ {Suite,{suite0_failed,{require,Reason}}} ->
+ {skip,{require_failed_in_suite0,Reason}};
+ {Suite,{suite0_failed,_}=Failure} ->
+ {skip,Failure};
+ _ ->
ct_util:set_testdata({curr_tc,{Suite,Func}}),
case ct_util:read_suite_data({seq,Suite,Func}) of
undefined ->
- init_tc1(Mod,Func,Config,DoInit);
+ init_tc1(Mod,Suite,Func,Config);
Seq when is_atom(Seq) ->
case ct_util:read_suite_data({seq,Suite,Seq}) of
[Func|TCs] -> % this is the 1st case in Seq
@@ -96,17 +88,13 @@ init_tc(Mod,Func,Config) ->
_ ->
ok
end,
- init_tc1(Mod,Func,Config,DoInit);
+ init_tc1(Mod,Suite,Func,Config);
{failed,Seq,BadFunc} ->
{skip,{sequence_failed,Seq,BadFunc}}
- end;
- {_,{require,Reason}} ->
- {skip,{require_failed_in_suite0,Reason}};
- _ ->
- {skip,InitFailed}
+ end
end.
-init_tc1(?MODULE,error_in_suite,[Config0],_) when is_list(Config0) ->
+init_tc1(?MODULE,_,error_in_suite,[Config0]) when is_list(Config0) ->
ct_logs:init_tc(false),
ct_event:notify(#event{name=tc_start,
node=node(),
@@ -117,14 +105,16 @@ init_tc1(?MODULE,error_in_suite,[Config0],_) when is_list(Config0) ->
Reason ->
{skip,Reason}
end;
-init_tc1(Mod,Func,[Config0],DoInit) when is_list(Config0) ->
+
+init_tc1(Mod,Suite,Func,[Config0]) when is_list(Config0) ->
Config1 =
case ct_util:read_suite_data(last_saved_config) of
- {{Mod,LastFunc},SavedConfig} -> % last testcase
+ {{Suite,LastFunc},SavedConfig} -> % last testcase
[{saved_config,{LastFunc,SavedConfig}} |
lists:keydelete(saved_config,1,Config0)];
- {{LastSuite,InitOrEnd},SavedConfig} when InitOrEnd == init_per_suite ;
- InitOrEnd == end_per_suite ->
+ {{LastSuite,InitOrEnd},
+ SavedConfig} when InitOrEnd == init_per_suite ;
+ InitOrEnd == end_per_suite ->
%% last suite
[{saved_config,{LastSuite,SavedConfig}} |
lists:keydelete(saved_config,1,Config0)];
@@ -133,13 +123,14 @@ init_tc1(Mod,Func,[Config0],DoInit) when is_list(Config0) ->
end,
ct_util:delete_suite_data(last_saved_config),
Config = lists:keydelete(watchdog,1,Config1),
- if Func /= init_per_suite, DoInit /= true ->
- ok;
- true ->
+
+ if Func == init_per_suite ->
%% delete all default values used in previous suite
ct_config:delete_default_config(suite),
%% release all name -> key bindings (once per suite)
- ct_config:release_allocated()
+ ct_config:release_allocated();
+ Func /= init_per_suite ->
+ ok
end,
GroupPath = ?val(tc_group_path, Config, []),
@@ -154,9 +145,7 @@ init_tc1(Mod,Func,[Config0],DoInit) when is_list(Config0) ->
true ->
ct_config:delete_default_config(testcase)
end,
- %% in case Mod == ct_framework, lookup the suite name
- Suite = get_suite_name(Mod, Config),
- case add_defaults(Mod,Func,AllGroups,DoInit) of
+ case add_defaults(Mod,Func,AllGroups) of
Error = {suite0_failed,_} ->
ct_logs:init_tc(false),
ct_event:notify(#event{name=tc_start,
@@ -166,35 +155,25 @@ init_tc1(Mod,Func,[Config0],DoInit) when is_list(Config0) ->
{error,Error};
{SuiteInfo,MergeResult} ->
case MergeResult of
- {error,Reason} when DoInit == false ->
+ {error,Reason} ->
ct_logs:init_tc(false),
ct_event:notify(#event{name=tc_start,
node=node(),
data={Mod,FuncSpec}}),
{skip,Reason};
_ ->
- init_tc2(Mod,Func,SuiteInfo,MergeResult,
- Config,DoInit)
+ init_tc2(Mod,Suite,Func,SuiteInfo,MergeResult,Config)
end
end;
-init_tc1(_Mod,_Func,Args,_DoInit) ->
- {ok,Args}.
-init_tc2(Mod,Func,SuiteInfo,MergeResult,Config,DoInit) ->
- %% if first testcase fails when there's no init_per_suite
- %% we must do suite/0 configurations before skipping test
- MergedInfo =
- case MergeResult of
- {error,_} when DoInit == true ->
- SuiteInfo;
- _ ->
- MergeResult
- end,
+init_tc1(_Mod,_Suite,_Func,Args) ->
+ {ok,Args}.
+init_tc2(Mod,Suite,Func,SuiteInfo,MergeResult,Config) ->
%% timetrap must be handled before require
- MergedInfo1 = timetrap_first(MergedInfo, [], []),
+ MergedInfo = timetrap_first(MergeResult, [], []),
%% tell logger to use specified style sheet
- case lists:keysearch(stylesheet,1,MergedInfo++Config) of
+ case lists:keysearch(stylesheet,1,MergeResult++Config) of
{value,{stylesheet,SSFile}} ->
ct_logs:set_stylesheet(Func,add_data_dir(SSFile,Config));
_ ->
@@ -209,7 +188,7 @@ init_tc2(Mod,Func,SuiteInfo,MergeResult,Config,DoInit) ->
%% list of {Type,Bool} tuples, e.g. {telnet,true}),
case ct_util:get_overridden_silenced_connections() of
undefined ->
- case lists:keysearch(silent_connections,1,MergedInfo++Config) of
+ case lists:keysearch(silent_connections,1,MergeResult++Config) of
{value,{silent_connections,Conns}} ->
ct_util:silence_connections(Conns);
_ ->
@@ -218,18 +197,14 @@ init_tc2(Mod,Func,SuiteInfo,MergeResult,Config,DoInit) ->
Conns ->
ct_util:silence_connections(Conns)
end,
- if Func /= init_per_suite, DoInit /= true ->
- ct_logs:init_tc(false);
- true ->
- ct_logs:init_tc(true)
- end,
+ ct_logs:init_tc(Func == init_per_suite),
FuncSpec = group_or_func(Func,Config),
ct_event:notify(#event{name=tc_start,
node=node(),
data={Mod,FuncSpec}}),
- case catch configure(MergedInfo1,MergedInfo1,SuiteInfo,
- {FuncSpec,DoInit},Config) of
+ case catch configure(MergedInfo,MergedInfo,SuiteInfo,
+ FuncSpec,Config) of
{suite0_failed,Reason} ->
ct_util:set_testdata({curr_tc,{Mod,{suite0_failed,{require,Reason}}}}),
{skip,{require_failed_in_suite0,Reason}};
@@ -246,7 +221,7 @@ init_tc2(Mod,Func,SuiteInfo,MergeResult,Config,DoInit) ->
_ ->
case get('$test_server_framework_test') of
undefined ->
- ct_suite_init(Mod, FuncSpec, FinalConfig);
+ ct_suite_init(Suite, FuncSpec, FinalConfig);
Fun ->
case Fun(init_tc, FinalConfig) of
NewConfig when is_list(NewConfig) ->
@@ -258,21 +233,21 @@ init_tc2(Mod,Func,SuiteInfo,MergeResult,Config,DoInit) ->
end
end.
-ct_suite_init(Mod, Func, [Config]) when is_list(Config) ->
- case ct_hooks:init_tc( Mod, Func, Config) of
+ct_suite_init(Suite, Func, [Config]) when is_list(Config) ->
+ case ct_hooks:init_tc(Suite, Func, Config) of
NewConfig when is_list(NewConfig) ->
{ok, [NewConfig]};
Else ->
Else
end.
-add_defaults(Mod,Func, GroupPath, DoInit) ->
+add_defaults(Mod,Func, GroupPath) ->
Suite = get_suite_name(Mod, GroupPath),
case (catch Suite:suite()) of
{'EXIT',{undef,_}} ->
SuiteInfo = merge_with_suite_defaults(Suite,[]),
SuiteInfoNoCTH = [I || I <- SuiteInfo, element(1,I) =/= ct_hooks],
- case add_defaults1(Mod,Func, GroupPath, SuiteInfoNoCTH, DoInit) of
+ case add_defaults1(Mod,Func, GroupPath, SuiteInfoNoCTH) of
Error = {error,_} -> {SuiteInfo,Error};
MergedInfo -> {SuiteInfo,MergedInfo}
end;
@@ -292,7 +267,7 @@ add_defaults(Mod,Func, GroupPath, DoInit) ->
SuiteInfoNoCTH = [I || I <- SuiteInfo1,
element(1,I) =/= ct_hooks],
case add_defaults1(Mod,Func, GroupPath,
- SuiteInfoNoCTH, DoInit) of
+ SuiteInfoNoCTH) of
Error = {error,_} -> {SuiteInfo1,Error};
MergedInfo -> {SuiteInfo1,MergedInfo}
end;
@@ -313,7 +288,7 @@ add_defaults(Mod,Func, GroupPath, DoInit) ->
{suite0_failed,bad_return_value}
end.
-add_defaults1(Mod,Func, GroupPath, SuiteInfo, DoInit) ->
+add_defaults1(Mod,Func, GroupPath, SuiteInfo) ->
Suite = get_suite_name(Mod, GroupPath),
%% GroupPathInfo (for subgroup on level X) =
%% [LevelXGroupInfo, LevelX-1GroupInfo, ..., TopLevelGroupInfo]
@@ -325,8 +300,7 @@ add_defaults1(Mod,Func, GroupPath, SuiteInfo, DoInit) ->
_ -> []
end
end, GroupPath),
- Args = if Func == init_per_group; Func == ct_init_per_group;
- Func == end_per_group; Func == ct_end_per_group ->
+ Args = if Func == init_per_group ; Func == end_per_group ->
[?val(name, hd(GroupPath))];
true ->
[]
@@ -347,7 +321,7 @@ add_defaults1(Mod,Func, GroupPath, SuiteInfo, DoInit) ->
(default_config == element(1,SDDef)))],
case check_for_clashes(TestCaseInfo, GroupPathInfo, SuiteReqs) of
[] ->
- add_defaults2(Mod,Func, TCAndGroupInfo,SuiteInfo,SuiteReqs, DoInit);
+ add_defaults2(Mod,Func, TCAndGroupInfo,SuiteInfo,SuiteReqs);
Clashes ->
{error,{config_name_already_in_use,Clashes}}
end.
@@ -421,34 +395,25 @@ keysmember([Key,Pos|Next], List) ->
keysmember([], _) -> true.
-add_defaults2(Mod,init_per_suite, IPSInfo, SuiteInfo,SuiteReqs, false) ->
- add_defaults2(Mod,init_per_suite, IPSInfo, SuiteInfo,SuiteReqs, true);
+add_defaults2(_Mod,init_per_suite, IPSInfo, SuiteInfo,SuiteReqs) ->
+ Info = lists:flatten([IPSInfo, SuiteReqs]),
+ lists:flatten([Info,remove_info_in_prev(Info, [SuiteInfo])]);
-add_defaults2(_Mod,IPG, IPGAndGroupInfo, SuiteInfo,SuiteReqs, DoInit) when
- IPG == init_per_group ; IPG == ct_init_per_group ->
- %% If DoInit == true, we have to process the suite() list, otherwise
- %% it has already been handled (see clause for init_per_suite)
- case DoInit of
- true ->
- %% note: we know for sure this is a top level group
- Info = lists:flatten([IPGAndGroupInfo, SuiteReqs]),
- Info ++ remove_info_in_prev(Info, [SuiteInfo]);
- false ->
- SuiteInfo1 =
- remove_info_in_prev(lists:flatten([IPGAndGroupInfo,
- SuiteReqs]), [SuiteInfo]),
- %% don't require terms in prev groups (already processed)
- case IPGAndGroupInfo of
- [IPGInfo] ->
- lists:flatten([IPGInfo,SuiteInfo1]);
- [IPGInfo | [CurrGroupInfo | PrevGroupInfo]] ->
- PrevGroupInfo1 = delete_require_terms(PrevGroupInfo),
- lists:flatten([IPGInfo,CurrGroupInfo,PrevGroupInfo1,
- SuiteInfo1])
- end
+add_defaults2(_Mod,init_per_group, IPGAndGroupInfo, SuiteInfo,SuiteReqs) ->
+ SuiteInfo1 =
+ remove_info_in_prev(lists:flatten([IPGAndGroupInfo,
+ SuiteReqs]), [SuiteInfo]),
+ %% don't require terms in prev groups (already processed)
+ case IPGAndGroupInfo of
+ [IPGInfo] ->
+ lists:flatten([IPGInfo,SuiteInfo1]);
+ [IPGInfo | [CurrGroupInfo | PrevGroupInfo]] ->
+ PrevGroupInfo1 = delete_require_terms(PrevGroupInfo),
+ lists:flatten([IPGInfo,CurrGroupInfo,PrevGroupInfo1,
+ SuiteInfo1])
end;
-add_defaults2(_Mod,_Func, TCAndGroupInfo, SuiteInfo,SuiteReqs, false) ->
+add_defaults2(_Mod,_Func, TCAndGroupInfo, SuiteInfo,SuiteReqs) ->
%% Include require elements from test case info and current group,
%% but not from previous groups or suite/0 (since we've already required
%% those vars). Let test case info elements override group and suite
@@ -463,14 +428,7 @@ add_defaults2(_Mod,_Func, TCAndGroupInfo, SuiteInfo,SuiteReqs, false) ->
PrevGroupInfo1 = delete_require_terms(PrevGroupInfo),
lists:flatten([TCInfo,CurrGroupInfo,PrevGroupInfo1,
SuiteInfo1])
- end;
-
-add_defaults2(_Mod,_Func, TCInfo, SuiteInfo,SuiteReqs, true) ->
- %% Here we have to process the suite info list also (no call to
- %% init_per_suite before this first test case). This TC can't belong
- %% to a group, or the clause for (ct_)init_per_group would've caught this.
- Info = lists:flatten([TCInfo, SuiteReqs]),
- lists:flatten([Info,remove_info_in_prev(Info, [SuiteInfo])]).
+ end.
delete_require_terms([Info | Prev]) ->
Info1 = [T || T <- Info,
@@ -558,18 +516,9 @@ configure([],_,_,_,Config) ->
%% function and be scoped 'group', or come from the testcase
%% info function and then be scoped 'testcase'
-required_default(Name,Key,Info,SuiteInfo,{FuncSpec,true}) ->
- case try_set_default(Name,Key,SuiteInfo,suite) of
- ok ->
- ok;
- _ ->
- required_default(Name,Key,Info,[],{FuncSpec,false})
- end;
-required_default(Name,Key,Info,_,{init_per_suite,_}) ->
+required_default(Name,Key,Info,_,init_per_suite) ->
try_set_default(Name,Key,Info,suite);
-required_default(Name,Key,Info,_,{{init_per_group,GrName,_},_}) ->
- try_set_default(Name,Key,Info,{group,GrName});
-required_default(Name,Key,Info,_,{{ct_init_per_group,GrName,_},_}) ->
+required_default(Name,Key,Info,_,{init_per_group,GrName,_}) ->
try_set_default(Name,Key,Info,{group,GrName});
required_default(Name,Key,Info,_,_FuncSpec) ->
try_set_default(Name,Key,Info,testcase).
@@ -621,6 +570,9 @@ end_tc(Mod,Func,{Result,[Args]}, Return) ->
end_tc(Mod,Func,self(),Result,Args,Return).
end_tc(Mod,Func,TCPid,Result,Args,Return) ->
+ %% in case Mod == ct_framework, lookup the suite name
+ Suite = get_suite_name(Mod, Args),
+
case lists:keysearch(watchdog,1,Args) of
{value,{watchdog,Dog}} -> test_server:timetrap_cancel(Dog);
false -> ok
@@ -636,60 +588,62 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) ->
end,
ct_util:delete_testdata(comment),
ct_util:delete_suite_data(last_saved_config),
- FuncSpec =
- case group_or_func(Func,Args) of
- {_,GroupName,_Props} = Group ->
- if Func == end_per_group; Func == ct_end_per_group ->
- ct_config:delete_default_config({group,GroupName});
- true -> ok
- end,
- case lists:keysearch(save_config,1,Args) of
- {value,{save_config,SaveConfig}} ->
- ct_util:save_suite_data(
- last_saved_config,
- {Mod,{group,GroupName}},
- SaveConfig),
- Group;
- false ->
- Group
- end;
- _ ->
- case lists:keysearch(save_config,1,Args) of
- {value,{save_config,SaveConfig}} ->
- ct_util:save_suite_data(last_saved_config,
- {Mod,Func},SaveConfig),
- Func;
- false ->
- Func
- end
- end,
- ct_util:reset_silent_connections(),
+
+ FuncSpec = case group_or_func(Func,Args) of
+ {_,_GroupName,_} = Group -> Group;
+ _ -> Func
+ end,
case get('$test_server_framework_test') of
undefined ->
{FinalResult,FinalNotify} =
case ct_hooks:end_tc(
- Mod, FuncSpec, Args, Result, Return) of
+ Suite, FuncSpec, Args, Result, Return) of
'$ct_no_change' ->
{ok,Result};
FinalResult1 ->
{FinalResult1,FinalResult1}
end,
- % send sync notification so that event handlers may print
- % in the log file before it gets closed
+ %% send sync notification so that event handlers may print
+ %% in the log file before it gets closed
ct_event:sync_notify(#event{name=tc_done,
node=node(),
data={Mod,FuncSpec,
tag_cth(FinalNotify)}});
Fun ->
- % send sync notification so that event handlers may print
- % in the log file before it gets closed
+ %% send sync notification so that event handlers may print
+ %% in the log file before it gets closed
ct_event:sync_notify(#event{name=tc_done,
node=node(),
data={Mod,FuncSpec,tag(Result)}}),
FinalResult = Fun(end_tc, Return)
+ end,
+
+ case FuncSpec of
+ {_,GroupName,_Props} ->
+ if Func == end_per_group ->
+ ct_config:delete_default_config({group,GroupName});
+ true -> ok
+ end,
+ case lists:keysearch(save_config,1,Args) of
+ {value,{save_config,SaveConfig}} ->
+ ct_util:save_suite_data(last_saved_config,
+ {Suite,{group,GroupName}},
+ SaveConfig);
+ false ->
+ ok
+ end;
+ _ ->
+ case lists:keysearch(save_config,1,Args) of
+ {value,{save_config,SaveConfig}} ->
+ ct_util:save_suite_data(last_saved_config,
+ {Suite,Func},SaveConfig);
+ false ->
+ ok
+ end
end,
+ ct_util:reset_silent_connections(),
case FinalResult of
{skip,{sequence_failed,_,_}} ->
@@ -706,7 +660,7 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) ->
end,
case Func of
end_per_suite ->
- ct_util:match_delete_suite_data({seq,Mod,'_'});
+ ct_util:match_delete_suite_data({seq,Suite,'_'});
_ ->
ok
end,
@@ -806,31 +760,36 @@ error_notification(Mod,Func,_Args,{Error,Loc}) ->
end
end,
- io:format(user, "~n- - - - - - - - - - - - - - - - "
- "- - - - - - - - - -~n", []),
+ PrintErr = fun(ErrFormat, ErrArgs) ->
+ Div = "~n- - - - - - - - - - - - - - - - "
+ "- - - - - - - - - -~n",
+ io:format(user, lists:concat([Div,ErrFormat,Div,"~n"]),
+ ErrArgs),
+ ct_logs:tc_log(ct_error_notify, "CT Error Notification",
+ ErrFormat, ErrArgs)
+ end,
case Loc of
- %% we don't use the line parse transform as we compile this
- %% module so location will be on form {M,F}
[{?MODULE,error_in_suite}] ->
- io:format(user, "Error in suite detected: ~s", [ErrStr]);
+ PrintErr("Error in suite detected: ~s", [ErrStr]);
- R when R == unknown; R == undefined ->
- io:format(user, "Error detected: ~s", [ErrStr]);
+ R when R == unknown; R == undefined ->
+ PrintErr("Error detected: ~s", [ErrStr]);
%% if a function specified by all/0 does not exist, we
%% pick up undef here
- [{LastMod,LastFunc}] ->
- io:format(user, "~w:~w could not be executed~n",
- [LastMod,LastFunc]),
- io:format(user, "Reason: ~s", [ErrStr]);
+ [{LastMod,LastFunc}|_] when ErrStr == "undef" ->
+ PrintErr("~w:~w could not be executed~nReason: ~s",
+ [LastMod,LastFunc,ErrStr]);
+
+ [{LastMod,LastFunc}|_] ->
+ PrintErr("~w:~w failed~nReason: ~s", [LastMod,LastFunc,ErrStr]);
[{LastMod,LastFunc,LastLine}|_] ->
%% print error to console, we are only
%% interested in the last executed expression
- io:format(user, "~w:~w failed on line ~w~n",
- [LastMod,LastFunc,LastLine]),
- io:format(user, "Reason: ~s", [ErrStr]),
-
+ PrintErr("~w:~w failed on line ~w~nReason: ~s",
+ [LastMod,LastFunc,LastLine,ErrStr]),
+
case ct_util:read_suite_data({seq,Mod,Func}) of
undefined ->
ok;
@@ -839,8 +798,6 @@ error_notification(Mod,Func,_Args,{Error,Loc}) ->
mark_as_failed(Seq,Mod,Func,SeqTCs)
end
end,
- io:format(user, "~n- - - - - - - - - - - - - - - - "
- "- - - - - - - - - -~n~n", []),
ok.
%% cases in seq that have already run
@@ -861,9 +818,7 @@ mark_as_failed1(_,_,_,[]) ->
ok.
group_or_func(Func, Config) when Func == init_per_group;
- Func == end_per_group;
- Func == ct_init_per_group;
- Func == ct_end_per_group ->
+ Func == end_per_group ->
case ?val(tc_group_properties, Config) of
undefined ->
{Func,unknown,[]};
@@ -1206,8 +1161,8 @@ make_conf(Mod, Name, Props, TestSpec) ->
"end_per_group/2 missing for group "
"~p in ~p, using default.",
[Name,Mod]),
- {{?MODULE,ct_init_per_group},
- {?MODULE,ct_end_per_group},
+ {{?MODULE,init_per_group},
+ {?MODULE,end_per_group},
[{suite,Mod}]}
end,
{conf,[{name,Name}|Props++ExtraProps],InitConf,TestSpec,EndConf}.
@@ -1467,22 +1422,31 @@ error_in_suite(Config) ->
Reason = test_server:lookup_config(error,Config),
exit(Reason).
+%% if init_per_suite and end_per_suite are missing in the suite,
+%% these will be called instead (without any trace of them in the
+%% log files), only so that it's possible to call hook functions
+%% for configuration
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
%% if the group config functions are missing in the suite,
%% use these instead
-ct_init_per_group(GroupName, Config) ->
+init_per_group(GroupName, Config) ->
ct:comment(io_lib:format("start of ~p", [GroupName])),
ct_logs:log("TEST INFO", "init_per_group/2 for ~w missing "
"in suite, using default.",
[GroupName]),
Config.
-ct_end_per_group(GroupName, _) ->
+end_per_group(GroupName, _) ->
ct:comment(io_lib:format("end of ~p", [GroupName])),
ct_logs:log("TEST INFO", "end_per_group/2 for ~w missing "
"in suite, using default.",
[GroupName]),
ok.
-
%%%-----------------------------------------------------------------
%%% @spec report(What,Data) -> ok
@@ -1559,10 +1523,6 @@ report(What,Data) ->
ok;
{end_per_group,_} ->
ok;
- {ct_init_per_group,_} ->
- ok;
- {ct_end_per_group,_} ->
- ok;
{_,ok} ->
add_to_stats(ok);
{_,{skipped,{failed,{_,init_per_testcase,_}}}} ->
@@ -1599,8 +1559,7 @@ report(What,Data) ->
data=Data}),
ct_hooks:on_tc_skip(What, Data),
if Case /= end_per_suite,
- Case /= end_per_group,
- Case /= ct_end_per_group ->
+ Case /= end_per_group ->
add_to_stats(auto_skipped);
true ->
ok
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index c42adbbdd9..2a23cd992b 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -70,8 +70,7 @@ terminate(Hooks) ->
{skip, Reason :: term()} |
{auto_skip, Reason :: term()} |
{fail, Reason :: term()}.
-init_tc(ct_framework, _Func, Args) ->
- Args;
+
init_tc(Mod, init_per_suite, Config) ->
Info = try proplists:get_value(ct_hooks, Mod:suite(),[]) of
List when is_list(List) ->
@@ -104,27 +103,21 @@ init_tc(_Mod, TC, Config) ->
{auto_skip, Reason :: term()} |
{fail, Reason :: term()} |
ok | '$ct_no_change'.
-end_tc(ct_framework, _Func, _Args, Result, _Return) ->
- Result;
end_tc(Mod, init_per_suite, Config, _Result, Return) ->
call(fun call_generic/3, Return, [post_init_per_suite, Mod, Config],
'$ct_no_change');
-
end_tc(Mod, end_per_suite, Config, Result, _Return) ->
call(fun call_generic/3, Result, [post_end_per_suite, Mod, Config],
'$ct_no_change');
-
end_tc(_Mod, {init_per_group, GroupName, _}, Config, _Result, Return) ->
call(fun call_generic/3, Return, [post_init_per_group, GroupName, Config],
'$ct_no_change');
-
end_tc(Mod, {end_per_group, GroupName, Opts}, Config, Result, _Return) ->
Res = call(fun call_generic/3, Result,
[post_end_per_group, GroupName, Config], '$ct_no_change'),
maybe_stop_locker(Mod, GroupName,Opts),
Res;
-
end_tc(_Mod, TC, Config, Result, _Return) ->
call(fun call_generic/3, Result, [post_end_per_testcase, TC, Config],
'$ct_no_change').
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index 19ad7b26d8..0cd9b5f7cb 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -38,7 +38,7 @@
-export([get_ts_html_wrapper/3]).
%% Logging stuff directly from testcase
--export([tc_log/3,tc_print/3,tc_pal/3,ct_log/3,
+-export([tc_log/3,tc_log/4,tc_log_async/3,tc_print/3,tc_pal/3,ct_log/3,
basic_html/0]).
%% Simulate logger process for use without ct environment running
@@ -239,7 +239,7 @@ end_tc(TCPid) ->
%%% activity it is. <code>Format</code> and <code>Args</code> is the
%%% data to log (as in <code>io:format(Format,Args)</code>).</p>
log(Heading,Format,Args) ->
- cast({log,self(),group_leader(),
+ cast({log,sync,self(),group_leader(),
[{int_header(),[log_timestamp(now()),Heading]},
{Format,Args},
{int_footer(),[]}]}),
@@ -261,7 +261,7 @@ log(Heading,Format,Args) ->
%%% @see cont_log/2
%%% @see end_log/0
start_log(Heading) ->
- cast({log,self(),group_leader(),
+ cast({log,sync,self(),group_leader(),
[{int_header(),[log_timestamp(now()),Heading]}]}),
ok.
@@ -276,7 +276,7 @@ cont_log([],[]) ->
ok;
cont_log(Format,Args) ->
maybe_log_timestamp(),
- cast({log,self(),group_leader(),[{Format,Args}]}),
+ cast({log,sync,self(),group_leader(),[{Format,Args}]}),
ok.
%%%-----------------------------------------------------------------
@@ -287,7 +287,7 @@ cont_log(Format,Args) ->
%%% @see start_log/1
%%% @see cont_log/2
end_log() ->
- cast({log,self(),group_leader(),[{int_footer(), []}]}),
+ cast({log,sync,self(),group_leader(),[{int_footer(), []}]}),
ok.
@@ -333,9 +333,32 @@ add_link(Heading,File,Type) ->
%%% stuff directly from a testcase (i.e. not from within the CT
%%% framework).</p>
tc_log(Category,Format,Args) ->
- cast({log,self(),group_leader(),[{div_header(Category),[]},
- {Format,Args},
- {div_footer(),[]}]}),
+ tc_log(Category,"User",Format,Args).
+
+tc_log(Category,Printer,Format,Args) ->
+ cast({log,sync,self(),group_leader(),[{div_header(Category,Printer),[]},
+ {Format,Args},
+ {div_footer(),[]}]}),
+ ok.
+
+
+%%%-----------------------------------------------------------------
+%%% @spec tc_log_async(Category,Format,Args) -> ok
+%%% Category = atom()
+%%% Format = string()
+%%% Args = list()
+%%%
+%%% @doc Internal use only.
+%%%
+%%% <p>This function is used to perform asynchronous printouts
+%%% towards the test server IO handler. This is necessary in order
+%%% to avoid deadlocks when e.g. the hook that handles SASL printouts
+%%% prints to the test case log file at the same time test server
+%%% asks ct_logs for an html wrapper.</p>
+tc_log_async(Category,Format,Args) ->
+ cast({log,async,self(),group_leader(),[{div_header(Category),[]},
+ {Format,Args},
+ {div_footer(),[]}]}),
ok.
%%%-----------------------------------------------------------------
@@ -349,19 +372,18 @@ tc_log(Category,Format,Args) ->
%%% <p>This function is called by <code>ct</code> when printing
%%% stuff a testcase on the user console.</p>
tc_print(Category,Format,Args) ->
- print_heading(Category),
- io:format(user,Format,Args),
- io:format(user,"\n\n",[]),
+ Head = get_heading(Category),
+ io:format(user, lists:concat([Head,Format,"\n\n"]), Args),
ok.
-print_heading(default) ->
- io:format(user,
- "----------------------------------------------------\n~s\n",
- [log_timestamp(now())]);
-print_heading(Category) ->
- io:format(user,
- "----------------------------------------------------\n~s ~w\n",
- [log_timestamp(now()),Category]).
+get_heading(default) ->
+ io_lib:format("-----------------------------"
+ "-----------------------\n~s\n",
+ [log_timestamp(now())]);
+get_heading(Category) ->
+ io_lib:format("-----------------------------"
+ "-----------------------\n~s ~w\n",
+ [log_timestamp(now()),Category]).
%%%-----------------------------------------------------------------
@@ -377,9 +399,9 @@ print_heading(Category) ->
%%% log and on the console.</p>
tc_pal(Category,Format,Args) ->
tc_print(Category,Format,Args),
- cast({log,self(),group_leader(),[{div_header(Category),[]},
- {Format,Args},
- {div_footer(),[]}]}),
+ cast({log,sync,self(),group_leader(),[{div_header(Category),[]},
+ {Format,Args},
+ {div_footer(),[]}]}),
ok.
@@ -408,8 +430,10 @@ int_footer() ->
"</div>".
div_header(Class) ->
- "<div class=\"" ++ atom_to_list(Class) ++ "\"><b>*** User " ++
- log_timestamp(now()) ++ " ***</b>".
+ div_header(Class,"User").
+div_header(Class,Printer) ->
+ "<div class=\"" ++ atom_to_list(Class) ++ "\"><b>*** " ++ Printer ++
+ " " ++ log_timestamp(now()) ++ " ***</b>".
div_footer() ->
"</div>".
@@ -420,7 +444,7 @@ maybe_log_timestamp() ->
{MS,S,_} ->
ok;
_ ->
- cast({log,self(),group_leader(),
+ cast({log,sync,self(),group_leader(),
[{"<i>~s</i>",[log_timestamp({MS,S,US})]}]})
end.
@@ -441,7 +465,8 @@ log_timestamp({MS,S,US}) ->
orig_GL,
ct_log_fd,
tc_groupleaders,
- stylesheet}).
+ stylesheet,
+ async_print_jobs}).
logger(Parent,Mode) ->
register(?MODULE,self()),
@@ -520,50 +545,32 @@ logger(Parent,Mode) ->
start_time=Time,
orig_GL=group_leader(),
ct_log_fd=CtLogFd,
- tc_groupleaders=[]}).
+ tc_groupleaders=[],
+ async_print_jobs=[]}).
logger_loop(State) ->
receive
- {log,Pid,GL,List} ->
- case get_groupleader(Pid,GL,State) of
+ {log,SyncOrAsync,Pid,GL,List} ->
+ case get_groupleader(Pid, GL, State) of
{tc_log,TCGL,TCGLs} ->
case erlang:is_process_alive(TCGL) of
true ->
- %% we have to build one io-list of all strings
- %% before printing, or other io printouts (made in
- %% parallel) may get printed between this header
- %% and footer
- Fun =
- fun({Str,Args},IoList) ->
- case catch io_lib:format(Str,Args) of
- {'EXIT',_Reason} ->
- Fd = State#logger_state.ct_log_fd,
- io:format(Fd,
- "Logging fails! "
- "Str: ~p, Args: ~p~n",
- [Str,Args]),
- %% stop the testcase, we need
- %% to see the fault
- exit(Pid,{log_printout_error,Str,Args}),
- [];
- IoStr when IoList == [] ->
- [IoStr];
- IoStr ->
- [IoList,"\n",IoStr]
- end
- end,
- io:format(TCGL,"~s",[lists:foldl(Fun,[],List)]),
- logger_loop(State#logger_state{tc_groupleaders=TCGLs});
+ State1 = print_to_log(SyncOrAsync, Pid, TCGL,
+ List, State),
+ logger_loop(State1#logger_state{tc_groupleaders =
+ TCGLs});
false ->
- %% Group leader is dead, so write to the CtLog instead
+ %% Group leader is dead, so write to the
+ %% CtLog instead
Fd = State#logger_state.ct_log_fd,
[begin io:format(Fd,Str,Args),io:nl(Fd) end ||
{Str,Args} <- List],
logger_loop(State)
end;
{ct_log,Fd,TCGLs} ->
- [begin io:format(Fd,Str,Args),io:nl(Fd) end || {Str,Args} <- List],
- logger_loop(State#logger_state{tc_groupleaders=TCGLs})
+ [begin io:format(Fd,Str,Args),io:nl(Fd) end ||
+ {Str,Args} <- List],
+ logger_loop(State#logger_state{tc_groupleaders = TCGLs})
end;
{{init_tc,TCPid,GL,RefreshLog},From} ->
print_style(GL, State#logger_state.stylesheet),
@@ -575,11 +582,12 @@ logger_loop(State) ->
make_last_run_index(State#logger_state.start_time)
end,
return(From,ok),
- logger_loop(State#logger_state{tc_groupleaders=TCGLs});
+ logger_loop(State#logger_state{tc_groupleaders = TCGLs});
{{end_tc,TCPid},From} ->
set_evmgr_gl(State#logger_state.ct_log_fd),
return(From,ok),
- logger_loop(State#logger_state{tc_groupleaders=rm_tc_gl(TCPid,State)});
+ logger_loop(State#logger_state{tc_groupleaders =
+ rm_tc_gl(TCPid,State)});
{{get_log_dir,true},From} ->
return(From,{ok,State#logger_state.log_dir}),
logger_loop(State);
@@ -590,21 +598,35 @@ logger_loop(State) ->
make_last_run_index(State#logger_state.start_time),
return(From,filename:basename(State#logger_state.log_dir)),
logger_loop(State);
- {set_stylesheet,_,SSFile} when State#logger_state.stylesheet == SSFile ->
+ {set_stylesheet,_,SSFile} when State#logger_state.stylesheet ==
+ SSFile ->
logger_loop(State);
{set_stylesheet,TC,SSFile} ->
Fd = State#logger_state.ct_log_fd,
- io:format(Fd, "~p loading external style sheet: ~s~n", [TC,SSFile]),
- logger_loop(State#logger_state{stylesheet=SSFile});
+ io:format(Fd, "~p loading external style sheet: ~s~n",
+ [TC,SSFile]),
+ logger_loop(State#logger_state{stylesheet = SSFile});
{clear_stylesheet,_} when State#logger_state.stylesheet == undefined ->
logger_loop(State);
{clear_stylesheet,_} ->
- logger_loop(State#logger_state{stylesheet=undefined});
+ logger_loop(State#logger_state{stylesheet = undefined});
{ct_log, List} ->
Fd = State#logger_state.ct_log_fd,
[begin io:format(Fd,Str,Args),io:nl(Fd) end ||
{Str,Args} <- List],
logger_loop(State);
+ {'DOWN',Ref,_,_Pid,_} ->
+ %% there might be print jobs executing in parallel with ct_logs
+ %% and whenever one is finished (indicated by 'DOWN'), the
+ %% next job should be spawned
+ case lists:delete(Ref, State#logger_state.async_print_jobs) of
+ [] ->
+ logger_loop(State#logger_state{async_print_jobs = []});
+ Jobs ->
+ [Next|JobsRev] = lists:reverse(Jobs),
+ Jobs1 = [print_next(Next)|lists:reverse(JobsRev)],
+ logger_loop(State#logger_state{async_print_jobs = Jobs1})
+ end;
stop ->
io:format(State#logger_state.ct_log_fd,
int_header()++int_footer(),
@@ -613,6 +635,49 @@ logger_loop(State) ->
ok
end.
+create_io_fun(FromPid, State) ->
+ %% we have to build one io-list of all strings
+ %% before printing, or other io printouts (made in
+ %% parallel) may get printed between this header
+ %% and footer
+ Fd = State#logger_state.ct_log_fd,
+ fun({Str,Args}, IoList) ->
+ case catch io_lib:format(Str,Args) of
+ {'EXIT',_Reason} ->
+ io:format(Fd, "Logging fails! Str: ~p, Args: ~p~n",
+ [Str,Args]),
+ %% stop the testcase, we need to see the fault
+ exit(FromPid, {log_printout_error,Str,Args}),
+ [];
+ IoStr when IoList == [] ->
+ [IoStr];
+ IoStr ->
+ [IoList,"\n",IoStr]
+ end
+ end.
+
+print_to_log(sync, FromPid, TCGL, List, State) ->
+ IoFun = create_io_fun(FromPid, State),
+ io:format(TCGL, "~s", [lists:foldl(IoFun, [], List)]),
+ State;
+
+print_to_log(async, FromPid, TCGL, List, State) ->
+ IoFun = create_io_fun(FromPid, State),
+ Printer = fun() ->
+ io:format(TCGL, "~s", [lists:foldl(IoFun, [], List)])
+ end,
+ case State#logger_state.async_print_jobs of
+ [] ->
+ {_Pid,Ref} = spawn_monitor(Printer),
+ State#logger_state{async_print_jobs = [Ref]};
+ Queue ->
+ State#logger_state{async_print_jobs = [Printer|Queue]}
+ end.
+
+print_next(PrintFun) ->
+ {_Pid,Ref} = spawn_monitor(PrintFun),
+ Ref.
+
%% #logger_state.tc_groupleaders == [{Pid,{Type,GLPid}},...]
%% Type = tc | io
%%
@@ -855,33 +920,48 @@ insert_dir(D,[D1|Ds]) ->
insert_dir(D,[]) ->
[D].
-make_last_run_index([Name|Rest], Result, TotSucc, TotFail, UserSkip, AutoSkip,
- TotNotBuilt, Missing) ->
- case last_test(Name) of
+make_last_run_index([Name|Rest], Result, TotSucc, TotFail,
+ UserSkip, AutoSkip, TotNotBuilt, Missing) ->
+ case get_run_dirs(Name) of
false ->
%% Silently skip.
- make_last_run_index(Rest, Result, TotSucc, TotFail, UserSkip, AutoSkip,
- TotNotBuilt, Missing);
- LastLogDir ->
+ make_last_run_index(Rest, Result, TotSucc, TotFail,
+ UserSkip, AutoSkip, TotNotBuilt, Missing);
+ LogDirs ->
SuiteName = filename:rootname(filename:basename(Name)),
- case make_one_index_entry(SuiteName, LastLogDir, "-", false, Missing) of
- {Result1,Succ,Fail,USkip,ASkip,NotBuilt} ->
- %% for backwards compatibility
- AutoSkip1 = case catch AutoSkip+ASkip of
- {'EXIT',_} -> undefined;
- Res -> Res
- end,
- make_last_run_index(Rest, [Result|Result1], TotSucc+Succ,
- TotFail+Fail, UserSkip+USkip, AutoSkip1,
- TotNotBuilt+NotBuilt, Missing);
- error ->
- make_last_run_index(Rest, Result, TotSucc, TotFail, UserSkip, AutoSkip,
- TotNotBuilt, Missing)
- end
+ {Result1,TotSucc1,TotFail1,UserSkip1,AutoSkip1,TotNotBuilt1} =
+ make_last_run_index1(SuiteName, LogDirs, Result,
+ TotSucc, TotFail,
+ UserSkip, AutoSkip,
+ TotNotBuilt, Missing),
+ make_last_run_index(Rest, Result1, TotSucc1, TotFail1,
+ UserSkip1, AutoSkip1,
+ TotNotBuilt1, Missing)
end;
+
make_last_run_index([], Result, TotSucc, TotFail, UserSkip, AutoSkip, TotNotBuilt, _) ->
{ok, [Result|total_row(TotSucc, TotFail, UserSkip, AutoSkip, TotNotBuilt, false)],
{TotSucc,TotFail,UserSkip,AutoSkip,TotNotBuilt}}.
+
+make_last_run_index1(SuiteName, [LogDir | LogDirs], Result, TotSucc, TotFail,
+ UserSkip, AutoSkip, TotNotBuilt, Missing) ->
+ case make_one_index_entry(SuiteName, LogDir, "-", false, Missing) of
+ {Result1,Succ,Fail,USkip,ASkip,NotBuilt} ->
+ %% for backwards compatibility
+ AutoSkip1 = case catch AutoSkip+ASkip of
+ {'EXIT',_} -> undefined;
+ Res -> Res
+ end,
+ make_last_run_index1(SuiteName, LogDirs, [Result|Result1], TotSucc+Succ,
+ TotFail+Fail, UserSkip+USkip, AutoSkip1,
+ TotNotBuilt+NotBuilt, Missing);
+ error ->
+ make_last_run_index1(SuiteName, LogDirs, Result, TotSucc, TotFail,
+ UserSkip, AutoSkip, TotNotBuilt, Missing)
+ end;
+make_last_run_index1(_, [], Result, TotSucc, TotFail,
+ UserSkip, AutoSkip, TotNotBuilt, _) ->
+ {Result,TotSucc,TotFail,UserSkip,AutoSkip,TotNotBuilt}.
make_one_index_entry(SuiteName, LogDir, Label, All, Missing) ->
case count_cases(LogDir) of
@@ -1633,8 +1713,8 @@ make_all_suites_index(NewTestData = {_TestName,DirName}) ->
sort_logdirs([Dir|Dirs],Groups) ->
TestName = filename:rootname(filename:basename(Dir)),
case filelib:wildcard(filename:join(Dir,"run.*")) of
- [RunDir] ->
- Groups1 = insert_test(TestName,{filename:basename(RunDir),RunDir},Groups),
+ RunDirs = [_|_] ->
+ Groups1 = sort_logdirs1(TestName,RunDirs,Groups),
sort_logdirs(Dirs,Groups1);
_ -> % ignore missing run directory
sort_logdirs(Dirs,Groups)
@@ -1642,6 +1722,12 @@ sort_logdirs([Dir|Dirs],Groups) ->
sort_logdirs([],Groups) ->
lists:keysort(1,sort_each_group(Groups)).
+sort_logdirs1(TestName,[RunDir|RunDirs],Groups) ->
+ Groups1 = insert_test(TestName,{filename:basename(RunDir),RunDir},Groups),
+ sort_logdirs1(TestName,RunDirs,Groups1);
+sort_logdirs1(_,[],Groups) ->
+ Groups.
+
insert_test(Test,IxDir,[{Test,IxDirs}|Groups]) ->
[{Test,[IxDir|IxDirs]}|Groups];
insert_test(Test,IxDir,[]) ->
@@ -1894,7 +1980,7 @@ simulate() ->
simulate_logger_loop() ->
receive
- {log,_,_,List} ->
+ {log,_,_,_,List} ->
S = [[io_lib:format(Str,Args),io_lib:nl()] || {Str,Args} <- List],
io:format("~s",[S]),
simulate_logger_loop();
@@ -1933,21 +2019,17 @@ notify_and_unlock_file(File) ->
end.
%%%-----------------------------------------------------------------
-%%% @spec last_test(Dir) -> string() | false
+%%% @spec get_run_dirs(Dir) -> [string()] | false
%%%
%%% @doc
%%%
-last_test(Dir) ->
- last_test(filelib:wildcard(filename:join(Dir, "run.[1-2]*")), false).
-
-last_test([Run|Rest], false) ->
- last_test(Rest, Run);
-last_test([Run|Rest], Latest) when Run > Latest ->
- last_test(Rest, Run);
-last_test([_|Rest], Latest) ->
- last_test(Rest, Latest);
-last_test([], Latest) ->
- Latest.
+get_run_dirs(Dir) ->
+ case filelib:wildcard(filename:join(Dir, "run.[1-2]*")) of
+ [] ->
+ false;
+ RunDirs ->
+ lists:sort(RunDirs)
+ end.
%%%-----------------------------------------------------------------
%%% @spec xhtml(HTML, XHTML) -> HTML | XHTML
diff --git a/lib/common_test/src/ct_repeat.erl b/lib/common_test/src/ct_repeat.erl
index be3c485b75..e6eb135ae8 100644
--- a/lib/common_test/src/ct_repeat.erl
+++ b/lib/common_test/src/ct_repeat.erl
@@ -116,7 +116,7 @@ spawn_tester(script,Ctrl,Args) ->
spawn_tester(func,Ctrl,Opts) ->
Tester = fun() ->
- case catch ct_run:run_test1(Opts) of
+ case catch ct_run:run_test2(Opts) of
{'EXIT',Reason} ->
exit(Reason);
Result ->
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index 05b10bca32..72124f6f21 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -37,7 +37,7 @@
%% Misc internal functions
--export([variables_file_name/1,script_start1/2,run_test1/1]).
+-export([variables_file_name/1,script_start1/2,run_test2/1]).
-include("ct_event.hrl").
-include("ct_util.hrl").
@@ -63,6 +63,7 @@
stylesheet,
multiply_timetraps = 1,
scale_timetraps = false,
+ create_priv_dir,
testspecs = [],
tests}).
@@ -178,6 +179,10 @@ script_start1(Parent, Args) ->
fun([CT]) -> list_to_atom(CT);
([]) -> true
end, false, Args),
+ CreatePrivDir = get_start_opt(create_priv_dir,
+ fun([PD]) -> list_to_atom(PD);
+ ([]) -> auto_per_tc
+ end, Args),
EvHandlers = event_handler_args2opts(Args),
CTHooks = ct_hooks_args2opts(Args),
EnableBuiltinHooks = get_start_opt(enable_builtin_hooks,
@@ -255,7 +260,8 @@ script_start1(Parent, Args) ->
silent_connections = SilentConns,
stylesheet = Stylesheet,
multiply_timetraps = MultTT,
- scale_timetraps = ScaleTT},
+ scale_timetraps = ScaleTT,
+ create_priv_dir = CreatePrivDir},
%% check if log files should be refreshed or go on to run tests...
Result = run_or_refresh(StartOpts, Args),
@@ -322,12 +328,21 @@ script_start2(StartOpts = #opts{vts = undefined,
Cover = choose_val(StartOpts#opts.cover,
SpecStartOpts#opts.cover),
- MultTT = choose_val(StartOpts#opts.multiply_timetraps,
- SpecStartOpts#opts.multiply_timetraps),
- ScaleTT = choose_val(StartOpts#opts.scale_timetraps,
- SpecStartOpts#opts.scale_timetraps),
- AllEvHs = merge_vals([StartOpts#opts.event_handlers,
- SpecStartOpts#opts.event_handlers]),
+ MultTT =
+ choose_val(StartOpts#opts.multiply_timetraps,
+ SpecStartOpts#opts.multiply_timetraps),
+ ScaleTT =
+ choose_val(StartOpts#opts.scale_timetraps,
+ SpecStartOpts#opts.scale_timetraps),
+
+ CreatePrivDir =
+ choose_val(StartOpts#opts.create_priv_dir,
+ SpecStartOpts#opts.create_priv_dir),
+
+ AllEvHs =
+ merge_vals([StartOpts#opts.event_handlers,
+ SpecStartOpts#opts.event_handlers]),
+
AllCTHooks = merge_vals(
[StartOpts#opts.ct_hooks,
SpecStartOpts#opts.ct_hooks]),
@@ -354,7 +369,8 @@ script_start2(StartOpts = #opts{vts = undefined,
EnableBuiltinHooks,
include = AllInclude,
multiply_timetraps = MultTT,
- scale_timetraps = ScaleTT}}
+ scale_timetraps = ScaleTT,
+ create_priv_dir = CreatePrivDir}}
end;
_ ->
{undefined,StartOpts}
@@ -567,6 +583,7 @@ script_usage() ->
"\n\t[-no_auto_compile]"
"\n\t[-multiply_timetraps N]"
"\n\t[-scale_timetraps]"
+ "\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
"\n\t[-basic_html]\n\n"),
io:format("Run tests from command line:\n\n"
"\tct_run [-dir TestDir1 TestDir2 .. TestDirN] |"
@@ -586,6 +603,7 @@ script_usage() ->
"\n\t[-no_auto_compile]"
"\n\t[-multiply_timetraps N]"
"\n\t[-scale_timetraps]"
+ "\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
"\n\t[-basic_html]"
"\n\t[-repeat N [-force_stop]] |"
"\n\t[-duration HHMMSS [-force_stop]] |"
@@ -606,6 +624,7 @@ script_usage() ->
"\n\t[-no_auto_compile]"
"\n\t[-multiply_timetraps N]"
"\n\t[-scale_timetraps]"
+ "\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
"\n\t[-basic_html]"
"\n\t[-repeat N [-force_stop]] |"
"\n\t[-duration HHMMSS [-force_stop]] |"
@@ -782,6 +801,9 @@ run_test2(StartOpts) ->
MultiplyTT = get_start_opt(multiply_timetraps, value, 1, StartOpts),
ScaleTT = get_start_opt(scale_timetraps, value, false, StartOpts),
+ %% create unique priv dir names
+ CreatePrivDir = get_start_opt(create_priv_dir, value, StartOpts),
+
%% auto compile & include files
Include =
case proplists:get_value(auto_compile, StartOpts) of
@@ -842,7 +864,8 @@ run_test2(StartOpts) ->
silent_connections = SilentConns,
stylesheet = Stylesheet,
multiply_timetraps = MultiplyTT,
- scale_timetraps = ScaleTT},
+ scale_timetraps = ScaleTT,
+ create_priv_dir = CreatePrivDir},
%% test specification
case proplists:get_value(spec, StartOpts) of
@@ -889,6 +912,8 @@ run_spec_file(Relaxed,
SpecOpts#opts.multiply_timetraps),
ScaleTT = choose_val(Opts#opts.scale_timetraps,
SpecOpts#opts.scale_timetraps),
+ CreatePrivDir = choose_val(Opts#opts.create_priv_dir,
+ SpecOpts#opts.create_priv_dir),
AllEvHs = merge_vals([Opts#opts.event_handlers,
SpecOpts#opts.event_handlers]),
AllInclude = merge_vals([Opts#opts.include,
@@ -912,6 +937,7 @@ run_spec_file(Relaxed,
testspecs = AbsSpecs,
multiply_timetraps = MultTT,
scale_timetraps = ScaleTT,
+ create_priv_dir = CreatePrivDir,
ct_hooks = AllCTHooks,
enable_builtin_hooks = EnableBuiltinHooks
},
@@ -1170,7 +1196,8 @@ get_data_for_node(#testspec{label = Labels,
enable_builtin_hooks = EnableBuiltinHooks,
include = Incl,
multiply_timetraps = MTs,
- scale_timetraps = STs}, Node) ->
+ scale_timetraps = STs,
+ create_priv_dir = PDs}, Node) ->
Label = proplists:get_value(Node, Labels),
Profile = proplists:get_value(Node, Profiles),
LogDir = case proplists:get_value(Node, LogDirs) of
@@ -1184,6 +1211,7 @@ get_data_for_node(#testspec{label = Labels,
Cover = proplists:get_value(Node, CoverFs),
MT = proplists:get_value(Node, MTs),
ST = proplists:get_value(Node, STs),
+ CreatePrivDir = proplists:get_value(Node, PDs),
ConfigFiles = [{?ct_config_txt,F} || {N,F} <- Cfgs, N==Node] ++
[CBF || {N,CBF} <- UsrCfgs, N==Node],
EvHandlers = [{H,A} || {N,H,A} <- EvHs, N==Node],
@@ -1200,7 +1228,8 @@ get_data_for_node(#testspec{label = Labels,
enable_builtin_hooks = EnableBuiltinHooks,
include = Include,
multiply_timetraps = MT,
- scale_timetraps = ST}.
+ scale_timetraps = ST,
+ create_priv_dir = CreatePrivDir}.
refresh_logs(LogDir) ->
{ok,Cwd} = file:get_cwd(),
@@ -1384,7 +1413,8 @@ do_run(Tests, Skip, Opts, Args) when is_record(Opts, opts) ->
%% which framework it runs under.
case os:getenv("TEST_SERVER_FRAMEWORK") of
false ->
- os:putenv("TEST_SERVER_FRAMEWORK", "ct_framework");
+ os:putenv("TEST_SERVER_FRAMEWORK", "ct_framework"),
+ os:putenv("TEST_SERVER_FRAMEWORK_NAME", "common_test");
"ct_framework" ->
ok;
Other ->
@@ -1746,25 +1776,31 @@ set_group_leader_same_as_shell() ->
false
end.
-check_and_add([{TestDir0,M,_} | Tests], Added) ->
+check_and_add([{TestDir0,M,_} | Tests], Added, PA) ->
case locate_test_dir(TestDir0, M) of
{ok,TestDir} ->
case lists:member(TestDir, Added) of
true ->
- check_and_add(Tests, Added);
+ check_and_add(Tests, Added, PA);
false ->
- true = code:add_patha(TestDir),
- check_and_add(Tests, [TestDir|Added])
+ case lists:member(rm_trailing_slash(TestDir),
+ code:get_path()) of
+ false ->
+ true = code:add_patha(TestDir),
+ check_and_add(Tests, [TestDir|Added], [TestDir|PA]);
+ true ->
+ check_and_add(Tests, [TestDir|Added], PA)
+ end
end;
{error,_} ->
{error,{invalid_directory,TestDir0}}
end;
-check_and_add([], _) ->
- ok.
+check_and_add([], _, PA) ->
+ {ok,PA}.
do_run_test(Tests, Skip, Opts) ->
- case check_and_add(Tests, []) of
- ok ->
+ case check_and_add(Tests, [], []) of
+ {ok,AddedToPath} ->
ct_util:set_testdata({stats,{0,0,{0,0}}}),
ct_util:set_testdata({cover,undefined}),
test_server_ctrl:start_link(local),
@@ -1842,6 +1878,8 @@ do_run_test(Tests, Skip, Opts) ->
test_server_ctrl:multiply_timetraps(Opts#opts.multiply_timetraps),
test_server_ctrl:scale_timetraps(Opts#opts.scale_timetraps),
+ test_server_ctrl:create_priv_dir(choose_val(Opts#opts.create_priv_dir,
+ auto_per_run)),
ct_event:notify(#event{name=start_info,
node=node(),
data={NoOfTests,NoOfSuites,NoOfCases}}),
@@ -1858,7 +1896,9 @@ do_run_test(Tests, Skip, Opts) ->
end,
lists:foreach(fun(Suite) ->
maybe_cleanup_interpret(Suite, Opts#opts.step)
- end, CleanUp);
+ end, CleanUp),
+ [code:del_path(Dir) || Dir <- AddedToPath],
+ ok;
Error ->
Error
end.
@@ -2289,7 +2329,7 @@ ct_hooks_args2opts(Args) ->
Acc
end,[],Args).
-ct_hooks_args2opts([CTH,Arg,Prio,"and"| Rest],Acc) ->
+ct_hooks_args2opts([CTH,Arg,Prio,"and"| Rest],Acc) when Arg /= "and" ->
ct_hooks_args2opts(Rest,[{list_to_atom(CTH),
parse_cth_args(Arg),
parse_cth_args(Prio)}|Acc]);
@@ -2347,31 +2387,38 @@ event_handler_init_args2opts([]) ->
%% relative dirs "post run_test erl_args" is not kept!
rel_to_abs(CtArgs) ->
{PA,PZ} = get_pa_pz(CtArgs, [], []),
- io:format(user, "~n", []),
[begin
- code:del_path(filename:basename(D)),
- Abs = filename:absname(D),
- code:add_pathz(Abs),
- if D /= Abs ->
+ Dir = rm_trailing_slash(D),
+ Abs = make_abs(Dir),
+ if Dir /= Abs ->
+ code:del_path(Dir),
+ code:del_path(Abs),
io:format(user, "Converting ~p to ~p and re-inserting "
"with add_pathz/1~n",
- [D, Abs]);
+ [Dir, Abs]);
true ->
- ok
- end
+ code:del_path(Dir)
+ end,
+ code:add_pathz(Abs)
end || D <- PZ],
[begin
- code:del_path(filename:basename(D)),
- Abs = filename:absname(D),
- code:add_patha(Abs),
- if D /= Abs ->
+ Dir = rm_trailing_slash(D),
+ Abs = make_abs(Dir),
+ if Dir /= Abs ->
+ code:del_path(Dir),
+ code:del_path(Abs),
io:format(user, "Converting ~p to ~p and re-inserting "
"with add_patha/1~n",
- [D, Abs]);
- true ->ok
- end
+ [Dir, Abs]);
+ true ->
+ code:del_path(Dir)
+ end,
+ code:add_patha(Abs)
end || D <- PA],
- io:format(user, "~n", []).
+ io:format(user, "~n", []).
+
+rm_trailing_slash(Dir) ->
+ filename:join(filename:split(Dir)).
get_pa_pz([{pa,Dirs} | Args], PA, PZ) ->
get_pa_pz(Args, PA ++ Dirs, PZ);
@@ -2382,6 +2429,19 @@ get_pa_pz([_ | Args], PA, PZ) ->
get_pa_pz([], PA, PZ) ->
{PA,PZ}.
+make_abs(RelDir) ->
+ Tokens = filename:split(filename:absname(RelDir)),
+ filename:join(lists:reverse(make_abs1(Tokens, []))).
+
+make_abs1([".."|Dirs], [_Dir|Path]) ->
+ make_abs1(Dirs, Path);
+make_abs1(["."|Dirs], Path) ->
+ make_abs1(Dirs, Path);
+make_abs1([Dir|Dirs], Path) ->
+ make_abs1(Dirs, [Dir|Path]);
+make_abs1([], Path) ->
+ Path.
+
%% This function translates ct:run_test/1 start options
%% to ct_run start arguments (on the init arguments format) -
%% this is useful mainly for testing the ct_run start functions.
@@ -2419,6 +2479,10 @@ opts2args(EnvStartOpts) ->
[{scale_timetraps,[]}];
({scale_timetraps,false}) ->
[];
+ ({create_priv_dir,auto_per_run}) ->
+ [];
+ ({create_priv_dir,PD}) when is_atom(PD) ->
+ [{create_priv_dir,[atom_to_list(PD)]}];
({force_stop,true}) ->
[{force_stop,[]}];
({force_stop,false}) ->
diff --git a/lib/common_test/src/ct_testspec.erl b/lib/common_test/src/ct_testspec.erl
index b68cbd3aa1..5b197c0c81 100644
--- a/lib/common_test/src/ct_testspec.erl
+++ b/lib/common_test/src/ct_testspec.erl
@@ -568,6 +568,21 @@ add_tests([{scale_timetraps,Node,ST}|Ts],Spec) ->
add_tests([{scale_timetraps,ST}|Ts],Spec) ->
add_tests([{scale_timetraps,all_nodes,ST}|Ts],Spec);
+%% --- create_priv_dir ---
+add_tests([{create_priv_dir,all_nodes,PD}|Ts],Spec) ->
+ Tests = lists:map(fun(N) -> {create_priv_dir,N,PD} end, list_nodes(Spec)),
+ add_tests(Tests++Ts,Spec);
+add_tests([{create_priv_dir,Nodes,PD}|Ts],Spec) when is_list(Nodes) ->
+ Ts1 = separate(Nodes,create_priv_dir,[PD],Ts,Spec#testspec.nodes),
+ add_tests(Ts1,Spec);
+add_tests([{create_priv_dir,Node,PD}|Ts],Spec) ->
+ PDs = Spec#testspec.create_priv_dir,
+ PDs1 = [{ref2node(Node,Spec#testspec.nodes),PD} |
+ lists:keydelete(ref2node(Node,Spec#testspec.nodes),1,PDs)],
+ add_tests(Ts,Spec#testspec{create_priv_dir=PDs1});
+add_tests([{create_priv_dir,PD}|Ts],Spec) ->
+ add_tests([{create_priv_dir,all_nodes,PD}|Ts],Spec);
+
%% --- config ---
add_tests([{config,all_nodes,Files}|Ts],Spec) ->
Tests = lists:map(fun(N) -> {config,N,Files} end, list_nodes(Spec)),
@@ -1158,7 +1173,8 @@ valid_terms() ->
{skip_groups,6},
{skip_groups,7},
{skip_cases,5},
- {skip_cases,6}
+ {skip_cases,6},
+ {create_priv_dir,2}
].
%% this function "guesses" if the user has misspelled a term name
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl
index 3b6ad6f98d..e9bfb2590b 100644
--- a/lib/common_test/src/ct_util.erl
+++ b/lib/common_test/src/ct_util.erl
@@ -827,15 +827,20 @@ get_profile_data(Profile, Key, StartDir) ->
%%%-----------------------------------------------------------------
%%% Internal functions
call(Msg) ->
- MRef = erlang:monitor(process,whereis(ct_util_server)),
- Ref = make_ref(),
- ct_util_server ! {Msg,{self(),Ref}},
- receive
- {Ref, Result} ->
- erlang:demonitor(MRef, [flush]),
- Result;
- {'DOWN',MRef,process,_,Reason} ->
- {error,{ct_util_server_down,Reason}}
+ case whereis(ct_util_server) of
+ undefined ->
+ {error,ct_util_server_not_running};
+ Pid ->
+ MRef = erlang:monitor(process, Pid),
+ Ref = make_ref(),
+ ct_util_server ! {Msg,{self(),Ref}},
+ receive
+ {Ref, Result} ->
+ erlang:demonitor(MRef, [flush]),
+ Result;
+ {'DOWN',MRef,process,_,Reason} ->
+ {error,{ct_util_server_down,Reason}}
+ end
end.
return({To,Ref},Result) ->
diff --git a/lib/common_test/src/ct_util.hrl b/lib/common_test/src/ct_util.hrl
index bde832811a..082599a9c6 100644
--- a/lib/common_test/src/ct_util.hrl
+++ b/lib/common_test/src/ct_util.hrl
@@ -43,9 +43,10 @@
include=[],
multiply_timetraps=[],
scale_timetraps=[],
+ create_priv_dir=[],
alias=[],
tests=[],
- merge_tests = true }).
+ merge_tests=true}).
-record(cover, {app=none,
level=details,
diff --git a/lib/common_test/src/cth_log_redirect.erl b/lib/common_test/src/cth_log_redirect.erl
index 14663b7738..ea79251cfc 100644
--- a/lib/common_test/src/cth_log_redirect.erl
+++ b/lib/common_test/src/cth_log_redirect.erl
@@ -31,22 +31,22 @@
%% Event handler Callbacks
-export([init/1,
handle_event/2, handle_call/2, handle_info/2,
- terminate/2]).
+ terminate/1]).
id(_Opts) ->
?MODULE.
init(?MODULE, _Opts) ->
error_logger:add_report_handler(?MODULE),
- tc_log.
+ tc_log_async.
-post_init_per_group(Group, Config, Result, tc_log) ->
+post_init_per_group(Group, Config, Result, tc_log_async) ->
case lists:member(parallel,proplists:get_value(
tc_group_properties,Config,[])) of
true ->
{Result, {set_log_func(ct_log),Group}};
false ->
- {Result, tc_log}
+ {Result, tc_log_async}
end;
post_init_per_group(_Group, _Config, Result, State) ->
{Result, State}.
@@ -58,14 +58,14 @@ post_end_per_testcase(_TC, _Config, Result, State) ->
{Result, State}.
pre_end_per_group(Group, Config, {ct_log, Group}) ->
- {Config, set_log_func(tc_log)};
+ {Config, set_log_func(tc_log_async)};
pre_end_per_group(_Group, Config, State) ->
{Config, State}.
%% Copied and modified from sasl_report_tty_h.erl
init(_Type) ->
- {ok, tc_log}.
+ {ok, tc_log_async}.
handle_event({_Type, GL, _Msg}, State) when node(GL) /= node() ->
{ok, State};
@@ -101,7 +101,8 @@ handle_call({set_logfunc,NewLogFunc},_) ->
{ok, NewLogFunc, NewLogFunc};
handle_call(_Query, _State) -> {error, bad_query}.
-terminate(_Reason, _Type) ->
+terminate(_State) ->
+ error_logger:delete_report_handler(?MODULE),
[].
tag_event(Event) ->
diff --git a/lib/common_test/src/cth_surefire.erl b/lib/common_test/src/cth_surefire.erl
new file mode 100644
index 0000000000..c42f956b3a
--- /dev/null
+++ b/lib/common_test/src/cth_surefire.erl
@@ -0,0 +1,199 @@
+%%% @doc Common Test Framework functions handling test specifications.
+%%%
+%%% <p>This module creates a junit report of the test run if plugged in
+%%% as a suite_callback.</p>
+
+-module(cth_surefire).
+
+%% Suite Callbacks
+-export([id/1, init/2]).
+
+-export([pre_init_per_suite/3]).
+-export([post_init_per_suite/4]).
+-export([pre_end_per_suite/3]).
+-export([post_end_per_suite/4]).
+
+-export([pre_init_per_group/3]).
+-export([post_init_per_group/4]).
+-export([pre_end_per_group/3]).
+-export([post_end_per_group/4]).
+
+-export([pre_init_per_testcase/3]).
+-export([post_end_per_testcase/4]).
+
+-export([on_tc_fail/3]).
+-export([on_tc_skip/3]).
+
+-export([terminate/1]).
+
+-record(state, { filepath, axis, properties, package, hostname,
+ curr_suite, curr_suite_ts, curr_group = [], curr_tc,
+ curr_log_dir, timer, tc_log,
+ test_cases = [],
+ test_suites = [] }).
+
+-record(testcase, { log, group, classname, name, time, failure, timestamp }).
+-record(testsuite, { errors, failures, hostname, name, tests,
+ time, timestamp, id, package,
+ properties, testcases }).
+
+id(Opts) ->
+ filename:absname(proplists:get_value(path, Opts, "junit_report.xml")).
+
+init(Path, Opts) ->
+ {ok, Host} = inet:gethostname(),
+ #state{ filepath = Path,
+ hostname = proplists:get_value(hostname,Opts,Host),
+ package = proplists:get_value(package,Opts),
+ axis = proplists:get_value(axis,Opts,[]),
+ properties = proplists:get_value(properties,Opts,[]),
+ timer = now() }.
+
+pre_init_per_suite(Suite,Config,State) ->
+ {Config, init_tc(State#state{ curr_suite = Suite, curr_suite_ts = now() },
+ Config) }.
+
+post_init_per_suite(_Suite,Config, Result, State) ->
+ {Result, end_tc(init_per_suite,Config,Result,State)}.
+
+pre_end_per_suite(_Suite,Config,State) -> {Config, init_tc(State, Config)}.
+
+post_end_per_suite(_Suite,Config,Result,State) ->
+ NewState = end_tc(end_per_suite,Config,Result,State),
+ TCs = NewState#state.test_cases,
+ Suite = get_suite(NewState, TCs),
+ {Result, State#state{ test_cases = [],
+ test_suites = [Suite | State#state.test_suites]}}.
+
+pre_init_per_group(Group,Config,State) ->
+ {Config, init_tc(State#state{ curr_group = [Group|State#state.curr_group]},
+ Config)}.
+
+post_init_per_group(_Group,Config,Result,State) ->
+ {Result, end_tc(init_per_group,Config,Result,State)}.
+
+pre_end_per_group(_Group,Config,State) -> {Config, init_tc(State, Config)}.
+
+post_end_per_group(_Group,Config,Result,State) ->
+ NewState = end_tc(end_per_group, Config, Result, State),
+ {Result, NewState#state{ curr_group = tl(NewState#state.curr_group)}}.
+
+pre_init_per_testcase(_TC,Config,State) -> {Config, init_tc(State, Config)}.
+
+post_end_per_testcase(TC,Config,Result,State) ->
+ {Result, end_tc(TC,Config, Result,State)}.
+
+on_tc_fail(_TC, Res, State) ->
+ TCs = State#state.test_cases,
+ TC = hd(State#state.test_cases),
+ NewTC = TC#testcase{ failure =
+ {fail,lists:flatten(io_lib:format("~p",[Res]))} },
+ State#state{ test_cases = [NewTC | tl(TCs)]}.
+
+on_tc_skip(_Tc, Res, State) ->
+ TCs = State#state.test_cases,
+ TC = hd(State#state.test_cases),
+ NewTC = TC#testcase{
+ failure =
+ {skipped,lists:flatten(io_lib:format("~p",[Res]))} },
+ State#state{ test_cases = [NewTC | tl(TCs)]}.
+
+init_tc(State, Config) ->
+ State#state{ timer = now(),
+ tc_log = proplists:get_value(tc_logfile, Config)}.
+
+end_tc(Func, Config, Res, State) when is_atom(Func) ->
+ end_tc(atom_to_list(Func), Config, Res, State);
+end_tc(Name, _Config, _Res, State = #state{ curr_suite = Suite,
+ curr_group = Groups,
+ timer = TS, tc_log = Log } ) ->
+ ClassName = atom_to_list(Suite),
+ PGroup = string:join([ atom_to_list(Group)||
+ Group <- lists:reverse(Groups)],"."),
+ TimeTakes = io_lib:format("~f",[timer:now_diff(now(),TS) / 1000000]),
+ State#state{ test_cases = [#testcase{ log = Log,
+ timestamp = now_to_string(TS),
+ classname = ClassName,
+ group = PGroup,
+ name = Name,
+ time = TimeTakes,
+ failure = passed }| State#state.test_cases]}.
+
+get_suite(State, TCs) ->
+ Total = length(TCs),
+ Succ = length(lists:filter(fun(#testcase{ failure = F }) ->
+ F == passed
+ end,TCs)),
+ Fail = Total - Succ,
+ TimeTaken = timer:now_diff(now(),State#state.curr_suite_ts) / 1000000,
+ #testsuite{ name = atom_to_list(State#state.curr_suite),
+ package = State#state.package,
+ time = io_lib:format("~f",[TimeTaken]),
+ timestamp = now_to_string(State#state.curr_suite_ts),
+ errors = Fail, tests = Total, testcases = lists:reverse(TCs) }.
+
+terminate(State) ->
+ {ok,D} = file:open(State#state.filepath,[write]),
+ io:format(D, "<?xml version=\"1.0\" encoding= \"UTF-8\" ?>", []),
+ io:format(D, to_xml(State), []),
+ catch file:sync(D),
+ catch file:close(D).
+
+to_xml(#testcase{ group = Group, classname = CL, log = L, name = N, time = T, timestamp = TS, failure = F}) ->
+ ["<testcase ",
+ [["group=\"",Group,"\""]||Group /= ""]," "
+ "name=\"",N,"\" "
+ "time=\"",T,"\" "
+ "timestamp=\"",TS,"\" "
+ "log=\"",L,"\">",
+ case F of
+ passed ->
+ [];
+ {skipped,Reason} ->
+ ["<skipped type=\"skip\" message=\"Test ",N," in ",CL,
+ " skipped!\">", sanitize(Reason),"</skipped>"];
+ {fail,Reason} ->
+ ["<failure message=\"Test ",N," in ",CL," failed!\" type=\"crash\">",
+ sanitize(Reason),"</failure>"]
+ end,"</testcase>"];
+to_xml(#testsuite{ package = P, hostname = H, errors = E, time = Time,
+ timestamp = TS, tests = T, name = N, testcases = Cases }) ->
+ ["<testsuite ",
+ [["package=\"",P,"\" "]||P /= undefined],
+ [["hostname=\"",P,"\" "]||H /= undefined],
+ [["name=\"",N,"\" "]||N /= undefined],
+ [["time=\"",Time,"\" "]||Time /= undefined],
+ [["timestamp=\"",TS,"\" "]||TS /= undefined],
+ "errors=\"",integer_to_list(E),"\" "
+ "tests=\"",integer_to_list(T),"\">",
+ [to_xml(Case) || Case <- Cases],
+ "</testsuite>"];
+to_xml(#state{ test_suites = TestSuites, axis = Axis, properties = Props }) ->
+ ["<testsuites>",properties_to_xml(Axis,Props),
+ [to_xml(TestSuite) || TestSuite <- TestSuites],"</testsuites>"].
+
+properties_to_xml(Axis,Props) ->
+ ["<properties>",
+ [["<property name=\"",Name,"\" axis=\"yes\" value=\"",Value,"\" />"] || {Name,Value} <- Axis],
+ [["<property name=\"",Name,"\" value=\"",Value,"\" />"] || {Name,Value} <- Props],
+ "</properties>"
+ ].
+
+sanitize([$>|T]) ->
+ "&gt;" ++ sanitize(T);
+sanitize([$<|T]) ->
+ "&lt;" ++ sanitize(T);
+sanitize([$"|T]) ->
+ "&quot;" ++ sanitize(T);
+sanitize([$'|T]) ->
+ "&apos;" ++ sanitize(T);
+sanitize([$&|T]) ->
+ "&amp;" ++ sanitize(T);
+sanitize([H|T]) ->
+ [H|sanitize(T)];
+sanitize([]) ->
+ [].
+
+now_to_string(Now) ->
+ {{YY,MM,DD},{HH,Mi,SS}} = calendar:now_to_local_time(Now),
+ io_lib:format("~p-~2..0B-~2..0BT~2..0B:~2..0B:~2..0B",[YY,MM,DD,HH,Mi,SS]).
diff --git a/lib/common_test/src/vts.erl b/lib/common_test/src/vts.erl
index cc8a932887..9dfb0bd6b8 100644
--- a/lib/common_test/src/vts.erl
+++ b/lib/common_test/src/vts.erl
@@ -766,10 +766,6 @@ report1(tc_done,{_Suite,init_per_group,_},State) ->
State;
report1(tc_done,{_Suite,end_per_group,_},State) ->
State;
-report1(tc_done,{_Suite,ct_init_per_group,_},State) ->
- State;
-report1(tc_done,{_Suite,ct_end_per_group,_},State) ->
- State;
report1(tc_done,{_Suite,_Case,ok},State) ->
State#state{ok=State#state.ok+1};
report1(tc_done,{_Suite,_Case,{failed,_Reason}},State) ->
diff --git a/lib/common_test/test/Makefile b/lib/common_test/test/Makefile
index 284612b8f7..332c444145 100644
--- a/lib/common_test/test/Makefile
+++ b/lib/common_test/test/Makefile
@@ -29,6 +29,7 @@ MODULES= \
ct_test_support_eh \
ct_userconfig_callback \
ct_smoke_test_SUITE \
+ ct_priv_dir_SUITE \
ct_event_handler_SUITE \
ct_config_info_SUITE \
ct_groups_test_1_SUITE \
diff --git a/lib/common_test/test/ct_error_SUITE.erl b/lib/common_test/test/ct_error_SUITE.erl
index 2b3157ff3b..79ed51bc28 100644
--- a/lib/common_test/test/ct_error_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE.erl
@@ -61,7 +61,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[cfg_error, lib_error, no_compile, timetrap_end_conf,
timetrap_normal, timetrap_extended, timetrap_parallel,
- timetrap_fun].
+ timetrap_fun, misc_errors].
groups() ->
[].
@@ -249,6 +249,24 @@ timetrap_fun(Config) when is_list(Config) ->
TestEvents = events_to_check(timetrap_fun),
ok = ct_test_support:verify_events(TestEvents, Events, Config).
+%%%-----------------------------------------------------------------
+%%%
+misc_errors(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Join = fun(D, S) -> filename:join(D, "error/test/"++S) end,
+ Suites = [Join(DataDir, "misc_error_1_SUITE")],
+ {Opts,ERPid} = setup([{suite,Suites}], Config),
+ ok = ct_test_support:run(Opts, Config),
+ Events = ct_test_support:get_events(ERPid, Config),
+
+ ct_test_support:log_events(misc_errors,
+ reformat(Events, ?eh),
+ ?config(priv_dir, Config),
+ Opts),
+
+ TestEvents = events_to_check(misc_errors),
+ ok = ct_test_support:verify_events(TestEvents, Events, Config).
+
%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
@@ -682,7 +700,7 @@ test_events(timetrap_end_conf) ->
[
{?eh,start_logging,{'DEF','RUNDIR'}},
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
- {?eh,start_info,{1,1,6}},
+ {?eh,start_info,{1,1,9}},
{?eh,tc_start,{timetrap_1_SUITE,init_per_suite}},
{?eh,tc_done,{timetrap_1_SUITE,init_per_suite,ok}},
{?eh,tc_start,{timetrap_1_SUITE,tc1}},
@@ -709,6 +727,18 @@ test_events(timetrap_end_conf) ->
{?eh,tc_done,
{timetrap_1_SUITE,tc6,{failed,{testcase_aborted,testing_end_conf}}}},
{?eh,test_stats,{0,6,{0,0}}},
+ {?eh,tc_start,{timetrap_1_SUITE,tc7}},
+ {?eh,tc_done,
+ {timetrap_1_SUITE,tc7,{failed,{timetrap_timeout,1000}}}},
+ {?eh,test_stats,{0,7,{0,0}}},
+ {?eh,tc_start,{timetrap_1_SUITE,tc8}},
+ {?eh,tc_done,
+ {timetrap_1_SUITE,tc8,{failed,{timetrap_timeout,1000}}}},
+ {?eh,test_stats,{0,8,{0,0}}},
+ {?eh,tc_start,{timetrap_1_SUITE,tc9}},
+ {?eh,tc_done,
+ {timetrap_1_SUITE,tc9,{failed,{timetrap_timeout,1000}}}},
+ {?eh,test_stats,{0,9,{0,0}}},
{?eh,tc_start,{timetrap_1_SUITE,end_per_suite}},
{?eh,tc_done,{timetrap_1_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
@@ -892,4 +922,40 @@ test_events(timetrap_fun) ->
{?eh,tc_done,{timetrap_7_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
+ ];
+
+test_events(misc_errors) ->
+ [
+ {?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,7}},
+ {?eh,tc_start,{misc_error_1_SUITE,ct_fail_1}},
+ {?eh,tc_done,{misc_error_1_SUITE,ct_fail_1,
+ {failed,{error,{test_case_failed,{error,this_is_expected}}}}}},
+ {?eh,test_stats,{0,1,{0,0}}},
+ {?eh,tc_start,{misc_error_1_SUITE,ct_fail_2}},
+ {?eh,tc_done,{misc_error_1_SUITE,ct_fail_2,
+ {failed,{error,{test_case_failed,"this_is_expected"}}}}},
+ {?eh,test_stats,{0,2,{0,0}}},
+ {?eh,tc_start,{misc_error_1_SUITE,ct_fail_3}},
+ {?eh,tc_done,{misc_error_1_SUITE,ct_fail_3,
+ {failed,{error,{test_case_failed,this_is_expected}}}}},
+ {?eh,test_stats,{0,3,{0,0}}},
+ {?eh,tc_start,{misc_error_1_SUITE,ts_fail_1}},
+ {?eh,tc_done,{misc_error_1_SUITE,ts_fail_1,
+ {failed,{error,{suite_failed,this_is_expected}}}}},
+ {?eh,test_stats,{0,4,{0,0}}},
+ {?eh,tc_start,{misc_error_1_SUITE,ts_fail_2}},
+ {?eh,tc_done,{misc_error_1_SUITE,ts_fail_2,
+ {failed,{error,{suite_failed,this_is_expected}}}}},
+ {?eh,test_stats,{0,5,{0,0}}},
+ {?eh,tc_start,{misc_error_1_SUITE,killed_by_signal_1}},
+ {?eh,tc_done,{misc_error_1_SUITE,killed_by_signal_1,i_die_now}},
+ {?eh,test_stats,{0,6,{0,0}}},
+ {?eh,tc_start,{misc_error_1_SUITE,killed_by_signal_2}},
+ {?eh,tc_done,{misc_error_1_SUITE,killed_by_signal_2,
+ {failed,testcase_aborted_or_killed}}},
+ {?eh,test_stats,{0,7,{0,0}}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}
].
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/misc_error_1_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/misc_error_1_SUITE.erl
new file mode 100644
index 0000000000..4e20875505
--- /dev/null
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/misc_error_1_SUITE.erl
@@ -0,0 +1,154 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(misc_error_1_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+%%--------------------------------------------------------------------
+%% Function: suite() -> Info
+%% Info = [tuple()]
+%%--------------------------------------------------------------------
+suite() ->
+ [{timetrap,{seconds,3}}].
+
+%%--------------------------------------------------------------------
+%% Function: init_per_suite(Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+init_per_suite(Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_suite(Config0) -> void() | {save_config,Config1}
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_suite(_Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: init_per_group(GroupName, Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% GroupName = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+init_per_group(_GroupName, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_group(GroupName, Config0) ->
+%% void() | {save_config,Config1}
+%% GroupName = atom()
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_group(_GroupName, _Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: init_per_testcase(TestCase, Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% TestCase = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+init_per_testcase(_TestCase, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_testcase(TestCase, Config0) ->
+%% void() | {save_config,Config1}
+%% TestCase = atom()
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_testcase(_TestCase, _Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: groups() -> [Group]
+%% Group = {GroupName,Properties,GroupsAndTestCases}
+%% GroupName = atom()
+%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]
+%% GroupsAndTestCases = [Group | {group,GroupName} | TestCase]
+%% TestCase = atom()
+%% Shuffle = shuffle | {shuffle,{integer(),integer(),integer()}}
+%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |
+%% repeat_until_any_ok | repeat_until_any_fail
+%% N = integer() | forever
+%%--------------------------------------------------------------------
+groups() ->
+ [].
+
+%%--------------------------------------------------------------------
+%% Function: all() -> GroupsAndTestCases | {skip,Reason}
+%% GroupsAndTestCases = [{group,GroupName} | TestCase]
+%% GroupName = atom()
+%% TestCase = atom()
+%% Reason = term()
+%%--------------------------------------------------------------------
+all() ->
+ [ct_fail_1, ct_fail_2, ct_fail_3, ts_fail_1, ts_fail_2,
+ killed_by_signal_1, killed_by_signal_2].
+
+ct_fail_1(_) ->
+ ct:fail({error,this_is_expected}),
+ exit(this_should_not_be_seen),
+ ok.
+
+ct_fail_2(_) ->
+ ct:fail("~w", [this_is_expected]),
+ exit(this_should_not_be_seen),
+ ok.
+
+ct_fail_3(_) ->
+ fail_me(fun() -> ct:fail(this_is_expected) end),
+ exit(this_should_not_be_seen),
+ ok.
+
+ts_fail_1(_) ->
+ test_server:fail(this_is_expected),
+ exit(this_should_not_be_seen),
+ ok.
+
+ts_fail_2(_) ->
+ fail_me(fun() -> test_server:fail(this_is_expected) end),
+ exit(this_should_not_be_seen),
+ ok.
+
+fail_me(Fun) ->
+ Fun(),
+ ok.
+
+killed_by_signal_1(_) ->
+ spawn_link(fun() -> ct:sleep(100),
+ exit(i_die_now)
+ end),
+ ct:sleep(1000),
+ exit(this_should_not_be_seen).
+
+killed_by_signal_2(_) ->
+ TCPid = self(),
+ spawn_link(fun() -> ct:sleep(100),
+ exit(TCPid, kill)
+ end),
+ ct:sleep(1000),
+ exit(this_should_not_be_seen).
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl
index cb3109349b..a44ff6d0bc 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl
@@ -83,23 +83,11 @@ init_per_testcase(TC, Config) ->
ets:insert(?MODULE, {last_case,fail}),
init_per_testcase1(TC, Config).
-init_per_testcase1(tc1, Config) ->
- [{tc,tc1}|Config];
-
-init_per_testcase1(tc2, Config) ->
- [{tc,tc2}|Config];
-
-init_per_testcase1(tc3, Config) ->
- [{tc,tc3}|Config];
-
init_per_testcase1(tc4, Config) ->
[{tc,tc4},{default_timeout,5000}|Config];
-init_per_testcase1(tc5, Config) ->
- [{tc,tc5}|Config];
-
-init_per_testcase1(tc6, Config) ->
- [{tc,tc6}|Config].
+init_per_testcase1(TC, Config) ->
+ [{tc,TC}|Config].
%%--------------------------------------------------------------------
%% Function: end_per_testcase(TestCase, Config0) ->
@@ -145,7 +133,28 @@ end_per_testcase1(tc5, Config) ->
end_per_testcase1(tc6, Config) ->
ct:pal("end_per_testcase(tc6): ~p", [Config]),
tc6 = ?config(tc, Config),
- exit(end_per_tc_fail_after_abort).
+ exit(end_per_tc_fail_after_abort);
+
+end_per_testcase1(tc7, Config) ->
+ ct:pal("end_per_testcase(tc7): ~p", [Config]),
+ tc7 = ?config(tc, Config),
+ {failed,timetrap_timeout} = ?config(tc_status, Config),
+ ok;
+
+end_per_testcase1(tc8, Config) ->
+ ct:pal("end_per_testcase(tc8): ~p", [Config]),
+ tc8 = ?config(tc, Config),
+ {failed,timetrap_timeout} = ?config(tc_status, Config),
+ ok;
+
+end_per_testcase1(tc9, Config) ->
+ ct:pal("end_per_testcase(tc9): ~p", [Config]),
+ tc9 = ?config(tc, Config),
+ %% check that it's possible to send and receive synchronously
+ %% with the group leader process for end_per_testcase
+ test_server:stop_node(dummy@somehost),
+ ok.
+
%%--------------------------------------------------------------------
%% Function: groups() -> [Group]
@@ -170,25 +179,46 @@ groups() ->
%% Reason = term()
%%--------------------------------------------------------------------
all() ->
- [tc1, tc2, tc3, tc4, tc5, tc6].
+ [tc1, tc2, tc3, tc4, tc5, tc6, tc7, tc8, tc9].
tc1(_) ->
- timer:sleep(2000).
+ timer:sleep(2000),
+ ok.
tc2(_) ->
timer:sleep(2000).
tc3(_) ->
spawn(ct, abort_current_testcase, [testing_end_conf]),
- timer:sleep(2000).
+ timer:sleep(2000),
+ ok.
tc4(_) ->
spawn(ct, abort_current_testcase, [testing_end_conf]),
- timer:sleep(2000).
+ timer:sleep(2000),
+ ok.
tc5(_) ->
- timer:sleep(2000).
+ timer:sleep(2000),
+ ok.
tc6(_) ->
spawn(ct, abort_current_testcase, [testing_end_conf]),
timer:sleep(2000).
+
+tc7(_) ->
+ sleep(2000),
+ ok.
+
+tc8(_) ->
+ timetrap_helper:sleep(2000),
+ ok.
+
+tc9(_) ->
+ sleep(2000),
+ ok.
+
+%%%-----------------------------------------------------------------
+sleep(T) ->
+ timer:sleep(T),
+ ok.
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl
new file mode 100644
index 0000000000..1389acca11
--- /dev/null
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl
@@ -0,0 +1,7 @@
+-module(timetrap_helper).
+
+-export([sleep/1]).
+
+sleep(T) ->
+ timer:sleep(T),
+ ok.
diff --git a/lib/common_test/test/ct_group_info_SUITE.erl b/lib/common_test/test/ct_group_info_SUITE.erl
index 2da8219196..18016c4979 100644
--- a/lib/common_test/test/ct_group_info_SUITE.erl
+++ b/lib/common_test/test/ct_group_info_SUITE.erl
@@ -440,72 +440,72 @@ test_events(timetrap_all_no_ipg) ->
{?eh,tc_done,{group_timetrap_3_SUITE,t1,{failed,{timetrap_timeout,1000}}}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g1,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g1,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g1,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g1,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t11,{failed,{timetrap_timeout,500}}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g1,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g1,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g1,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g1,[{suite,group_timetrap_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g2,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g2,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g2,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g2,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t21,{failed,{timetrap_timeout,1500}}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g2,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g2,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g2,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g2,[{suite,group_timetrap_3_SUITE}]},ok}}],
{?eh,tc_done,{group_timetrap_3_SUITE,t2,{failed,{timetrap_timeout,1000}}}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g3,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g3,[{suite,group_timetrap_3_SUITE}]},ok}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g4,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g4,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g3,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g3,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g4,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g4,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t41,{failed,{timetrap_timeout,250}}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g4,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g4,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g4,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g4,[{suite,group_timetrap_3_SUITE}]},ok}}],
{?eh,tc_done,{group_timetrap_3_SUITE,t31,{failed,{timetrap_timeout,500}}}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g5,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g5,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g5,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g5,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t51,{failed,{timetrap_timeout,1500}}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g5,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g5,[{suite,group_timetrap_3_SUITE}]},ok}}],
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g3,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g3,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g5,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g5,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g3,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g3,[{suite,group_timetrap_3_SUITE}]},ok}}],
{?eh,tc_done,{group_timetrap_3_SUITE,t3,{failed,{timetrap_timeout,250}}}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g6,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g6,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g6,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g6,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t61,{failed,{timetrap_timeout,500}}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g6,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g6,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g6,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g6,[{suite,group_timetrap_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g7,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g7,[{suite,group_timetrap_3_SUITE}]},ok}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g8,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g8,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g7,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g7,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g8,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g8,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t81,{failed,{timetrap_timeout,750}}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g8,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g8,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g8,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g8,[{suite,group_timetrap_3_SUITE}]},ok}}],
{?eh,tc_done,{group_timetrap_3_SUITE,t71,{failed,{timetrap_timeout,500}}}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g9,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g9,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g9,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g9,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t91,{failed,{timetrap_timeout,250}}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g9,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g9,[{suite,group_timetrap_3_SUITE}]},ok}}],
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g7,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g7,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g9,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g9,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g7,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g7,[{suite,group_timetrap_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g10,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g10,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g10,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g10,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t101,{failed,{timetrap_timeout,1000}}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g10,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g10,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g10,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g10,[{suite,group_timetrap_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g11,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g11,[{suite,group_timetrap_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g11,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g11,[{suite,group_timetrap_3_SUITE}]},ok}},
{?eh,tc_done,{group_timetrap_3_SUITE,t111,{failed,{timetrap_timeout,1000}}}},
{?eh,test_stats,{0,14,{0,0}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g11,[{suite,group_timetrap_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g11,[{suite,group_timetrap_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g11,[{suite,group_timetrap_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g11,[{suite,group_timetrap_3_SUITE}]},ok}}],
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
@@ -779,78 +779,78 @@ test_events(require_no_ipg) ->
{?eh,start_info,{1,1,13}},
{?eh,tc_done,{group_require_3_SUITE,t1,ok}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g1,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g1,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g1,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g1,[{suite,group_require_3_SUITE}]},ok}},
{?eh,tc_done,{group_require_3_SUITE,t11,ok}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g1,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g1,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g1,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g1,[{suite,group_require_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g2,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g2,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g2,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g2,[{suite,group_require_3_SUITE}]},ok}},
{?eh,tc_done,{group_require_3_SUITE,t21,ok}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g2,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g2,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g2,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g2,[{suite,group_require_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g3,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g3,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g3,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g3,[{suite,group_require_3_SUITE}]},ok}},
{?eh,tc_done,{group_require_3_SUITE,t31,ok}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g3,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g3,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g3,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g3,[{suite,group_require_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g4,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g4,[{suite,group_require_3_SUITE}]},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g4,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g4,[{suite,group_require_3_SUITE}]},
{skipped,{require_failed,{name_in_use,common2_alias,common2}}}}},
{?eh,tc_auto_skip,{group_require_3_SUITE,t41,
{require_failed,{name_in_use,common2_alias,common2}}}},
{?eh,test_stats,{4,0,{0,1}}},
- {?eh,tc_auto_skip,{ct_framework,ct_end_per_group,
+ {?eh,tc_auto_skip,{ct_framework,end_per_group,
{require_failed,{name_in_use,common2_alias,common2}}}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g5,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g5,[{suite,group_require_3_SUITE}]},ok}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g6,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g6,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g5,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g5,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g6,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g6,[{suite,group_require_3_SUITE}]},ok}},
{?eh,tc_done,{group_require_3_SUITE,t61,ok}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g6,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g6,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g6,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g6,[{suite,group_require_3_SUITE}]},ok}}],
{?eh,tc_done,{group_require_3_SUITE,t51,ok}},
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g7,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g7,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g7,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g7,[{suite,group_require_3_SUITE}]},ok}},
{?eh,tc_done,{group_require_3_SUITE,t71,ok}},
{?eh,tc_done,{group_require_3_SUITE,t72,ok}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g7,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g7,[{suite,group_require_3_SUITE}]},ok}}],
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g5,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g5,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g7,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g7,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g5,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g5,[{suite,group_require_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g8,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g8,[{suite,group_require_3_SUITE}]},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g8,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g8,[{suite,group_require_3_SUITE}]},
{skipped,{require_failed,{not_available,non_existing}}}}},
{?eh,tc_auto_skip,{group_require_3_SUITE,t81,
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
- {?eh,tc_auto_skip,{ct_framework,ct_end_per_group,
+ {?eh,tc_auto_skip,{ct_framework,end_per_group,
{require_failed,{not_available,non_existing}}}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g9,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g9,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g9,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g9,[{suite,group_require_3_SUITE}]},ok}},
{?eh,tc_done,{group_require_3_SUITE,t91,
{skipped,{require_failed,{not_available,non_existing}}}}},
{?eh,test_stats,{8,0,{0,3}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g9,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g9,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g9,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g9,[{suite,group_require_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g10,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g10,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g10,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g10,[{suite,group_require_3_SUITE}]},ok}},
{?eh,tc_done,{group_require_3_SUITE,t101,ok}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g10,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g10,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g10,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g10,[{suite,group_require_3_SUITE}]},ok}}],
- [{?eh,tc_start,{ct_framework,{ct_init_per_group,g11,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,g11,[{suite,group_require_3_SUITE}]},ok}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,g11,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,g11,[{suite,group_require_3_SUITE}]},ok}},
{?eh,tc_done,{group_require_3_SUITE,t111,ok}},
{?eh,test_stats,{10,0,{0,3}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,g11,[{suite,group_require_3_SUITE}]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,g11,[{suite,group_require_3_SUITE}]},ok}}],
+ {?eh,tc_start,{ct_framework,{end_per_group,g11,[{suite,group_require_3_SUITE}]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,g11,[{suite,group_require_3_SUITE}]},ok}}],
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
diff --git a/lib/common_test/test/ct_groups_test_2_SUITE.erl b/lib/common_test/test/ct_groups_test_2_SUITE.erl
index 2392b0b850..c3601ba0ce 100644
--- a/lib/common_test/test/ct_groups_test_2_SUITE.erl
+++ b/lib/common_test/test/ct_groups_test_2_SUITE.erl
@@ -171,16 +171,16 @@ test_events(missing_conf) ->
{?eh,start_logging,{'DEF','RUNDIR'}},
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
{?eh,start_info,{1,1,2}},
- {?eh,tc_start,{ct_framework,{ct_init_per_group,group1,[]}}},
- {?eh,tc_done,{ct_framework,{ct_init_per_group,group1,[]},ok}},
+ {?eh,tc_start,{ct_framework,{init_per_group,group1,[]}}},
+ {?eh,tc_done,{ct_framework,{init_per_group,group1,[]},ok}},
{?eh,tc_start,{missing_conf_SUITE,tc1}},
{?eh,tc_done,{missing_conf_SUITE,tc1,ok}},
{?eh,test_stats,{1,0,{0,0}}},
{?eh,tc_start,{missing_conf_SUITE,tc2}},
{?eh,tc_done,{missing_conf_SUITE,tc2,ok}},
{?eh,test_stats,{2,0,{0,0}}},
- {?eh,tc_start,{ct_framework,{ct_end_per_group,group1,[]}}},
- {?eh,tc_done,{ct_framework,{ct_end_per_group,group1,[]},ok}},
+ {?eh,tc_start,{ct_framework,{end_per_group,group1,[]}}},
+ {?eh,tc_done,{ct_framework,{end_per_group,group1,[]},ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
];
diff --git a/lib/common_test/test/ct_hooks_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE.erl
index 2c519f08b5..efe57a7d0b 100644
--- a/lib/common_test/test/ct_hooks_SUITE.erl
+++ b/lib/common_test/test/ct_hooks_SUITE.erl
@@ -83,10 +83,9 @@ all(suite) ->
fail_post_suite_cth, skip_pre_suite_cth,
skip_post_suite_cth, recover_post_suite_cth, update_config_cth,
state_update_cth, options_cth, same_id_cth,
- fail_n_skip_with_minimal_cth, prio_cth
+ fail_n_skip_with_minimal_cth, prio_cth, no_config
]
- )
- .
+ ).
%%--------------------------------------------------------------------
@@ -214,6 +213,10 @@ prio_cth(Config) when is_list(Config) ->
[{empty_cth,[1000],1000},{empty_cth,[900],900},
{prio_cth,[1100,100],100},{prio_cth,[1100]}],Config).
+no_config(Config) when is_list(Config) ->
+ do_test(no_config, "ct_no_config_SUITE.erl",
+ [verify_config_cth],Config).
+
%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
%%%-----------------------------------------------------------------
@@ -1078,6 +1081,56 @@ test_events(prio_cth) ->
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}];
+test_events(no_config) ->
+ [
+ {?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,cth,{empty_cth,init,[verify_config_cth,[]]}},
+ {?eh,start_info,{1,1,2}},
+ {?eh,tc_start,{ct_framework,init_per_suite}},
+ {?eh,cth,{empty_cth,pre_init_per_suite,
+ [ct_no_config_SUITE,'$proplist',[]]}},
+ {?eh,cth,{empty_cth,post_init_per_suite,
+ [ct_no_config_SUITE,'$proplist','$proplist',[]]}},
+ {?eh,tc_done,{ct_framework,init_per_suite,ok}},
+ {?eh,tc_start,{ct_no_config_SUITE,test_case_1}},
+ {?eh,cth,{empty_cth,pre_init_per_testcase,
+ [test_case_1,'$proplist',[]]}},
+ {?eh,cth,{empty_cth,post_end_per_testcase,
+ [test_case_1,'$proplist',ok,[]]}},
+ {?eh,tc_done,{ct_no_config_SUITE,test_case_1,ok}},
+ {?eh,test_stats,{1,0,{0,0}}},
+ [{?eh,tc_start,{ct_framework,{init_per_group,test_group,'$proplist'}}},
+ {?eh,cth,{empty_cth,pre_init_per_group,
+ [test_group,'$proplist',[]]}},
+ {?eh,cth,{empty_cth,post_init_per_group,
+ [test_group,'$proplist','$proplist',[]]}},
+ {?eh,tc_done,{ct_framework,
+ {init_per_group,test_group,'$proplist'},ok}},
+ {?eh,tc_start,{ct_no_config_SUITE,test_case_2}},
+ {?eh,cth,{empty_cth,pre_init_per_testcase,
+ [test_case_2,'$proplist',[]]}},
+ {?eh,cth,{empty_cth,post_end_per_testcase,
+ [test_case_2,'$proplist',ok,[]]}},
+ {?eh,tc_done,{ct_no_config_SUITE,test_case_2,ok}},
+ {?eh,test_stats,{2,0,{0,0}}},
+ {?eh,tc_start,{ct_framework,{end_per_group,test_group,'$proplist'}}},
+ {?eh,cth,{empty_cth,pre_end_per_group,
+ [test_group,'$proplist',[]]}},
+ {?eh,cth,{empty_cth,post_end_per_group,
+ [test_group,'$proplist',ok,[]]}},
+ {?eh,tc_done,{ct_framework,{end_per_group,test_group,'$proplist'},ok}}],
+ {?eh,tc_start,{ct_framework,end_per_suite}},
+ {?eh,cth,{empty_cth,pre_end_per_suite,
+ [ct_no_config_SUITE,'$proplist',[]]}},
+ {?eh,cth,{empty_cth,post_end_per_suite,
+ [ct_no_config_SUITE,'$proplist',ok,[]]}},
+ {?eh,tc_done,{ct_framework,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,cth,{empty_cth,terminate,[[]]}},
+ {?eh,stop_logging,[]}
+ ];
+
test_events(ok) ->
ok.
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_no_config_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_no_config_SUITE.erl
new file mode 100644
index 0000000000..2ad80aa1e7
--- /dev/null
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_no_config_SUITE.erl
@@ -0,0 +1,64 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(ct_no_config_SUITE).
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+-include("ct.hrl").
+
+%%% This suite is used to verify 2 things:
+%%%
+%%% 1) All hook pre/post functions get called, even if no init/end
+%%% config functions exist in the suite (new from ver 1.6.1, R15B01).
+%%%
+%%% 2) The hook functions can read Config list elements, as well as
+%%% required config variables, even if no init/end config
+%%% functions exist.
+
+suite() ->
+ [{timetrap, {seconds,1}},
+ {ct_hooks, [verify_config_cth]},
+ {require,suite_cfg},
+ {default_config,suite_cfg,?MODULE}].
+
+group(test_group) ->
+ [{require,group_cfg},
+ {default_config,group_cfg,test_group}].
+
+test_case_1() ->
+ [{require,test_case_1_cfg},
+ {default_config,test_case_1_cfg,test_case_1}].
+
+test_case_2() ->
+ [{require,test_case_2_cfg},
+ {default_config,test_case_2_cfg,test_case_2}].
+
+all() ->
+ [test_case_1, {group,test_group}].
+
+groups() ->
+ [{test_group,[],[test_case_2]}].
+
+test_case_1(Config) ->
+ ok.
+
+test_case_2(Config) ->
+ ok.
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
index 7befcfa57c..2529e806ea 100644
--- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
@@ -1,277 +1,277 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
-%%% @doc Common Test Example Suite Callback module.
-%%%
-%%% <p>This module gives an example of a common test CTH (Common Test Hook).
-%%% There are many ways to add a CTH to a test run, you can do it either in
-%%% the command line using -ct_hook, in a test spec using
-%%% {ct_hook,M} or in the suite it self by returning ct_hook
-%%% from either suite/0, init_per_suite/1, init_per_group/2 and
-%%% init_per_testcase/2. The scope of the CTH is determined by where is it
-%%% started. If it is started in the command line or test spec then it will
-%%% be stopped at the end of all tests. If it is started in init_per_suite,
-%%% it will be stopped after end_per_suite and so on. See terminate
-%%% documentation for a table describing the scoping machanics.
-%%%
-%%% All of callbacks except init/1 in a CTH are optional.</p>
-
--module(empty_cth).
-
-%% CT Hooks
--export([id/1]).
--export([init/2]).
-
--export([pre_init_per_suite/3]).
--export([post_init_per_suite/4]).
--export([pre_end_per_suite/3]).
--export([post_end_per_suite/4]).
-
--export([pre_init_per_group/3]).
--export([post_init_per_group/4]).
--export([pre_end_per_group/3]).
--export([post_end_per_group/4]).
-
--export([pre_init_per_testcase/3]).
--export([post_end_per_testcase/4]).
-
--export([on_tc_fail/3]).
--export([on_tc_skip/3]).
-
--export([terminate/1]).
-
--include_lib("common_test/src/ct_util.hrl").
--include_lib("common_test/include/ct_event.hrl").
-
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%% @doc Common Test Example Suite Callback module.
+%%%
+%%% <p>This module gives an example of a common test CTH (Common Test Hook).
+%%% There are many ways to add a CTH to a test run, you can do it either in
+%%% the command line using -ct_hook, in a test spec using
+%%% {ct_hook,M} or in the suite it self by returning ct_hook
+%%% from either suite/0, init_per_suite/1, init_per_group/2 and
+%%% init_per_testcase/2. The scope of the CTH is determined by where is it
+%%% started. If it is started in the command line or test spec then it will
+%%% be stopped at the end of all tests. If it is started in init_per_suite,
+%%% it will be stopped after end_per_suite and so on. See terminate
+%%% documentation for a table describing the scoping machanics.
+%%%
+%%% All of callbacks except init/1 in a CTH are optional.</p>
+
+-module(empty_cth).
+
+%% CT Hooks
+-export([id/1]).
+-export([init/2]).
+
+-export([pre_init_per_suite/3]).
+-export([post_init_per_suite/4]).
+-export([pre_end_per_suite/3]).
+-export([post_end_per_suite/4]).
+
+-export([pre_init_per_group/3]).
+-export([post_init_per_group/4]).
+-export([pre_end_per_group/3]).
+-export([post_end_per_group/4]).
+
+-export([pre_init_per_testcase/3]).
+-export([post_end_per_testcase/4]).
+
+-export([on_tc_fail/3]).
+-export([on_tc_skip/3]).
+
+-export([terminate/1]).
+
+-include_lib("common_test/src/ct_util.hrl").
+-include_lib("common_test/include/ct_event.hrl").
+
-type config() :: proplists:proplist().
--type reason() :: term().
--type skip_or_fail() :: {skip, reason()} |
- {auto_skip, reason()} |
- {fail, reason()} |
- {'EXIT',reason()}.
-
--record(state, { id = ?MODULE :: term()}).
-
-%% @doc Always called before any other callback function. Use this to initiate
-%% any common state. It should return an state for this CTH.
+-type reason() :: term().
+-type skip_or_fail() :: {skip, reason()} |
+ {auto_skip, reason()} |
+ {fail, reason()} |
+ {'EXIT',reason()}.
+
+-record(state, { id = ?MODULE :: term()}).
+
+%% @doc Always called before any other callback function. Use this to initiate
+%% any common state. It should return an state for this CTH.
-spec init(Id :: term(), Opts :: proplists:proplist()) ->
- {ok, State :: #state{}}.
-init(Id, Opts) ->
- gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, init, [Id, Opts]}}),
- {ok,Opts}.
-
-%% @doc The ID is used to uniquly identify an CTH instance, if two CTH's
-%% return the same ID the seconds CTH is ignored. This function should NOT
-%% have any side effects as it might be called multiple times by common test.
+ {ok, State :: #state{}}.
+init(Id, Opts) ->
+ gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, init, [Id, Opts]}}),
+ {ok,Opts}.
+
+%% @doc The ID is used to uniquly identify an CTH instance, if two CTH's
+%% return the same ID the seconds CTH is ignored. This function should NOT
+%% have any side effects as it might be called multiple times by common test.
-spec id(Opts :: proplists:proplist()) ->
- Id :: term().
-id(Opts) ->
- gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, id, [Opts]}}),
- now().
-
-%% @doc Called before init_per_suite is called. Note that this callback is
-%% only called if the CTH is added before init_per_suite is run (eg. in a test
-%% specification, suite/0 function etc).
-%% You can change the config in the this function.
--spec pre_init_per_suite(Suite :: atom(),
- Config :: config(),
- State :: #state{}) ->
- {config() | skip_or_fail(), NewState :: #state{}}.
-pre_init_per_suite(Suite,Config,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, pre_init_per_suite,
- [Suite,Config,State]}}),
- {Config, State}.
-
-%% @doc Called after init_per_suite.
-%% you can change the return value in this function.
--spec post_init_per_suite(Suite :: atom(),
- Config :: config(),
- Return :: config() | skip_or_fail(),
- State :: #state{}) ->
- {config() | skip_or_fail(), NewState :: #state{}}.
-post_init_per_suite(Suite,Config,Return,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, post_init_per_suite,
- [Suite,Config,Return,State]}}),
- {Return, State}.
-
-%% @doc Called before end_per_suite. The config/state can be changed here,
-%% though it will only affect the *end_per_suite function.
--spec pre_end_per_suite(Suite :: atom(),
- Config :: config() | skip_or_fail(),
- State :: #state{}) ->
- {ok | skip_or_fail(), NewState :: #state{}}.
-pre_end_per_suite(Suite,Config,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, pre_end_per_suite,
- [Suite,Config,State]}}),
- {Config, State}.
-
-%% @doc Called after end_per_suite. Note that the config cannot be
-%% changed here, only the status of the suite.
--spec post_end_per_suite(Suite :: atom(),
- Config :: config(),
- Return :: term(),
- State :: #state{}) ->
- {ok | skip_or_fail(), NewState :: #state{}}.
-post_end_per_suite(Suite,Config,Return,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, post_end_per_suite,
- [Suite,Config,Return,State]}}),
- {Return, State}.
-
-%% @doc Called before each init_per_group.
-%% You can change the config in this function.
--spec pre_init_per_group(Group :: atom(),
- Config :: config(),
- State :: #state{}) ->
- {config() | skip_or_fail(), NewState :: #state{}}.
-pre_init_per_group(Group,Config,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, pre_init_per_group,
- [Group,Config,State]}}),
- {Config, State}.
-
-%% @doc Called after each init_per_group.
-%% You can change the return value in this function.
--spec post_init_per_group(Group :: atom(),
- Config :: config(),
- Return :: config() | skip_or_fail(),
- State :: #state{}) ->
- {config() | skip_or_fail(), NewState :: #state{}}.
-post_init_per_group(Group,Config,Return,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, post_init_per_group,
- [Group,Config,Return,State]}}),
- {Return, State}.
-
-%% @doc Called after each end_per_group. The config/state can be changed here,
-%% though it will only affect the *end_per_group functions.
--spec pre_end_per_group(Group :: atom(),
- Config :: config() | skip_or_fail(),
- State :: #state{}) ->
- {ok | skip_or_fail(), NewState :: #state{}}.
-pre_end_per_group(Group,Config,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, pre_end_per_group,
- [Group,Config,State]}}),
- {Config, State}.
-
-%% @doc Called after each end_per_group. Note that the config cannot be
-%% changed here, only the status of the group.
--spec post_end_per_group(Group :: atom(),
- Config :: config(),
- Return :: term(),
- State :: #state{}) ->
- {ok | skip_or_fail(), NewState :: #state{}}.
-post_end_per_group(Group,Config,Return,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, post_end_per_group,
- [Group,Config,Return,State]}}),
- {Return, State}.
-
-%% @doc Called before each test case.
-%% You can change the config in this function.
--spec pre_init_per_testcase(TC :: atom(),
- Config :: config(),
- State :: #state{}) ->
- {config() | skip_or_fail(), NewState :: #state{}}.
-pre_init_per_testcase(TC,Config,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, pre_init_per_testcase,
- [TC,Config,State]}}),
- {Config, State}.
-
-%% @doc Called after each test case. Note that the config cannot be
-%% changed here, only the status of the test case.
--spec post_end_per_testcase(TC :: atom(),
- Config :: config(),
- Return :: term(),
- State :: #state{}) ->
- {ok | skip_or_fail(), NewState :: #state{}}.
-post_end_per_testcase(TC,Config,Return,State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, post_end_per_testcase,
- [TC,Config,Return,State]}}),
- {Return, State}.
-
-%% @doc Called after post_init_per_suite, post_end_per_suite, post_init_per_group,
-%% post_end_per_group and post_end_per_tc if the suite, group or test case failed.
-%% This function should be used for extra cleanup which might be needed.
-%% It is not possible to modify the config or the status of the test run.
--spec on_tc_fail(TC :: init_per_suite | end_per_suite |
- init_per_group | end_per_group | atom(),
- Reason :: term(), State :: #state{}) ->
- NewState :: #state{}.
-on_tc_fail(TC, Reason, State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, on_tc_fail,
- [TC,Reason,State]}}),
- State.
-
-%% @doc Called when a test case is skipped by either user action
-%% or due to an init function failing. Test case can be
-%% end_per_suite, init_per_group, end_per_group and the actual test cases.
--spec on_tc_skip(TC :: end_per_suite |
- init_per_group | end_per_group | atom(),
- {tc_auto_skip, {failed, {Mod :: atom(), Function :: atom(), Reason :: term()}}} |
- {tc_user_skip, {skipped, Reason :: term()}},
- State :: #state{}) ->
- NewState :: #state{}.
-on_tc_skip(TC, Reason, State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, on_tc_skip,
- [TC,Reason,State]}}),
- State.
-
-%% @doc Called when the scope of the CTH is done, this depends on
-%% when the CTH was specified. This translation table describes when this
-%% function is called.
-%%
-%% | Started in | terminate called |
-%% |---------------------|-------------------------|
-%% | command_line | after all tests are run |
-%% | test spec | after all tests are run |
-%% | suite/0 | after SUITE is done |
-%% | init_per_suite/1 | after SUITE is done |
-%% | init_per_group/2 | after group is done |
-%% |-----------------------------------------------|
-%%
--spec terminate(State :: #state{}) ->
- term().
-terminate(State) ->
- gen_event:notify(
- ?CT_EVMGR_REF, #event{ name = cth, node = node(),
- data = {?MODULE, terminate, [State]}}),
- ok.
+ Id :: term().
+id(Opts) ->
+ gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, id, [Opts]}}),
+ now().
+
+%% @doc Called before init_per_suite is called. Note that this callback is
+%% only called if the CTH is added before init_per_suite is run (eg. in a test
+%% specification, suite/0 function etc).
+%% You can change the config in the this function.
+-spec pre_init_per_suite(Suite :: atom(),
+ Config :: config(),
+ State :: #state{}) ->
+ {config() | skip_or_fail(), NewState :: #state{}}.
+pre_init_per_suite(Suite,Config,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, pre_init_per_suite,
+ [Suite,Config,State]}}),
+ {Config, State}.
+
+%% @doc Called after init_per_suite.
+%% you can change the return value in this function.
+-spec post_init_per_suite(Suite :: atom(),
+ Config :: config(),
+ Return :: config() | skip_or_fail(),
+ State :: #state{}) ->
+ {config() | skip_or_fail(), NewState :: #state{}}.
+post_init_per_suite(Suite,Config,Return,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, post_init_per_suite,
+ [Suite,Config,Return,State]}}),
+ {Return, State}.
+
+%% @doc Called before end_per_suite. The config/state can be changed here,
+%% though it will only affect the *end_per_suite function.
+-spec pre_end_per_suite(Suite :: atom(),
+ Config :: config() | skip_or_fail(),
+ State :: #state{}) ->
+ {ok | skip_or_fail(), NewState :: #state{}}.
+pre_end_per_suite(Suite,Config,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, pre_end_per_suite,
+ [Suite,Config,State]}}),
+ {Config, State}.
+
+%% @doc Called after end_per_suite. Note that the config cannot be
+%% changed here, only the status of the suite.
+-spec post_end_per_suite(Suite :: atom(),
+ Config :: config(),
+ Return :: term(),
+ State :: #state{}) ->
+ {ok | skip_or_fail(), NewState :: #state{}}.
+post_end_per_suite(Suite,Config,Return,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, post_end_per_suite,
+ [Suite,Config,Return,State]}}),
+ {Return, State}.
+
+%% @doc Called before each init_per_group.
+%% You can change the config in this function.
+-spec pre_init_per_group(Group :: atom(),
+ Config :: config(),
+ State :: #state{}) ->
+ {config() | skip_or_fail(), NewState :: #state{}}.
+pre_init_per_group(Group,Config,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, pre_init_per_group,
+ [Group,Config,State]}}),
+ {Config, State}.
+
+%% @doc Called after each init_per_group.
+%% You can change the return value in this function.
+-spec post_init_per_group(Group :: atom(),
+ Config :: config(),
+ Return :: config() | skip_or_fail(),
+ State :: #state{}) ->
+ {config() | skip_or_fail(), NewState :: #state{}}.
+post_init_per_group(Group,Config,Return,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, post_init_per_group,
+ [Group,Config,Return,State]}}),
+ {Return, State}.
+
+%% @doc Called after each end_per_group. The config/state can be changed here,
+%% though it will only affect the *end_per_group functions.
+-spec pre_end_per_group(Group :: atom(),
+ Config :: config() | skip_or_fail(),
+ State :: #state{}) ->
+ {ok | skip_or_fail(), NewState :: #state{}}.
+pre_end_per_group(Group,Config,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, pre_end_per_group,
+ [Group,Config,State]}}),
+ {Config, State}.
+
+%% @doc Called after each end_per_group. Note that the config cannot be
+%% changed here, only the status of the group.
+-spec post_end_per_group(Group :: atom(),
+ Config :: config(),
+ Return :: term(),
+ State :: #state{}) ->
+ {ok | skip_or_fail(), NewState :: #state{}}.
+post_end_per_group(Group,Config,Return,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, post_end_per_group,
+ [Group,Config,Return,State]}}),
+ {Return, State}.
+
+%% @doc Called before each test case.
+%% You can change the config in this function.
+-spec pre_init_per_testcase(TC :: atom(),
+ Config :: config(),
+ State :: #state{}) ->
+ {config() | skip_or_fail(), NewState :: #state{}}.
+pre_init_per_testcase(TC,Config,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, pre_init_per_testcase,
+ [TC,Config,State]}}),
+ {Config, State}.
+
+%% @doc Called after each test case. Note that the config cannot be
+%% changed here, only the status of the test case.
+-spec post_end_per_testcase(TC :: atom(),
+ Config :: config(),
+ Return :: term(),
+ State :: #state{}) ->
+ {ok | skip_or_fail(), NewState :: #state{}}.
+post_end_per_testcase(TC,Config,Return,State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, post_end_per_testcase,
+ [TC,Config,Return,State]}}),
+ {Return, State}.
+
+%% @doc Called after post_init_per_suite, post_end_per_suite, post_init_per_group,
+%% post_end_per_group and post_end_per_tc if the suite, group or test case failed.
+%% This function should be used for extra cleanup which might be needed.
+%% It is not possible to modify the config or the status of the test run.
+-spec on_tc_fail(TC :: init_per_suite | end_per_suite |
+ init_per_group | end_per_group | atom(),
+ Reason :: term(), State :: #state{}) ->
+ NewState :: #state{}.
+on_tc_fail(TC, Reason, State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, on_tc_fail,
+ [TC,Reason,State]}}),
+ State.
+
+%% @doc Called when a test case is skipped by either user action
+%% or due to an init function failing. Test case can be
+%% end_per_suite, init_per_group, end_per_group and the actual test cases.
+-spec on_tc_skip(TC :: end_per_suite |
+ init_per_group | end_per_group | atom(),
+ {tc_auto_skip, {failed, {Mod :: atom(), Function :: atom(), Reason :: term()}}} |
+ {tc_user_skip, {skipped, Reason :: term()}},
+ State :: #state{}) ->
+ NewState :: #state{}.
+on_tc_skip(TC, Reason, State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, on_tc_skip,
+ [TC,Reason,State]}}),
+ State.
+
+%% @doc Called when the scope of the CTH is done, this depends on
+%% when the CTH was specified. This translation table describes when this
+%% function is called.
+%%
+%% | Started in | terminate called |
+%% |---------------------|-------------------------|
+%% | command_line | after all tests are run |
+%% | test spec | after all tests are run |
+%% | suite/0 | after SUITE is done |
+%% | init_per_suite/1 | after SUITE is done |
+%% | init_per_group/2 | after group is done |
+%% |-----------------------------------------------|
+%%
+-spec terminate(State :: #state{}) ->
+ term().
+terminate(State) ->
+ gen_event:notify(
+ ?CT_EVMGR_REF, #event{ name = cth, node = node(),
+ data = {?MODULE, terminate, [State]}}),
+ ok.
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/verify_config_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/verify_config_cth.erl
new file mode 100644
index 0000000000..99ea261e14
--- /dev/null
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/verify_config_cth.erl
@@ -0,0 +1,130 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(verify_config_cth).
+
+-include_lib("common_test/src/ct_util.hrl").
+
+%% CT Hooks
+-compile(export_all).
+
+-define(val(K, L), proplists:get_value(K, L)).
+
+id(Opts) ->
+ ?MODULE.
+
+init(Id, Opts) ->
+ {ok, State} = empty_cth:init(Id, Opts),
+ {ok, State}.
+
+pre_init_per_suite(Suite, Config, State) ->
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ empty_cth:pre_init_per_suite(Suite,
+ [{pre_init_per_suite,true} | Config],
+ State).
+
+post_init_per_suite(Suite,Config,Return,State) ->
+ true = ?val(pre_init_per_suite, Return),
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ empty_cth:post_init_per_suite(Suite,
+ Config,
+ [{post_init_per_suite,true} | Return],
+ State).
+
+pre_end_per_suite(Suite,Config,State) ->
+ true = ?val(post_init_per_suite, Config),
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ empty_cth:pre_end_per_suite(Suite,
+ [{pre_end_per_suite,true} | Config],
+ State).
+
+post_end_per_suite(Suite,Config,Return,State) ->
+ true = ?val(pre_end_per_suite, Config),
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ empty_cth:post_end_per_suite(Suite,Config,Return,State).
+
+pre_init_per_group(Group,Config,State) ->
+ true = ?val(post_init_per_suite, Config),
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ test_group = ct:get_config(group_cfg),
+ empty_cth:pre_init_per_group(Group,
+ [{pre_init_per_group,true} | Config],
+ State).
+
+post_init_per_group(Group,Config,Return,State) ->
+ true = ?val(pre_init_per_group, Return),
+ test_group = ct:get_config(group_cfg),
+ empty_cth:post_init_per_group(Group,
+ Config,
+ [{post_init_per_group,true} | Return],
+ State).
+
+pre_end_per_group(Group,Config,State) ->
+ true = ?val(post_init_per_group, Config),
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ test_group = ct:get_config(group_cfg),
+ empty_cth:pre_end_per_group(Group,
+ [{pre_end_per_group,true} | Config],
+ State).
+
+post_end_per_group(Group,Config,Return,State) ->
+ true = ?val(pre_end_per_group, Config),
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ test_group = ct:get_config(group_cfg),
+ empty_cth:post_end_per_group(Group,Config,Return,State).
+
+pre_init_per_testcase(TC,Config,State) ->
+ true = ?val(post_init_per_suite, Config),
+ case ?val(name, ?val(tc_group_properties, Config)) of
+ undefined ->
+ ok;
+ _ ->
+ true = ?val(post_init_per_group, Config),
+ test_group = ct:get_config(group_cfg)
+ end,
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ CfgKey = list_to_atom(atom_to_list(TC) ++ "_cfg"),
+ TC = ct:get_config(CfgKey),
+ empty_cth:pre_init_per_testcase(TC,
+ [{pre_init_per_testcase,true} | Config],
+ State).
+
+post_end_per_testcase(TC,Config,Return,State) ->
+ true = ?val(post_init_per_suite, Config),
+ true = ?val(pre_init_per_testcase, Config),
+ case ?val(name, ?val(tc_group_properties, Config)) of
+ undefined ->
+ ok;
+ _ ->
+ true = ?val(post_init_per_group, Config),
+ test_group = ct:get_config(group_cfg)
+ end,
+ ct_no_config_SUITE = ct:get_config(suite_cfg),
+ CfgKey = list_to_atom(atom_to_list(TC) ++ "_cfg"),
+ TC = ct:get_config(CfgKey),
+ empty_cth:post_end_per_testcase(TC,Config,Return,State).
+
+on_tc_fail(TC, Reason, State) ->
+ empty_cth:on_tc_fail(TC,Reason,State).
+
+on_tc_skip(TC, Reason, State) ->
+ empty_cth:on_tc_skip(TC,Reason,State).
+
+terminate(State) ->
+ empty_cth:terminate(State).
diff --git a/lib/common_test/test/ct_priv_dir_SUITE.erl b/lib/common_test/test/ct_priv_dir_SUITE.erl
new file mode 100644
index 0000000000..f6942d59bf
--- /dev/null
+++ b/lib/common_test/test/ct_priv_dir_SUITE.erl
@@ -0,0 +1,277 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%%-------------------------------------------------------------------
+%%% File: ct_priv_dir_SUITE
+%%%
+%%% Description:
+%%% Test that it works to use the create_priv_dir option.
+%%%
+%%%-------------------------------------------------------------------
+-module(ct_priv_dir_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("common_test/include/ct_event.hrl").
+
+-define(eh, ct_test_support_eh).
+
+%%--------------------------------------------------------------------
+%% TEST SERVER CALLBACK FUNCTIONS
+%%--------------------------------------------------------------------
+
+%%--------------------------------------------------------------------
+%% Description: Since Common Test starts another Test Server
+%% instance, the tests need to be performed on a separate node (or
+%% there will be clashes with logging processes etc).
+%%--------------------------------------------------------------------
+init_per_suite(Config) ->
+ Config1 = ct_test_support:init_per_suite(Config),
+ Config1.
+
+end_per_suite(Config) ->
+ ct_test_support:end_per_suite(Config).
+
+init_per_testcase(TestCase, Config) ->
+ ct_test_support:init_per_testcase(TestCase, Config).
+
+end_per_testcase(TestCase, Config) ->
+ ct_test_support:end_per_testcase(TestCase, Config).
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [
+ default,
+ auto_per_run,
+ auto_per_tc,
+ manual_per_tc,
+ spec_default,
+ spec_auto_per_run,
+ spec_auto_per_run,
+ spec_manual_per_tc
+ ].
+
+%%--------------------------------------------------------------------
+%% TEST CASES
+%%--------------------------------------------------------------------
+
+%%%-----------------------------------------------------------------
+%%%
+default(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Suite = filename:join(DataDir, "priv_dir_SUITE"),
+ {Opts,ERPid} = setup([{suite,Suite},{testcase,default},
+ {label,default}], Config),
+ ok = execute(default, Opts, ERPid, Config).
+
+%%%-----------------------------------------------------------------
+%%%
+auto_per_run(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Suite = filename:join(DataDir, "priv_dir_SUITE"),
+ {Opts,ERPid} = setup([{suite,Suite},{testcase,default},
+ {label,auto_per_run},
+ {create_priv_dir,auto_per_run}], Config),
+ ok = execute(auto_per_run, Opts, ERPid, Config).
+
+%%%-----------------------------------------------------------------
+%%%
+auto_per_tc(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Suite = filename:join(DataDir, "priv_dir_SUITE"),
+ {Opts,ERPid} = setup([{suite,Suite},{testcase,auto_per_tc},
+ {label,auto_per_tc},
+ {create_priv_dir,auto_per_tc}], Config),
+ ok = execute(auto_per_tc, Opts, ERPid, Config).
+
+%%%-----------------------------------------------------------------
+%%%
+manual_per_tc(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Suite = filename:join(DataDir, "priv_dir_SUITE"),
+ {Opts,ERPid} = setup([{suite,Suite},{testcase,manual_per_tc},
+ {label,manual_per_tc},
+ {create_priv_dir,manual_per_tc}], Config),
+ ok = execute(manual_per_tc, Opts, ERPid, Config).
+
+%%%-----------------------------------------------------------------
+%%%
+spec_default(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Spec = filename:join(DataDir, "default.spec"),
+ {Opts,ERPid} = setup([{spec,Spec},
+ {label,spec_default}], Config),
+ ok = execute(spec_default, Opts, ERPid, Config).
+
+%%%-----------------------------------------------------------------
+%%%
+spec_auto_per_run(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Spec = filename:join(DataDir, "auto_per_run.spec"),
+ {Opts,ERPid} = setup([{spec,Spec},
+ {label,spec_auto_per_run}], Config),
+ ok = execute(spec_auto_per_run, Opts, ERPid, Config).
+
+%%%-----------------------------------------------------------------
+%%%
+spec_auto_per_tc(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Spec = filename:join(DataDir, "auto_per_tc.spec"),
+ {Opts,ERPid} = setup([{spec,Spec},
+ {label,spec_auto_per_tc}], Config),
+ ok = execute(spec_auto_per_tc, Opts, ERPid, Config).
+
+%%%-----------------------------------------------------------------
+%%%
+spec_manual_per_tc(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Spec = filename:join(DataDir, "manual_per_tc.spec"),
+ {Opts,ERPid} = setup([{spec,Spec},
+ {label,spec_manual_per_tc}], Config),
+ ok = execute(spec_manual_per_tc, Opts, ERPid, Config).
+
+
+%%%-----------------------------------------------------------------
+%%% HELP FUNCTIONS
+%%%-----------------------------------------------------------------
+
+setup(Test, Config) ->
+ Opts0 = ct_test_support:get_opts(Config),
+ Level = ?config(trace_level, Config),
+ EvHArgs = [{cbm,ct_test_support},{trace_level,Level}],
+ Opts = Opts0 ++ [{event_handler,{?eh,EvHArgs}}|Test],
+ ERPid = ct_test_support:start_event_receiver(Config),
+ {Opts,ERPid}.
+
+execute(Name, Opts, ERPid, Config) ->
+ ok = ct_test_support:run(Opts, Config),
+ Events = ct_test_support:get_events(ERPid, Config),
+
+ ct_test_support:log_events(Name,
+ reformat(Events, ?eh),
+ ?config(priv_dir, Config),
+ Opts),
+
+ TestEvents = events_to_check(Name),
+ ct_test_support:verify_events(TestEvents, Events, Config).
+
+reformat(Events, EH) ->
+ ct_test_support:reformat(Events, EH).
+
+%%%-----------------------------------------------------------------
+%%% TEST EVENTS
+%%%-----------------------------------------------------------------
+events_to_check(Test) ->
+ %% 2 tests (ct:run_test + script_start) is default
+ events_to_check(Test, 2).
+
+events_to_check(_, 0) ->
+ [];
+events_to_check(Test, N) ->
+ test_events(Test) ++ events_to_check(Test, N-1).
+
+
+test_events(DEF) when DEF == default ; DEF == auto_per_run ->
+ [
+ {?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,1}},
+ {?eh,tc_start,{priv_dir_SUITE,init_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,init_per_suite,ok}},
+ {?eh,tc_start,{priv_dir_SUITE,default}},
+ {?eh,tc_done,{priv_dir_SUITE,default,ok}},
+ {?eh,test_stats,{1,0,{0,0}}},
+ {?eh,tc_start,{priv_dir_SUITE,end_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}];
+
+test_events(auto_per_tc) ->
+ [{?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,1}},
+ {?eh,tc_start,{priv_dir_SUITE,init_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,init_per_suite,ok}},
+ {?eh,tc_start,{priv_dir_SUITE,auto_per_tc}},
+ {?eh,tc_done,{priv_dir_SUITE,auto_per_tc,ok}},
+ {?eh,test_stats,{1,0,{0,0}}},
+ {?eh,tc_start,{priv_dir_SUITE,end_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}];
+
+test_events(manual_per_tc) ->
+ [{?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,1}},
+ {?eh,tc_start,{priv_dir_SUITE,init_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,init_per_suite,ok}},
+ {?eh,tc_start,{priv_dir_SUITE,manual_per_tc}},
+ {?eh,tc_done,{priv_dir_SUITE,manual_per_tc,ok}},
+ {?eh,test_stats,{1,0,{0,0}}},
+ {?eh,tc_start,{priv_dir_SUITE,end_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}];
+
+test_events(SPECDEF) when SPECDEF == spec_default ;
+ SPECDEF == spec_auto_per_run ->
+ [{?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,1}},
+ {?eh,tc_start,{priv_dir_SUITE,init_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,init_per_suite,ok}},
+ {?eh,tc_start,{priv_dir_SUITE,default}},
+ {?eh,tc_done,{priv_dir_SUITE,default,ok}},
+ {?eh,test_stats,{1,0,{0,0}}},
+ {?eh,tc_start,{priv_dir_SUITE,end_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}];
+
+test_events(spec_auto_per_tc) ->
+ [{?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,1}},
+ {?eh,tc_start,{priv_dir_SUITE,init_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,init_per_suite,ok}},
+ {?eh,tc_start,{priv_dir_SUITE,auto_per_tc}},
+ {?eh,tc_done,{priv_dir_SUITE,auto_per_tc,ok}},
+ {?eh,test_stats,{1,0,{0,0}}},
+ {?eh,tc_start,{priv_dir_SUITE,end_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}];
+
+test_events(spec_manual_per_tc) ->
+ [{?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,1}},
+ {?eh,tc_start,{priv_dir_SUITE,init_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,init_per_suite,ok}},
+ {?eh,tc_start,{priv_dir_SUITE,manual_per_tc}},
+ {?eh,tc_done,{priv_dir_SUITE,manual_per_tc,ok}},
+ {?eh,test_stats,{1,0,{0,0}}},
+ {?eh,tc_start,{priv_dir_SUITE,end_per_suite}},
+ {?eh,tc_done,{priv_dir_SUITE,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}].
+
diff --git a/lib/common_test/test/ct_priv_dir_SUITE_data/auto_per_run.spec b/lib/common_test/test/ct_priv_dir_SUITE_data/auto_per_run.spec
new file mode 100644
index 0000000000..4dde0ed1f4
--- /dev/null
+++ b/lib/common_test/test/ct_priv_dir_SUITE_data/auto_per_run.spec
@@ -0,0 +1,5 @@
+{create_priv_dir, auto_per_run}.
+
+{alias, curr, "./"}.
+
+{cases, curr, priv_dir_SUITE, default}. \ No newline at end of file
diff --git a/lib/common_test/test/ct_priv_dir_SUITE_data/auto_per_tc.spec b/lib/common_test/test/ct_priv_dir_SUITE_data/auto_per_tc.spec
new file mode 100644
index 0000000000..c265500865
--- /dev/null
+++ b/lib/common_test/test/ct_priv_dir_SUITE_data/auto_per_tc.spec
@@ -0,0 +1,5 @@
+{create_priv_dir, auto_per_tc}.
+
+{alias, curr, "./"}.
+
+{cases, curr, priv_dir_SUITE, auto_per_tc}. \ No newline at end of file
diff --git a/lib/common_test/test/ct_priv_dir_SUITE_data/default.spec b/lib/common_test/test/ct_priv_dir_SUITE_data/default.spec
new file mode 100644
index 0000000000..2f053e792f
--- /dev/null
+++ b/lib/common_test/test/ct_priv_dir_SUITE_data/default.spec
@@ -0,0 +1,3 @@
+{alias, curr, "./"}.
+
+{cases, curr, priv_dir_SUITE, default}. \ No newline at end of file
diff --git a/lib/common_test/test/ct_priv_dir_SUITE_data/manual_per_tc.spec b/lib/common_test/test/ct_priv_dir_SUITE_data/manual_per_tc.spec
new file mode 100644
index 0000000000..4f98734d5f
--- /dev/null
+++ b/lib/common_test/test/ct_priv_dir_SUITE_data/manual_per_tc.spec
@@ -0,0 +1,5 @@
+{create_priv_dir, manual_per_tc}.
+
+{alias, curr, "./"}.
+
+{cases, curr, priv_dir_SUITE, manual_per_tc}. \ No newline at end of file
diff --git a/lib/common_test/test/ct_priv_dir_SUITE_data/priv_dir_SUITE.erl b/lib/common_test/test/ct_priv_dir_SUITE_data/priv_dir_SUITE.erl
new file mode 100644
index 0000000000..423cb2999b
--- /dev/null
+++ b/lib/common_test/test/ct_priv_dir_SUITE_data/priv_dir_SUITE.erl
@@ -0,0 +1,127 @@
+%%%-------------------------------------------------------------------
+%%% @author Peter Andersson <[email protected]>
+%%% @copyright (C) 2012, Peter Andersson
+%%% @doc
+%%%
+%%% @end
+%%% Created : 23 Jan 2012 by Peter Andersson <[email protected]>
+%%%-------------------------------------------------------------------
+-module(priv_dir_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+%%--------------------------------------------------------------------
+%% @spec suite() -> Info
+%% Info = [tuple()]
+%% @end
+%%--------------------------------------------------------------------
+suite() ->
+ [{timetrap,{seconds,30}}].
+
+%%--------------------------------------------------------------------
+%% @spec init_per_suite(Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%% @end
+%%--------------------------------------------------------------------
+init_per_suite(Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% @spec end_per_suite(Config0) -> void() | {save_config,Config1}
+%% Config0 = Config1 = [tuple()]
+%% @end
+%%--------------------------------------------------------------------
+end_per_suite(_Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% @spec init_per_group(GroupName, Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% GroupName = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%% @end
+%%--------------------------------------------------------------------
+init_per_group(_GroupName, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% @spec end_per_group(GroupName, Config0) ->
+%% void() | {save_config,Config1}
+%% GroupName = atom()
+%% Config0 = Config1 = [tuple()]
+%% @end
+%%--------------------------------------------------------------------
+end_per_group(_GroupName, _Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% @spec init_per_testcase(TestCase, Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% TestCase = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%% @end
+%%--------------------------------------------------------------------
+init_per_testcase(_TestCase, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% @spec end_per_testcase(TestCase, Config0) ->
+%% void() | {save_config,Config1} | {fail,Reason}
+%% TestCase = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%% @end
+%%--------------------------------------------------------------------
+end_per_testcase(_TestCase, _Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% @spec groups() -> [Group]
+%% Group = {GroupName,Properties,GroupsAndTestCases}
+%% GroupName = atom()
+%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]
+%% GroupsAndTestCases = [Group | {group,GroupName} | TestCase]
+%% TestCase = atom()
+%% Shuffle = shuffle | {shuffle,{integer(),integer(),integer()}}
+%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |
+%% repeat_until_any_ok | repeat_until_any_fail
+%% N = integer() | forever
+%% @end
+%%--------------------------------------------------------------------
+groups() ->
+ [].
+
+%%--------------------------------------------------------------------
+%% @spec all() -> GroupsAndTestCases | {skip,Reason}
+%% GroupsAndTestCases = [{group,GroupName} | TestCase]
+%% GroupName = atom()
+%% TestCase = atom()
+%% Reason = term()
+%% @end
+%%--------------------------------------------------------------------
+all() ->
+ [].
+
+default(Config) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ "log_private" = filename:basename(PrivDir),
+ {ok,_} = file:list_dir(PrivDir).
+
+auto_per_tc(Config) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ ["log_private",_] = string:tokens(filename:basename(PrivDir), "."),
+ {ok,_} = file:list_dir(PrivDir).
+
+manual_per_tc(Config) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ ["log_private",_] = string:tokens(filename:basename(PrivDir), "."),
+ {error,_} = file:list_dir(PrivDir),
+ ok = ct:make_priv_dir(),
+ {ok,_} = file:list_dir(PrivDir).
+
diff --git a/lib/common_test/test/ct_test_server_if_1_SUITE.erl b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
index efc0309781..8825d84884 100644
--- a/lib/common_test/test/ct_test_server_if_1_SUITE.erl
+++ b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
@@ -242,25 +242,28 @@ test_events(ts_if_1) ->
{?eh,tc_auto_skip,{ts_if_5_SUITE,end_per_suite,
{require_failed_in_suite0,{not_available,undef_variable}}}},
- {?eh,tc_start,{ts_if_6_SUITE,tc1}},
- {?eh,tc_done,{ts_if_6_SUITE,tc1,{failed,{error,{suite0_failed,{exited,suite0_byebye}}}}}},
- {?eh,test_stats,{3,5,{6,8}}},
+ {?eh,tc_start,{ct_framework,init_per_suite}},
+ {?eh,tc_done,{ct_framework,init_per_suite,
+ {failed,{error,{suite0_failed,{exited,suite0_byebye}}}}}},
+ {?eh,tc_auto_skip,{ts_if_6_SUITE,tc1,
+ {failed,{error,{suite0_failed,{exited,suite0_byebye}}}}}},
+ {?eh,test_stats,{3,5,{5,9}}},
{?eh,tc_start,{ts_if_7_SUITE,tc1}},
{?eh,tc_done,{ts_if_7_SUITE,tc1,ok}},
- {?eh,test_stats,{4,5,{6,8}}},
+ {?eh,test_stats,{4,5,{5,9}}},
{?eh,tc_start,{ts_if_8_SUITE,tc1}},
{?eh,tc_done,{ts_if_8_SUITE,tc1,{failed,{error,failed_on_purpose}}}},
- {?eh,test_stats,{4,6,{6,8}}},
+ {?eh,test_stats,{4,6,{5,9}}},
{?eh,tc_user_skip,{skipped_by_spec_1_SUITE,all,"should be skipped"}},
- {?eh,test_stats,{4,6,{7,8}}},
+ {?eh,test_stats,{4,6,{6,9}}},
{?eh,tc_start,{skipped_by_spec_2_SUITE,init_per_suite}},
{?eh,tc_done,{skipped_by_spec_2_SUITE,init_per_suite,ok}},
{?eh,tc_user_skip,{skipped_by_spec_2_SUITE,tc1,"should be skipped"}},
- {?eh,test_stats,{4,6,{8,8}}},
+ {?eh,test_stats,{4,6,{7,9}}},
{?eh,tc_start,{skipped_by_spec_2_SUITE,end_per_suite}},
{?eh,tc_done,{skipped_by_spec_2_SUITE,end_per_suite,ok}},
diff --git a/lib/common_test/vsn.mk b/lib/common_test/vsn.mk
index 2f43c1bc17..b94f7f7593 100644
--- a/lib/common_test/vsn.mk
+++ b/lib/common_test/vsn.mk
@@ -1 +1 @@
-COMMON_TEST_VSN = 1.6
+COMMON_TEST_VSN = 1.6.1
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index 5b155398dc..4e67639805 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -150,14 +150,26 @@ guard(Expr, Sub) ->
opt_guard_try(#c_seq{arg=Arg,body=Body0}=Seq) ->
Body = opt_guard_try(Body0),
case {Arg,Body} of
- {#c_call{},#c_literal{val=false}} ->
- %% We have sequence consisting of a call (evaluted
- %% for a possible exception only), followed by 'false'.
- %% Since the sequence is inside a try block that will
+ {#c_call{module=#c_literal{val=Mod},
+ name=#c_literal{val=Name},
+ args=Args},#c_literal{val=false}} ->
+ %% We have sequence consisting of a call (evaluated
+ %% for a possible exception and/or side effect only),
+ %% followed by 'false'.
+ %% Since the sequence is inside a try block that will
%% default to 'false' if any exception occurs, not
%% evalutating the call will not change the behaviour
- %% of the guard.
- Body;
+ %% provided that the call has no side effects.
+ case erl_bifs:is_pure(Mod, Name, length(Args)) of
+ false ->
+ %% Not a pure BIF (meaning that this is not
+ %% a guard and that we must keep the call).
+ Seq#c_seq{body=Body};
+ true ->
+ %% The BIF has no side effects, so it can
+ %% be safely removed.
+ Body
+ end;
{_,_} ->
Seq#c_seq{body=Body}
end;
@@ -1747,36 +1759,26 @@ opt_bool_clauses([_|_], _, _) ->
%% end. NewVar ->
%% erlang:error(badarg)
%% end.
-%%
-%% We add the extra match-all clause at the end only if Expr is
-%% not guaranteed to evaluate to a boolean.
opt_bool_not(#c_case{arg=Arg,clauses=Cs0}=Case0) ->
case Arg of
#c_call{anno=Anno,module=#c_literal{val=erlang},
name=#c_literal{val='not'},
args=[Expr]} ->
- Cs = opt_bool_not(Anno, Expr, Cs0),
+ Cs = [opt_bool_not_invert(C) || C <- Cs0] ++
+ [#c_clause{anno=[compiler_generated],
+ pats=[#c_var{name=cor_variable}],
+ guard=#c_literal{val=true},
+ body=#c_call{anno=Anno,
+ module=#c_literal{val=erlang},
+ name=#c_literal{val=error},
+ args=[#c_literal{val=badarg}]}}],
Case = Case0#c_case{arg=Expr,clauses=Cs},
opt_bool_not(Case);
_ ->
opt_bool_case_redundant(Case0)
end.
-opt_bool_not(Anno, Expr, Cs) ->
- Tail = case is_bool_expr(Expr) of
- false ->
- [#c_clause{anno=[compiler_generated],
- pats=[#c_var{name=cor_variable}],
- guard=#c_literal{val=true},
- body=#c_call{anno=Anno,
- module=#c_literal{val=erlang},
- name=#c_literal{val=error},
- args=[#c_literal{val=badarg}]}}];
- true -> []
- end,
- [opt_bool_not_invert(C) || C <- Cs] ++ Tail.
-
opt_bool_not_invert(#c_clause{pats=[#c_literal{val=Bool}]}=C) ->
C#c_clause{pats=[#c_literal{val=not Bool}]}.
@@ -2065,32 +2067,7 @@ opt_case_in_let_2(V, Arg0,
(_) -> false end, Es), %Only variables in tuple
false = core_lib:is_var_used(V, B), %Built tuple must not be used.
Arg1 = tuple_to_values(Arg0, length(Es)), %Might fail.
- #c_let{vars=Es,arg=Arg1,body=B};
-opt_case_in_let_2(_, Arg, Cs) ->
- %% simplify_bool_case(Case0) -> Case
- %% Remove unecessary cases like
- %%
- %% case BoolExpr of
- %% true -> true;
- %% false -> false;
- %% ....
- %% end
- %%
- %% where BoolExpr is an expression that can only return true
- %% or false (or throw an exception).
-
- true = is_bool_case(Cs) andalso is_bool_expr(Arg),
- Arg.
-
-is_bool_case([A,B|_]) ->
- (is_bool_clause(true, A) andalso is_bool_clause(false, B))
- orelse (is_bool_clause(false, A) andalso is_bool_clause(true, B)).
-
-is_bool_clause(Bool, #c_clause{pats=[#c_literal{val=Bool}],
- guard=#c_literal{val=true},
- body=#c_literal{val=Bool}}) ->
- true;
-is_bool_clause(_, _) -> false.
+ #c_let{vars=Es,arg=Arg1,body=B}.
%% is_simple_case_arg(Expr) -> true|false
%% Determine whether the Expr is simple enough to be worth
@@ -2612,14 +2589,14 @@ bsm_maybe_ctx_to_binary(V, B) ->
body=B}
end.
-previous_ctx_to_binary(V, #c_seq{arg=#c_primop{name=Name,args=As}}) ->
- case {Name,As} of
- {#c_literal{val=bs_context_to_binary},[#c_var{name=V}]} ->
+previous_ctx_to_binary(V, Core) ->
+ case Core of
+ #c_seq{arg=#c_primop{name=#c_literal{val=bs_context_to_binary},
+ args=[#c_var{name=V}]}} ->
true;
- {_,_} ->
+ _ ->
false
- end;
-previous_ctx_to_binary(_, _) -> false.
+ end.
%% bsm_leftmost(Cs) -> none | ArgumentNumber
%% Find the leftmost argument that does binary matching. Return
@@ -2764,22 +2741,20 @@ add_bin_opt_info(Core, Term) ->
end.
add_warning(Core, Term) ->
- Anno = core_lib:get_anno(Core),
- case lists:member(compiler_generated, Anno) of
- true -> ok;
+ case is_compiler_generated(Core) of
+ true ->
+ ok;
false ->
- case get_line(Anno) of
- Line when Line >= 0 -> %Must be positive.
- File = get_file(Anno),
- Key = {?MODULE,warnings},
- case get(Key) of
- [{File,[{Line,?MODULE,Term}]}|_] ->
- ok; %We already have
+ Anno = core_lib:get_anno(Core),
+ Line = get_line(Anno),
+ File = get_file(Anno),
+ Key = {?MODULE,warnings},
+ case get(Key) of
+ [{File,[{Line,?MODULE,Term}]}|_] ->
+ ok; %We already have
%an identical warning.
- Ws ->
- put(Key, [{File,[{Line,?MODULE,Term}]}|Ws])
- end;
- _ -> ok %Compiler-generated code.
+ Ws ->
+ put(Key, [{File,[{Line,?MODULE,Term}]}|Ws])
end
end.
@@ -2793,14 +2768,7 @@ get_file([]) -> "no_file". % should not happen
is_compiler_generated(Core) ->
Anno = core_lib:get_anno(Core),
- case lists:member(compiler_generated, Anno) of
- true -> true;
- false ->
- case get_line(Anno) of
- Line when Line >= 0 -> false;
- _ -> true
- end
- end.
+ member(compiler_generated, Anno).
get_warnings() ->
ordsets:from_list((erase({?MODULE,warnings}))).
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index 6623485609..36d35a8122 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -1423,20 +1423,7 @@ set_cg([{var,R}], Con, Le, Vdb, Bef, St) ->
Other ->
[{move,Other,Ret}]
end,
- {Ais,clear_dead(Int, Le#l.i, Vdb),St};
-set_cg([], {binary,Segs}, Le, Vdb, Bef, St) ->
- Fail = {f,St#cg.bfail},
- Target = find_scratch_reg(Bef#sr.reg),
- Temp = find_scratch_reg(put_reg(Target, Bef#sr.reg)),
- PutCode = cg_bin_put(Segs, Fail, Bef),
- MaxRegs = max_reg(Bef#sr.reg),
- Code = cg_binary(PutCode, Target, Temp, Fail, MaxRegs, Le#l.a),
- Aft = clear_dead(Bef, Le#l.i, Vdb),
- {Code,Aft,St};
-set_cg([], _, Le, Vdb, Bef, St) ->
- %% This should have been stripped by compiler, just cleanup.
- {[],clear_dead(Bef, Le#l.i, Vdb), St}.
-
+ {Ais,clear_dead(Int, Le#l.i, Vdb),St}.
%%%
%%% Code generation for constructing binaries.
@@ -2067,7 +2054,7 @@ line_1(_, 0) ->
%% Missing line number or line number 0.
{line,[]};
line_1(Name, Line) ->
- {line,[{location,Name,abs(Line)}]}.
+ {line,[{location,Name,Line}]}.
find_loc([Line|T], File, _) when is_integer(Line) ->
find_loc(T, File, Line);
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index 6885405ae0..ad0a8a7654 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -2085,7 +2085,12 @@ bitstr_vars(Segs, Vs) ->
lineno_anno(L, St) ->
{line, Line} = erl_parse:get_attribute(L, line),
- [Line] ++ St#core.file.
+ if
+ Line < 0 ->
+ [-Line] ++ St#core.file ++ [compiler_generated];
+ true ->
+ [Line] ++ St#core.file
+ end.
get_ianno(Ce) ->
case get_anno(Ce) of
diff --git a/lib/compiler/src/v3_kernel.erl b/lib/compiler/src/v3_kernel.erl
index f2eaa37617..abe94ad991 100644
--- a/lib/compiler/src/v3_kernel.erl
+++ b/lib/compiler/src/v3_kernel.erl
@@ -88,8 +88,6 @@
-include("core_parse.hrl").
-include("v3_kernel.hrl").
--define(EXPENSIVE_BINARY_LIMIT, 256).
-
%% These are not defined in v3_kernel.hrl.
get_kanno(Kthing) -> element(2, Kthing).
set_kanno(Kthing, Anno) -> setelement(2, Kthing, Anno).
@@ -120,7 +118,6 @@ copy_anno(Kdst, Ksrc) ->
funs=[], %Fun functions
free=[], %Free variables
ws=[] :: [warning()], %Warnings.
- lit, %Constant pool for literals.
guard_refc=0}). %> 0 means in guard
-spec module(cerl:c_module(), [compile:option()]) ->
@@ -129,7 +126,7 @@ copy_anno(Kdst, Ksrc) ->
module(#c_module{anno=A,name=M,exports=Es,attrs=As,defs=Fs}, _Options) ->
Kas = attributes(As),
Kes = map(fun (#c_var{name={_,_}=Fname}) -> Fname end, Es),
- St0 = #kern{lit=dict:new()},
+ St0 = #kern{},
{Kfs,St} = mapfoldl(fun function/2, St0, Fs),
{ok,#k_mdef{anno=A,name=M#c_literal.val,exports=Kes,attributes=Kas,
body=Kfs ++ St#kern.funs},lists:sort(St#kern.ws)}.
@@ -250,26 +247,20 @@ expr(#c_var{anno=A,name={_Name,Arity}}=Fname, Sub, St) ->
expr(Fun, Sub, St);
expr(#c_var{anno=A,name=V}, Sub, St) ->
{#k_var{anno=A,name=get_vsub(V, Sub)},[],St};
-expr(#c_literal{}=Lit, Sub, St) ->
- Core = handle_literal(Lit),
- expr(Core, Sub, St);
-expr(#k_literal{val=Val0}=Klit, _Sub, #kern{lit=Literals0}=St) ->
- %% Share identical literals to save some space and time during compilation.
- case dict:find(Val0, Literals0) of
- {ok,Val} ->
- {Klit#k_literal{val=Val},[],St};
- error ->
- Literals = dict:store(Val0, Val0, Literals0),
- {Klit,[],St#kern{lit=Literals}}
- end;
-expr(#k_nil{}=V, _Sub, St) ->
- {V,[],St};
-expr(#k_int{}=V, _Sub, St) ->
- {V,[],St};
-expr(#k_float{}=V, _Sub, St) ->
- {V,[],St};
-expr(#k_atom{}=V, _Sub, St) ->
- {V,[],St};
+expr(#c_literal{anno=A,val=V}, _Sub, St) ->
+ Klit = case V of
+ [] ->
+ #k_nil{anno=A};
+ V when is_integer(V) ->
+ #k_int{anno=A,val=V};
+ V when is_float(V) ->
+ #k_float{anno=A,val=V};
+ V when is_atom(V) ->
+ #k_atom{anno=A,val=V};
+ _ ->
+ #k_literal{anno=A,val=V}
+ end,
+ {Klit,[],St};
expr(#c_cons{anno=A,hd=Ch,tl=Ct}, Sub, St0) ->
%% Do cons in two steps, first the expressions left to right, then
%% any remaining literals right to left.
@@ -610,7 +601,6 @@ is_atomic(#k_int{}) -> true;
is_atomic(#k_float{}) -> true;
is_atomic(#k_atom{}) -> true;
%%is_atomic(#k_char{}) -> true; %No characters
-%%is_atomic(#k_string{}) -> true;
is_atomic(#k_nil{}) -> true;
is_atomic(#k_var{}) -> true;
is_atomic(_) -> false.
@@ -919,9 +909,8 @@ match_guard_1([#iclause{anno=A,osub=Osub,guard=G,body=B}|Cs0], Def0, St0) ->
true ->
%% The true clause body becomes the default.
{Kb,Pb,St1} = body(B, Osub, St0),
- Line = get_line(A),
- St2 = maybe_add_warning(Cs0, Line, St1),
- St = maybe_add_warning(Def0, Line, St2),
+ St2 = maybe_add_warning(Cs0, A, St1),
+ St = maybe_add_warning(Def0, A, St2),
{[],pre_seq(Pb, Kb),St};
false ->
{Kg,St1} = guard(G, Osub, St0),
@@ -932,15 +921,18 @@ match_guard_1([#iclause{anno=A,osub=Osub,guard=G,body=B}|Cs0], Def0, St0) ->
end;
match_guard_1([], Def, St) -> {[],Def,St}.
-maybe_add_warning([C|_], Line, St) ->
- maybe_add_warning(C, Line, St);
-maybe_add_warning([], _Line, St) -> St;
-maybe_add_warning(fail, _Line, St) -> St;
-maybe_add_warning(Ke, MatchLine, St) ->
- case get_kanno(Ke) of
- [compiler_generated|_] -> St;
- Anno ->
+maybe_add_warning([C|_], MatchAnno, St) ->
+ maybe_add_warning(C, MatchAnno, St);
+maybe_add_warning([], _MatchAnno, St) -> St;
+maybe_add_warning(fail, _MatchAnno, St) -> St;
+maybe_add_warning(Ke, MatchAnno, St) ->
+ case is_compiler_generated(Ke) of
+ true ->
+ St;
+ false ->
+ Anno = get_kanno(Ke),
Line = get_line(Anno),
+ MatchLine = get_line(MatchAnno),
Warn = case MatchLine of
none -> nomatch_shadow;
_ -> {nomatch_shadow,MatchLine}
@@ -1122,7 +1114,6 @@ select_bin_int([#iclause{pats=[#k_bin_seg{anno=A,type=integer,
end,
select_assert_match_possible(Bits, Val, Fl),
P = #k_bin_int{anno=A,size=Sz,unit=U,flags=Fl,val=Val,next=N},
- select_assert_match_possible(Bits, Val, Fl),
case member(native, Fl) of
true -> throw(not_possible);
false -> ok
@@ -1264,8 +1255,6 @@ match_clause([U|Us], [C|_]=Cs0, Def, St0) ->
sub_size_var(#k_bin_seg{size=#k_var{name=Name}=Kvar}=BinSeg, [#iclause{isub=Sub}|_]) ->
BinSeg#k_bin_seg{size=Kvar#k_var{name=get_vsub(Name, Sub)}};
-sub_size_var(#k_bin_int{size=#k_var{name=Name}=Kvar}=BinSeg, [#iclause{isub=Sub}|_]) ->
- BinSeg#k_bin_int{size=Kvar#k_var{name=get_vsub(Name, Sub)}};
sub_size_var(K, _) -> K.
get_con([C|_]) -> arg_arg(clause_arg(C)). %Get the constructor
@@ -1383,7 +1372,6 @@ arg_con(Arg) ->
#k_tuple{} -> k_tuple;
#k_binary{} -> k_binary;
#k_bin_end{} -> k_bin_end;
- #k_bin_int{} -> k_bin_int;
#k_bin_seg{} -> k_bin_seg;
#k_var{} -> k_var
end.
@@ -1394,15 +1382,9 @@ arg_val(Arg) ->
#k_int{val=I} -> I;
#k_float{val=F} -> F;
#k_atom{val=A} -> A;
- #k_nil{} -> 0;
- #k_cons{} -> 2;
#k_tuple{es=Es} -> length(Es);
#k_bin_seg{size=S,unit=U,type=T,flags=Fs} ->
- {set_kanno(S, []),U,T,Fs};
- #k_bin_int{} ->
- 0;
- #k_bin_end{} -> 0;
- #k_binary{} -> 0
+ {set_kanno(S, []),U,T,Fs}
end.
%% ubody_used_vars(Expr, State) -> [UsedVar]
@@ -1432,14 +1414,12 @@ ubody(#ivalues{anno=A,args=As}, return, St) ->
{#k_return{anno=#k{us=Au,ns=[],a=A},args=As},Au,St};
ubody(#ivalues{anno=A,args=As}, {break,_Vbs}, St) ->
Au = lit_list_vars(As),
- if St#kern.guard_refc > 0 ->
+ case is_in_guard(St) of
+ true ->
{#k_guard_break{anno=#k{us=Au,ns=[],a=A},args=As},Au,St};
- true ->
+ false ->
{#k_break{anno=#k{us=Au,ns=[],a=A},args=As},Au,St}
end;
-ubody(#ivalues{anno=A,args=As}, {guard_break,_Vbs}, St) ->
- Au = lit_list_vars(As),
- {#k_guard_break{anno=#k{us=Au,ns=[],a=A},args=As},Au,St};
ubody(E, return, St0) ->
%% Enterable expressions need no trailing return.
case is_enter_expr(E) of
@@ -1456,12 +1436,7 @@ ubody(E, {break,_Rs} = Break, St0) ->
false ->
{Ea,Pa,St1} = force_atomic(E, St0),
ubody(pre_seq(Pa, #ivalues{args=[Ea]}), Break, St1)
- end;
-ubody(E, {guard_break,_Rs} = GuardBreak, St0) ->
- %%ok = io:fwrite("ubody ~w:~p~n", [?LINE,{E,Br}]),
- %% Exiting expressions need no trailing break.
- {Ea,Pa,St1} = force_atomic(E, St0),
- ubody(pre_seq(Pa, #ivalues{args=[Ea]}), GuardBreak, St1).
+ end.
iletrec_funs(#iletrec{defs=Fs}, St0) ->
%% Use union of all free variables.
@@ -1513,64 +1488,21 @@ is_enter_expr(#k_receive{}) -> true;
is_enter_expr(#k_receive_next{}) -> true;
is_enter_expr(_) -> false.
-%% uguard(Expr, State) -> {Expr,[UsedVar],State}.
-%% Tag the guard sequence with its used variables.
-
-uguard(#k_try{anno=A,arg=B0,vars=[#k_var{name=X}],body=#k_var{name=X},
- handler=#k_atom{val=false}}=Try, St0) ->
- {B1,Bu,St1} = uguard(B0, St0),
- {Try#k_try{anno=#k{us=Bu,ns=[],a=A},arg=B1},Bu,St1};
-uguard(T, St) ->
- %%ok = io:fwrite("~w: ~p~n", [?LINE,T]),
- uguard_test(T, St).
-
-%% uguard_test(Expr, State) -> {Test,[UsedVar],State}.
-%% At this stage tests are just expressions which don't return any
-%% values.
-
-uguard_test(T, St) -> uguard_expr(T, [], St).
+%% uexpr(Expr, Break, State) -> {Expr,[UsedVar],State}.
+%% Tag an expression with its used variables.
+%% Break = return | {break,[RetVar]}.
-uguard_expr(#iset{anno=A,vars=Vs,arg=E0,body=B0}, Rs, St0) ->
- Ns = lit_list_vars(Vs),
- {E1,Eu,St1} = uguard_expr(E0, Vs, St0),
- {B1,Bu,St2} = uguard_expr(B0, Rs, St1),
- Used = union(Eu, subtract(Bu, Ns)),
- {#k_seq{anno=#k{us=Used,ns=Ns,a=A},arg=E1,body=B1},Used,St2};
-uguard_expr(#k_try{anno=A,arg=B0,vars=[#k_var{name=X}],body=#k_var{name=X},
- handler=#k_atom{val=false}}=Try, Rs, St0) ->
- {B1,Bu,St1} = uguard_expr(B0, Rs, St0),
- {Try#k_try{anno=#k{us=Bu,ns=lit_list_vars(Rs),a=A},arg=B1,ret=Rs},
- Bu,St1};
-uguard_expr(#k_test{anno=A,op=Op,args=As}=Test, Rs, St) ->
+uexpr(#k_test{anno=A,op=Op,args=As}=Test, {break,Rs}, St) ->
[] = Rs, %Sanity check
Used = union(op_vars(Op), lit_list_vars(As)),
{Test#k_test{anno=#k{us=Used,ns=lit_list_vars(Rs),a=A}},
Used,St};
-uguard_expr(#k_bif{anno=A,op=Op,args=As}=Bif, Rs, St) ->
- Used = union(op_vars(Op), lit_list_vars(As)),
- {Bif#k_bif{anno=#k{us=Used,ns=lit_list_vars(Rs),a=A},ret=Rs},
- Used,St};
-uguard_expr(#ivalues{anno=A,args=As}, Rs, St) ->
- Sets = foldr2(fun (V, Arg, Rhs) ->
- #iset{anno=A,vars=[V],arg=Arg,body=Rhs}
- end, #k_atom{val=true}, Rs, As),
- uguard_expr(Sets, [], St);
-uguard_expr(#k_match{anno=A,vars=Vs,body=B0}, Rs, St0) ->
- %% Experimental support for andalso/orelse in guards.
- Br = {guard_break,Rs},
- {B1,Bu,St1} = umatch(B0, Br, St0),
- {#k_guard_match{anno=#k{us=Bu,ns=lit_list_vars(Rs),a=A},
- vars=Vs,body=B1,ret=Rs},Bu,St1};
-uguard_expr(Lit, Rs, St) ->
- %% Transform literals to puts here.
- Used = lit_vars(Lit),
- {#k_put{anno=#k{us=Used,ns=lit_list_vars(Rs),a=get_kanno(Lit)},
- arg=Lit,ret=Rs},Used,St}.
-
-%% uexpr(Expr, Break, State) -> {Expr,[UsedVar],State}.
-%% Tag an expression with its used variables.
-%% Break = return | {break,[RetVar]}.
-
+uexpr(#iset{anno=A,vars=Vs,arg=E0,body=B0}, {break,_}=Br, St0) ->
+ Ns = lit_list_vars(Vs),
+ {E1,Eu,St1} = uexpr(E0, {break,Vs}, St0),
+ {B1,Bu,St2} = uexpr(B0, Br, St1),
+ Used = union(Eu, subtract(Bu, Ns)),
+ {#k_seq{anno=#k{us=Used,ns=Ns,a=A},arg=E1,body=B1},Used,St2};
uexpr(#k_call{anno=A,op=#k_local{name=F,arity=Ar}=Op,args=As0}=Call, Br, St) ->
Free = get_free(F, Ar, St),
As1 = As0 ++ Free, %Add free variables LAST!
@@ -1602,10 +1534,11 @@ uexpr(#k_match{anno=A,vars=Vs0,body=B0}, Br, St0) ->
Vs = handle_reuse_annos(Vs0, St0),
Rs = break_rets(Br),
{B1,Bu,St1} = umatch(B0, Br, St0),
- if St0#kern.guard_refc > 0 ->
+ case is_in_guard(St1) of
+ true ->
{#k_guard_match{anno=#k{us=Bu,ns=lit_list_vars(Rs),a=A},
vars=Vs,body=B1,ret=Rs},Bu,St1};
- true ->
+ false ->
{#k_match{anno=#k{us=Bu,ns=lit_list_vars(Rs),a=A},
vars=Vs,body=B1,ret=Rs},Bu,St1}
end;
@@ -1622,24 +1555,27 @@ uexpr(#k_receive_accept{anno=A}, _, St) ->
{#k_receive_accept{anno=#k{us=[],ns=[],a=A}},[],St};
uexpr(#k_receive_next{anno=A}, _, St) ->
{#k_receive_next{anno=#k{us=[],ns=[],a=A}},[],St};
-uexpr(#k_try{anno=A,arg=A0,vars=Vs,body=B0,evars=Evs,handler=H0},
- {break,Rs0}, St0) ->
- {Avs,St1} = new_vars(length(Vs), St0), %Need dummy names here
- {A1,Au,St2} = ubody(A0, {break,Avs}, St1), %Must break to clean up here!
- {B1,Bu,St3} = ubody(B0, {break,Rs0}, St2),
- {H1,Hu,St4} = ubody(H0, {break,Rs0}, St3),
- %% Guarantee ONE return variable.
- NumNew = if
- Rs0 =:= [] -> 1;
- true -> 0
- end,
- {Ns,St5} = new_vars(NumNew, St4),
- Rs1 = Rs0 ++ Ns,
- Used = union([Au,subtract(Bu, lit_list_vars(Vs)),
- subtract(Hu, lit_list_vars(Evs))]),
- {#k_try{anno=#k{us=Used,ns=lit_list_vars(Rs1),a=A},
- arg=A1,vars=Vs,body=B1,evars=Evs,handler=H1,ret=Rs1},
- Used,St5};
+uexpr(#k_try{anno=A,arg=A0,vars=Vs,body=B0,evars=Evs,handler=H0}=Try,
+ {break,Rs0}=Br, St0) ->
+ case is_in_guard(St0) of
+ true ->
+ {[#k_var{name=X}],#k_var{name=X}} = {Vs,B0}, %Assertion.
+ #k_atom{val=false} = H0, %Assertion.
+ {A1,Bu,St1} = uexpr(A0, Br, St0),
+ {Try#k_try{anno=#k{us=Bu,ns=lit_list_vars(Rs0),a=A},
+ arg=A1,ret=Rs0},Bu,St1};
+ false ->
+ {Avs,St1} = new_vars(length(Vs), St0),
+ {A1,Au,St2} = ubody(A0, {break,Avs}, St1),
+ {B1,Bu,St3} = ubody(B0, Br, St2),
+ {H1,Hu,St4} = ubody(H0, Br, St3),
+ {Rs1,St5} = ensure_return_vars(Rs0, St4),
+ Used = union([Au,subtract(Bu, lit_list_vars(Vs)),
+ subtract(Hu, lit_list_vars(Evs))]),
+ {#k_try{anno=#k{us=Used,ns=lit_list_vars(Rs1),a=A},
+ arg=A1,vars=Vs,body=B1,evars=Evs,handler=H1,ret=Rs1},
+ Used,St5}
+ end;
uexpr(#k_try{anno=A,arg=A0,vars=Vs,body=B0,evars=Evs,handler=H0},
return, St0) ->
{Avs,St1} = new_vars(length(Vs), St0), %Need dummy names here
@@ -1685,12 +1621,13 @@ uexpr(#ifun{anno=A,vars=Vs,body=B0}, {break,Rs}, St0) ->
#k_int{val=Index},#k_int{val=Uniq}|Fvs],
ret=Rs},
Free,add_local_function(Fun, St)};
-uexpr(Lit, {break,Rs}, St) ->
+uexpr(Lit, {break,Rs0}, St0) ->
%% Transform literals to puts here.
%%ok = io:fwrite("uexpr ~w:~p~n", [?LINE,Lit]),
Used = lit_vars(Lit),
+ {Rs,St1} = ensure_return_vars(Rs0, St0),
{#k_put{anno=#k{us=Used,ns=lit_list_vars(Rs),a=get_kanno(Lit)},
- arg=Lit,ret=Rs},Used,St}.
+ arg=Lit,ret=Rs},Used,St1}.
add_local_function(_, #kern{funs=ignore}=St) -> St;
add_local_function(F, #kern{funs=Funs}=St) -> St#kern{funs=[F|Funs]}.
@@ -1747,6 +1684,11 @@ bif_returns(#k_internal{name=N,arity=Ar}, Rs, St0) ->
{Ns,St1} = new_vars(bif_vals(N, Ar) - length(Rs), St0),
{Rs ++ Ns,St1}.
+%% ensure_return_vars([Ret], State) -> {[Ret],State}.
+
+ensure_return_vars([], St) -> new_vars(1, St);
+ensure_return_vars([_]=Rs, St) -> {Rs,St}.
+
%% umatch(Match, Break, State) -> {Match,[UsedVar],State}.
%% Tag a match expression with its used variables.
@@ -1779,7 +1721,8 @@ umatch(#k_guard{anno=A,clauses=Gs0}, Br, St0) ->
{#k_guard{anno=#k{us=Gus,ns=[],a=A},clauses=Gs1},Gus,St1};
umatch(#k_guard_clause{anno=A,guard=G0,body=B0}, Br, St0) ->
%%ok = io:fwrite("~w: ~p~n", [?LINE,G0]),
- {G1,Gu,St1} = uguard(G0, St0#kern{guard_refc=St0#kern.guard_refc+1}),
+ {G1,Gu,St1} = uexpr(G0, {break,[]},
+ St0#kern{guard_refc=St0#kern.guard_refc+1}),
%%ok = io:fwrite("~w: ~p~n", [?LINE,G1]),
{B1,Bu,St2} = umatch(B0, Br, St1#kern{guard_refc=St1#kern.guard_refc-1}),
Used = union(Gu, Bu),
@@ -1827,7 +1770,6 @@ lit_list_vars(Ps) ->
pat_vars(#k_var{name=N}) -> {[],[N]};
%%pat_vars(#k_char{}) -> {[],[]};
-%%pat_vars(#k_string{}) -> {[],[]};
pat_vars(#k_literal{}) -> {[],[]};
pat_vars(#k_int{}) -> {[],[]};
pat_vars(#k_float{}) -> {[],[]};
@@ -1854,34 +1796,6 @@ pat_list_vars(Ps) ->
{union(Used0, Used),union(New0, New)} end,
{[],[]}, Ps).
-%% handle_literal(Literal, Anno) -> Kernel
-%% Examine the literal. Complex (heap-based) literals such as lists,
-%% tuples, and binaries should be kept as literals and put into the constant pool.
-%%
-%% (If necessary, this function could be extended to go through the literal
-%% and convert huge binary literals to bit syntax expressions. We don't do that
-%% because v3_core does not produce huge binary literals, and the optimizations in
-%% sys_core_fold don't do much optimizations of binaries. IF THAT CHANGE IS MADE,
-%% ALSO CHANGE sys_core_dsetel.)
-
-handle_literal(#c_literal{anno=A,val=V}) ->
- case V of
- [_|_] ->
- #k_literal{anno=A,val=V};
- [] ->
- #k_nil{anno=A};
- V when is_tuple(V) ->
- #k_literal{anno=A,val=V};
- V when is_bitstring(V) ->
- #k_literal{anno=A,val=V};
- V when is_integer(V) ->
- #k_int{anno=A,val=V};
- V when is_float(V) ->
- #k_float{anno=A,val=V};
- V when is_atom(V) ->
- #k_atom{anno=A,val=V}
- end.
-
make_list(Es) ->
foldr(fun(E, Acc) ->
#c_cons{hd=E,tl=Acc}
@@ -1893,6 +1807,11 @@ integers(N, M) when N =< M ->
[N|integers(N + 1, M)];
integers(_, _) -> [].
+%% is_in_guard(State) -> true|false.
+
+is_in_guard(#kern{guard_refc=Refc}) ->
+ Refc > 0.
+
%%%
%%% Handling of errors and warnings.
%%%
@@ -1913,7 +1832,10 @@ format_error(bad_call) ->
add_warning(none, Term, Anno, #kern{ws=Ws}=St) ->
File = get_file(Anno),
St#kern{ws=[{File,[{?MODULE,Term}]}|Ws]};
-add_warning(Line, Term, Anno, #kern{ws=Ws}=St) when Line >= 0 ->
+add_warning(Line, Term, Anno, #kern{ws=Ws}=St) ->
File = get_file(Anno),
- St#kern{ws=[{File,[{Line,?MODULE,Term}]}|Ws]};
-add_warning(_, _, _, St) -> St.
+ St#kern{ws=[{File,[{Line,?MODULE,Term}]}|Ws]}.
+
+is_compiler_generated(Ke) ->
+ Anno = get_kanno(Ke),
+ member(compiler_generated, Anno).
diff --git a/lib/compiler/src/v3_kernel.hrl b/lib/compiler/src/v3_kernel.hrl
index 37f2fdcf7e..17904c37da 100644
--- a/lib/compiler/src/v3_kernel.hrl
+++ b/lib/compiler/src/v3_kernel.hrl
@@ -35,7 +35,6 @@
-record(k_int, {anno=[],val}).
-record(k_float, {anno=[],val}).
-record(k_atom, {anno=[],val}).
--record(k_string, {anno=[],val}).
-record(k_nil, {anno=[]}).
-record(k_tuple, {anno=[],es}).
diff --git a/lib/compiler/src/v3_life.erl b/lib/compiler/src/v3_life.erl
index 93f8034230..22f3e3c2d2 100644
--- a/lib/compiler/src/v3_life.erl
+++ b/lib/compiler/src/v3_life.erl
@@ -112,53 +112,14 @@ guard(#k_try{anno=A,arg=Ts,vars=[#k_var{name=X}],body=#k_var{name=X},
%% Lock variables that are alive before try and used afterwards.
%% Don't lock variables that are only used inside the try expression.
Pdb0 = vdb_sub(I, I+1, Vdb),
- {T,MaxI,Pdb1} = guard_body(Ts, I+1, Pdb0),
+ {T,MaxI,Pdb1} = body(Ts, I+1, Pdb0),
Pdb2 = use_vars(A#k.ns, MaxI+1, Pdb1), %Save "return" values
- #l{ke={protected,T,var_list(Rs)},i=I,a=A#k.a,vdb=Pdb2};
-guard(#k_seq{}=G, I, Vdb0) ->
- {Es,_,Vdb1} = guard_body(G, I, Vdb0),
- #l{ke={block,Es},i=I,vdb=Vdb1,a=[]};
-guard(G, I, Vdb) -> guard_expr(G, I, Vdb).
-
-%% guard_body(Kbody, I, Vdb) -> {[Expr],MaxI,Vdb}.
-
-guard_body(#k_seq{arg=Ke,body=Kb}, I, Vdb0) ->
- A = get_kanno(Ke),
- Vdb1 = use_vars(A#k.us, I, new_vars(A#k.ns, I, Vdb0)),
- {Es,MaxI,Vdb2} = guard_body(Kb, I+1, Vdb1),
- E = guard_expr(Ke, I, Vdb2),
- {[E|Es],MaxI,Vdb2};
-guard_body(Ke, I, Vdb0) ->
- A = get_kanno(Ke),
- Vdb1 = use_vars(A#k.us, I, new_vars(A#k.ns, I, Vdb0)),
- E = guard_expr(Ke, I, Vdb1),
- {[E],I,Vdb1}.
-
-%% guard_expr(Call, I, Vdb) -> Expr
-
-guard_expr(#k_test{anno=A,op=Op,args=As}, I, _Vdb) ->
- #l{ke={test,test_op(Op),atomic_list(As)},i=I,a=A#k.a};
-guard_expr(#k_bif{anno=A,op=Op,args=As,ret=Rs}, I, _Vdb) ->
- Name = bif_op(Op),
- Ar = length(As),
- case is_gc_bif(Name, Ar) of
- false ->
- #l{ke={bif,Name,atomic_list(As),var_list(Rs)},i=I,a=A#k.a};
- true ->
- #l{ke={gc_bif,Name,atomic_list(As),var_list(Rs)},i=I,a=A#k.a}
- end;
-guard_expr(#k_put{anno=A,arg=Arg,ret=Rs}, I, _Vdb) ->
- #l{ke={set,var_list(Rs),literal(Arg, [])},i=I,a=A#k.a};
-guard_expr(#k_guard_match{anno=A,body=Kb,ret=Rs}, I, Vdb) ->
- %% Support for andalso/orelse in guards.
- %% Work out imported variables which need to be locked.
- Mdb = vdb_sub(I, I+1, Vdb),
- M = match(Kb, A#k.us, I+1, [], Mdb),
- #l{ke={guard_match,M,var_list(Rs)},i=I,vdb=use_vars(A#k.us, I+1, Mdb),a=A#k.a};
-guard_expr(G, I, Vdb) -> guard(G, I, Vdb).
+ #l{ke={protected,T,var_list(Rs)},i=I,a=A#k.a,vdb=Pdb2}.
%% expr(Kexpr, I, Vdb) -> Expr.
+expr(#k_test{anno=A,op=Op,args=As}, I, _Vdb) ->
+ #l{ke={test,test_op(Op),atomic_list(As)},i=I,a=A#k.a};
expr(#k_call{anno=A,op=Op,args=As,ret=Rs}, I, _Vdb) ->
#l{ke={call,call_op(Op),atomic_list(As),var_list(Rs)},i=I,a=A#k.a};
expr(#k_enter{anno=A,op=Op,args=As}, I, _Vdb) ->
@@ -176,25 +137,11 @@ expr(#k_guard_match{anno=A,body=Kb,ret=Rs}, I, Vdb) ->
Mdb = vdb_sub(I, I+1, Vdb),
M = match(Kb, A#k.us, I+1, [], Mdb),
#l{ke={guard_match,M,var_list(Rs)},i=I,vdb=use_vars(A#k.us, I+1, Mdb),a=A#k.a};
-expr(#k_try{anno=A,arg=Ka,vars=Vs,body=Kb,evars=Evs,handler=Kh,ret=Rs}, I, Vdb) ->
- %% Lock variables that are alive before the catch and used afterwards.
- %% Don't lock variables that are only used inside the try.
- Tdb0 = vdb_sub(I, I+1, Vdb),
- %% This is the tricky bit. Lock variables in Arg that are used in
- %% the body and handler. Add try tag 'variable'.
- Ab = get_kanno(Kb),
- Ah = get_kanno(Kh),
- Tdb1 = use_vars(Ab#k.us, I+3, use_vars(Ah#k.us, I+3, Tdb0)),
- Tdb2 = vdb_sub(I, I+2, Tdb1),
- Vnames = fun (Kvar) -> Kvar#k_var.name end, %Get the variable names
- {Aes,_,Adb} = body(Ka, I+2, add_var({catch_tag,I+1}, I+1, locked, Tdb2)),
- {Bes,_,Bdb} = body(Kb, I+4, new_vars(map(Vnames, Vs), I+3, Tdb2)),
- {Hes,_,Hdb} = body(Kh, I+4, new_vars(map(Vnames, Evs), I+3, Tdb2)),
- #l{ke={'try',#l{ke={block,Aes},i=I+1,vdb=Adb,a=[]},
- var_list(Vs),#l{ke={block,Bes},i=I+3,vdb=Bdb,a=[]},
- var_list(Evs),#l{ke={block,Hes},i=I+3,vdb=Hdb,a=[]},
- var_list(Rs)},
- i=I,vdb=Tdb1,a=A#k.a};
+expr(#k_try{}=Try, I, Vdb) ->
+ case is_in_guard() of
+ false -> body_try(Try, I, Vdb);
+ true -> guard(Try, I, Vdb)
+ end;
expr(#k_try_enter{anno=A,arg=Ka,vars=Vs,body=Kb,evars=Evs,handler=Kh}, I, Vdb) ->
%% Lock variables that are alive before the catch and used afterwards.
%% Don't lock variables that are only used inside the try.
@@ -243,6 +190,27 @@ expr(#k_guard_break{anno=A,args=As}, I, Vdb) ->
expr(#k_return{anno=A,args=As}, I, _Vdb) ->
#l{ke={return,atomic_list(As)},i=I,a=A#k.a}.
+body_try(#k_try{anno=A,arg=Ka,vars=Vs,body=Kb,evars=Evs,handler=Kh,ret=Rs},
+ I, Vdb) ->
+ %% Lock variables that are alive before the catch and used afterwards.
+ %% Don't lock variables that are only used inside the try.
+ Tdb0 = vdb_sub(I, I+1, Vdb),
+ %% This is the tricky bit. Lock variables in Arg that are used in
+ %% the body and handler. Add try tag 'variable'.
+ Ab = get_kanno(Kb),
+ Ah = get_kanno(Kh),
+ Tdb1 = use_vars(Ab#k.us, I+3, use_vars(Ah#k.us, I+3, Tdb0)),
+ Tdb2 = vdb_sub(I, I+2, Tdb1),
+ Vnames = fun (Kvar) -> Kvar#k_var.name end, %Get the variable names
+ {Aes,_,Adb} = body(Ka, I+2, add_var({catch_tag,I+1}, I+1, locked, Tdb2)),
+ {Bes,_,Bdb} = body(Kb, I+4, new_vars(map(Vnames, Vs), I+3, Tdb2)),
+ {Hes,_,Hdb} = body(Kh, I+4, new_vars(map(Vnames, Evs), I+3, Tdb2)),
+ #l{ke={'try',#l{ke={block,Aes},i=I+1,vdb=Adb,a=[]},
+ var_list(Vs),#l{ke={block,Bes},i=I+3,vdb=Bdb,a=[]},
+ var_list(Evs),#l{ke={block,Hes},i=I+3,vdb=Hdb,a=[]},
+ var_list(Rs)},
+ i=I,vdb=Tdb1,a=A#k.a}.
+
%% call_op(Op) -> Op.
%% bif_op(Op) -> Op.
%% test_op(Op) -> Op.
@@ -373,7 +341,6 @@ atomic(#k_int{val=I}) -> {integer,I};
atomic(#k_float{val=F}) -> {float,F};
atomic(#k_atom{val=N}) -> {atom,N};
%%atomic(#k_char{val=C}) -> {char,C};
-%%atomic(#k_string{val=S}) -> {string,S};
atomic(#k_nil{}) -> nil.
atomic_list(Ks) -> [atomic(K) || K <- Ks].
@@ -535,3 +502,7 @@ vdb_sub(Min, Max, Vdb) ->
true -> Vd
end || {V,F,L}=Vd <- Vdb, F < Min, L >= Min ].
+%% is_in_guard() -> true|false.
+
+is_in_guard() ->
+ get(guard_refc) > 0.
diff --git a/lib/compiler/test/core_SUITE.erl b/lib/compiler/test/core_SUITE.erl
index 874e02803d..fd1539e7fd 100644
--- a/lib/compiler/test/core_SUITE.erl
+++ b/lib/compiler/test/core_SUITE.erl
@@ -22,7 +22,7 @@
init_per_group/2,end_per_group/2,
init_per_testcase/2,end_per_testcase/2,
dehydrated_itracer/1,nested_tries/1,
- make_effect_seq/1,eval_is_boolean/1,
+ seq_in_guard/1,make_effect_seq/1,eval_is_boolean/1,
unsafe_case/1,nomatch_shadow/1,reversed_annos/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -43,7 +43,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [dehydrated_itracer,nested_tries,make_effect_seq,
+ [dehydrated_itracer,nested_tries,seq_in_guard,make_effect_seq,
eval_is_boolean,unsafe_case,nomatch_shadow,reversed_annos].
groups() ->
@@ -64,6 +64,7 @@ end_per_group(_GroupName, Config) ->
?comp(dehydrated_itracer).
?comp(nested_tries).
+?comp(seq_in_guard).
?comp(make_effect_seq).
?comp(eval_is_boolean).
?comp(unsafe_case).
diff --git a/lib/compiler/test/core_SUITE_data/seq_in_guard.core b/lib/compiler/test/core_SUITE_data/seq_in_guard.core
new file mode 100644
index 0000000000..44686a7187
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/seq_in_guard.core
@@ -0,0 +1,66 @@
+module 'seq_in_guard' ['seq_in_guard'/0,
+ 't'/1]
+ attributes []
+'seq_in_guard'/0 =
+ %% Line 4
+ fun () ->
+ case <> of
+ <> when 'true' ->
+ let <_cor0> =
+ catch
+ %% Line 5
+ apply 't'/1
+ ({})
+ in %% Line 5
+ case _cor0 of
+ <{'EXIT',{'function_clause',_cor4}}> when 'true' ->
+ let <_cor2> =
+ catch
+ %% Line 6
+ apply 't'/1
+ ('atom')
+ in %% Line 6
+ case _cor2 of
+ <{'EXIT',{'function_clause',_cor5}}> when 'true' ->
+ %% Line 7
+ apply 't'/1
+ ({'a','b'})
+ ( <_cor3> when 'true' ->
+ primop 'match_fail'
+ ({'badmatch',_cor3})
+ -| ['compiler_generated'] )
+ end
+ ( <_cor1> when 'true' ->
+ primop 'match_fail'
+ ({'badmatch',_cor1})
+ -| ['compiler_generated'] )
+ end
+ ( <> when 'true' ->
+ ( primop 'match_fail'
+ ({'function_clause'})
+ -| [{'function_name',{'seq_in_guard',0}}] )
+ -| ['compiler_generated'] )
+ end
+'t'/1 =
+ %% Line 9
+ fun (_cor0) ->
+ case _cor0 of
+ <X>
+ when try
+ do
+ call 'erlang':'element'
+ (2, X)
+ 'true'
+ of <Try> ->
+ Try
+ catch <T,R> ->
+ 'false' ->
+ %% Line 10
+ 'ok'
+ ( <_cor3> when 'true' ->
+ ( primop 'match_fail'
+ ({'function_clause',_cor3})
+ -| [{'function_name',{'t',1}}] )
+ -| ['compiler_generated'] )
+ end
+end
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl
index fb5ec88c9f..54bd52947e 100644
--- a/lib/compiler/test/core_fold_SUITE.erl
+++ b/lib/compiler/test/core_fold_SUITE.erl
@@ -21,7 +21,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
t_element/1,setelement/1,t_length/1,append/1,t_apply/1,bifs/1,
- eq/1,nested_call_in_case/1,coverage/1]).
+ eq/1,nested_call_in_case/1,guard_try_catch/1,coverage/1]).
-export([foo/0,foo/1,foo/2,foo/3]).
@@ -32,7 +32,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
[t_element, setelement, t_length, append, t_apply, bifs,
- eq, nested_call_in_case, coverage].
+ eq, nested_call_in_case, guard_try_catch, coverage].
groups() ->
[].
@@ -207,6 +207,23 @@ nested_call_in_case(Config) when is_list(Config) ->
?line {'EXIT',_} = (catch Mod:a(not_a_list, 42)),
ok.
+guard_try_catch(_Config) ->
+ false = do_guard_try_catch(key, value),
+ value = get(key),
+ ok.
+
+do_guard_try_catch(K, V) ->
+ %% This try...catch block looks like a guard.
+ %% Make sure that it is not optimized like a guard
+ %% (the put/2 call must not be optimized away).
+ try
+ put(K, V),
+ false
+ catch
+ _:_ ->
+ false
+ end.
+
coverage(Config) when is_list(Config) ->
?line {'EXIT',{{case_clause,{a,b,c}},_}} =
(catch cover_will_match_list_type({a,b,c})),
diff --git a/lib/debugger/src/dbg_iserver.erl b/lib/debugger/src/dbg_iserver.erl
index 1bb73a43b9..31a856545f 100644
--- a/lib/debugger/src/dbg_iserver.erl
+++ b/lib/debugger/src/dbg_iserver.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -188,10 +188,7 @@ handle_call({new_break, Point, Options}, _From, State) ->
handle_call(all_breaks, _From, State) ->
{reply, State#state.breaks, State};
handle_call({all_breaks, Mod}, _From, State) ->
- Reply = lists:filter(fun({{M,_L}, _Options}) ->
- M =/= Mod
- end,
- State#state.breaks),
+ Reply = [Break || Break = {{M, _},_} <- State#state.breaks, M =:= Mod],
{reply, Reply, State};
%% From Meta process
diff --git a/lib/debugger/test/int_break_SUITE.erl b/lib/debugger/test/int_break_SUITE.erl
index 159678a1f9..7bb0fc2018 100644
--- a/lib/debugger/test/int_break_SUITE.erl
+++ b/lib/debugger/test/int_break_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -76,6 +76,9 @@ basic(Config) when list(Config) ->
?line S3 = [xxx,y] = ordsets1:add_element(y, S2),
?line ok = i:ib(ordsets1, union, 2),
?line [xxx,y,z] = ordsets1:union(S3, [z]),
+ All = [{{ordsets1,86}, _}, {{ordsets1,_},_}|_] = lists:sort(int:all_breaks()),
+ [] = lists:sort(int:all_breaks(foobar)),
+ All = lists:sort(int:all_breaks(ordsets1)),
ok.
cleanup(doc) -> "Make sure that the auto-attach flag is turned off.";
diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index 458f3a4c81..5be870d78f 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -170,33 +170,32 @@ analysis_start(Parent, Analysis) ->
rcv_and_send_ext_types(Parent),
NonExports = sets:subtract(sets:from_list(AllNodes), Exports),
NonExportsList = sets:to_list(NonExports),
- Plt3 = dialyzer_plt:delete_list(State3#analysis_state.plt, NonExportsList),
- Plt4 = dialyzer_plt:delete_contract_list(Plt3, NonExportsList),
+ Plt2 = dialyzer_plt:delete_list(State3#analysis_state.plt, NonExportsList),
send_codeserver_plt(Parent, CServer, State3#analysis_state.plt),
- send_analysis_done(Parent, Plt4, State3#analysis_state.doc_plt).
+ send_analysis_done(Parent, Plt2, State3#analysis_state.doc_plt).
analyze_callgraph(Callgraph, State) ->
Codeserver = State#analysis_state.codeserver,
- Plt = dialyzer_plt:insert_callbacks(State#analysis_state.plt, Codeserver),
Parent = State#analysis_state.parent,
- case State#analysis_state.analysis_type of
- plt_build ->
- Callgraph1 = dialyzer_callgraph:finalize(Callgraph),
- NewPlt = dialyzer_succ_typings:analyze_callgraph(Callgraph1, Plt,
- Codeserver, Parent),
- dialyzer_callgraph:delete(Callgraph1),
- State#analysis_state{plt = NewPlt};
- succ_typings ->
- NoWarn = State#analysis_state.no_warn_unused,
- DocPlt = State#analysis_state.doc_plt,
- Callgraph1 = dialyzer_callgraph:finalize(Callgraph),
- {Warnings, NewPlt, NewDocPlt} =
- dialyzer_succ_typings:get_warnings(Callgraph1, Plt, DocPlt,
- Codeserver, NoWarn, Parent),
- dialyzer_callgraph:delete(Callgraph1),
- send_warnings(State#analysis_state.parent, Warnings),
- State#analysis_state{plt = NewPlt, doc_plt = NewDocPlt}
- end.
+ DocPlt = State#analysis_state.doc_plt,
+ Plt = dialyzer_plt:insert_callbacks(State#analysis_state.plt, Codeserver),
+ Callgraph1 = dialyzer_callgraph:finalize(Callgraph),
+ {NewPlt, NewDocPlt} =
+ case State#analysis_state.analysis_type of
+ plt_build ->
+ {dialyzer_succ_typings:analyze_callgraph(Callgraph1, Plt,
+ Codeserver, Parent),
+ DocPlt};
+ succ_typings ->
+ NoWarn = State#analysis_state.no_warn_unused,
+ {Warnings, NewPlt0, NewDocPlt0} =
+ dialyzer_succ_typings:get_warnings(Callgraph1, Plt, DocPlt,
+ Codeserver, NoWarn, Parent),
+ send_warnings(State#analysis_state.parent, Warnings),
+ {NewPlt0, NewDocPlt0}
+ end,
+ dialyzer_callgraph:delete(Callgraph1),
+ State#analysis_state{plt = NewPlt, doc_plt = NewDocPlt}.
%%--------------------------------------------------------------------
%% Build the callgraph and fill the codeserver.
@@ -282,10 +281,10 @@ cleanup_callgraph(#analysis_state{plt = InitPlt, parent = Parent,
if ExtCalls1 =:= [] -> {[], []};
true ->
ModuleSet = sets:from_list(Modules),
- lists:partition(fun({_From, {M, _F, _A}}) ->
- sets:is_element(M, ModuleSet) orelse
- dialyzer_plt:contains_module(InitPlt, M)
- end, ExtCalls1)
+ PltModuleSet = dialyzer_plt:all_modules(InitPlt),
+ AllModules = sets:union(ModuleSet, PltModuleSet),
+ Pred = fun({_From, {M, _F, _A}}) -> sets:is_element(M, AllModules) end,
+ lists:partition(Pred, ExtCalls1)
end,
NonLocalCalls = dialyzer_callgraph:non_local_calls(Callgraph1),
BadCalls2 = [Call || Call = {_From, To} <- NonLocalCalls,
@@ -366,9 +365,11 @@ abs_get_nowarn(Abs, M) ->
false ->
[{M, F, A} || {function, _, F, A, _} <- Abs]; % all functions
true ->
- [{M, F, A} ||
- {nowarn_unused_function, FAs} <- Opts,
- {F, A} <- lists:flatten([FAs])]
+ OnLoad =
+ lists:flatten([{M, F, A} || {attribute, _, on_load, {F, A}} <- Abs]),
+ OnLoad ++ [{M, F, A} ||
+ {nowarn_unused_function, FAs} <- Opts,
+ {F, A} <- lists:flatten([FAs])]
end.
get_exported_types_from_core(Core) ->
diff --git a/lib/dialyzer/src/dialyzer_behaviours.erl b/lib/dialyzer/src/dialyzer_behaviours.erl
index e89c08df7d..fdaa8b663c 100644
--- a/lib/dialyzer/src/dialyzer_behaviours.erl
+++ b/lib/dialyzer/src/dialyzer_behaviours.erl
@@ -72,9 +72,11 @@ check_callbacks(Module, Attrs, Plt, Codeserver) ->
%%--------------------------------------------------------------------
get_behaviours(Attrs) ->
- BehaviourListsAndLine = [{cerl:concrete(L2), hd(cerl:get_ann(L2))} ||
- {L1, L2} <- Attrs, cerl:is_literal(L1),
- cerl:is_literal(L2), cerl:concrete(L1) =:= 'behaviour'],
+ BehaviourListsAndLine =
+ [{cerl:concrete(L2), hd(cerl:get_ann(L2))} ||
+ {L1, L2} <- Attrs, cerl:is_literal(L1),
+ cerl:is_literal(L2), cerl:concrete(L1) =:= 'behaviour' orelse
+ cerl:concrete(L1) =:= 'behavior'],
Behaviours = lists:append([Behs || {Behs,_} <- BehaviourListsAndLine]),
BehLines = [{B,L} || {L1,L} <- BehaviourListsAndLine, B <- L1],
{Behaviours, BehLines}.
@@ -239,12 +241,12 @@ translatable_behaviours(Tree) ->
get_behaviour_apis(Behaviours) ->
get_behaviour_apis(Behaviours, []).
--spec translate_behaviour_api_call(dialyzer_races:mfa_or_funlbl(),
+-spec translate_behaviour_api_call(dialyzer_callgraph:mfa_or_funlbl(),
[erl_types:erl_type()],
[dialyzer_races:core_vars()],
module(),
behaviour_api_dict()) ->
- {dialyzer_races:mfa_or_funlbl(),
+ {dialyzer_callgraph:mfa_or_funlbl(),
[erl_types:erl_type()],
[dialyzer_races:core_vars()]}
| 'plain_call'.
diff --git a/lib/dialyzer/src/dialyzer_callgraph.erl b/lib/dialyzer/src/dialyzer_callgraph.erl
index d3de5aaf45..4767c02f77 100644
--- a/lib/dialyzer/src/dialyzer_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_callgraph.erl
@@ -59,7 +59,7 @@
put_named_tables/2, put_public_tables/2, put_behaviour_api_calls/2,
get_behaviour_api_calls/1]).
--export_type([callgraph/0]).
+-export_type([callgraph/0, mfa_or_funlbl/0]).
-include("dialyzer.hrl").
@@ -177,14 +177,14 @@ is_escaping(Label, #callgraph{esc = Esc}) when is_integer(Label) ->
add_edges([], CG) ->
CG;
-add_edges(Edges, #callgraph{digraph = Callgraph} = CG) ->
- CG#callgraph{digraph = digraph_add_edges(Edges, Callgraph)}.
+add_edges(Edges, #callgraph{digraph = Digraph} = CG) ->
+ CG#callgraph{digraph = digraph_add_edges(Edges, Digraph)}.
-spec add_edges([callgraph_edge()], [mfa_or_funlbl()], callgraph()) -> callgraph().
add_edges(Edges, MFAs, #callgraph{digraph = DG} = CG) ->
- DG1 = digraph_confirm_vertices(MFAs, DG),
- add_edges(Edges, CG#callgraph{digraph = DG1}).
+ DG = digraph_confirm_vertices(MFAs, DG),
+ add_edges(Edges, CG).
-spec take_scc(callgraph()) -> 'none' | {'ok', scc(), callgraph()}.
@@ -196,8 +196,8 @@ take_scc(#callgraph{postorder = []}) ->
-spec remove_external(callgraph()) -> {callgraph(), [tuple()]}.
remove_external(#callgraph{digraph = DG} = CG) ->
- {NewDG, External} = digraph_remove_external(DG),
- {CG#callgraph{digraph = NewDG}, External}.
+ {DG, External} = digraph_remove_external(DG),
+ {CG, External}.
-spec non_local_calls(callgraph()) -> mfa_calls().
@@ -241,30 +241,30 @@ modules(#callgraph{digraph = DG}) ->
-spec module_postorder(callgraph()) -> [[module()]].
module_postorder(#callgraph{digraph = DG}) ->
+ {MDG, _Nodes} = get_module_digraph_and_nodes(DG),
+ MDG1 = digraph_utils:condensation(MDG),
+ PostOrder = digraph_utils:postorder(MDG1),
+ PostOrder1 = sort_sccs_internally(PostOrder, MDG),
+ digraph:delete(MDG1),
+ digraph_delete(MDG),
+ PostOrder1.
+
+get_module_digraph_and_nodes(DG) ->
Edges = digraph_edges(DG),
Nodes = ordsets:from_list([M || {M,_F,_A} <- digraph_vertices(DG)]),
MDG = digraph:new(),
- MDG1 = digraph_confirm_vertices(Nodes, MDG),
- MDG2 = create_module_digraph(Edges, MDG1),
- MDG3 = digraph_utils:condensation(MDG2),
- PostOrder = digraph_utils:postorder(MDG3),
- PostOrder1 = sort_sccs_internally(PostOrder, MDG2),
- digraph:delete(MDG2),
- digraph_delete(MDG3),
- PostOrder1.
+ MDG = digraph_confirm_vertices(Nodes, MDG),
+ MDG = create_module_digraph(Edges, MDG),
+ {MDG, Nodes}.
%% The module deps of a module are modules that depend on the module
-spec module_deps(callgraph()) -> dict().
module_deps(#callgraph{digraph = DG}) ->
- Edges = digraph_edges(DG),
- Nodes = ordsets:from_list([M || {M,_F,_A} <- digraph_vertices(DG)]),
- MDG = digraph:new(),
- MDG1 = digraph_confirm_vertices(Nodes, MDG),
- MDG2 = create_module_digraph(Edges, MDG1),
- Deps = [{N, ordsets:from_list(digraph:in_neighbours(MDG2, N))}
+ {MDG, Nodes} = get_module_digraph_and_nodes(DG),
+ Deps = [{N, ordsets:from_list(digraph:in_neighbours(MDG, N))}
|| N <- Nodes],
- digraph_delete(MDG2),
+ digraph_delete(MDG),
dict:from_list(Deps).
-spec strip_module_deps(dict(), set()) -> dict().
diff --git a/lib/dialyzer/src/dialyzer_codeserver.erl b/lib/dialyzer/src/dialyzer_codeserver.erl
index 13ca65e4dd..f1e87affbd 100644
--- a/lib/dialyzer/src/dialyzer_codeserver.erl
+++ b/lib/dialyzer/src/dialyzer_codeserver.erl
@@ -292,15 +292,11 @@ table__loop(Cached, Map) ->
{NewCached, Ans} =
case Cached of
{M, Tree} ->
- [Val] = [VarFun || {Var, _Fun} = VarFun <- cerl:module_defs(Tree),
- cerl:fname_id(Var) =:= F,
- cerl:fname_arity(Var) =:= A],
+ Val = find_fun(F, A, Tree),
{Cached, Val};
_ ->
Tree = fetch_and_expand(M, Map),
- [Val] = [VarFun || {Var, _Fun} = VarFun <- cerl:module_defs(Tree),
- cerl:fname_id(Var) =:= F,
- cerl:fname_arity(Var) =:= A],
+ Val = find_fun(F, A, Tree),
{{M, Tree}, Val}
end,
Pid ! {self(), MFA, Ans},
@@ -329,3 +325,12 @@ fetch_and_expand(Mod, Map) ->
Msg = "found no module named '" ++ S ++ "' in the analyzed files",
exit({error, Msg})
end.
+
+find_fun(F, A, Tree) ->
+ Pred =
+ fun({Var, _Fun}) ->
+ (cerl:fname_id(Var) =/= F) orelse
+ (cerl:fname_arity(Var) =/= A)
+ end,
+ [Val|_] = lists:dropwhile(Pred, cerl:module_defs(Tree)),
+ Val.
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 6008dba080..aba13278ff 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -67,7 +67,6 @@
%%-define(DEBUG, true).
%%-define(DEBUG_PP, true).
-%%-define(DEBUG_TIME, true).
%%-define(DOT, true).
-ifdef(DEBUG).
@@ -77,9 +76,6 @@
-define(debug(S_, L_), ok).
-endif.
-%%-define(debug1(S_, L_), io:format(S_, L_)).
-%%-define(debug1(S_, L_), ok).
-
%%--------------------------------------------------------------------
-define(no_arg, no_arg).
@@ -276,6 +272,7 @@ analyze_module(Tree, Plt, Callgraph, Records, GetWarnings) ->
debug_pp(Tree, false),
Module = cerl:atom_val(cerl:module_name(Tree)),
RaceDetection = dialyzer_callgraph:get_race_detection(Callgraph),
+ RaceCode = dialyzer_callgraph:get_race_code(Callgraph),
BehaviourTranslations =
case RaceDetection of
true -> dialyzer_behaviours:translatable_behaviours(Tree);
@@ -286,9 +283,6 @@ analyze_module(Tree, Plt, Callgraph, Records, GetWarnings) ->
TopFun, Plt, Module, Records, BehaviourTranslations),
State1 = state__race_analysis(not GetWarnings, State),
State2 = analyze_loop(State1),
- RaceCode = dialyzer_callgraph:get_race_code(Callgraph),
- Callgraph1 = State2#state.callgraph,
- RaceCode1 = dialyzer_callgraph:get_race_code(Callgraph1),
case GetWarnings of
true ->
State3 = state__set_warning_mode(State2),
@@ -313,6 +307,8 @@ analyze_module(Tree, Plt, Callgraph, Records, GetWarnings) ->
St#state{callgraph = Callgraph3}
end;
false ->
+ Callgraph1 = State2#state.callgraph,
+ RaceCode1 = dialyzer_callgraph:get_race_code(Callgraph1),
state__restore_race_code(
dict:merge(fun (_K, V1, _V2) -> V1 end,
RaceCode, RaceCode1), State2)
@@ -320,27 +316,26 @@ analyze_module(Tree, Plt, Callgraph, Records, GetWarnings) ->
analyze_loop(#state{callgraph = Callgraph, races = Races} = State) ->
case state__get_work(State) of
- none -> state__clean_not_called(State);
- {Fun, NewState} ->
- ArgTypes = state__get_args(Fun, NewState),
- case any_none(ArgTypes) of
+ none -> State;
+ {Fun, NewState1} ->
+ {ArgTypes, IsCalled} = state__get_args_and_status(Fun, NewState1),
+ case not IsCalled of
true ->
- ?debug("Not handling1 ~w: ~s\n",
+ ?debug("Not handling (not called) ~w: ~s\n",
[state__lookup_name(get_label(Fun), State),
t_to_string(t_product(ArgTypes))]),
- analyze_loop(NewState);
+ analyze_loop(NewState1);
false ->
- case state__fun_env(Fun, NewState) of
+ case state__fun_env(Fun, NewState1) of
none ->
- ?debug("Not handling2 ~w: ~s\n",
+ ?debug("Not handling (no env) ~w: ~s\n",
[state__lookup_name(get_label(Fun), State),
t_to_string(t_product(ArgTypes))]),
- analyze_loop(NewState);
+ analyze_loop(NewState1);
Map ->
?debug("Handling fun ~p: ~s\n",
[state__lookup_name(get_label(Fun), State),
- t_to_string(state__fun_type(Fun, NewState))]),
- NewState1 = state__mark_fun_as_handled(NewState, Fun),
+ t_to_string(state__fun_type(Fun, NewState1))]),
Vars = cerl:fun_vars(Fun),
Map1 = enter_type_lists(Vars, ArgTypes, Map),
Body = cerl:fun_body(Fun),
@@ -2892,28 +2887,22 @@ state__new(Callgraph, Tree, Plt, Module, Records, BehaviourTranslations) ->
TreeMap = build_tree_map(Tree),
Funs = dict:fetch_keys(TreeMap),
FunTab = init_fun_tab(Funs, dict:new(), TreeMap, Callgraph, Plt, Opaques),
- Work = init_work([get_label(Tree)]),
- Env = dict:store(top, map__new(), dict:new()),
+ ExportedFuns =
+ [Fun || Fun <- Funs--[top], dialyzer_callgraph:is_escaping(Fun, Callgraph)],
+ Work = init_work(ExportedFuns),
+ Env = lists:foldl(fun(Fun, Env) -> dict:store(Fun, map__new(), Env) end,
+ dict:new(), Funs),
#state{callgraph = Callgraph, envs = Env, fun_tab = FunTab, opaques = Opaques,
plt = Plt, races = dialyzer_races:new(), records = Records,
warning_mode = false, warnings = [], work = Work, tree_map = TreeMap,
module = Module, behaviour_api_dict = BehaviourTranslations}.
-state__mark_fun_as_handled(#state{fun_tab = FunTab} = State, Fun0) ->
- Fun = get_label(Fun0),
- case dict:find(Fun, FunTab) of
- {ok, {not_handled, Entry}} ->
- State#state{fun_tab = dict:store(Fun, Entry, FunTab)};
- {ok, {_, _}} ->
- State
- end.
-
state__warning_mode(#state{warning_mode = WM}) ->
WM.
state__set_warning_mode(#state{tree_map = TreeMap, fun_tab = FunTab,
races = Races} = State) ->
- ?debug("Starting warning pass\n", []),
+ ?debug("==========\nStarting warning pass\n==========\n", []),
Funs = dict:fetch_keys(TreeMap),
State#state{work = init_work([top|Funs--[top]]),
fun_tab = FunTab, warning_mode = true,
@@ -2985,7 +2974,7 @@ state__get_warnings(#state{tree_map = TreeMap, fun_tab = FunTab,
{NotCalled, Ret} =
case dict:fetch(get_label(Fun), FunTab) of
{not_handled, {_Args0, Ret0}} -> {true, Ret0};
- {Args0, Ret0} -> {any_none(Args0), Ret0}
+ {_Args0, Ret0} -> {false, Ret0}
end,
case NotCalled of
true ->
@@ -3079,11 +3068,11 @@ state__lookup_record(Tag, Arity, #state{records = Records}) ->
error
end.
-state__get_args(Tree, #state{fun_tab = FunTab}) ->
+state__get_args_and_status(Tree, #state{fun_tab = FunTab}) ->
Fun = get_label(Tree),
case dict:find(Fun, FunTab) of
- {ok, {not_handled, {ArgTypes, _}}} -> ArgTypes;
- {ok, {ArgTypes, _}} -> ArgTypes
+ {ok, {not_handled, {ArgTypes, _}}} -> {ArgTypes, false};
+ {ok, {ArgTypes, _}} -> {ArgTypes, true}
end.
build_tree_map(Tree) ->
@@ -3099,7 +3088,7 @@ build_tree_map(Tree) ->
cerl_trees:fold(Fun, dict:new(), Tree).
init_fun_tab([top|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
- NewDict = dict:store(top, {not_handled, {[], t_none()}}, Dict),
+ NewDict = dict:store(top, {[], t_none()}, Dict),
init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt, Opaques);
init_fun_tab([Fun|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
Arity = cerl:fun_arity(dict:fetch(Fun, TreeMap)),
@@ -3115,9 +3104,9 @@ init_fun_tab([Fun|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
false -> {Args, t_unit()}
end
end;
- false -> {lists:duplicate(Arity, t_none()), t_unit()}
+ false -> {not_handled, {lists:duplicate(Arity, t_none()), t_unit()}}
end,
- NewDict = dict:store(Fun, {not_handled, FunEntry}, Dict),
+ NewDict = dict:store(Fun, FunEntry, Dict),
init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt, Opaques);
init_fun_tab([], Dict, _TreeMap, _Callgraph, _Plt, _Opaques) ->
Dict.
@@ -3141,7 +3130,8 @@ state__clean_not_called(#state{fun_tab = FunTab} = State) ->
end, FunTab),
State#state{fun_tab = NewFunTab}.
-state__all_fun_types(#state{fun_tab = FunTab}) ->
+state__all_fun_types(State) ->
+ #state{fun_tab = FunTab} = state__clean_not_called(State),
Tab1 = dict:erase(top, FunTab),
dict:map(fun(_Fun, {Args, Ret}) -> t_fun(Args, Ret)end, Tab1).
diff --git a/lib/dialyzer/src/dialyzer_gui.erl b/lib/dialyzer/src/dialyzer_gui.erl
index f60194e01f..bac659548f 100644
--- a/lib/dialyzer/src/dialyzer_gui.erl
+++ b/lib/dialyzer/src/dialyzer_gui.erl
@@ -511,6 +511,16 @@ gui_loop(#gui_state{add_all = AddAll, add_file = AddFile, add_rec = AddRec,
[ExtCalls]),
free_editor(State, "Analysis done", Msg),
gui_loop(State);
+ {BackendPid, ext_types, ExtTypes} ->
+ Map = fun({M,F,A}) -> io_lib:format("~p:~p/~p",[M,F,A]) end,
+ ExtTypeString = string:join(lists:map(Map, ExtTypes), "\n"),
+ Msg = io_lib:format("The following remote types are being used "
+ "but information about them is not available.\n"
+ "The analysis might get more precise by including "
+ "the modules containing these types and making sure "
+ "that they are exported:\n~s\n", [ExtTypeString]),
+ free_editor(State, "Analysis done", Msg),
+ gui_loop(State);
{BackendPid, log, LogMsg} ->
update_editor(Log, LogMsg),
gui_loop(State);
diff --git a/lib/dialyzer/src/dialyzer_gui_wx.erl b/lib/dialyzer/src/dialyzer_gui_wx.erl
index e711c15ea7..9ff32bd8b1 100644
--- a/lib/dialyzer/src/dialyzer_gui_wx.erl
+++ b/lib/dialyzer/src/dialyzer_gui_wx.erl
@@ -503,6 +503,16 @@ gui_loop(#gui_state{backend_pid = BackendPid, doc_plt = DocPlt,
[ExtCalls]),
free_editor(State,"Analysis Done", Msg),
gui_loop(State);
+ {BackendPid, ext_types, ExtTypes} ->
+ Map = fun({M,F,A}) -> io_lib:format("~p:~p/~p",[M,F,A]) end,
+ ExtTypeString = string:join(lists:map(Map, ExtTypes), "\n"),
+ Msg = io_lib:format("The following remote types are being used "
+ "but information about them is not available.\n"
+ "The analysis might get more precise by including "
+ "the modules containing these types and making sure "
+ "that they are exported:\n~s\n", [ExtTypeString]),
+ free_editor(State, "Analysis done", Msg),
+ gui_loop(State);
{BackendPid, log, LogMsg} ->
update_editor(Log, LogMsg),
gui_loop(State);
diff --git a/lib/dialyzer/src/dialyzer_plt.erl b/lib/dialyzer/src/dialyzer_plt.erl
index 206c43e4e2..74892d1668 100644
--- a/lib/dialyzer/src/dialyzer_plt.erl
+++ b/lib/dialyzer/src/dialyzer_plt.erl
@@ -31,8 +31,7 @@
-export([check_plt/3,
compute_md5_from_files/1,
contains_mfa/2,
- contains_module/2,
- delete_contract_list/2,
+ all_modules/1,
delete_list/2,
delete_module/2,
included_files/1,
@@ -153,10 +152,8 @@ lookup_contract(#plt{contracts = Contracts},
{M, F, _} = MFA) when is_atom(M), is_atom(F) ->
table_lookup(Contracts, MFA).
--spec lookup_callbacks(plt(), module()) -> [{mfa(),
- {{Filename::string(),
- Line::pos_integer()},
- #contract{}}}].
+-spec lookup_callbacks(plt(), module()) ->
+ [{mfa(), {{Filename::string(), Line::pos_integer()}, #contract{}}}].
lookup_callbacks(#plt{callbacks = Callbacks}, Mod) when is_atom(Mod) ->
FunModFilter =
@@ -166,18 +163,6 @@ lookup_callbacks(#plt{callbacks = Callbacks}, Mod) when is_atom(Mod) ->
ModCallbacks = dict:filter(FunModFilter, Callbacks),
dict:to_list(ModCallbacks).
--spec delete_contract_list(plt(), [mfa()]) -> plt().
-
-delete_contract_list(#plt{contracts = Contracts,
- callbacks = Callbacks} = PLT, List) ->
- PLT#plt{contracts = table_delete_list(Contracts, List),
- callbacks = table_delete_list(Callbacks, List)}.
-
-%% -spec insert(plt(), mfa() | integer(), {_, _}) -> plt().
-%%
-%% insert(#plt{info = Info} = PLT, Id, Types) ->
-%% PLT#plt{info = table_insert(Info, Id, Types)}.
-
-type ret_args_types() :: {erl_types:erl_type(), [erl_types:erl_type()]}.
-spec insert_list(plt(), [{mfa() | integer(), ret_args_types()}]) -> plt().
@@ -220,10 +205,10 @@ get_exported_types(#plt{exported_types = ExpTypes}) ->
lookup_module(#plt{info = Info}, M) when is_atom(M) ->
table_lookup_module(Info, M).
--spec contains_module(plt(), atom()) -> boolean().
+-spec all_modules(plt()) -> set().
-contains_module(#plt{info = Info, contracts = Cs}, M) when is_atom(M) ->
- table_contains_module(Info, M) orelse table_contains_module(Cs, M).
+all_modules(#plt{info = Info, contracts = Cs}) ->
+ sets:union(table_all_modules(Info), table_all_modules(Cs)).
-spec contains_mfa(plt(), mfa()) -> boolean().
@@ -623,10 +608,12 @@ table_lookup_module(Plt, Mod) ->
false -> {value, List}
end.
-table_contains_module(Plt, Mod) ->
- dict:fold(fun({M, _F, _A}, _Val, _Acc) when M =:= Mod -> true;
- (_, _, Acc) -> Acc
- end, false, Plt).
+table_all_modules(Plt) ->
+ Fold =
+ fun({M, _F, _A}, _Val, Acc) -> sets:add_element(M, Acc);
+ (_, _, Acc) -> Acc
+ end,
+ dict:fold(Fold, sets:new(), Plt).
table_merge([H|T]) ->
table_merge(T, H).
diff --git a/lib/dialyzer/src/dialyzer_races.erl b/lib/dialyzer/src/dialyzer_races.erl
index ee9d5e88a3..b9594f5301 100644
--- a/lib/dialyzer/src/dialyzer_races.erl
+++ b/lib/dialyzer/src/dialyzer_races.erl
@@ -39,7 +39,7 @@
let_tag_new/2, new/0, put_curr_fun/3, put_fun_args/2,
put_race_analysis/2, put_race_list/3]).
--export_type([races/0, mfa_or_funlbl/0, core_vars/0]).
+-export_type([races/0, core_vars/0]).
-include("dialyzer.hrl").
@@ -66,8 +66,6 @@
%%%
%%% ===========================================================================
--type mfa_or_funlbl() :: label() | mfa().
-
-type label_type() :: label() | [label()] | {label()} | ?no_label.
-type args() :: [label_type() | [string()]].
-type core_vars() :: cerl:cerl() | ?no_arg | ?bypassed.
@@ -94,7 +92,7 @@
guard :: cerl:cerl()}).
-record(end_case, {clauses :: [#end_clause{}]}).
-record(curr_fun, {status :: 'in' | 'out',
- mfa :: mfa_or_funlbl(),
+ mfa :: dialyzer_callgraph:mfa_or_funlbl(),
label :: label(),
def_vars :: [core_vars()],
arg_types :: [erl_types:erl_type()],
@@ -107,8 +105,8 @@
state :: _, %% XXX: recursive
file_line :: file_line(),
var_map :: dict()}).
--record(fun_call, {caller :: mfa_or_funlbl(),
- callee :: mfa_or_funlbl(),
+-record(fun_call, {caller :: dialyzer_callgraph:mfa_or_funlbl(),
+ callee :: dialyzer_callgraph:mfa_or_funlbl(),
arg_types :: [erl_types:erl_type()],
vars :: [core_vars()]}).
-record(let_tag, {var :: var_to_map1(),
@@ -130,10 +128,10 @@
vars :: [core_vars()],
file_line :: file_line(),
index :: non_neg_integer(),
- fun_mfa :: mfa_or_funlbl(),
+ fun_mfa :: dialyzer_callgraph:mfa_or_funlbl(),
fun_label :: label()}).
--record(races, {curr_fun :: mfa_or_funlbl(),
+-record(races, {curr_fun :: dialyzer_callgraph:mfa_or_funlbl(),
curr_fun_label :: label(),
curr_fun_args = 'empty' :: core_args(),
new_table = 'no_t' :: table(),
@@ -158,7 +156,8 @@
%%%
%%% ===========================================================================
--spec store_race_call(mfa_or_funlbl(), [erl_types:erl_type()], [core_vars()],
+-spec store_race_call(dialyzer_callgraph:mfa_or_funlbl(),
+ [erl_types:erl_type()], [core_vars()],
file_line(), dialyzer_dataflow:state()) ->
dialyzer_dataflow:state().
@@ -2405,7 +2404,7 @@ end_case_new(Clauses) ->
end_clause_new(Arg, Pats, Guard) ->
#end_clause{arg = Arg, pats = Pats, guard = Guard}.
--spec get_curr_fun(races()) -> mfa_or_funlbl().
+-spec get_curr_fun(races()) -> dialyzer_callgraph:mfa_or_funlbl().
get_curr_fun(#races{curr_fun = CurrFun}) ->
CurrFun.
@@ -2444,7 +2443,7 @@ let_tag_new(Var, Arg) ->
new() -> #races{}.
--spec put_curr_fun(mfa_or_funlbl(), label(), races()) ->
+-spec put_curr_fun(dialyzer_callgraph:mfa_or_funlbl(), label(), races()) ->
races().
put_curr_fun(CurrFun, CurrFunLabel, Races) ->
diff --git a/lib/dialyzer/src/dialyzer_succ_typings.erl b/lib/dialyzer/src/dialyzer_succ_typings.erl
index 4d86bb34a7..de4c8a32a3 100644
--- a/lib/dialyzer/src/dialyzer_succ_typings.erl
+++ b/lib/dialyzer/src/dialyzer_succ_typings.erl
@@ -204,7 +204,7 @@ refine_one_module(M, State) ->
#st{callgraph = Callgraph, codeserver = CodeServer, plt = PLT} = State,
ModCode = dialyzer_codeserver:lookup_mod_code(M, CodeServer),
AllFuns = collect_fun_info([ModCode]),
- FunTypes = get_fun_types_from_plt(AllFuns, State),
+ FunTypes = get_fun_types_from_plt(AllFuns, Callgraph, PLT),
Records = dialyzer_codeserver:lookup_mod_records(M, CodeServer),
{NewFunTypes, RaceCode, PublicTables, NamedTables} =
dialyzer_dataflow:get_fun_types(ModCode, PLT, Callgraph, Records),
@@ -321,7 +321,9 @@ find_succ_typings(#st{callgraph = Callgraph, parent = Parent} = State,
end
end.
-analyze_scc(SCC, #st{codeserver = Codeserver} = State) ->
+analyze_scc(SCC, #st{codeserver = Codeserver,
+ callgraph = Callgraph,
+ plt = Plt} = State) ->
SCC_Info = [{MFA,
dialyzer_codeserver:lookup_mfa_code(MFA, Codeserver),
dialyzer_codeserver:lookup_mod_records(M, Codeserver)}
@@ -330,23 +332,19 @@ analyze_scc(SCC, #st{codeserver = Codeserver} = State) ->
|| {_, _, _} = MFA <- SCC],
Contracts2 = [{MFA, Contract} || {MFA, {ok, Contract}} <- Contracts1],
Contracts3 = orddict:from_list(Contracts2),
+ NextLabel = dialyzer_codeserver:get_next_core_label(Codeserver),
{SuccTypes, PltContracts, NotFixpoint} =
- find_succ_types_for_scc(SCC_Info, Contracts3, State),
+ find_succ_types_for_scc(SCC_Info, Contracts3, NextLabel, Callgraph, Plt),
State1 = insert_into_plt(SuccTypes, State),
ContrPlt = dialyzer_plt:insert_contract_list(State1#st.plt, PltContracts),
{State1#st{plt = ContrPlt}, NotFixpoint}.
-find_succ_types_for_scc(SCC_Info, Contracts,
- #st{codeserver = Codeserver,
- callgraph = Callgraph, plt = Plt} = State) ->
+find_succ_types_for_scc(SCC_Info, Contracts, NextLabel, Callgraph, Plt) ->
%% Assume that the PLT contains the current propagated types
AllFuns = collect_fun_info([Fun || {_MFA, {_Var, Fun}, _Rec} <- SCC_Info]),
- PropTypes = get_fun_types_from_plt(AllFuns, State),
- MFAs = [MFA || {MFA, {_Var, _Fun}, _Rec} <- SCC_Info],
- NextLabel = dialyzer_codeserver:get_next_core_label(Codeserver),
- Plt1 = dialyzer_plt:delete_contract_list(Plt, MFAs),
+ PropTypes = get_fun_types_from_plt(AllFuns, Callgraph, Plt),
FunTypes = dialyzer_typesig:analyze_scc(SCC_Info, NextLabel,
- Callgraph, Plt1, PropTypes),
+ Callgraph, Plt, PropTypes),
AllFunSet = sets:from_list([X || {X, _} <- AllFuns]),
FilteredFunTypes = dict:filter(fun(X, _) ->
sets:is_element(X, AllFunSet)
@@ -372,13 +370,13 @@ find_succ_types_for_scc(SCC_Info, Contracts,
ordsets:from_list([Fun || {Fun, _Arity} <- AllFuns])}
end.
-get_fun_types_from_plt(FunList, State) ->
- get_fun_types_from_plt(FunList, State, dict:new()).
+get_fun_types_from_plt(FunList, Callgraph, Plt) ->
+ get_fun_types_from_plt(FunList, Callgraph, Plt, dict:new()).
-get_fun_types_from_plt([{FunLabel, Arity}|Left], State, Map) ->
- Type = lookup_fun_type(FunLabel, Arity, State),
- get_fun_types_from_plt(Left, State, dict:store(FunLabel, Type, Map));
-get_fun_types_from_plt([], _State, Map) ->
+get_fun_types_from_plt([{FunLabel, Arity}|Left], Callgraph, Plt, Map) ->
+ Type = lookup_fun_type(FunLabel, Arity, Callgraph, Plt),
+ get_fun_types_from_plt(Left, Callgraph, Plt, dict:store(FunLabel, Type, Map));
+get_fun_types_from_plt([], _Callgraph, _Plt, Map) ->
Map.
collect_fun_info(Trees) ->
@@ -396,7 +394,7 @@ collect_fun_info([Tree|Trees], List) ->
collect_fun_info([], List) ->
List.
-lookup_fun_type(Label, Arity, #st{callgraph = Callgraph, plt = Plt}) ->
+lookup_fun_type(Label, Arity, Callgraph, Plt) ->
ID = lookup_name(Label, Callgraph),
case dialyzer_plt:lookup(Plt, ID) of
none -> erl_types:t_fun(Arity, erl_types:t_any());
diff --git a/lib/dialyzer/src/dialyzer_typesig.erl b/lib/dialyzer/src/dialyzer_typesig.erl
index 4268814859..04ff8e4941 100644
--- a/lib/dialyzer/src/dialyzer_typesig.erl
+++ b/lib/dialyzer/src/dialyzer_typesig.erl
@@ -91,22 +91,24 @@
-type typesig_scc() :: [{mfa(), {cerl:c_var(), cerl:c_fun()}, dict()}].
-type typesig_funmap() :: [{type_var(), type_var()}]. %% Orddict
--record(state, {callgraph :: dialyzer_callgraph:callgraph(),
- cs = [] :: [constr()],
- cmap = dict:new() :: dict(),
- fun_map = [] :: typesig_funmap(),
- fun_arities = dict:new() :: dict(),
- in_match = false :: boolean(),
- in_guard = false :: boolean(),
- module :: module(),
- name_map = dict:new() :: dict(),
- next_label :: label(),
- non_self_recs = [] :: [label()],
- plt :: dialyzer_plt:plt(),
- prop_types = dict:new() :: dict(),
- records = dict:new() :: dict(),
- opaques = [] :: [erl_types:erl_type()],
- scc = [] :: [type_var()]}).
+-record(state, {callgraph :: dialyzer_callgraph:callgraph(),
+ cs = [] :: [constr()],
+ cmap = dict:new() :: dict(),
+ fun_map = [] :: typesig_funmap(),
+ fun_arities = dict:new() :: dict(),
+ in_match = false :: boolean(),
+ in_guard = false :: boolean(),
+ module :: module(),
+ name_map = dict:new() :: dict(),
+ next_label :: label(),
+ self_recs :: [label()],
+ plt :: dialyzer_plt:plt(),
+ prop_types = dict:new() :: dict(),
+ records = dict:new() :: dict(),
+ opaques = [] :: [erl_types:erl_type()],
+ scc = [] :: [type_var()],
+ mfas = [] :: [dialyzer_callgraph:mfa_or_funlbl()]
+ }).
%%-----------------------------------------------------------------------------
@@ -448,7 +450,8 @@ traverse(Tree, DefinedVars, State) ->
%% Check if a record is constructed.
_ ->
Arity = length(Fields),
- case state__lookup_record(State2, cerl:atom_val(Tag), Arity) of
+ Records = State2#state.records,
+ case lookup_record(Records, cerl:atom_val(Tag), Arity) of
error -> {State2, TupleType};
{ok, RecType} ->
State3 = state__store_conj(TupleType, sub, RecType, State2),
@@ -646,8 +649,14 @@ get_plt_constr(MFA, Dst, ArgVars, State) ->
PltRes = dialyzer_plt:lookup(Plt, MFA),
Opaques = State#state.opaques,
Module = State#state.module,
+ SCCMFAs = State#state.mfas,
{FunModule, _, _} = MFA,
- case dialyzer_plt:lookup_contract(Plt, MFA) of
+ Contract =
+ case lists:member(MFA, SCCMFAs) of
+ true -> none;
+ false -> dialyzer_plt:lookup_contract(Plt, MFA)
+ end,
+ case Contract of
none ->
case PltRes of
none -> State;
@@ -1246,6 +1255,8 @@ get_bif_constr({erlang, is_record, 2}, Dst, [Var, Tag] = Args, _State) ->
mk_constraint(Var, sub, ArgV)]);
get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
%% TODO: Revise this to make it precise for Tag and Arity.
+ Records = State#state.records,
+ AllOpaques = State#state.opaques,
ArgFun =
fun(Map) ->
case t_is_atom(true, lookup_type(Dst, Map)) of
@@ -1262,10 +1273,8 @@ get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
GenRecord = t_tuple([TagType|AnyElems]),
case t_atom_vals(TagType) of
[TagVal] ->
- case state__lookup_record(State, TagVal,
- ArityVal - 1) of
+ case lookup_record(Records, TagVal, ArityVal - 1) of
{ok, Type} ->
- AllOpaques = State#state.opaques,
case t_opaque_match_record(Type, AllOpaques) of
[Opaque] -> Opaque;
_ -> Type
@@ -1287,7 +1296,7 @@ get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
DstFun = fun(Map) ->
[TmpVar, TmpTag, TmpArity] = TmpArgTypes = lookup_type_list(Args, Map),
TmpArgTypes2 =
- case lists:member(TmpVar, State#state.opaques) of
+ case lists:member(TmpVar, AllOpaques) of
true ->
case t_is_integer(TmpArity) of
true ->
@@ -1297,7 +1306,8 @@ get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
true ->
case t_atom_vals(TmpTag) of
[TmpTagVal] ->
- case state__lookup_record(State, TmpTagVal, TmpArityVal - 1) of
+ case lookup_record(Records, TmpTagVal,
+ TmpArityVal - 1) of
{ok, TmpType} ->
case t_is_none(t_inf(TmpType, TmpVar, opaque)) of
true -> TmpArgTypes;
@@ -1526,9 +1536,10 @@ get_bif_constr({erlang, element, 2} = _BIF, Dst, Args,
case t_is_none(GenType) of
true -> ?debug("Bif: ~w failed\n", [_BIF]), throw(error);
false ->
+ Opaques = State#state.opaques,
Fun = fun(Map) ->
[I, T] = ATs = lookup_type_list(Args, Map),
- ATs2 = case lists:member(T, State#state.opaques) of
+ ATs2 = case lists:member(T, Opaques) of
true -> [I, erl_types:t_opaque_structure(T)];
false -> ATs
end,
@@ -1546,7 +1557,7 @@ get_bif_constr({erlang, element, 2} = _BIF, Dst, Args,
end;
get_bif_constr({M, F, A} = _BIF, Dst, Args, State) ->
GenType = erl_bif_types:type(M, F, A),
- Opaques = State#state.opaques,
+ Opaques = State#state.opaques,
case t_is_none(GenType) of
true -> ?debug("Bif: ~w failed\n", [_BIF]), throw(error);
false ->
@@ -1612,11 +1623,12 @@ get_bif_test_constr(Dst, Arg, Type, State) ->
end
end,
ArgV = ?mk_fun_var(ArgFun, [Dst]),
+ Opaques = State#state.opaques,
DstFun = fun(Map) ->
ArgType = lookup_type(Arg, Map),
case t_is_none(t_inf(ArgType, Type)) of
true ->
- case lists:member(ArgType, State#state.opaques) of
+ case lists:member(ArgType, Opaques) of
true ->
OpaqueStruct = erl_types:t_opaque_structure(ArgType),
case t_is_none(t_inf(OpaqueStruct, Type)) of
@@ -1743,33 +1755,29 @@ solve_ref_or_list(#constraint_ref{id = Id, deps = Deps},
true -> solve_self_recursive(Cs, Map, MapDict, Id, t_none(), State);
false -> solve_ref_or_list(Cs, Map, MapDict, State)
end,
- case Res of
- {error, NewMapDict} ->
- ?debug("Error solving for function ~p\n", [debug_lookup_name(Id)]),
- Arity = state__fun_arity(Id, State),
- FunType =
- case state__prop_domain(t_var_name(Id), State) of
- error -> t_fun(Arity, t_none());
- {ok, Dom} -> t_fun(Dom, t_none())
- end,
- NewMap1 = enter_type(Id, FunType, Map),
- NewMap2 =
- case state__get_rec_var(Id, State) of
- {ok, Var} -> enter_type(Var, FunType, NewMap1);
- error -> NewMap1
- end,
- {ok, dict:store(Id, NewMap2, NewMapDict), NewMap2};
- {ok, NewMapDict, NewMap} ->
- ?debug("Done solving fun: ~p\n", [debug_lookup_name(Id)]),
- FunType = lookup_type(Id, NewMap),
- NewMap1 = enter_type(Id, FunType, Map),
- NewMap2 =
- case state__get_rec_var(Id, State) of
- {ok, Var} -> enter_type(Var, FunType, NewMap1);
- error -> NewMap1
- end,
- {ok, dict:store(Id, NewMap2, NewMapDict), NewMap2}
- end
+ {NewMapDict, FunType} =
+ case Res of
+ {error, NewMapDict0} ->
+ ?debug("Error solving for function ~p\n", [debug_lookup_name(Id)]),
+ Arity = state__fun_arity(Id, State),
+ FunType0 =
+ case state__prop_domain(t_var_name(Id), State) of
+ error -> t_fun(Arity, t_none());
+ {ok, Dom} -> t_fun(Dom, t_none())
+ end,
+ {NewMapDict0, FunType0};
+ {ok, NewMapDict0, NewMap} ->
+ ?debug("Done solving fun: ~p\n", [debug_lookup_name(Id)]),
+ FunType0 = lookup_type(Id, NewMap),
+ {NewMapDict0, FunType0}
+ end,
+ NewMap1 = enter_type(Id, FunType, Map),
+ NewMap2 =
+ case state__get_rec_var(Id, State) of
+ {ok, Var} -> enter_type(Var, FunType, NewMap1);
+ error -> NewMap1
+ end,
+ {ok, dict:store(Id, NewMap2, NewMapDict), NewMap2}
end;
solve_ref_or_list(#constraint_list{type=Type, list = Cs, deps = Deps, id = Id},
Map, MapDict, State) ->
@@ -2078,10 +2086,15 @@ mk_var_no_lit_list(List) ->
%% ============================================================================
new_state(SCC0, NextLabel, CallGraph, Plt, PropTypes) ->
- NameMap = dict:from_list([{MFA, Var} || {MFA, {Var, _Fun}, _Rec} <- SCC0]),
+ List = [{MFA, Var} || {MFA, {Var, _Fun}, _Rec} <- SCC0],
+ NameMap = dict:from_list(List),
+ MFAs = [MFA || {MFA, _Var} <- List],
SCC = [mk_var(Fun) || {_MFA, {_Var, Fun}, _Rec} <- SCC0],
+ SelfRecs = [F || F <- SCC,
+ dialyzer_callgraph:is_self_rec(t_var_name(F), CallGraph)],
#state{callgraph = CallGraph, name_map = NameMap, next_label = NextLabel,
- prop_types = PropTypes, plt = Plt, scc = ordsets:from_list(SCC)}.
+ prop_types = PropTypes, plt = Plt, scc = ordsets:from_list(SCC),
+ mfas = MFAs, self_recs = ordsets:from_list(SelfRecs)}.
state__set_rec_dict(State, RecDict) ->
State#state{records = RecDict}.
@@ -2091,15 +2104,6 @@ state__set_opaques(#state{records = RecDict} = State, {M, _F, _A}) ->
erl_types:module_builtin_opaques(M) ++ t_opaque_from_records(RecDict),
State#state{opaques = Opaques, module = M}.
-state__lookup_record(#state{records = Records}, Tag, Arity) ->
- case erl_types:lookup_record(Tag, Arity, Records) of
- {ok, Fields} ->
- {ok, t_tuple([t_from_term(Tag)|
- [FieldType || {_FieldName, FieldType} <- Fields]])};
- error ->
- error
- end.
-
state__set_in_match(State, Bool) ->
State#state{in_match = Bool}.
@@ -2268,14 +2272,12 @@ state__get_cs(Var, #state{cmap = Dict}) ->
%% The functions here will not be treated as self recursive.
%% These functions will need to be handled as such manually.
-state__mark_as_non_self_rec(SCC, #state{non_self_recs = NS} = State) ->
- State#state{non_self_recs = ordsets:union(NS, ordsets:from_list(SCC))}.
+state__mark_as_non_self_rec(SCC, #state{self_recs = SelfRecs} = State) ->
+ %% TODO: Check if the result is always empty and just set it to [] if so.
+ State#state{self_recs = ordsets:subtract(SelfRecs, ordsets:from_list(SCC))}.
-state__is_self_rec(Fun, #state{callgraph = CallGraph, non_self_recs = NS}) ->
- case ordsets:is_element(Fun, NS) of
- true -> false;
- false -> dialyzer_callgraph:is_self_rec(t_var_name(Fun), CallGraph)
- end.
+state__is_self_rec(Fun, #state{self_recs = SelfRecs}) ->
+ ordsets:is_element(Fun, SelfRecs).
state__store_funs(Vars0, Funs0, #state{fun_map = Map} = State) ->
debug_make_name_map(Vars0, Funs0),
@@ -2689,6 +2691,15 @@ find_constraint(Tuple, [#constraint_list{list = List}|Cs]) ->
find_constraint(Tuple, [_|Cs]) ->
find_constraint(Tuple, Cs).
+lookup_record(Records, Tag, Arity) ->
+ case erl_types:lookup_record(Tag, Arity, Records) of
+ {ok, Fields} ->
+ {ok, t_tuple([t_from_term(Tag)|
+ [FieldType || {_FieldName, FieldType} <- Fields]])};
+ error ->
+ error
+ end.
+
%% ============================================================================
%%
%% Pretty printer and debug facilities.
diff --git a/lib/dialyzer/test/Makefile b/lib/dialyzer/test/Makefile
index 47deb17f1d..6a1abce943 100644
--- a/lib/dialyzer/test/Makefile
+++ b/lib/dialyzer/test/Makefile
@@ -30,5 +30,5 @@ release_tests_spec:
$(INSTALL_DATA) $(AUXILIARY_FILES) $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
cd $(RELSYSDIR);\
- erl -make;\
+ erlc dialyzer_common.erl file_utils.erl;\
erl -noshell -run dialyzer_common create_all_suites -s erlang halt
diff --git a/lib/dialyzer/test/behaviour_SUITE_data/results/sample_behaviour b/lib/dialyzer/test/behaviour_SUITE_data/results/sample_behaviour
index a38e662ccf..8cecabccaa 100644
--- a/lib/dialyzer/test/behaviour_SUITE_data/results/sample_behaviour
+++ b/lib/dialyzer/test/behaviour_SUITE_data/results/sample_behaviour
@@ -1,9 +1,9 @@
-sample_callback_wrong.erl:15: The inferred return type of sample_callback_2/0 (42) has nothing in common with atom(), which is the expected return type for the callback of sample_behaviour behaviour
-sample_callback_wrong.erl:16: The inferred return type of sample_callback_3/0 ('fair') has nothing in common with 'fail' | {'ok',1..255}, which is the expected return type for the callback of sample_behaviour behaviour
-sample_callback_wrong.erl:17: The inferred return type of sample_callback_4/1 ('fail') has nothing in common with 'ok', which is the expected return type for the callback of sample_behaviour behaviour
-sample_callback_wrong.erl:19: The inferred return type of sample_callback_5/1 (string()) has nothing in common with 'fail' | 'ok', which is the expected return type for the callback of sample_behaviour behaviour
-sample_callback_wrong.erl:19: The inferred type for the 1st argument of sample_callback_5/1 (atom()) is not a supertype of 1..255, which is expected type for this argument in the callback of the sample_behaviour behaviour
-sample_callback_wrong.erl:21: The inferred return type of sample_callback_6/3 ({'okk',number()}) has nothing in common with 'fail' | {'ok',1..255}, which is the expected return type for the callback of sample_behaviour behaviour
-sample_callback_wrong.erl:21: The inferred type for the 3rd argument of sample_callback_6/3 (atom()) is not a supertype of string(), which is expected type for this argument in the callback of the sample_behaviour behaviour
-sample_callback_wrong.erl:3: Undefined callback function sample_callback_1/0 (behaviour 'sample_behaviour')
+sample_callback_wrong.erl:16: The inferred return type of sample_callback_2/0 (42) has nothing in common with atom(), which is the expected return type for the callback of sample_behaviour behaviour
+sample_callback_wrong.erl:17: The inferred return type of sample_callback_3/0 ('fair') has nothing in common with 'fail' | {'ok',1..255}, which is the expected return type for the callback of sample_behaviour behaviour
+sample_callback_wrong.erl:18: The inferred return type of sample_callback_4/1 ('fail') has nothing in common with 'ok', which is the expected return type for the callback of sample_behaviour behaviour
+sample_callback_wrong.erl:20: The inferred return type of sample_callback_5/1 (string()) has nothing in common with 'fail' | 'ok', which is the expected return type for the callback of sample_behaviour behaviour
+sample_callback_wrong.erl:20: The inferred type for the 1st argument of sample_callback_5/1 (atom()) is not a supertype of 1..255, which is expected type for this argument in the callback of the sample_behaviour behaviour
+sample_callback_wrong.erl:22: The inferred return type of sample_callback_6/3 ({'okk',number()}) has nothing in common with 'fail' | {'ok',1..255}, which is the expected return type for the callback of sample_behaviour behaviour
+sample_callback_wrong.erl:22: The inferred type for the 3rd argument of sample_callback_6/3 (atom()) is not a supertype of string(), which is expected type for this argument in the callback of the sample_behaviour behaviour
+sample_callback_wrong.erl:4: Undefined callback function sample_callback_1/0 (behaviour 'sample_behaviour')
diff --git a/lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl b/lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl
new file mode 100644
index 0000000000..8ec84d798f
--- /dev/null
+++ b/lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl
@@ -0,0 +1,37 @@
+%%% Dialyzer was giving a warning with this input because of a bug in the
+%%% substitution of remote types in specs. Remote types in the first element of
+%%% a tuple would not update the tuple's tag set and we could end up with a
+%%% non-normalized representation.
+%%%
+%%% Reported by Damian Dobroczyński on 29/02/2012
+
+-module(custom_sup).
+
+-behavior(supervisor).
+
+-export([init/1]).
+
+-spec init(atom()) ->
+ {ok, {{supervisor:strategy(), non_neg_integer(), non_neg_integer()},
+ [supervisor:child_spec()]}} | ignore.
+
+init(StorageName) ->
+ Strategy = {one_for_all, 100, 1},
+ %% get application-wide storage parameters
+ case application:get_env(storage) of
+ undefined ->
+ ignore;
+ {ok, Storage} ->
+ BackendId = proplists:get_value(backend, Storage),
+ BackendArgs = proplists:get_value(args, Storage),
+ if
+ (BackendId =:= undefined) orelse (BackendArgs =:= undefined) ->
+ ignore;
+ true ->
+ {ok, {Strategy,
+ [{id1, {a_module, start_link, []},
+ permanent, 5000, worker, [a_module]},
+ {id2, {another_module, start_link, []},
+ permanent, 5000, worker, [another_module]}]}}
+ end
+ end.
diff --git a/lib/dialyzer/test/behaviour_SUITE_data/src/sample_behaviour/sample_callback_wrong.erl b/lib/dialyzer/test/behaviour_SUITE_data/src/sample_behaviour/sample_callback_wrong.erl
index 02a063fab7..430494c48c 100644
--- a/lib/dialyzer/test/behaviour_SUITE_data/src/sample_behaviour/sample_callback_wrong.erl
+++ b/lib/dialyzer/test/behaviour_SUITE_data/src/sample_behaviour/sample_callback_wrong.erl
@@ -1,6 +1,7 @@
-module(sample_callback_wrong).
--behaviour(sample_behaviour).
+%% This attribute uses the american spelling of 'behaviour'.
+-behavior(sample_behaviour).
-export([
% sample_callback_1/0,
diff --git a/lib/dialyzer/test/dialyzer_common.erl b/lib/dialyzer/test/dialyzer_common.erl
index 51766a4604..d2b1026c06 100644
--- a/lib/dialyzer/test/dialyzer_common.erl
+++ b/lib/dialyzer/test/dialyzer_common.erl
@@ -216,10 +216,13 @@ get_suites(Dir) ->
end.
suffix(String, Suffix) ->
- Index = string:rstr(String, Suffix),
- case string:substr(String, Index) =:= Suffix of
- true -> {yes, string:sub_string(String,1,Index-1)};
- false -> no
+ case string:rstr(String, Suffix) of
+ 0 -> no;
+ Index ->
+ case string:substr(String, Index) =:= Suffix of
+ true -> {yes, string:sub_string(String,1,Index-1)};
+ false -> no
+ end
end.
-spec create_suite(string()) -> 'ok'.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/multiple_wrong_opaques b/lib/dialyzer/test/opaque_SUITE_data/results/multiple_wrong_opaques
new file mode 100644
index 0000000000..18ece8820c
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/multiple_wrong_opaques
@@ -0,0 +1,2 @@
+
+multiple_wrong_opaques.erl:5: Invalid type specification for function multiple_wrong_opaques:weird/1. The success typing is ('gazonk') -> 42
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl b/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl
new file mode 100644
index 0000000000..9e695cec1d
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl
@@ -0,0 +1,8 @@
+-module(multiple_wrong_opaques).
+
+-export([weird/1]).
+
+-spec weird(dict() | gb_tree()) -> 42.
+
+weird(gazonk) -> 42.
+
diff --git a/lib/dialyzer/test/options1_SUITE_data/results/compiler b/lib/dialyzer/test/options1_SUITE_data/results/compiler
index e82087ae86..6399e3e36b 100644
--- a/lib/dialyzer/test/options1_SUITE_data/results/compiler
+++ b/lib/dialyzer/test/options1_SUITE_data/results/compiler
@@ -20,6 +20,7 @@ cerl_inline.erl:2333: The pattern 'true' can never match the type 'false'
cerl_inline.erl:2355: The pattern 'true' can never match the type 'false'
cerl_inline.erl:238: The pattern 'true' can never match the type 'false'
cerl_inline.erl:2436: Function filename/1 will never be called
+cerl_inline.erl:244: Function counter_stats/0 will never be called
cerl_inline.erl:2700: The pattern 'true' can never match the type 'false'
cerl_inline.erl:2730: The pattern <{F, L, D}, Vs> can never match the type <[1..255,...],[any()]>
cerl_inline.erl:2738: The pattern <{F, L, D}, Vs> can never match the type <[1..255,...],[any()]>
diff --git a/lib/dialyzer/test/r9c_SUITE_data/results/inets b/lib/dialyzer/test/r9c_SUITE_data/results/inets
index 24cb39e52b..773525eb7f 100644
--- a/lib/dialyzer/test/r9c_SUITE_data/results/inets
+++ b/lib/dialyzer/test/r9c_SUITE_data/results/inets
@@ -8,6 +8,7 @@ http_lib.erl:424: The variable _ can never match since previous clauses complete
http_lib.erl:438: The variable _ can never match since previous clauses completely covered the type any()
http_lib.erl:99: Function getHeaderValue/2 will never be called
httpc_handler.erl:660: Function exit_session_ok/2 has no local return
+httpc_handler.erl:676: Function format_time/0 will never be called
httpc_manager.erl:145: The pattern {ErrorReply, State2} can never match the type {{'ok',number()},number(),#state{reqid::number()}}
httpc_manager.erl:160: The pattern {ErrorReply, State2} can never match the type {{'ok',number()},number(),#state{reqid::number()}}
httpc_manager.erl:478: The pattern {'error', Reason} can never match the type 'ok' | {number(),#session{clientclose::boolean(),pipeline::[],quelength::1}}
diff --git a/lib/dialyzer/test/small_SUITE_data/results/cerl_hipeify b/lib/dialyzer/test/small_SUITE_data/results/cerl_hipeify
index 87bf6f309f..06dc0d63ee 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/cerl_hipeify
+++ b/lib/dialyzer/test/small_SUITE_data/results/cerl_hipeify
@@ -1,4 +1,4 @@
cerl_hipeify.erl:370: Function will never be called
-cerl_hipeify.erl:370: Guard test fun((none()) -> none()) =:= F::{_,_,_} | {_,_,_,_} | {_,_,_,_,_} | {_,_,_,_,_,_} | {_,_,_,_,_,_,_} can never succeed
+cerl_hipeify.erl:370: Guard test fun((none()) -> no_return()) =:= F::{_,_,_} | {_,_,_,_} | {_,_,_,_,_} | {_,_,_,_,_,_} | {_,_,_,_,_,_,_} can never succeed
cerl_hipeify.erl:641: Function env__new_function_name/2 will never be called
diff --git a/lib/dialyzer/test/small_SUITE_data/results/inf_loop2 b/lib/dialyzer/test/small_SUITE_data/results/inf_loop2
index 7e9972ad98..142e4b2c37 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/inf_loop2
+++ b/lib/dialyzer/test/small_SUITE_data/results/inf_loop2
@@ -1,4 +1,4 @@
inf_loop2.erl:18: Function test/0 has no local return
inf_loop2.erl:19: The call lists:reverse('gazonk') will never return since it differs in the 1st argument from the success typing arguments: ([any()])
-inf_loop2.erl:22: Function loop/0 has no local return
+inf_loop2.erl:22: Function loop/0 will never be called
diff --git a/lib/dialyzer/test/small_SUITE_data/results/no_local_return b/lib/dialyzer/test/small_SUITE_data/results/no_local_return
new file mode 100644
index 0000000000..6ca1ed51d8
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/no_local_return
@@ -0,0 +1,3 @@
+
+no_local_return.erl:11: Function bar/1 will never be called
+no_local_return.erl:8: Function foo/0 will never be called
diff --git a/lib/dialyzer/test/small_SUITE_data/src/no_local_return.erl b/lib/dialyzer/test/small_SUITE_data/src/no_local_return.erl
new file mode 100644
index 0000000000..4e1a0b015a
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/no_local_return.erl
@@ -0,0 +1,12 @@
+-module(no_local_return).
+
+%% NOTE: No function is exported. Dialyzer produced a bogus
+%% 'Function foo/0 has no local return' warning
+%% when in fact typer was finding correct return values for both
+%% these functions.
+
+foo() ->
+ bar(42).
+
+bar(X) ->
+ lists:duplicate(X, gazonk).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/on_load.erl b/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
new file mode 100644
index 0000000000..16533a9caa
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
@@ -0,0 +1,11 @@
+%%% This is to ensure that "on_load" functions are never reported as unused.
+
+-module(on_load).
+
+-export([foo/0]).
+
+-on_load(bar/0).
+
+foo() -> ok.
+
+bar() -> ok.
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index dc9bc565ee..20daae8215 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -187,6 +187,7 @@ chapter_title(#xmlElement{content=Es}) -> % name = h3 | h4
%% 8) <blockquote> contents may need to be made into paragraphs
%% 9) <th> (table header) is not allowed - is replaced by
%% <td><em>...</em></td>.
+%% 10) <img src=""> is not allowed, replace with <image file="">
otp_xmlify([]) ->
[];
otp_xmlify(Es0) ->
@@ -416,6 +417,9 @@ otp_xmlify_e(#xmlElement{name=tr} = E) ->
otp_xmlify_e(#xmlElement{name=td} = E) ->
Content = otp_xmlify_e(E#xmlElement.content),
[E#xmlElement{content=Content}];
+otp_xmlify_e(#xmlElement{name=img} = E) -> % 10)
+ Content = otp_xmlify_e(E#xmlElement.content),
+ [otp_xmlify_img(E#xmlElement{ content = Content })];
otp_xmlify_e([E | Es]) ->
otp_xmlify_e(E) ++ otp_xmlify_e(Es);
otp_xmlify_e([]) ->
@@ -634,6 +638,20 @@ otp_xmlify_table([#xmlElement{name=td, content=Content}|Es]) ->
otp_xmlify_table([]) ->
[].
+%% otp_xmlify_img(E) -> Es.
+%% Transforms a <img src=""> into <image file="">
+otp_xmlify_img(E0) ->
+ Attrs = lists:map(
+ fun(#xmlAttribute{ name = src, value = Path} = A) ->
+ V = otp_xmlify_a_fileref(Path,this),
+ A#xmlAttribute{ name = file,
+ value = V };
+ (A) ->
+ A
+ end,E0#xmlElement.attributes),
+ E0#xmlElement{name = image, expanded_name = image,
+ attributes = Attrs}.
+
%%--Misc help functions used by otp_xmlify/1 et al---------------------
%% find_next(Tag, Es) -> {Es1, Es2}
@@ -975,6 +993,8 @@ t_type([E=#xmlElement{name = atom}]) ->
t_atom(E);
t_type([E=#xmlElement{name = integer}]) ->
t_integer(E);
+t_type([E=#xmlElement{name = range}]) ->
+ t_range(E);
t_type([E=#xmlElement{name = float}]) ->
t_float(E);
t_type([#xmlElement{name = nil}]) ->
@@ -1001,6 +1021,9 @@ t_atom(E) ->
t_integer(E) ->
[get_attrval(value, E)].
+t_range(E) ->
+ [get_attrval(value, E)].
+
t_float(E) ->
[get_attrval(value, E)].
diff --git a/lib/hipe/Makefile b/lib/hipe/Makefile
index 6682c9aac0..f2be75f0dd 100644
--- a/lib/hipe/Makefile
+++ b/lib/hipe/Makefile
@@ -37,8 +37,13 @@ else
SUB_DIRECTORIES = $(ALWAYS_SUBDIRS)
endif
+
include native.mk
+ifndef EBIN
+EBIN = ../ebin
+endif
+
#
# Default Subdir Targets
#
@@ -52,12 +57,20 @@ edocs:
fi
all-subdirs:
- -for dir in $(SUB_DIRECTORIES); do \
- (cd $$dir; $(MAKE) $(MAKETARGET) EBIN=../ebin; cd ..); \
+ for dir in $(SUB_DIRECTORIES); do \
+ (cd $$dir; $(MAKE) $(MAKETARGET) EBIN=$(EBIN); cd ..); \
+ done
+
+# distclean and realclean should clean the bootstrap files
+all-subdirs-x:
+ for dir in $(SUB_DIRECTORIES); do \
+ (cd $$dir; $(MAKE) $(MAKETARGET) EBIN=../boot_ebin; cd ..); \
done
+clean:
+ $(MAKE) MAKETARGET="clean" all-subdirs all-subdirs-x
distclean:
- $(MAKE) MAKETARGET="distclean" all-subdirs
+ $(MAKE) MAKETARGET="distclean" all-subdirs all-subdirs-x
realclean:
- $(MAKE) MAKETARGET="realclean" all-subdirs
+ $(MAKE) MAKETARGET="realclean" all-subdirs all-subdirs-x
diff --git a/lib/hipe/amd64/Makefile b/lib/hipe/amd64/Makefile
index 58377e5349..397cc0539e 100644
--- a/lib/hipe/amd64/Makefile
+++ b/lib/hipe/amd64/Makefile
@@ -89,6 +89,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/arm/Makefile b/lib/hipe/arm/Makefile
index 3f60cd77cc..6187b7e925 100644
--- a/lib/hipe/arm/Makefile
+++ b/lib/hipe/arm/Makefile
@@ -90,6 +90,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/boot_ebin/.gitignore b/lib/hipe/boot_ebin/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/hipe/boot_ebin/.gitignore
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
index 7fcc44d27d..d0a0ea1f59 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
@@ -82,6 +82,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 620fed365e..65b9a057de 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -424,12 +424,7 @@ t_has_opaque_subtype(T) ->
-spec t_opaque_structure(erl_type()) -> erl_type().
t_opaque_structure(?opaque(Elements)) ->
- case ordsets:size(Elements) of
- 1 ->
- [#opaque{struct = Struct}] = ordsets:to_list(Elements),
- Struct;
- _ -> throw({error, "Unexpected multiple opaque types"})
- end.
+ t_sup([Struct || #opaque{struct = Struct} <- ordsets:to_list(Elements)]).
-spec t_opaque_module(erl_type()) -> module().
@@ -688,9 +683,9 @@ t_solve_remote(?opaque(Set), ET, R, C) ->
{NewList, RR} = opaques_solve_remote(List, ET, R, C),
{?opaque(ordsets:from_list(NewList)), RR};
t_solve_remote(?tuple(?any, _, _) = T, _ET, _R, _C) -> {T, []};
-t_solve_remote(?tuple(Types, Arity, Tag), ET, R, C) ->
+t_solve_remote(?tuple(Types, _Arity, _Tag), ET, R, C) ->
{RL, RR} = list_solve_remote(Types, ET, R, C),
- {?tuple(RL, Arity, Tag), RR};
+ {t_tuple(RL), RR};
t_solve_remote(?tuple_set(Set), ET, R, C) ->
{NewSet, RR} = tuples_solve_remote(Set, ET, R, C),
{?tuple_set(NewSet), RR};
diff --git a/lib/hipe/doc/Makefile b/lib/hipe/doc/Makefile
index cdf9c9c798..e28b16c12e 100644
--- a/lib/hipe/doc/Makefile
+++ b/lib/hipe/doc/Makefile
@@ -24,6 +24,9 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
clean:
-rm -f *.html edoc-info stylesheet.css erlang.png
+distclean: clean
+realclean: clean
+
# ----------------------------------------------------
# Special Build Targets
# ----------------------------------------------------
diff --git a/lib/hipe/doc/src/Makefile b/lib/hipe/doc/src/Makefile
index d440178e4c..065854e8a7 100644
--- a/lib/hipe/doc/src/Makefile
+++ b/lib/hipe/doc/src/Makefile
@@ -97,6 +97,9 @@ clean clean_docs:
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
rm -f errs core *~
+distclean: clean
+realclean: clean
+
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
diff --git a/lib/hipe/flow/Makefile b/lib/hipe/flow/Makefile
index bbe8ef8666..e8d570ac48 100644
--- a/lib/hipe/flow/Makefile
+++ b/lib/hipe/flow/Makefile
@@ -82,6 +82,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile
index bd6436c8b3..e57daecfbc 100644
--- a/lib/hipe/icode/Makefile
+++ b/lib/hipe/icode/Makefile
@@ -100,6 +100,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/main/Makefile b/lib/hipe/main/Makefile
index a14c9c3ca4..d49dd6f424 100644
--- a/lib/hipe/main/Makefile
+++ b/lib/hipe/main/Makefile
@@ -93,6 +93,9 @@ clean:
rm -f $(TARGET_FILES) $(DOC_FILES) $(HRL_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/native.mk b/lib/hipe/native.mk
index 6f4602477b..738e78e556 100644
--- a/lib/hipe/native.mk
+++ b/lib/hipe/native.mk
@@ -1,5 +1,7 @@
-ifndef SECONDARY_BOOTSTRAP
ifeq ($(NATIVE_LIBS_ENABLED),yes)
+ifndef SECONDARY_BOOTSTRAP
ERL_COMPILE_FLAGS += +native
+else
+EBIN = ../boot_ebin
endif
endif
diff --git a/lib/hipe/opt/Makefile b/lib/hipe/opt/Makefile
index 4596201801..8e244ab360 100644
--- a/lib/hipe/opt/Makefile
+++ b/lib/hipe/opt/Makefile
@@ -80,6 +80,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/ppc/Makefile b/lib/hipe/ppc/Makefile
index f24139e34b..83376e8d9d 100644
--- a/lib/hipe/ppc/Makefile
+++ b/lib/hipe/ppc/Makefile
@@ -92,6 +92,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/regalloc/Makefile b/lib/hipe/regalloc/Makefile
index 386f3589c6..c327b443b0 100644
--- a/lib/hipe/regalloc/Makefile
+++ b/lib/hipe/regalloc/Makefile
@@ -94,6 +94,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile
index 48086ec79f..30026831b7 100644
--- a/lib/hipe/rtl/Makefile
+++ b/lib/hipe/rtl/Makefile
@@ -89,6 +89,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core erl_crash.dump
+distclean: clean
+realclean: clean
+
# ----------------------------------------------------
# Special Build Targets
# ----------------------------------------------------
diff --git a/lib/hipe/sparc/Makefile b/lib/hipe/sparc/Makefile
index f25212a89b..e3acecdcb8 100644
--- a/lib/hipe/sparc/Makefile
+++ b/lib/hipe/sparc/Makefile
@@ -92,6 +92,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/util/Makefile b/lib/hipe/util/Makefile
index 85719ec3d6..7d1a7c01c7 100644
--- a/lib/hipe/util/Makefile
+++ b/lib/hipe/util/Makefile
@@ -85,6 +85,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/hipe/x86/Makefile b/lib/hipe/x86/Makefile
index d7d0c7bf5a..aed757246f 100644
--- a/lib/hipe/x86/Makefile
+++ b/lib/hipe/x86/Makefile
@@ -100,6 +100,9 @@ clean:
rm -f $(TARGET_FILES)
rm -f core
+distclean: clean
+realclean: clean
+
$(DOCS)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir, "$(DOCS)"}]' -s init stop
diff --git a/lib/ic/src/ic_noc.erl b/lib/ic/src/ic_noc.erl
index d43d550a52..b3fa3ee96e 100644
--- a/lib/ic/src/ic_noc.erl
+++ b/lib/ic/src/ic_noc.erl
@@ -289,6 +289,9 @@ emit_serv_std(G, N, X) ->
emit(Fd, "terminate(Reason, State) ->\n"),
emit(Fd, " ~p:~p(Reason, State).\n",
[Impl, terminate]),
+ nl(Fd),
+ emit(Fd, "code_change(_OldVsn, State, _Extra) ->\n"),
+ emit(Fd, " {ok, State}.\n"),
nl(Fd), nl(Fd)
end,
Fd.
@@ -304,13 +307,13 @@ gen_end_of_call(G, _N, _X) ->
Fd = ic_genobj:stubfiled(G),
nl(Fd), nl(Fd),
ic_codegen:mcomment_light(Fd, ["Standard gen_server call handle"]),
- emit(Fd, "handle_call(stop, From, State) ->\n"),
+ emit(Fd, "handle_call(stop, _From, State) ->\n"),
emit(Fd, " {stop, normal, ok, State}"),
case get_opt(G, serv_last_call) of
exception ->
emit(Fd, ";\n"),
nl(Fd),
- emit(Fd, "handle_call(Req, From, State) ->\n"),
+ emit(Fd, "handle_call(_Req, _From, State) ->\n"),
emit(Fd, " {reply, ~p, State}.\n",[getCallErr()]);
exit ->
emit(Fd, ".\n"),
@@ -335,7 +338,7 @@ gen_end_of_cast(G, _N, _X) ->
exception ->
emit(Fd, ";\n"),
nl(Fd),
- emit(Fd, "handle_cast(Req, State) ->\n"),
+ emit(Fd, "handle_cast(_Req, State) ->\n"),
emit(Fd, " {reply, ~p, State}.\n",[getCastErr()]);
exit ->
emit(Fd, ".\n"),
@@ -353,12 +356,13 @@ emit_skel_footer(G, N, X) ->
Fd = ic_genobj:stubfiled(G),
nl(Fd), nl(Fd),
ic_codegen:mcomment_light(Fd, ["Standard gen_server handles"]),
- emit(Fd, "handle_info(X, State) ->\n"),
case use_impl_handle_info(G, N, X) of
true ->
+ emit(Fd, "handle_info(X, State) ->\n"),
emit(Fd, " ~p:handle_info(X, State).\n\n",
[list_to_atom(ic_genobj:impl(G))]);
false ->
+ emit(Fd, "handle_info(_X, State) ->\n"),
emit(Fd, " {reply, ~p, State}.\n\n",[getInfoErr()])
end
end,
@@ -402,9 +406,8 @@ get_if_gen(G, N, X) ->
[io_lib:format("Standard Operation: ~p",
[Name])]),
- emit(Fd, "handle_call({~s, ~p, []}, From, State) ->~n",
+ emit(Fd, "handle_call({_~s, ~p, []}, _From, State) ->~n",
[mk_name(G, "Ref"), Name]),
-
emit(Fd, " {reply, ~p, State};~n", [IFC_TKS]),
nl(Fd),
ok;
@@ -479,8 +482,8 @@ gen_head_special(G, N, X) when is_record(X, interface) ->
nl(Fd),
ic_codegen:comment(Fd, "gen server export stuff"),
emit(Fd, "-behaviour(gen_server).\n"),
- ic_codegen:export(Fd, [{init, 1}, {terminate, 2}, {handle_call, 3},
- {handle_cast, 2}, {handle_info, 2}]),
+ ic_codegen:export(Fd, [{init, 1}, {terminate, 2}, {code_change, 3},
+ {handle_call, 3}, {handle_cast, 2}, {handle_info, 2}]),
nl(Fd), nl(Fd),
ic_codegen:mcomment(Fd, ["Object interface functions."]),
nl(Fd), nl(Fd), nl(Fd)
diff --git a/lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src b/lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src
index d5277eb256..53543a5bf0 100644
--- a/lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src
+++ b/lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src
@@ -122,24 +122,33 @@ EBINS = $(ERL_FILES:.erl=.@EMULATOR@)
all: $(PGMS) $(EBINS)
+$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.built_erl
+$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.built_c
+$(OBJS): $(GEN_C_FILES) $(GEN_H_FILES)
+$(EBINS): $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+
clean:
-rm -f $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
-del /F /Q $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
$(PGMS): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.idl
+c_erl_test.built_c: c_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_client}" c_erl_test.idl
+ echo done > c_erl_test.built_c
-$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.idl
+c_erl_test.built_erl: c_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" c_erl_test.idl
+ echo done > c_erl_test.built_erl
-.c@obj@:
+.c@obj@:
$(CC) -c -o $*@obj@ $(CFLAGS) $<
-.erl.@EMULATOR@:
+.erl.@EMULATOR@:
$(ERLC) -I $(IC_INCLUDE_PATH) $<
diff --git a/lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src b/lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src
index 8bc1a907a7..7d32ee4e87 100644
--- a/lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src
+++ b/lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src
@@ -122,25 +122,34 @@ EBINS = $(ERL_FILES:.erl=.@EMULATOR@)
all: $(PGMS) $(EBINS)
+$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.built_erl
+$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.built_c
+$(OBJS): $(GEN_C_FILES) $(GEN_H_FILES)
+$(EBINS): $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+
clean:
-rm -f $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
-del /F /Q $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
$(PGMS): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.idl
+c_erl_test.built_c: c_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_client}" \
"+{user_protocol,my}" c_erl_test.idl
+ echo done > c_erl_test.built_c
-$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.idl
+c_erl_test.built_erl: c_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" c_erl_test.idl
+ echo done > c_erl_test.built_erl
-.c@obj@:
+.c@obj@:
$(CC) -c -o $*@obj@ $(CFLAGS) $<
-.erl.@EMULATOR@:
+.erl.@EMULATOR@:
$(ERLC) -I $(IC_INCLUDE_PATH) $<
diff --git a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src
index 2585341791..19c67734ca 100644
--- a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src
+++ b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src
@@ -122,25 +122,33 @@ EBINS = $(ERL_FILES:.erl=.@EMULATOR@)
all: $(PGMS) $(EBINS)
+$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.built_erl
+$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.built_c
+$(OBJS): $(GEN_C_FILES) $(GEN_H_FILES)
+$(EBINS): $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+
clean:
-rm -f $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
-del /F /Q $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
$(PGMS): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.idl
- $(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_client}" \
- "+{user_protocol,my}" "+{c_timeout,{5000,5000}}" c_erl_test.idl
+c_erl_test.built_c: c_erl_test.idl
+ $(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_client}" c_erl_test.idl
+ echo done > c_erl_test.built_c
-$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.idl
+c_erl_test.built_erl: c_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" c_erl_test.idl
+ echo done > c_erl_test.built_erl
-.c@obj@:
+.c@obj@:
$(CC) -c -o $*@obj@ $(CFLAGS) $<
-.erl.@EMULATOR@:
+.erl.@EMULATOR@:
$(ERLC) -I $(IC_INCLUDE_PATH) $<
diff --git a/lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src b/lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src
index 50cf9d4445..ac53d0a657 100644
--- a/lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src
+++ b/lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src
@@ -122,25 +122,34 @@ EBINS = $(ERL_FILES:.erl=.@EMULATOR@)
all: $(PGMS) $(EBINS)
+$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.built_erl
+$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.built_c
+$(OBJS): $(GEN_C_FILES) $(GEN_H_FILES)
+$(EBINS): $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+
clean:
-rm -f $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
-del /F /Q $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
$(PGMS): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-$(GEN_C_FILES) $(GEN_H_FILES): erl_c_test.idl
+c_erl_test.built_c: erl_c_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_server}" \
"+{scoped_op_calls,true}" erl_c_test.idl
+ echo done > c_erl_test.built_c
# If we have scoped operation calls for C, we must have that for
# Erlang as well, if we use the m_i.erl file for calling the server.
-$(GEN_ERL_FILES) $(GEN_HRL_FILES): erl_c_test.idl
+c_erl_test.built_erl: erl_c_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" \
"+{scoped_op_calls,true}" "+{timeout,true}" erl_c_test.idl
+ echo done > c_erl_test.built_erl
.c@obj@:
$(CC) -c -o $*@obj@ $(CFLAGS) $<
diff --git a/lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src b/lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src
index 6c7701ca50..d23de04944 100644
--- a/lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src
+++ b/lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src
@@ -122,25 +122,34 @@ EBINS = $(ERL_FILES:.erl=.@EMULATOR@)
all: $(PGMS) $(EBINS)
+$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.built_erl
+$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.built_c
+$(OBJS): $(GEN_C_FILES) $(GEN_H_FILES)
+$(EBINS): $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+
clean:
-rm -f $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
-del /F /Q $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
- $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+ $(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES) \
+ c_erl_test.built_erl c_erl_test.built_c
$(PGMS): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-$(GEN_C_FILES) $(GEN_H_FILES): erl_c_test.idl
+c_erl_test.built_c: erl_c_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_server}" \
"+{scoped_op_calls,true}" erl_c_test.idl
+ echo done > c_erl_test.built_c
# If we have scoped operation calls for C, we must have that for
# Erlang as well, if we use the m_i.erl file for calling the server.
-$(GEN_ERL_FILES) $(GEN_HRL_FILES): erl_c_test.idl
+c_erl_test.built_erl: erl_c_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" \
"+{scoped_op_calls,true}" "+{timeout,true}" erl_c_test.idl
+ echo done > c_erl_test.built_erl
.c@obj@:
$(CC) -c -o $*@obj@ $(CFLAGS) $<
diff --git a/lib/ic/test/java_client_erl_server_SUITE_data/Makefile.src b/lib/ic/test/java_client_erl_server_SUITE_data/Makefile.src
index 5e190fe1a5..0d84a62270 100644
--- a/lib/ic/test/java_client_erl_server_SUITE_data/Makefile.src
+++ b/lib/ic/test/java_client_erl_server_SUITE_data/Makefile.src
@@ -69,20 +69,29 @@ EBINS = $(ERL_FILES:.erl=.@EMULATOR@)
all: $(CLASS_FILES) $(EBINS)
+$(GEN_ERL_FILES) $(GEN_HRL_FILES): java_erl_test.built_erl
+$(GEN_JAVA_FILES): java_erl_test.built_java
+$(CLASS_FILES): $(GEN_JAVA_FILES)
+$(EBINS): $(GEN_ERL_FILES) $(GEN_HRL_FILES)
+
clean:
-rm -f $(GEN_JAVA_FILES) $(CLASS_FILES) \
- $(GEN_ERL_FILES) $(GEN_HRL_FILES) $(EBINS)
+ $(GEN_ERL_FILES) $(GEN_HRL_FILES) $(EBINS) \
+ java_erl_test.built_erl java_erl_test.built_java
-del /F /Q $(GEN_JAVA_FILES) $(CLASS_FILES) \
- $(GEN_ERL_FILES) $(GEN_HRL_FILES) $(EBINS)
+ $(GEN_ERL_FILES) $(GEN_HRL_FILES) $(EBINS) \
+ java_erl_test.built_erl java_erl_test.built_java
-$(GEN_JAVA_FILES) : java_erl_test.idl
+java_erl_test.built_java: java_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,java}" java_erl_test.idl
+ echo done > java_erl_test.built_java
$(CLASS_FILES) : $(JAVA_FILES)
$(JAVAC) -classpath $(CLASSPATH) $(JAVA_FILES)
-$(GEN_ERL_FILES) $(GEN_HRL_FILES): java_erl_test.idl
+java_erl_test.built_erl: java_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" java_erl_test.idl
+ echo done > java_erl_test.built_erl
.erl.@EMULATOR@:
$(ERLC) -I $(IC_INCLUDE_PATH) $<
diff --git a/lib/ic/vsn.mk b/lib/ic/vsn.mk
index e21fc8fbb2..fc1475974e 100644
--- a/lib/ic/vsn.mk
+++ b/lib/ic/vsn.mk
@@ -1 +1 @@
-IC_VSN = 4.2.29
+IC_VSN = 4.2.30
diff --git a/lib/inets/doc/src/Makefile b/lib/inets/doc/src/Makefile
index 53d505b102..c4152a1d72 100644
--- a/lib/inets/doc/src/Makefile
+++ b/lib/inets/doc/src/Makefile
@@ -48,6 +48,7 @@ XML_REF3_FILES = \
inets.xml \
ftp.xml \
tftp.xml \
+ http_uri.xml\
httpc.xml\
httpd.xml \
httpd_conf.xml \
diff --git a/lib/inets/doc/src/book.xml b/lib/inets/doc/src/book.xml
index 7da0abd98f..51cbb2d963 100644
--- a/lib/inets/doc/src/book.xml
+++ b/lib/inets/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/fascicules.xml b/lib/inets/doc/src/fascicules.xml
index 101e745722..ea3b988882 100644
--- a/lib/inets/doc/src/fascicules.xml
+++ b/lib/inets/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/inets/doc/src/ftp_client.xml b/lib/inets/doc/src/ftp_client.xml
index 7f62a453a6..b44674d997 100644
--- a/lib/inets/doc/src/ftp_client.xml
+++ b/lib/inets/doc/src/ftp_client.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/http_uri.xml b/lib/inets/doc/src/http_uri.xml
new file mode 100644
index 0000000000..bd31ae42d2
--- /dev/null
+++ b/lib/inets/doc/src/http_uri.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2012</year><year>2012</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>http_uri</title>
+ <prepared></prepared>
+ <responsible></responsible>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+
+ <module>http_uri</module>
+ <modulesummary>URI utility module</modulesummary>
+
+ <description>
+ <p>This module provides utility functions for working with URIs,
+ according to RFC 3986. </p>
+
+ </description>
+
+ <section>
+ <title>COMMON DATA TYPES </title>
+ <p>Type definitions that are used more than once in
+ this module:</p>
+ <code type="none"><![CDATA[
+boolean() = true | false
+string() = list of ASCII characters
+ ]]></code>
+
+ </section>
+
+ <section>
+ <title>URI DATA TYPES </title>
+ <p>Type definitions that are related to URI:</p>
+ <p>For more information about URI, see RFC 3986. </p>
+
+ <code type="none"><![CDATA[
+uri() = string() - Syntax according to the URI definition in rfc 3986, ex: "http://www.erlang.org/"
+user_info() = string()
+scheme() = atom() - Example: http, https
+host() = string()
+port() = pos_integer()
+path() = string() - Representing a file path or directory path
+query() = string()
+ ]]></code>
+
+ <marker id="scheme_defaults"></marker>
+ </section>
+
+ <funcs>
+ <func>
+ <name>scheme_defaults() -> SchemeDefaults</name>
+ <fsummary>A list of scheme and their default ports</fsummary>
+ <type>
+ <v>SchemeDefaults = [{scheme(), default_scheme_port_number()}] </v>
+ <v>default_scheme_port_number() = pos_integer()</v>
+ </type>
+ <desc>
+ <p>This function provides a list of the scheme and their default
+ port numbers currently supported (by default) by this utility. </p>
+
+ <marker id="parse"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>parse(URI) -> {ok, Result} | {error, Reason}</name>
+ <name>parse(URI, Options) -> {ok, Result} | {error, Reason}</name>
+ <fsummary>Parse an URI</fsummary>
+ <type>
+ <v>URI = uri() </v>
+ <v>Options = [Option] </v>
+ <v>Option = {ipv6_host_with_brackets, boolean()} |
+ {scheme_defaults, scheme_defaults()}]</v>
+ <v>Result = {Scheme, UserInfo, Host, Port, Path, Query}</v>
+ <v>UserInfo = user_info()</v>
+ <v>Host = host()</v>
+ <v>Port = pos_integer()</v>
+ <v>Path = path()</v>
+ <v>Query = query()</v>
+ <v>Reason = term() </v>
+ </type>
+ <desc>
+ <p>This function is used to parse an URI. If no scheme defaults
+ are provided, the value of
+ <seealso marker="#scheme_defaults">scheme_defaults</seealso>
+ function will be used. </p>
+
+ <p>Note that when parsing an URI with an unknown scheme (that is,
+ a scheme not found in the scheme defaults) a port number must be
+ provided or else the parsing will fail. </p>
+
+ <marker id="encode"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>encode(URI) -> HexEncodedURI</name>
+
+ <fsummary>Hex encode an URI</fsummary>
+ <type>
+ <v>URI = uri()</v>
+ <v>HexEncodedURI = string() - Hex encoded uri</v>
+ </type>
+
+ <desc>
+ <p>Hex encode an URI. </p>
+
+ <marker id="decode"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>decode(HexEncodedURI) -> URI</name>
+
+ <fsummary>Decode a hex encoded URI</fsummary>
+ <type>
+ <v>HexEncodedURI = string() - A possibly hex encoded uri</v>
+ <v>URI = uri()</v>
+ </type>
+
+ <desc>
+ <p>Decode a possibly hex encoded URI. </p>
+
+ </desc>
+ </func>
+
+ </funcs>
+
+<!--
+ <section>
+ <title>SEE ALSO</title>
+ <p>RFC 2616, <seealso marker="inets">inets(3)</seealso>,
+ <seealso marker="kernel:gen_tcp">gen_tcp(3)</seealso>,
+ <seealso marker="ssl:ssl">ssl(3)</seealso>
+ </p>
+ </section>
+-->
+
+</erlref>
diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml
index 48a2089605..70c845bade 100644
--- a/lib/inets/doc/src/httpc.xml
+++ b/lib/inets/doc/src/httpc.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2004</year><year>2011</year>
+ <year>2004</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -541,6 +541,35 @@ apply(Module, Function, [ReplyInfo | Args])
default value of the <c>max_sessions</c> option. </p>
</note>
+ <marker id="get_options"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>get_options(OptionItems) -> {ok, Values} | {error, Reason}</name>
+ <name>get_options(OptionItems, Profile) -> {ok, Values} | {error, Reason}</name>
+ <fsummary>Gets the currently used options.</fsummary>
+ <type>
+ <v>OptionItems = all | [option_item()]</v>
+ <v>option_item() = proxy |
+ max_sessions |
+ keep_alive_timeout |
+ max_keep_alive_length |
+ pipeline_timeout |
+ max_pipeline_length |
+ cookies |
+ ipfamily |
+ ip |
+ port |
+ socket_opts |
+ verbose</v>
+ <v>Profile = profile() | pid() (when started <c>stand_alone</c>)</v>
+ <v>Values = [{option_item(), term()}]</v>
+ <v>Reason = term() </v>
+ </type>
+ <desc>
+ <p>Retrieves the options currently used by the client.</p>
+
<marker id="stream_next"></marker>
</desc>
</func>
diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml
index f88099a82e..7e21229fcf 100644
--- a/lib/inets/doc/src/httpd.xml
+++ b/lib/inets/doc/src/httpd.xml
@@ -55,14 +55,14 @@
<section>
<title>ERLANG HTTP SERVER SERVICE START/STOP </title>
<p>A web server can be configured to start when starting the inets
- application or started dynamically in runtime by calling the
- Inets application API <c>inets:start(httpd, ServiceConfig)</c>, or
- <c>inets:start(httpd, ServiceConfig, How)</c>,
- see <seealso marker="inets">inets(3)</seealso> Below follows a
- description of the available configuration options, also called
- properties.</p>
-
- <marker id="file_prop"></marker>
+ application or started dynamically in runtime by calling the
+ Inets application API <c>inets:start(httpd, ServiceConfig)</c>, or
+ <c>inets:start(httpd, ServiceConfig, How)</c>,
+ see <seealso marker="inets">inets(3)</seealso> Below follows a
+ description of the available configuration options, also called
+ properties.</p>
+
+ <marker id="props_file"></marker>
<p><em>File properties</em></p>
<p>When the web server is started
@@ -76,21 +76,25 @@
list.</p>
<taglist>
+ <marker id="prop_proplist_file"></marker>
<tag>{proplist_file, path()}</tag>
<item>
- If this property is defined inets will expect to find
- all other properties defined in this file. Note that the
- file must include all properties listed under mandatory
- properties. </item>
- <tag>{file, path()}</tag>
+ <p>If this property is defined inets will expect to find
+ all other properties defined in this file. Note that the
+ file must include all properties listed under mandatory
+ properties. </p>
+ </item>
- <item> If this property is defined
- inets will expect to find all other properties defined in this
- file, that uses Apache like syntax. Note that the file must
- include all properties listed under mandatory properties. The
- Apache like syntax is the property, written as one word where
- each new word begins with a capital, followed by a white-space
- followed by the value followed by a new line. Ex:
+ <marker id="prop_file"></marker>
+ <tag>{file, path()}</tag>
+ <item>
+ <p>If this property is defined inets will expect to find all
+ other properties defined in this file, that uses Apache like
+ syntax. Note that the file must include all properties listed
+ under mandatory properties. The Apache like syntax is the property,
+ written as one word where each new word begins with a capital,
+ followed by a white-space followed by the value followed by a
+ new line. Ex: </p>
<code>
{server_root, "/urs/local/www"} -> ServerRoot /usr/local/www
@@ -114,40 +118,51 @@
<p>The properties proplist_file and file are mutually exclusive.</p>
</note>
- <marker id="mand_prop"></marker>
+ <marker id="props_mand"></marker>
<p><em>Mandatory properties</em></p>
<taglist>
+ <marker id="prop_port"></marker>
<tag>{port, integer()} </tag>
<item>
- The port that the HTTP server shall listen on.
- If zero is specified as port, an arbitrary available port
- will be picked and you can use the httpd:info/2 function to find
- out which port was picked. </item>
+ <p>The port that the HTTP server shall listen on.
+ If zero is specified as port, an arbitrary available port
+ will be picked and you can use the httpd:info/2 function to find
+ out which port was picked. </p>
+ </item>
+
+ <marker id="prop_server_name"></marker>
<tag>{server_name, string()} </tag>
<item>
- The name of your server, normally a fully qualified domain
- name.
+ <p>The name of your server, normally a fully qualified domain name. </p>
</item>
+
+ <marker id="prop_server_root"></marker>
<tag>{server_root, path()} </tag>
<item>
- Defines the servers home directory where log files etc can
+ <p>Defines the servers home directory where log files etc can
be stored. Relative paths specified in other properties refer
- to this directory.</item>
+ to this directory. </p>
+ </item>
+
+ <marker id="prop_doc_root"></marker>
<tag>{document_root, path()}</tag>
<item>
Defines the top directory for the documents that
- are available on the HTTP server.</item>
+ are available on the HTTP server.
+ </item>
</taglist>
- <marker id="comm_prop"></marker>
+ <marker id="props_comm"></marker>
<p><em>Communication properties</em> </p>
<taglist>
+ <marker id="prop_bind_address"></marker>
<tag>{bind_address, ip_address() | hostname() | any} </tag>
<item>
- Defaults to <c>any</c>. Note that <c>any</c> is denoted <em>*</em>
- in the apache like configuration file.
+ <p>Defaults to <c>any</c>. Note that <c>any</c> is denoted <em>*</em>
+ in the apache like configuration file. </p>
</item>
+ <marker id="prop_socket_type"></marker>
<tag>{socket_type, ip_comm | ssl | essl}</tag>
<item>
<p>When using ssl, there are currently only one alternative.
@@ -156,6 +171,7 @@
<p>Defaults to <c>ip_comm</c>. </p>
</item>
+ <marker id="prop_ipfamily"></marker>
<tag>{ipfamily, inet | inet6 | inet6fb4}</tag>
<item>
<p>Defaults to <c>inet6fb4. </c> </p>
@@ -165,74 +181,93 @@
</taglist>
+ <marker id="props_api_modules"></marker>
<p><em>Erlang Web server API modules</em> </p>
<taglist>
+ <marker id="prop_modules"></marker>
<tag>{modules, [atom()]} </tag>
<item>
- Defines which modules the HTTP server will use to handle
+ <p>Defines which modules the HTTP server will use to handle
requests. Defaults to: <c>[mod_alias, mod_auth, mod_esi,
mod_actions, mod_cgi, mod_dir, mod_get, mod_head, mod_log,
mod_disk_log] </c>
Note that some mod-modules are dependent on
others, so the order can not be entirely arbitrary. See the
<seealso marker="http_server"> Inets Web server Modules in the
- Users guide</seealso> for more information.
+ Users guide</seealso> for more information. </p>
</item>
- </taglist>
+ </taglist>
- <marker id="limit_prop"></marker>
+ <marker id="props_limit"></marker>
<p><em>Limit properties</em> </p>
<taglist>
+ <marker id="prop_disable_chunked_encoding"></marker>
<tag>{disable_chunked_transfer_encoding_send, boolean()}</tag>
<item>
- This property allows you to disable chunked
+ <p>This property allows you to disable chunked
transfer-encoding when sending a response to a HTTP/1.1
- client, by default this is false.</item>
+ client, by default this is false. </p>
+ </item>
+ <marker id="prop_keep_alive"></marker>
<tag>{keep_alive, boolean()}</tag>
<item>
- Instructs the server whether or not to use persistent
+ <p>Instructs the server whether or not to use persistent
connections when the client claims to be HTTP/1.1
- compliant, default is true.</item>
+ compliant, default is true. </p>
+ </item>
+ <marker id="prop_keep_alive_timeout"></marker>
<tag>{keep_alive_timeout, integer()}</tag>
<item>
- The number of seconds the server will wait for a
+ <p>The number of seconds the server will wait for a
subsequent request from the client before closing the
- connection. Default is 150.</item>
+ connection. Default is 150. </p>
+ </item>
+ <marker id="prop_max_body_size"></marker>
<tag>{max_body_size, integer()}</tag>
<item>
- Limits the size of the message body of HTTP request.
- By the default there is no limit.</item>
+ <p>Limits the size of the message body of HTTP request.
+ By the default there is no limit. </p>
+ </item>
+ <marker id="prop_max_clients"></marker>
<tag>{max_clients, integer()}</tag>
<item>
- Limits the number of simultaneous requests that can be
- supported. Defaults to 150. </item>
+ <p>Limits the number of simultaneous requests that can be
+ supported. Defaults to 150. </p>
+ </item>
+ <marker id="prop_max_header_size"></marker>
<tag>{max_header_size, integer()}</tag>
<item>
- Limits the size of the message header of HTTP request.
- Defaults to 10240.
+ <p>Limits the size of the message header of HTTP request.
+ Defaults to 10240. </p>
</item>
+ <marker id="prop_max_uri"></marker>
<tag>{max_uri, integer()}</tag>
<item>
- Limits the size of the HTTP request URI. By
- default there is no limit.</item>
+ <p>Limits the size of the HTTP request URI. By
+ default there is no limit. </p>
+ </item>
+ <marker id="prop_max_keep_alive_req"></marker>
<tag>{max_keep_alive_requests, integer()}</tag>
- <item> The number of request that a client can do on one
+ <item>
+ <p>The number of request that a client can do on one
connection. When the server has responded to the number of
requests defined by max_keep_alive_requests the server close the
connection. The server will close it even if there are queued
- request. Defaults to no limit.</item>
+ request. Defaults to no limit. </p>
+ </item>
</taglist>
- <marker id="admin_prop"></marker>
+ <marker id="props_admin"></marker>
<p><em>Administrative properties</em></p>
<taglist>
+ <marker id="prop_mime_types"></marker>
<tag>{mime_types, [{MimeType, Extension}] | path()}</tag>
<item>
<p>Where MimeType = string() and Extension = string().
@@ -250,19 +285,43 @@ text/plain asc txt
<p>Defaults to [{"html","text/html"},{"htm","text/html"}]</p>
</item>
+ <marker id="prop_mime_type"></marker>
<tag>{mime_type, string()}</tag>
-
<item>
- When the server is asked to provide a document type which
+ <p>When the server is asked to provide a document type which
cannot be determined by the MIME Type Settings, the server will
- use this default type. </item>
+ use this default type. </p>
+ </item>
+ <marker id="prop_server_admin"></marker>
<tag>{server_admin, string()}</tag>
<item>
- ServerAdmin defines the email-address of the server
+ <p>ServerAdmin defines the email-address of the server
administrator, to be included in any error messages returned by
- the server.</item>
+ the server. </p>
+ </item>
+ <marker id="prop_server_tokens"></marker>
+ <tag>{server_tokens, prod|major|minor|minimal|os|full|{private, string()}}</tag>
+ <item>
+ <p>ServerTokens defines how the value of the server header
+ should look. </p>
+ <p>Example: Assuming the version of inets is 5.8.1,
+ here is what the server header string could look like for
+ the different values of server-tokens: </p>
+ <pre>
+prod "inets"
+major "inets/5"
+minor "inets/5.8"
+minimal "inets/5.8.1"
+os "inets/5.8.1 (unix)"
+full "inets/5.8.1 (unix/linux) OTP/R15B"
+{private, "foo/bar"} "foo/bar"
+ </pre>
+ <p>By default, the value is as before, which is <c>minimal</c>. </p>
+ </item>
+
+ <marker id="prop_log_format"></marker>
<tag>{log_format, common | combined}</tag>
<item>
<p>Defines if access logs should be written according to the common
@@ -307,8 +366,9 @@ bytes
<p>This affects the access logs written by mod_log and mod_disk_log.
</p>
- </item>
-
+ </item>
+
+ <marker id="prop_elog_format"></marker>
<tag>{error_log_format, pretty | compact}</tag>
<item>
<p>Defaults to pretty. If the error log is meant to be read
@@ -330,63 +390,77 @@ bytes
</taglist>
- <marker id="ssl_prop"></marker>
+ <marker id="props_ssl"></marker>
<p><em>ssl properties</em></p>
<taglist>
+ <marker id="prop_ssl_ca_cert_file"></marker>
<tag>{ssl_ca_certificate_file, path()}</tag>
<item>
- Used as cacertfile option in ssl:listen/2 see
- <seealso marker="ssl:ssl">ssl(3)</seealso> </item>
+ <p>Used as cacertfile option in ssl:listen/2 see
+ <seealso marker="ssl:ssl">ssl(3)</seealso>. </p>
+ </item>
+ <marker id="prop_ssl_cert_file"></marker>
<tag>{ssl_certificate_file, path()}</tag>
<item>
- Used as certfile option in ssl:listen/2 see
- <seealso marker="ssl:ssl">ssl(3)</seealso>
+ <p>Used as certfile option in ssl:listen/2 see
+ <seealso marker="ssl:ssl">ssl(3)</seealso>. </p>
</item>
+ <marker id="prop_ssl_ciphers"></marker>
<tag>{ssl_ciphers, list()}</tag>
<item>
- Used as ciphers option in ssl:listen/2 see
- <seealso marker="ssl:ssl">ssl(3)</seealso>
+ <p>Used as ciphers option in ssl:listen/2 see
+ <seealso marker="ssl:ssl">ssl(3)</seealso>. </p>
</item>
+ <marker id="prop_ssl_verify_client"></marker>
<tag>{ssl_verify_client, integer()}</tag>
<item>
- Used as verify option in ssl:listen/2 see
- <seealso marker="ssl:ssl">ssl(3)</seealso> </item>
+ <p>Used as verify option in ssl:listen/2 see
+ <seealso marker="ssl:ssl">ssl(3)</seealso>. </p>
+ </item>
+ <marker id="prop_ssl_verify_depth"></marker>
<tag>{ssl_verify_depth, integer()}</tag>
<item>
- Used as depth option in ssl:listen/2 see
- <seealso marker="ssl:ssl">ssl(3)</seealso> </item>
+ <p>Used as depth option in ssl:listen/2 see
+ <seealso marker="ssl:ssl">ssl(3)</seealso>. </p>
+ </item>
+ <marker id="prop_ssl_passwd_callback_funct"></marker>
<tag>{ssl_password_callback_function, atom()}</tag>
<item>
- Used together with ssl_password_callback_module
+ <p>Used together with ssl_password_callback_module
to retrieve a value to use as password option to ssl:listen/2
- see <seealso marker="ssl:ssl">ssl(3)</seealso>
+ see <seealso marker="ssl:ssl">ssl(3)</seealso>. </p>
</item>
+ <marker id="prop_ssl_passwd_callback_args"></marker>
<tag>{ssl_password_callback_arguments, list()}</tag>
<item>
- Used together with ssl_password_callback_function to supply a
+ <p>Used together with ssl_password_callback_function to supply a
list of arguments to the callback function. If not specified
- the callback function will be assumed to have arity 0. </item>
+ the callback function will be assumed to have arity 0. </p>
+ </item>
+ <marker id="prop_ssl_passwd_callback_mod"></marker>
<tag>{ssl_password_callback_module, atom()}</tag>
<item>
- Used together with ssl_password_callback_function
+ <p>Used together with ssl_password_callback_function
to retrieve a value to use as password option to ssl:listen/2
- see <seealso marker="ssl:ssl">ssl(3)</seealso></item>
+ see <seealso marker="ssl:ssl">ssl(3)</seealso>. </p>
+ </item>
</taglist>
- <marker id="alias_prop"></marker>
+ <marker id="props_alias"></marker>
<p><em>URL aliasing properties - requires mod_alias</em></p>
<taglist>
+ <marker id="prop_alias"></marker>
<tag>{alias, {Alias, RealName}}</tag>
-
- <item> Where Alias = string() and RealName = string().
+ <item>
+ <p>Where Alias = string() and RealName = string().
The Alias property allows documents to be stored in the local file
system instead of the document_root location. URLs with a path that
begins with url-path is mapped to local files that begins with
@@ -395,11 +469,13 @@ bytes
<code>{alias, {"/image", "/ftp/pub/image"}</code>
and an access to http://your.server.org/image/foo.gif would refer to
- the file /ftp/pub/image/foo.gif.</item>
+ the file /ftp/pub/image/foo.gif. </p>
+ </item>
- <tag>{re_write, {Re, Replacement}}</tag>
-
- <item> Where Re = string() and Replacement = string().
+ <marker id="prop_re_write"></marker>
+ <tag>{re_write, {Re, Replacement}}</tag>
+ <item>
+ <p>Where Re = string() and Replacement = string().
The ReWrite property allows documents to be stored in the local file
system instead of the document_root location. URLs are rewritten
by re:replace/3 to produce a path in the local filesystem.
@@ -419,13 +495,13 @@ bytes
Beware of trailing space in Replacement that will be used.
If you must have a space in Re use e.g the character encoding
- <code>\040</code> see <seealso marker="stdlib:re">re(3)</seealso>.
+ <code>\040</code> see <seealso marker="stdlib:re">re(3)</seealso>. </p>
</item>
- <tag>{directory_index, [string()]}</tag>
-
+ <marker id="prop_dir_idx"></marker>
+ <tag>{directory_index, [string()]}</tag>
<item>
- DirectoryIndex specifies a list of resources to look for
+ <p>DirectoryIndex specifies a list of resources to look for
if a client requests a directory using a / at the end of the
directory name. file depicts the name of a file in the
directory. Several files may be given, in which case the server
@@ -436,70 +512,79 @@ bytes
and access to http://your.server.org/docs/ would return
http://your.server.org/docs/index.html or
http://your.server.org/docs/welcome.html if index.html do not
- exist.
+ exist. </p>
</item>
</taglist>
- <marker id="cgi_prop"></marker>
+ <marker id="props_cgi"></marker>
<p><em>CGI properties - requires mod_cgi</em></p>
<taglist>
+ <marker id="prop_script_alias"></marker>
<tag>{script_alias, {Alias, RealName}}</tag>
- <item> Where Alias = string() and RealName = string().
+ <item>
+ <p>Where Alias = string() and RealName = string().
Has the same behavior as the Alias property, except that
it also marks the target directory as containing CGI
scripts. URLs with a path beginning with url-path are mapped to
scripts beginning with directory-filename, for example:
- <code> {script_alias, {"/cgi-bin/", "/web/cgi-bin/"}</code>
+ <code>{script_alias, {"/cgi-bin/", "/web/cgi-bin/"}</code>
and an access to http://your.server.org/cgi-bin/foo would cause
- the server to run the script /web/cgi-bin/foo.
+ the server to run the script /web/cgi-bin/foo. </p>
</item>
+ <marker id="prop_script_re_write"></marker>
<tag>{script_re_write, {Re, Replacement}}</tag>
- <item> Where Re = string() and Replacement = string().
+ <item>
+ <p>Where Re = string() and Replacement = string().
Has the same behavior as the ReWrite property, except that
it also marks the target directory as containing CGI
scripts. URLs with a path beginning with url-path are mapped to
scripts beginning with directory-filename, for example:
- <code> {script_re_write, {"^/cgi-bin/(\\d+)/", "/web/\\1/cgi-bin/"}</code>
+ <code>{script_re_write, {"^/cgi-bin/(\\d+)/", "/web/\\1/cgi-bin/"}</code>
and an access to http://your.server.org/cgi-bin/17/foo would cause
- the server to run the script /web/17/cgi-bin/foo.
+ the server to run the script /web/17/cgi-bin/foo. </p>
</item>
+ <marker id="prop_script_nocache"></marker>
<tag>{script_nocache, boolean()}</tag>
-
<item>
- If ScriptNoCache is set to true the HTTP server will by
+ <p>If ScriptNoCache is set to true the HTTP server will by
default add the header fields necessary to prevent proxies from
caching the page. Generally this is something you want. Defaults
- to false.</item>
+ to false. </p>
+ </item>
+ <marker id="prop_script_timeout"></marker>
<tag>{script_timeout, integer()}</tag>
-
<item>
- The time in seconds the web server will wait between each
+ <p>The time in seconds the web server will wait between each
chunk of data from the script. If the CGI-script not delivers
any data before the timeout the connection to the client will be
- closed. Defaults to 15. </item>
+ closed. Defaults to 15. </p>
+ </item>
+ <marker id="prop_action"></marker>
<tag>{action, {MimeType, CgiScript}} - requires mod_action</tag>
-
- <item>Where MimeType = string() and CgiScript = string().
+ <item>
+ <p>Where MimeType = string() and CgiScript = string().
Action adds an action, which will activate a cgi-script
whenever a file of a certain mime-type is requested. It
propagates the URL and file path of the requested document using
the standard CGI PATH_INFO and PATH_TRANSLATED environment
variables.
- <code> {action, {"text/plain", "/cgi-bin/log_and_deliver_text"}
- </code>
+
+ <code>{action, {"text/plain", "/cgi-bin/log_and_deliver_text"}</code>
+ </p>
</item>
+ <marker id="prop_script"></marker>
<tag>{script, {Method, CgiScript}} - requires mod_action</tag>
-
- <item>Where Method = string() and CgiScript = string().
+ <item>
+ <p>Where Method = string() and CgiScript = string().
Script adds an action, which will activate a cgi-script
whenever a file is requested using a certain HTTP method. The
method is either GET or POST as defined in RFC 1945. It
@@ -507,18 +592,19 @@ bytes
the standard CGI PATH_INFO and PATH_TRANSLATED environment
variables.
- <code> {script, {"PUT", "/cgi-bin/put"}
- </code>
+ <code>{script, {"PUT", "/cgi-bin/put"}</code>
+ </p>
</item>
</taglist>
- <marker id="esi_prop"></marker>
+ <marker id="props_esi"></marker>
<p><em>ESI properties - requires mod_esi</em></p>
<taglist>
- <tag>{erl_script_alias, {URLPath, [AllowedModule]}}</tag>
-
- <item>Where URLPath = string() and AllowedModule = atom().
+ <marker id="prop_esi_alias"></marker>
+ <tag>{erl_script_alias, {URLPath, [AllowedModule]}}</tag>
+ <item>
+ <p>Where URLPath = string() and AllowedModule = atom().
erl_script_alias marks all URLs matching url-path as erl
scheme scripts. A matching URL is mapped into a specific module
and function. For example:
@@ -531,140 +617,151 @@ bytes
would refer to httpd_example:yahoo/3 or, if that did not exist,
httpd_example:yahoo/2 and
http://your.server.org/cgi-bin/example/other:yahoo would
- not be allowed to execute.
+ not be allowed to execute. </p>
</item>
+ <marker id="prop_esi_nocache"></marker>
<tag>{erl_script_nocache, boolean()}</tag>
-
<item>
- If erl_script_nocache is set to true the server will add
+ <p>If erl_script_nocache is set to true the server will add
http header fields that prevents proxies from caching the
page. This is generally a good idea for dynamic content, since
- the content often vary between each request. Defaults to false.
+ the content often vary between each request.
+ Defaults to false. </p>
</item>
+ <marker id="prop_esi_timeout"></marker>
<tag>{erl_script_timeout, integer()}</tag>
-
<item>
- If erl_script_timeout sets the time in seconds the server will
+ <p>If erl_script_timeout sets the time in seconds the server will
wait between each chunk of data to be delivered through
mod_esi:deliver/2. Defaults to 15. This is only relevant
- for scripts that uses the erl scheme.
+ for scripts that uses the erl scheme. </p>
</item>
+ <marker id="prop_esi_timeout"></marker>
<tag>{eval_script_alias, {URLPath, [AllowedModule]}}</tag>
-
- <item>Where URLPath = string() and AllowedModule = atom().
+ <item>
+ <p>Where URLPath = string() and AllowedModule = atom().
Same as erl_script_alias but for scripts
- using the eval scheme. Note that this is only supported
- for backwards compatibility. The eval scheme is deprecated.</item>
+ using the eval scheme. Note that this is only supported
+ for backwards compatibility. The eval scheme is deprecated. </p>
+ </item>
</taglist>
- <marker id="log_prop"></marker>
+ <marker id="props_log"></marker>
<p><em>Log properties - requires mod_log</em></p>
<taglist>
+ <marker id="prop_elog"></marker>
<tag>{error_log, path()}</tag>
-
<item>
- Defines the filename of the error log file to be used to log
+ <p>Defines the filename of the error log file to be used to log
server errors. If the filename does not begin with a slash (/)
- it is assumed to be relative to the server_root</item>
+ it is assumed to be relative to the server_root. </p>
+ </item>
+ <marker id="prop_slog"></marker>
<tag>{security_log, path()}</tag>
-
<item>
- Defines the filename of the access log file to be used to
- log security events. If the filename does not begin with a slash
- (/) it is assumed to be relative to the server_root.
+ <p>Defines the filename of the access log file to be used to
+ log security events. If the filename does not begin with a slash
+ (/) it is assumed to be relative to the server_root. </p>
</item>
+ <marker id="prop_tlog"></marker>
<tag>{transfer_log, path()}</tag>
-
<item>
- Defines the filename of the access log file to be used to
+ <p>Defines the filename of the access log file to be used to
log incoming requests. If the filename does not begin with a
- slash (/) it is assumed to be relative to the server_root.
+ slash (/) it is assumed to be relative to the server_root. </p>
</item>
</taglist>
- <marker id="dlog_prop"></marker>
+ <marker id="props_dlog"></marker>
<p><em>Disk Log properties - requires mod_disk_log</em></p>
<taglist>
+ <marker id="prop_dlog_format"></marker>
<tag>{disk_log_format, internal | external}</tag>
-
<item>
- Defines the file-format of the log files see disk_log for
+ <p>Defines the file-format of the log files see disk_log for
more information. If the internal file-format is used, the
logfile will be repaired after a crash. When a log file is
repaired data might get lost. When the external file-format is
used httpd will not start if the log file is broken. Defaults to
- external.
+ external. </p>
</item>
+ <marker id="prop_edlog"></marker>
<tag>{error_disk_log, internal | external}</tag>
-
<item>
- Defines the filename of the (disk_log(3)) error log file
+ <p>Defines the filename of the (disk_log(3)) error log file
to be used to log server errors. If the filename does not begin
- with a slash (/) it is assumed to be relative to the server_root.
+ with a slash (/) it is assumed to be relative to the server_root. </p>
</item>
+ <marker id="prop_edlog_size"></marker>
<tag>{error_disk_log_size, {MaxBytes, MaxFiles}}</tag>
-
- <item>Where MaxBytes = integer() and MaxFiles = integer().
+ <item>
+ <p>Where MaxBytes = integer() and MaxFiles = integer().
Defines the properties of the (disk_log(3)) error log
file. The disk_log(3) error log file is of type wrap log and
max-bytes will be written to each file and max-files will be
- used before the first file is truncated and reused. </item>
+ used before the first file is truncated and reused. </p>
+ </item>
+ <marker id="prop_sdlog"></marker>
<tag>{security_disk_log, path()}</tag>
-
<item>
- Defines the filename of the (disk_log(3)) access log file
+ <p>Defines the filename of the (disk_log(3)) access log file
which logs incoming security events i.e authenticated
requests. If the filename does not begin with a slash (/) it
- is assumed to be relative to the server_root.
+ is assumed to be relative to the server_root. </p>
</item>
+ <marker id="prop_sdlog_size"></marker>
<tag>{security_disk_log_size, {MaxBytes, MaxFiles}}</tag>
-
- <item>Where MaxBytes = integer() and MaxFiles = integer().
+ <item>
+ <p>Where MaxBytes = integer() and MaxFiles = integer().
Defines the properties of the disk_log(3) access log
file. The disk_log(3) access log file is of type wrap log and
max-bytes will be written to each file and max-files will be
- used before the first file is truncated and reused.</item>
+ used before the first file is truncated and reused. </p>
+ </item>
- <tag>{transfer_disk_log, path()}</tag>
-
+ <marker id="prop_tdlog"></marker>
+ <tag>{transfer_disk_log, path()}</tag>
<item>
- Defines the filename of the (disk_log(3)) access log file
+ <p>Defines the filename of the (disk_log(3)) access log file
which logs incoming requests. If the filename does not begin
with a slash (/) it is assumed to be relative to the
- server_root.
+ server_root. </p>
</item>
+ <marker id="prop_tdlog_size"></marker>
<tag>{transfer_disk_log_size, {MaxBytes, MaxFiles}}</tag>
-
- <item>Where MaxBytes = integer() and MaxFiles = integer().
+ <item>
+ <p>Where MaxBytes = integer() and MaxFiles = integer().
Defines the properties of the disk_log(3) access log
file. The disk_log(3) access log file is of type wrap log and
max-bytes will be written to each file and max-files will be
- used before the first file is truncated and reused.</item>
+ used before the first file is truncated and reused. </p>
+ </item>
</taglist>
- <marker id="auth_prop"></marker>
+ <marker id="props_auth"></marker>
<p><em>Authentication properties - requires mod_auth</em></p>
+ <marker id="prop_dri"></marker>
<p><em>{directory, {path(), [{property(), term()}]}}</em></p>
- <marker id="dir_prop"></marker>
+ <marker id="props_dir"></marker>
<p>Here follows the valid properties for directories </p>
<taglist>
+ <marker id="prop_allow_from"></marker>
<tag>{allow_from, all | [RegxpHostString]}</tag>
-
<item>
- Defines a set of hosts which should be granted access to a
+ <p>Defines a set of hosts which should be granted access to a
given directory.
For example:
@@ -672,34 +769,36 @@ bytes
<code>{allow_from, ["123.34.56.11", "150.100.23"] </code>
The host 123.34.56.11 and all machines on the 150.100.23
- subnet are allowed access.</item>
+ subnet are allowed access. </p>
+ </item>
+ <marker id="prop_deny_from"></marker>
<tag>{deny_from, all | [RegxpHostString]}</tag>
-
<item>
- Defines a set of hosts
+ <p>Defines a set of hosts
which should be denied access to a given directory.
For example:
<code>{deny_from, ["123.34.56.11", "150.100.23"] </code>
The host 123.34.56.11 and all machines on the 150.100.23
- subnet are not allowed access.</item>
+ subnet are not allowed access. </p>
+ </item>
+ <marker id="prop_auth_type"></marker>
<tag>{auth_type, plain | dets | mnesia}</tag>
-
<item>
- Sets the type of authentication database that is used for the
+ <p>Sets the type of authentication database that is used for the
directory.The key difference between the different methods is
that dynamic data can be saved when Mnesia and Dets is used.
This property is called AuthDbType in the Apache like
- configuration files.
+ configuration files. </p>
</item>
+ <marker id="prop_auth_user_file"></marker>
<tag>{auth_user_file, path()}</tag>
-
<item>
- Sets the name of a file which contains the list of users and
+ <p>Sets the name of a file which contains the list of users and
passwords for user authentication. filename can be either
absolute or relative to the <c>server_root</c>. If using the
plain storage method, this file is a plain text file, where
@@ -717,12 +816,13 @@ bytes
storage method. For security reasons, make sure that the
<c>auth_user_file</c> is stored outside the document tree of the Web
server. If it is placed in the directory which it protects,
- clients will be able to download it.
+ clients will be able to download it. </p>
</item>
+ <marker id="prop_auth_group_file"></marker>
<tag>{auth_group_file, path()}</tag>
-
- <item> Sets the name of a file which contains the list of user
+ <item>
+ <p>Sets the name of a file which contains the list of user
groups for user authentication. Filename can be either
absolute or relative to the <c>server_root</c>. If you use the plain
storage method, the group file is a plain text file, where
@@ -738,93 +838,109 @@ bytes
For security reasons, make sure that the <c>auth_group_file</c> is
stored outside the document tree of the Web server. If it is
placed in the directory which it protects, clients will be
- able to download it.</item>
+ able to download it. </p>
+ </item>
+ <marker id="prop_auth_name"></marker>
<tag>{auth_name, string()}</tag>
-
<item>
- Sets the name of the authorization realm (auth-domain) for
+ <p>Sets the name of the authorization realm (auth-domain) for
a directory. This string informs the client about which user
- name and password to use. </item>
+ name and password to use. </p>
+ </item>
+ <marker id="prop_auth_access_passwd"></marker>
<tag>{auth_access_password, string()}</tag>
-
- <item> If set to other than "NoPassword" the password is required
+ <item>
+ <p>If set to other than "NoPassword" the password is required
for all API calls. If the password is set to "DummyPassword" the
password must be changed before any other API calls. To secure
the authenticating data the password must be changed after the
web server is started since it otherwise is written in clear
- text in the configuration file.</item>
+ text in the configuration file. </p>
+ </item>
+ <marker id="prop_req_user"></marker>
<tag>{require_user, [string()]}</tag>
<item>
- Defines users which should be granted access to a given
- directory using a secret password.
+ <p>Defines users which should be granted access to a given
+ directory using a secret password. </p>
</item>
+ <marker id="prop_req_grp"></marker>
<tag>{require_group, [string()]}</tag>
<item>
- Defines users which should be granted access to a given
- directory using a secret password.
+ <p>Defines users which should be granted access to a given
+ directory using a secret password. </p>
</item>
</taglist>
- <marker id="htaccess_prop"></marker>
+ <marker id="props_htaccess"></marker>
<p><em>Htaccess authentication properties - requires mod_htaccess</em></p>
<taglist>
+ <marker id="prop_access_files"></marker>
<tag>{access_files, [path()]}</tag>
-
- <item> Specify which filenames that are used for
+ <item>
+ <p>Specify which filenames that are used for
access-files. When a request comes every directory in the path
to the requested asset will be searched after files with the
names specified by this parameter. If such a file is found the
file will be parsed and the restrictions specified in it will
- be applied to the request.
+ be applied to the request. </p>
</item>
</taglist>
- <marker id="sec_prop"></marker>
+ <marker id="props_sec"></marker>
<p><em>Security properties - requires mod_security </em></p>
+ <marker id="prop_sec_dir"></marker>
<p><em>{security_directory, {path(), [{property(), term()}]}</em></p>
- <marker id="sdir_prop"></marker>
- <p> Here follows the valid properties for security directories</p>
+ <marker id="props_sdir"></marker>
+ <p>Here follows the valid properties for security directories</p>
<taglist>
- <tag>{data_file, path()}</tag>
-
+ <marker id="prop_data_file"></marker>
+ <tag>{data_file, path()}</tag>
<item>
- Name of the security data file. The filename can either
+ <p>Name of the security data file. The filename can either
absolute or relative to the server_root. This file is used to
- store persistent data for the mod_security module. </item>
-
- <tag>{max_retries, integer()}</tag>
+ store persistent data for the mod_security module. </p>
+ </item>
- <item> Specifies the maximum number of tries to authenticate a
+ <marker id="prop_max_retries"></marker>
+ <tag>{max_retries, integer()}</tag>
+ <item>
+ <p>Specifies the maximum number of tries to authenticate a
user has before the user is blocked out. If a user
successfully authenticates when the user has been blocked, the
user will receive a 403 (Forbidden) response from the
server. If the user makes a failed attempt while blocked the
server will return 401 (Unauthorized), for security
- reasons. Defaults to 3 may also be set to infinity.</item>
+ reasons.
+ Defaults to 3 may also be set to infinity. </p>
+ </item>
+ <marker id="prop_block_time"></marker>
<tag>{block_time, integer()}</tag>
-
- <item> Specifies the number of minutes a user is blocked. After
+ <item>
+ <p>Specifies the number of minutes a user is blocked. After
this amount of time, he automatically regains access.
- Defaults to 60</item>
+ Defaults to 60. </p>
+ </item>
+ <marker id="prop_fail_exp_time"></marker>
<tag>{fail_expire_time, integer()}</tag>
-
<item>
- Specifies the number of minutes a failed user authentication
+ <p>Specifies the number of minutes a failed user authentication
is remembered. If a user authenticates after this amount of
time, his previous failed authentications are
- forgotten. Defaults to 30</item>
+ forgotten.
+ Defaults to 30. </p>
+ </item>
+ <marker id="prop_auth_timeout"></marker>
<tag>{auth_timeout, integer()}</tag>
-
<item>
Specifies the number of seconds a successful user
authentication is remembered. After this time has passed, the
@@ -835,6 +951,7 @@ bytes
<funcs>
<func>
+ <marker id="info1"></marker>
<name>info(Pid) -></name>
<name>info(Pid, Properties) -> [{Option, Value}]</name>
<fsummary>Fetches information about the HTTP server</fsummary>
@@ -858,6 +975,7 @@ bytes
</func>
<func>
+ <marker id="info2"></marker>
<name>info(Address, Port) -> </name>
<name>info(Address, Port, Properties) -> [{Option, Value}] </name>
<fsummary>Fetches information about the HTTP server</fsummary>
@@ -883,6 +1001,7 @@ bytes
</func>
<func>
+ <marker id="reload_config"></marker>
<name>reload_config(Config, Mode) -> ok | {error, Reason}</name>
<fsummary>Reloads the HTTP server configuration without
restarting the server.</fsummary>
@@ -1003,6 +1122,7 @@ bytes
</section>
<funcs>
<func>
+ <marker id="module_do"></marker>
<name>Module:do(ModData)-> {proceed, OldData} | {proceed, NewData} | {break, NewData} | done</name>
<fsummary>Called for each request to the Web server.</fsummary>
<type>
@@ -1046,7 +1166,9 @@ bytes
closing the connection.</p>
</desc>
</func>
+
<func>
+ <marker id="module_load"></marker>
<name>Module:load(Line, AccIn)-> eof | ok | {ok, AccOut} | {ok, AccOut, {Option, Value}} | {ok, AccOut, [{Option, Value}]} | {error, Reason} </name>
<fsummary>Load is used to convert a line in a Apache like config
file to a <c>{Option, Value}</c> tuple.</fsummary>
@@ -1068,7 +1190,9 @@ bytes
</p>
</desc>
</func>
+
<func>
+ <marker id="module_store"></marker>
<name>Module:store({Option, Value}, Config)-> {ok, {Option, NewValue}} | {error, Reason} </name>
<fsummary></fsummary>
<type>
@@ -1092,6 +1216,7 @@ bytes
</func>
<func>
+ <marker id="module_remove"></marker>
<name>Module:remove(ConfigDB) -> ok | {error, Reason} </name>
<fsummary>Callback function that is called when the Web server is closed.</fsummary>
<type>
@@ -1112,6 +1237,7 @@ bytes
</section>
<funcs>
<func>
+ <marker id="parse_query"></marker>
<name>parse_query(QueryString) -> [{Key,Value}]</name>
<fsummary>Parse incoming data to <c>erl </c>and <c>eval </c>scripts.</fsummary>
<type>
@@ -1120,7 +1246,6 @@ bytes
<v>Value = string()</v>
</type>
<desc>
- <marker id="parse_query"></marker>
<p><c>parse_query/1</c> parses incoming data to <c>erl</c> and
<c>eval</c> scripts (See <seealso marker="mod_esi">mod_esi(3)</seealso>) as defined in the standard
URL format, that is '+' becomes 'space' and decoding of
diff --git a/lib/inets/doc/src/httpd_conf.xml b/lib/inets/doc/src/httpd_conf.xml
index a1ad76a8ae..fc34f14ec3 100644
--- a/lib/inets/doc/src/httpd_conf.xml
+++ b/lib/inets/doc/src/httpd_conf.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -33,11 +33,14 @@
Web server API programmer.</modulesummary>
<description>
<p>This module provides the Erlang Webserver API programmer with
- utility functions for adding run-time configuration directives.</p>
+ utility functions for adding run-time configuration directives.</p>
+
+ <marker id="check_enum"></marker>
</description>
+
<funcs>
<func>
- <name>check_enum(EnumString,ValidEnumStrings) -> Result</name>
+ <name>check_enum(EnumString, ValidEnumStrings) -> Result</name>
<fsummary>Check if string is a valid enumeration.</fsummary>
<type>
<v>EnumString = string()</v>
@@ -47,10 +50,13 @@
<desc>
<marker id="check_enum"></marker>
<p><c>check_enum/2</c> checks if <c>EnumString</c> is a valid
- enumeration of <c>ValidEnumStrings</c> in which case it is
- returned as an atom.</p>
+ enumeration of <c>ValidEnumStrings</c> in which case it is
+ returned as an atom.</p>
+
+ <marker id="clean"></marker>
</desc>
</func>
+
<func>
<name>clean(String) -> Stripped</name>
<fsummary>Remove leading and/or trailing white spaces.</fsummary>
@@ -60,9 +66,12 @@
<desc>
<marker id="clean"></marker>
<p><c>clean/1</c> removes leading and/or trailing white spaces
- from <c>String</c>.</p>
+ from <c>String</c>.</p>
+
+ <marker id="custom_clean"></marker>
</desc>
</func>
+
<func>
<name>custom_clean(String,Before,After) -> Stripped</name>
<fsummary>Remove leading and/or trailing white spaces and custom characters.</fsummary>
@@ -73,11 +82,14 @@
<desc>
<marker id="custom_clean"></marker>
<p><c>custom_clean/3</c> removes leading and/or trailing white
- spaces and custom characters from <c>String</c>. <c>Before</c>
- and <c>After</c> are regular expressions, as defined in
- <c>regexp(3)</c>, describing the custom characters.</p>
+ spaces and custom characters from <c>String</c>. <c>Before</c>
+ and <c>After</c> are regular expressions, as defined in
+ <c>regexp(3)</c>, describing the custom characters.</p>
+
+ <marker id="is_directory"></marker>
</desc>
</func>
+
<func>
<name>is_directory(FilePath) -> Result</name>
<fsummary>Check if a file path is a directory.</fsummary>
@@ -91,13 +103,16 @@
<desc>
<marker id="is_directory"></marker>
<p><c>is_directory/1</c> checks if <c>FilePath</c> is a
- directory in which case it is returned. Please read
- <c>file(3)</c> for a description of <c>enoent</c>,
- <c>eaccess</c> and <c>enotdir</c>. The definition of
- the file info record can be found by including <c>file.hrl</c>
- from the kernel application, see file(3).</p>
+ directory in which case it is returned. Please read
+ <c>file(3)</c> for a description of <c>enoent</c>,
+ <c>eaccess</c> and <c>enotdir</c>. The definition of
+ the file info record can be found by including <c>file.hrl</c>
+ from the kernel application, see file(3).</p>
+
+ <marker id="is_file"></marker>
</desc>
</func>
+
<func>
<name>is_file(FilePath) -> Result</name>
<fsummary>Check if a file path is a regular file.</fsummary>
@@ -111,13 +126,16 @@
<desc>
<marker id="is_file"></marker>
<p><c>is_file/1</c> checks if <c>FilePath</c> is a regular
- file in which case it is returned. Read <c>file(3)</c> for a
- description of <c>enoent</c>, <c>eaccess</c> and
- <c>enotdir</c>. The definition of the file info record can be
- found by including <c>file.hrl</c> from the kernel application,
- see file(3).</p>
+ file in which case it is returned. Read <c>file(3)</c> for a
+ description of <c>enoent</c>, <c>eaccess</c> and
+ <c>enotdir</c>. The definition of the file info record can be
+ found by including <c>file.hrl</c> from the kernel application,
+ see file(3).</p>
+
+ <marker id="make_integer"></marker>
</desc>
</func>
+
<func>
<name>make_integer(String) -> Result</name>
<fsummary>Return an integer representation of a string.</fsummary>
diff --git a/lib/inets/doc/src/httpd_socket.xml b/lib/inets/doc/src/httpd_socket.xml
index fba1a58d3a..58cd2ec575 100644
--- a/lib/inets/doc/src/httpd_socket.xml
+++ b/lib/inets/doc/src/httpd_socket.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -33,10 +33,13 @@
Web server API programmer.</modulesummary>
<description>
<p>This module provides the Erlang Web server API module programmer
- with utility functions for generic sockets communication. The
- appropriate communication mechanism is transparently used, that
- is <c>ip_comm</c> or <c>ssl</c>.</p>
+ with utility functions for generic sockets communication. The
+ appropriate communication mechanism is transparently used, that
+ is <c>ip_comm</c> or <c>ssl</c>.</p>
+
+ <marker id="deliver"></marker>
</description>
+
<funcs>
<func>
<name>deliver(SocketType, Socket, Data) -> Result</name>
@@ -50,11 +53,14 @@
<desc>
<marker id="deliver"></marker>
<p><c>deliver/3</c> sends the <c>Binary</c> over the
- <c>Socket</c> using the specified <c>SocketType</c>. Socket
- and SocketType should be the socket and the socket_type form
- the mod record as defined in httpd.hrl</p>
+ <c>Socket</c> using the specified <c>SocketType</c>. Socket
+ and SocketType should be the socket and the socket_type form
+ the mod record as defined in httpd.hrl</p>
+
+ <marker id="peername"></marker>
</desc>
</func>
+
<func>
<name>peername(SocketType,Socket) -> {Port,IPAddress}</name>
<fsummary>Return the port and IP-address of the remote socket.</fsummary>
@@ -67,9 +73,12 @@
<desc>
<marker id="peername"></marker>
<p><c>peername/3</c> returns the <c>Port</c> and
- <c>IPAddress</c> of the remote <c>Socket</c>. </p>
+ <c>IPAddress</c> of the remote <c>Socket</c>. </p>
+
+ <marker id="resolve"></marker>
</desc>
</func>
+
<func>
<name>resolve() -> HostName</name>
<fsummary>Return the official name of the current host.</fsummary>
@@ -79,7 +88,7 @@
<desc>
<marker id="resolve"></marker>
<p><c>resolve/0</c> returns the official <c>HostName</c> of
- the current host. </p>
+ the current host. </p>
</desc>
</func>
</funcs>
diff --git a/lib/inets/doc/src/httpd_util.xml b/lib/inets/doc/src/httpd_util.xml
index 6ac2b13c72..9f290084d2 100644
--- a/lib/inets/doc/src/httpd_util.xml
+++ b/lib/inets/doc/src/httpd_util.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2010</year>
+ <year>1997</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/inets_services.xml b/lib/inets/doc/src/inets_services.xml
index c274d67f19..e282050b12 100644
--- a/lib/inets/doc/src/inets_services.xml
+++ b/lib/inets/doc/src/inets_services.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/mod_alias.xml b/lib/inets/doc/src/mod_alias.xml
index c783b99b23..265a1b8e76 100644
--- a/lib/inets/doc/src/mod_alias.xml
+++ b/lib/inets/doc/src/mod_alias.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -32,8 +32,11 @@
<modulesummary>URL aliasing.</modulesummary>
<description>
<p>Erlang Webserver Server internal API for handling of things
- such as interaction data exported by the mod_alias module.</p>
+ such as interaction data exported by the mod_alias module.</p>
+
+ <marker id="default_index"></marker>
</description>
+
<funcs>
<func>
<name>default_index(ConfigDB, Path) -> NewPath</name>
@@ -45,17 +48,20 @@
<desc>
<marker id="default_index"></marker>
<p>If <c>Path</c> is a directory, <c>default_index/2</c>, it starts
- searching for resources or files that are specified in the config
- directive DirectoryIndex.
- If an appropriate resource or file is found, it is appended to
- the end of <c>Path</c> and then returned. <c>Path</c> is
- returned unaltered, if no appropriate
- file is found, or if <c>Path</c> is not a directory.
- <c>config_db()</c> is the server config file in ETS table format
- as described in
- <seealso marker="http_server">Inets Users Guide.</seealso>.</p>
+ searching for resources or files that are specified in the config
+ directive DirectoryIndex.
+ If an appropriate resource or file is found, it is appended to
+ the end of <c>Path</c> and then returned. <c>Path</c> is
+ returned unaltered, if no appropriate
+ file is found, or if <c>Path</c> is not a directory.
+ <c>config_db()</c> is the server config file in ETS table format
+ as described in
+ <seealso marker="http_server">Inets Users Guide.</seealso>.</p>
+
+ <marker id="path"></marker>
</desc>
</func>
+
<func>
<name>path(PathData, ConfigDB, RequestURI) -> Path</name>
<fsummary>Return the actual file path to a URL.</fsummary>
@@ -67,15 +73,19 @@
<desc>
<marker id="path"></marker>
<p><c>path/3</c> returns the actual file <c>Path</c> in the
- <c>RequestURI</c> (See RFC 1945). If the interaction data
- <c>{real_name,{Path,AfterPath}}</c> has been exported by
- mod_alias;
- <c>Path</c> is returned. If no interaction data has been
- exported, ServerRoot is used to
- generate a file <c>Path</c>. <c>config_db()</c> and
- <c>interaction_data()</c> are as defined in <seealso marker="http_server">Inets Users Guide</seealso>.</p>
+ <c>RequestURI</c> (See RFC 1945). If the interaction data
+ <c>{real_name,{Path,AfterPath}}</c> has been exported by
+ mod_alias;
+ <c>Path</c> is returned. If no interaction data has been
+ exported, ServerRoot is used to
+ generate a file <c>Path</c>. <c>config_db()</c> and
+ <c>interaction_data()</c> are as defined in
+ <seealso marker="http_server">Inets Users Guide</seealso>.</p>
+
+ <marker id="real_name"></marker>
</desc>
</func>
+
<func>
<name>real_name(ConfigDB, RequestURI, Aliases) -> Ret</name>
<fsummary>Expand a request uri using Alias config directives.</fsummary>
@@ -89,18 +99,24 @@
<desc>
<marker id="real_name"></marker>
<p><c>real_name/3</c> traverses <c>Aliases</c>, typically
- extracted from <c>ConfigDB</c>, and matches each
- <c>FakeName</c> with <c>RequestURI</c>. If a match is found
- <c>FakeName</c> is replaced with <c>RealName</c> in the
- match. The resulting path is split into two parts, that
- is <c>ShortPath</c> and <c>AfterPath</c> as defined in <seealso marker="httpd_util#split_path">httpd_util:split_path/1</seealso>.
- <c>Path</c> is generated from <c>ShortPath</c>, that is
- the result from <seealso marker="#default_index">default_index/2</seealso> with
- <c>ShortPath</c> as an argument.
- <c>config_db()</c> is the server config file in ETS table
- format as described in <seealso marker="http_server">Inets User Guide.</seealso>. </p>
+ extracted from <c>ConfigDB</c>, and matches each
+ <c>FakeName</c> with <c>RequestURI</c>. If a match is found
+ <c>FakeName</c> is replaced with <c>RealName</c> in the
+ match. The resulting path is split into two parts, that
+ is <c>ShortPath</c> and <c>AfterPath</c> as defined in
+ <seealso marker="httpd_util#split_path">httpd_util:split_path/1</seealso>.
+ <c>Path</c> is generated from <c>ShortPath</c>, that is
+ the result from
+ <seealso marker="#default_index">default_index/2</seealso> with
+ <c>ShortPath</c> as an argument.
+ <c>config_db()</c> is the server config file in ETS table
+ format as described in
+ <seealso marker="http_server">Inets User Guide.</seealso>. </p>
+
+ <marker id="real_script_name"></marker>
</desc>
</func>
+
<func>
<name>real_script_name(ConfigDB,RequestURI,ScriptAliases) -> Ret</name>
<fsummary>Expand a request uri using ScriptAlias config directives.</fsummary>
@@ -114,15 +130,15 @@
<desc>
<marker id="real_script_name"></marker>
<p><c>real_name/3</c> traverses <c>ScriptAliases</c>,
- typically extracted from <c>ConfigDB</c>, and matches each
- <c>FakeName</c> with <c>RequestURI</c>. If a match is found
- <c>FakeName</c> is replaced with <c>RealName</c> in the
- match. If the resulting match is not an executable script
- <c>not_a_script</c> is returned. If it is a script the
- resulting script path is in two parts, that is
- <c>ShortPath</c> and <c>AfterPath</c> as defined in <seealso marker="httpd_util#split_script_path">httpd_util:split_script_path/1</seealso>.
- <c>config_db()</c> is the server config file in ETS table
- format as described in <seealso marker="http_server">Inets Users Guide.</seealso>.</p>
+ typically extracted from <c>ConfigDB</c>, and matches each
+ <c>FakeName</c> with <c>RequestURI</c>. If a match is found
+ <c>FakeName</c> is replaced with <c>RealName</c> in the
+ match. If the resulting match is not an executable script
+ <c>not_a_script</c> is returned. If it is a script the
+ resulting script path is in two parts, that is
+ <c>ShortPath</c> and <c>AfterPath</c> as defined in <seealso marker="httpd_util#split_script_path">httpd_util:split_script_path/1</seealso>.
+ <c>config_db()</c> is the server config file in ETS table
+ format as described in <seealso marker="http_server">Inets Users Guide.</seealso>.</p>
</desc>
</func>
</funcs>
diff --git a/lib/inets/doc/src/mod_auth.xml b/lib/inets/doc/src/mod_auth.xml
index 2134ebeeae..7801567862 100644
--- a/lib/inets/doc/src/mod_auth.xml
+++ b/lib/inets/doc/src/mod_auth.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -32,8 +32,11 @@
<modulesummary>User authentication using text files, dets or mnesia database.</modulesummary>
<description>
<p>This module provides for basic user authentication using
- textual files, dets databases as well as mnesia databases. </p>
+ textual files, dets databases as well as mnesia databases. </p>
+
+ <marker id="add_user"></marker>
</description>
+
<funcs>
<func>
<name>add_user(UserName, Options) -> true| {error, Reason}</name>
@@ -55,12 +58,17 @@
<desc>
<marker id="user_api"></marker>
<marker id="add_user"></marker>
- <p><c>add_user/2, add_user/5</c> and <c>add_user/6</c> adds a user to the user
- database. If the operation is successful, this function returns
- <c>true</c>. If an error occurs, <c>{error,Reason}</c> is returned. When <c>add_user/2</c>
- is called the Password, UserData Port and Dir options is mandatory.</p>
+ <p><c>add_user/2, add_user/5</c> and <c>add_user/6</c> adds a
+ user to the user
+ database. If the operation is successful, this function returns
+ <c>true</c>. If an error occurs, <c>{error,Reason}</c> is returned.
+ When <c>add_user/2</c> is called the Password,
+ UserData Port and Dir options is mandatory.</p>
+
+ <marker id="delete_user"></marker>
</desc>
</func>
+
<func>
<name>delete_user(UserName,Options) -> true | {error, Reason}</name>
<name>delete_user(UserName, Port, Dir) -> true | {error, Reason}</name>
@@ -79,13 +87,16 @@
<desc>
<marker id="delete_user"></marker>
<p><c>delete_user/2, delete_user/3</c> and <c>delete_user/4</c>
- deletes a user
- from the user database. If the operation is successful, this
- function returns <c>true</c>. If an error occurs,
- <c>{error,Reason}</c> is returned. When <c>delete_user/2</c> is
- called the Port and Dir options are mandatory.</p>
+ deletes a user from the user database.
+ If the operation is successful, this function returns <c>true</c>.
+ If an error occurs, <c>{error,Reason}</c> is returned.
+ When <c>delete_user/2</c> is called the Port and Dir options
+ are mandatory.</p>
+
+ <marker id="get_user"></marker>
</desc>
</func>
+
<func>
<name>get_user(UserName,Options) -> {ok, #httpd_user} |{error, Reason}</name>
<name>get_user(UserName, Port, Dir) -> {ok, #httpd_user} | {error, Reason}</name>
@@ -104,12 +115,15 @@
<desc>
<marker id="get_user"></marker>
<p><c>get_user/2, get_user/3</c> and <c>get_user/4</c> returns a
- <c>httpd_user</c> record containing the userdata for a
- specific user. If the user cannot be found, <c>{error, Reason}</c>
- is returned. When <c>get_user/2</c> is called the Port and Dir
- options are mandatory.</p>
+ <c>httpd_user</c> record containing the userdata for a
+ specific user. If the user cannot be found, <c>{error, Reason}</c>
+ is returned. When <c>get_user/2</c> is called the Port and Dir
+ options are mandatory.</p>
+
+ <marker id="list_users"></marker>
</desc>
</func>
+
<func>
<name>list_users(Options) -> {ok, Users} | {error, Reason}</name>
<name>list_users(Port, Dir) -> {ok, Users} | {error, Reason}</name>
@@ -127,12 +141,16 @@
</type>
<desc>
<marker id="list_users"></marker>
- <p><c>list_users/1, list_users/2</c> and <c>list_users/3</c> returns a list
- of users in the user database for a specific <c>Port/Dir</c>.
- When <c>list_users/1</c> is called the Port and Dir
- options are mandatory.</p>
+ <p><c>list_users/1, list_users/2</c> and <c>list_users/3</c>
+ returns a list
+ of users in the user database for a specific <c>Port/Dir</c>.
+ When <c>list_users/1</c> is called the Port and Dir
+ options are mandatory.</p>
+
+ <marker id="add_group_member"></marker>
</desc>
</func>
+
<func>
<name>add_group_member(GroupName, UserName, Options) -> true | {error, Reason}</name>
<name>add_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason}</name>
@@ -151,13 +169,18 @@
</type>
<desc>
<marker id="add_group_member"></marker>
- <p><c>add_group_member/3, add_group_member/4</c> and <c>add_group_member/5</c>
- adds a user to a group. If the group does not exist, it
- is created and the user is added to the group. Upon successful
- operation, this function returns <c>true</c>. When <c>add_group_members/3</c>
- is called the Port and Dir options are mandatory.</p>
+ <p><c>add_group_member/3, add_group_member/4</c> and
+ <c>add_group_member/5</c>
+ adds a user to a group. If the group does not exist, it
+ is created and the user is added to the group. Upon successful
+ operation, this function returns <c>true</c>.
+ When <c>add_group_members/3</c>
+ is called the Port and Dir options are mandatory.</p>
+
+ <marker id="delete_group_member"></marker>
</desc>
</func>
+
<func>
<name>delete_group_member(GroupName, UserName, Options) -> true | {error, Reason}</name>
<name>delete_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason}</name>
@@ -176,13 +199,17 @@
</type>
<desc>
<marker id="delete_group_member"></marker>
- <p><c>delete_group_member/3, delete_group_member/4</c> and <c>delete_group_member/5</c> deletes a user from a group.
- If the group or the user does not exist,
- this function returns an error, otherwise it returns <c>true</c>.
- When <c>delete_group_member/3</c> is called the Port and Dir options
- are mandatory.</p>
+ <p><c>delete_group_member/3, delete_group_member/4</c> and
+ <c>delete_group_member/5</c> deletes a user from a group.
+ If the group or the user does not exist,
+ this function returns an error, otherwise it returns <c>true</c>.
+ When <c>delete_group_member/3</c> is called the Port and Dir options
+ are mandatory.</p>
+
+ <marker id="list_group_members"></marker>
</desc>
</func>
+
<func>
<name>list_group_members(GroupName, Options) -> {ok, Users} | {error, Reason}</name>
<name>list_group_members(GroupName, Port, Dir) -> {ok, Users} | {error, Reason}</name>
@@ -201,13 +228,17 @@
</type>
<desc>
<marker id="list_group_members"></marker>
- <p><c>list_group_members/2, list_group_members/3</c> and <c>list_group_members/4</c>
- lists the members of a specified group. If the group does not
- exist or there is an error, <c>{error, Reason}</c> is returned.
- When <c>list_group_members/2</c> is called the Port and Dir options
- are mandatory.</p>
+ <p><c>list_group_members/2, list_group_members/3</c> and
+ <c>list_group_members/4</c>
+ lists the members of a specified group. If the group does not
+ exist or there is an error, <c>{error, Reason}</c> is returned.
+ When <c>list_group_members/2</c> is called the Port and Dir options
+ are mandatory.</p>
+
+ <marker id="list_groups"></marker>
</desc>
</func>
+
<func>
<name>list_groups(Options) -> {ok, Groups} | {error, Reason}</name>
<name>list_groups(Port, Dir) -> {ok, Groups} | {error, Reason}</name>
@@ -225,12 +256,16 @@
</type>
<desc>
<marker id="list_groups"></marker>
- <p><c>list_groups/1, list_groups/2</c> and <c>list_groups/3</c> lists all
- the groups available. If there is an error, <c>{error, Reason}</c>
- is returned. When <c>list_groups/1</c> is called the Port and Dir options
- are mandatory.</p>
+ <p><c>list_groups/1, list_groups/2</c> and <c>list_groups/3</c>
+ lists all the groups available.
+ If there is an error, <c>{error, Reason}</c> is returned.
+ When <c>list_groups/1</c> is called the Port and Dir options
+ are mandatory.</p>
+
+ <marker id="delete_group"></marker>
</desc>
</func>
+
<func>
<name>delete_group(GroupName, Options) -> true | {error,Reason} &lt;name>delete_group(GroupName, Port, Dir) -> true | {error, Reason}</name>
<name>delete_group(GroupName, Address, Port, Dir) -> true | {error, Reason}</name>
@@ -247,12 +282,16 @@
</type>
<desc>
<marker id="delete_group"></marker>
- <p><c>delete_group/2, delete_group/3</c> and <c>delete_group/4</c> deletes the
- group specified and returns <c>true</c>. If there is an error,
- <c>{error, Reason}</c> is returned. When <c>delete_group/2</c> is called the
- Port and Dir options are mandatory.</p>
+ <p><c>delete_group/2, delete_group/3</c> and <c>delete_group/4</c>
+ deletes the group specified and returns <c>true</c>.
+ If there is an error, <c>{error, Reason}</c> is returned.
+ When <c>delete_group/2</c> is called the
+ Port and Dir options are mandatory.</p>
+
+ <marker id="update_password"></marker>
</desc>
</func>
+
<func>
<name>update_password(Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason}</name>
<name>update_password(Address,Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason}</name>
@@ -268,10 +307,12 @@
</type>
<desc>
<marker id="update_password"></marker>
- <p><c>update_password/5</c> and <c>update_password/6</c> Updates the AuthAccessPassword
- for the specified directory. If NewPassword is equal to "NoPassword" no password is requires to
- change authorisation data. If NewPassword is equal to "DummyPassword" no changes can be done
- without changing the password first.</p>
+ <p><c>update_password/5</c> and <c>update_password/6</c>
+ Updates the AuthAccessPassword for the specified directory.
+ If NewPassword is equal to "NoPassword" no password is requires to
+ change authorisation data.
+ If NewPassword is equal to "DummyPassword" no changes can be done
+ without changing the password first.</p>
</desc>
</func>
</funcs>
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index cfc58b8ddb..dfdeb4016c 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -33,6 +33,96 @@
</header>
+ <section><title>Inets 5.9</title>
+
+ <section><title>Improvements and New Features</title>
+<!--
+ <p>-</p>
+-->
+
+ <list>
+ <item>
+ <p>[httpd] Make the server header configurable with new config
+ option
+ <seealso marker="httpd#prop_server_tokens">server_tokens</seealso>.
+ The value of the server header, which was previously hard-coded
+ (at compile time), is now possible to manipulate through the means
+ of the
+ <seealso marker="httpd#prop_server_tokens">server_tokens</seealso>
+ config option. </p>
+ <p>Own Id: OTP-9805</p>
+ </item>
+
+ <item>
+ <p>Improve inets support for inets as an included application. </p>
+ <p><c>inets_app</c> calls <c>supervisor:start_link/3</c> directly
+ rather than calling the root supervisor function
+ <c>inets_sup:start_link/0</c>.
+ This precludes using included_applications to start inets without
+ having a wrapper function. </p>
+ <p>Jay Nelson</p>
+ <p>Own Id: OTP-9960</p>
+ </item>
+
+ <item>
+ <p>[httpc] Add function for retrieving current options,
+ <seealso marker="httpc#get_options">get_options/1,2</seealso>. </p>
+ <p>Own Id: OTP-9979</p>
+ </item>
+
+ <item>
+ <p>Utility module
+ <seealso marker="http_uri">http_uri</seealso>
+ now officially supported. </p>
+ <p>Also, the
+ <seealso marker="http_uri#parse">parse</seealso>
+ function has been extended with more
+ scheme support and a way to provide your own scheme info. </p>
+ <p>Own Id: OTP-9983</p>
+ <p>Aux Id: Seq 12022</p>
+ </item>
+
+ </list>
+
+ </section>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <p>-</p>
+
+<!--
+ <list>
+ <item>
+ <p>[httpd] Fix logging of content length in mod_log. </p>
+ <p>Garrett Smith</p>
+ <p>Own Id: OTP-9715</p>
+ </item>
+
+ </list>
+-->
+
+ </section>
+
+ <section>
+ <title>Incompatibilities</title>
+ <p>-</p>
+
+<!--
+ <list>
+ <item>
+ <p>[httpc|httpd] The old ssl implementation (based on OpenSSL),
+ has been deprecated. The config option that specified usage of
+ this version of the ssl app, <c>ossl</c>, has been removed. </p>
+ <p>Own Id: OTP-9522</p>
+ </item>
+
+ </list>
+-->
+
+ </section>
+
+ </section> <!-- 5.9 -->
+
+
<section><title>Inets 5.8.1</title>
<section><title>Improvements and New Features</title>
<p>-</p>
@@ -417,7 +507,7 @@
<p><c>ossl</c> will work for as long as the ssl application
supports it. </p>
<p>See the httpd
- <seealso marker="httpd#comm_prop">socket_type</seealso>
+ <seealso marker="httpd#props_comm">socket_type</seealso>
communication property or the httpc
<seealso marker="httpc#request2">request/4,5</seealso> function
for more info. </p>
@@ -436,7 +526,7 @@
<list>
<item>
<p>[httpd] Wrong
- <seealso marker="httpd#sec_prop">security property</seealso>
+ <seealso marker="httpd#props_sec">security property</seealso>
names used in documentation. </p>
<p><c>security_data_file</c> used instead of <c>data_file</c>. </p>
<p><c>security_max_retries</c> used instead of <c>max_retries</c>. </p>
@@ -620,7 +710,7 @@
the <c>essl</c> tag instead. </p>
<p>See the <c>http_option</c> option in the
<seealso marker="httpc#request2">request/4,5</seealso> or
- the <seealso marker="httpd#comm_prop">socket-type</seealso>
+ the <seealso marker="httpd#props_comm">socket-type</seealso>
section of the Communication properties chapter for more info, </p>
<p>Own Id: OTP-7907</p>
</item>
@@ -637,9 +727,9 @@
<p>[httpd] - Improved mod_alias.
Now able to do better URL rewrites. </p>
<p>See
- <seealso marker="httpd#alias_prop">URL aliasing properties</seealso>
+ <seealso marker="httpd#props_alias">URL aliasing properties</seealso>
and the
- <seealso marker="httpd#cgi_prop">CGI properties</seealso>
+ <seealso marker="httpd#props_cgi">CGI properties</seealso>
section(s) for more info, </p>
<p>Own Id: OTP-8573</p>
</item>
@@ -1225,7 +1315,7 @@
<p>Default is <c>inet6fb4</c> which emulates the
behaviour of the previous version. </p>
<p>See the
- <seealso marker="httpd#comm_prop">Communication properties</seealso>
+ <seealso marker="httpd#props_comm">Communication properties</seealso>
section for more info. </p>
<p>Own Id: OTP-8069</p>
<p>Aux Id: seq11086</p>
diff --git a/lib/inets/doc/src/notes_history.xml b/lib/inets/doc/src/notes_history.xml
index 151bec375e..bd59c1ba47 100644
--- a/lib/inets/doc/src/notes_history.xml
+++ b/lib/inets/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2011</year>
+ <year>2004</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/part.xml b/lib/inets/doc/src/part.xml
index 36955df6b3..3b6734a9b8 100644
--- a/lib/inets/doc/src/part.xml
+++ b/lib/inets/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/part_notes.xml b/lib/inets/doc/src/part_notes.xml
index 21f464318b..81b0dedbfa 100644
--- a/lib/inets/doc/src/part_notes.xml
+++ b/lib/inets/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/part_notes_history.xml b/lib/inets/doc/src/part_notes_history.xml
index 3c1e6f5232..f714a6d2e3 100644
--- a/lib/inets/doc/src/part_notes_history.xml
+++ b/lib/inets/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/ref_man.xml b/lib/inets/doc/src/ref_man.xml
index 45d5dfcd0e..e44829827c 100644
--- a/lib/inets/doc/src/ref_man.xml
+++ b/lib/inets/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2010</year>
+ <year>1997</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -30,8 +30,8 @@
</header>
<description>
<p>Inets is a container for Internet clients and
- servers. Currently a FTP client, a HTTP client and server, and
- a tftp client and server has been incorporated in Inets.</p>
+ servers. Currently a FTP client, a HTTP client and server, and
+ a tftp client and server has been incorporated in Inets.</p>
</description>
<xi:include href="inets.xml"/>
<xi:include href="ftp.xml"/>
@@ -45,6 +45,7 @@
<xi:include href="mod_auth.xml"/>
<xi:include href="mod_esi.xml"/>
<xi:include href="mod_security.xml"/>
+ <xi:include href="http_uri.xml"/>
</application>
diff --git a/lib/inets/doc/src/tftp.xml b/lib/inets/doc/src/tftp.xml
index 96d6ae0dd5..0b3e93a153 100644
--- a/lib/inets/doc/src/tftp.xml
+++ b/lib/inets/doc/src/tftp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -218,6 +218,8 @@
<c>5</c> times when the timeout expires.</p>
</item>
</taglist>
+
+ <marker id="start1"></marker>
</section>
<funcs>
@@ -231,11 +233,14 @@
</type>
<desc>
<p>Starts a daemon process which listens for udp packets on a
- port. When it receives a request for read or write it spawns
- a temporary server process which handles the actual transfer
- of the (virtual) file.</p>
+ port. When it receives a request for read or write it spawns
+ a temporary server process which handles the actual transfer
+ of the (virtual) file.</p>
+
+ <marker id="read_file"></marker>
</desc>
</func>
+
<func>
<name>read_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason}</name>
<fsummary>Read a (virtual) file from a TFTP server</fsummary>
@@ -248,23 +253,26 @@
</type>
<desc>
<p>Reads a (virtual) file <c>RemoteFilename</c> from a TFTP
- server.</p>
- <p>If <c>LocalFilename</c> is the atom <c>binary</c>,
- <c>tftp_binary</c> is used as callback module. It concatenates
- all transferred blocks and returns them as one single binary
- in <c>LastCallbackState</c>.</p>
- <p>If <c>LocalFilename</c> is a string and there are no
- registered callback modules, <c>tftp_file</c> is used as
- callback module. It writes each transferred block to the file
- named <c>LocalFilename</c> and returns the number of
- transferred bytes in <c>LastCallbackState</c>.</p>
- <p>If <c>LocalFilename</c> is a string and there are registered
- callback modules, <c>LocalFilename</c> is tested against
- the regexps of these and the callback module corresponding to
- the first match is used, or an error tuple is returned if no
- matching regexp is found.</p>
+ server.</p>
+ <p>If <c>LocalFilename</c> is the atom <c>binary</c>,
+ <c>tftp_binary</c> is used as callback module. It concatenates
+ all transferred blocks and returns them as one single binary
+ in <c>LastCallbackState</c>.</p>
+ <p>If <c>LocalFilename</c> is a string and there are no
+ registered callback modules, <c>tftp_file</c> is used as
+ callback module. It writes each transferred block to the file
+ named <c>LocalFilename</c> and returns the number of
+ transferred bytes in <c>LastCallbackState</c>.</p>
+ <p>If <c>LocalFilename</c> is a string and there are registered
+ callback modules, <c>LocalFilename</c> is tested against
+ the regexps of these and the callback module corresponding to
+ the first match is used, or an error tuple is returned if no
+ matching regexp is found.</p>
</desc>
+
+ <marker id="write_file"></marker>
</func>
+
<func>
<name>write_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason}</name>
<fsummary>Write a (virtual) file to a TFTP server</fsummary>
@@ -288,10 +296,12 @@
block by block and returns the number of transferred bytes
in <c>LastCallbackState</c>.</p>
<p>If <c>LocalFilename</c> is a string and there are registered
- callback modules, <c>LocalFilename</c> is tested against
- the regexps of these and the callback module corresponding to
- the first match is used, or an error tuple is returned if no
- matching regexp is found.</p>
+ callback modules, <c>LocalFilename</c> is tested against
+ the regexps of these and the callback module corresponding to
+ the first match is used, or an error tuple is returned if no
+ matching regexp is found.</p>
+
+ <marker id="info_daemons"></marker>
</desc>
</func>
@@ -304,8 +314,9 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Returns info about all TFTP daemon processes.
- </p>
+ <p>Returns info about all TFTP daemon processes. </p>
+
+ <marker id="info_servers"></marker>
</desc>
</func>
@@ -318,8 +329,9 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Returns info about all TFTP server processes.
- </p>
+ <p>Returns info about all TFTP server processes. </p>
+
+ <marker id="info_pid"></marker>
</desc>
</func>
@@ -332,6 +344,8 @@
</type>
<desc>
<p>Returns info about a TFTP daemon, server or client process.</p>
+
+ <marker id="change_config_daemons"></marker>
</desc>
</func>
@@ -346,8 +360,9 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Changes config for all TFTP daemon processes
- </p>
+ <p>Changes config for all TFTP daemon processes. </p>
+
+ <marker id="change_config_servers"></marker>
</desc>
</func>
@@ -362,8 +377,9 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Changes config for all TFTP server processes
- </p>
+ <p>Changes config for all TFTP server processes. </p>
+
+ <marker id="change_config_pid"></marker>
</desc>
</func>
@@ -378,8 +394,11 @@
</type>
<desc>
<p>Changes config for a TFTP daemon, server or client process</p>
+
+ <marker id="start2"></marker>
</desc>
</func>
+
<func>
<name>start() -> ok | {error, Reason}</name>
<fsummary>Start the Inets application</fsummary>
@@ -442,8 +461,9 @@
by the already ongoing connection on the server
side. By not setting up yet another connection, in
parallel with the ongoing one, the server will
- consumer lesser resources.
- </p>
+ consumer lesser resources. </p>
+
+ <marker id="prepare"></marker>
</section>
<funcs>
@@ -468,17 +488,20 @@
<v>Text = string()</v>
</type>
<desc>
- <p>Prepares to open a file on the client side.</p>
- <p>No new options may be added, but the ones that are present in
- <c>SuggestedOptions</c> may be omitted or replaced with new
- values in <c>AcceptedOptions</c>.</p>
- <p>Will be followed by a call to <c>open/4</c> before any
- read/write access is performed. <c>AcceptedOptions</c> is
- sent to the server which replies with those options that it
- accepts. These will be forwarded to <c>open/4</c> as
- <c>SuggestedOptions</c>.</p>
+ <p>Prepares to open a file on the client side.</p>
+ <p>No new options may be added, but the ones that are present in
+ <c>SuggestedOptions</c> may be omitted or replaced with new
+ values in <c>AcceptedOptions</c>.</p>
+ <p>Will be followed by a call to <c>open/4</c> before any
+ read/write access is performed. <c>AcceptedOptions</c> is
+ sent to the server which replies with those options that it
+ accepts. These will be forwarded to <c>open/4</c> as
+ <c>SuggestedOptions</c>.</p>
+
+ <marker id="open"></marker>
</desc>
</func>
+
<func>
<name>open(Peer, Access, Filename, Mode, SuggestedOptions, State) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}}</name>
<fsummary>Open a file for read or write access</fsummary>
@@ -503,14 +526,17 @@
<desc>
<p>Opens a file for read or write access.</p>
<p>On the client side where the <c>open/5</c> call has been
- preceded by a call to <c>prepare/5</c>, all options must be
- accepted or rejected.</p>
- <p>On the server side, where there is no preceding
- <c>prepare/5</c> call, no new options may be added, but
- the ones that are present in <c>SuggestedOptions</c> may be
- omitted or replaced with new values in <c>AcceptedOptions</c>.</p>
+ preceded by a call to <c>prepare/5</c>, all options must be
+ accepted or rejected.</p>
+ <p>On the server side, where there is no preceding
+ <c>prepare/5</c> call, no new options may be added, but
+ the ones that are present in <c>SuggestedOptions</c> may be
+ omitted or replaced with new values in <c>AcceptedOptions</c>.</p>
+
+ <marker id="read"></marker>
</desc>
</func>
+
<func>
<name>read(State) -> {more, Bin, NewState} | {last, Bin, FileSize} | {error, {Code, Text}}</name>
<fsummary>Read a chunk from the file</fsummary>
@@ -526,15 +552,18 @@
<desc>
<p>Read a chunk from the file.</p>
<p>The callback function is expected to close
- the file when the last file chunk is
- encountered. When an error is encountered
- the callback function is expected to clean
- up after the aborted file transfer, such as
- closing open file descriptors etc. In both
- cases there will be no more calls to any of
- the callback functions.</p>
+ the file when the last file chunk is
+ encountered. When an error is encountered
+ the callback function is expected to clean
+ up after the aborted file transfer, such as
+ closing open file descriptors etc. In both
+ cases there will be no more calls to any of
+ the callback functions.</p>
+
+ <marker id="write"></marker>
</desc>
</func>
+
<func>
<name>write(Bin, State) -> {more, NewState} | {last, FileSize} | {error, {Code, Text}}</name>
<fsummary>Write a chunk to the file</fsummary>
@@ -550,15 +579,18 @@
<desc>
<p>Write a chunk to the file.</p>
<p>The callback function is expected to close
- the file when the last file chunk is
- encountered. When an error is encountered
- the callback function is expected to clean
- up after the aborted file transfer, such as
- closing open file descriptors etc. In both
- cases there will be no more calls to any of
- the callback functions.</p>
+ the file when the last file chunk is
+ encountered. When an error is encountered
+ the callback function is expected to clean
+ up after the aborted file transfer, such as
+ closing open file descriptors etc. In both
+ cases there will be no more calls to any of
+ the callback functions.</p>
+
+ <marker id="abort"></marker>
</desc>
</func>
+
<func>
<name>abort(Code, Text, State) -> ok</name>
<fsummary>Abort the file transfer</fsummary>
@@ -572,14 +604,14 @@
<desc>
<p>Invoked when the file transfer is aborted.</p>
<p>The callback function is expected to clean
- up its used resources after the aborted file
- transfer, such as closing open file
- descriptors etc. The function will not be
- invoked if any of the other callback
- functions returns an error, as it is
- expected that they already have cleaned up
- the necessary resources. It will however be
- invoked if the functions fails (crashes).</p>
+ up its used resources after the aborted file
+ transfer, such as closing open file
+ descriptors etc. The function will not be
+ invoked if any of the other callback
+ functions returns an error, as it is
+ expected that they already have cleaned up
+ the necessary resources. It will however be
+ invoked if the functions fails (crashes).</p>
</desc>
</func>
</funcs>
@@ -589,7 +621,9 @@
<title>LOGGER FUNCTIONS</title>
<p>A <c>tftp_logger</c> callback module should be implemented as a
- <c>tftp_logger</c> behavior and export the functions listed below.</p>
+ <c>tftp_logger</c> behavior and export the functions listed below.</p>
+
+ <marker id="error_msg"></marker>
</section>
<funcs>
@@ -602,7 +636,10 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Log an error message. See <c>error_logger:error_msg/2 for details.</c> </p>
+ <p>Log an error message.
+ See <c>error_logger:error_msg/2 for details.</c> </p>
+
+ <marker id="warning_msg"></marker>
</desc>
</func>
@@ -615,7 +652,10 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Log a warning message. See <c>error_logger:warning_msg/2 for details.</c> </p>
+ <p>Log a warning message.
+ See <c>error_logger:warning_msg/2 for details.</c> </p>
+
+ <marker id="info_msg"></marker>
</desc>
</func>
@@ -628,7 +668,8 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Log an info message. See <c>error_logger:info_msg/2 for details.</c> </p>
+ <p>Log an info message.
+ See <c>error_logger:info_msg/2 for details.</c> </p>
</desc>
</func>
</funcs>
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index ae87ceed93..0a30fe1e20 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -31,8 +31,10 @@
-export([
request/1, request/2, request/4, request/5,
cancel_request/1, cancel_request/2,
- set_option/2, set_option/3,
+ set_option/2, set_option/3,
set_options/1, set_options/2,
+ get_option/1, get_option/2,
+ get_options/1, get_options/2,
store_cookies/2, store_cookies/3,
cookie_header/1, cookie_header/2, cookie_header/3,
which_cookies/0, which_cookies/1,
@@ -156,7 +158,7 @@ request(Method,
{http_options, HTTPOptions},
{options, Options},
{profile, Profile}]),
- case http_uri:parse(Url, Options) of
+ case uri_parse(Url, Options) of
{error, Reason} ->
{error, Reason};
{ok, ParsedUrl} ->
@@ -177,7 +179,7 @@ request(Method,
{http_options, HTTPOptions},
{options, Options},
{profile, Profile}]),
- case http_uri:parse(Url, Options) of
+ case uri_parse(Url, Options) of
{error, Reason} ->
{error, Reason};
{ok, ParsedUrl} ->
@@ -230,7 +232,7 @@ cancel_request(RequestId, Profile)
set_options(Options) ->
set_options(Options, default_profile()).
set_options(Options, Profile) when is_atom(Profile) orelse is_pid(Profile) ->
- ?hcrt("set cookies", [{options, Options}, {profile, Profile}]),
+ ?hcrt("set options", [{options, Options}, {profile, Profile}]),
case validate_options(Options) of
{ok, Opts} ->
try
@@ -253,6 +255,58 @@ set_option(Key, Value, Profile) ->
%%--------------------------------------------------------------------------
+%% get_options(OptionItems) -> {ok, Values} | {error, Reason}
+%% get_options(OptionItems, Profile) -> {ok, Values} | {error, Reason}
+%% OptionItems - all | [option_item()]
+%% option_item() - proxy | pipeline_timeout | max_pipeline_length |
+%% keep_alive_timeout | max_keep_alive_length |
+%% max_sessions | verbose |
+%% cookies | ipfamily | ip | port | socket_opts
+%% Profile - atom()
+%% Values - [{option_item(), term()}]
+%% Reason - term()
+%% Description: Retrieves the current options.
+%%-------------------------------------------------------------------------
+get_options() ->
+ record_info(fields, options).
+
+get_options(Options) ->
+ get_options(Options, default_profile()).
+
+get_options(all = _Options, Profile) ->
+ get_options(get_options(), Profile);
+get_options(Options, Profile)
+ when (is_list(Options) andalso
+ (is_atom(Profile) orelse is_pid(Profile))) ->
+ ?hcrt("get options", [{options, Options}, {profile, Profile}]),
+ case Options -- get_options() of
+ [] ->
+ try
+ begin
+ {ok, httpc_manager:get_options(Options,
+ profile_name(Profile))}
+ end
+ catch
+ exit:{noproc, _} ->
+ {error, inets_not_started}
+ end;
+ InvalidGetOptions ->
+ {error, {invalid_options, InvalidGetOptions}}
+ end.
+
+get_option(Key) ->
+ get_option(Key, default_profile()).
+
+get_option(Key, Profile) ->
+ case get_options([Key], Profile) of
+ {ok, [{Key, Value}]} ->
+ {ok, Value};
+ Error ->
+ Error
+ end.
+
+
+%%--------------------------------------------------------------------------
%% store_cookies(SetCookieHeaders, Url [, Profile]) -> ok | {error, reason}
%%
%%
@@ -274,7 +328,7 @@ store_cookies(SetCookieHeaders, Url, Profile)
%% Since the Address part is not actually used
%% by the manager when storing cookies, we dont
%% care about ipv6-host-with-brackets.
- {ok, {_, _, Host, Port, Path, _}} = http_uri:parse(Url),
+ {ok, {_, _, Host, Port, Path, _}} = uri_parse(Url),
Address = {Host, Port},
ProfileName = profile_name(Profile),
Cookies = httpc_cookie:cookies(SetCookieHeaders, Path, Host),
@@ -347,7 +401,7 @@ which_cookies(Profile) ->
%% info() -> list()
%% info(Profile) -> list()
%%
-%% Description: Debug function, retreive info about the profile
+%% Description: Debug function, retrieve info about the profile
%%-------------------------------------------------------------------------
info() ->
info(default_profile()).
@@ -1144,6 +1198,22 @@ validate_headers(RequestHeaders, _, _) ->
RequestHeaders.
+%%--------------------------------------------------------------------------
+%% These functions is just simple wrappers to parse specifically HTTP URIs
+%%--------------------------------------------------------------------------
+
+scheme_defaults() ->
+ [{http, 80}, {https, 443}].
+
+uri_parse(URI) ->
+ http_uri:parse(URI, [{scheme_defaults, scheme_defaults()}]).
+
+uri_parse(URI, Opts) ->
+ http_uri:parse(URI, [{scheme_defaults, scheme_defaults()} | Opts]).
+
+
+%%--------------------------------------------------------------------------
+
child_name2info(undefined) ->
{error, no_such_service};
child_name2info(httpc_manager) ->
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index bfe9b14ef6..b8c34bd99b 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -851,14 +851,17 @@ connect(SocketType, ToAddress,
case IpFamily of
inet6fb4 ->
Opts3 = [inet6 | Opts2],
- case http_transport:connect(SocketType, ToAddress, Opts3, Timeout) of
- {error, _Reason} = Error ->
+ case http_transport:connect(SocketType,
+ ToAddress, Opts3, Timeout) of
+ {error, Reason6} ->
Opts4 = [inet | Opts2],
case http_transport:connect(SocketType,
ToAddress, Opts4, Timeout) of
- {error, _} ->
- %% Reply with the "original" error
- Error;
+ {error, Reason4} ->
+ {error, {failed_connect,
+ [{to_address, ToAddress},
+ {inet6, Opts3, Reason6},
+ {inet, Opts4, Reason4}]}};
OK ->
OK
end;
@@ -867,7 +870,13 @@ connect(SocketType, ToAddress,
end;
_ ->
Opts3 = [IpFamily | Opts2],
- http_transport:connect(SocketType, ToAddress, Opts3, Timeout)
+ case http_transport:connect(SocketType, ToAddress, Opts3, Timeout) of
+ {error, Reason} ->
+ {error, {failed_connect, [{to_address, ToAddress},
+ {IpFamily, Opts3, Reason}]}};
+ Else ->
+ Else
+ end
end.
connect_and_send_first_request(Address, Request, #state{options = Options} = State) ->
diff --git a/lib/inets/src/http_client/httpc_manager.erl b/lib/inets/src/http_client/httpc_manager.erl
index 453081da21..b225b43214 100644
--- a/lib/inets/src/http_client/httpc_manager.erl
+++ b/lib/inets/src/http_client/httpc_manager.erl
@@ -37,6 +37,7 @@
update_session/4,
delete_session/2,
set_options/2,
+ get_options/2,
store_cookies/3,
which_cookies/1, which_cookies/2, which_cookies/3,
reset_cookies/1,
@@ -250,6 +251,21 @@ set_options(Options, ProfileName) ->
%%--------------------------------------------------------------------
+%% Function: get_options(OptionItems, ProfileName) -> Values
+%%
+%% OptionItems = [OptionItem]
+%% OptionItem = Any or all fields of the current #options{} record
+%% Values = [{OptionItem, Value}]
+%% Value = term()
+%%
+%% Description: Gets the specified options used by the client.
+%%--------------------------------------------------------------------
+
+get_options(Options, ProfileName) ->
+ call(ProfileName, {get_options, Options}).
+
+
+%%--------------------------------------------------------------------
%% Function: store_cookies(Cookies, Address, ProfileName) -> ok
%%
%% Cookies = [Cookie]
@@ -430,7 +446,7 @@ handle_call(which_cookies, _, #state{cookie_db = CookieDb} = State) ->
handle_call({which_cookies, Url, Options}, _,
#state{cookie_db = CookieDb} = State) ->
?hcrv("which cookies", [{url, Url}, {options, Options}]),
- case http_uri:parse(Url, Options) of
+ case uri_parse(Url, Options) of
{ok, {Scheme, _, Host, Port, Path, _}} ->
CookieHeaders =
httpc_cookie:header(CookieDb, Scheme, {Host, Port}, Path),
@@ -439,6 +455,12 @@ handle_call({which_cookies, Url, Options}, _,
{reply, ERROR, State}
end;
+handle_call({get_options, OptionItems}, _, #state{options = Options} = State) ->
+ ?hcrv("get options", [{option_items, OptionItems}]),
+ Reply = [{OptionItem, get_option(OptionItem, Options)} || OptionItem <-
+ OptionItems],
+ {reply, Reply, State};
+
handle_call(info, _, State) ->
?hcrv("info", []),
Info = get_manager_info(State),
@@ -872,6 +894,19 @@ make_db_name(ProfileName, Post) ->
list_to_atom(atom_to_list(ProfileName) ++ Post).
+%%--------------------------------------------------------------------------
+%% These functions is just simple wrappers to parse specifically HTTP URIs
+%%--------------------------------------------------------------------------
+
+scheme_defaults() ->
+ [{http, 80}, {https, 443}].
+
+uri_parse(URI, Opts) ->
+ http_uri:parse(URI, [{scheme_defaults, scheme_defaults()} | Opts]).
+
+
+%%--------------------------------------------------------------------------
+
call(ProfileName, Msg) ->
Timeout = infinity,
@@ -883,6 +918,31 @@ cast(ProfileName, Msg) ->
gen_server:cast(ProfileName, Msg).
+get_option(proxy, #options{proxy = Proxy}) ->
+ Proxy;
+get_option(pipeline_timeout, #options{pipeline_timeout = Timeout}) ->
+ Timeout;
+get_option(max_pipeline_length, #options{max_pipeline_length = Length}) ->
+ Length;
+get_option(keep_alive_timeout, #options{keep_alive_timeout = Timeout}) ->
+ Timeout;
+get_option(max_keep_alive_length, #options{max_keep_alive_length = Length}) ->
+ Length;
+get_option(max_sessions, #options{max_sessions = MaxSessions}) ->
+ MaxSessions;
+get_option(cookies, #options{cookies = Cookies}) ->
+ Cookies;
+get_option(verbose, #options{verbose = Verbose}) ->
+ Verbose;
+get_option(ipfamily, #options{ipfamily = IpFamily}) ->
+ IpFamily;
+get_option(ip, #options{ip = IP}) ->
+ IP;
+get_option(port, #options{port = Port}) ->
+ Port;
+get_option(socket_opts, #options{socket_opts = SocketOpts}) ->
+ SocketOpts.
+
get_proxy(Opts, #options{proxy = Default}) ->
proplists:get_value(proxy, Opts, Default).
diff --git a/lib/inets/src/http_client/httpc_response.erl b/lib/inets/src/http_client/httpc_response.erl
index 919115a23a..23924e355e 100644
--- a/lib/inets/src/http_client/httpc_response.erl
+++ b/lib/inets/src/http_client/httpc_response.erl
@@ -342,7 +342,7 @@ redirect(Response = {StatusLine, Headers, Body}, Request) ->
RedirUrl ->
UrlParseOpts = [{ipv6_host_with_brackets,
Request#request.ipv6_host_with_brackets}],
- case http_uri:parse(RedirUrl, UrlParseOpts) of
+ case uri_parse(RedirUrl, UrlParseOpts) of
{error, no_scheme} when
(Request#request.settings)#http_options.relaxed ->
NewLocation = fix_relative_uri(Request, RedirUrl),
@@ -437,3 +437,17 @@ format_response({StatusLine, Headers, Body}) ->
end,
{{StatusLine, http_response:header_list(Headers), NewBody}, Data}.
+%%--------------------------------------------------------------------------
+%% These functions is just simple wrappers to parse specifically HTTP URIs
+%%--------------------------------------------------------------------------
+
+scheme_defaults() ->
+ [{http, 80}, {https, 443}].
+
+uri_parse(URI, Opts) ->
+ http_uri:parse(URI, [{scheme_defaults, scheme_defaults()} | Opts]).
+
+
+%%--------------------------------------------------------------------------
+
+
diff --git a/lib/inets/src/http_lib/http_uri.erl b/lib/inets/src/http_lib/http_uri.erl
index 32c6305a79..5962001c3a 100644
--- a/lib/inets/src/http_lib/http_uri.erl
+++ b/lib/inets/src/http_lib/http_uri.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,39 +17,95 @@
%% %CopyrightEnd%
%%
%%
-%% RFC 3986
+%% This is from chapter 3, Syntax Components, of RFC 3986:
+%%
+%% The generic URI syntax consists of a hierarchical sequence of
+%% components referred to as the scheme, authority, path, query, and
+%% fragment.
+%%
+%% URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+%%
+%% hier-part = "//" authority path-abempty
+%% / path-absolute
+%% / path-rootless
+%% / path-empty
+%%
+%% The scheme and path components are required, though the path may be
+%% empty (no characters). When authority is present, the path must
+%% either be empty or begin with a slash ("/") character. When
+%% authority is not present, the path cannot begin with two slash
+%% characters ("//"). These restrictions result in five different ABNF
+%% rules for a path (Section 3.3), only one of which will match any
+%% given URI reference.
+%%
+%% The following are two example URIs and their component parts:
+%%
+%% foo://example.com:8042/over/there?name=ferret#nose
+%% \_/ \______________/\_________/ \_________/ \__/
+%% | | | | |
+%% scheme authority path query fragment
+%% | _____________________|__
+%% / \ / \
+%% urn:example:animal:ferret:nose
+%%
+%% scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+%% authority = [ userinfo "@" ] host [ ":" port ]
+%% userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
+%%
%%
-module(http_uri).
-export([parse/1, parse/2,
+ scheme_defaults/0,
encode/1, decode/1]).
+-export_type([scheme/0, default_scheme_port_number/0]).
+
%%%=========================================================================
%%% API
%%%=========================================================================
+
+-type scheme() :: atom().
+-type default_scheme_port_number() :: pos_integer().
+
+-spec scheme_defaults() ->
+ [{scheme(), default_scheme_port_number()}].
+
+scheme_defaults() ->
+ [{http, 80},
+ {https, 443},
+ {ftp, 21},
+ {ssh, 22},
+ {sftp, 22},
+ {tftp, 69}].
+
parse(AbsURI) ->
parse(AbsURI, []).
parse(AbsURI, Opts) ->
- case parse_scheme(AbsURI) of
+ case parse_scheme(AbsURI, Opts) of
{error, Reason} ->
{error, Reason};
- {Scheme, Rest} ->
- case (catch parse_uri_rest(Scheme, Rest, Opts)) of
- {UserInfo, Host, Port, Path, Query} ->
+ {Scheme, DefaultPort, Rest} ->
+ case (catch parse_uri_rest(Scheme, DefaultPort, Rest, Opts)) of
+ {ok, {UserInfo, Host, Port, Path, Query}} ->
{ok, {Scheme, UserInfo, Host, Port, Path, Query}};
+ {error, Reason} ->
+ {error, {Reason, Scheme, AbsURI}};
_ ->
- {error, {malformed_url, AbsURI}}
+ {error, {malformed_url, Scheme, AbsURI}}
end
end.
+reserved() ->
+ sets:from_list([$;, $:, $@, $&, $=, $+, $,, $/, $?,
+ $#, $[, $], $<, $>, $\", ${, $}, $|,
+ $\\, $', $^, $%, $ ]).
+
encode(URI) ->
- Reserved = sets:from_list([$;, $:, $@, $&, $=, $+, $,, $/, $?,
- $#, $[, $], $<, $>, $\", ${, $}, $|,
- $\\, $', $^, $%, $ ]),
- %% lists:append(lists:map(fun(Char) -> uri_encode(Char, Reserved) end, URI)).
+ Reserved = reserved(),
lists:append([uri_encode(Char, Reserved) || Char <- URI]).
decode(String) ->
@@ -67,20 +123,31 @@ do_decode([]) ->
%%% Internal functions
%%%========================================================================
-parse_scheme(AbsURI) ->
+which_scheme_defaults(Opts) ->
+ Key = scheme_defaults,
+ case lists:keysearch(Key, 1, Opts) of
+ {value, {Key, SchemeDefaults}} ->
+ SchemeDefaults;
+ false ->
+ scheme_defaults()
+ end.
+
+parse_scheme(AbsURI, Opts) ->
case split_uri(AbsURI, ":", {error, no_scheme}, 1, 1) of
{error, no_scheme} ->
{error, no_scheme};
- {StrScheme, Rest} ->
- case list_to_atom(http_util:to_lower(StrScheme)) of
- Scheme when (Scheme =:= http) orelse (Scheme =:= https) ->
- {Scheme, Rest};
- Scheme ->
- {error, {not_supported_scheme, Scheme}}
+ {SchemeStr, Rest} ->
+ Scheme = list_to_atom(http_util:to_lower(SchemeStr)),
+ SchemeDefaults = which_scheme_defaults(Opts),
+ case lists:keysearch(Scheme, 1, SchemeDefaults) of
+ {value, {Scheme, DefaultPort}} ->
+ {Scheme, DefaultPort, Rest};
+ false ->
+ {Scheme, no_default_port, Rest}
end
end.
-parse_uri_rest(Scheme, "//" ++ URIPart, Opts) ->
+parse_uri_rest(Scheme, DefaultPort, "//" ++ URIPart, Opts) ->
{Authority, PathQuery} =
case split_uri(URIPart, "/", URIPart, 1, 0) of
Split = {_, _} ->
@@ -93,26 +160,25 @@ parse_uri_rest(Scheme, "//" ++ URIPart, Opts) ->
{URIPart,""}
end
end,
-
{UserInfo, HostPort} = split_uri(Authority, "@", {"", Authority}, 1, 1),
- {Host, Port} = parse_host_port(Scheme, HostPort, Opts),
+ {Host, Port} = parse_host_port(Scheme, DefaultPort, HostPort, Opts),
{Path, Query} = parse_path_query(PathQuery),
- {UserInfo, Host, Port, Path, Query}.
+ {ok, {UserInfo, Host, Port, Path, Query}}.
parse_path_query(PathQuery) ->
{Path, Query} = split_uri(PathQuery, "\\?", {PathQuery, ""}, 1, 0),
{path(Path), Query}.
-parse_host_port(Scheme,"[" ++ HostPort, Opts) -> %ipv6
- DefaultPort = default_port(Scheme),
+%% In this version of the function, we no longer need
+%% the Scheme argument, but just in case...
+parse_host_port(_Scheme, DefaultPort, "[" ++ HostPort, Opts) -> %ipv6
{Host, ColonPort} = split_uri(HostPort, "\\]", {HostPort, ""}, 1, 1),
Host2 = maybe_ipv6_host_with_brackets(Host, Opts),
{_, Port} = split_uri(ColonPort, ":", {"", DefaultPort}, 0, 1),
{Host2, int_port(Port)};
-parse_host_port(Scheme, HostPort, _Opts) ->
- DefaultPort = default_port(Scheme),
+parse_host_port(_Scheme, DefaultPort, HostPort, _Opts) ->
{Host, Port} = split_uri(HostPort, ":", {HostPort, DefaultPort}, 1, 1),
{Host, int_port(Port)}.
@@ -133,15 +199,14 @@ maybe_ipv6_host_with_brackets(Host, Opts) ->
Host
end.
-default_port(http) ->
- 80;
-default_port(https) ->
- 443.
int_port(Port) when is_integer(Port) ->
Port;
int_port(Port) when is_list(Port) ->
- list_to_integer(Port).
+ list_to_integer(Port);
+%% This is the case where no port was found and there was no default port
+int_port(no_default_port) ->
+ throw({error, no_default_port}).
path("") ->
"/";
diff --git a/lib/inets/src/http_server/Makefile b/lib/inets/src/http_server/Makefile
index 55cc68dede..c341a2cec7 100644
--- a/lib/inets/src/http_server/Makefile
+++ b/lib/inets/src/http_server/Makefile
@@ -88,6 +88,8 @@ ERL_FILES = $(MODULES:%=%.erl)
TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INETS_FLAGS = -D'SERVER_SOFTWARE="$(APPLICATION)/$(VSN)"'
+
# ----------------------------------------------------
# FLAGS
diff --git a/lib/inets/src/http_server/httpd_conf.erl b/lib/inets/src/http_server/httpd_conf.erl
index 7646300409..b575d7331b 100644
--- a/lib/inets/src/http_server/httpd_conf.erl
+++ b/lib/inets/src/http_server/httpd_conf.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -210,12 +210,32 @@ load("MaxBodySize " ++ MaxBodySize, []) ->
{ok, Integer} ->
{ok, [], {max_body_size,Integer}};
{error, _} ->
- {error, ?NICE(clean(MaxBodySize)++
+ {error, ?NICE(clean(MaxBodySize) ++
" is an invalid number of MaxBodySize")}
end;
load("ServerName " ++ ServerName, []) ->
- {ok,[],{server_name,clean(ServerName)}};
+ {ok,[], {server_name, clean(ServerName)}};
+
+load("ServerTokens " ++ ServerTokens, []) ->
+ %% These are the valid *plain* server tokens:
+ %% sprod, major, minor, minimum, os, full
+ %% It can also be a "private" server token: private:<any string>
+ case string:tokens(ServerTokens, [$:]) of
+ ["private", Private] ->
+ {ok,[], {server_tokens, clean(Private)}};
+ [TokStr] ->
+ Tok = list_to_atom(clean(TokStr)),
+ case lists:member(Tok, [prod, major, minor, minimum, os, full]) of
+ true ->
+ {ok,[], {server_tokens, Tok}};
+ false ->
+ {error, ?NICE(clean(ServerTokens) ++
+ " is an invalid ServerTokens")}
+ end;
+ _ ->
+ {error, ?NICE(clean(ServerTokens) ++ " is an invalid ServerTokens")}
+ end;
load("SocketType " ++ SocketType, []) ->
%% ssl is the same as HTTP_DEFAULT_SSL_KIND
@@ -475,7 +495,7 @@ validate_properties(Properties) ->
validate_properties2(Properties) ->
case proplists:get_value(bind_address, Properties) of
undefined ->
- case proplists:get_value(sock_type, Properties, ip_comm) of
+ case proplists:get_value(sock_type, Properties, ip_comm) of
ip_comm ->
case proplists:get_value(ipfamily, Properties) of
undefined ->
@@ -537,6 +557,20 @@ validate_config_params([{server_name, Value} | Rest])
validate_config_params([{server_name, Value} | _]) ->
throw({server_name, Value});
+validate_config_params([{server_tokens, Value} | Rest])
+ when is_atom(Value) ->
+ case lists:member(Value, plain_server_tokens()) of
+ true ->
+ validate_config_params(Rest);
+ false ->
+ throw({server_tokens, Value})
+ end;
+validate_config_params([{server_tokens, {private, Value}} | Rest])
+ when is_list(Value) ->
+ validate_config_params(Rest);
+validate_config_params([{server_tokens, Value} | _]) ->
+ throw({server_tokens, Value});
+
validate_config_params([{socket_type, Value} | Rest])
when (Value =:= ip_comm) orelse
(Value =:= ssl) orelse
@@ -737,9 +771,73 @@ store({log_format, LogFormat}, _ConfigList)
store({log_format, LogFormat}, _ConfigList)
when (LogFormat =:= compact) orelse (LogFormat =:= pretty) ->
{ok, {log_format, LogFormat}};
+store({server_tokens, ServerTokens} = Entry, _ConfigList) ->
+ Server = server(ServerTokens),
+ {ok, [Entry, {server, Server}]};
store(ConfigListEntry, _ConfigList) ->
{ok, ConfigListEntry}.
+
+%% The SERVER_SOFTWARE macro has the following structure:
+%% <product>/<version>
+%% Example: "inets/1.2.3"
+%% So, with this example (on a linux machine, with OTP R15B),
+%% this will result in:
+%% prod: "inets"
+%% major: "inets/1"
+%% minor: "inets/1.2"
+%% minimal: "inets/1.2.3"
+%% os: "inets/1.2.3 (unix)
+%% full: "inets/1.2.3 (unix/linux) OTP/R15B"
+%% Note that the format of SERVER_SOFTWARE is that of 'minimal'.
+%% Also, there will always be atleast two digits in a version:
+%% Not just 1 but 1.0
+%%
+%% We have already checked that the value is valid,
+%% so there is no need to check enything here.
+%%
+server(prod = _ServerTokens) ->
+ [Prod|_Version] = string:tokens(?SERVER_SOFTWARE, [$/]),
+ Prod;
+server(major = _ServerTokens) ->
+ [Prod|Version] = string:tokens(?SERVER_SOFTWARE, [$/]),
+ [Major|_] = string:tokens(Version, [$.]),
+ Prod ++ "/" ++ Major;
+server(minor = _ServerTokens) ->
+ [Prod|Version] = string:tokens(?SERVER_SOFTWARE, [$/]),
+ [Major,Minor|_] = string:tokens(Version, [$.]),
+ Prod ++ "/" ++ Major ++ "." ++ Minor;
+server(minimal = _ServerTokens) ->
+ %% This is the default
+ ?SERVER_SOFTWARE;
+server(os = _ServerTokens) ->
+ OS = os_info(partial),
+ lists:flatten(io_lib:format("~s ~s", [?SERVER_SOFTWARE, OS]));
+server(full = _ServerTokens) ->
+ OTPRelease = otp_release(),
+ OS = os_info(full),
+ lists:flatten(
+ io_lib:format("~s ~s OTP/~s", [?SERVER_SOFTWARE, OS, OTPRelease]));
+server({private, Server} = _ServerTokens) when is_list(Server) ->
+ %% The user provide its own
+ Server;
+server(_) ->
+ ?SERVER_SOFTWARE.
+
+os_info(Info) ->
+ case os:type() of
+ {OsFamily, _OsName} when Info =:= partial ->
+ lists:flatten(io_lib:format("(~w)", [OsFamily]));
+ {OsFamily, OsName} ->
+ lists:flatten(io_lib:format("(~w/~w)", [OsFamily, OsName]));
+ OsFamily ->
+ lists:flatten(io_lib:format("(~w)", [OsFamily]))
+ end.
+
+otp_release() ->
+ erlang:system_info(otp_release).
+
+
%% Phase 3: Remove
remove_all(ConfigDB) ->
Modules = httpd_util:lookup(ConfigDB,modules,[]),
@@ -1159,6 +1257,10 @@ ssl_ca_certificate_file(ConfigDB) ->
[{cacertfile, File}]
end.
+plain_server_tokens() ->
+ [prod, major, minor, minimum, os, full].
+
error_report(Where,M,F,Error) ->
error_logger:error_report([{?MODULE, Where},
{apply, {M, F, []}}, Error]).
+
diff --git a/lib/inets/src/http_server/httpd_response.erl b/lib/inets/src/http_server/httpd_response.erl
index dd7223876e..2dedb088e4 100644
--- a/lib/inets/src/http_server/httpd_response.erl
+++ b/lib/inets/src/http_server/httpd_response.erl
@@ -144,10 +144,14 @@ send_response(ModData, Header, Body) ->
end
end.
-send_header(#mod{socket_type = Type, socket = Sock,
- http_version = Ver, connection = Conn} = _ModData,
+send_header(#mod{socket_type = Type,
+ socket = Sock,
+ http_version = Ver,
+ connection = Conn,
+ config_db = ConfigDb} = _ModData,
StatusCode, KeyValueTupleHeaders) ->
- Headers = create_header(lists:map(fun transform/1, KeyValueTupleHeaders)),
+ Headers = create_header(ConfigDb,
+ lists:map(fun transform/1, KeyValueTupleHeaders)),
NewVer = case {Ver, StatusCode} of
{[], _} ->
%% May be implicit!
@@ -275,13 +279,20 @@ cache_headers(#mod{config_db = Db}) ->
[]
end.
-create_header(KeyValueTupleHeaders) ->
- NewHeaders = add_default_headers([{"date", httpd_util:rfc1123_date()},
- {"content-type", "text/html"},
- {"server", ?SERVER_SOFTWARE}],
- KeyValueTupleHeaders),
+create_header(ConfigDb, KeyValueTupleHeaders) ->
+ Date = httpd_util:rfc1123_date(),
+ ContentType = "text/html",
+ Server = server(ConfigDb),
+ NewHeaders = add_default_headers([{"date", Date},
+ {"content-type", ContentType},
+ {"server", Server}],
+ KeyValueTupleHeaders),
lists:map(fun fix_header/1, NewHeaders).
+
+server(ConfigDb) ->
+ httpd_util:lookup(ConfigDb, server, ?SERVER_SOFTWARE).
+
fix_header({Key0, Value}) ->
%% make sure first letter is capital
Words1 = string:tokens(Key0, "-"),
diff --git a/lib/inets/src/http_server/httpd_script_env.erl b/lib/inets/src/http_server/httpd_script_env.erl
index d3115150b0..a5613ba4a4 100644
--- a/lib/inets/src/http_server/httpd_script_env.erl
+++ b/lib/inets/src/http_server/httpd_script_env.erl
@@ -50,29 +50,44 @@ create_env(ScriptType, ModData, ScriptElements) ->
%%%========================================================================
%%% Internal functions
%%%========================================================================
+
+which_server(#mod{config_db = ConfigDb}) ->
+ httpd_util:lookup(ConfigDb, server, ?SERVER_SOFTWARE).
+
+which_port(#mod{config_db = ConfigDb}) ->
+ httpd_util:lookup(ConfigDb, port, 80).
+
+which_peername(#mod{init_data = #init_data{peername = {_, RemoteAddr}}}) ->
+ RemoteAddr.
+
+which_resolve(#mod{init_data = #init_data{resolve = Resolve}}) ->
+ Resolve.
+
+which_method(#mod{method = Method}) ->
+ Method.
+
+which_request_uri(#mod{request_uri = RUri}) ->
+ RUri.
+
create_basic_elements(esi, ModData) ->
- {_, RemoteAddr} = (ModData#mod.init_data)#init_data.peername,
- [{server_software, ?SERVER_SOFTWARE},
- {server_name, (ModData#mod.init_data)#init_data.resolve},
- {gateway_interface,?GATEWAY_INTERFACE},
- {server_protocol, ?SERVER_PROTOCOL},
- {server_port, httpd_util:lookup(ModData#mod.config_db,port,80)},
- {request_method, ModData#mod.method},
- {remote_addr, RemoteAddr},
- {script_name, ModData#mod.request_uri}];
+ [{server_software, which_server(ModData)},
+ {server_name, which_resolve(ModData)},
+ {gateway_interface, ?GATEWAY_INTERFACE},
+ {server_protocol, ?SERVER_PROTOCOL},
+ {server_port, which_port(ModData)},
+ {request_method, which_method(ModData)},
+ {remote_addr, which_peername(ModData)},
+ {script_name, which_request_uri(ModData)}];
create_basic_elements(cgi, ModData) ->
- {_, RemoteAddr} = (ModData#mod.init_data)#init_data.peername,
- [{"SERVER_SOFTWARE",?SERVER_SOFTWARE},
- {"SERVER_NAME", (ModData#mod.init_data)#init_data.resolve},
- {"GATEWAY_INTERFACE",?GATEWAY_INTERFACE},
- {"SERVER_PROTOCOL",?SERVER_PROTOCOL},
- {"SERVER_PORT",
- integer_to_list(httpd_util:lookup(
- ModData#mod.config_db, port, 80))},
- {"REQUEST_METHOD", ModData#mod.method},
- {"REMOTE_ADDR", RemoteAddr},
- {"SCRIPT_NAME", ModData#mod.request_uri}].
+ [{"SERVER_SOFTWARE", which_server(ModData)},
+ {"SERVER_NAME", which_resolve(ModData)},
+ {"GATEWAY_INTERFACE", ?GATEWAY_INTERFACE},
+ {"SERVER_PROTOCOL", ?SERVER_PROTOCOL},
+ {"SERVER_PORT", integer_to_list(which_port(ModData))},
+ {"REQUEST_METHOD", which_method(ModData)},
+ {"REMOTE_ADDR", which_peername(ModData)},
+ {"SCRIPT_NAME", which_request_uri(ModData)}].
create_http_header_elements(ScriptType, Headers) ->
create_http_header_elements(ScriptType, Headers, []).
@@ -80,7 +95,7 @@ create_http_header_elements(ScriptType, Headers) ->
create_http_header_elements(_, [], Acc) ->
Acc;
create_http_header_elements(ScriptType, [{Name, [Value | _] = Values } |
- Headers], Acc)
+ Headers], Acc)
when is_list(Value) ->
NewName = lists:map(fun(X) -> if X == $- -> $_; true -> X end end, Name),
Element = http_env_element(ScriptType, NewName, multi_value(Values)),
diff --git a/lib/inets/src/http_server/httpd_sup.erl b/lib/inets/src/http_server/httpd_sup.erl
index 264dc9f006..8f3e8f9500 100644
--- a/lib/inets/src/http_server/httpd_sup.erl
+++ b/lib/inets/src/http_server/httpd_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -162,17 +162,30 @@ httpd_config([Value| _] = Config) when is_tuple(Value) ->
httpd_child_spec([Value| _] = Config, AcceptTimeout, Debug)
when is_tuple(Value) ->
+ ?hdrt("httpd_child_spec - entry", [{accept_timeout, AcceptTimeout},
+ {debug, Debug}]),
Address = proplists:get_value(bind_address, Config, any),
Port = proplists:get_value(port, Config, 80),
httpd_child_spec(Config, AcceptTimeout, Debug, Address, Port);
-httpd_child_spec(ConfigFile, AcceptTimeout, Debug) ->
+%% In this case the AcceptTimeout and Debug will only have default values...
+httpd_child_spec(ConfigFile, AcceptTimeoutDef, DebugDef) ->
+ ?hdrt("httpd_child_spec - entry", [{config_file, ConfigFile},
+ {accept_timeout_def, AcceptTimeoutDef},
+ {debug_def, DebugDef}]),
case httpd_conf:load(ConfigFile) of
{ok, ConfigList} ->
+ ?hdrt("httpd_child_spec - loaded", [{config_list, ConfigList}]),
case (catch httpd_conf:validate_properties(ConfigList)) of
{ok, Config} ->
+ ?hdrt("httpd_child_spec - validated", [{config, Config}]),
Address = proplists:get_value(bind_address, Config, any),
Port = proplists:get_value(port, Config, 80),
+ AcceptTimeout =
+ proplists:get_value(accept_timeout, Config,
+ AcceptTimeoutDef),
+ Debug =
+ proplists:get_value(debug, Config, DebugDef),
httpd_child_spec([{file, ConfigFile} | Config],
AcceptTimeout, Debug, Address, Port);
Error ->
@@ -183,7 +196,7 @@ httpd_child_spec(ConfigFile, AcceptTimeout, Debug) ->
end.
httpd_child_spec(Config, AcceptTimeout, Debug, Addr, Port) ->
- case Port == 0 orelse proplists:is_defined(fd, Config) of
+ case (Port =:= 0) orelse proplists:is_defined(fd, Config) of
true ->
httpd_child_spec_listen(Config, AcceptTimeout, Debug, Addr, Port);
false ->
diff --git a/lib/inets/src/http_server/mod_get.erl b/lib/inets/src/http_server/mod_get.erl
index 5cb30e3d97..c58d1f3508 100644
--- a/lib/inets/src/http_server/mod_get.erl
+++ b/lib/inets/src/http_server/mod_get.erl
@@ -18,9 +18,16 @@
%%
%%
-module(mod_get).
+
-export([do/1]).
+
-include("httpd.hrl").
-include("httpd_internal.hrl").
+-include("inets_internal.hrl").
+
+-define(VMODULE,"GET").
+
+
%% do
do(Info) ->
@@ -84,15 +91,16 @@ send_response(_Socket, _SocketType, Path, Info)->
file:close(FileDescriptor),
{proceed,[{response,{already_sent,200,
FileInfo#file_info.size}},
- {mime_type,MimeType}|Info#mod.data]};
+ {mime_type,MimeType} | Info#mod.data]};
{error, Reason} ->
+ ?hdrt("send_response -> failed open file",
+ [{path, Path}, {reason, Reason}]),
Status = httpd_file:handle_error(Reason, "open", Info, Path),
- {proceed,
- [{status, Status}| Info#mod.data]}
+ {proceed, [{status, Status} | Info#mod.data]}
end.
%% send
-
+
send(#mod{socket = Socket, socket_type = SocketType} = Info,
StatusCode, Headers, FileDescriptor) ->
?DEBUG("send -> send header",[]),
diff --git a/lib/inets/src/inets_app/Makefile b/lib/inets/src/inets_app/Makefile
index d99e33b4ea..6da6a1d79f 100644
--- a/lib/inets/src/inets_app/Makefile
+++ b/lib/inets/src/inets_app/Makefile
@@ -46,7 +46,8 @@ MODULES = \
inets_service \
inets_app \
inets_sup \
- inets_regexp
+ inets_regexp \
+ inets_trace
INTERNAL_HRL_FILES = inets_internal.hrl
EXTERNAL_HRL_FILES = ../../include/httpd.hrl \
diff --git a/lib/inets/src/inets_app/inets.app.src b/lib/inets/src/inets_app/inets.app.src
index 1db7ed2c30..4aea2ef3d7 100644
--- a/lib/inets/src/inets_app/inets.app.src
+++ b/lib/inets/src/inets_app/inets.app.src
@@ -18,14 +18,15 @@
%%
{application,inets,
- [{description,"INETS CXC 138 49"},
- {vsn,"%VSN%"},
+ [{description, "INETS CXC 138 49"},
+ {vsn, "%VSN%"},
{modules,[
inets,
inets_sup,
inets_app,
inets_service,
inets_regexp,
+ inets_trace,
%% FTP
ftp,
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index e80cb2a23b..c7029f7b31 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -18,65 +18,115 @@
{"%VSN%",
[
+ {"5.8.1",
+ [
+ {load_module, http_uri, soft_purge, soft_purge, []},
+ {load_module, httpc_response, soft_purge, soft_purge, [http_uri]},
+
+ {load_module, httpc, soft_purge, soft_purge,
+ [http_uri, httpc_manager]},
+ {update, httpc_manager, soft, soft_purge, soft_purge, [http_uri]},
+
+ {load_module, inets_app, soft_purge, soft_purge, [inets_sup]},
+ {update, inets_sup, soft, soft_purge, soft_purge, []},
+
+ {load_module, httpd_conf, soft_purge, soft_purge, []},
+ {load_module, httpd_response, soft_purge, soft_purge, []},
+ {load_module, httpd_script_env, soft_purge, soft_purge, []},
+
+ {load_module, inets, soft_purge, soft_purge, [inets_trace]},
+ {update, httpc_handler, soft, soft_purge, soft_purge, []},
+ {update, httpd_sup, soft, soft_purge, soft_purge, []},
+ {add_module, inets_trace}
+ ]
+ },
{"5.8",
[
+ {load_module, http_uri, soft_purge, soft_purge, []},
+ {load_module, httpc_response, soft_purge, soft_purge, [http_uri]},
+
+ {load_module, httpc, soft_purge, soft_purge,
+ [http_uri, httpc_manager]},
+
+ {load_module, inets_app, soft_purge, soft_purge, [inets_sup]},
+ {update, inets_sup, soft, soft_purge, soft_purge, []},
+
+ {load_module, inets, soft_purge, soft_purge, [inets_trace]},
+
+ {load_module, httpd_conf, soft_purge, soft_purge, []},
+ {load_module, httpd_response, soft_purge, soft_purge, []},
+ {load_module, httpd_script_env, soft_purge, soft_purge, []},
+
{load_module, ftp, soft_purge, soft_purge, []},
{update, httpc_handler, {advanced, upgrade_from_pre_5_8_1},
soft_purge, soft_purge, []},
{update, httpc_manager, {advanced, upgrade_from_pre_5_8_1},
- soft_purge, soft_purge, [httpc_handler]}
+ soft_purge, soft_purge, [http_uri, httpc_handler]},
+ {update, httpd_sup, soft, soft_purge, soft_purge, []},
+
+ {add_module, inets_trace}
]
},
{"5.7.2",
[
{restart_application, inets}
]
- },
- {"5.7.1",
- [
- {restart_application, inets}
- ]
- },
- {"5.7",
+ }
+ ],
+ [
+ {"5.8.1",
[
- {restart_application, inets}
+ {load_module, http_uri, soft_purge, soft_purge, []},
+ {load_module, httpc_response, soft_purge, soft_purge, [http_uri]},
+
+ {load_module, httpc, soft_purge, soft_purge,
+ [http_uri, httpc_manager]},
+ {update, httpc_manager, soft, soft_purge, soft_purge, [http_uri]},
+
+ {load_module, inets_app, soft_purge, soft_purge, [inets_sup]},
+ {update, inets_sup, soft, soft_purge, soft_purge, []},
+
+ {load_module, httpd_conf, soft_purge, soft_purge, []},
+ {load_module, httpd_response, soft_purge, soft_purge, []},
+ {load_module, httpd_script_env, soft_purge, soft_purge, []},
+
+ {load_module, inets, soft_purge, soft_purge, []},
+ {update, httpc_handler, soft, soft_purge, soft_purge, []},
+ {update, httpd_sup, soft, soft_purge, soft_purge, []},
+ {remove, {inets_trace, soft_purge, brutal_purge}}
]
},
- {"5.6",
- [
- {restart_application, inets}
- ]
- }
- ],
- [
{"5.8",
[
+ {load_module, http_uri, soft_purge, soft_purge, []},
+ {load_module, httpc_response, soft_purge, soft_purge, [http_uri]},
+
+ {load_module, httpc, soft_purge, soft_purge,
+ [http_uri, httpc_manager]},
+
+ {load_module, inets_app, soft_purge, soft_purge, [inets_sup]},
+ {update, inets_sup, soft, soft_purge, soft_purge, []},
+
+ {load_module, inets, soft_purge, soft_purge, []},
+
+ {load_module, httpd_conf, soft_purge, soft_purge, []},
+ {load_module, httpd_response, soft_purge, soft_purge, []},
+ {load_module, httpd_script_env, soft_purge, soft_purge, []},
+
{load_module, ftp, soft_purge, soft_purge, []},
{update, httpc_handler, {advanced, upgrade_from_pre_5_8_1},
soft_purge, soft_purge, []},
{update, httpc_manager, {advanced, upgrade_from_pre_5_8_1},
- soft_purge, soft_purge, [httpc_handler]}
+ soft_purge, soft_purge, [http_uri, httpc_handler]},
+ {update, httpd_sup, soft, soft_purge, soft_purge, []},
+
+ {remove, {inets_trace, soft_purge, brutal_purge}}
]
},
{"5.7.2",
[
{restart_application, inets}
]
- },
- {"5.7.1",
- [
- {restart_application, inets}
- ]
- },
- {"5.7",
- [
- {restart_application, inets}
- ]
- },
- {"5.6",
- [
- {restart_application, inets}
- ]
}
]
}.
diff --git a/lib/inets/src/inets_app/inets.erl b/lib/inets/src/inets_app/inets.erl
index 054468e445..8e79f8d456 100644
--- a/lib/inets/src/inets_app/inets.erl
+++ b/lib/inets/src/inets_app/inets.erl
@@ -28,7 +28,7 @@
stop/0, stop/2,
services/0, services_info/0,
service_names/0]).
--export([enable_trace/2, enable_trace/3, disable_trace/0, set_trace/1,
+-export([enable_trace/2, enable_trace/3, disable_trace/0, set_trace/1,
report_event/4]).
-export([versions/0,
print_version_info/0, print_version_info/1]).
@@ -409,47 +409,8 @@ service_names() ->
%% Severity withing Limit) will be written to stdout using io:format.
%%
%%-----------------------------------------------------------------
-enable_trace(Level, Dest) ->
- enable_trace(Level, Dest, all).
-
-enable_trace(Level, Dest, Service) ->
- case valid_trace_service(Service) of
- true ->
- enable_trace2(Level, Dest, Service);
- false ->
- {error, {invalid_service, Service}}
- end.
-
-enable_trace2(Level, File, Service)
- when is_list(File) ->
- case file:open(File, [write]) of
- {ok, Fd} ->
- HandleSpec = {fun handle_trace/2, {Service, Fd}},
- do_enable_trace(Level, process, HandleSpec);
- Err ->
- Err
- end;
-enable_trace2(Level, Port, _) when is_integer(Port) ->
- do_enable_trace(Level, port, dbg:trace_port(ip, Port));
-enable_trace2(Level, io, Service) ->
- HandleSpec = {fun handle_trace/2, {Service, standard_io}},
- do_enable_trace(Level, process, HandleSpec);
-enable_trace2(Level, {Fun, _Data} = HandleSpec, _) when is_function(Fun) ->
- do_enable_trace(Level, process, HandleSpec).
-
-do_enable_trace(Level, Type, HandleSpec) ->
- case dbg:tracer(Type, HandleSpec) of
- {ok, _} ->
- set_trace(Level),
- ok;
- Error ->
- Error
- end.
-
-valid_trace_service(all) ->
- true;
-valid_trace_service(Service) ->
- lists:member(Service, [httpc, httpd, ftpc, tftp]).
+enable_trace(Level, Dest) -> inets_trace:enable(Level, Dest).
+enable_trace(Level, Dest, Service) -> inets_trace:enable(Level, Dest, Service).
%%-----------------------------------------------------------------
@@ -458,12 +419,7 @@ valid_trace_service(Service) ->
%% Description:
%% This function is used to stop tracing.
%%-----------------------------------------------------------------
-disable_trace() ->
- %% This is to make handle_trace/2 close the output file (if the
- %% event gets there before dbg closes)
- inets:report_event(100, "stop trace", stop_trace, [stop_trace]),
- dbg:stop().
-
+disable_trace() -> inets_trace:disable().
%%-----------------------------------------------------------------
@@ -476,60 +432,7 @@ disable_trace() ->
%% This function is used to change the trace level when tracing has
%% already been started.
%%-----------------------------------------------------------------
-set_trace(Level) ->
- set_trace(Level, all).
-
-set_trace(Level, Service) ->
- Pat = make_pattern(?MODULE, Service, Level),
- change_pattern(Pat).
-
-make_pattern(Mod, Service, Level)
- when is_atom(Mod) andalso is_atom(Service) ->
- case Level of
- min ->
- {Mod, Service, []};
- max ->
- Head = ['$1', '_', '_', '_'],
- Body = [],
- Cond = [],
- {Mod, Service, [{Head, Cond, Body}]};
- DetailLevel when is_integer(DetailLevel) ->
- Head = ['$1', '_', '_', '_'],
- Body = [],
- Cond = [{ '=<', '$1', DetailLevel}],
- {Mod, Service, [{Head, Cond, Body}]};
- _ ->
- exit({bad_level, Level})
- end.
-
-change_pattern({Mod, Service, Pattern})
- when is_atom(Mod) andalso is_atom(Service) ->
- MFA = {Mod, report_event, 4},
- case Pattern of
- [] ->
- try
- error_to_exit(ctp, dbg:ctp(MFA)),
- error_to_exit(p, dbg:p(all, clear))
- catch
- exit:{Where, Reason} ->
- {error, {Where, Reason}}
- end;
- List when is_list(List) ->
- try
- error_to_exit(ctp, dbg:ctp(MFA)),
- error_to_exit(tp, dbg:tp(MFA, Pattern)),
- error_to_exit(p, dbg:p(all, [call, timestamp]))
- catch
- exit:{Where, Reason} ->
- {error, {Where, Reason}}
- end
- end,
- ok.
-
-error_to_exit(_Where, {ok, _} = OK) ->
- OK;
-error_to_exit(Where, {error, Reason}) ->
- exit({Where, Reason}).
+set_trace(Level) -> inets_trace:set_level(Level).
%%-----------------------------------------------------------------
@@ -546,164 +449,8 @@ error_to_exit(Where, {error, Reason}) ->
%% put trace on this function.
%%-----------------------------------------------------------------
-report_event(Severity, Label, Service, Content)
- when (is_integer(Severity) andalso
- (Severity >= 0) andalso (100 >= Severity)) andalso
- is_list(Label) andalso
- is_atom(Service) andalso
- is_list(Content) ->
- hopefully_traced.
-
-
-%% ----------------------------------------------------------------------
-%% handle_trace(Event, Fd) -> Verbosity
-%%
-%% Parameters:
-%% Event -> The trace event (only megaco 'trace_ts' events are printed)
-%% Fd -> standard_io | file_descriptor() | trace_port()
-%%
-%% Description:
-%% This function is used to "receive" and print the trace events.
-%% Events are printed if:
-%% - Verbosity is max
-%% - Severity is =< Verbosity (e.g. Severity = 30, and Verbosity = 40)
-%% Events are not printed if:
-%% - Verbosity is min
-%% - Severity is > Verbosity
-%%-----------------------------------------------------------------
-
-handle_trace(_, closed_file = Fd) ->
- Fd;
-handle_trace({trace_ts, _Who, call,
- {?MODULE, report_event,
- [_Sev, "stop trace", stop_trace, [stop_trace]]},
- Timestamp},
- {_, standard_io} = Fd) ->
- (catch io:format(standard_io, "stop trace at ~s~n", [format_timestamp(Timestamp)])),
- Fd;
-handle_trace({trace_ts, _Who, call,
- {?MODULE, report_event,
- [_Sev, "stop trace", stop_trace, [stop_trace]]},
- Timestamp},
- standard_io = Fd) ->
- (catch io:format(Fd, "stop trace at ~s~n", [format_timestamp(Timestamp)])),
- Fd;
-handle_trace({trace_ts, _Who, call,
- {?MODULE, report_event,
- [_Sev, "stop trace", stop_trace, [stop_trace]]},
- Timestamp},
- {_Service, Fd}) ->
- (catch io:format(Fd, "stop trace at ~s~n", [format_timestamp(Timestamp)])),
- (catch file:close(Fd)),
- closed_file;
-handle_trace({trace_ts, _Who, call,
- {?MODULE, report_event,
- [_Sev, "stop trace", stop_trace, [stop_trace]]},
- Timestamp},
- Fd) ->
- (catch io:format(Fd, "stop trace at ~s~n", [format_timestamp(Timestamp)])),
- (catch file:close(Fd)),
- closed_file;
-handle_trace({trace_ts, Who, call,
- {?MODULE, report_event,
- [Sev, Label, Service, Content]}, Timestamp},
- Fd) ->
- (catch print_inets_trace(Fd, Sev, Timestamp, Who,
- Label, Service, Content)),
- Fd;
-handle_trace(Event, Fd) ->
- (catch print_trace(Fd, Event)),
- Fd.
-
-
-print_inets_trace({Service, Fd},
- Sev, Timestamp, Who, Label, Service, Content) ->
- do_print_inets_trace(Fd, Sev, Timestamp, Who, Label, Service, Content);
-print_inets_trace({ServiceA, Fd},
- Sev, Timestamp, Who, Label, ServiceB, Content)
- when (ServiceA =:= all) ->
- do_print_inets_trace(Fd, Sev, Timestamp, Who, Label, ServiceB, Content);
-print_inets_trace({ServiceA, _Fd},
- _Sev, _Timestamp, _Who, _Label, ServiceB, _Content)
- when ServiceA =/= ServiceB ->
- ok;
-print_inets_trace(Fd, Sev, Timestamp, Who, Label, Service, Content) ->
- do_print_inets_trace(Fd, Sev, Timestamp, Who, Label, Service, Content).
-
-do_print_inets_trace(Fd, Sev, Timestamp, Who, Label, Service, Content) ->
- Ts = format_timestamp(Timestamp),
- io:format(Fd, "[inets ~w trace ~w ~w ~s] ~s "
- "~n Content: ~p"
- "~n",
- [Service, Sev, Who, Ts, Label, Content]).
-
-print_trace({_, Fd}, Event) ->
- do_print_trace(Fd, Event);
-print_trace(Fd, Event) ->
- do_print_trace(Fd, Event).
-
-do_print_trace(Fd, {trace, Who, What, Where}) ->
- io:format(Fd, "[trace]"
- "~n Who: ~p"
- "~n What: ~p"
- "~n Where: ~p"
- "~n", [Who, What, Where]);
-
-do_print_trace(Fd, {trace, Who, What, Where, Extra}) ->
- io:format(Fd, "[trace]"
- "~n Who: ~p"
- "~n What: ~p"
- "~n Where: ~p"
- "~n Extra: ~p"
- "~n", [Who, What, Where, Extra]);
-
-do_print_trace(Fd, {trace_ts, Who, What, Where, When}) ->
- Ts = format_timestamp(When),
- io:format(Fd, "[trace ~s]"
- "~n Who: ~p"
- "~n What: ~p"
- "~n Where: ~p"
- "~n", [Ts, Who, What, Where]);
-
-do_print_trace(Fd, {trace_ts, Who, What, Where, Extra, When}) ->
- Ts = format_timestamp(When),
- io:format(Fd, "[trace ~s]"
- "~n Who: ~p"
- "~n What: ~p"
- "~n Where: ~p"
- "~n Extra: ~p"
- "~n", [Ts, Who, What, Where, Extra]);
-
-do_print_trace(Fd, {seq_trace, What, Where}) ->
- io:format(Fd, "[seq trace]"
- "~n What: ~p"
- "~n Where: ~p"
- "~n", [What, Where]);
-
-do_print_trace(Fd, {seq_trace, What, Where, When}) ->
- Ts = format_timestamp(When),
- io:format(Fd, "[seq trace ~s]"
- "~n What: ~p"
- "~n Where: ~p"
- "~n", [Ts, What, Where]);
-
-do_print_trace(Fd, {drop, Num}) ->
- io:format(Fd, "[drop trace] ~p~n", [Num]);
-
-do_print_trace(Fd, Trace) ->
- io:format(Fd, "[trace] "
- "~n ~p"
- "~n", [Trace]).
-
-
-format_timestamp({_N1, _N2, N3} = Now) ->
- {Date, Time} = calendar:now_to_datetime(Now),
- {YYYY,MM,DD} = Date,
- {Hour,Min,Sec} = Time,
- FormatDate =
- io_lib:format("~.4w:~.2.0w:~.2.0w ~.2.0w:~.2.0w:~.2.0w 4~w",
- [YYYY,MM,DD,Hour,Min,Sec,round(N3/1000)]),
- lists:flatten(FormatDate).
+report_event(Severity, Label, Service, Content) ->
+ inets_trace:report_event(Severity, Label, Service, Content).
%%--------------------------------------------------------------------
diff --git a/lib/inets/src/inets_app/inets.mk b/lib/inets/src/inets_app/inets.mk
index 194b4ca2b1..d24cc0aea3 100644
--- a/lib/inets/src/inets_app/inets.mk
+++ b/lib/inets/src/inets_app/inets.mk
@@ -41,8 +41,6 @@ INETS_APP_VSN_COMPILE_FLAGS = \
+'{parse_transform,sys_pre_attributes}' \
+'{attribute,insert,app_vsn,$(APP_VSN)}'
-INETS_FLAGS = -D'SERVER_SOFTWARE="$(APPLICATION)/$(VSN)"'
-
INETS_ERL_COMPILE_FLAGS += \
-pa $(ERL_TOP)/lib/inets/ebin \
$(INETS_APP_VSN_COMPILE_FLAGS)
diff --git a/lib/inets/src/inets_app/inets_app.erl b/lib/inets/src/inets_app/inets_app.erl
index cae79a6767..77c39d85eb 100644
--- a/lib/inets/src/inets_app/inets_app.erl
+++ b/lib/inets/src/inets_app/inets_app.erl
@@ -24,7 +24,7 @@
-export([start/2, stop/1]).
start(_Type, _State) ->
- supervisor:start_link({local, inets_sup}, inets_sup, []).
+ inets_sup:start_link().
stop(_State) ->
ok.
diff --git a/lib/inets/src/inets_app/inets_internal.hrl b/lib/inets/src/inets_app/inets_internal.hrl
index 55c3669e4a..e56af3b59d 100644
--- a/lib/inets/src/inets_app/inets_internal.hrl
+++ b/lib/inets/src/inets_app/inets_internal.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,8 +24,8 @@
%% Various trace macros
-define(report(Severity, Label, Service, Content),
- inets:report_event(Severity, Label, Service,
- [{module, ?MODULE}, {line, ?LINE} | Content])).
+ inets_trace:report_event(Severity, Label, Service,
+ [{module, ?MODULE}, {line, ?LINE} | Content])).
-define(report_important(Label, Service, Content),
?report(20, Label, Service, Content)).
-define(report_verbose(Label, Service, Content),
diff --git a/lib/inets/src/inets_app/inets_sup.erl b/lib/inets/src/inets_app/inets_sup.erl
index 20d5ef343e..0382362778 100644
--- a/lib/inets/src/inets_app/inets_sup.erl
+++ b/lib/inets/src/inets_app/inets_sup.erl
@@ -25,9 +25,19 @@
-behaviour(supervisor).
+%% External API
+-export([start_link/0]).
+
+%% Supervisor callbacks
-export([init/1]).
%%%=========================================================================
+%%% External functions
+%%%=========================================================================
+start_link() ->
+ supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+
+%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
init([]) ->
diff --git a/lib/inets/src/inets_app/inets_trace.erl b/lib/inets/src/inets_app/inets_trace.erl
new file mode 100644
index 0000000000..8911f65897
--- /dev/null
+++ b/lib/inets/src/inets_app/inets_trace.erl
@@ -0,0 +1,357 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+%%----------------------------------------------------------------------
+%% Purpose: Module for debug trace functions of the inets application
+%%----------------------------------------------------------------------
+
+-module(inets_trace).
+
+%% API
+-export([enable/2, enable/3,
+ disable/0,
+ set_level/1, set_level/2,
+ report_event/4]).
+
+
+%%====================================================================
+%% API
+%%====================================================================
+
+%%-----------------------------------------------------------------
+%% enable(Level, Destination) -> void()
+%% enable(Level, Destination, Service) -> void()
+%%
+%% Parameters:
+%% Level -> max | min | integer()
+%% Destination -> File | Port | io | HandlerSpec
+%% Service -> httpc | httpd | ftpc | tftp | all
+%% File -> string()
+%% Port -> integer()
+%% Verbosity -> true | false
+%% HandlerSpec = {function(), Data}
+%% Data = term()
+%%
+%% Description:
+%% This function is used to start tracing at level Level and send
+%% the result either to the file File, the port Port or to a
+%% trace handler.
+%% Note that it starts a tracer server.
+%% When Destination is the atom io (or the tuple {io, Verbosity}),
+%% all (printable) inets trace events (trace_ts events which has
+%% Severity withing Limit) will be written to stdout using io:format.
+%%
+%%-----------------------------------------------------------------
+enable(Level, Dest) ->
+ enable(Level, Dest, all).
+
+enable(Level, Dest, Service) ->
+ case valid_trace_service(Service) of
+ true ->
+ enable2(Level, Dest, Service);
+ false ->
+ {error, {invalid_service, Service}}
+ end.
+
+enable2(Level, File, Service)
+ when is_list(File) ->
+ case file:open(File, [write]) of
+ {ok, Fd} ->
+ HandleSpec = {fun handle_trace/2, {Service, Fd}},
+ do_enable(Level, process, HandleSpec);
+ Err ->
+ Err
+ end;
+enable2(Level, Port, _) when is_integer(Port) ->
+ do_enable(Level, port, dbg:trace_port(ip, Port));
+enable2(Level, io, Service) ->
+ HandleSpec = {fun handle_trace/2, {Service, standard_io}},
+ do_enable(Level, process, HandleSpec);
+enable2(Level, {Fun, _Data} = HandleSpec, _) when is_function(Fun) ->
+ do_enable(Level, process, HandleSpec).
+
+do_enable(Level, Type, HandleSpec) ->
+ case dbg:tracer(Type, HandleSpec) of
+ {ok, _} ->
+ set_level(Level),
+ ok;
+ Error ->
+ Error
+ end.
+
+valid_trace_service(all) ->
+ true;
+valid_trace_service(Service) ->
+ lists:member(Service, [httpc, httpd, ftpc, tftp]).
+
+
+%%-----------------------------------------------------------------
+%% disable() -> void()
+%%
+%% Description:
+%% This function is used to stop tracing.
+%%-----------------------------------------------------------------
+
+disable() ->
+ %% This is to make handle_trace/2 close the output file (if the
+ %% event gets there before dbg closes)
+ inets_trace:report_event(100, "stop trace", stop_trace, [stop_trace]),
+ dbg:stop().
+
+
+
+%%-----------------------------------------------------------------
+%% set_level(Level) -> void()
+%%
+%% Parameters:
+%% Level -> max | min | integer()
+%%
+%% Description:
+%% This function is used to change the trace level when tracing has
+%% already been started.
+%%-----------------------------------------------------------------
+set_level(Level) ->
+ set_level(Level, all).
+
+set_level(Level, Service) ->
+ Pat = make_pattern(?MODULE, Service, Level),
+ change_pattern(Pat).
+
+make_pattern(Mod, Service, Level)
+ when is_atom(Mod) andalso is_atom(Service) ->
+ case Level of
+ min ->
+ {Mod, Service, []};
+ max ->
+ Head = ['$1', '_', '_', '_'],
+ Body = [],
+ Cond = [],
+ {Mod, Service, [{Head, Cond, Body}]};
+ DetailLevel when is_integer(DetailLevel) ->
+ Head = ['$1', '_', '_', '_'],
+ Body = [],
+ Cond = [{ '=<', '$1', DetailLevel}],
+ {Mod, Service, [{Head, Cond, Body}]};
+ _ ->
+ exit({bad_level, Level})
+ end.
+
+change_pattern({Mod, Service, Pattern})
+ when is_atom(Mod) andalso is_atom(Service) ->
+ MFA = {Mod, report_event, 4},
+ case Pattern of
+ [] ->
+ try
+ error_to_exit(ctp, dbg:ctp(MFA)),
+ error_to_exit(p, dbg:p(all, clear))
+ catch
+ exit:{Where, Reason} ->
+ {error, {Where, Reason}}
+ end;
+ List when is_list(List) ->
+ try
+ error_to_exit(ctp, dbg:ctp(MFA)),
+ error_to_exit(tp, dbg:tp(MFA, Pattern)),
+ error_to_exit(p, dbg:p(all, [call, timestamp]))
+ catch
+ exit:{Where, Reason} ->
+ {error, {Where, Reason}}
+ end
+ end.
+
+error_to_exit(_Where, {ok, _} = OK) ->
+ OK;
+error_to_exit(Where, {error, Reason}) ->
+ exit({Where, Reason}).
+
+
+%%-----------------------------------------------------------------
+%% report_event(Severity, Label, Service, Content)
+%%
+%% Parameters:
+%% Severity -> 0 =< integer() =< 100
+%% Label -> string()
+%% Service -> httpd | httpc | ftp | tftp
+%% Content -> [{tag, term()}]
+%%
+%% Description:
+%% This function is used to generate trace events, that is,
+%% put trace on this function.
+%%-----------------------------------------------------------------
+
+report_event(Severity, Label, Service, Content)
+ when (is_integer(Severity) andalso
+ (Severity >= 0) andalso (100 >= Severity)) andalso
+ is_list(Label) andalso
+ is_atom(Service) andalso
+ is_list(Content) ->
+ hopefully_traced.
+
+
+%% ----------------------------------------------------------------------
+%% handle_trace(Event, Fd) -> Verbosity
+%%
+%% Parameters:
+%% Event -> The trace event
+%% Fd -> standard_io | file_descriptor() | trace_port()
+%%
+%% Description:
+%% This function is used to "receive" and pretty print the trace events.
+%% Events are printed if:
+%% - Verbosity is max
+%% - Severity is =< Verbosity (e.g. Severity = 30, and Verbosity = 40)
+%% Events are not printed if:
+%% - Verbosity is min
+%% - Severity is > Verbosity
+%%-----------------------------------------------------------------
+
+handle_trace(_, closed_file = Fd) ->
+ Fd;
+handle_trace({trace_ts, _Who, call,
+ {?MODULE, report_event,
+ [_Sev, "stop trace", stop_trace, [stop_trace]]},
+ Timestamp},
+ {_, standard_io} = Fd) ->
+ (catch io:format(standard_io, "stop trace at ~s~n", [format_timestamp(Timestamp)])),
+ Fd;
+handle_trace({trace_ts, _Who, call,
+ {?MODULE, report_event,
+ [_Sev, "stop trace", stop_trace, [stop_trace]]},
+ Timestamp},
+ standard_io = Fd) ->
+ (catch io:format(Fd, "stop trace at ~s~n", [format_timestamp(Timestamp)])),
+ Fd;
+handle_trace({trace_ts, _Who, call,
+ {?MODULE, report_event,
+ [_Sev, "stop trace", stop_trace, [stop_trace]]},
+ Timestamp},
+ {_Service, Fd}) ->
+ (catch io:format(Fd, "stop trace at ~s~n", [format_timestamp(Timestamp)])),
+ (catch file:close(Fd)),
+ closed_file;
+handle_trace({trace_ts, _Who, call,
+ {?MODULE, report_event,
+ [_Sev, "stop trace", stop_trace, [stop_trace]]},
+ Timestamp},
+ Fd) ->
+ (catch io:format(Fd, "stop trace at ~s~n", [format_timestamp(Timestamp)])),
+ (catch file:close(Fd)),
+ closed_file;
+handle_trace({trace_ts, Who, call,
+ {?MODULE, report_event,
+ [Sev, Label, Service, Content]}, Timestamp},
+ Fd) ->
+ (catch print_inets_trace(Fd, Sev, Timestamp, Who,
+ Label, Service, Content)),
+ Fd;
+handle_trace(Event, Fd) ->
+ (catch print_trace(Fd, Event)),
+ Fd.
+
+
+print_inets_trace({Service, Fd},
+ Sev, Timestamp, Who, Label, Service, Content) ->
+ do_print_inets_trace(Fd, Sev, Timestamp, Who, Label, Service, Content);
+print_inets_trace({ServiceA, Fd},
+ Sev, Timestamp, Who, Label, ServiceB, Content)
+ when (ServiceA =:= all) ->
+ do_print_inets_trace(Fd, Sev, Timestamp, Who, Label, ServiceB, Content);
+print_inets_trace({ServiceA, _Fd},
+ _Sev, _Timestamp, _Who, _Label, ServiceB, _Content)
+ when ServiceA =/= ServiceB ->
+ ok;
+print_inets_trace(Fd, Sev, Timestamp, Who, Label, Service, Content) ->
+ do_print_inets_trace(Fd, Sev, Timestamp, Who, Label, Service, Content).
+
+do_print_inets_trace(Fd, Sev, Timestamp, Who, Label, Service, Content) ->
+ Ts = format_timestamp(Timestamp),
+ io:format(Fd, "[inets ~w trace ~w ~w ~s] ~s "
+ "~n Content: ~p"
+ "~n",
+ [Service, Sev, Who, Ts, Label, Content]).
+
+print_trace({_, Fd}, Event) ->
+ do_print_trace(Fd, Event);
+print_trace(Fd, Event) ->
+ do_print_trace(Fd, Event).
+
+do_print_trace(Fd, {trace, Who, What, Where}) ->
+ io:format(Fd, "[trace]"
+ "~n Who: ~p"
+ "~n What: ~p"
+ "~n Where: ~p"
+ "~n", [Who, What, Where]);
+
+do_print_trace(Fd, {trace, Who, What, Where, Extra}) ->
+ io:format(Fd, "[trace]"
+ "~n Who: ~p"
+ "~n What: ~p"
+ "~n Where: ~p"
+ "~n Extra: ~p"
+ "~n", [Who, What, Where, Extra]);
+
+do_print_trace(Fd, {trace_ts, Who, What, Where, When}) ->
+ Ts = format_timestamp(When),
+ io:format(Fd, "[trace ~s]"
+ "~n Who: ~p"
+ "~n What: ~p"
+ "~n Where: ~p"
+ "~n", [Ts, Who, What, Where]);
+
+do_print_trace(Fd, {trace_ts, Who, What, Where, Extra, When}) ->
+ Ts = format_timestamp(When),
+ io:format(Fd, "[trace ~s]"
+ "~n Who: ~p"
+ "~n What: ~p"
+ "~n Where: ~p"
+ "~n Extra: ~p"
+ "~n", [Ts, Who, What, Where, Extra]);
+
+do_print_trace(Fd, {seq_trace, What, Where}) ->
+ io:format(Fd, "[seq trace]"
+ "~n What: ~p"
+ "~n Where: ~p"
+ "~n", [What, Where]);
+
+do_print_trace(Fd, {seq_trace, What, Where, When}) ->
+ Ts = format_timestamp(When),
+ io:format(Fd, "[seq trace ~s]"
+ "~n What: ~p"
+ "~n Where: ~p"
+ "~n", [Ts, What, Where]);
+
+do_print_trace(Fd, {drop, Num}) ->
+ io:format(Fd, "[drop trace] ~p~n", [Num]);
+
+do_print_trace(Fd, Trace) ->
+ io:format(Fd, "[trace] "
+ "~n ~p"
+ "~n", [Trace]).
+
+
+format_timestamp({_N1, _N2, N3} = Now) ->
+ {Date, Time} = calendar:now_to_datetime(Now),
+ {YYYY,MM,DD} = Date,
+ {Hour,Min,Sec} = Time,
+ FormatDate =
+ io_lib:format("~.4w:~.2.0w:~.2.0w ~.2.0w:~.2.0w:~.2.0w 4~w",
+ [YYYY,MM,DD,Hour,Min,Sec,round(N3/1000)]),
+ lists:flatten(FormatDate).
+
+
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 881266b70a..a116edef77 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -146,6 +146,20 @@ groups() ->
].
+init_per_group(ipv6 = _GroupName, Config) ->
+ case inets_test_lib:has_ipv6_support() of
+ {ok, _} ->
+ Config;
+ _ ->
+ {skip, "Host does not support IPv6"}
+ end;
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
%%--------------------------------------------------------------------
%% Function: init_per_suite(Config) -> Config
%% Config - [tuple()]
@@ -156,6 +170,9 @@ groups() ->
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_suite(Config) ->
+
+ ?PRINT_SYSTEM_INFO([]),
+
PrivDir = ?config(priv_dir, Config),
DataDir = ?config(data_dir, Config),
ServerRoot = filename:join(PrivDir, "server_root"),
@@ -179,10 +196,11 @@ init_per_suite(Config) ->
{ok, FileInfo} = file:read_file_info(Cgi),
ok = file:write_file_info(Cgi, FileInfo#file_info{mode = 8#00755}),
- [{server_root, ServerRoot},
- {doc_root, DocRoot},
- {local_port, ?IP_PORT},
- {local_ssl_port, ?SSL_PORT} | Config].
+ [{has_ipv6_support, inets_test_lib:has_ipv6_support()},
+ {server_root, ServerRoot},
+ {doc_root, DocRoot},
+ {local_port, ?IP_PORT},
+ {local_ssl_port, ?SSL_PORT} | Config].
%%--------------------------------------------------------------------
@@ -198,6 +216,7 @@ end_per_suite(Config) ->
application:stop(ssl),
ok.
+
%%--------------------------------------------------------------------
%% Function: init_per_testcase(Case, Config) -> Config
%% Case - atom()
@@ -229,12 +248,12 @@ init_per_testcase(initial_server_connect = Case, Config) ->
"~n ~p", [Case, App, ActualError]),
SkipString =
"Could not start " ++ atom_to_list(App),
- {skip, SkipString};
+ skip(SkipString);
_:X ->
SkipString =
lists:flatten(
io_lib:format("Failed starting apps: ~p", [X])),
- {skip, SkipString}
+ skip(SkipString)
end;
init_per_testcase(Case, Config) ->
@@ -244,6 +263,7 @@ init_per_testcase(Case, Timeout, Config) ->
io:format(user,
"~n~n*** INIT ~w:~w[~w] ***"
"~n~n", [?MODULE, Case, Timeout]),
+
PrivDir = ?config(priv_dir, Config),
application:stop(inets),
Dog = test_server:timetrap(inets_test_lib:minutes(Timeout)),
@@ -337,7 +357,8 @@ init_per_testcase(Case, Timeout, Config) ->
inets:start(httpc,
[{profile, Profile},
{data_dir, PrivDir}], stand_alone),
- httpc:set_options([{ipfamily, inet6}], ProfilePid),
+ ok = httpc:set_options([{ipfamily, inet6}],
+ ProfilePid),
tsp("httpc profile pid: ~p", [ProfilePid]),
[{watchdog, Dog}, {profile, ProfilePid}| TmpConfig]
catch
@@ -346,27 +367,67 @@ init_per_testcase(Case, Timeout, Config) ->
"~n ~p", [Case, App, ActualError]),
SkipString =
"Could not start " ++ atom_to_list(App),
- {skip, SkipString};
+ skip(SkipString);
_:X ->
SkipString =
lists:flatten(
io_lib:format("Failed starting apps: ~p", [X])),
- {skip, SkipString}
+ skip(SkipString)
end;
_ ->
+ %% Try inet6fb4 on windows...
+ %% No need? Since it is set above?
+
+ %% tsp("init_per_testcase -> allways try IPv6 on windows"),
+ %% ?RUN_ON_WINDOWS(
+ %% fun() ->
+ %% tsp("init_per_testcase:set_options_fun -> "
+ %% "set-option ipfamily to inet6fb4"),
+ %% Res = httpc:set_options([{ipfamily, inet6fb4}]),
+ %% tsp("init_per_testcase:set_options_fun -> "
+ %% "~n Res: ~p", [Res]),
+ %% Res
+ %% end),
+
TmpConfig2 = lists:keydelete(local_server, 1, TmpConfig),
%% Will start inets
+ tsp("init_per_testcase -> try start server"),
Server = start_http_server(PrivDir, IpConfFile),
[{watchdog, Dog}, {local_server, Server} | TmpConfig2]
end,
+ %% <IPv6>
+ %% Set default ipfamily to the same as the main server has by default
+ %% This makes the client try w/ ipv6 before falling back to ipv4,
+ %% as that is what the server is configured to do.
+ %% Note that this is required for the tests to run on *BSD w/ ipv6 enabled
+ %% as well as on Windows. The Linux behaviour of allowing ipv4 connects
+ %% to ipv6 sockets is not required or even encouraged.
+
+ tsp("init_per_testcase -> Options before ipfamily set: ~n~p",
+ [httpc:get_options(all)]),
+ ok = httpc:set_options([{ipfamily, inet6fb4}]),
+ tsp("init_per_testcase -> Options after ipfamily set: ~n~p",
+ [httpc:get_options(all)]),
+
+ %% Note that the IPv6 test case(s) *must* use inet6,
+ %% so this value will be overwritten (see "ipv6_" below).
+ %% </IPv6>
+
%% This will fail for the ipv6_ - cases (but that is ok)
ProxyExceptions = ["localhost", ?IPV6_LOCAL_HOST],
- httpc:set_options([{proxy, {{?PROXY, ?PROXY_PORT}, ProxyExceptions}}]),
+ tsp("init_per_testcase -> Options before proxy set: ~n~p",
+ [httpc:get_options(all)]),
+ ok = httpc:set_options([{proxy, {{?PROXY, ?PROXY_PORT}, ProxyExceptions}}]),
+ tsp("init_per_testcase -> Options after proxy set: ~n~p",
+ [httpc:get_options(all)]),
inets:enable_trace(max, io, httpc),
%% inets:enable_trace(max, io, all),
%% snmp:set_trace([gen_tcp]),
+ tsp("init_per_testcase(~w) -> done when"
+ "~n NewConfig: ~p"
+ "~n~n", [Case, NewConfig]),
NewConfig.
@@ -405,6 +466,7 @@ end_per_testcase(http_save_to_file = Case, Config) ->
end_per_testcase(Case, Config) ->
io:format(user, "~n~n*** END ~w:~w ***~n~n",
[?MODULE, Case]),
+ dbg:stop(), % ?
case atom_to_list(Case) of
"ipv6_" ++ _Rest ->
tsp("end_per_testcase(~w) -> stop ssl", [Case]),
@@ -449,29 +511,39 @@ http_options(doc) ->
http_options(suite) ->
[];
http_options(Config) when is_list(Config) ->
- {skip, "Not supported by httpd"}.
+ skip("Not supported by httpd").
http_head(doc) ->
["Test http head request against local server."];
http_head(suite) ->
[];
http_head(Config) when is_list(Config) ->
- case ?config(local_server, Config) of
- ok ->
- Port = ?config(local_port, Config),
- URL = ?URL_START ++ integer_to_list(Port) ++ "/dummy.html",
- case httpc:request(head, {URL, []}, [], []) of
- {ok, {{_,200,_}, [_ | _], []}} ->
- ok;
- {ok, WrongReply} ->
- tsf({wrong_reply, WrongReply});
- Error ->
- tsf({failed, Error})
- end;
- _ ->
- {skip, "Failed to start local http-server"}
- end.
+ tsp("http_head -> entry with"
+ "~n Config: ~p", [Config]),
+ Method = head,
+ Port = ?config(local_port, Config),
+ URL = ?URL_START ++ integer_to_list(Port) ++ "/dummy.html",
+ Request = {URL, []},
+ HttpOpts = [],
+ Opts = [],
+ VerifyResult =
+ fun({ok, {{_,200,_}, [_ | _], []}}) ->
+ ok;
+ ({ok, UnexpectedReply}) ->
+ tsp("http_head:verify_fun -> Unexpected Reply: "
+ "~n ~p", [UnexpectedReply]),
+ tsf({unexpected_reply, UnexpectedReply});
+ ({error, Reason} = Error) ->
+ tsp("http_head:verify_fun -> Error reply: "
+ "~n Reason: ~p", [Reason]),
+ tsf({bad_reply, Error})
+ end,
+ simple_request_and_verify(Config,
+ Method, Request, HttpOpts, Opts, VerifyResult).
+
+
%%-------------------------------------------------------------------------
+
http_get(doc) ->
["Test http get request against local server"];
http_get(suite) ->
@@ -488,7 +560,8 @@ http_get(Config) when is_list(Config) ->
Request = {URL, []},
Timeout = timer:seconds(1),
ConnTimeout = Timeout + timer:seconds(1),
- HttpOptions1 = [{timeout, Timeout}, {connect_timeout, ConnTimeout}],
+ HttpOptions1 = [{timeout, Timeout},
+ {connect_timeout, ConnTimeout}],
Options1 = [],
Body =
case httpc:request(Method, Request, HttpOptions1, Options1) of
@@ -516,14 +589,15 @@ http_get(Config) when is_list(Config) ->
tsf({bad_reply, Error2})
end;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
%%-------------------------------------------------------------------------
+
http_post(doc) ->
- ["Test http post request against local server. We do in this case"
- " only care about the client side of the the post. The server"
- " script will not actually use the post data."];
+ ["Test http post request against local server. We do in this case "
+ "only care about the client side of the the post. The server "
+ "script will not actually use the post data."];
http_post(suite) ->
[];
http_post(Config) when is_list(Config) ->
@@ -551,7 +625,7 @@ http_post(Config) when is_list(Config) ->
httpc:request(post, {URL, [{"expect","100-continue"}],
"text/plain", "foobar"}, [], []);
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
%%-------------------------------------------------------------------------
@@ -597,7 +671,7 @@ http_post_streaming(Config) when is_list(Config) ->
"text/plain", {BodyFun, 10}}, [], []);
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -621,7 +695,7 @@ http_emulate_lower_versions(Config) when is_list(Config) ->
httpc:request(get, {URL, []}, [{version, "HTTP/1.1"}], []),
inets_test_lib:check_body(Body2);
_->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -682,7 +756,7 @@ http_inets_pipe(Config) when is_list(Config) ->
URL = ?URL_START ++ integer_to_list(Port) ++ "/dummy.html",
test_pipeline(URL);
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -818,7 +892,7 @@ http_trace(Config) when is_list(Config) ->
tsf({failed, Error})
end;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
%%-------------------------------------------------------------------------
http_async(doc) ->
@@ -853,7 +927,7 @@ http_async(Config) when is_list(Config) ->
ok
end;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
%%-------------------------------------------------------------------------
@@ -874,7 +948,7 @@ http_save_to_file(Config) when is_list(Config) ->
{ok, {{_,200,_}, [_ | _], Body}} = httpc:request(URL),
Bin == Body;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -904,7 +978,7 @@ http_save_to_file_async(Config) when is_list(Config) ->
{ok, {{_,200,_}, [_ | _], Body}} = httpc:request(URL),
Bin == Body;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
%%-------------------------------------------------------------------------
http_headers(doc) ->
@@ -961,7 +1035,7 @@ http_headers(Config) when is_list(Config) ->
]}, [], []),
ok;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
%%-------------------------------------------------------------------------
@@ -1096,9 +1170,9 @@ ssl_head(SslTag, Config) ->
{ok, {{_,200, _}, [_ | _], []}} =
httpc:request(head, {URL, []}, [{ssl, SSLConfig}], []);
{ok, _} ->
- {skip, "local http-server not started"};
+ skip("local http-server not started");
_ ->
- {skip, "SSL not started"}
+ skip("SSL not started")
end.
@@ -1136,13 +1210,24 @@ ssl_get(SslTag, Config) when is_list(Config) ->
"~n URL: ~p"
"~n SslTag: ~p"
"~n SSLOptions: ~p", [URL, SslTag, SSLOptions]),
- {ok, {{_,200, _}, [_ | _], Body = [_ | _]}} =
- httpc:request(get, {URL, []}, [{ssl, SSLConfig}], []),
- inets_test_lib:check_body(Body);
+ case httpc:request(get, {URL, []}, [{ssl, SSLConfig}], []) of
+ {ok, {{_,200, _}, [_ | _], Body = [_ | _]}} ->
+ inets_test_lib:check_body(Body),
+ ok;
+ {ok, {StatusLine, Headers, _Body}} ->
+ tsp("ssl_get -> unexpected result: "
+ "~n StatusLine: ~p"
+ "~n Headers: ~p", [StatusLine, Headers]),
+ tsf({unexpected_response, StatusLine, Headers});
+ {error, Reason} ->
+ tsp("ssl_get -> request failed: "
+ "~n Reason: ~p", [Reason]),
+ tsf({request_failed, Reason})
+ end;
{ok, _} ->
- {skip, "local http-server not started"};
+ skip("local http-server not started");
_ ->
- {skip, "SSL not started"}
+ skip("SSL not started")
end.
@@ -1191,9 +1276,9 @@ ssl_trace(SslTag, Config) when is_list(Config) ->
tsf({failed, Error})
end;
{ok, _} ->
- {skip, "local http-server not started"};
+ skip("local http-server not started");
_ ->
- {skip, "SSL not started"}
+ skip("SSL not started")
end.
@@ -1208,8 +1293,8 @@ http_redirect(Config) when is_list(Config) ->
"~n Config: ~p", [Config]),
case ?config(local_server, Config) of
ok ->
- tsp("http_redirect -> set ipfamily option to inet"),
- ok = httpc:set_options([{ipfamily, inet}]),
+ %% tsp("http_redirect -> set ipfamily option to inet"),
+ %% ok = httpc:set_options([{ipfamily, inet}]),
tsp("http_redirect -> start dummy server inet"),
{DummyServerPid, Port} = dummy_server(ipv4),
@@ -1312,7 +1397,7 @@ http_redirect(Config) when is_list(Config) ->
ok;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -1449,7 +1534,7 @@ proxy_options(Config) when is_list(Config) ->
tsf({unexpected_result, Unexpected})
end;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -1470,7 +1555,7 @@ proxy_head(Config) when is_list(Config) ->
tsf({unexpected_result, Unexpected})
end;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -1489,7 +1574,7 @@ proxy_get(Config) when is_list(Config) ->
tsf({unexpected_result, Unexpected})
end;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
%%-------------------------------------------------------------------------
@@ -1530,12 +1615,13 @@ proxy_emulate_lower_versions(Config) when is_list(Config) ->
end;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
pelv_get(Version) ->
httpc:request(get, {?PROXY_URL, []}, [{version, Version}], []).
+
%%-------------------------------------------------------------------------
proxy_trace(doc) ->
["Perform a TRACE request that goes through a proxy."];
@@ -1544,8 +1630,8 @@ proxy_trace(suite) ->
proxy_trace(Config) when is_list(Config) ->
%%{ok, {{_,200,_}, [_ | _], "TRACE " ++ _}} =
%% httpc:request(trace, {?PROXY_URL, []}, [], []),
- {skip, "HTTP TRACE is no longer allowed on the ?PROXY_URL server due "
- "to security reasons"}.
+ skip("HTTP TRACE is no longer allowed on the ?PROXY_URL server due "
+ "to security reasons").
%%-------------------------------------------------------------------------
@@ -1568,7 +1654,7 @@ proxy_post(Config) when is_list(Config) ->
tsf({unexpected_result, Unexpected})
end;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -1593,7 +1679,7 @@ proxy_put(Config) when is_list(Config) ->
tsf({unexpected_result, Unexpected})
end;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -1618,7 +1704,7 @@ proxy_delete(Config) when is_list(Config) ->
tsf({unexpected_result, Unexpected})
end;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -1652,9 +1738,10 @@ proxy_headers(Config) when is_list(Config) ->
]}, [], []),
ok;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
+
%%-------------------------------------------------------------------------
proxy_auth(doc) ->
["Test the code for sending of proxy authorization."];
@@ -1674,7 +1761,7 @@ proxy_auth(Config) when is_list(Config) ->
tsf({unexpected_result, Unexpected})
end;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -1718,7 +1805,7 @@ proxy_page_does_not_exist(Config) when is_list(Config) ->
httpc:request(get, {URL, []}, [], []),
ok;
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -1737,6 +1824,7 @@ proxy_https_not_supported(Config) when is_list(Config) ->
tsf({unexpected_reason, Result})
end.
+
%%-------------------------------------------------------------------------
http_stream(doc) ->
@@ -1863,7 +1951,7 @@ proxy_stream(Config) when is_list(Config) ->
Body == binary_to_list(StreamedBody);
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -1886,7 +1974,7 @@ parse_url(Config) when is_list(Config) ->
http_uri:parse("http://[2010:836B:4179::836B:4179]/foobar.html",
[{foo, false}]),
{error,
- {malformed_url,"http://2010:836B:4179::836B:4179/foobar.html"}} =
+ {malformed_url, _, "http://2010:836B:4179::836B:4179/foobar.html"}} =
http_uri:parse("http://2010:836B:4179::836B:4179/foobar.html"),
%% ipv4
@@ -1902,8 +1990,8 @@ parse_url(Config) when is_list(Config) ->
http_uri:parse("http://nisse:foobar@localhost:8888/foobar.html"),
%% Scheme error
- {error,no_scheme} = http_uri:parse("localhost/foobar.html"),
- {error,{not_supported_scheme,localhost}} =
+ {error, no_scheme} = http_uri:parse("localhost/foobar.html"),
+ {error, {malformed_url, _, _}} =
http_uri:parse("localhost:8888/foobar.html"),
%% Query
@@ -1966,7 +2054,7 @@ ipv6_essl(Config) when is_list(Config) ->
ipv6(SocketType, Scheme, HTTPOptions, Extra, Config) ->
%% Check if we are a IPv6 host
- tsp("ipv6 -> verify ipv6 support", []),
+ tsp("ipv6 -> verify ipv6 support"),
case inets_test_lib:has_ipv6_support(Config) of
{ok, Addr} ->
tsp("ipv6 -> ipv6 supported: ~p", [Addr]),
@@ -1997,8 +2085,8 @@ ipv6(SocketType, Scheme, HTTPOptions, Extra, Config) ->
end,
ok;
_ ->
- tsp("ipv6 -> ipv6 not supported", []),
- {skip, "Host does not support IPv6"}
+ tsp("ipv6 -> ipv6 not supported"),
+ skip("Host does not support IPv6")
end.
@@ -2355,7 +2443,7 @@ options(Config) when is_list(Config) ->
= httpc:request(get, {URL, []}, [{timeout, infinity}],
[{full_result, false}]);
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -2468,7 +2556,7 @@ proxy_not_modified_otp_6821(Config) when is_list(Config) ->
undefined ->
provocate_not_modified_bug(?PROXY_URL);
Reason ->
- {skip, Reason}
+ skip(Reason)
end.
@@ -2870,7 +2958,7 @@ otp_8106_pid(Config) when is_list(Config) ->
ok;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -2890,7 +2978,7 @@ otp_8106_fun(Config) when is_list(Config) ->
ok;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -2910,7 +2998,7 @@ otp_8106_mfa(Config) when is_list(Config) ->
ok;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -3059,7 +3147,7 @@ otp_8352(Config) when is_list(Config) ->
ok;
_ ->
- {skip, "Failed to start local http-server"}
+ skip("Failed to start local http-server")
end.
@@ -3254,7 +3342,11 @@ create_config(FileName, ComType, Port, PrivDir, ServerRoot, DocRoot,
" mod_include mod_dir mod_get mod_head"
" mod_log mod_disk_log mod_trace",
+ %% BindAddress = "*|inet", % Force the use of IPv4
+ BindAddress = "*", % This corresponds to using IpFamily inet6fb4
+
HttpConfig = [
+ cline(["BindAddress ", BindAddress]),
cline(["Port ", integer_to_list(Port)]),
cline(["ServerName ", "httpc_test"]),
cline(["SocketType ", atom_to_list(ComType)]),
@@ -3813,6 +3905,34 @@ pick_header(Headers, Name) ->
Val
end.
+
+%% -------------------------------------------------------------------------
+
+simple_request_and_verify(Config,
+ Method, Request, HttpOpts, Opts, VerifyResult)
+ when (is_list(Config) andalso
+ is_atom(Method) andalso
+ is_list(HttpOpts) andalso
+ is_list(Opts) andalso
+ is_function(VerifyResult, 1)) ->
+ tsp("request_and_verify -> entry with"
+ "~n Method: ~p"
+ "~n Request: ~p"
+ "~n HttpOpts: ~p"
+ "~n Opts: ~p", [Method, Request, HttpOpts, Opts]),
+ case ?config(local_server, Config) of
+ ok ->
+ tsp("request_and_verify -> local-server running"),
+ Result = (catch httpc:request(Method, Request, HttpOpts, Opts)),
+ VerifyResult(Result);
+ _ ->
+ tsp("request_and_verify -> local-server *not* running - skip"),
+ hard_skip("Local http-server not running")
+ end.
+
+
+
+
not_implemented_yet() ->
exit(not_implemented_yet).
@@ -3823,9 +3943,9 @@ p(F, A) ->
io:format("~p ~w:" ++ F ++ "~n", [self(), ?MODULE | A]).
tsp(F) ->
- inets_test_lib:tsp(F).
+ inets_test_lib:tsp("[~w]" ++ F, [?MODULE]).
tsp(F, A) ->
- inets_test_lib:tsp(F, A).
+ inets_test_lib:tsp("[~w]" ++ F, [?MODULE|A]).
tsf(Reason) ->
test_server:fail(Reason).
@@ -3864,6 +3984,8 @@ dummy_ssl_server_hang_loop(_) ->
ok
end.
+hard_skip(Reason) ->
+ throw(skip(Reason)).
skip(Reason) ->
{skip, Reason}.
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index a4bb8f7159..41e4188e5f 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -224,7 +224,8 @@ all() ->
].
groups() ->
- [{ip, [],
+ [
+ {ip, [],
[ip_mod_alias, ip_mod_actions, ip_mod_security,
ip_mod_auth, ip_mod_auth_api, ip_mod_auth_mnesia_api,
ip_mod_htaccess, ip_mod_cgi, ip_mod_esi, ip_mod_get,
@@ -293,6 +294,14 @@ groups() ->
[ticket_5775, ticket_5865, ticket_5913, ticket_6003,
ticket_7304]}].
+
+init_per_group(ipv6 = _GroupName, Config) ->
+ case inets_test_lib:has_ipv6_support() of
+ {ok, _} ->
+ Config;
+ _ ->
+ {skip, "Host does not support IPv6"}
+ end;
init_per_group(_GroupName, Config) ->
Config.
@@ -314,6 +323,8 @@ init_per_suite(Config) ->
"~n Config: ~p"
"~n", [Config]),
+ ?PRINT_SYSTEM_INFO([]),
+
PrivDir = ?config(priv_dir, Config),
SuiteTopDir = filename:join(PrivDir, ?MODULE),
case file:make_dir(SuiteTopDir) of
@@ -325,10 +336,11 @@ init_per_suite(Config) ->
throw({error, {failed_creating_suite_top_dir, Error}})
end,
- [{suite_top_dir, SuiteTopDir},
- {node, node()},
- {host, inets_test_lib:hostname()},
- {address, getaddr()} | Config].
+ [{has_ipv6_support, inets_test_lib:has_ipv6_support()},
+ {suite_top_dir, SuiteTopDir},
+ {node, node()},
+ {host, inets_test_lib:hostname()},
+ {address, getaddr()} | Config].
%%--------------------------------------------------------------------
@@ -363,10 +375,9 @@ init_per_testcase(Case, Config) ->
init_per_testcase2(Case, Config) ->
- io:format(user, "~w:init_per_testcase2(~w) -> entry with"
- "~n Config: ~p"
- "~n", [?MODULE, Case, Config]),
-
+ tsp("init_per_testcase2 -> entry with"
+ "~n Config: ~p", [Config]),
+
IpNormal = integer_to_list(?IP_PORT) ++ ".conf",
IpHtaccess = integer_to_list(?IP_PORT) ++ "htaccess.conf",
SslNormal = integer_to_list(?SSL_PORT) ++ ".conf",
@@ -375,39 +386,33 @@ init_per_testcase2(Case, Config) ->
DataDir = ?config(data_dir, Config),
SuiteTopDir = ?config(suite_top_dir, Config),
- io:format(user, "~w:init_per_testcase2(~w) -> "
- "~n SuiteDir: ~p"
- "~n DataDir: ~p"
- "~n", [?MODULE, Case, SuiteTopDir, DataDir]),
+ tsp("init_per_testcase2 -> "
+ "~n SuiteDir: ~p"
+ "~n DataDir: ~p", [SuiteTopDir, DataDir]),
TcTopDir = filename:join(SuiteTopDir, Case),
?line ok = file:make_dir(TcTopDir),
- io:format(user, "~w:init_per_testcase2(~w) -> "
- "~n TcTopDir: ~p"
- "~n", [?MODULE, Case, TcTopDir]),
+ tsp("init_per_testcase2 -> "
+ "~n TcTopDir: ~p", [TcTopDir]),
DataSrc = filename:join([DataDir, "server_root"]),
ServerRoot = filename:join([TcTopDir, "server_root"]),
- io:format(user, "~w:init_per_testcase2(~w) -> "
- "~n DataSrc: ~p"
- "~n ServerRoot: ~p"
- "~n", [?MODULE, Case, DataSrc, ServerRoot]),
+ tsp("init_per_testcase2 -> "
+ "~n DataSrc: ~p"
+ "~n ServerRoot: ~p", [DataSrc, ServerRoot]),
ok = file:make_dir(ServerRoot),
ok = file:make_dir(filename:join([TcTopDir, "logs"])),
NewConfig = [{tc_top_dir, TcTopDir}, {server_root, ServerRoot} | Config],
- io:format(user, "~w:init_per_testcase2(~w) -> "
- "copy DataSrc to ServerRoot~n",
- [?MODULE, Case]),
+ tsp("init_per_testcase2 -> copy DataSrc to ServerRoot"),
inets_test_lib:copy_dirs(DataSrc, ServerRoot),
- io:format(user, "~w:init_per_testcase2(~w) -> fix cgi~n",
- [?MODULE, Case]),
+ tsp("init_per_testcase2 -> fix cgi"),
EnvCGI = filename:join([ServerRoot, "cgi-bin", "printenv.sh"]),
{ok, FileInfo} = file:read_file_info(EnvCGI),
ok = file:write_file_info(EnvCGI,
@@ -427,16 +432,14 @@ init_per_testcase2(Case, Config) ->
FileInfo1#file_info{mode = 8#00755}),
%% To be used by IP test cases
- io:format(user, "~w:init_per_testcase2(~w) -> ip testcase setups~n",
- [?MODULE, Case]),
+ tsp("init_per_testcase2 -> ip testcase setups"),
create_config([{port, ?IP_PORT}, {sock_type, ip_comm} | NewConfig],
normal_access, IpNormal),
create_config([{port, ?IP_PORT}, {sock_type, ip_comm} | NewConfig],
mod_htaccess, IpHtaccess),
%% To be used by SSL test cases
- io:format(user, "~w:init_per_testcase2(~w) -> ssl testcase setups~n",
- [?MODULE, Case]),
+ tsp("init_per_testcase2 -> ssl testcase setups"),
SocketType =
case atom_to_list(Case) of
[X, $s, $s, $l | _] ->
@@ -460,8 +463,7 @@ init_per_testcase2(Case, Config) ->
%% when you run the whole test suite due to shortcomings
%% of the test server.
- io:format(user, "~w:init_per_testcase2(~w) -> "
- "maybe generate IPv6 config file(s)", [?MODULE, Case]),
+ tsp("init_per_testcase2 -> maybe generate IPv6 config file(s)"),
NewConfig2 =
case atom_to_list(Case) of
"ipv6_" ++ _ ->
@@ -502,15 +504,15 @@ init_per_testcase2(Case, Config) ->
NewConfig
end,
- io:format(user, "~w:init_per_testcase2(~w) -> done~n",
- [?MODULE, Case]),
+ tsp("init_per_testcase2 -> done when"
+ "~n NewConfig2: ~p", [NewConfig2]),
NewConfig2.
init_per_testcase3(Case, Config) ->
- io:format(user, "~w:init_per_testcase3(~w) -> entry with"
- "~n Config: ~p", [?MODULE, Case, Config]),
+ tsp("init_per_testcase3(~w) -> entry with"
+ "~n Config: ~p", [Case, Config]),
%% %% Create a new fresh node to be used by the server in this test-case
@@ -532,12 +534,10 @@ init_per_testcase3(Case, Config) ->
%% Set trace level
case lists:reverse(atom_to_list(Case)) of
"tset_emit" ++ _Rest -> % test-cases ending with time_test
- io:format(user, "~w:init_per_testcase3(~w) -> disabling trace",
- [?MODULE, Case]),
+ tsp("init_per_testcase3(~w) -> disabling trace", [Case]),
inets:disable_trace();
_ ->
- io:format(user, "~w:init_per_testcase3(~w) -> enabling trace",
- [?MODULE, Case]),
+ tsp("init_per_testcase3(~w) -> enabling trace", [Case]),
%% TraceLevel = 70,
TraceLevel = max,
TraceDest = io,
@@ -545,8 +545,7 @@ init_per_testcase3(Case, Config) ->
end,
%% Start initialization
- io:format(user, "~w:init_per_testcase3(~w) -> start init",
- [?MODULE, Case]),
+ tsp("init_per_testcase3(~w) -> start init", [Case]),
Dog = test_server:timetrap(inets_test_lib:minutes(10)),
@@ -627,26 +626,32 @@ init_per_testcase3(Case, Config) ->
end
end,
- case CaseRest of
- {skip, _} = Skip ->
- Skip;
- "mod_auth_" ++ _ ->
- start_mnesia(?config(node, Config)),
- [{watchdog, Dog} | NewConfig];
- "mod_htaccess" ->
- ServerRoot = ?config(server_root, Config),
- Path = filename:join([ServerRoot, "htdocs"]),
- catch remove_htaccess(Path),
- create_htaccess_data(Path, ?config(address, Config)),
- [{watchdog, Dog} | NewConfig];
- "range" ->
- ServerRoot = ?config(server_root, Config),
- Path = filename:join([ServerRoot, "htdocs"]),
- create_range_data(Path),
- [{watchdog, Dog} | NewConfig];
- _ ->
- [{watchdog, Dog} | NewConfig]
- end.
+ InitRes =
+ case CaseRest of
+ {skip, _} = Skip ->
+ Skip;
+ "mod_auth_" ++ _ ->
+ start_mnesia(?config(node, Config)),
+ [{watchdog, Dog} | NewConfig];
+ "mod_htaccess" ->
+ ServerRoot = ?config(server_root, Config),
+ Path = filename:join([ServerRoot, "htdocs"]),
+ catch remove_htaccess(Path),
+ create_htaccess_data(Path, ?config(address, Config)),
+ [{watchdog, Dog} | NewConfig];
+ "range" ->
+ ServerRoot = ?config(server_root, Config),
+ Path = filename:join([ServerRoot, "htdocs"]),
+ create_range_data(Path),
+ [{watchdog, Dog} | NewConfig];
+ _ ->
+ [{watchdog, Dog} | NewConfig]
+ end,
+
+ tsp("init_per_testcase3(~w) -> done when"
+ "~n InitRes: ~p", [Case, InitRes]),
+
+ InitRes.
%%--------------------------------------------------------------------
@@ -664,16 +669,14 @@ end_per_testcase(Case, Config) ->
ok.
end_per_testcase2(Case, Config) ->
- io:format(user, "~w:end_per_testcase2(~w) -> entry with"
- "~n Config: ~p~n",
- [?MODULE, Case, Config]),
+ tsp("end_per_testcase2(~w) -> entry with"
+ "~n Config: ~p", [Case, Config]),
application:unset_env(inets, services),
application:stop(inets),
application:stop(ssl),
application:stop(crypto), % used by the new ssl (essl test cases)
cleanup_mnesia(),
- io:format(user, "~w:end_per_testcase2(~w) -> done~n",
- [?MODULE, Case]),
+ tsp("end_per_testcase2(~w) -> done", [Case]),
ok.
@@ -2354,32 +2357,33 @@ create_config(Config, Access, FileName) ->
true ->
[]
end,
- ModOrder = case Access of
- mod_htaccess ->
- "Modules mod_alias mod_htaccess mod_auth "
- "mod_security "
- "mod_responsecontrol mod_trace mod_esi "
- "mod_actions mod_cgi mod_include mod_dir "
- "mod_range mod_get "
- "mod_head mod_log mod_disk_log";
- _ ->
- "Modules mod_alias mod_auth mod_security "
- "mod_responsecontrol mod_trace mod_esi "
- "mod_actions mod_cgi mod_include mod_dir "
+ ModOrder =
+ case Access of
+ mod_htaccess ->
+ "Modules mod_alias mod_htaccess mod_auth "
+ "mod_security "
+ "mod_responsecontrol mod_trace mod_esi "
+ "mod_actions mod_cgi mod_include mod_dir "
+ "mod_range mod_get "
+ "mod_head mod_log mod_disk_log";
+ _ ->
+ "Modules mod_alias mod_auth mod_security "
+ "mod_responsecontrol mod_trace mod_esi "
+ "mod_actions mod_cgi mod_include mod_dir "
"mod_range mod_get "
- "mod_head mod_log mod_disk_log"
- end,
+ "mod_head mod_log mod_disk_log"
+ end,
-%% The test suite currently does not handle an explicit BindAddress.
-%% They assume any has been used, that is Addr is always set to undefined!
+ %% The test suite currently does not handle an explicit BindAddress.
+ %% They assume any has been used, that is Addr is always set to undefined!
-%% {ok, Hostname} = inet:gethostname(),
-%% {ok, Addr} = inet:getaddr(Hostname, inet6),
-%% AddrStr = make_ipv6(Addr),
-%% BindAddress = lists:flatten(io_lib:format("~s|inet6", [AddrStr])),
+ %% {ok, Hostname} = inet:gethostname(),
+ %% {ok, Addr} = inet:getaddr(Hostname, inet6),
+ %% AddrStr = make_ipv6(Addr),
+ %% BindAddress = lists:flatten(io_lib:format("~s|inet6", [AddrStr])),
- %% BindAddress = "*|inet",
- BindAddress = "*",
+ BindAddress = "*|inet",
+ %% BindAddress = "*",
HttpConfig = [
cline(["Port ", integer_to_list(Port)]),
@@ -2770,10 +2774,10 @@ create_ipv6_config(Config, FileName, Ipv6Address) ->
ok = file:close(Fd).
-%% tsp(F) ->
-%% inets_test_lib:tsp(F).
+tsp(F) ->
+ inets_test_lib:tsp("[~w]" ++ F, [?MODULE]).
tsp(F, A) ->
- inets_test_lib:tsp(F, A).
+ inets_test_lib:tsp("[~w]" ++ F, [?MODULE|A]).
tsf(Reason) ->
inets_test_lib:tsf(Reason).
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl
index 4cd38f2ec4..7a476ea14a 100644
--- a/lib/inets/test/httpd_basic_SUITE.erl
+++ b/lib/inets/test/httpd_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,6 +20,8 @@
-module(httpd_basic_SUITE).
-include_lib("common_test/include/ct.hrl").
+-include("inets_test_lib.hrl").
+
%% Note: This directive should only be used in test suites.
-compile(export_all).
@@ -184,6 +186,15 @@ escaped_url_in_error_body(doc) ->
escaped_url_in_error_body(suite) ->
[];
escaped_url_in_error_body(Config) when is_list(Config) ->
+ %% <CONDITIONAL-SKIP>
+ %% This skip is due to a problem on windows with long path's
+ %% If a path is too long file:open fails with, for example, eio.
+ %% Until that problem is fixed, we skip this case...
+ Skippable = [win32],
+ Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
tsp("escaped_url_in_error_body -> entry"),
HttpdConf = ?config(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{port, 0} | HttpdConf]),
@@ -192,6 +203,7 @@ escaped_url_in_error_body(Config) when is_list(Config) ->
_Address = proplists:get_value(bind_address, Info),
%% Request 1
+ tss(1000),
tsp("escaped_url_in_error_body -> request 1"),
URL1 = ?URL_START ++ integer_to_list(Port),
%% Make sure the server is ok, by making a request for a valid page
@@ -202,11 +214,12 @@ escaped_url_in_error_body(Config) when is_list(Config) ->
{ok, {200, _}} ->
%% Don't care about the the body, just that we get a ok response
ok;
- {ok, UnexpectedOK1} ->
- tsf({unexpected_ok_1, UnexpectedOK1})
+ {ok, {StatusCode1, Body1}} ->
+ tsf({unexpected_ok_1, StatusCode1, Body1})
end,
%% Request 2
+ tss(1000),
tsp("escaped_url_in_error_body -> request 2"),
%% Make sure the server is ok, by making a request for a valid page
case httpc:request(get, {URL1 ++ "/dummy.html", []},
@@ -216,11 +229,12 @@ escaped_url_in_error_body(Config) when is_list(Config) ->
{ok, {200, _}} ->
%% Don't care about the the body, just that we get a ok response
ok;
- {ok, UnexpectedOK2} ->
- tsf({unexpected_ok_2, UnexpectedOK2})
+ {ok, {StatusCode2, Body2}} ->
+ tsf({unexpected_ok_2, StatusCode2, Body2})
end,
%% Request 3
+ tss(1000),
tsp("escaped_url_in_error_body -> request 3"),
%% Ask for a non-existing page(1)
Path = "/<b>this_is_bold<b>",
@@ -238,10 +252,11 @@ escaped_url_in_error_body(Config) when is_list(Config) ->
tsf({unexpected_path_3, HTMLEncodedPath, BadPath3})
end;
{ok, UnexpectedOK3} ->
- tsf({unexpected_ok_1, UnexpectedOK3})
+ tsf({unexpected_ok_3, UnexpectedOK3})
end,
%% Request 4
+ tss(1000),
tsp("escaped_url_in_error_body -> request 4"),
%% Ask for a non-existing page(2)
case httpc:request(get, {URL2, []},
@@ -253,11 +268,12 @@ escaped_url_in_error_body(Config) when is_list(Config) ->
HTMLEncodedPath ->
ok;
BadPath4 ->
- tsf({unexpected_path_2, HTMLEncodedPath, BadPath4})
+ tsf({unexpected_path_4, HTMLEncodedPath, BadPath4})
end;
{ok, UnexpectedOK4} ->
tsf({unexpected_ok_4, UnexpectedOK4})
end,
+ tss(1000),
tsp("escaped_url_in_error_body -> stop inets"),
inets:stop(httpd, Pid),
tsp("escaped_url_in_error_body -> done"),
@@ -277,7 +293,12 @@ tsp(F, A) ->
inets_test_lib:tsp(F, A).
tsf(Reason) ->
- test_server:fail(Reason).
+ inets_test_lib:tsf(Reason).
+
+tss(Time) ->
+ inets_test_lib:tss(Time).
+
+
skip(Reason) ->
diff --git a/lib/inets/test/httpd_mod.erl b/lib/inets/test/httpd_mod.erl
index 5016cdb9e6..cb1214b7fb 100644
--- a/lib/inets/test/httpd_mod.erl
+++ b/lib/inets/test/httpd_mod.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,14 +39,10 @@
%% Test cases starts here.
%%-------------------------------------------------------------------------
alias(Type, Port, Host, Node) ->
-%% io:format(user, "~w:alias -> entry with"
-%% "~n Type: ~p"
-%% "~n Port: ~p"
-%% "~n Host: ~p"
-%% "~n Node: ~p"
-%% "~n", [?MODULE, Type, Port, Host, Node]),
-
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ %% This is very crude, but...
+ tsp("alias -> Has IPv6 support: ~p", [inets_test_lib:has_ipv6_support()]),
+ Opts = [],
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node,
"GET /pics/icon.sheet.gif "
"HTTP/1.0\r\n\r\n",
[{statuscode, 200},
@@ -55,7 +51,7 @@ alias(Type, Port, Host, Node) ->
{header, "Date"},
{version, "HTTP/1.0"}]),
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node,
"GET / HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{header, "Content-Type","text/html"},
@@ -63,7 +59,7 @@ alias(Type, Port, Host, Node) ->
{header, "Date"},
{version, "HTTP/1.0"}]),
- ok = httpd_test_lib:verify_request(Type,Host,Port,Node,
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node,
"GET /misc/ HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{header, "Content-Type","text/html"},
@@ -71,8 +67,8 @@ alias(Type, Port, Host, Node) ->
{header, "Date"},
{version, "HTTP/1.0"}]),
- %% Check redirection if trailing slash is missing.
- ok = httpd_test_lib:verify_request(Type,Host,Port,Node,
+ %% Check redirection if trailing slash is missing.
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node,
"GET /misc HTTP/1.0\r\n\r\n",
[{statuscode, 301},
{header, "Location"},
@@ -1032,9 +1028,10 @@ check_lists_members1(L1,L2) ->
%% tsp(F) ->
-%% tsp(F, []).
-%% tsp(F, A) ->
-%% test_server:format("~p ~p:" ++ F ++ "~n", [self(), ?MODULE | A]).
+%% inets_test_lib:tsp(F).
+tsp(F, A) ->
+ inets_test_lib:tsp(F, A).
+
tsf(Reason) ->
test_server:fail(Reason).
diff --git a/lib/inets/test/httpd_test_lib.erl b/lib/inets/test/httpd_test_lib.erl
index 2f5867559a..3e1213376d 100644
--- a/lib/inets/test/httpd_test_lib.erl
+++ b/lib/inets/test/httpd_test_lib.erl
@@ -79,19 +79,19 @@
%%--------------------------------------------------------------------
%% API
%%------------------------------------------------------------------
+
verify_request(SocketType, Host, Port, Node, RequestStr, Options) ->
- verify_request(SocketType, Host, Port, Node, RequestStr,
- Options, 30000).
+ verify_request(SocketType, Host, Port, Node, RequestStr, Options, 30000).
+
verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr, Options)
when is_list(TranspOpts) ->
- verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr,
- Options, 30000);
+ verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr, Options, 30000);
+
verify_request(SocketType, Host, Port, Node, RequestStr, Options, TimeOut)
when (is_integer(TimeOut) orelse (TimeOut =:= infinity)) ->
- verify_request(SocketType, Host, Port, [], Node, RequestStr,
- Options, TimeOut).
-verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr,
- Options, TimeOut) ->
+ verify_request(SocketType, Host, Port, [], Node, RequestStr, Options, TimeOut).
+
+verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr, Options, TimeOut) ->
tsp("verify_request -> entry with"
"~n SocketType: ~p"
"~n Host: ~p"
@@ -101,7 +101,7 @@ verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr,
"~n Options: ~p"
"~n TimeOut: ~p",
[SocketType, Host, Port, TranspOpts, Node, Options, TimeOut]),
- case (catch inets_test_lib:connect_bin(SocketType, Host, Port, TranspOpts)) of
+ try inets_test_lib:connect_bin(SocketType, Host, Port, TranspOpts) of
{ok, Socket} ->
tsp("verify_request -> connected - now send message"),
SendRes = inets_test_lib:send(SocketType, Socket, RequestStr),
@@ -117,25 +117,37 @@ verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr,
case request(State#state{request = RequestStr,
socket = Socket}, TimeOut) of
{error, Reason} ->
- tsp("request failed: "
+ tsp("verify_request -> request failed: "
"~n Reason: ~p", [Reason]),
{error, Reason};
NewState ->
- tsp("validate reply: "
+ tsp("verify_request -> validate reply: "
"~n NewState: ~p", [NewState]),
ValidateResult =
validate(RequestStr, NewState, Options, Node, Port),
- tsp("validation result: "
+ tsp("verify_request -> validation result: "
"~n ~p", [ValidateResult]),
inets_test_lib:close(SocketType, Socket),
ValidateResult
end;
ConnectError ->
- tsp("verify_request -> connect failed: "
+ tsp("verify_request -> connect error: "
"~n ~p"
"~n", [ConnectError]),
- tsf({connect_failure, ConnectError})
+ tsf({connect_error, ConnectError,
+ [SocketType, Host, Port, TranspOpts]})
+ catch
+ T:E ->
+ tsp("verify_request -> connect failed: "
+ "~n E: ~p"
+ "~n T: ~p"
+ "~n", [E, T]),
+ tsf({connect_failure,
+ [{type, T},
+ {error, E},
+ {stacktrace, erlang:get_stacktrace()},
+ {args, [SocketType, Host, Port, TranspOpts]}]})
end.
request(#state{mfa = {Module, Function, Args},
diff --git a/lib/inets/test/inets_test_lib.erl b/lib/inets/test/inets_test_lib.erl
index bbed35e1f8..c94be796cd 100644
--- a/lib/inets/test/inets_test_lib.erl
+++ b/lib/inets/test/inets_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,42 +31,48 @@
send/3, close/2]).
-export([copy_file/3, copy_files/2, copy_dirs/2, del_dirs/1]).
-export([info/4, log/4, debug/4, print/4]).
--export([tsp/1, tsp/2, tsf/1]).
+-export([tsp/1, tsp/2, tsf/1, tss/1]).
-export([check_body/1]).
-export([millis/0, millis_diff/2, hours/1, minutes/1, seconds/1, sleep/1]).
--export([oscmd/1, has_ipv6_support/1]).
+-export([oscmd/1, has_ipv6_support/0, has_ipv6_support/1, print_system_info/1]).
+-export([run_on_os/2, run_on_windows/1]).
-export([ensure_started/1]).
-export([non_pc_tc_maybe_skip/4, os_based_skip/1, skip/3, fail/3]).
-export([flush/0]).
-export([start_node/1, stop_node/1]).
+
%% -- Misc os command and stuff
+has_ipv6_support() ->
+ tsp("has_ipv6_support -> no ipv6_hosts config"),
+ {ok, Hostname} = inet:gethostname(),
+ case inet:getaddrs(Hostname, inet6) of
+ {ok, [Addr|_]} when is_tuple(Addr) andalso
+ (element(1, Addr) =/= 0) ->
+ %% We actually need to test that the addr can be used,
+ %% this is done by attempting to create a (tcp)
+ %% listen socket
+ tsp("has_ipv6_support -> check Addr: ~p", [Addr]),
+ case (catch gen_tcp:listen(0, [inet6, {ip, Addr}])) of
+ {ok, LSock} ->
+ tsp("has_ipv6_support -> we are ipv6 host"),
+ gen_tcp:close(LSock),
+ {ok, Addr};
+ _ ->
+ undefined
+ end;
+ _ ->
+ undefined
+ end.
+
has_ipv6_support(Config) ->
case lists:keysearch(ipv6_hosts, 1, Config) of
false ->
%% Do a basic check to se if
%% our own host has a working IPv6 address...
- tsp("has_ipv6_support -> no ipv6_hosts config"),
- {ok, Hostname} = inet:gethostname(),
- case inet:getaddrs(Hostname, inet6) of
- {ok, [Addr|_]} when is_tuple(Addr) andalso
- (element(1, Addr) =/= 0) ->
- %% We actually need to test that the addr can be used,
- %% this is done by attempting to create a (tcp)
- %% listen socket
- tsp("has_ipv6_support -> check Addr: ~p", [Addr]),
- case (catch gen_tcp:listen(0, [inet6, {ip, Addr}])) of
- {ok, LSock} ->
- tsp("has_ipv6_support -> we are ipv6 host"),
- gen_tcp:close(LSock),
- {ok, Addr};
- _ ->
- undefined
- end;
- _ ->
- undefined
- end;
+ has_ipv6_support();
+
{value, {_, Hosts}} when is_list(Hosts) ->
%% Check if our host is in the list of *known* IPv6 hosts
tsp("has_ipv6_support -> Hosts: ~p", [Hosts]),
@@ -88,6 +94,49 @@ has_ipv6_support(Config) ->
oscmd(Cmd) ->
string:strip(os:cmd(Cmd), right, $\n).
+
+print_system_info([]) ->
+ do_print_system_info("System Info");
+print_system_info(Prefix) when is_list(Prefix) ->
+ NewPrefix = lists:flatten(io_lib:format("~s: System Info", [Prefix])),
+ do_print_system_info(NewPrefix).
+
+do_print_system_info(Prefix) ->
+ tsp("~s => "
+ "~n"
+ "~n OS Type: ~p"
+ "~n OS version: ~p"
+ "~n Sys Arch: ~p"
+ "~n CPU Topology: ~p"
+ "~n Num logical procs: ~p"
+ "~n SMP support: ~p"
+ "~n Num schedulers: ~p"
+ "~n Scheduler bindings: ~p"
+ "~n Wordsize: ~p"
+ "~n~n", [Prefix,
+ os:type(), os:version(),
+ erlang:system_info(system_architecture),
+ erlang:system_info(cpu_topology),
+ erlang:system_info(logical_processors),
+ erlang:system_info(smp_support),
+ erlang:system_info(schedulers),
+ erlang:system_info(scheduler_bindings),
+ erlang:system_info(wordsize)]),
+ ok.
+
+
+run_on_windows(Fun) ->
+ run_on_os(windows, Fun).
+
+run_on_os(windows, Fun) ->
+ case os:type() of
+ {win32, _} ->
+ Fun();
+ _ ->
+ ok
+ end.
+
+
%% -- Misc node operation wrapper functions --
start_node(Name) ->
@@ -156,6 +205,17 @@ do_ensure_started(App, Start) when is_function(Start) ->
end.
+ensure_loaded(App) ->
+ case application:load(App) of
+ ok ->
+ ok;
+ {error, {already_loaded,inets}} ->
+ ok;
+ Error ->
+ Error
+ end.
+
+
%% ----------------------------------------------------------------
%% HTTPD starter functions
@@ -165,8 +225,9 @@ start_http_server(Conf) ->
start_http_server(Conf, ?HTTP_DEFAULT_SSL_KIND).
start_http_server(Conf, essl = _SslTag) ->
- tsp("start_http_server(essl) -> entry - try start crypto and public_key"),
+ tsp("start_http_server(essl) -> try start crypto"),
application:start(crypto),
+ tsp("start_http_server(essl) -> try start public_key"),
application:start(public_key),
do_start_http_server(Conf);
start_http_server(Conf, SslTag) ->
@@ -177,23 +238,32 @@ do_start_http_server(Conf) ->
tsp("do_start_http_server -> entry with"
"~n Conf: ~p"
"~n", [Conf]),
- application:load(inets),
- case application:set_env(inets, services, [{httpd, Conf}]) of
+ tsp("do_start_http_server -> load inets"),
+ case ensure_loaded(inets) of
ok ->
- tsp("start_http_server -> httpd conf stored in inets app env"),
- case application:start(inets) of
+ tsp("do_start_http_server -> inets loaded - now set_env for httpd"),
+ case application:set_env(inets, services, [{httpd, Conf}]) of
ok ->
- tsp("start_http_server -> inets started"),
- ok;
- Error1 ->
- tsp("<ERROR> Failed starting application: "
- "~n Error1: ~p", [Error1]),
- Error1
+ tsp("do_start_http_server -> "
+ "httpd conf stored in inets app env"),
+ case (catch application:start(inets)) of
+ ok ->
+ tsp("do_start_http_server -> inets started"),
+ ok;
+ Error1 ->
+ tsp("<ERROR> Failed starting application: "
+ "~n Error1: ~p", [Error1]),
+ tsf({failed_starting_inets, Error1})
+ end;
+ Error2 ->
+ tsp("<ERROR> Failed set application env: "
+ "~n Error: ~p", [Error2]),
+ tsf({failed_set_env, Error2})
end;
- Error2 ->
- tsp("<ERROR> Failed set application env: "
- "~n Error: ~p", [Error2]),
- Error2
+ {error, Reason} ->
+ tsp("do_start_http_server -> failed loading inets"
+ "~n Reason: ~p", [Reason]),
+ tsf({failed_loading_inets, Reason})
end.
start_http_server_ssl(FileName) ->
@@ -213,6 +283,7 @@ do_start_http_server_ssl(FileName) ->
catch do_start_http_server(FileName).
+
%% ----------------------------------------------------------------------
%% print functions
%%
@@ -257,20 +328,49 @@ copy_files(FromDir, ToDir) ->
copy_dirs(FromDirRoot, ToDirRoot) ->
- {ok, Files} = file:list_dir(FromDirRoot),
- lists:foreach(
- fun(FileOrDir) ->
- %% Check if it's a directory or a file
- case filelib:is_dir(filename:join(FromDirRoot, FileOrDir)) of
- true ->
- FromDir = filename:join([FromDirRoot, FileOrDir]),
- ToDir = filename:join([ToDirRoot, FileOrDir]),
- ok = file:make_dir(ToDir),
- copy_dirs(FromDir, ToDir);
- false ->
- copy_file(FileOrDir, FromDirRoot, ToDirRoot)
- end
- end, Files).
+ case file:list_dir(FromDirRoot) of
+ {ok, Files} ->
+ lists:foreach(
+ fun(FileOrDir) ->
+ %% Check if it's a directory or a file
+ case filelib:is_dir(filename:join(FromDirRoot,
+ FileOrDir)) of
+ true ->
+ FromDir = filename:join([FromDirRoot, FileOrDir]),
+ ToDir = filename:join([ToDirRoot, FileOrDir]),
+ case file:make_dir(ToDir) of
+ ok ->
+ copy_dirs(FromDir, ToDir);
+ {error, Reason} ->
+ tsp("<ERROR> Failed creating directory: "
+ "~n ToDir: ~p"
+ "~n Reason: ~p"
+ "~nwhen"
+ "~n ToDirRoot: ~p"
+ "~n ToDirRoot file info: ~p",
+ [ToDir,
+ Reason,
+ ToDirRoot,
+ file:read_file_info(ToDirRoot)]),
+ tsf({failed_copy_dir, ToDir, Reason})
+ end;
+ false ->
+ copy_file(FileOrDir, FromDirRoot, ToDirRoot)
+ end
+ end, Files);
+ {error, Reason} ->
+ tsp("<ERROR> Failed get directory file list: "
+ "~n FromDirRoot: ~p"
+ "~n Reason: ~p"
+ "~nwhen"
+ "~n FromDirRoot file info: ~p",
+ [FromDirRoot,
+ Reason,
+ file:read_file_info(FromDirRoot)]),
+ tsf({failed_list_dir, FromDirRoot, Reason})
+ end.
+
+
del_dirs(Dir) ->
case file:list_dir(Dir) of
@@ -394,56 +494,80 @@ connect_byte(ip_comm, Host, Port, Opts0) ->
connect(ip_comm, Host, Port, Opts).
-connect(ssl, Host, Port, Opts) ->
+%% This always falls back on IPV4, but tries IPV6 first.
+connect(Proto, Host, Port, Opts0) ->
+ Opts = Opts0 -- [inet, inet6],
+ connect(Proto, Host, Port, Opts ++ [inet6], inet6).
+
+connect(ssl, Host, Port, Opts, Type) ->
tsp("connect(ssl) -> entry with"
"~n Host: ~p"
"~n Port: ~p"
- "~n Opts: ~p", [Host, Port, Opts]),
+ "~n Opts: ~p"
+ "~n Type: ~p", [Host, Port, Opts, Type]),
ssl:start(),
- %% Does not support ipv6 in old ssl
+ %% We ignore this option for ssl...
+ %% ...maybe we should really treat this in the same way as ip_comm...
case ssl:connect(Host, Port, Opts) of
{ok, Socket} ->
{ok, Socket};
+ {error, Reason} when Type =:= inet6 ->
+ tsp("connect(ssl) -> failed connecting with inet6: "
+ "~n Reason: ~p"
+ "~n trying inet", [Reason]),
+ connect(ssl, Host, Port, Opts -- [inet6], inet);
{error, Reason} ->
- {error, Reason};
+ tsp("connect(ssl) -> failed connecting: "
+ "~n Reason: ~p", [Reason]),
+ {error, Reason};
Error ->
Error
end;
-connect(ip_comm, Host, Port, Opts) ->
+connect(ip_comm, Host, Port, Opts, Type) ->
tsp("connect(ip_comm) -> entry with"
"~n Host: ~p"
"~n Port: ~p"
- "~n Opts: ~p", [Host, Port, Opts]),
- case gen_tcp:connect(Host,Port, Opts) of
+ "~n Opts: ~p"
+ "~n Type: ~p", [Host, Port, Opts, Type]),
+
+ case gen_tcp:connect(Host, Port, Opts) of
{ok, Socket} ->
tsp("connect success"),
{ok, Socket};
- {error, nxdomain} ->
- tsp("connect error nxdomain when opts: ~p", [Opts]),
- connect(ip_comm, Host, Port, lists:delete(inet6, Opts));
- {error, eafnosupport} ->
- tsp("connect error eafnosupport when opts: ~p", [Opts]),
- connect(ip_comm, Host, Port, lists:delete(inet6, Opts));
- {error, econnreset} ->
- tsp("connect error econnreset when opts: ~p", [Opts]),
- connect(ip_comm, Host, Port, lists:delete(inet6, Opts));
- {error, enetunreach} ->
- tsp("connect error eafnosupport when opts: ~p", [Opts]),
- connect(ip_comm, Host, Port, lists:delete(inet6, Opts));
- {error, {enfile,_}} ->
- tsp("connect error enfile when opts: ~p", [Opts]),
- {error, enfile};
+
+ {error, nxdomain} when Type =:= inet6 ->
+ tsp("connect error nxdomain when"
+ "~n Opts: ~p", [Opts]),
+ connect(ip_comm, Host, Port, Opts -- [inet6], inet);
+ {error, eafnosupport} when Type =:= inet6 ->
+ tsp("connect error eafnosupport when"
+ "~n Opts: ~p", [Opts]),
+ connect(ip_comm, Host, Port, Opts -- [inet6], inet);
+ {error, econnreset} when Type =:= inet6 ->
+ tsp("connect error econnreset when"
+ "~n Opts: ~p", [Opts]),
+ connect(ip_comm, Host, Port, Opts -- [inet6], inet);
+ {error, enetunreach} when Type =:= inet6 ->
+ tsp("connect error eafnosupport when"
+ "~n Opts: ~p", [Opts]),
+ connect(ip_comm, Host, Port, Opts -- [inet6], inet);
+ {error, econnrefused} when Type =:= inet6 ->
+ tsp("connect error econnrefused when"
+ "~n Opts: ~p", [Opts]),
+ connect(ip_comm, Host, Port, Opts -- [inet6], inet);
+
Error ->
- tsp("Unexpected error: "
+ tsp("connect(ip_conn) -> Fatal connect error: "
"~n Error: ~p"
"~nwhen"
"~n Host: ~p"
"~n Port: ~p"
"~n Opts: ~p"
- "~n", [Error, Host, Port, Opts]),
+ "~n Type: ~p"
+ "~n", [Error, Host, Port, Opts, Type]),
Error
end.
-
+
send(ssl, Socket, Data) ->
ssl:send(Socket, Data);
@@ -509,12 +633,15 @@ tsp(F) ->
tsp(F, []).
tsp(F, A) ->
Timestamp = formated_timestamp(),
- test_server:format("*** ~s ~p ~p ~w:" ++ F ++ "~n",
- [Timestamp, node(), self(), ?MODULE | A]).
+ test_server:format("*** ~s ~p ~p " ++ F ++ "~n",
+ [Timestamp, node(), self() | A]).
tsf(Reason) ->
test_server:fail(Reason).
+tss(Time) ->
+ test_server:sleep(Time).
+
formated_timestamp() ->
format_timestamp( os:timestamp() ).
diff --git a/lib/inets/test/inets_test_lib.hrl b/lib/inets/test/inets_test_lib.hrl
index c578398c55..6a86b1b764 100644
--- a/lib/inets/test/inets_test_lib.hrl
+++ b/lib/inets/test/inets_test_lib.hrl
@@ -50,6 +50,11 @@
-define(OSCMD(Cmd), inets_test_lib:oscmd(Cmd)).
+-define(PRINT_SYSTEM_INFO(P), inets_test_lib:print_system_info(P)).
+
+-define(RUN_ON_OS(OS, FUN), inets_test_lib:run_on_os(OS, FUN)).
+-define(RUN_ON_WINDOWS(FUN), inets_test_lib:run_on_windows(FUN)).
+
%% - Test case macros -
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index 77eb43a7ed..488947c3a1 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -18,7 +18,7 @@
# %CopyrightEnd%
APPLICATION = inets
-INETS_VSN = 5.8.1
+INETS_VSN = 5.9
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"
diff --git a/lib/kernel/doc/src/error_logger.xml b/lib/kernel/doc/src/error_logger.xml
index 2d95f96ac7..95b23e4aef 100644
--- a/lib/kernel/doc/src/error_logger.xml
+++ b/lib/kernel/doc/src/error_logger.xml
@@ -49,7 +49,7 @@
that events are logged to file instead, or not logged at all, see
<seealso marker="kernel_app">kernel(6)</seealso>.</p>
<p>Also the SASL application, if started, adds its own event
- handler, which by default writes supervisor-, crash- and progress
+ handler, which by default writes supervisor, crash and progress
reports to tty. See
<seealso marker="sasl:sasl_app">sasl(6)</seealso>.</p>
<p>It is recommended that user defined applications should report
diff --git a/lib/kernel/doc/src/gen_tcp.xml b/lib/kernel/doc/src/gen_tcp.xml
index 8a5d40bb16..9f362841ce 100644
--- a/lib/kernel/doc/src/gen_tcp.xml
+++ b/lib/kernel/doc/src/gen_tcp.xml
@@ -235,7 +235,9 @@ do_recv(Sock, Bs) ->
<p>Returns <c>{ok, <anno>Socket</anno>}</c> if a connection is established,
or <c>{error, closed}</c> if <c><anno>ListenSocket</anno></c> is closed,
or <c>{error, timeout}</c> if no connection is established
- within the specified time. May also return a POSIX error
+ within the specified time,
+ or <c>{error, system_limit}</c> if all available ports in the
+ Erlang emulator are in use. May also return a POSIX error
value if something else goes wrong, see inet(3) for possible
error values.</p>
<p>Packets can be sent to the returned socket <c><anno>Socket</anno></c>
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index 1a05b4ba99..86950b3ecc 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -149,7 +149,7 @@ fe80::204:acff:fe17:bf38
<fsummary>Return a descriptive string for an error reason</fsummary>
<desc>
<p>Returns a diagnostic error string. See the section below
- for possible <c><anno>Posix</anno></c> values and the corresponding
+ for possible Posix values and the corresponding
strings.</p>
</desc>
</func>
diff --git a/lib/kernel/doc/src/kernel_app.xml b/lib/kernel/doc/src/kernel_app.xml
index 0f71a4f0f2..63fdc223f4 100644
--- a/lib/kernel/doc/src/kernel_app.xml
+++ b/lib/kernel/doc/src/kernel_app.xml
@@ -104,7 +104,7 @@
that node. <c>Value</c> is one of:</p>
<taglist>
<tag><c>never</c></tag>
- <item>Connections are never automatically connected, they
+ <item>Connections are never automatically established, they
must be explicitly connected. See <c>net_kernel(3)</c>.</item>
<tag><c>once</c></tag>
<item>Connections will be established automatically, but only
diff --git a/lib/kernel/src/auth.erl b/lib/kernel/src/auth.erl
index c329a5652a..252c20ac4e 100644
--- a/lib/kernel/src/auth.erl
+++ b/lib/kernel/src/auth.erl
@@ -381,13 +381,17 @@ create_cookie(Name) ->
case {R1, R2} of
{ok, ok} ->
ok;
- {{error,_Reason}, _} ->
- {error, "Failed to create cookie file"};
+ {{error,Reason}, _} ->
+ {error,
+ lists:flatten(
+ io_lib:format("Failed to write to cookie file '~s': ~p", [Name, Reason]))};
{ok, {error, Reason}} ->
{error, "Failed to change mode: " ++ atom_to_list(Reason)}
end;
- {error,_Reason} ->
- {error, "Failed to create cookie file"}
+ {error,Reason} ->
+ {error,
+ lists:flatten(
+ io_lib:format("Failed to create cookie file '~s': ~p", [Name, Reason]))}
end.
random_cookie(0, _, Result) ->
diff --git a/lib/kernel/src/disk_log.erl b/lib/kernel/src/disk_log.erl
index fb9415d440..f5f972c112 100644
--- a/lib/kernel/src/disk_log.erl
+++ b/lib/kernel/src/disk_log.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1034,10 +1034,9 @@ sync_loop(From, S) ->
-define(MAX_LOOK_AHEAD, 64*1024).
%% Inlined.
-log_loop(S, Pids, _Bins, _Sync, _Sz) when S#state.cache_error =/= ok ->
+log_loop(#state{cache_error = CE}=S, Pids, _Bins, _Sync, _Sz) when CE =/= ok ->
loop(cache_error(S, Pids));
-log_loop(#state{messages = []}=S, Pids, Bins, Sync, Sz)
- when Sz > ?MAX_LOOK_AHEAD ->
+log_loop(#state{}=S, Pids, Bins, Sync, Sz) when Sz > ?MAX_LOOK_AHEAD ->
loop(log_end(S, Pids, Bins, Sync));
log_loop(#state{messages = []}=S, Pids, Bins, Sync, Sz) ->
receive
@@ -1046,8 +1045,7 @@ log_loop(#state{messages = []}=S, Pids, Bins, Sync, Sz) ->
after 0 ->
loop(log_end(S, Pids, Bins, Sync))
end;
-log_loop(S, Pids, Bins, Sync, Sz) ->
- [M | Ms] = S#state.messages,
+log_loop(#state{messages = [M | Ms]}=S, Pids, Bins, Sync, Sz) ->
S1 = S#state{messages = Ms},
log_loop(M, Pids, Bins, Sync, Sz, S1, get(log)).
diff --git a/lib/kernel/src/erts_debug.erl b/lib/kernel/src/erts_debug.erl
index 7d6a5ade94..16a773898d 100644
--- a/lib/kernel/src/erts_debug.erl
+++ b/lib/kernel/src/erts_debug.erl
@@ -53,6 +53,11 @@ size(Tuple, Seen0, Sum0) when is_tuple(Tuple) ->
Sum = Sum0 + 1 + tuple_size(Tuple),
tuple_size(1, tuple_size(Tuple), Tuple, Seen, Sum)
end;
+size(Fun, Seen0, Sum) when is_function(Fun) ->
+ case remember_term(Fun, Seen0) of
+ seen -> {Sum,Seen0};
+ Seen -> fun_size(Fun, Seen, Sum)
+ end;
size(Term, Seen0, Sum) ->
case erts_debug:flat_size(Term) of
0 -> {Sum,Seen0};
@@ -68,6 +73,21 @@ tuple_size(I, Sz, _, Seen, Sum) when I > Sz ->
tuple_size(I, Sz, Tuple, Seen0, Sum0) ->
{Sum,Seen} = size(element(I, Tuple), Seen0, Sum0),
tuple_size(I+1, Sz, Tuple, Seen, Sum).
+
+fun_size(Fun, Seen, Sum) ->
+ case erlang:fun_info(Fun, type) of
+ {type,external} ->
+ {Sum + erts_debug:flat_size(Fun),Seen};
+ {type,local} ->
+ Sz = erts_debug:flat_size(fun() -> ok end),
+ {env,Env} = erlang:fun_info(Fun, env),
+ fun_size_1(Env, Seen, Sum+Sz+length(Env))
+ end.
+
+fun_size_1([H|T], Seen0, Sum0) ->
+ {Sum,Seen} = size(H, Seen0, Sum0),
+ fun_size_1(T, Seen, Sum);
+fun_size_1([], Seen, Sum) -> {Sum,Seen}.
remember_term(Term, Seen) ->
case gb_trees:lookup(Term, Seen) of
diff --git a/lib/kernel/src/gen_tcp.erl b/lib/kernel/src/gen_tcp.erl
index 4d6c7f5f1d..56d0451e44 100644
--- a/lib/kernel/src/gen_tcp.erl
+++ b/lib/kernel/src/gen_tcp.erl
@@ -175,7 +175,7 @@ try_connect([], _Port, _Opts, _Timer, _Mod, Err) ->
Port :: inet:port_number(),
Options :: [listen_option()],
ListenSocket :: socket(),
- Reason :: inet:posix().
+ Reason :: system_limit | inet:posix().
listen(Port, Opts) ->
Mod = mod(Opts, undefined),
@@ -194,7 +194,7 @@ listen(Port, Opts) ->
-spec accept(ListenSocket) -> {ok, Socket} | {error, Reason} when
ListenSocket :: socket(),
Socket :: socket(),
- Reason :: closed | timeout | inet:posix().
+ Reason :: closed | timeout | system_limit | inet:posix().
accept(S) ->
case inet_db:lookup_socket(S) of
@@ -208,7 +208,7 @@ accept(S) ->
ListenSocket :: socket(),
Timeout :: timeout(),
Socket :: socket(),
- Reason :: closed | timeout | inet:posix().
+ Reason :: closed | timeout | system_limit | inet:posix().
accept(S, Time) when is_port(S) ->
case inet_db:lookup_socket(S) of
diff --git a/lib/kernel/src/global.erl b/lib/kernel/src/global.erl
index fa97614eca..7da33859bf 100644
--- a/lib/kernel/src/global.erl
+++ b/lib/kernel/src/global.erl
@@ -280,13 +280,13 @@ unregister_name(Name) ->
gen_server:call(global_name_server, {registrar, Fun}, infinity)
end.
--spec re_register_name(Name, Pid) -> _ when
+-spec re_register_name(Name, Pid) -> 'yes' when
Name :: term(),
Pid :: pid().
re_register_name(Name, Pid) when is_pid(Pid) ->
re_register_name(Name, Pid, fun random_exit_name/3).
--spec re_register_name(Name, Pid, Resolve) -> _ when
+-spec re_register_name(Name, Pid, Resolve) -> 'yes' when
Name :: term(),
Pid :: pid(),
Resolve :: method().
@@ -1965,7 +1965,7 @@ resolve_it(Method, Name, Pid1, Pid2) ->
minmax(P1,P2) ->
if node(P1) < node(P2) -> {P1, P2}; true -> {P2, P1} end.
--spec random_exit_name(Name, Pid1, Pid2) -> 'none' when
+-spec random_exit_name(Name, Pid1, Pid2) -> pid() when
Name :: term(),
Pid1 :: pid(),
Pid2 :: pid().
@@ -1976,7 +1976,7 @@ random_exit_name(Name, Pid, Pid2) ->
exit(Max, kill),
Min.
--spec random_notify_name(Name, Pid1, Pid2) -> 'none' when
+-spec random_notify_name(Name, Pid1, Pid2) -> pid() when
Name :: term(),
Pid1 :: pid(),
Pid2 :: pid().
@@ -2175,7 +2175,7 @@ get_own_nodes() ->
start_the_registrar() ->
spawn_link(fun() -> loop_the_registrar() end).
-
+
loop_the_registrar() ->
receive
{trans_all_known, Fun, From} ->
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index 49f64a9236..4de3c1c6b1 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -1218,11 +1218,13 @@ port_list(Name) ->
%% utils
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec format_error(Posix) -> string() when
- Posix :: posix().
+-spec format_error(Reason) -> string() when
+ Reason :: posix() | system_limit.
format_error(exbadport) -> "invalid port state";
format_error(exbadseq) -> "bad command sequence";
+format_error(system_limit) ->
+ "a system limit was hit, probably not enough ports";
format_error(Tag) ->
erl_posix_msg:message(Tag).
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index 99b0cd2ffb..4dfa92a755 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -1441,6 +1441,9 @@ filter_app("netconf",_) ->
% Safe has the same kind of error in the .app file as ic
filter_app("safe",_) ->
false;
+% Comte cannot be started in the "usual" way
+filter_app("comte",_) ->
+ false;
% OS_mon does not find it's port program when running cerl
filter_app("os_mon",true) ->
false;
diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl
index 3da4b07c05..d9bba0dbb0 100644
--- a/lib/kernel/test/gen_tcp_misc_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl
@@ -39,7 +39,8 @@
accept_timeouts_in_order/1,accept_timeouts_in_order2/1,
accept_timeouts_in_order3/1,accept_timeouts_mixed/1,
killing_acceptor/1,killing_multi_acceptors/1,killing_multi_acceptors2/1,
- several_accepts_in_one_go/1,active_once_closed/1, send_timeout/1, send_timeout_active/1,
+ several_accepts_in_one_go/1, accept_system_limit/1,
+ active_once_closed/1, send_timeout/1, send_timeout_active/1,
otp_7731/1, zombie_sockets/1, otp_7816/1, otp_8102/1,
otp_9389/1]).
@@ -71,7 +72,7 @@ all() ->
accept_timeouts_in_order, accept_timeouts_in_order2,
accept_timeouts_in_order3, accept_timeouts_mixed,
killing_acceptor, killing_multi_acceptors,
- killing_multi_acceptors2, several_accepts_in_one_go,
+ killing_multi_acceptors2, several_accepts_in_one_go, accept_system_limit,
active_once_closed, send_timeout, send_timeout_active, otp_7731,
zombie_sockets, otp_7816, otp_8102, otp_9389].
@@ -1837,6 +1838,54 @@ wait_until_accepting(Proc,N) ->
end.
+accept_system_limit(suite) ->
+ [];
+accept_system_limit(doc) ->
+ ["Check that accept returns {error, system_limit} "
+ "(and not {error, enfile}) when running out of ports"];
+accept_system_limit(Config) when is_list(Config) ->
+ ?line {ok, LS} = gen_tcp:listen(0, []),
+ ?line {ok, TcpPort} = inet:port(LS),
+ ?line Connector = spawn_link(fun () -> connector(TcpPort) end),
+ ?line ok = acceptor(LS, false, []),
+ ?line Connector ! stop,
+ ok.
+
+acceptor(LS, GotSL, A) ->
+ case gen_tcp:accept(LS, 1000) of
+ {ok, S} ->
+ acceptor(LS, GotSL, [S|A]);
+ {error, system_limit} ->
+ acceptor(LS, true, A);
+ {error, timeout} when GotSL ->
+ ok;
+ {error, timeout} ->
+ error
+ end.
+
+connector(TcpPort) ->
+ ManyPorts = open_ports([]),
+ ConnF = fun (Port) ->
+ case catch gen_tcp:connect({127,0,0,1}, TcpPort, []) of
+ {ok, Sock} ->
+ Sock;
+ _Error ->
+ port_close(Port)
+ end
+ end,
+ R = [ConnF(Port) || Port <- lists:sublist(ManyPorts, 10)],
+ receive stop -> R end.
+
+open_ports(L) ->
+ case catch open_port({spawn_driver, "ram_file_drv"}, []) of
+ Port when is_port(Port) ->
+ open_ports([Port|L]);
+ {'EXIT', {system_limit, _}} ->
+ {L1, L2} = lists:split(5, L),
+ [port_close(Port) || Port <- L1],
+ L2
+ end.
+
active_once_closed(suite) ->
[];
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl
index 6d0848ee05..03704b0c04 100644
--- a/lib/kernel/test/sendfile_SUITE.erl
+++ b/lib/kernel/test/sendfile_SUITE.erl
@@ -26,7 +26,9 @@
all() ->
[t_sendfile_small
- ,t_sendfile_big
+ ,t_sendfile_big_all
+ ,t_sendfile_big_size
+ ,t_sendfile_many_small
,t_sendfile_partial
,t_sendfile_offset
,t_sendfile_sendafter
@@ -38,20 +40,25 @@ all() ->
].
init_per_suite(Config) ->
- Priv = ?config(priv_dir, Config),
- SFilename = filename:join(Priv, "sendfile_small.html"),
- {ok, DS} = file:open(SFilename,[write,raw]),
- file:write(DS,"yo baby yo"),
- file:sync(DS),
- file:close(DS),
- BFilename = filename:join(Priv, "sendfile_big.html"),
- {ok, DB} = file:open(BFilename,[write,raw]),
- [file:write(DB,[<<0:(10*8*1024*1024)>>]) || _I <- lists:seq(1,51)],
- file:sync(DB),
- file:close(DB),
- [{small_file, SFilename},
- {file_opts,[raw,binary]},
- {big_file, BFilename}|Config].
+ case {os:type(),os:version()} of
+ {{unix,sunos}, {5,8,_}} ->
+ {skip, "Solaris 8 not supported for now"};
+ _ ->
+ Priv = ?config(priv_dir, Config),
+ SFilename = filename:join(Priv, "sendfile_small.html"),
+ {ok, DS} = file:open(SFilename,[write,raw]),
+ file:write(DS,"yo baby yo"),
+ file:sync(DS),
+ file:close(DS),
+ BFilename = filename:join(Priv, "sendfile_big.html"),
+ {ok, DB} = file:open(BFilename,[write,raw]),
+ [file:write(DB,[<<0:(10*8*1024*1024)>>]) || _I <- lists:seq(1,51)],
+ file:sync(DB),
+ file:close(DB),
+ [{small_file, SFilename},
+ {file_opts,[raw,binary]},
+ {big_file, BFilename}|Config]
+ end.
end_per_suite(Config) ->
file:delete(proplists:get_value(big_file, Config)).
@@ -91,7 +98,34 @@ t_sendfile_small(Config) when is_list(Config) ->
ok = sendfile_send(Send).
-t_sendfile_big(Config) when is_list(Config) ->
+t_sendfile_many_small(Config) when is_list(Config) ->
+ Filename = proplists:get_value(small_file, Config),
+ FileOpts = proplists:get_value(file_opts, Config, []),
+
+ error_logger:add_report_handler(?MODULE,[self()]),
+
+ Send = fun(Sock) ->
+ {Size,_} = sendfile_file_info(Filename),
+ N = 10000,
+ {ok,D} = file:open(Filename,[read|FileOpts]),
+ [begin
+ {ok,Size} = file:sendfile(D,Sock,0,0,[])
+ end || _I <- lists:seq(1,N)],
+ file:close(D),
+ Size*N
+ end,
+
+ ok = sendfile_send({127,0,0,1}, Send, 0),
+
+ receive
+ {stolen,Reason} ->
+ exit(Reason)
+ after 200 ->
+ ok
+ end.
+
+
+t_sendfile_big_all(Config) when is_list(Config) ->
Filename = proplists:get_value(big_file, Config),
Send = fun(Sock) ->
@@ -103,6 +137,20 @@ t_sendfile_big(Config) when is_list(Config) ->
ok = sendfile_send({127,0,0,1}, Send, 0).
+t_sendfile_big_size(Config) ->
+ Filename = proplists:get_value(big_file, Config),
+ FileOpts = proplists:get_value(file_opts, Config, []),
+
+ SendAll = fun(Sock) ->
+ {ok, #file_info{size = Size}} =
+ file:read_file_info(Filename),
+ {ok,D} = file:open(Filename,[read|FileOpts]),
+ {ok, Size} = file:sendfile(D, Sock,0,Size,[]),
+ Size
+ end,
+
+ ok = sendfile_send({127,0,0,1}, SendAll, 0).
+
t_sendfile_partial(Config) ->
Filename = proplists:get_value(small_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
@@ -310,6 +358,10 @@ sendfile_server(ClientPid, Orig) ->
-define(SENDFILE_TIMEOUT, 10000).
sendfile_do_recv(Sock, Bs) ->
+ TimeoutMul = case os:type() of
+ {win32, _} -> 6;
+ _ -> 1
+ end,
receive
stop when Bs /= 0,is_integer(Bs) ->
gen_tcp:close(Sock),
@@ -333,7 +385,7 @@ sendfile_do_recv(Sock, Bs) ->
{tcp_closed, Sock} when is_integer(Bs) ->
ct:log("Stopped due to close"),
{ok, Bs}
- after ?SENDFILE_TIMEOUT ->
+ after ?SENDFILE_TIMEOUT * TimeoutMul ->
ct:log("Sendfile timeout"),
timeout
end.
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl
index 74bafe8935..e0fd0f5d19 100644
--- a/lib/kernel/test/zlib_SUITE.erl
+++ b/lib/kernel/test/zlib_SUITE.erl
@@ -73,6 +73,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[{group, api}, {group, examples}, {group, func}, smp,
+ otp_9981,
otp_7359].
groups() ->
@@ -964,6 +965,24 @@ otp_7359_def_inf(Data,{DefSize,InfSize}) ->
?line ok = zlib:close(ZInf),
ok.
+otp_9981(Config) when is_list(Config) ->
+ Ports = lists:sort(erlang:ports()),
+ Invalid = <<"My invalid data">>,
+ catch zlib:compress(invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:uncompress(Invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:zip(invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:unzip(Invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:gzip(invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:gunzip(Invalid),
+ Ports = lists:sort(erlang:ports()),
+ ok.
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Helps with testing directly %%%%%%%%%%%%%
diff --git a/lib/megaco/doc/src/notes.xml b/lib/megaco/doc/src/notes.xml
index d9c575885f..393064fbb5 100644
--- a/lib/megaco/doc/src/notes.xml
+++ b/lib/megaco/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -36,6 +36,75 @@
section is the version number of Megaco.</p>
+ <section><title>Megaco 3.16.0.1</title>
+
+ <p>Version 3.16.0.1 supports code replacement in runtime from/to
+ version 3.16, 3.15.1.1, 3.15.1 and 3.15.</p>
+
+ <section>
+ <title>Improvements and new features</title>
+
+<!--
+ <p>-</p>
+-->
+
+ <list type="bulleted">
+ <item>
+ <p>Fixed some faulty test cases. </p>
+<!--
+ <p>Own Id: OTP-9795</p>
+-->
+ </item>
+
+ <item>
+ <p>Removed use of deprecated system flag,
+ <c>scheduler_bind_type</c>, in the measurement tool
+ <c>mstone1</c>. </p>
+ <p>Own Id: OTP-9949</p>
+ </item>
+
+ </list>
+
+ </section>
+
+ <section>
+ <title>Fixed bugs and malfunctions</title>
+
+ <p>-</p>
+
+ <!--
+ <list type="bulleted">
+ <item>
+ <p>Fixing miscellaneous things detected by dialyzer. </p>
+ <p>Own Id: OTP-9075</p>
+ </item>
+
+ </list>
+ -->
+
+ </section>
+
+ <section>
+ <title>Incompatibilities</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>Due to the change in the flex driver API,
+ we may no longer be able to build and/or use
+ the flex driver without reentrant support. </p>
+ <p>Own Id: OTP-9795</p>
+ </item>
+
+ </list>
+-->
+
+ </section>
+
+ </section> <!-- 3.16.0.1 -->
+
+
<section><title>Megaco 3.16</title>
<p>Version 3.16 supports code replacement in runtime from/to
@@ -50,7 +119,7 @@
<list type="bulleted">
<item>
- <p>Minor improvemnts to the emasurement tool mstone1. </p>
+ <p>Minor improvements to the measurement tool <c>mstone1</c>. </p>
<p>Own Id: OTP-9604</p>
</item>
diff --git a/lib/megaco/examples/meas/meas.sh.skel.src b/lib/megaco/examples/meas/meas.sh.skel.src
index c7bd6cdd2a..ecf463b9c6 100644
--- a/lib/megaco/examples/meas/meas.sh.skel.src
+++ b/lib/megaco/examples/meas/meas.sh.skel.src
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2007-2011. All Rights Reserved.
+# Copyright Ericsson AB 2007-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -32,6 +32,7 @@ STOP="-s init stop"
ERL="erl \
-noshell \
+ +sbt tnnps \
-pa $MEAS_HOME \
$MEAS_DEFAULT \
$STOP"
diff --git a/lib/megaco/examples/meas/megaco_codec_mstone1.erl b/lib/megaco/examples/meas/megaco_codec_mstone1.erl
index 9ab7822df8..2133cd633c 100644
--- a/lib/megaco/examples/meas/megaco_codec_mstone1.erl
+++ b/lib/megaco/examples/meas/megaco_codec_mstone1.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -191,7 +191,6 @@ mstone_init(MessagePackage, Factor, Codecs, DrvInclude) ->
do_mstone(MessagePackage, Factor, Codecs, DrvInclude) ->
io:format("~n", []),
- ?LIB:set_default_sched_bind(),
?LIB:display_os_info(),
?LIB:display_system_info(),
?LIB:display_app_info(),
diff --git a/lib/megaco/examples/meas/megaco_codec_mstone2.erl b/lib/megaco/examples/meas/megaco_codec_mstone2.erl
index f3588f2e3d..54b889345f 100644
--- a/lib/megaco/examples/meas/megaco_codec_mstone2.erl
+++ b/lib/megaco/examples/meas/megaco_codec_mstone2.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,7 +40,7 @@
%% When the finished timer expires, it will stop respawing
%% the worker processes, and instead just wait for them all
%% to finish.
-%% The test is finished by printing the statistics.
+%% The test is finishes by printing the statistics.
%% - A worker process for each codec combination.
%% This process is spawned by the loader process. It receives
%% at start a list of messages. It shall decode and then
@@ -162,7 +162,6 @@ parse_message_package(BadMessagePackage) ->
mstone_init(MessagePackage, DrvInclude) ->
io:format("~n", []),
- ?LIB:set_default_sched_bind(),
?LIB:display_os_info(),
?LIB:display_system_info(),
?LIB:display_app_info(),
diff --git a/lib/megaco/examples/meas/megaco_codec_mstone_lib.erl b/lib/megaco/examples/meas/megaco_codec_mstone_lib.erl
index 040af9826b..ca8016d65f 100644
--- a/lib/megaco/examples/meas/megaco_codec_mstone_lib.erl
+++ b/lib/megaco/examples/meas/megaco_codec_mstone_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,7 +30,6 @@
-compile({no_auto_import,[error/1]}).
-export([start_flex_scanner/0, stop_flex_scanner/1,
expanded_messages/2, expanded_messages/3,
- set_default_sched_bind/0,
display_os_info/0,
display_system_info/0,
display_alloc_info/0,
@@ -70,16 +69,6 @@ detect_version(Codec, Conf, Bin) ->
%%----------------------------------------------------------------------
%%
-%% S c h e d u l e r b i n d t y p e
-%%
-%%----------------------------------------------------------------------
-
-set_default_sched_bind() ->
- (catch erlang:system_flag(scheduler_bind_type, default_bind)).
-
-
-%%----------------------------------------------------------------------
-%%
%% D i s p l a y O s I n f o
%%
%%----------------------------------------------------------------------
diff --git a/lib/megaco/examples/meas/mstone1.sh.skel.src b/lib/megaco/examples/meas/mstone1.sh.skel.src
index 54a6c61a58..b1935acef6 100644
--- a/lib/megaco/examples/meas/mstone1.sh.skel.src
+++ b/lib/megaco/examples/meas/mstone1.sh.skel.src
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2007-2011. All Rights Reserved.
+# Copyright Ericsson AB 2007-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -55,6 +55,15 @@ Options:
flex scanner will be used
nd - only codec config(s) without drivers will be used
od - only codec config(s) with drivers will be used
+ -sbt <bind-type> Set scheduler bind type. See erl man page for more info.
+ tnnps - Thread no node processor spread (default)
+ u - Unbound
+ ns - No spread
+ ts - Thread spread
+ ps - Processor spread
+ s - Spread
+ nnts - No node thread spread
+ nnps - No node processor spread
-- everything after this is just passed on to erl.
"
@@ -67,6 +76,7 @@ MODULE=megaco_codec_mstone1
STARTF="start"
FACTOR=""
MSG_PACK=time_test
+SBT="+sbt tnnps"
while test $# != 0; do
# echo "DBG: Value = $1"
@@ -107,6 +117,17 @@ while test $# != 0; do
exit 0
esac;;
+ -sbt)
+ case $2 in
+ tnnps|u|ns|ts|ps|s|nnts|nnps)
+ SBT="+sbt $2";
+ shift ; shift ;;
+ *)
+ echo "unknown scheduler bind type: $2";
+ echo "$usage" ;
+ exit 0
+ esac;;
+
-f)
if [ "x$SCHED" != "x" ]; then
echo "option(s) -s and -f cannot both be given" ;
@@ -177,6 +198,7 @@ if [ $TYPE = factor ]; then
ERL="erl \
-noshell \
+ $SBT \
$PHS \
$ATP \
$SMP_OPTS \
@@ -218,6 +240,7 @@ elif [ $TYPE = sched ]; then
ERL="erl \
-noshell \
+ $SBT \
$PHS \
$ATP \
$SMP_OPTS \
diff --git a/lib/megaco/src/app/megaco.appup.src b/lib/megaco/src/app/megaco.appup.src
index 3c9740818a..7f89fa8bc2 100644
--- a/lib/megaco/src/app/megaco.appup.src
+++ b/lib/megaco/src/app/megaco.appup.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -142,10 +142,17 @@
%% |
%% v
%% 3.16
+%% |
+%% v
+%% 3.16.0.1
%%
%%
{"%VSN%",
[
+ {"3.16",
+ [
+ ]
+ },
{"3.15.1.1",
[
{restart_application, megaco}
@@ -163,6 +170,10 @@
}
],
[
+ {"3.16",
+ [
+ ]
+ },
{"3.15.1.1",
[
{restart_application, megaco}
diff --git a/lib/megaco/test/megaco_mess_test.erl b/lib/megaco/test/megaco_mess_test.erl
index 8bafab1aba..663ac8c329 100644
--- a/lib/megaco/test/megaco_mess_test.erl
+++ b/lib/megaco/test/megaco_mess_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -324,9 +324,6 @@
min(M) -> timer:minutes(M).
%% Test server callbacks
-% init_per_testcase(pending_ack = Case, Config) ->
-% put(dbg,true),
-% megaco_test_lib:init_per_testcase(Case, Config);
init_per_testcase(otp_7189 = Case, Config) ->
C = lists:keydelete(tc_timeout, 1, Config),
megaco_test_lib:init_per_testcase(Case, [{tc_timeout, min(2)} |C]);
@@ -337,9 +334,6 @@ init_per_testcase(Case, Config) ->
C = lists:keydelete(tc_timeout, 1, Config),
megaco_test_lib:init_per_testcase(Case, [{tc_timeout, min(1)} |C]).
-% end_per_testcase(pending_ack = Case, Config) ->
-% erase(dbg),
-% megaco_test_lib:end_per_testcase(Case, Config);
end_per_testcase(Case, Config) ->
megaco_test_lib:end_per_testcase(Case, Config).
@@ -434,6 +428,7 @@ connect(suite) ->
connect(doc) ->
[];
connect(Config) when is_list(Config) ->
+ %% ?SKIP("Needs a re-write..."),
?ACQUIRE_NODES(1, Config),
PrelMid = preliminary_mid,
MgMid = ipv4_mid(4711),
@@ -457,16 +452,25 @@ connect(Config) when is_list(Config) ->
?VERIFY(bad_send_mod, megaco:conn_info(PrelCH, send_mod)),
SC = service_change_request(),
case megaco:call(PrelCH, [SC], []) of
- {error,
- {send_message_failed,
- {'EXIT', {undef, [{bad_send_mod, send_message, [sh, _]} | _]}}}} ->
+ {_Version,
+ {error,
+ {send_message_failed,
+ {'EXIT', {undef, [{bad_send_mod, send_message, [sh, _]} | _]}}}}
+ } ->
+ %% R14B and previous
+ ?LOG("expected send failure (1)", []),
ok;
%% As of R15, we also get some extra info (e.g. line numbers)
- {error,
- {send_message_failed,
- {'EXIT', {undef, [{bad_send_mod, send_message, [sh, _], _} | _]}}}} ->
+ {_Version,
+ {error,
+ {send_message_failed,
+ {'EXIT', {undef, [{bad_send_mod, send_message, [sh, _], _} | _]}}}}
+ } ->
+ %% R15B and later
+ ?LOG("expected send failure (2)", []),
ok;
+
Unexpected ->
?ERROR(Unexpected)
end,
diff --git a/lib/megaco/vsn.mk b/lib/megaco/vsn.mk
index bb6f5f554a..11a951a23e 100644
--- a/lib/megaco/vsn.mk
+++ b/lib/megaco/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2011. All Rights Reserved.
+# Copyright Ericsson AB 1997-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = megaco
-MEGACO_VSN = 3.16
+MEGACO_VSN = 3.16.0.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(MEGACO_VSN)$(PRE_VSN)"
diff --git a/lib/mnesia/doc/src/company.erl b/lib/mnesia/doc/src/company.erl
index 28c32ed513..eef5535ed3 100644
--- a/lib/mnesia/doc/src/company.erl
+++ b/lib/mnesia/doc/src/company.erl
@@ -1,19 +1,20 @@
-%% ``The contents of this file are subject to the Erlang Public License,
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
-%% retrieved via the world wide web at http://www.erlang.org/.
-%%
+%% retrieved online at http://www.erlang.org/.
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
-%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
-%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
-%% AB. All Rights Reserved.''
-%%
-%% $Id$
+%%
+%% %CopyrightEnd%
%%
-module(company).
@@ -83,16 +84,24 @@ g() -> l.
%3
female_bosses() ->
- Q = qlc:q( [{E#employee.name, Boss#employee.name} ||
- E <- mnesia:table(employee),
- Boss <- mnesia:table(employee),
- Atdep <- mnesia:table(at_dep),
- Mgr <- mnesia:table(manager),
- E#employee.sex == female,
- Atdep#at_dep.emp == E#employee.emp_no,
- Mgr#manager.emp == Boss#employee.emp_no,
- Atdep#at_dep.dept_id == Mgr#manager.dept]
+ H1 = qlc:q( [{Atdep#at_dep.dept_id,E} ||
+ E <- mnesia:table(employee),
+ E#employee.sex == female,
+ Atdep <- mnesia:table(at_dep),
+ Atdep#at_dep.emp == E#employee.emp_no]
+ ),
+
+ H2 = qlc:q( [{Mgr#manager.emp,E} ||
+ {AtdepDeptId, E} <- H1,
+ Mgr <- mnesia:table(manager),
+ AtdepDeptId == Mgr#manager.dept]
),
+
+ Q = qlc:q( [{E#employee.name, Boss#employee.name} ||
+ {MgrEmp,E} <- H2,
+ Boss <- mnesia:table(employee),
+ MgrEmp == Boss#employee.emp_no]
+ ),
mnesia:transaction(fun() -> qlc:e(Q) end).
%3
diff --git a/lib/mnesia/doc/src/company_o.erl b/lib/mnesia/doc/src/company_o.erl
index 3c7ad0d5e5..dffe9840bb 100644
--- a/lib/mnesia/doc/src/company_o.erl
+++ b/lib/mnesia/doc/src/company_o.erl
@@ -1,20 +1,22 @@
-%% ``The contents of this file are subject to the Erlang Public License,
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
-%% retrieved via the world wide web at http://www.erlang.org/.
-%%
+%% retrieved online at http://www.erlang.org/.
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
-%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
-%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
-%% AB. All Rights Reserved.''
-%%
-%% $Id$
%%
+%% %CopyrightEnd%
+%%
+
-module(company_o).
-compile(export_all).
diff --git a/lib/observer/doc/src/etop.xml b/lib/observer/doc/src/etop.xml
index 78047caab3..4eb5603549 100644
--- a/lib/observer/doc/src/etop.xml
+++ b/lib/observer/doc/src/etop.xml
@@ -114,6 +114,37 @@ Default: <c>on</c></item>
</description>
<funcs>
<func>
+ <name>start() -> ok</name>
+ <fsummary>Start etop</fsummary>
+ <desc>
+ <p>This function starts <c>etop</c>.
+ Note that etop is preferably started with the etop and getop scripts</p>
+ </desc>
+ </func>
+ <func>
+ <name>start(Options) -> ok</name>
+ <fsummary>Start etop</fsummary>
+ <type>
+ <v>Options = [Option]</v>
+ <v>Option = {Key, Value}</v>
+ <v>Key = atom()</v>
+ <v>Value = term()</v>
+ </type>
+ <desc>
+ <p>This function starts <c>etop</c>. Use
+ <seealso marker="#help/0">help/0</seealso> to see a
+ description of the possible options.</p>
+ </desc>
+ </func>
+ <func>
+ <name>help() -> ok</name>
+ <fsummary>Print etop's help</fsummary>
+ <desc>
+ <p>This function prints the help of <c>etop</c> and
+ its options.</p>
+ </desc>
+ </func>
+ <func>
<name>config(Key,Value) -> Result</name>
<fsummary>Change tool's configuration</fsummary>
<type>
diff --git a/lib/observer/priv/erlang_observer.png b/lib/observer/priv/erlang_observer.png
index 78e70461b1..01723d210b 100644
--- a/lib/observer/priv/erlang_observer.png
+++ b/lib/observer/priv/erlang_observer.png
Binary files differ
diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile
index ca26afc11d..7eb2144dee 100644
--- a/lib/observer/src/Makefile
+++ b/lib/observer/src/Makefile
@@ -45,6 +45,7 @@ MODULES= \
observer_app_wx \
observer_lib \
observer_wx \
+ observer_perf_wx \
observer_pro_wx \
observer_procinfo \
observer_sys_wx \
diff --git a/lib/observer/src/etop.erl b/lib/observer/src/etop.erl
index 0bf1d68534..7ec0fedbb2 100644
--- a/lib/observer/src/etop.erl
+++ b/lib/observer/src/etop.erl
@@ -31,9 +31,9 @@
help() ->
io:format(
- "Usage of the erlang top program~n"
- "Options are set as command line parameters as in -node a@host -..~n"
- "or as parameter to etop:start([{node, a@host}, {...}])~n"
+ "Usage of the Erlang top program~n~n"
+ "Options are set as command line parameters as in -node my@host~n"
+ "or as parameters to etop:start([{node, my@host}, {...}]).~n~n"
"Options are:~n"
" node atom Required The erlang node to measure ~n"
" port integer The used port, NOTE: due to a bug this program~n"
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl
index 62046577ad..7eac2b8fab 100644
--- a/lib/observer/src/observer_app_wx.erl
+++ b/lib/observer/src/observer_app_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,6 +27,12 @@
-include_lib("wx/include/wx.hrl").
-include("observer_defs.hrl").
+%% Import drawing wrappers
+-import(observer_perf_wx, [haveGC/1,
+ setPen/2, setFont/3, setBrush/2,
+ strokeLine/5, strokeLines/2, drawRoundedRectangle/6,
+ drawText/4, getTextExtent/2]).
+
-record(state,
{
parent,
@@ -37,7 +43,8 @@
current,
app,
sel,
- appmon
+ appmon,
+ usegc = false
}).
-record(paint, {font, pen, brush, sel, links}).
@@ -63,6 +70,8 @@
-define(ID_TRACE_TREE_PIDS, 106).
-define(ID_TRACE_TREE_NAMES, 107).
+-define(wxGC, wxGraphicsContext).
+
start_link(Notebook, Parent) ->
wx_object:start_link(?MODULE, [Notebook, Parent], []).
@@ -99,22 +108,34 @@ init([Notebook, Parent]) ->
wxPanel:connect(DrawingArea, left_up),
wxPanel:connect(DrawingArea, left_dclick),
wxPanel:connect(DrawingArea, right_down),
+ case os:type() of
+ {win32, _} -> %% Ignore erase on windows
+ wxPanel:connect(DrawingArea, erase_background, [{callback, fun(_,_) -> ok end}]);
+ _ -> ok
+ end,
- DefFont = wxSystemSettings:getFont(?wxSYS_DEFAULT_GUI_FONT),
+ UseGC = haveGC(DrawingArea),
+ Font = case os:type() of
+ {unix,_} when UseGC ->
+ wxFont:new(12,?wxFONTFAMILY_DECORATIVE,?wxFONTSTYLE_NORMAL,?wxFONTWEIGHT_NORMAL);
+ _ ->
+ wxSystemSettings:getFont(?wxSYS_DEFAULT_GUI_FONT)
+ end,
SelCol = wxSystemSettings:getColour(?wxSYS_COLOUR_HIGHLIGHT),
+ GreyBrush = wxBrush:new({230,230,240}),
SelBrush = wxBrush:new(SelCol),
LinkPen = wxPen:new(SelCol, [{width, 2}]),
- %% GC = wxGraphicsContext:create(DrawingArea),
- %% _Font = wxGraphicsContext:createFont(GC, DefFont),
+ process_flag(trap_exit, true),
{Panel, #state{parent=Parent,
panel =Panel,
apps_w=Apps,
app_w =DrawingArea,
- paint=#paint{font= DefFont,
- pen= ?wxBLACK_PEN,
- brush=?wxLIGHT_GREY_BRUSH,
- sel= SelBrush,
- links=LinkPen
+ usegc = UseGC,
+ paint=#paint{font = Font,
+ pen = wxPen:new({80,80,80}, [{width, 2}]),
+ brush= GreyBrush,
+ sel = SelBrush,
+ links= LinkPen
}
}}.
@@ -215,12 +236,28 @@ handle_event(Event, _State) ->
%%%%%%%%%%
handle_sync_event(#wx{event = #wxPaint{}},_,
- #state{app_w=DA, app=App, sel=Sel, paint=Paint}) ->
+ #state{app_w=DA, app=App, sel=Sel, paint=Paint, usegc=UseGC}) ->
%% PaintDC must be created in a callback to work on windows.
- DC = wxPaintDC:new(DA),
- wxScrolledWindow:doPrepareDC(DA,DC),
+ IsWindows = element(1, os:type()) =:= win32,
+ %% Avoid Windows flickering hack
+ DC = if IsWindows -> wx:typeCast(wxBufferedPaintDC:new(DA), wxPaintDC);
+ true -> wxPaintDC:new(DA)
+ end,
+ IsWindows andalso wxDC:clear(DC),
+ GC = case UseGC of
+ true ->
+ GC0 = ?wxGC:create(DC),
+ %% Argh must handle scrolling when using ?wxGC
+ {Sx,Sy} = wxScrolledWindow:calcScrolledPosition(DA, {0,0}),
+ ?wxGC:translate(GC0, Sx,Sy),
+ GC0;
+ false ->
+ wxScrolledWindow:doPrepareDC(DA,DC),
+ DC
+ end,
%% Nothing is drawn until wxPaintDC is destroyed.
- draw(DC, App, Sel, Paint),
+ draw({UseGC, GC}, App, Sel, Paint),
+ UseGC andalso ?wxGC:destroy(GC),
wxPaintDC:destroy(DC),
ok.
%%%%%%%%%%
@@ -249,26 +286,44 @@ handle_info(not_active, State = #state{appmon=AppMon, current=Prev}) ->
{noreply, State};
handle_info({delivery, Pid, app_ctrl, _, Apps0},
- State = #state{appmon=Pid, apps_w=LBox}) ->
+ State = #state{appmon=Pid, apps_w=LBox, current=Curr0}) ->
Apps = [atom_to_list(App) || {_, App, {_, _, _}} <- Apps0],
wxListBox:clear(LBox),
wxListBox:appendStrings(LBox, [App || App <- lists:sort(Apps)]),
- {noreply, State};
-
+ case Apps of
+ [App|_] when Curr0 =:= undefined ->
+ Curr = list_to_atom(App),
+ appmon_info:app(Pid, Curr, true, []),
+ {noreply, State#state{current=Curr}};
+ _ ->
+ {noreply, State}
+ end;
handle_info({delivery, _Pid, app, _Curr, {[], [], [], []}},
State = #state{panel=Panel}) ->
wxWindow:refresh(Panel),
{noreply, State#state{app=undefined, sel=undefined}};
handle_info({delivery, Pid, app, Curr, AppData},
- State = #state{panel=Panel, appmon=Pid, current=Curr,
+ State = #state{panel=Panel, appmon=Pid, current=Curr, usegc=UseGC,
app_w=AppWin, paint=#paint{font=Font}}) ->
- App = build_tree(AppData, {AppWin,Font}),
+ GC = if UseGC -> ?wxGC:create(AppWin);
+ true -> wxWindowDC:new(AppWin)
+ end,
+ FontW = {UseGC, GC},
+ setFont(FontW, Font, {0,0,0}),
+ App = build_tree(AppData, FontW),
+ if UseGC -> ?wxGC:destroy(GC);
+ true -> wxWindowDC:destroy(GC)
+ end,
setup_scrollbar(AppWin, App),
wxWindow:refresh(Panel),
wxWindow:layout(Panel),
{noreply, State#state{app=App, sel=undefined}};
+handle_info({'EXIT', _, noconnection}, State) ->
+ {noreply, State};
+handle_info({'EXIT', _, normal}, State) ->
+ {noreply, State};
handle_info(_Event, State) ->
%% io:format("~p:~p: ~p~n",[?MODULE,?LINE,_Event]),
{noreply, State}.
@@ -354,11 +409,11 @@ locate_box(From, []) -> {false, From}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-build_tree({Root, P2Name, Links, XLinks0}, Font) ->
+build_tree({Root, P2Name, Links, XLinks0}, FontW) ->
Fam = sofs:relation_to_family(sofs:relation(Links)),
Name2P = gb_trees:from_orddict(lists:sort([{Name,Pid} || {Pid,Name} <- P2Name])),
Lookup = gb_trees:from_orddict(sofs:to_external(Fam)),
- {_, Tree0} = build_tree2(Root, Lookup, Name2P, Font),
+ {_, Tree0} = build_tree2(Root, Lookup, Name2P, FontW),
{Tree, Dim} = calc_tree_size(Tree0),
Fetch = fun({From, To}, Acc) ->
try {value, ToPid} = gb_trees:lookup(To, Name2P),
@@ -371,18 +426,18 @@ build_tree({Root, P2Name, Links, XLinks0}, Font) ->
XLinks = lists:foldl(Fetch, [], XLinks0),
#app{ptree=Tree, dim=Dim, links=XLinks}.
-build_tree2(Root, Tree0, N2P, Font) ->
+build_tree2(Root, Tree0, N2P, FontW) ->
case gb_trees:lookup(Root, Tree0) of
- none -> {Tree0, {box(Root, N2P, Font), []}};
+ none -> {Tree0, {box(Root, N2P, FontW), []}};
{value, Children} ->
Tree1 = gb_trees:delete(Root, Tree0),
{Tree, CHs} = lists:foldr(fun("port " ++_, Acc) ->
Acc; %% Skip ports
(Child,{T0, Acc}) ->
- {T, C} = build_tree2(Child, T0, N2P, Font),
+ {T, C} = build_tree2(Child, T0, N2P, FontW),
{T, [C|Acc]}
end, {Tree1, []}, Children),
- {Tree, {box(Root, N2P, Font), CHs}}
+ {Tree, {box(Root, N2P, FontW), CHs}}
end.
calc_tree_size(Tree) ->
@@ -427,15 +482,15 @@ middle([{#box{y=Y0},_}|List], _) ->
{#box{y=Y1},_} = lists:last(List),
(Y0+Y1) div 2.
-box(Str0, N2P, {Win,Font}) ->
+box(Str0, N2P, FontW) ->
Pid = gb_trees:get(Str0, N2P),
Str = if hd(Str0) =:= $< -> lists:append(io_lib:format("~w", [Pid]));
true -> Str0
end,
- {TW,TH, _, _} = wxWindow:getTextExtent(Win, Str, [{theFont, Font}]),
+ {TW,TH} = getTextExtent(FontW, Str),
Data = #str{text=Str, x=?BX_HE, y=?BY_HE, pid=Pid},
%% Add pid
- #box{w=TW+?BX_E, h=TH+?BY_E, s1=Data}.
+ #box{w=round(TW)+?BX_E, h=round(TH)+?BY_E, s1=Data}.
box_to_pid(#box{s1=#str{pid=Pid}}) -> Pid.
box_to_reg(#box{s1=#str{text=[$<|_], pid=Pid}}) -> Pid;
@@ -453,39 +508,30 @@ draw(_DC, undefined, _, _) ->
ok;
draw(DC, #app{dim={_W,_H}, ptree=Tree, links=Links}, Sel,
#paint{font=Font, pen=Pen, brush=Brush, links=LPen, sel=SelBrush}) ->
- %% Canvas = wxGraphicsContext:create(DC),
- %% Pen = wxGraphicsContext:createPen(Canvas, ?wxBLACK_PEN),
- %% wxGraphicsContext:setPen(Canvas, Pen),
- %% Brush = wxGraphicsContext:createBrush(Canvas, ?wxLIGHT_GREY_BRUSH),
- %% wxGraphicsContext:setBrush(Canvas, Brush),
- %% Font = wxGraphicsContext:createFont(Canvas, wxSystemSettings:getFont(?wxSYS_DEFAULT_GUI_FONT)),
- %% wxGraphicsContext:setFont(Canvas, Font),
- %% draw_tree(Tree, Canvas).
- wxDC:setPen(DC, LPen),
+ setPen(DC, LPen),
[draw_xlink(Link, DC) || Link <- Links],
- wxDC:setPen(DC, Pen),
- %% wxDC:drawRectangle(DC, {2,2}, {W-2,H-2}), %% DEBUG
- wxDC:setBrush(DC, Brush),
- wxDC:setFont(DC, Font),
+ setPen(DC, Pen),
+ %% ?wxGC:drawRectangle(DC, 2,2, _W-2,_H-2), %% DEBUG
+ setBrush(DC, Brush),
+ setFont(DC, Font, {0,0,0}),
draw_tree(Tree, root, DC),
case Sel of
undefined -> ok;
{#box{x=X,y=Y,w=W,h=H,s1=Str1}, _} ->
- wxDC:setBrush(DC, SelBrush),
- wxDC:drawRoundedRectangle(DC, {X-1,Y-1}, {W+2,H+2}, 8.0),
+ setBrush(DC, SelBrush),
+ drawRoundedRectangle(DC, X-1,Y-1, W+2,H+2, 8.0),
draw_str(DC, Str1, X, Y)
end.
draw_tree({Box=#box{x=X,y=Y,w=W,h=H,s1=Str1}, Chs}, Parent, DC) ->
- %%wxGraphicsContext:drawRoundedRectangle(DC, float(X), float(Y), float(W), float(H), 8.0),
- wxDC:drawRoundedRectangle(DC, {X,Y}, {W,H}, 8.0),
+ drawRoundedRectangle(DC, X,Y, W,H, 8.0),
draw_str(DC, Str1, X, Y),
Dot = case Chs of
[] -> ok;
[{#box{x=CX0},_}|_] ->
CY = Y+(H div 2),
CX = CX0-(?BB_X div 2),
- wxDC:drawLine(DC, {X+W, CY}, {CX, CY}),
+ strokeLine(DC, X+W, CY, CX, CY),
{CX, CY}
end,
draw_link(Parent, Box, DC),
@@ -495,9 +541,9 @@ draw_link({CX,CY}, #box{x=X,y=Y0,h=H}, DC) ->
Y = Y0+(H div 2),
case Y =:= CY of
true ->
- wxDC:drawLine(DC, {CX, CY}, {X, CY});
+ strokeLine(DC, CX, CY, X, CY);
false ->
- wxDC:drawLines(DC, [{CX, CY}, {CX, Y}, {X,Y}])
+ strokeLines(DC, [{CX, CY}, {CX, Y}, {X,Y}])
end;
draw_link(_, _, _) -> ok.
@@ -516,9 +562,8 @@ draw_xlink(X0, Y00, X1, Y11, BH, DC) ->
{Y0,Y1} = if Y00 < Y11 -> {Y00+BH-6, Y11+6};
true -> {Y00+6, Y11+BH-6}
end,
- wxDC:drawLines(DC, [{X0,Y0}, {X0+5,Y0}, {X1-5,Y1}, {X1,Y1}]).
+ strokeLines(DC, [{X0,Y0}, {X0+5,Y0}, {X1-5,Y1}, {X1,Y1}]).
draw_str(DC, #str{x=Sx,y=Sy, text=Text}, X, Y) ->
- %%wxGraphicsContext:drawText(DC, Text, float(Sx+X), float(Sy+Y));
- wxDC:drawText(DC, Text, {X+Sx,Y+Sy});
+ drawText(DC, Text, X+Sx,Y+Sy);
draw_str(_, _, _, _) -> ok.
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl
index 5260861497..3b924d46cf 100644
--- a/lib/observer/src/observer_lib.erl
+++ b/lib/observer/src/observer_lib.erl
@@ -154,7 +154,9 @@ to_str(Value) when is_atom(Value) ->
to_str({bytes, B}) ->
KB = B div 1024,
MB = KB div 1024,
+ GB = MB div 1024,
if
+ GB > 10 -> integer_to_list(GB) ++ " gB";
MB > 10 -> integer_to_list(MB) ++ " mB";
KB > 0 -> integer_to_list(KB) ++ " kB";
true -> integer_to_list(B) ++ " B "
diff --git a/lib/observer/src/observer_perf_wx.erl b/lib/observer/src/observer_perf_wx.erl
new file mode 100644
index 0000000000..fa867e12f6
--- /dev/null
+++ b/lib/observer/src/observer_perf_wx.erl
@@ -0,0 +1,575 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(observer_perf_wx).
+
+-export([start_link/2]).
+
+%% wx_object callbacks
+-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
+ handle_event/2, handle_sync_event/3, handle_cast/2]).
+
+%% Drawing wrappers for DC and GC areas
+-export([haveGC/1,
+ setPen/2, setFont/3, setBrush/2,
+ strokeLine/5, strokeLines/2, drawRoundedRectangle/6,
+ drawText/4, getTextExtent/2]).
+
+-behaviour(wx_object).
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+-record(state,
+ {
+ offset = 0.0,
+ active = false,
+ parent,
+ windows,
+ data = {0, queue:new()},
+ panel,
+ paint,
+ appmon,
+ usegc = false
+ }).
+
+-define(wxGC, wxGraphicsContext).
+
+-record(paint, {font, small, pen, pen2, pens}).
+
+-define(RQ_W, 1).
+-define(MEM_W, 2).
+-define(IO_W, 3).
+
+start_link(Notebook, Parent) ->
+ wx_object:start_link(?MODULE, [Notebook, Parent], []).
+
+init([Notebook, Parent]) ->
+ try
+ Panel = wxPanel:new(Notebook),
+ Main = wxBoxSizer:new(?wxVERTICAL),
+ Style = ?wxFULL_REPAINT_ON_RESIZE bor ?wxCLIP_CHILDREN,
+ CPU = wxPanel:new(Panel, [{winid, ?RQ_W}, {style,Style}]),
+ wxWindow:setBackgroundColour(CPU, ?wxWHITE),
+ wxSizer:add(Main, CPU, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 1}, {border, 5}]),
+ MemIO = wxBoxSizer:new(?wxHORIZONTAL),
+ MEM = wxPanel:new(Panel, [{winid, ?MEM_W}, {style,Style}]),
+ wxWindow:setBackgroundColour(MEM, ?wxWHITE),
+ IO = wxPanel:new(Panel, [{winid, ?IO_W}, {style,Style}]),
+ wxWindow:setBackgroundColour(IO, ?wxWHITE),
+ wxSizer:add(MemIO, MEM, [{flag, ?wxEXPAND bor ?wxLEFT},
+ {proportion, 1}, {border, 5}]),
+ wxSizer:add(MemIO, IO, [{flag, ?wxEXPAND bor ?wxLEFT bor ?wxRIGHT},
+ {proportion, 1}, {border, 5}]),
+ wxSizer:add(Main, MemIO, [{flag, ?wxEXPAND bor ?wxDOWN},
+ {proportion, 1}, {border, 5}]),
+ wxWindow:setSizer(Panel, Main),
+
+ wxPanel:connect(CPU, paint, [callback]),
+ wxPanel:connect(IO, paint, [callback]),
+ wxPanel:connect(MEM, paint, [callback]),
+ case os:type() of
+ {win32, _} -> %% Ignore erase on windows
+ wxPanel:connect(CPU, erase_background, [{callback, fun(_,_) -> ok end}]),
+ wxPanel:connect(IO, erase_background, [{callback, fun(_,_) -> ok end}]),
+ wxPanel:connect(MEM, erase_background, [{callback, fun(_,_) -> ok end}]);
+ _ -> ok
+ end,
+
+ UseGC = haveGC(Panel),
+ {Font, SmallFont}
+ = case os:type() of
+ {unix, _} when UseGC ->
+ %% Def font is really small when using Graphics contexts for some reason
+ %% Hardcode it
+ F = wxFont:new(12,?wxFONTFAMILY_DECORATIVE,?wxFONTSTYLE_NORMAL,?wxFONTWEIGHT_BOLD),
+ SF = wxFont:new(10, ?wxFONTFAMILY_DECORATIVE, ?wxFONTSTYLE_NORMAL, ?wxFONTWEIGHT_NORMAL),
+ {F, SF};
+ _ ->
+ DefFont = wxSystemSettings:getFont(?wxSYS_DEFAULT_GUI_FONT),
+ DefSize = wxFont:getPointSize(DefFont),
+ DefFamily = wxFont:getFamily(DefFont),
+ F = wxFont:new(DefSize, DefFamily, ?wxFONTSTYLE_NORMAL, ?wxFONTWEIGHT_BOLD),
+ SF = wxFont:new(DefSize-1, DefFamily, ?wxFONTSTYLE_NORMAL, ?wxFONTWEIGHT_NORMAL),
+ {F, SF}
+ end,
+ BlackPen = wxPen:new({0,0,0}, [{width, 2}]),
+ Pens = [wxPen:new(Col, [{width, 2}]) || Col <- tuple_to_list(colors())],
+ process_flag(trap_exit, true),
+ {Panel, #state{parent=Parent,
+ panel =Panel,
+ windows = {CPU, MEM, IO},
+ usegc=UseGC,
+ paint=#paint{font = Font,
+ small = SmallFont,
+ pen = ?wxGREY_PEN,
+ pen2 = BlackPen,
+ pens = list_to_tuple(Pens)
+ }
+ }}
+ catch _:Err ->
+ io:format("~p crashed ~p: ~p~n",[?MODULE, Err, erlang:get_stacktrace()]),
+ {error, Err}
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_event(#wx{event=#wxCommand{type=command_menu_selected}},
+ State = #state{}) ->
+ {noreply, State};
+
+handle_event(Event, _State) ->
+ error({unhandled_event, Event}).
+
+%%%%%%%%%%
+handle_sync_event(#wx{obj=Panel, event = #wxPaint{}},_,
+ #state{active=Active, offset=Offset, paint=Paint,
+ windows=Windows, data=Data, usegc=UseGC}) ->
+ %% PaintDC must be created in a callback to work on windows.
+ %% Sigh workaround bug on MacOSX (Id in paint event is always 0)
+ %% Panel = element(Id, Windows),
+ Id = if Panel =:= element(?RQ_W, Windows) -> ?RQ_W;
+ Panel =:= element(?MEM_W, Windows) -> ?MEM_W;
+ Panel =:= element(?IO_W, Windows) -> ?IO_W
+ end,
+ IsWindows = element(1, os:type()) =:= win32,
+
+ DC = if IsWindows ->
+ %% Ugly hack to aviod flickering on windows, works on windows only
+ %% But the other platforms are doublebuffered by default
+ wx:typeCast(wxBufferedPaintDC:new(Panel), wxPaintDC);
+ true ->
+ wxPaintDC:new(Panel)
+ end,
+ IsWindows andalso wxDC:clear(DC),
+ GC = if UseGC -> ?wxGC:create(DC);
+ true -> DC
+ end,
+ %% Nothing is drawn until wxPaintDC is destroyed.
+ try
+ draw(Offset, Id, {UseGC, GC}, Panel, Paint, Data, Active)
+ catch _:Err ->
+ io:format("Internal error ~p ~p~n",[Err, erlang:get_stacktrace()])
+ end,
+ UseGC andalso ?wxGC:destroy(GC),
+ wxPaintDC:destroy(DC),
+ ok.
+%%%%%%%%%%
+handle_call(Event, From, _State) ->
+ error({unhandled_call, Event, From}).
+
+handle_cast(Event, _State) ->
+ error({unhandled_cast, Event}).
+%%%%%%%%%%
+handle_info(Stats = {stats, 1, _, _, _},
+ State = #state{panel=Panel, data=Data, active=Active}) ->
+ if Active ->
+ wxWindow:refresh(Panel),
+ Freq = 6,
+ erlang:send_after(trunc(1000 / Freq), self(), {refresh, 1, Freq});
+ true -> ignore
+ end,
+ {noreply, State#state{offset=0.0, data = add_data(Stats, Data)}};
+
+handle_info({refresh, Seq, Freq}, State = #state{panel=Panel, offset=Prev}) ->
+ wxWindow:refresh(Panel),
+ Next = Seq+1,
+ if Seq > 1, Prev =:= 0.0 ->
+ %% We didn't have time to handle the refresh
+ {noreply, State};
+ Next < Freq ->
+ erlang:send_after(trunc(1000 / Freq), self(), {refresh, Next, Freq}),
+ {noreply, State#state{offset=Seq/Freq}};
+ true ->
+ {noreply, State#state{offset=Seq/Freq}}
+ end;
+
+handle_info({active, Node}, State = #state{parent=Parent, panel=Panel, appmon=Old}) ->
+ create_menus(Parent, []),
+ try
+ Node = node(Old),
+ wxWindow:refresh(Panel),
+ {noreply, State#state{active=true}}
+ catch _:_ ->
+ catch Old ! exit,
+ Me = self(),
+ Pid = spawn_link(Node, observer_backend, fetch_stats, [Me, 1000]),
+ wxWindow:refresh(Panel),
+ {noreply, State#state{active=true, appmon=Pid, data={0, queue:new()}}}
+ end;
+
+handle_info(not_active, State = #state{appmon=_Pid}) ->
+ %% Pid ! exit,
+ {noreply, State#state{active=false}};
+
+handle_info({'EXIT', Old, _}, State = #state{appmon=Old}) ->
+ {noreply, State#state{active=false, appmon=undefined}};
+
+handle_info(_Event, State) ->
+ %% io:format("~p:~p: ~p~n",[?MODULE,?LINE,_Event]),
+ {noreply, State}.
+
+%%%%%%%%%%
+terminate(_Event, #state{appmon=Pid}) ->
+ catch Pid ! exit,
+ ok.
+code_change(_, _, State) ->
+ State.
+
+add_data(Stats, {N, Q}) when N > 60 ->
+ {N, queue:drop(queue:in(Stats, Q))};
+add_data(Stats, {N, Q}) ->
+ {N+1, queue:in(Stats, Q)}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+create_menus(Parent, _) ->
+ MenuEntries =
+ [{"File",
+ [
+ ]}
+ ],
+ observer_wx:create_menus(Parent, MenuEntries).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+collect_data(?RQ_W, {N, Q}) ->
+ case queue:to_list(Q) of
+ [] -> {0, 0, []};
+ [_] -> {0, 0, []};
+ [{stats, _Ver, Init0, _IO, _Mem}|Data0] ->
+ Init = lists:sort(Init0),
+ [_|Data=[First|_]] = lists:foldl(fun({stats, _, T0, _, _}, [Prev|Acc]) ->
+ TN = lists:sort(T0),
+ Delta = calc_delta(TN, Prev),
+ [TN, list_to_tuple(Delta)|Acc]
+ end, [Init], Data0),
+ {N, lmax(Data), lists:reverse([First|Data])}
+ end;
+collect_data(?MEM_W, {N, Q}) ->
+ MemT = mem_types(),
+ Data = [list_to_tuple([Value || {Type,Value} <- MemInfo,
+ lists:member(Type, MemT)])
+ || {stats, _Ver, _RQ, _IO, MemInfo} <- queue:to_list(Q)],
+ {N, lmax(Data), Data};
+collect_data(?IO_W, {N, Q}) ->
+ case queue:to_list(Q) of
+ [] -> {0, 0, []};
+ [_] -> {0, 0, []};
+ [{stats, _Ver, _RQ, {{_,In0}, {_,Out0}}, _Mem}|Data0] ->
+ [_,_|Data=[First|_]] =
+ lists:foldl(fun({stats, _, _, {{_,In}, {_,Out}}, _}, [PIn,Pout|Acc]) ->
+ [In,Out,{In-PIn,Out-Pout}|Acc]
+ end, [In0,Out0], Data0),
+ {N, lmax(Data), lists:reverse([First|Data])}
+ end.
+
+mem_types() ->
+ [total, processes, atom, binary, code, ets].
+
+lmax([]) -> 0;
+lmax(List) ->
+ lists:max([lists:max(tuple_to_list(T)) || T <- List]).
+
+calc_delta([{Id, WN, TN}|Ss], [{Id, WP, TP}|Ps]) ->
+ [100*(WN-WP) div (TN-TP)|calc_delta(Ss, Ps)];
+calc_delta([], []) -> [].
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+draw(Offset, Id, DC, Panel, Paint=#paint{pens=Pens, small=Small}, Data, Active) ->
+ %% This can be optimized a lot by collecting data once
+ %% and draw to memory and then blit memory and only draw new entries in new memory
+ %% area. Hmm now rewritten to use ?wxGC I don't now if it is feasable.
+ {Len, Max0, Hs} = collect_data(Id, Data),
+ Max = calc_max(Max0),
+ NoGraphs = try tuple_size(hd(Hs)) catch _:_ -> 0 end,
+ Size = wxWindow:getClientSize(Panel),
+ {X0,Y0,WS,HS} = draw_borders(Id, NoGraphs, DC, Size, Max, Paint),
+ Last = 60*WS+X0-1,
+ Start = max(61-Len, 0)*WS+X0 - Offset*WS,
+ case Hs of
+ [] -> ignore;
+ [_] -> ignore;
+ _ ->
+ Draw = fun(N) ->
+ Lines = make_lines(Hs, Start, N, {X0,Max*HS,Last}, Y0, WS, HS),
+ setPen(DC, element(1+ ((N-1) rem tuple_size(Pens)), Pens)),
+ strokeLines(DC, Lines),
+ N+1
+ end,
+ [Draw(I) || I <- lists:seq(NoGraphs, 1, -1)]
+ end,
+ case Active of
+ false ->
+ NotActive = "Service not available",
+ setFont(DC, Small, {0,0,0}),
+ drawText(DC, NotActive, X0 + 100, element(2,Size) div 2);
+ true ->
+ ignore
+ end,
+ ok.
+
+make_lines(Ds = [Data|_], PX, N, Clip, ZeroY, WS, HS) ->
+ Y = element(N,Data),
+ make_lines(Ds, PX, N, Clip, ZeroY, WS, HS, Y, []).
+
+make_lines([D1 | Ds = [D2|Rest]], PX, N, Clip={Cx,Cy, _}, ZeroY, WS, HS, Y0, Acc0) ->
+ Y1 = element(N,D1),
+ Y2 = element(N,D2),
+ Y3 = case Rest of
+ [D3|_] -> element(N,D3);
+ [] -> Y2
+ end,
+ This = {max(Cx, PX),ZeroY-min(Cy,Y1*HS)},
+ Acc = if (abs(Y1-Y2) * HS) < 3.0 -> [This|Acc0];
+ WS < 3.0 -> [This|Acc0];
+ PX < Cx ->
+ make_splines(Y0,Y1,Y2,Y3,PX,Clip,ZeroY,WS,HS,Acc0);
+ true ->
+ make_splines(Y0,Y1,Y2,Y3,PX,Clip,ZeroY,WS,HS,[This|Acc0])
+ end,
+ make_lines(Ds, PX+WS, N, Clip, ZeroY, WS, HS, Y1, Acc);
+make_lines([D1], _PX, N, {_,Cy,Last}, ZeroY, _WS, HS, _Y0, Acc) ->
+ Y1 = element(N,D1),
+ [{Last,ZeroY-min(Cy, Y1*HS)}|Acc].
+
+make_splines(Y00,Y10,Y20,Y30,PX,Clip,ZeroY,WS,HS,Acc) ->
+ Y1 = Y10*HS,
+ Y2 = Y20*HS,
+ Steps = min(abs(Y1-Y2), WS),
+ if Steps > 2 ->
+ Y0 = Y00*HS,
+ Y3 = Y30*HS,
+ Tan = spline_tan(Y0,Y1,Y2,Y3),
+ Delta = 1/Steps,
+ splines(Steps-1, 0.0, Delta, Tan, Y1,Y2, PX, Clip,ZeroY, Delta*WS, Acc);
+ true ->
+ Acc
+ end.
+
+splines(N, XD, XD0, Tan, Y1,Y2, PX0, Clip={Cx,Cy,_},ZeroY, WS, Acc) when N > 0 ->
+ PX = PX0+WS,
+ Delta = XD+XD0,
+ if PX < Cx ->
+ splines(N-1, Delta, XD0, Tan, Y1, Y2, PX, Clip,ZeroY, WS, Acc);
+ true ->
+ Y = min(Cy, max(0,spline(Delta, Tan, Y1,Y2))),
+ splines(N-1, Delta, XD0, Tan, Y1, Y2, PX, Clip,ZeroY, WS,
+ [{PX, ZeroY-Y}|Acc])
+ end;
+splines(_N, _XD, _XD0, _Tan, _Y1,_Y2, _PX, _Clip,_ZeroY, _WS, Acc) -> Acc.
+
+spline(T, {M1, M2}, Y1, Y2) ->
+ %% Hermite Basis Funcs
+ T2 = T*T, T3 = T*T*T,
+ H1 = 2*T3-3*T2+1,
+ H2 = -2*T3+3*T2,
+ H3 = T3-2*T2+T,
+ H4 = T3-T2,
+ %% Result
+ M1*H3 + Y1*H1 + Y2*H2 + M2*H4.
+
+spline_tan(Y0, Y1, Y2, Y3) ->
+ S = 1.0,
+ C = 0.5,
+ %% Calc tangent values
+ M1 = S*C*(Y2-Y0),
+ M2 = S*C*(Y3-Y1),
+ {M1,M2}.
+
+-define(BW, 5).
+-define(BH, 5).
+
+draw_borders(Type, NoGraphs, DC, {W,H}, Max,
+ #paint{pen=Pen, pen2=Pen2, font=Font, small=Small}) ->
+ {Unit, MaxUnit} = bytes(Type, Max),
+ Str1 = observer_lib:to_str(MaxUnit),
+ Str2 = observer_lib:to_str(MaxUnit div 2),
+ Str3 = observer_lib:to_str(0),
+
+ setFont(DC, Font, {0,0,0}),
+ {TW,TH} = getTextExtent(DC, Str1),
+ {SpaceW, _} = getTextExtent(DC, "W"),
+
+ GraphX0 = ?BW+TW+?BW,
+ GraphX1 = W-?BW*4,
+ TopTextX = ?BW+TW+?BW,
+ MaxTextY = ?BH+TH+?BH,
+ BottomTextY = H-?BH-TH,
+ SecondsY = BottomTextY - ?BH - TH,
+ GraphY0 = MaxTextY + (TH / 2),
+ GraphY1 = SecondsY - ?BH,
+ GraphW = GraphX1-GraphX0-1,
+ GraphH = GraphY1-GraphY0-1,
+ GraphY25 = GraphY0 + (GraphY1 - GraphY0) / 4,
+ GraphY50 = GraphY0 + (GraphY1 - GraphY0) / 2,
+ GraphY75 = GraphY0 + 3*(GraphY1 - GraphY0) / 4,
+ ScaleW = GraphW / 60,
+ ScaleH = GraphH / Max,
+
+ setFont(DC, Small, {0,0,0}),
+ Align = fun(Str, Y) ->
+ {StrW, _} = getTextExtent(DC, Str),
+ drawText(DC, Str, GraphX0 - StrW - ?BW, Y)
+ end,
+ Align(Str1, MaxTextY),
+ Align(Str2, GraphY50 - (TH / 2)),
+ Align(Str3, GraphY1 - (TH / 2) + 1),
+
+ setPen(DC, Pen),
+ DrawSecs = fun(Secs, Pos) ->
+ Str = [observer_lib:to_str(Secs)|" s"],
+ X = GraphX0+Pos,
+ drawText(DC, Str, X-SpaceW, SecondsY),
+ strokeLine(DC, X, GraphY0, X, GraphY1+5),
+ Pos + 10*ScaleW
+ end,
+ lists:foldl(DrawSecs, 0, lists:seq(60,0, -10)),
+
+ strokeLine(DC, GraphX0-3, GraphY25, GraphX1, GraphY25),
+ strokeLine(DC, GraphX0-3, GraphY50, GraphX1, GraphY50),
+ strokeLine(DC, GraphX0-3, GraphY75, GraphX1, GraphY75),
+
+ setPen(DC, Pen2),
+ strokeLines(DC, [{GraphX0, GraphY0-1}, {GraphX0, GraphY1+1},
+ {GraphX1, GraphY1+1}, {GraphX1, GraphY0-1},
+ {GraphX0, GraphY0-1}]),
+
+ setFont(DC, Font, {0,0,0}),
+ case Type of
+ ?RQ_W -> drawText(DC, "Scheduler Utilization (%) ", TopTextX,?BH);
+ ?MEM_W -> drawText(DC, "Memory Usage " ++ Unit, TopTextX,?BH);
+ ?IO_W -> drawText(DC, "IO Usage " ++ Unit, TopTextX,?BH)
+ end,
+
+ Text = fun(X,Y, Str, PenId) ->
+ if PenId == 0 ->
+ setFont(DC, Font, {0,0,0});
+ PenId > 0 ->
+ Id = 1 + ((PenId-1) rem tuple_size(colors())),
+ setFont(DC, Font, element(Id, colors()))
+ end,
+ drawText(DC, Str, X, Y),
+ {StrW, _} = getTextExtent(DC, Str),
+ StrW + X + SpaceW
+ end,
+ case Type of
+ ?RQ_W ->
+ TN0 = Text(?BW, BottomTextY, "Scheduler: ", 0),
+ lists:foldl(fun(Id, Pos0) ->
+ Text(Pos0, BottomTextY, integer_to_list(Id), Id)
+ end, TN0, lists:seq(1, NoGraphs));
+ ?MEM_W ->
+ lists:foldl(fun(MType, {PenId, Pos0}) ->
+ Str = uppercase(atom_to_list(MType)),
+ Pos = Text(Pos0, BottomTextY, Str, PenId),
+ {PenId+1, Pos}
+ end, {1, ?BW}, mem_types());
+ ?IO_W ->
+ TN0 = Text(?BW, BottomTextY, "Input", 1),
+ Text(TN0, BottomTextY, "Output", 2)
+ end,
+ {GraphX0+1, GraphY1, ScaleW, ScaleH}.
+
+uppercase([C|Rest]) ->
+ [C-$a+$A|Rest].
+
+calc_max(Max) when Max < 10 -> 10;
+calc_max(Max) -> calc_max1(Max).
+
+calc_max1(Max) ->
+ case Max div 10 of
+ X when X < 10 ->
+ case Max rem 10 of
+ 0 -> Max;
+ _ ->
+ (X+1)*10
+ end;
+ X ->
+ 10*calc_max1(X)
+ end.
+
+bytes(?RQ_W, Val) -> {"", Val};
+bytes(_, B) ->
+ KB = B div 1024,
+ MB = KB div 1024,
+ GB = MB div 1024,
+ if
+ GB > 10 -> {"(GB)", GB};
+ MB > 10 -> {"(MB)", MB};
+ KB > 0 -> {"(KB)", KB};
+ true -> {"(B)", B}
+ end.
+
+colors() ->
+ {{200, 50, 50}, {50, 200, 50}, {50, 50, 200},
+ {255, 110, 0}, {50, 200, 200}, {200, 50, 200},
+ {240, 200, 80}, {140, 2, 140},
+ {100, 200, 240}, {100, 240, 100}
+ }.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% wxDC and ?wxGC wrappers
+
+haveGC(Win) ->
+ try
+ GC = ?wxGC:create(Win),
+ ?wxGC:destroy(GC),
+ true
+ catch _:_ -> false
+ end.
+
+setPen({false, DC}, Pen) ->
+ wxDC:setPen(DC, Pen);
+setPen({true, GC}, Pen) ->
+ ?wxGC:setPen(GC, Pen).
+
+setFont({false, DC}, Font, Color) ->
+ wxDC:setTextForeground(DC, Color),
+ wxDC:setFont(DC, Font);
+setFont({true, GC}, Font, Color) ->
+ ?wxGC:setFont(GC, Font, Color).
+
+setBrush({false, DC}, Brush) ->
+ wxDC:setBrush(DC, Brush);
+setBrush({true, GC}, Brush) ->
+ ?wxGC:setBrush(GC, Brush).
+
+strokeLine({false, DC}, X0, Y0, X1, Y1) ->
+ wxDC:drawLine(DC, {round(X0), round(Y0)}, {round(X1), round(Y1)});
+strokeLine({true, GC}, X0, Y0, X1, Y1) ->
+ ?wxGC:strokeLine(GC, X0, Y0, X1, Y1).
+
+strokeLines({false, DC}, Lines) ->
+ wxDC:drawLines(DC, [{round(X), round(Y)} || {X,Y} <- Lines]);
+strokeLines({true, GC}, Lines) ->
+ ?wxGC:strokeLines(GC, Lines).
+
+drawRoundedRectangle({false, DC}, X0, Y0, X1, Y1, R) ->
+ wxDC:drawRoundedRectangle(DC, {round(X0), round(Y0)}, {round(X1), round(Y1)}, round(R));
+drawRoundedRectangle({true, GC}, X0, Y0, X1, Y1, R) ->
+ ?wxGC:drawRoundedRectangle(GC, X0, Y0, X1, Y1, R).
+
+drawText({false, DC}, Str, X, Y) ->
+ wxDC:drawText(DC, Str, {round(X),round(Y)});
+drawText({true, GC}, Str, X, Y) ->
+ ?wxGC:drawText(GC, Str, X, Y).
+
+getTextExtent({false, DC}, Str) ->
+ wxDC:getTextExtent(DC, Str);
+getTextExtent({true, GC}, Str) ->
+ {W,H,_,_} = ?wxGC:getTextExtent(GC, Str),
+ {W,H}.
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl
index 5a593abf11..e2b256d768 100644
--- a/lib/observer/src/observer_wx.erl
+++ b/lib/observer/src/observer_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -55,6 +55,7 @@
sys_panel,
trace_panel,
app_panel,
+ perf_panel,
active_tab,
node,
nodes
@@ -129,6 +130,10 @@ setup(#state{frame = Frame} = State) ->
%% I postpone the creation of the other tabs so they can query/use
%% the window size
+ %% Perf Viewer Panel
+ PerfPanel = observer_perf_wx:start_link(Notebook, self()),
+ wxNotebook:addPage(Notebook, PerfPanel, "Load Charts", []),
+
%% App Viewer Panel
AppPanel = observer_app_wx:start_link(Notebook, self()),
wxNotebook:addPage(Notebook, AppPanel, "Applications", []),
@@ -160,6 +165,7 @@ setup(#state{frame = Frame} = State) ->
tv_panel = TVPanel,
trace_panel = TracePanel,
app_panel = AppPanel,
+ perf_panel = PerfPanel,
active_tab = SysPid,
node = node(),
nodes = Nodes
@@ -322,8 +328,9 @@ handle_info({nodedown, Node},
create_txt_dialog(Frame, Msg, "Node down", ?wxICON_EXCLAMATION),
{noreply, State3};
-handle_info({'EXIT', _Pid, _Reason}, State) ->
- io:format("Child crashed exiting: ~p ~p~n", [_Pid,_Reason]),
+handle_info({'EXIT', Pid, _Reason}, State) ->
+ io:format("Child (~s) crashed exiting: ~p ~p~n",
+ [pid2panel(Pid, State), Pid,_Reason]),
{stop, normal, State};
handle_info(_Info, State) ->
@@ -345,6 +352,7 @@ try_rpc(Node, Mod, Func, Args) ->
error_logger:error_report([{node, Node},
{call, {Mod, Func, Args}},
{reason, {badrpc, Reason}}]),
+ observer ! {nodedown, Node},
error({badrpc, Reason});
Res ->
Res
@@ -404,16 +412,33 @@ check_page_title(Notebook) ->
wxNotebook:getPageText(Notebook, Selection).
get_active_pid(#state{notebook=Notebook, pro_panel=Pro, sys_panel=Sys,
- tv_panel=Tv, trace_panel=Trace, app_panel=App}) ->
+ tv_panel=Tv, trace_panel=Trace, app_panel=App,
+ perf_panel=Perf
+ }) ->
Panel = case check_page_title(Notebook) of
"Processes" -> Pro;
"System" -> Sys;
"Table Viewer" -> Tv;
?TRACE_STR -> Trace;
+ "Load Charts" -> Perf;
"Applications" -> App
end,
wx_object:get_pid(Panel).
+pid2panel(Pid, #state{pro_panel=Pro, sys_panel=Sys,
+ tv_panel=Tv, trace_panel=Trace, app_panel=App,
+ perf_panel=Perf}) ->
+ case Pid of
+ Pro -> "Processes";
+ Sys -> "System";
+ Tv -> "Table Viewer" ;
+ Trace -> ?TRACE_STR;
+ Perf -> "Load Charts";
+ App -> "Applications";
+ _ -> "unknown"
+ end.
+
+
create_connect_dialog(ping, #state{frame = Frame}) ->
Dialog = wxTextEntryDialog:new(Frame, "Connect to node"),
case wxDialog:showModal(Dialog) of
diff --git a/lib/public_key/src/public_key.appup.src b/lib/public_key/src/public_key.appup.src
index 2945fb1213..aacd3b866d 100644
--- a/lib/public_key/src/public_key.appup.src
+++ b/lib/public_key/src/public_key.appup.src
@@ -1,16 +1,8 @@
%% -*- erlang -*-
{"%VSN%",
[
- {"0.13", [{restart_application, public_key}]},
- {"0.11", [{restart_application, public_key}]},
- {"0.10", [{restart_application, public_key}]},
- {"0.9", [{restart_application, public_key}]},
- {"0.8", [{restart_application, public_key}]}
+ {<<"0\\.*">>, [{restart_application, public_key}]}
],
[
- {"0.13", [{restart_application, public_key}]},
- {"0.11", [{restart_application, public_key}]},
- {"0.10", [{restart_application, public_key}]},
- {"0.9", [{restart_application, public_key}]},
- {"0.8", [{restart_application, public_key}]}
+ {<<"0\\.*">>, [{restart_application, public_key}]}
]}.
diff --git a/lib/public_key/vsn.mk b/lib/public_key/vsn.mk
index d8f811bf25..ab4ee8b0ff 100644
--- a/lib/public_key/vsn.mk
+++ b/lib/public_key/vsn.mk
@@ -1 +1 @@
-PUBLIC_KEY_VSN = 0.14
+PUBLIC_KEY_VSN = 0.15
diff --git a/lib/reltool/doc/src/reltool.xml b/lib/reltool/doc/src/reltool.xml
index 60e886e8f5..696ab52e63 100644
--- a/lib/reltool/doc/src/reltool.xml
+++ b/lib/reltool/doc/src/reltool.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2009</year>
- <year>2011</year>
+ <year>2012</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -433,7 +433,7 @@ sys() = {root_dir, root_dir()}
| {excl_archive_filters, excl_archive_filters()}
| {archive_opts, [archive_opt()]}
app() = {vsn, app_vsn()}
- | {mod, mod_name(), mod()}
+ | {mod, mod_name(), [mod()]}
| {mod_cond, mod_cond()}
| {incl_cond, incl_cond()}
| {debug_info, debug_info()}
@@ -445,8 +445,7 @@ app() = {vsn, app_vsn()}
| {incl_archive_filters, incl_archive_filters()}
| {excl_archive_filters, excl_archive_filters()}
| {archive_opts, [archive_opt()]}
-mod() = {vsn, app_vsn()}
- | {incl_cond, incl_cond()}
+mod() = {incl_cond, incl_cond()}
| {debug_info, debug_info()}
rel_app() = app_name()
| {app_name(), app_type()}
@@ -664,10 +663,10 @@ target_spec() = [target_spec()]
</func>
<func>
- <name>install(Server, TargetDir) -> ok | {error, Reason}</name>
+ <name>install(RelName, TargetDir) -> ok | {error, Reason}</name>
<fsummary>Install a target system</fsummary>
<type>
- <v>Server = server()</v>
+ <v>RelName = rel_name()</v>
<v>TargetDir = target_dir()</v>
<v>Reason = reason()</v>
</type>
diff --git a/lib/reltool/src/reltool.erl b/lib/reltool/src/reltool.erl
index 54eb1ca9e1..2bdf222aa0 100644
--- a/lib/reltool/src/reltool.erl
+++ b/lib/reltool/src/reltool.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -59,7 +59,7 @@ start_link(Options) when is_list(Options) ->
{ok, _WinPid} = OK ->
OK;
{error, Reason} ->
- {error, lists:flatten(io_lib:format("~p", [Reason]))}
+ {error, Reason}
end.
%% Start server process with options
@@ -69,7 +69,7 @@ start_server(Options) ->
{ok, ServerPid, _Common, _Sys} ->
{ok, ServerPid};
{error, Reason} ->
- {error, lists:flatten(io_lib:format("~p", [Reason]))}
+ {error, Reason}
end.
%% Start server process with options
diff --git a/lib/reltool/src/reltool.hrl b/lib/reltool/src/reltool.hrl
index 93f47f6381..4e5c5b2849 100644
--- a/lib/reltool/src/reltool.hrl
+++ b/lib/reltool/src/reltool.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -45,6 +45,7 @@
-type profile() :: development | embedded | standalone.
-type relocatable() :: boolean().
-type escript_file() :: file().
+-type escript_app_name() :: app_name().
-type mod_name() :: atom().
-type app_name() :: atom().
-type app_vsn() :: string(). % e.g. "4.7"
@@ -62,7 +63,7 @@
-type mod() :: {incl_cond, incl_cond()}
| {debug_info, debug_info()}.
-type app() :: {vsn, app_vsn()}
- | {mod, mod_name(), mod()}
+ | {mod, mod_name(), [mod()]}
| {mod_cond, mod_cond()}
| {incl_cond, incl_cond()}
| {app_file, app_file()}
@@ -126,10 +127,7 @@
{
sys_debug :: term(),
wx_debug :: term(),
- trap_exit :: boolean(),
- app_tab :: ets:tab(),
- mod_tab :: ets:tab(),
- mod_used_by_tab :: ets:tab()
+ trap_exit :: boolean()
}).
-record(mod,
@@ -170,7 +168,7 @@
-record(app,
{ %% Static info
name :: app_name(),
- is_escript :: boolean(),
+ is_escript :: boolean() | {inlined, escript_app_name()},
use_selected_vsn :: boolean() | undefined,
active_dir :: dir(),
sorted_dirs :: [dir()],
@@ -199,8 +197,8 @@
used_by_mods :: [mod_name()],
uses_apps :: [app_name()],
used_by_apps :: [app_name()],
- is_pre_included :: boolean(),
- is_included :: boolean(),
+ is_pre_included :: boolean() | undefined,
+ is_included :: boolean() | undefined,
rels :: [rel_name()]
}).
@@ -208,7 +206,7 @@
{
name :: app_name(),
app_type :: app_type() | undefined,
- incl_apps = [] :: [incl_app()]
+ incl_apps :: [incl_app()] | undefined
}).
-record(rel,
diff --git a/lib/reltool/src/reltool_app_win.erl b/lib/reltool/src/reltool_app_win.erl
index 70bd72b258..e0acfab7aa 100644
--- a/lib/reltool/src/reltool_app_win.erl
+++ b/lib/reltool/src/reltool_app_win.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -271,8 +271,8 @@ create_apps_list_ctrl(Panel, Sizer, Text) ->
ListItem = wxListItem:new(),
wxListItem:setAlign(ListItem, ?wxLIST_FORMAT_LEFT),
wxListItem:setText(ListItem, Text),
+ wxListItem:setWidth(ListItem, reltool_utils:get_column_width(ListCtrl)),
wxListCtrl:insertColumn(ListCtrl, ?APPS_APP_COL, ListItem),
- %% wxListCtrl:setColumnWidth(ListCtrl, ?APPS_APP_COL, ?APPS_APP_COL_WIDTH),
wxListItem:destroy(ListItem),
wxSizer:add(Sizer, ListCtrl,
@@ -292,7 +292,7 @@ create_deps_page(S, Derived) ->
UsedByCtrl = create_mods_list_ctrl(Panel,
Main,
- "Modules used by others",
+ "Modules using this",
" and their applications",
undefined,
undefined),
diff --git a/lib/reltool/src/reltool_mod_win.erl b/lib/reltool/src/reltool_mod_win.erl
index e1c2fa5100..899423bb6d 100644
--- a/lib/reltool/src/reltool_mod_win.erl
+++ b/lib/reltool/src/reltool_mod_win.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -215,7 +215,7 @@ create_deps_page(S) ->
UsedByCtrl = create_mods_list_ctrl(Panel,
Main,
- "Modules used by others",
+ "Modules using this",
" and their applications"),
wxSizer:add(Main,
wxStaticLine:new(Panel, [{style, ?wxLI_VERTICAL}]),
@@ -314,8 +314,8 @@ do_create_code_page(#state{xref_pid = Xref, mod = M} = S, PageName) ->
{ok, App} = reltool_server:get_app(Xref, M#mod.app_name),
ErlBin =
case App#app.is_escript of
- true -> find_escript_bin(App, M);
- false -> find_regular_bin(App, M)
+ false -> find_regular_bin(App, M);
+ _ -> find_escript_bin(App, M)
end,
load_code(Editor, ErlBin),
diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl
index 692baea0a4..c99180a613 100644
--- a/lib/reltool/src/reltool_server.erl
+++ b/lib/reltool/src/reltool_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -51,7 +51,12 @@
sys,
old_sys,
status,
- old_status}).
+ old_status,
+ app_tab,
+ old_app_tab,
+ mod_tab,
+ old_mod_tab,
+ mod_used_by_tab}).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Client
@@ -123,174 +128,165 @@ gen_spec(Pid) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Server
-init(Options) ->
+init([{parent,Parent}|_] = Options) ->
try
do_init(Options)
catch
+ throw:{error,Reason} ->
+ proc_lib:init_ack(Parent,{error,Reason});
error:Reason ->
exit({Reason, erlang:get_stacktrace()})
end.
do_init(Options) ->
- {S, Status} = parse_options(Options),
- #state{parent_pid = ParentPid, common = C, sys = Sys} = S,
-
- %% process_flag(trap_exit, (S#state.common)#common.trap_exit),
- proc_lib:init_ack(ParentPid,
- {ok, self(), C, Sys#sys{apps = undefined}}),
- {S2, Status2} = refresh(S, true, Status),
- {S3, Status3} =
- analyse(S2#state{old_sys = S2#state.sys}, Status2),
- case Status3 of
- {ok, _Warnings} -> % BUGBUG: handle warnings
- loop(S3#state{status = Status3, old_status = {ok, []}});
- {error, Reason} ->
- exit(Reason)
- end.
-
-parse_options(Opts) ->
- AppTab = ets:new(reltool_apps, [public, ordered_set, {keypos, #app.name}]),
- ModTab = ets:new(reltool_mods, [public, ordered_set, {keypos, #mod.name}]),
+ AppTab = ets:new(reltool_apps1, [public, ordered_set, {keypos,#app.name}]),
+ OldAppTab = ets:new(reltool_apps2, [public, ordered_set, {keypos,#app.name}]),
+ ModTab = ets:new(reltool_mods1, [public, ordered_set, {keypos,#mod.name}]),
+ OldModTab = ets:new(reltool_mods2, [public, ordered_set, {keypos,#mod.name}]),
ModUsesTab = ets:new(reltool_mod_uses, [public, bag, {keypos, 1}]),
- Sys = #sys{root_dir = reltool_utils:root_dir(),
- lib_dirs = reltool_utils:erl_libs(),
- escripts = [],
- incl_cond = ?DEFAULT_INCL_COND,
- mod_cond = ?DEFAULT_MOD_COND,
- apps = ?DEFAULT_APPS,
- boot_rel = ?DEFAULT_REL_NAME,
- rels = reltool_utils:default_rels(),
- emu_name = ?DEFAULT_EMU_NAME,
- profile = ?DEFAULT_PROFILE,
- incl_sys_filters = dec_re(incl_sys_filters,
- ?DEFAULT_INCL_SYS_FILTERS,
- []),
- excl_sys_filters = dec_re(excl_sys_filters,
- ?DEFAULT_EXCL_SYS_FILTERS,
- []),
- incl_app_filters = dec_re(incl_app_filters,
- ?DEFAULT_INCL_APP_FILTERS,
- []),
- excl_app_filters = dec_re(excl_app_filters,
- ?DEFAULT_EXCL_APP_FILTERS,
- []),
- relocatable = ?DEFAULT_RELOCATABLE,
- rel_app_type = ?DEFAULT_REL_APP_TYPE,
- embedded_app_type = ?DEFAULT_EMBEDDED_APP_TYPE,
- app_file = ?DEFAULT_APP_FILE,
- incl_archive_filters = dec_re(incl_archive_filters,
- ?DEFAULT_INCL_ARCHIVE_FILTERS,
- []),
- excl_archive_filters = dec_re(excl_archive_filters,
- ?DEFAULT_EXCL_ARCHIVE_FILTERS,
- []),
- archive_opts = ?DEFAULT_ARCHIVE_OPTS,
- debug_info = ?DEFAULT_DEBUG_INFO},
- C2 = #common{sys_debug = [],
- wx_debug = 0,
- trap_exit = true,
- app_tab = AppTab,
- mod_tab = ModTab,
- mod_used_by_tab = ModUsesTab},
- S = #state{options = Opts},
- parse_options(Opts, S, C2, Sys, {ok, []}).
+ S = #state{options = Options,
+ app_tab = AppTab,
+ old_app_tab = OldAppTab,
+ mod_tab = ModTab,
+ old_mod_tab = OldModTab,
+ mod_used_by_tab = ModUsesTab},
+
+ S2 = parse_options(S),
+ {S3, Apps, Status2} = refresh(S2),
+ Status3 = analyse(S3, Apps, Status2),
+ %% Set old_xxx equal to xxx to allow undo=nop
+ FakeBackup = {ets:tab2list(S3#state.app_tab),ets:tab2list(S3#state.mod_tab)},
+ S4 = save_old(S3, S3, FakeBackup, Status3),
+ #state{parent_pid = Parent, sys=Sys, common=C} = S4,
+ proc_lib:init_ack(Parent, {ok, self(), C, Sys#sys{apps=undefined}}),
+ loop(S4).
+
+parse_options(S) ->
+ Sys = default_sys(),
+ C = #common{sys_debug = [],
+ wx_debug = 0,
+ trap_exit = true},
+ parse_options(S#state.options, S, C, Sys).
+
+default_sys() ->
+ #sys{root_dir = reltool_utils:root_dir(),
+ lib_dirs = reltool_utils:erl_libs(),
+ escripts = [],
+ incl_cond = ?DEFAULT_INCL_COND,
+ mod_cond = ?DEFAULT_MOD_COND,
+ apps = ?DEFAULT_APPS,
+ boot_rel = ?DEFAULT_REL_NAME,
+ rels = reltool_utils:default_rels(),
+ emu_name = ?DEFAULT_EMU_NAME,
+ profile = ?DEFAULT_PROFILE,
+ incl_sys_filters = dec_re(incl_sys_filters,
+ ?DEFAULT_INCL_SYS_FILTERS,
+ []),
+ excl_sys_filters = dec_re(excl_sys_filters,
+ ?DEFAULT_EXCL_SYS_FILTERS,
+ []),
+ incl_app_filters = dec_re(incl_app_filters,
+ ?DEFAULT_INCL_APP_FILTERS,
+ []),
+ excl_app_filters = dec_re(excl_app_filters,
+ ?DEFAULT_EXCL_APP_FILTERS,
+ []),
+ relocatable = ?DEFAULT_RELOCATABLE,
+ rel_app_type = ?DEFAULT_REL_APP_TYPE,
+ embedded_app_type = ?DEFAULT_EMBEDDED_APP_TYPE,
+ app_file = ?DEFAULT_APP_FILE,
+ incl_archive_filters = dec_re(incl_archive_filters,
+ ?DEFAULT_INCL_ARCHIVE_FILTERS,
+ []),
+ excl_archive_filters = dec_re(excl_archive_filters,
+ ?DEFAULT_EXCL_ARCHIVE_FILTERS,
+ []),
+ archive_opts = ?DEFAULT_ARCHIVE_OPTS,
+ debug_info = ?DEFAULT_DEBUG_INFO}.
dec_re(Key, Regexps, Old) ->
reltool_utils:decode_regexps(Key, Regexps, Old).
-parse_options([{Key, Val} | KeyVals], S, C, Sys, Status) ->
+parse_options([{Key, Val} | KeyVals], S, C, Sys) ->
case Key of
parent ->
- parse_options(KeyVals, S#state{parent_pid = Val}, C, Sys, Status);
+ parse_options(KeyVals, S#state{parent_pid = Val}, C, Sys);
sys_debug ->
- parse_options(KeyVals, S, C#common{sys_debug = Val}, Sys, Status);
+ parse_options(KeyVals, S, C#common{sys_debug = Val}, Sys);
wx_debug ->
- parse_options(KeyVals, S, C#common{wx_debug = Val}, Sys, Status);
+ parse_options(KeyVals, S, C#common{wx_debug = Val}, Sys);
trap_exit ->
- parse_options(KeyVals, S, C#common{trap_exit = Val}, Sys, Status);
+ parse_options(KeyVals, S, C#common{trap_exit = Val}, Sys);
config ->
- {Sys2, Status2} = read_config(Sys, Val, Status),
- parse_options(KeyVals, S, C, Sys2, Status2);
+ Sys2 = read_config(Sys, Val),
+ parse_options(KeyVals, S, C, Sys2);
sys ->
- {Sys2, Status2} = read_config(Sys, {sys, Val}, Status),
- parse_options(KeyVals, S, C, Sys2, Status2);
+ Sys2 = read_config(Sys, {sys, Val}),
+ parse_options(KeyVals, S, C, Sys2);
_ ->
- Text = lists:flatten(io_lib:format("~p", [{Key, Val}])),
- Status2 =
- reltool_utils:return_first_error(Status,
- "Illegal option: " ++ Text),
- parse_options(KeyVals, S, C, Sys, Status2)
+ reltool_utils:throw_error("Illegal option: ~p", [{Key, Val}])
end;
-parse_options([], S, C, Sys, Status) ->
- {S#state{common = C, sys = Sys}, Status};
-parse_options(KeyVals, S, C, Sys, Status) ->
- Text = lists:flatten(io_lib:format("~p", [KeyVals])),
- Status2 = reltool_utils:return_first_error(Status,
- "Illegal options: " ++ Text),
- {S#state{common = C, sys = Sys}, Status2}.
-
-loop(#state{common = C, sys = Sys} = S) ->
+parse_options([], S, C, Sys) ->
+ S#state{common = C, sys = Sys};
+parse_options(KeyVals, _S, _C, _Sys) ->
+ reltool_utils:throw_error("Illegal option: ~p", [KeyVals]).
+
+loop(#state{sys = Sys} = S) ->
receive
{system, From, Msg} ->
sys:handle_system_msg(Msg,
From,
S#state.parent_pid,
?MODULE,
- C#common.sys_debug,
+ (S#state.common)#common.sys_debug,
S);
{call, ReplyTo, Ref, {get_config, InclDef, InclDeriv}} ->
Reply = do_get_config(S, InclDef, InclDeriv),
reltool_utils:reply(ReplyTo, Ref, Reply),
?MODULE:loop(S);
{call, ReplyTo, Ref, {load_config, SysConfig}} ->
- {S2, Reply} = do_load_config(S, SysConfig),
- reltool_utils:reply(ReplyTo, Ref, Reply),
- ?MODULE:loop(S2);
+ Fun = fun() -> do_load_config(S, SysConfig) end,
+ {S3, Status2} = config_and_refresh(S, Fun),
+ reltool_utils:reply(ReplyTo, Ref, Status2),
+ ?MODULE:loop(S3);
{call, ReplyTo, Ref, {save_config, Filename, InclDef, InclDeriv}} ->
Reply = do_save_config(S, Filename, InclDef, InclDeriv),
reltool_utils:reply(ReplyTo, Ref, Reply),
?MODULE:loop(S);
{call, ReplyTo, Ref, reset_config} ->
- {S2, Status} = parse_options(S#state.options),
- S3 = shrink_sys(S2),
- {S4, Status2} = refresh(S3, true, Status),
- {S5, Status3} = analyse(S4#state{old_sys = S4#state.sys}, Status2),
- S6 =
- case Status3 of
- {ok, _Warnings} ->
- S5#state{status = Status3, old_status = S#state.status};
- {error, _} ->
- %% Keep old state
- S
- end,
- reltool_utils:reply(ReplyTo, Ref, Status3),
- ?MODULE:loop(S6);
+ Fun = fun() -> parse_options(S) end,
+ {S3, Status2} = config_and_refresh(S, Fun),
+ reltool_utils:reply(ReplyTo, Ref, Status2),
+ ?MODULE:loop(S3);
{call, ReplyTo, Ref, undo_config} ->
- reltool_utils:reply(ReplyTo, Ref, ok),
S2 = S#state{sys = S#state.old_sys,
- old_sys = S#state.sys,
- status = S#state.old_status,
- old_status = S#state.status},
+ old_sys = Sys,
+ status = S#state.old_status,
+ old_status = S#state.status,
+ app_tab = S#state.old_app_tab,
+ old_app_tab = S#state.app_tab,
+ mod_tab = S#state.old_mod_tab,
+ old_mod_tab = S#state.mod_tab},
+ reltool_utils:reply(ReplyTo, Ref, ok),
?MODULE:loop(S2);
{call, ReplyTo, Ref, {get_rel, RelName}} ->
- Sys = S#state.sys,
Reply =
case lists:keysearch(RelName, #rel.name, Sys#sys.rels) of
{value, Rel} ->
- reltool_target:gen_rel(Rel, Sys);
+ reltool_target:gen_rel(Rel, sys_all_apps(S));
false ->
{error, "No such release: " ++ RelName}
end,
reltool_utils:reply(ReplyTo, Ref, Reply),
?MODULE:loop(S);
{call, ReplyTo, Ref, {get_script, RelName}} ->
- Sys = S#state.sys,
Reply =
case lists:keysearch(RelName, #rel.name, Sys#sys.rels) of
{value, Rel} ->
PathFlag = true,
Vars = [],
- reltool_target:gen_script(Rel, Sys, PathFlag, Vars);
+ reltool_target:gen_script(Rel, sys_all_apps(S),
+ PathFlag, Vars);
false ->
{error, "No such release: " ++ RelName}
end,
@@ -298,7 +294,7 @@ loop(#state{common = C, sys = Sys} = S) ->
?MODULE:loop(S);
{call, ReplyTo, Ref, {get_mod, ModName}} ->
Reply =
- case ets:lookup(C#common.mod_tab, ModName) of
+ case ets:lookup(S#state.mod_tab, ModName) of
[M] ->
{ok, M};
[] ->
@@ -308,92 +304,83 @@ loop(#state{common = C, sys = Sys} = S) ->
?MODULE:loop(S);
{call, ReplyTo, Ref, {get_app, AppName}} when is_atom(AppName) ->
Reply =
- case lists:keysearch(AppName, #app.name, Sys#sys.apps) of
- {value, App} ->
+ case ets:lookup(S#state.app_tab,AppName) of
+ [App] ->
{ok, App};
- false ->
+ [] ->
{error, "No such application: " ++
atom_to_list(AppName)}
end,
reltool_utils:reply(ReplyTo, Ref, Reply),
?MODULE:loop(S);
{call, ReplyTo, Ref, {set_app, App}} ->
- {S2, Status} = do_set_app(S, App, {ok, []}),
- {S3, Status2} = analyse(S2, Status),
- case Status2 of
- {ok, Warnings} ->
- App2 = ?KEYSEARCH(App#app.name,
- #app.name,
- (S3#state.sys)#sys.apps),
- reltool_utils:reply(ReplyTo, Ref, {ok, App2, Warnings}),
- ?MODULE:loop(S3);
- {error, Reason} ->
- %% Keep old state
- reltool_utils:reply(ReplyTo, Ref, {error, Reason}),
- ?MODULE:loop(S)
- end;
+ Fun = fun() -> do_set_apps(S, [App]) end,
+ {S3, Status2} = config_and_refresh(S, Fun),
+ Reply =
+ case Status2 of
+ {ok, Warnings} ->
+ [App2] = ets:lookup(S3#state.app_tab,App#app.name),
+ {ok, App2, Warnings};
+ {error, _} ->
+ Status2
+ end,
+ reltool_utils:reply(ReplyTo, Ref, Reply),
+ ?MODULE:loop(S3);
{call, ReplyTo, Ref, {get_apps, Kind}} ->
AppNames =
case Kind of
whitelist ->
- [A ||
- A <- Sys#sys.apps,
- A#app.is_pre_included =:= true];
- blacklist ->
- [A ||
- A <- Sys#sys.apps,
- A#app.is_pre_included =:= false];
- source ->
- [A ||
- A <- Sys#sys.apps,
- A#app.is_included =/= true,
- A#app.is_pre_included =/= false];
+ %% Pre-included
+ ets:select(S#state.app_tab,
+ [{#app{is_pre_included=true,_='_'},
+ [],
+ ['$_']}]);
+ blacklist ->
+ %% Pre-excluded
+ ets:select(S#state.app_tab,
+ [{#app{is_pre_included=false,_='_'},
+ [],
+ ['$_']}]);
+ source ->
+ %% Not included and not pre-excluded
+ ets:select(S#state.app_tab,
+ [{#app{is_included='$1',
+ is_pre_included='$2',
+ _='_'},
+ [{'=/=','$1',true},
+ {'=/=','$2',false}],
+ ['$_']}]);
derived ->
- [A ||
- A <- Sys#sys.apps,
- A#app.is_included =:= true,
- A#app.is_pre_included =/= true]
+ %% Included, but not pre-included
+ ets:select(S#state.app_tab,
+ [{#app{is_included='$1',
+ is_pre_included='$2',
+ _='_'},
+ [{'=:=','$1',true},
+ {'=/=','$2',true}],
+ ['$_']}])
end,
reltool_utils:reply(ReplyTo, Ref, {ok, AppNames}),
?MODULE:loop(S);
{call, ReplyTo, Ref, {set_apps, Apps}} ->
- {S2, Status} =
- lists:foldl(fun(A, {X, Y}) -> do_set_app(X, A, Y) end,
- {S, {ok, []}},
- Apps),
- {S3, Status2} = analyse(S2, Status),
+ Fun = fun() -> do_set_apps(S, Apps) end,
+ {S3, Status2} = config_and_refresh(S, Fun),
reltool_utils:reply(ReplyTo, Ref, Status2),
- ?MODULE:loop(S3);
+ ?MODULE:loop(S3);
{call, ReplyTo, Ref, get_sys} ->
reltool_utils:reply(ReplyTo, Ref, {ok, Sys#sys{apps = undefined}}),
?MODULE:loop(S);
{call, ReplyTo, Ref, {set_sys, Sys2}} ->
- S2 = S#state{sys = Sys2#sys{apps = Sys#sys.apps}},
- Force =
- (Sys2#sys.root_dir =/= Sys#sys.root_dir) orelse
- (Sys2#sys.lib_dirs =/= Sys#sys.lib_dirs) orelse
- (Sys2#sys.escripts =/= Sys#sys.escripts),
- {S3, Status} = refresh(S2, Force, {ok, []}),
- {S4, Status2} =
- analyse(S3#state{old_sys = S#state.sys}, Status),
- {S5, Status3} =
- case Status2 of
- {ok, _Warnings} -> % BUGBUG: handle warnings
- {S4#state{status = Status2,
- old_status = S#state.status},
- Status2};
- {error, _} ->
- %% Keep old state
- {S, Status2}
- end,
- reltool_utils:reply(ReplyTo, Ref, Status3),
- ?MODULE:loop(S5);
+ Fun = fun() -> S#state{sys = Sys2#sys{apps = Sys#sys.apps}} end,
+ {S3, Status} = config_and_refresh(S, Fun),
+ reltool_utils:reply(ReplyTo, Ref, Status),
+ ?MODULE:loop(S3);
{call, ReplyTo, Ref, get_status} ->
reltool_utils:reply(ReplyTo, Ref, S#state.status),
?MODULE:loop(S);
{call, ReplyTo, Ref, {gen_rel_files, Dir}} ->
Status =
- case reltool_target:gen_rel_files(S#state.sys, Dir) of
+ case reltool_target:gen_rel_files(sys_all_apps(S), Dir) of
ok ->
{ok, []};
{error, Reason} ->
@@ -402,11 +389,11 @@ loop(#state{common = C, sys = Sys} = S) ->
reltool_utils:reply(ReplyTo, Ref, Status),
?MODULE:loop(S);
{call, ReplyTo, Ref, {gen_target, Dir}} ->
- Reply = reltool_target:gen_target(S#state.sys, Dir),
+ Reply = reltool_target:gen_target(sys_all_apps(S), Dir),
reltool_utils:reply(ReplyTo, Ref, Reply),
?MODULE:loop(S);
{call, ReplyTo, Ref, gen_spec} ->
- Reply = reltool_target:gen_spec(S#state.sys),
+ Reply = reltool_target:gen_spec(sys_all_apps(S)),
reltool_utils:reply(ReplyTo, Ref, Reply),
?MODULE:loop(S);
{'EXIT', Pid, Reason} when Pid =:= S#state.parent_pid ->
@@ -422,101 +409,211 @@ loop(#state{common = C, sys = Sys} = S) ->
?MODULE:loop(S)
end.
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-do_set_app(#state{sys = Sys} = S, App, Status) ->
- AppName = App#app.name,
- {App2, Status2} = refresh_app(App, false, Status),
- Apps = Sys#sys.apps,
- Apps2 = lists:keystore(AppName, #app.name, Apps, App2),
- Escripts = [A#app.active_dir || A <- Apps2, A#app.is_escript],
- Sys2 = Sys#sys{apps = Apps2, escripts = Escripts},
- {S#state{sys = Sys2}, Status2}.
-
-analyse(#state{common = C,
- sys = #sys{apps = Apps0, rels = Rels} = Sys} = S,
- Status) ->
- Apps = lists:keydelete(?MISSING_APP_NAME, #app.name, Apps0),
- ets:delete_all_objects(C#common.app_tab),
- ets:delete_all_objects(C#common.mod_tab),
- ets:delete_all_objects(C#common.mod_used_by_tab),
- MissingApp = default_app(?MISSING_APP_NAME, "missing"),
- ets:insert(C#common.app_tab, MissingApp),
-
- {RevRelApps, Status2} = apps_in_rels(Rels, Apps, Status),
- RelApps2 = lists:reverse(RevRelApps),
- {Apps2, Status3} =
- lists:mapfoldl(fun(App, Acc) ->
- app_init_is_included(C, Sys, App, RelApps2, Acc)
- end,
- Status2,
- Apps),
- Apps3 =
- case app_propagate_is_included(C, Sys, Apps2, []) of
- [] ->
- Apps2;
- MissingMods ->
- %% io:format("Missing mods: ~p\n", [MissingMods]),
- MissingApp2 = MissingApp#app{label = ?MISSING_APP_TEXT,
- info = missing_app_info(""),
- mods = MissingMods,
- status = missing,
- uses_mods = []},
- [MissingApp2 | Apps2]
- end,
- app_propagate_is_used_by(C, Apps3),
- {Apps4,Status4} = app_recap_dependencies(C, Sys, Apps3, [], Status3),
- %% io:format("Missing app: ~p\n",
- %% [lists:keysearch(?MISSING_APP_NAME, #app.name, Apps4)]),
- Sys2 = Sys#sys{apps = Apps4},
-
- case verify_config(RelApps2, Sys2, Status4) of
- {ok, _Warnings} = Status5 ->
- {S#state{sys = Sys2}, Status5};
- {error, _} = Status5 ->
- {S, Status5}
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+do_set_apps(#state{sys = Sys} = S, ChangedApps) ->
+ %% Create new list of configured applications
+ SysApps = app_update_config(ChangedApps, Sys#sys.apps),
+ S#state{sys = Sys#sys{apps = SysApps}}.
+
+%% Re-create the #sys.apps list by
+%% 1) taking configurable fields from the changed #app records and
+%% create new default records
+%% 2) removing #app records if no configurable fields are set
+%% 3) keeping #app records that are not changed
+app_update_config([#app{name=Name,is_escript={inlined,Escript}}|_],_SysApps) ->
+ reltool_utils:throw_error("Application ~p is inlined in ~p. Can not change "
+ "configuration for an inlined application.",
+ [Name,Escript]);
+app_update_config([Config|Configs],SysApps) ->
+ NewSysApps =
+ case app_set_config_only(Config) of
+ {delete,Name} ->
+ lists:keydelete(Name,#app.name,SysApps);
+ New ->
+ lists:ukeymerge(#app.name,[New],SysApps)
+ end,
+ app_update_config(Configs,NewSysApps);
+app_update_config([],SysApps) ->
+ SysApps.
+
+app_set_config_only(#app{mods=ConfigMods} = Config) ->
+ app_set_config_only(mod_set_config_only(ConfigMods),Config).
+
+app_set_config_only([],#app{name = Name,
+ incl_cond = undefined,
+ mod_cond = undefined,
+ use_selected_vsn = undefined,
+ debug_info = undefined,
+ app_file = undefined,
+ app_type = undefined,
+ incl_app_filters = undefined,
+ excl_app_filters = undefined,
+ incl_archive_filters = undefined,
+ excl_archive_filters = undefined,
+ archive_opts = undefined,
+ is_escript = false})->
+ {delete,Name};
+app_set_config_only(Mods,#app{name = Name,
+ incl_cond = InclCond,
+ mod_cond = ModCond,
+ use_selected_vsn = UseSelectedVsn,
+ debug_info = DebugInfo,
+ app_file = AppFile,
+ app_type = AppType,
+ incl_app_filters = InclAppFilters,
+ excl_app_filters = ExclAppFilters,
+ incl_archive_filters = InclArchiveFilters,
+ excl_archive_filters = ExclArchiveFilters,
+ archive_opts = ArchiveOpts,
+ vsn = Vsn,
+ is_escript = IsEscript,
+ label = Label,
+ info = Info,
+ active_dir = ActiveDir,
+ sorted_dirs = SortedDirs}) ->
+ App = (default_app(Name))#app{incl_cond = InclCond,
+ mod_cond = ModCond,
+ use_selected_vsn = UseSelectedVsn,
+ debug_info = DebugInfo,
+ app_file = AppFile,
+ app_type = AppType,
+ incl_app_filters = InclAppFilters,
+ excl_app_filters = ExclAppFilters,
+ incl_archive_filters = InclArchiveFilters,
+ excl_archive_filters = ExclArchiveFilters,
+ archive_opts = ArchiveOpts,
+ vsn = Vsn,
+ mods = Mods},
+
+ %% Some fields shall only be set if it is an escript, e.g. label
+ %% must never be set for any other applications since that will
+ %% prevent refreshing.
+ if IsEscript ->
+ App#app{is_escript = IsEscript,
+ active_dir = ActiveDir,
+ sorted_dirs = SortedDirs,
+ label = Label,
+ info = Info};
+ true ->
+ App
end.
-apps_in_rels(Rels, Apps, Status) ->
- lists:foldl(fun(Rel, {RelApps, S}) ->
- {MoreRelApps, S2} = apps_in_rel(Rel, Apps, S),
- {MoreRelApps ++ RelApps, S2}
- end,
- {[], Status},
- Rels).
+mod_set_config_only(ConfigMods) ->
+ [#mod{name = Name,
+ incl_cond = InclCond,
+ debug_info = DebugInfo} ||
+ #mod{name = Name,
+ incl_cond = InclCond,
+ debug_info = DebugInfo} <- ConfigMods,
+ (InclCond =/= undefined) orelse (DebugInfo =/= undefined)].
-apps_in_rel(#rel{name = RelName, rel_apps = RelApps}, Apps, Status) ->
- Mandatory = [{RelName, kernel}, {RelName, stdlib}],
- Other = [{RelName, AppName} ||
- RA <- RelApps,
- AppName <- [RA#rel_app.name | RA#rel_app.incl_apps],
- not lists:keymember(AppName, 2, Mandatory)],
- more_apps_in_rels(Mandatory ++ Other, Apps, [], Status).
-more_apps_in_rels([{RelName, AppName} = RA | RelApps], Apps, Acc, Status) ->
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+analyse(#state{sys=Sys} = S, Apps, Status) ->
+ %% Create a list of {RelName,AppName}, one element for each
+ %% AppName that needs to be included for the given release.
+ RelApps = apps_in_rels(Sys#sys.rels, Apps),
+
+ %% Initiate is_pre_included and is_included for all applications
+ %% based on #sys.incl_cond, #app.incl_cond and if the application
+ %% is included in a release (rel spec - see apps_in_rels above).
+ %% Then initiate the same for each module, and check that there
+ %% are no duplicated module names (in different applications)
+ %% where we can not decide which one to use.
+ %% Write all #app to app_tab and all #mod to mod_tab.
+ Status2 = apps_init_is_included(S, Apps, RelApps, Status),
+
+ %% For each module that has #mod.is_included==true, propagate
+ %% is_included to the modules it uses.
+ propagate_is_included(S),
+
+ %% Insert reverse dependencies - i.e. for each
+ %% #mod{name=Mod, uses_mods=[UsedMod]},
+ %% insert an entry {UsedMod,Mod} in mod_used_by_tab.
+ propagate_is_used_by(S),
+
+ %% Set the above reverse dependencies in #mod records
+ %% (used_by_mods) and accumulate in #app records.
+ %% Make sure #app.is_included is always true if some
+ %% #mod.is_included==true for at least one module in the app.
+ %% Set status=missing|ok for #app and #mod - indicates if module
+ %% (.beam file) is missing in file system.
+ app_recap_dependencies(S),
+
+ %% Check that the boot_rel exists.
+ %% Check that all applications that are listed in a 'rel' spec are
+ %% also really included in the target release.
+ %% Check that all mandatory applications are included in all rels.
+ verify_config(S, RelApps, Status2).
+
+apps_in_rels(Rels, Apps) ->
+ AllRelApps =
+ lists:foldl(fun(Rel, RelApps) ->
+ MoreRelApps = apps_in_rel(Rel, Apps),
+ MoreRelApps ++ RelApps
+ end,
+ [],
+ Rels),
+ lists:reverse(AllRelApps).
+
+apps_in_rel(#rel{name = RelName, rel_apps = RelApps}, Apps) ->
+ Mandatory = [{RelName, kernel}, {RelName, stdlib}],
+ Other =
+ [{RelName, AppName} ||
+ RA <- RelApps,
+ AppName <- [RA#rel_app.name |
+ %% Included applications in rel shall overwrite included
+ %% applications in .app. I.e. included applications in
+ %% .app shall only be used if it is not defined in rel.
+ case RA#rel_app.incl_apps of
+ undefined ->
+ case lists:keyfind(RA#rel_app.name,
+ #app.name,
+ Apps) of
+ #app{info = #app_info{incl_apps = IA}} ->
+ IA;
+ false ->
+ reltool_utils:throw_error(
+ "Release ~p uses non existing "
+ "application ~p",
+ [RelName,RA#rel_app.name])
+ end;
+ IA ->
+ IA
+ end],
+ not lists:keymember(AppName, 2, Mandatory)],
+ more_apps_in_rels(Mandatory ++ Other, Apps, []).
+
+more_apps_in_rels([{RelName, AppName} = RA | RelApps], Apps, Acc) ->
case lists:member(RA, Acc) of
true ->
- more_apps_in_rels(RelApps, Apps, Acc, Status);
+ more_apps_in_rels(RelApps, Apps, Acc);
false ->
case lists:keyfind(AppName, #app.name, Apps) of
#app{info = #app_info{applications = InfoApps}} ->
Extra = [{RelName, N} || N <- InfoApps],
- {Acc2, Status2} =
- more_apps_in_rels(Extra, Apps, [RA | Acc], Status),
- more_apps_in_rels(RelApps, Apps, Acc2, Status2);
+ Acc2 = more_apps_in_rels(Extra, Apps, [RA | Acc]),
+ more_apps_in_rels(RelApps, Apps, Acc2);
false ->
- Text = lists:concat(["Release ", RelName,
- " uses non existing application ",
- AppName]),
- Status2 = reltool_utils:return_first_error(Status, Text),
- more_apps_in_rels(RelApps, Apps, Acc, Status2)
+ reltool_utils:throw_error(
+ "Release ~p uses non existing application ~p",
+ [RelName,AppName])
end
end;
-more_apps_in_rels([], _Apps, Acc, Status) ->
- {Acc, Status}.
+more_apps_in_rels([], _Apps, Acc) ->
+ Acc.
+
+
+apps_init_is_included(S, Apps, RelApps, Status) ->
+ lists:foldl(fun(App, AccStatus) ->
+ app_init_is_included(S, App, RelApps, AccStatus)
+ end,
+ Status,
+ Apps).
-app_init_is_included(C,
- Sys,
+app_init_is_included(#state{app_tab = AppTab, mod_tab = ModTab, sys=Sys},
#app{name = AppName, mods = Mods} = A,
RelApps,
Status) ->
@@ -538,18 +635,16 @@ app_init_is_included(C,
{exclude, []} ->
{undefined, false, false, Status};
{exclude, [RelName | _]} -> % App is included in at least one rel
- Text = lists:concat(["Application ", AppName, " is used "
- "in release ", RelName, " and cannot "
- "be excluded"]),
- TmpStatus = reltool_utils:return_first_error(Status, Text),
- {undefined, false, false, TmpStatus};
+ reltool_utils:throw_error(
+ "Application ~p is used in release ~p and cannot be excluded",
+ [AppName,RelName]);
{derived, []} ->
{undefined, undefined, undefined, Status};
{derived, [_ | _]} -> % App is included in at least one rel
{true, undefined, true, Status}
end,
{Mods2,Status3} = lists:mapfoldl(fun(Mod,Acc) ->
- mod_init_is_included(C,
+ mod_init_is_included(ModTab,
Mod,
ModCond,
AppCond,
@@ -562,10 +657,10 @@ app_init_is_included(C,
is_pre_included = IsPreIncl,
is_included = IsIncl,
rels = Rels},
- ets:insert(C#common.app_tab, A2),
- {A2, Status3}.
+ ets:insert(AppTab, A2),
+ Status3.
-mod_init_is_included(C, M, ModCond, AppCond, Default, Status) ->
+mod_init_is_included(ModTab, M, ModCond, AppCond, Default, Status) ->
%% print(M#mod.name, hipe, "incl_cond -> ~p\n", [AppCond]),
IsIncl =
case AppCond of
@@ -602,43 +697,33 @@ mod_init_is_included(C, M, ModCond, AppCond, Default, Status) ->
M2 = M#mod{is_pre_included = IsIncl, is_included = IsIncl},
Status2 =
- case ets:lookup(C#common.mod_tab,M#mod.name) of
+ case ets:lookup(ModTab,M#mod.name) of
[Existing] ->
case {Existing#mod.is_included,IsIncl} of
{false,_} ->
- Warning =
- lists:concat(
- ["Module ",M#mod.name,
- " exists in applications ", Existing#mod.app_name,
- " and ", M#mod.app_name,
- ". Using module from application ",
- M#mod.app_name, "."]),
- ets:insert(C#common.mod_tab, M2),
- reltool_utils:add_warning(Status,Warning);
+ ets:insert(ModTab, M2),
+ reltool_utils:add_warning(
+ "Module ~p exists in applications ~p and ~p. "
+ "Using module from application ~p.",
+ [M#mod.name, Existing#mod.app_name,
+ M#mod.app_name, M#mod.app_name],
+ Status);
{_,false} ->
- Warning =
- lists:concat(
- ["Module ",M#mod.name,
- " exists in applications ", Existing#mod.app_name,
- " and ", M#mod.app_name,
- ". Using module from application ",
- Existing#mod.app_name, "."]),
-
- %% Don't insert in mod_tab - using Existing
- reltool_utils:add_warning(Status,Warning);
+ %% Don't insert in ModTab - using Existing
+ reltool_utils:add_warning(
+ "Module ~p exists in applications ~p and ~p. "
+ "Using module from application ~p.",
+ [M#mod.name, Existing#mod.app_name,
+ M#mod.app_name,Existing#mod.app_name],
+ Status);
{_,_} ->
- Error =
- lists:concat(
- ["Module ",M#mod.name,
- " potentially included by ",
- "two different applications: ",
- Existing#mod.app_name, " and ",
- M#mod.app_name, "."]),
- %% Don't insert in mod_tab - using Existing
- reltool_utils:return_first_error(Status,Error)
+ reltool_utils:throw_error(
+ "Module ~p potentially included by two different "
+ "applications: ~p and ~p.",
+ [M#mod.name,Existing#mod.app_name,M#mod.app_name])
end;
[] ->
- ets:insert(C#common.mod_tab, M2),
+ ets:insert(ModTab, M2),
Status
end,
@@ -651,55 +736,43 @@ false_to_undefined(Bool) ->
_ -> Bool
end.
-app_propagate_is_included(C, Sys, [#app{mods = Mods} = A | Apps], Acc) ->
- Acc2 = mod_propagate_is_included(C, Sys, A, Mods, Acc),
- app_propagate_is_included(C, Sys, Apps, Acc2);
-app_propagate_is_included(_C, _Sys, [], Acc) ->
- Acc.
-
-mod_propagate_is_included(C, Sys, A, [#mod{name = ModName} | Mods], Acc) ->
- Acc2 =
- case ets:lookup(C#common.mod_tab, ModName) of
- [M2] when M2#mod.app_name=:=A#app.name ->
- %% print(ModName, file, "Maybe Prop ~p -> ~p\n",
- %% [M2, M2#mod.is_included]),
- %% print(ModName, filename, "Maybe Prop ~p -> ~p\n",
- %% [M2, M2#mod.is_included]),
- case M2#mod.is_included of
- true ->
- %% Propagate include mark
- mod_mark_is_included(C,Sys,ModName,M2#mod.uses_mods,Acc);
- false ->
- Acc;
- undefined ->
- Acc
- end;
- [_] ->
- %% This module is currently used from a different application
- %% Ignore
- Acc
- end,
- mod_propagate_is_included(C, Sys, A, Mods, Acc2);
-mod_propagate_is_included(_C, _Sys, _A, [], Acc) ->
- Acc.
+%% Return the list for {ModName, UsesModNames} for all modules where
+%% #mod.is_included==true.
+get_all_mods_and_dependencies(S) ->
+ ets:select(S#state.mod_tab, [{#mod{name='$1',
+ uses_mods='$2',
+ is_included=true,
+ _='_'},
+ [],
+ [{{'$1','$2'}}]}]).
+
+propagate_is_included(S) ->
+ case lists:flatmap(
+ fun({ModName,UsesModNames}) ->
+ mod_mark_is_included(S,ModName,UsesModNames,[])
+ end,
+ get_all_mods_and_dependencies(S)) of
+ [] ->
+ ok;
+ MissingMods ->
+ MissingApp = default_app(?MISSING_APP_NAME, "missing"),
+ MissingApp2 = MissingApp#app{label = ?MISSING_APP_TEXT,
+ info = missing_app_info(""),
+ mods = MissingMods,
+ status = missing,
+ uses_mods = []},
+ ets:insert(S#state.app_tab, MissingApp2),
+ ok
+ end.
-mod_mark_is_included(C, Sys, UsedByName, [ModName | ModNames], Acc) ->
+mod_mark_is_included(#state{app_tab=AppTab, mod_tab=ModTab, sys=Sys} = S,
+ UsedByName, [ModName | ModNames], Acc) ->
Acc3 =
- case ets:lookup(C#common.mod_tab, ModName) of
+ case ets:lookup(ModTab, ModName) of
[M] ->
- %% print(UsedByName, file, "Maybe Mark ~p -> ~p\n",
- %% [M, M#mod.is_included]),
- %% print(UsedByName, filename, "Maybe Mark ~p -> ~p\n",
- %% [M, M#mod.is_included]),
case M#mod.is_included of
- true ->
- %% Already marked
- Acc;
- false ->
- %% Already marked
- Acc;
undefined ->
- %% Mark and propagate
+ %% Not yet marked => mark and propagate
M2 =
case M#mod.incl_cond of
include ->
@@ -711,16 +784,10 @@ mod_mark_is_included(C, Sys, UsedByName, [ModName | ModNames], Acc) ->
undefined ->
M#mod{is_included = true}
end,
- ets:insert(C#common.mod_tab, M2),
- %% io:format("Propagate mod: ~p -> ~p (~p)\n",
- %% [UsedByName, ModName, M#mod.incl_cond]),
- [A] = ets:lookup(C#common.app_tab, M2#mod.app_name),
+ ets:insert(ModTab, M2),
+ [A] = ets:lookup(AppTab, M2#mod.app_name),
Acc2 =
case A#app.is_included of
- true ->
- Acc;
- false ->
- Acc;
undefined ->
ModCond =
case A#app.mod_cond of
@@ -738,63 +805,50 @@ mod_mark_is_included(C, Sys, UsedByName, [ModName | ModNames], Acc) ->
end
end,
Mods = lists:filter(Filter, A#app.mods),
- %% io:format("Propagate app: ~p ~p -> ~p\n",
- %% [UsedByName, A#app.name,
- %% [M3#mod.name || M3 <- Mods]]),
A2 = A#app{is_included = true},
- ets:insert(C#common.app_tab, A2),
- mod_mark_is_included(C,
- Sys,
+ ets:insert(AppTab, A2),
+ mod_mark_is_included(S,
ModName,
[M3#mod.name ||
M3 <- Mods],
- Acc)
+ Acc);
+ _ ->
+ %% Already marked true or false
+ Acc
end,
- mod_mark_is_included(C,
- Sys,
- ModName,
- M2#mod.uses_mods,
- Acc2)
+ mod_mark_is_included(S, ModName, M2#mod.uses_mods, Acc2);
+ _ ->
+ %% Already marked true or false
+ Acc
end;
[] ->
M = missing_mod(ModName, ?MISSING_APP_NAME),
M2 = M#mod{is_included = true},
- ets:insert(C#common.mod_tab, M2),
- ets:insert(C#common.mod_used_by_tab, {UsedByName, ModName}),
+ ets:insert(ModTab, M2),
[M2 | Acc]
end,
- mod_mark_is_included(C, Sys, UsedByName, ModNames, Acc3);
-mod_mark_is_included(_C, _Sys, _UsedByName, [], Acc) ->
+ mod_mark_is_included(S, UsedByName, ModNames, Acc3);
+mod_mark_is_included(_S, _UsedByName, [], Acc) ->
Acc.
-app_propagate_is_used_by(C, [#app{mods = Mods, name = Name} | Apps]) ->
- case Name =:= ?MISSING_APP_NAME of
- true -> ok;
- false -> ok
- end,
- mod_propagate_is_used_by(C, Mods),
- app_propagate_is_used_by(C, Apps);
-app_propagate_is_used_by(_C, []) ->
- ok.
+propagate_is_used_by(S) ->
+ lists:foreach(
+ fun({Mod,UsesMods}) ->
+ lists:foreach(
+ fun(UsedMod) ->
+ ets:insert(S#state.mod_used_by_tab,{UsedMod,Mod})
+ end,
+ UsesMods)
+ end,
+ get_all_mods_and_dependencies(S)).
-mod_propagate_is_used_by(C, [#mod{name = ModName} | Mods]) ->
- [M] = ets:lookup(C#common.mod_tab, ModName),
- case M#mod.is_included of
- true ->
- [ets:insert(C#common.mod_used_by_tab, {UsedModName, ModName}) ||
- UsedModName <- M#mod.uses_mods];
- false ->
- ignore;
- undefined ->
- ignore
- end,
- mod_propagate_is_used_by(C, Mods);
-mod_propagate_is_used_by(_C, []) ->
- ok.
-app_recap_dependencies(C, Sys, [#app{mods = Mods, is_included = IsIncl} = A | Apps], Acc, Status) ->
- {Mods2, IsIncl2, Status2} =
- mod_recap_dependencies(C, Sys, A, Mods, [], IsIncl, Status),
+app_recap_dependencies(S) ->
+ ets:foldl(fun(App,_) -> app_recap_dependencies(S,App) end,
+ ok, S#state.app_tab).
+
+app_recap_dependencies(S, #app{mods = Mods, is_included = IsIncl} = A) ->
+ {Mods2, IsIncl2} = mod_recap_dependencies(S, A, Mods, [], IsIncl),
AppStatus =
case lists:keymember(missing, #mod.status, Mods2) of
true -> missing;
@@ -803,12 +857,12 @@ app_recap_dependencies(C, Sys, [#app{mods = Mods, is_included = IsIncl} = A | Ap
UsesMods = [M#mod.uses_mods || M <- Mods2, M#mod.is_included =:= true],
UsesMods2 = lists:usort(lists:flatten(UsesMods)),
UsesApps = [M#mod.app_name || ModName <- UsesMods2,
- M <- ets:lookup(C#common.mod_tab, ModName)],
+ M <- ets:lookup(S#state.mod_tab, ModName)],
UsesApps2 = lists:usort(UsesApps),
UsedByMods = [M#mod.used_by_mods || M <- Mods2, M#mod.is_included =:= true],
UsedByMods2 = lists:usort(lists:flatten(UsedByMods)),
UsedByApps = [M#mod.app_name || ModName <- UsedByMods2,
- M <- ets:lookup(C#common.mod_tab, ModName)],
+ M <- ets:lookup(S#state.mod_tab, ModName)],
UsedByApps2 = lists:usort(UsedByApps),
A2 = A#app{mods = Mods2,
@@ -818,13 +872,11 @@ app_recap_dependencies(C, Sys, [#app{mods = Mods, is_included = IsIncl} = A | Ap
uses_apps = UsesApps2,
used_by_apps = UsedByApps2,
is_included = IsIncl2},
- ets:insert(C#common.app_tab,A2),
- app_recap_dependencies(C, Sys, Apps, [A2 | Acc], Status2);
-app_recap_dependencies(_C, _Sys, [], Acc, Status) ->
- {lists:reverse(Acc), Status}.
+ ets:insert(S#state.app_tab,A2),
+ ok.
-mod_recap_dependencies(C, Sys, A, [#mod{name = ModName}=M1 | Mods], Acc, IsIncl, Status) ->
- case ets:lookup(C#common.mod_tab, ModName) of
+mod_recap_dependencies(S, A, [#mod{name = ModName}=M1 | Mods], Acc, IsIncl) ->
+ case ets:lookup(S#state.mod_tab, ModName) of
[M2] when M2#mod.app_name=:=A#app.name ->
ModStatus = do_get_status(M2),
%% print(M2#mod.name, hipe, "status -> ~p\n", [ModStatus]),
@@ -832,32 +884,28 @@ mod_recap_dependencies(C, Sys, A, [#mod{name = ModName}=M1 | Mods], Acc, IsIncl,
case M2#mod.is_included of
true ->
UsedByMods =
- [N || {_, N} <- ets:lookup(C#common.mod_used_by_tab,
+ [N || {_, N} <- ets:lookup(S#state.mod_used_by_tab,
ModName)],
{true, M2#mod{status = ModStatus, used_by_mods = UsedByMods}};
_ ->
{IsIncl, M2#mod{status = ModStatus, used_by_mods = []}}
end,
- ets:insert(C#common.mod_tab, M3),
- mod_recap_dependencies(C, Sys, A, Mods, [M3 | Acc], IsIncl2, Status);
+ ets:insert(S#state.mod_tab, M3),
+ mod_recap_dependencies(S, A, Mods, [M3 | Acc], IsIncl2);
[_] when A#app.is_included==false; M1#mod.incl_cond==exclude ->
%% App is explicitely excluded so it is ok that the module
%% record does not exist for this module in this
%% application.
- mod_recap_dependencies(C, Sys, A, Mods, [M1 | Acc], IsIncl, Status);
+ mod_recap_dependencies(S, A, Mods, [M1 | Acc], IsIncl);
[M2] ->
%% A module is potensially included by multiple
%% applications. This is not allowed!
- Error =
- lists:concat(
- ["Module ",ModName,
- " potentially included by two different applications: ",
- A#app.name, " and ", M2#mod.app_name, "."]),
- Status2 = reltool_utils:return_first_error(Status,Error),
- mod_recap_dependencies(C, Sys, A, Mods, [M1 | Acc], IsIncl, Status2)
+ reltool_utils:throw_error(
+ "Module ~p potentially included by two different applications: "
+ "~p and ~p", [ModName,A#app.name, " and ", M2#mod.app_name, "."])
end;
-mod_recap_dependencies(_C, _Sys, _A, [], Acc, IsIncl, Status) ->
- {lists:reverse(Acc), IsIncl, Status}.
+mod_recap_dependencies(_S, _A, [], Acc, IsIncl) ->
+ {lists:reverse(Acc), IsIncl}.
do_get_status(M) ->
if
@@ -867,48 +915,49 @@ do_get_status(M) ->
ok
end.
-shrink_sys(#state{sys = #sys{apps = Apps} = Sys} = S) ->
- Apps2 = lists:zf(fun filter_app/1, Apps),
- S#state{sys = Sys#sys{apps = Apps2}}.
-
-filter_app(A) ->
- Mods = [M#mod{is_app_mod = undefined,
- is_ebin_mod = undefined,
- uses_mods = undefined,
- exists = false} ||
- M <- A#app.mods,
- M#mod.incl_cond =/= undefined],
- if
- A#app.is_escript ->
- {true, A#app{vsn = undefined,
- label = undefined,
- info = undefined,
- mods = [],
- uses_mods = undefined}};
- Mods =:= [],
- A#app.mod_cond =:= undefined,
- A#app.incl_cond =:= undefined,
- A#app.use_selected_vsn =:= undefined ->
- false;
+verify_config(#state{app_tab=AppTab, sys=#sys{boot_rel = BootRel, rels = Rels}},
+ RelApps, Status) ->
+ case lists:keymember(BootRel, #rel.name, Rels) of
true ->
- {Dir, Dirs, OptVsn} =
- case A#app.use_selected_vsn of
- undefined ->
- {shrinked, [], undefined};
- false ->
- {shrinked, [], undefined};
- true ->
- {A#app.active_dir, [A#app.active_dir], A#app.vsn}
- end,
- {true, A#app{active_dir = Dir,
- sorted_dirs = Dirs,
- vsn = OptVsn,
- label = undefined,
- info = undefined,
- mods = Mods,
- uses_mods = undefined}}
+ Status2 = lists:foldl(fun(RA, Acc) ->
+ check_app(AppTab, RA, Acc) end,
+ Status,
+ RelApps),
+ lists:foldl(fun(#rel{name = RelName}, Acc)->
+ check_rel(RelName, RelApps, Acc)
+ end,
+ Status2,
+ Rels);
+ false ->
+ reltool_utils:throw_error(
+ "Release ~p is mandatory (used as boot_rel)",[BootRel])
+ end.
+
+check_app(AppTab, {RelName, AppName}, Status) ->
+ case ets:lookup(AppTab, AppName) of
+ [#app{is_pre_included=IsPreIncl, is_included=IsIncl}]
+ when IsPreIncl; IsIncl ->
+ Status;
+ _ ->
+ reltool_utils:throw_error(
+ "Release ~p uses non included application ~p",[RelName,AppName])
end.
+check_rel(RelName, RelApps, Status) ->
+ EnsureApp =
+ fun(AppName, Acc) ->
+ case lists:member({RelName, AppName}, RelApps) of
+ true ->
+ Acc;
+ false ->
+ reltool_utils:throw_error(
+ "Mandatory application ~p is not included in "
+ "release ~p", [AppName,RelName])
+ end
+ end,
+ Mandatory = [kernel, stdlib],
+ lists:foldl(EnsureApp, Status, Mandatory).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
refresh_app(#app{name = AppName,
@@ -937,30 +986,57 @@ refresh_app(#app{name = AppName,
AppName,
DefaultVsn,
Status),
+
+ %% And read all modules from ebin and create
+ %% #mod record with dependencies (uses_mods).
{AI, read_ebin_mods(Ebin, AppName), Status2};
- true ->
+ _ ->
{App#app.info, Mods, Status}
end,
- %% Add non-existing modules
- AppInfoMods = AppInfo#app_info.modules,
- AppModNames =
- case AppInfo#app_info.mod of
- {StartModName, _} ->
- case lists:member(StartModName, AppInfoMods) of
- true -> AppInfoMods;
- false -> [StartModName | AppInfoMods]
- end;
- undefined ->
- AppInfoMods
- end,
- MissingMods = add_missing_mods(AppName, EbinMods, AppModNames),
+ %% Add non-existing modules - i.e. create default #mod
+ %% records for all modules that are listed in .app file
+ %% but do not exist in ebin.
+ AppInfoMods = lists:usort(AppInfo#app_info.modules),
+ Status4 =
+ case AppInfo#app_info.modules -- AppInfoMods of
+ [] ->
+ Status3;
+ DuplicatedMods ->
+ lists:foldl(
+ fun(M,S) ->
+ reltool_utils:add_warning(
+ "Module ~p duplicated in app file for "
+ "application ~p.", [M, AppName], S)
+ end,
+ Status3,
+ DuplicatedMods)
+ end,
+ AppModNames =
+ case AppInfo#app_info.mod of
+ {StartModName, _} ->
+ case lists:member(StartModName, AppInfoMods) of
+ true -> AppInfoMods;
+ false -> [StartModName | AppInfoMods]
+ end;
+ undefined ->
+ AppInfoMods
+ end,
+ MissingMods = add_missing_mods(AppName, EbinMods, AppModNames),
- %% Add optional user config for each module
+ %% Add optional user config for each module.
+ %% The #mod records that are already in the #app record at
+ %% this point do only contain user defined configuration
+ %% (set by parse_options/4). So here we merge with the
+ %% default records from above.
Mods2 = add_mod_config(MissingMods ++ EbinMods, Mods),
- %% Set app flag for each module in app file
+ %% Set app flag for each module in app file, i.e. the flag
+ %% which indicates if the module is listed in the .app
+ %% file or not. The start module also get the flag set to true.
Mods3 = set_mod_flags(Mods2, AppModNames),
+
+ %% Finally, set label and update the #app record
AppVsn = AppInfo#app_info.vsn,
AppLabel =
case AppVsn of
@@ -971,7 +1047,7 @@ refresh_app(#app{name = AppName,
label = AppLabel,
info = AppInfo,
mods = lists:keysort(#mod.name, Mods3)},
- {App2, Status3};
+ {App2, Status4};
true ->
{App, Status}
end.
@@ -988,22 +1064,21 @@ read_app_info(AppFileOrBin, AppFile, AppName, DefaultVsn, Status) ->
AI = #app_info{vsn = DefaultVsn},
parse_app_info(AppFile, Info, AI, Status);
{ok, _BadApp} ->
- Text = lists:concat([AppName,
- ": Illegal contents in app file ", AppFile,
- ", application tuple with arity 3 expected."]),
{missing_app_info(DefaultVsn),
- reltool_utils:add_warning(Status, Text)};
+ reltool_utils:add_warning("~p: Illegal contents in app file ~p, "
+ "application tuple with arity 3 expected.",
+ [AppName,AppFile],
+ Status)};
{error, Text} when Text =:= EnoentText ->
- Text2 = lists:concat([AppName,
- ": Missing app file ", AppFile, "."]),
{missing_app_info(DefaultVsn),
- reltool_utils:add_warning(Status, Text2)};
+ reltool_utils:add_warning("~p: Missing app file ~p.",
+ [AppName,AppFile],
+ Status)};
{error, Text} ->
- Text2 = lists:concat([AppName,
- ": Cannot parse app file ",
- AppFile, " (", Text, ")."]),
{missing_app_info(DefaultVsn),
- reltool_utils:add_warning(Status, Text2)}
+ reltool_utils:add_warning("~p: Cannot parse app file ~p (~p).",
+ [AppName,AppFile,Text],
+ Status)}
end.
parse_app_info(File, [{Key, Val} | KeyVals], AI, Status) ->
@@ -1037,10 +1112,11 @@ parse_app_info(File, [{Key, Val} | KeyVals], AI, Status) ->
parse_app_info(File, KeyVals, AI#app_info{start_phases = Val},
Status);
_ ->
- String = lists:concat(["Unexpected item ",
- Key, "in app file ", File]),
- parse_app_info(File, KeyVals, AI,
- reltool_utils:add_warning(Status, String))
+ Status2 =
+ reltool_utils:add_warning("Unexpected item ~p in app file ~p.",
+ [Key,File],
+ Status),
+ parse_app_info(File, KeyVals, AI, Status2)
end;
parse_app_info(_, [], AI, Status) ->
{AI, Status}.
@@ -1171,12 +1247,54 @@ set_mod_flags(Mods, AppModNames) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
do_get_config(S, InclDef, InclDeriv) ->
- S2 =
+ AppTab = S#state.app_tab,
+ Sys =
case InclDeriv of
- false -> shrink_sys(S);
- true -> S
+ false ->
+ %% Only the apps that exist in #sys.apps shall be
+ %% included,and they shall be minimized
+ Apps = [shrink_app(App) ||
+ #app{name=Name} <- (S#state.sys)#sys.apps,
+ App <- ets:lookup(AppTab,Name)],
+ (S#state.sys)#sys{apps=Apps};
+ true ->
+ sys_all_apps(S)
end,
- reltool_target:gen_config(S2#state.sys, InclDef).
+ reltool_target:gen_config(Sys, InclDef).
+
+shrink_app(A) ->
+ Mods = [M#mod{is_app_mod = undefined,
+ is_ebin_mod = undefined,
+ uses_mods = undefined,
+ exists = false} ||
+ M <- A#app.mods,
+ M#mod.incl_cond =/= undefined],
+ if
+ A#app.is_escript ->
+ A#app{vsn = undefined,
+ label = undefined,
+ info = undefined,
+ mods = [],
+ uses_mods = undefined};
+ true ->
+ {Dir, Dirs, OptVsn} =
+ case A#app.use_selected_vsn of
+ undefined ->
+ {shrinked, [], undefined};
+ false ->
+ {shrinked, [], undefined};
+ true ->
+ {A#app.active_dir, [A#app.active_dir], A#app.vsn}
+ end,
+ A#app{active_dir = Dir,
+ sorted_dirs = Dirs,
+ vsn = OptVsn,
+ label = undefined,
+ info = undefined,
+ mods = Mods,
+ uses_mods = undefined}
+ end.
+
do_save_config(S, Filename, InclDef, InclDeriv) ->
{ok, Config} = do_get_config(S, InclDef, InclDeriv),
@@ -1187,132 +1305,83 @@ do_save_config(S, Filename, InclDef, InclDeriv) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
do_load_config(S, SysConfig) ->
- OldSys = S#state.sys,
- S2 = shrink_sys(S),
- ShrinkedSys = S2#state.sys,
- {NewSys, Status} =
- read_config(ShrinkedSys#sys{apps = []}, SysConfig, {ok, []}),
- case Status of
- {ok, _Warnings} ->
- Force = false,
- {MergedSys, Status2} = merge_config(OldSys, NewSys, Force, Status),
- {S3, Status3} =
- analyse(S2#state{sys = MergedSys, old_sys = OldSys}, Status2),
- S4 =
- case Status3 of
- {ok, _Warnings2} ->
- S3#state{status = Status3, old_status = S#state.status};
- {error, _} ->
- %% Keep old state
- S
- end,
- {S4, Status3};
- {error, _} ->
- %% Keep old state
- {S, Status}
- end.
+ S#state{sys = read_config(default_sys(), SysConfig)}.
-read_config(OldSys, Filename, Status) when is_list(Filename) ->
+read_config(OldSys, Filename) when is_list(Filename) ->
case file:consult(Filename) of
{ok, [SysConfig | _]} ->
- read_config(OldSys, SysConfig, Status);
+ read_config(OldSys, SysConfig);
{ok, Content} ->
- Text = lists:flatten(io_lib:format("~p", [Content])),
- {OldSys,
- reltool_utils:return_first_error(Status,
- "Illegal file content: " ++
- Text)};
+ reltool_utils:throw_error("Illegal file content: ~p",[Content]);
{error, Reason} ->
- Text = file:format_error(Reason),
- {OldSys,
- reltool_utils:return_first_error(Status,
- "Illegal config file " ++
- Filename ++ ": " ++ Text)}
+ reltool_utils:throw_error("Illegal config file ~p: ~s",
+ [Filename,file:format_error(Reason)])
end;
-read_config(OldSys, {sys, KeyVals}, Status) ->
- {NewSys, Status2} =
- decode(OldSys#sys{apps = [], rels = []}, KeyVals, Status),
- case Status2 of
- {ok, _Warnings} -> % BUGBUG: handle warnings
- Apps = [A#app{mods = lists:sort(A#app.mods)} ||
- A <- NewSys#sys.apps],
- case NewSys#sys.rels of
- [] -> Rels = reltool_utils:default_rels();
- Rels -> ok
- end,
- NewSys2 = NewSys#sys{apps = lists:sort(Apps),
- rels = lists:sort(Rels)},
- case lists:keymember(NewSys2#sys.boot_rel,
- #rel.name,
- NewSys2#sys.rels) of
- true ->
- {NewSys2, Status2};
- false ->
- Text2 = lists:concat(["Release " ++ NewSys2#sys.boot_rel,
- " is mandatory (used as boot_rel)"]),
- {OldSys, reltool_utils:return_first_error(Status2, Text2)}
- end;
- {error, _} ->
- %% Keep old state
- {OldSys, Status2}
+read_config(OldSys, {sys, KeyVals}) ->
+ NewSys = decode(OldSys#sys{apps = [], rels = []}, KeyVals),
+ Apps = [A#app{mods = lists:sort(A#app.mods)} || A <- NewSys#sys.apps],
+ Rels =
+ case NewSys#sys.rels of
+ [] -> reltool_utils:default_rels();
+ Rs -> Rs
+ end,
+ NewSys2 = NewSys#sys{apps = lists:sort(Apps),
+ rels = lists:sort(Rels)},
+ case lists:keymember(NewSys2#sys.boot_rel, #rel.name, NewSys2#sys.rels) of
+ true ->
+ NewSys2;
+ false ->
+ reltool_utils:throw_error(
+ "Release ~p is mandatory (used as boot_rel)",
+ [NewSys2#sys.boot_rel])
end;
-read_config(OldSys, BadConfig, Status) ->
- Text = lists:flatten(io_lib:format("~p", [BadConfig])),
- {OldSys,
- reltool_utils:return_first_error(Status, "Illegal content: " ++ Text)}.
+read_config(_OldSys, BadConfig) ->
+ reltool_utils:throw_error("Illegal content: ~p", [BadConfig]).
-decode(#sys{apps = Apps} = Sys, [{erts = Name, AppKeyVals} | SysKeyVals],
- Status)
+decode(#sys{apps = Apps} = Sys, [{erts = Name, AppKeyVals} | SysKeyVals])
when is_atom(Name), is_list(AppKeyVals) ->
App = default_app(Name),
- {App2, Status2} = decode(App, AppKeyVals, Status),
- decode(Sys#sys{apps = [App2 | Apps]}, SysKeyVals, Status2);
-decode(#sys{apps = Apps} = Sys, [{app, Name, AppKeyVals} | SysKeyVals], Status)
+ App2= decode(App, AppKeyVals),
+ decode(Sys#sys{apps = [App2 | Apps]}, SysKeyVals);
+decode(#sys{apps = Apps} = Sys, [{app, Name, AppKeyVals} | SysKeyVals])
when is_atom(Name), is_list(AppKeyVals) ->
App = default_app(Name),
- {App2, Status2} = decode(App, AppKeyVals, Status),
- decode(Sys#sys{apps = [App2 | Apps]}, SysKeyVals, Status2);
+ App2 = decode(App, AppKeyVals),
+ decode(Sys#sys{apps = [App2 | Apps]}, SysKeyVals);
decode(#sys{apps = Apps, escripts = Escripts} = Sys,
- [{escript, File, AppKeyVals} | SysKeyVals], Status)
- when is_list(File), is_list(AppKeyVals) ->
- {Name, Label} = split_escript_name(File),
- App = default_app(Name, File),
- App2 = App#app{is_escript = true,
- label = Label,
- info = missing_app_info(""),
- active_dir = File,
- sorted_dirs = [File]},
- {App3, Status2} = decode(App2, AppKeyVals, Status),
- decode(Sys#sys{apps = [App3 | Apps], escripts = [File | Escripts]},
- SysKeyVals,
- Status2);
-decode(#sys{rels = Rels} = Sys, [{rel, Name, Vsn, RelApps} | SysKeyVals],
- Status)
+ [{escript, File0, AppKeyVals} | SysKeyVals])
+ when is_list(File0), is_list(AppKeyVals) ->
+ File = filename:absname(File0),
+ App = default_escript_app(File),
+ App2 = decode(App, AppKeyVals),
+ decode(Sys#sys{apps = [App2 | Apps], escripts = [File | Escripts]},
+ SysKeyVals);
+decode(#sys{rels = Rels} = Sys, [{rel, Name, Vsn, RelApps} | SysKeyVals])
when is_list(Name), is_list(Vsn), is_list(RelApps) ->
Rel = #rel{name = Name, vsn = Vsn, rel_apps = []},
- {Rel2, Status2} = decode(Rel, RelApps, Status),
- decode(Sys#sys{rels = [Rel2 | Rels]}, SysKeyVals, Status2);
-decode(#sys{} = Sys, [{Key, Val} | KeyVals], Status) ->
- {Sys3, Status3} =
+ Rel2 = decode(Rel, RelApps),
+ decode(Sys#sys{rels = [Rel2 | Rels]}, SysKeyVals);
+decode(#sys{} = Sys, [{Key, Val} | KeyVals]) ->
+ Sys3 =
case Key of
root_dir when is_list(Val) ->
- {Sys#sys{root_dir = Val}, Status};
+ Sys#sys{root_dir = Val};
lib_dirs when is_list(Val) ->
- {Sys#sys{lib_dirs = Val}, Status};
+ Sys#sys{lib_dirs = Val};
mod_cond when Val =:= all;
Val =:= app;
Val =:= ebin;
Val =:= derived;
Val =:= none ->
- {Sys#sys{mod_cond = Val}, Status};
+ Sys#sys{mod_cond = Val};
incl_cond when Val =:= include;
Val =:= exclude;
Val =:= derived ->
- {Sys#sys{incl_cond = Val}, Status};
+ Sys#sys{incl_cond = Val};
boot_rel when is_list(Val) ->
- {Sys#sys{boot_rel = Val}, Status};
+ Sys#sys{boot_rel = Val};
emu_name when is_list(Val) ->
- {Sys#sys{emu_name = Val}, Status};
+ Sys#sys{emu_name = Val};
profile when Val =:= development;
Val =:= embedded;
Val =:= standalone ->
@@ -1321,198 +1390,153 @@ decode(#sys{} = Sys, [{Key, Val} | KeyVals], Status) ->
InclApp = reltool_utils:choose_default(incl_app_filters, Val, false),
ExclApp = reltool_utils:choose_default(excl_app_filters, Val, false),
AppType = reltool_utils:choose_default(embedded_app_type, Val, false),
- {Sys#sys{profile = Val,
- incl_sys_filters = dec_re(incl_sys_filters,
- InclSys,
- Sys#sys.incl_sys_filters),
- excl_sys_filters = dec_re(excl_sys_filters,
- ExclSys,
- Sys#sys.excl_sys_filters),
- incl_app_filters = dec_re(incl_app_filters,
- InclApp,
- Sys#sys.incl_app_filters),
- excl_app_filters = dec_re(excl_app_filters,
- ExclApp,
- Sys#sys.excl_app_filters),
- embedded_app_type = AppType},
- Status};
+ Sys#sys{profile = Val,
+ incl_sys_filters = dec_re(incl_sys_filters,
+ InclSys,
+ Sys#sys.incl_sys_filters),
+ excl_sys_filters = dec_re(excl_sys_filters,
+ ExclSys,
+ Sys#sys.excl_sys_filters),
+ incl_app_filters = dec_re(incl_app_filters,
+ InclApp,
+ Sys#sys.incl_app_filters),
+ excl_app_filters = dec_re(excl_app_filters,
+ ExclApp,
+ Sys#sys.excl_app_filters),
+ embedded_app_type = AppType};
incl_sys_filters ->
- {Sys#sys{incl_sys_filters =
- dec_re(Key,
- Val,
- Sys#sys.incl_sys_filters)},
- Status};
+ Sys#sys{incl_sys_filters =
+ dec_re(Key, Val, Sys#sys.incl_sys_filters)};
excl_sys_filters ->
- {Sys#sys{excl_sys_filters =
- dec_re(Key,
- Val,
- Sys#sys.excl_sys_filters)},
- Status};
+ Sys#sys{excl_sys_filters =
+ dec_re(Key, Val, Sys#sys.excl_sys_filters)};
incl_app_filters ->
- {Sys#sys{incl_app_filters =
- dec_re(Key,
- Val,
- Sys#sys.incl_app_filters)},
- Status};
+ Sys#sys{incl_app_filters =
+ dec_re(Key, Val, Sys#sys.incl_app_filters)};
excl_app_filters ->
- {Sys#sys{excl_app_filters =
- dec_re(Key,
- Val,
- Sys#sys.excl_app_filters)},
- Status};
+ Sys#sys{excl_app_filters =
+ dec_re(Key, Val, Sys#sys.excl_app_filters)};
incl_archive_filters ->
- {Sys#sys{incl_archive_filters =
- dec_re(Key,
- Val,
- Sys#sys.incl_archive_filters)},
- Status};
+ Sys#sys{incl_archive_filters =
+ dec_re(Key, Val, Sys#sys.incl_archive_filters)};
excl_archive_filters ->
- {Sys#sys{excl_archive_filters =
- dec_re(Key,
- Val,
- Sys#sys.excl_archive_filters)},
- Status};
+ Sys#sys{excl_archive_filters =
+ dec_re(Key, Val, Sys#sys.excl_archive_filters)};
archive_opts when is_list(Val) ->
- {Sys#sys{archive_opts = Val}, Status};
+ Sys#sys{archive_opts = Val};
relocatable when Val =:= true; Val =:= false ->
- {Sys#sys{relocatable = Val}, Status};
+ Sys#sys{relocatable = Val};
rel_app_type when Val =:= permanent;
Val =:= transient;
Val =:= temporary;
Val =:= load;
Val =:= none ->
- {Sys#sys{rel_app_type = Val}, Status};
+ Sys#sys{rel_app_type = Val};
embedded_app_type when Val =:= permanent;
Val =:= transient;
Val =:= temporary;
Val =:= load;
Val =:= none;
Val =:= undefined ->
- {Sys#sys{embedded_app_type = Val}, Status};
+ Sys#sys{embedded_app_type = Val};
app_file when Val =:= keep; Val =:= strip; Val =:= all ->
- {Sys#sys{app_file = Val}, Status};
+ Sys#sys{app_file = Val};
debug_info when Val =:= keep; Val =:= strip ->
- {Sys#sys{debug_info = Val}, Status};
+ Sys#sys{debug_info = Val};
_ ->
- Text = lists:flatten(io_lib:format("~p", [{Key, Val}])),
- {Sys, reltool_utils:return_first_error(Status,
- "Illegal option: " ++
- Text)}
+ reltool_utils:throw_error("Illegal option: ~p", [{Key, Val}])
end,
- decode(Sys3, KeyVals, Status3);
-decode(#app{} = App, [{Key, Val} | KeyVals], Status) ->
- {App2, Status2} =
+ decode(Sys3, KeyVals);
+decode(#app{} = App, [{Key, Val} | KeyVals]) ->
+ App2 =
case Key of
mod_cond when Val =:= all;
Val =:= app;
Val =:= ebin;
Val =:= derived;
Val =:= none ->
- {App#app{mod_cond = Val}, Status};
+ App#app{mod_cond = Val};
incl_cond when Val =:= include;
Val =:= exclude;
Val =:= derived ->
- {App#app{incl_cond = Val}, Status};
+ App#app{incl_cond = Val};
debug_info when Val =:= keep;
Val =:= strip ->
- {App#app{debug_info = Val}, Status};
+ App#app{debug_info = Val};
app_file when Val =:= keep;
Val =:= strip;
Val =:= all ->
- {App#app{app_file = Val}, Status};
+ App#app{app_file = Val};
app_type when Val =:= permanent;
Val =:= transient;
Val =:= temporary;
Val =:= load;
Val =:= none;
Val =:= undefined ->
- {App#app{app_type = Val}, Status};
+ App#app{app_type = Val};
incl_app_filters ->
- {App#app{incl_app_filters =
- dec_re(Key,
- Val,
- App#app.incl_app_filters)},
- Status};
+ App#app{incl_app_filters =
+ dec_re(Key, Val, App#app.incl_app_filters)};
excl_app_filters ->
- {App#app{excl_app_filters =
- dec_re(Key,
- Val,
- App#app.excl_app_filters)},
- Status};
+ App#app{excl_app_filters =
+ dec_re(Key, Val, App#app.excl_app_filters)};
incl_archive_filters ->
- {App#app{incl_archive_filters =
- dec_re(Key,
- Val,
- App#app.incl_archive_filters)},
- Status};
+ App#app{incl_archive_filters =
+ dec_re(Key, Val, App#app.incl_archive_filters)};
excl_archive_filters ->
- {App#app{excl_archive_filters =
- dec_re(Key,
- Val,
- App#app.excl_archive_filters)},
- Status};
+ App#app{excl_archive_filters =
+ dec_re(Key, Val, App#app.excl_archive_filters)};
archive_opts when is_list(Val) ->
- {App#app{archive_opts = Val}, Status};
+ App#app{archive_opts = Val};
vsn when is_list(Val) ->
- {App#app{use_selected_vsn = true, vsn = Val}, Status};
+ App#app{use_selected_vsn = true, vsn = Val};
_ ->
- Text = lists:flatten(io_lib:format("~p", [{Key, Val}])),
- {App, reltool_utils:return_first_error(Status,
- "Illegal option: " ++ Text)}
+ reltool_utils:throw_error("Illegal option: ~p", [{Key, Val}])
end,
- decode(App2, KeyVals, Status2);
-decode(#app{mods = Mods} = App, [{mod, Name, ModKeyVals} | AppKeyVals],
- Status) ->
- {Mod, Status2} = decode(#mod{name = Name}, ModKeyVals, Status),
- decode(App#app{mods = [Mod | Mods]}, AppKeyVals, Status2);
-decode(#mod{} = Mod, [{Key, Val} | KeyVals], Status) ->
- {Mod2, Status2} =
+ decode(App2, KeyVals);
+decode(#app{mods = Mods} = App, [{mod, Name, ModKeyVals} | AppKeyVals]) ->
+ Mod = decode(#mod{name = Name}, ModKeyVals),
+ decode(App#app{mods = [Mod | Mods]}, AppKeyVals);
+decode(#mod{} = Mod, [{Key, Val} | KeyVals]) ->
+ Mod2 =
case Key of
incl_cond when Val =:= include; Val =:= exclude; Val =:= derived ->
- {Mod#mod{incl_cond = Val}, Status};
+ Mod#mod{incl_cond = Val};
debug_info when Val =:= keep; Val =:= strip ->
- {Mod#mod{debug_info = Val}, Status};
+ Mod#mod{debug_info = Val};
_ ->
- Text = lists:flatten(io_lib:format("~p", [{Key, Val}])),
- {Mod,
- reltool_utils:return_first_error(Status,
- "Illegal option: " ++ Text)}
+ reltool_utils:throw_error("Illegal option: ~p", [{Key, Val}])
end,
- decode(Mod2, KeyVals, Status2);
-decode(#rel{rel_apps = RelApps} = Rel, [RelApp | KeyVals], Status) ->
+ decode(Mod2, KeyVals);
+decode(#rel{rel_apps = RelApps} = Rel, [RelApp | KeyVals]) ->
{ValidTypesAssigned, RA} =
case RelApp of
Name when is_atom(Name) ->
{true, #rel_app{name = Name}};
- {Name, Type} when is_atom(Name) ->
- {is_type(Type), #rel_app{name = Name, app_type = Type}};
{Name, InclApps} when is_atom(Name), is_list(InclApps) ->
VI = lists:all(fun erlang:is_atom/1, InclApps),
{VI, #rel_app{name = Name, incl_apps = InclApps}};
+ {Name, Type} when is_atom(Name) ->
+ {is_type(Type), #rel_app{name = Name, app_type = Type}};
{Name, Type, InclApps} when is_atom(Name), is_list(InclApps) ->
VT = is_type(Type),
VI = lists:all(fun erlang:is_atom/1, InclApps),
{VT andalso VI,
#rel_app{name = Name, app_type = Type, incl_apps = InclApps}};
_ ->
- {false, #rel_app{incl_apps = []}}
+ {false, #rel_app{}}
end,
case ValidTypesAssigned of
true ->
- decode(Rel#rel{rel_apps = RelApps ++ [RA]}, KeyVals, Status);
+ decode(Rel#rel{rel_apps = RelApps ++ [RA]}, KeyVals);
false ->
- Text = lists:flatten(io_lib:format("~p", [RelApp])),
- Status2 =
- reltool_utils:return_first_error(Status,
- "Illegal option: " ++ Text),
- decode(Rel, KeyVals, Status2)
+ reltool_utils:throw_error("Illegal option: ~p", [RelApp])
end;
-decode(Acc, [], Status) ->
- {Acc, Status};
-decode(Acc, KeyVal, Status) ->
- Text = lists:flatten(io_lib:format("~p", [KeyVal])),
- {Acc, reltool_utils:return_first_error(Status, "Illegal option: " ++ Text)}.
+decode(Acc, []) ->
+ Acc;
+decode(_Acc, KeyVal) ->
+ reltool_utils:throw_error("Illegal option: ~p", [KeyVal]).
is_type(Type) ->
case Type of
@@ -1529,79 +1553,50 @@ split_escript_name(File) when is_list(File) ->
Label = filename:basename(File, ".escript"),
{list_to_atom("*escript* " ++ Label), Label}.
+default_escript_app(File) ->
+ {Name, Label} = split_escript_name(File),
+ App = default_app(Name, File),
+ App#app{is_escript = true,
+ label = Label,
+ info = missing_app_info("")}.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-refresh(#state{sys = Sys} = S, Force, Status) ->
- {Sys2, Status2} = merge_config(Sys, Sys#sys{apps = []}, Force, Status),
- {S#state{sys = Sys2}, Status2}.
-
-merge_config(OldSys, NewSys, Force, Status) ->
- RootDir = filename:absname(NewSys#sys.root_dir),
- LibDirs = [filename:absname(D) || D <- NewSys#sys.lib_dirs],
- Escripts = [filename:absname(E) || E <- NewSys#sys.escripts],
- {SourceDirs, Status2} =
- libs_to_dirs(RootDir, LibDirs, Status),
- MergedApps = merge_app_dirs(SourceDirs, NewSys#sys.apps, OldSys#sys.apps),
- {AllApps, Status3} =
- escripts_to_apps(Escripts, MergedApps, OldSys#sys.apps, Status2),
- {RefreshedApps, Status4} =
- refresh_apps(OldSys#sys.apps, AllApps, [], Force, Status3),
- {PatchedApps, Status5} =
- patch_erts_version(RootDir, RefreshedApps, Status4),
- Escripts2 = [A#app.active_dir || A <- PatchedApps, A#app.is_escript],
- NewSys2 = NewSys#sys{root_dir = RootDir,
- lib_dirs = LibDirs,
- escripts = Escripts2,
- apps = PatchedApps},
- {NewSys2, Status5}.
+%% Apps is a list of #app records - sorted on #app.name - containing
+%% only the apps that have specific configuration (e.g. in the config
+%% file)
+refresh(#state{sys=Sys} = S) ->
+ RootDir = filename:absname(Sys#sys.root_dir),
+ LibDirs = [filename:absname(D) || D <- Sys#sys.lib_dirs],
+ Escripts = [filename:absname(E) || E <- Sys#sys.escripts],
-verify_config(RelApps, #sys{boot_rel = BootRel, rels = Rels, apps = Apps}, Status) ->
- case lists:keymember(BootRel, #rel.name, Rels) of
- true ->
- Status2 = lists:foldl(fun(RA, Acc) ->
- check_app(RA, Apps, Acc) end,
- Status,
- RelApps),
- lists:foldl(fun(#rel{name = RelName}, Acc)->
- check_rel(RelName, RelApps, Acc)
- end,
- Status2,
- Rels);
- false ->
- Text = lists:concat(["Release ", BootRel,
- " is mandatory (used as boot_rel)"]),
- reltool_utils:return_first_error(Status, Text)
- end.
+ %% Read all lib dirs and return sorted [{AppName,Dir}]
+ SourceDirs = libs_to_dirs(RootDir, LibDirs),
-check_app({RelName, AppName}, Apps, Status) ->
- case lists:keysearch(AppName, #app.name, Apps) of
- {value, App} when App#app.is_pre_included ->
- Status;
- {value, App} when App#app.is_included ->
- Status;
- _ ->
- Text = lists:concat(["Release ", RelName,
- " uses non included application ",
- AppName]),
- reltool_utils:return_first_error(Status, Text)
- end.
+ %% Create #app records for all apps in SourceDirs, and merge with
+ %% list of apps from config.
+ MergedApps = merge_app_dirs(SourceDirs, Sys#sys.apps),
-check_rel(RelName, RelApps, Status) ->
- EnsureApp =
- fun(AppName, Acc) ->
- case lists:member({RelName, AppName}, RelApps) of
- true ->
- Acc;
- false ->
- Text = lists:concat(["Mandatory application ",
- AppName,
- " is not included in release ",
- RelName]),
- reltool_utils:return_first_error(Acc, Text)
- end
- end,
- Mandatory = [kernel, stdlib],
- lists:foldl(EnsureApp, Status, Mandatory).
+ %% For each escript, find all related files and convert to #app
+ %% and #mod records
+ {AllApps, Status2} = escripts_to_apps(Escripts, MergedApps, {ok,[]}),
+
+ %% Make sure correct version of each application is used according
+ %% to the user configuration.
+ %% Then find all modules and their dependencies and set user
+ %% configuration per module if it exists.
+ {RefreshedApps, Status3} = refresh_apps(Sys#sys.apps, AllApps, [],
+ true, Status2),
+
+ %% Make sure erts exists in app list and has a version (or warn)
+ {PatchedApps, Status4} = patch_erts_version(RootDir, RefreshedApps, Status3),
+
+ %% Update #sys and return
+ Escripts2 = [A#app.active_dir || A <- PatchedApps, A#app.is_escript],
+ Sys2 = Sys#sys{root_dir = RootDir,
+ lib_dirs = LibDirs,
+ escripts = Escripts2},
+ {S#state{sys=Sys2}, PatchedApps, Status4}.
patch_erts_version(RootDir, Apps, Status) ->
AppName = erts,
@@ -1615,18 +1610,17 @@ patch_erts_version(RootDir, Apps, Status) ->
Apps2 = lists:keystore(AppName, #app.name, Apps, Erts2),
{Apps2, Status};
Vsn =:= "" ->
- {Apps, reltool_utils:add_warning(Status,
- "erts has no version")};
+ {Apps, reltool_utils:add_warning("erts has no version",[],
+ Status)};
true ->
{Apps, Status}
end;
false ->
- Text = "erts cannot be found in the root directory " ++ RootDir,
- Status2 = reltool_utils:return_first_error(Status, Text),
- {Apps, Status2}
+ reltool_utils:throw_error(
+ "erts cannot be found in the root directory ~p", [RootDir])
end.
-libs_to_dirs(RootDir, LibDirs, Status) ->
+libs_to_dirs(RootDir, LibDirs) ->
case file:list_dir(RootDir) of
{ok, RootFiles} ->
RootLibDir = filename:join([RootDir, "lib"]),
@@ -1648,21 +1642,16 @@ libs_to_dirs(RootDir, LibDirs, Status) ->
end,
ErtsFiles = [{erts, Fun(F)} || F <- RootFiles,
lists:prefix("erts", F)],
- app_dirs2(AllLibDirs, [ErtsFiles], Status);
+ app_dirs2(AllLibDirs, [ErtsFiles]);
[Duplicate | _] ->
- {[],
- reltool_utils:return_first_error(Status,
- "Duplicate library: " ++
- Duplicate)}
+ reltool_utils:throw_error("Duplicate library: ~p",[Duplicate])
end;
{error, Reason} ->
- Text = file:format_error(Reason),
- {[], reltool_utils:return_first_error(Status,
- "Missing root library " ++
- RootDir ++ ": " ++ Text)}
+ reltool_utils:throw_error("Missing root library ~p: ~s",
+ [RootDir,file:format_error(Reason)])
end.
-app_dirs2([Lib | Libs], Acc, Status) ->
+app_dirs2([Lib | Libs], Acc) ->
case file:list_dir(Lib) of
{ok, Files} ->
Filter =
@@ -1682,17 +1671,15 @@ app_dirs2([Lib | Libs], Acc, Status) ->
end
end,
Files2 = lists:zf(Filter, Files),
- app_dirs2(Libs, [Files2 | Acc], Status);
+ app_dirs2(Libs, [Files2 | Acc]);
{error, Reason} ->
- Text = file:format_error(Reason),
- {[], reltool_utils:return_first_error(Status,
- "Illegal library " ++
- Lib ++ ": " ++ Text)}
+ reltool_utils:throw_error("Illegal library ~p: ~s",
+ [Lib, file:format_error(Reason)])
end;
-app_dirs2([], Acc, Status) ->
- {lists:sort(lists:append(Acc)), Status}.
+app_dirs2([], Acc) ->
+ lists:sort(lists:append(Acc)).
-escripts_to_apps([Escript | Escripts], Apps, OldApps, Status) ->
+escripts_to_apps([Escript | Escripts], Apps, Status) ->
{EscriptAppName, _Label} = split_escript_name(Escript),
Ext = code:objfile_extension(),
Fun = fun(FullName, _GetInfo, GetBin, {FileAcc, StatusAcc}) ->
@@ -1755,156 +1742,111 @@ escripts_to_apps([Escript | Escripts], Apps, OldApps, Status) ->
end,
case reltool_utils:escript_foldl(Fun, {[], Status}, Escript) of
{ok, {Files, Status2}} ->
+ EscriptApp =
+ case lists:keyfind(EscriptAppName,#app.name,Apps) of
+ false -> default_escript_app(Escript);
+ EA -> EA
+ end,
{Apps2, Status3} =
- files_to_apps(Escript,
- lists:sort(Files),
- Apps,
- Apps,
- OldApps,
- Status2),
- escripts_to_apps(Escripts, Apps2, OldApps, Status3);
+ escript_files_to_apps(EscriptAppName,
+ lists:sort(Files),
+ [EscriptApp],
+ Apps,
+ Status2),
+ escripts_to_apps(Escripts, Apps2, Status3);
{error, Reason} ->
- Text = lists:flatten(io_lib:format("~p", [Reason])),
- {[], reltool_utils:return_first_error(Status,
- "Illegal escript " ++
- Escript ++ ": " ++ Text)}
+ reltool_utils:throw_error("Illegal escript ~p: ~p", [Escript,Reason])
end;
-escripts_to_apps([], Apps, _OldApps, Status) ->
+escripts_to_apps([], Apps, Status) ->
{Apps, Status}.
%% Assume that all files for an app are in consecutive order
%% Assume the app info is before the mods
-files_to_apps(Escript,
- [{AppName, Type, Dir, ModOrInfo} | Files] = AllFiles,
- Acc,
- Apps,
- OldApps,
- Status) ->
- case Type of
- mod ->
- case Acc of
- [] ->
- Info = missing_app_info(""),
- {NewApp, Status2} =
- merge_escript_app(AppName,
- Dir,
- Info,
- [ModOrInfo],
- Apps,
- OldApps,
- Status),
- files_to_apps(Escript,
- AllFiles,
- [NewApp | Acc],
- Apps,
- OldApps, Status2);
- [App | Acc2] when App#app.name =:= ModOrInfo#mod.app_name ->
- App2 = App#app{mods = [ModOrInfo | App#app.mods]},
- files_to_apps(Escript,
- Files,
- [App2 | Acc2],
- Apps,
- OldApps,
- Status);
- [App | Acc2] ->
- PrevApp = App#app{mods = lists:keysort(#mod.name,
- App#app.mods)},
- Info = missing_app_info(""),
- {NewApp, Status2} =
- merge_escript_app(AppName,
- Dir,
- Info,
- [ModOrInfo],
- Apps,
- OldApps,
- Status),
- files_to_apps(Escript,
- Files,
- [NewApp, PrevApp | Acc2],
- Apps,
- OldApps,
- Status2)
- end;
- app ->
- {App, Status2} =
- merge_escript_app(AppName, Dir, ModOrInfo, [], Apps, OldApps,
- Status),
- files_to_apps(Escript, Files, [App | Acc], Apps, OldApps, Status2)
- end;
-files_to_apps(_Escript, [], Acc, _Apps, _OldApps, Status) ->
- {lists:keysort(#app.name, Acc), Status}.
-
-merge_escript_app(AppName, Dir, Info, Mods, Apps, OldApps, Status) ->
- App1 = case lists:keyfind(AppName, #app.name, OldApps) of
- #app{} = App ->
- App;
- false ->
- default_app(AppName, Dir)
- end,
- App2 = App1#app{is_escript = true,
+escript_files_to_apps(EscriptAppName,
+ [{AppName, Type, Dir, ModOrInfo} | Files],
+ Acc,
+ Apps,
+ Status) ->
+ {NewAcc,Status3} =
+ case Type of
+ mod ->
+ case Acc of
+ [App | Acc2] when App#app.name =:= ModOrInfo#mod.app_name ->
+ Mods = lists:ukeymerge(#mod.name,
+ [ModOrInfo],
+ App#app.mods),
+ {[App#app{mods = Mods} | Acc2], Status};
+ Acc ->
+ {NewApp, Status2} = init_escript_app(AppName,
+ EscriptAppName,
+ Dir,
+ missing_app_info(""),
+ [ModOrInfo],
+ Apps,
+ Status),
+ {[NewApp | Acc], Status2}
+ end;
+ app ->
+ {App, Status2} = init_escript_app(AppName,
+ EscriptAppName,
+ Dir,
+ ModOrInfo,
+ [],
+ Apps,
+ Status),
+ {[App | Acc], Status2}
+ end,
+ escript_files_to_apps(EscriptAppName, Files, NewAcc, Apps, Status3);
+escript_files_to_apps(_EscriptAppName, [], Acc, Apps, Status) ->
+ {lists:ukeymerge(#app.name, lists:reverse(Acc), Apps), Status}.
+
+init_escript_app(AppName, EscriptAppName, Dir, Info, Mods, Apps, Status) ->
+ App1 = default_app(AppName, Dir),
+ IsEscript =
+ if AppName=:=EscriptAppName -> true;
+ true -> {inlined, EscriptAppName}
+ end,
+ InclCond = (lists:keyfind(EscriptAppName,#app.name,Apps))#app.incl_cond,
+ App2 = App1#app{is_escript = IsEscript,
label = filename:basename(Dir, ".escript"),
info = Info,
mods = Mods,
active_dir = Dir,
- sorted_dirs = [Dir]},
+ sorted_dirs = [Dir],
+ incl_cond = InclCond},% inlined apps inherit incl from escript
case lists:keymember(AppName, #app.name, Apps) of
true ->
- Error = lists:concat([AppName, ": Application name clash. ",
- "Escript ", Dir," contains application ",
- AppName, "."]),
- {App2, reltool_utils:return_first_error(Status, Error)};
+ reltool_utils:throw_error(
+ "~p: Application name clash. Escript ~p contains application ~p.",
+ [AppName,Dir,AppName]);
false ->
{App2, Status}
end.
-merge_app_dirs([{Name, Dir} | Rest], [App | Apps], OldApps)
- when App#app.name =:= Name ->
- %% Add new dir to app
- App2 = App#app{sorted_dirs = [Dir | App#app.sorted_dirs]},
- merge_app_dirs(Rest, [App2 | Apps], OldApps);
-merge_app_dirs([{Name, Dir} | Rest], Apps, OldApps) ->
- %% Initate app
- Apps2 = sort_app_dirs(Apps),
- Apps4 =
+merge_app_dirs([{Name, Dir} | Rest], Apps) ->
+ App =
case lists:keyfind(Name, #app.name, Apps) of
false ->
- case lists:keyfind(Name, #app.name, OldApps) of
- false ->
- App = default_app(Name, Dir),
- [App | Apps2];
- #app{active_dir = Dir} = OldApp ->
- [OldApp | Apps2];
- OldApp ->
- App =
- case filter_app(OldApp) of
- {true, NewApp} ->
- NewApp#app{active_dir = Dir,
- sorted_dirs = [Dir]};
- false ->
- default_app(Name, Dir)
- end,
- [App | Apps2]
- end;
+ default_app(Name, Dir);
OldApp ->
- Apps3 = lists:keydelete(Name, #app.name, Apps2),
- App = OldApp#app{sorted_dirs = [Dir | OldApp#app.sorted_dirs]},
- [App | Apps3]
+ SortedDirs = lists:umerge(fun reltool_utils:app_dir_test/2,
+ [Dir], OldApp#app.sorted_dirs),
+ OldApp#app{sorted_dirs = SortedDirs}
end,
- merge_app_dirs(Rest, Apps4, OldApps);
-merge_app_dirs([], Apps, _OldApps) ->
- Apps2 = sort_app_dirs(Apps),
- lists:reverse(Apps2).
-
-sort_app_dirs([#app{sorted_dirs = Dirs} = App | Acc]) ->
- SortedDirs = lists:sort(fun reltool_utils:app_dir_test/2, Dirs),
- case SortedDirs of
- [ActiveDir | _] -> ok;
- [] -> ActiveDir = undefined
- end,
- [App#app{active_dir = ActiveDir, sorted_dirs = SortedDirs} | Acc];
-sort_app_dirs([]) ->
+ Apps2 = lists:ukeymerge(#app.name, [App], Apps),
+ merge_app_dirs(Rest, Apps2);
+merge_app_dirs([], Apps) ->
+ set_active_dirs(Apps).
+
+%% First dir, i.e. the one with highest version, is set to active dir
+set_active_dirs([#app{sorted_dirs = [ActiveDir|_]} = App | Apps]) ->
+ [App#app{active_dir = ActiveDir} | set_active_dirs(Apps)];
+set_active_dirs([#app{sorted_dirs = []} = App | Apps]) ->
+ [App#app{active_dir = undefined} | set_active_dirs(Apps)];
+set_active_dirs([]) ->
[].
+
default_app(Name, Dir) ->
App = default_app(Name),
App#app{active_dir = Dir,
@@ -1913,89 +1855,51 @@ default_app(Name, Dir) ->
default_app(Name) ->
#app{name = Name,
is_escript = false,
- use_selected_vsn = undefined,
- active_dir = undefined,
sorted_dirs = [],
- vsn = undefined,
- label = undefined,
- info = undefined,
mods = [],
-
- mod_cond = undefined,
- incl_cond = undefined,
-
- status = missing,
- uses_mods = undefined,
- is_pre_included = undefined,
- is_included = undefined,
- rels = undefined}.
-
-%% Assume that the application are sorted
-refresh_apps([Old | OldApps], [New | NewApps], Acc, Force, Status)
- when New#app.name =:= Old#app.name ->
- {Info, ActiveDir, Status2} = ensure_app_info(New, Status),
- OptLabel =
- case Info#app_info.vsn =:= New#app.vsn of
- true -> New#app.label;
- false -> undefined % Cause refresh
- end,
- {Refreshed, Status3} =
- refresh_app(New#app{label = OptLabel,
- active_dir = ActiveDir,
- vsn = Info#app_info.vsn,
- info = Info},
- Force,
- Status2),
- refresh_apps(OldApps, NewApps, [Refreshed | Acc], Force, Status3);
-refresh_apps([Old | OldApps], [New | NewApps], Acc, Force, Status)
- when New#app.name < Old#app.name ->
- %% No old app version exists. Use new as is.
- %% BUGBUG: Issue warning if the active_dir is not defined
- {New2, Status2} = refresh_app(New, Force, Status),
- refresh_apps([Old | OldApps], NewApps, [New2 | Acc], Force, Status2);
-refresh_apps([Old | OldApps], [New | NewApps], Acc, Force, Status)
- when New#app.name > Old#app.name ->
- %% No new version. Remove the old.
- Status2 =
- case Old#app.name =:= ?MISSING_APP_NAME of
- true ->
- Status;
- false ->
- Warning =
- lists:concat([Old#app.name,
- ": The source dirs does not ",
- "contain the application anymore."]),
- reltool_utils:add_warning(Status, Warning)
- end,
- refresh_apps(OldApps, [New | NewApps], Acc, Force, Status2);
-refresh_apps([], [New | NewApps], Acc, Force, Status) ->
- %% No old app version exists. Use new as is.
- {New2, Status2} = refresh_app(New, Force, Status),
- refresh_apps([], NewApps, [New2 | Acc], Force, Status2);
-refresh_apps([Old | OldApps], [], Acc, Force, Status) ->
- %% No new version. Remove the old.
- Status2 =
- case Old#app.name =:= ?MISSING_APP_NAME of
- true ->
- Status;
- false ->
- Warning =
- lists:concat([Old#app.name,
- ": The source dirs does not "
- "contain the application anymore."]),
- reltool_utils:add_warning(Status, Warning)
- end,
- refresh_apps(OldApps, [], Acc, Force, Status2);
-refresh_apps([], [], Acc, _Force, Status) ->
+ status = missing}.
+
+
+
+refresh_apps(ConfigApps, [New | NewApps], Acc, Force, Status) ->
+ {New2, Status3} =
+ case lists:keymember(New#app.name,#app.name,ConfigApps) of
+ true ->
+ %% There is user defined config for this application, make
+ %% sure that the application exists and that correct
+ %% version is used. Set active directory.
+ {Info, ActiveDir, Status2} = ensure_app_info(New, Status),
+ OptLabel =
+ case Info#app_info.vsn =:= New#app.vsn of
+ true -> New#app.label;
+ false -> undefined % Cause refresh
+ end,
+ refresh_app(New#app{label = OptLabel,
+ active_dir = ActiveDir,
+ vsn = Info#app_info.vsn,
+ info = Info},
+ Force,
+ Status2);
+ false ->
+ %% There is no user defined config for this
+ %% application. This means that the app is found in the
+ %% lib dirs, and that the highest version shall be
+ %% used. I.e. the active_dir and vsn are already correct
+ %% from merge_app_dirs.
+ refresh_app(New, Force, Status)
+ end,
+ refresh_apps(ConfigApps, NewApps, [New2 | Acc], Force, Status3);
+refresh_apps(_ConfigApps, [], Acc, _Force, Status) ->
{lists:reverse(Acc), Status}.
-ensure_app_info(#app{is_escript = true, active_dir = Dir, info = Info},
- Status) ->
+
+ensure_app_info(#app{is_escript = IsEscript, active_dir = Dir, info = Info},
+ Status)
+ when IsEscript=/=false ->
+ %% Escript or application which is inlined in an escript
{Info, Dir, Status};
-ensure_app_info(#app{name = Name, sorted_dirs = []}, Status) ->
- Error = lists:concat([Name, ": Missing application directory."]),
- Status2 = reltool_utils:return_first_error(Status, Error),
- {missing_app_info(""), undefined, Status2};
+ensure_app_info(#app{name = Name, sorted_dirs = []}, _Status) ->
+ reltool_utils:throw_error("~p: : Missing application directory.",[Name]);
ensure_app_info(#app{name = Name,
vsn = Vsn,
sorted_dirs = Dirs,
@@ -2017,11 +1921,10 @@ ensure_app_info(#app{name = Name,
%% No redundant info
Status2;
[BadVsn | _] ->
- Error2 =
- lists:concat([Name, ": Application version clash. ",
- "Multiple directories contains version \"",
- BadVsn, "\"."]),
- reltool_utils:return_first_error(Status2, Error2)
+ reltool_utils:throw_error(
+ "~p: Application version clash. "
+ "Multiple directories contains version ~p.",
+ [Name,BadVsn])
end,
FirstInfo = hd(AllInfo),
FirstDir = hd(Dirs),
@@ -2035,13 +1938,9 @@ ensure_app_info(#app{name = Name,
{Info, VsnDir} ->
{Info, VsnDir, Status3};
false ->
- Error3 =
- lists:concat([Name,
- ": No application directory contains ",
- "selected version \"",
- Vsn, "\"."]),
- Status4 = reltool_utils:return_first_error(Status3, Error3),
- {FirstInfo, FirstDir, Status4}
+ reltool_utils:throw_error(
+ "~p: No application directory contains selected version ~p",
+ [Name,Vsn])
end
end;
ensure_app_info(#app{active_dir = Dir, info = Info}, Status) ->
@@ -2067,6 +1966,54 @@ get_base(Name, Dir) ->
filename:basename(Dir)
end.
+sys_all_apps(#state{app_tab=AppTab, sys=Sys}) ->
+ Sys#sys{apps = ets:match_object(AppTab,'_')}.
+
+config_and_refresh(OldS, Fun) ->
+ try
+ S = Fun(),
+ {S2, Apps, Status2} = refresh(S),
+ %% Analyse will write to app_tab and mod_tab, so we first
+ %% backup these tables and clear them
+ Backup = backup(OldS),
+ try
+ Status3 = analyse(S2, Apps, Status2),
+ S3 = save_old(OldS, S2, Backup, Status3),
+ {S3, Status3}
+ catch throw:{error,_} = Error1 ->
+ restore(Backup,OldS),
+ throw(Error1)
+ end
+ catch throw:{error,_} = Error2 ->
+ {OldS, Error2}
+ end.
+
+
+backup(S) ->
+ Apps = ets:tab2list(S#state.app_tab),
+ Mods = ets:tab2list(S#state.mod_tab),
+ ets:delete_all_objects(S#state.app_tab),
+ ets:delete_all_objects(S#state.mod_tab),
+ ets:delete_all_objects(S#state.mod_used_by_tab), %tmp tab, no backup needed
+ {Apps,Mods}.
+
+restore({Apps,Mods}, S) ->
+ insert_all(S#state.app_tab,Apps),
+ insert_all(S#state.mod_tab,Mods).
+
+save_old(#state{status=OldStatus,sys=OldSys},NewS,{OldApps,OldMods},NewStatus) ->
+ ets:delete_all_objects(NewS#state.old_app_tab),
+ ets:delete_all_objects(NewS#state.old_mod_tab),
+ insert_all(NewS#state.old_app_tab,OldApps),
+ insert_all(NewS#state.old_mod_tab,OldMods),
+ NewS#state{old_sys=OldSys,
+ old_status=OldStatus,
+ status=NewStatus}.
+
+insert_all(Tab,Items) ->
+ lists:foreach(fun(Item) -> ets:insert(Tab,Item) end, Items).
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% sys callbacks
diff --git a/lib/reltool/src/reltool_sys_win.erl b/lib/reltool/src/reltool_sys_win.erl
index 8b0f64eb45..0c0b295db1 100644
--- a/lib/reltool/src/reltool_sys_win.erl
+++ b/lib/reltool/src/reltool_sys_win.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -56,7 +56,9 @@
derived,
fgraph_wins,
app_box,
- mod_box
+ mod_box,
+ warning_list,
+ warning_wins
}).
-define(WIN_WIDTH, 800).
@@ -88,6 +90,10 @@
-define(blacklist, "Excluded").
-define(derived, "Derived").
+-define(WARNING_COL, 0).
+-define(DEFAULT_WARNING_TIP, "Warnings are listed in this window").
+-define(WARNING_POPUP_SIZE, {400,150}).
+
-define(safe_config,{sys,[{incl_cond,exclude},
{app,kernel,[{incl_cond,include}]},
{app,stdlib,[{incl_cond,include}]},
@@ -141,48 +147,44 @@ do_init([{safe_config, Safe}, {parent, Parent} | Options]) ->
wx:debug(C#common.wx_debug),
%% wx_misc:beginBusyCursor(),
- case reltool_server:get_status(ServerPid) of
- {ok, Warnings} ->
- exit_dialog(Warnings),
- {ok, Sys} = reltool_server:get_sys(ServerPid),
- S = #state{parent_pid = Parent,
- server_pid = ServerPid,
- common = C,
- config_file = filename:absname("config.reltool"),
- target_dir = filename:absname("reltool_target_dir"),
- app_wins = [],
- sys = Sys,
- fgraph_wins = []},
- S2 = create_window(S),
- S5 = wx:batch(fun() ->
- Title = atom_to_list(?APPLICATION),
- wxFrame:setTitle(S2#state.frame,
- Title),
- %% wxFrame:setMinSize(Frame,
- %% {?WIN_WIDTH, ?WIN_HEIGHT}),
- wxStatusBar:setStatusText(
- S2#state.status_bar,
- "Done."),
- S3 = redraw_apps(S2),
- S4 = redraw_libs(S3),
- redraw_config_page(S4)
- end),
- %% wx_misc:endBusyCursor(),
- %% wxFrame:destroy(Frame),
- proc_lib:init_ack(S#state.parent_pid, {ok, self()}),
- loop(S5);
- {error, Reason} ->
- restart_server_safe_config(Safe,Parent,Reason)
- end;
+ {ok, Warnings} = reltool_server:get_status(ServerPid),
+ exit_dialog(Warnings),
+ S = #state{parent_pid = Parent,
+ server_pid = ServerPid,
+ common = C,
+ config_file = filename:absname("config.reltool"),
+ target_dir = filename:absname("reltool_target_dir"),
+ app_wins = [],
+ sys = Sys,
+ fgraph_wins = [],
+ warning_wins = []},
+ S2 = create_window(S),
+ S5 = wx:batch(fun() ->
+ Title = atom_to_list(?APPLICATION),
+ wxFrame:setTitle(S2#state.frame,
+ Title),
+ %% wxFrame:setMinSize(Frame,
+ %% {?WIN_WIDTH, ?WIN_HEIGHT}),
+ wxStatusBar:setStatusText(
+ S2#state.status_bar,
+ "Done."),
+ S3 = redraw_apps(S2),
+ S4 = redraw_libs(S3),
+ redraw_config_page(S4)
+ end),
+ %% wx_misc:endBusyCursor(),
+ %% wxFrame:destroy(Frame),
+ proc_lib:init_ack(S#state.parent_pid, {ok, self()}),
+ loop(S5);
{error, Reason} ->
- io:format("~p(~p): <ERROR> ~p\n", [?MODULE, ?LINE, Reason]),
- exit(Reason)
+ restart_server_safe_config(Safe,Parent,Reason)
end.
-restart_server_safe_config(true,_Parent,Reason) ->
+restart_server_safe_config(true,Parent,Reason) ->
io:format("~p(~p): <ERROR> ~p\n", [?MODULE, ?LINE, Reason]),
- exit(Reason);
+ proc_lib:init_ack(Parent, {error,Reason});
restart_server_safe_config(false,Parent,Reason) ->
+ wx:new(),
Strings =
[{?wxBLACK,"Could not start reltool server:\n\n"},
{?wxRED,Reason++"\n\n"},
@@ -197,7 +199,7 @@ restart_server_safe_config(false,Parent,Reason) ->
do_init([{safe_config,true},{parent,Parent},?safe_config]);
?wxID_CANCEL ->
io:format("~p(~p): <ERROR> ~p\n", [?MODULE, ?LINE, Reason]),
- exit(Reason)
+ proc_lib:init_ack(Parent,{error,Reason})
end.
exit_dialog([]) ->
@@ -240,10 +242,18 @@ loop(S) ->
lists:keydelete(ObjRef, #fgraph_win.frame, FWs),
?MODULE:loop(S#state{fgraph_wins = FWs2});
false ->
- error_logger:format("~p~p got unexpected "
- "message:\n\t~p\n",
- [?MODULE, self(), Msg]),
- ?MODULE:loop(S)
+ WWs = S#state.warning_wins,
+ case lists:member(ObjRef, WWs) of
+ true ->
+ wxFrame:destroy(ObjRef),
+ WWs2 = lists:delete(ObjRef, WWs),
+ ?MODULE:loop(S#state{warning_wins = WWs2});
+ false ->
+ error_logger:format("~p~p got unexpected "
+ "message:\n\t~p\n",
+ [?MODULE, self(), Msg]),
+ ?MODULE:loop(S)
+ end
end
end;
#wx{id = ?CLOSE_ITEM,
@@ -297,8 +307,8 @@ handle_child_exit({'EXIT', Pid, _Reason} = Exit, FWs, AWs) ->
msg_warning(Exit, application_window),
{FWs, lists:keydelete(Pid, #app_win.pid, AWs)};
false ->
- msg_warning(Exit, unknown),
- {FWs, AWs}
+ msg_warning(Exit, unknown),
+ {FWs, AWs}
end
end.
@@ -340,8 +350,12 @@ create_window(S) ->
fun create_main_release_page/1,
fun create_config_page/1
]),
+
+ S4 = create_warning_list(S3),
+
Sizer = wxBoxSizer:new(?wxVERTICAL),
wxSizer:add(Sizer, Book, [{flag, ?wxEXPAND}, {proportion, 1}]),
+ wxSizer:add(Sizer, S4#state.warning_list, [{flag, ?wxEXPAND}]),
wxPanel:setSizer(Panel, Sizer),
wxSizer:fit(Sizer, Frame),
@@ -349,7 +363,7 @@ create_window(S) ->
wxFrame:connect(Frame, close_window),
wxFrame:show(Frame),
- S3.
+ S4.
create_menubar(Frame) ->
MenuBar = wxMenuBar:new(),
@@ -444,6 +458,7 @@ create_app_list_ctrl(Panel, OuterSz, Title, Tick, Cross) ->
ListItem = wxListItem:new(),
wxListItem:setAlign(ListItem, ?wxLIST_FORMAT_LEFT),
wxListItem:setText(ListItem, Title),
+ wxListItem:setWidth(ListItem, reltool_utils:get_column_width(ListCtrl)),
wxListCtrl:insertColumn(ListCtrl, ?APPS_APP_COL, ListItem),
wxListItem:destroy(ListItem),
@@ -642,6 +657,49 @@ redraw_config_page(#state{sys = Sys, app_box = AppBox, mod_box = ModBox} = S) ->
wxRadioBox:setSelection(ModBox, ModChoice),
S.
+create_warning_list(#state{panel = Panel} = S) ->
+ ListCtrl = wxListCtrl:new(Panel,
+ [{style,
+ ?wxLC_REPORT bor
+ ?wxLC_HRULES bor
+ ?wxVSCROLL},
+ {size, {?WIN_WIDTH,80}}]),
+ reltool_utils:assign_image_list(ListCtrl),
+ wxListCtrl:insertColumn(ListCtrl, ?WARNING_COL, "Warnings",
+ [{format,?wxLIST_FORMAT_LEFT},
+ {width,reltool_utils:get_column_width(ListCtrl)}]),
+ wxListCtrl:setToolTip(ListCtrl, ?DEFAULT_WARNING_TIP),
+ wxEvtHandler:connect(ListCtrl, size,
+ [{skip, true}, {userData, warnings}]),
+ wxEvtHandler:connect(ListCtrl, command_list_item_activated,
+ [{userData, warnings}]),
+ wxEvtHandler:connect(ListCtrl, motion, [{userData, warnings}]),
+ wxEvtHandler:connect(ListCtrl, enter_window),
+ S#state{warning_list=ListCtrl}.
+
+redraw_warnings(S) ->
+ {ok,Warnings} = reltool_server:get_status(S#state.server_pid),
+ redraw_warnings(S#state.warning_list,Warnings),
+ length(Warnings).
+
+redraw_warnings(ListCtrl, []) ->
+ wxListCtrl:deleteAllItems(ListCtrl),
+ ok;
+redraw_warnings(ListCtrl, Warnings) ->
+ wxListCtrl:deleteAllItems(ListCtrl),
+ Show = fun(Warning, Row) ->
+ wxListCtrl:insertItem(ListCtrl, Row, ""),
+ wxListCtrl:setItem(ListCtrl,
+ Row,
+ ?WARNING_COL,
+ Warning,
+ [{imageId, ?WARN_IMAGE}]),
+ Row + 1
+ end,
+ wx:foldl(Show, 0, Warnings),
+ ok.
+
+
create_main_release_page(#state{book = Book} = S) ->
Panel = wxPanel:new(Book, []),
RelBook = wxNotebook:new(Panel, ?wxID_ANY, []),
@@ -783,6 +841,9 @@ escript_popup(S, File, Tree, Item) ->
handle_event(S, #wx{id = Id, obj= ObjRef, userData = UserData, event = Event} = _Wx) ->
%% io:format("wx: ~p\n", [Wx]),
case Event of
+ _ when UserData =:= warnings;
+ is_tuple(UserData), element(1,UserData)=:=warning ->
+ handle_warning_event(S, ObjRef, UserData, Event);
#wxSize{type = size, size = {W, _H}} when UserData =:= app_list_ctrl ->
wxListCtrl:setColumnWidth(ObjRef, ?APPS_APP_COL, W),
S;
@@ -848,7 +909,9 @@ handle_event(S, #wx{id = Id, obj= ObjRef, userData = UserData, event = Event} =
when S#state.popup_menu =/= undefined ->
handle_popup_event(S, Type, Id, ObjRef, UserData, Str);
#wxMouse{type = enter_window} ->
- wxWindow:setFocus(ObjRef),
+ %% The following is commented out because it raises the
+ %% main system window on top of popup windows.
+ %% wxWindow:setFocus(ObjRef),
S;
_ ->
case wxNotebook:getPageText(S#state.book,
@@ -860,6 +923,110 @@ handle_event(S, #wx{id = Id, obj= ObjRef, userData = UserData, event = Event} =
end
end.
+handle_warning_event(S, ObjRef, _, #wxSize{type = size}) ->
+ ColumnWidth = reltool_utils:get_column_width(ObjRef),
+ wxListCtrl:setColumnWidth(ObjRef, ?WARNING_COL, ColumnWidth),
+ S;
+handle_warning_event(S, ObjRef, _, #wxMouse{type = motion, x=X, y=Y}) ->
+ Pos = reltool_utils:wait_for_stop_motion(ObjRef, {X,Y}),
+ warning_list_set_tool_tip(os:type(),ObjRef,Pos),
+ S;
+handle_warning_event(S, ObjRef, _, #wxList{type = command_list_item_activated,
+ itemIndex = Pos}) ->
+ Text = wxListCtrl:getItemText(ObjRef, Pos),
+ S#state{warning_wins = [display_warning(S,Text) | S#state.warning_wins]};
+handle_warning_event(S, _ObjRef, {warning,Frame},
+ #wxCommand{type = command_button_clicked}) ->
+ wxFrame:destroy(Frame),
+ S#state{warning_wins = lists:delete(Frame,S#state.warning_wins)}.
+
+warning_list_set_tool_tip({win32,_},ListCtrl,{_X,Y}) ->
+ case win_find_item(ListCtrl,Y,0) of
+ -1 ->
+ wxListCtrl:setToolTip(ListCtrl,?DEFAULT_WARNING_TIP);
+ _Index ->
+ %% The following is commented out because there seems to
+ %% be an utomatic tooltip under Windows that shows the
+ %% expanded list item in case it is truncated because it
+ %% is too long for column width.
+ %% Tip =
+ %% case wxListCtrl:getItemText(ListCtrl,Index) of
+ %% "" ->
+ %% ?DEFAULT_WARNING_TIP;
+ %% Text ->
+ %% "WARNING:\n" ++ Text
+ %% end,
+ %% wxListCtrl:setToolTip(ListCtrl,Tip),
+ ok
+ end;
+warning_list_set_tool_tip(_,ListCtrl,Pos) ->
+ case wxListCtrl:findItem(ListCtrl,-1,Pos,0) of
+ Index when Index >= 0 ->
+ Tip =
+ case wxListCtrl:getItemText(ListCtrl,Index) of
+ "" ->
+ ?DEFAULT_WARNING_TIP;
+ Text ->
+ "WARNING:\n" ++ Text
+ end,
+ wxListCtrl:setToolTip(ListCtrl, Tip);
+ _ ->
+ ok
+ end.
+
+win_find_item(ListCtrl,YPos,Index) ->
+ case wxListCtrl:getItemRect(ListCtrl,Index) of
+ {true,{_,Y,_,H}} when YPos>=Y, YPos=<Y+H ->
+ Index;
+ {true,_} ->
+ win_find_item(ListCtrl,YPos,Index+1);
+ {false,_} ->
+ -1
+ end.
+
+display_warning(S,Warning) ->
+ Pos = warning_popup_position(S,?WARNING_POPUP_SIZE),
+ Frame = wxFrame:new(wx:null(), ?wxID_ANY, "Warning",[{pos,Pos}]),
+ Panel = wxPanel:new(Frame, []),
+ TextStyle = ?wxTE_READONLY bor ?wxTE_WORDWRAP bor ?wxTE_MULTILINE,
+ Text = wxTextCtrl:new(Panel, ?wxID_ANY, [{value, Warning},
+ {style, TextStyle},
+ {size, ?WARNING_POPUP_SIZE}]),
+ Attr = wxTextAttr:new(),
+ wxTextAttr:setLeftIndent(Attr,10),
+ wxTextAttr:setRightIndent(Attr,10),
+ true = wxTextCtrl:setDefaultStyle(Text, Attr),
+ wxTextAttr:destroy(Attr),
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ wxSizer:add(Sizer, Text, [{border, 2},
+ {flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 1}]),
+
+ Close = wxButton:new(Panel, ?wxID_ANY, [{label, "Close"}]),
+ wxButton:setToolTip(Close, "Close window."),
+ wxButton:connect(Close, command_button_clicked, [{userData,{warning,Frame}}]),
+ wxSizer:add(Sizer, Close, [{flag, ?wxALIGN_CENTER_HORIZONTAL}]),
+
+ wxPanel:setSizer(Panel, Sizer),
+ wxSizer:fit(Sizer, Frame),
+ wxSizer:setSizeHints(Sizer, Frame),
+ wxFrame:connect(Frame, close_window),
+
+ wxFrame:show(Frame),
+ Frame.
+
+warning_popup_position(#state{frame=MF,warning_list=WL},{WFW,WFH}) ->
+ {MFX,MFY} = wxWindow:getPosition(MF),
+ {MFW,MFH} = wxWindow:getSize(MF),
+ {_WLW,WLH} = wxWindow:getSize(WL),
+
+ %% Position the popup in the middle of the main frame, above the
+ %% warning list, and with a small offset from the exact middle...
+ Offset = 50,
+ X = MFX + (MFW-WFW) div 2 - Offset,
+ Y = MFY + (MFH-WLH-WFH) div 2 - Offset,
+ {X,Y}.
+
handle_popup_event(S, _Type, 0, _ObjRef, _UserData, _Str) ->
S#state{popup_menu = undefined};
handle_popup_event(#state{popup_menu = #root_popup{dir = OldDir,
@@ -1079,16 +1246,16 @@ handle_app_event(S, Event, ObjRef, UserData) ->
[?MODULE, self(), ObjRef, UserData, Event]),
S.
-handle_app_button(#state{server_pid = ServerPid, app_wins = AppWins} = S,
+handle_app_button(#state{server_pid = ServerPid,
+ status_bar = Bar,
+ app_wins = AppWins} = S,
Items,
Action) ->
+ wxStatusBar:setStatusText(Bar, "Processing libraries..."),
NewApps = [move_app(S, Item, Action) || Item <- Items],
case reltool_server:set_apps(ServerPid, NewApps) of
- {ok, []} ->
+ {ok, _Warnings} ->
ok;
- {ok, Warnings} ->
- Msg = lists:flatten([[W, $\n] || W <- Warnings]),
- display_message(Msg, ?wxICON_WARNING);
{error, Reason} ->
display_message(Reason, ?wxICON_ERROR)
end,
@@ -1125,23 +1292,22 @@ move_app(S, {_ItemNo, AppBase}, Action) ->
end,
OldApp#app{incl_cond = AppCond}.
-do_set_app(#state{server_pid = ServerPid, app_wins = AppWins} = S, NewApp) ->
+do_set_app(#state{server_pid = ServerPid,
+ status_bar = Bar,
+ app_wins = AppWins} = S, NewApp) ->
+ wxStatusBar:setStatusText(Bar, "Processing libraries..."),
Result = reltool_server:set_app(ServerPid, NewApp),
- [ok = reltool_app_win:refresh(AW#app_win.pid) || AW <- AppWins],
- S2 = redraw_apps(S),
ReturnApp =
case Result of
- {ok, AnalysedApp, []} ->
- AnalysedApp;
- {ok, AnalysedApp, Warnings} ->
- Msg = lists:flatten([[W, $\n] || W <- Warnings]),
- display_message(Msg, ?wxICON_WARNING),
+ {ok, AnalysedApp, _Warnings} ->
AnalysedApp;
{error, Reason} ->
display_message(Reason, ?wxICON_ERROR),
{ok,OldApp} = reltool_server:get_app(ServerPid, NewApp#app.name),
OldApp
end,
+ [ok = reltool_app_win:refresh(AW#app_win.pid) || AW <- AppWins],
+ S2 = redraw_apps(S),
{ok, ReturnApp, S2}.
redraw_apps(#state{server_pid = ServerPid,
@@ -1164,8 +1330,14 @@ redraw_apps(#state{server_pid = ServerPid,
WhiteN = redraw_apps(WhiteApps, WhiteCtrl, ?TICK_IMAGE, ?ERR_IMAGE),
redraw_apps(BlackApps2, BlackCtrl, ?CROSS_IMAGE, ?WARN_IMAGE),
DerivedN = redraw_apps(DerivedApps, DerivedCtrl, ?TICK_IMAGE, ?ERR_IMAGE),
+
+ WarningsN = redraw_warnings(S),
+ WarningText = if WarningsN==1 -> "warning";
+ true -> "warnings"
+ end,
Status = lists:concat([WhiteN, " whitelisted modules and ",
- DerivedN, " derived modules."]),
+ DerivedN, " derived modules, ",
+ WarningsN, " ", WarningText, "."]),
wxStatusBar:setStatusText(S#state.status_bar, Status),
S.
@@ -1323,26 +1495,28 @@ save_config(#state{config_file = OldFile} = S, InclDefaults, InclDerivates) ->
S
end.
-gen_rel_files(#state{target_dir = OldDir} = S) ->
+gen_rel_files(#state{status_bar = Bar, target_dir = OldDir} = S) ->
Style = ?wxFD_SAVE bor ?wxFD_OVERWRITE_PROMPT,
case select_dir(S#state.frame,
"Select a directory to generate rel, script and boot files to",
OldDir,
Style) of
{ok, NewDir} ->
+ wxStatusBar:setStatusText(Bar, "Processing libraries..."),
Status = reltool_server:gen_rel_files(S#state.server_pid, NewDir),
check_and_refresh(S, Status);
cancel ->
S
end.
-gen_target(#state{target_dir = OldDir} = S) ->
+gen_target(#state{status_bar = Bar, target_dir = OldDir} = S) ->
Style = ?wxFD_SAVE bor ?wxFD_OVERWRITE_PROMPT,
case select_dir(S#state.frame,
"Select a directory to generate a target system to",
OldDir,
Style) of
{ok, NewDir} ->
+ wxStatusBar:setStatusText(Bar, "Processing libraries..."),
Status = reltool_server:gen_target(S#state.server_pid, NewDir),
check_and_refresh(S#state{target_dir = NewDir}, Status);
cancel ->
@@ -1380,8 +1554,8 @@ check_and_refresh(S, Status) ->
case Status of
ok ->
true;
- {ok, Warnings} ->
- undo_dialog(S, Warnings);
+ {ok, _Warnings} ->
+ true;
{error, Reason} when is_list(Reason) ->
display_message(Reason, ?wxICON_ERROR),
false;
@@ -1435,19 +1609,6 @@ question_dialog(Question, Details) ->
wxDialog:destroy(Dialog),
Answer.
-undo_dialog(_S, []) ->
- true;
-undo_dialog(S, Warnings) ->
- Question = "Do you want to perform the update despite these warnings?",
- Details = lists:flatten([[W, $\n] || W <- Warnings]),
- case question_dialog(Question, Details) of
- ?wxID_OK ->
- true;
- ?wxID_CANCEL ->
- reltool_server:undo_config(S#state.server_pid),
- false
- end.
-
display_message(Message, Icon) ->
Dialog = wxMessageDialog:new(wx:null(),
Message,
@@ -1491,8 +1652,6 @@ add_text(_,_,[]) ->
ok.
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% sys callbacks
diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl
index 0fcf89a360..3d83a77d99 100644
--- a/lib/reltool/src/reltool_target.erl
+++ b/lib/reltool/src/reltool_target.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -101,7 +101,7 @@ do_gen_config(#sys{root_dir = RootDir,
|| A <- Apps,
A#app.name =/= ?MISSING_APP_NAME,
A#app.name =/= erts,
- not A#app.is_escript],
+ A#app.is_escript =/= true],
EscriptItems = [{escript,
A#app.active_dir,
emit(incl_cond, A#app.incl_cond, undefined, InclDefs)}
@@ -208,10 +208,10 @@ do_gen_config(#rel_app{name = Name,
incl_apps = InclApps},
_InclDefs) ->
case {Type, InclApps} of
- {undefined, []} -> Name;
- {undefined, _} -> {Name, InclApps};
- {_, []} -> {Name, Type};
- {_, _} -> {Name, Type, InclApps}
+ {undefined, undefined} -> Name;
+ {undefined, _} -> {Name, InclApps};
+ {_, undefined} -> {Name, Type};
+ {_, _} -> {Name, Type, InclApps}
end;
do_gen_config({Tag, Val}, InclDefs) ->
emit(Tag, Val, undefined, InclDefs);
@@ -279,7 +279,7 @@ gen_rel(Rel, Sys) ->
{error, Text}
end.
-do_gen_rel(#rel{name = RelName, vsn = RelVsn},
+do_gen_rel(#rel{name = RelName, vsn = RelVsn, rel_apps = RelApps},
#sys{apps = Apps},
MergedApps) ->
ErtsName = erts,
@@ -288,7 +288,7 @@ do_gen_rel(#rel{name = RelName, vsn = RelVsn},
{release,
{RelName, RelVsn},
{ErtsName, Erts#app.vsn},
- [strip_rel_info(App) || App <- MergedApps]};
+ [strip_rel_info(App, RelApps) || App <- MergedApps]};
false ->
reltool_utils:throw_error("Mandatory application ~p is "
"not included",
@@ -298,13 +298,17 @@ do_gen_rel(#rel{name = RelName, vsn = RelVsn},
strip_rel_info(#app{name = Name,
vsn = Vsn,
app_type = Type,
- info = #app_info{incl_apps = InclApps}})
- when Type =/= undefined ->
- case {Type, InclApps} of
- {permanent, []} -> {Name, Vsn};
- {permanent, _} -> {Name, Vsn, InclApps};
- {_, []} -> {Name, Vsn, Type};
- {_, _} -> {Name, Vsn, Type, InclApps}
+ info = #app_info{incl_apps = AppInclApps}},
+ RelApps) when Type =/= undefined ->
+ RelInclApps = case lists:keyfind(Name,#rel_app.name,RelApps) of
+ #rel_app{incl_apps = RIA} when RIA =/= undefined -> RIA;
+ _ -> undefined
+ end,
+ case {Type, RelInclApps} of
+ {permanent, undefined} -> {Name, Vsn};
+ {permanent, _} -> {Name, Vsn, AppInclApps};
+ {_, undefined} -> {Name, Vsn, Type};
+ {_, _} -> {Name, Vsn, Type, AppInclApps}
end.
merge_apps(#rel{name = RelName,
@@ -323,7 +327,7 @@ merge_apps(#rel{name = RelName,
A#app.name =/= ?MISSING_APP_NAME,
not lists:keymember(A#app.name, #app.name, MergedApps2)],
MergedApps3 = do_merge_apps(RelName, Embedded, Apps, EmbAppType, MergedApps2),
- sort_apps(MergedApps3).
+ sort_apps(lists:reverse(MergedApps3)).
do_merge_apps(RelName, [#rel_app{name = Name} = RA | RelApps], Apps, RelAppType, Acc) ->
case is_already_merged(Name, RelApps, Acc) of
@@ -341,25 +345,18 @@ do_merge_apps(RelName, [Name | RelApps], Apps, RelAppType, Acc) ->
true ->
do_merge_apps(RelName, RelApps, Apps, RelAppType, Acc);
false ->
- RelApp = init_rel_app(Name, Apps),
+ RelApp = #rel_app{name = Name},
do_merge_apps(RelName, [RelApp | RelApps], Apps, RelAppType, Acc)
end;
do_merge_apps(_RelName, [], _Apps, _RelAppType, Acc) ->
- lists:reverse(Acc).
-
-init_rel_app(Name, Apps) ->
- {value, App} = lists:keysearch(Name, #app.name, Apps),
- Info = App#app.info,
- #rel_app{name = Name,
- app_type = undefined,
- incl_apps = Info#app_info.incl_apps}.
+ Acc.
merge_app(RelName,
- #rel_app{name = Name,
- app_type = Type,
- incl_apps = InclApps},
- RelAppType,
- App) ->
+ #rel_app{name = Name,
+ app_type = Type,
+ incl_apps = InclApps0},
+ RelAppType,
+ App) ->
Type2 =
case {Type, App#app.app_type} of
{undefined, undefined} -> RelAppType;
@@ -367,6 +364,11 @@ merge_app(RelName,
{_, _} -> Type
end,
Info = App#app.info,
+ InclApps =
+ case InclApps0 of
+ undefined -> Info#app_info.incl_apps;
+ _ -> InclApps0
+ end,
case InclApps -- Info#app_info.incl_apps of
[] ->
App#app{app_type = Type2, info = Info#app_info{incl_apps = InclApps}};
@@ -421,7 +423,10 @@ do_gen_script(#rel{name = RelName, vsn = RelVsn},
Mandatory = mandatory_modules(),
Early = Mandatory ++ Preloaded,
{value, KernelApp} = lists:keysearch(kernel, #app.name, MergedApps),
- InclApps = [I || #app{info = #app_info{incl_apps = I}} <- MergedApps],
+ InclApps = lists:flatmap(fun(#app{info = #app_info{incl_apps = I}}) ->
+ I
+ end,
+ MergedApps),
%% Create the script
DeepList =
@@ -471,7 +476,7 @@ load_app_mods(#app{mods = Mods} = App, Mand, PathFlag, Variables) ->
Path = cr_path(App, PathFlag, Variables),
PartNames =
lists:sort([{packages:split(M),M} ||
- #mod{name = M} <- Mods,
+ #mod{name = M, is_included=true} <- Mods,
not lists:member(M, Mand)]),
SplitMods =
lists:foldl(
@@ -513,7 +518,12 @@ sort_apps([#app{name = Name, info = Info} = App | Apps],
Circular,
Visited) ->
{Uses, Apps1, NotFnd1} =
- find_all(Name, Info#app_info.applications, Apps, Visited, [], []),
+ find_all(Name,
+ lists:reverse(Info#app_info.applications),
+ Apps,
+ Visited,
+ [],
+ []),
{Incs, Apps2, NotFnd2} =
find_all(Name,
lists:reverse(Info#app_info.incl_apps),
@@ -895,7 +905,7 @@ spec_escripts(#sys{apps = Apps}, ErtsBin, BinFiles) ->
if
Name =:= ?MISSING_APP_NAME ->
false;
- not IsEscript ->
+ IsEscript =/= true ->
false;
IsIncl; IsPre ->
{true, do_spec_escript(File, ErtsBin, BinFiles)};
@@ -957,7 +967,7 @@ spec_lib_files(#sys{apps = Apps} = Sys) ->
if
Name =:= ?MISSING_APP_NAME ->
false;
- IsEscript ->
+ IsEscript =/= false ->
false;
IsIncl; IsPre ->
true;
diff --git a/lib/reltool/src/reltool_utils.erl b/lib/reltool/src/reltool_utils.erl
index 39d057d994..b0def45213 100644
--- a/lib/reltool/src/reltool_utils.erl
+++ b/lib/reltool/src/reltool_utils.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,14 +23,15 @@
split_app_name/1, prim_consult/1,
default_rels/0, choose_default/3,
- assign_image_list/1, get_latest_resize/1,
+ assign_image_list/1, get_latest_resize/1, wait_for_stop_motion/2,
mod_conds/0, list_to_mod_cond/1, mod_cond_to_index/1,
incl_conds/0, list_to_incl_cond/1, incl_cond_to_index/1, elem_to_index/2,
app_dir_test/2, split_app_dir/1,
get_item/1, get_items/1, get_selected_items/3,
select_items/3, select_item/2,
+ get_column_width/1,
- safe_keysearch/5, print/4, return_first_error/2, add_warning/2,
+ safe_keysearch/5, print/4, add_warning/3,
create_dir/1, list_dir/1, read_file_info/1,
write_file_info/2, read_file/1, write_file/2,
@@ -126,18 +127,14 @@ prim_parse(Tokens, Acc) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
default_rels() ->
- %%Kernel = #rel_app{name = kernel, incl_apps = []},
- %%Stdlib = #rel_app{name = stdlib, incl_apps = []},
- Sasl = #rel_app{name = sasl, incl_apps = []},
+ %% kernel and stdlib are added automatically in every release
[
#rel{name = ?DEFAULT_REL_NAME,
vsn = "1.0",
rel_apps = []},
- %%rel_apps = [Kernel, Stdlib]},
#rel{name = "start_sasl",
vsn = "1.0",
- rel_apps = [Sasl]}
- %%rel_apps = [Kernel, Sasl, Stdlib]}
+ rel_apps = [#rel_app{name = sasl}]}
].
choose_default(Tag, Profile, InclDefs)
@@ -191,6 +188,16 @@ get_latest_resize(#wx{obj = ObjRef, event = #wxSize{}} = Wx) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+wait_for_stop_motion(ObjRef, {_,_}=Pos) ->
+ receive
+ #wx{obj = ObjRef, event = #wxMouse{type = motion, x=X, y=Y}} ->
+ wait_for_stop_motion(ObjRef, {X,Y})
+ after 100 ->
+ Pos
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
mod_conds() ->
["all (ebin + app file)", "ebin + derived", "app file + derived", "derived", "none"].
@@ -377,6 +384,26 @@ select_item(ListCtrl, [{ItemNo, Text} | Items]) ->
select_item(_ListCtrl, []) ->
ok.
+get_column_width(ListCtrl) ->
+ wx:batch(fun() ->
+ {Total, _} = wxWindow:getClientSize(ListCtrl),
+ Total - scroll_size(ListCtrl)
+ end).
+
+scroll_size(ObjRef) ->
+ case os:type() of
+ {win32, nt} -> 0;
+ {unix, darwin} ->
+ %% I can't figure out is there is a visible scrollbar
+ %% Always make room for it
+ wxSystemSettings:getMetric(?wxSYS_VSCROLL_X);
+ _ ->
+ case wxWindow:hasScrollbar(ObjRef, ?wxVERTICAL) of
+ true -> wxSystemSettings:getMetric(?wxSYS_VSCROLL_X);
+ false -> 0
+ end
+ end.
+
safe_keysearch(Key, Pos, List, Mod, Line) ->
case lists:keysearch(Key, Pos, List) of
false ->
@@ -392,31 +419,13 @@ print(X, X, Format, Args) ->
print(_, _, _, _) ->
ok.
-%% -define(SAFE(M,F,A), safe(M, F, A, ?MODULE, ?LINE)).
-%%
-%% safe(M, F, A, Mod, Line) ->
-%% case catch apply(M, F, A) of
-%% {'EXIT', Reason} ->
-%% io:format("~p(~p): ~p:~p~p -> ~p\n", [Mod, Line, M, F, A, Reason]),
-%% timer:sleep(infinity);
-%% Res ->
-%% Res
-%% end.
-
-return_first_error(Status, NewError) when is_list(NewError) ->
- case Status of
- {ok, _Warnings} ->
- {error, NewError};
- {error, OldError} ->
- {error, OldError}
- end.
-
-add_warning(Status, Warning) ->
- case Status of
- {ok, Warnings} ->
- {ok, [Warning | Warnings]};
- {error, Error} ->
- {error, Error}
+add_warning(Format, Args, {ok,Warnings}) ->
+ Warning = lists:flatten(io_lib:format(Format,Args)),
+ case lists:member(Warning,Warnings) of
+ true ->
+ {ok,Warnings};
+ false ->
+ {ok,[Warning|Warnings]}
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/reltool/test/Makefile b/lib/reltool/test/Makefile
index 767454b66a..d8a7adb837 100644
--- a/lib/reltool/test/Makefile
+++ b/lib/reltool/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
+# Copyright Ericsson AB 2009-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -28,6 +28,7 @@ MODULES= \
reltool_app_SUITE \
reltool_wx_SUITE \
reltool_server_SUITE \
+ reltool_manual_gui_SUITE \
reltool_test_lib
diff --git a/lib/reltool/test/reltool.spec b/lib/reltool/test/reltool.spec
index 2995720105..2501a7a203 100644
--- a/lib/reltool/test/reltool.spec
+++ b/lib/reltool/test/reltool.spec
@@ -1 +1,2 @@
{suites,"../reltool_test",all}.
+{skip_suites,"../reltool_test",[reltool_manual_gui_SUITE],"Manual only"}.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE.erl b/lib/reltool/test/reltool_manual_gui_SUITE.erl
new file mode 100644
index 0000000000..0dcc5cbf15
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE.erl
@@ -0,0 +1,266 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+
+-module(reltool_manual_gui_SUITE).
+
+-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
+ init_per_suite/1, end_per_suite/1,
+ init_per_testcase/2, end_per_testcase/2]).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include("reltool_test_lib.hrl").
+
+%% Initialization functions.
+init_per_suite(Config) ->
+ reltool_test_lib:wx_init_per_suite(Config).
+
+end_per_suite(Config) ->
+ reltool_test_lib:wx_end_per_suite(Config).
+
+init_per_testcase(Func,Config) ->
+ reltool_test_lib:init_per_testcase(Func,Config).
+end_per_testcase(Func,Config) ->
+ reltool_test_lib:end_per_testcase(Func,Config).
+
+%% SUITE specification
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [config, depgraphs].
+
+groups() ->
+ [].
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
+%% The test cases
+
+%% Semi-automatic walkthrough of the GUI
+config(Config) ->
+ DataDir = ?config(data_dir,Config),
+ PrivDir = ?config(priv_dir,Config),
+ {ok, SysPid} = ?msym({ok, _}, reltool:start([])),
+ link(SysPid),
+
+ SimpleConfigFile = create_simple_config(PrivDir),
+ WarningConfigFile = create_warning_config(PrivDir,DataDir),
+
+ break("there are no modules in the 'Included' and 'Excluded' columns, "
+ "and now warnings are displayed",
+ {"load configuration ~p",[SimpleConfigFile]}),
+ break("kernel, stdlib and sasl are included and all other are excluded",
+ "undo"),
+ break("we are back to default - no included and no excluded applications",
+ "undo again"),
+ break("kernel, stdlib and sasl are included and all other are excluded",
+ {"load configuration ~p",
+ [WarningConfigFile]}),
+ break("a warning is displayed in the warning list",
+ "undo"),
+ break("no warning is displayed in the warning list",
+ "load same configuration again"),
+ break("application a is added in the 'Included' column and "
+ "one warning is displayed",
+ "reset configuration"),
+ break("we are back to default - no included and no excluded applications, "
+ "and no warnings",
+ "undo"),
+ break("a, kernel, stdlib and sasl are included and all other are excluded. "
+ "One warning should now exist through the rest of this test case",
+ "double click the warning"),
+ break("a popup window occurs displaying the warning text",
+ "close it with the 'Close' button"),
+ break("it disappears",
+ "open it again"),
+ break("the warning text can be marked, copied and pasted",
+ "close the popup with the close box on the top frame"),
+ break("it disappears",
+ "select application a from 'Included' column and click 'cross'-button "
+ "with to exclude it"),
+ break("application a is moved to 'Excluded' column",
+ "select application tools from 'Excluded' column and click "
+ "'tick'-button to include it"),
+ break("application tools is moved to 'Included' column",
+ "select application runtime_tools from 'Excluded' column and click "
+ "'tick'-button to include it"),
+ break("application runtime_tools is moved to 'Included' column",
+ "undo"),
+
+ ExplicitConfig = filename:join(PrivDir,"explicit.config"),
+ break("application runtime_tools is moved back to 'Excluded' column",
+ {"save configuration as 'explicit' to ~p",[ExplicitConfig]}),
+ ExpectedExplicitConfig =
+ {sys,[{lib_dirs,[filename:join(DataDir,"faulty_app_file")]},
+ {incl_cond,exclude},
+ {app,a,[{incl_cond,exclude}]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,include}]}]},
+ check_config(ExpectedExplicitConfig,ExplicitConfig),
+
+ break("The saved configuration file is checked and is ok.\n"
+ "Now go to the 'Libraries' tab and change the root directory to "
+ "some invalid directory."),
+ break("an error dialog occurs saying that there is no lib dir",
+ {"add library directory ~p",
+ [filename:join(DataDir,"dependencies")]}),
+ break("applications x, y and z are added to the 'Excluded' column in "
+ "'Applications' tab",
+ "go to the 'System settings' tab and set application inclusion policy "
+ "to 'derived'"),
+ break("a is excluded, kernel, stdlib, sasl and tools are included and "
+ "x, y and z are available in the 'Applications' tab",
+ "undo"),
+ break("all non included application are moved to the 'Excluded' column "
+ "and that 'Application inclusion policy' under 'System settings' "
+ "tab is set back to 'exclude'",
+ "undo again"),
+ break("applications x, y and z are in the 'Available' column",
+ "open application x, go to the 'Application settings' tab and set "
+ "'Application inclusion policy' to 'Use application specific config' "
+ "and 'include'. Close the window"),
+ break("application x is moved to the 'Included' column and z and y are moved "
+ "to the 'Derived' column in the system window",
+ "open application y"),
+ break("modules y1, y2 and y3 are in the 'Derived' column",
+ "go to 'Application dependencies' tab"),
+ break("application y is used by x, requires kernel and stdlib, and uses z",
+ "go to 'Module dependencies' tab"),
+ break("y is used by x2 and x3, and uses z1",
+ "got to 'Application settings' tab and select "
+ "'Source selection policy' 'Use selected version'"),
+ break("'Directories' frame becomes enabled (clickable)",
+ "select 'Module inclusion policy' 'Use application specific config' "
+ "and select 'app file + derived'"),
+ break("module y3 is moved to the 'Available' column in the 'Modules' tab",
+ "open module y1"),
+ break("module y1 is used by x2 and uses z1",
+ "go to the 'Code' tab and double click the line with call to z1:f()"),
+ break("new tab is opened with module z1",
+ "find something"),
+ break("it is found",
+ "goto some line"),
+ break("the cursor is moved to that line",
+ "click the 'Back' button"),
+ break("the cursor is moved back to the line of your previous 'find'",
+ "terminate the application window (but keep the module window)."),
+
+ {ok,ServerPid} = reltool:get_server(SysPid),
+ unlink(SysPid),
+ break("the system window is still alive",
+ "terminate reltool by hitting 'Ctrl-q' (linux) or clicking the "
+ "close box on the top fram when system window is active"),
+ false = erlang:is_process_alive(SysPid),
+ false = erlang:is_process_alive(ServerPid),
+
+ break("Check that both module window and system window are terminated"),
+
+ ok.
+
+
+depgraphs(Config) ->
+ PrivDir = ?config(priv_dir,Config),
+ SimpleConfigFile = create_simple_config(PrivDir),
+ {ok, SysPid} = ?msym({ok, _}, reltool:start([{config,SimpleConfigFile}])),
+ link(SysPid),
+
+ break("Open the application dependency graph and \n\n"
+ "*move the complete graph by left clicking somewhere over it and drag\n"
+ "*move one node left clicking the node and drag\n"
+ "*lock node to position by holding down shift while releasing\n"
+ "*select several nodes with ctrl and left mouse button\n"
+ "*lock/unlock selected nodes with suitable buttons\n"
+ "*freeze\n"
+ "*reset\n"
+ "*left slider: push nodes apart\n"
+ "*right slider: pull nodes together\n"
+ "*middle slider: adjust length of links\n"
+ "*select node and delete\n"),
+ break("Open the module dependency graph and meditate over it... "),
+
+ unlink(SysPid),
+ break("Terminate reltool from the file menu in the system window"),
+ false = erlang:is_process_alive(SysPid),
+
+ break("Check that system window and graphs are terminated"),
+
+ ok.
+
+
+
+
+%%%-----------------------------------------------------------------
+%%% Internal functions
+break(CheckStr,DoStr) when is_list(CheckStr), is_list(DoStr) ->
+ Str = io_lib:format("Check that ~s.~n~nThen ~s.",[CheckStr,DoStr]),
+ break(Str);
+break(Check,Do) ->
+ CheckStr =
+ case Check of
+ {CheckFormat,CheckArgs} -> io_lib:format(CheckFormat,CheckArgs);
+ _ -> Check
+ end,
+ DoStr =
+ case Do of
+ {DoFormat,DoArgs} -> io_lib:format(DoFormat,DoArgs);
+ _ -> Do
+ end,
+ break(CheckStr,DoStr).
+
+break(Str) ->
+ Count =
+ case get(count) of
+ undefined -> 1;
+ C -> C
+ end,
+ put(count,Count+1),
+ test_server:break("Step " ++ integer_to_list(Count) ++ ":\n" ++ Str).
+
+check_config(Expected,File) ->
+ {ok,[Config]} = file:consult(File),
+ ?m(Expected,Config).
+
+create_simple_config(PrivDir) ->
+ SimpleConfigFile = filename:join(PrivDir,"simple.config"),
+ SimpleConfig = {sys,[{incl_cond,exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]}]},
+ ok=file:write_file(SimpleConfigFile,io_lib:format("~p.~n",[SimpleConfig])),
+ SimpleConfigFile.
+
+create_warning_config(PrivDir,DataDir) ->
+ WarningConfigFile = filename:join(PrivDir,"warning.config"),
+ FaultyAppFileDir = filename:join(DataDir,"faulty_app_file"),
+ WarningConfig = {sys,[{lib_dirs,[FaultyAppFileDir]},
+ {incl_cond,exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,a,[{incl_cond,include}]}
+ ]},
+ ok=file:write_file(WarningConfigFile,io_lib:format("~p.~n",[WarningConfig])),
+ WarningConfigFile.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/Makefile.src b/lib/reltool/test/reltool_manual_gui_SUITE_data/Makefile.src
new file mode 100644
index 0000000000..9a340274ad
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/Makefile.src
@@ -0,0 +1,28 @@
+EFLAGS=+debug_info
+
+DEPENDENCIES= \
+ dependencies/x-1.0/ebin/x1.@EMULATOR@ \
+ dependencies/x-1.0/ebin/x2.@EMULATOR@ \
+ dependencies/x-1.0/ebin/x3.@EMULATOR@ \
+ dependencies/y-1.0/ebin/y1.@EMULATOR@ \
+ dependencies/y-1.0/ebin/y2.@EMULATOR@ \
+ dependencies/y-1.0/ebin/y3.@EMULATOR@ \
+ dependencies/z-1.0/ebin/z1.@EMULATOR@
+
+
+all: $(DEPENDENCIES)
+
+dependencies/x-1.0/ebin/x1.@EMULATOR@: dependencies/x-1.0/src/x1.erl
+ erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x1.erl
+dependencies/x-1.0/ebin/x2.@EMULATOR@: dependencies/x-1.0/src/x2.erl
+ erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x2.erl
+dependencies/x-1.0/ebin/x3.@EMULATOR@: dependencies/x-1.0/src/x3.erl
+ erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x3.erl
+dependencies/y-1.0/ebin/y1.@EMULATOR@: dependencies/y-1.0/src/y1.erl
+ erlc $(EFLAGS) -odependencies/y-1.0/ebin dependencies/y-1.0/src/y1.erl
+dependencies/y-1.0/ebin/y2.@EMULATOR@: dependencies/y-1.0/src/y2.erl
+ erlc $(EFLAGS) -odependencies/y-1.0/ebin dependencies/y-1.0/src/y2.erl
+dependencies/y-1.0/ebin/y3.@EMULATOR@: dependencies/y-1.0/src/y3.erl
+ erlc $(EFLAGS) -odependencies/y-1.0/ebin dependencies/y-1.0/src/y3.erl
+dependencies/z-1.0/ebin/z1.@EMULATOR@: dependencies/z-1.0/src/z1.erl
+ erlc $(EFLAGS) -odependencies/z-1.0/ebin dependencies/z-1.0/src/z1.erl
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/ebin/x.app b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/ebin/x.app
new file mode 100644
index 0000000000..ccaab8a8c7
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/ebin/x.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, x,
+ [{description, "Main application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [x1,x2,x3]},
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x1.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x1.erl
new file mode 100644
index 0000000000..bf1e7f9279
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x1.erl
@@ -0,0 +1,5 @@
+-module(x1).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x2.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x2.erl
new file mode 100644
index 0000000000..82191ba278
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x2.erl
@@ -0,0 +1,5 @@
+-module(x2).
+-compile(export_all).
+
+f() ->
+ y1:f().
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x3.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x3.erl
new file mode 100644
index 0000000000..618c75c9a7
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x3.erl
@@ -0,0 +1,5 @@
+-module(x3).
+-compile(export_all).
+
+f() ->
+ y2:f().
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/ebin/y.app b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/ebin/y.app
new file mode 100644
index 0000000000..4f9b610b69
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/ebin/y.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, y,
+ [{description, "Library application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [y1,y2]}, % y3 is skipped on purpose - to test module inclusion policy
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y1.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y1.erl
new file mode 100644
index 0000000000..dd21b33292
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y1.erl
@@ -0,0 +1,5 @@
+-module(y1).
+-compile(export_all).
+
+f() ->
+ z1:f().
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y2.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y2.erl
new file mode 100644
index 0000000000..bf8ddf6080
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y2.erl
@@ -0,0 +1,5 @@
+-module(y2).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y3.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y3.erl
new file mode 100644
index 0000000000..915d64d5b9
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y3.erl
@@ -0,0 +1,5 @@
+-module(y3).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/ebin/z.app b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/ebin/z.app
new file mode 100644
index 0000000000..437a0968e9
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/ebin/z.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, z,
+ [{description, "Library application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [z1]},
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/src/z1.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/src/z1.erl
new file mode 100644
index 0000000000..97ef90b87f
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/src/z1.erl
@@ -0,0 +1,5 @@
+-module(z1).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/ebin/a.app b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/ebin/a.app
new file mode 100644
index 0000000000..ea77103598
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/ebin/a.app
@@ -0,0 +1 @@
+faulty app file
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a.erl
new file mode 100644
index 0000000000..bb500bed69
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a.erl
@@ -0,0 +1,49 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+%% $Id$
+%%
+-module(a).
+
+
+-behaviour(gen_server).
+
+-vsn(1).
+
+%% External exports
+-export([start_link/0, a/0]).
+%% Internal exports
+-export([init/1, handle_call/3, handle_info/2, terminate/2]).
+
+start_link() -> gen_server:start_link({local, aa}, a, [], []).
+
+a() -> gen_server:call(aa, a).
+
+%%-----------------------------------------------------------------
+%% Callback functions from gen_server
+%%-----------------------------------------------------------------
+init([]) ->
+ process_flag(trap_exit, true),
+ {ok, state}.
+
+handle_call(a, _From, State) ->
+ X = application:get_all_env(a),
+ {reply, X, State}.
+
+handle_info(_, State) ->
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl
new file mode 100644
index 0000000000..a141c1767b
--- /dev/null
+++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl
@@ -0,0 +1,37 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+%% $Id$
+%%
+-module(a_sup).
+
+
+-behaviour(supervisor).
+
+%% External exports
+-export([start/2]).
+
+%% Internal exports
+-export([init/1]).
+
+start(_, _) ->
+ supervisor:start_link({local, a_sup}, a_sup, []).
+
+init([]) ->
+ SupFlags = {one_for_one, 4, 3600},
+ Config = {a,
+ {a, start_link, []},
+ permanent, 2000, worker, [a]},
+ {ok, {SupFlags, [Config]}}.
diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl
index 9ed79e8c95..4e24a2fb55 100644
--- a/lib/reltool/test/reltool_server_SUITE.erl
+++ b/lib/reltool/test/reltool_server_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,6 +24,7 @@
-compile(export_all).
+-include_lib("reltool/src/reltool.hrl").
-include("reltool_test_lib.hrl").
-include_lib("common_test/include/ct.hrl").
@@ -51,10 +52,43 @@ end_per_testcase(Func,Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [start_server, set_config, create_release,
- create_script, create_target, create_embedded,
- create_standalone, create_old_target,
- otp_9135, otp_9229_exclude_app, otp_9229_exclude_mod].
+ [start_server,
+ set_config,
+ get_config,
+ create_release,
+ create_release_sort,
+ create_script,
+ create_script_sort,
+ create_target,
+ create_embedded,
+ create_standalone,
+ create_standalone_beam,
+ create_standalone_app,
+ create_standalone_app_clash,
+ create_multiple_standalone,
+ create_old_target,
+ eval_target_spec,
+ otp_9135,
+ otp_9229_dupl_mod_exclude_app,
+ otp_9229_dupl_mod_exclude_mod,
+ dupl_mod_in_app_file,
+ get_apps,
+ get_mod,
+ get_sys,
+ set_app_and_undo,
+ set_apps_and_undo,
+ set_apps_inlined,
+ set_sys_and_undo,
+ load_config_and_undo,
+ load_config_fail,
+ load_config_escript_path,
+ load_config_same_escript_source,
+ load_config_same_escript_beam,
+ load_config_add_escript,
+ reset_config_and_undo,
+ gen_rel_files,
+ save_config,
+ dependencies].
groups() ->
[].
@@ -71,8 +105,6 @@ end_per_group(_GroupName, Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Start a server process and check that it does not crash
-start_server(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
start_server(_Config) ->
{ok, Pid} = ?msym({ok, _}, reltool:start_server([])),
Libs = lists:sort(erl_libs()),
@@ -88,8 +120,6 @@ start_server(_Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Start a server process and check that it does not crash
-set_config(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
set_config(_Config) ->
Libs = lists:sort(erl_libs()),
Default =
@@ -112,10 +142,90 @@ set_config(_Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Check that get_config returns the expected derivates and defaults
+%% as specified
+get_config(_Config) ->
+
+ KVsn = latest(kernel),
+ StdVsn = latest(stdlib),
+ SaslVsn = latest(sasl),
+
+ Sys = {sys,[{incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include},{vsn,SaslVsn}]},
+ {app,stdlib,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+ ?m({ok, Sys}, reltool:get_config(Pid)),
+ ?m({ok, Sys}, reltool:get_config(Pid,false,false)),
+
+ %% Include derived info
+ ?msym({ok,{sys,[{incl_cond, exclude},
+ {erts,[]},
+ {app,kernel,[{incl_cond,include},{mod,_,[]}|_]},
+ {app,sasl,[{incl_cond,include},{vsn,SaslVsn},{mod,_,[]}|_]},
+ {app,stdlib,[{incl_cond,include},{mod,_,[]}|_]}]}},
+ reltool:get_config(Pid,false,true)),
+
+ %% Include defaults
+ ?msym({ok,{sys,[{root_dir,_},
+ {lib_dirs,_},
+ {mod_cond,all},
+ {incl_cond,exclude},
+ {app,kernel,[{incl_cond,include},{vsn,undefined}]},
+ {app,sasl,[{incl_cond,include},{vsn,SaslVsn}]},
+ {app,stdlib,[{incl_cond,include},{vsn,undefined}]},
+ {boot_rel,"start_clean"},
+ {rel,"start_clean","1.0",[]},
+ {rel,"start_sasl","1.0",[sasl]},
+ {emu_name,"beam"},
+ {relocatable,true},
+ {profile,development},
+ {incl_sys_filters,[".*"]},
+ {excl_sys_filters,[]},
+ {incl_app_filters,[".*"]},
+ {excl_app_filters,[]},
+ {incl_archive_filters,[".*"]},
+ {excl_archive_filters,["^include$","^priv$"]},
+ {archive_opts,[]},
+ {rel_app_type,permanent},
+ {app_file,keep},
+ {debug_info,keep}]}},
+ reltool:get_config(Pid,true,false)),
+
+ %% Include both defaults and derived info
+ ?msym({ok,{sys,[{root_dir,_},
+ {lib_dirs,_},
+ {mod_cond,all},
+ {incl_cond,exclude},
+ {erts,[]},
+ {app,kernel,[{incl_cond,include},{vsn,KVsn},{mod,_,[]}|_]},
+ {app,sasl,[{incl_cond,include},{vsn,SaslVsn},{mod,_,[]}|_]},
+ {app,stdlib,[{incl_cond,include},{vsn,StdVsn},{mod,_,[]}|_]},
+ {boot_rel,"start_clean"},
+ {rel,"start_clean","1.0",[]},
+ {rel,"start_sasl","1.0",[sasl]},
+ {emu_name,"beam"},
+ {relocatable,true},
+ {profile,development},
+ {incl_sys_filters,[".*"]},
+ {excl_sys_filters,[]},
+ {incl_app_filters,[".*"]},
+ {excl_app_filters,[]},
+ {incl_archive_filters,[".*"]},
+ {excl_archive_filters,["^include$","^priv$"]},
+ {archive_opts,[]},
+ {rel_app_type,permanent},
+ {app_file,keep},
+ {debug_info,keep}]}},
+ reltool:get_config(Pid,true,true)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% OTP-9135, test that app_file option can be set to all | keep | strip
-otp_9135(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
otp_9135(_Config) ->
Libs = lists:sort(erl_libs()),
StrippedDefaultSys =
@@ -145,8 +255,6 @@ otp_9135(_Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Generate releases
-create_release(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
create_release(_Config) ->
%% Configure the server
RelName = "Just testing...",
@@ -170,10 +278,135 @@ create_release(_Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate releases and make sure order of applications specified in
+%% 'rel' parameter is preserved and that included applications are
+%% started before the including application.
+%% Circular dependencies shall also be detected and cause error.
+
+create_release_sort(_Config) -> {skip, "Two bugs related to sorting"};
+create_release_sort(Config) ->
+ DataDir = ?config(data_dir,Config),
+ %% Configure the server
+ RelName1 = "MnesiaFirst",
+ RelName2 = "SaslFirst",
+ RelName3 = "Include-both",
+ RelName4 = "Include-only-app",
+ RelName5 = "Include-only-rel",
+ RelName6 = "Include-missing-app",
+ RelName7 = "Circular",
+ RelName8 = "Include-both-missing-app",
+ RelName9 = "Include-overwrite",
+ RelName10= "Uses-order-as-rel",
+ RelVsn = "1.0",
+ %% Application z (.app file):
+ %% includes [tools, mnesia]
+ %% uses [kernel, stdlib, sasl, inets]
+ Sys =
+ {sys,
+ [
+ {lib_dirs, [filename:join(DataDir,"sort_apps")]},
+ {boot_rel, RelName1},
+ {rel, RelName1, RelVsn, [stdlib, kernel, mnesia, sasl]},
+ {rel, RelName2, RelVsn, [stdlib, kernel, sasl, mnesia]},
+ {rel, RelName3, RelVsn, [stdlib, kernel, {z,[tools]}, tools, mnesia]},
+ {rel, RelName4, RelVsn, [stdlib, kernel, z, mnesia, tools]},
+ {rel, RelName5, RelVsn, [stdlib, kernel, {sasl,[tools]}]},
+ {rel, RelName6, RelVsn, [stdlib, kernel, z]},
+ {rel, RelName7, RelVsn, [stdlib, kernel, mnesia, y, sasl, x]},
+ {rel, RelName8, RelVsn, [stdlib, kernel, {z,[tools]}]},
+ {rel, RelName9, RelVsn, [stdlib, kernel, {z,[]}]},
+ {rel, RelName10, RelVsn, [stdlib, kernel, {z,[]}, inets, sasl]},
+ {incl_cond,exclude},
+ {mod_cond,app},
+ {app,kernel,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,mnesia,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,inets,[{incl_cond,include}]},
+ {app,x,[{incl_cond,include}]},
+ {app,y,[{incl_cond,include}]},
+ {app,z,[{incl_cond,include}]},
+ {app,tools,[{mod_cond,app},{incl_cond,include}]}
+ ]},
+ %% Generate release
+
+ ?msym({ok, {release, {RelName1, RelVsn},
+ {erts, _},
+ [{kernel, _},
+ {stdlib, _},
+ {mnesia, _},
+ {sasl, _}]}},
+ reltool:get_rel([{config, Sys}], RelName1)),
+
+ ?msym({ok, {release, {RelName2, RelVsn},
+ {erts, _},
+ [{kernel, _},
+ {stdlib, _},
+ {sasl, _},
+ {mnesia, _}]}},
+ reltool:get_rel([{config, Sys}], RelName2)),
+
+ ?msym({ok, {release, {RelName3, RelVsn},
+ {erts, _},
+ [{kernel, _},
+ {stdlib, _},
+ {sasl, _},
+ {inets, _},
+ {tools, _},
+ {z, _, [tools]},
+ {mnesia, _}]}},
+ reltool:get_rel([{config, Sys}], RelName3)),
+
+ %%! BUG: same as OTP-4121, but for reltool???? Or revert tools and mnesia
+ ?msym({ok, {release, {RelName4, RelVsn},
+ {erts, _},
+ [{kernel, _},
+ {stdlib, _},
+ {sasl, _},
+ {inets, _},
+ {mnesia, _},
+ {tools, _},
+ {z, _}]}},
+ reltool:get_rel([{config, Sys}], RelName4)),
+
+ ?m({error,"sasl: These applications are used by release "
+ "Include-only-rel but are missing as included_applications "
+ "in the app file: [tools]"},
+ reltool:get_rel([{config, Sys}], RelName5)),
+
+ ?m({error, "Undefined applications: [tools,mnesia]"},
+ reltool:get_rel([{config, Sys}], RelName6)),
+
+ ?m({error,"Circular dependencies: [x,y]"},
+ reltool:get_rel([{config, Sys}], RelName7)),
+
+ ?m({error,"Undefined applications: [tools]"},
+ reltool:get_rel([{config, Sys}], RelName8)),
+
+ ?msym({ok,{release,{RelName9,RelVsn},
+ {erts,_},
+ [{kernel,_},
+ {stdlib,_},
+ {sasl, _},
+ {inets, _},
+ {z,_,[]}]}},
+ reltool:get_rel([{config, Sys}], RelName9)),
+
+ %%! BUG: same as OTP-9984, but for reltool???? Or revert inets and sasl?
+ ?msym({ok,{release,{RelName10,RelVsn},
+ {erts,_},
+ [{kernel,_},
+ {stdlib,_},
+ {inets, _},
+ {sasl, _},
+ {z,_,[]}]}},
+ reltool:get_rel([{config, Sys}], RelName10)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Generate boot scripts
-create_script(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
create_script(_Config) ->
%% Configure the server
RelName = "Just testing",
@@ -218,10 +451,197 @@ create_script(_Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test creation of .script with different sorting of applications and
+%% included applications.
+%% Test that result is equal to what systools produces
+create_script_sort(Config) ->
+ DataDir = ?config(data_dir,Config),
+ %% Configure the server
+ RelName1 = "MnesiaFirst",
+ RelName2 = "SaslFirst",
+ RelName3 = "Include-both",
+ RelName4 = "Include-only-app",
+ RelName5 = "Include-only-rel",
+ RelName6 = "Include-missing-app",
+ RelName7 = "Circular",
+ RelName8 = "Include-both-missing-app",
+ RelName9 = "Include-overwrite",
+ RelVsn = "1.0",
+ LibDir = filename:join(DataDir,"sort_apps"),
+ Sys =
+ {sys,
+ [
+ {lib_dirs, [LibDir]},
+ {boot_rel, RelName1},
+ {rel, RelName1, RelVsn, [stdlib, kernel, mnesia, sasl]},
+ {rel, RelName2, RelVsn, [stdlib, kernel, sasl, mnesia]},
+ {rel, RelName3, RelVsn, [stdlib, kernel, {z,[tools]}, tools, mnesia]},
+ {rel, RelName4, RelVsn, [stdlib, kernel, z, mnesia, tools]},
+ {rel, RelName5, RelVsn, [stdlib, kernel, {sasl,[tools]}]},
+ {rel, RelName6, RelVsn, [stdlib, kernel, z]},
+ {rel, RelName7, RelVsn, [stdlib, kernel, mnesia, y, sasl, x]},
+ {rel, RelName8, RelVsn, [stdlib, kernel, {z,[tools]}]},
+ {rel, RelName9, RelVsn, [stdlib, kernel, {z,[]}]},
+ {incl_cond,exclude},
+ {mod_cond,app},
+ {app,kernel,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,mnesia,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,inets,[{incl_cond,include}]},
+ {app,x,[{incl_cond,include}]},
+ {app,y,[{incl_cond,include}]},
+ {app,z,[{incl_cond,include}]},
+ {app,tools,[{mod_cond,app},{incl_cond,include}]}
+ ]},
+
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+
+ %% Generate release files
+ application:load(sasl),
+ application:load(inets),
+ application:load(mnesia),
+ application:load(tools),
+ {ok,KernelVsn} = application:get_key(kernel,vsn),
+ {ok,StdlibVsn} = application:get_key(stdlib,vsn),
+ {ok,SaslVsn} = application:get_key(sasl,vsn),
+ {ok,InetsVsn} = application:get_key(inets,vsn),
+ {ok,MnesiaVsn} = application:get_key(mnesia,vsn),
+ {ok,ToolsVsn} = application:get_key(tools,vsn),
+ ErtsVsn = erlang:system_info(version),
+
+ Rel1 = {release, {RelName1,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {mnesia,MnesiaVsn},
+ {sasl,SaslVsn}]},
+ FullName1 = filename:join(?WORK_DIR,RelName1),
+ ?m(ok, file:write_file(FullName1 ++ ".rel", io_lib:format("~p.\n", [Rel1]))),
+ Rel2 = {release, {RelName2,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {sasl,SaslVsn},
+ {mnesia,MnesiaVsn}]},
+ FullName2 = filename:join(?WORK_DIR,RelName2),
+ ?m(ok, file:write_file(FullName2 ++ ".rel", io_lib:format("~p.\n", [Rel2]))),
+ Rel3 = {release, {RelName3,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {z,"1.0",[tools]},
+ {tools,ToolsVsn},
+ {mnesia,MnesiaVsn},
+ {sasl,SaslVsn},
+ {inets,InetsVsn}]},
+ FullName3 = filename:join(?WORK_DIR,RelName3),
+ ?m(ok, file:write_file(FullName3 ++ ".rel", io_lib:format("~p.\n", [Rel3]))),
+ Rel4 = {release, {RelName4,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {z,"1.0"},
+ {tools,ToolsVsn},
+ {mnesia,MnesiaVsn},
+ {sasl,SaslVsn},
+ {inets,InetsVsn}]},
+ FullName4 = filename:join(?WORK_DIR,RelName4),
+ ?m(ok, file:write_file(FullName4 ++ ".rel", io_lib:format("~p.\n", [Rel4]))),
+ Rel5 = {release, {RelName5,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {sasl,SaslVsn,[tools]},
+ {tools,ToolsVsn}]},
+ FullName5 = filename:join(?WORK_DIR,RelName5),
+ ?m(ok, file:write_file(FullName5 ++ ".rel", io_lib:format("~p.\n", [Rel5]))),
+ Rel6 = {release, {RelName6,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {z,"1.0"}]},
+ FullName6 = filename:join(?WORK_DIR,RelName6),
+ ?m(ok, file:write_file(FullName6 ++ ".rel", io_lib:format("~p.\n", [Rel6]))),
+ Rel7 = {release, {RelName7,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {mnesia,MnesiaVsn},
+ {y,"1.0"},
+ {sasl,SaslVsn},
+ {x,"1.0"}]},
+ FullName7 = filename:join(?WORK_DIR,RelName7),
+ ?m(ok, file:write_file(FullName7 ++ ".rel", io_lib:format("~p.\n", [Rel7]))),
+ Rel8 = {release, {RelName8,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {z,"1.0",[tools]}]},
+ FullName8 = filename:join(?WORK_DIR,RelName8),
+ ?m(ok, file:write_file(FullName8 ++ ".rel", io_lib:format("~p.\n", [Rel8]))),
+ Rel9 = {release, {RelName9,RelVsn}, {erts,ErtsVsn},
+ [{kernel,KernelVsn},
+ {stdlib,StdlibVsn},
+ {z,"1.0",[]},
+ {sasl,SaslVsn},
+ {inets,InetsVsn}]},
+ FullName9 = filename:join(?WORK_DIR,RelName9),
+ ?m(ok, file:write_file(FullName9 ++ ".rel", io_lib:format("~p.\n", [Rel9]))),
+
+ %% Generate script files with systools and reltool and compare
+ ZPath = filename:join([LibDir,"*",ebin]),
+
+ ?msym({ok,_,_}, systools_make_script(FullName1,ZPath)),
+ {ok, [SystoolsScript1]} = ?msym({ok,[_]}, file:consult(FullName1++".script")),
+ {ok, Script1} = ?msym({ok, _}, reltool:get_script(Pid, RelName1)),
+ ?m(equal, diff_script(SystoolsScript1, Script1)),
+
+ ?msym({ok,_,_}, systools_make_script(FullName2,ZPath)),
+ {ok, [SystoolsScript2]} = ?msym({ok,[_]}, file:consult(FullName2++".script")),
+ {ok, Script2} = ?msym({ok, _}, reltool:get_script(Pid, RelName2)),
+ ?m(equal, diff_script(SystoolsScript2, Script2)),
+
+ ?msym({ok,_,_}, systools_make_script(FullName3,ZPath)),
+ {ok, [SystoolsScript3]} = ?msym({ok,[_]}, file:consult(FullName3++".script")),
+ {ok, Script3} = ?msym({ok, _}, reltool:get_script(Pid, RelName3)),
+ ?m(equal, diff_script(SystoolsScript3, Script3)),
+
+ ?msym({ok,_,_}, systools_make_script(FullName4,ZPath)),
+ {ok, [SystoolsScript4]} = ?msym({ok,[_]}, file:consult(FullName4++".script")),
+ {ok, Script4} = ?msym({ok, _}, reltool:get_script(Pid, RelName4)),
+ ?m(equal, diff_script(SystoolsScript4, Script4)),
+
+ ?msym({error,_,[{error_reading,{sasl,{override_include,_}}}]},
+ systools_make_script(FullName5,ZPath)),
+ ?m({error,"sasl: These applications are used by release "
+ "Include-only-rel but are missing as included_applications "
+ "in the app file: [tools]"},
+ reltool:get_script(Pid, RelName5)),
+
+ ?msym({error,_,{undefined_applications,_}},
+ systools_make_script(FullName6,ZPath)),
+ ?m({error, "Undefined applications: [tools,mnesia]"},
+ reltool:get_script(Pid, RelName6)),
+
+ ?msym({error,_,{circular_dependencies,_}},
+ systools_make_script(FullName7,ZPath)),
+ ?m({error,"Circular dependencies: [x,y]"},
+ reltool:get_script(Pid, RelName7)),
+
+ ?msym({error,_,{undefined_applications,_}},
+ systools_make_script(FullName8,ZPath)),
+ ?m({error, "Undefined applications: [tools]"},
+ reltool:get_script(Pid, RelName8)),
+
+ ?msym({ok,_,_}, systools_make_script(FullName9,ZPath)),
+ {ok, [SystoolsScript9]} = ?msym({ok,[_]}, file:consult(FullName9++".script")),
+ {ok, Script9} = ?msym({ok, _}, reltool:get_script(Pid, RelName9)),
+ ?m(equal, diff_script(SystoolsScript9, Script9)),
+
+ %% Stop server
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+systools_make_script(Name,Path) ->
+ systools:make_script(Name,[{path,[Path]},{outdir,?WORK_DIR},silent]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Generate target system
-create_target(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
create_target(_Config) ->
%% Configure the server
RelName1 = "Just testing",
@@ -243,7 +663,7 @@ create_target(_Config) ->
?m(ok, reltool_utils:recursive_delete(TargetDir)),
?m(ok, file:make_dir(TargetDir)),
?log("SPEC: ~p\n", [reltool:get_target_spec([{config, Config}])]),
- ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+ ok = ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
Erl = filename:join([TargetDir, "bin", "erl"]),
{ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
@@ -254,8 +674,6 @@ create_target(_Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Generate embedded target system
-create_embedded(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
create_embedded(_Config) ->
%% Configure the server
RelName1 = "Just testing",
@@ -276,7 +694,7 @@ create_embedded(_Config) ->
TargetDir = filename:join([?WORK_DIR, "target_embedded"]),
?m(ok, reltool_utils:recursive_delete(TargetDir)),
?m(ok, file:make_dir(TargetDir)),
- ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+ ok = ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
Erl = filename:join([TargetDir, "bin", "erl"]),
{ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
@@ -287,8 +705,6 @@ create_embedded(_Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Generate standalone system
-create_standalone(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
create_standalone(_Config) ->
%% Configure the server
ExDir = code:lib_dir(reltool, examples),
@@ -306,30 +722,223 @@ create_standalone(_Config) ->
TargetDir = filename:join([?WORK_DIR, "target_standalone"]),
?m(ok, reltool_utils:recursive_delete(TargetDir)),
?m(ok, file:make_dir(TargetDir)),
- ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+ ok = ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+ %% Start the target system and fetch root dir
BinDir = filename:join([TargetDir, "bin"]),
Erl = filename:join([BinDir, "erl"]),
{ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
RootDir = ?ignore(rpc:call(Node, code, root_dir, [])),
?msym(ok, stop_node(Node)),
+ %% Execute escript
Expected = iolist_to_binary(["Root dir: ", RootDir, "\n"
"Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
"Smp: false\n",
"ExitCode:0"]),
io:format("Expected: ~s\n", [Expected]),
- ?m(Expected, run(BinDir, EscriptName ++ " -arg1 arg2 arg3")),
+ ?m(Expected, run(BinDir, EscriptName, "-arg1 arg2 arg3")),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate standalone system with inlined beam file
+
+create_standalone_beam(Config) ->
+ %% Read beam file
+ DataDir = ?config(data_dir,Config),
+ BeamFile = filename:join([DataDir,escript,"someapp-1.0",ebin,"mymod.beam"]),
+ {ok,BeamBin} = file:read_file(BeamFile),
+
+ %% Create the escript
+ EscriptName = "mymod.escript",
+ Escript = filename:join(?WORK_DIR,EscriptName),
+ ok = escript:create(Escript,[shebang,{beam,BeamBin}]),
+ ok = file:change_mode(Escript,8#00744),
+
+ %% Configure the server
+ Sys =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ %% Generate target file
+ TargetDir = filename:join([?WORK_DIR, "target_standalone_beam"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ok = ?m(ok, reltool:create_target([{config, Sys}], TargetDir)),
+
+ %% Start the target system and fetch root dir
+ BinDir = filename:join([TargetDir, "bin"]),
+ Erl = filename:join([BinDir, "erl"]),
+ {ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
+ RootDir = ?ignore(rpc:call(Node, code, root_dir, [])),
+ ?msym(ok, stop_node(Node)),
+
+ %% Execute escript
+ Expected = iolist_to_binary(["Root dir: ", RootDir, "\n"
+ "Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
+ "ExitCode:0"]),
+ io:format("Expected: ~s\n", [Expected]),
+ ?m(Expected, run(BinDir, EscriptName, "-arg1 arg2 arg3")),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate standalone system with inlined archived application
+
+create_standalone_app(Config) ->
+ %% Create archive
+ DataDir = ?config(data_dir,Config),
+ EscriptDir = filename:join(DataDir,escript),
+ {ok,{_Archive,Bin}} = zip:create("someapp-1.0.ez",["someapp-1.0"],
+ [memory,
+ {cwd,EscriptDir},
+ {compress,all},
+ {uncompress,[".beam",".app"]}]),
+
+ %% Create the escript
+ EscriptName = "someapp.escript",
+ Escript = filename:join(?WORK_DIR,EscriptName),
+ ok = escript:create(Escript,[shebang,
+ {emu_args,"-escript main mymod"},
+ {archive,Bin}]),
+ ok = file:change_mode(Escript,8#00744),
+
+ %% Configure the server
+ Sys =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ %% Generate target file
+ TargetDir = filename:join([?WORK_DIR, "target_standalone_app"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ok = ?m(ok, reltool:create_target([{config, Sys}], TargetDir)),
+
+ %% Start the target system and fetch root dir
+ BinDir = filename:join([TargetDir, "bin"]),
+ Erl = filename:join([BinDir, "erl"]),
+ {ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
+ RootDir = ?ignore(rpc:call(Node, code, root_dir, [])),
+ ?msym(ok, stop_node(Node)),
+
+ %% Execute escript
+ Expected = iolist_to_binary(["Root dir: ", RootDir, "\n"
+ "Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
+ "ExitCode:0"]),
+ io:format("Expected: ~s\n", [Expected]),
+ ?m(Expected, run(BinDir, EscriptName, "-arg1 arg2 arg3")),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate standalone system with inlined archived application
+%% Check that the inlined app can not be explicitly configured
+
+create_standalone_app_clash(Config) ->
+ %% Create archive
+ DataDir = ?config(data_dir,Config),
+ EscriptDir = filename:join(DataDir,escript),
+ {ok,{_Archive,Bin}} = zip:create("someapp-1.0.ez",["someapp-1.0"],
+ [memory,
+ {cwd,EscriptDir},
+ {compress,all},
+ {uncompress,[".beam",".app"]}]),
+
+ %% Create the escript
+ EscriptName = "someapp.escript",
+ Escript = filename:join(?WORK_DIR,EscriptName),
+ ok = escript:create(Escript,[shebang,
+ {emu_args,"-escript main mymod"},
+ {archive,Bin}]),
+ ok = file:change_mode(Escript,8#00744),
+
+ %% Configure the server
+ Sys =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript, [{incl_cond, include}]},
+ {profile, standalone},
+ {app, someapp, [{incl_cond,include}]}
+ ]},
+
+ ?msym({error,"someapp: Application name clash. Escript "++_},
+ reltool:start_server([{config,Sys}])),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate standalone system with multiple escripts
+
+create_multiple_standalone(Config) ->
+ %% First escript
+ ExDir = code:lib_dir(reltool, examples),
+ EscriptName1 = "display_args",
+ Escript1 = filename:join([ExDir, EscriptName1]),
+
+ %% Second escript
+ DataDir = ?config(data_dir,Config),
+ BeamFile = filename:join([DataDir,escript,"someapp-1.0",ebin,"mymod.beam"]),
+ {ok,BeamBin} = file:read_file(BeamFile),
+ EscriptName2 = "mymod.escript",
+ Escript2 = filename:join(?WORK_DIR,EscriptName2),
+ ok = escript:create(Escript2,[shebang,{beam,BeamBin}]),
+ ok = file:change_mode(Escript2,8#00744),
+
+ %% Configure server
+ Sys =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript1, [{incl_cond, include}]},
+ {escript, Escript2, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ %% Generate target system
+ TargetDir = filename:join([?WORK_DIR, "target_multiple_standalone"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ok = ?m(ok, reltool:create_target([{config,Sys}], TargetDir)),
+
+ %% Start the target system and fetch root dir
+ BinDir = filename:join([TargetDir, "bin"]),
+ Erl = filename:join([BinDir, "erl"]),
+ {ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
+ RootDir = ?ignore(rpc:call(Node, code, root_dir, [])),
+ ?msym(ok, stop_node(Node)),
+
+ %% Execute escript1
+ Expected1 = iolist_to_binary(["Root dir: ", RootDir, "\n"
+ "Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
+ "Smp: false\n",
+ "ExitCode:0"]),
+ io:format("Expected1: ~s\n", [Expected1]),
+ ?m(Expected1, run(BinDir, EscriptName1, "-arg1 arg2 arg3")),
+
+
+ %% Execute escript2
+ Expected2 = iolist_to_binary(["Root dir: ", RootDir, "\n"
+ "Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
+ "ExitCode:0"]),
+ io:format("Expected2: ~s\n", [Expected2]),
+ ?m(Expected2, run(BinDir, EscriptName2, "-arg1 arg2 arg3")),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Generate old type of target system
-create_old_target(TestInfo) when is_atom(TestInfo) ->
- reltool_test_lib:tc_info(TestInfo);
+create_old_target(_Config) -> {skip, "Old style of target"};
create_old_target(_Config) ->
- ?skip("Old style of target", []),
%% Configure the server
RelName1 = "Just testing",
@@ -350,10 +959,10 @@ create_old_target(_Config) ->
TargetDir = filename:join([?WORK_DIR, "target_old_style"]),
?m(ok, reltool_utils:recursive_delete(TargetDir)),
?m(ok, file:make_dir(TargetDir)),
- ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
+ ok = ?m(ok, reltool:create_target([{config, Config}], TargetDir)),
%% io:format("Will fail on Windows (should patch erl.ini)\n", []),
- ?m(ok, reltool:install(RelName2, TargetDir)),
+ ok = ?m(ok, reltool:install(RelName2, TargetDir)),
Erl = filename:join([TargetDir, "bin", "erl"]),
{ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
@@ -362,11 +971,43 @@ create_old_target(_Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Generate target system with eval_target_spec/3
+
+eval_target_spec(_Config) ->
+ %% Configure the server
+ RelName1 = "Just testing",
+ RelName2 = "Just testing with SASL",
+ RelVsn = "1.0",
+ Config =
+ {sys,
+ [
+ {root_dir, code:root_dir()},
+ {lib_dirs, []},
+ {boot_rel, RelName2},
+ {rel, RelName1, RelVsn, [stdlib, kernel]},
+ {rel, RelName2, RelVsn, [sasl, stdlib, kernel]},
+ {app, sasl, [{incl_cond, include}]}
+ ]},
+
+ %% Generate target file
+ TargetDir = filename:join([?WORK_DIR, "eval_target_spec"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ {ok, Spec} = ?msym({ok,_}, reltool:get_target_spec([{config, Config}])),
+ ok = ?m(ok, reltool:eval_target_spec(Spec, code:root_dir(), TargetDir)),
+
+ Erl = filename:join([TargetDir, "bin", "erl"]),
+ {ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
+ ?msym(ok, stop_node(Node)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% OTP-9229 - handle duplicated module names, i.e. same module name
%% exists in two applications.
%% Include on app, exclude the other
-otp_9229_exclude_app(Config) ->
+otp_9229_dupl_mod_exclude_app(Config) ->
DataDir = ?config(data_dir,Config),
LibDir = filename:join(DataDir,"otp_9229"),
@@ -389,8 +1030,8 @@ otp_9229_exclude_app(Config) ->
?m(ok, reltool_utils:recursive_delete(TargetDir)),
?m(ok, file:make_dir(TargetDir)),
?log("SPEC: ~p\n", [reltool:get_target_spec([{config, ExclApp}])]),
- {ok,["Module mylib exists in applications x and y. Using module from application x."]} = reltool:get_status([{config, ExclApp}]),
- ?m(ok, reltool:create_target([{config, ExclApp}], TargetDir)),
+ ?m({ok,["Module mylib exists in applications x and y. Using module from application x."]}, reltool:get_status([{config, ExclApp}])),
+ ok = ?m(ok, reltool:create_target([{config, ExclApp}], TargetDir)),
Erl = filename:join([TargetDir, "bin", "erl"]),
{ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
@@ -413,7 +1054,7 @@ otp_9229_exclude_app(Config) ->
ok.
%% Include both apps, but exclude common module from one app
-otp_9229_exclude_mod(Config) ->
+otp_9229_dupl_mod_exclude_mod(Config) ->
DataDir = ?config(data_dir,Config),
LibDir = filename:join(DataDir,"otp_9229"),
@@ -436,8 +1077,8 @@ otp_9229_exclude_mod(Config) ->
?m(ok, reltool_utils:recursive_delete(TargetDir)),
?m(ok, file:make_dir(TargetDir)),
?log("SPEC: ~p\n", [reltool:get_target_spec([{config, ExclMod}])]),
- {ok,["Module mylib exists in applications x and y. Using module from application x."]} = reltool:get_status([{config, ExclMod}]),
- ?m(ok, reltool:create_target([{config, ExclMod}], TargetDir)),
+ ?m({ok,["Module mylib exists in applications x and y. Using module from application x."]}, reltool:get_status([{config, ExclMod}])),
+ ok = ?m(ok, reltool:create_target([{config, ExclMod}], TargetDir)),
Erl = filename:join([TargetDir, "bin", "erl"]),
{ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl)),
@@ -466,7 +1107,892 @@ otp_9229_exclude_mod(Config) ->
ok.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test that if a module is duplicated in a .app file, then a warning
+%% is produced, but target can still be created.
+dupl_mod_in_app_file(Config) ->
+ DataDir = ?config(data_dir,Config),
+ LibDir = filename:join(DataDir,"dupl_mod"),
+
+ %% Configure the server
+ Sys =
+ {sys,
+ [
+ {lib_dirs, [LibDir]},
+ {incl_cond,exclude},
+ {app,a,[{incl_cond,include}]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]}
+ ]},
+
+ %% Generate target file
+ TargetDir = filename:join([?WORK_DIR, "target_dupl_mod_in_app_file"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?log("SPEC: ~p\n", [reltool:get_target_spec([{config, Sys}])]),
+ ?m({ok,["Module a duplicated in app file for application a."]},
+ reltool:get_status([{config, Sys}])),
+
+ %%! test that only one module installed (in spec)
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test the interface used by the GUI:
+%% get_app
+%% get_apps
+%% set_app
+%% set_apps
+%% load_config
+%% reset_config
+%%
+%% Also, for each operation which manipulates the config, test
+%% get_status and undo_config.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+get_apps(_Config) ->
+ Sys = {sys,[{app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,derived}]},
+ {app,runtime_tools,[{incl_cond,exclude}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+
+ {ok,Sasl} = ?msym({ok,#app{name=sasl}}, reltool_server:get_app(Pid,sasl)),
+ {ok,[#app{name=kernel},
+ #app{name=sasl}=Sasl,
+ #app{name=stdlib}] = White} =
+ ?msym({ok,_}, reltool_server:get_apps(Pid,whitelist)),
+ {ok,[#app{name=runtime_tools}] = Black} =
+ ?msym({ok,_}, reltool_server:get_apps(Pid,blacklist)),
+
+ {ok,Derived} = ?msym({ok,_}, reltool_server:get_apps(Pid,derived)),
+ true = lists:keymember(tools,#app.name,Derived),
+
+ {ok,Source} = ?msym({ok,_}, reltool_server:get_apps(Pid,source)),
+ true = lists:keymember(common_test,#app.name,Source),
+
+ %% Check that the four lists are disjoint
+ Number = length(White) + length(Black) + length(Derived) + length(Source),
+ WN = lists:usort([N || #app{name=N} <- White]),
+ BN = lists:usort([N || #app{name=N} <- Black]),
+ DN = lists:usort([N || #app{name=N} <- Derived]),
+ SN = lists:usort([N || #app{name=N} <- Source]),
+ AllN = lists:umerge([WN,BN,DN,SN]),
+ ?m(Number,length(AllN)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+get_mod(_Config) ->
+ Sys = {sys,[{app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,derived}]},
+ {app,runtime_tools,[{incl_cond,exclude}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+
+ %% Read app and get a module from the #app record
+ {ok,Tools} = ?msym({ok,#app{name=tools}}, reltool_server:get_app(Pid,tools)),
+ Cover = lists:keyfind(cover,#mod.name,Tools#app.mods),
+
+ %% get_mod - and check that it is equal to the one in #app.mods
+ ?m({ok,Cover}, reltool_server:get_mod(Pid,cover)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+get_sys(_Config) ->
+ Sys = {sys,[{app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,derived}]},
+ {app,runtime_tools,[{incl_cond,exclude}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+
+ RootDir = code:root_dir(),
+ ?msym({ok,#sys{root_dir=RootDir,apps=undefined}},reltool_server:get_sys(Pid)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+set_app_and_undo(Config) ->
+ Sys = {sys,[{lib_dirs,[filename:join(datadir(Config),"faulty_app_file")]},
+ {incl_cond, exclude},
+ {app,a,[{incl_cond,include}]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+ ?m({ok, Sys}, reltool:get_config(Pid)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ %% Get app and mod
+ {ok,Tools} = ?msym({ok,_}, reltool_server:get_app(Pid,tools)),
+ {ok,Cover} = ?msym({ok,#mod{name=cover, is_included=true}},
+ reltool_server:get_mod(Pid,cover)),
+
+ %% Exclude one module with set_app
+ ExclCover = Cover#mod{incl_cond=exclude},
+ Mods = Tools#app.mods,
+ Tools1 = Tools#app{mods = lists:keyreplace(cover,#mod.name,Mods,ExclCover)},
+ {ok,ToolsNoCover,["a: Cannot parse app file"++_|_]} =
+ ?msym({ok,_,["a: Cannot parse app file"++_|_]},
+ reltool_server:set_app(Pid,Tools1)),
+ ?msym({ok,["a: Cannot parse app file"++_]}, reltool_server:get_status(Pid)),
+
+ %% Check that the module is no longer included
+ ?m({ok,ToolsNoCover}, reltool_server:get_app(Pid,tools)),
+ {ok,NoIncludeCover} = ?msym({ok,#mod{name=cover, is_included=false}},
+ reltool_server:get_mod(Pid,cover)),
+
+ %% Undo
+ ?m(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,Tools}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,Cover}, reltool_server:get_mod(Pid,cover)),
+ ?msym({ok,["a: Cannot parse app file"++_]}, reltool_server:get_status(Pid)),
+
+ %% Undo again, to check that it toggles
+ ?msym(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,ToolsNoCover}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,NoIncludeCover}, reltool_server:get_mod(Pid,cover)),
+ ?msym({ok,["a: Cannot parse app file"++_]}, reltool_server:get_status(Pid)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+set_apps_and_undo(Config) ->
+ Sys = {sys,[{lib_dirs,[filename:join(datadir(Config),"faulty_app_file")]},
+ {incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+ ?m({ok, Sys}, reltool:get_config(Pid)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ %% Get app and mod
+ {ok,Tools} = ?msym({ok,_}, reltool_server:get_app(Pid,tools)),
+ ?m(true, Tools#app.is_pre_included),
+ ?m(true, Tools#app.is_included),
+ {ok,Cover} = ?msym({ok,#mod{name=cover, is_included=true}},
+ reltool_server:get_mod(Pid,cover)),
+
+ %% Exclude one application with set_apps
+ ExclTools = Tools#app{incl_cond=exclude},
+ ?msym({ok,["a: Cannot parse app file"++_]},
+ reltool_server:set_apps(Pid,[ExclTools])),
+ ?msym({ok,["a: Cannot parse app file"++_]}, reltool_server:get_status(Pid)),
+
+ %% Check that the app and its modules (one of them) are no longer included
+ {ok,NoTools} = ?msym({ok,_}, reltool_server:get_app(Pid,tools)),
+ ?m(false, NoTools#app.is_pre_included),
+ ?m(false, NoTools#app.is_included),
+ {ok,NoIncludeCover} = ?msym({ok,#mod{name=cover, is_included=false}},
+ reltool_server:get_mod(Pid,cover)),
+
+ %% Undo
+ ?m(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,Tools}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,Cover}, reltool_server:get_mod(Pid,cover)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ %% Undo again, to check that it toggles
+ ?m(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,NoTools}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,NoIncludeCover}, reltool_server:get_mod(Pid,cover)),
+ ?msym({ok,["a: Cannot parse app file"++_]}, reltool_server:get_status(Pid)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test that escript can be configured, but not its inlined applications
+set_apps_inlined(Config) ->
+ %% Create archive
+ DataDir = ?config(data_dir,Config),
+ EscriptDir = filename:join(DataDir,escript),
+ {ok,{_Archive,Bin}} = zip:create("someapp-1.0.ez",["someapp-1.0"],
+ [memory,
+ {cwd,EscriptDir},
+ {compress,all},
+ {uncompress,[".beam",".app"]}]),
+
+ %% Create the escript
+ EscriptName = "someapp.escript",
+ Escript = filename:join(?WORK_DIR,EscriptName),
+ ok = escript:create(Escript,[shebang,
+ {emu_args,"-escript main mymod"},
+ {archive,Bin}]),
+ ok = file:change_mode(Escript,8#00744),
+
+ %% Configure the server
+ Sys = {sys,[{incl_cond, exclude},
+ {escript,Escript,[]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+ ?msym({ok,[]},reltool_server:get_status(Pid)),
+
+ %% Get app and mod
+ {ok,EApp} = ?msym({ok,_}, reltool_server:get_app(Pid,'*escript* someapp')),
+ {ok,Someapp} = ?msym({ok,_}, reltool_server:get_app(Pid,someapp)),
+ ?m(undefined, EApp#app.incl_cond),
+ ?m(undefined, Someapp#app.incl_cond),
+ ?m(false, Someapp#app.is_included),
+ ?m(false, Someapp#app.is_pre_included),
+
+ %% Include escript
+ EApp1 = EApp#app{incl_cond=include},
+ ?m({ok,[]}, reltool_server:set_apps(Pid,[EApp1])),
+ ExpectedEApp = EApp1#app{is_included=true,is_pre_included=true},
+ ?m({ok,ExpectedEApp}, reltool_server:get_app(Pid,'*escript* someapp')),
+ {ok,Someapp1} = ?msym({ok,_}, reltool_server:get_app(Pid,someapp)),
+ ?m(include, Someapp1#app.incl_cond),
+ ?m(true, Someapp1#app.is_included),
+ ?m(true, Someapp1#app.is_pre_included),
+
+ %% Check that inlined app can not be configured
+ Someapp2 = Someapp1#app{incl_cond=exclude},
+ ?msym({error,
+ "Application someapp is inlined in '*escript* someapp'. "
+ "Can not change configuration for an inlined application."},
+ reltool_server:set_apps(Pid,[Someapp2])),
+ ?m({ok,Someapp1}, reltool_server:get_app(Pid,someapp)),
+
+ %% Exclude escript
+ {ok,EApp2} = ?msym({ok,_}, reltool_server:get_app(Pid,'*escript* someapp')),
+ EApp3 = EApp2#app{incl_cond=exclude},
+ ?m({ok,[]}, reltool_server:set_apps(Pid,[EApp3])),
+ ExpectedEApp3 = EApp3#app{is_included=false,is_pre_included=false},
+ ?m({ok,ExpectedEApp3}, reltool_server:get_app(Pid,'*escript* someapp')),
+ {ok,Someapp3} = ?msym({ok,_}, reltool_server:get_app(Pid,someapp)),
+ ?m(exclude, Someapp3#app.incl_cond),
+ ?m(false, Someapp3#app.is_included),
+ ?m(false, Someapp3#app.is_pre_included),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+set_sys_and_undo(Config) ->
+ Sys1 = {sys,[{incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys1}])),
+ ?m({ok,[]}, reltool_server:get_status(Pid)),
+
+ %% Read sys record
+ {ok, SysRec} = reltool_server:get_sys(Pid),
+
+ %% Set lib dirs by call to set_sys
+ NewLib = filename:join(datadir(Config),"faulty_app_file"),
+ NewLibDirs = [NewLib | SysRec#sys.lib_dirs],
+ NewSysRec = SysRec#sys{lib_dirs=NewLibDirs},
+ ?msym({ok,["a: Cannot parse app file"++_]},
+ reltool_server:set_sys(Pid, NewSysRec)),
+ ?m({ok,NewSysRec}, reltool_server:get_sys(Pid)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ %% Undo
+ ?m(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,SysRec}, reltool_server:get_sys(Pid)),
+ ?m({ok,[]}, reltool_server:get_status(Pid)),
+
+ %% Undo again, to check that it toggles
+ ?m(ok,reltool_server:undo_config(Pid)),
+ ?m({ok,NewSysRec}, reltool_server:get_sys(Pid)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+load_config_and_undo(Config) ->
+ Sys1 = {sys,[{incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys1}])),
+ ?m({ok, Sys1}, reltool:get_config(Pid)),
+ ?m({ok,[]}, reltool_server:get_status(Pid)),
+
+ %% Get app and mod
+ {ok,Tools1} = ?msym({ok,_}, reltool_server:get_app(Pid,tools)),
+ ?m(true, Tools1#app.is_pre_included),
+ ?m(true, Tools1#app.is_included),
+ {ok,Cover1} = ?msym({ok,#mod{name=cover,
+ is_included=true,
+ is_pre_included=true}},
+ reltool_server:get_mod(Pid,cover)),
+
+ %% Change tools from include to derived by loading new config
+ Sys2 = {sys,[{lib_dirs,[filename:join(datadir(Config),"faulty_app_file")]},
+ {app,a,[{incl_cond,include}]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,derived}]}]},
+ ?msym({ok,["a: Cannot parse app file"++_]},
+ reltool_server:load_config(Pid,Sys2)),
+%%% OTP-0702, 15) ?m({ok, Sys2}, reltool:get_config(Pid)),
+%%% Note that {incl_cond,exclude} is removed compared to Sys1 -
+%%% config is merged, not overwritten - is this correct???
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ %% Check that tools is included (since it is used by sasl) but not
+ %% pre-included (neither included or excluded => undefined)
+ {ok,Tools2} = ?msym({ok,_}, reltool_server:get_app(Pid,tools)),
+ ?m(undefined, Tools2#app.is_pre_included),
+ ?m(true, Tools2#app.is_included),
+ {ok,Cover2} = ?msym({ok,#mod{name=cover,
+ is_included=true,
+ is_pre_included=undefined}},
+ reltool_server:get_mod(Pid,cover)),
+
+ %% Undo
+ ?m(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,Tools1}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,Cover1}, reltool_server:get_mod(Pid,cover)),
+ ?m({ok,[]}, reltool_server:get_status(Pid)),
+
+ %% Undo again, to check that it toggles
+ ?m(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,Tools2}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,Cover2}, reltool_server:get_mod(Pid,cover)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test that load_config is properly rolled back if it fails
+load_config_fail(_Config) ->
+ Sys1 = {sys,[{incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys1}])),
+ ?m({ok, Sys1}, reltool:get_config(Pid)),
+ ?m({ok,[]}, reltool_server:get_status(Pid)),
+
+ %% Get app and mod
+ {ok,Tools} = ?msym({ok,_}, reltool_server:get_app(Pid,tools)),
+
+ %% Try to load a config with a faulty rel statement (includes a
+ %% non-existing application)
+ Sys2 = {sys,[{incl_cond, exclude},
+ {boot_rel, "faulty_rel"},
+ {rel, "faulty_rel", "1.0", [kernel, sasl, stdlib, xxx]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]}]},
+ ?msym({error,"Release \"faulty_rel\" uses non existing application xxx"},
+ reltool_server:load_config(Pid,Sys2)),
+
+ %% Check that a rollback is done to the old configuration
+ ?m({ok, Sys1}, reltool:get_config(Pid,false,false)),
+
+ %% and that tools is not changed (i.e. that the new configuration
+ %% is not applied)
+ ?m({ok,Tools}, reltool_server:get_app(Pid,tools)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Load config with escript
+
+load_config_escript_path(Config) ->
+ %% Create escript
+ DataDir = ?config(data_dir,Config),
+ BeamFile = filename:join([DataDir,escript,"someapp-1.0",ebin,"mymod.beam"]),
+ {ok,BeamBin} = file:read_file(BeamFile),
+ EscriptName = "mymod.escript",
+ Escript = filename:join(?WORK_DIR,EscriptName),
+ ok = escript:create(Escript,[shebang,{beam,BeamBin}]),
+ ok = file:change_mode(Escript,8#00744),
+
+ %% Start reltool_server with one escript in configuration
+ EscriptSys =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ {ok, Pid1} = ?msym({ok, _}, reltool:start_server([{config, EscriptSys}])),
+ {ok,[#app{name='*escript* mymod'}=A]} =
+ ?msym({ok,[_]}, reltool_server:get_apps(Pid1,whitelist)),
+ ?m(ok, reltool:stop(Pid1)),
+
+
+ %% Do same again, but now start reltool first with simple config,
+ %% then add escript by loading new configuration and check that
+ %% #app is the same
+ SimpleSys =
+ {sys,
+ [
+ {lib_dirs, []}
+ ]},
+ {ok, Pid2} = ?msym({ok, _}, reltool:start_server([{config, SimpleSys}])),
+ ?m({ok,[]}, reltool_server:get_apps(Pid2,whitelist)),
+ ?m({ok,[]}, reltool_server:load_config(Pid2,EscriptSys)),
+ ?m({ok,[A]}, reltool_server:get_apps(Pid2,whitelist)),
+
+ ?m(ok, reltool:stop(Pid2)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Load config with same (source) escript twice and check that the
+%% application information is not changed.
+
+load_config_same_escript_source(_Config) ->
+ %% Create escript
+ ExDir = code:lib_dir(reltool, examples),
+ EscriptName = "display_args",
+ Escript = filename:join([ExDir, EscriptName]),
+
+ %% Start reltool_server with one escript in configuration
+ Sys =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+% {ok,[#app{name='*escript* display_args'}]} =
+ ?msym({ok,[#app{name='*escript* display_args',mods=[_]}]},
+ reltool_server:get_apps(Pid,whitelist)),
+
+ %% Load the same config again, then check that app is not changed
+ ?m({ok,[]}, reltool_server:load_config(Pid,Sys)),
+ ?msym({ok,[#app{name='*escript* display_args',mods=[_]}]},
+ reltool_server:get_apps(Pid,whitelist)),
+
+ ?m(ok, reltool:stop(Pid)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Load config with same (beam) escript twice and check that the
+%% application information is not changed.
+
+load_config_same_escript_beam(Config) ->
+ %% Create escript
+ DataDir = ?config(data_dir,Config),
+ BeamFile = filename:join([DataDir,escript,"someapp-1.0",ebin,"mymod.beam"]),
+ {ok,BeamBin} = file:read_file(BeamFile),
+ EscriptName = "mymod.escript",
+ Escript = filename:join(?WORK_DIR,EscriptName),
+ ok = escript:create(Escript,[shebang,{beam,BeamBin}]),
+ ok = file:change_mode(Escript,8#00744),
+
+ %% Start reltool_server with one escript in configuration
+ Sys =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+ {ok,[#app{name='*escript* mymod'}=A]} =
+ ?msym({ok,[_]}, reltool_server:get_apps(Pid,whitelist)),
+
+ %% Load the same config again, then check that app is not changed
+ ?m({ok,[]}, reltool_server:load_config(Pid,Sys)),
+ ?m({ok,[A]}, reltool_server:get_apps(Pid,whitelist)),
+
+ ?m(ok, reltool:stop(Pid)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Load config with escript
+
+load_config_add_escript(Config) ->
+ %% First escript
+ ExDir = code:lib_dir(reltool, examples),
+ EscriptName1 = "display_args",
+ Escript1 = filename:join([ExDir, EscriptName1]),
+
+ %% Second escript
+ DataDir = ?config(data_dir,Config),
+ BeamFile = filename:join([DataDir,escript,"someapp-1.0",ebin,"mymod.beam"]),
+ {ok,BeamBin} = file:read_file(BeamFile),
+ EscriptName2 = "mymod.escript",
+ Escript2 = filename:join(?WORK_DIR,EscriptName2),
+ ok = escript:create(Escript2,[shebang,{beam,BeamBin}]),
+ ok = file:change_mode(Escript2,8#00744),
+
+ %% Start reltool_server with one escript in configuration
+ Sys1 =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript2, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys1}])),
+
+ %% Add second escript by loading new configuration
+ Sys2 =
+ {sys,
+ [
+ {lib_dirs, []},
+ {escript, Escript1, [{incl_cond, include}]},
+ {escript, Escript2, [{incl_cond, include}]},
+ {profile, standalone}
+ ]},
+
+ {ok,[]} = ?m({ok,[]}, reltool_server:load_config(Pid,Sys2)),
+ {ok,[#app{name='*escript* display_args'},
+ #app{name='*escript* mymod'}]} =
+ ?msym({ok,[_,_]}, reltool_server:get_apps(Pid,whitelist)),
+
+ ?m(ok, reltool:stop(Pid)),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+reset_config_and_undo(Config) ->
+ Sys1 = {sys,[{lib_dirs,[filename:join(datadir(Config),"faulty_app_file")]},
+ {incl_cond, exclude},
+ {app,a,[{incl_cond,include}]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys1}])),
+ ?m({ok, Sys1}, reltool:get_config(Pid)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ %% Get app and mod
+ {ok,Tools1} = ?msym({ok,_}, reltool_server:get_app(Pid,tools)),
+ ?m(true, Tools1#app.is_pre_included),
+ ?m(true, Tools1#app.is_included),
+ {ok,Cover1} = ?msym({ok,#mod{name=cover,
+ is_included=true,
+ is_pre_included=true}},
+ reltool_server:get_mod(Pid,cover)),
+
+ %% Exclude tools by loading new config
+ Sys2 = {sys,[{incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,tools,[{incl_cond,exclude}]}]},
+ ?m({ok,[]}, reltool_server:load_config(Pid,Sys2)),
+ ?m({ok,[]}, reltool_server:get_status(Pid)),
+
+ %% Check that tools is excluded
+ {ok,Tools2} = ?msym({ok,_}, reltool_server:get_app(Pid,tools)),
+ ?m(false, Tools2#app.is_pre_included),
+ ?m(false, Tools2#app.is_included),
+ {ok,Cover2} = ?msym({ok,#mod{name=cover,
+ is_included=false,
+ is_pre_included=false}},
+ reltool_server:get_mod(Pid,cover)),
+
+ %% Reset
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:reset_config(Pid)),
+ ?m({ok,Tools1}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,Cover1}, reltool_server:get_mod(Pid,cover)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ %% Undo
+ ?m(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,Tools2}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,Cover2}, reltool_server:get_mod(Pid,cover)),
+ ?m({ok,[]}, reltool_server:get_status(Pid)),
+
+ %% Undo again, to check that it toggles
+ ?m(ok, reltool_server:undo_config(Pid)),
+ ?m({ok,Tools1}, reltool_server:get_app(Pid,tools)),
+ ?m({ok,Cover1}, reltool_server:get_mod(Pid,cover)),
+ ?msym({ok,["a: Cannot parse app file"++_]},reltool_server:get_status(Pid)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+gen_rel_files(_Config) ->
+ %% Configure the server
+ RelName = "gen_fel_files_test",
+ RelVsn = "1.0",
+ Sys =
+ {sys,
+ [
+ {lib_dirs, []},
+ {boot_rel, RelName},
+ {rel, RelName, RelVsn, [kernel, stdlib]}
+ ]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+
+ %% Generate .rel, .script and .boot
+ Dir = filename:join(?WORK_DIR,"gen_rel_files"),
+ ok = file:make_dir(Dir),
+ ?m({ok,[]}, reltool_server:gen_rel_files(Pid,Dir)),
+
+ Script = RelName ++ ".script",
+ Rel = RelName ++ ".rel",
+ Boot = RelName ++ ".boot",
+ {ok,Files} = ?msym({ok,_}, file:list_dir(Dir)),
+ [Boot,Rel,Script] = lists:sort(Files),
+
+ %% Check that contents is reasonable
+ {ok,[S]} = ?msym({ok,[{script,_,_}]},file:consult(filename:join(Dir,Script))),
+ ?msym({ok,[{release,_,_,_}]}, file:consult(filename:join(Dir,Rel))),
+ {ok,Bin} = ?msym({ok,_}, file:read_file(filename:join(Dir,Boot))),
+ ?m(S,binary_to_term(Bin)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+save_config(Config) ->
+ PrivDir = ?config(priv_dir,Config),
+ Sys = {sys,[{incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+ ?m({ok, Sys}, reltool:get_config(Pid)),
+
+ Simple = filename:join(PrivDir,"save_simple.reltool"),
+ ?m(ok, reltool_server:save_config(Pid,Simple,false,false)),
+ ?m({ok,[Sys]}, file:consult(Simple)),
+
+ Derivates = filename:join(PrivDir,"save_derivates.reltool"),
+ ?m(ok, reltool_server:save_config(Pid,Derivates,false,true)),
+ ?msym({ok,[{sys,[{incl_cond, exclude},
+ {erts,[]},
+ {app,kernel,[{incl_cond,include},{mod,_,[]}|_]},
+ {app,sasl,[{incl_cond,include},{mod,_,[]}|_]},
+ {app,stdlib,[{incl_cond,include},{mod,_,[]}|_]}]}]},
+ file:consult(Derivates)),
+
+ Defaults = filename:join(PrivDir,"save_defaults.reltool"),
+ ?m(ok, reltool_server:save_config(Pid,Defaults,true,false)),
+ ?msym({ok,[{sys,[{root_dir,_},
+ {lib_dirs,_},
+ {mod_cond,all},
+ {incl_cond,exclude},
+ {app,kernel,[{incl_cond,include},{vsn,undefined}]},
+ {app,sasl,[{incl_cond,include},{vsn,undefined}]},
+ {app,stdlib,[{incl_cond,include},{vsn,undefined}]},
+ {boot_rel,"start_clean"},
+ {rel,"start_clean","1.0",[]},
+ {rel,"start_sasl","1.0",[sasl]},
+ {emu_name,"beam"},
+ {relocatable,true},
+ {profile,development},
+ {incl_sys_filters,[".*"]},
+ {excl_sys_filters,[]},
+ {incl_app_filters,[".*"]},
+ {excl_app_filters,[]},
+ {incl_archive_filters,[".*"]},
+ {excl_archive_filters,["^include$","^priv$"]},
+ {archive_opts,[]},
+ {rel_app_type,permanent},
+ {app_file,keep},
+ {debug_info,keep}]}]},
+ file:consult(Defaults)),
+
+ KVsn = latest(kernel),
+ StdVsn = latest(stdlib),
+
+ All = filename:join(PrivDir,"save_all.reltool"),
+ ?m(ok, reltool_server:save_config(Pid,All,true,true)),
+ ?msym({ok,[{sys,[{root_dir,_},
+ {lib_dirs,_},
+ {mod_cond,all},
+ {incl_cond,exclude},
+ {erts,[]},
+ {app,kernel,[{incl_cond,include},{vsn,KVsn},{mod,_,[]}|_]},
+ {app,sasl,[{incl_cond,include},{vsn,_},{mod,_,[]}|_]},
+ {app,stdlib,[{incl_cond,include},{vsn,StdVsn},{mod,_,[]}|_]},
+ {boot_rel,"start_clean"},
+ {rel,"start_clean","1.0",[]},
+ {rel,"start_sasl","1.0",[sasl]},
+ {emu_name,"beam"},
+ {relocatable,true},
+ {profile,development},
+ {incl_sys_filters,[".*"]},
+ {excl_sys_filters,[]},
+ {incl_app_filters,[".*"]},
+ {excl_app_filters,[]},
+ {incl_archive_filters,[".*"]},
+ {excl_archive_filters,["^include$","^priv$"]},
+ {archive_opts,[]},
+ {rel_app_type,permanent},
+ {app_file,keep},
+ {debug_info,keep}]}]},
+ file:consult(All)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test calculation of dependencies
+%% The following test applications are used
+%%
+%% x-1.0: x1.erl x2.erl x3.erl
+%% \ / (x2 calls y1, x3 calls y2)
+%% y-1.0: y1.erl y2.erl
+%% \ (y1 calls z1)
+%% z-1.0 z1.erl
+%%
+%% Test includes x and derives y and z.
+%%
+dependencies(Config) ->
+ %% Default: all modules included => y and z are included (derived)
+ Sys = {sys,[{lib_dirs,[filename:join(datadir(Config),"dependencies")]},
+ {incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,x,[{incl_cond,include}]},
+ {app,y,[{incl_cond,derived}]},
+ {app,z,[{incl_cond,derived}]}]},
+ {ok, Pid} = ?msym({ok, _}, reltool:start_server([{config, Sys}])),
+
+ ?msym({ok,[#app{name=kernel},
+ #app{name=sasl},
+ #app{name=stdlib},
+ #app{name=x,uses_apps=[y]}]},
+ reltool_server:get_apps(Pid,whitelist)),
+ {ok, Der} = ?msym({ok,_},
+ reltool_server:get_apps(Pid,derived)),
+ ?msym([#app{name=y,uses_apps=[z]},
+ #app{name=z}],
+ rm_missing_app(Der)),
+ ?msym({ok,[]},
+ reltool_server:get_apps(Pid,source)),
+
+ %% Excluding x2 => y still included since y2 is used by x3
+ %% z still included since z1 is used by y1
+ Sys2 = {sys,[{lib_dirs,[filename:join(datadir(Config),"dependencies")]},
+ {incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,x,[{incl_cond,include},{mod,x2,[{incl_cond,exclude}]}]},
+ {app,y,[{incl_cond,derived}]},
+ {app,z,[{incl_cond,derived}]}]},
+ ?m({ok,[]}, reltool_server:load_config(Pid,Sys2)),
+ ?msym({ok,[#app{name=kernel},
+ #app{name=sasl},
+ #app{name=stdlib},
+ #app{name=x,uses_apps=[y]}]},
+ reltool_server:get_apps(Pid,whitelist)),
+ {ok, Der2} = ?msym({ok,_},
+ reltool_server:get_apps(Pid,derived)),
+ ?msym([#app{name=y,uses_apps=[z]},
+ #app{name=z}],
+ rm_missing_app(Der2)),
+ ?msym({ok,[]},
+ reltool_server:get_apps(Pid,source)),
+
+ %% Excluding x3 => y still included since y1 is used by x2
+ %% z still included since z1 is used by y1
+ Sys3 = {sys,[{lib_dirs,[filename:join(datadir(Config),"dependencies")]},
+ {incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,x,[{incl_cond,include},{mod,x3,[{incl_cond,exclude}]}]},
+ {app,y,[{incl_cond,derived}]},
+ {app,z,[{incl_cond,derived}]}]},
+ ?m({ok,[]}, reltool_server:load_config(Pid,Sys3)),
+ ?msym({ok,[#app{name=kernel},
+ #app{name=sasl},
+ #app{name=stdlib},
+ #app{name=x,uses_apps=[y]}]},
+ reltool_server:get_apps(Pid,whitelist)),
+ {ok, Der3} = ?msym({ok,_},
+ reltool_server:get_apps(Pid,derived)),
+ ?msym([#app{name=y,uses_apps=[z]},
+ #app{name=z}],
+ rm_missing_app(Der3)),
+ ?msym({ok,[]},
+ reltool_server:get_apps(Pid,source)),
+
+ %% Excluding x2 and x3 => y and z excluded
+ Sys4 = {sys,[{lib_dirs,[filename:join(datadir(Config),"dependencies")]},
+ {incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,x,[{incl_cond,include},
+ {mod,x2,[{incl_cond,exclude}]},
+ {mod,x3,[{incl_cond,exclude}]}]},
+ {app,y,[{incl_cond,derived}]},
+ {app,z,[{incl_cond,derived}]}]},
+ ?m({ok,[]}, reltool_server:load_config(Pid,Sys4)),
+ ?msym({ok,[#app{name=kernel},
+ #app{name=sasl},
+ #app{name=stdlib},
+ #app{name=x,uses_apps=[]}]},
+ reltool_server:get_apps(Pid,whitelist)),
+ {ok, Der4} = ?msym({ok,_},
+ reltool_server:get_apps(Pid,derived)),
+ ?msym([], rm_missing_app(Der4)),
+ ?msym({ok,[#app{name=y},
+ #app{name=z}]},
+ reltool_server:get_apps(Pid,source)),
+
+ %% Excluding y1 => y still included since y2 is used by x3
+ %% z excluded since not used by any other than y1
+ Sys5 = {sys,[{lib_dirs,[filename:join(datadir(Config),"dependencies")]},
+ {incl_cond, exclude},
+ {app,kernel,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,x,[{incl_cond,include}]},
+ {app,y,[{incl_cond,derived},
+ {mod,y1,[{incl_cond,exclude}]}]},
+ {app,z,[{incl_cond,derived}]}]},
+ ?m({ok,[]}, reltool_server:load_config(Pid,Sys5)),
+ ?msym({ok,[#app{name=kernel},
+ #app{name=sasl},
+ #app{name=stdlib},
+ #app{name=x,uses_apps=[y]}]},
+ reltool_server:get_apps(Pid,whitelist)),
+ {ok, Der5} = ?msym({ok,_},
+ reltool_server:get_apps(Pid,derived)),
+ ?msym([#app{name=y,uses_apps=[]}], rm_missing_app(Der5)),
+ ?msym({ok,[#app{name=z}]},
+ reltool_server:get_apps(Pid,source)),
+
+ ?m(ok, reltool:stop(Pid)),
+ ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -478,6 +2004,20 @@ erl_libs() ->
LibStr -> string:tokens(LibStr, ":;")
end.
+datadir(Config) ->
+ %% Removes the trailing slash...
+ filename:nativename(?config(data_dir,Config)).
+
+latest(App) ->
+ AppStr = atom_to_list(App),
+ AppDirs = filelib:wildcard(filename:join(code:lib_dir(),AppStr++"-*")),
+ [LatestAppDir|_] = lists:reverse(AppDirs),
+ [_,Vsn] = string:tokens(filename:basename(LatestAppDir),"-"),
+ Vsn.
+
+rm_missing_app(Apps) ->
+ lists:keydelete(?MISSING_APP_NAME,#app.name,Apps).
+
diff_script(Script, Script) ->
equal;
diff_script({script, Rel, Commands1}, {script, Rel, Commands2}) ->
@@ -610,14 +2150,16 @@ wait_for_process(Node, Name, N) when is_integer(N), N > 0 ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Run escript
-run(Dir, Cmd0) ->
+run(Dir, Script, Args) ->
+ Cmd0 = filename:rootname(Script) ++ " " ++ Args,
Cmd = case os:type() of
{win32,_} -> filename:nativename(Dir) ++ "\\" ++ Cmd0;
_ -> Cmd0
end,
do_run(Dir, Cmd).
-run(Dir, Opts, Cmd0) ->
+run(Dir, Opts, Script, Args) ->
+ Cmd0 = filename:rootname(Script) ++ " " ++ Args,
Cmd = case os:type() of
{win32,_} -> Opts ++ " " ++ filename:nativename(Dir) ++ "\\" ++ Cmd0;
_ -> Opts ++ " " ++ Dir ++ "/" ++ Cmd0
@@ -626,7 +2168,9 @@ run(Dir, Opts, Cmd0) ->
do_run(Dir, Cmd) ->
io:format("Run: ~p\n", [Cmd]),
- Env = [{"PATH",Dir++":"++os:getenv("PATH")}],
+ Env = [{"PATH",Dir++":"++os:getenv("PATH")},
+ {"ERL_FLAGS",""}, % Make sure no flags are set that can override
+ {"ERL_ZFLAGS",""}], % any of the flags set in the escript.
Port = open_port({spawn,Cmd}, [exit_status,eof,in,{env,Env}]),
Res = get_data(Port, []),
receive
diff --git a/lib/reltool/test/reltool_server_SUITE_data/Makefile.src b/lib/reltool/test/reltool_server_SUITE_data/Makefile.src
index 049e8dd6cc..8ab077d64b 100644
--- a/lib/reltool/test/reltool_server_SUITE_data/Makefile.src
+++ b/lib/reltool/test/reltool_server_SUITE_data/Makefile.src
@@ -6,8 +6,19 @@ OTP9229= \
otp_9229/y-1.0/ebin/y.@EMULATOR@ \
otp_9229/y-1.0/ebin/mylib.@EMULATOR@
+DEPENDENCIES= \
+ dependencies/x-1.0/ebin/x1.@EMULATOR@ \
+ dependencies/x-1.0/ebin/x2.@EMULATOR@ \
+ dependencies/x-1.0/ebin/x3.@EMULATOR@ \
+ dependencies/y-1.0/ebin/y1.@EMULATOR@ \
+ dependencies/y-1.0/ebin/y2.@EMULATOR@ \
+ dependencies/z-1.0/ebin/z1.@EMULATOR@
-all: $(OTP9229)
+ESCRIPT= \
+ escript/someapp-1.0/ebin/mymod.@EMULATOR@
+
+
+all: $(OTP9229) $(DEPENDENCIES) $(ESCRIPT)
otp_9229/x-1.0/ebin/x.@EMULATOR@: otp_9229/x-1.0/src/x.erl
erlc $(EFLAGS) -ootp_9229/x-1.0/ebin otp_9229/x-1.0/src/x.erl
@@ -17,3 +28,19 @@ otp_9229/y-1.0/ebin/y.@EMULATOR@: otp_9229/y-1.0/src/y.erl
erlc $(EFLAGS) -ootp_9229/y-1.0/ebin otp_9229/y-1.0/src/y.erl
otp_9229/y-1.0/ebin/mylib.@EMULATOR@: otp_9229/y-1.0/src/mylib.erl
erlc $(EFLAGS) -ootp_9229/y-1.0/ebin otp_9229/y-1.0/src/mylib.erl
+
+dependencies/x-1.0/ebin/x1.@EMULATOR@: dependencies/x-1.0/src/x1.erl
+ erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x1.erl
+dependencies/x-1.0/ebin/x2.@EMULATOR@: dependencies/x-1.0/src/x2.erl
+ erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x2.erl
+dependencies/x-1.0/ebin/x3.@EMULATOR@: dependencies/x-1.0/src/x3.erl
+ erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x3.erl
+dependencies/y-1.0/ebin/y1.@EMULATOR@: dependencies/y-1.0/src/y1.erl
+ erlc $(EFLAGS) -odependencies/y-1.0/ebin dependencies/y-1.0/src/y1.erl
+dependencies/y-1.0/ebin/y2.@EMULATOR@: dependencies/y-1.0/src/y2.erl
+ erlc $(EFLAGS) -odependencies/y-1.0/ebin dependencies/y-1.0/src/y2.erl
+dependencies/z-1.0/ebin/z1.@EMULATOR@: dependencies/z-1.0/src/z1.erl
+ erlc $(EFLAGS) -odependencies/z-1.0/ebin dependencies/z-1.0/src/z1.erl
+
+escript/someapp-1.0/ebin/mymod.@EMULATOR@: escript/someapp-1.0/src/mymod.erl
+ erlc $(EFLAGS) -oescript/someapp-1.0/ebin escript/someapp-1.0/src/mymod.erl
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/ebin/x.app b/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/ebin/x.app
new file mode 100644
index 0000000000..ccaab8a8c7
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/ebin/x.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, x,
+ [{description, "Main application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [x1,x2,x3]},
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x1.erl b/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x1.erl
new file mode 100644
index 0000000000..bf1e7f9279
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x1.erl
@@ -0,0 +1,5 @@
+-module(x1).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x2.erl b/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x2.erl
new file mode 100644
index 0000000000..82191ba278
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x2.erl
@@ -0,0 +1,5 @@
+-module(x2).
+-compile(export_all).
+
+f() ->
+ y1:f().
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x3.erl b/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x3.erl
new file mode 100644
index 0000000000..618c75c9a7
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/x-1.0/src/x3.erl
@@ -0,0 +1,5 @@
+-module(x3).
+-compile(export_all).
+
+f() ->
+ y2:f().
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/ebin/y.app b/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/ebin/y.app
new file mode 100644
index 0000000000..d9dac371d7
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/ebin/y.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, y,
+ [{description, "Library application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [y1,y2]},
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/src/y1.erl b/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/src/y1.erl
new file mode 100644
index 0000000000..dd21b33292
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/src/y1.erl
@@ -0,0 +1,5 @@
+-module(y1).
+-compile(export_all).
+
+f() ->
+ z1:f().
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/src/y2.erl b/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/src/y2.erl
new file mode 100644
index 0000000000..bf8ddf6080
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/y-1.0/src/y2.erl
@@ -0,0 +1,5 @@
+-module(y2).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/z-1.0/ebin/z.app b/lib/reltool/test/reltool_server_SUITE_data/dependencies/z-1.0/ebin/z.app
new file mode 100644
index 0000000000..437a0968e9
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/z-1.0/ebin/z.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, z,
+ [{description, "Library application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [z1]},
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dependencies/z-1.0/src/z1.erl b/lib/reltool/test/reltool_server_SUITE_data/dependencies/z-1.0/src/z1.erl
new file mode 100644
index 0000000000..97ef90b87f
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dependencies/z-1.0/src/z1.erl
@@ -0,0 +1,5 @@
+-module(z1).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dupl_mod/a-1.0/ebin/a.app b/lib/reltool/test/reltool_server_SUITE_data/dupl_mod/a-1.0/ebin/a.app
new file mode 100644
index 0000000000..fada34847a
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dupl_mod/a-1.0/ebin/a.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, a,
+ [{description, "Application with duplicated module name in .app file"},
+ {vsn, "1.0"},
+ {modules, [a,a]},
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/ebin/someapp.app b/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/ebin/someapp.app
new file mode 100644
index 0000000000..ea2209941e
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/ebin/someapp.app
@@ -0,0 +1,6 @@
+%% -*- erlang -*-
+{application, someapp,
+ [{description, "Some app for reltool test including archives in escripts"},
+ {vsn, "1.0"},
+ {modules, [someapp]},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl b/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl
new file mode 100644
index 0000000000..b6c71c666d
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl
@@ -0,0 +1,26 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+%% $Id$
+%%
+-module(mymod).
+
+-export([main/1]).
+
+%%%-----------------------------------------------------------------
+%%% escript main function
+main(Args) ->
+ io:format("Root dir: ~s\n", [code:root_dir()]),
+ io:format("Script args: ~p\n", [Args]).
diff --git a/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/ebin/a.app b/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/ebin/a.app
new file mode 100644
index 0000000000..ea77103598
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/ebin/a.app
@@ -0,0 +1 @@
+faulty app file
diff --git a/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/src/a.erl b/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/src/a.erl
new file mode 100644
index 0000000000..bb500bed69
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/src/a.erl
@@ -0,0 +1,49 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+%% $Id$
+%%
+-module(a).
+
+
+-behaviour(gen_server).
+
+-vsn(1).
+
+%% External exports
+-export([start_link/0, a/0]).
+%% Internal exports
+-export([init/1, handle_call/3, handle_info/2, terminate/2]).
+
+start_link() -> gen_server:start_link({local, aa}, a, [], []).
+
+a() -> gen_server:call(aa, a).
+
+%%-----------------------------------------------------------------
+%% Callback functions from gen_server
+%%-----------------------------------------------------------------
+init([]) ->
+ process_flag(trap_exit, true),
+ {ok, state}.
+
+handle_call(a, _From, State) ->
+ X = application:get_all_env(a),
+ {reply, X, State}.
+
+handle_info(_, State) ->
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl b/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl
new file mode 100644
index 0000000000..a141c1767b
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl
@@ -0,0 +1,37 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+%% $Id$
+%%
+-module(a_sup).
+
+
+-behaviour(supervisor).
+
+%% External exports
+-export([start/2]).
+
+%% Internal exports
+-export([init/1]).
+
+start(_, _) ->
+ supervisor:start_link({local, a_sup}, a_sup, []).
+
+init([]) ->
+ SupFlags = {one_for_one, 4, 3600},
+ Config = {a,
+ {a, start_link, []},
+ permanent, 2000, worker, [a]},
+ {ok, {SupFlags, [Config]}}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/sort_apps/x-1.0/ebin/x.app b/lib/reltool/test/reltool_server_SUITE_data/sort_apps/x-1.0/ebin/x.app
new file mode 100644
index 0000000000..5fa2a92969
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/sort_apps/x-1.0/ebin/x.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, x,
+ [{description, "Application in reltool sort app test - circular dependency"},
+ {vsn, "1.0"},
+ {modules,[]},
+ {registered, []},
+ {applications, [kernel, stdlib, y]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/sort_apps/y-1.0/ebin/y.app b/lib/reltool/test/reltool_server_SUITE_data/sort_apps/y-1.0/ebin/y.app
new file mode 100644
index 0000000000..c4bc62f55f
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/sort_apps/y-1.0/ebin/y.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, y,
+ [{description, "Application in reltool sort app test - circular dependency"},
+ {vsn, "1.0"},
+ {modules,[]},
+ {registered, []},
+ {applications, [kernel, stdlib, x]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/sort_apps/z-1.0/ebin/z.app b/lib/reltool/test/reltool_server_SUITE_data/sort_apps/z-1.0/ebin/z.app
new file mode 100644
index 0000000000..8608bc554b
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/sort_apps/z-1.0/ebin/z.app
@@ -0,0 +1,8 @@
+% -*-erlang-*-
+{application, z,
+ [{description, "Application in reltool sort app test - included applications"},
+ {vsn, "1.0"},
+ {modules,[]},
+ {registered, []},
+ {applications, [kernel, stdlib, sasl, inets]},
+ {included_applications, [tools, mnesia]}]}.
diff --git a/lib/reltool/test/reltool_test_lib.erl b/lib/reltool/test/reltool_test_lib.erl
index b8bcbcd009..61f783190c 100644
--- a/lib/reltool/test/reltool_test_lib.erl
+++ b/lib/reltool/test/reltool_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -138,10 +138,6 @@ end_per_testcase(_Func, Config) when is_list(Config) ->
reset_kill_timer(Config),
Config.
-%% Backwards compatible with test_server
-tc_info(suite) -> [];
-tc_info(doc) -> "".
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Use ?log(Format, Args) as wrapper
diff --git a/lib/reltool/test/reltool_test_lib.hrl b/lib/reltool/test/reltool_test_lib.hrl
index b592ebb2f0..0dfc08b81c 100644
--- a/lib/reltool/test/reltool_test_lib.hrl
+++ b/lib/reltool/test/reltool_test_lib.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,20 +18,10 @@
-include_lib("wx/include/wx.hrl").
--define(flat_format(Format,Args), lists:flatten(io_lib:format(Format,Args))).
-define(log(Format,Args), reltool_test_lib:log(Format,Args,?FILE,?LINE)).
--define(warning(Format,Args), ?log("<WARNING>\n " ++ Format,Args)).
-define(error(Format,Args), reltool_test_lib:error(Format,Args,?FILE,?LINE)).
-define(verbose(Format,Args), reltool_test_lib:verbose(Format,Args,?FILE,?LINE)).
--define(fatal(Format,Args),
- ?error(Format, Args),
- exit({test_case_fatal, Format, Args, ?FILE, ?LINE})).
-
--define(skip(Format,Args),
- ?warning(Format, Args),
- exit({skipped, ?flat_format(Format, Args)})).
-
-define(ignore(Expr),
fun() ->
AcTuAlReS = (catch (Expr)),
@@ -68,25 +58,3 @@
AcTuAlReS
end
end()).
-
--define(m_receive(ExpectedMsg),
- ?m(ExpectedMsg,reltool_test_lib:pick_msg())).
-
--define(m_multi_receive(ExpectedMsgs),
- fun() ->
- TmPeXpCtEdMsGs = lists:sort(ExpectedMsgs),
- AcTuAlReS =
- lists:sort(lists:map(fun(_) ->
- reltool_test_lib:pick_msg()
- end, TmPeXpCtEdMsGs)),
- case AcTuAlReS of
- TmPeXpCtEdMsGs ->
- ?verbose("ok: ~p\n",[AcTuAlReS]),
- AcTuAlReS;
- _ ->
- reltool_test_lib:error("Not matching actual result was:\n ~p \nExpected ~p\n",
- [AcTuAlReS, ExpectedMsgs],
- ?FILE, ?LINE),
- AcTuAlReS
- end
- end()).
diff --git a/lib/reltool/test/reltool_wx_SUITE.erl b/lib/reltool/test/reltool_wx_SUITE.erl
index 424bc7d189..13d71f4fd6 100644
--- a/lib/reltool/test/reltool_wx_SUITE.erl
+++ b/lib/reltool/test/reltool_wx_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -61,9 +61,46 @@ start_all_windows(TestInfo) when is_atom(TestInfo) ->
reltool_test_lib:tc_info(TestInfo);
start_all_windows(_Config) ->
{ok, SysPid} = ?msym({ok, _}, reltool:start([{trap_exit, false}])),
+ erlang:monitor(process,SysPid),
{ok, AppPid} = ?msym({ok, _}, reltool_sys_win:open_app(SysPid, stdlib)),
- ?msym({ok, _}, reltool_app_win:open_mod(AppPid, escript)),
+ erlang:monitor(process,AppPid),
+ {ok, ModPid} = ?msym({ok, _}, reltool_app_win:open_mod(AppPid, escript)),
+ erlang:monitor(process,ModPid),
+
+ %% Let all windows get started
timer:sleep(timer:seconds(10)),
+
+ %% Test that server pid can be fetched, and that server is alive
+ {ok, Server} = ?msym({ok,_}, reltool:get_server(SysPid)),
+ ?m(true, erlang:is_process_alive(Server)),
+ ?m({ok,{sys,[]}}, reltool:get_config(Server)),
+
+ %% Terminate
+ check_no_win_crash(),
?m(ok, reltool:stop(SysPid)),
-
+ wait_terminate([{sys,SysPid},{app,AppPid},{mod,ModPid}]),
+
ok.
+
+
+%%%-----------------------------------------------------------------
+%%% Internal functions
+check_no_win_crash() ->
+ receive {'DOWN',_,_,_,_} = Down ->
+ ct:log("Unexpected termination of window:~n~p",[Down]),
+ ct:fail("window crashed")
+ after 0 ->
+ ok
+ end.
+
+wait_terminate([]) ->
+ ok;
+wait_terminate([{Win,P}|Rest]) ->
+ receive
+ {'DOWN',_,process,P,shutdown} ->
+ wait_terminate(Rest);
+ {'DOWN',_,process,P,Reason} ->
+ ct:log("~p window terminated with unexpected reason:~n~p",
+ [Win,Reason]),
+ ct:fail("unexpected exit reason from window")
+ end.
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index 2f8ffbcdb6..01e99f3f5e 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,7 @@
-export([vsn/0]).
%% observer stuff
--export([sys_info/0, get_table/3, get_table_list/2]).
+-export([sys_info/0, get_table/3, get_table_list/2, fetch_stats/2]).
%% etop stuff
-export([etop_collect/1]).
@@ -198,6 +198,22 @@ get_table_list(mnesia, Opts) ->
end,
lists:foldl(Info, [], mnesia:system_info(tables)).
+fetch_stats(Parent, Time) ->
+ erlang:system_flag(scheduler_wall_time, true),
+ process_flag(trap_exit, true),
+ fetch_stats_loop(Parent, Time),
+ erlang:system_flag(scheduler_wall_time, false).
+
+fetch_stats_loop(Parent, Time) ->
+ receive
+ _Msg -> normal
+ after Time ->
+ _M = Parent ! {stats, 1,
+ erlang:statistics(scheduler_wall_time),
+ erlang:statistics(io),
+ erlang:memory()},
+ fetch_stats(Parent, Time)
+ end.
%%
%% etop backend
%%
diff --git a/lib/sasl/doc/src/rel.xml b/lib/sasl/doc/src/rel.xml
index 470adf3c03..68ef90330f 100644
--- a/lib/sasl/doc/src/rel.xml
+++ b/lib/sasl/doc/src/rel.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2012</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -88,7 +88,7 @@
<p>The list must be a subset of the included applications
specified in the application resource file
(<c>Application.app</c>) and overrides this value. Defaults
- to the empty list.</p>
+ to the same value as in the application resource file.</p>
</item>
</list>
<note>
diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl
index 12ba2a5476..3c1002e4a6 100644
--- a/lib/sasl/src/systools_make.erl
+++ b/lib/sasl/src/systools_make.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -375,7 +375,7 @@ get_release1(File, Path, ModTestP, Machine) ->
{ok, Release, Warnings1} = read_release(File, Path),
{ok, Appls0} = collect_applications(Release, Path),
{ok, Appls1} = check_applications(Appls0),
- {ok, Appls2} = sort_included_applications(Appls1, Release), % OTP-4121
+ {ok, Appls2} = sort_used_and_incl_appls(Appls1, Release), % OTP-4121, OTP-9984
{ok, Warnings2} = check_modules(Appls2, Path, ModTestP, Machine),
{ok, Appls} = sort_appls(Appls2),
{ok, Release, Appls, Warnings1 ++ Warnings2}.
@@ -842,34 +842,45 @@ undefined_applications(Appls) ->
filter(fun(X) -> not member(X, Defined) end, Uses).
%%______________________________________________________________________
-%% sort_included_applications(Applications, Release) -> Applications
+%% sort_used_and_incl_appls(Applications, Release) -> Applications
%% Applications = [{{Name,Vsn},#application}]
%% Release = #release{}
%%
-%% Check that included applications are given in the same order as in
-%% the release resource file (.rel). Otherwise load instructions in
-%% the boot script, and consequently release upgrade instructions in
-%% relup, may end up in the wrong order.
+%% OTP-4121, OTP-9984
+%% Check that used and included applications are given in the same
+%% order as in the release resource file (.rel). Otherwise load and
+%% start instructions in the boot script, and consequently release
+%% upgrade instructions in relup, may end up in the wrong order.
-sort_included_applications(Applications, Release) when is_tuple(Release) ->
+sort_used_and_incl_appls(Applications, Release) when is_tuple(Release) ->
{ok,
- sort_included_applications(Applications, Release#release.applications)};
-
-sort_included_applications([{Tuple,Appl}|Appls], OrderedAppls) ->
- case Appl#application.includes of
- Incls when length(Incls)>1 ->
- IndexedIncls = find_pos(Incls, OrderedAppls),
- SortedIndexedIncls = lists:keysort(1, IndexedIncls),
- Incls2 = lists:map(fun({_Index,Name}) -> Name end,
- SortedIndexedIncls),
- Appl2 = Appl#application{includes=Incls2},
- [{Tuple,Appl2}|sort_included_applications(Appls, OrderedAppls)];
- _Incls ->
- [{Tuple,Appl}|sort_included_applications(Appls, OrderedAppls)]
- end;
-sort_included_applications([], _OrderedAppls) ->
+ sort_used_and_incl_appls(Applications, Release#release.applications)};
+
+sort_used_and_incl_appls([{Tuple,Appl}|Appls], OrderedAppls) ->
+ Incls2 =
+ case Appl#application.includes of
+ Incls when length(Incls)>1 ->
+ sort_appl_list(Incls, OrderedAppls);
+ Incls ->
+ Incls
+ end,
+ Uses2 =
+ case Appl#application.uses of
+ Uses when length(Uses)>1 ->
+ sort_appl_list(Uses, OrderedAppls);
+ Uses ->
+ Uses
+ end,
+ Appl2 = Appl#application{includes=Incls2, uses=Uses2},
+ [{Tuple,Appl2}|sort_used_and_incl_appls(Appls, OrderedAppls)];
+sort_used_and_incl_appls([], _OrderedAppls) ->
[].
+sort_appl_list(List, Order) ->
+ IndexedList = find_pos(List, Order),
+ SortedIndexedList = lists:keysort(1, IndexedList),
+ lists:map(fun({_Index,Name}) -> Name end, SortedIndexedList).
+
find_pos([Name|Incs], OrderedAppls) ->
[find_pos(1, Name, OrderedAppls)|find_pos(Incs, OrderedAppls)];
find_pos([], _OrderedAppls) ->
@@ -1253,7 +1264,8 @@ sort_appls(Appls) -> {ok, sort_appls(Appls, [], [], [])}.
sort_appls([{N, A}|T], Missing, Circular, Visited) ->
{Name,_Vsn} = N,
- {Uses, T1, NotFnd1} = find_all(Name, A#application.uses, T, Visited, [], []),
+ {Uses, T1, NotFnd1} = find_all(Name, lists:reverse(A#application.uses),
+ T, Visited, [], []),
{Incs, T2, NotFnd2} = find_all(Name, lists:reverse(A#application.includes),
T1, Visited, [], []),
Missing1 = NotFnd1 ++ NotFnd2 ++ Missing,
diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl
index 4cf7364d74..72b3eb8954 100644
--- a/lib/sasl/test/systools_SUITE.erl
+++ b/lib/sasl/test/systools_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -45,7 +45,7 @@
abnormal_script/1, src_tests_script/1, crazy_script/1,
included_script/1, included_override_script/1,
included_fail_script/1, included_bug_script/1, exref_script/1,
- otp_3065_circular_dependenies/1]).
+ otp_3065_circular_dependenies/1, included_and_used_sort_script/1]).
-export([tar_options/1, normal_tar/1, no_mod_vsn_tar/1, system_files_tar/1,
system_files_tar/2, invalid_system_files_tar/1,
invalid_system_files_tar/2, variable_tar/1,
@@ -80,7 +80,7 @@ groups() ->
no_sasl_script, src_tests_script, crazy_script,
included_script, included_override_script,
included_fail_script, included_bug_script, exref_script,
- otp_3065_circular_dependenies]},
+ otp_3065_circular_dependenies, included_and_used_sort_script]},
{tar, [],
[tar_options, normal_tar, no_mod_vsn_tar, system_files_tar,
invalid_system_files_tar, variable_tar,
@@ -600,6 +600,24 @@ otp_3065_circular_dependenies(Config) when is_list(Config) ->
ok = file:set_cwd(OldDir),
ok.
+%% Test sorting of included applications and used applications
+included_and_used_sort_script(Config) when is_list(Config) ->
+ {ok, OldDir} = file:get_cwd(),
+ {LatestDir1, LatestName1} = create_include_files(sort_apps, Config),
+ ok = file:set_cwd(LatestDir1),
+ ok = systools:make_script(LatestName1),
+ ok = check_include_script(LatestName1,
+ [t20,t19,t18,t17,t16,t15,t14],[t20,t19,t18,t14]),
+
+ {LatestDir2, LatestName2} = create_include_files(sort_apps_rev, Config),
+ ok = file:set_cwd(LatestDir2),
+ ok = systools:make_script(LatestName2),
+ ok = check_include_script(LatestName2,
+ [t18,t19,t20,t15,t16,t17,t14],[t18,t19,t20,t14]),
+
+ ok = file:set_cwd(OldDir),
+ ok.
+
%% make_script: Check that make_script exref option works.
exref_script(Config) when is_list(Config) ->
@@ -2301,8 +2319,53 @@ create_include_files(otp_3065_circular_dependenies, Config) ->
" {chAts, \"1.0\"}, {aa12, \"1.0\"}, \n"
" {chTraffic, \"1.0\"}]}.\n",
file:write_file(Name ++ ".rel", list_to_binary(Rel)),
+ {filename:dirname(Name), filename:basename(Name)};
+
+create_include_files(sort_apps, Config) ->
+ PrivDir = ?privdir,
+ Name = fname(PrivDir, sort_apps),
+ create_sort_apps(PrivDir),
+
+ Apps = application_controller:which_applications(),
+ {value,{_,_,KernelVer}} = lists:keysearch(kernel,1,Apps),
+ {value,{_,_,StdlibVer}} = lists:keysearch(stdlib,1,Apps),
+
+ Rel = "{release, {\"test\",\"R1A\"}, {erts, \"45\"},\n"
+ " [{kernel, \"" ++ KernelVer ++ "\"}, {stdlib, \""
+ ++ StdlibVer ++ "\"},\n"
+ " {t14, \"1.0\"}, \n"
+ " {t20, \"1.0\"}, \n"
+ " {t19, \"1.0\"}, \n"
+ " {t18, \"1.0\"}, \n"
+ " {t17, \"1.0\"}, \n"
+ " {t16, \"1.0\"}, \n"
+ " {t15, \"1.0\"}]}.\n",
+ file:write_file(Name ++ ".rel", list_to_binary(Rel)),
+ {filename:dirname(Name), filename:basename(Name)};
+
+create_include_files(sort_apps_rev, Config) ->
+ PrivDir = ?privdir,
+ Name = fname(PrivDir, sort_apps_rev),
+ create_sort_apps(PrivDir),
+
+ Apps = application_controller:which_applications(),
+ {value,{_,_,KernelVer}} = lists:keysearch(kernel,1,Apps),
+ {value,{_,_,StdlibVer}} = lists:keysearch(stdlib,1,Apps),
+
+ Rel = "{release, {\"test\",\"R1A\"}, {erts, \"45\"},\n"
+ " [{kernel, \"" ++ KernelVer ++ "\"}, {stdlib, \""
+ ++ StdlibVer ++ "\"},\n"
+ " {t14, \"1.0\"}, \n"
+ " {t18, \"1.0\"}, \n"
+ " {t19, \"1.0\"}, \n"
+ " {t20, \"1.0\"}, \n"
+ " {t15, \"1.0\"}, \n"
+ " {t16, \"1.0\"}, \n"
+ " {t17, \"1.0\"}]}.\n",
+ file:write_file(Name ++ ".rel", list_to_binary(Rel)),
{filename:dirname(Name), filename:basename(Name)}.
+
create_apps(Dir) ->
T1 = "{application, t1,\n"
" [{vsn, \"1.0\"},\n"
@@ -2451,6 +2514,70 @@ create_apps_3065(Dir) ->
" {registered, []}]}.\n",
file:write_file(fname(Dir, 'aa12.app'), list_to_binary(T13)).
+create_sort_apps(Dir) ->
+ T14 = "{application, t14,\n"
+ " [{vsn, \"1.0\"},\n"
+ " {description, \"test\"},\n"
+ " {modules, []},\n"
+ " {applications, [t18,t20,t19]},\n"
+ " {included_applications, [t15,t17,t16]},\n"
+ " {registered, []}]}.\n",
+ file:write_file(fname(Dir, 't14.app'), list_to_binary(T14)),
+
+ T15 = "{application, t15,\n"
+ " [{vsn, \"1.0\"},\n"
+ " {description, \"test\"},\n"
+ " {modules, []},\n"
+ " {applications, []},\n"
+ " {included_applications, []},\n"
+ " {registered, []}]}.\n",
+ file:write_file(fname(Dir, 't15.app'), list_to_binary(T15)),
+
+ T16 = "{application, t16,\n"
+ " [{vsn, \"1.0\"},\n"
+ " {description, \"test\"},\n"
+ " {modules, []},\n"
+ " {applications, []},\n"
+ " {included_applications, []},\n"
+ " {registered, []}]}.\n",
+ file:write_file(fname(Dir, 't16.app'), list_to_binary(T16)),
+
+ T17 = "{application, t17,\n"
+ " [{vsn, \"1.0\"},\n"
+ " {description, \"test\"},\n"
+ " {modules, []},\n"
+ " {applications, []},\n"
+ " {included_applications, []},\n"
+ " {registered, []}]}.\n",
+ file:write_file(fname(Dir, 't17.app'), list_to_binary(T17)),
+
+ T18 = "{application, t18,\n"
+ " [{vsn, \"1.0\"},\n"
+ " {description, \"test\"},\n"
+ " {modules, []},\n"
+ " {applications, []},\n"
+ " {included_applications, []},\n"
+ " {registered, []}]}.\n",
+ file:write_file(fname(Dir, 't18.app'), list_to_binary(T18)),
+
+ T19 = "{application, t19,\n"
+ " [{vsn, \"1.0\"},\n"
+ " {description, \"test\"},\n"
+ " {modules, []},\n"
+ " {applications, []},\n"
+ " {included_applications, []},\n"
+ " {registered, []}]}.\n",
+ file:write_file(fname(Dir, 't19.app'), list_to_binary(T19)),
+
+ T20 = "{application, t20,\n"
+ " [{vsn, \"1.0\"},\n"
+ " {description, \"test\"},\n"
+ " {modules, []},\n"
+ " {applications, []},\n"
+ " {included_applications, []},\n"
+ " {registered, []}]}.\n",
+ file:write_file(fname(Dir, 't20.app'), list_to_binary(T20)).
+
fname(N) ->
filename:join(N).
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index 704ff0a20f..2d045faa0f 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -34,6 +34,88 @@
<section>
+ <title>SNMP Development Toolkit 4.22</title>
+ <p>Version 4.22 supports code replacement in runtime from/to
+ version 4.21.7 4.21.6 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1 and 4.21. </p>
+
+ <section>
+ <title>Improvements and new features</title>
+<!--
+ <p>-</p>
+-->
+
+ <list type="bulleted">
+ <item>
+ <p>[compiler] The table information the MIB compiler provides with
+ augmented tables has been extended with <c>nbr_of_cols</c>,
+ <c>first_accessible</c> and <c>not_accessible</c>. </p>
+ <p>Own Id: OTP-9969</p>
+ </item>
+
+ <item>
+ <p>Added the <c>log_to_io</c> audit-trail-log converter function
+ to the api modules of both the
+ <seealso marker="snmpm#log_to_io">manager</seealso>
+ and
+ <seealso marker="snmpa#log_to_io">agent</seealso>. </p>
+ <p>Own Id: OTP-9940</p>
+ </item>
+
+ <item>
+ <p>[manager] Introduced a new transport module,
+ <c>snmpm_net_if_mt</c>,
+ which handles all incomming and outgoing
+ traffic in newly created processes. The message/request is
+ processed and then the process exits. </p>
+ <p>Own Id: OTP-9876</p>
+ </item>
+
+ <item>
+ <p>[agent] Documenting previously existing but undocumented function,
+ <seealso marker="snmp_generic#get_table_info">snmp_generic:get_table_info/2</seealso>. </p>
+ <p>Own Id: OTP-9942</p>
+ </item>
+
+ <item>
+ <p>[agent] Improve error handling while reading agent config files.
+ Some files contain mandatory information and is therefor themself
+ mandatory. </p>
+ <p>Own Id: OTP-9943</p>
+ </item>
+ </list>
+
+ </section>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <p>-</p>
+
+ <!--
+ <list type="bulleted">
+ <item>
+ <p>[agent] Simultaneous
+ <seealso marker="snmpa#backup">snmpa:backup/1,2</seealso>
+ calls can interfere.
+ The master agent did not check if a backup was already in
+ progress when a backup request was accepted. </p>
+ <p>Own Id: OTP-9884</p>
+ <p>Aux Id: Seq 11995</p>
+ </item>
+
+ </list>
+ -->
+
+ </section>
+
+ <section>
+ <title>Incompatibilities</title>
+ <p>-</p>
+ </section>
+
+ </section> <!-- 4.22 -->
+
+
+ <section>
<title>SNMP Development Toolkit 4.21.7</title>
<p>Version 4.21.7 supports code replacement in runtime from/to
version 4.21.6, 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1, 4.21, 4.20.1 and
@@ -47,14 +129,14 @@
<list type="bulleted">
<item>
<p>[agent] DoS attack using GET-BULK with large value of
- MaxRepetitions.
- A preventive method has been implementing by simply
- limit the number of varbinds that can be included in
- a Get-BULK response message. This is specified by the
- new config option,
- <seealso marker="snmp_app#agent_gb_max_vbs">gb_max_vbs</seealso>.
- </p>
- <p>Own Id: OTP-9700</p>
+ MaxRepetitions.
+ A preventive method has been implementing by simply
+ limit the number of varbinds that can be included in
+ a Get-BULK response message. This is specified by the
+ new config option,
+ <seealso marker="snmp_app#agent_gb_max_vbs">gb_max_vbs</seealso>.
+ </p>
+ <p>Own Id: OTP-9700</p>
</item>
</list>
@@ -63,7 +145,7 @@
</section>
<section>
- <title>Reported Fixed Bugs and Malfunctions</title>
+ <title>Fixed Bugs and Malfunctions</title>
<!--
<p>-</p>
-->
@@ -71,10 +153,10 @@
<list type="bulleted">
<item>
<p>[agent] Simultaneous
- <seealso marker="snmpa#backup">snmpa:backup/1,2</seealso>
- calls can interfere.
- The master agent did not check if a backup was already in
- progress when a backup request was accepted. </p>
+ <seealso marker="snmpa#backup">snmpa:backup/1,2</seealso>
+ calls can interfere.
+ The master agent did not check if a backup was already in
+ progress when a backup request was accepted. </p>
<p>Own Id: OTP-9884</p>
<p>Aux Id: Seq 11995</p>
</item>
@@ -106,14 +188,14 @@
<list type="bulleted">
<item>
<p>[agent] DoS attack using GET-BULK with large value of
- MaxRepetitions.
- A preventive method has been implementing by simply
- limit the number of varbinds that can be included in
- a Get-BULK response message. This is specified by the
- new config option,
- <seealso marker="snmp_app#agent_gb_max_vbs">gb_max_vbs</seealso>.
- </p>
- <p>Own Id: OTP-9700</p>
+ MaxRepetitions.
+ A preventive method has been implementing by simply
+ limit the number of varbinds that can be included in
+ a Get-BULK response message. This is specified by the
+ new config option,
+ <seealso marker="snmp_app#agent_gb_max_vbs">gb_max_vbs</seealso>.
+ </p>
+ <p>Own Id: OTP-9700</p>
</item>
</list>
@@ -121,7 +203,7 @@
</section>
<section>
- <title>Reported Fixed Bugs and Malfunctions</title>
+ <title>Fixed Bugs and Malfunctions</title>
<!--
<p>-</p>
-->
@@ -129,12 +211,12 @@
<list type="bulleted">
<item>
<p>[agent] Mib server cache gclimit update function incorrectly calls
- age update function.
- The gclimit update function,
- <seealso marker="snmpa#update_mibs_cache_gclimit">update_mibs_cache_gclimit/1</seealso>,
- <em>incorrectly</em> called the age update function,
- <seealso marker="snmpa#update_mibs_cache_age">update_mibs_cache_age/2</seealso>. </p>
- <p>Johan Claesson</p>
+ age update function.
+ The gclimit update function,
+ <seealso marker="snmpa#update_mibs_cache_gclimit">update_mibs_cache_gclimit/1</seealso>,
+ <em>incorrectly</em> called the age update function,
+ <seealso marker="snmpa#update_mibs_cache_age">update_mibs_cache_age/2</seealso>. </p>
+ <p>Johan Claesson</p>
<p>Own Id: OTP-9868</p>
</item>
diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml
index af0833f005..3e6610891f 100644
--- a/lib/snmp/doc/src/snmp.xml
+++ b/lib/snmp/doc/src/snmp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -391,6 +391,30 @@
version of the protocol data unit. There is a new line
between <c>Vsn</c> and <c>PDU</c>.</p>
+ <marker id="log_to_io"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile, Start) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) -> ok | {error, Reason}</name>
+ <fsummary>Convert an Audit Trail Log to text format</fsummary>
+ <type>
+ <v>LogDir = string()</v>
+ <v>Mibs = [MibName]</v>
+ <v>MibName = string()</v>
+ <v>LogName = string()</v>
+ <v>LogFile = string()</v>
+ <v>Start = Stop = null | datetime() | {local_time,datetime()} | {universal_time,datetime()} </v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p>Converts an Audit Trail Log to a readable format and
+ prints it on stdio. See
+ <seealso marker="snmp#log_to_txt">log_to_txt</seealso>
+ above for more info.</p>
+
<marker id="change_log_size"></marker>
</desc>
</func>
diff --git a/lib/snmp/doc/src/snmp_app.xml b/lib/snmp/doc/src/snmp_app.xml
index f6abe783b3..d11eaa2771 100644
--- a/lib/snmp/doc/src/snmp_app.xml
+++ b/lib/snmp/doc/src/snmp_app.xml
@@ -35,8 +35,8 @@
<appsummary>The SNMP Application</appsummary>
<description>
<p>This chapter describes the <c>snmp</c>
- application in OTP. The SNMP application provides the following
- services:</p>
+ application in OTP. The SNMP application provides the following
+ services:</p>
<list type="bulleted">
<item>
<p>a multilingual extensible SNMP agent</p>
@@ -589,16 +589,16 @@
{no_reuse, no_reuse()} |
{filter, manager_net_if_filter_options()} </c></p>
<p>These options are actually specific to the used module.
- The ones shown here are applicable to the default
- <c>manager_net_if_module()</c>.</p>
+ The ones shown here are applicable to the default
+ <c>manager_net_if_module()</c>.</p>
<p>For defaults see the options in <c>manager_net_if_option()</c>.</p>
</item>
<marker id="manager_ni_module"></marker>
<tag><c><![CDATA[manager_net_if_module() = atom() <optional>]]></c></tag>
<item>
- <p>Module which handles the network interface part for the
- SNMP manager. Must implement the
+ <p>The module which handles the network interface part for the
+ SNMP manager. It must implement the
<seealso marker="snmpm_network_interface">snmpm_network_interface</seealso> behaviour.</p>
<p>Default is <c>snmpm_net_if</c>.</p>
</item>
diff --git a/lib/snmp/doc/src/snmp_config.xml b/lib/snmp/doc/src/snmp_config.xml
index 0a49b7a62e..b756f3da7d 100644
--- a/lib/snmp/doc/src/snmp_config.xml
+++ b/lib/snmp/doc/src/snmp_config.xml
@@ -586,18 +586,18 @@
{no_reuse, no_reuse()} |
{filter, manager_net_if_filter_options()}</c></p>
<p>These options are actually specific to the used module.
- The ones shown here are applicable to the default
- <c>manager_net_if_module()</c>.</p>
+ The ones shown here are applicable to the default
+ <c>manager_net_if_module()</c>. </p>
<p>For defaults see the options in <c>manager_net_if_option()</c>.</p>
</item>
<marker id="manager_ni_module"></marker>
<tag><c><![CDATA[manager_net_if_module() = atom() <optional>]]></c></tag>
<item>
- <p>Module which handles the network interface part for the
- SNMP manager. Must implement the
- <seealso marker="snmpm_network_interface">snmpm_network_interface</seealso> behaviour.</p>
- <p>Default is <c>snmpm_net_if</c>.</p>
+ <p>The module which handles the network interface part for the
+ SNMP manager. It must implement the
+ <seealso marker="snmpm_network_interface">snmpm_network_interface</seealso> behaviour. </p>
+ <p>Default is <c>snmpm_net_if</c>. </p>
</item>
<marker id="manager_ni_filter_opts"></marker>
diff --git a/lib/snmp/doc/src/snmp_generic.xml b/lib/snmp/doc/src/snmp_generic.xml
index 77f3cefaa2..79a22323d9 100644
--- a/lib/snmp/doc/src/snmp_generic.xml
+++ b/lib/snmp/doc/src/snmp_generic.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -34,15 +34,16 @@
<module>snmp_generic</module>
<modulesummary>Generic Functions for Implementing SNMP Objects in a Database</modulesummary>
<description>
- <p>The module <c>snmp_generic</c> contains generic functions for implementing tables
- (and variables) using the SNMP built-in database or Mnesia. These
- default functions are used if no instrumentation function is
- provided for a managed object in a MIB. Sometimes, it might be
- necessary to customize the behaviour of the default functions. For
- example, in some situations a trap should be sent if a row is
- deleted or modified, or some hardware is to be informed, when
- information is changed.
- </p>
+ <marker id="description"></marker>
+ <p>The module <c>snmp_generic</c> contains generic functions for
+ implementing tables (and variables) using the SNMP built-in database
+ or Mnesia. These default functions are used if no instrumentation
+ function is provided for a managed object in a MIB. Sometimes,
+ it might be necessary to customize the behaviour of the default
+ functions. For example, in some situations a trap should be sent
+ if a row is deleted or modified, or some hardware is to be informed,
+ when information is changed. </p>
+
<p>The overall structure is shown in the following figure:</p>
<pre>
+---------------+
@@ -93,6 +94,7 @@
</description>
<section>
+ <marker id="data_types"></marker>
<title>DATA TYPES</title>
<p>In the functions defined below, the following types are used:</p>
<code type="none">
@@ -118,7 +120,10 @@ value() = term()
case of a <c>set</c> operation. </p>
</item>
</taglist>
+
+ <marker id="get_status_col2"></marker>
</section>
+
<funcs>
<func>
<name>get_status_col(Name, Cols)</name>
@@ -136,8 +141,11 @@ value() = term()
<p>This function can be used in instrumentation functions for
<c>is_set_ok</c>, <c>undo</c> or <c>set</c> to check if the
status column of a table is modified.</p>
+
+ <marker id="get_index_types"></marker>
</desc>
</func>
+
<func>
<name>get_index_types(Name)</name>
<fsummary>Get the index types of <c>Name</c></fsummary>
@@ -147,9 +155,36 @@ value() = term()
<desc>
<p>Gets the index types of <c>Name</c></p>
<p>This function can be used in instrumentation functions to
- retrieve the index types part of the table info.</p>
+ retrieve the index types part of the table info.</p>
+
+ <marker id="get_table_info"></marker>
</desc>
</func>
+
+ <func>
+ <name>get_table_info(Name, Item) -> table_info_result()</name>
+ <fsummary>Get table info item of MIB table <c>Name</c></fsummary>
+ <type>
+ <v>Name = name()</v>
+ <v>Item = table_item() | all</v>
+ <v>table_item() = nbr_of_cols | defvals | status_col | not_accessible |
+ index_types | first_accessible | first_own_index</v>
+ <v>table_info_result() = Value | [{table_item(), Value}]</v>
+ <v>Value = term()</v>
+ </type>
+ <desc>
+ <p>Get a specific table info item or, if <c>Item</c> has the
+ value <c>all</c>, a two tuple list (property list) is instead
+ returned with all the items and their respctive values of the
+ given table. </p>
+
+ <p>This function can be used in instrumentation functions to
+ retrieve a given part of the table info.</p>
+
+ <marker id="table_func"></marker>
+ </desc>
+ </func>
+
<func>
<name>table_func(Op1, NameDb)</name>
<name>table_func(Op2, RowIndex, Cols, NameDb) -> Ret</name>
@@ -190,8 +225,11 @@ value() = term()
<p>The function returns according to the specification of an
instrumentation function.
</p>
+
+ <marker id="table_get_elements"></marker>
</desc>
</func>
+
<func>
<name>table_get_elements(NameDb, RowIndex, Cols) -> Values</name>
<fsummary>Get elements in a table row</fsummary>
@@ -204,8 +242,11 @@ value() = term()
<desc>
<p>Returns a list with values for all columns in <c>Cols</c>.
If a column is undefined, its value is <c>noinit</c>.</p>
+
+ <marker id="table_next"></marker>
</desc>
</func>
+
<func>
<name>table_next(NameDb, RestOid) -> RowIndex | endOfTable</name>
<fsummary>Find the next row in the table</fsummary>
@@ -217,8 +258,11 @@ value() = term()
<desc>
<p>Finds the indices of the next row in the table. <c>RestOid</c>
does not have to specify an existing row.</p>
+
+ <marker id="table_row_exists"></marker>
</desc>
</func>
+
<func>
<name>table_row_exists(NameDb, RowIndex) -> bool()</name>
<fsummary>Check if a row in a table exists</fsummary>
@@ -228,8 +272,11 @@ value() = term()
</type>
<desc>
<p>Checks if a row in a table exists.</p>
+
+ <marker id="table_set_elements"></marker>
</desc>
</func>
+
<func>
<name>table_set_elements(NameDb, RowIndex, Cols) -> bool()</name>
<fsummary>Set elements in a table row</fsummary>
@@ -246,8 +293,11 @@ value() = term()
<c>mnesia:write</c> to store the values. This means that
this function must be called from within a transaction
(<c>mnesia:transaction/1</c> or <c>mnesia:dirty/1</c>).</p>
+
+ <marker id="variable_func"></marker>
</desc>
</func>
+
<func>
<name>variable_func(Op1, NameDb)</name>
<name>variable_func(Op2, Val, NameDb) -> Ret</name>
@@ -268,8 +318,11 @@ value() = term()
the database. </p>
<p>The function returns according to the specification of an
instrumentation function. </p>
+
+ <marker id="variable_get"></marker>
</desc>
</func>
+
<func>
<name>variable_get(NameDb) -> {value, Value} | undefined</name>
<fsummary>Get the value of a variable</fsummary>
@@ -279,8 +332,11 @@ value() = term()
</type>
<desc>
<p>Gets the value of a variable.</p>
+
+ <marker id="variable_set"></marker>
</desc>
</func>
+
<func>
<name>variable_set(NameDb, NewVal) -> true | false</name>
<fsummary>Set a value for a variable</fsummary>
@@ -299,6 +355,7 @@ value() = term()
</funcs>
<section>
+ <marker id="example"></marker>
<title>Example</title>
<p>The following example shows an implementation of a table which is
stored in Mnesia, but with some checks performed at set-request
diff --git a/lib/snmp/doc/src/snmp_manager_netif.xml b/lib/snmp/doc/src/snmp_manager_netif.xml
index 2738ca76c1..169e20d10b 100644
--- a/lib/snmp/doc/src/snmp_manager_netif.xml
+++ b/lib/snmp/doc/src/snmp_manager_netif.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -35,31 +35,34 @@
<image file="snmp_manager_netif_1.gif">
<icaption>The Purpose of Manager Net if</icaption>
</image>
+
<p>The Network Interface (Net if) process delivers SNMP PDUs to the
- manager server, and receives SNMP PDUs from the manager server.
- The most common behaviour of a Net if process is that is receives
- request PDU from the manager server, encodes the PDU into bytes
- and transmits the bytes onto the network to an agent. When the
- reply from the agent is received by the Net if process, which it
- decodes into an SNMP PDU, which it sends to the manager server.
- </p>
+ manager server, and receives SNMP PDUs from the manager server.
+ The most common behaviour of a Net if process is that is receives
+ request PDU from the manager server, encodes the PDU into bytes
+ and transmits the bytes onto the network to an agent. When the
+ reply from the agent is received by the Net if process, which it
+ decodes into an SNMP PDU, which it sends to the manager server. </p>
+
<p>However, that simple behaviour can be modified in numerous
- ways. For example, the Net if process can apply some kind of
- encrypting/decrypting scheme on the bytes.
- </p>
- <p>It is also possible to write your own Net if process. The default
- Net if process is implemented in the module <c>snmpm_net_if</c> and
- it uses UDP as the transport protocol.
- </p>
- <p>This section describes how to write a Net if process.
- </p>
+ ways. For example, the Net if process can apply some kind of
+ encrypting/decrypting scheme on the bytes. </p>
+
+ <p>The snmp application provides two different modules,
+ <c>snmpm_net_if</c> (the default) and <c>snmpm_net_if_mt</c>,
+ both uses the UDP as the transport protocol. The difference
+ between the two modules is that the latter is "multi-threaded",
+ i.e. for each message/request a new process is created that
+ process the message/request and then exits. </p>
+
+ <p>It is also possible to write your own Net if process,
+ this section describes how to write a Net if processdo that.</p>
<section>
<marker id="mandatory_functions"></marker>
<title>Mandatory Functions</title>
<p>A Net if process must implement the SNMP manager
- <seealso marker="snmpm_network_interface">network interface behaviour</seealso>.
- </p>
+ <seealso marker="snmpm_network_interface">network interface behaviour</seealso>. </p>
</section>
<section>
diff --git a/lib/snmp/doc/src/snmpa.xml b/lib/snmp/doc/src/snmpa.xml
index 2322af28cc..86fde03205 100644
--- a/lib/snmp/doc/src/snmpa.xml
+++ b/lib/snmp/doc/src/snmpa.xml
@@ -501,6 +501,7 @@ notification_delivery_info() = #snmpa_notification_delivery_info{}
</func>
<func>
+ <name>log_to_txt(LogDir)</name>
<name>log_to_txt(LogDir, Mibs)</name>
<name>log_to_txt(LogDir, Mibs, OutFile) -> ok | {error, Reason}</name>
<name>log_to_txt(LogDir, Mibs, OutFile, LogName) -> ok | {error, Reason}</name>
@@ -528,6 +529,37 @@ notification_delivery_info() = #snmpa_notification_delivery_info{}
See <seealso marker="snmp#log_to_txt">snmp:log_to_txt</seealso>
for more info.</p>
+ <marker id="log_to_io"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>log_to_io(LogDir) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile, Start) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) -> ok | {error, Reason}</name>
+ <fsummary>Convert an Audit Trail Log to text format</fsummary>
+ <type>
+ <v>LogDir = string()</v>
+ <v>Mibs = [MibName]</v>
+ <v>MibName = string()</v>
+ <v>LogName = string()</v>
+ <v>LogFile = string()</v>
+ <v>Start = Stop = null | datetime() | {local_time,datetime()} | {universal_time,datetime()} </v>
+ <v>Reason = disk_log_open_error() | file_open_error() | term()</v>
+ <v>disk_log_open_error() = {LogName, term()}</v>
+ <v>file_open_error() = {OutFile, term()}</v>
+ </type>
+ <desc>
+ <p>Converts an Audit Trail Log to a readable format and
+ prints it on stdio.
+ <c>LogName</c> defaults to "snmpa_log".
+ <c>LogFile</c> defaults to "snmpa.log".
+ See <seealso marker="snmp#log_to_io">snmp:log_to_io</seealso>
+ for more info.</p>
+
<marker id="change_log_size"></marker>
</desc>
</func>
diff --git a/lib/snmp/doc/src/snmpm.xml b/lib/snmp/doc/src/snmpm.xml
index c36a1b2a24..9bbb6cdbdb 100644
--- a/lib/snmp/doc/src/snmpm.xml
+++ b/lib/snmp/doc/src/snmpm.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2004</year><year>2011</year>
+ <year>2004</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -1237,6 +1237,38 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1
See <seealso marker="snmp#log_to_txt">snmp:log_to_txt</seealso>
for more info.</p>
+ <marker id="log_to_io"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>log_to_io(LogDir) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile, Start) -> ok | {error, Reason}</name>
+ <name>log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) -> ok | {error, Reason}</name>
+ <fsummary>Convert an Audit Trail Log to text format</fsummary>
+ <type>
+ <v>LogDir = string()</v>
+ <v>Mibs = [MibName]</v>
+ <v>MibName = string()</v>
+ <v>LogName = string()</v>
+ <v>LogFile = string()</v>
+ <v>Start = Stop = null | datetime() | {local_time,datetime()} | {universal_time,datetime()} </v>
+ <v>Reason = disk_log_open_error() | file_open_error() | term()</v>
+ <v>disk_log_open_error() = {LogName, term()}</v>
+ <v>file_open_error() = {OutFile, term()}</v>
+ </type>
+ <desc>
+ <p>Converts an Audit Trail Log to a readable format and
+ prints it on stdio.
+ <c>LogName</c> defaults to "snmpm_log".
+ <c>LogFile</c> defaults to "snmpm.log".
+ See <seealso marker="snmp#log_to_io">snmp:log_to_io</seealso>
+ for more info.</p>
+
<marker id="change_log_size"></marker>
</desc>
</func>
diff --git a/lib/snmp/doc/src/snmpm_network_interface_filter.xml b/lib/snmp/doc/src/snmpm_network_interface_filter.xml
index ea1e183848..5f80cec94e 100644
--- a/lib/snmp/doc/src/snmpm_network_interface_filter.xml
+++ b/lib/snmp/doc/src/snmpm_network_interface_filter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2007</year><year>2009</year>
+ <year>2007</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -72,9 +72,10 @@
</list>
<p>Note that the network interface filter is something which is used
by the network interface implementation provided by the application
- (<c>snmpm_net_if</c>). The default filter accepts all messages.</p>
+ (<c>snmpm_net_if</c> and <c>snmpm_net_if_mt</c>).
+ The default filter accepts all messages.</p>
<p>A network interface filter can e.g. be used during testing or for load
- regulation. </p>
+ regulation. </p>
</description>
<section>
diff --git a/lib/snmp/examples/ex2/snmp_ex2_manager.erl b/lib/snmp/examples/ex2/snmp_ex2_manager.erl
index ff873327bc..1b247d713d 100644
--- a/lib/snmp/examples/ex2/snmp_ex2_manager.erl
+++ b/lib/snmp/examples/ex2/snmp_ex2_manager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,7 +39,7 @@
%% Manager callback API:
-export([handle_error/3,
- handle_agent/4,
+ handle_agent/5,
handle_pdu/4,
handle_trap/3,
handle_inform/3,
@@ -265,16 +265,17 @@ handle_snmp_callback(handle_error, {ReqId, Reason}) ->
"~n Reason: ~p"
"~n", [ReqId, Reason]),
ok;
-handle_snmp_callback(handle_agent, {Addr, Port, SnmpInfo}) ->
+handle_snmp_callback(handle_agent, {Addr, Port, Type, SnmpInfo}) ->
{ES, EI, VBs} = SnmpInfo,
io:format("*** UNKNOWN AGENT ***"
"~n Address: ~p"
"~n Port: ~p"
+ "~n Type: ~p"
"~n SNMP Info: "
"~n Error Status: ~w"
"~n Error Index: ~w"
"~n Varbinds: ~p"
- "~n", [Addr, Port, ES, EI, VBs]),
+ "~n", [Addr, Port, Type, ES, EI, VBs]),
ok;
handle_snmp_callback(handle_pdu, {TargetName, ReqId, SnmpResponse}) ->
{ES, EI, VBs} = SnmpResponse,
@@ -382,8 +383,8 @@ handle_error(ReqId, Reason, Server) when is_pid(Server) ->
ignore.
-handle_agent(Addr, Port, SnmpInfo, Server) when is_pid(Server) ->
- report_callback(Server, handle_agent, {Addr, Port, SnmpInfo}),
+handle_agent(Addr, Port, Type, SnmpInfo, Server) when is_pid(Server) ->
+ report_callback(Server, handle_agent, {Addr, Port, Type, SnmpInfo}),
ignore.
diff --git a/lib/snmp/include/snmp_types.hrl b/lib/snmp/include/snmp_types.hrl
index 4adb24361c..fce087347f 100644
--- a/lib/snmp/include/snmp_types.hrl
+++ b/lib/snmp/include/snmp_types.hrl
@@ -78,23 +78,36 @@
%%-----------------------------------------------------------------
%% TableInfo - stored in snmp_symbolic_store for use by the
-%% generic table functions.
+%% generic table functions. For an ordinary table, the
+%% types will be the following:
%% nbr_of_cols is an integer
+%% pos_integer()
%% defvals is a list of {Col, Defval}, ordered by column
%% number
+%% [{Col :: integer(), Defval :: term()}]
%% status_col is an integer
+%% pos_integer()
%% not_accessible a sorted list of columns (> first_accessible)
%% that are 'not-accessible'
-%% indextypes is a list of #asn1_type for the index-columns,
-%% ordered by column number
-%% first_accessible is an integer, the first non-accessible
-%% column
+%% [pos_integer()]
+%% index_types is a list of #asn1_type for the index-columns,
+%% ordered by column number or an "augment"-tuple
+%% [asn1_type()]
+%% first_accessible is an integer, the first accessible column
+%% pos_integer()
%% first_own_index is an integer. 0 if there is no such index for
%% this table.
%% This is not the same as the last integer in the oid!
%% Example: If a table has one own index (oid.1), one
%% column (oid.2) and one imported index then
%% first_own_index will be 2.
+%% non_neg_integer()
+%% For a augmented table, it will instead look like this:
+%% index_types {augments, {atom(), asn1_type()}}
+%% nbr_of_cols pos_integer()
+%% not_accessible [pos_integer()]
+%% first_accessible pos_integer()
+%%
%%-----------------------------------------------------------------
-record(table_info,
@@ -192,7 +205,7 @@
%%----------------------------------------------------------------------
-record(mib,
{misc = [],
- mib_format_version = "3.2",
+ mib_format_version = "3.3",
name = "",
module_identity, %% Not in SMIv1, and only with +module_identity
mes = [],
diff --git a/lib/snmp/src/agent/snmp_community_mib.erl b/lib/snmp/src/agent/snmp_community_mib.erl
index 77307aa7ad..d7d41aca31 100644
--- a/lib/snmp/src/agent/snmp_community_mib.erl
+++ b/lib/snmp/src/agent/snmp_community_mib.erl
@@ -28,6 +28,7 @@
-export([add_community/5, add_community/6, delete_community/1]).
-export([check_community/1]).
+-include("snmpa_internal.hrl").
-include("SNMP-COMMUNITY-MIB.hrl").
-include("SNMP-TARGET-MIB.hrl").
-include("SNMPv2-TC.hrl").
@@ -120,10 +121,17 @@ init_tabs(Comms) ->
read_community_config_files(Dir) ->
?vdebug("read community config file",[]),
- Gen = fun(_) -> ok end,
- Filter = fun(Comms) -> Comms end,
- Check = fun(Entry) -> check_community(Entry) end,
- [Comms] =
+ FileName = "community.conf",
+ Gen = fun(D, Reason) ->
+ warning_msg("failed reading config file ~s"
+ "~n Config Dir: ~s"
+ "~n Reason: ~p",
+ [FileName, D, Reason]),
+ ok
+ end,
+ Filter = fun(Comms) -> Comms end,
+ Check = fun(Entry) -> check_community(Entry) end,
+ [Comms] =
snmp_conf:read_files(Dir, [{Gen, Filter, Check, "community.conf"}]),
Comms.
@@ -601,5 +609,8 @@ set_sname(_) -> %% Keep it, if already set.
error(Reason) ->
throw({error, Reason}).
+warning_msg(F, A) ->
+ ?snmpa_warning("[COMMUNITY-MIB]: " ++ F, A).
+
config_err(F, A) ->
snmpa_error:config_err("[COMMUNITY-MIB]: " ++ F, A).
diff --git a/lib/snmp/src/agent/snmp_framework_mib.erl b/lib/snmp/src/agent/snmp_framework_mib.erl
index 0d7866d94d..cc191bd956 100644
--- a/lib/snmp/src/agent/snmp_framework_mib.erl
+++ b/lib/snmp/src/agent/snmp_framework_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -115,7 +115,9 @@ do_configure(Dir) ->
read_internal_config_files(Dir) ->
?vdebug("read context config file",[]),
- Gen = fun(D) -> convert_context(D) end,
+ Gen = fun(D, Reason) ->
+ convert_context(D, Reason)
+ end,
Filter = fun(Contexts) -> Contexts end,
Check = fun(Entry) -> check_context(Entry) end,
[Ctxs] = snmp_conf:read_files(Dir, [{Gen, Filter, Check, "context.conf"}]),
@@ -123,10 +125,17 @@ read_internal_config_files(Dir) ->
read_agent(Dir) ->
- ?vdebug("read agent config file",[]),
- Check = fun(Entry) -> check_agent(Entry) end,
- File = filename:join(Dir, "agent.conf"),
- Agent = snmp_conf:read(File, Check),
+ ?vdebug("read agent config file", []),
+ FileName = "agent.conf",
+ Check = fun(Entry) -> check_agent(Entry) end,
+ File = filename:join(Dir, FileName),
+ Agent =
+ try
+ snmp_conf:read(File, Check)
+ catch
+ throw:{error, Reason} ->
+ error({failed_reading_config_file, Dir, FileName, Reason})
+ end,
sort_agent(Agent).
@@ -146,9 +155,9 @@ sort_agent(L) ->
%%-----------------------------------------------------------------
%% Generate a context.conf file.
%%-----------------------------------------------------------------
-convert_context(Dir) ->
+convert_context(Dir, _Reason) ->
config_err("missing context.conf file => generating a default file", []),
- File = filename:join(Dir,"context.conf"),
+ File = filename:join(Dir, "context.conf"),
case file:open(File, [write]) of
{ok, Fid} ->
ok = io:format(Fid, "~s\n", [context_header()]),
@@ -165,7 +174,7 @@ context_header() ->
io_lib:format("%% This file was automatically generated by "
"snmp_config v~s ~w-~2.2.0w-~2.2.0w "
"~2.2.0w:~2.2.0w:~2.2.0w\n",
- [?version,Y,Mo,D,H,Mi,S]).
+ [?version, Y, Mo, D, H, Mi, S]).
%%-----------------------------------------------------------------
diff --git a/lib/snmp/src/agent/snmp_notification_mib.erl b/lib/snmp/src/agent/snmp_notification_mib.erl
index 720ac749b8..37e09f5d3e 100644
--- a/lib/snmp/src/agent/snmp_notification_mib.erl
+++ b/lib/snmp/src/agent/snmp_notification_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,6 +27,7 @@
-export([add_notify/3, delete_notify/1]).
-export([check_notify/1]).
+-include("snmpa_internal.hrl").
-include("SNMP-NOTIFICATION-MIB.hrl").
-include("SNMPv2-TC.hrl").
-include("snmp_tables.hrl").
@@ -104,7 +105,14 @@ do_reconfigure(Dir) ->
read_notify_config_files(Dir) ->
?vdebug("read notify config file",[]),
- Gen = fun(_) -> ok end,
+ FileName = "notify.conf",
+ Gen = fun(D, Reason) ->
+ info_msg("failed reading config file ~s"
+ "~n Config Dir: ~s"
+ "~n Reason: ~p",
+ [FileName, D, Reason]),
+ ok
+ end,
Filter = fun(Notifs) -> Notifs end,
Check = fun(Entry) -> check_notify(Entry) end,
[Notifs] =
@@ -112,7 +120,7 @@ read_notify_config_files(Dir) ->
Notifs.
check_notify({Name, Tag, Type}) ->
- snmp_conf:check_string(Name,{gt,0}),
+ snmp_conf:check_string(Name, {gt, 0}),
snmp_conf:check_string(Tag),
{ok, Val} = snmp_conf:check_atom(Type, [{trap, 1}, {inform, 2}]),
Notify = {Name, Tag, Val,
@@ -451,12 +459,15 @@ set_sname() ->
set_sname(get(sname)).
set_sname(undefined) ->
- put(sname,conf);
+ put(sname, conf);
set_sname(_) -> %% Keep it, if already set.
ok.
error(Reason) ->
throw({error, Reason}).
+info_msg(F, A) ->
+ ?snmpa_info("[NOTIFICATION-MIB]: " ++ F, A).
+
config_err(F, A) ->
snmpa_error:config_err("[NOTIFICATION-MIB]: " ++ F, A).
diff --git a/lib/snmp/src/agent/snmp_standard_mib.erl b/lib/snmp/src/agent/snmp_standard_mib.erl
index b6834d278c..ca93546923 100644
--- a/lib/snmp/src/agent/snmp_standard_mib.erl
+++ b/lib/snmp/src/agent/snmp_standard_mib.erl
@@ -143,20 +143,35 @@ do_reconfigure(Dir) ->
%% Func: read_standard/1
%% Args: Dir is the directory with trailing dir_separator where
%% the configuration files can be found.
-%% Purpose: Reads th standard configuration file.
+%% Purpose: Reads the standard configuration file.
%% Returns: A list of standard variables
%% Fails: If an error occurs, the process will die with Reason
%% configuration_error.
+%% This file is mandatory, as it contains mandatory
+%% config options for which there are no default values.
%%-----------------------------------------------------------------
read_standard(Dir) ->
?vdebug("check standard config file",[]),
- Gen = fun(_) -> ok end,
- Filter = fun(Standard) -> sort_standard(Standard) end,
- Check = fun(Entry) -> check_standard(Entry) end,
+ FileName = "standard.conf",
+ Gen = fun(D, Reason) ->
+ throw({error, {failed_reading_config_file,
+ D, FileName,
+ list_dir(Dir), Reason}})
+ end,
+ Filter = fun(Standard) -> sort_standard(Standard) end,
+ Check = fun(Entry) -> check_standard(Entry) end,
[Standard] =
- snmp_conf:read_files(Dir, [{Gen, Filter, Check, "standard.conf"}]),
+ snmp_conf:read_files(Dir, [{Gen, Filter, Check, FileName}]),
Standard.
+list_dir(Dir) ->
+ case file:list_dir(Dir) of
+ {ok, Files} ->
+ Files;
+ Error ->
+ Error
+ end.
+
%%-----------------------------------------------------------------
%% Make sure that each mandatory standard attribute is present, and
@@ -548,6 +563,7 @@ snmp_set_serial_no(set, NewVal) ->
snmp_generic:variable_func(set, (NewVal + 1) rem 2147483648,
{snmpSetSerialNo, volatile}).
+
%%-----------------------------------------------------------------
%% This is the instrumentation function for sysOrTable
%%-----------------------------------------------------------------
@@ -588,4 +604,4 @@ error(Reason) ->
throw({error, Reason}).
config_err(F, A) ->
- snmpa_error:config_err("[STANDARD-MIB]: " ++ F, A).
+ snmpa_error:config_err("[STANDARD-MIB] " ++ F, A).
diff --git a/lib/snmp/src/agent/snmp_target_mib.erl b/lib/snmp/src/agent/snmp_target_mib.erl
index a45db89c09..b01d536caa 100644
--- a/lib/snmp/src/agent/snmp_target_mib.erl
+++ b/lib/snmp/src/agent/snmp_target_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -132,12 +132,12 @@ do_reconfigure(Dir) ->
read_target_config_files(Dir) ->
- ?vdebug("check target address config file",[]),
- TAGen = fun(_D) -> ok end,
+ ?vdebug("check target address and parameter config file(s)",[]),
+ TAGen = fun(_D, _Reason) -> ok end,
TAFilter = fun(Addr) -> Addr end,
TACheck = fun(Entry) -> check_target_addr(Entry) end,
- TPGen = fun(_D) -> ok end,
+ TPGen = fun(_D, _Reason) -> ok end,
TPFilter = fun(Params) -> Params end,
TPCheck = fun(Entry) -> check_target_params(Entry) end,
diff --git a/lib/snmp/src/agent/snmp_user_based_sm_mib.erl b/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
index 69cebc858b..2e801622e7 100644
--- a/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
+++ b/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -136,7 +136,7 @@ do_reconfigure(Dir) ->
read_usm_config_files(Dir) ->
?vdebug("read usm config file",[]),
- Gen = fun(D) -> generate_usm(D) end,
+ Gen = fun(D, Reason) -> generate_usm(D, Reason) end,
Filter = fun(Usms) -> Usms end,
Check = fun(Entry) -> check_usm(Entry) end,
[Usms] =
@@ -144,7 +144,7 @@ read_usm_config_files(Dir) ->
Usms.
-generate_usm(Dir) ->
+generate_usm(Dir, _Reason) ->
info_msg("Incomplete configuration. Generating empty usm.conf.", []),
USMFile = filename:join(Dir, "usm.conf"),
ok = file:write_file(USMFile, list_to_binary([])).
diff --git a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl
index 2cee91b081..479a44795f 100644
--- a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl
+++ b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl
@@ -115,7 +115,7 @@ do_reconfigure(Dir) ->
read_vacm_config_files(Dir) ->
?vdebug("read vacm config file",[]),
- Gen = fun(_) -> ok end,
+ Gen = fun(_D, _Reason) -> ok end,
Filter = fun(Vacms) ->
Sec2Group = [X || {vacmSecurityToGroup, X} <- Vacms],
Access = [X || {vacmAccess, X} <- Vacms],
diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl
index c400aaddf7..b45a47ec6b 100644
--- a/lib/snmp/src/agent/snmpa.erl
+++ b/lib/snmp/src/agent/snmpa.erl
@@ -83,8 +83,11 @@
-export([add_agent_caps/2, del_agent_caps/1, get_agent_caps/0]).
%% Audit Trail Log functions
--export([log_to_txt/2, log_to_txt/3, log_to_txt/4,
+-export([log_to_txt/1,
+ log_to_txt/2, log_to_txt/3, log_to_txt/4,
log_to_txt/5, log_to_txt/6, log_to_txt/7,
+ log_to_io/1, log_to_io/2, log_to_io/3,
+ log_to_io/4, log_to_io/5, log_to_io/6,
log_info/0,
change_log_size/1,
get_log_type/0, get_log_type/1,
@@ -780,6 +783,8 @@ get_agent_caps() ->
%%% Audit Trail Log functions
%%%-----------------------------------------------------------------
+log_to_txt(LogDir) ->
+ log_to_txt(LogDir, []).
log_to_txt(LogDir, Mibs) ->
OutFile = "snmpa_log.txt",
LogName = ?audit_trail_log_name,
@@ -800,6 +805,23 @@ log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop) ->
snmp:log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop).
+log_to_io(LogDir) ->
+ log_to_io(LogDir, []).
+log_to_io(LogDir, Mibs) ->
+ LogName = ?audit_trail_log_name,
+ LogFile = ?audit_trail_log_file,
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile).
+log_to_io(LogDir, Mibs, LogName) ->
+ LogFile = ?audit_trail_log_file,
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile).
+log_to_io(LogDir, Mibs, LogName, LogFile) ->
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile).
+log_to_io(LogDir, Mibs, LogName, LogFile, Start) ->
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile, Start).
+log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) ->
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop).
+
+
log_info() ->
LogName = ?audit_trail_log_name,
snmp_log:info(LogName).
diff --git a/lib/snmp/src/agent/snmpa_agent.erl b/lib/snmp/src/agent/snmpa_agent.erl
index 9cc986cf47..9d30e332f1 100644
--- a/lib/snmp/src/agent/snmpa_agent.erl
+++ b/lib/snmp/src/agent/snmpa_agent.erl
@@ -1281,7 +1281,7 @@ handle_call({backup, BackupDir}, From, #state{backup = undefined} = S) ->
?vtrace("backup server: ~p", [BackupServer]),
{noreply, S#state{backup = {BackupServer, From}}};
-handle_call({backup, _BackupDir}, From, #state{backup = Backup} = S) ->
+handle_call({backup, _BackupDir}, _From, #state{backup = Backup} = S) ->
?vinfo("backup already in progress: ~p", [Backup]),
{reply, {error, backup_in_progress}, S};
diff --git a/lib/snmp/src/agent/snmpa_local_db.erl b/lib/snmp/src/agent/snmpa_local_db.erl
index 1ec8dd3874..2c0cad807a 100644
--- a/lib/snmp/src/agent/snmpa_local_db.erl
+++ b/lib/snmp/src/agent/snmpa_local_db.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -515,7 +515,7 @@ handle_call({backup, BackupDir}, From,
{reply, Error, State}
end;
-handle_call({backup, _BackupDir}, From, #state{backup = Backup} = S) ->
+handle_call({backup, _BackupDir}, _From, #state{backup = Backup} = S) ->
?vinfo("backup already in progress: ~p", [Backup]),
{reply, {error, backup_in_progress}, S};
diff --git a/lib/snmp/src/agent/snmpa_mib.erl b/lib/snmp/src/agent/snmpa_mib.erl
index 574467d38f..575a018c0c 100644
--- a/lib/snmp/src/agent/snmpa_mib.erl
+++ b/lib/snmp/src/agent/snmpa_mib.erl
@@ -580,7 +580,7 @@ handle_call({backup, BackupDir}, From,
{reply, Error, State}
end;
-handle_call({backup, _BackupDir}, From, #state{backup = Backup} = S) ->
+handle_call({backup, _BackupDir}, _From, #state{backup = Backup} = S) ->
?vinfo("backup already in progress: ~p", [Backup]),
{reply, {error, backup_in_progress}, S};
diff --git a/lib/snmp/src/app/snmp.app.src b/lib/snmp/src/app/snmp.app.src
index a880a14696..b11c1ef934 100644
--- a/lib/snmp/src/app/snmp.app.src
+++ b/lib/snmp/src/app/snmp.app.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -91,6 +91,7 @@
snmpm_mpd,
snmpm_net_if,
snmpm_net_if_filter,
+ snmpm_net_if_mt,
snmpm_network_interface,
snmpm_network_interface_filter,
snmpm_server,
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index c8e5eec6db..8360d88c94 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -22,66 +22,181 @@
%% ----- U p g r a d e -------------------------------------------------------
[
+ {"4.21.7",
+ [
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {update, snmpa_local_db, soft, soft_purge, soft_purge, []},
+ {update, snmpa_mib, soft, soft_purge, soft_purge, []},
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {add_module, snmpm_net_if_mt}
+ ]
+ },
{"4.21.6",
[
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {add_module, snmpm_net_if_mt}
]
},
{"4.21.5",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge, []},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {add_module, snmpm_net_if_mt}
]
},
{"4.21.4",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
{load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {add_module, snmpm_net_if_mt}
]
},
{"4.21.3",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
{load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {add_module, snmpm_net_if_mt}
]
},
{"4.21.2",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, []},
{load_module, snmpa_set_lib, soft_purge, soft_purge, []},
@@ -89,17 +204,35 @@
{load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {add_module, snmpm_net_if_mt}
]
},
{"4.21.1",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, []},
{load_module, snmpa_set_lib, soft_purge, soft_purge, []},
@@ -108,91 +241,46 @@
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
{update, snmpa_agent, soft, soft_purge, soft_purge, []},
- {update, snmp_note_store, soft, soft_purge, soft_purge, []}
+ {update, snmp_note_store, soft, soft_purge, soft_purge, []},
+
+ {add_module, snmpm_net_if_mt}
]
},
{"4.21",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, []},
{load_module, snmpa_set_lib, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
{update, snmpa_agent, soft, soft_purge, soft_purge, []},
- {update, snmp_note_store, soft, soft_purge, soft_purge, []}
- ]
- },
- {"4.20.1",
- [
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
- {update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
-
- {load_module, snmpa_vacm, soft_purge, soft_purge, []},
- {load_module, snmpa_set_lib, soft_purge, soft_purge, []},
- {load_module, snmpa_trap, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
- {load_module, snmpm, soft_purge, soft_purge,
- [snmpm_server, snmpm_config, snmp_config]},
- {load_module, snmp_conf, soft_purge, soft_purge, []},
- {load_module, snmp_config, soft_purge, soft_purge, []},
- {load_module, snmpm_mpd, soft_purge, soft_purge,
- [snmp_conf, snmp_config, snmpm_config]},
- {load_module, snmpa_mpd, soft_purge, soft_purge,
- [snmp_conf, snmp_config]},
- {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_config]},
- {update, snmp_note_store, soft, soft_purge, soft_purge, []},
- {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
- {update, snmpa_local_db, soft, soft_purge, soft_purge, []},
- {update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, [snmpa_mpd]},
- {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]},
- {update, snmpm_server, soft, soft_purge, soft_purge,
- [snmpm_net_if, snmpm_mpd, snmpm_config]},
- {update, snmpm_net_if, soft, soft_purge, soft_purge,
- [snmp_conf, snmpm_mpd, snmpm_config]}
- ]
- },
- {"4.20",
- [
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
- {update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
+ {update, snmp_note_store, soft, soft_purge, soft_purge, []},
- {load_module, snmpa_vacm, soft_purge, soft_purge, []},
- {load_module, snmpa_set_lib, soft_purge, soft_purge, []},
- {load_module, snmpa_trap, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge,
- [snmpa_mib_lib, snmp_conf]},
- {load_module, snmpm, soft_purge, soft_purge,
- [snmpm_server, snmpm_config, snmp_config]},
- {load_module, snmp_conf, soft_purge, soft_purge, []},
- {load_module, snmp_config, soft_purge, soft_purge, []},
- {load_module, snmpm_mpd, soft_purge, soft_purge,
- [snmp_conf, snmp_config, snmpm_config]},
- {load_module, snmpa_mpd, soft_purge, soft_purge,
- [snmp_conf, snmp_config]},
- {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_config]},
- {update, snmp_note_store, soft, soft_purge, soft_purge, []},
- {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
- {update, snmpa_local_db, soft, soft_purge, soft_purge, []},
- {update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, [snmpa_mpd]},
- {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]},
- {update, snmpm_server, soft, soft_purge, soft_purge,
- [snmpm_net_if, snmpm_mpd, snmpm_config]},
- {update, snmpm_net_if, soft, soft_purge, soft_purge,
- [snmp_conf, snmpm_mpd, snmpm_config]}
+ {add_module, snmpm_net_if_mt}
]
}
],
@@ -200,66 +288,181 @@
%% ------D o w n g r a d e ---------------------------------------------------
[
+ {"4.21.7",
+ [
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {update, snmpa_local_db, soft, soft_purge, soft_purge, []},
+ {update, snmpa_mib, soft, soft_purge, soft_purge, []},
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
+ ]
+ },
{"4.21.6",
[
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
]
},
{"4.21.5",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge, []},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
]
},
{"4.21.4",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
{load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
]
},
{"4.21.3",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
{load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
]
},
{"4.21.2",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, []},
{load_module, snmpa_set_lib, soft_purge, soft_purge, []},
@@ -267,17 +470,35 @@
{load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, []}
+ {update, snmpa_agent, soft, soft_purge, soft_purge, []},
+
+ {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
]
},
{"4.21.1",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, []},
{load_module, snmpa_set_lib, soft_purge, soft_purge, []},
@@ -286,90 +507,46 @@
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
{update, snmpa_agent, soft, soft_purge, soft_purge, []},
- {update, snmp_note_store, soft, soft_purge, soft_purge, []}
+ {update, snmp_note_store, soft, soft_purge, soft_purge, []},
+
+ {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
]
},
{"4.21",
[
- {load_module, snmpa, soft_purge, soft_purge, []},
+ {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]},
+
+ {load_module, snmp, soft_purge, soft_purge, [snmp_log]},
+ {load_module, snmpm, soft_purge, soft_purge, [snmp]},
+ {load_module, snmp_log, soft_purge, soft_purge, []},
+ {load_module, snmp_verbosity, soft_purge, soft_purge, []},
+ {load_module, snmpm_mpd, soft_purge, soft_purge, []},
+
+ {load_module, snmpa, soft_purge, soft_purge, [snmp]},
{load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
{update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge,
+ [snmp_conf]},
{load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, []},
{load_module, snmpa_set_lib, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, []},
+ {load_module, snmp_target_mib, soft_purge, soft_purge,
+ [snmp_conf, snmpa_mib_lib]},
{load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
{update, snmpa_local_db, soft, soft_purge, soft_purge, []},
{update, snmpa_mib, soft, soft_purge, soft_purge, []},
{update, snmpa_agent, soft, soft_purge, soft_purge, []},
- {update, snmp_note_store, soft, soft_purge, soft_purge, []}
- ]
- },
- {"4.20.1",
- [
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
- {update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
-
- {load_module, snmpa_vacm, soft_purge, soft_purge, []},
- {load_module, snmpa_set_lib, soft_purge, soft_purge, []},
- {load_module, snmpa_trap, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
- {load_module, snmpm, soft_purge, soft_purge,
- [snmpm_server, snmpm_config, snmp_config]},
- {load_module, snmp_conf, soft_purge, soft_purge, []},
- {load_module, snmp_config, soft_purge, soft_purge, []},
- {load_module, snmpm_mpd, soft_purge, soft_purge,
- [snmp_conf, snmp_config, snmpm_config]},
- {load_module, snmpa_mpd, soft_purge, soft_purge,
- [snmp_conf, snmp_config]},
- {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_config]},
{update, snmp_note_store, soft, soft_purge, soft_purge, []},
- {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
- {update, snmpa_local_db, soft, soft_purge, soft_purge, []},
- {update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, [snmpa_mpd]},
- {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]},
- {update, snmpm_server, soft, soft_purge, soft_purge,
- [snmpm_net_if, snmpm_mpd, snmpm_config]},
- {update, snmpm_net_if, soft, soft_purge, soft_purge,
- [snmp_conf, snmpm_mpd, snmpm_config]}
- ]
- },
- {"4.20",
- [
- {load_module, snmpa, soft_purge, soft_purge, []},
- {load_module, snmpa_mib_lib, soft_purge, soft_purge, []},
- {update, snmpa_supervisor, soft, soft_purge, soft_purge, []},
- {load_module, snmpa_vacm, soft_purge, soft_purge, []},
- {load_module, snmpa_set_lib, soft_purge, soft_purge, []},
- {load_module, snmpa_trap, soft_purge, soft_purge, []},
- {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
- {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]},
- {load_module, snmpm, soft_purge, soft_purge,
- [snmpm_server, snmpm_config, snmp_config]},
- {load_module, snmp_conf, soft_purge, soft_purge, []},
- {load_module, snmp_config, soft_purge, soft_purge, []},
- {load_module, snmpm_mpd, soft_purge, soft_purge,
- [snmp_conf, snmp_config, snmpm_config]},
- {load_module, snmpa_mpd, soft_purge, soft_purge,
- [snmp_conf, snmp_config]},
- {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_config]},
- {update, snmp_note_store, soft, soft_purge, soft_purge, []},
- {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []},
- {update, snmpa_local_db, soft, soft_purge, soft_purge, []},
- {update, snmpa_mib, soft, soft_purge, soft_purge, []},
- {update, snmpa_agent, soft, soft_purge, soft_purge, [snmpa_mpd]},
- {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]},
- {update, snmpm_server, soft, soft_purge, soft_purge,
- [snmpm_net_if, snmpm_mpd, snmpm_config]},
- {update, snmpm_net_if, soft, soft_purge, soft_purge,
- [snmp_conf, snmpm_mpd, snmpm_config]}
+ {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
]
}
]
diff --git a/lib/snmp/src/app/snmp.erl b/lib/snmp/src/app/snmp.erl
index 3e0f05e604..fc03757e3f 100644
--- a/lib/snmp/src/app/snmp.erl
+++ b/lib/snmp/src/app/snmp.erl
@@ -50,6 +50,7 @@
read_mib/1,
log_to_txt/5, log_to_txt/6, log_to_txt/7,
+ log_to_io/4, log_to_io/5, log_to_io/6,
change_log_size/2,
octet_string_to_bits/1, bits_to_octet_string/1,
@@ -843,6 +844,12 @@ log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start) ->
log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop) ->
snmp_log:log_to_txt(LogName, LogFile, LogDir, Mibs, OutFile, Start, Stop).
+log_to_io(LogDir, Mibs, LogName, LogFile) ->
+ snmp_log:log_to_io(LogName, LogFile, LogDir, Mibs).
+log_to_io(LogDir, Mibs, LogName, LogFile, Start) ->
+ snmp_log:log_to_io(LogName, LogFile, LogDir, Mibs, Start).
+log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) ->
+ snmp_log:log_to_io(LogName, LogFile, LogDir, Mibs, Start, Stop).
change_log_size(LogName, NewSize) ->
snmp_log:change_size(LogName, NewSize).
diff --git a/lib/snmp/src/compile/snmpc_lib.erl b/lib/snmp/src/compile/snmpc_lib.erl
index 38bb8f3ac6..6e833b6c44 100644
--- a/lib/snmp/src/compile/snmpc_lib.erl
+++ b/lib/snmp/src/compile/snmpc_lib.erl
@@ -704,23 +704,29 @@ check_trap_name(EnterpriseName, Line, MEs) ->
%% This information is needed to be able to create default instrumentation
%% functions for tables.
%%----------------------------------------------------------------------
-make_table_info(Line, _TableName, {augments,SrcTableEntry}, ColumnMEs) ->
+make_table_info(Line, TableName, {augments, SrcTableEntry}, ColumnMEs) ->
ColMEs = lists:keysort(#me.oid, ColumnMEs),
- %% Nbr_of_Cols = length(ColMEs),
+ Nbr_of_Cols = length(ColMEs),
MEs = ColMEs ++ (get(cdata))#cdata.mes,
- Aug = case lookup(SrcTableEntry,MEs) of
+ Aug = case lookup(SrcTableEntry, MEs) of
false ->
print_error("Cannot AUGMENT the non-existing table entry ~p",
- [SrcTableEntry],Line),
+ [SrcTableEntry], Line),
{augments, error};
- {value,ME} ->
- {augments, {SrcTableEntry,translate_type(ME#me.asn1_type)}}
+ {value, ME} ->
+ {augments, {SrcTableEntry, translate_type(ME#me.asn1_type)}}
end,
- #table_info{index_types = Aug};
-make_table_info(Line, TableName, {indexes,[]}, _ColumnMEs) ->
+ FirstNonIdxCol = augments_first_non_index_column(ColMEs),
+ NoAccs = list_not_accessible(FirstNonIdxCol, ColMEs),
+ FirstAcc = first_accessible(TableName, ColMEs),
+ #table_info{nbr_of_cols = Nbr_of_Cols,
+ first_accessible = FirstAcc,
+ not_accessible = NoAccs,
+ index_types = Aug};
+make_table_info(Line, TableName, {indexes, []}, _ColumnMEs) ->
print_error("Table ~w lacks indexes.", [TableName],Line),
#table_info{};
-make_table_info(Line, TableName, {indexes,Indexes}, ColumnMEs) ->
+make_table_info(Line, TableName, {indexes, Indexes}, ColumnMEs) ->
ColMEs = lists:keysort(#me.oid, ColumnMEs),
NonImpliedIndexes = lists:map(fun non_implied_name/1, Indexes),
test_read_create_access(ColMEs, Line, dummy),
@@ -860,11 +866,17 @@ get_asn1_type(ColumnName, MEs, Line) ->
end.
test_index_positions(Line, Indexes, ColMEs) ->
- TLI = lists:filter(fun (IndexName) ->
- is_table_local_index(IndexName,ColMEs) end,
- Indexes),
+ IsTLI = fun(IndexName) -> is_table_local_index(IndexName, ColMEs) end,
+ TLI = lists:filter(IsTLI, Indexes),
test_index_positions_impl(Line, TLI, ColMEs).
+%% An table that augments another cannot conatin any index,
+%% so the first non-index column is always the first column.
+augments_first_non_index_column([]) ->
+ none;
+augments_first_non_index_column([#me{oid=Col}|_ColMEs]) ->
+ Col.
+
%% Returns the first non-index column | none
test_index_positions_impl(_Line, [], []) -> none;
test_index_positions_impl(_Line, [], [#me{oid=Col}|_ColMEs]) ->
diff --git a/lib/snmp/src/manager/depend.mk b/lib/snmp/src/manager/depend.mk
index 0e7e9e3df7..2e7783c8ed 100644
--- a/lib/snmp/src/manager/depend.mk
+++ b/lib/snmp/src/manager/depend.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2004-2009. All Rights Reserved.
+# Copyright Ericsson AB 2004-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -49,6 +49,13 @@ $(EBIN)/snmpm_net_if.$(EMULATOR): \
snmpm_net_if.erl \
snmpm_network_interface.erl
+$(EBIN)/snmpm_net_if_mt.$(EMULATOR): \
+ ../../include/snmp_types.hrl \
+ ../misc/snmp_debug.hrl \
+ ../misc/snmp_verbosity.hrl \
+ snmpm_net_if_mt.erl \
+ snmpm_network_interface.erl
+
$(EBIN)/snmpm_server.$(EMULATOR): \
../../include/snmp_types.hrl \
../../include/STANDARD-MIB.hrl \
diff --git a/lib/snmp/src/manager/modules.mk b/lib/snmp/src/manager/modules.mk
index 79f3dd65d9..d46545ea3f 100644
--- a/lib/snmp/src/manager/modules.mk
+++ b/lib/snmp/src/manager/modules.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2004-2009. All Rights Reserved.
+# Copyright Ericsson AB 2004-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -31,6 +31,7 @@ MODULES = \
snmpm_mpd \
snmpm_misc_sup \
snmpm_net_if \
+ snmpm_net_if_mt \
snmpm_net_if_filter \
snmpm_server \
snmpm_server_sup \
diff --git a/lib/snmp/src/manager/snmpm.erl b/lib/snmp/src/manager/snmpm.erl
index 6d2ac8d747..89eaee9f80 100644
--- a/lib/snmp/src/manager/snmpm.erl
+++ b/lib/snmp/src/manager/snmpm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -75,8 +75,11 @@
%%
%% Logging
+ log_to_txt/1,
log_to_txt/2, log_to_txt/3, log_to_txt/4,
log_to_txt/5, log_to_txt/6, log_to_txt/7,
+ log_to_io/1, log_to_io/2, log_to_io/3,
+ log_to_io/4, log_to_io/5, log_to_io/6,
change_log_size/1,
get_log_type/0,
set_log_type/1,
@@ -1371,6 +1374,9 @@ cancel_async_request(UserId, ReqId) ->
%%%-----------------------------------------------------------------
%%% Audit Trail Log functions (for backward compatibility)
%%%-----------------------------------------------------------------
+
+log_to_txt(LogDir) ->
+ log_to_txt(LogDir, []).
log_to_txt(LogDir, Mibs) ->
OutFile = "snmpm_log.txt",
LogName = ?audit_trail_log_name,
@@ -1391,6 +1397,23 @@ log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop) ->
snmp:log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop).
+log_to_io(LogDir) ->
+ log_to_io(LogDir, []).
+log_to_io(LogDir, Mibs) ->
+ LogName = ?audit_trail_log_name,
+ LogFile = ?audit_trail_log_file,
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile).
+log_to_io(LogDir, Mibs, LogName) ->
+ LogFile = ?audit_trail_log_file,
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile).
+log_to_io(LogDir, Mibs, LogName, LogFile) ->
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile).
+log_to_io(LogDir, Mibs, LogName, LogFile, Start) ->
+ snmp:log_to_io(LogDir, Mibs, LogName, LogFile, Start).
+log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) ->
+ snmp:log_to_io(LogDir, Mibs, LogFile, Start, Stop).
+
+
change_log_size(NewSize) ->
LogName = ?audit_trail_log_name,
snmp:change_log_size(LogName, NewSize).
diff --git a/lib/snmp/src/manager/snmpm_config.erl b/lib/snmp/src/manager/snmpm_config.erl
index c2e57abddb..5bbf9e5542 100644
--- a/lib/snmp/src/manager/snmpm_config.erl
+++ b/lib/snmp/src/manager/snmpm_config.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/snmp/src/manager/snmpm_mpd.erl b/lib/snmp/src/manager/snmpm_mpd.erl
index 103c87d32b..883224143e 100644
--- a/lib/snmp/src/manager/snmpm_mpd.erl
+++ b/lib/snmp/src/manager/snmpm_mpd.erl
@@ -110,9 +110,9 @@ process_msg(Msg, Domain, Addr, Port, State, NoteStore, Logger) ->
#message{version = 'version-2', vsn_hdr = Community, data = Data}
when State#state.v2c =:= true ->
HS = ?empty_msg_size + length(Community),
- (catch process_v1_v2c_msg('version-2', NoteStore, Msg,
- Domain, Addr, Port,
- Community, Data, HS, Logger));
+ process_v1_v2c_msg('version-2', NoteStore, Msg,
+ Domain, Addr, Port,
+ Community, Data, HS, Logger);
%% Version 3
#message{version = 'version-3', vsn_hdr = H, data = Data}
diff --git a/lib/snmp/src/manager/snmpm_net_if_mt.erl b/lib/snmp/src/manager/snmpm_net_if_mt.erl
new file mode 100644
index 0000000000..3e87f6a7fb
--- /dev/null
+++ b/lib/snmp/src/manager/snmpm_net_if_mt.erl
@@ -0,0 +1,1259 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(snmpm_net_if_mt).
+
+-behaviour(gen_server).
+-behaviour(snmpm_network_interface).
+
+
+%% Network Interface callback functions
+-export([
+ start_link/2,
+ stop/1,
+ send_pdu/6, % Backward compatibillity
+ send_pdu/7, % Backward compatibillity
+ send_pdu/8,
+
+ inform_response/4,
+
+ note_store/2,
+
+ info/1,
+ verbosity/2,
+ %% system_info_updated/2,
+ get_log_type/1, set_log_type/2,
+ filter_reset/1
+ ]).
+
+%% gen_server callbacks
+-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
+ code_change/3, terminate/2]).
+
+-define(SNMP_USE_V3, true).
+-include("snmp_types.hrl").
+-include("snmpm_internal.hrl").
+-include("snmpm_atl.hrl").
+-include("snmp_debug.hrl").
+
+%% -define(VMODULE,"NET_IF").
+-include("snmp_verbosity.hrl").
+
+-record(state,
+ {
+ server,
+ note_store,
+ sock,
+ mpd_state,
+ log,
+ irb = auto, % auto | {user, integer()}
+ irgc,
+ filter
+ }).
+
+
+-define(DEFAULT_FILTER_MODULE, snmpm_net_if_filter).
+-define(DEFAULT_FILTER_OPTS, [{module, ?DEFAULT_FILTER_MODULE}]).
+
+-ifdef(snmp_debug).
+-define(GS_START_LINK(Args),
+ gen_server:start_link(?MODULE, Args, [{debug,[trace]}])).
+-else.
+-define(GS_START_LINK(Args),
+ gen_server:start_link(?MODULE, Args, [])).
+-endif.
+
+
+-define(IRGC_TIMEOUT, timer:minutes(5)).
+
+-define(ATL_SEQNO_INITIAL, 1).
+-define(ATL_SEQNO_MAX, 2147483647).
+
+
+%%%-------------------------------------------------------------------
+%%% API
+%%%-------------------------------------------------------------------
+start_link(Server, NoteStore) ->
+ ?d("start_link -> entry with"
+ "~n Server: ~p"
+ "~n NoteStore: ~p", [Server, NoteStore]),
+ Args = [Server, NoteStore],
+ ?GS_START_LINK(Args).
+
+stop(Pid) ->
+ call(Pid, stop).
+
+send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port) ->
+ send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port, ?DEFAULT_EXTRA_INFO).
+
+send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port, ExtraInfo) ->
+ Domain = snmpm_config:default_transport_domain(),
+ send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo).
+
+send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo)
+ when is_record(Pdu, pdu) ->
+ ?d("send_pdu -> entry with"
+ "~n Pid: ~p"
+ "~n Pdu: ~p"
+ "~n Vsn: ~p"
+ "~n MsgData: ~p"
+ "~n Domain: ~p"
+ "~n Addr: ~p"
+ "~n Port: ~p", [Pid, Pdu, Vsn, MsgData, Domain, Addr, Port]),
+ cast(Pid, {send_pdu, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo}).
+
+note_store(Pid, NoteStore) ->
+ call(Pid, {note_store, NoteStore}).
+
+inform_response(Pid, Ref, Addr, Port) ->
+ cast(Pid, {inform_response, Ref, Addr, Port}).
+
+info(Pid) ->
+ call(Pid, info).
+
+verbosity(Pid, V) ->
+ call(Pid, {verbosity, V}).
+
+%% system_info_updated(Pid, What) ->
+%% call(Pid, {system_info_updated, What}).
+
+get_log_type(Pid) ->
+ call(Pid, get_log_type).
+
+set_log_type(Pid, NewType) ->
+ call(Pid, {set_log_type, NewType}).
+
+filter_reset(Pid) ->
+ cast(Pid, filter_reset).
+
+
+%%%-------------------------------------------------------------------
+%%% Callback functions from gen_server
+%%%-------------------------------------------------------------------
+
+%%--------------------------------------------------------------------
+%% Func: init/1
+%% Returns: {ok, State} |
+%% {ok, State, Timeout} |
+%% ignore |
+%% {stop, Reason}
+%%--------------------------------------------------------------------
+init([Server, NoteStore]) ->
+ ?d("init -> entry with"
+ "~n Server: ~p"
+ "~n NoteStore: ~p", [Server, NoteStore]),
+ case (catch do_init(Server, NoteStore)) of
+ {error, Reason} ->
+ {stop, Reason};
+ {ok, State} ->
+ {ok, State}
+ end.
+
+do_init(Server, NoteStore) ->
+ process_flag(trap_exit, true),
+
+ %% -- Prio --
+ {ok, Prio} = snmpm_config:system_info(prio),
+ process_flag(priority, Prio),
+
+ %% -- Create inform request table --
+ %% This should really be protected, but it also needs to
+ %% be writable for the worker processes, so...
+ ets:new(snmpm_inform_request_table,
+ [set, public, named_table, {keypos, 1}]),
+
+ %% -- Verbosity --
+ {ok, Verbosity} = snmpm_config:system_info(net_if_verbosity),
+ put(sname, mnif),
+ put(verbosity, Verbosity),
+ ?vlog("starting", []),
+
+ %% -- MPD --
+ {ok, Vsns} = snmpm_config:system_info(versions),
+ MpdState = snmpm_mpd:init(Vsns),
+ ?vdebug("MpdState: ~w", [MpdState]),
+
+ %% -- Module dependent options --
+ {ok, Opts} = snmpm_config:system_info(net_if_options),
+
+ %% -- Inform response behaviour --
+ {ok, IRB} = snmpm_config:system_info(net_if_irb),
+ IrGcRef = irgc_start(IRB),
+
+ %% -- Socket --
+ SndBuf = get_opt(Opts, sndbuf, default),
+ RecBuf = get_opt(Opts, recbuf, default),
+ BindTo = get_opt(Opts, bind_to, false),
+ NoReuse = get_opt(Opts, no_reuse, false),
+ {ok, Port} = snmpm_config:system_info(port),
+ {ok, Sock} = do_open_port(Port, SndBuf, RecBuf, BindTo, NoReuse),
+
+ %% Flow control --
+ FilterOpts = get_opt(Opts, filter, []),
+ FilterMod = create_filter(FilterOpts),
+ ?vdebug("FilterMod: ~w", [FilterMod]),
+
+ %% -- Audit trail log ---
+ {ok, ATL} = snmpm_config:system_info(audit_trail_log),
+ Log = do_init_log(ATL),
+ ?vdebug("Log: ~w", [Log]),
+
+ %% -- Initiate counters ---
+ init_counters(),
+
+ %% -- We are done ---
+ State = #state{server = Server,
+ note_store = NoteStore,
+ mpd_state = MpdState,
+ sock = Sock,
+ log = Log,
+ irb = IRB,
+ irgc = IrGcRef,
+ filter = FilterMod},
+ ?vdebug("started", []),
+ {ok, State}.
+
+
+%% Open port
+do_open_port(Port, SendSz, RecvSz, BindTo, NoReuse) ->
+ ?vtrace("do_open_port -> entry with"
+ "~n Port: ~p"
+ "~n SendSz: ~p"
+ "~n RecvSz: ~p"
+ "~n BindTo: ~p"
+ "~n NoReuse: ~p", [Port, SendSz, RecvSz, BindTo, NoReuse]),
+ IpOpts1 = bind_to(BindTo),
+ IpOpts2 = no_reuse(NoReuse),
+ IpOpts3 = recbuf(RecvSz),
+ IpOpts4 = sndbuf(SendSz),
+ IpOpts = [binary | IpOpts1 ++ IpOpts2 ++ IpOpts3 ++ IpOpts4],
+ OpenRes =
+ case init:get_argument(snmpm_fd) of
+ {ok, [[FdStr]]} ->
+ Fd = list_to_integer(FdStr),
+ gen_udp:open(0, [{fd, Fd}|IpOpts]);
+ error ->
+ gen_udp:open(Port, IpOpts)
+ end,
+ case OpenRes of
+ {error, _} = Error ->
+ throw(Error);
+ OK ->
+ OK
+ end.
+
+bind_to(true) ->
+ case snmpm_config:system_info(address) of
+ {ok, Addr} when is_list(Addr) ->
+ [{ip, list_to_tuple(Addr)}];
+ {ok, Addr} ->
+ [{ip, Addr}];
+ _ ->
+ []
+ end;
+bind_to(_) ->
+ [].
+
+no_reuse(false) ->
+ [{reuseaddr, true}];
+no_reuse(_) ->
+ [].
+
+recbuf(default) ->
+ [];
+recbuf(Sz) ->
+ [{recbuf, Sz}].
+
+sndbuf(default) ->
+ [];
+sndbuf(Sz) ->
+ [{sndbuf, Sz}].
+
+
+create_filter(Opts) when is_list(Opts) ->
+ case get_opt(Opts, module, ?DEFAULT_FILTER_MODULE) of
+ ?DEFAULT_FILTER_MODULE = Mod ->
+ Mod;
+ Module ->
+ snmpm_network_interface_filter:verify(Module),
+ Module
+ end;
+create_filter(BadOpts) ->
+ throw({error, {bad_filter_opts, BadOpts}}).
+
+
+%% ----------------------------------------------------------------------
+%% Audit Trail Logger
+%% ----------------------------------------------------------------------
+
+%% Open log
+do_init_log(false) ->
+ ?vtrace("do_init_log(false) -> entry", []),
+ undefined;
+do_init_log(true) ->
+ ?vtrace("do_init_log(true) -> entry", []),
+ {ok, Type} = snmpm_config:system_info(audit_trail_log_type),
+ {ok, Dir} = snmpm_config:system_info(audit_trail_log_dir),
+ {ok, Size} = snmpm_config:system_info(audit_trail_log_size),
+ {ok, Repair} = snmpm_config:system_info(audit_trail_log_repair),
+ Name = ?audit_trail_log_name,
+ File = filename:absname(?audit_trail_log_file, Dir),
+ case snmpm_config:system_info(audit_trail_log_seqno) of
+ {ok, true} ->
+ Initial = ?ATL_SEQNO_INITIAL,
+ Max = ?ATL_SEQNO_MAX,
+ Module = snmpm_config,
+ Function = increment_counter,
+ Args = [atl_seqno, Initial, Max],
+ SeqNoGen = {Module, Function, Args},
+ case snmp_log:create(Name, File, SeqNoGen, Size, Repair, true) of
+ {ok, Log} ->
+ ?vdebug("log created: ~w", [Log]),
+ {Name, Log, Type};
+ {error, Reason} ->
+ throw({error, {failed_create_audit_log, Reason}})
+ end;
+ _ ->
+ case snmp_log:create(Name, File, Size, Repair, true) of
+ {ok, Log} ->
+ ?vdebug("log created: ~w", [Log]),
+ {Name, Log, Type};
+ {error, Reason} ->
+ throw({error, {failed_create_audit_log, Reason}})
+ end
+ end.
+
+
+%% ----------------------------------------------------------------------
+
+%%--------------------------------------------------------------------
+%% Func: handle_call/3
+%% Returns: {reply, Reply, State} |
+%% {reply, Reply, State, Timeout} |
+%% {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, Reply, State} | (terminate/2 is called)
+%% {stop, Reason, State} (terminate/2 is called)
+%%--------------------------------------------------------------------
+handle_call({verbosity, Verbosity}, _From, State) ->
+ ?vlog("received verbosity request", []),
+ put(verbosity, Verbosity),
+ {reply, ok, State};
+
+%% handle_call({system_info_updated, What}, _From, State) ->
+%% ?vlog("received system_info_updated request with What = ~p", [What]),
+%% {NewState, Reply} = handle_system_info_updated(State, What),
+%% {reply, Reply, NewState};
+
+handle_call(get_log_type, _From, State) ->
+ ?vlog("received get-log-type request", []),
+ Reply = (catch handle_get_log_type(State)),
+ {reply, Reply, State};
+
+handle_call({set_log_type, NewType}, _From, State) ->
+ ?vlog("received set-log-type request with NewType = ~p", [NewType]),
+ {NewState, Reply} = (catch handle_set_log_type(State, NewType)),
+ {reply, Reply, NewState};
+
+handle_call({note_store, Pid}, _From, State) ->
+ ?vlog("received new note_store: ~w", [Pid]),
+ {reply, ok, State#state{note_store = Pid}};
+
+handle_call(stop, _From, State) ->
+ ?vlog("received stop request", []),
+ Reply = ok,
+ {stop, normal, Reply, State};
+
+handle_call(info, _From, State) ->
+ ?vlog("received info request", []),
+ Reply = get_info(State),
+ {reply, Reply, State};
+
+handle_call(Req, From, State) ->
+ warning_msg("received unknown request (from ~p): ~n~p", [Req, From]),
+ {reply, {error, {invalid_request, Req}}, State}.
+
+
+%%--------------------------------------------------------------------
+%% Func: handle_cast/2
+%% Returns: {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, State} (terminate/2 is called)
+%%--------------------------------------------------------------------
+handle_cast({send_pdu, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo},
+ State) ->
+ ?vlog("received send_pdu message with"
+ "~n Pdu: ~p"
+ "~n Vsn: ~p"
+ "~n MsgData: ~p"
+ "~n Domain: ~p"
+ "~n Addr: ~p"
+ "~n Port: ~p", [Pdu, Vsn, MsgData, Domain, Addr, Port]),
+ maybe_process_extra_info(ExtraInfo),
+ handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port, State),
+ {noreply, State};
+
+handle_cast({inform_response, Ref, Addr, Port}, State) ->
+ ?vlog("received inform_response message with"
+ "~n Ref: ~p"
+ "~n Addr: ~p"
+ "~n Port: ~p", [Ref, Addr, Port]),
+ handle_inform_response(Ref, Addr, Port, State),
+ {noreply, State};
+
+handle_cast(filter_reset, State) ->
+ ?vlog("received filter_reset message", []),
+ reset_counters(),
+ {noreply, State};
+
+handle_cast(Msg, State) ->
+ warning_msg("received unknown message: ~n~p", [Msg]),
+ {noreply, State}.
+
+
+%%--------------------------------------------------------------------
+%% Func: handle_info/2
+%% Returns: {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, State} (terminate/2 is called)
+%%--------------------------------------------------------------------
+handle_info({udp, Sock, Ip, Port, Bytes}, #state{sock = Sock} = State) ->
+ ?vlog("received ~w bytes from ~p:~p", [size(Bytes), Ip, Port]),
+ handle_udp(Ip, Port, Bytes, State),
+ {noreply, State};
+
+handle_info(inform_response_gc, State) ->
+ ?vlog("received inform_response_gc message", []),
+ State2 = handle_inform_response_gc(State),
+ {noreply, State2};
+
+handle_info({disk_log, _Node, Log, Info}, State) ->
+ ?vlog("received disk_log message: "
+ "~n Info: ~p", [Info]),
+ State2 = handle_disk_log(Log, Info, State),
+ {noreply, State2};
+
+handle_info({'DOWN', _MRef, process, Pid, {net_if_worker, ExitStatus}},
+ State) ->
+ ?vdebug("received DOWN message from net_if-worker: "
+ "~n ExitStatus: ~p", [ExitStatus]),
+ handle_worker_exit(Pid, ExitStatus),
+ {noreply, State};
+
+handle_info(Info, State) ->
+ warning_msg("received unknown info: ~n~p", [Info]),
+ {noreply, State}.
+
+
+%%--------------------------------------------------------------------
+%% Func: terminate/2
+%% Purpose: Shutdown the server
+%% Returns: any (ignored by gen_server)
+%%--------------------------------------------------------------------
+terminate(Reason, #state{log = Log, irgc = IrGcRef}) ->
+ ?vdebug("terminate: ~p", [Reason]),
+ irgc_stop(IrGcRef),
+ %% Close logs
+ do_close_log(Log),
+ ok.
+
+
+do_close_log({Log, _Type}) ->
+ (catch snmp_log:sync(Log)),
+ (catch snmp_log:close(Log)),
+ ok;
+do_close_log(_) ->
+ ok.
+
+
+%%----------------------------------------------------------------------
+%% Func: code_change/3
+%% Purpose: Convert process state when code is changed
+%% Returns: {ok, NewState}
+%%----------------------------------------------------------------------
+
+code_change(_Vsn, State, _Extra) ->
+ ?d("code_change -> entry with"
+ "~n Vsn: ~p"
+ "~n State: ~p"
+ "~n Extra: ~p", [_Vsn, State, _Extra]),
+ {ok, State}.
+
+
+%%%-------------------------------------------------------------------
+%%% Internal functions
+%%%-------------------------------------------------------------------
+
+handle_udp(Addr, Port, Bytes, State) ->
+ Verbosity = get(verbosity),
+ spawn_opt(fun() ->
+ Log = worker_init(State, Verbosity),
+ Res = (catch maybe_handle_recv_msg(
+ Addr, Port, Bytes,
+ State#state{log = Log})),
+ worker_exit(udp, {Addr, Port}, Res)
+ end,
+ [monitor]).
+
+
+maybe_handle_recv_msg(Addr, Port, Bytes, #state{filter = FilterMod} = State) ->
+ case (catch FilterMod:accept_recv(Addr, Port)) of
+ false ->
+ %% Drop the received packet
+ inc(netIfMsgInDrops),
+ ok;
+ _ ->
+ handle_recv_msg(Addr, Port, Bytes, State)
+ end.
+
+
+handle_recv_msg(Addr, Port, Bytes, #state{server = Pid})
+ when is_binary(Bytes) andalso (size(Bytes) =:= 0) ->
+ Pid ! {snmp_error, {empty_message, Addr, Port}, Addr, Port},
+ ok;
+
+handle_recv_msg(Addr, Port, Bytes,
+ #state{server = Pid,
+ note_store = NoteStore,
+ mpd_state = MpdState,
+ sock = Sock,
+ log = Log} = State) ->
+ Domain = snmp_conf:which_domain(Addr), % What the ****...
+ Logger = logger(Log, read, Addr, Port),
+ case (catch snmpm_mpd:process_msg(Bytes, Domain, Addr, Port,
+ MpdState, NoteStore, Logger)) of
+
+ {ok, Vsn, Pdu, MS, ACM} ->
+ maybe_handle_recv_pdu(Addr, Port, Vsn, Pdu, MS, ACM,
+ Logger, State);
+
+ {discarded, Reason, Report} ->
+ ?vdebug("discarded: ~p", [Reason]),
+ ErrorInfo = {failed_processing_message, Reason},
+ Pid ! {snmp_error, ErrorInfo, Addr, Port},
+ maybe_udp_send(State#state.filter, Sock, Addr, Port, Report),
+ ok;
+
+ {discarded, Reason} ->
+ ?vdebug("discarded: ~p", [Reason]),
+ ErrorInfo = {failed_processing_message, Reason},
+ Pid ! {snmp_error, ErrorInfo, Addr, Port},
+ ok;
+
+ Error ->
+ error_msg("processing of received message failed: "
+ "~n ~p", [Error]),
+ ok
+ end.
+
+
+maybe_handle_recv_pdu(Addr, Port,
+ Vsn, #pdu{type = Type} = Pdu, PduMS, ACM,
+ Logger,
+ #state{filter = FilterMod} = State) ->
+ case (catch FilterMod:accept_recv_pdu(Addr, Port, Type)) of
+ false ->
+ inc(netIfPduInDrops),
+ ok;
+ _ ->
+ handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State)
+ end;
+maybe_handle_recv_pdu(Addr, Port, Vsn, Trap, PduMS, ACM, Logger,
+ #state{filter = FilterMod} = State)
+ when is_record(Trap, trappdu) ->
+ case (catch FilterMod:accept_recv_pdu(Addr, Port, trappdu)) of
+ false ->
+ inc(netIfPduInDrops),
+ ok;
+ _ ->
+ handle_recv_pdu(Addr, Port, Vsn, Trap, PduMS, ACM, Logger, State)
+ end;
+maybe_handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State) ->
+ handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State).
+
+
+handle_recv_pdu(Addr, Port,
+ Vsn, #pdu{type = 'inform-request'} = Pdu, _PduMS, ACM,
+ Logger, #state{server = Pid, irb = IRB} = State) ->
+ handle_inform_request(IRB, Pid, Vsn, Pdu, ACM,
+ Addr, Port, Logger, State);
+handle_recv_pdu(Addr, Port,
+ _Vsn, #pdu{type = report} = Pdu, _PduMS, ok,
+ _Logger,
+ #state{server = Pid} = _State) ->
+ ?vtrace("received report - ok", []),
+ Pid ! {snmp_report, {ok, Pdu}, Addr, Port},
+ ok;
+handle_recv_pdu(Addr, Port,
+ _Vsn, #pdu{type = report} = Pdu, _PduMS,
+ {error, ReqId, Reason},
+ _Logger,
+ #state{server = Pid} = _State) ->
+ ?vtrace("received report - error", []),
+ Pid ! {snmp_report, {error, ReqId, Reason, Pdu}, Addr, Port},
+ ok;
+handle_recv_pdu(Addr, Port,
+ _Vsn, #pdu{type = 'snmpv2-trap'} = Pdu, _PduMS, _ACM,
+ _Logger,
+ #state{server = Pid} = _State) ->
+ ?vtrace("received snmpv2-trap", []),
+ Pid ! {snmp_trap, Pdu, Addr, Port},
+ ok;
+handle_recv_pdu(Addr, Port,
+ _Vsn, Trap, _PduMS, _ACM,
+ _Logger,
+ #state{server = Pid} = _State) when is_record(Trap, trappdu) ->
+ ?vtrace("received trappdu", []),
+ Pid ! {snmp_trap, Trap, Addr, Port},
+ ok;
+handle_recv_pdu(Addr, Port,
+ _Vsn, Pdu, _PduMS, _ACM,
+ _Logger,
+ #state{server = Pid} = _State) when is_record(Pdu, pdu) ->
+ ?vtrace("received pdu", []),
+ Pid ! {snmp_pdu, Pdu, Addr, Port},
+ ok;
+handle_recv_pdu(_Addr, _Port, _Vsn, Pdu, _PduMS, ACM, _Logger, _State) ->
+ ?vlog("received unexpected pdu: "
+ "~n Pdu: ~p"
+ "~n ACM: ~p", [Pdu, ACM]),
+ ok.
+
+
+handle_inform_request(auto, Pid, Vsn, Pdu, ACM, Addr, Port, Logger, State) ->
+ ?vtrace("received inform-request (true)", []),
+ Pid ! {snmp_inform, ignore, Pdu, Addr, Port},
+ RePdu = make_response_pdu(Pdu),
+ maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port, Logger, State);
+handle_inform_request({user, To}, Pid, Vsn, #pdu{request_id = ReqId} = Pdu,
+ ACM, Addr, Port, _Logger, _State) ->
+ ?vtrace("received inform-request (false)", []),
+
+ Pid ! {snmp_inform, ReqId, Pdu, Addr, Port},
+
+ %% Before we go any further, we need to check that we have not
+ %% already received this message (possible resend).
+
+ Key = {ReqId, Addr, Port},
+ case ets:lookup(snmpm_inform_request_table, Key) of
+ [_] ->
+ %% OK, we already know about this. We assume this
+ %% is a resend. Either the agent is really eager or
+ %% the user has not answered yet. Bad user!
+ ok;
+ [] ->
+ RePdu = make_response_pdu(Pdu),
+ Expire = t() + To,
+ Rec = {Key, Expire, {Vsn, ACM, RePdu}},
+ ets:insert(snmpm_inform_request_table, Rec)
+ end,
+ ok.
+
+handle_inform_response(Ref, Addr, Port, State) ->
+ Verbosity = get(verbosity),
+ spawn_opt(fun() ->
+ Log = worker_init(State, Verbosity),
+ Res = (catch do_handle_inform_response(
+ Ref,
+ Addr, Port,
+ State#state{log = Log})),
+ worker_exit(inform_reponse, {Addr, Port}, Res)
+ end,
+ [monitor]).
+
+
+
+do_handle_inform_response(Ref, Addr, Port, State) ->
+ Key = {Ref, Addr, Port},
+ case ets:lookup(snmpm_inform_request_table, Key) of
+ [{Key, _, {Vsn, ACM, RePdu}}] ->
+ Logger = logger(State#state.log, read, Addr, Port),
+ ets:delete(snmpm_inform_request_table, Key),
+ maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port,
+ Logger, State);
+ [] ->
+ %% Already acknowledged, or the user was to slow to reply...
+ ok
+ end,
+ ok.
+
+maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port, Logger,
+ #state{server = Pid,
+ sock = Sock,
+ filter = FilterMod}) ->
+ case (catch FilterMod:accept_send_pdu(Addr, Port, pdu_type_of(RePdu))) of
+ false ->
+ inc(netIfPduOutDrops),
+ ok;
+ _ ->
+ case snmpm_mpd:generate_response_msg(Vsn, RePdu, ACM, Logger) of
+ {ok, Msg} ->
+ maybe_udp_send(FilterMod, Sock, Addr, Port, Msg);
+ {discarded, Reason} ->
+ ?vlog("failed generating response message:"
+ "~n Reason: ~p", [Reason]),
+ ReqId = RePdu#pdu.request_id,
+ ErrorInfo = {failed_generating_response, {RePdu, Reason}},
+ Pid ! {snmp_error, ReqId, ErrorInfo, Addr, Port},
+ ok
+ end
+ end.
+
+handle_inform_response_gc(#state{irb = IRB} = State) ->
+ ets:safe_fixtable(snmpm_inform_request_table, true),
+ do_irgc(ets:first(snmpm_inform_request_table), t()),
+ ets:safe_fixtable(snmpm_inform_request_table, false),
+ State#state{irgc = irgc_start(IRB)}.
+
+%% We are deleting at the same time as we are traversing the table!!!
+do_irgc('$end_of_table', _) ->
+ ok;
+do_irgc(Key, Now) ->
+ Next = ets:next(snmpm_inform_request_table, Key),
+ case ets:lookup(snmpm_inform_request_table, Key) of
+ [{Key, BestBefore, _}] when BestBefore < Now ->
+ ets:delete(snmpm_inform_request_table, Key);
+ _ ->
+ ok
+ end,
+ do_irgc(Next, Now).
+
+irgc_start(auto) ->
+ undefined;
+irgc_start(_) ->
+ erlang:send_after(?IRGC_TIMEOUT, self(), inform_response_gc).
+
+irgc_stop(undefined) ->
+ ok;
+irgc_stop(Ref) ->
+ (catch erlang:cancel_timer(Ref)).
+
+
+handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port, State) ->
+ Verbosity = get(verbosity),
+ spawn_opt(fun() ->
+ Log = worker_init(State, Verbosity),
+ Res = (catch maybe_handle_send_pdu(
+ Pdu, Vsn, MsgData,
+ Domain, Addr, Port,
+ State#state{log = Log})),
+ worker_exit(send_pdu, {Domain, Addr, Port}, Res)
+ end,
+ [monitor]).
+
+maybe_handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port,
+ #state{filter = FilterMod} = State) ->
+ case (catch FilterMod:accept_send_pdu(Addr, Port, pdu_type_of(Pdu))) of
+ false ->
+ inc(netIfPduOutDrops),
+ ok;
+ _ ->
+ do_handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port, State)
+ end.
+
+do_handle_send_pdu(Pdu, Vsn, MsgData, _Domain, Addr, Port,
+ #state{server = Pid,
+ note_store = NoteStore,
+ sock = Sock,
+ log = Log,
+ filter = FilterMod}) ->
+ Logger = logger(Log, write, Addr, Port),
+ case (catch snmpm_mpd:generate_msg(Vsn, NoteStore,
+ Pdu, MsgData, Logger)) of
+ {ok, Msg} ->
+ ?vtrace("do_handle_send_pdu -> message generated", []),
+ maybe_udp_send(FilterMod, Sock, Addr, Port, Msg);
+ {discarded, Reason} ->
+ ?vlog("PDU not sent: "
+ "~n PDU: ~p"
+ "~n Reason: ~p", [Pdu, Reason]),
+ Pid ! {snmp_error, Pdu, Reason},
+ ok
+ end.
+
+
+maybe_udp_send(FilterMod, Sock, Addr, Port, Msg) ->
+ case (catch FilterMod:accept_send(Addr, Port)) of
+ false ->
+ inc(netIfMsgOutDrops),
+ ok;
+ _ ->
+ udp_send(Sock, Addr, Port, Msg)
+ end.
+
+
+udp_send(Sock, Addr, Port, Msg) ->
+ case (catch gen_udp:send(Sock, Addr, Port, Msg)) of
+ ok ->
+ ?vdebug("sent ~w bytes to ~w:~w [~w]",
+ [sz(Msg), Addr, Port, Sock]),
+ ok;
+ {error, Reason} ->
+ error_msg("failed sending message to ~p:~p: "
+ "~n ~p",[Addr, Port, Reason]),
+ ok;
+ Error ->
+ error_msg("failed sending message to ~p:~p: "
+ "~n ~p",[Addr, Port, Error]),
+ ok
+ end.
+
+sz(B) when is_binary(B) ->
+ size(B);
+sz(L) when is_list(L) ->
+ length(L);
+sz(_) ->
+ undefined.
+
+
+handle_disk_log(_Log, {wrap, NoLostItems}, State) ->
+ ?vlog("Audit Trail Log - wrapped: ~w previously logged items where lost",
+ [NoLostItems]),
+ State;
+handle_disk_log(_Log, {truncated, NoLostItems}, State) ->
+ ?vlog("Audit Trail Log - truncated: ~w items where lost when truncating",
+ [NoLostItems]),
+ State;
+handle_disk_log(_Log, full, State) ->
+ error_msg("Failed to write to Audit Trail Log (full)", []),
+ State;
+handle_disk_log(_Log, {error_status, ok}, State) ->
+ State;
+handle_disk_log(_Log, {error_status, {error, Reason}}, State) ->
+ error_msg("Error status received from Audit Trail Log: "
+ "~n~p", [Reason]),
+ State;
+handle_disk_log(_Log, _Info, State) ->
+ State.
+
+
+%% mk_discovery_msg('version-3', Pdu, _VsnHdr, UserName) ->
+%% ScopedPDU = #scopedPdu{contextEngineID = "",
+%% contextName = "",
+%% data = Pdu},
+%% Bytes = snmp_pdus:enc_scoped_pdu(ScopedPDU),
+%% MsgID = get(msg_id),
+%% put(msg_id,MsgID+1),
+%% UsmSecParams =
+%% #usmSecurityParameters{msgAuthoritativeEngineID = "",
+%% msgAuthoritativeEngineBoots = 0,
+%% msgAuthoritativeEngineTime = 0,
+%% msgUserName = UserName,
+%% msgPrivacyParameters = "",
+%% msgAuthenticationParameters = ""},
+%% SecBytes = snmp_pdus:enc_usm_security_parameters(UsmSecParams),
+%% PduType = Pdu#pdu.type,
+%% Hdr = #v3_hdr{msgID = MsgID,
+%% msgMaxSize = 1000,
+%% msgFlags = snmp_misc:mk_msg_flags(PduType, 0),
+%% msgSecurityModel = ?SEC_USM,
+%% msgSecurityParameters = SecBytes},
+%% Msg = #message{version = 'version-3', vsn_hdr = Hdr, data = Bytes},
+%% case (catch snmp_pdus:enc_message_only(Msg)) of
+%% {'EXIT', Reason} ->
+%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
+%% error;
+%% L when list(L) ->
+%% {Msg, L}
+%% end;
+%% mk_discovery_msg(Version, Pdu, {Com, _, _, _, _}, UserName) ->
+%% Msg = #message{version = Version, vsn_hdr = Com, data = Pdu},
+%% case catch snmp_pdus:enc_message(Msg) of
+%% {'EXIT', Reason} ->
+%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
+%% error;
+%% L when list(L) ->
+%% {Msg, L}
+%% end.
+
+
+%% mk_msg('version-3', Pdu, {Context, User, EngineID, CtxEngineId, SecLevel},
+%% MsgData) ->
+%% %% Code copied from snmp_mpd.erl
+%% {MsgId, SecName, SecData} =
+%% if
+%% tuple(MsgData), Pdu#pdu.type == 'get-response' ->
+%% MsgData;
+%% true ->
+%% Md = get(msg_id),
+%% put(msg_id, Md + 1),
+%% {Md, User, []}
+%% end,
+%% ScopedPDU = #scopedPdu{contextEngineID = CtxEngineId,
+%% contextName = Context,
+%% data = Pdu},
+%% ScopedPDUBytes = snmp_pdus:enc_scoped_pdu(ScopedPDU),
+
+%% PduType = Pdu#pdu.type,
+%% V3Hdr = #v3_hdr{msgID = MsgId,
+%% msgMaxSize = 1000,
+%% msgFlags = snmp_misc:mk_msg_flags(PduType, SecLevel),
+%% msgSecurityModel = ?SEC_USM},
+%% Message = #message{version = 'version-3', vsn_hdr = V3Hdr,
+%% data = ScopedPDUBytes},
+%% SecEngineID = case PduType of
+%% 'get-response' -> snmp_framework_mib:get_engine_id();
+%% _ -> EngineID
+%% end,
+%% case catch snmp_usm:generate_outgoing_msg(Message, SecEngineID,
+%% SecName, SecData, SecLevel) of
+%% {'EXIT', Reason} ->
+%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
+%% error;
+%% {error, Reason} ->
+%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
+%% error;
+%% Packet ->
+%% Packet
+%% end;
+%% mk_msg(Version, Pdu, {Com, _User, _EngineID, _Ctx, _SecLevel}, _SecData) ->
+%% Msg = #message{version = Version, vsn_hdr = Com, data = Pdu},
+%% case catch snmp_pdus:enc_message(Msg) of
+%% {'EXIT', Reason} ->
+%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
+%% error;
+%% B when list(B) ->
+%% B
+%% end.
+
+
+%% handle_system_info_updated(#state{log = {Log, _OldType}} = State,
+%% audit_trail_log_type = _What) ->
+%% %% Just to make sure, check that ATL is actually enabled
+%% case snmpm_config:system_info(audit_trail_log) of
+%% {ok, true} ->
+%% {ok, Type} = snmpm_config:system_info(audit_trail_log_type),
+%% NewState = State#state{log = {Log, Type}},
+%% {NewState, ok};
+%% _ ->
+%% {State, {error, {adt_not_enabled}}}
+%% end;
+%% handle_system_info_updated(_State, _What) ->
+%% ok.
+
+handle_get_log_type(#state{log = {_Log, Value}} = State) ->
+ %% Just to make sure, check that ATL is actually enabled
+ case snmpm_config:system_info(audit_trail_log) of
+ {ok, true} ->
+ Type =
+ case {lists:member(read, Value), lists:member(write, Value)} of
+ {true, true} ->
+ read_write;
+ {true, false} ->
+ read;
+ {false, true} ->
+ write;
+ {false, false} ->
+ throw({State, {error, {bad_atl_type, Value}}})
+ end,
+ {ok, Type};
+ _ ->
+ {error, not_enabled}
+ end;
+handle_get_log_type(_State) ->
+ {error, not_enabled}.
+
+handle_set_log_type(#state{log = {Log, OldValue}} = State, NewType) ->
+ %% Just to make sure, check that ATL is actually enabled
+ case snmpm_config:system_info(audit_trail_log) of
+ {ok, true} ->
+ NewValue =
+ case NewType of
+ read ->
+ [read];
+ write ->
+ [write];
+ read_write ->
+ [read,write];
+ _ ->
+ throw({State, {error, {bad_atl_type, NewType}}})
+ end,
+ NewState = State#state{log = {Log, NewValue}},
+ OldType =
+ case {lists:member(read, OldValue),
+ lists:member(write, OldValue)} of
+ {true, true} ->
+ read_write;
+ {true, false} ->
+ read;
+ {false, true} ->
+ write;
+ {false, false} ->
+ throw({State, {error, {bad_atl_type, OldValue}}})
+ end,
+ {NewState, {ok, OldType}};
+ _ ->
+ {State, {error, not_enabled}}
+ end;
+handle_set_log_type(State, _NewType) ->
+ {State, {error, not_enabled}}.
+
+
+%% -------------------------------------------------------------------
+
+worker_init(#state{log = undefined = Log}, Verbosity) ->
+ worker_init2(Log, Verbosity);
+worker_init(#state{log = {Name, Log, Type}}, Verbosity) ->
+ case snmp_log:open(Name, Log) of
+ {ok, NewLog} ->
+ worker_init2({Name, NewLog, Type}, Verbosity);
+ {error, Reason} ->
+ warning_msg("NetIf worker ~p failed opening ATL: "
+ "~n ~p", [self(), Reason]),
+ NewLog = undefined,
+ worker_init2({Name, NewLog, Type}, Verbosity)
+ end;
+worker_init(State, Verbosity) ->
+ ?vinfo("worker_init -> entry with invalid data: "
+ "~n State: ~p"
+ "~n Verbosity: ~p", [State, Verbosity]),
+ exit({worker_init, State, Verbosity}).
+
+worker_init2(Log, Verbosity) ->
+ put(sname, mnifw),
+ put(verbosity, Verbosity),
+ Log.
+
+
+worker_exit(Tag, Info, Result) ->
+ exit({net_if_worker, {Tag, Info, Result}}).
+
+handle_worker_exit(_, {_, _, ok}) ->
+ ok;
+handle_worker_exit(Pid, {udp, {Addr, Port}, ExitStatus}) ->
+ warning_msg("Worker process (~p) terminated "
+ "while processing (incomming) message from ~w:~w: "
+ "~n~p", [Pid, Addr, Port, ExitStatus]),
+ ok;
+handle_worker_exit(Pid, {send_pdu, {Domain, Addr, Port}, ExitStatus}) ->
+ warning_msg("Worker process (~p) terminated "
+ "while processing (outgoing) pdu for [~w] ~w:~w: "
+ "~n~p", [Pid, Domain, Addr, Port, ExitStatus]),
+ ok;
+handle_worker_exit(Pid, {inform_response, {Addr, Port}, ExitStatus}) ->
+ warning_msg("Worker process (~p) terminated "
+ "while processing (outgoing) inform response for ~w:~w: "
+ "~n~p", [Pid, Addr, Port, ExitStatus]),
+ ok;
+handle_worker_exit(_, _) ->
+ ok.
+
+
+%% -------------------------------------------------------------------
+
+make_response_pdu(#pdu{request_id = ReqId, varbinds = Vbs}) ->
+ #pdu{type = 'get-response',
+ request_id = ReqId,
+ error_status = noError,
+ error_index = 0,
+ varbinds = Vbs}.
+
+
+%% ----------------------------------------------------------------
+
+pdu_type_of(#pdu{type = Type}) ->
+ Type;
+pdu_type_of(TrapPdu) when is_record(TrapPdu, trappdu) ->
+ trap.
+
+
+%% -------------------------------------------------------------------
+
+%% At this point this function is used during testing
+maybe_process_extra_info(?DEFAULT_EXTRA_INFO) ->
+ ok;
+maybe_process_extra_info({?SNMPM_EXTRA_INFO_TAG, Fun})
+ when is_function(Fun, 0) ->
+ (catch Fun()),
+ ok;
+maybe_process_extra_info(_ExtraInfo) ->
+ ok.
+
+
+%% -------------------------------------------------------------------
+
+t() ->
+ {A,B,C} = erlang:now(),
+ A*1000000000+B*1000+(C div 1000).
+
+
+%% -------------------------------------------------------------------
+
+logger(undefined, _Type, _Addr, _Port) ->
+ fun(_) ->
+ ok
+ end;
+logger({_Name, Log, Types}, Type, Addr, Port) ->
+ case lists:member(Type, Types) of
+ true ->
+ fun(Msg) ->
+ snmp_log:log(Log, Msg, Addr, Port)
+ end;
+ false ->
+ fun(_) ->
+ ok
+ end
+ end.
+
+
+%% -------------------------------------------------------------------
+
+%% info_msg(F, A) ->
+%% ?snmpm_info("NET-IF server: " ++ F, A).
+
+warning_msg(F, A) ->
+ ?snmpm_warning("NET-IF server: " ++ F, A).
+
+error_msg(F, A) ->
+ ?snmpm_error("NET-IF server: " ++ F, A).
+
+
+
+%%%-------------------------------------------------------------------
+
+% get_opt(Key, Opts) ->
+% ?vtrace("get option ~w", [Key]),
+% snmp_misc:get_option(Key, Opts).
+
+get_opt(Opts, Key, Def) ->
+ ?vtrace("get option ~w with default ~p", [Key, Def]),
+ snmp_misc:get_option(Key, Opts, Def).
+
+
+%% -------------------------------------------------------------------
+
+get_info(#state{sock = Id}) ->
+ ProcSize = proc_mem(self()),
+ PortInfo = get_port_info(Id),
+ [{process_memory, ProcSize}, {port_info, PortInfo}].
+
+proc_mem(P) when is_pid(P) ->
+ case (catch erlang:process_info(P, memory)) of
+ {memory, Sz} when is_integer(Sz) ->
+ Sz;
+ _ ->
+ undefined
+ end.
+%% proc_mem(_) ->
+%% undefined.
+
+
+get_port_info(Id) ->
+ PortInfo =
+ case (catch erlang:port_info(Id)) of
+ PI when is_list(PI) ->
+ [{port_info, PI}];
+ _ ->
+ []
+ end,
+ PortStatus =
+ case (catch prim_inet:getstatus(Id)) of
+ {ok, PS} ->
+ [{port_status, PS}];
+ _ ->
+ []
+ end,
+ PortAct =
+ case (catch inet:getopts(Id, [active])) of
+ {ok, PA} ->
+ [{port_act, PA}];
+ _ ->
+ []
+ end,
+ PortStats =
+ case (catch inet:getstat(Id)) of
+ {ok, Stat} ->
+ [{port_stats, Stat}];
+ _ ->
+ []
+ end,
+ IfList =
+ case (catch inet:getif(Id)) of
+ {ok, IFs} ->
+ [{interfaces, IFs}];
+ _ ->
+ []
+ end,
+ BufSz =
+ case (catch inet:getopts(Id, [recbuf, sndbuf, buffer])) of
+ {ok, Sz} ->
+ [{buffer_size, Sz}];
+ _ ->
+ []
+ end,
+ [{socket, Id}] ++
+ IfList ++
+ PortStats ++
+ PortInfo ++
+ PortStatus ++
+ PortAct ++
+ BufSz.
+
+
+%%-----------------------------------------------------------------
+%% Counter functions
+%%-----------------------------------------------------------------
+init_counters() ->
+ F = fun(Counter) -> maybe_create_counter(Counter) end,
+ lists:map(F, counters()).
+
+reset_counters() ->
+ F = fun(Counter) -> snmpm_config:reset_stats_counter(Counter) end,
+ lists:map(F, counters()).
+
+maybe_create_counter(Counter) ->
+ snmpm_config:maybe_cre_stats_counter(Counter, 0).
+
+counters() ->
+ [
+ netIfMsgOutDrops,
+ netIfMsgInDrops,
+ netIfPduOutDrops,
+ netIfPduInDrops
+ ].
+
+inc(Name) -> inc(Name, 1).
+inc(Name, N) -> snmpm_config:incr_stats_counter(Name, N).
+
+%% get_counters() ->
+%% Counters = counters(),
+%% get_counters(Counters, []).
+
+%% get_counters([], Acc) ->
+%% lists:reverse(Acc);
+%% get_counters([Counter|Counters], Acc) ->
+%% case snmpm_config:get_stats_counter(Counter) of
+%% {ok, CounterVal} ->
+%% get_counters(Counters, [{Counter, CounterVal}|Acc]);
+%% _ ->
+%% get_counters(Counters, Acc)
+%% end.
+
+
+%% ----------------------------------------------------------------
+
+call(Pid, Req) ->
+ call(Pid, Req, infinity).
+
+call(Pid, Req, Timeout) ->
+ gen_server:call(Pid, Req, Timeout).
+
+cast(Pid, Msg) ->
+ gen_server:cast(Pid, Msg).
+
diff --git a/lib/snmp/src/misc/snmp_conf.erl b/lib/snmp/src/misc/snmp_conf.erl
index 7249def24e..e1e7fab57b 100644
--- a/lib/snmp/src/misc/snmp_conf.erl
+++ b/lib/snmp/src/misc/snmp_conf.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,6 +71,18 @@
%%-----------------------------------------------------------------
+%% read_files(Dir, Files) -> Configs
+%% Dir - string() - Full path to the config dir.
+%% Files - [{Gen, Filter, Check, FileName}]
+%% Gen - function/2 - In case of failure when reading the config file,
+%% this function is called to either generate a
+%% default file or issue the error.
+%% Filter - function/1 - Filters all the config entries read from the file
+%% Check - function/1 - Check each entry as they are read from the file.
+%% FileName - string() - Name of the config file.
+%% Configs - [config_entry()]
+%% config_entry() - term()
+
read_files(Dir, Files) when is_list(Dir) andalso is_list(Files) ->
read_files(Dir, Files, []).
@@ -90,7 +102,7 @@ read_files(Dir, [{Gen, Filter, Check, FileName}|Files], Res)
{error, R} ->
?vlog("failed reading file info for ~s: "
"~n ~p", [FileName, R]),
- Gen(Dir),
+ Gen(Dir, R),
read_files(Dir, Files, [Filter([])|Res])
end.
@@ -99,6 +111,7 @@ read_files(Dir, [{Gen, Filter, Check, FileName}|Files], Res)
read(File, Check) when is_function(Check) ->
?vdebug("read -> entry with"
"~n File: ~p", [File]),
+
Fd = open_file(File),
case loop(Fd, [], Check, 1, File) of
diff --git a/lib/snmp/src/misc/snmp_config.erl b/lib/snmp/src/misc/snmp_config.erl
index 6ab20e3e48..1da2c339c7 100644
--- a/lib/snmp/src/misc/snmp_config.erl
+++ b/lib/snmp/src/misc/snmp_config.erl
@@ -90,6 +90,17 @@
]).
+-export_type([void/0,
+ verify_config_entry_function/0,
+ verify_config_function/0,
+ write_config_function/0]).
+
+
+%%----------------------------------------------------------------------
+
+-type void() :: term(). % Any value - ignored
+
+
%%----------------------------------------------------------------------
%% Handy SNMP configuration
%%----------------------------------------------------------------------
@@ -2356,53 +2367,109 @@ write_sys_config_file_manager_atl_opt(Fid, {seqno, SeqNo}) ->
header() ->
- {Y,Mo,D} = date(),
- {H,Mi,S} = time(),
+ {Y, Mo, D} = date(),
+ {H, Mi, S} = time(),
io_lib:format("%% This file was generated by "
- "snmp_config (version-~s) ~w-~2.2.0w-~2.2.0w "
+ "~w (version-~s) ~w-~2.2.0w-~2.2.0w "
"~2.2.0w:~2.2.0w:~2.2.0w\n",
- [?version,Y,Mo,D,H,Mi,S]).
+ [?MODULE, ?version, Y, Mo, D, H, Mi, S]).
+
+%% *If* these functions are successfull, they successfully return anything
+%% (which is ignored), but they fail with either a throw or an exit or
+%% something similar.
+
+%% Verification of one config entry read from a file
+-type(verify_config_entry_function() ::
+ fun((Entry :: term()) -> ok | {error, Reason :: term()})).
+
+%% Verification of config to be written
+-type(verify_config_function() ::
+ fun(() -> void())).
+
+%% Write config to file (as defined by Fd)
+-type(write_config_function() ::
+ fun((Fd :: file:io_device()) -> void())).
+
+-spec write_config_file(Dir :: string(),
+ FileName :: string(),
+ Verify :: verify_config_function(),
+ Write :: write_config_function()) ->
+ ok | {error, Reason :: term()}.
write_config_file(Dir, FileName, Verify, Write)
when (is_list(Dir) andalso
is_list(FileName) andalso
is_function(Verify) andalso
is_function(Write)) ->
- (catch do_write_config_file(Dir, FileName, Verify, Write)).
+ try
+ begin
+ do_write_config_file(Dir, FileName, Verify, Write)
+ end
+ catch
+ throw:Error ->
+ Error;
+ T:E ->
+ {error, {failed_write, Dir, FileName, T, E}}
+ end.
+
do_write_config_file(Dir, FileName, Verify, Write) ->
Verify(),
case file:open(filename:join(Dir, FileName), [write]) of
{ok, Fd} ->
- (catch Write(Fd)),
- file:close(Fd),
- ok;
+ file_write_and_close(Write, Fd, Dir, FileName);
Error ->
Error
end.
-
append_config_file(Dir, FileName, Verify, Write)
when (is_list(Dir) andalso
is_list(FileName) andalso
is_function(Verify) andalso
is_function(Write)) ->
- (catch do_append_config_file(Dir, FileName, Verify, Write)).
+ try
+ begin
+ do_append_config_file(Dir, FileName, Verify, Write)
+ end
+ catch
+ throw:Error ->
+ Error;
+ T:E ->
+ {error, {failed_append, Dir, FileName, T, E}}
+ end.
do_append_config_file(Dir, FileName, Verify, Write) ->
Verify(),
case file:open(filename:join(Dir, FileName), [read, write]) of
{ok, Fd} ->
file:position(Fd, eof),
- (catch Write(Fd)),
- file:close(Fd),
- ok;
+ file_write_and_close(Write, Fd, Dir, FileName);
Error ->
Error
end.
+file_write_and_close(Write, Fd, Dir, FileName) ->
+ ok = Write(Fd),
+ case file:sync(Fd) of
+ ok ->
+ case file:close(Fd) of
+ ok ->
+ ok;
+ {error, Reason} ->
+ {error, {failed_closing, Dir, FileName, Reason}}
+ end;
+ {error, Reason} ->
+ {error, {failed_syncing, Dir, FileName, Reason}}
+ end.
+
+
+-spec read_config_file(Dir :: string(),
+ FileName :: string(),
+ Verify :: verify_config_entry_function()) ->
+ {ok, Config :: list()} | {error, Reason :: term()}.
+
read_config_file(Dir, FileName, Verify)
when is_list(Dir) andalso is_list(FileName) andalso is_function(Verify) ->
(catch do_read_config_file(Dir, FileName, Verify)).
diff --git a/lib/snmp/src/misc/snmp_log.erl b/lib/snmp/src/misc/snmp_log.erl
index 2c781810ef..a8c5df0b64 100644
--- a/lib/snmp/src/misc/snmp_log.erl
+++ b/lib/snmp/src/misc/snmp_log.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,7 +21,7 @@
-export([
- create/4, create/5, create/6,
+ create/4, create/5, create/6, open/1, open/2,
change_size/2, close/1, sync/1, info/1,
log/4,
log_to_txt/5, log_to_txt/6, log_to_txt/7,
@@ -109,6 +109,24 @@ create(Name, File, SeqNoGen, Size, Repair, Notify) ->
{error, {bad_args, Name, File, SeqNoGen, Size, Repair, Notify}}.
+%% -- open ---
+
+%% Open an already existing ( = open ) log
+
+open(Name) ->
+ open(Name, #snmp_log{seqno = disabled}).
+open(Name, #snmp_log{seqno = SeqNoGen} = _OldLog) ->
+ %% We include mode in the opts just to be on the safe side
+ case disk_log:open([{name, Name}, {mode, read_write}]) of
+ {ok, Log} ->
+ %% SeqNo must be proprly initiated also
+ {ok, #snmp_log{id = Log, seqno = SeqNoGen}};
+ {repaired, Log, _RecBytes, _BadBytes} ->
+ {ok, #snmp_log{id = Log, seqno = SeqNoGen}};
+ ERROR ->
+ ERROR
+ end.
+
%% -- close ---
@@ -394,6 +412,14 @@ log_to_io(Log, FileName, Dir, Mibs, Start) ->
log_to_io(Log, FileName, Dir, Mibs, Start, Stop)
when is_list(Mibs) ->
+ ?vtrace("log_to_io -> entry with"
+ "~n Log: ~p"
+ "~n FileName: ~p"
+ "~n Dir: ~p"
+ "~n Mibs: ~p"
+ "~n Start: ~p"
+ "~n Stop: ~p",
+ [Log, FileName, Dir, Mibs, Start, Stop]),
File = filename:join(Dir, FileName),
Converter = fun(L) ->
do_log_to_io(L, Mibs, Start, Stop)
@@ -401,28 +427,10 @@ log_to_io(Log, FileName, Dir, Mibs, Start, Stop)
log_convert(Log, File, Converter).
-%% -- log_to_plain ---
-
-%% log_to_plain(Log, FileName, Dir) ->
-%% log_to_plain(Log, FileName, Dir, null, null).
-
-%% log_to_plain(Log, FileName, Dir, Start) ->
-%% log_to_plain(Log, FileName, Dir, Start, null).
-
-%% log_to_plain(Log, FileName, Dir, Start, Stop)
-%% when is_list(Mibs) ->
-%% File = filename:join(Dir, FileName),
-%% Converter = fun(L) ->
-%% do_log_to_plain(L, Start, Stop)
-%% end,
-%% log_convert(Log, File, Converter).
-
-
%% --------------------------------------------------------------------
%% Internal functions
%% --------------------------------------------------------------------
-
%% -- log_convert ---
log_convert(#snmp_log{id = Log}, File, Converter) ->
@@ -431,6 +439,26 @@ log_convert(Log, File, Converter) ->
do_log_convert(Log, File, Converter).
do_log_convert(Log, File, Converter) ->
+ %% ?vtrace("do_log_converter -> entry with"
+ %% "~n Log: ~p"
+ %% "~n File: ~p"
+ %% "~n disk_log:info(Log): ~p", [Log, File, disk_log:info(Log)]),
+ {Pid, Ref} =
+ erlang:spawn_monitor(
+ fun() ->
+ Result = do_log_convert2(Log, File, Converter),
+ exit(Result)
+ end),
+ receive
+ {'DOWN', Ref, process, Pid, Result} ->
+ %% ?vtrace("do_log_converter -> received result"
+ %% "~n Result: ~p"
+ %% "~n disk_log:info(Log): ~p",
+ %% [Result, disk_log:info(Log)]),
+ Result
+ end.
+
+do_log_convert2(Log, File, Converter) ->
%% First check if the caller process has already opened the
%% log, because if we close an already open log we will cause
%% a runtime error.
@@ -439,29 +467,18 @@ do_log_convert(Log, File, Converter) ->
Converter(Log);
false ->
%% Not yet member of the ruling party, apply for membership...
- %% If a log is opened as read_write it is not possible to
- %% open it as read_only. So, to get around this we open
- %% it under a different name...
- Log2 = convert_name(Log),
- case log_open(Log2, File) of
+ case log_open(Log, File) of
{ok, _} ->
- Res = Converter(Log2),
- disk_log:close(Log2),
+ Res = Converter(Log),
+ disk_log:close(Log),
Res;
{error, {name_already_open, _}} ->
- Converter(Log2);
+ Converter(Log);
{error, Reason} ->
{error, {Log, Reason}}
end
end.
-convert_name(Name) when is_list(Name) ->
- Name ++ "_tmp";
-convert_name(Name) when is_atom(Name) ->
- list_to_atom(atom_to_list(Name) ++ "_tmp");
-convert_name(Name) ->
- lists:flatten(io_lib:format("~w_tmp", [Name])).
-
%% -- do_log_to_text ---
@@ -705,21 +722,21 @@ tsf_ge(_Local,Universal,{universal_time,DateTime}) ->
tsf_ge(Local,_Universal,DateTime) ->
tsf_ge(Local,DateTime).
-tsf_ge(TimeStamp,DateTime) ->
+tsf_ge(TimeStamp, DateTime) ->
T1 = calendar:datetime_to_gregorian_seconds(TimeStamp),
T2 = calendar:datetime_to_gregorian_seconds(DateTime),
T1 >= T2.
-tsf_le(_Local,_Universal,null) ->
+tsf_le(_Local, _Universal, null) ->
true;
-tsf_le(Local,_Universal,{local_time,DateTime}) ->
- tsf_le(Local,DateTime);
-tsf_le(_Local,Universal,{universal_time,DateTime}) ->
- tsf_le(Universal,DateTime);
-tsf_le(Local,_Universal,DateTime) ->
+tsf_le(Local, _Universal, {local_time, DateTime}) ->
+ tsf_le(Local, DateTime);
+tsf_le(_Local, Universal, {universal_time, DateTime}) ->
+ tsf_le(Universal, DateTime);
+tsf_le(Local, _Universal, DateTime) ->
tsf_le(Local,DateTime).
-tsf_le(TimeStamp,DateTime) ->
+tsf_le(TimeStamp, DateTime) ->
T1 = calendar:datetime_to_gregorian_seconds(TimeStamp),
T2 = calendar:datetime_to_gregorian_seconds(DateTime),
T1 =< T2.
@@ -864,11 +881,8 @@ do_std_log_open(Name, File, Size, Repair, Notify) ->
log_open(Name, File) ->
- Opts = [{name, Name},
- {file, File},
- {type, ?LOG_TYPE},
- {format, ?LOG_FORMAT},
- {mode, read_only}],
+ Opts = [{name, Name},
+ {file, File}],
case disk_log:open(Opts) of
{error, {badarg, size}} ->
{error, no_such_log};
diff --git a/lib/snmp/src/misc/snmp_verbosity.erl b/lib/snmp/src/misc/snmp_verbosity.erl
index 85037ba2ae..df5986b7bc 100644
--- a/lib/snmp/src/misc/snmp_verbosity.erl
+++ b/lib/snmp/src/misc/snmp_verbosity.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -76,7 +76,7 @@ format_timestamp({_N1, _N2, N3} = Now) ->
{YYYY,MM,DD} = Date,
{Hour,Min,Sec} = Time,
FormatDate =
- io_lib:format("~.4w:~.2.0w:~.2.0w ~.2.0w:~.2.0w:~.2.0w 4~w",
+ io_lib:format("~.4w:~.2.0w:~.2.0w ~.2.0w:~.2.0w:~.2.0w ~w",
[YYYY,MM,DD,Hour,Min,Sec,round(N3/1000)]),
lists:flatten(FormatDate).
@@ -144,6 +144,8 @@ image_of_sname(mse) -> "M-SERVER";
image_of_sname(msew) -> io_lib:format("M-SERVER-worker(~p)", [self()]);
image_of_sname(mns) -> "M-NOTE-STORE";
image_of_sname(mnif) -> "M-NET-IF";
+image_of_sname(mnifl) -> "M-NET-IF-LOGGER";
+image_of_sname(mnifw) -> io_lib:format("M-NET-IF-worker(~p)", [self()]);
image_of_sname(mconf) -> "M-CONF";
image_of_sname(mgr) -> "MGR";
diff --git a/lib/snmp/test/Makefile b/lib/snmp/test/Makefile
index 78ffb1c255..8c1f53e51a 100644
--- a/lib/snmp/test/Makefile
+++ b/lib/snmp/test/Makefile
@@ -224,6 +224,9 @@ $(SNMP_BIN_TARGET_DIR)/Klas4.bin: $(SNMP_BIN_TARGET_DIR)/Klas3.bin
$(SNMP_BIN_TARGET_DIR)/SA-MIB.bin: $(SNMP_BIN_TARGET_DIR)/OLD-SNMPEA-MIB.bin
+$(SNMP_BIN_TARGET_DIR)/Test3.bin: $(SNMP_BIN_TARGET_DIR)/Test2.bin
+
+
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
diff --git a/lib/snmp/test/exp/.gitignore b/lib/snmp/test/exp/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/snmp/test/exp/.gitignore
diff --git a/lib/snmp/test/snmp_agent_bl_test.erl b/lib/snmp/test/exp/snmp_agent_bl_test.erl
index b17489a755..b17489a755 100644
--- a/lib/snmp/test/snmp_agent_bl_test.erl
+++ b/lib/snmp/test/exp/snmp_agent_bl_test.erl
diff --git a/lib/snmp/test/snmp_agent_ms_test.erl b/lib/snmp/test/exp/snmp_agent_ms_test.erl
index 1f34f1c8d1..1f34f1c8d1 100644
--- a/lib/snmp/test/snmp_agent_ms_test.erl
+++ b/lib/snmp/test/exp/snmp_agent_ms_test.erl
diff --git a/lib/snmp/test/snmp_agent_mt_test.erl b/lib/snmp/test/exp/snmp_agent_mt_test.erl
index 4f125c0017..4f125c0017 100644
--- a/lib/snmp/test/snmp_agent_mt_test.erl
+++ b/lib/snmp/test/exp/snmp_agent_mt_test.erl
diff --git a/lib/snmp/test/snmp_agent_v1_test.erl b/lib/snmp/test/exp/snmp_agent_v1_test.erl
index 737bb25cc3..737bb25cc3 100644
--- a/lib/snmp/test/snmp_agent_v1_test.erl
+++ b/lib/snmp/test/exp/snmp_agent_v1_test.erl
diff --git a/lib/snmp/test/snmp_agent_v2_test.erl b/lib/snmp/test/exp/snmp_agent_v2_test.erl
index dc94c18ad9..dc94c18ad9 100644
--- a/lib/snmp/test/snmp_agent_v2_test.erl
+++ b/lib/snmp/test/exp/snmp_agent_v2_test.erl
diff --git a/lib/snmp/test/snmp_agent_v3_test.erl b/lib/snmp/test/exp/snmp_agent_v3_test.erl
index 266be72878..266be72878 100644
--- a/lib/snmp/test/snmp_agent_v3_test.erl
+++ b/lib/snmp/test/exp/snmp_agent_v3_test.erl
diff --git a/lib/snmp/test/modules.mk b/lib/snmp/test/modules.mk
index eacc749b53..7b0bdc5b8f 100644
--- a/lib/snmp/test/modules.mk
+++ b/lib/snmp/test/modules.mk
@@ -76,7 +76,8 @@ MIB_FILES = \
TestTrap.mib \
TestTrapv2.mib \
Test1.mib \
- Test2.mib
+ Test2.mib \
+ Test3.mib
SPECS = snmp.spec snmp.spec.vxworks
diff --git a/lib/snmp/test/snmp_SUITE.erl b/lib/snmp/test/snmp_SUITE.erl
index b6d72da2fa..22b9c64588 100644
--- a/lib/snmp/test/snmp_SUITE.erl
+++ b/lib/snmp/test/snmp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,6 +19,8 @@
-module(snmp_SUITE).
+-include("snmp_test_lib.hrl").
+
-export([all/0,
suite/0,
groups/0,
@@ -39,6 +41,21 @@ end_per_testcase(_Case, Config) when is_list(Config) ->
Config.
+init_per_suite(Config) when is_list(Config) ->
+
+ ?DBG("init_per_suite -> entry with"
+ "~n Config: ~p", [Config]),
+
+ Config.
+
+end_per_suite(Config) when is_list(Config) ->
+
+ ?DBG("end_per_suite -> entry with"
+ "~n Config: ~p", [Config]),
+
+ Config.
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Top test case
@@ -53,7 +70,8 @@ all() ->
{group, manager}].
groups() ->
- [{app, [], [{group, app_test},
+ [
+ {app, [], [{group, app_test},
{group, appup_test}]},
{compiler, [], [{group, compiler_test}]},
{misc, [], [{group, conf_test},
@@ -66,6 +84,7 @@ groups() ->
{manager, [], [{group, manager_config_test},
{group, manager_user_test},
{group, manager_test}]},
+
{app_test, [], [{snmp_app_test, all}]},
{appup_test, [], [{snmp_appup_test, all}]},
{compiler_test, [], [{snmp_compiler_test, all}]},
@@ -78,17 +97,25 @@ groups() ->
{agent_test, [], [{snmp_agent_test, all}]},
{manager_config_test, [], [{snmp_manager_config_test, all}]},
{manager_user_test, [], [{snmp_manager_user_test, all}]},
- {manager_test, [], [{snmp_manager_test, all}]}].
+ {manager_test, [], [{snmp_manager_test, all}]}
+ ].
-init_per_suite(Config) ->
- Config.
-end_per_suite(_Config) ->
- ok.
+init_per_group(GroupName, Config0) ->
-init_per_group(_GroupName, Config) ->
- Config.
+ ?DBG("init_per_group -> entry with"
+ "~n GroupName: ~p"
+ "~n Config0: ~p", [GroupName, Config0]),
+
+ %% Group name is not really the suite name
+ %% (but it is a good enough approximation),
+ %% but it does not matter since we only need
+ %% it to be unique.
+ snmp_test_lib:init_suite_top_dir(GroupName, Config0).
+
end_per_group(_GroupName, Config) ->
- Config.
+ lists:keydelete(snmp_suite_top_dir, 1, Config).
+
+
diff --git a/lib/snmp/test/snmp_agent_test.erl b/lib/snmp/test/snmp_agent_test.erl
index e968bc65b1..8ee5dd534d 100644
--- a/lib/snmp/test/snmp_agent_test.erl
+++ b/lib/snmp/test/snmp_agent_test.erl
@@ -224,52 +224,82 @@ groups() ->
},
{tickets2, [], [otp8395, otp9884]},
{otp_4394, [], [otp_4394_test]},
- {otp_7157, [], [otp_7157_test]
- }
+ {otp_7157, [], [otp_7157_test]}
].
-init_per_group(all_tcs, Config) ->
- init_all(Config);
-init_per_group(otp_7157, Config) ->
- init_otp_7157(Config);
-init_per_group(otp_4394, Config) ->
- init_otp_4394(Config);
-init_per_group(v2_inform, Config) ->
- init_v2_inform(Config);
-init_per_group(multiple_reqs_2, Config) ->
- init_mul(Config);
-init_per_group(multiple_reqs, Config) ->
- init_mul(Config);
-init_per_group(test_multi_threaded, Config) ->
- init_mt(Config);
-init_per_group(test_v3, Config) ->
- init_v3(Config);
-init_per_group(test_v1_v2, Config) ->
- init_v1_v2(Config);
-init_per_group(test_v2, Config) ->
- init_v2(Config);
-init_per_group(test_v1, Config) ->
- init_v1(Config);
-init_per_group(misc, Config) ->
- init_misc(Config);
-init_per_group(mib_storage_varm_mnesia, Config) ->
- init_varm_mib_storage_mnesia(Config);
-init_per_group(mib_storage_varm_dets, Config) ->
- init_varm_mib_storage_dets(Config);
-init_per_group(mib_storage_size_check_mnesia, Config) ->
- init_size_check_msm(Config);
-init_per_group(mib_storage_size_check_dets, Config) ->
- init_size_check_msd(Config);
-init_per_group(mib_storage_size_check_ets, Config) ->
- init_size_check_mse(Config);
-init_per_group(mib_storage_mnesia, Config) ->
- init_mib_storage_mnesia(Config);
-init_per_group(mib_storage_dets, Config) ->
- init_mib_storage_dets(Config);
-init_per_group(mib_storage_ets, Config) ->
- init_mib_storage_ets(Config);
-init_per_group(_GroupName, Config) ->
- Config.
+
+init_per_suite(Config0) when is_list(Config0) ->
+
+ ?DBG("init_per_suite -> entry with"
+ "~n Config0: ~p", [Config0]),
+
+ Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0),
+ Config2 = snmp_test_lib:fix_data_dir(Config1),
+
+ %% Mib-dirs
+ MibDir = snmp_test_lib:lookup(data_dir, Config2),
+ StdMibDir = filename:join([code:priv_dir(snmp), "mibs"]),
+
+ Config3 = [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2],
+
+ ?DBG("init_per_suite -> end with"
+ "~n Config3: ~p", [Config3]),
+
+ Config3.
+
+end_per_suite(Config) when is_list(Config) ->
+
+ ?DBG("end_per_suite -> entry with"
+ "~n Config: ~p", [Config]),
+
+ Config.
+
+
+init_per_group(all_tcs = GroupName, Config) ->
+ init_all(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(otp_7157 = GroupName, Config) ->
+ init_otp_7157(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(otp_4394 = GroupName, Config) ->
+ init_otp_4394(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(v2_inform = GroupName, Config) ->
+ init_v2_inform(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(multiple_reqs_2 = GroupName, Config) ->
+ init_mul(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(multiple_reqs = GroupName, Config) ->
+ init_mul(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(test_multi_threaded = GroupName, Config) ->
+ init_mt(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(test_v3 = GroupName, Config) ->
+ init_v3(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(test_v1_v2 = GroupName, Config) ->
+ init_v1_v2(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(test_v2 = GroupName, Config) ->
+ init_v2(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(test_v1 = GroupName, Config) ->
+ init_v1(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(misc = GroupName, Config) ->
+ init_misc(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(mib_storage_varm_mnesia = GroupName, Config) ->
+ init_varm_mib_storage_mnesia(snmp_test_lib:init_group_top_dir(GroupName,
+ Config));
+init_per_group(mib_storage_varm_dets = GroupName, Config) ->
+ init_varm_mib_storage_dets(snmp_test_lib:init_group_top_dir(GroupName,
+ Config));
+init_per_group(mib_storage_size_check_mnesia = GroupName, Config) ->
+ init_size_check_msm(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(mib_storage_size_check_dets = GroupName, Config) ->
+ init_size_check_msd(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(mib_storage_size_check_ets = GroupName, Config) ->
+ init_size_check_mse(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(mib_storage_mnesia = GroupName, Config) ->
+ init_mib_storage_mnesia(snmp_test_lib:init_group_top_dir(GroupName,
+ Config));
+init_per_group(mib_storage_dets = GroupName, Config) ->
+ init_mib_storage_dets(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(mib_storage_ets = GroupName, Config) ->
+ init_mib_storage_ets(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(GroupName, Config) ->
+ snmp_test_lib:init_group_top_dir(GroupName, Config).
end_per_group(all_tcs, Config) ->
finish_all(Config);
@@ -320,38 +350,36 @@ init_per_testcase(otp8395 = Case, Config) when is_list(Config) ->
?DBG("init_per_testcase -> entry with"
"~n Case: ~p"
"~n Config: ~p", [Case, Config]),
- Config2 = init_per_testcase2(Case, init_per_suite(Config)),
- otp8395({init, Config2});
+ otp8395({init, init_per_testcase2(Case, Config)});
init_per_testcase(otp9884 = Case, Config) when is_list(Config) ->
?DBG("init_per_testcase -> entry with"
"~n Case: ~p"
"~n Config: ~p", [Case, Config]),
- Config2 = init_per_testcase2(Case, init_per_suite(Config)),
- otp9884({init, Config2});
+ otp9884({init, init_per_testcase2(Case, Config)});
init_per_testcase(otp_7157_test = _Case, Config) when is_list(Config) ->
?DBG("init_per_testcase -> entry with"
"~n Case: ~p"
"~n Config: ~p", [_Case, Config]),
Dog = ?WD_START(?MINS(1)),
- [{watchdog, Dog}|Config];
+ [{watchdog, Dog} | Config ];
init_per_testcase(v2_inform_i = _Case, Config) when is_list(Config) ->
?DBG("init_per_testcase -> entry with"
"~n Case: ~p"
"~n Config: ~p", [_Case, Config]),
Dog = ?WD_START(?MINS(10)),
- [{watchdog, Dog}|Config];
+ [{watchdog, Dog} | Config ];
init_per_testcase(v3_inform_i = _Case, Config) when is_list(Config) ->
?DBG("init_per_testcase -> entry with"
"~n Case: ~p"
"~n Config: ~p", [_Case, Config]),
Dog = ?WD_START(?MINS(10)),
- [{watchdog, Dog}|Config];
+ [{watchdog, Dog} | Config ];
init_per_testcase(_Case, Config) when is_list(Config) ->
?DBG("init_per_testcase -> entry with"
"~n Case: ~p"
"~n Config: ~p", [_Case, Config]),
Dog = ?WD_START(?MINS(6)),
- [{watchdog, Dog}|Config].
+ [{watchdog, Dog}| Config ].
end_per_testcase(otp8395, Config) when is_list(Config) ->
otp8395({fin, Config});
@@ -366,65 +394,13 @@ end_per_testcase(_Case, Config) when is_list(Config) ->
Config.
-init_per_suite(Config) ->
- ?DBG("init_per_suite -> entry with"
- "~n Config: ~p", [Config]),
-
- %% Suite root dir for test suite
- PrivDir = ?config(priv_dir, Config),
-
- %% Create top-directory for this sub-suite
- SuiteTopDir = filename:join([PrivDir, ?MODULE]),
- case file:make_dir(SuiteTopDir) of
- ok ->
- ok;
- {error, eexist} ->
- %% This can happen since this is not really a
- %% suite-init function.
- ok;
- {error, Reason} ->
- ?FAIL({failed_creating_suite_top_dir, SuiteTopDir, Reason})
- end,
-
-
- %% --
- %% Fix config (data-dir is not correct):
- %%
-
- Config1 = fix_data_dir(Config),
- %% Config1 = Config,
-
- %% Mib-dirs
- MibDir = ?config(data_dir, Config1),
- StdMibDir = filename:join([code:priv_dir(snmp), "mibs"]),
-
- Config2 = [{suite_top_dir, SuiteTopDir},
- {mib_dir, MibDir},
- {std_mib_dir, StdMibDir} | Config1],
-
- ?DBG("init_per_suite -> done when"
- "~n Config2: ~p", [Config2]),
- Config2.
-
-%% end_per_suite(Config) ->
-end_per_suite(Config) ->
- Config.
-
-fix_data_dir(Config) ->
- DataDir0 = ?config(data_dir, Config),
- DataDir1 = filename:split(filename:absname(DataDir0)),
- [_|DataDir2] = lists:reverse(DataDir1),
- DataDir = filename:join(lists:reverse(DataDir2) ++ [?snmp_test_data]),
- Config1 = lists:keydelete(data_dir, 1, Config),
- [{data_dir, DataDir} | Config1].
+init_per_testcase2(Case, Config) ->
+ ?DBG("end_per_testcase2 -> entry with"
+ "~n Case: ~p"
+ "~n Config: ~p", [Case, Config]),
-init_per_testcase2(Case, Config) ->
- SuiteToDir = ?config(suite_top_dir, Config),
-
- %% Create top-directory for this test-case
- CaseTopDir = filename:join([SuiteToDir, Case]),
- ok = file:make_dir(CaseTopDir),
+ CaseTopDir = snmp_test_lib:init_testcase_top_dir(Case, Config),
%% Create agent top-dir(s)
AgentTopDir = filename:join([CaseTopDir, agent]),
@@ -623,19 +599,19 @@ mib_storage_mnesia_cases() ->
msm_mib_of].
mse_size_check_cases() ->
-[mse_size_check].
+ [mse_size_check].
msd_size_check_cases() ->
-[msd_size_check].
+ [msd_size_check].
msm_size_check_cases() ->
-[msm_size_check].
+ [msm_size_check].
varm_mib_storage_dets_cases() ->
-[msd_varm_mib_start].
+ [msd_varm_mib_start].
varm_mib_storage_mnesia_cases() ->
-[msm_varm_mib_start].
+ [msm_varm_mib_start].
init_mib_storage_ets(Config) when is_list(Config) ->
?LOG("init_mib_storage_ets -> entry", []),
@@ -644,36 +620,37 @@ init_mib_storage_ets(Config) when is_list(Config) ->
init_mib_storage_dets(Config) when is_list(Config) ->
?LOG("init_mib_storage_ets -> entry", []),
- ?line AgentDir = ?GCONF(agent_dir, Config),
- MibStorage = {snmp_mib_storage,{dets,AgentDir}},
+ ?line AgentDbDir = ?GCONF(agent_db_dir, Config),
+ MibStorage = {snmp_mib_storage, {dets, AgentDbDir}},
init_ms(Config, [MibStorage]).
init_mib_storage_mnesia(Config) when is_list(Config) ->
?LOG("init_mib_storage_ets -> entry", []),
- MibStorage = {snmp_mib_storage,{mnesia,[]}},
+ MibStorage = {snmp_mib_storage, {mnesia,[]}},
init_ms(Config, [MibStorage]).
init_ms(Config, Opts) when is_list(Config) ->
?LOG("init_mib_storage_ets -> entry", []),
- ?line SaNode = ?GCONF(snmp_sa, Config),
+ ?line SaNode = ?GCONF(snmp_sa, Config),
?line create_tables(SaNode),
- ?line AgentDir = ?GCONF(agent_dir, Config),
- ?line MgrDir = ?GCONF(mgr_dir, Config),
- ?line Ip = ?GCONF(ip, Config),
- ?line config([v1], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
+ ?line AgentConfDir = ?GCONF(agent_conf_dir, Config),
+ ?line MgrDir = ?GCONF(mgr_dir, Config),
+ ?line Ip = ?GCONF(ip, Config),
+ ?line config([v1], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
MasterAgentVerbosity = {snmp_master_agent_verbosity, trace},
MibsVerbosity = {snmp_mibserver_verbosity, trace},
SymStoreVerbosity = {snmp_symbolic_store_verbosity, trace},
- Opts1 = [MasterAgentVerbosity,MibsVerbosity,SymStoreVerbosity|Opts],
- [{vsn, v1} | start_v1_agent(Config,Opts1)].
+ Opts1 = [MasterAgentVerbosity, MibsVerbosity, SymStoreVerbosity | Opts],
+ [{vsn, v1} | start_v1_agent(Config, Opts1)].
init_size_check_mse(Config) when is_list(Config) ->
MibStorage = {snmp_mib_storage, ets},
init_size_check_ms(Config, [MibStorage]).
init_size_check_msd(Config) when is_list(Config) ->
- AgentDir = ?GCONF(agent_dir, Config),
- MibStorage = {snmp_mib_storage, {dets, AgentDir}},
+ AgentDbDir = ?GCONF(agent_db_dir, Config),
+ MibStorage = {snmp_mib_storage, {dets, AgentDbDir}},
init_size_check_ms(Config, [MibStorage]).
init_size_check_msm(Config) when is_list(Config) ->
@@ -695,22 +672,24 @@ init_size_check_ms(Config, Opts) when is_list(Config) ->
?SKIP({failed_starting_crypto, Reason})
end,
create_tables(SaNode),
- AgentDir = ?GCONF(agent_dir, Config),
- MgrDir = ?GCONF(mgr_dir, Config),
- Ip = ?GCONF(ip, Config),
- ?line ok =
- config([v3], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
+ AgentConfDir = ?GCONF(agent_conf_dir, Config),
+ MgrDir = ?GCONF(mgr_dir, Config),
+ Ip = ?GCONF(ip, Config),
+ ?line ok = config([v3], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
[{vsn, v3} | start_v3_agent(Config, Opts)].
init_varm_mib_storage_dets(Config) when is_list(Config) ->
?LOG("init_varm_mib_storage_dets -> entry", []),
- ?line SaNode = ?GCONF(snmp_sa, Config),
+ ?line SaNode = ?GCONF(snmp_sa, Config),
?line create_tables(SaNode),
- ?line AgentDir = ?GCONF(agent_dir, Config),
- ?line MgrDir = ?GCONF(mgr_dir, Config),
- ?line Ip = ?GCONF(ip, Config),
- ?line config([v1], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
- MibStorage = {snmp_mib_storage,{dets,AgentDir}},
+ ?line AgentDbDir = ?GCONF(agent_db_dir, Config),
+ ?line AgentConfDir = ?GCONF(agent_conf_dir, Config),
+ ?line MgrDir = ?GCONF(mgr_dir, Config),
+ ?line Ip = ?GCONF(ip, Config),
+ ?line config([v1], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
+ MibStorage = {snmp_mib_storage, {dets, AgentDbDir}},
MasterAgentVerbosity = {snmp_master_agent_verbosity, trace},
MibsVerbosity = {snmp_mibserver_verbosity, trace},
SymStoreVerbosity = {snmp_symbolic_store_verbosity, trace},
@@ -719,12 +698,13 @@ init_varm_mib_storage_dets(Config) when is_list(Config) ->
init_varm_mib_storage_mnesia(Config) when is_list(Config) ->
?LOG("init_varm_mib_storage_mnesia -> entry", []),
- ?line SaNode = ?GCONF(snmp_sa, Config),
+ ?line SaNode = ?GCONF(snmp_sa, Config),
?line create_tables(SaNode),
- ?line AgentDir = ?GCONF(agent_dir, Config),
- ?line MgrDir = ?GCONF(mgr_dir, Config),
- ?line Ip = ?GCONF(ip, Config),
- ?line config([v1], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
+ ?line AgentConfDir = ?GCONF(agent_conf_dir, Config),
+ ?line MgrDir = ?GCONF(mgr_dir, Config),
+ ?line Ip = ?GCONF(ip, Config),
+ ?line config([v1], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
MibStorage = {snmp_mib_storage,{mnesia,[]}},
MasterAgentVerbosity = {snmp_master_agent_verbosity, trace},
MibsVerbosity = {snmp_mibserver_verbosity, trace},
@@ -1189,10 +1169,11 @@ v1_cases() ->
init_v1(Config) when is_list(Config) ->
?line SaNode = ?config(snmp_sa, Config),
?line create_tables(SaNode),
- ?line AgentDir = ?config(agent_dir, Config),
+ ?line AgentConfDir = ?config(agent_conf_dir, Config),
?line MgrDir = ?config(mgr_dir, Config),
?line Ip = ?config(ip, Config),
- ?line config([v1], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
+ ?line config([v1], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
[{vsn, v1} | start_v1_agent(Config)].
finish_v1(Config) when is_list(Config) ->
@@ -1232,10 +1213,11 @@ v2_cases() ->
init_v2(Config) when is_list(Config) ->
SaNode = ?config(snmp_sa, Config),
create_tables(SaNode),
- AgentDir = ?config(agent_dir, Config),
+ AgentConfDir = ?config(agent_conf_dir, Config),
MgrDir = ?config(mgr_dir, Config),
Ip = ?config(ip, Config),
- config([v2], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
+ config([v2], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
[{vsn, v2} | start_v2_agent(Config)].
finish_v2(Config) when is_list(Config) ->
@@ -1251,10 +1233,11 @@ v1_v2_cases() ->
init_v1_v2(Config) when is_list(Config) ->
SaNode = ?config(snmp_sa, Config),
create_tables(SaNode),
- AgentDir = ?config(agent_dir, Config),
+ AgentConfDir = ?config(agent_conf_dir, Config),
MgrDir = ?config(mgr_dir, Config),
Ip = ?config(ip, Config),
- config([v1,v2], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
+ config([v1,v2], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
[{vsn, bilingual} | start_bilingual_agent(Config)].
finish_v1_v2(Config) when is_list(Config) ->
@@ -1315,10 +1298,10 @@ init_v3(Config) when is_list(Config) ->
end,
SaNode = ?config(snmp_sa, Config),
create_tables(SaNode),
- AgentDir = ?config(agent_dir, Config),
+ AgentConfDir = ?config(agent_conf_dir, Config),
MgrDir = ?config(mgr_dir, Config),
Ip = ?config(ip, Config),
- ?line ok = config([v3], MgrDir, AgentDir,
+ ?line ok = config([v3], MgrDir, AgentConfDir,
tuple_to_list(Ip), tuple_to_list(Ip)),
[{vsn, v3} | start_v3_agent(Config)].
@@ -1338,11 +1321,11 @@ mt_cases() ->
init_mt(Config) when is_list(Config) ->
SaNode = ?config(snmp_sa, Config),
create_tables(SaNode),
- AgentDir = ?config(agent_dir, Config),
+ AgentConfDir = ?config(agent_conf_dir, Config),
MgrDir = ?config(mgr_dir, Config),
Ip = ?config(ip, Config),
- ?line ok =
- config([v2], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
+ ?line ok = config([v2], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
[{vsn, v2} | start_multi_threaded_agent(Config)].
finish_mt(Config) when is_list(Config) ->
@@ -1421,7 +1404,13 @@ simple(Config) when is_list(Config) ->
?P(simple),
init_case(Config),
- try_test(simple_standard_test).
+ try_test(simple_standard_test),
+
+ p("Display log"),
+ display_log(Config),
+
+ p("done"),
+ ok.
simple_2(X) -> ?P(simple_2), simple(X).
@@ -1601,7 +1590,7 @@ change_target_addr_config(Config) when is_list(Config) ->
try_test(ma_trap1, [MA]),
?LOG("change_target_addr_config -> set silence verbosity for local_db",[]),
- ?line snmpa:verbosity(local_db,silence),
+ ?line snmpa:verbosity(local_db, silence),
%% Start new dummy listener
?LOG("change_target_addr_config -> start dummy manager",[]),
@@ -1609,9 +1598,9 @@ change_target_addr_config(Config) when is_list(Config) ->
%% Reconfigure
?LOG("change_target_addr_config -> reconfigure",[]),
- AgentDir = ?config(agent_dir, Config),
- ?line rewrite_target_addr_conf(AgentDir, NewPort),
- ?line snmp_target_mib:reconfigure(AgentDir),
+ AgentConfDir = ?config(agent_conf_dir, Config),
+ ?line rewrite_target_addr_conf(AgentConfDir, NewPort),
+ ?line snmp_target_mib:reconfigure(AgentConfDir),
%% Send the trap again
?LOG("change_target_addr_config -> send trap again",[]),
@@ -1624,7 +1613,7 @@ change_target_addr_config(Config) when is_list(Config) ->
?line ok = dummy_manager_stop(Pid),
?LOG("change_target_addr_config -> reset target address config",[]),
- ?line reset_target_addr_conf(AgentDir),
+ ?line reset_target_addr_conf(AgentConfDir),
?LOG("change_target_addr_config -> unload TestTrap",[]),
?line unload_master("TestTrap").
@@ -2067,7 +2056,7 @@ v3_inform(_X) ->
{req, [], {conf, init_v3_inform, [v3_inform_i], finish_v3_inform}}.
init_v2_inform(Config) when is_list(Config) ->
- _Dir = ?config(agent_dir, Config),
+ _Dir = ?config(agent_conf_dir, Config),
%% snmp_internal_mib:configure(Dir),
Config.
@@ -2075,7 +2064,7 @@ init_v3_inform(X) ->
init_v2_inform(X).
finish_v2_inform(Config) when is_list(Config) ->
- _Dir = ?config(agent_dir, Config),
+ _Dir = ?config(agent_conf_dir, Config),
%% snmp_internal_mib:configure(Dir),
Config.
@@ -2377,9 +2366,9 @@ v3_md5_auth(Config) when is_list(Config) ->
?P1("Testing MD5 authentication...takes a few seconds..."),
- AgentDir = ?config(agent_dir, Config),
- ?line rewrite_target_params_conf(AgentDir, "authMD5", authNoPriv),
- ?line snmp_target_mib:reconfigure(AgentDir),
+ AgentConfDir = ?config(agent_conf_dir, Config),
+ ?line rewrite_target_params_conf(AgentConfDir, "authMD5", authNoPriv),
+ ?line snmp_target_mib:reconfigure(AgentConfDir),
MA = whereis(snmp_master_agent),
@@ -2388,14 +2377,14 @@ v3_md5_auth(Config) when is_list(Config) ->
?line load_master("TestTrapv2"),
try_test(v3_sync, [[{v2_proc, []},
- {ma_v2_trap1, [MA]},
- {v3_inform_sync, [MA]}]],
- [{sec_level, authNoPriv}, {user, "authMD5"}]),
+ {ma_v2_trap1, [MA]},
+ {v3_inform_sync, [MA]}]],
+ [{sec_level, authNoPriv}, {user, "authMD5"}]),
?line unload_master("TestTrapv2"),
?line unload_master("TestTrap"),
?line unload_master("Test2"),
- ?line reset_target_params_conf(AgentDir).
+ ?line reset_target_params_conf(AgentConfDir).
v3_sha_auth(suite) -> [];
v3_sha_auth(Config) when is_list(Config) ->
@@ -2404,9 +2393,9 @@ v3_sha_auth(Config) when is_list(Config) ->
?P1("Testing SHA authentication...takes a few seconds..."),
- AgentDir = ?config(agent_dir, Config),
- ?line rewrite_target_params_conf(AgentDir, "authSHA", authNoPriv),
- ?line snmp_target_mib:reconfigure(AgentDir),
+ AgentConfDir = ?config(agent_conf_dir, Config),
+ ?line rewrite_target_params_conf(AgentConfDir, "authSHA", authNoPriv),
+ ?line snmp_target_mib:reconfigure(AgentConfDir),
MA = whereis(snmp_master_agent),
@@ -2415,14 +2404,14 @@ v3_sha_auth(Config) when is_list(Config) ->
?line load_master("TestTrapv2"),
try_test(v3_sync, [[{v2_proc, []},
- {ma_v2_trap1, [MA]},
- {v3_inform_sync, [MA]}]],
- [{sec_level, authNoPriv}, {user, "authSHA"}]),
+ {ma_v2_trap1, [MA]},
+ {v3_inform_sync, [MA]}]],
+ [{sec_level, authNoPriv}, {user, "authSHA"}]),
?line unload_master("TestTrapv2"),
?line unload_master("TestTrap"),
?line unload_master("Test2"),
- ?line reset_target_params_conf(AgentDir).
+ ?line reset_target_params_conf(AgentConfDir).
v3_des_priv(suite) -> [];
v3_des_priv(Config) when is_list(Config) ->
@@ -2431,9 +2420,9 @@ v3_des_priv(Config) when is_list(Config) ->
?P1("Testing DES encryption...takes a few seconds..."),
- AgentDir = ?config(agent_dir, Config),
- ?line rewrite_target_params_conf(AgentDir, "privDES", authPriv),
- ?line snmp_target_mib:reconfigure(AgentDir),
+ AgentConfDir = ?config(agent_conf_dir, Config),
+ ?line rewrite_target_params_conf(AgentConfDir, "privDES", authPriv),
+ ?line snmp_target_mib:reconfigure(AgentConfDir),
MA = whereis(snmp_master_agent),
@@ -2444,14 +2433,14 @@ v3_des_priv(Config) when is_list(Config) ->
?line load_master("TestTrapv2"),
try_test(v3_sync, [[{v2_proc, []},
- {ma_v2_trap1, [MA]},
- {v3_inform_sync, [MA]}]],
- [{sec_level, authPriv}, {user, "privDES"}]),
+ {ma_v2_trap1, [MA]},
+ {v3_inform_sync, [MA]}]],
+ [{sec_level, authPriv}, {user, "privDES"}]),
?line unload_master("TestTrapv2"),
?line unload_master("TestTrap"),
?line unload_master("Test2"),
- ?line reset_target_params_conf(AgentDir).
+ ?line reset_target_params_conf(AgentConfDir).
%% -define(usmStatsNotInTimeWindows_instance, [1,3,6,1,6,3,15,1,1,2,0]).
@@ -4795,7 +4784,7 @@ snmp_user_based_sm_mib_3(Config) when is_list(Config) ->
?P(snmp_user_based_sm_mib_3),
init_case(Config),
- _AgentDir = ?config(agent_dir, Config),
+ _AgentDir = ?config(agent_conf_dir, Config),
?line load_master_std("SNMP-USER-BASED-SM-MIB"),
%% The newUser used here already has VACM access.
@@ -5727,28 +5716,28 @@ otp_3725_test(MaNode) ->
init_otp_4394(Config) when is_list(Config) ->
?DBG("init_otp_4394 -> entry with"
"~n Config: ~p", [Config]),
- ?line AgentDir = ?config(agent_dir, Config),
- ?line MgrDir = ?config(mgr_dir, Config),
- ?line Ip = ?config(ip, Config),
- ?line otp_4394_config(AgentDir, MgrDir, Ip),
+ ?line AgentConfDir = ?config(agent_conf_dir, Config),
+ ?line MgrDir = ?config(mgr_dir, Config),
+ ?line Ip = ?config(ip, Config),
+ ?line otp_4394_config(AgentConfDir, MgrDir, Ip),
MasterAgentVerbosity = {master_agent_verbosity, trace},
NetIfVerbosity = {net_if_verbosity, trace},
- Opts = [MasterAgentVerbosity,NetIfVerbosity],
- [{vsn, v1} | start_v1_agent(Config,Opts)].
+ Opts = [MasterAgentVerbosity, NetIfVerbosity],
+ [{vsn, v1} | start_v1_agent(Config, Opts)].
-otp_4394_config(AgentDir, MgrDir, Ip0) ->
+otp_4394_config(AgentConfDir, MgrDir, Ip0) ->
?DBG("otp_4394_config -> entry with"
- "~n AgentDir: ~p"
- "~n MgrDir: ~p"
- "~n Ip0: ~p", [AgentDir, MgrDir, Ip0]),
+ "~n AgentConfDir: ~p"
+ "~n MgrDir: ~p"
+ "~n Ip0: ~p", [AgentConfDir, MgrDir, Ip0]),
Vsn = [v1],
Ip = tuple_to_list(Ip0),
- ?line snmp_config:write_agent_snmp_files(AgentDir, Vsn, Ip,
+ ?line snmp_config:write_agent_snmp_files(AgentConfDir, Vsn, Ip,
?TRAP_UDP, Ip, 4000,
"OTP-4394 test"),
- ?line case update_usm(Vsn, AgentDir) of
+ ?line case update_usm(Vsn, AgentConfDir) of
true ->
- ?line copy_file(filename:join(AgentDir, "usm.conf"),
+ ?line copy_file(filename:join(AgentConfDir, "usm.conf"),
filename:join(MgrDir, "usm.conf")),
?line update_usm_mgr(Vsn, MgrDir);
false ->
@@ -5756,8 +5745,8 @@ otp_4394_config(AgentDir, MgrDir, Ip0) ->
end,
C1 = {"a", "all-rights", "initial", "", "pc"},
C2 = {"c", "secret", "secret_name", "", "secret_tag"},
- ?line write_community_conf(AgentDir, [C1, C2]),
- ?line update_vacm(Vsn, AgentDir),
+ ?line write_community_conf(AgentConfDir, [C1, C2]),
+ ?line update_vacm(Vsn, AgentConfDir),
Ta1 = {"shelob v1",
[134,138,177,177], 5000, 1500, 3, %% Anv�nd Ip och modda
"pc1",
@@ -5771,9 +5760,9 @@ otp_4394_config(AgentDir, MgrDir, Ip0) ->
"target_v1", "",
%% [255,255,255,255,0,0],
[], 2048},
- ?line write_target_addr_conf(AgentDir, [Ta1, Ta2]),
- ?line write_target_params_conf(AgentDir, Vsn),
- ?line write_notify_conf(AgentDir),
+ ?line write_target_addr_conf(AgentConfDir, [Ta1, Ta2]),
+ ?line write_target_params_conf(AgentConfDir, Vsn),
+ ?line write_notify_conf(AgentConfDir),
ok.
@@ -5826,10 +5815,11 @@ init_otp_7157(Config) when is_list(Config) ->
?DBG("init_otp_7157 -> entry with"
"~n Config: ~p", [Config]),
- ?line AgentDir = ?config(agent_dir, Config),
+ ?line AgentConfDir = ?config(agent_conf_dir, Config),
?line MgrDir = ?config(mgr_dir, Config),
?line Ip = ?config(ip, Config),
- ?line config([v2], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)),
+ ?line config([v2], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip)),
MasterAgentVerbosity = {master_agent_verbosity, trace},
NetIfVerbosity = {net_if_verbosity, trace},
Opts = [MasterAgentVerbosity, NetIfVerbosity],
@@ -6562,8 +6552,8 @@ write_community_conf(Dir, Conf) ->
write_target_addr_conf(Dir, Conf) ->
snmp_agent_test_lib:write_target_addr_conf(Dir, Conf).
-write_target_addr_conf(Dir, ManagerIp, UDP, Vsns) ->
- snmp_agent_test_lib:write_target_addr_conf(Dir, ManagerIp, UDP, Vsns).
+%% write_target_addr_conf(Dir, ManagerIp, UDP, Vsns) ->
+%% snmp_agent_test_lib:write_target_addr_conf(Dir, ManagerIp, UDP, Vsns).
rewrite_target_addr_conf(Dir, NewPort) ->
snmp_agent_test_lib:rewrite_target_addr_conf(Dir, NewPort).
@@ -6596,9 +6586,42 @@ copy_file(From, To) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+display_log(Config) ->
+ case lists:keysearch(agent_log_dir, 1, Config) of
+ {value, {_, Dir}} ->
+ case lists:keysearch(snmp_master, 1, Config) of
+ {value, {_, Node}} ->
+ LogDir = Dir,
+ Mibs = [],
+ OutFile = filename:join(LogDir, "snmpa_log.txt"),
+ p("~n"
+ "========================="
+ " < Audit Trail Log > "
+ "========================="
+ "~n"),
+ rcall(Node, snmpa, log_to_txt, [LogDir, Mibs, OutFile]),
+ rcall(Node, snmpa, log_to_io, [LogDir, Mibs]),
+ p("~n"
+ "========================="
+ " < / Audit Trail Log > "
+ "========================="
+ "~n", []);
+ false ->
+ p("display_log -> no agent node found"),
+ ok
+ end;
+ false ->
+ p("display_log -> no agent log dir found: "
+ "~n ~p", [Config]),
+ ok
+ end.
+
+
+%% ------
+
display_memory_usage() ->
Info = snmpa:info(snmp_master_agent),
- AMU = display_agent_memory_uasge(Info),
+ AMU = display_agent_memory_usage(Info),
NIMU = display_net_if_memory_usage(Info),
NSMU = display_note_store_memory_usage(Info),
SSMU = display_symbolic_store_memory_usage(Info),
@@ -6608,7 +6631,7 @@ display_memory_usage() ->
AMU ++ NIMU ++ NSMU ++ SSMU ++ LDBMU ++ MSMU, []),
ok.
-display_agent_memory_uasge(Info) ->
+display_agent_memory_usage(Info) ->
AgentInfo = lists_key1search(agent, Info),
ProcMem =
lists_key1search([process_memory,master_agent], AgentInfo),
@@ -6717,3 +6740,27 @@ lists_key1search(Key, List) when is_atom(Key) ->
regs() ->
lists:sort(registered()).
+
+%% ------
+
+rcall(Node, Mod, Func, Args) ->
+ case rpc:call(Node, Mod, Func, Args) of
+ {badrpc, nodedown} ->
+ ?FAIL({rpc_failure, Node});
+ Else ->
+ Else
+ end.
+
+
+%% ------
+
+p(F) ->
+ p(F, []).
+
+p(F, A) ->
+ io:format("*** [~s] ***"
+ "~n" ++ F ++ "~n", [formated_timestamp()|A]).
+
+formated_timestamp() ->
+ snmp_test_lib:formated_timestamp().
+
diff --git a/lib/snmp/test/snmp_agent_test_lib.erl b/lib/snmp/test/snmp_agent_test_lib.erl
index 084b3ee8da..cd9a87eab8 100644
--- a/lib/snmp/test/snmp_agent_test_lib.erl
+++ b/lib/snmp/test/snmp_agent_test_lib.erl
@@ -119,20 +119,10 @@
%%% didn't undo (since it failed).
%%%-----------------------------------------------------------------
-init_all(Config0) when is_list(Config0) ->
- ?LOG("init_all -> entry with"
- "~n Config0: ~p",[Config0]),
-
- %% --
- %% Fix config:
- %%
+init_all(Config) when is_list(Config) ->
- DataDir0 = ?config(data_dir, Config0),
- DataDir1 = filename:split(filename:absname(DataDir0)),
- [_|DataDir2] = lists:reverse(DataDir1),
- DataDir3 = filename:join(lists:reverse(DataDir2) ++ [?snmp_test_data]),
- Config1 = lists:keydelete(data_dir, 1, Config0),
- Config = [{data_dir, DataDir3 ++ "/"}|Config1],
+ ?LOG("init_all -> entry with"
+ "~n Config: ~p",[Config]),
%% --
%% Start nodes
@@ -143,34 +133,43 @@ init_all(Config0) when is_list(Config0) ->
%% --
- %% Create necessary files
+ %% Create necessary files ( and dirs )
%%
- PrivDir = ?config(priv_dir, Config),
- ?DBG("init_all -> PrivDir ~p", [PrivDir]),
+ SuiteTopDir = ?config(snmp_suite_top_dir, Config),
+ ?DBG("init_all -> SuiteTopDir ~p", [SuiteTopDir]),
- TopDir = filename:join(PrivDir, snmp_agent_test),
- case file:make_dir(TopDir) of
- ok ->
- ok;
- {error, eexist} ->
- ok;
- Error ->
- ?FAIL({failed_creating_subsuite_top_dir, Error})
- end,
+ AgentDir = filename:join(SuiteTopDir, "agent/"),
+ ?line ok = file:make_dir(AgentDir),
+ ?DBG("init_all -> AgentDir ~p", [AgentDir]),
- DataDir = ?config(data_dir, Config),
- ?DBG("init_all -> DataDir ~p", [DataDir]),
+ AgentDbDir = filename:join(AgentDir, "db/"),
+ ?line ok = file:make_dir(AgentDbDir),
+ ?DBG("init_all -> AgentDbDir ~p", [AgentDbDir]),
- ?line ok = file:make_dir(MgrDir = filename:join(TopDir, "mgr_dir/")),
- ?DBG("init_all -> MgrDir ~p", [MgrDir]),
+ AgentLogDir = filename:join(AgentDir, "log/"),
+ ?line ok = file:make_dir(AgentLogDir),
+ ?DBG("init_all -> AgentLogDir ~p", [AgentLogDir]),
- ?line ok = file:make_dir(AgentDir = filename:join(TopDir, "agent_dir/")),
- ?DBG("init_all -> AgentDir ~p", [AgentDir]),
+ AgentConfDir = filename:join(AgentDir, "conf/"),
+ ?line ok = file:make_dir(AgentConfDir),
+ ?DBG("init_all -> AgentConfDir ~p", [AgentConfDir]),
- ?line ok = file:make_dir(SaDir = filename:join(TopDir, "sa_dir/")),
+ MgrDir = filename:join(SuiteTopDir, "mgr/"),
+ ?line ok = file:make_dir(MgrDir),
+ ?DBG("init_all -> MgrDir ~p", [MgrDir]),
+
+ SaDir = filename:join(SuiteTopDir, "sa/"),
+ ?line ok = file:make_dir(SaDir),
?DBG("init_all -> SaDir ~p", [SaDir]),
+ SaDbDir = filename:join(SaDir, "db/"),
+ ?line ok = file:make_dir(SaDbDir),
+ ?DBG("init_all -> SaDbDir ~p", [SaDbDir]),
+
+ %% MibDir = ?config(mib_dir, Config),
+ %% ?DBG("init_all -> MibDir ~p", [DataDir]),
+
%% --
%% Start and initiate mnesia
@@ -184,11 +183,11 @@ init_all(Config0) when is_list(Config0) ->
?DBG("init_all -> application mnesia: set_env dir",[]),
?line application_controller:set_env(mnesia, dir,
- filename:join(TopDir, "Mnesia1")),
+ filename:join(AgentDbDir, "Mnesia1")),
?DBG("init_all -> application mnesia: set_env dir on node ~p",[SaNode]),
- ?line rpc:call(SaNode, application_controller, set_env,
- [mnesia, dir, filename:join(TopDir, "Mnesia2")]),
+ ?line rpc:call(SaNode, application_controller, set_env,
+ [mnesia, dir, filename:join(SaDir, "Mnesia2")]),
?DBG("init_all -> create mnesia schema",[]),
?line ok = mnesia:create_schema([SaNode, node()]),
@@ -199,13 +198,18 @@ init_all(Config0) when is_list(Config0) ->
?DBG("init_all -> start application mnesia on ~p",[SaNode]),
?line ok = rpc:call(SaNode, application, start, [mnesia]),
Ip = ?LOCALHOST(),
- [{snmp_sa, SaNode},
- {snmp_mgr, MgrNode},
- {agent_dir, AgentDir ++ "/"},
- {mgr_dir, MgrDir ++ "/"},
- {sa_dir, SaDir ++ "/"},
- {mib_dir, DataDir},
- {ip, Ip} |
+ [{snmp_sa, SaNode},
+ {snmp_mgr, MgrNode},
+ {snmp_master, node()},
+ {agent_dir, AgentDir ++ "/"},
+ {agent_db_dir, AgentDbDir ++ "/"},
+ {agent_log_dir, AgentLogDir ++ "/"},
+ {agent_conf_dir, AgentConfDir ++ "/"},
+ {sa_dir, SaDir ++ "/"},
+ {sa_db_dir, SaDbDir ++ "/"},
+ {mgr_dir, MgrDir ++ "/"},
+ %% {mib_dir, DataDir},
+ {ip, Ip} |
Config].
@@ -220,11 +224,14 @@ finish_all(Config) when is_list(Config) ->
%% --- This one *must* be run first in each case ---
init_case(Config) when is_list(Config) ->
+
?DBG("init_case -> entry with"
- "~n Config: ~p", [Config]),
- SaNode = ?config(snmp_sa, Config),
- MgrNode = ?config(snmp_mgr, Config),
- MasterNode = node(),
+ "~n Config: ~p", [Config]),
+
+ SaNode = ?config(snmp_sa, Config),
+ MgrNode = ?config(snmp_mgr, Config),
+ MasterNode = ?config(snmp_master, Config),
+ %% MasterNode = node(),
SaHost = ?HOSTNAME(SaNode),
MgrHost = ?HOSTNAME(MgrNode),
@@ -411,7 +418,8 @@ start_v3_agent(Config, Opts) when is_list(Config) andalso is_list(Opts) ->
start_bilingual_agent(Config) when is_list(Config) ->
start_agent(Config, [v1,v2]).
-start_bilingual_agent(Config, Opts) when is_list(Config) andalso is_list(Opts) ->
+start_bilingual_agent(Config, Opts)
+ when is_list(Config) andalso is_list(Opts) ->
start_agent(Config, [v1,v2], Opts).
start_mt_agent(Config) when is_list(Config) ->
@@ -423,57 +431,33 @@ start_mt_agent(Config, Opts) when is_list(Config) andalso is_list(Opts) ->
start_agent(Config, Vsns) ->
start_agent(Config, Vsns, []).
start_agent(Config, Vsns, Opts) ->
+
?LOG("start_agent -> entry (~p) with"
"~n Config: ~p"
"~n Vsns: ~p"
"~n Opts: ~p", [node(), Config, Vsns, Opts]),
- ?line AgentDir = ?config(agent_dir, Config),
- ?line SaNode = ?config(snmp_sa, Config),
-
-%% AgentConfig =
-%% [{agent_type, master},
-%% %% {multi_threaded, MultiT},
-%% %% {priority, Prio},
-%% %% {error_report_mod, ErrorReportMod},
-%% {versions, Vsns},
-%% {db_dir, AgentDir},
-%% %% {db_init_error, DbInitError},
-%% %% {set_mechanism, SetModule},
-%% %% {authentication_service, AuthModule},
-%% {audit_trail_log, [{type, read_write},
-%% {dir, AgentDir},
-%% {size, {10240, 10}},
-%% {repair, true}]},
-%% {config, [{verbosity, info},
-%% {dir, AgentDir},
-%% {force_load, false}]},
-%% {mibs, Mibs},
-%% %% {mib_storage, MibStorage},
-%% {local_db, []},
-%% {mib_server, []},
-%% {symbolic_store, []},
-%% {note_store, []},
-%% {net_if, []},
-%% %% {supervisor, SupOpts}
-%% ],
-
+ ?line AgentLogDir = ?config(agent_log_dir, Config),
+ ?line AgentConfDir = ?config(agent_conf_dir, Config),
+ ?line AgentDbDir = ?config(agent_db_dir, Config),
+ ?line SaNode = ?config(snmp_sa, Config),
+
app_env_init(vsn_init(Vsns) ++
- [{audit_trail_log, read_write_log},
- {audit_trail_log_dir, AgentDir},
- {audit_trail_log_size, {10240, 10}},
- {force_config_reload, false},
- {snmp_agent_type, master},
- {snmp_config_dir, AgentDir},
- {snmp_db_dir, AgentDir},
- {snmp_local_db_auto_repair, true},
- {snmp_local_db_verbosity, log},
- {snmp_master_agent_verbosity, trace},
- {snmp_supervisor_verbosity, trace},
- {snmp_mibserver_verbosity, log},
+ [{audit_trail_log, read_write_log},
+ {audit_trail_log_dir, AgentLogDir},
+ {audit_trail_log_size, {10240, 10}},
+ {force_config_reload, false},
+ {snmp_agent_type, master},
+ {snmp_config_dir, AgentConfDir},
+ {snmp_db_dir, AgentDbDir},
+ {snmp_local_db_auto_repair, true},
+ {snmp_local_db_verbosity, log},
+ {snmp_master_agent_verbosity, trace},
+ {snmp_supervisor_verbosity, trace},
+ {snmp_mibserver_verbosity, log},
{snmp_symbolic_store_verbosity, log},
- {snmp_note_store_verbosity, log},
- {snmp_net_if_verbosity, trace}],
+ {snmp_note_store_verbosity, log},
+ {snmp_net_if_verbosity, trace}],
Opts),
@@ -1237,30 +1221,44 @@ stop_node(Node) ->
%%% Configuration
%%%-----------------------------------------------------------------
-config(Vsns, MgrDir, AgentDir, MIp, AIp) ->
- ?line snmp_config:write_agent_snmp_files(AgentDir, Vsns, MIp,
- ?TRAP_UDP, AIp, 4000,
+config(Vsns, MgrDir, AgentConfDir, MIp, AIp) ->
+ ?LOG("config -> entry with"
+ "~n Vsns: ~p"
+ "~n MgrDir: ~p"
+ "~n AgentConfDir: ~p"
+ "~n MIp: ~p"
+ "~n AIp: ~p",
+ [Vsns, MgrDir, AgentConfDir, MIp, AIp]),
+ ?line snmp_config:write_agent_snmp_files(AgentConfDir, Vsns,
+ MIp, ?TRAP_UDP, AIp, 4000,
"test"),
- ?line case update_usm(Vsns, AgentDir) of
+ ?line case update_usm(Vsns, AgentConfDir) of
true ->
- ?line copy_file(filename:join(AgentDir, "usm.conf"),
+ ?line copy_file(filename:join(AgentConfDir, "usm.conf"),
filename:join(MgrDir, "usm.conf")),
?line update_usm_mgr(Vsns, MgrDir);
false ->
?line ok
end,
- ?line update_community(Vsns, AgentDir),
- ?line update_vacm(Vsns, AgentDir),
- ?line write_target_addr_conf(AgentDir, MIp, ?TRAP_UDP, Vsns),
- ?line write_target_params_conf(AgentDir, Vsns),
- ?line write_notify_conf(AgentDir),
+ ?line update_community(Vsns, AgentConfDir),
+ ?line update_vacm(Vsns, AgentConfDir),
+ ?line write_target_addr_conf(AgentConfDir, MIp, ?TRAP_UDP, Vsns),
+ ?line write_target_params_conf(AgentConfDir, Vsns),
+ ?line write_notify_conf(AgentConfDir),
ok.
delete_files(Config) ->
- Dir = ?config(agent_dir, Config),
- {ok, List} = file:list_dir(Dir),
+ AgentDir = ?config(agent_dir, Config),
+ delete_files(AgentDir, [db, conf]).
+
+delete_files(_AgentFiles, []) ->
+ ok;
+delete_files(AgentDir, [DirName|DirNames]) ->
+ Dir = filename:join(AgentDir, DirName),
+ {ok, Files} = file:list_dir(Dir),
lists:foreach(fun(FName) -> file:delete(filename:join(Dir, FName)) end,
- List).
+ Files),
+ delete_files(AgentDir, DirNames).
update_usm(Vsns, Dir) ->
case lists:member(v3, Vsns) of
@@ -1418,8 +1416,8 @@ rewrite_target_addr_conf2(_NewPort,O) ->
O.
reset_target_addr_conf(Dir) ->
- ?line ok = file:rename(filename:join(Dir,"target_addr.old"),
- filename:join(Dir,"target_addr.conf")).
+ ?line ok = file:rename(filename:join(Dir, "target_addr.old"),
+ filename:join(Dir, "target_addr.conf")).
write_target_params_conf(Dir, Vsns) ->
F = fun(v1) -> {"target_v1", v1, v1, "all-rights", noAuthNoPriv};
@@ -1458,7 +1456,6 @@ copy_file(From, To) ->
ok = file:write_file(To, Bin).
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
display_memory_usage() ->
diff --git a/lib/snmp/test/snmp_app_test.erl b/lib/snmp/test/snmp_app_test.erl
index bc62c8d530..0a320dbbce 100644
--- a/lib/snmp/test/snmp_app_test.erl
+++ b/lib/snmp/test/snmp_app_test.erl
@@ -23,8 +23,9 @@
-module(snmp_app_test).
-export([
- all/0,groups/0,init_per_group/2,end_per_group/2, init_per_suite/1,
- end_per_suite/1,
+ all/0, groups/0,
+ init_per_group/2, end_per_group/2,
+ init_per_suite/1, end_per_suite/1,
init_per_testcase/2, end_per_testcase/2,
fields/1,
@@ -52,33 +53,47 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
all() ->
-Cases = [fields, modules, exportall, app_depend,
- undef_funcs, {group, start_and_stop}],
- Cases.
+ Cases =
+ [
+ fields,
+ modules,
+ exportall,
+ app_depend,
+ undef_funcs,
+ {group, start_and_stop}
+ ],
+ Cases.
groups() ->
[{start_and_stop, [],
- [start_and_stop_empty, start_and_stop_with_agent,
- start_and_stop_with_manager,
- start_and_stop_with_agent_and_manager,
- start_epmty_and_then_agent_and_manager_and_stop,
- start_with_agent_and_then_manager_and_stop,
- start_with_manager_and_then_agent_and_stop]}].
+ [start_and_stop_empty,
+ start_and_stop_with_agent,
+ start_and_stop_with_manager,
+ start_and_stop_with_agent_and_manager,
+ start_epmty_and_then_agent_and_manager_and_stop,
+ start_with_agent_and_then_manager_and_stop,
+ start_with_manager_and_then_agent_and_stop]}].
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
init_per_suite(Config) when is_list(Config) ->
?DISPLAY_SUITE_INFO(),
+
+ %% Note that part of this stuff (the suite top dir creation)
+ %% may already be done (if we run the entire snmp suite).
+
PrivDir = ?config(priv_dir, Config),
TopDir = filename:join(PrivDir, app),
case file:make_dir(TopDir) of
ok ->
ok;
+ {error, eexist} ->
+ ok;
Error ->
fail({failed_creating_subsuite_top_dir, Error})
end,
diff --git a/lib/snmp/test/snmp_compiler_test.erl b/lib/snmp/test/snmp_compiler_test.erl
index 0a147130b0..257fc47952 100644
--- a/lib/snmp/test/snmp_compiler_test.erl
+++ b/lib/snmp/test/snmp_compiler_test.erl
@@ -40,6 +40,7 @@
all/0,
groups/0, init_per_group/2, end_per_group/2,
init_per_testcase/2, end_per_testcase/2,
+ init_per_suite/1, end_per_suite/1,
description/1,
oid_conflicts/1,
@@ -48,6 +49,7 @@
agent_capabilities/1,
module_compliance/1,
warnings_as_errors/1,
+ augments_extra_info/1,
otp_6150/1,
otp_8574/1,
@@ -58,6 +60,7 @@
%%----------------------------------------------------------------------
%% Internal exports
%%----------------------------------------------------------------------
+
-export([
]).
@@ -74,19 +77,41 @@
%% External functions
%%======================================================================
-init_per_testcase(_Case, Config) when is_list(Config) ->
- Dir = ?config(priv_dir, Config),
- DataDir = ?config(data_dir, Config),
- [_|RL] = lists:reverse(filename:split(DataDir)),
- MibDir = join(lists:reverse(["snmp_test_data"|RL])),
- CompDir = join(Dir, "comp_dir/"),
- ?line ok = file:make_dir(CompDir),
- [{comp_dir, CompDir}, {mib_dir, MibDir} | Config].
+init_per_suite(Config0) when is_list(Config0) ->
+
+ ?DBG("init_per_suite -> entry with"
+ "~n Config0: ~p", [Config0]),
+
+ Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0),
+ Config2 = snmp_test_lib:fix_data_dir(Config1),
+
+ %% Mib-dirs
+ %% data_dir is trashed by the test-server / common-test
+ %% so there is no point in fixing it...
+ MibDir = snmp_test_lib:lookup(data_dir, Config2),
+ StdMibDir = filename:join([code:priv_dir(snmp), "mibs"]),
+
+ [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2].
+
+end_per_suite(Config) when is_list(Config) ->
+
+ ?DBG("end_per_suite -> entry with"
+ "~n Config: ~p", [Config]),
+
+ Config.
+
+
+init_per_testcase(Case, Config) when is_list(Config) ->
+
+ ?DBG("init_per_testcase -> entry with"
+ "~n Config: ~p", [Config]),
+
+ CaseTopDir = snmp_test_lib:init_testcase_top_dir(Case, Config),
+
+ [{case_top_dir, CaseTopDir} | Config].
end_per_testcase(_Case, Config) when is_list(Config) ->
- CompDir = ?config(comp_dir, Config),
- ?line ok = ?DEL_DIR(CompDir),
- lists:keydelete(comp_dir, 1, Config).
+ Config.
%%======================================================================
@@ -102,6 +127,7 @@ all() ->
agent_capabilities,
module_compliance,
warnings_as_errors,
+ augments_extra_info,
{group, tickets}
].
@@ -126,7 +152,7 @@ description(Config) when is_list(Config) ->
put(tname,desc),
p("starting with Config: ~p~n", [Config]),
- Dir = ?config(comp_dir, Config),
+ Dir = ?config(case_top_dir, Config),
Filename = join(Dir,"test"),
MibSrcName = Filename ++ ".mib",
MibBinName = Filename ++ ".bin",
@@ -161,7 +187,7 @@ oid_conflicts(Config) when is_list(Config) ->
put(tname,oid_conflicts),
p("starting with Config: ~p~n", [Config]),
- Dir = ?config(comp_dir, Config),
+ Dir = ?config(case_top_dir, Config),
Mib = join(Dir,"TESTv2.mib"),
?line ok = write_oid_conflict_mib(Mib),
?line {error,compilation_failed} =
@@ -278,7 +304,7 @@ warnings_as_errors(suite) ->
warnings_as_errors(Config) when is_list(Config) ->
put(tname,warnings_as_errors),
p("starting with Config: ~p~n", [Config]),
- Dir = ?config(comp_dir, Config),
+ Dir = ?config(case_top_dir, Config),
MibDir = ?config(mib_dir, Config),
MibFile = join(MibDir, "OTP8574-MIB.mib"),
OutFile = join(Dir, "OTP8574-MIB.bin"),
@@ -303,7 +329,7 @@ otp_6150(Config) when is_list(Config) ->
put(tname,otp_6150),
p("starting with Config: ~p~n", [Config]),
- Dir = ?config(comp_dir, Config),
+ Dir = ?config(case_top_dir, Config),
MibDir = ?config(mib_dir, Config),
MibFile = join(MibDir, "ERICSSON-TOP-MIB.mib"),
?line {ok, Mib} = snmpc:compile(MibFile, [{outdir, Dir}, {verbosity, trace}]),
@@ -319,7 +345,7 @@ otp_8574(Config) when is_list(Config) ->
put(tname,otp_8574),
p("starting with Config: ~p~n", [Config]),
- Dir = ?config(comp_dir, Config),
+ Dir = ?config(case_top_dir, Config),
MibDir = ?config(mib_dir, Config),
MibFile = join(MibDir, "OTP8574-MIB.mib"),
@@ -352,7 +378,7 @@ otp_8595(Config) when is_list(Config) ->
put(tname,otp_8595),
p("starting with Config: ~p~n", [Config]),
- Dir = ?config(comp_dir, Config),
+ Dir = ?config(case_top_dir, Config),
MibDir = ?config(mib_dir, Config),
MibFile = join(MibDir, "OTP8595-MIB.mib"),
?line {ok, Mib} =
@@ -364,6 +390,47 @@ otp_8595(Config) when is_list(Config) ->
%%======================================================================
+
+augments_extra_info(suite) ->
+ [];
+augments_extra_info(Config) when is_list(Config) ->
+ put(tname, augments_extra_info),
+ p("starting with Config: ~p~n", [Config]),
+
+ Dir = ?config(case_top_dir, Config),
+ MibDir = ?config(mib_dir, Config),
+ Test2File = join(MibDir, "Test2.mib"),
+ Test3File = join(MibDir, "Test3.mib"),
+ ?line {ok, Test2BinFile} =
+ snmpc:compile(Test2File, [{outdir, Dir},
+ {verbosity, silence},
+ {group_check, false}]),
+ io:format("Test2BinFile: ~n~p~n", [Test2BinFile]),
+ ?line {ok, Test3BinFile} =
+ snmpc:compile(Test3File, [{i, [MibDir]},
+ {outdir, Dir},
+ {verbosity, silence},
+ {group_check, true}]),
+ io:format("Test3BinFile: ~n~p~n", [Test3BinFile]),
+ {ok, Test3Mib} = snmp_misc:read_mib(Test3BinFile),
+ io:format("Test3Mib: ~n~p~n", [Test3Mib]),
+ %% There is only one table in this mib
+ #mib{table_infos = [{TableName, TI}]} = Test3Mib,
+ io:format("TableName: ~p"
+ "~n Table Info: ~p"
+ "~n", [TableName, TI]),
+ #table_info{nbr_of_cols = 4,
+ defvals = DefVals,
+ not_accessible = [2,4],
+ index_types = {augments, {tEntry, undefined}},
+ first_accessible = 1} = TI,
+ io:format("Table info: ~p"
+ "~n DefVals: ~p"
+ "~n", [TableName, DefVals]),
+ ok.
+
+
+%%======================================================================
%% Internal functions
%%======================================================================
@@ -517,11 +584,11 @@ DESCRIPTION \"" ++ Desc ++ "\"
::= { test 1 }
END",
- Message = file:write_file(Filename ,Binary),
+ Message = file:write_file(Filename, Binary),
case Message of
ok -> ok;
{error, Reason} ->
- exit({failed_writing_mib,Reason})
+ exit({failed_writing_mib, Reason})
end.
@@ -546,8 +613,8 @@ check_desc(Desc1, Desc2) ->
exit({'description not equal', Desc1, Desc2}).
-join(Comp) ->
- filename:join(Comp).
+%% join(Comp) ->
+%% filename:join(Comp).
join(A,B) ->
filename:join(A,B).
diff --git a/lib/snmp/test/snmp_log_test.erl b/lib/snmp/test/snmp_log_test.erl
index b692017407..8478825f59 100644
--- a/lib/snmp/test/snmp_log_test.erl
+++ b/lib/snmp/test/snmp_log_test.erl
@@ -42,7 +42,11 @@
-export([
init_per_testcase/2, end_per_testcase/2,
- all/0,groups/0,init_per_group/2,end_per_group/2,
+ all/0,
+ groups/0,
+ init_per_group/2,
+ end_per_group/2,
+
open_and_close/1,
open_write_and_close1/1,
@@ -109,16 +113,21 @@ end_per_testcase(_Case, Config) when is_list(Config) ->
%%======================================================================
%% ?SKIP(not_yet_implemented).
all() ->
-[open_and_close, {group, open_write_and_close},
- {group, log_to_io}, {group, log_to_txt}].
+ [
+ open_and_close,
+ {group, open_write_and_close},
+ {group, log_to_io},
+ {group, log_to_txt}].
groups() ->
- [{open_write_and_close, [],
- [open_write_and_close1, open_write_and_close2,
- open_write_and_close3, open_write_and_close4]},
- {log_to_io, [], [log_to_io1, log_to_io2]},
- {log_to_txt, [],
- [log_to_txt1, log_to_txt2, log_to_txt3]}].
+ [
+ {open_write_and_close, [],
+ [open_write_and_close1, open_write_and_close2,
+ open_write_and_close3, open_write_and_close4]},
+ {log_to_io, [], [log_to_io1, log_to_io2]},
+ {log_to_txt, [],
+ [log_to_txt1, log_to_txt2, log_to_txt3]}
+ ].
init_per_group(_GroupName, Config) ->
Config.
diff --git a/lib/snmp/test/snmp_manager_test.erl b/lib/snmp/test/snmp_manager_test.erl
index 75c9f7b277..c374a2f0a6 100644
--- a/lib/snmp/test/snmp_manager_test.erl
+++ b/lib/snmp/test/snmp_manager_test.erl
@@ -49,6 +49,8 @@
init_per_group/2, end_per_group/2,
init_per_testcase/2, end_per_testcase/2,
+ init_per_suite/1, end_per_suite/1,
+
simple_start_and_stop1/1,
simple_start_and_stop2/1,
@@ -146,36 +148,43 @@
%% External functions
%%======================================================================
+init_per_suite(Config0) when is_list(Config0) ->
+
+ ?DBG("init_per_suite -> entry with"
+ "~n Config0: ~p", [Config0]),
+
+ Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0),
+ Config2 = snmp_test_lib:fix_data_dir(Config1),
+
+ %% Mib-dirs
+ %% data_dir is trashed by the test-server / common-test
+ %% so there is no point in fixing it...
+ MibDir = snmp_test_lib:lookup(data_dir, Config2),
+ StdMibDir = filename:join([code:priv_dir(snmp), "mibs"]),
+
+ [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2].
+
+end_per_suite(Config) when is_list(Config) ->
+
+ ?DBG("end_per_suite -> entry with"
+ "~n Config: ~p", [Config]),
+
+ Config.
+
+
init_per_testcase(Case, Config) when is_list(Config) ->
io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE,Case]),
init_per_testcase2(Case, Config).
init_per_testcase2(Case, Config) ->
- ?DBG("init [~w] Nodes [1]: ~p", [Case, erlang:nodes()]),
-
- %% Fix a correct data dir (points to the wrong location):
- DataDir0 = ?config(data_dir, Config),
- DataDir1 = filename:split(filename:absname(DataDir0)),
- [_|DataDir2] = lists:reverse(DataDir1),
- DataDir = filename:join(lists:reverse(DataDir2) ++ [?snmp_test_data]),
+ ?DBG("init_per_testcase2 -> ~p", [erlang:nodes()]),
- PrivDir = ?config(priv_dir, Config),
+ CaseTopDir = snmp_test_lib:init_testcase_top_dir(Case, Config),
- TopDir = filename:join(PrivDir, ?MODULE),
- case file:make_dir(TopDir) of
- ok ->
- ok;
- {error, eexist} ->
- ok;
- Error ->
- ?FAIL({failed_creating_subsuite_top_dir, Error})
- end,
-
- CaseTopDir = filename:join(TopDir, Case),
- ?line ok = file:make_dir(CaseTopDir),
-
%% -- Manager dirs --
- MgrTopDir = filename:join(CaseTopDir, "manager/"),
+ MgrTopDir = filename:join(CaseTopDir, "manager/"),
+ ?DBG("init_per_testcase2 -> try create manager top dir: ~n~p",
+ [MgrTopDir]),
?line ok = file:make_dir(MgrTopDir),
MgrConfDir = filename:join(MgrTopDir, "conf/"),
@@ -200,10 +209,9 @@ init_per_testcase2(Case, Config) ->
AgLogDir = filename:join(AgTopDir, "log/"),
?line ok = file:make_dir(AgLogDir),
- Conf = [{snmp_data_dir, DataDir},
- {watchdog, ?WD_START(?MINS(5))},
+ Conf = [{watchdog, ?WD_START(?MINS(5))},
{ip, ?LOCALHOST()},
- {top_dir, TopDir},
+ {case_top_dir, CaseTopDir},
{agent_dir, AgTopDir},
{agent_conf_dir, AgConfDir},
{agent_db_dir, AgDbDir},
@@ -388,9 +396,11 @@ all() ->
{group, user_tests},
{group, agent_tests},
{group, request_tests},
+ {group, request_tests_mt},
{group, event_tests},
+ {group, event_tests_mt},
discovery,
- {group, tickets}
+ {group, tickets}
].
groups() ->
@@ -431,6 +441,15 @@ groups() ->
{group, misc_request_tests}
]
},
+ {request_tests_mt, [],
+ [
+ {group, get_tests},
+ {group, get_next_tests},
+ {group, set_tests},
+ {group, bulk_tests},
+ {group, misc_request_tests}
+ ]
+ },
{get_tests, [],
[
simple_sync_get1,
@@ -477,18 +496,30 @@ groups() ->
misc_async2
]
},
- {event_tests, [],
- [
- trap1%% ,
- %% trap2,
- %% inform1,
- %% inform2,
- %% inform3,
- %% inform4,
- %% inform_swarm,
- %% report
- ]
- },
+ {event_tests, [],
+ [
+ trap1,
+ trap2,
+ inform1,
+ inform2,
+ inform3,
+ inform4,
+ inform_swarm,
+ report
+ ]
+ },
+ {event_tests_mt, [],
+ [
+ trap1,
+ trap2,
+ inform1,
+ inform2,
+ inform3,
+ inform4,
+ inform_swarm,
+ report
+ ]
+ },
{tickets, [],
[
{group, otp8015},
@@ -507,11 +538,21 @@ groups() ->
}
].
-init_per_group(_GroupName, Config) ->
- Config.
+init_per_group(request_tests_mt = GroupName, Config) ->
+ snmp_test_lib:init_group_top_dir(
+ GroupName,
+ [{manager_net_if_module, snmpm_net_if_mt} | Config]);
+init_per_group(event_tests_mt = GroupName, Config) ->
+ snmp_test_lib:init_group_top_dir(
+ GroupName,
+ [{manager_net_if_module, snmpm_net_if_mt} | Config]);
+init_per_group(GroupName, Config) ->
+ snmp_test_lib:init_group_top_dir(GroupName, Config).
+
end_per_group(_GroupName, Config) ->
- Config.
+ %% Do we really need to do this?
+ lists:keydelete(snmp_group_top_dir, 1, Config).
%%======================================================================
@@ -1571,6 +1612,11 @@ simple_sync_get1(Config) when is_list(Config) ->
?line ok = mgr_user_load_mib(Node, std_mib()),
Oids2 = [[sysObjectID, 0], [sysDescr, 0], [sysUpTime, 0]],
?line ok = do_simple_sync_get(Node, Addr, Port, Oids2),
+
+ p("Display log"),
+ display_log(Config),
+
+ p("done"),
ok.
do_simple_sync_get(Node, Addr, Port, Oids) ->
@@ -1578,7 +1624,7 @@ do_simple_sync_get(Node, Addr, Port, Oids) ->
?DBG("~n Reply: ~p"
"~n Rem: ~w", [Reply, Rem]),
-
+
%% verify that the operation actually worked:
%% The order should be the same, so no need to seach
?line ok = case Reply of
@@ -1612,7 +1658,9 @@ simple_sync_get2(suite) -> [];
simple_sync_get2(Config) when is_list(Config) ->
process_flag(trap_exit, true),
put(tname, ssg2),
- do_simple_sync_get2(Config).
+ do_simple_sync_get2(Config),
+ display_log(Config),
+ ok.
do_simple_sync_get2(Config) ->
Get = fun(Node, TargetName, Oids) ->
@@ -1677,7 +1725,9 @@ simple_sync_get3(suite) -> [];
simple_sync_get3(Config) when is_list(Config) ->
process_flag(trap_exit, true),
put(tname, ssg3),
- do_simple_sync_get3(Config).
+ do_simple_sync_get3(Config),
+ display_log(Config),
+ ok.
do_simple_sync_get3(Config) ->
Self = self(),
@@ -1703,8 +1753,8 @@ do_simple_sync_get3(Config) ->
%%======================================================================
-simple_async_get1(doc) -> ["Simple (async) get-request - "
- "Old style (Addr & Port)"];
+simple_async_get1(doc) ->
+ ["Simple (async) get-request - Old style (Addr & Port)"];
simple_async_get1(suite) -> [];
simple_async_get1(Config) when is_list(Config) ->
process_flag(trap_exit, true),
@@ -1766,6 +1816,7 @@ simple_async_get1(Config) when is_list(Config) ->
p("manager info when ending test: ~n~p", [mgr_info(MgrNode)]),
p("agent info when ending test: ~n~p", [agent_info(AgentNode)]),
+ display_log(Config),
ok.
async_g_exec1(Node, Addr, Port, Oids) ->
@@ -1816,7 +1867,9 @@ simple_async_get2(Config) when is_list(Config) ->
TargetName = ?config(manager_agent_target_name, Config),
Get = fun(Oids) -> async_g_exec2(MgrNode, TargetName, Oids) end,
PostVerify = fun(Res) -> Res end,
- do_simple_async_sync_get2(Config, MgrNode, AgentNode, Get, PostVerify).
+ do_simple_async_sync_get2(Config, MgrNode, AgentNode, Get, PostVerify),
+ display_log(Config),
+ ok.
do_simple_async_sync_get2(Config, MgrNode, AgentNode, Get, PostVerify) ->
?line ok = mgr_user_load_mib(MgrNode, std_mib()),
@@ -1905,7 +1958,9 @@ simple_async_get3(Config) when is_list(Config) ->
PostVerify = fun(ok) -> receive Msg -> ok end;
(Error) -> Error
end,
- do_simple_async_sync_get2(Config, MgrNode, AgentNode, Get, PostVerify).
+ do_simple_async_sync_get2(Config, MgrNode, AgentNode, Get, PostVerify),
+ display_log(Config),
+ ok.
async_g_exec3(Node, TargetName, Oids, SendOpts) ->
mgr_user_async_get2(Node, TargetName, Oids, SendOpts).
@@ -1999,6 +2054,8 @@ simple_sync_get_next1(Config) when is_list(Config) ->
end,
?line ok = do_simple_get_next(8,
MgrNode, Addr, Port, Oids08, VF08),
+
+ display_log(Config),
ok.
@@ -2062,7 +2119,10 @@ simple_sync_get_next2(Config) when is_list(Config) ->
mgr_user_sync_get_next(Node, TargetName, Oids)
end,
PostVerify = fun(Res) -> Res end,
- do_simple_sync_get_next2(Config, GetNext, PostVerify).
+ do_simple_sync_get_next2(Config, GetNext, PostVerify),
+ display_log(Config),
+ ok.
+
do_simple_sync_get_next2(Config, GetNext, PostVerify)
when is_function(GetNext, 3) andalso is_function(PostVerify, 1) ->
@@ -2193,7 +2253,9 @@ simple_sync_get_next3(Config) when is_list(Config) ->
PostVerify = fun(ok) -> receive Msg -> ok end;
(Error) -> Error
end,
- do_simple_sync_get_next2(Config, GetNext, PostVerify).
+ do_simple_sync_get_next2(Config, GetNext, PostVerify),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -2286,6 +2348,7 @@ simple_async_get_next1(Config) when is_list(Config) ->
p("manager info when ending test: ~n~p", [mgr_info(MgrNode)]),
p("agent info when ending test: ~n~p", [agent_info(AgentNode)]),
+ display_log(Config),
ok.
@@ -2315,7 +2378,9 @@ simple_async_get_next2(Config) when is_list(Config) ->
async_gn_exec2(MgrNode, TargetName, Oids)
end,
PostVerify = fun(Res) -> Res end,
- do_simple_async_get_next2(MgrNode, AgentNode, GetNext, PostVerify).
+ do_simple_async_get_next2(MgrNode, AgentNode, GetNext, PostVerify),
+ display_log(Config),
+ ok.
do_simple_async_get_next2(MgrNode, AgentNode, GetNext, PostVerify)
when is_function(GetNext, 1) andalso is_function(PostVerify, 1) ->
@@ -2437,7 +2502,9 @@ simple_async_get_next3(Config) when is_list(Config) ->
(Error) -> Error
end,
- do_simple_async_get_next2(MgrNode, AgentNode, GetNext, PostVerify).
+ do_simple_async_get_next2(MgrNode, AgentNode, GetNext, PostVerify),
+ display_log(Config),
+ ok.
async_gn_exec3(Node, TargetName, Oids, SendOpts) ->
mgr_user_async_get_next2(Node, TargetName, Oids, SendOpts).
@@ -2475,6 +2542,8 @@ simple_sync_set1(Config) when is_list(Config) ->
{[sysLocation, 0], Val22}
],
?line ok = do_simple_set1(Node, Addr, Port, VAVs2),
+
+ display_log(Config),
ok.
do_simple_set1(Node, Addr, Port, VAVs) ->
@@ -2527,7 +2596,9 @@ simple_sync_set2(Config) when is_list(Config) ->
end,
PostVerify = fun() -> ok end,
- do_simple_sync_set2(Config, Set, PostVerify).
+ do_simple_sync_set2(Config, Set, PostVerify),
+ display_log(Config),
+ ok.
do_simple_sync_set2(Config, Set, PostVerify)
when is_function(Set, 3) andalso is_function(PostVerify, 0) ->
@@ -2604,7 +2675,9 @@ simple_sync_set3(Config) when is_list(Config) ->
end,
PostVerify = fun() -> receive Msg -> ok end end,
- do_simple_sync_set2(Config, Set, PostVerify).
+ do_simple_sync_set2(Config, Set, PostVerify),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -2663,6 +2736,7 @@ simple_async_set1(Config) when is_list(Config) ->
p("manager info when ending test: ~n~p", [mgr_info(MgrNode)]),
p("agent info when ending test: ~n~p", [agent_info(AgentNode)]),
+ display_log(Config),
ok.
@@ -2724,7 +2798,9 @@ simple_async_set2(Config) when is_list(Config) ->
end,
PostVerify = fun(Res) -> Res end,
- do_simple_async_set2(MgrNode, AgentNode, Set, PostVerify).
+ do_simple_async_set2(MgrNode, AgentNode, Set, PostVerify),
+ display_log(Config),
+ ok.
do_simple_async_set2(MgrNode, AgentNode, Set, PostVerify) ->
Requests =
@@ -2806,7 +2882,9 @@ simple_async_set3(Config) when is_list(Config) ->
(Res) -> Res
end,
- do_simple_async_set2(MgrNode, AgentNode, Set, PostVerify).
+ do_simple_async_set2(MgrNode, AgentNode, Set, PostVerify),
+ display_log(Config),
+ ok.
async_s_exec3(Node, TargetName, VAVs, SendOpts) ->
mgr_user_async_set2(Node, TargetName, VAVs, SendOpts).
@@ -2932,6 +3010,7 @@ simple_sync_get_bulk1(Config) when is_list(Config) ->
0, 2,
[[TCnt2, 1]], VF11),
+ display_log(Config),
ok.
fl(L) ->
@@ -3004,7 +3083,9 @@ simple_sync_get_bulk2(Config) when is_list(Config) ->
end,
PostVerify = fun(Res) -> Res end,
- do_simple_sync_get_bulk2(Config, MgrNode, AgentNode, GetBulk, PostVerify).
+ do_simple_sync_get_bulk2(Config, MgrNode, AgentNode, GetBulk, PostVerify),
+ display_log(Config),
+ ok.
do_simple_sync_get_bulk2(Config, MgrNode, AgentNode, GetBulk, PostVerify) ->
%% -- 1 --
@@ -3169,7 +3250,9 @@ simple_sync_get_bulk3(Config) when is_list(Config) ->
(Res) -> Res
end,
- do_simple_sync_get_bulk2(Config, MgrNode, AgentNode, GetBulk, PostVerify).
+ do_simple_sync_get_bulk2(Config, MgrNode, AgentNode, GetBulk, PostVerify),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -3308,6 +3391,7 @@ simple_async_get_bulk1(Config) when is_list(Config) ->
p("manager info when ending test: ~n~p", [mgr_info(MgrNode)]),
p("agent info when ending test: ~n~p", [agent_info(AgentNode)]),
+ display_log(Config),
ok.
@@ -3340,7 +3424,9 @@ simple_async_get_bulk2(Config) when is_list(Config) ->
end,
PostVerify = fun(Res) -> Res end,
- do_simple_async_get_bulk2(MgrNode, AgentNode, GetBulk, PostVerify).
+ do_simple_async_get_bulk2(MgrNode, AgentNode, GetBulk, PostVerify),
+ display_log(Config),
+ ok.
do_simple_async_get_bulk2(MgrNode, AgentNode, GetBulk, PostVerify) ->
%% We re-use the verification functions from the ssgb test-case
@@ -3505,7 +3591,9 @@ simple_async_get_bulk3(Config) when is_list(Config) ->
(Res) -> Res
end,
- do_simple_async_get_bulk2(MgrNode, AgentNode, GetBulk, PostVerify).
+ do_simple_async_get_bulk2(MgrNode, AgentNode, GetBulk, PostVerify),
+ display_log(Config),
+ ok.
async_gb_exec3(Node, TargetName, {NR, MR, Oids}, SendOpts) ->
mgr_user_async_get_bulk2(Node, TargetName, NR, MR, Oids, SendOpts).
@@ -3697,6 +3785,7 @@ misc_async1(Config) when is_list(Config) ->
p("manager info when ending test: ~n~p", [mgr_info(MgrNode)]),
p("agent info when ending test: ~n~p", [agent_info(AgentNode)]),
+ display_log(Config),
ok.
@@ -3885,6 +3974,7 @@ misc_async2(Config) when is_list(Config) ->
p("manager info when ending test: ~n~p", [mgr_info(MgrNode)]),
p("agent info when ending test: ~n~p", [agent_info(AgentNode)]),
+ display_log(Config),
ok.
@@ -4099,7 +4189,9 @@ trap1(Config) when is_list(Config) ->
{5, "Manager and agent info after test completion", Cmd1}
],
- command_handler(Commands).
+ command_handler(Commands),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -4290,7 +4382,9 @@ trap2(Config) when is_list(Config) ->
{7, "Manager and agent info after test completion", Cmd1}
],
- command_handler(Commands).
+ command_handler(Commands),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -4415,7 +4509,9 @@ inform1(Config) when is_list(Config) ->
{6, "Manager and agent info after test completion", Cmd1}
],
- command_handler(Commands).
+ command_handler(Commands),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -4423,7 +4519,7 @@ inform1(Config) when is_list(Config) ->
inform2(suite) -> [];
inform2(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- put(tname,i2),
+ put(tname, i2),
p("starting with Config: ~p~n", [Config]),
MgrNode = ?config(manager_node, Config),
@@ -4577,7 +4673,7 @@ inform2(Config) when is_list(Config) ->
[
{1, "Manager and agent info at start of test", Cmd1},
{2, "Send notifcation [no receiver] from agent", Cmd2},
- {3, "await inform-sent acknowledge from agent", Cmd3},
+ {3, "Await inform-sent acknowledge from agent", Cmd3},
{4, "Await first inform to manager - do not reply", Cmd4},
{5, "Await second inform to manager - reply", Cmd5},
{6, "await inform-acknowledge from agent", Cmd6},
@@ -4585,7 +4681,9 @@ inform2(Config) when is_list(Config) ->
{8, "Manager and agent info after test completion", Cmd1}
],
- command_handler(Commands).
+ command_handler(Commands),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -4719,7 +4817,9 @@ inform3(Config) when is_list(Config) ->
{9, "Manager and agent info after test completion", Cmd1}
],
- command_handler(Commands).
+ command_handler(Commands),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -4835,7 +4935,9 @@ inform4(Config) when is_list(Config) ->
{6, "Manager and agent info after test completion", Cmd1}
],
- command_handler(Commands).
+ command_handler(Commands),
+ display_log(Config),
+ ok.
%%======================================================================
@@ -4923,7 +5025,10 @@ inform_swarm(Config) when is_list(Config) ->
{5, "Manager and agent info after test completion", Cmd1}
],
- command_handler(Commands).
+ command_handler(Commands),
+ display_log(Config),
+ ok.
+
inform_swarm_collector(N) ->
inform_swarm_collector(N, 0, 0, 0, 10000).
@@ -5227,8 +5332,8 @@ init_agent(Config) ->
%% --
%% Retrieve some dir's
%%
- Dir = ?config(top_dir, Config),
- DataDir = ?config(data_dir, Config),
+ Dir = ?config(agent_dir, Config),
+ MibDir = ?config(mib_dir, Config),
%% --
%% Start node
@@ -5259,7 +5364,7 @@ init_agent(Config) ->
?line ok = write_agent_config(Vsns, Config),
Conf = [{agent_node, Node},
- {mib_dir, DataDir} | Config],
+ {mib_dir, MibDir} | Config],
%%
%% Start the agent
@@ -5720,6 +5825,15 @@ start_manager(Node, Vsns, Conf0, Opts) ->
AtlSeqNo = get_opt(manager_atl_seqno, Conf0, false),
+ NetIfConf =
+ case get_opt(manager_net_if_module, Conf0, no_module) of
+ no_module ->
+ [{verbosity, NetIfVerbosity}];
+ NetIfModule ->
+ [{module, NetIfModule},
+ {verbosity, NetIfVerbosity}]
+ end,
+
Env = [{versions, Vsns},
{inform_request_behaviour, IRB},
{audit_trail_log, [{type, read_write},
@@ -5732,7 +5846,7 @@ start_manager(Node, Vsns, Conf0, Opts) ->
{verbosity, ConfigVerbosity}]},
{note_store, [{verbosity, NoteStoreVerbosity}]},
{server, [{verbosity, ServerVerbosity}]},
- {net_if, [{verbosity, NetIfVerbosity}]}],
+ {net_if, NetIfConf}],
?line ok = set_mgr_env(Node, Env),
?line ok = start_snmp(Node),
@@ -6018,6 +6132,38 @@ write_conf_file(Dir, File, Str) ->
%% ------
+display_log(Config) ->
+ case lists:keysearch(manager_log_dir, 1, Config) of
+ {value, {_, Dir}} ->
+ case lists:keysearch(manager_node, 1, Config) of
+ {value, {_, Node}} ->
+ LogDir = Dir,
+ Mibs = [],
+ OutFile = j(LogDir, "snmpm_log.txt"),
+ p("~n"
+ "========================="
+ " < Audit Trail Log > "
+ "========================="
+ "~n"),
+ rcall(Node, snmpm, log_to_txt, [LogDir, Mibs, OutFile]),
+ rcall(Node, snmpm, log_to_io, [LogDir, Mibs]),
+ p("~n"
+ "========================="
+ " < / Audit Trail Log > "
+ "========================="
+ "~n");
+ false ->
+ p("display_log -> no manager node found"),
+ ok
+ end;
+ false ->
+ p("display_log -> no manager log dir found"),
+ ok
+ end.
+
+
+%% ------
+
test2_mib(Config) ->
j(test_mib_dir(Config), "Test2.bin").
@@ -6034,7 +6180,7 @@ snmpv2_mib() ->
j(mib_dir(), "SNMPv2-MIB.bin").
test_mib_dir(Config) ->
- ?config(snmp_data_dir, Config).
+ ?config(mib_dir, Config).
mib_dir() ->
j(code:priv_dir(snmp), "mibs").
diff --git a/lib/snmp/test/snmp_test_data/Test3.mib b/lib/snmp/test/snmp_test_data/Test3.mib
new file mode 100644
index 0000000000..7f76e4dba4
--- /dev/null
+++ b/lib/snmp/test/snmp_test_data/Test3.mib
@@ -0,0 +1,123 @@
+Test3 DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, Integer32, snmpModules, mib-2
+ FROM SNMPv2-SMI
+ MODULE-COMPLIANCE, OBJECT-GROUP
+ FROM SNMPv2-CONF
+ tEntry
+ FROM Test2;
+
+t3MIB MODULE-IDENTITY
+ LAST-UPDATED "1203090000Z"
+ ORGANIZATION ""
+ CONTACT-INFO
+ ""
+ DESCRIPTION
+ "Test mib, used to test processing of requests."
+ ::= { snmpModules 42 }
+
+
+-- Administrative assignments ****************************************
+
+t3MIBObjects OBJECT IDENTIFIER ::= { t3MIB 1 }
+t3MIBConformance OBJECT IDENTIFIER ::= { t3MIB 2 }
+
+
+-- test4 OBJECT IDENTIFIER ::= { mib-2 18 }
+
+tAugTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF TAugEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This table AUGMENTS tTable of the Test2 MIB."
+ ::= { t3MIBObjects 1 }
+
+tAugEntry OBJECT-TYPE
+ SYNTAX TAugEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "An entry (conceptual row) in the sysORTable."
+ AUGMENTS { tEntry }
+ ::= { tAugTable 1 }
+
+TAugEntry ::= SEQUENCE {
+ tFoo1 OCTET STRING,
+ tFoo2 OCTET STRING,
+ tBar1 Integer32,
+ tBar2 Integer32
+}
+
+tFoo1 OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..255))
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "A string."
+ DEFVAL { "foo 1" }
+ ::= { tAugEntry 1 }
+
+tFoo2 OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..255))
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A string."
+ DEFVAL { "foo 2" }
+ ::= { tAugEntry 2 }
+
+tBar1 OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "An integer."
+ DEFVAL { 42 }
+ ::= { tAugEntry 3 }
+
+tBar2 OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "An integer."
+ DEFVAL { 42 }
+ ::= { tAugEntry 4 }
+
+
+-- Conformance Information *******************************************
+
+t3MIBCompliances OBJECT IDENTIFIER
+ ::= { t3MIBConformance 1 }
+t3MIBGroups OBJECT IDENTIFIER
+ ::= { t3MIBConformance 2 }
+
+-- Compliance statements
+
+t3MIBCompliance MODULE-COMPLIANCE
+ STATUS current
+ DESCRIPTION
+ "The compliance statement for SNMP engines which
+ implement the SNMP-COMMUNITY-MIB."
+
+ MODULE -- this module
+ MANDATORY-GROUPS { t3Group }
+
+ ::= { t3MIBCompliances 1 }
+
+t3Group OBJECT-GROUP
+ OBJECTS {
+ tFoo1,
+ tFoo2,
+ tBar1,
+ tBar2
+ }
+ STATUS current
+ DESCRIPTION
+ "A group."
+ ::= { t3MIBGroups 1 }
+
+
+END
diff --git a/lib/snmp/test/snmp_test_lib.erl b/lib/snmp/test/snmp_test_lib.erl
index e4d58a1253..26115a0c74 100644
--- a/lib/snmp/test/snmp_test_lib.erl
+++ b/lib/snmp/test/snmp_test_lib.erl
@@ -25,7 +25,10 @@
-export([hostname/0, hostname/1, localhost/0, os_type/0, sz/1,
display_suite_info/1]).
-export([non_pc_tc_maybe_skip/4, os_based_skip/1]).
--export([replace_config/3, set_config/3, get_config/2, get_config/3]).
+-export([fix_data_dir/1,
+ init_suite_top_dir/2, init_group_top_dir/2, init_testcase_top_dir/2,
+ lookup/2,
+ replace_config/3, set_config/3, get_config/2, get_config/3]).
-export([fail/3, skip/3]).
-export([millis/0, millis_diff/2, hours/1, minutes/1, seconds/1, sleep/1]).
-export([flush_mqueue/0, trap_exit/0, trap_exit/1]).
@@ -198,6 +201,97 @@ os_based_skip(_Crap) ->
%% Test suite utility functions
%%
+fix_data_dir(Config) ->
+ DataDir0 = lookup(data_dir, Config),
+ DataDir1 = filename:split(filename:absname(DataDir0)),
+ [_|DataDir2] = lists:reverse(DataDir1),
+ DataDir = filename:join(lists:reverse(DataDir2) ++ [?snmp_test_data]),
+ Config1 = lists:keydelete(data_dir, 1, Config),
+ [{data_dir, DataDir ++ "/"} | Config1].
+
+
+init_suite_top_dir(Suite, Config0) ->
+ io:format("~w:init_suite_top_dir -> entry with"
+ "~n Suite: ~p"
+ "~n Config0: ~p"
+ "~n", [?MODULE, Suite, Config0]),
+ Dir = lookup(priv_dir, Config0),
+ SuiteTopDir = filename:join(Dir, Suite),
+ case file:make_dir(SuiteTopDir) of
+ ok ->
+ ok;
+ {error, eexist} ->
+ ok;
+ {error, Reason} ->
+ fail({failed_creating_suite_top_dir, SuiteTopDir, Reason},
+ ?MODULE, ?LINE)
+ end,
+
+ %% This is just in case...
+ Config1 = lists:keydelete(snmp_group_top_dir, 1, Config0),
+ Config2 = lists:keydelete(snmp_suite_top_dir, 1, Config1),
+ [{snmp_suite_top_dir, SuiteTopDir} | Config2].
+
+
+init_group_top_dir(GroupName, Config) ->
+ io:format("~w:init_group_top_dir -> entry with"
+ "~n GroupName: ~p"
+ "~n Config: ~p"
+ "~n", [?MODULE, GroupName, Config]),
+ case lists:keysearch(snmp_group_top_dir, 1, Config) of
+ {value, {_Key, Dir}} ->
+ %% This is a sub-group, so create our dir within Dir
+ GroupTopDir = filename:join(Dir, GroupName),
+ case file:make_dir(GroupTopDir) of
+ ok ->
+ ok;
+ {error, Reason} ->
+ fail({failed_creating_group_top_dir, GroupTopDir, Reason},
+ ?MODULE, ?LINE)
+ end,
+ [{snmp_group_top_dir, GroupTopDir} | Config];
+
+ _ ->
+ case lists:keysearch(snmp_suite_top_dir, 1, Config) of
+ {value, {_Key, Dir}} ->
+ GroupTopDir = filename:join(Dir, GroupName),
+ case file:make_dir(GroupTopDir) of
+ ok ->
+ ok;
+ {error, Reason} ->
+ fail({failed_creating_group_top_dir,
+ GroupTopDir, Reason},
+ ?MODULE, ?LINE)
+ end,
+ [{snmp_group_top_dir, GroupTopDir} | Config];
+ _ ->
+ fail(could_not_find_suite_top_dir, ?MODULE, ?LINE)
+ end
+ end.
+
+
+init_testcase_top_dir(Case, Config) ->
+ io:format("~w:init_testcase_top_dir -> entry with"
+ "~n Case: ~p"
+ "~n Config: ~p"
+ "~n", [?MODULE, Case, Config]),
+ case lists:keysearch(snmp_group_top_dir, 1, Config) of
+ {value, {_Key, Dir}} ->
+ CaseTopDir = filename:join(Dir, Case),
+ ok = file:make_dir(CaseTopDir),
+ CaseTopDir;
+ false ->
+ case lists:keysearch(snmp_suite_top_dir, 1, Config) of
+ {value, {_Key, Dir}} ->
+ CaseTopDir = filename:join(Dir, Case),
+ ok = file:make_dir(CaseTopDir),
+ CaseTopDir;
+ false ->
+ fail(failed_creating_case_top_dir, ?MODULE, ?LINE)
+ end
+ end.
+
+
replace_config(Key, Config, NewValue) ->
lists:keyreplace(Key, 1, Config, {Key, NewValue}).
@@ -220,6 +314,9 @@ get_config(Key,C,Default) ->
Default
end.
+lookup(Key, Config) ->
+ {value, {Key, Value}} = lists:keysearch(Key, 1, Config),
+ Value.
fail(Reason, Mod, Line) ->
exit({suite_failed, Reason, Mod, Line}).
diff --git a/lib/snmp/test/test-mibs/RMON-MIB.mib b/lib/snmp/test/test-mibs/RMON-MIB.mib
index 0824dbde1d..fa5bc82f4a 100644
--- a/lib/snmp/test/test-mibs/RMON-MIB.mib
+++ b/lib/snmp/test/test-mibs/RMON-MIB.mib
@@ -1,3826 +1,3958 @@
- RMON-MIB DEFINITIONS ::= BEGIN
-
- IMPORTS
- Counter FROM RFC1155-SMI
- mib-2,DisplayString FROM RFC1213-MIB
- OBJECT-TYPE FROM RFC-1212
- TRAP-TYPE FROM RFC-1215;
-
- -- Remote Network Monitoring MIB
-
- rmon OBJECT IDENTIFIER ::= { mib-2 16 }
-
-
- -- textual conventions
-
- OwnerString ::= DisplayString
- -- This data type is used to model an administratively
- -- assigned name of the owner of a resource. This
- -- information is taken from the NVT ASCII character
- -- set. It is suggested that this name contain one or
-
-
- -- more of the following: IP address, management station
- -- name, network manager's name, location, or phone
- -- number.
- -- In some cases the agent itself will be the owner of
- -- an entry. In these cases, this string shall be set
- -- to a string starting with 'monitor'.
- --
- -- SNMP access control is articulated entirely in terms
- -- of the contents of MIB views; access to a particular
- -- SNMP object instance depends only upon its presence
- -- or absence in a particular MIB view and never upon
- -- its value or the value of related object instances.
- -- Thus, objects of this type afford resolution of
- -- resource contention only among cooperating managers;
- -- they realize no access control function with respect
- -- to uncooperative parties.
- --
- -- By convention, objects with this syntax are declared as
- -- having
- --
- -- SIZE (0..127)
-
- EntryStatus ::= INTEGER
- { valid(1),
- createRequest(2),
- underCreation(3),
- invalid(4)
- }
- -- The status of a table entry.
- --
- -- Setting this object to the value invalid(4) has the
- -- effect of invalidating the corresponding entry.
- -- That is, it effectively disassociates the mapping
- -- identified with said entry.
- -- It is an implementation-specific matter as to whether
- -- the agent removes an invalidated entry from the table.
- -- Accordingly, management stations must be prepared to
- -- receive tabular information from agents that
- -- corresponds to entries currently not in use. Proper
- -- interpretation of such entries requires examination
- -- of the relevant EntryStatus object.
- --
- -- An existing instance of this object cannot be set to
- -- createRequest(2). This object may only be set to
- -- createRequest(2) when this instance is created. When
- -- this object is created, the agent may wish to create
- -- supplemental object instances with default values
- -- to complete a conceptual row in this table. Because
-
-
- -- the creation of these default objects is entirely at
- -- the option of the agent, the manager must not assume
- -- that any will be created, but may make use of any that
- -- are created. Immediately after completing the create
- -- operation, the agent must set this object to
- -- underCreation(3).
- --
- -- When in the underCreation(3) state, an entry is
- -- allowed to exist in a possibly incomplete, possibly
- -- inconsistent state, usually to allow it to be
- -- modified in mutiple PDUs. When in this state, an
- -- entry is not fully active. Entries shall exist in
- -- the underCreation(3) state until the management
- -- station is finished configuring the entry and sets
- -- this object to valid(1) or aborts, setting this
- -- object to invalid(4). If the agent determines that
- -- an entry has been in the underCreation(3) state for
- -- an abnormally long time, it may decide that the
- -- management station has crashed. If the agent makes
- -- this decision, it may set this object to invalid(4)
- -- to reclaim the entry. A prudent agent will
- -- understand that the management station may need to
- -- wait for human input and will allow for that
- -- possibility in its determination of this abnormally
- -- long period.
- --
- -- An entry in the valid(1) state is fully configured and
- -- consistent and fully represents the configuration or
- -- operation such a row is intended to represent. For
- -- example, it could be a statistical function that is
- -- configured and active, or a filter that is available
- -- in the list of filters processed by the packet capture
- -- process.
- --
- -- A manager is restricted to changing the state of an
- -- entry in the following ways:
- --
- -- create under
- -- To: valid Request Creation invalid
- -- From:
- -- valid OK NO OK OK
- -- createRequest N/A N/A N/A N/A
- -- underCreation OK NO OK OK
- -- invalid NO NO NO OK
- -- nonExistent NO OK NO OK
- --
- -- In the table above, it is not applicable to move the
- -- state from the createRequest state to any other
-
-
- -- state because the manager will never find the
- -- variable in that state. The nonExistent state is
- -- not a value of the enumeration, rather it means that
- -- the entryStatus variable does not exist at all.
- --
- -- An agent may allow an entryStatus variable to change
- -- state in additional ways, so long as the semantics
- -- of the states are followed. This allowance is made
- -- to ease the implementation of the agent and is made
- -- despite the fact that managers should never
- -- excercise these additional state transitions.
-
-
- statistics OBJECT IDENTIFIER ::= { rmon 1 }
- history OBJECT IDENTIFIER ::= { rmon 2 }
- alarm OBJECT IDENTIFIER ::= { rmon 3 }
- hosts OBJECT IDENTIFIER ::= { rmon 4 }
- hostTopN OBJECT IDENTIFIER ::= { rmon 5 }
- matrix OBJECT IDENTIFIER ::= { rmon 6 }
- filter OBJECT IDENTIFIER ::= { rmon 7 }
- capture OBJECT IDENTIFIER ::= { rmon 8 }
- event OBJECT IDENTIFIER ::= { rmon 9 }
-
-
- -- The Ethernet Statistics Group
- --
- -- Implementation of the Ethernet Statistics group is
- -- optional.
- --
- -- The ethernet statistics group contains statistics
- -- measured by the probe for each monitored interface on
- -- this device. These statistics take the form of free
- -- running counters that start from zero when a valid entry
- -- is created.
- --
- -- This group currently has statistics defined only for
- -- Ethernet interfaces. Each etherStatsEntry contains
- -- statistics for one Ethernet interface. The probe must
- -- create one etherStats entry for each monitored Ethernet
- -- interface on the device.
-
- etherStatsTable OBJECT-TYPE
- SYNTAX SEQUENCE OF EtherStatsEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of Ethernet statistics entries."
- ::= { statistics 1 }
-
-
- etherStatsEntry OBJECT-TYPE
- SYNTAX EtherStatsEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A collection of statistics kept for a particular
- Ethernet interface. As an example, an instance of the
- etherStatsPkts object might be named etherStatsPkts.1"
- INDEX { etherStatsIndex }
- ::= { etherStatsTable 1 }
-
- EtherStatsEntry ::= SEQUENCE {
- etherStatsIndex INTEGER (1..65535),
- etherStatsDataSource OBJECT IDENTIFIER,
- etherStatsDropEvents Counter,
- etherStatsOctets Counter,
- etherStatsPkts Counter,
- etherStatsBroadcastPkts Counter,
- etherStatsMulticastPkts Counter,
- etherStatsCRCAlignErrors Counter,
- etherStatsUndersizePkts Counter,
- etherStatsOversizePkts Counter,
- etherStatsFragments Counter,
- etherStatsJabbers Counter,
- etherStatsCollisions Counter,
- etherStatsPkts64Octets Counter,
- etherStatsPkts65to127Octets Counter,
- etherStatsPkts128to255Octets Counter,
- etherStatsPkts256to511Octets Counter,
- etherStatsPkts512to1023Octets Counter,
- etherStatsPkts1024to1518Octets Counter,
- etherStatsOwner OwnerString,
- etherStatsStatus EntryStatus
- }
-
- etherStatsIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The value of this object uniquely identifies this
- etherStats entry."
- ::= { etherStatsEntry 1 }
-
- etherStatsDataSource OBJECT-TYPE
- SYNTAX OBJECT IDENTIFIER
- ACCESS read-write
- STATUS mandatory
-
-
- DESCRIPTION
- "This object identifies the source of the data that
- this etherStats entry is configured to analyze. This
- source can be any ethernet interface on this device.
- In order to identify a particular interface, this
- object shall identify the instance of the ifIndex
- object, defined in RFC 1213 and RFC 1573 [4,6], for
- the desired interface. For example, if an entry
- were to receive data from interface #1, this object
- would be set to ifIndex.1.
-
- The statistics in this group reflect all packets
- on the local network segment attached to the
- identified interface.
-
- An agent may or may not be able to tell if
- fundamental changes to the media of the interface
- have occurred and necessitate an invalidation of
- this entry. For example, a hot-pluggable ethernet
- card could be pulled out and replaced by a
- token-ring card. In such a case, if the agent has
- such knowledge of the change, it is recommended that
- it invalidate this entry.
-
- This object may not be modified if the associated
- etherStatsStatus object is equal to valid(1)."
- ::= { etherStatsEntry 2 }
-
- etherStatsDropEvents OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of events in which packets
- were dropped by the probe due to lack of resources.
- Note that this number is not necessarily the number of
- packets dropped; it is just the number of times this
- condition has been detected."
- ::= { etherStatsEntry 3 }
-
- etherStatsOctets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of octets of data (including
- those in bad packets) received on the
- network (excluding framing bits but including
-
-
- FCS octets).
-
- This object can be used as a reasonable estimate of
- ethernet utilization. If greater precision is
- desired, the etherStatsPkts and etherStatsOctets
- objects should be sampled before and after a common
- interval. The differences in the sampled values are
- Pkts and Octets, respectively, and the number of
- seconds in the interval is Interval. These values
- are used to calculate the Utilization as follows:
-
- Pkts * (9.6 + 6.4) + (Octets * .8)
- Utilization = -------------------------------------
- Interval * 10,000
-
- The result of this equation is the value Utilization
- which is the percent utilization of the ethernet
- segment on a scale of 0 to 100 percent."
- ::= { etherStatsEntry 4 }
-
- etherStatsPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets (including bad packets,
- broadcast packets, and multicast packets) received."
- ::= { etherStatsEntry 5 }
-
- etherStatsBroadcastPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of good packets received that were
- directed to the broadcast address. Note that this
- does not include multicast packets."
- ::= { etherStatsEntry 6 }
-
- etherStatsMulticastPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of good packets received that were
- directed to a multicast address. Note that this
- number does not include packets directed to the
- broadcast address."
-
-
- ::= { etherStatsEntry 7 }
-
- etherStatsCRCAlignErrors OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets received that
- had a length (excluding framing bits, but
- including FCS octets) of between 64 and 1518
- octets, inclusive, but but had either a bad
- Frame Check Sequence (FCS) with an integral
- number of octets (FCS Error) or a bad FCS with
- a non-integral number of octets (Alignment Error)."
- ::= { etherStatsEntry 8 }
-
- etherStatsUndersizePkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets received that were
- less than 64 octets long (excluding framing bits,
- but including FCS octets) and were otherwise well
- formed."
- ::= { etherStatsEntry 9 }
-
- etherStatsOversizePkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets received that were
- longer than 1518 octets (excluding framing bits,
- but including FCS octets) and were otherwise
- well formed."
- ::= { etherStatsEntry 10 }
-
- etherStatsFragments OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets received that were less
- than 64 octets in length (excluding framing bits but
- including FCS octets) and had either a bad Frame
- Check Sequence (FCS) with an integral number of
- octets (FCS Error) or a bad FCS with a non-integral
-
-
- number of octets (Alignment Error).
-
- Note that it is entirely normal for
- etherStatsFragments to increment. This is because
- it counts both runts (which are normal occurrences
- due to collisions) and noise hits."
- ::= { etherStatsEntry 11 }
-
- etherStatsJabbers OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets received that were
- longer than 1518 octets (excluding framing bits,
- but including FCS octets), and had either a bad
- Frame Check Sequence (FCS) with an integral number
- of octets (FCS Error) or a bad FCS with a
- non-integral number of octets (Alignment Error).
-
- Note that this definition of jabber is different
- than the definition in IEEE-802.3 section 8.2.1.5
- (10BASE5) and section 10.3.1.4 (10BASE2). These
- documents define jabber as the condition where any
- packet exceeds 20 ms. The allowed range to detect
- jabber is between 20 ms and 150 ms."
- ::= { etherStatsEntry 12 }
-
- etherStatsCollisions OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The best estimate of the total number of collisions
- on this Ethernet segment.
-
- The value returned will depend on the location of
- the RMON probe. Section 8.2.1.3 (10BASE-5) and
- section 10.3.1.3 (10BASE-2) of IEEE standard 802.3
- states that a station must detect a collision, in
- the receive mode, if three or more stations are
- transmitting simultaneously. A repeater port must
- detect a collision when two or more stations are
- transmitting simultaneously. Thus a probe placed on
- a repeater port could record more collisions than a
- probe connected to a station on the same segment
- would.
-
-
-
- Probe location plays a much smaller role when
- considering 10BASE-T. 14.2.1.4 (10BASE-T) of IEEE
- standard 802.3 defines a collision as the
- simultaneous presence of signals on the DO and RD
- circuits (transmitting and receiving at the same
- time). A 10BASE-T station can only detect
- collisions when it is transmitting. Thus probes
- placed on a station and a repeater, should report
- the same number of collisions.
-
- Note also that an RMON probe inside a repeater
- should ideally report collisions between the
- repeater and one or more other hosts (transmit
- collisions as defined by IEEE 802.3k) plus receiver
- collisions observed on any coax segments to which
- the repeater is connected."
- ::= { etherStatsEntry 13 }
-
- etherStatsPkts64Octets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets (including bad
- packets) received that were 64 octets in length
- (excluding framing bits but including FCS octets)."
- ::= { etherStatsEntry 14 }
-
- etherStatsPkts65to127Octets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets (including bad
- packets) received that were between
- 65 and 127 octets in length inclusive
- (excluding framing bits but including FCS octets)."
- ::= { etherStatsEntry 15 }
-
- etherStatsPkts128to255Octets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets (including bad
- packets) received that were between
- 128 and 255 octets in length inclusive
- (excluding framing bits but including FCS octets)."
-
-
- ::= { etherStatsEntry 16 }
-
- etherStatsPkts256to511Octets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets (including bad
- packets) received that were between
- 256 and 511 octets in length inclusive
- (excluding framing bits but including FCS octets)."
- ::= { etherStatsEntry 17 }
-
- etherStatsPkts512to1023Octets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets (including bad
- packets) received that were between
- 512 and 1023 octets in length inclusive
- (excluding framing bits but including FCS octets)."
- ::= { etherStatsEntry 18 }
-
- etherStatsPkts1024to1518Octets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets (including bad
- packets) received that were between
- 1024 and 1518 octets in length inclusive
- (excluding framing bits but including FCS octets)."
- ::= { etherStatsEntry 19 }
-
- etherStatsOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { etherStatsEntry 20 }
-
- etherStatsStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
-
-
- DESCRIPTION
- "The status of this etherStats entry."
- ::= { etherStatsEntry 21 }
-
-
- -- The History Control Group
-
- -- Implementation of the History Control group is optional.
- --
- -- The history control group controls the periodic statistical
- -- sampling of data from various types of networks. The
- -- historyControlTable stores configuration entries that each
- -- define an interface, polling period, and other parameters.
- -- Once samples are taken, their data is stored in an entry
- -- in a media-specific table. Each such entry defines one
- -- sample, and is associated with the historyControlEntry that
- -- caused the sample to be taken. Each counter in the
- -- etherHistoryEntry counts the same event as its
- -- similarly-named counterpart in the etherStatsEntry,
- -- except that each value here is a cumulative sum during a
- -- sampling period.
- --
- -- If the probe keeps track of the time of day, it should
- -- start the first sample of the history at a time such that
- -- when the next hour of the day begins, a sample is
- -- started at that instant. This tends to make more
- -- user-friendly reports, and enables comparison of reports
- -- from different probes that have relatively accurate time
- -- of day.
- --
- -- The probe is encouraged to add two history control entries
- -- per monitored interface upon initialization that describe
- -- a short term and a long term polling period. Suggested
- -- parameters are 30 seconds for the short term polling period
- -- and 30 minutes for the long term period.
-
- historyControlTable OBJECT-TYPE
- SYNTAX SEQUENCE OF HistoryControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of history control entries."
- ::= { history 1 }
-
- historyControlEntry OBJECT-TYPE
- SYNTAX HistoryControlEntry
- ACCESS not-accessible
- STATUS mandatory
-
-
- DESCRIPTION
- "A list of parameters that set up a periodic sampling
- of statistics. As an example, an instance of the
- historyControlInterval object might be named
- historyControlInterval.2"
- INDEX { historyControlIndex }
- ::= { historyControlTable 1 }
-
- HistoryControlEntry ::= SEQUENCE {
- historyControlIndex INTEGER (1..65535),
- historyControlDataSource OBJECT IDENTIFIER,
- historyControlBucketsRequested INTEGER (1..65535),
- historyControlBucketsGranted INTEGER (1..65535),
- historyControlInterval INTEGER (1..3600),
- historyControlOwner OwnerString,
- historyControlStatus EntryStatus
- }
-
- historyControlIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry in the
- historyControl table. Each such entry defines a
- set of samples at a particular interval for an
- interface on the device."
- ::= { historyControlEntry 1 }
-
- historyControlDataSource OBJECT-TYPE
- SYNTAX OBJECT IDENTIFIER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "This object identifies the source of the data for
- which historical data was collected and
- placed in a media-specific table on behalf of this
- historyControlEntry. This source can be any
- interface on this device. In order to identify
- a particular interface, this object shall identify
- the instance of the ifIndex object, defined
- in RFC 1213 and RFC 1573 [4,6], for the desired
- interface. For example, if an entry were to receive
- data from interface #1, this object would be set
- to ifIndex.1.
-
- The statistics in this group reflect all packets
- on the local network segment attached to the
-
-
- identified interface.
-
- An agent may or may not be able to tell if fundamental
- changes to the media of the interface have occurred
- and necessitate an invalidation of this entry. For
- example, a hot-pluggable ethernet card could be
- pulled out and replaced by a token-ring card. In
- such a case, if the agent has such knowledge of the
- change, it is recommended that it invalidate this
- entry.
-
- This object may not be modified if the associated
- historyControlStatus object is equal to valid(1)."
- ::= { historyControlEntry 2 }
-
- historyControlBucketsRequested OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The requested number of discrete time intervals
- over which data is to be saved in the part of the
- media-specific table associated with this
- historyControlEntry.
-
- When this object is created or modified, the probe
- should set historyControlBucketsGranted as closely to
- this object as is possible for the particular probe
- implementation and available resources."
- DEFVAL { 50 }
- ::= { historyControlEntry 3 }
-
- historyControlBucketsGranted OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of discrete sampling intervals
- over which data shall be saved in the part of
- the media-specific table associated with this
- historyControlEntry.
-
- When the associated historyControlBucketsRequested
- object is created or modified, the probe
- should set this object as closely to the requested
- value as is possible for the particular
- probe implementation and available resources. The
- probe must not lower this value except as a result
-
-
- of a modification to the associated
- historyControlBucketsRequested object.
-
- There will be times when the actual number of
- buckets associated with this entry is less than
- the value of this object. In this case, at the
- end of each sampling interval, a new bucket will
- be added to the media-specific table.
-
- When the number of buckets reaches the value of
- this object and a new bucket is to be added to the
- media-specific table, the oldest bucket associated
- with this historyControlEntry shall be deleted by
- the agent so that the new bucket can be added.
-
- When the value of this object changes to a value less
- than the current value, entries are deleted
- from the media-specific table associated with this
- historyControlEntry. Enough of the oldest of these
- entries shall be deleted by the agent so that their
- number remains less than or equal to the new value of
- this object.
-
- When the value of this object changes to a value
- greater than the current value, the number of
- associated media- specific entries may be allowed to
- grow."
- ::= { historyControlEntry 4 }
-
- historyControlInterval OBJECT-TYPE
- SYNTAX INTEGER (1..3600)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The interval in seconds over which the data is
- sampled for each bucket in the part of the
- media-specific table associated with this
- historyControlEntry. This interval can
- be set to any number of seconds between 1 and
- 3600 (1 hour).
-
- Because the counters in a bucket may overflow at their
- maximum value with no indication, a prudent manager
- will take into account the possibility of overflow
- in any of the associated counters. It is important
- to consider the minimum time in which any counter
- could overflow on a particular media type and set
- the historyControlInterval object to a value less
-
-
- than this interval. This is typically most
- important for the 'octets' counter in any
- media-specific table. For example, on an Ethernet
- network, the etherHistoryOctets counter could
- overflow in about one hour at the Ethernet's maximum
- utilization.
-
- This object may not be modified if the associated
- historyControlStatus object is equal to valid(1)."
- DEFVAL { 1800 }
- ::= { historyControlEntry 5 }
-
- historyControlOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { historyControlEntry 6 }
-
- historyControlStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The status of this historyControl entry.
-
- Each instance of the media-specific table associated
- with this historyControlEntry will be deleted by the
- agent if this historyControlEntry is not equal to
- valid(1)."
- ::= { historyControlEntry 7 }
-
-
- -- The Ethernet History Group
-
- -- Implementation of the Ethernet History group is optional.
- --
- -- The Ethernet History group records periodic
- -- statistical samples from a network and stores them
- -- for later retrieval. Once samples are taken, their
- -- data is stored in an entry in a media-specific
- -- table. Each such entry defines one sample, and is
- -- associated with the historyControlEntry that caused
- -- the sample to be taken. This group defines the
- -- etherHistoryTable, for Ethernet networks.
- --
-
-
- etherHistoryTable OBJECT-TYPE
- SYNTAX SEQUENCE OF EtherHistoryEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of Ethernet history entries."
- ::= { history 2 }
-
- etherHistoryEntry OBJECT-TYPE
- SYNTAX EtherHistoryEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "An historical sample of Ethernet statistics on a
- particular Ethernet interface. This sample is
- associated with the historyControlEntry which set up
- the parameters for a regular collection of these
- samples. As an example, an instance of the
- etherHistoryPkts object might be named
- etherHistoryPkts.2.89"
- INDEX { etherHistoryIndex , etherHistorySampleIndex }
- ::= { etherHistoryTable 1 }
-
- EtherHistoryEntry ::= SEQUENCE {
- etherHistoryIndex INTEGER (1..65535),
- etherHistorySampleIndex INTEGER (1..2147483647),
- etherHistoryIntervalStart TimeTicks,
- etherHistoryDropEvents Counter,
- etherHistoryOctets Counter,
- etherHistoryPkts Counter,
- etherHistoryBroadcastPkts Counter,
- etherHistoryMulticastPkts Counter,
- etherHistoryCRCAlignErrors Counter,
- etherHistoryUndersizePkts Counter,
- etherHistoryOversizePkts Counter,
- etherHistoryFragments Counter,
- etherHistoryJabbers Counter,
- etherHistoryCollisions Counter,
- etherHistoryUtilization INTEGER (0..10000)
- }
-
- etherHistoryIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The history of which this entry is a part. The
- history identified by a particular value of this
-
-
- index is the same history as identified
- by the same value of historyControlIndex."
- ::= { etherHistoryEntry 1 }
-
- etherHistorySampleIndex OBJECT-TYPE
- SYNTAX INTEGER (1..2147483647)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies the particular
- sample this entry represents among all samples
- associated with the same historyControlEntry.
- This index starts at 1 and increases by one
- as each new sample is taken."
- ::= { etherHistoryEntry 2 }
-
- etherHistoryIntervalStart OBJECT-TYPE
- SYNTAX TimeTicks
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The value of sysUpTime at the start of the interval
- over which this sample was measured. If the probe
- keeps track of the time of day, it should start
- the first sample of the history at a time such that
- when the next hour of the day begins, a sample is
- started at that instant. Note that following this
- rule may require the probe to delay collecting the
- first sample of the history, as each sample must be
- of the same interval. Also note that the sample which
- is currently being collected is not accessible in this
- table until the end of its interval."
- ::= { etherHistoryEntry 3 }
-
- etherHistoryDropEvents OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of events in which packets
- were dropped by the probe due to lack of resources
- during this sampling interval. Note that this number
- is not necessarily the number of packets dropped, it
- is just the number of times this condition has been
- detected."
- ::= { etherHistoryEntry 4 }
-
- etherHistoryOctets OBJECT-TYPE
-
-
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of octets of data (including
- those in bad packets) received on the
- network (excluding framing bits but including
- FCS octets)."
- ::= { etherHistoryEntry 5 }
-
- etherHistoryPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets (including bad packets)
- received during this sampling interval."
- ::= { etherHistoryEntry 6 }
-
- etherHistoryBroadcastPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of good packets received during this
- sampling interval that were directed to the
- broadcast address."
- ::= { etherHistoryEntry 7 }
-
- etherHistoryMulticastPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of good packets received during this
- sampling interval that were directed to a
- multicast address. Note that this number does not
- include packets addressed to the broadcast address."
- ::= { etherHistoryEntry 8 }
-
- etherHistoryCRCAlignErrors OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets received during this sampling
- interval that had a length (excluding framing bits
- but including FCS octets) between 64 and 1518
-
-
- octets, inclusive, but had either a bad Frame Check
- Sequence (FCS) with an integral number of octets
- (FCS Error) or a bad FCS with a non-integral number
- of octets (Alignment Error)."
- ::= { etherHistoryEntry 9 }
-
- etherHistoryUndersizePkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets received during this
- sampling interval that were less than 64 octets
- long (excluding framing bits but including FCS
- octets) and were otherwise well formed."
- ::= { etherHistoryEntry 10 }
-
- etherHistoryOversizePkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets received during this
- sampling interval that were longer than 1518
- octets (excluding framing bits but including
- FCS octets) but were otherwise well formed."
- ::= { etherHistoryEntry 11 }
-
- etherHistoryFragments OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The total number of packets received during this
- sampling interval that were less than 64 octets in
- length (excluding framing bits but including FCS
- octets) had either a bad Frame Check Sequence (FCS)
- with an integral number of octets (FCS Error) or a bad
- FCS with a non-integral number of octets (Alignment
- Error).
-
- Note that it is entirely normal for
- etherHistoryFragments to increment. This is because
- it counts both runts (which are normal occurrences
- due to collisions) and noise hits."
- ::= { etherHistoryEntry 12 }
-
- etherHistoryJabbers OBJECT-TYPE
-
-
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets received during this
- sampling interval that were longer than 1518 octets
- (excluding framing bits but including FCS octets),
- and had either a bad Frame Check Sequence (FCS)
- with an integral number of octets (FCS Error) or
- a bad FCS with a non-integral number of octets
- (Alignment Error).
-
- Note that this definition of jabber is different
- than the definition in IEEE-802.3 section 8.2.1.5
- (10BASE5) and section 10.3.1.4 (10BASE2). These
- documents define jabber as the condition where any
- packet exceeds 20 ms. The allowed range to detect
- jabber is between 20 ms and 150 ms."
- ::= { etherHistoryEntry 13 }
-
- etherHistoryCollisions OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The best estimate of the total number of collisions
- on this Ethernet segment during this sampling
- interval.
-
- The value returned will depend on the location of
- the RMON probe. Section 8.2.1.3 (10BASE-5) and
- section 10.3.1.3 (10BASE-2) of IEEE standard 802.3
- states that a station must detect a collision, in
- the receive mode, if three or more stations are
- transmitting simultaneously. A repeater port must
- detect a collision when two or more stations are
- transmitting simultaneously. Thus a probe placed on
- a repeater port could record more collisions than a
- probe connected to a station on the same segment
- would.
-
- Probe location plays a much smaller role when
- considering 10BASE-T. 14.2.1.4 (10BASE-T) of IEEE
- standard 802.3 defines a collision as the
- simultaneous presence of signals on the DO and RD
- circuits (transmitting and receiving at the same
- time). A 10BASE-T station can only detect
- collisions when it is transmitting. Thus probes
-
-
- placed on a station and a repeater, should report
- the same number of collisions.
-
- Note also that an RMON probe inside a repeater
- should ideally report collisions between the
- repeater and one or more other hosts (transmit
- collisions as defined by IEEE 802.3k) plus receiver
- collisions observed on any coax segments to which
- the repeater is connected."
- ::= { etherHistoryEntry 14 }
-
- etherHistoryUtilization OBJECT-TYPE
- SYNTAX INTEGER (0..10000)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The best estimate of the mean physical layer
- network utilization on this interface during this
- sampling interval, in hundredths of a percent."
- ::= { etherHistoryEntry 15 }
-
-
- -- The Alarm Group
-
- -- Implementation of the Alarm group is optional.
- --
- -- The Alarm Group requires the implementation of the Event
- -- group.
- --
- -- The Alarm group periodically takes
- -- statistical samples from variables in the probe and
- -- compares them to thresholds that have been
- -- configured. The alarm table stores configuration
- -- entries that each define a variable, polling period,
- -- and threshold parameters. If a sample is found to
- -- cross the threshold values, an event is generated.
- -- Only variables that resolve to an ASN.1 primitive
- -- type of INTEGER (INTEGER, Counter, Gauge, or
- -- TimeTicks) may be monitored in this way.
- --
- -- This function has a hysteresis mechanism to limit
- -- the generation of events. This mechanism generates
- -- one event as a threshold is crossed in the
- -- appropriate direction. No more events are generated
- -- for that threshold until the opposite threshold is
- -- crossed.
- --
- -- In the case of a sampling a deltaValue, a probe may
-
-
- -- implement this mechanism with more precision if it
- -- takes a delta sample twice per period, each time
- -- comparing the sum of the latest two samples to the
- -- threshold. This allows the detection of threshold
- -- crossings that span the sampling boundary. Note
- -- that this does not require any special configuration
- -- of the threshold value. It is suggested that probes
- -- implement this more precise algorithm.
-
- alarmTable OBJECT-TYPE
- SYNTAX SEQUENCE OF AlarmEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of alarm entries."
- ::= { alarm 1 }
-
- alarmEntry OBJECT-TYPE
- SYNTAX AlarmEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of parameters that set up a periodic checking
- for alarm conditions. For example, an instance of the
- alarmValue object might be named alarmValue.8"
- INDEX { alarmIndex }
- ::= { alarmTable 1 }
-
- AlarmEntry ::= SEQUENCE {
- alarmIndex INTEGER (1..65535),
- alarmInterval INTEGER,
- alarmVariable OBJECT IDENTIFIER,
- alarmSampleType INTEGER,
- alarmValue INTEGER,
- alarmStartupAlarm INTEGER,
- alarmRisingThreshold INTEGER,
- alarmFallingThreshold INTEGER,
- alarmRisingEventIndex INTEGER (0..65535),
- alarmFallingEventIndex INTEGER (0..65535),
- alarmOwner OwnerString,
- alarmStatus EntryStatus
- }
-
- alarmIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
-
-
- "An index that uniquely identifies an entry in the
- alarm table. Each such entry defines a
- diagnostic sample at a particular interval
- for an object on the device."
- ::= { alarmEntry 1 }
-
- alarmInterval OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The interval in seconds over which the data is
- sampled and compared with the rising and falling
- thresholds. When setting this variable, care
- should be taken in the case of deltaValue
- sampling - the interval should be set short enough
- that the sampled variable is very unlikely to
- increase or decrease by more than 2^31 - 1 during
- a single sampling interval.
-
- This object may not be modified if the associated
- alarmStatus object is equal to valid(1)."
- ::= { alarmEntry 2 }
-
- alarmVariable OBJECT-TYPE
- SYNTAX OBJECT IDENTIFIER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The object identifier of the particular variable to
- be sampled. Only variables that resolve to an ASN.1
- primitive type of INTEGER (INTEGER, Counter, Gauge,
- or TimeTicks) may be sampled.
-
- Because SNMP access control is articulated entirely
- in terms of the contents of MIB views, no access
- control mechanism exists that can restrict the value
- of this object to identify only those objects that
- exist in a particular MIB view. Because there is
- thus no acceptable means of restricting the read
- access that could be obtained through the alarm
- mechanism, the probe must only grant write access to
- this object in those views that have read access to
- all objects on the probe.
-
- During a set operation, if the supplied variable
- name is not available in the selected MIB view, a
- badValue error must be returned. If at any time the
-
-
- variable name of an established alarmEntry is no
- longer available in the selected MIB view, the probe
- must change the status of this alarmEntry to
- invalid(4).
-
- This object may not be modified if the associated
- alarmStatus object is equal to valid(1)."
- ::= { alarmEntry 3 }
-
- alarmSampleType OBJECT-TYPE
- SYNTAX INTEGER {
- absoluteValue(1),
- deltaValue(2)
- }
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The method of sampling the selected variable and
- calculating the value to be compared against the
- thresholds. If the value of this object is
- absoluteValue(1), the value of the selected variable
- will be compared directly with the thresholds at the
- end of the sampling interval. If the value of this
- object is deltaValue(2), the value of the selected
- variable at the last sample will be subtracted from
- the current value, and the difference compared with
- the thresholds.
-
- This object may not be modified if the associated
- alarmStatus object is equal to valid(1)."
- ::= { alarmEntry 4 }
-
- alarmValue OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The value of the statistic during the last sampling
- period. For example, if the sample type is
- deltaValue, this value will be the difference
- between the samples at the beginning and end of the
- period. If the sample type is absoluteValue, this
- value will be the sampled value at the end of the
- period.
-
- This is the value that is compared with the rising and
- falling thresholds.
-
-
-
- The value during the current sampling period is not
- made available until the period is completed and will
- remain available until the next period completes."
- ::= { alarmEntry 5 }
-
- alarmStartupAlarm OBJECT-TYPE
- SYNTAX INTEGER {
- risingAlarm(1),
- fallingAlarm(2),
- risingOrFallingAlarm(3)
- }
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The alarm that may be sent when this entry is first
- set to valid. If the first sample after this entry
- becomes valid is greater than or equal to the
- risingThreshold and alarmStartupAlarm is equal to
- risingAlarm(1) or risingOrFallingAlarm(3), then a
- single rising alarm will be generated. If the first
- sample after this entry becomes valid is less than
- or equal to the fallingThreshold and
- alarmStartupAlarm is equal to fallingAlarm(2) or
- risingOrFallingAlarm(3), then a single falling alarm
- will be generated.
-
- This object may not be modified if the associated
- alarmStatus object is equal to valid(1)."
- ::= { alarmEntry 6 }
-
- alarmRisingThreshold OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "A threshold for the sampled statistic. When the
- current sampled value is greater than or equal to
- this threshold, and the value at the last sampling
- interval was less than this threshold, a single
- event will be generated. A single event will also
- be generated if the first sample after this entry
- becomes valid is greater than or equal to this
- threshold and the associated alarmStartupAlarm is
- equal to risingAlarm(1) or risingOrFallingAlarm(3).
-
- After a rising event is generated, another such event
- will not be generated until the sampled value
- falls below this threshold and reaches the
-
-
- alarmFallingThreshold.
-
- This object may not be modified if the associated
- alarmStatus object is equal to valid(1)."
- ::= { alarmEntry 7 }
-
- alarmFallingThreshold OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "A threshold for the sampled statistic. When the
- current sampled value is less than or equal to this
- threshold, and the value at the last sampling
- interval was greater than this threshold, a single
- event will be generated. A single event will also
- be generated if the first sample after this entry
- becomes valid is less than or equal to this
- threshold and the associated alarmStartupAlarm is
- equal to fallingAlarm(2) or risingOrFallingAlarm(3).
-
- After a falling event is generated, another such event
- will not be generated until the sampled value
- rises above this threshold and reaches the
- alarmRisingThreshold.
-
- This object may not be modified if the associated
- alarmStatus object is equal to valid(1)."
- ::= { alarmEntry 8 }
-
- alarmRisingEventIndex OBJECT-TYPE
- SYNTAX INTEGER (0..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The index of the eventEntry that is
- used when a rising threshold is crossed. The
- eventEntry identified by a particular value of
- this index is the same as identified by the same value
- of the eventIndex object. If there is no
- corresponding entry in the eventTable, then
- no association exists. In particular, if this value
- is zero, no associated event will be generated, as
- zero is not a valid event index.
-
- This object may not be modified if the associated
- alarmStatus object is equal to valid(1)."
- ::= { alarmEntry 9 }
-
-
- alarmFallingEventIndex OBJECT-TYPE
- SYNTAX INTEGER (0..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The index of the eventEntry that is
- used when a falling threshold is crossed. The
- eventEntry identified by a particular value of
- this index is the same as identified by the same value
- of the eventIndex object. If there is no
- corresponding entry in the eventTable, then
- no association exists. In particular, if this value
- is zero, no associated event will be generated, as
- zero is not a valid event index.
-
- This object may not be modified if the associated
- alarmStatus object is equal to valid(1)."
- ::= { alarmEntry 10 }
-
- alarmOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { alarmEntry 11 }
-
- alarmStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The status of this alarm entry."
- ::= { alarmEntry 12 }
-
-
- -- The Host Group
-
- -- Implementation of the Host group is optional.
- --
- -- The host group discovers new hosts on the network by
- -- keeping a list of source and destination MAC Addresses seen
- -- in good packets. For each of these addresses, the host
- -- group keeps a set of statistics. The hostControlTable
- -- controls which interfaces this function is performed on,
- -- and contains some information about the process. On
- -- behalf of each hostControlEntry, data is collected on an
-
-
- -- interface and placed in both the hostTable and the
- -- hostTimeTable. If the monitoring device finds itself
- -- short of resources, it may delete entries as needed. It
- -- is suggested that the device delete the least recently
- -- used entries first.
-
- -- The hostTable contains entries for each address
- -- discovered on a particular interface. Each entry
- -- contains statistical data about that host. This table is
- -- indexed by the MAC address of the host, through which a
- -- random access may be achieved.
-
- -- The hostTimeTable contains data in the same format as the
- -- hostTable, and must contain the same set of hosts, but is
- -- indexed using hostTimeCreationOrder rather than
- -- hostAddress.
- -- The hostTimeCreationOrder is an integer which reflects
- -- the relative order in which a particular entry was
- -- discovered and thus inserted into the table. As this
- -- order, and thus the index, is among those entries
- -- currently in the table, the index for a particular entry
- -- may change if an (earlier) entry is deleted. Thus the
- -- association between hostTimeCreationOrder and
- -- hostTimeEntry may be broken at any time.
-
- -- The hostTimeTable has two important uses. The first is the
- -- fast download of this potentially large table. Because the
- -- index of this table runs from 1 to the size of the table,
- -- inclusive, its values are predictable. This allows very
- -- efficient packing of variables into SNMP PDU's and allows
- -- a table transfer to have multiple packets outstanding.
- -- These benefits increase transfer rates tremendously.
-
- -- The second use of the hostTimeTable is the efficient
- -- discovery by the management station of new entries added
- -- to the table. After the management station has downloaded
- -- the entire table, it knows that new entries will be added
- -- immediately after the end of the current table. It can
- -- thus detect new entries there and retrieve them easily.
-
- -- Because the association between hostTimeCreationOrder and
- -- hostTimeEntry may be broken at any time, the management
- -- station must monitor the related hostControlLastDeleteTime
- -- object. When the management station thus detects a
- -- deletion, it must assume that any such associations have
- --- been broken, and invalidate any it has stored locally.
- -- This includes restarting any download of the
- -- hostTimeTable that may have been in progress, as well as
-
-
- -- rediscovering the end of the hostTimeTable so that it may
- -- detect new entries. If the management station does not
- -- detect the broken association, it may continue to refer
- -- to a particular host by its creationOrder while
- -- unwittingly retrieving the data associated with another
- -- host entirely. If this happens while downloading the
- -- host table, the management station may fail to download
- -- all of the entries in the table.
-
- hostControlTable OBJECT-TYPE
- SYNTAX SEQUENCE OF HostControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of host table control entries."
- ::= { hosts 1 }
-
- hostControlEntry OBJECT-TYPE
- SYNTAX HostControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of parameters that set up the discovery of
- hosts on a particular interface and the collection
- of statistics about these hosts. For example, an
- instance of the hostControlTableSize object might be
- named hostControlTableSize.1"
- INDEX { hostControlIndex }
- ::= { hostControlTable 1 }
-
- HostControlEntry ::= SEQUENCE {
- hostControlIndex INTEGER (1..65535),
- hostControlDataSource OBJECT IDENTIFIER,
- hostControlTableSize INTEGER,
- hostControlLastDeleteTime TimeTicks,
- hostControlOwner OwnerString,
- hostControlStatus EntryStatus
- }
-
- hostControlIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry in the
- hostControl table. Each such entry defines
- a function that discovers hosts on a particular
- interface and places statistics about them in the
-
-
- hostTable and the hostTimeTable on behalf of this
- hostControlEntry."
- ::= { hostControlEntry 1 }
-
- hostControlDataSource OBJECT-TYPE
- SYNTAX OBJECT IDENTIFIER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "This object identifies the source of the data for
- this instance of the host function. This source
- can be any interface on this device. In order
- to identify a particular interface, this object shall
- identify the instance of the ifIndex object, defined
- in RFC 1213 and RFC 1573 [4,6], for the desired
- interface. For example, if an entry were to receive
- data from interface #1, this object would be set to
- ifIndex.1.
-
- The statistics in this group reflect all packets
- on the local network segment attached to the
- identified interface.
-
- An agent may or may not be able to tell if
- fundamental changes to the media of the interface
- have occurred and necessitate an invalidation of
- this entry. For example, a hot-pluggable ethernet
- card could be pulled out and replaced by a
- token-ring card. In such a case, if the agent has
- such knowledge of the change, it is recommended that
- it invalidate this entry.
-
- This object may not be modified if the associated
- hostControlStatus object is equal to valid(1)."
- ::= { hostControlEntry 2 }
-
- hostControlTableSize OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of hostEntries in the hostTable and the
- hostTimeTable associated with this hostControlEntry."
- ::= { hostControlEntry 3 }
-
- hostControlLastDeleteTime OBJECT-TYPE
- SYNTAX TimeTicks
- ACCESS read-only
-
-
- STATUS mandatory
- DESCRIPTION
- "The value of sysUpTime when the last entry
- was deleted from the portion of the hostTable
- associated with this hostControlEntry. If no
- deletions have occurred, this value shall be zero."
- ::= { hostControlEntry 4 }
-
- hostControlOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { hostControlEntry 5 }
-
- hostControlStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The status of this hostControl entry.
-
- If this object is not equal to valid(1), all
- associated entries in the hostTable, hostTimeTable,
- and the hostTopNTable shall be deleted by the
- agent."
- ::= { hostControlEntry 6 }
-
- hostTable OBJECT-TYPE
- SYNTAX SEQUENCE OF HostEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of host entries."
- ::= { hosts 2 }
-
- hostEntry OBJECT-TYPE
- SYNTAX HostEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A collection of statistics for a particular host
- that has been discovered on an interface of this
- device. For example, an instance of the
- hostOutBroadcastPkts object might be named
- hostOutBroadcastPkts.1.6.8.0.32.27.3.176"
-
-
- INDEX { hostIndex, hostAddress }
- ::= { hostTable 1 }
-
- HostEntry ::= SEQUENCE {
- hostAddress OCTET STRING,
- hostCreationOrder INTEGER (1..65535),
- hostIndex INTEGER (1..65535),
- hostInPkts Counter,
- hostOutPkts Counter,
- hostInOctets Counter,
- hostOutOctets Counter,
- hostOutErrors Counter,
- hostOutBroadcastPkts Counter,
- hostOutMulticastPkts Counter
- }
-
- hostAddress OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The physical address of this host."
- ::= { hostEntry 1 }
-
- hostCreationOrder OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that defines the relative ordering of
- the creation time of hosts captured for a
- particular hostControlEntry. This index shall
- be between 1 and N, where N is the value of
- the associated hostControlTableSize. The ordering
- of the indexes is based on the order of each entry's
- insertion into the table, in which entries added
- earlier have a lower index value than entries added
- later.
-
- It is important to note that the order for a
- particular entry may change as an (earlier) entry
- is deleted from the table. Because this order may
- change, management stations should make use of the
- hostControlLastDeleteTime variable in the
- hostControlEntry associated with the relevant
- portion of the hostTable. By observing
- this variable, the management station may detect
- the circumstances where a previous association
-
-
- between a value of hostCreationOrder
- and a hostEntry may no longer hold."
- ::= { hostEntry 2 }
-
- hostIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The set of collected host statistics of which
- this entry is a part. The set of hosts
- identified by a particular value of this
- index is associated with the hostControlEntry
- as identified by the same value of hostControlIndex."
- ::= { hostEntry 3 }
-
- hostInPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of good packets transmitted to this
- address since it was added to the hostTable."
- ::= { hostEntry 4 }
-
- hostOutPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets, including bad packets,
- transmitted by this address since it was added
- to the hostTable."
- ::= { hostEntry 5 }
-
- hostInOctets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of octets transmitted to this address
- since it was added to the hostTable (excluding
- framing bits but including FCS octets), except for
- those octets in bad packets."
- ::= { hostEntry 6 }
-
- hostOutOctets OBJECT-TYPE
- SYNTAX Counter
-
-
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of octets transmitted by this address
- since it was added to the hostTable (excluding
- framing bits but including FCS octets), including
- those octets in bad packets."
- ::= { hostEntry 7 }
-
- hostOutErrors OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of bad packets transmitted by this address
- since this host was added to the hostTable."
- ::= { hostEntry 8 }
-
- hostOutBroadcastPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of good packets transmitted by this
- address that were directed to the broadcast address
- since this host was added to the hostTable."
- ::= { hostEntry 9 }
-
- hostOutMulticastPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of good packets transmitted by this
- address that were directed to a multicast address
- since this host was added to the hostTable.
- Note that this number does not include packets
- directed to the broadcast address."
- ::= { hostEntry 10 }
-
- -- host Time Table
-
- hostTimeTable OBJECT-TYPE
- SYNTAX SEQUENCE OF HostTimeEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of time-ordered host table entries."
-
-
- ::= { hosts 3 }
-
- hostTimeEntry OBJECT-TYPE
- SYNTAX HostTimeEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A collection of statistics for a particular host
- that has been discovered on an interface of this
- device. This collection includes the relative
- ordering of the creation time of this object. For
- example, an instance of the hostTimeOutBroadcastPkts
- object might be named
- hostTimeOutBroadcastPkts.1.687"
- INDEX { hostTimeIndex, hostTimeCreationOrder }
- ::= { hostTimeTable 1 }
-
- HostTimeEntry ::= SEQUENCE {
- hostTimeAddress OCTET STRING,
- hostTimeCreationOrder INTEGER (1..65535),
- hostTimeIndex INTEGER (1..65535),
- hostTimeInPkts Counter,
- hostTimeOutPkts Counter,
- hostTimeInOctets Counter,
- hostTimeOutOctets Counter,
- hostTimeOutErrors Counter,
- hostTimeOutBroadcastPkts Counter,
- hostTimeOutMulticastPkts Counter
- }
-
- hostTimeAddress OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The physical address of this host."
- ::= { hostTimeEntry 1 }
-
- hostTimeCreationOrder OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry in
- the hostTime table among those entries associated
- with the same hostControlEntry. This index shall
- be between 1 and N, where N is the value of
- the associated hostControlTableSize. The ordering
-
-
- of the indexes is based on the order of each entry's
- insertion into the table, in which entries added
- earlier have a lower index value than entries added
- later. Thus the management station has the ability to
- learn of new entries added to this table without
- downloading the entire table.
-
- It is important to note that the index for a
- particular entry may change as an (earlier) entry
- is deleted from the table. Because this order may
- change, management stations should make use of the
- hostControlLastDeleteTime variable in the
- hostControlEntry associated with the relevant
- portion of the hostTimeTable. By observing
- this variable, the management station may detect
- the circumstances where a download of the table
- may have missed entries, and where a previous
- association between a value of hostTimeCreationOrder
- and a hostTimeEntry may no longer hold."
- ::= { hostTimeEntry 2 }
-
- hostTimeIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The set of collected host statistics of which
- this entry is a part. The set of hosts
- identified by a particular value of this
- index is associated with the hostControlEntry
- as identified by the same value of hostControlIndex."
- ::= { hostTimeEntry 3 }
-
- hostTimeInPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of good packets transmitted to this
- address since it was added to the hostTimeTable."
- ::= { hostTimeEntry 4 }
-
- hostTimeOutPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of god packets transmitted by this
-
-
- address since it was added to the hostTimeTable."
- ::= { hostTimeEntry 5 }
-
- hostTimeInOctets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of octets transmitted to this address
- since it was added to the hostTimeTable (excluding
- framing bits but including FCS octets), except for
- those octets in bad packets."
- ::= { hostTimeEntry 6 }
-
- hostTimeOutOctets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of octets transmitted by this address
- since it was added to the hostTimeTable (excluding
- framing bits but including FCS octets), including
- those octets in bad packets."
- ::= { hostTimeEntry 7 }
-
- hostTimeOutErrors OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of bad packets transmitted by this address
- since this host was added to the hostTimeTable."
- ::= { hostTimeEntry 8 }
-
- hostTimeOutBroadcastPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of good packets transmitted by this
- address that were directed to the broadcast address
- since this host was added to the hostTimeTable."
- ::= { hostTimeEntry 9 }
-
- hostTimeOutMulticastPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
-
-
- DESCRIPTION
- "The number of good packets transmitted by this
- address that were directed to a multicast address
- since this host was added to the hostTimeTable.
- Note that this number does not include packets
- directed to the broadcast address."
- ::= { hostTimeEntry 10 }
-
-
- -- The Host Top "N" Group
-
- -- Implementation of the Host Top N group is optional.
- --
- -- The Host Top N group requires the implementation of the
- -- host group.
- --
- -- The Host Top N group is used to prepare reports that
- -- describe the hosts that top a list ordered by one of
- -- their statistics.
- -- The available statistics are samples of one of their
- -- base statistics, over an interval specified by the
- -- management station. Thus, these statistics are rate
- -- based. The management station also selects how many such
- -- hosts are reported.
-
- -- The hostTopNControlTable is used to initiate the
- -- generation of such a report. The management station
- -- may select the parameters of such a report, such as
- -- which interface, which statistic, how many hosts,
- -- and the start and stop times of the sampling. When
- -- the report is prepared, entries are created in the
- -- hostTopNTable associated with the relevant
- -- hostTopNControlEntry. These entries are static for
- -- each report after it has been prepared.
-
- hostTopNControlTable OBJECT-TYPE
- SYNTAX SEQUENCE OF HostTopNControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of top N host control entries."
- ::= { hostTopN 1 }
-
- hostTopNControlEntry OBJECT-TYPE
- SYNTAX HostTopNControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
-
-
- "A set of parameters that control the creation of a
- report of the top N hosts according to several
- metrics. For example, an instance of the
- hostTopNDuration object might be named
- hostTopNDuration.3"
- INDEX { hostTopNControlIndex }
- ::= { hostTopNControlTable 1 }
-
- HostTopNControlEntry ::= SEQUENCE {
- hostTopNControlIndex INTEGER (1..65535),
- hostTopNHostIndex INTEGER (1..65535),
- hostTopNRateBase INTEGER,
- hostTopNTimeRemaining INTEGER,
- hostTopNDuration INTEGER,
- hostTopNRequestedSize INTEGER,
- hostTopNGrantedSize INTEGER,
- hostTopNStartTime TimeTicks,
- hostTopNOwner OwnerString,
- hostTopNStatus EntryStatus
- }
-
- hostTopNControlIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry
- in the hostTopNControl table. Each such
- entry defines one top N report prepared for
- one interface."
- ::= { hostTopNControlEntry 1 }
-
- hostTopNHostIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The host table for which a top N report will be
- prepared on behalf of this entry. The host table
- identified by a particular value of this index is
- associated with the same host table as identified by
- the same value of hostIndex.
-
- This object may not be modified if the associated
- hostTopNStatus object is equal to valid(1)."
- ::= { hostTopNControlEntry 2 }
-
- hostTopNRateBase OBJECT-TYPE
-
-
- SYNTAX INTEGER {
- hostTopNInPkts(1),
- hostTopNOutPkts(2),
- hostTopNInOctets(3),
- hostTopNOutOctets(4),
- hostTopNOutErrors(5),
- hostTopNOutBroadcastPkts(6),
- hostTopNOutMulticastPkts(7)
- }
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The variable for each host that the hostTopNRate
- variable is based upon.
-
- This object may not be modified if the associated
- hostTopNStatus object is equal to valid(1)."
- ::= { hostTopNControlEntry 3 }
-
- hostTopNTimeRemaining OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The number of seconds left in the report currently
- being collected. When this object is modified by
- the management station, a new collection is started,
- possibly aborting a currently running report. The
- new value is used as the requested duration of this
- report, which is loaded into the associated
- hostTopNDuration object.
-
- When this object is set to a non-zero value, any
- associated hostTopNEntries shall be made
- inaccessible by the monitor. While the value of
- this object is non-zero, it decrements by one per
- second until it reaches zero. During this time, all
- associated hostTopNEntries shall remain
- inaccessible. At the time that this object
- decrements to zero, the report is made accessible in
- the hostTopNTable. Thus, the hostTopN table needs
- to be created only at the end of the collection
- interval."
- DEFVAL { 0 }
- ::= { hostTopNControlEntry 4 }
-
- hostTopNDuration OBJECT-TYPE
- SYNTAX INTEGER
-
-
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of seconds that this report has collected
- during the last sampling interval, or if this
- report is currently being collected, the number
- of seconds that this report is being collected
- during this sampling interval.
-
- When the associated hostTopNTimeRemaining object is
- set, this object shall be set by the probe to the
- same value and shall not be modified until the next
- time the hostTopNTimeRemaining is set.
-
- This value shall be zero if no reports have been
- requested for this hostTopNControlEntry."
- DEFVAL { 0 }
- ::= { hostTopNControlEntry 5 }
-
- hostTopNRequestedSize OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The maximum number of hosts requested for the top N
- table.
-
- When this object is created or modified, the probe
- should set hostTopNGrantedSize as closely to this
- object as is possible for the particular probe
- implementation and available resources."
- DEFVAL { 10 }
- ::= { hostTopNControlEntry 6 }
-
- hostTopNGrantedSize OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The maximum number of hosts in the top N table.
-
- When the associated hostTopNRequestedSize object is
- created or modified, the probe should set this
- object as closely to the requested value as is
- possible for the particular implementation and
- available resources. The probe must not lower this
- value except as a result of a set to the associated
- hostTopNRequestedSize object.
-
-
- Hosts with the highest value of hostTopNRate shall be
- placed in this table in decreasing order of this rate
- until there is no more room or until there are no more
- hosts."
- ::= { hostTopNControlEntry 7 }
-
- hostTopNStartTime OBJECT-TYPE
- SYNTAX TimeTicks
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The value of sysUpTime when this top N report was
- last started. In other words, this is the time that
- the associated hostTopNTimeRemaining object was
- modified to start the requested report."
- ::= { hostTopNControlEntry 8 }
-
- hostTopNOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { hostTopNControlEntry 9 }
-
- hostTopNStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The status of this hostTopNControl entry.
-
- If this object is not equal to valid(1), all
- associated hostTopNEntries shall be deleted by the
- agent."
- ::= { hostTopNControlEntry 10 }
-
- hostTopNTable OBJECT-TYPE
- SYNTAX SEQUENCE OF HostTopNEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of top N host entries."
- ::= { hostTopN 2 }
-
- hostTopNEntry OBJECT-TYPE
- SYNTAX HostTopNEntry
-
-
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A set of statistics for a host that is part of a
- top N report. For example, an instance of the
- hostTopNRate object might be named
- hostTopNRate.3.10"
- INDEX { hostTopNReport, hostTopNIndex }
- ::= { hostTopNTable 1 }
-
- HostTopNEntry ::= SEQUENCE {
- hostTopNReport INTEGER (1..65535),
- hostTopNIndex INTEGER (1..65535),
- hostTopNAddress OCTET STRING,
- hostTopNRate INTEGER
- }
-
- hostTopNReport OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "This object identifies the top N report of which
- this entry is a part. The set of hosts
- identified by a particular value of this
- object is part of the same report as identified
- by the same value of the hostTopNControlIndex object."
- ::= { hostTopNEntry 1 }
-
- hostTopNIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry in
- the hostTopN table among those in the same report.
- This index is between 1 and N, where N is the
- number of entries in this table. Increasing values
- of hostTopNIndex shall be assigned to entries with
- decreasing values of hostTopNRate until index N
- is assigned to the entry with the lowest value of
- hostTopNRate or there are no more hostTopNEntries."
- ::= { hostTopNEntry 2 }
-
- hostTopNAddress OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-only
- STATUS mandatory
-
-
- DESCRIPTION
- "The physical address of this host."
- ::= { hostTopNEntry 3 }
-
- hostTopNRate OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The amount of change in the selected variable
- during this sampling interval. The selected
- variable is this host's instance of the object
- selected by hostTopNRateBase."
- ::= { hostTopNEntry 4 }
-
-
- -- The Matrix Group
-
- -- Implementation of the Matrix group is optional.
- --
- -- The Matrix group consists of the matrixControlTable,
- -- matrixSDTable and the matrixDSTable. These tables
- -- store statistics for a particular conversation
- -- between two addresses. As the device detects a new
- -- conversation, including those to a non-unicast
- -- address, it creates a new entry in both of the
- -- matrix tables. It must only create new entries
- -- based on information received in good packets. If
- -- the monitoring device finds itself short of
- -- resources, it may delete entries as needed. It is
- -- suggested that the device delete the least recently
- -- used entries first.
-
- matrixControlTable OBJECT-TYPE
- SYNTAX SEQUENCE OF MatrixControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of information entries for the
- traffic matrix on each interface."
- ::= { matrix 1 }
-
- matrixControlEntry OBJECT-TYPE
- SYNTAX MatrixControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "Information about a traffic matrix on a particular
-
-
- interface. For example, an instance of the
- matrixControlLastDeleteTime object might be named
- matrixControlLastDeleteTime.1"
- INDEX { matrixControlIndex }
- ::= { matrixControlTable 1 }
-
- MatrixControlEntry ::= SEQUENCE {
- matrixControlIndex INTEGER (1..65535),
- matrixControlDataSource OBJECT IDENTIFIER,
- matrixControlTableSize INTEGER,
- matrixControlLastDeleteTime TimeTicks,
- matrixControlOwner OwnerString,
- matrixControlStatus EntryStatus
- }
-
- matrixControlIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry in the
- matrixControl table. Each such entry defines
- a function that discovers conversations on a
- particular interface and places statistics about
- them in the matrixSDTable and the matrixDSTable on
- behalf of this matrixControlEntry."
- ::= { matrixControlEntry 1 }
-
- matrixControlDataSource OBJECT-TYPE
- SYNTAX OBJECT IDENTIFIER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "This object identifies the source of
- the data from which this entry creates a traffic
- matrix. This source can be any interface on this
- device. In order to identify a particular
- interface, this object shall identify the instance
- of the ifIndex object, defined in RFC 1213 and RFC
- 1573 [4,6], for the desired interface. For example,
- if an entry were to receive data from interface #1,
- this object would be set to ifIndex.1.
-
- The statistics in this group reflect all packets
- on the local network segment attached to the
- identified interface.
-
- An agent may or may not be able to tell if
-
-
- fundamental changes to the media of the interface
- have occurred and necessitate an invalidation of
- this entry. For example, a hot-pluggable ethernet
- card could be pulled out and replaced by a
- token-ring card. In such a case, if the agent has
- such knowledge of the change, it is recommended that
- it invalidate this entry.
-
- This object may not be modified if the associated
- matrixControlStatus object is equal to valid(1)."
- ::= { matrixControlEntry 2 }
-
- matrixControlTableSize OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of matrixSDEntries in the matrixSDTable
- for this interface. This must also be the value of
- the number of entries in the matrixDSTable for this
- interface."
- ::= { matrixControlEntry 3 }
-
- matrixControlLastDeleteTime OBJECT-TYPE
- SYNTAX TimeTicks
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The value of sysUpTime when the last entry
- was deleted from the portion of the matrixSDTable
- or matrixDSTable associated with this
- matrixControlEntry. If no deletions have occurred,
- this value shall be zero."
- ::= { matrixControlEntry 4 }
-
- matrixControlOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { matrixControlEntry 5 }
-
- matrixControlStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
-
-
- DESCRIPTION
- "The status of this matrixControl entry.
-
- If this object is not equal to valid(1), all
- associated entries in the matrixSDTable and the
- matrixDSTable shall be deleted by the agent."
- ::= { matrixControlEntry 6 }
-
- matrixSDTable OBJECT-TYPE
- SYNTAX SEQUENCE OF MatrixSDEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of traffic matrix entries indexed by
- source and destination MAC address."
- ::= { matrix 2 }
-
- matrixSDEntry OBJECT-TYPE
- SYNTAX MatrixSDEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A collection of statistics for communications between
- two addresses on a particular interface. For example,
- an instance of the matrixSDPkts object might be named
- matrixSDPkts.1.6.8.0.32.27.3.176.6.8.0.32.10.8.113"
- INDEX { matrixSDIndex,
- matrixSDSourceAddress, matrixSDDestAddress }
- ::= { matrixSDTable 1 }
-
- MatrixSDEntry ::= SEQUENCE {
- matrixSDSourceAddress OCTET STRING,
- matrixSDDestAddress OCTET STRING,
- matrixSDIndex INTEGER (1..65535),
- matrixSDPkts Counter,
- matrixSDOctets Counter,
- matrixSDErrors Counter
- }
-
- matrixSDSourceAddress OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The source physical address."
- ::= { matrixSDEntry 1 }
-
- matrixSDDestAddress OBJECT-TYPE
-
-
- SYNTAX OCTET STRING
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The destination physical address."
- ::= { matrixSDEntry 2 }
-
- matrixSDIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The set of collected matrix statistics of which
- this entry is a part. The set of matrix statistics
- identified by a particular value of this index
- is associated with the same matrixControlEntry
- as identified by the same value of
- matrixControlIndex."
- ::= { matrixSDEntry 3 }
-
- matrixSDPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets transmitted from the source
- address to the destination address (this number
- includes bad packets)."
- ::= { matrixSDEntry 4 }
-
- matrixSDOctets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of octets (excluding framing bits but
- including FCS octets) contained in all packets
- transmitted from the source address to the
- destination address."
- ::= { matrixSDEntry 5 }
-
- matrixSDErrors OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of bad packets transmitted from
- the source address to the destination address."
-
-
- ::= { matrixSDEntry 6 }
-
-
- -- Traffic matrix tables from destination to source
-
- matrixDSTable OBJECT-TYPE
- SYNTAX SEQUENCE OF MatrixDSEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of traffic matrix entries indexed by
- destination and source MAC address."
- ::= { matrix 3 }
-
- matrixDSEntry OBJECT-TYPE
- SYNTAX MatrixDSEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A collection of statistics for communications between
- two addresses on a particular interface. For example,
- an instance of the matrixSDPkts object might be named
- matrixSDPkts.1.6.8.0.32.10.8.113.6.8.0.32.27.3.176"
- INDEX { matrixDSIndex,
- matrixDSDestAddress, matrixDSSourceAddress }
- ::= { matrixDSTable 1 }
-
- MatrixDSEntry ::= SEQUENCE {
- matrixDSSourceAddress OCTET STRING,
- matrixDSDestAddress OCTET STRING,
- matrixDSIndex INTEGER (1..65535),
- matrixDSPkts Counter,
- matrixDSOctets Counter,
- matrixDSErrors Counter
- }
-
- matrixDSSourceAddress OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The source physical address."
- ::= { matrixDSEntry 1 }
-
- matrixDSDestAddress OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-only
- STATUS mandatory
-
-
- DESCRIPTION
- "The destination physical address."
- ::= { matrixDSEntry 2 }
-
- matrixDSIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The set of collected matrix statistics of which
- this entry is a part. The set of matrix statistics
- identified by a particular value of this index
- is associated with the same matrixControlEntry
- as identified by the same value of
- matrixControlIndex."
- ::= { matrixDSEntry 3 }
-
- matrixDSPkts OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets transmitted from the source
- address to the destination address (this number
- includes bad packets)."
- ::= { matrixDSEntry 4 }
-
- matrixDSOctets OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of octets (excluding framing bits
- but including FCS octets) contained in all packets
- transmitted from the source address to the
- destination address."
- ::= { matrixDSEntry 5 }
-
- matrixDSErrors OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of bad packets transmitted from
- the source address to the destination address."
- ::= { matrixDSEntry 6 }
-
-
-
-
- -- The Filter Group
-
- -- Implementation of the Filter group is optional.
- --
- -- The Filter group allows packets to be captured with an
- -- arbitrary filter expression. A logical data and
- -- event stream or "channel" is formed by the packets
- -- that match the filter expression.
- --
- -- This filter mechanism allows the creation of an arbitrary
- -- logical expression with which to filter packets. Each
- -- filter associated with a channel is OR'ed with the others.
- -- Within a filter, any bits checked in the data and status
- -- are AND'ed with respect to other bits in the same filter.
- -- The NotMask also allows for checking for inequality.
- -- Finally, the channelAcceptType object allows for
- -- inversion of the whole equation.
- --
- -- If a management station wishes to receive a trap to alert
- -- it that new packets have been captured and are available
- -- for download, it is recommended that it set up an alarm
- -- entry that monitors the value of the relevant
- -- channelMatches instance.
- --
- -- The channel can be turned on or off, and can also
- -- generate events when packets pass through it.
-
- filterTable OBJECT-TYPE
- SYNTAX SEQUENCE OF FilterEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of packet filter entries."
- ::= { filter 1 }
-
- filterEntry OBJECT-TYPE
- SYNTAX FilterEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A set of parameters for a packet filter applied on a
- particular interface. As an example, an instance of
- the filterPktData object might be named
- filterPktData.12"
- INDEX { filterIndex }
- ::= { filterTable 1 }
-
-
-
-
- FilterEntry ::= SEQUENCE {
- filterIndex INTEGER (1..65535),
- filterChannelIndex INTEGER (1..65535),
- filterPktDataOffset INTEGER,
- filterPktData OCTET STRING,
- filterPktDataMask OCTET STRING,
- filterPktDataNotMask OCTET STRING,
- filterPktStatus INTEGER,
- filterPktStatusMask INTEGER,
- filterPktStatusNotMask INTEGER,
- filterOwner OwnerString,
- filterStatus EntryStatus
- }
-
- filterIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry
- in the filter table. Each such entry defines
- one filter that is to be applied to every packet
- received on an interface."
- ::= { filterEntry 1 }
-
- filterChannelIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "This object identifies the channel of which this
- filter is a part. The filters identified by a
- particular value of this object are associated with
- the same channel as identified by the same value of
- the channelIndex object."
- ::= { filterEntry 2 }
-
- filterPktDataOffset OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The offset from the beginning of each packet where
- a match of packet data will be attempted. This offset
- is measured from the point in the physical layer
- packet after the framing bits, if any. For example,
- in an Ethernet frame, this point is at the beginning
- of the destination MAC address.
-
-
- This object may not be modified if the associated
- filterStatus object is equal to valid(1)."
- DEFVAL { 0 }
- ::= { filterEntry 3 }
-
- filterPktData OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The data that is to be matched with the input
- packet. For each packet received, this filter and
- the accompanying filterPktDataMask and
- filterPktDataNotMask will be adjusted for the
- offset. The only bits relevant to this match
- algorithm are those that have the corresponding
- filterPktDataMask bit equal to one. The following
- three rules are then applied to every packet:
-
- (1) If the packet is too short and does not have data
- corresponding to part of the filterPktData, the
- packet will fail this data match.
-
- (2) For each relevant bit from the packet with the
- corresponding filterPktDataNotMask bit set to
- zero, if the bit from the packet is not equal to
- the corresponding bit from the filterPktData,
- then the packet will fail this data match.
-
- (3) If for every relevant bit from the packet with the
- corresponding filterPktDataNotMask bit set to one,
- the bit from the packet is equal to the
- corresponding bit from the filterPktData, then
- the packet will fail this data match.
-
- Any packets that have not failed any of the three
- matches above have passed this data match. In
- particular, a zero length filter will match any
- packet.
-
- This object may not be modified if the associated
- filterStatus object is equal to valid(1)."
- ::= { filterEntry 4 }
-
- filterPktDataMask OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-write
- STATUS mandatory
-
-
- DESCRIPTION
- "The mask that is applied to the match process.
- After adjusting this mask for the offset, only those
- bits in the received packet that correspond to bits
- set in this mask are relevant for further processing
- by the match algorithm. The offset is applied to
- filterPktDataMask in the same way it is applied to the
- filter. For the purposes of the matching algorithm,
- if the associated filterPktData object is longer
- than this mask, this mask is conceptually extended
- with '1' bits until it reaches the length of the
- filterPktData object.
-
- This object may not be modified if the associated
- filterStatus object is equal to valid(1)."
- ::= { filterEntry 5 }
-
- filterPktDataNotMask OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The inversion mask that is applied to the match
- process. After adjusting this mask for the offset,
- those relevant bits in the received packet that
- correspond to bits cleared in this mask must all be
- equal to their corresponding bits in the
- filterPktData object for the packet to be accepted.
- In addition, at least one of those relevant bits in
- the received packet that correspond to bits set in
- this mask must be different to its corresponding bit
- in the filterPktData object.
-
- For the purposes of the matching algorithm, if the
- associated filterPktData object is longer than this
- mask, this mask is conceptually extended with '0'
- bits until it reaches the length of the
- filterPktData object.
-
- This object may not be modified if the associated
- filterStatus object is equal to valid(1)."
- ::= { filterEntry 6 }
-
- filterPktStatus OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
-
-
- "The status that is to be matched with the input
- packet. The only bits relevant to this match
- algorithm are those that have the corresponding
- filterPktStatusMask bit equal to one. The following
- two rules are then applied to every packet:
-
- (1) For each relevant bit from the packet status
- with the corresponding filterPktStatusNotMask bit
- set to zero, if the bit from the packet status is
- not equal to the corresponding bit from the
- filterPktStatus, then the packet will fail this
- status match.
-
- (2) If for every relevant bit from the packet status
- with the corresponding filterPktStatusNotMask bit
- set to one, the bit from the packet status is
- equal to the corresponding bit from the
- filterPktStatus, then the packet will fail this
- status match.
-
- Any packets that have not failed either of the two
- matches above have passed this status match. In
- particular, a zero length status filter will match any
- packet's status.
-
- The value of the packet status is a sum. This sum
- initially takes the value zero. Then, for each
- error, E, that has been discovered in this packet,
- 2 raised to a value representing E is added to the
- sum. The errors and the bits that represent them are
- dependent on the media type of the interface that
- this channel is receiving packets from.
-
- The errors defined for a packet captured off of an
- Ethernet interface are as follows:
-
- bit # Error
- 0 Packet is longer than 1518 octets
- 1 Packet is shorter than 64 octets
- 2 Packet experienced a CRC or Alignment
- error
-
- For example, an Ethernet fragment would have a
- value of 6 (2^1 + 2^2).
-
- As this MIB is expanded to new media types, this
- object will have other media-specific errors
- defined.
-
-
- For the purposes of this status matching algorithm,
- if the packet status is longer than this
- filterPktStatus object, this object is conceptually
- extended with '0' bits until it reaches the size of
- the packet status.
-
- This object may not be modified if the associated
- filterStatus object is equal to valid(1)."
- ::= { filterEntry 7 }
-
- filterPktStatusMask OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The mask that is applied to the status match
- process. Only those bits in the received packet
- that correspond to bits set in this mask are
- relevant for further processing by the status match
- algorithm. For the purposes of the matching
- algorithm, if the associated filterPktStatus object
- is longer than this mask, this mask is conceptually
- extended with '1' bits until it reaches the size of
- the filterPktStatus. In addition, if a packet
- status is longer than this mask, this mask is
- conceptually extended with '0' bits until it reaches
- the size of the packet status.
-
- This object may not be modified if the associated
- filterStatus object is equal to valid(1)."
- ::= { filterEntry 8 }
-
- filterPktStatusNotMask OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The inversion mask that is applied to the status
- match process. Those relevant bits in the received
- packet status that correspond to bits cleared in
- this mask must all be equal to their corresponding
- bits in the filterPktStatus object for the packet to
- be accepted. In addition, at least one of those
- relevant bits in the received packet status that
- correspond to bits set in this mask must be
- different to its corresponding bit in the
- filterPktStatus object for the packet to be
- accepted.
-
-
- For the purposes of the matching algorithm, if the
- associated filterPktStatus object or a packet status
- is longer than this mask, this mask is conceptually
- extended with '0' bits until it reaches the longer
- of the lengths of the filterPktStatus object and the
- packet status.
-
- This object may not be modified if the associated
- filterStatus object is equal to valid(1)."
- ::= { filterEntry 9 }
-
- filterOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { filterEntry 10 }
-
- filterStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The status of this filter entry."
- ::= { filterEntry 11 }
-
- channelTable OBJECT-TYPE
- SYNTAX SEQUENCE OF ChannelEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of packet channel entries."
- ::= { filter 2 }
-
- channelEntry OBJECT-TYPE
- SYNTAX ChannelEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A set of parameters for a packet channel applied on a
- particular interface. As an example, an instance of
- the channelMatches object might be named
- channelMatches.3"
- INDEX { channelIndex }
- ::= { channelTable 1 }
-
-
-
- ChannelEntry ::= SEQUENCE {
- channelIndex INTEGER (1..65535),
- channelIfIndex INTEGER (1..65535),
- channelAcceptType INTEGER,
- channelDataControl INTEGER,
- channelTurnOnEventIndex INTEGER (0..65535),
- channelTurnOffEventIndex INTEGER (0..65535),
- channelEventIndex INTEGER (0..65535),
- channelEventStatus INTEGER,
- channelMatches Counter,
- channelDescription DisplayString (SIZE (0..127)),
- channelOwner OwnerString,
- channelStatus EntryStatus
- }
-
- channelIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry in the
- channel table. Each such entry defines one channel,
- a logical data and event stream.
-
- It is suggested that before creating a channel, an
- application should scan all instances of the
- filterChannelIndex object to make sure that there
- are no pre-existing filters that would be
- inadvertently be linked to the channel."
- ::= { channelEntry 1 }
-
- channelIfIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The value of this object uniquely identifies the
- interface on this remote network monitoring device
- to which the associated filters are applied to allow
- data into this channel. The interface identified by
- a particular value of this object is the same
- interface as identified by the same value of the
- ifIndex object, defined in RFC 1213 and RFC 1573
- [4,6].
-
- The filters in this group are applied to all packets
- on the local network segment attached to the
- identified interface.
-
-
- An agent may or may not be able to tell if
- fundamental changes to the media of the interface
- have occurred and necessitate an invalidation of
- this entry. For example, a hot-pluggable ethernet
- card could be pulled out and replaced by a
- token-ring card. In such a case, if the agent has
- such knowledge of the change, it is recommended that
- it invalidate this entry.
-
- This object may not be modified if the associated
- channelStatus object is equal to valid(1)."
- ::= { channelEntry 2 }
-
- channelAcceptType OBJECT-TYPE
- SYNTAX INTEGER {
- acceptMatched(1),
- acceptFailed(2)
- }
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "This object controls the action of the filters
- associated with this channel. If this object is equal
- to acceptMatched(1), packets will be accepted to this
- channel if they are accepted by both the packet data
- and packet status matches of an associated filter. If
- this object is equal to acceptFailed(2), packets will
- be accepted to this channel only if they fail either
- the packet data match or the packet status match of
- each of the associated filters.
-
- In particular, a channel with no associated filters
- will match no packets if set to acceptMatched(1)
- case and will match all packets in the
- acceptFailed(2) case.
-
- This object may not be modified if the associated
- channelStatus object is equal to valid(1)."
- ::= { channelEntry 3 }
-
- channelDataControl OBJECT-TYPE
- SYNTAX INTEGER {
- on(1),
- off(2)
- }
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
-
-
- "This object controls the flow of data through this
- channel. If this object is on(1), data, status and
- events flow through this channel. If this object is
- off(2), data, status and events will not flow
- through this channel."
- DEFVAL { off }
- ::= { channelEntry 4 }
-
- channelTurnOnEventIndex OBJECT-TYPE
- SYNTAX INTEGER (0..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The value of this object identifies the event
- that is configured to turn the associated
- channelDataControl from off to on when the event is
- generated. The event identified by a particular value
- of this object is the same event as identified by the
- same value of the eventIndex object. If there is no
- corresponding entry in the eventTable, then no
- association exists. In fact, if no event is intended
- for this channel, channelTurnOnEventIndex must be
- set to zero, a non-existent event index.
-
- This object may not be modified if the associated
- channelStatus object is equal to valid(1)."
- ::= { channelEntry 5 }
-
- channelTurnOffEventIndex OBJECT-TYPE
- SYNTAX INTEGER (0..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The value of this object identifies the event
- that is configured to turn the associated
- channelDataControl from on to off when the event is
- generated. The event identified by a particular value
- of this object is the same event as identified by the
- same value of the eventIndex object. If there is no
- corresponding entry in the eventTable, then no
- association exists. In fact, if no event is intended
- for this channel, channelTurnOffEventIndex must be
- set to zero, a non-existent event index.
-
- This object may not be modified if the associated
- channelStatus object is equal to valid(1)."
- ::= { channelEntry 6 }
-
-
-
- channelEventIndex OBJECT-TYPE
- SYNTAX INTEGER (0..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The value of this object identifies the event
- that is configured to be generated when the
- associated channelDataControl is on and a packet
- is matched. The event identified by a particular
- value of this object is the same event as identified
- by the same value of the eventIndex object. If
- there is no corresponding entry in the eventTable,
- then no association exists. In fact, if no event is
- intended for this channel, channelEventIndex must be
- set to zero, a non-existent event index.
-
- This object may not be modified if the associated
- channelStatus object is equal to valid(1)."
- ::= { channelEntry 7 }
-
- channelEventStatus OBJECT-TYPE
- SYNTAX INTEGER {
- eventReady(1),
- eventFired(2),
- eventAlwaysReady(3)
- }
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The event status of this channel.
-
- If this channel is configured to generate events
- when packets are matched, a means of controlling
- the flow of those events is often needed. When
- this object is equal to eventReady(1), a single
- event may be generated, after which this object
- will be set by the probe to eventFired(2). While
- in the eventFired(2) state, no events will be
- generated until the object is modified to
- eventReady(1) (or eventAlwaysReady(3)). The
- management station can thus easily respond to a
- notification of an event by re-enabling this object.
-
- If the management station wishes to disable this
- flow control and allow events to be generated
- at will, this object may be set to
- eventAlwaysReady(3). Disabling the flow control
- is discouraged as it can result in high network
-
-
- traffic or other performance problems."
- DEFVAL { eventReady }
- ::= { channelEntry 8 }
-
- channelMatches OBJECT-TYPE
- SYNTAX Counter
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of times this channel has matched a
- packet. Note that this object is updated even when
- channelDataControl is set to off."
- ::= { channelEntry 9 }
-
- channelDescription OBJECT-TYPE
- SYNTAX DisplayString (SIZE (0..127))
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "A comment describing this channel."
- ::= { channelEntry 10 }
-
- channelOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { channelEntry 11 }
-
- channelStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The status of this channel entry."
- ::= { channelEntry 12 }
-
-
- -- The Packet Capture Group
-
- -- Implementation of the Packet Capture group is optional.
- --
- -- The Packet Capture Group requires implementation of the
- -- Filter Group.
- --
- -- The Packet Capture group allows packets to be captured
-
-
- -- upon a filter match. The bufferControlTable controls
- -- the captured packets output from a channel that is
- -- associated with it. The captured packets are placed
- -- in entries in the captureBufferTable. These entries are
- -- associated with the bufferControlEntry on whose behalf they
- -- were stored.
-
- bufferControlTable OBJECT-TYPE
- SYNTAX SEQUENCE OF BufferControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of buffers control entries."
- ::= { capture 1 }
-
- bufferControlEntry OBJECT-TYPE
- SYNTAX BufferControlEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A set of parameters that control the collection of
- a stream of packets that have matched filters. As
- an example, an instance of the
- bufferControlCaptureSliceSize object might be named
- bufferControlCaptureSliceSize.3"
- INDEX { bufferControlIndex }
- ::= { bufferControlTable 1 }
-
- BufferControlEntry ::= SEQUENCE {
- bufferControlIndex INTEGER (1..65535),
- bufferControlChannelIndex INTEGER (1..65535),
- bufferControlFullStatus INTEGER,
- bufferControlFullAction INTEGER,
- bufferControlCaptureSliceSize INTEGER,
- bufferControlDownloadSliceSize INTEGER,
- bufferControlDownloadOffset INTEGER,
- bufferControlMaxOctetsRequested INTEGER,
- bufferControlMaxOctetsGranted INTEGER,
- bufferControlCapturedPackets INTEGER,
- bufferControlTurnOnTime TimeTicks,
- bufferControlOwner OwnerString,
- bufferControlStatus EntryStatus
- }
-
- bufferControlIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
-
-
- DESCRIPTION
- "An index that uniquely identifies an entry
- in the bufferControl table. The value of this
- index shall never be zero. Each such
- entry defines one set of packets that is
- captured and controlled by one or more filters."
- ::= { bufferControlEntry 1 }
-
- bufferControlChannelIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "An index that identifies the channel that is the
- source of packets for this bufferControl table.
- The channel identified by a particular value of this
- index is the same as identified by the same value of
- the channelIndex object.
-
- This object may not be modified if the associated
- bufferControlStatus object is equal to valid(1)."
- ::= { bufferControlEntry 2 }
-
- bufferControlFullStatus OBJECT-TYPE
- SYNTAX INTEGER {
- spaceAvailable(1),
- full(2)
- }
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "This object shows whether the buffer has room to
- accept new packets or if it is full.
-
- If the status is spaceAvailable(1), the buffer is
- accepting new packets normally. If the status is
- full(2) and the associated bufferControlFullAction
- object is wrapWhenFull, the buffer is accepting new
- packets by deleting enough of the oldest packets
- to make room for new ones as they arrive. Otherwise,
- if the status is full(2) and the
- bufferControlFullAction object is lockWhenFull,
- then the buffer has stopped collecting packets.
-
- When this object is set to full(2) the probe must
- not later set it to spaceAvailable(1) except in the
- case of a significant gain in resources such as
- an increase of bufferControlOctetsGranted. In
-
-
- particular, the wrap-mode action of deleting old
- packets to make room for newly arrived packets
- must not affect the value of this object."
- ::= { bufferControlEntry 3 }
-
- bufferControlFullAction OBJECT-TYPE
- SYNTAX INTEGER {
- lockWhenFull(1),
- wrapWhenFull(2) -- FIFO
- }
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "Controls the action of the buffer when it
- reaches the full status. When in the lockWhenFull(1)
- state and a packet is added to the buffer that
- fills the buffer, the bufferControlFullStatus will
- be set to full(2) and this buffer will stop capturing
- packets."
- ::= { bufferControlEntry 4 }
-
- bufferControlCaptureSliceSize OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The maximum number of octets of each packet
- that will be saved in this capture buffer.
- For example, if a 1500 octet packet is received by
- the probe and this object is set to 500, then only
- 500 octets of the packet will be stored in the
- associated capture buffer. If this variable is set
- to 0, the capture buffer will save as many octets
- as is possible.
-
- This object may not be modified if the associated
- bufferControlStatus object is equal to valid(1)."
- DEFVAL { 100 }
- ::= { bufferControlEntry 5 }
-
- bufferControlDownloadSliceSize OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The maximum number of octets of each packet
- in this capture buffer that will be returned in
- an SNMP retrieval of that packet. For example,
-
-
- if 500 octets of a packet have been stored in the
- associated capture buffer, the associated
- bufferControlDownloadOffset is 0, and this
- object is set to 100, then the captureBufferPacket
- object that contains the packet will contain only
- the first 100 octets of the packet.
-
- A prudent manager will take into account possible
- interoperability or fragmentation problems that may
- occur if the download slice size is set too large.
- In particular, conformant SNMP implementations are not
- required to accept messages whose length exceeds 484
- octets, although they are encouraged to support larger
- datagrams whenever feasible."
- DEFVAL { 100 }
- ::= { bufferControlEntry 6 }
-
- bufferControlDownloadOffset OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The offset of the first octet of each packet
- in this capture buffer that will be returned in
- an SNMP retrieval of that packet. For example,
- if 500 octets of a packet have been stored in the
- associated capture buffer and this object is set to
- 100, then the captureBufferPacket object that
- contains the packet will contain bytes starting
- 100 octets into the packet."
- DEFVAL { 0 }
- ::= { bufferControlEntry 7 }
-
- bufferControlMaxOctetsRequested OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The requested maximum number of octets to be
- saved in this captureBuffer, including any
- implementation-specific overhead. If this variable
- is set to -1, the capture buffer will save as many
- octets as is possible.
-
- When this object is created or modified, the probe
- should set bufferControlMaxOctetsGranted as closely
- to this object as is possible for the particular probe
- implementation and available resources. However, if
-
-
- the object has the special value of -1, the probe
- must set bufferControlMaxOctetsGranted to -1."
- DEFVAL { -1 }
- ::= { bufferControlEntry 8 }
-
- bufferControlMaxOctetsGranted OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The maximum number of octets that can be
- saved in this captureBuffer, including overhead.
- If this variable is -1, the capture buffer will save
- as many octets as possible.
-
- When the bufferControlMaxOctetsRequested object is
- created or modified, the probe should set this object
- as closely to the requested value as is possible for
- the particular probe implementation and available
- resources.
- However, if the request object has the special value
- of -1, the probe must set this object to -1.
- The probe must not lower this value except as a result
- of a modification to the associated
- bufferControlMaxOctetsRequested object.
-
- When this maximum number of octets is reached
- and a new packet is to be added to this
- capture buffer and the corresponding
- bufferControlFullAction is set to wrapWhenFull(2),
- enough of the oldest packets associated with this
- capture buffer shall be deleted by the agent so
- that the new packet can be added. If the
- corresponding bufferControlFullAction is set to
- lockWhenFull(1), the new packet shall be discarded.
- In either case, the probe must set
- bufferControlFullStatus to full(2).
-
- When the value of this object changes to a value less
- than the current value, entries are deleted from
- the captureBufferTable associated with this
- bufferControlEntry. Enough of the
- oldest of these captureBufferEntries shall be
- deleted by the agent so that the number of octets
- used remains less than or equal to the new value of
- this object.
-
- When the value of this object changes to a value
-
-
- greater than the current value, the number of
- associated captureBufferEntries may be allowed to
- grow."
- ::= { bufferControlEntry 9 }
-
- bufferControlCapturedPackets OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of packets currently in this
- captureBuffer."
- ::= { bufferControlEntry 10 }
-
- bufferControlTurnOnTime OBJECT-TYPE
- SYNTAX TimeTicks
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The value of sysUpTime when this capture buffer was
- first turned on."
- ::= { bufferControlEntry 11 }
-
- bufferControlOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it."
- ::= { bufferControlEntry 12 }
-
- bufferControlStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The status of this buffer Control Entry."
- ::= { bufferControlEntry 13 }
-
- captureBufferTable OBJECT-TYPE
- SYNTAX SEQUENCE OF CaptureBufferEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of packets captured off of a channel."
- ::= { capture 2 }
-
-
-
- captureBufferEntry OBJECT-TYPE
- SYNTAX CaptureBufferEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A packet captured off of an attached network. As an
- example, an instance of the captureBufferPacketData
- object might be named captureBufferPacketData.3.1783"
- INDEX { captureBufferControlIndex, captureBufferIndex }
- ::= { captureBufferTable 1 }
-
- CaptureBufferEntry ::= SEQUENCE {
- captureBufferControlIndex INTEGER (1..65535),
- captureBufferIndex INTEGER (1..2147483647),
- captureBufferPacketID INTEGER,
- captureBufferPacketData OCTET STRING,
- captureBufferPacketLength INTEGER,
- captureBufferPacketTime INTEGER,
- captureBufferPacketStatus INTEGER
- }
-
- captureBufferControlIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The index of the bufferControlEntry with which
- this packet is associated."
- ::= { captureBufferEntry 1 }
-
- captureBufferIndex OBJECT-TYPE
- SYNTAX INTEGER (1..2147483647)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry
- in the captureBuffer table associated with a
- particular bufferControlEntry. This index will
- start at 1 and increase by one for each new packet
- added with the same captureBufferControlIndex.
-
- Should this value reach 2147483647, the next packet
- added with the same captureBufferControlIndex shall
- cause this value to wrap around to 1."
- ::= { captureBufferEntry 2 }
-
- captureBufferPacketID OBJECT-TYPE
- SYNTAX INTEGER
-
-
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that describes the order of packets
- that are received on a particular interface.
- The packetID of a packet captured on an
- interface is defined to be greater than the
- packetID's of all packets captured previously on
- the same interface. As the captureBufferPacketID
- object has a maximum positive value of 2^31 - 1,
- any captureBufferPacketID object shall have the
- value of the associated packet's packetID mod 2^31."
- ::= { captureBufferEntry 3 }
-
- captureBufferPacketData OBJECT-TYPE
- SYNTAX OCTET STRING
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The data inside the packet, starting at the
- beginning of the packet plus any offset specified in
- the associated bufferControlDownloadOffset,
- including any link level headers. The length of the
- data in this object is the minimum of the length of
- the captured packet minus the offset, the length of
- the associated bufferControlCaptureSliceSize minus
- the offset, and the associated
- bufferControlDownloadSliceSize. If this minimum is
- less than zero, this object shall have a length of
- zero."
- ::= { captureBufferEntry 4 }
-
- captureBufferPacketLength OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The actual length (off the wire) of the packet stored
- in this entry, including FCS octets."
- ::= { captureBufferEntry 5 }
-
- captureBufferPacketTime OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The number of milliseconds that had passed since
- this capture buffer was first turned on when this
-
-
- packet was captured."
- ::= { captureBufferEntry 6 }
-
- captureBufferPacketStatus OBJECT-TYPE
- SYNTAX INTEGER
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "A value which indicates the error status of this
- packet.
-
- The value of this object is defined in the same way as
- filterPktStatus. The value is a sum. This sum
- initially takes the value zero. Then, for each
- error, E, that has been discovered in this packet,
- 2 raised to a value representing E is added to the
- sum.
-
- The errors defined for a packet captured off of an
- Ethernet interface are as follows:
-
- bit # Error
- 0 Packet is longer than 1518 octets
- 1 Packet is shorter than 64 octets
- 2 Packet experienced a CRC or Alignment
- error
- 3 First packet in this capture buffer after
- it was detected that some packets were
- not processed correctly.
- 4 Packet's order in buffer is only
- approximate (May only be set for packets
- sent from the probe)
-
- For example, an Ethernet fragment would have a
- value of 6 (2^1 + 2^2).
-
- As this MIB is expanded to new media types, this
- object will have other media-specific errors defined."
- ::= { captureBufferEntry 7 }
-
-
- -- The Event Group
-
- -- Implementation of the Event group is optional.
- --
- -- The Event group controls the generation and notification
- -- of events from this device. Each entry in the eventTable
- -- describes the parameters of the event that can be
-
-
- -- triggered. Each event entry is fired by an associated
- -- condition located elsewhere in the MIB. An event entry
- -- may also be associated- with a function elsewhere in the
- -- MIB that will be executed when the event is generated. For
- -- example, a channel may be turned on or off by the firing
- -- of an event.
- --
- -- Each eventEntry may optionally specify that a log entry
- -- be created on its behalf whenever the event occurs.
- -- Each entry may also specify that notification should
- -- occur by way of SNMP trap messages. In this case, the
- -- community for the trap message is given in the associated
- -- eventCommunity object. The enterprise and specific trap
- -- fields of the trap are determined by the condition that
- -- triggered the event. Two traps are defined: risingAlarm
- -- and fallingAlarm. If the eventTable is triggered by a
- -- condition specified elsewhere, the enterprise and
- -- specific trap fields must be specified for traps
- -- generated for that condition.
-
- eventTable OBJECT-TYPE
- SYNTAX SEQUENCE OF EventEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A list of events to be generated."
- ::= { event 1 }
-
- eventEntry OBJECT-TYPE
- SYNTAX EventEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A set of parameters that describe an event to be
- generated when certain conditions are met. As an
- example, an instance of the eventLastTimeSent object
- might be named eventLastTimeSent.6"
- INDEX { eventIndex }
- ::= { eventTable 1 }
-
- EventEntry ::= SEQUENCE {
- eventIndex INTEGER (1..65535),
- eventDescription DisplayString (SIZE (0..127)),
- eventType INTEGER,
- eventCommunity OCTET STRING (SIZE (0..127)),
- eventLastTimeSent TimeTicks,
- eventOwner OwnerString,
- eventStatus EntryStatus
-
-
- }
-
- eventIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry in the
- event table. Each such entry defines one event that
- is to be generated when the appropriate conditions
- occur."
- ::= { eventEntry 1 }
-
- eventDescription OBJECT-TYPE
- SYNTAX DisplayString (SIZE (0..127))
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "A comment describing this event entry."
- ::= { eventEntry 2 }
-
- eventType OBJECT-TYPE
- SYNTAX INTEGER {
- none(1),
- log(2),
- snmp-trap(3), -- send an SNMP trap
- log-and-trap(4)
- }
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The type of notification that the probe will make
- about this event. In the case of log, an entry is
- made in the log table for each event. In the case of
- snmp-trap, an SNMP trap is sent to one or more
- management stations."
- ::= { eventEntry 3 }
-
- eventCommunity OBJECT-TYPE
- SYNTAX OCTET STRING (SIZE (0..127))
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "If an SNMP trap is to be sent, it will be sent to
- the SNMP community specified by this octet string.
- In the future this table will be extended to include
- the party security mechanism. This object shall be
- set to a string of length zero if it is intended that
-
-
- that mechanism be used to specify the destination of
- the trap."
- ::= { eventEntry 4 }
-
- eventLastTimeSent OBJECT-TYPE
- SYNTAX TimeTicks
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The value of sysUpTime at the time this event
- entry last generated an event. If this entry has
- not generated any events, this value will be
- zero."
- ::= { eventEntry 5 }
-
- eventOwner OBJECT-TYPE
- SYNTAX OwnerString
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The entity that configured this entry and is
- therefore using the resources assigned to it.
-
- If this object contains a string starting with
- 'monitor' and has associated entries in the log
- table, all connected management stations should
- retrieve those log entries, as they may have
- significance to all management stations connected to
- this device"
- ::= { eventEntry 6 }
-
- eventStatus OBJECT-TYPE
- SYNTAX EntryStatus
- ACCESS read-write
- STATUS mandatory
- DESCRIPTION
- "The status of this event entry.
-
- If this object is not equal to valid(1), all
- associated log entries shall be deleted by the
- agent."
- ::= { eventEntry 7 }
-
- --
- logTable OBJECT-TYPE
- SYNTAX SEQUENCE OF LogEntry
- ACCESS not-accessible
- STATUS mandatory
-
-
- DESCRIPTION
- "A list of events that have been logged."
- ::= { event 2 }
-
- logEntry OBJECT-TYPE
- SYNTAX LogEntry
- ACCESS not-accessible
- STATUS mandatory
- DESCRIPTION
- "A set of data describing an event that has been
- logged. For example, an instance of the
- logDescription object might be named
- logDescription.6.47"
- INDEX { logEventIndex, logIndex }
- ::= { logTable 1 }
-
- LogEntry ::= SEQUENCE {
- logEventIndex INTEGER (1..65535),
- logIndex INTEGER (1..2147483647),
- logTime TimeTicks,
- logDescription DisplayString (SIZE (0..255))
- }
-
- logEventIndex OBJECT-TYPE
- SYNTAX INTEGER (1..65535)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The event entry that generated this log
- entry. The log identified by a particular
- value of this index is associated with the same
- eventEntry as identified by the same value
- of eventIndex."
- ::= { logEntry 1 }
-
- logIndex OBJECT-TYPE
- SYNTAX INTEGER (1..2147483647)
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An index that uniquely identifies an entry
- in the log table amongst those generated by the
- same eventEntries. These indexes are
- assigned beginning with 1 and increase by one
- with each new log entry. The association
- between values of logIndex and logEntries
- is fixed for the lifetime of each logEntry.
- The agent may choose to delete the oldest
-
-
- instances of logEntry as required because of
- lack of memory. It is an implementation-specific
- matter as to when this deletion may occur."
- ::= { logEntry 2 }
-
- logTime OBJECT-TYPE
- SYNTAX TimeTicks
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "The value of sysUpTime when this log entry was
- created."
- ::= { logEntry 3 }
-
- logDescription OBJECT-TYPE
- SYNTAX DisplayString (SIZE (0..255))
- ACCESS read-only
- STATUS mandatory
- DESCRIPTION
- "An implementation dependent description of the
- event that activated this log entry."
- ::= { logEntry 4 }
-
- -- These definitions use the TRAP-TYPE macro as
- -- defined in RFC 1215 [10]
-
- -- Remote Network Monitoring Traps
-
- risingAlarm TRAP-TYPE
- ENTERPRISE rmon
- VARIABLES { alarmIndex, alarmVariable, alarmSampleType,
- alarmValue, alarmRisingThreshold }
- DESCRIPTION
- "The SNMP trap that is generated when an alarm
- entry crosses its rising threshold and generates
- an event that is configured for sending SNMP
- traps."
- ::= 1
-
- fallingAlarm TRAP-TYPE
- ENTERPRISE rmon
- VARIABLES { alarmIndex, alarmVariable, alarmSampleType,
- alarmValue, alarmFallingThreshold }
- DESCRIPTION
- "The SNMP trap that is generated when an alarm
- entry crosses its falling threshold and generates
- an event that is configured for sending SNMP
- traps."
-
-
- ::= 2
-
- END
+RMON-MIB DEFINITIONS ::= BEGIN
+ IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, OBJECT-IDENTITY,
+ NOTIFICATION-TYPE, mib-2, Counter32,
+ Integer32, TimeTicks FROM SNMPv2-SMI
+
+ TEXTUAL-CONVENTION, DisplayString FROM SNMPv2-TC
+
+ MODULE-COMPLIANCE, OBJECT-GROUP,
+ NOTIFICATION-GROUP FROM SNMPv2-CONF;
+
+
+-- Remote Network Monitoring MIB
+
+rmonMibModule MODULE-IDENTITY
+ LAST-UPDATED "200005110000Z" -- 11 May, 2000
+ ORGANIZATION "IETF RMON MIB Working Group"
+ CONTACT-INFO
+ "Steve Waldbusser
+ Phone: +1-650-948-6500
+ Fax: +1-650-745-0671
+ DESCRIPTION
+ "Remote network monitoring devices, often called
+ monitors or probes, are instruments that exist for
+ the purpose of managing a network. This MIB defines
+ objects for managing remote network monitoring devices."
+
+ REVISION "200005110000Z" -- 11 May, 2000
+ DESCRIPTION
+ "Reformatted into SMIv2 format.
+
+ This version published as RFC 2819."
+
+ REVISION "199502010000Z" -- 1 Feb, 1995
+ DESCRIPTION
+ "Bug fixes, clarifications and minor changes based on
+ implementation experience, published as RFC1757 [18].
+
+ Two changes were made to object definitions:
+
+ 1) A new status bit has been defined for the
+ captureBufferPacketStatus object, indicating that the
+ packet order within the capture buffer may not be identical to
+ the packet order as received off the wire. This bit may only
+ be used for packets transmitted by the probe. Older NMS
+ applications can safely ignore this status bit, which might be
+ used by newer agents.
+
+ 2) The packetMatch trap has been removed. This trap was never
+ actually 'approved' and was not added to this document along
+ with the risingAlarm and fallingAlarm traps. The packetMatch
+ trap could not be throttled, which could cause disruption of
+ normal network traffic under some circumstances. An NMS should
+ configure a risingAlarm threshold on the appropriate
+ channelMatches instance if a trap is desired for a packetMatch
+ event. Note that logging of packetMatch events is still
+ supported--only trap generation for such events has been
+ removed.
+
+ In addition, several clarifications to individual object
+ definitions have been added to assist agent and NMS
+ implementors:
+
+ - global definition of 'good packets' and 'bad packets'
+
+ - more detailed text governing conceptual row creation and
+ modification
+
+ - instructions for probes relating to interface changes and
+ disruptions
+
+ - clarification of some ethernet counter definitions
+
+ - recommended formula for calculating network utilization
+
+ - clarification of channel and captureBuffer behavior for some
+ unusual conditions
+
+ - examples of proper instance naming for each table"
+
+ REVISION "199111010000Z" -- 1 Nov, 1991
+ DESCRIPTION
+ "The original version of this MIB, published as RFC1271."
+ ::= { rmonConformance 8 }
+
+ rmon OBJECT IDENTIFIER ::= { mib-2 16 }
+
+
+ -- textual conventions
+
+OwnerString ::= TEXTUAL-CONVENTION
+ STATUS current
+
+ DESCRIPTION
+ "This data type is used to model an administratively
+ assigned name of the owner of a resource. Implementations
+ must accept values composed of well-formed NVT ASCII
+ sequences. In addition, implementations should accept
+ values composed of well-formed UTF-8 sequences.
+
+ It is suggested that this name contain one or more of
+ the following: IP address, management station name,
+ network manager's name, location, or phone number.
+ In some cases the agent itself will be the owner of
+ an entry. In these cases, this string shall be set
+ to a string starting with 'monitor'.
+
+ SNMP access control is articulated entirely in terms
+ of the contents of MIB views; access to a particular
+ SNMP object instance depends only upon its presence
+ or absence in a particular MIB view and never upon
+ its value or the value of related object instances.
+ Thus, objects of this type afford resolution of
+ resource contention only among cooperating
+ managers; they realize no access control function
+ with respect to uncooperative parties."
+ SYNTAX OCTET STRING (SIZE (0..127))
+
+EntryStatus ::= TEXTUAL-CONVENTION
+ STATUS current
+ DESCRIPTION
+ "The status of a table entry.
+
+ Setting this object to the value invalid(4) has the
+ effect of invalidating the corresponding entry.
+ That is, it effectively disassociates the mapping
+ identified with said entry.
+ It is an implementation-specific matter as to whether
+ the agent removes an invalidated entry from the table.
+ Accordingly, management stations must be prepared to
+ receive tabular information from agents that corresponds
+ to entries currently not in use. Proper
+ interpretation of such entries requires examination
+ of the relevant EntryStatus object.
+
+ An existing instance of this object cannot be set to
+ createRequest(2). This object may only be set to
+ createRequest(2) when this instance is created. When
+ this object is created, the agent may wish to create
+ supplemental object instances with default values
+ to complete a conceptual row in this table. Because the
+ creation of these default objects is entirely at the option
+ of the agent, the manager must not assume that any will be
+ created, but may make use of any that are created.
+ Immediately after completing the create operation, the agent
+ must set this object to underCreation(3).
+
+ When in the underCreation(3) state, an entry is allowed to
+ exist in a possibly incomplete, possibly inconsistent state,
+ usually to allow it to be modified in multiple PDUs. When in
+ this state, an entry is not fully active.
+ Entries shall exist in the underCreation(3) state until
+ the management station is finished configuring the entry
+ and sets this object to valid(1) or aborts, setting this
+ object to invalid(4). If the agent determines that an
+ entry has been in the underCreation(3) state for an
+ abnormally long time, it may decide that the management
+ station has crashed. If the agent makes this decision,
+ it may set this object to invalid(4) to reclaim the
+ entry. A prudent agent will understand that the
+ management station may need to wait for human input
+ and will allow for that possibility in its
+ determination of this abnormally long period.
+
+ An entry in the valid(1) state is fully configured and
+ consistent and fully represents the configuration or
+ operation such a row is intended to represent. For
+ example, it could be a statistical function that is
+ configured and active, or a filter that is available
+ in the list of filters processed by the packet capture
+ process.
+
+ A manager is restricted to changing the state of an entry in
+ the following ways:
+
+ To: valid createRequest underCreation invalid
+ From:
+ valid OK NO OK OK
+ createRequest N/A N/A N/A N/A
+ underCreation OK NO OK OK
+ invalid NO NO NO OK
+ nonExistent NO OK NO OK
+
+ In the table above, it is not applicable to move the state
+ from the createRequest state to any other state because the
+ manager will never find the variable in that state. The
+ nonExistent state is not a value of the enumeration, rather
+ it means that the entryStatus variable does not exist at all.
+
+ An agent may allow an entryStatus variable to change state in
+ additional ways, so long as the semantics of the states are
+ followed. This allowance is made to ease the implementation of
+ the agent and is made despite the fact that managers should
+ never exercise these additional state transitions."
+ SYNTAX INTEGER {
+ valid(1),
+ createRequest(2),
+ underCreation(3),
+ invalid(4)
+ }
+
+ statistics OBJECT IDENTIFIER ::= { rmon 1 }
+ history OBJECT IDENTIFIER ::= { rmon 2 }
+ alarm OBJECT IDENTIFIER ::= { rmon 3 }
+ hosts OBJECT IDENTIFIER ::= { rmon 4 }
+ hostTopN OBJECT IDENTIFIER ::= { rmon 5 }
+ matrix OBJECT IDENTIFIER ::= { rmon 6 }
+ filter OBJECT IDENTIFIER ::= { rmon 7 }
+ capture OBJECT IDENTIFIER ::= { rmon 8 }
+ event OBJECT IDENTIFIER ::= { rmon 9 }
+ rmonConformance OBJECT IDENTIFIER ::= { rmon 20 }
+
+-- The Ethernet Statistics Group
+--
+-- Implementation of the Ethernet Statistics group is optional.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The ethernet statistics group contains statistics measured by the
+-- probe for each monitored interface on this device. These
+-- statistics take the form of free running counters that start from
+-- zero when a valid entry is created.
+--
+-- This group currently has statistics defined only for
+-- Ethernet interfaces. Each etherStatsEntry contains statistics
+-- for one Ethernet interface. The probe must create one
+-- etherStats entry for each monitored Ethernet interface
+-- on the device.
+
+etherStatsTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EtherStatsEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of Ethernet statistics entries."
+ ::= { statistics 1 }
+
+etherStatsEntry OBJECT-TYPE
+ SYNTAX EtherStatsEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A collection of statistics kept for a particular
+ Ethernet interface. As an example, an instance of the
+ etherStatsPkts object might be named etherStatsPkts.1"
+ INDEX { etherStatsIndex }
+ ::= { etherStatsTable 1 }
+
+EtherStatsEntry ::= SEQUENCE {
+ etherStatsIndex Integer32,
+ etherStatsDataSource OBJECT IDENTIFIER,
+ etherStatsDropEvents Counter32,
+ etherStatsOctets Counter32,
+ etherStatsPkts Counter32,
+ etherStatsBroadcastPkts Counter32,
+ etherStatsMulticastPkts Counter32,
+ etherStatsCRCAlignErrors Counter32,
+ etherStatsUndersizePkts Counter32,
+ etherStatsOversizePkts Counter32,
+ etherStatsFragments Counter32,
+ etherStatsJabbers Counter32,
+ etherStatsCollisions Counter32,
+ etherStatsPkts64Octets Counter32,
+ etherStatsPkts65to127Octets Counter32,
+ etherStatsPkts128to255Octets Counter32,
+ etherStatsPkts256to511Octets Counter32,
+ etherStatsPkts512to1023Octets Counter32,
+ etherStatsPkts1024to1518Octets Counter32,
+ etherStatsOwner OwnerString,
+ etherStatsStatus EntryStatus
+}
+
+etherStatsIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of this object uniquely identifies this
+ etherStats entry."
+ ::= { etherStatsEntry 1 }
+
+etherStatsDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+
+ DESCRIPTION
+ "This object identifies the source of the data that
+ this etherStats entry is configured to analyze. This
+ source can be any ethernet interface on this device.
+ In order to identify a particular interface, this object
+ shall identify the instance of the ifIndex object,
+ defined in RFC 2233 [17], for the desired interface.
+ For example, if an entry were to receive data from
+ interface #1, this object would be set to ifIndex.1.
+
+ The statistics in this group reflect all packets
+ on the local network segment attached to the identified
+ interface.
+
+ An agent may or may not be able to tell if fundamental
+ changes to the media of the interface have occurred and
+ necessitate an invalidation of this entry. For example, a
+ hot-pluggable ethernet card could be pulled out and replaced
+ by a token-ring card. In such a case, if the agent has such
+ knowledge of the change, it is recommended that it
+ invalidate this entry.
+
+ This object may not be modified if the associated
+ etherStatsStatus object is equal to valid(1)."
+ ::= { etherStatsEntry 2 }
+
+etherStatsDropEvents OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of events in which packets
+ were dropped by the probe due to lack of resources.
+ Note that this number is not necessarily the number of
+ packets dropped; it is just the number of times this
+ condition has been detected."
+ ::= { etherStatsEntry 3 }
+
+etherStatsOctets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of octets of data (including
+ those in bad packets) received on the
+ network (excluding framing bits but including
+ FCS octets).
+
+ This object can be used as a reasonable estimate of
+ 10-Megabit ethernet utilization. If greater precision is
+ desired, the etherStatsPkts and etherStatsOctets objects
+ should be sampled before and after a common interval. The
+ differences in the sampled values are Pkts and Octets,
+ respectively, and the number of seconds in the interval is
+ Interval. These values are used to calculate the Utilization
+ as follows:
+
+ Pkts * (9.6 + 6.4) + (Octets * .8)
+ Utilization = -------------------------------------
+ Interval * 10,000
+
+ The result of this equation is the value Utilization which
+ is the percent utilization of the ethernet segment on a
+ scale of 0 to 100 percent."
+ ::= { etherStatsEntry 4 }
+
+etherStatsPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets (including bad packets,
+ broadcast packets, and multicast packets) received."
+ ::= { etherStatsEntry 5 }
+
+etherStatsBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of good packets received that were
+ directed to the broadcast address. Note that this
+ does not include multicast packets."
+ ::= { etherStatsEntry 6 }
+
+etherStatsMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of good packets received that were
+ directed to a multicast address. Note that this number
+ does not include packets directed to the broadcast
+ address."
+ ::= { etherStatsEntry 7 }
+
+etherStatsCRCAlignErrors OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets received that
+ had a length (excluding framing bits, but
+ including FCS octets) of between 64 and 1518
+ octets, inclusive, but had either a bad
+ Frame Check Sequence (FCS) with an integral
+ number of octets (FCS Error) or a bad FCS with
+ a non-integral number of octets (Alignment Error)."
+ ::= { etherStatsEntry 8 }
+
+etherStatsUndersizePkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets received that were
+ less than 64 octets long (excluding framing bits,
+ but including FCS octets) and were otherwise well
+ formed."
+ ::= { etherStatsEntry 9 }
+
+etherStatsOversizePkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets received that were
+ longer than 1518 octets (excluding framing bits,
+ but including FCS octets) and were otherwise
+ well formed."
+ ::= { etherStatsEntry 10 }
+
+etherStatsFragments OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets received that were less than
+ 64 octets in length (excluding framing bits but including
+ FCS octets) and had either a bad Frame Check Sequence
+ (FCS) with an integral number of octets (FCS Error) or a
+ bad FCS with a non-integral number of octets (Alignment
+ Error).
+
+ Note that it is entirely normal for etherStatsFragments to
+ increment. This is because it counts both runts (which are
+ normal occurrences due to collisions) and noise hits."
+ ::= { etherStatsEntry 11 }
+
+etherStatsJabbers OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets received that were
+ longer than 1518 octets (excluding framing bits,
+ but including FCS octets), and had either a bad
+ Frame Check Sequence (FCS) with an integral number
+ of octets (FCS Error) or a bad FCS with a non-integral
+ number of octets (Alignment Error).
+
+ Note that this definition of jabber is different
+ than the definition in IEEE-802.3 section 8.2.1.5
+ (10BASE5) and section 10.3.1.4 (10BASE2). These
+ documents define jabber as the condition where any
+ packet exceeds 20 ms. The allowed range to detect
+ jabber is between 20 ms and 150 ms."
+ ::= { etherStatsEntry 12 }
+
+etherStatsCollisions OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Collisions"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The best estimate of the total number of collisions
+ on this Ethernet segment.
+
+ The value returned will depend on the location of the
+ RMON probe. Section 8.2.1.3 (10BASE-5) and section
+ 10.3.1.3 (10BASE-2) of IEEE standard 802.3 states that a
+ station must detect a collision, in the receive mode, if
+ three or more stations are transmitting simultaneously. A
+ repeater port must detect a collision when two or more
+ stations are transmitting simultaneously. Thus a probe
+ placed on a repeater port could record more collisions
+ than a probe connected to a station on the same segment
+ would.
+
+ Probe location plays a much smaller role when considering
+ 10BASE-T. 14.2.1.4 (10BASE-T) of IEEE standard 802.3
+ defines a collision as the simultaneous presence of signals
+ on the DO and RD circuits (transmitting and receiving
+ at the same time). A 10BASE-T station can only detect
+ collisions when it is transmitting. Thus probes placed on
+ a station and a repeater, should report the same number of
+ collisions.
+
+ Note also that an RMON probe inside a repeater should
+ ideally report collisions between the repeater and one or
+ more other hosts (transmit collisions as defined by IEEE
+ 802.3k) plus receiver collisions observed on any coax
+ segments to which the repeater is connected."
+ ::= { etherStatsEntry 13 }
+
+etherStatsPkts64Octets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets (including bad
+ packets) received that were 64 octets in length
+ (excluding framing bits but including FCS octets)."
+ ::= { etherStatsEntry 14 }
+
+etherStatsPkts65to127Octets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets (including bad
+ packets) received that were between
+ 65 and 127 octets in length inclusive
+ (excluding framing bits but including FCS octets)."
+ ::= { etherStatsEntry 15 }
+
+etherStatsPkts128to255Octets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+
+ STATUS current
+ DESCRIPTION
+ "The total number of packets (including bad
+ packets) received that were between
+ 128 and 255 octets in length inclusive
+ (excluding framing bits but including FCS octets)."
+ ::= { etherStatsEntry 16 }
+
+etherStatsPkts256to511Octets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets (including bad
+ packets) received that were between
+ 256 and 511 octets in length inclusive
+ (excluding framing bits but including FCS octets)."
+ ::= { etherStatsEntry 17 }
+
+etherStatsPkts512to1023Octets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets (including bad
+ packets) received that were between
+ 512 and 1023 octets in length inclusive
+ (excluding framing bits but including FCS octets)."
+ ::= { etherStatsEntry 18 }
+
+etherStatsPkts1024to1518Octets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets (including bad
+ packets) received that were between
+ 1024 and 1518 octets in length inclusive
+ (excluding framing bits but including FCS octets)."
+ ::= { etherStatsEntry 19 }
+
+etherStatsOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { etherStatsEntry 20 }
+
+etherStatsStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this etherStats entry."
+ ::= { etherStatsEntry 21 }
+
+-- The History Control Group
+
+-- Implementation of the History Control group is optional.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The history control group controls the periodic statistical
+-- sampling of data from various types of networks. The
+-- historyControlTable stores configuration entries that each
+-- define an interface, polling period, and other parameters.
+-- Once samples are taken, their data is stored in an entry
+-- in a media-specific table. Each such entry defines one
+-- sample, and is associated with the historyControlEntry that
+-- caused the sample to be taken. Each counter in the
+-- etherHistoryEntry counts the same event as its similarly-named
+-- counterpart in the etherStatsEntry, except that each value here
+-- is a cumulative sum during a sampling period.
+--
+-- If the probe keeps track of the time of day, it should start
+-- the first sample of the history at a time such that
+-- when the next hour of the day begins, a sample is
+-- started at that instant. This tends to make more
+-- user-friendly reports, and enables comparison of reports
+-- from different probes that have relatively accurate time
+-- of day.
+--
+-- The probe is encouraged to add two history control entries
+-- per monitored interface upon initialization that describe a short
+-- term and a long term polling period. Suggested parameters are 30
+-- seconds for the short term polling period and 30 minutes for
+-- the long term period.
+
+historyControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HistoryControlEntry
+ MAX-ACCESS not-accessible
+
+ STATUS current
+ DESCRIPTION
+ "A list of history control entries."
+ ::= { history 1 }
+
+historyControlEntry OBJECT-TYPE
+ SYNTAX HistoryControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of parameters that set up a periodic sampling of
+ statistics. As an example, an instance of the
+ historyControlInterval object might be named
+ historyControlInterval.2"
+ INDEX { historyControlIndex }
+ ::= { historyControlTable 1 }
+
+HistoryControlEntry ::= SEQUENCE {
+ historyControlIndex Integer32,
+ historyControlDataSource OBJECT IDENTIFIER,
+ historyControlBucketsRequested Integer32,
+ historyControlBucketsGranted Integer32,
+ historyControlInterval Integer32,
+ historyControlOwner OwnerString,
+ historyControlStatus EntryStatus
+}
+
+historyControlIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in the
+ historyControl table. Each such entry defines a
+ set of samples at a particular interval for an
+ interface on the device."
+ ::= { historyControlEntry 1 }
+
+historyControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "This object identifies the source of the data for
+ which historical data was collected and
+ placed in a media-specific table on behalf of this
+ historyControlEntry. This source can be any
+ interface on this device. In order to identify
+ a particular interface, this object shall identify
+ the instance of the ifIndex object, defined
+ in RFC 2233 [17], for the desired interface.
+ For example, if an entry were to receive data from
+ interface #1, this object would be set to ifIndex.1.
+
+ The statistics in this group reflect all packets
+ on the local network segment attached to the identified
+ interface.
+
+ An agent may or may not be able to tell if fundamental
+ changes to the media of the interface have occurred and
+ necessitate an invalidation of this entry. For example, a
+ hot-pluggable ethernet card could be pulled out and replaced
+ by a token-ring card. In such a case, if the agent has such
+ knowledge of the change, it is recommended that it
+ invalidate this entry.
+
+ This object may not be modified if the associated
+ historyControlStatus object is equal to valid(1)."
+ ::= { historyControlEntry 2 }
+
+historyControlBucketsRequested OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The requested number of discrete time intervals
+ over which data is to be saved in the part of the
+ media-specific table associated with this
+ historyControlEntry.
+
+ When this object is created or modified, the probe
+ should set historyControlBucketsGranted as closely to
+ this object as is possible for the particular probe
+ implementation and available resources."
+ DEFVAL { 50 }
+ ::= { historyControlEntry 3 }
+
+historyControlBucketsGranted OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of discrete sampling intervals
+ over which data shall be saved in the part of
+ the media-specific table associated with this
+ historyControlEntry.
+
+ When the associated historyControlBucketsRequested
+ object is created or modified, the probe
+ should set this object as closely to the requested
+ value as is possible for the particular
+ probe implementation and available resources. The
+ probe must not lower this value except as a result
+ of a modification to the associated
+ historyControlBucketsRequested object.
+
+ There will be times when the actual number of
+ buckets associated with this entry is less than
+ the value of this object. In this case, at the
+ end of each sampling interval, a new bucket will
+ be added to the media-specific table.
+
+ When the number of buckets reaches the value of
+ this object and a new bucket is to be added to the
+ media-specific table, the oldest bucket associated
+ with this historyControlEntry shall be deleted by
+ the agent so that the new bucket can be added.
+
+ When the value of this object changes to a value less
+ than the current value, entries are deleted
+ from the media-specific table associated with this
+ historyControlEntry. Enough of the oldest of these
+ entries shall be deleted by the agent so that their
+ number remains less than or equal to the new value of
+ this object.
+
+ When the value of this object changes to a value greater
+ than the current value, the number of associated media-
+ specific entries may be allowed to grow."
+ ::= { historyControlEntry 4 }
+
+historyControlInterval OBJECT-TYPE
+ SYNTAX Integer32 (1..3600)
+ UNITS "Seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The interval in seconds over which the data is
+ sampled for each bucket in the part of the
+ media-specific table associated with this
+ historyControlEntry. This interval can
+ be set to any number of seconds between 1 and
+ 3600 (1 hour).
+
+ Because the counters in a bucket may overflow at their
+ maximum value with no indication, a prudent manager will
+ take into account the possibility of overflow in any of
+ the associated counters. It is important to consider the
+ minimum time in which any counter could overflow on a
+ particular media type and set the historyControlInterval
+ object to a value less than this interval. This is
+ typically most important for the 'octets' counter in any
+ media-specific table. For example, on an Ethernet
+ network, the etherHistoryOctets counter could overflow
+ in about one hour at the Ethernet's maximum
+ utilization.
+
+ This object may not be modified if the associated
+ historyControlStatus object is equal to valid(1)."
+ DEFVAL { 1800 }
+ ::= { historyControlEntry 5 }
+
+historyControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { historyControlEntry 6 }
+
+historyControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this historyControl entry.
+
+ Each instance of the media-specific table associated
+ with this historyControlEntry will be deleted by the agent
+ if this historyControlEntry is not equal to valid(1)."
+ ::= { historyControlEntry 7 }
+
+-- The Ethernet History Group
+
+-- Implementation of the Ethernet History group is optional.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The Ethernet History group records periodic statistical samples
+-- from a network and stores them for later retrieval.
+-- Once samples are taken, their data is stored in an entry
+-- in a media-specific table. Each such entry defines one
+-- sample, and is associated with the historyControlEntry that
+-- caused the sample to be taken. This group defines the
+-- etherHistoryTable, for Ethernet networks.
+--
+
+etherHistoryTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EtherHistoryEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of Ethernet history entries."
+ ::= { history 2 }
+
+etherHistoryEntry OBJECT-TYPE
+ SYNTAX EtherHistoryEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "An historical sample of Ethernet statistics on a particular
+ Ethernet interface. This sample is associated with the
+ historyControlEntry which set up the parameters for
+ a regular collection of these samples. As an example, an
+ instance of the etherHistoryPkts object might be named
+ etherHistoryPkts.2.89"
+ INDEX { etherHistoryIndex , etherHistorySampleIndex }
+ ::= { etherHistoryTable 1 }
+
+EtherHistoryEntry ::= SEQUENCE {
+ etherHistoryIndex Integer32,
+ etherHistorySampleIndex Integer32,
+ etherHistoryIntervalStart TimeTicks,
+ etherHistoryDropEvents Counter32,
+ etherHistoryOctets Counter32,
+ etherHistoryPkts Counter32,
+ etherHistoryBroadcastPkts Counter32,
+ etherHistoryMulticastPkts Counter32,
+ etherHistoryCRCAlignErrors Counter32,
+ etherHistoryUndersizePkts Counter32,
+ etherHistoryOversizePkts Counter32,
+ etherHistoryFragments Counter32,
+ etherHistoryJabbers Counter32,
+ etherHistoryCollisions Counter32,
+ etherHistoryUtilization Integer32
+}
+
+etherHistoryIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The history of which this entry is a part. The
+ history identified by a particular value of this
+ index is the same history as identified
+ by the same value of historyControlIndex."
+ ::= { etherHistoryEntry 1 }
+
+etherHistorySampleIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..2147483647)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies the particular
+ sample this entry represents among all samples
+ associated with the same historyControlEntry.
+ This index starts at 1 and increases by one
+ as each new sample is taken."
+ ::= { etherHistoryEntry 2 }
+
+etherHistoryIntervalStart OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of sysUpTime at the start of the interval
+ over which this sample was measured. If the probe
+ keeps track of the time of day, it should start
+ the first sample of the history at a time such that
+ when the next hour of the day begins, a sample is
+ started at that instant. Note that following this
+ rule may require the probe to delay collecting the
+ first sample of the history, as each sample must be
+ of the same interval. Also note that the sample which
+ is currently being collected is not accessible in this
+ table until the end of its interval."
+ ::= { etherHistoryEntry 3 }
+
+etherHistoryDropEvents OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of events in which packets
+ were dropped by the probe due to lack of resources
+ during this sampling interval. Note that this number
+ is not necessarily the number of packets dropped, it
+ is just the number of times this condition has been
+ detected."
+ ::= { etherHistoryEntry 4 }
+
+etherHistoryOctets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of octets of data (including
+ those in bad packets) received on the
+ network (excluding framing bits but including
+ FCS octets)."
+ ::= { etherHistoryEntry 5 }
+
+etherHistoryPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets (including bad packets)
+ received during this sampling interval."
+ ::= { etherHistoryEntry 6 }
+
+etherHistoryBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of good packets received during this
+ sampling interval that were directed to the
+ broadcast address."
+ ::= { etherHistoryEntry 7 }
+
+etherHistoryMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of good packets received during this
+ sampling interval that were directed to a
+ multicast address. Note that this number does not
+ include packets addressed to the broadcast address."
+ ::= { etherHistoryEntry 8 }
+
+etherHistoryCRCAlignErrors OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets received during this
+ sampling interval that had a length (excluding
+ framing bits but including FCS octets) between
+ 64 and 1518 octets, inclusive, but had either a bad Frame
+ Check Sequence (FCS) with an integral number of octets
+ (FCS Error) or a bad FCS with a non-integral number
+ of octets (Alignment Error)."
+ ::= { etherHistoryEntry 9 }
+
+etherHistoryUndersizePkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets received during this
+ sampling interval that were less than 64 octets
+ long (excluding framing bits but including FCS
+ octets) and were otherwise well formed."
+ ::= { etherHistoryEntry 10 }
+
+etherHistoryOversizePkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets received during this
+ sampling interval that were longer than 1518
+ octets (excluding framing bits but including
+ FCS octets) but were otherwise well formed."
+ ::= { etherHistoryEntry 11 }
+
+etherHistoryFragments OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The total number of packets received during this
+ sampling interval that were less than 64 octets in
+ length (excluding framing bits but including FCS
+ octets) had either a bad Frame Check Sequence (FCS)
+ with an integral number of octets (FCS Error) or a bad
+ FCS with a non-integral number of octets (Alignment
+ Error).
+
+ Note that it is entirely normal for etherHistoryFragments to
+ increment. This is because it counts both runts (which are
+ normal occurrences due to collisions) and noise hits."
+ ::= { etherHistoryEntry 12 }
+
+etherHistoryJabbers OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets received during this
+ sampling interval that were longer than 1518 octets
+ (excluding framing bits but including FCS octets),
+ and had either a bad Frame Check Sequence (FCS)
+ with an integral number of octets (FCS Error) or
+ a bad FCS with a non-integral number of octets
+ (Alignment Error).
+
+ Note that this definition of jabber is different
+ than the definition in IEEE-802.3 section 8.2.1.5
+ (10BASE5) and section 10.3.1.4 (10BASE2). These
+ documents define jabber as the condition where any
+ packet exceeds 20 ms. The allowed range to detect
+ jabber is between 20 ms and 150 ms."
+ ::= { etherHistoryEntry 13 }
+
+etherHistoryCollisions OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Collisions"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The best estimate of the total number of collisions
+ on this Ethernet segment during this sampling
+ interval.
+
+ The value returned will depend on the location of the
+ RMON probe. Section 8.2.1.3 (10BASE-5) and section
+ 10.3.1.3 (10BASE-2) of IEEE standard 802.3 states that a
+ station must detect a collision, in the receive mode, if
+ three or more stations are transmitting simultaneously. A
+ repeater port must detect a collision when two or more
+ stations are transmitting simultaneously. Thus a probe
+ placed on a repeater port could record more collisions
+ than a probe connected to a station on the same segment
+ would.
+
+ Probe location plays a much smaller role when considering
+ 10BASE-T. 14.2.1.4 (10BASE-T) of IEEE standard 802.3
+ defines a collision as the simultaneous presence of signals
+ on the DO and RD circuits (transmitting and receiving
+ at the same time). A 10BASE-T station can only detect
+ collisions when it is transmitting. Thus probes placed on
+ a station and a repeater, should report the same number of
+ collisions.
+
+ Note also that an RMON probe inside a repeater should
+ ideally report collisions between the repeater and one or
+ more other hosts (transmit collisions as defined by IEEE
+ 802.3k) plus receiver collisions observed on any coax
+ segments to which the repeater is connected."
+ ::= { etherHistoryEntry 14 }
+
+etherHistoryUtilization OBJECT-TYPE
+ SYNTAX Integer32 (0..10000)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The best estimate of the mean physical layer
+ network utilization on this interface during this
+ sampling interval, in hundredths of a percent."
+ ::= { etherHistoryEntry 15 }
+
+-- The Alarm Group
+
+-- Implementation of the Alarm group is optional. The Alarm Group
+-- requires the implementation of the Event group.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The Alarm group periodically takes statistical samples from
+-- variables in the probe and compares them to thresholds that have
+-- been configured. The alarm table stores configuration
+-- entries that each define a variable, polling period, and
+-- threshold parameters. If a sample is found to cross the
+-- threshold values, an event is generated. Only variables that
+-- resolve to an ASN.1 primitive type of INTEGER (INTEGER, Integer32,
+-- Counter32, Counter64, Gauge32, or TimeTicks) may be monitored in
+-- this way.
+--
+-- This function has a hysteresis mechanism to limit the generation
+-- of events. This mechanism generates one event as a threshold
+-- is crossed in the appropriate direction. No more events are
+-- generated for that threshold until the opposite threshold is
+-- crossed.
+--
+-- In the case of a sampling a deltaValue, a probe may implement
+-- this mechanism with more precision if it takes a delta sample
+-- twice per period, each time comparing the sum of the latest two
+-- samples to the threshold. This allows the detection of threshold
+-- crossings that span the sampling boundary. Note that this does
+-- not require any special configuration of the threshold value.
+-- It is suggested that probes implement this more precise algorithm.
+
+alarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of alarm entries."
+ ::= { alarm 1 }
+
+alarmEntry OBJECT-TYPE
+ SYNTAX AlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of parameters that set up a periodic checking
+ for alarm conditions. For example, an instance of the
+ alarmValue object might be named alarmValue.8"
+ INDEX { alarmIndex }
+ ::= { alarmTable 1 }
+
+AlarmEntry ::= SEQUENCE {
+ alarmIndex Integer32,
+ alarmInterval Integer32,
+ alarmVariable OBJECT IDENTIFIER,
+ alarmSampleType INTEGER,
+ alarmValue Integer32,
+ alarmStartupAlarm INTEGER,
+ alarmRisingThreshold Integer32,
+ alarmFallingThreshold Integer32,
+ alarmRisingEventIndex Integer32,
+ alarmFallingEventIndex Integer32,
+ alarmOwner OwnerString,
+ alarmStatus EntryStatus
+}
+
+alarmIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in the
+ alarm table. Each such entry defines a
+ diagnostic sample at a particular interval
+ for an object on the device."
+ ::= { alarmEntry 1 }
+
+alarmInterval OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The interval in seconds over which the data is
+ sampled and compared with the rising and falling
+ thresholds. When setting this variable, care
+ should be taken in the case of deltaValue
+ sampling - the interval should be set short enough
+ that the sampled variable is very unlikely to
+ increase or decrease by more than 2^31 - 1 during
+ a single sampling interval.
+
+ This object may not be modified if the associated
+ alarmStatus object is equal to valid(1)."
+ ::= { alarmEntry 2 }
+
+alarmVariable OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The object identifier of the particular variable to be
+ sampled. Only variables that resolve to an ASN.1 primitive
+ type of INTEGER (INTEGER, Integer32, Counter32, Counter64,
+ Gauge, or TimeTicks) may be sampled.
+
+ Because SNMP access control is articulated entirely
+ in terms of the contents of MIB views, no access
+ control mechanism exists that can restrict the value of
+ this object to identify only those objects that exist
+ in a particular MIB view. Because there is thus no
+ acceptable means of restricting the read access that
+ could be obtained through the alarm mechanism, the
+ probe must only grant write access to this object in
+ those views that have read access to all objects on
+ the probe.
+
+ During a set operation, if the supplied variable name is
+ not available in the selected MIB view, a badValue error
+ must be returned. If at any time the variable name of
+ an established alarmEntry is no longer available in the
+ selected MIB view, the probe must change the status of
+ this alarmEntry to invalid(4).
+
+ This object may not be modified if the associated
+ alarmStatus object is equal to valid(1)."
+ ::= { alarmEntry 3 }
+
+alarmSampleType OBJECT-TYPE
+ SYNTAX INTEGER {
+ absoluteValue(1),
+ deltaValue(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The method of sampling the selected variable and
+ calculating the value to be compared against the
+ thresholds. If the value of this object is
+ absoluteValue(1), the value of the selected variable
+ will be compared directly with the thresholds at the
+ end of the sampling interval. If the value of this
+ object is deltaValue(2), the value of the selected
+ variable at the last sample will be subtracted from
+ the current value, and the difference compared with
+ the thresholds.
+
+ This object may not be modified if the associated
+ alarmStatus object is equal to valid(1)."
+ ::= { alarmEntry 4 }
+
+alarmValue OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of the statistic during the last sampling
+ period. For example, if the sample type is deltaValue,
+ this value will be the difference between the samples
+ at the beginning and end of the period. If the sample
+ type is absoluteValue, this value will be the sampled
+ value at the end of the period.
+ This is the value that is compared with the rising and
+ falling thresholds.
+
+ The value during the current sampling period is not
+ made available until the period is completed and will
+ remain available until the next period completes."
+ ::= { alarmEntry 5 }
+
+alarmStartupAlarm OBJECT-TYPE
+ SYNTAX INTEGER {
+ risingAlarm(1),
+ fallingAlarm(2),
+ risingOrFallingAlarm(3)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The alarm that may be sent when this entry is first
+ set to valid. If the first sample after this entry
+ becomes valid is greater than or equal to the
+ risingThreshold and alarmStartupAlarm is equal to
+ risingAlarm(1) or risingOrFallingAlarm(3), then a single
+ rising alarm will be generated. If the first sample
+ after this entry becomes valid is less than or equal
+ to the fallingThreshold and alarmStartupAlarm is equal
+ to fallingAlarm(2) or risingOrFallingAlarm(3), then a
+ single falling alarm will be generated.
+
+ This object may not be modified if the associated
+ alarmStatus object is equal to valid(1)."
+ ::= { alarmEntry 6 }
+
+alarmRisingThreshold OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "A threshold for the sampled statistic. When the current
+ sampled value is greater than or equal to this threshold,
+ and the value at the last sampling interval was less than
+ this threshold, a single event will be generated.
+ A single event will also be generated if the first
+ sample after this entry becomes valid is greater than or
+ equal to this threshold and the associated
+ alarmStartupAlarm is equal to risingAlarm(1) or
+ risingOrFallingAlarm(3).
+
+ After a rising event is generated, another such event
+ will not be generated until the sampled value
+ falls below this threshold and reaches the
+ alarmFallingThreshold.
+
+ This object may not be modified if the associated
+ alarmStatus object is equal to valid(1)."
+ ::= { alarmEntry 7 }
+
+alarmFallingThreshold OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "A threshold for the sampled statistic. When the current
+ sampled value is less than or equal to this threshold,
+ and the value at the last sampling interval was greater than
+ this threshold, a single event will be generated.
+ A single event will also be generated if the first
+ sample after this entry becomes valid is less than or
+ equal to this threshold and the associated
+ alarmStartupAlarm is equal to fallingAlarm(2) or
+ risingOrFallingAlarm(3).
+
+ After a falling event is generated, another such event
+ will not be generated until the sampled value
+ rises above this threshold and reaches the
+ alarmRisingThreshold.
+
+ This object may not be modified if the associated
+ alarmStatus object is equal to valid(1)."
+ ::= { alarmEntry 8 }
+
+alarmRisingEventIndex OBJECT-TYPE
+ SYNTAX Integer32 (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The index of the eventEntry that is
+ used when a rising threshold is crossed. The
+ eventEntry identified by a particular value of
+ this index is the same as identified by the same value
+ of the eventIndex object. If there is no
+ corresponding entry in the eventTable, then
+ no association exists. In particular, if this value
+ is zero, no associated event will be generated, as
+ zero is not a valid event index.
+
+ This object may not be modified if the associated
+ alarmStatus object is equal to valid(1)."
+ ::= { alarmEntry 9 }
+
+alarmFallingEventIndex OBJECT-TYPE
+ SYNTAX Integer32 (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The index of the eventEntry that is
+ used when a falling threshold is crossed. The
+ eventEntry identified by a particular value of
+ this index is the same as identified by the same value
+ of the eventIndex object. If there is no
+ corresponding entry in the eventTable, then
+ no association exists. In particular, if this value
+ is zero, no associated event will be generated, as
+ zero is not a valid event index.
+
+ This object may not be modified if the associated
+ alarmStatus object is equal to valid(1)."
+ ::= { alarmEntry 10 }
+
+alarmOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { alarmEntry 11 }
+
+alarmStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this alarm entry."
+ ::= { alarmEntry 12 }
+
+-- The Host Group
+
+-- Implementation of the Host group is optional.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The host group discovers new hosts on the network by
+-- keeping a list of source and destination MAC Addresses seen
+-- in good packets. For each of these addresses, the host group
+-- keeps a set of statistics. The hostControlTable controls
+-- which interfaces this function is performed on, and contains
+-- some information about the process. On behalf of each
+-- hostControlEntry, data is collected on an interface and placed
+-- in both the hostTable and the hostTimeTable. If the
+-- monitoring device finds itself short of resources, it may
+-- delete entries as needed. It is suggested that the device
+-- delete the least recently used entries first.
+
+-- The hostTable contains entries for each address discovered on
+-- a particular interface. Each entry contains statistical
+-- data about that host. This table is indexed by the
+-- MAC address of the host, through which a random access
+-- may be achieved.
+
+-- The hostTimeTable contains data in the same format as the
+-- hostTable, and must contain the same set of hosts, but is
+-- indexed using hostTimeCreationOrder rather than hostAddress.
+-- The hostTimeCreationOrder is an integer which reflects
+-- the relative order in which a particular entry was discovered
+-- and thus inserted into the table. As this order, and thus
+-- the index, is among those entries currently in the table,
+-- the index for a particular entry may change if an
+-- (earlier) entry is deleted. Thus the association between
+-- hostTimeCreationOrder and hostTimeEntry may be broken at
+-- any time.
+
+-- The hostTimeTable has two important uses. The first is the
+-- fast download of this potentially large table. Because the
+-- index of this table runs from 1 to the size of the table,
+-- inclusive, its values are predictable. This allows very
+-- efficient packing of variables into SNMP PDU's and allows
+-- a table transfer to have multiple packets outstanding.
+-- These benefits increase transfer rates tremendously.
+
+-- The second use of the hostTimeTable is the efficient discovery
+-- by the management station of new entries added to the table.
+-- After the management station has downloaded the entire table,
+-- it knows that new entries will be added immediately after the
+-- end of the current table. It can thus detect new entries there
+-- and retrieve them easily.
+
+-- Because the association between hostTimeCreationOrder and
+-- hostTimeEntry may be broken at any time, the management
+-- station must monitor the related hostControlLastDeleteTime
+-- object. When the management station thus detects a deletion,
+-- it must assume that any such associations have been broken,
+-- and invalidate any it has stored locally. This includes
+-- restarting any download of the hostTimeTable that may have been
+-- in progress, as well as rediscovering the end of the
+-- hostTimeTable so that it may detect new entries. If the
+-- management station does not detect the broken association,
+-- it may continue to refer to a particular host by its
+-- creationOrder while unwittingly retrieving the data associated
+-- with another host entirely. If this happens while downloading
+-- the host table, the management station may fail to download
+-- all of the entries in the table.
+
+
+hostControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of host table control entries."
+ ::= { hosts 1 }
+
+hostControlEntry OBJECT-TYPE
+ SYNTAX HostControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of parameters that set up the discovery of hosts
+ on a particular interface and the collection of statistics
+ about these hosts. For example, an instance of the
+ hostControlTableSize object might be named
+ hostControlTableSize.1"
+ INDEX { hostControlIndex }
+ ::= { hostControlTable 1 }
+
+HostControlEntry ::= SEQUENCE {
+
+ hostControlIndex Integer32,
+ hostControlDataSource OBJECT IDENTIFIER,
+ hostControlTableSize Integer32,
+ hostControlLastDeleteTime TimeTicks,
+ hostControlOwner OwnerString,
+ hostControlStatus EntryStatus
+}
+
+hostControlIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in the
+ hostControl table. Each such entry defines
+ a function that discovers hosts on a particular interface
+ and places statistics about them in the hostTable and
+ the hostTimeTable on behalf of this hostControlEntry."
+ ::= { hostControlEntry 1 }
+
+hostControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "This object identifies the source of the data for
+ this instance of the host function. This source
+ can be any interface on this device. In order
+ to identify a particular interface, this object shall
+ identify the instance of the ifIndex object, defined
+ in RFC 2233 [17], for the desired interface.
+ For example, if an entry were to receive data from
+ interface #1, this object would be set to ifIndex.1.
+
+ The statistics in this group reflect all packets
+ on the local network segment attached to the identified
+ interface.
+
+ An agent may or may not be able to tell if fundamental
+ changes to the media of the interface have occurred and
+ necessitate an invalidation of this entry. For example, a
+ hot-pluggable ethernet card could be pulled out and replaced
+ by a token-ring card. In such a case, if the agent has such
+ knowledge of the change, it is recommended that it
+ invalidate this entry.
+
+ This object may not be modified if the associated
+ hostControlStatus object is equal to valid(1)."
+ ::= { hostControlEntry 2 }
+
+hostControlTableSize OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of hostEntries in the hostTable and the
+ hostTimeTable associated with this hostControlEntry."
+ ::= { hostControlEntry 3 }
+
+hostControlLastDeleteTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of sysUpTime when the last entry
+ was deleted from the portion of the hostTable
+ associated with this hostControlEntry. If no
+ deletions have occurred, this value shall be zero."
+ ::= { hostControlEntry 4 }
+
+hostControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { hostControlEntry 5 }
+
+hostControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this hostControl entry.
+
+ If this object is not equal to valid(1), all associated
+ entries in the hostTable, hostTimeTable, and the
+ hostTopNTable shall be deleted by the agent."
+ ::= { hostControlEntry 6 }
+
+hostTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of host entries."
+ ::= { hosts 2 }
+
+hostEntry OBJECT-TYPE
+ SYNTAX HostEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A collection of statistics for a particular host that has
+ been discovered on an interface of this device. For example,
+ an instance of the hostOutBroadcastPkts object might be
+ named hostOutBroadcastPkts.1.6.8.0.32.27.3.176"
+ INDEX { hostIndex, hostAddress }
+ ::= { hostTable 1 }
+
+HostEntry ::= SEQUENCE {
+ hostAddress OCTET STRING,
+ hostCreationOrder Integer32,
+ hostIndex Integer32,
+ hostInPkts Counter32,
+ hostOutPkts Counter32,
+ hostInOctets Counter32,
+ hostOutOctets Counter32,
+ hostOutErrors Counter32,
+ hostOutBroadcastPkts Counter32,
+ hostOutMulticastPkts Counter32
+}
+
+hostAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The physical address of this host."
+ ::= { hostEntry 1 }
+
+hostCreationOrder OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that defines the relative ordering of
+ the creation time of hosts captured for a
+ particular hostControlEntry. This index shall
+ be between 1 and N, where N is the value of
+ the associated hostControlTableSize. The ordering
+ of the indexes is based on the order of each entry's
+ insertion into the table, in which entries added earlier
+ have a lower index value than entries added later.
+
+ It is important to note that the order for a
+ particular entry may change as an (earlier) entry
+ is deleted from the table. Because this order may
+ change, management stations should make use of the
+ hostControlLastDeleteTime variable in the
+ hostControlEntry associated with the relevant
+ portion of the hostTable. By observing
+ this variable, the management station may detect
+ the circumstances where a previous association
+ between a value of hostCreationOrder
+ and a hostEntry may no longer hold."
+ ::= { hostEntry 2 }
+
+hostIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The set of collected host statistics of which
+ this entry is a part. The set of hosts
+ identified by a particular value of this
+ index is associated with the hostControlEntry
+ as identified by the same value of hostControlIndex."
+ ::= { hostEntry 3 }
+
+hostInPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of good packets transmitted to this
+ address since it was added to the hostTable."
+ ::= { hostEntry 4 }
+
+hostOutPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets, including bad packets, transmitted
+ by this address since it was added to the hostTable."
+ ::= { hostEntry 5 }
+
+hostInOctets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of octets transmitted to this address since
+ it was added to the hostTable (excluding framing
+ bits but including FCS octets), except for those
+ octets in bad packets."
+ ::= { hostEntry 6 }
+
+hostOutOctets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of octets transmitted by this address since
+ it was added to the hostTable (excluding framing
+ bits but including FCS octets), including those
+ octets in bad packets."
+ ::= { hostEntry 7 }
+
+hostOutErrors OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of bad packets transmitted by this address
+ since this host was added to the hostTable."
+ ::= { hostEntry 8 }
+
+hostOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of good packets transmitted by this
+ address that were directed to the broadcast address
+ since this host was added to the hostTable."
+ ::= { hostEntry 9 }
+
+hostOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of good packets transmitted by this
+ address that were directed to a multicast address
+ since this host was added to the hostTable.
+ Note that this number does not include packets
+ directed to the broadcast address."
+ ::= { hostEntry 10 }
+
+-- host Time Table
+
+hostTimeTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTimeEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of time-ordered host table entries."
+ ::= { hosts 3 }
+
+hostTimeEntry OBJECT-TYPE
+ SYNTAX HostTimeEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A collection of statistics for a particular host that has
+ been discovered on an interface of this device. This
+ collection includes the relative ordering of the creation
+ time of this object. For example, an instance of the
+ hostTimeOutBroadcastPkts object might be named
+ hostTimeOutBroadcastPkts.1.687"
+ INDEX { hostTimeIndex, hostTimeCreationOrder }
+ ::= { hostTimeTable 1 }
+
+HostTimeEntry ::= SEQUENCE {
+ hostTimeAddress OCTET STRING,
+ hostTimeCreationOrder Integer32,
+ hostTimeIndex Integer32,
+ hostTimeInPkts Counter32,
+ hostTimeOutPkts Counter32,
+ hostTimeInOctets Counter32,
+ hostTimeOutOctets Counter32,
+ hostTimeOutErrors Counter32,
+ hostTimeOutBroadcastPkts Counter32,
+ hostTimeOutMulticastPkts Counter32
+}
+
+hostTimeAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The physical address of this host."
+ ::= { hostTimeEntry 1 }
+
+hostTimeCreationOrder OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in
+ the hostTime table among those entries associated
+ with the same hostControlEntry. This index shall
+ be between 1 and N, where N is the value of
+ the associated hostControlTableSize. The ordering
+ of the indexes is based on the order of each entry's
+ insertion into the table, in which entries added earlier
+ have a lower index value than entries added later.
+ Thus the management station has the ability to
+ learn of new entries added to this table without
+ downloading the entire table.
+
+ It is important to note that the index for a
+ particular entry may change as an (earlier) entry
+ is deleted from the table. Because this order may
+ change, management stations should make use of the
+ hostControlLastDeleteTime variable in the
+ hostControlEntry associated with the relevant
+ portion of the hostTimeTable. By observing
+ this variable, the management station may detect
+ the circumstances where a download of the table
+ may have missed entries, and where a previous
+ association between a value of hostTimeCreationOrder
+ and a hostTimeEntry may no longer hold."
+ ::= { hostTimeEntry 2 }
+
+hostTimeIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The set of collected host statistics of which
+ this entry is a part. The set of hosts
+ identified by a particular value of this
+ index is associated with the hostControlEntry
+ as identified by the same value of hostControlIndex."
+ ::= { hostTimeEntry 3 }
+
+hostTimeInPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of good packets transmitted to this
+ address since it was added to the hostTimeTable."
+ ::= { hostTimeEntry 4 }
+
+hostTimeOutPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets, including bad packets, transmitted
+ by this address since it was added to the hostTimeTable."
+ ::= { hostTimeEntry 5 }
+
+hostTimeInOctets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of octets transmitted to this address since
+ it was added to the hostTimeTable (excluding framing
+ bits but including FCS octets), except for those
+ octets in bad packets."
+ ::= { hostTimeEntry 6 }
+
+hostTimeOutOctets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of octets transmitted by this address since
+ it was added to the hostTimeTable (excluding framing
+ bits but including FCS octets), including those
+ octets in bad packets."
+ ::= { hostTimeEntry 7 }
+
+hostTimeOutErrors OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of bad packets transmitted by this address
+ since this host was added to the hostTimeTable."
+ ::= { hostTimeEntry 8 }
+
+hostTimeOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of good packets transmitted by this
+ address that were directed to the broadcast address
+ since this host was added to the hostTimeTable."
+ ::= { hostTimeEntry 9 }
+
+hostTimeOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of good packets transmitted by this
+ address that were directed to a multicast address
+ since this host was added to the hostTimeTable.
+ Note that this number does not include packets directed
+ to the broadcast address."
+ ::= { hostTimeEntry 10 }
+
+-- The Host Top "N" Group
+
+-- Implementation of the Host Top N group is optional. The Host Top N
+-- group requires the implementation of the host group.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The Host Top N group is used to prepare reports that describe
+-- the hosts that top a list ordered by one of their statistics.
+-- The available statistics are samples of one of their
+-- base statistics, over an interval specified by the management
+-- station. Thus, these statistics are rate based. The management
+-- station also selects how many such hosts are reported.
+
+-- The hostTopNControlTable is used to initiate the generation of
+-- such a report. The management station may select the parameters
+-- of such a report, such as which interface, which statistic,
+-- how many hosts, and the start and stop times of the sampling.
+-- When the report is prepared, entries are created in the
+-- hostTopNTable associated with the relevant hostTopNControlEntry.
+-- These entries are static for each report after it has been
+-- prepared.
+
+hostTopNControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTopNControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of top N host control entries."
+ ::= { hostTopN 1 }
+
+hostTopNControlEntry OBJECT-TYPE
+ SYNTAX HostTopNControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of parameters that control the creation of a report
+ of the top N hosts according to several metrics. For
+ example, an instance of the hostTopNDuration object might
+ be named hostTopNDuration.3"
+ INDEX { hostTopNControlIndex }
+ ::= { hostTopNControlTable 1 }
+
+HostTopNControlEntry ::= SEQUENCE {
+ hostTopNControlIndex Integer32,
+ hostTopNHostIndex Integer32,
+ hostTopNRateBase INTEGER,
+ hostTopNTimeRemaining Integer32,
+ hostTopNDuration Integer32,
+ hostTopNRequestedSize Integer32,
+ hostTopNGrantedSize Integer32,
+ hostTopNStartTime TimeTicks,
+ hostTopNOwner OwnerString,
+ hostTopNStatus EntryStatus
+}
+
+hostTopNControlIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry
+ in the hostTopNControl table. Each such
+ entry defines one top N report prepared for
+ one interface."
+ ::= { hostTopNControlEntry 1 }
+
+hostTopNHostIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The host table for which a top N report will be prepared
+ on behalf of this entry. The host table identified by a
+ particular value of this index is associated with the same
+ host table as identified by the same value of
+ hostIndex.
+
+ This object may not be modified if the associated
+ hostTopNStatus object is equal to valid(1)."
+ ::= { hostTopNControlEntry 2 }
+
+hostTopNRateBase OBJECT-TYPE
+ SYNTAX INTEGER {
+ hostTopNInPkts(1),
+ hostTopNOutPkts(2),
+ hostTopNInOctets(3),
+ hostTopNOutOctets(4),
+ hostTopNOutErrors(5),
+ hostTopNOutBroadcastPkts(6),
+ hostTopNOutMulticastPkts(7)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The variable for each host that the hostTopNRate
+ variable is based upon.
+
+ This object may not be modified if the associated
+ hostTopNStatus object is equal to valid(1)."
+ ::= { hostTopNControlEntry 3 }
+
+hostTopNTimeRemaining OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The number of seconds left in the report currently being
+ collected. When this object is modified by the management
+ station, a new collection is started, possibly aborting
+ a currently running report. The new value is used
+ as the requested duration of this report, which is
+ loaded into the associated hostTopNDuration object.
+
+ When this object is set to a non-zero value, any
+ associated hostTopNEntries shall be made
+ inaccessible by the monitor. While the value of this
+ object is non-zero, it decrements by one per second until
+ it reaches zero. During this time, all associated
+ hostTopNEntries shall remain inaccessible. At the time
+ that this object decrements to zero, the report is made
+ accessible in the hostTopNTable. Thus, the hostTopN
+ table needs to be created only at the end of the collection
+ interval."
+ DEFVAL { 0 }
+ ::= { hostTopNControlEntry 4 }
+
+hostTopNDuration OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Seconds"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of seconds that this report has collected
+ during the last sampling interval, or if this
+ report is currently being collected, the number
+ of seconds that this report is being collected
+ during this sampling interval.
+
+ When the associated hostTopNTimeRemaining object is set,
+ this object shall be set by the probe to the same value
+ and shall not be modified until the next time
+ the hostTopNTimeRemaining is set.
+
+ This value shall be zero if no reports have been
+ requested for this hostTopNControlEntry."
+ DEFVAL { 0 }
+ ::= { hostTopNControlEntry 5 }
+
+hostTopNRequestedSize OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The maximum number of hosts requested for the top N
+ table.
+
+ When this object is created or modified, the probe
+ should set hostTopNGrantedSize as closely to this
+ object as is possible for the particular probe
+ implementation and available resources."
+ DEFVAL { 10 }
+ ::= { hostTopNControlEntry 6 }
+
+hostTopNGrantedSize OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The maximum number of hosts in the top N table.
+
+ When the associated hostTopNRequestedSize object is
+ created or modified, the probe should set this
+ object as closely to the requested value as is possible
+ for the particular implementation and available
+ resources. The probe must not lower this value except
+ as a result of a set to the associated
+ hostTopNRequestedSize object.
+
+ Hosts with the highest value of hostTopNRate shall be
+ placed in this table in decreasing order of this rate
+ until there is no more room or until there are no more
+ hosts."
+ ::= { hostTopNControlEntry 7 }
+
+hostTopNStartTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of sysUpTime when this top N report was
+ last started. In other words, this is the time that
+ the associated hostTopNTimeRemaining object was
+ modified to start the requested report."
+ ::= { hostTopNControlEntry 8 }
+
+hostTopNOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { hostTopNControlEntry 9 }
+
+hostTopNStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this hostTopNControl entry.
+
+ If this object is not equal to valid(1), all associated
+ hostTopNEntries shall be deleted by the agent."
+ ::= { hostTopNControlEntry 10 }
+
+hostTopNTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTopNEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of top N host entries."
+ ::= { hostTopN 2 }
+
+hostTopNEntry OBJECT-TYPE
+ SYNTAX HostTopNEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of statistics for a host that is part of a top N
+ report. For example, an instance of the hostTopNRate
+ object might be named hostTopNRate.3.10"
+ INDEX { hostTopNReport, hostTopNIndex }
+ ::= { hostTopNTable 1 }
+
+HostTopNEntry ::= SEQUENCE {
+ hostTopNReport Integer32,
+ hostTopNIndex Integer32,
+ hostTopNAddress OCTET STRING,
+ hostTopNRate Integer32
+}
+
+hostTopNReport OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This object identifies the top N report of which
+ this entry is a part. The set of hosts
+ identified by a particular value of this
+ object is part of the same report as identified
+ by the same value of the hostTopNControlIndex object."
+ ::= { hostTopNEntry 1 }
+
+hostTopNIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in
+ the hostTopN table among those in the same report.
+ This index is between 1 and N, where N is the
+ number of entries in this table. Increasing values
+ of hostTopNIndex shall be assigned to entries with
+ decreasing values of hostTopNRate until index N
+ is assigned to the entry with the lowest value of
+ hostTopNRate or there are no more hostTopNEntries."
+ ::= { hostTopNEntry 2 }
+
+hostTopNAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The physical address of this host."
+ ::= { hostTopNEntry 3 }
+
+hostTopNRate OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The amount of change in the selected variable
+ during this sampling interval. The selected
+ variable is this host's instance of the object
+ selected by hostTopNRateBase."
+ ::= { hostTopNEntry 4 }
+
+-- The Matrix Group
+
+-- Implementation of the Matrix group is optional.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The Matrix group consists of the matrixControlTable, matrixSDTable
+-- and the matrixDSTable. These tables store statistics for a
+-- particular conversation between two addresses. As the device
+-- detects a new conversation, including those to a non-unicast
+-- address, it creates a new entry in both of the matrix tables.
+-- It must only create new entries based on information
+-- received in good packets. If the monitoring device finds
+-- itself short of resources, it may delete entries as needed.
+-- It is suggested that the device delete the least recently used
+-- entries first.
+
+matrixControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of information entries for the
+ traffic matrix on each interface."
+ ::= { matrix 1 }
+
+matrixControlEntry OBJECT-TYPE
+ SYNTAX MatrixControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "Information about a traffic matrix on a particular
+ interface. For example, an instance of the
+ matrixControlLastDeleteTime object might be named
+ matrixControlLastDeleteTime.1"
+ INDEX { matrixControlIndex }
+ ::= { matrixControlTable 1 }
+
+MatrixControlEntry ::= SEQUENCE {
+ matrixControlIndex Integer32,
+ matrixControlDataSource OBJECT IDENTIFIER,
+ matrixControlTableSize Integer32,
+ matrixControlLastDeleteTime TimeTicks,
+ matrixControlOwner OwnerString,
+ matrixControlStatus EntryStatus
+}
+
+matrixControlIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in the
+ matrixControl table. Each such entry defines
+ a function that discovers conversations on a particular
+ interface and places statistics about them in the
+ matrixSDTable and the matrixDSTable on behalf of this
+ matrixControlEntry."
+ ::= { matrixControlEntry 1 }
+
+matrixControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "This object identifies the source of
+ the data from which this entry creates a traffic matrix.
+ This source can be any interface on this device. In
+ order to identify a particular interface, this object
+ shall identify the instance of the ifIndex object,
+ defined in RFC 2233 [17], for the desired
+ interface. For example, if an entry were to receive data
+ from interface #1, this object would be set to ifIndex.1.
+
+ The statistics in this group reflect all packets
+ on the local network segment attached to the identified
+ interface.
+
+ An agent may or may not be able to tell if fundamental
+ changes to the media of the interface have occurred and
+ necessitate an invalidation of this entry. For example, a
+ hot-pluggable ethernet card could be pulled out and replaced
+ by a token-ring card. In such a case, if the agent has such
+ knowledge of the change, it is recommended that it
+ invalidate this entry.
+
+ This object may not be modified if the associated
+ matrixControlStatus object is equal to valid(1)."
+ ::= { matrixControlEntry 2 }
+
+matrixControlTableSize OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of matrixSDEntries in the matrixSDTable
+ for this interface. This must also be the value of
+ the number of entries in the matrixDSTable for this
+ interface."
+ ::= { matrixControlEntry 3 }
+
+matrixControlLastDeleteTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of sysUpTime when the last entry
+ was deleted from the portion of the matrixSDTable
+ or matrixDSTable associated with this matrixControlEntry.
+ If no deletions have occurred, this value shall be
+ zero."
+ ::= { matrixControlEntry 4 }
+
+matrixControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { matrixControlEntry 5 }
+
+matrixControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this matrixControl entry.
+ If this object is not equal to valid(1), all associated
+ entries in the matrixSDTable and the matrixDSTable
+ shall be deleted by the agent."
+ ::= { matrixControlEntry 6 }
+
+matrixSDTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixSDEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of traffic matrix entries indexed by
+ source and destination MAC address."
+ ::= { matrix 2 }
+
+matrixSDEntry OBJECT-TYPE
+ SYNTAX MatrixSDEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A collection of statistics for communications between
+ two addresses on a particular interface. For example,
+ an instance of the matrixSDPkts object might be named
+ matrixSDPkts.1.6.8.0.32.27.3.176.6.8.0.32.10.8.113"
+ INDEX { matrixSDIndex,
+ matrixSDSourceAddress, matrixSDDestAddress }
+ ::= { matrixSDTable 1 }
+
+MatrixSDEntry ::= SEQUENCE {
+ matrixSDSourceAddress OCTET STRING,
+ matrixSDDestAddress OCTET STRING,
+ matrixSDIndex Integer32,
+ matrixSDPkts Counter32,
+ matrixSDOctets Counter32,
+ matrixSDErrors Counter32
+}
+
+matrixSDSourceAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The source physical address."
+ ::= { matrixSDEntry 1 }
+
+matrixSDDestAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The destination physical address."
+ ::= { matrixSDEntry 2 }
+
+matrixSDIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The set of collected matrix statistics of which
+ this entry is a part. The set of matrix statistics
+ identified by a particular value of this index
+ is associated with the same matrixControlEntry
+ as identified by the same value of matrixControlIndex."
+ ::= { matrixSDEntry 3 }
+
+matrixSDPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets transmitted from the source
+ address to the destination address (this number includes
+ bad packets)."
+ ::= { matrixSDEntry 4 }
+
+matrixSDOctets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of octets (excluding framing bits but
+ including FCS octets) contained in all packets
+ transmitted from the source address to the
+ destination address."
+ ::= { matrixSDEntry 5 }
+
+matrixSDErrors OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of bad packets transmitted from
+ the source address to the destination address."
+ ::= { matrixSDEntry 6 }
+
+-- Traffic matrix tables from destination to source
+
+matrixDSTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixDSEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of traffic matrix entries indexed by
+ destination and source MAC address."
+ ::= { matrix 3 }
+
+matrixDSEntry OBJECT-TYPE
+ SYNTAX MatrixDSEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A collection of statistics for communications between
+ two addresses on a particular interface. For example,
+ an instance of the matrixSDPkts object might be named
+ matrixSDPkts.1.6.8.0.32.10.8.113.6.8.0.32.27.3.176"
+ INDEX { matrixDSIndex,
+ matrixDSDestAddress, matrixDSSourceAddress }
+ ::= { matrixDSTable 1 }
+
+MatrixDSEntry ::= SEQUENCE {
+ matrixDSSourceAddress OCTET STRING,
+ matrixDSDestAddress OCTET STRING,
+ matrixDSIndex Integer32,
+ matrixDSPkts Counter32,
+ matrixDSOctets Counter32,
+ matrixDSErrors Counter32
+}
+
+matrixDSSourceAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The source physical address."
+ ::= { matrixDSEntry 1 }
+
+matrixDSDestAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The destination physical address."
+ ::= { matrixDSEntry 2 }
+
+matrixDSIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The set of collected matrix statistics of which
+ this entry is a part. The set of matrix statistics
+ identified by a particular value of this index
+ is associated with the same matrixControlEntry
+ as identified by the same value of matrixControlIndex."
+ ::= { matrixDSEntry 3 }
+
+matrixDSPkts OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets transmitted from the source
+ address to the destination address (this number includes
+ bad packets)."
+ ::= { matrixDSEntry 4 }
+
+matrixDSOctets OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of octets (excluding framing bits
+ but including FCS octets) contained in all packets
+ transmitted from the source address to the
+ destination address."
+ ::= { matrixDSEntry 5 }
+
+matrixDSErrors OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of bad packets transmitted from
+ the source address to the destination address."
+ ::= { matrixDSEntry 6 }
+
+-- The Filter Group
+
+-- Implementation of the Filter group is optional.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The Filter group allows packets to be captured with an
+-- arbitrary filter expression. A logical data and
+-- event stream or "channel" is formed by the packets
+-- that match the filter expression.
+--
+-- This filter mechanism allows the creation of an arbitrary
+-- logical expression with which to filter packets. Each
+-- filter associated with a channel is OR'ed with the others.
+-- Within a filter, any bits checked in the data and status are
+-- AND'ed with respect to other bits in the same filter. The
+-- NotMask also allows for checking for inequality. Finally,
+-- the channelAcceptType object allows for inversion of the
+-- whole equation.
+--
+-- If a management station wishes to receive a trap to alert it
+-- that new packets have been captured and are available for
+-- download, it is recommended that it set up an alarm entry that
+-- monitors the value of the relevant channelMatches instance.
+--
+-- The channel can be turned on or off, and can also
+-- generate events when packets pass through it.
+
+filterTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF FilterEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of packet filter entries."
+ ::= { filter 1 }
+
+filterEntry OBJECT-TYPE
+ SYNTAX FilterEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of parameters for a packet filter applied on a
+ particular interface. As an example, an instance of the
+ filterPktData object might be named filterPktData.12"
+ INDEX { filterIndex }
+ ::= { filterTable 1 }
+
+FilterEntry ::= SEQUENCE {
+ filterIndex Integer32,
+ filterChannelIndex Integer32,
+ filterPktDataOffset Integer32,
+ filterPktData OCTET STRING,
+ filterPktDataMask OCTET STRING,
+ filterPktDataNotMask OCTET STRING,
+ filterPktStatus Integer32,
+ filterPktStatusMask Integer32,
+ filterPktStatusNotMask Integer32,
+ filterOwner OwnerString,
+ filterStatus EntryStatus
+}
+
+filterIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry
+ in the filter table. Each such entry defines
+ one filter that is to be applied to every packet
+ received on an interface."
+ ::= { filterEntry 1 }
+
+filterChannelIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "This object identifies the channel of which this filter
+ is a part. The filters identified by a particular value
+ of this object are associated with the same channel as
+ identified by the same value of the channelIndex object."
+ ::= { filterEntry 2 }
+
+filterPktDataOffset OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Octets"
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The offset from the beginning of each packet where
+ a match of packet data will be attempted. This offset
+ is measured from the point in the physical layer
+ packet after the framing bits, if any. For example,
+ in an Ethernet frame, this point is at the beginning of
+ the destination MAC address.
+
+ This object may not be modified if the associated
+ filterStatus object is equal to valid(1)."
+ DEFVAL { 0 }
+
+ ::= { filterEntry 3 }
+
+filterPktData OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The data that is to be matched with the input packet.
+ For each packet received, this filter and the accompanying
+ filterPktDataMask and filterPktDataNotMask will be
+ adjusted for the offset. The only bits relevant to this
+ match algorithm are those that have the corresponding
+ filterPktDataMask bit equal to one. The following three
+ rules are then applied to every packet:
+
+ (1) If the packet is too short and does not have data
+ corresponding to part of the filterPktData, the packet
+ will fail this data match.
+
+ (2) For each relevant bit from the packet with the
+ corresponding filterPktDataNotMask bit set to zero, if
+ the bit from the packet is not equal to the corresponding
+ bit from the filterPktData, then the packet will fail
+ this data match.
+
+ (3) If for every relevant bit from the packet with the
+ corresponding filterPktDataNotMask bit set to one, the
+ bit from the packet is equal to the corresponding bit
+ from the filterPktData, then the packet will fail this
+ data match.
+
+ Any packets that have not failed any of the three matches
+ above have passed this data match. In particular, a zero
+ length filter will match any packet.
+
+ This object may not be modified if the associated
+ filterStatus object is equal to valid(1)."
+ ::= { filterEntry 4 }
+
+filterPktDataMask OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The mask that is applied to the match process.
+ After adjusting this mask for the offset, only those
+ bits in the received packet that correspond to bits set
+ in this mask are relevant for further processing by the
+ match algorithm. The offset is applied to filterPktDataMask
+ in the same way it is applied to the filter. For the
+ purposes of the matching algorithm, if the associated
+ filterPktData object is longer than this mask, this mask is
+ conceptually extended with '1' bits until it reaches the
+ length of the filterPktData object.
+
+ This object may not be modified if the associated
+ filterStatus object is equal to valid(1)."
+ ::= { filterEntry 5 }
+
+filterPktDataNotMask OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The inversion mask that is applied to the match
+ process. After adjusting this mask for the offset,
+ those relevant bits in the received packet that correspond
+ to bits cleared in this mask must all be equal to their
+ corresponding bits in the filterPktData object for the packet
+ to be accepted. In addition, at least one of those relevant
+ bits in the received packet that correspond to bits set in
+ this mask must be different to its corresponding bit in the
+ filterPktData object.
+
+ For the purposes of the matching algorithm, if the associated
+ filterPktData object is longer than this mask, this mask is
+ conceptually extended with '0' bits until it reaches the
+ length of the filterPktData object.
+
+ This object may not be modified if the associated
+ filterStatus object is equal to valid(1)."
+ ::= { filterEntry 6 }
+
+filterPktStatus OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status that is to be matched with the input packet.
+ The only bits relevant to this match algorithm are those that
+ have the corresponding filterPktStatusMask bit equal to one.
+ The following two rules are then applied to every packet:
+
+ (1) For each relevant bit from the packet status with the
+ corresponding filterPktStatusNotMask bit set to zero, if
+ the bit from the packet status is not equal to the
+ corresponding bit from the filterPktStatus, then the
+ packet will fail this status match.
+
+ (2) If for every relevant bit from the packet status with the
+ corresponding filterPktStatusNotMask bit set to one, the
+ bit from the packet status is equal to the corresponding
+ bit from the filterPktStatus, then the packet will fail
+ this status match.
+
+ Any packets that have not failed either of the two matches
+ above have passed this status match. In particular, a zero
+ length status filter will match any packet's status.
+
+ The value of the packet status is a sum. This sum
+ initially takes the value zero. Then, for each
+ error, E, that has been discovered in this packet,
+ 2 raised to a value representing E is added to the sum.
+ The errors and the bits that represent them are dependent
+ on the media type of the interface that this channel
+ is receiving packets from.
+
+ The errors defined for a packet captured off of an
+ Ethernet interface are as follows:
+
+ bit # Error
+ 0 Packet is longer than 1518 octets
+ 1 Packet is shorter than 64 octets
+ 2 Packet experienced a CRC or Alignment error
+
+ For example, an Ethernet fragment would have a
+ value of 6 (2^1 + 2^2).
+
+ As this MIB is expanded to new media types, this object
+ will have other media-specific errors defined.
+
+ For the purposes of this status matching algorithm, if the
+ packet status is longer than this filterPktStatus object,
+ this object is conceptually extended with '0' bits until it
+ reaches the size of the packet status.
+
+ This object may not be modified if the associated
+ filterStatus object is equal to valid(1)."
+ ::= { filterEntry 7 }
+
+filterPktStatusMask OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The mask that is applied to the status match process.
+ Only those bits in the received packet that correspond to
+ bits set in this mask are relevant for further processing
+ by the status match algorithm. For the purposes
+ of the matching algorithm, if the associated filterPktStatus
+ object is longer than this mask, this mask is conceptually
+ extended with '1' bits until it reaches the size of the
+ filterPktStatus. In addition, if a packet status is longer
+ than this mask, this mask is conceptually extended with '0'
+ bits until it reaches the size of the packet status.
+
+ This object may not be modified if the associated
+ filterStatus object is equal to valid(1)."
+ ::= { filterEntry 8 }
+
+filterPktStatusNotMask OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The inversion mask that is applied to the status match
+ process. Those relevant bits in the received packet status
+ that correspond to bits cleared in this mask must all be
+ equal to their corresponding bits in the filterPktStatus
+ object for the packet to be accepted. In addition, at least
+ one of those relevant bits in the received packet status
+ that correspond to bits set in this mask must be different
+ to its corresponding bit in the filterPktStatus object for
+ the packet to be accepted.
+
+ For the purposes of the matching algorithm, if the associated
+ filterPktStatus object or a packet status is longer than this
+ mask, this mask is conceptually extended with '0' bits until
+ it reaches the longer of the lengths of the filterPktStatus
+ object and the packet status.
+
+ This object may not be modified if the associated
+ filterStatus object is equal to valid(1)."
+ ::= { filterEntry 9 }
+
+filterOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { filterEntry 10 }
+
+filterStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this filter entry."
+ ::= { filterEntry 11 }
+
+channelTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ChannelEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of packet channel entries."
+ ::= { filter 2 }
+
+channelEntry OBJECT-TYPE
+ SYNTAX ChannelEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of parameters for a packet channel applied on a
+ particular interface. As an example, an instance of the
+ channelMatches object might be named channelMatches.3"
+ INDEX { channelIndex }
+ ::= { channelTable 1 }
+
+ChannelEntry ::= SEQUENCE {
+ channelIndex Integer32,
+ channelIfIndex Integer32,
+ channelAcceptType INTEGER,
+ channelDataControl INTEGER,
+ channelTurnOnEventIndex Integer32,
+ channelTurnOffEventIndex Integer32,
+ channelEventIndex Integer32,
+ channelEventStatus INTEGER,
+ channelMatches Counter32,
+ channelDescription DisplayString,
+ channelOwner OwnerString,
+ channelStatus EntryStatus
+}
+
+channelIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in the channel
+ table. Each such entry defines one channel, a logical
+ data and event stream.
+
+ It is suggested that before creating a channel, an
+ application should scan all instances of the
+ filterChannelIndex object to make sure that there are no
+ pre-existing filters that would be inadvertently be linked
+ to the channel."
+ ::= { channelEntry 1 }
+
+channelIfIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The value of this object uniquely identifies the
+ interface on this remote network monitoring device to which
+ the associated filters are applied to allow data into this
+ channel. The interface identified by a particular value
+ of this object is the same interface as identified by the
+ same value of the ifIndex object, defined in RFC 2233 [17].
+
+ The filters in this group are applied to all packets on
+ the local network segment attached to the identified
+ interface.
+
+ An agent may or may not be able to tell if fundamental
+ changes to the media of the interface have occurred and
+ necessitate an invalidation of this entry. For example, a
+ hot-pluggable ethernet card could be pulled out and replaced
+ by a token-ring card. In such a case, if the agent has such
+ knowledge of the change, it is recommended that it
+ invalidate this entry.
+
+ This object may not be modified if the associated
+ channelStatus object is equal to valid(1)."
+ ::= { channelEntry 2 }
+
+channelAcceptType OBJECT-TYPE
+ SYNTAX INTEGER {
+ acceptMatched(1),
+ acceptFailed(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "This object controls the action of the filters
+ associated with this channel. If this object is equal
+ to acceptMatched(1), packets will be accepted to this
+ channel if they are accepted by both the packet data and
+ packet status matches of an associated filter. If
+ this object is equal to acceptFailed(2), packets will
+ be accepted to this channel only if they fail either
+ the packet data match or the packet status match of
+ each of the associated filters.
+
+ In particular, a channel with no associated filters will
+ match no packets if set to acceptMatched(1) case and will
+ match all packets in the acceptFailed(2) case.
+
+ This object may not be modified if the associated
+ channelStatus object is equal to valid(1)."
+ ::= { channelEntry 3 }
+
+channelDataControl OBJECT-TYPE
+ SYNTAX INTEGER {
+ on(1),
+ off(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "This object controls the flow of data through this channel.
+ If this object is on(1), data, status and events flow
+ through this channel. If this object is off(2), data,
+ status and events will not flow through this channel."
+ DEFVAL { off }
+ ::= { channelEntry 4 }
+
+channelTurnOnEventIndex OBJECT-TYPE
+ SYNTAX Integer32 (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The value of this object identifies the event
+ that is configured to turn the associated
+ channelDataControl from off to on when the event is
+ generated. The event identified by a particular value
+ of this object is the same event as identified by the
+ same value of the eventIndex object. If there is no
+ corresponding entry in the eventTable, then no
+ association exists. In fact, if no event is intended
+ for this channel, channelTurnOnEventIndex must be
+ set to zero, a non-existent event index.
+
+ This object may not be modified if the associated
+ channelStatus object is equal to valid(1)."
+ ::= { channelEntry 5 }
+
+channelTurnOffEventIndex OBJECT-TYPE
+ SYNTAX Integer32 (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The value of this object identifies the event
+ that is configured to turn the associated
+ channelDataControl from on to off when the event is
+ generated. The event identified by a particular value
+ of this object is the same event as identified by the
+ same value of the eventIndex object. If there is no
+ corresponding entry in the eventTable, then no
+ association exists. In fact, if no event is intended
+ for this channel, channelTurnOffEventIndex must be
+ set to zero, a non-existent event index.
+
+ This object may not be modified if the associated
+ channelStatus object is equal to valid(1)."
+ ::= { channelEntry 6 }
+
+channelEventIndex OBJECT-TYPE
+ SYNTAX Integer32 (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The value of this object identifies the event
+ that is configured to be generated when the
+ associated channelDataControl is on and a packet
+ is matched. The event identified by a particular value
+ of this object is the same event as identified by the
+ same value of the eventIndex object. If there is no
+ corresponding entry in the eventTable, then no
+ association exists. In fact, if no event is intended
+ for this channel, channelEventIndex must be
+ set to zero, a non-existent event index.
+
+ This object may not be modified if the associated
+ channelStatus object is equal to valid(1)."
+ ::= { channelEntry 7 }
+
+channelEventStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ eventReady(1),
+ eventFired(2),
+ eventAlwaysReady(3)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The event status of this channel.
+
+ If this channel is configured to generate events
+ when packets are matched, a means of controlling
+ the flow of those events is often needed. When
+ this object is equal to eventReady(1), a single
+ event may be generated, after which this object
+ will be set by the probe to eventFired(2). While
+ in the eventFired(2) state, no events will be
+ generated until the object is modified to
+ eventReady(1) (or eventAlwaysReady(3)). The
+ management station can thus easily respond to a
+ notification of an event by re-enabling this object.
+
+ If the management station wishes to disable this
+ flow control and allow events to be generated
+ at will, this object may be set to
+ eventAlwaysReady(3). Disabling the flow control
+ is discouraged as it can result in high network
+ traffic or other performance problems."
+ DEFVAL { eventReady }
+ ::= { channelEntry 8 }
+
+channelMatches OBJECT-TYPE
+ SYNTAX Counter32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of times this channel has matched a packet.
+ Note that this object is updated even when
+ channelDataControl is set to off."
+ ::= { channelEntry 9 }
+
+channelDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "A comment describing this channel."
+ ::= { channelEntry 10 }
+
+channelOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { channelEntry 11 }
+
+channelStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this channel entry."
+ ::= { channelEntry 12 }
+
+-- The Packet Capture Group
+
+-- Implementation of the Packet Capture group is optional. The Packet
+-- Capture Group requires implementation of the Filter Group.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The Packet Capture group allows packets to be captured
+-- upon a filter match. The bufferControlTable controls
+-- the captured packets output from a channel that is
+-- associated with it. The captured packets are placed
+-- in entries in the captureBufferTable. These entries are
+-- associated with the bufferControlEntry on whose behalf they
+-- were stored.
+
+bufferControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF BufferControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of buffers control entries."
+ ::= { capture 1 }
+
+bufferControlEntry OBJECT-TYPE
+ SYNTAX BufferControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of parameters that control the collection of a stream
+ of packets that have matched filters. As an example, an
+ instance of the bufferControlCaptureSliceSize object might
+ be named bufferControlCaptureSliceSize.3"
+
+ INDEX { bufferControlIndex }
+ ::= { bufferControlTable 1 }
+
+BufferControlEntry ::= SEQUENCE {
+ bufferControlIndex Integer32,
+ bufferControlChannelIndex Integer32,
+ bufferControlFullStatus INTEGER,
+ bufferControlFullAction INTEGER,
+ bufferControlCaptureSliceSize Integer32,
+ bufferControlDownloadSliceSize Integer32,
+ bufferControlDownloadOffset Integer32,
+ bufferControlMaxOctetsRequested Integer32,
+ bufferControlMaxOctetsGranted Integer32,
+ bufferControlCapturedPackets Integer32,
+ bufferControlTurnOnTime TimeTicks,
+ bufferControlOwner OwnerString,
+ bufferControlStatus EntryStatus
+}
+
+bufferControlIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry
+ in the bufferControl table. The value of this
+ index shall never be zero. Each such
+ entry defines one set of packets that is
+ captured and controlled by one or more filters."
+ ::= { bufferControlEntry 1 }
+
+bufferControlChannelIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "An index that identifies the channel that is the
+ source of packets for this bufferControl table.
+ The channel identified by a particular value of this
+ index is the same as identified by the same value of
+ the channelIndex object.
+
+ This object may not be modified if the associated
+ bufferControlStatus object is equal to valid(1)."
+ ::= { bufferControlEntry 2 }
+
+bufferControlFullStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ spaceAvailable(1),
+ full(2)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This object shows whether the buffer has room to
+ accept new packets or if it is full.
+
+ If the status is spaceAvailable(1), the buffer is
+ accepting new packets normally. If the status is
+ full(2) and the associated bufferControlFullAction
+ object is wrapWhenFull, the buffer is accepting new
+ packets by deleting enough of the oldest packets
+ to make room for new ones as they arrive. Otherwise,
+ if the status is full(2) and the
+ bufferControlFullAction object is lockWhenFull,
+ then the buffer has stopped collecting packets.
+
+ When this object is set to full(2) the probe must
+ not later set it to spaceAvailable(1) except in the
+ case of a significant gain in resources such as
+ an increase of bufferControlOctetsGranted. In
+ particular, the wrap-mode action of deleting old
+ packets to make room for newly arrived packets
+ must not affect the value of this object."
+ ::= { bufferControlEntry 3 }
+
+bufferControlFullAction OBJECT-TYPE
+ SYNTAX INTEGER {
+ lockWhenFull(1),
+ wrapWhenFull(2) -- FIFO
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "Controls the action of the buffer when it
+ reaches the full status. When in the lockWhenFull(1)
+ state and a packet is added to the buffer that
+ fills the buffer, the bufferControlFullStatus will
+ be set to full(2) and this buffer will stop capturing
+ packets."
+ ::= { bufferControlEntry 4 }
+
+bufferControlCaptureSliceSize OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Octets"
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The maximum number of octets of each packet
+ that will be saved in this capture buffer.
+ For example, if a 1500 octet packet is received by
+ the probe and this object is set to 500, then only
+ 500 octets of the packet will be stored in the
+ associated capture buffer. If this variable is set
+ to 0, the capture buffer will save as many octets
+ as is possible.
+
+ This object may not be modified if the associated
+ bufferControlStatus object is equal to valid(1)."
+ DEFVAL { 100 }
+ ::= { bufferControlEntry 5 }
+
+bufferControlDownloadSliceSize OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Octets"
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The maximum number of octets of each packet
+ in this capture buffer that will be returned in
+ an SNMP retrieval of that packet. For example,
+ if 500 octets of a packet have been stored in the
+ associated capture buffer, the associated
+ bufferControlDownloadOffset is 0, and this
+ object is set to 100, then the captureBufferPacket
+ object that contains the packet will contain only
+ the first 100 octets of the packet.
+
+ A prudent manager will take into account possible
+ interoperability or fragmentation problems that may
+ occur if the download slice size is set too large.
+ In particular, conformant SNMP implementations are not
+ required to accept messages whose length exceeds 484
+ octets, although they are encouraged to support larger
+ datagrams whenever feasible."
+ DEFVAL { 100 }
+ ::= { bufferControlEntry 6 }
+
+bufferControlDownloadOffset OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Octets"
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The offset of the first octet of each packet
+ in this capture buffer that will be returned in
+ an SNMP retrieval of that packet. For example,
+ if 500 octets of a packet have been stored in the
+ associated capture buffer and this object is set to
+ 100, then the captureBufferPacket object that
+ contains the packet will contain bytes starting
+ 100 octets into the packet."
+ DEFVAL { 0 }
+ ::= { bufferControlEntry 7 }
+
+bufferControlMaxOctetsRequested OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Octets"
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The requested maximum number of octets to be
+ saved in this captureBuffer, including any
+ implementation-specific overhead. If this variable
+ is set to -1, the capture buffer will save as many
+ octets as is possible.
+
+ When this object is created or modified, the probe
+ should set bufferControlMaxOctetsGranted as closely
+ to this object as is possible for the particular probe
+ implementation and available resources. However, if
+ the object has the special value of -1, the probe
+ must set bufferControlMaxOctetsGranted to -1."
+ DEFVAL { -1 }
+ ::= { bufferControlEntry 8 }
+
+bufferControlMaxOctetsGranted OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The maximum number of octets that can be
+ saved in this captureBuffer, including overhead.
+ If this variable is -1, the capture buffer will save
+ as many octets as possible.
+
+ When the bufferControlMaxOctetsRequested object is
+ created or modified, the probe should set this object
+ as closely to the requested value as is possible for the
+ particular probe implementation and available resources.
+ However, if the request object has the special value
+ of -1, the probe must set this object to -1.
+
+ The probe must not lower this value except as a result of
+ a modification to the associated
+ bufferControlMaxOctetsRequested object.
+
+ When this maximum number of octets is reached
+ and a new packet is to be added to this
+ capture buffer and the corresponding
+ bufferControlFullAction is set to wrapWhenFull(2),
+ enough of the oldest packets associated with this
+ capture buffer shall be deleted by the agent so
+ that the new packet can be added. If the corresponding
+ bufferControlFullAction is set to lockWhenFull(1),
+ the new packet shall be discarded. In either case,
+ the probe must set bufferControlFullStatus to
+ full(2).
+
+ When the value of this object changes to a value less
+ than the current value, entries are deleted from
+ the captureBufferTable associated with this
+ bufferControlEntry. Enough of the
+ oldest of these captureBufferEntries shall be
+ deleted by the agent so that the number of octets
+ used remains less than or equal to the new value of
+ this object.
+
+ When the value of this object changes to a value greater
+ than the current value, the number of associated
+ captureBufferEntries may be allowed to grow."
+ ::= { bufferControlEntry 9 }
+
+bufferControlCapturedPackets OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Packets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of packets currently in this captureBuffer."
+ ::= { bufferControlEntry 10 }
+
+bufferControlTurnOnTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of sysUpTime when this capture buffer was
+ first turned on."
+ ::= { bufferControlEntry 11 }
+
+bufferControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it."
+ ::= { bufferControlEntry 12 }
+
+bufferControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this buffer Control Entry."
+ ::= { bufferControlEntry 13 }
+
+captureBufferTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF CaptureBufferEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of packets captured off of a channel."
+ ::= { capture 2 }
+
+captureBufferEntry OBJECT-TYPE
+ SYNTAX CaptureBufferEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A packet captured off of an attached network. As an
+ example, an instance of the captureBufferPacketData
+ object might be named captureBufferPacketData.3.1783"
+ INDEX { captureBufferControlIndex, captureBufferIndex }
+ ::= { captureBufferTable 1 }
+
+CaptureBufferEntry ::= SEQUENCE {
+ captureBufferControlIndex Integer32,
+ captureBufferIndex Integer32,
+ captureBufferPacketID Integer32,
+ captureBufferPacketData OCTET STRING,
+ captureBufferPacketLength Integer32,
+ captureBufferPacketTime Integer32,
+ captureBufferPacketStatus Integer32
+}
+
+captureBufferControlIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The index of the bufferControlEntry with which
+ this packet is associated."
+ ::= { captureBufferEntry 1 }
+
+captureBufferIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..2147483647)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry
+ in the captureBuffer table associated with a
+ particular bufferControlEntry. This index will
+ start at 1 and increase by one for each new packet
+ added with the same captureBufferControlIndex.
+
+ Should this value reach 2147483647, the next packet
+ added with the same captureBufferControlIndex shall
+ cause this value to wrap around to 1."
+ ::= { captureBufferEntry 2 }
+
+captureBufferPacketID OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that describes the order of packets
+ that are received on a particular interface.
+ The packetID of a packet captured on an
+ interface is defined to be greater than the
+ packetID's of all packets captured previously on
+ the same interface. As the captureBufferPacketID
+ object has a maximum positive value of 2^31 - 1,
+ any captureBufferPacketID object shall have the
+ value of the associated packet's packetID mod 2^31."
+ ::= { captureBufferEntry 3 }
+
+captureBufferPacketData OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The data inside the packet, starting at the beginning
+ of the packet plus any offset specified in the
+ associated bufferControlDownloadOffset, including any
+ link level headers. The length of the data in this object
+ is the minimum of the length of the captured packet minus
+ the offset, the length of the associated
+ bufferControlCaptureSliceSize minus the offset, and the
+ associated bufferControlDownloadSliceSize. If this minimum
+ is less than zero, this object shall have a length of zero."
+ ::= { captureBufferEntry 4 }
+
+captureBufferPacketLength OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Octets"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The actual length (off the wire) of the packet stored
+ in this entry, including FCS octets."
+ ::= { captureBufferEntry 5 }
+
+captureBufferPacketTime OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "Milliseconds"
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The number of milliseconds that had passed since
+ this capture buffer was first turned on when this
+ packet was captured."
+ ::= { captureBufferEntry 6 }
+
+captureBufferPacketStatus OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "A value which indicates the error status of this packet.
+
+ The value of this object is defined in the same way as
+ filterPktStatus. The value is a sum. This sum
+ initially takes the value zero. Then, for each
+ error, E, that has been discovered in this packet,
+ 2 raised to a value representing E is added to the sum.
+
+ The errors defined for a packet captured off of an
+ Ethernet interface are as follows:
+
+ bit # Error
+ 0 Packet is longer than 1518 octets
+ 1 Packet is shorter than 64 octets
+ 2 Packet experienced a CRC or Alignment error
+ 3 First packet in this capture buffer after
+ it was detected that some packets were
+ not processed correctly.
+ 4 Packet's order in buffer is only approximate
+ (May only be set for packets sent from
+ the probe)
+
+ For example, an Ethernet fragment would have a
+ value of 6 (2^1 + 2^2).
+
+ As this MIB is expanded to new media types, this object
+ will have other media-specific errors defined."
+ ::= { captureBufferEntry 7 }
+
+-- The Event Group
+
+-- Implementation of the Event group is optional.
+-- Consult the MODULE-COMPLIANCE macro for the authoritative
+-- conformance information for this MIB.
+--
+-- The Event group controls the generation and notification
+-- of events from this device. Each entry in the eventTable
+-- describes the parameters of the event that can be triggered.
+-- Each event entry is fired by an associated condition located
+-- elsewhere in the MIB. An event entry may also be associated
+-- with a function elsewhere in the MIB that will be executed
+-- when the event is generated. For example, a channel may
+-- be turned on or off by the firing of an event.
+--
+-- Each eventEntry may optionally specify that a log entry
+-- be created on its behalf whenever the event occurs.
+-- Each entry may also specify that notification should
+-- occur by way of SNMP trap messages. In this case, the
+-- community for the trap message is given in the associated
+-- eventCommunity object. The enterprise and specific trap
+-- fields of the trap are determined by the condition that
+-- triggered the event. Two traps are defined: risingAlarm and
+-- fallingAlarm. If the eventTable is triggered by a condition
+-- specified elsewhere, the enterprise and specific trap fields
+-- must be specified for traps generated for that condition.
+
+eventTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of events to be generated."
+ ::= { event 1 }
+
+eventEntry OBJECT-TYPE
+ SYNTAX EventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of parameters that describe an event to be generated
+ when certain conditions are met. As an example, an instance
+ of the eventLastTimeSent object might be named
+ eventLastTimeSent.6"
+ INDEX { eventIndex }
+ ::= { eventTable 1 }
+
+EventEntry ::= SEQUENCE {
+ eventIndex Integer32,
+ eventDescription DisplayString,
+ eventType INTEGER,
+ eventCommunity OCTET STRING,
+ eventLastTimeSent TimeTicks,
+ eventOwner OwnerString,
+ eventStatus EntryStatus
+}
+
+eventIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry in the
+ event table. Each such entry defines one event that
+ is to be generated when the appropriate conditions
+ occur."
+ ::= { eventEntry 1 }
+
+eventDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "A comment describing this event entry."
+ ::= { eventEntry 2 }
+
+eventType OBJECT-TYPE
+ SYNTAX INTEGER {
+ none(1),
+ log(2),
+ snmptrap(3), -- send an SNMP trap
+ logandtrap(4)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The type of notification that the probe will make
+ about this event. In the case of log, an entry is
+ made in the log table for each event. In the case of
+ snmp-trap, an SNMP trap is sent to one or more
+ management stations."
+ ::= { eventEntry 3 }
+
+eventCommunity OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..127))
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "If an SNMP trap is to be sent, it will be sent to
+ the SNMP community specified by this octet string."
+ ::= { eventEntry 4 }
+
+eventLastTimeSent OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of sysUpTime at the time this event
+ entry last generated an event. If this entry has
+ not generated any events, this value will be
+ zero."
+ ::= { eventEntry 5 }
+
+eventOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The entity that configured this entry and is therefore
+ using the resources assigned to it.
+
+ If this object contains a string starting with 'monitor'
+ and has associated entries in the log table, all connected
+ management stations should retrieve those log entries,
+ as they may have significance to all management stations
+ connected to this device"
+ ::= { eventEntry 6 }
+
+eventStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ MAX-ACCESS read-create
+ STATUS current
+ DESCRIPTION
+ "The status of this event entry.
+
+ If this object is not equal to valid(1), all associated
+ log entries shall be deleted by the agent."
+ ::= { eventEntry 7 }
+
+--
+logTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF LogEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A list of events that have been logged."
+ ::= { event 2 }
+
+logEntry OBJECT-TYPE
+ SYNTAX LogEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "A set of data describing an event that has been
+ logged. For example, an instance of the logDescription
+ object might be named logDescription.6.47"
+ INDEX { logEventIndex, logIndex }
+ ::= { logTable 1 }
+
+LogEntry ::= SEQUENCE {
+ logEventIndex Integer32,
+ logIndex Integer32,
+ logTime TimeTicks,
+ logDescription DisplayString
+}
+
+logEventIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The event entry that generated this log
+ entry. The log identified by a particular
+ value of this index is associated with the same
+ eventEntry as identified by the same value
+ of eventIndex."
+ ::= { logEntry 1 }
+
+logIndex OBJECT-TYPE
+ SYNTAX Integer32 (1..2147483647)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An index that uniquely identifies an entry
+ in the log table amongst those generated by the
+ same eventEntries. These indexes are
+ assigned beginning with 1 and increase by one
+ with each new log entry. The association
+ between values of logIndex and logEntries
+ is fixed for the lifetime of each logEntry.
+ The agent may choose to delete the oldest
+ instances of logEntry as required because of
+ lack of memory. It is an implementation-specific
+ matter as to when this deletion may occur."
+ ::= { logEntry 2 }
+
+logTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "The value of sysUpTime when this log entry was created."
+ ::= { logEntry 3 }
+
+logDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "An implementation dependent description of the
+ event that activated this log entry."
+ ::= { logEntry 4 }
+
+-- Remote Network Monitoring Traps
+
+rmonEventsV2 OBJECT-IDENTITY
+ STATUS current
+ DESCRIPTION "Definition point for RMON notifications."
+ ::= { rmon 0 }
+
+risingAlarm NOTIFICATION-TYPE
+ OBJECTS { alarmIndex, alarmVariable, alarmSampleType,
+ alarmValue, alarmRisingThreshold }
+ STATUS current
+ DESCRIPTION
+ "The SNMP trap that is generated when an alarm
+ entry crosses its rising threshold and generates
+ an event that is configured for sending SNMP
+ traps."
+ ::= { rmonEventsV2 1 }
+
+fallingAlarm NOTIFICATION-TYPE
+ OBJECTS { alarmIndex, alarmVariable, alarmSampleType,
+ alarmValue, alarmFallingThreshold }
+ STATUS current
+ DESCRIPTION
+ "The SNMP trap that is generated when an alarm
+ entry crosses its falling threshold and generates
+ an event that is configured for sending SNMP
+ traps."
+ ::= { rmonEventsV2 2 }
+
+-- Conformance information
+
+rmonCompliances OBJECT IDENTIFIER ::= { rmonConformance 9 }
+rmonGroups OBJECT IDENTIFIER ::= { rmonConformance 10 }
+
+-- Compliance Statements
+rmonCompliance MODULE-COMPLIANCE
+ STATUS current
+ DESCRIPTION
+ "The requirements for conformance to the RMON MIB. At least
+ one of the groups in this module must be implemented to
+ conform to the RMON MIB. Implementations of this MIB
+ must also implement the system group of MIB-II [16] and the
+ IF-MIB [17]."
+ MODULE -- this module
+
+ GROUP rmonEtherStatsGroup
+ DESCRIPTION
+ "The RMON Ethernet Statistics Group is optional."
+
+ GROUP rmonHistoryControlGroup
+ DESCRIPTION
+ "The RMON History Control Group is optional."
+
+ GROUP rmonEthernetHistoryGroup
+ DESCRIPTION
+ "The RMON Ethernet History Group is optional."
+
+ GROUP rmonAlarmGroup
+ DESCRIPTION
+ "The RMON Alarm Group is optional."
+
+ GROUP rmonHostGroup
+ DESCRIPTION
+ "The RMON Host Group is mandatory when the
+ rmonHostTopNGroup is implemented."
+
+ GROUP rmonHostTopNGroup
+ DESCRIPTION
+ "The RMON Host Top N Group is optional."
+
+ GROUP rmonMatrixGroup
+ DESCRIPTION
+ "The RMON Matrix Group is optional."
+
+ GROUP rmonFilterGroup
+ DESCRIPTION
+ "The RMON Filter Group is mandatory when the
+ rmonPacketCaptureGroup is implemented."
+
+ GROUP rmonPacketCaptureGroup
+ DESCRIPTION
+ "The RMON Packet Capture Group is optional."
+
+ GROUP rmonEventGroup
+ DESCRIPTION
+ "The RMON Event Group is mandatory when the
+ rmonAlarmGroup is implemented."
+ ::= { rmonCompliances 1 }
+
+ rmonEtherStatsGroup OBJECT-GROUP
+ OBJECTS {
+ etherStatsIndex, etherStatsDataSource,
+ etherStatsDropEvents, etherStatsOctets, etherStatsPkts,
+ etherStatsBroadcastPkts, etherStatsMulticastPkts,
+ etherStatsCRCAlignErrors, etherStatsUndersizePkts,
+ etherStatsOversizePkts, etherStatsFragments,
+ etherStatsJabbers, etherStatsCollisions,
+ etherStatsPkts64Octets, etherStatsPkts65to127Octets,
+ etherStatsPkts128to255Octets,
+ etherStatsPkts256to511Octets,
+ etherStatsPkts512to1023Octets,
+ etherStatsPkts1024to1518Octets,
+ etherStatsOwner, etherStatsStatus
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Ethernet Statistics Group."
+ ::= { rmonGroups 1 }
+
+ rmonHistoryControlGroup OBJECT-GROUP
+ OBJECTS {
+ historyControlIndex, historyControlDataSource,
+ historyControlBucketsRequested,
+ historyControlBucketsGranted, historyControlInterval,
+ historyControlOwner, historyControlStatus
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON History Control Group."
+ ::= { rmonGroups 2 }
+
+ rmonEthernetHistoryGroup OBJECT-GROUP
+ OBJECTS {
+ etherHistoryIndex, etherHistorySampleIndex,
+ etherHistoryIntervalStart, etherHistoryDropEvents,
+ etherHistoryOctets, etherHistoryPkts,
+ etherHistoryBroadcastPkts, etherHistoryMulticastPkts,
+ etherHistoryCRCAlignErrors, etherHistoryUndersizePkts,
+ etherHistoryOversizePkts, etherHistoryFragments,
+ etherHistoryJabbers, etherHistoryCollisions,
+ etherHistoryUtilization
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Ethernet History Group."
+ ::= { rmonGroups 3 }
+
+ rmonAlarmGroup OBJECT-GROUP
+ OBJECTS {
+ alarmIndex, alarmInterval, alarmVariable,
+ alarmSampleType, alarmValue, alarmStartupAlarm,
+ alarmRisingThreshold, alarmFallingThreshold,
+ alarmRisingEventIndex, alarmFallingEventIndex,
+ alarmOwner, alarmStatus
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Alarm Group."
+ ::= { rmonGroups 4 }
+
+ rmonHostGroup OBJECT-GROUP
+ OBJECTS {
+ hostControlIndex, hostControlDataSource,
+ hostControlTableSize, hostControlLastDeleteTime,
+ hostControlOwner, hostControlStatus,
+ hostAddress, hostCreationOrder, hostIndex,
+ hostInPkts, hostOutPkts, hostInOctets,
+ hostOutOctets, hostOutErrors, hostOutBroadcastPkts,
+ hostOutMulticastPkts, hostTimeAddress,
+ hostTimeCreationOrder, hostTimeIndex,
+ hostTimeInPkts, hostTimeOutPkts, hostTimeInOctets,
+ hostTimeOutOctets, hostTimeOutErrors,
+ hostTimeOutBroadcastPkts, hostTimeOutMulticastPkts
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Host Group."
+ ::= { rmonGroups 5 }
+
+ rmonHostTopNGroup OBJECT-GROUP
+ OBJECTS {
+ hostTopNControlIndex, hostTopNHostIndex,
+ hostTopNRateBase, hostTopNTimeRemaining,
+ hostTopNDuration, hostTopNRequestedSize,
+ hostTopNGrantedSize, hostTopNStartTime,
+ hostTopNOwner, hostTopNStatus,
+ hostTopNReport, hostTopNIndex,
+ hostTopNAddress, hostTopNRate
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Host Top 'N' Group."
+ ::= { rmonGroups 6 }
+
+ rmonMatrixGroup OBJECT-GROUP
+ OBJECTS {
+ matrixControlIndex, matrixControlDataSource,
+ matrixControlTableSize, matrixControlLastDeleteTime,
+ matrixControlOwner, matrixControlStatus,
+ matrixSDSourceAddress, matrixSDDestAddress,
+ matrixSDIndex, matrixSDPkts,
+ matrixSDOctets, matrixSDErrors,
+ matrixDSSourceAddress, matrixDSDestAddress,
+ matrixDSIndex, matrixDSPkts,
+ matrixDSOctets, matrixDSErrors
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Matrix Group."
+ ::= { rmonGroups 7 }
+
+ rmonFilterGroup OBJECT-GROUP
+ OBJECTS {
+ filterIndex, filterChannelIndex, filterPktDataOffset,
+ filterPktData, filterPktDataMask,
+ filterPktDataNotMask, filterPktStatus,
+ filterPktStatusMask, filterPktStatusNotMask,
+ filterOwner, filterStatus,
+ channelIndex, channelIfIndex, channelAcceptType,
+ channelDataControl, channelTurnOnEventIndex,
+ channelTurnOffEventIndex, channelEventIndex,
+ channelEventStatus, channelMatches,
+ channelDescription, channelOwner, channelStatus
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Filter Group."
+ ::= { rmonGroups 8 }
+
+ rmonPacketCaptureGroup OBJECT-GROUP
+ OBJECTS {
+ bufferControlIndex, bufferControlChannelIndex,
+ bufferControlFullStatus, bufferControlFullAction,
+ bufferControlCaptureSliceSize,
+ bufferControlDownloadSliceSize,
+ bufferControlDownloadOffset,
+ bufferControlMaxOctetsRequested,
+ bufferControlMaxOctetsGranted,
+ bufferControlCapturedPackets,
+ bufferControlTurnOnTime,
+ bufferControlOwner, bufferControlStatus,
+ captureBufferControlIndex, captureBufferIndex,
+ captureBufferPacketID, captureBufferPacketData,
+ captureBufferPacketLength, captureBufferPacketTime,
+ captureBufferPacketStatus
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Packet Capture Group."
+ ::= { rmonGroups 9 }
+
+ rmonEventGroup OBJECT-GROUP
+ OBJECTS {
+ eventIndex, eventDescription, eventType,
+ eventCommunity, eventLastTimeSent,
+ eventOwner, eventStatus,
+ logEventIndex, logIndex, logTime,
+ logDescription
+ }
+ STATUS current
+ DESCRIPTION
+ "The RMON Event Group."
+ ::= { rmonGroups 10 }
+
+ rmonNotificationGroup NOTIFICATION-GROUP
+ NOTIFICATIONS { risingAlarm, fallingAlarm }
+ STATUS current
+ DESCRIPTION
+ "The RMON Notification Group."
+ ::= { rmonGroups 11 }
+END
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index fb1dcb6c41..36b9764bc8 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = snmp
-SNMP_VSN = 4.21.7
+SNMP_VSN = 4.22
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)"
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml
index ed88b3a1af..e30c6f1ccc 100644
--- a/lib/ssh/doc/src/ssh.xml
+++ b/lib/ssh/doc/src/ssh.xml
@@ -33,9 +33,20 @@
<module>ssh</module>
<modulesummary>Main API of the SSH application</modulesummary>
<description>
- <p>Interface module for the SSH application</p>
+ <p>Interface module for the SSH application. </p>
</description>
+ <section>
+ <title>SSH</title>
+
+ <list type="bulleted">
+ <item>ssh requires the crypto and public_key applications.</item>
+ <item>Supported SSH-version is 2.0 </item>
+ <item>Currently supports only a minimum of mac and encryption algorithms i.e.
+ hmac-sha1, and aes128-cb and 3des-cbc.</item>
+ </list>
+
+ </section>
<section>
<title>COMMON DATA TYPES </title>
diff --git a/lib/ssh/src/Makefile b/lib/ssh/src/Makefile
index 7be97abf66..1734ae4df4 100644
--- a/lib/ssh/src/Makefile
+++ b/lib/ssh/src/Makefile
@@ -45,11 +45,11 @@ MODULES= \
ssh_sup \
sshc_sup \
sshd_sup \
+ ssh_connection_sup \
ssh_channel \
ssh_connection \
ssh_connection_handler \
ssh_connection_manager \
- ssh_connection_controler \
ssh_shell \
ssh_system_sup \
ssh_subsystem_sup \
diff --git a/lib/ssh/src/ssh.app.src b/lib/ssh/src/ssh.app.src
index 7a58dbe54f..316c09eb06 100644
--- a/lib/ssh/src/ssh.app.src
+++ b/lib/ssh/src/ssh.app.src
@@ -15,7 +15,7 @@
ssh_connection,
ssh_connection_handler,
ssh_connection_manager,
- ssh_connection_controler,
+ ssh_connection_sup,
ssh_shell,
sshc_sup,
sshd_sup,
diff --git a/lib/ssh/src/ssh.appup.src b/lib/ssh/src/ssh.appup.src
index 21a0582c06..0542054596 100644
--- a/lib/ssh/src/ssh.appup.src
+++ b/lib/ssh/src/ssh.appup.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,26 +18,12 @@
%%
{"%VSN%",
- [
- {"2.0.8", [{load_module, ssh_sftpd_file_api, soft_purge, soft_purge, []},
- {load_module, ssh_channel, soft_purge, soft_purge, []}]},
- {"2.0.7", [{load_module, ssh_sftp, soft_purge, soft_purge, []}]},
- {"2.0.6", [{load_module, ssh_userreg, soft_purge, soft_purge, []},
- {load_module, ssh_sftp, soft_purge, soft_purge, []}]},
- {"2.0.5", [{load_module, ssh_userreg, soft_purge, soft_purge, []},
- {load_module, ssh_sftp, soft_purge, soft_purge, []},
- {load_module, ssh_connection_handler, soft_purge, soft_purge, [ssh_userreg]}]}
+ [
+ {<<"2\\.*">>, [{restart_application, ssh}]},
+ {<<"1\\.*">>, [{restart_application, ssh}]}
],
[
- {"2.0.8", [{load_module, ssh_sftpd_file_api, soft_purge, soft_purge, []},
- {load_module, ssh_channel, soft_purge, soft_purge, []}]},
- {"2.0.7", [{load_module, ssh_sftp, soft_purge, soft_purge, []}]},
- {"2.0.6", [{load_module, ssh_userreg, soft_purge, soft_purge, []},
- {load_module, ssh_sftp, soft_purge, soft_purge, []}]},
- {"2.0.5", [{load_module, ssh_userreg, soft_purge, soft_purge, []},
- {load_module, ssh_sftp, soft_purge, soft_purge, []},
- {load_module, ssh_connection_handler, soft_purge, soft_purge, [ssh_userreg]}]}
+ {<<"2\\.*">>, [{restart_application, ssh}]},
+ {<<"1\\.*">>, [{restart_application, ssh}]}
]
}.
-
-
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 5751f2eaa0..39c7fe329e 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -72,17 +72,25 @@ stop() ->
connect(Host, Port, Options) ->
connect(Host, Port, Options, infinity).
connect(Host, Port, Options, Timeout) ->
- {SocketOpts, Opts} = handle_options(Options),
- DisableIpv6 = proplists:get_value(ip_v6_disabled, Opts, false),
- Inet = inetopt(DisableIpv6),
+ case handle_options(Options) of
+ {error, _Reason} = Error ->
+ Error;
+ {SocketOptions, SshOptions} ->
+ DisableIpv6 = proplists:get_value(ip_v6_disabled, SshOptions, false),
+ Inet = inetopt(DisableIpv6),
+ do_connect(Host, Port, [Inet | SocketOptions],
+ [{host, Host} | SshOptions], Timeout, DisableIpv6)
+ end.
+
+do_connect(Host, Port, SocketOptions, SshOptions, Timeout, DisableIpv6) ->
try sshc_sup:start_child([[{address, Host}, {port, Port},
- {role, client},
- {channel_pid, self()},
- {socket_opts, [Inet | SocketOpts]},
- {ssh_opts, [{host, Host}| Opts]}]]) of
+ {role, client},
+ {channel_pid, self()},
+ {socket_opts, SocketOptions},
+ {ssh_opts, SshOptions}]]) of
{ok, ConnectionSup} ->
{ok, Manager} =
- ssh_connection_controler:connection_manager(ConnectionSup),
+ ssh_connection_sup:connection_manager(ConnectionSup),
MRef = erlang:monitor(process, Manager),
receive
{Manager, is_connected} ->
@@ -95,7 +103,8 @@ connect(Host, Port, Options, Timeout) ->
%% match the Manager in this case
{_, not_connected, {error, econnrefused}} when DisableIpv6 == false ->
do_demonitor(MRef, Manager),
- connect(Host, Port, [{ip_v6_disabled, true} | Options], Timeout);
+ do_connect(Host, Port, proplists:delete(inet6, SocketOptions),
+ SshOptions, Timeout, true);
{_, not_connected, {error, Reason}} ->
do_demonitor(MRef, Manager),
{error, Reason};
@@ -192,7 +201,7 @@ daemon(HostAddr, Port, Options0) ->
{HostAddr, inet6,
[{ip, HostAddr} | Options1]}
end,
- start_daemon(Host, Port, [{role, server} | Options], Inet).
+ start_daemon(Host, Port, Options, Inet).
%%--------------------------------------------------------------------
%% Function: stop_listener(SysRef) -> ok
@@ -258,7 +267,14 @@ shell(Host, Port, Options) ->
%%% Internal functions
%%--------------------------------------------------------------------
start_daemon(Host, Port, Options, Inet) ->
- {SocketOpts, Opts} = handle_options(Options),
+ case handle_options(Options) of
+ {error, _Reason} = Error ->
+ Error;
+ {SocketOptions, SshOptions}->
+ do_start_daemon(Host, Port,[{role, server} |SshOptions] , [Inet | SocketOptions])
+ end.
+
+do_start_daemon(Host, Port, Options, SocketOptions) ->
case ssh_system_sup:system_supervisor(Host, Port) of
undefined ->
%% TODO: It would proably make more sense to call the
@@ -266,8 +282,8 @@ start_daemon(Host, Port, Options, Inet) ->
%% monent. The name is a legacy name!
try sshd_sup:start_child([{address, Host},
{port, Port}, {role, server},
- {socket_opts, [Inet | SocketOpts]},
- {ssh_opts, Opts}]) of
+ {socket_opts, SocketOptions},
+ {ssh_opts, Options}]) of
{ok, SysSup} ->
{ok, SysSup};
{error, {already_started, _}} ->
@@ -286,68 +302,148 @@ start_daemon(Host, Port, Options, Inet) ->
end.
handle_options(Opts) ->
- handle_options(proplists:unfold(Opts), [], []).
-handle_options([], SockOpts, Opts) ->
- {SockOpts, Opts};
-%% TODO: Could do some type checks here on plain ssh-opts
-handle_options([{system_dir, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{user_dir, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{user_dir_fun, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{silently_accept_hosts, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{user_interaction, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{public_key_alg, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{connect_timeout, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{user, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{dsa_pass_phrase, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{rsa_pass_phrase, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{password, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{user_passwords, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{pwdfun, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{user_auth, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{key_cb, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{role, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{channel, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{compression, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{allow_user_interaction, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{infofun, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{connectfun, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{disconnectfun , _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{failfun, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{ip_v6_disabled, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]);
-handle_options([{ip, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, [Opt |SockOpts], Opts);
-handle_options([{ifaddr, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, [Opt |SockOpts], Opts);
-handle_options([{fd, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, [Opt | SockOpts], Opts);
-handle_options([{nodelay, _} = Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, [Opt | SockOpts], Opts);
-handle_options([Opt | Rest], SockOpts, Opts) ->
- handle_options(Rest, SockOpts, [Opt | Opts]).
+ try handle_option(proplists:unfold(Opts), [], []) of
+ {_,_} = Options ->
+ Options
+ catch
+ throw:Error ->
+ Error
+ end.
+
+handle_option([], SocketOptions, SshOptions) ->
+ {SocketOptions, SshOptions};
+handle_option([{system_dir, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{user_dir, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{user_dir_fun, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{silently_accept_hosts, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{user_interaction, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{public_key_alg, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{connect_timeout, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{user, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{dsa_pass_phrase, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{rsa_pass_phrase, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{password, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{user_passwords, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{pwdfun, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{user_auth, _} = Opt | Rest],SocketOptions, SshOptions ) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{key_cb, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{role, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{compression, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{allow_user_interaction, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{infofun, _} = Opt | Rest],SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{connectfun, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{disconnectfun, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{failfun, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{ip_v6_disabled, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{transport, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{subsystems, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{ssh_cli, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{shell, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, [handle_inet_option(Opt) | SocketOptions], SshOptions).
+
+handle_ssh_option({system_dir, Value} = Opt) when is_list(Value) ->
+ Opt;
+handle_ssh_option({user_dir, Value} = Opt) when is_list(Value) ->
+ Opt;
+handle_ssh_option({user_dir_fun, Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option({silently_accept_hosts, Value} = Opt) when Value == true; Value == false ->
+ Opt;
+handle_ssh_option({user_interaction, Value} = Opt) when Value == true; Value == false ->
+ Opt;
+handle_ssh_option({public_key_alg, Value} = Opt) when Value == ssh_rsa; Value == ssh_dsa ->
+ Opt;
+handle_ssh_option({connect_timeout, Value} = Opt) when is_integer(Value); Value == infinity ->
+ Opt;
+handle_ssh_option({user, Value} = Opt) when is_list(Value) ->
+ Opt;
+handle_ssh_option({dsa_pass_phrase, Value} = Opt) when is_list(Value) ->
+ Opt;
+handle_ssh_option({rsa_pass_phrase, Value} = Opt) when is_list(Value) ->
+ Opt;
+handle_ssh_option({password, Value} = Opt) when is_list(Value) ->
+ Opt;
+handle_ssh_option({user_passwords, Value} = Opt) when is_list(Value)->
+ Opt;
+handle_ssh_option({pwdfun, Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option({user_auth, Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option({key_cb, Value} = Opt) when is_atom(Value) ->
+ Opt;
+handle_ssh_option({compression, Value} = Opt) when is_atom(Value) ->
+ Opt;
+handle_ssh_option({allow_user_interaction, Value} = Opt) when Value == true;
+ Value == false ->
+ Opt;
+handle_ssh_option({infofun, Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option({connectfun, Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option({disconnectfun , Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option({failfun, Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option({ip_v6_disabled, Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option({transport, {Protocol, Cb, ClosTag}} = Opt) when is_atom(Protocol),
+ is_atom(Cb),
+ is_atom(ClosTag) ->
+ Opt;
+handle_ssh_option({subsystems, Value} = Opt) when is_list(Value) ->
+ Opt;
+handle_ssh_option({ssh_cli, {Cb, _}}= Opt) when is_atom(Cb) ->
+ Opt;
+handle_ssh_option({shell, {Module, Function, _}} = Opt) when is_atom(Module),
+ is_atom(Function) ->
+ Opt;
+handle_ssh_option({shell, Value} = Opt) when is_function(Value) ->
+ Opt;
+handle_ssh_option(Opt) ->
+ throw({error, {eoptions, Opt}}).
+
+handle_inet_option({active, _} = Opt) ->
+ throw({error, {{eoptions, Opt}, "Ssh has built in flow control, "
+ "and activ is handled internaly user is not allowd"
+ "to specify this option"}});
+handle_inet_option({inet, _} = Opt) ->
+ throw({error, {{eoptions, Opt},"Is set internaly use ip_v6_disabled to"
+ " enforce iv4 in the server, client will fallback to ipv4 if"
+ " it can not use ipv6"}});
+handle_inet_option({reuseaddr, _} = Opt) ->
+ throw({error, {{eoptions, Opt},"Is set internaly user is not allowd"
+ "to specify this option"}});
+%% Option verified by inet
+handle_inet_option(Opt) ->
+ Opt.
%% Has IPv6 been disabled?
inetopt(true) ->
diff --git a/lib/ssh/src/ssh_acceptor.erl b/lib/ssh/src/ssh_acceptor.erl
index 59fbd24cf5..d023656c32 100644
--- a/lib/ssh/src/ssh_acceptor.erl
+++ b/lib/ssh/src/ssh_acceptor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -86,11 +86,11 @@ handle_connection(Callback, Address, Port, Options, Socket) ->
{ok, SubSysSup} = ssh_system_sup:start_subsystem(SystemSup, Options),
ConnectionSup = ssh_system_sup:connection_supervisor(SystemSup),
{ok, Pid} =
- ssh_connection_controler:start_manager_child(ConnectionSup,
- [server, Socket, Options, SubSysSup]),
+ ssh_connection_sup:start_manager_child(ConnectionSup,
+ [server, Socket, Options]),
Callback:controlling_process(Socket, Pid),
SshOpts = proplists:get_value(ssh_opts, Options),
- Pid ! {start_connection, server, [Address, Port, Socket, SshOpts]}.
+ Pid ! {start_connection, server, [Address, Port, Socket, SshOpts, SubSysSup]}.
handle_error(timeout) ->
ok;
diff --git a/lib/ssh/src/ssh_auth.erl b/lib/ssh/src/ssh_auth.erl
index 62d684f4dc..1a4517c689 100644
--- a/lib/ssh/src/ssh_auth.erl
+++ b/lib/ssh/src/ssh_auth.erl
@@ -340,7 +340,7 @@ verify_sig(SessionId, User, Service, Alg, KeyBlob, SigWLen, Opts) ->
?UINT32(SigLen), Sig:SigLen/binary>> = AlgSig,
ssh_transport:verify(PlainText, sha, Sig, Key);
false ->
- {error, key_unacceptable}
+ false
end.
build_sig_data(SessionId, User, Service, KeyBlob, Alg) ->
diff --git a/lib/ssh/src/ssh_connect.hrl b/lib/ssh/src/ssh_connect.hrl
index e06c9ea211..932b0642f1 100644
--- a/lib/ssh/src/ssh_connect.hrl
+++ b/lib/ssh/src/ssh_connect.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -253,7 +253,6 @@
-record(connection, {
requests = [], %% [{ChannelId, Pid}...] awaiting reply on request,
channel_cache,
- channel_pids = [],
port_bindings,
channel_id_seed,
cli_spec,
@@ -261,5 +260,6 @@
port,
options,
exec,
- sub_system_supervisor
+ sub_system_supervisor,
+ connection_supervisor
}).
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl
index cb02d7b824..46f0c7e688 100644
--- a/lib/ssh/src/ssh_connection.erl
+++ b/lib/ssh/src/ssh_connection.erl
@@ -744,8 +744,8 @@ handle_msg(#ssh_msg_global_request{name = _Type,
%%% This transport message will also be handled at the connection level
handle_msg(#ssh_msg_disconnect{code = Code,
- description = Description,
- language = _Lang },
+ description = Description,
+ language = _Lang },
#connection{channel_cache = Cache} = Connection0, _, _) ->
{Connection, Replies} =
ssh_channel:cache_foldl(fun(Channel, {Connection1, Acc}) ->
@@ -779,7 +779,7 @@ handle_cli_msg(#connection{channel_cache = Cache} = Connection0,
handle_cli_msg(Connection0, _, Channel, Reply0) ->
{Reply, Connection} = reply_msg(Channel, Connection0, Reply0),
{{replies, [Reply]}, Connection}.
-
+
channel_eof_msg(ChannelId) ->
#ssh_msg_channel_eof{recipient_channel = ChannelId}.
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 9079089d5d..5b3d1b8a1b 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -41,7 +41,7 @@
-export([hello/2, kexinit/2, key_exchange/2, new_keys/2,
userauth/2, connected/2]).
--export([init/1, state_name/3, handle_event/3,
+-export([init/1, handle_event/3,
handle_sync_event/4, handle_info/3, terminate/3, code_change/4]).
%% spawn export
@@ -106,22 +106,28 @@ peer_address(ConnectionHandler) ->
%% initialize.
%%--------------------------------------------------------------------
init([Role, Manager, Socket, SshOpts]) ->
+ process_flag(trap_exit, true),
{NumVsn, StrVsn} = ssh_transport:versions(Role, SshOpts),
ssh_bits:install_messages(ssh_transport:transport_messages(NumVsn)),
{Protocol, Callback, CloseTag} =
proplists:get_value(transport, SshOpts, {tcp, gen_tcp, tcp_closed}),
- Ssh = init_ssh(Role, NumVsn, StrVsn, SshOpts, Socket),
- {ok, hello, #state{ssh_params =
- Ssh#ssh{send_sequence = 0, recv_sequence = 0},
- socket = Socket,
- decoded_data_buffer = <<>>,
- encoded_data_buffer = <<>>,
- transport_protocol = Protocol,
- transport_cb = Callback,
- transport_close_tag = CloseTag,
- manager = Manager,
- opts = SshOpts
- }}.
+ try init_ssh(Role, NumVsn, StrVsn, SshOpts, Socket) of
+ Ssh ->
+ {ok, hello, #state{ssh_params =
+ Ssh#ssh{send_sequence = 0, recv_sequence = 0},
+ socket = Socket,
+ decoded_data_buffer = <<>>,
+ encoded_data_buffer = <<>>,
+ transport_protocol = Protocol,
+ transport_cb = Callback,
+ transport_close_tag = CloseTag,
+ manager = Manager,
+ opts = SshOpts
+ }}
+ catch
+ exit:Reason ->
+ {stop, {shutdown, Reason}}
+ end.
%%--------------------------------------------------------------------
%% Function:
%% state_name(Event, State) -> {next_state, NextStateName, NextState}|
@@ -179,7 +185,12 @@ kexinit({#ssh_msg_kexinit{} = Kex, Payload},
next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = Desc,
+ language = "en"}, State)
end.
key_exchange(#ssh_msg_kexdh_init{} = Msg,
@@ -192,7 +203,12 @@ key_exchange(#ssh_msg_kexdh_init{} = Msg,
{next_state, new_keys, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = Desc,
+ language = "en"}, State)
end;
key_exchange(#ssh_msg_kexdh_reply{} = Msg,
@@ -203,7 +219,12 @@ key_exchange(#ssh_msg_kexdh_reply{} = Msg,
{next_state, new_keys, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = Desc,
+ language = "en"}, State)
end;
key_exchange(#ssh_msg_kex_dh_gex_group{} = Msg,
@@ -216,7 +237,12 @@ key_exchange(#ssh_msg_kex_dh_gex_group{} = Msg,
{next_state, new_keys, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = Desc,
+ language = "en"}, State)
end;
key_exchange(#ssh_msg_kex_dh_gex_request{} = Msg,
@@ -227,7 +253,12 @@ key_exchange(#ssh_msg_kex_dh_gex_request{} = Msg,
{next_state, new_keys, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = Desc,
+ language = "en"}, State)
end;
key_exchange(#ssh_msg_kex_dh_gex_reply{} = Msg,
#state{ssh_params = #ssh{role = client} = Ssh0} = State) ->
@@ -237,7 +268,12 @@ key_exchange(#ssh_msg_kex_dh_gex_reply{} = Msg,
{next_state, new_keys, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = Desc,
+ language = "en"}, State)
end.
new_keys(#ssh_msg_newkeys{} = Msg, #state{ssh_params = Ssh0} = State0) ->
@@ -248,8 +284,12 @@ new_keys(#ssh_msg_newkeys{} = Msg, #state{ssh_params = Ssh0} = State0) ->
{next_state, NextStateName, next_packet(State)}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State0),
- {stop, normal, State0}
+ handle_disconnect(DisconnectMsg, State0);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = Desc,
+ language = "en"}, State0)
end.
userauth(#ssh_msg_service_request{name = "ssh-userauth"} = Msg,
@@ -262,7 +302,12 @@ userauth(#ssh_msg_service_request{name = "ssh-userauth"} = Msg,
{next_state, userauth, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = Desc,
+ language = "en"}, State)
end;
userauth(#ssh_msg_service_accept{name = "ssh-userauth"},
@@ -284,7 +329,12 @@ userauth(#ssh_msg_userauth_request{service = "ssh-connection",
{next_state, userauth, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = Desc,
+ language = "en"}, State)
end;
userauth(#ssh_msg_userauth_request{service = "ssh-connection",
@@ -307,7 +357,12 @@ userauth(#ssh_msg_userauth_request{service = "ssh-connection",
{next_state, userauth, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = Desc,
+ language = "en"}, State)
end;
userauth(#ssh_msg_userauth_info_request{} = Msg,
@@ -319,7 +374,12 @@ userauth(#ssh_msg_userauth_info_request{} = Msg,
{next_state, userauth, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = Desc,
+ language = "en"}, State)
end;
userauth(#ssh_msg_userauth_info_response{} = Msg,
@@ -330,7 +390,12 @@ userauth(#ssh_msg_userauth_info_response{} = Msg,
{next_state, userauth, next_packet(State#state{ssh_params = Ssh})}
catch
#ssh_msg_disconnect{} = DisconnectMsg ->
- handle_disconnect(DisconnectMsg, State)
+ handle_disconnect(DisconnectMsg, State);
+ _:Error ->
+ Desc = log_error(Error),
+ handle_disconnect(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = Desc,
+ language = "en"}, State)
end;
userauth(#ssh_msg_userauth_success{}, #state{ssh_params = #ssh{role = client},
@@ -361,24 +426,11 @@ userauth(#ssh_msg_userauth_failure{authentications = Methodes},
%% The prefered authentication method failed try next method
userauth(#ssh_msg_userauth_failure{},
- #state{ssh_params = #ssh{role = client} = Ssh0,
- manager = Pid} = State) ->
+ #state{ssh_params = #ssh{role = client} = Ssh0} = State) ->
case ssh_auth:userauth_request_msg(Ssh0) of
- {disconnect, Event, {Msg, _}} ->
- try
- send_msg(Msg, State),
- ssh_connection_manager:event(Pid, Event)
- catch
- exit:{noproc, _Reason} ->
- Report = io_lib:format("Connection Manager terminated: ~p~n",
- [Pid]),
- error_logger:info_report(Report);
- exit:Exit ->
- Report = io_lib:format("Connection Manager returned:~n~p~n~p~n",
- [Msg, Exit]),
- error_logger:info_report(Report)
- end,
- {stop, normal, State};
+ {disconnect, DisconnectMsg,{Msg, Ssh}} ->
+ send_msg(Msg, State),
+ handle_disconnect(DisconnectMsg, State#state{ssh_params = Ssh});
{Msg, Ssh} ->
send_msg(Msg, State),
{next_state, userauth, next_packet(State#state{ssh_params = Ssh})}
@@ -398,25 +450,6 @@ connected({#ssh_msg_kexinit{}, _Payload} = Event, State) ->
kexinit(Event, State#state{renegotiate = true}).
%%--------------------------------------------------------------------
-%% Function:
-%% state_name(Event, From, State) -> {next_state, NextStateName, NextState} |
-%% {next_state, NextStateName,
-%% NextState, Timeout} |
-%% {reply, Reply, NextStateName, NextState}|
-%% {reply, Reply, NextStateName,
-%% NextState, Timeout} |
-%% {stop, Reason, NewState}|
-%% {stop, Reason, Reply, NewState}
-%% Description: There should be one instance of this function for each
-%% possible state name. Whenever a gen_fsm receives an event sent using
-%% gen_fsm:sync_send_event/2,3, the instance of this function with the same
-%% name as the current state name StateName is called to handle the event.
-%%--------------------------------------------------------------------
-state_name(_Event, _From, State) ->
- Reply = ok,
- {reply, Reply, state_name, State}.
-
-%%--------------------------------------------------------------------
%% Function:
%% handle_event(Event, StateName, State) -> {next_state, NextStateName,
%% NextState} |
@@ -566,10 +599,18 @@ handle_info({Protocol, Socket, Data}, Statename,
Statename, State);
handle_info({CloseTag, _Socket}, _StateName,
- #state{transport_close_tag = CloseTag, %%manager = Pid,
+ #state{transport_close_tag = CloseTag,
ssh_params = #ssh{role = _Role, opts = _Opts}} = State) ->
- %%ok = ssh_connection_manager:delivered(Pid),
- {stop, normal, State};
+ DisconnectMsg =
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_CONNECTION_LOST,
+ description = "Connection Lost",
+ language = "en"},
+ {stop, {shutdown, DisconnectMsg}, State};
+
+%%% So that terminate will be run when supervisor is shutdown
+handle_info({'EXIT', _Sup, Reason}, _StateName, State) ->
+ {stop, Reason, State};
+
handle_info(UnexpectedMessage, StateName, #state{ssh_params = SshParams} = State) ->
Msg = lists:flatten(io_lib:format(
"Unexpected message '~p' received in state '~p'\n"
@@ -581,7 +622,6 @@ handle_info(UnexpectedMessage, StateName, #state{ssh_params = SshParams} = State
error_logger:info_report(Msg),
{next_state, StateName, State}.
-
%%--------------------------------------------------------------------
%% Function: terminate(Reason, StateName, State) -> void()
%% Description:This function is called by a gen_fsm when it is about
@@ -596,22 +636,31 @@ terminate(normal, _, #state{transport_cb = Transport,
(catch Transport:close(Socket)),
ok;
-terminate(shutdown, _, State) ->
+%% Terminated as manager terminated
+terminate(shutdown, StateName, #state{ssh_params = Ssh0} = State) ->
DisconnectMsg =
#ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
- description = "Application disconnect",
+ description = "Application shutdown",
language = "en"},
- handle_disconnect(DisconnectMsg, State);
+ {SshPacket, Ssh} = ssh_transport:ssh_packet(DisconnectMsg, Ssh0),
+ send_msg(SshPacket, State),
+ terminate(normal, StateName, State#state{ssh_params = Ssh});
-terminate(Reason, _, State) ->
- Desc = io_lib:format("Erlang ssh connection handler failed with reason: "
- "~p , please report this to [email protected] \n",
- [Reason]),
+terminate({shutdown, #ssh_msg_disconnect{} = Msg}, StateName, #state{ssh_params = Ssh0, manager = Pid} = State) ->
+ {SshPacket, Ssh} = ssh_transport:ssh_packet(Msg, Ssh0),
+ send_msg(SshPacket, State),
+ ssh_connection_manager:event(Pid, Msg),
+ terminate(normal, StateName, State#state{ssh_params = Ssh});
+terminate(Reason, StateName, #state{ssh_params = Ssh0, manager = Pid} = State) ->
+ log_error(Reason),
DisconnectMsg =
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_CONNECTION_LOST,
- description = Desc,
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
+ description = "Internal error",
language = "en"},
- handle_disconnect(DisconnectMsg, State).
+ {SshPacket, Ssh} = ssh_transport:ssh_packet(DisconnectMsg, Ssh0),
+ ssh_connection_manager:event(Pid, DisconnectMsg),
+ send_msg(SshPacket, State),
+ terminate(normal, StateName, State#state{ssh_params = Ssh}).
%%--------------------------------------------------------------------
%% Function:
@@ -757,11 +806,8 @@ generate_event(<<?BYTE(Byte), _/binary>> = Msg, StateName,
next_packet(State),
{next_state, StateName, State}
catch
- exit:{noproc, _Reason} ->
- Report = io_lib:format("~p Connection Handler terminated: ~p~n",
- [self(), Pid]),
- error_logger:info_report(Report),
- {stop, normal, State0}
+ exit:{noproc, Reason} ->
+ {stop, {shutdown, Reason}, State0}
end;
generate_event(Msg, StateName, State0, EncData) ->
Event = ssh_bits:decode(Msg),
@@ -786,13 +832,18 @@ generate_event_new_state(#state{ssh_params =
next_packet(#state{decoded_data_buffer = <<>>,
encoded_data_buffer = Buff,
+ ssh_params = #ssh{decrypt_block_size = BlockSize},
socket = Socket,
- transport_protocol = Protocol} =
- State) when Buff =/= <<>> andalso size(Buff) >= 8 ->
- %% More data from the next packet has been received
- %% Fake a socket-recive message so that the data will be processed
- inet:setopts(Socket, [{active, once}]),
- self() ! {Protocol, Socket, <<>>},
+ transport_protocol = Protocol} = State) when Buff =/= <<>> ->
+ case size(Buff) >= erlang:max(8, BlockSize) of
+ true ->
+ %% Enough data from the next packet has been received to
+ %% decode the length indicator, fake a socket-recive
+ %% message so that the data will be processed
+ self() ! {Protocol, Socket, <<>>};
+ false ->
+ inet:setopts(Socket, [{active, once}])
+ end,
State;
next_packet(#state{socket = Socket} = State) ->
@@ -853,24 +904,8 @@ handle_ssh_packet(Length, StateName, #state{decoded_data_buffer = DecData0,
handle_disconnect(DisconnectMsg, State0)
end.
-handle_disconnect(#ssh_msg_disconnect{} = Msg,
- #state{ssh_params = Ssh0, manager = Pid} = State) ->
- {SshPacket, Ssh} = ssh_transport:ssh_packet(Msg, Ssh0),
- try
- send_msg(SshPacket, State),
- ssh_connection_manager:event(Pid, Msg)
- catch
- exit:{noproc, _Reason} ->
- Report = io_lib:format("~p Connection Manager terminated: ~p~n",
- [self(), Pid]),
- error_logger:info_report(Report);
- exit:Exit ->
- Report = io_lib:format("Connection Manager returned:~n~p~n~p~n",
- [Msg, Exit]),
- error_logger:info_report(Report)
- end,
- (catch ssh_userreg:delete_user(Pid)),
- {stop, normal, State#state{ssh_params = Ssh}}.
+handle_disconnect(#ssh_msg_disconnect{} = Msg, State) ->
+ {stop, {shutdown, Msg}, State}.
counterpart_versions(NumVsn, StrVsn, #ssh{role = server} = Ssh) ->
Ssh#ssh{c_vsn = NumVsn , c_version = StrVsn};
@@ -928,3 +963,11 @@ ssh_info([peer | Rest], #ssh{peer = Peer} = SshParams, Acc) ->
ssh_info([ _ | Rest], SshParams, Acc) ->
ssh_info(Rest, SshParams, Acc).
+
+log_error(Reason) ->
+ Report = io_lib:format("Erlang ssh connection handler failed with reason: "
+ "~p ~n, Stacktace: ~p ~n"
+ "please report this to [email protected] \n",
+ [Reason, erlang:get_stacktrace()]),
+ error_logger:error_report(Report),
+ "Internal error".
diff --git a/lib/ssh/src/ssh_connection_manager.erl b/lib/ssh/src/ssh_connection_manager.erl
index f729276e65..406a042d72 100644
--- a/lib/ssh/src/ssh_connection_manager.erl
+++ b/lib/ssh/src/ssh_connection_manager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -182,17 +182,15 @@ send_eof(ConnectionManager, ChannelId) ->
%% {stop, Reason}
%% Description: Initiates the server
%%--------------------------------------------------------------------
-init([server, _Socket, Opts, SubSysSup]) ->
+init([server, _Socket, Opts]) ->
process_flag(trap_exit, true),
ssh_bits:install_messages(ssh_connection:messages()),
- Cache = ssh_channel:cache_create(),
+ Cache = ssh_channel:cache_create(),
{ok, #state{role = server,
connection_state = #connection{channel_cache = Cache,
channel_id_seed = 0,
port_bindings = [],
- requests = [],
- channel_pids = [],
- sub_system_supervisor = SubSysSup},
+ requests = []},
opts = Opts,
connected = false}};
@@ -207,15 +205,14 @@ init([client, Opts]) ->
Options = proplists:get_value(ssh_opts, Opts),
ChannelPid = proplists:get_value(channel_pid, Opts),
self() !
- {start_connection, client, [Parent, Address, Port,
- ChannelPid, SocketOpts, Options]},
+ {start_connection, client, [Parent, Address, Port, SocketOpts, Options]},
{ok, #state{role = client,
client = ChannelPid,
connection_state = #connection{channel_cache = Cache,
channel_id_seed = 0,
port_bindings = [],
- requests = [],
- channel_pids = []},
+ connection_supervisor = Parent,
+ requests = []},
opts = Opts,
connected = false}}.
@@ -269,29 +266,25 @@ handle_call({ssh_msg, Pid, Msg}, From,
when Role == client andalso (not IsConnected) ->
lists:foreach(fun send_msg/1, Replies),
ClientPid ! {self(), not_connected, Reason},
- {stop, normal, State#state{connection = Connection}};
+ {stop, {shutdown, normal}, State#state{connection = Connection}};
{disconnect, Reason, {{replies, Replies}, Connection}} ->
lists:foreach(fun send_msg/1, Replies),
SSHOpts = proplists:get_value(ssh_opts, Opts),
disconnect_fun(Reason, SSHOpts),
- {stop, normal, State#state{connection_state = Connection}}
+ {stop, {shutdown, normal}, State#state{connection_state = Connection}}
catch
- exit:{noproc, Reason} ->
- Report = io_lib:format("Connection probably terminated:~n~p~n~p~n~p~n",
- [ConnectionMsg, Reason, erlang:get_stacktrace()]),
- error_logger:info_report(Report),
- {noreply, State};
- error:Error ->
- Report = io_lib:format("Connection message returned:~n~p~n~p~n~p~n",
- [ConnectionMsg, Error, erlang:get_stacktrace()]),
- error_logger:info_report(Report),
- {noreply, State};
- exit:Exit ->
- Report = io_lib:format("Connection message returned:~n~p~n~p~n~p~n",
- [ConnectionMsg, Exit, erlang:get_stacktrace()]),
- error_logger:info_report(Report),
- {noreply, State}
- end;
+ _:Reason ->
+ {disconnect, Reason, {{replies, Replies}, Connection}} =
+ ssh_connection:handle_msg(
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
+ description = "Internal error",
+ language = "en"}, Connection0, undefined,
+ Role),
+ lists:foreach(fun send_msg/1, Replies),
+ SSHOpts = proplists:get_value(ssh_opts, Opts),
+ disconnect_fun(Reason, SSHOpts),
+ {stop, {shutdown, Reason}, State#state{connection_state = Connection}}
+ end;
handle_call({global_request, Pid, _, _, _} = Request, From,
#state{connection_state =
@@ -341,7 +334,8 @@ handle_call({info, ChannelPid}, _From,
handle_call({open, ChannelPid, Type, InitialWindowSize, MaxPacketSize, Data},
From, #state{connection = Pid,
connection_state =
- #connection{channel_cache = Cache}} = State0) ->
+ #connection{channel_cache = Cache}} = State0) ->
+ erlang:monitor(process, ChannelPid),
{ChannelId, State1} = new_channel_id(State0),
Msg = ssh_connection:channel_open_msg(Type, ChannelId,
InitialWindowSize,
@@ -404,18 +398,18 @@ handle_call({close, ChannelId}, _,
{reply, ok, State}
end;
-handle_call(stop, _, #state{role = _client,
- client = _ChannelPid,
- connection = Pid} = State) ->
- DisconnectMsg =
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
- description = "Application disconnect",
- language = "en"},
- (catch gen_fsm:send_all_state_event(Pid, DisconnectMsg)),
-% ssh_connection_handler:send(Pid, DisconnectMsg),
- {stop, normal, ok, State};
-handle_call(stop, _, State) ->
- {stop, normal, ok, State};
+handle_call(stop, _, #state{connection_state = Connection0,
+ role = Role,
+ opts = Opts} = State) ->
+ {disconnect, Reason, {{replies, Replies}, Connection}} =
+ ssh_connection:handle_msg(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
+ description = "User closed down connection",
+ language = "en"}, Connection0, undefined,
+ Role),
+ lists:foreach(fun send_msg/1, Replies),
+ SSHOpts = proplists:get_value(ssh_opts, Opts),
+ disconnect_fun(Reason, SSHOpts),
+ {stop, normal, ok, State#state{connection_state = Connection}};
%% API violation make it the violaters problem
%% by ignoring it. The violating process will get
@@ -493,31 +487,33 @@ handle_cast({failure, ChannelId}, #state{connection = Pid} = State) ->
%% Description: Handling all non call/cast messages
%%--------------------------------------------------------------------
handle_info({start_connection, server,
- [Address, Port, Socket, Options]},
+ [Address, Port, Socket, Options, SubSysSup]},
#state{connection_state = CState} = State) ->
{ok, Connection} = ssh_transport:accept(Address, Port, Socket, Options),
Shell = proplists:get_value(shell, Options),
Exec = proplists:get_value(exec, Options),
CliSpec = proplists:get_value(ssh_cli, Options, {ssh_cli, [Shell]}),
+ ssh_connection_handler:send_event(Connection, socket_control),
{noreply, State#state{connection = Connection,
connection_state =
CState#connection{address = Address,
port = Port,
cli_spec = CliSpec,
options = Options,
- exec = Exec}}};
+ exec = Exec,
+ sub_system_supervisor = SubSysSup
+ }}};
handle_info({start_connection, client,
- [Parent, Address, Port, ChannelPid, SocketOpts, Options]},
- State) ->
+ [Parent, Address, Port, SocketOpts, Options]},
+ #state{client = Pid} = State) ->
case (catch ssh_transport:connect(Parent, Address,
Port, SocketOpts, Options)) of
{ok, Connection} ->
- erlang:monitor(process, ChannelPid),
{noreply, State#state{connection = Connection}};
Reason ->
- ChannelPid ! {self(), not_connected, Reason},
- {stop, normal, State}
+ Pid ! {self(), not_connected, Reason},
+ {stop, {shutdown, normal}, State}
end;
handle_info({ssh_cm, _Sender, Msg}, State0) ->
@@ -537,20 +533,13 @@ handle_info(ssh_connected, #state{role = client, client = Pid}
handle_info(ssh_connected, #state{role = server} = State) ->
{noreply, State#state{connected = true}};
-handle_info({'DOWN', _Ref, process, ChannelPid, normal}, State0) ->
- handle_down(handle_channel_down(ChannelPid, State0));
-
-handle_info({'DOWN', _Ref, process, ChannelPid, shutdown}, State0) ->
- handle_down(handle_channel_down(ChannelPid, State0));
-
-handle_info({'DOWN', _Ref, process, ChannelPid, Reason}, State0) ->
- Report = io_lib:format("Pid ~p DOWN ~p\n", [ChannelPid, Reason]),
- error_logger:error_report(Report),
- handle_down(handle_channel_down(ChannelPid, State0));
+%%% Handle that ssh channels user process goes down
+handle_info({'DOWN', _Ref, process, ChannelPid, _Reason}, State) ->
+ handle_down(handle_channel_down(ChannelPid, State));
-handle_info({'EXIT', _, _}, State) ->
- %% Handled in 'DOWN'
- {noreply, State}.
+%%% So that terminate will be run when supervisor is shutdown
+handle_info({'EXIT', _Sup, Reason}, State) ->
+ {stop, Reason, State}.
%%--------------------------------------------------------------------
%% Function: terminate(Reason, State) -> void()
@@ -559,20 +548,19 @@ handle_info({'EXIT', _, _}, State) ->
%% cleaning up. When it returns, the gen_server terminates with Reason.
%% The return value is ignored.
%%--------------------------------------------------------------------
-terminate(Reason, #state{connection_state =
- #connection{requests = Requests,
- sub_system_supervisor = SubSysSup},
+terminate(_Reason, #state{role = client,
+ connection_state =
+ #connection{connection_supervisor = Supervisor}}) ->
+ sshc_sup:stop_child(Supervisor);
+
+terminate(_Reason, #state{role = server,
+ connection_state =
+ #connection{sub_system_supervisor = SubSysSup},
opts = Opts}) ->
- SSHOpts = proplists:get_value(ssh_opts, Opts),
- disconnect_fun(Reason, SSHOpts),
- (catch lists:foreach(fun({_, From}) ->
- gen_server:reply(From, {error, connection_closed})
- end, Requests)),
Address = proplists:get_value(address, Opts),
Port = proplists:get_value(port, Opts),
SystemSup = ssh_system_sup:system_supervisor(Address, Port),
- ssh_system_sup:stop_subsystem(SystemSup, SubSysSup),
- ok.
+ ssh_system_sup:stop_subsystem(SystemSup, SubSysSup).
%%--------------------------------------------------------------------
%% Func: code_change(OldVsn, State, Extra) -> {ok, NewState}
@@ -619,16 +607,7 @@ decode_ssh_msg(Msg) ->
send_msg(Msg) ->
- case catch do_send_msg(Msg) of
- {'EXIT', Reason}->
- Report = io_lib:format("Connection Manager fail to send:~n~p~n"
- "Reason why it failed was:~n~p~n",
- [Msg, Reason]),
- error_logger:info_report(Report);
- _ ->
- ok
- end.
-
+ catch do_send_msg(Msg).
do_send_msg({channel_data, Pid, Data}) ->
Pid ! {ssh_cm, self(), Data};
do_send_msg({channel_requst_reply, From, Data}) ->
@@ -676,8 +655,8 @@ handle_down({{replies, Replies}, State}) ->
{noreply, State}.
handle_channel_down(ChannelPid, #state{connection_state =
- #connection{channel_cache = Cache}} =
- State) ->
+ #connection{channel_cache = Cache}} =
+ State) ->
ssh_channel:cache_foldl(
fun(Channel, Acc) when Channel#channel.user == ChannelPid ->
ssh_channel:cache_delete(Cache,
diff --git a/lib/ssh/src/ssh_connection_sup.erl b/lib/ssh/src/ssh_connection_sup.erl
new file mode 100644
index 0000000000..e3544af1c6
--- /dev/null
+++ b/lib/ssh/src/ssh_connection_sup.erl
@@ -0,0 +1,113 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+%%----------------------------------------------------------------------
+%% Purpose: Ssh connection supervisor.
+%%----------------------------------------------------------------------
+
+-module(ssh_connection_sup).
+
+-behaviour(supervisor).
+
+-export([start_link/1, start_handler_child/2, start_manager_child/2,
+ connection_manager/1]).
+
+%% Supervisor callback
+-export([init/1]).
+
+%%%=========================================================================
+%%% API
+%%%=========================================================================
+start_link(Args) ->
+ supervisor:start_link(?MODULE, [Args]).
+
+%% Will be called from the manager child process
+start_handler_child(Sup, Args) ->
+ [Spec] = child_specs(handler, Args),
+ supervisor:start_child(Sup, Spec).
+
+%% Will be called from the acceptor process
+start_manager_child(Sup, Args) ->
+ [Spec] = child_specs(manager, Args),
+ supervisor:start_child(Sup, Spec).
+
+connection_manager(SupPid) ->
+ Children = supervisor:which_children(SupPid),
+ {ok, ssh_connection_manager(Children)}.
+
+%%%=========================================================================
+%%% Supervisor callback
+%%%=========================================================================
+init([Args]) ->
+ RestartStrategy = one_for_all,
+ MaxR = 0,
+ MaxT = 3600,
+ Children = child_specs(Args),
+ {ok, {{RestartStrategy, MaxR, MaxT}, Children}}.
+
+%%%=========================================================================
+%%% Internal functions
+%%%=========================================================================
+child_specs(Opts) ->
+ case proplists:get_value(role, Opts) of
+ client ->
+ child_specs(manager, [client | Opts]);
+ server ->
+ %% Children started by acceptor process
+ []
+ end.
+
+% The manager process starts the handler process
+child_specs(manager, Opts) ->
+ [manager_spec(Opts)];
+child_specs(handler, Opts) ->
+ [handler_spec(Opts)].
+
+manager_spec([server = Role, Socket, Opts]) ->
+ Name = make_ref(),
+ StartFunc = {ssh_connection_manager, start_link, [[Role, Socket, Opts]]},
+ Restart = temporary,
+ Shutdown = 3600,
+ Modules = [ssh_connection_manager],
+ Type = worker,
+ {Name, StartFunc, Restart, Shutdown, Type, Modules};
+
+manager_spec([client = Role | Opts]) ->
+ Name = make_ref(),
+ StartFunc = {ssh_connection_manager, start_link, [[Role, Opts]]},
+ Restart = temporary,
+ Shutdown = 3600,
+ Modules = [ssh_connection_manager],
+ Type = worker,
+ {Name, StartFunc, Restart, Shutdown, Type, Modules}.
+
+handler_spec([Role, Socket, Opts]) ->
+ Name = make_ref(),
+ StartFunc = {ssh_connection_handler,
+ start_link, [Role, self(), Socket, Opts]},
+ Restart = temporary,
+ Shutdown = 3600,
+ Modules = [ssh_connection_handler],
+ Type = worker,
+ {Name, StartFunc, Restart, Shutdown, Type, Modules}.
+
+ssh_connection_manager([{_, Child, _, [ssh_connection_manager]} | _]) ->
+ Child;
+ssh_connection_manager([_ | Rest]) ->
+ ssh_connection_manager(Rest).
diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl
index 8cc414f83a..ec7b76b0b3 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -424,18 +424,18 @@ handle_op(?SSH_FXP_RENAME, ReqId,
State0
end;
handle_op(?SSH_FXP_SYMLINK, ReqId,
- <<?UINT32(PLen), BPath:PLen/binary, ?UINT32(PLen2),
- BPath2:PLen2/binary>>,
+ <<?UINT32(PLen), Link:PLen/binary, ?UINT32(PLen2),
+ Target:PLen2/binary>>,
State0 = #state{file_handler = FileMod, file_state = FS0}) ->
- Path = relate_file_name(BPath, State0),
- Path2 = relate_file_name(BPath2, State0),
- {Status, FS1} = FileMod:make_symlink(Path2, Path, FS0),
+ LinkPath = relate_file_name(Link, State0),
+ TargetPath = relate_file_name(Target, State0),
+ {Status, FS1} = FileMod:make_symlink(TargetPath, LinkPath, FS0),
State1 = State0#state{file_state = FS1},
send_status(Status, ReqId, State1).
new_handle([], H) ->
H;
-new_handle([{N, _} | Rest], H) when N > H ->
+new_handle([{N, _,_} | Rest], H) when N =< H ->
new_handle(Rest, N+1);
new_handle([_ | Rest], H) ->
new_handle(Rest, H).
@@ -444,6 +444,8 @@ add_handle(State, XF, ReqId, Type, DirFileTuple) ->
Handles = State#state.handles,
Handle = new_handle(Handles, 0),
ssh_xfer:xf_send_handle(XF, ReqId, integer_to_list(Handle)),
+ %% OBS: If you change handles-tuple also change new_handle!
+ %% Is this this the best way to implement new handle?
State#state{handles = [{Handle, Type, DirFileTuple} | Handles]}.
get_handle(Handles, BinHandle) ->
diff --git a/lib/ssh/src/ssh_subsystem_sup.erl b/lib/ssh/src/ssh_subsystem_sup.erl
index d71b6bbc56..cd6defd535 100644
--- a/lib/ssh/src/ssh_subsystem_sup.erl
+++ b/lib/ssh/src/ssh_subsystem_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,13 +70,12 @@ ssh_connectinon_child_spec(Opts) ->
Address = proplists:get_value(address, Opts),
Port = proplists:get_value(port, Opts),
Role = proplists:get_value(role, Opts),
- Name = id(Role, ssh_connection_controler, Address, Port),
- StartFunc = {ssh_connection_controler, start_link, [Opts]},
+ Name = id(Role, ssh_connection_sup, Address, Port),
+ StartFunc = {ssh_connection_sup, start_link, [Opts]},
Restart = transient,
-% Restart = permanent,
Shutdown = 5000,
- Modules = [ssh_connection_controler],
- Type = worker,
+ Modules = [ssh_connection_sup],
+ Type = supervisor,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
ssh_channel_child_spec(Opts) ->
@@ -86,7 +85,6 @@ ssh_channel_child_spec(Opts) ->
Name = id(Role, ssh_channel_sup, Address, Port),
StartFunc = {ssh_channel_sup, start_link, [Opts]},
Restart = transient,
-% Restart = permanent,
Shutdown = infinity,
Modules = [ssh_channel_sup],
Type = supervisor,
@@ -95,7 +93,7 @@ ssh_channel_child_spec(Opts) ->
id(Role, Sup, Address, Port) ->
{Role, Sup, Address, Port}.
-ssh_connection_sup([{_, Child, _, [ssh_connection_controler]} | _]) ->
+ssh_connection_sup([{_, Child, _, [ssh_connection_sup]} | _]) ->
Child;
ssh_connection_sup([_ | Rest]) ->
ssh_connection_sup(Rest).
diff --git a/lib/ssh/src/ssh_system_sup.erl b/lib/ssh/src/ssh_system_sup.erl
index 920baaadef..23480f5fe3 100644
--- a/lib/ssh/src/ssh_system_sup.erl
+++ b/lib/ssh/src/ssh_system_sup.erl
@@ -146,7 +146,7 @@ ssh_acceptor_child_spec(ServerOpts) ->
ssh_subsystem_child_spec(ServerOpts) ->
Name = make_ref(),
StartFunc = {ssh_subsystem_sup, start_link, [ServerOpts]},
- Restart = temporary,
+ Restart = transient,
Shutdown = infinity,
Modules = [ssh_subsystem_sup],
Type = supervisor,
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl
index 6140c87f6e..1f912c9bdf 100644
--- a/lib/ssh/src/ssh_transport.erl
+++ b/lib/ssh/src/ssh_transport.erl
@@ -142,7 +142,7 @@ connect(ConnectionSup, Address, Port, SocketOpts, Opts) ->
case do_connect(Callback, Address, Port, SocketOpts, Timeout) of
{ok, Socket} ->
{ok, Pid} =
- ssh_connection_controler:start_handler_child(ConnectionSup,
+ ssh_connection_sup:start_handler_child(ConnectionSup,
[client, Socket,
[{address, Address},
{port, Port} |
@@ -174,12 +174,11 @@ accept(Address, Port, Socket, Options) ->
ssh_system_sup:connection_supervisor(
ssh_system_sup:system_supervisor(Address, Port)),
{ok, Pid} =
- ssh_connection_controler:start_handler_child(ConnectionSup,
+ ssh_connection_sup:start_handler_child(ConnectionSup,
[server, Socket,
[{address, Address},
{port, Port} | Options]]),
Callback:controlling_process(Socket, Pid),
- ssh_connection_handler:send_event(Pid, socket_control),
{ok, Pid}.
format_version({Major,Minor}) ->
diff --git a/lib/ssh/src/sshc_sup.erl b/lib/ssh/src/sshc_sup.erl
index 7c29c669e4..1d2779de23 100644
--- a/lib/ssh/src/sshc_sup.erl
+++ b/lib/ssh/src/sshc_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,7 +26,7 @@
-behaviour(supervisor).
--export([start_link/1, start_child/1]).
+-export([start_link/1, start_child/1, stop_child/1]).
%% Supervisor callback
-export([init/1]).
@@ -40,12 +40,19 @@ start_link(Args) ->
start_child(Args) ->
supervisor:start_child(?MODULE, Args).
+stop_child(Client) ->
+ spawn(fun() ->
+ ClientSup = whereis(?MODULE),
+ supervisor:terminate_child(ClientSup, Client)
+ end),
+ ok.
+
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
init(Args) ->
RestartStrategy = simple_one_for_one,
- MaxR = 10,
+ MaxR = 0,
MaxT = 3600,
{ok, {{RestartStrategy, MaxR, MaxT}, [child_spec(Args)]}}.
@@ -54,12 +61,9 @@ init(Args) ->
%%%=========================================================================
child_spec(_) ->
Name = undefined, % As simple_one_for_one is used.
- StartFunc = {ssh_connection_controler, start_link, []},
- Restart = temporary,
-% Shutdown = infinity,
- Shutdown = 5000,
- Modules = [ssh_connection_controler],
-% Type = supervisor,
- Type = worker,
+ StartFunc = {ssh_connection_sup, start_link, []},
+ Restart = temporary,
+ Shutdown = infinity,
+ Modules = [ssh_connection_sup],
+ Type = supervisor,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
-
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index 9c13180159..012367a6df 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -88,7 +88,7 @@ end_per_testcase(TestCase, Config) when TestCase == server_password_option;
UserDir = filename:join(?config(priv_dir, Config), nopubkey),
ssh_test_lib:del_dirs(UserDir),
end_per_testcase(Config);
-end_per_testcase(TestCase, Config) ->
+end_per_testcase(_TestCase, Config) ->
end_per_testcase(Config).
end_per_testcase(_Config) ->
ssh:stop(),
@@ -108,14 +108,16 @@ all() ->
{group, rsa_key},
{group, dsa_pass_key},
{group, rsa_pass_key},
+ {group, internal_error},
daemon_already_started,
server_password_option, server_userpassword_option].
groups() ->
[{dsa_key, [], [exec, exec_compressed, shell, known_hosts]},
- {rsa_key, [], [exec, exec_compressed, shell, known_hosts]},
+ {rsa_key, [], [exec, exec_compressed, shell, known_hosts]},
{dsa_pass_key, [], [pass_phrase]},
- {rsa_pass_key, [], [pass_phrase]}
+ {rsa_pass_key, [], [pass_phrase]},
+ {internal_error, [], [internal_error]}
].
init_per_group(dsa_key, Config) ->
@@ -138,6 +140,12 @@ init_per_group(dsa_pass_key, Config) ->
PrivDir = ?config(priv_dir, Config),
ssh_test_lib:setup_dsa_pass_pharse(DataDir, PrivDir, "Password"),
[{pass_phrase, {dsa_pass_phrase, "Password"}}| Config];
+init_per_group(internal_error, Config) ->
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ ssh_test_lib:setup_dsa(DataDir, PrivDir),
+ file:delete(filename:join(PrivDir, "system/ssh_host_dsa_key")),
+ Config;
init_per_group(_, Config) ->
Config.
@@ -157,6 +165,11 @@ end_per_group(rsa_pass_key, Config) ->
PrivDir = ?config(priv_dir, Config),
ssh_test_lib:clean_rsa(PrivDir),
Config;
+end_per_group(internal_error, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ ssh_test_lib:clean_dsa(PrivDir),
+ Config;
+
end_per_group(_, Config) ->
Config.
@@ -268,9 +281,14 @@ shell(Config) when is_list(Config) ->
IO = ssh_test_lib:start_io_server(),
Shell = ssh_test_lib:start_shell(Port, IO, UserDir),
receive
+ {'EXIT', _, _} ->
+ test_server:fail(no_ssh_connection);
ErlShellStart ->
- test_server:format("Erlang shell start: ~p~n", [ErlShellStart])
- end,
+ test_server:format("Erlang shell start: ~p~n", [ErlShellStart]),
+ do_shell(IO, Shell)
+ end.
+
+do_shell(IO, Shell) ->
receive
ErlPrompt0 ->
test_server:format("Erlang prompt: ~p~n", [ErlPrompt0])
@@ -361,12 +379,15 @@ server_password_option(Config) when is_list(Config) ->
{password, "morot"},
{user_interaction, false},
{user_dir, UserDir}]),
+
+ Reason = "Unable to connect using the available authentication methods",
+
{error, Reason} =
- ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
- {user, "vego"},
- {password, "foo"},
- {user_interaction, false},
- {user_dir, UserDir}]),
+ ssh:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "vego"},
+ {password, "foo"},
+ {user_interaction, false},
+ {user_dir, UserDir}]),
test_server:format("Test of wrong password: Error msg: ~p ~n", [Reason]),
@@ -396,25 +417,20 @@ server_userpassword_option(Config) when is_list(Config) ->
{user_dir, UserDir}]),
ssh:close(ConnectionRef),
- {error, Reason0} =
- ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
- {user, "foo"},
- {password, "morot"},
- {user_interaction, false},
- {user_dir, UserDir}]),
-
- test_server:format("Test of user foo that does not exist. "
- "Error msg: ~p ~n", [Reason0]),
+ Reason = "Unable to connect using the available authentication methods",
- {error, Reason1} =
- ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
- {user, "vego"},
- {password, "foo"},
- {user_interaction, false},
- {user_dir, UserDir}]),
- test_server:format("Test of wrong Password. "
- "Error msg: ~p ~n", [Reason1]),
-
+ {error, Reason} =
+ ssh:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_interaction, false},
+ {user_dir, UserDir}]),
+ {error, Reason} =
+ ssh:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "vego"},
+ {password, "foo"},
+ {user_interaction, false},
+ {user_dir, UserDir}]),
ssh:stop_daemon(Pid).
%%--------------------------------------------------------------------
@@ -445,6 +461,7 @@ known_hosts(Config) when is_list(Config) ->
[Host, _Ip] = string:tokens(HostAndIp, ","),
"ssh-" ++ _ = Alg,
ssh:stop_daemon(Pid).
+%%--------------------------------------------------------------------
pass_phrase(doc) ->
["Test that we can use keyes protected by pass phrases"];
@@ -470,5 +487,27 @@ pass_phrase(Config) when is_list(Config) ->
ssh:stop_daemon(Pid).
%%--------------------------------------------------------------------
+
+internal_error(doc) ->
+ ["Test that client does not hang if disconnects due to internal error"];
+
+internal_error(suite) ->
+ [];
+
+internal_error(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
+ SystemDir = filename:join(?config(priv_dir, Config), system),
+ UserDir = ?config(priv_dir, Config),
+
+ {_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
+ {user_dir, UserDir},
+ {failfun, fun ssh_test_lib:failfun/2}]),
+ {error,"Internal error"} =
+ ssh:connect(Host, Port, [{silently_accept_hosts, true},
+ {user_dir, UserDir},
+ {user_interaction, false}]).
+
+
+%%--------------------------------------------------------------------
%% Internal functions
%%--------------------------------------------------------------------
diff --git a/lib/ssh/test/ssh_sftp_SUITE.erl b/lib/ssh/test/ssh_sftp_SUITE.erl
index 7644db155d..d40b1d544d 100644
--- a/lib/ssh/test/ssh_sftp_SUITE.erl
+++ b/lib/ssh/test/ssh_sftp_SUITE.erl
@@ -76,42 +76,34 @@ end_per_suite(Config) ->
%% variable, but should NOT alter/remove any existing entries.
%% Description: Initiation before each test case
%%--------------------------------------------------------------------
-init_per_testcase(_Case, Config) ->
+init_per_testcase(Case, Config) ->
prep(Config),
TmpConfig0 = lists:keydelete(watchdog, 1, Config),
TmpConfig = lists:keydelete(sftp, 1, TmpConfig0),
Dog = test_server:timetrap(?default_timeout),
- PrivDir = ?config(priv_dir, Config),
- SysDir = ?config(data_dir, Config),
- Host = ssh_test_lib:hostname(),
- %% Run test against openssh server if available
- Sftp = case (catch ssh_sftp:start_channel(Host,
- [{user_interaction, false},
- {silently_accept_hosts, true}])) of
- {ok, ChannelPid, Connection} ->
- test_server:format("Running against openssh"),
- {ChannelPid, Connection};
- _Error -> %% Start own sftp
- test_server:format("Running against erlang ssh"),
- {_Sftpd, Host1, Port} =
- ssh_test_lib:daemon([{system_dir, SysDir},
- {user_dir, PrivDir},
- {user_passwords,
- [{?USER, ?PASSWD}]},
- {failfun,
- fun ssh_test_lib:failfun/2}]),
- Result = (catch ssh_sftp:start_channel(Host1, Port,
- [{user, ?USER},
- {password, ?PASSWD},
- {user_dir, PrivDir},
- {user_interaction, false},
- {silently_accept_hosts, true}])),
- {ok, ChannelPid, Connection} = Result,
- {ChannelPid, Connection}
- end,
-
- [{sftp, Sftp}, {watchdog, Dog} | TmpConfig].
+ case ?config(group, Config) of
+ erlang_server ->
+ {_,Host, Port} = ?config(sftpd, Config),
+ {ok, ChannelPid, Connection} =
+ ssh_sftp:start_channel(Host, Port,
+ [{user, ?USER},
+ {password, ?PASSWD},
+ {user_interaction, false},
+ {silently_accept_hosts, true}]),
+ Sftp = {ChannelPid, Connection},
+ [{sftp, Sftp}, {watchdog, Dog} | TmpConfig];
+ openssh_server when Case == links ->
+ {skip, "known bug in openssh"};
+ openssh_server ->
+ Host = ssh_test_lib:hostname(),
+ {ok, ChannelPid, Connection} =
+ ssh_sftp:start_channel(Host,
+ [{user_interaction, false},
+ {silently_accept_hosts, true}]),
+ Sftp = {ChannelPid, Connection},
+ [{sftp, Sftp}, {watchdog, Dog} | TmpConfig]
+ end.
%%--------------------------------------------------------------------
%% Function: end_per_testcase(TestCase, Config) -> _
@@ -121,7 +113,15 @@ init_per_testcase(_Case, Config) ->
%% A list of key/value pairs, holding the test case configuration.
%% Description: Cleanup after each test case
%%--------------------------------------------------------------------
-end_per_testcase(_Case, Config) ->
+end_per_testcase(rename_file, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ NewFileName = filename:join(PrivDir, "test.txt"),
+ file:delete(NewFileName),
+ end_per_testcase(Config);
+end_per_testcase(_, Config) ->
+ end_per_testcase(Config).
+
+end_per_testcase(Config) ->
{Sftp, Connection} = ?config(sftp, Config),
ssh_sftp:stop_channel(Sftp),
ssh:close(Connection),
@@ -138,19 +138,47 @@ end_per_testcase(_Case, Config) ->
%% Description: Returns a list of all test cases in this test suite
%%--------------------------------------------------------------------
all() ->
- [open_close_file, open_close_dir, read_file, read_dir,
- write_file, rename_file, mk_rm_dir, remove_file, links,
- retrieve_attributes, set_attributes, async_read,
- async_write, position, pos_read, pos_write].
+ [{group, erlang_server},
+ {group, openssh_server}].
groups() ->
- [].
-
-init_per_group(_GroupName, Config) ->
- Config.
+ [{erlang_server, [], [open_close_file, open_close_dir, read_file, read_dir,
+ write_file, rename_file, mk_rm_dir, remove_file, links,
+ retrieve_attributes, set_attributes, async_read,
+ async_write, position, pos_read, pos_write]},
+ {openssh_server, [], [open_close_file, open_close_dir, read_file, read_dir,
+ write_file, rename_file, mk_rm_dir, remove_file, links,
+ retrieve_attributes, set_attributes, async_read,
+ async_write, position, pos_read, pos_write]}].
+
+init_per_group(erlang_server, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ SysDir = ?config(data_dir, Config),
+ Sftpd =
+ ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, PrivDir},
+ {user_passwords,
+ [{?USER, ?PASSWD}]},
+ {failfun,
+ fun ssh_test_lib:failfun/2}]),
+ [{group, erlang_server}, {sftpd, Sftpd} | Config];
+
+init_per_group(openssh_server, Config) ->
+ Host = ssh_test_lib:hostname(),
+ case (catch ssh_sftp:start_channel(Host,
+ [{user_interaction, false},
+ {silently_accept_hosts, true}])) of
+ {ok, _ChannelPid, Connection} ->
+ ssh:close(Connection),
+ [{group, openssh_server} | Config];
+ _ ->
+ {skip, "No openssh server"}
+ end.
-end_per_group(_GroupName, Config) ->
- Config.
+end_per_group(erlang_server, Config) ->
+ Config;
+end_per_group(_, Config) ->
+ Config.
%% Test cases starts here.
@@ -332,7 +360,7 @@ links(Config) when is_list(Config) ->
FileName = filename:join(PrivDir, "sftp.txt"),
LinkFileName = filename:join(PrivDir, "link_test.txt"),
- ok = ssh_sftp:make_symlink(Sftp, FileName, LinkFileName),
+ ok = ssh_sftp:make_symlink(Sftp, LinkFileName, FileName),
{ok, FileName} = ssh_sftp:read_link(Sftp, LinkFileName),
ok
end.
diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl
index 6e4480ee9d..695a7caa7d 100644
--- a/lib/ssh/test/ssh_sftpd_SUITE.erl
+++ b/lib/ssh/test/ssh_sftpd_SUITE.erl
@@ -30,7 +30,6 @@
-include_lib("kernel/include/file.hrl").
--define(SFPD_PORT, 9999).
-define(USER, "Alladin").
-define(PASSWD, "Sesame").
-define(XFER_PACKET_SIZE, 32768).
@@ -102,13 +101,15 @@ init_per_testcase(TestCase, Config) ->
ClientUserDir = filename:join(PrivDir, nopubkey),
SystemDir = filename:join(?config(priv_dir, Config), system),
+ Port = ssh_test_lib:inet_port(node()),
+
{ok, Sftpd} =
- ssh_sftpd:listen(?SFPD_PORT, [{system_dir, SystemDir},
+ ssh_sftpd:listen(Port, [{system_dir, SystemDir},
{user_dir, PrivDir},
{user_passwords,[{?USER, ?PASSWD}]},
{pwdfun, fun(_,_) -> true end}]),
- Cm = ssh_test_lib:connect(?SFPD_PORT,
+ Cm = ssh_test_lib:connect(Port,
[{user_dir, ClientUserDir},
{user, ?USER}, {password, ?PASSWD},
{user_interaction, false},
@@ -544,56 +545,60 @@ set_attributes(doc) ->
set_attributes(suite) ->
[];
set_attributes(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- FileName = filename:join(PrivDir, "test.txt"),
- ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ case test_server:os_type() of
+ {win32, _} ->
+ {skip, "Known error bug in erts file:read_file_info"};
+ _ ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, "test.txt"),
+ ReqId = 0,
+ {Cm, Channel} = ?config(sftp, Config),
- {ok, FileInfo} = file:read_file_info(FileName),
+ {ok, FileInfo} = file:read_file_info(FileName),
- OrigPermissions = FileInfo#file_info.mode,
- Permissions = 8#600, %% User read-write-only
+ OrigPermissions = FileInfo#file_info.mode,
+ Permissions = not_default_permissions(),
- Flags = ?SSH_FILEXFER_ATTR_PERMISSIONS,
+ Flags = ?SSH_FILEXFER_ATTR_PERMISSIONS,
- Atters = [?uint32(Flags), ?byte(?SSH_FILEXFER_TYPE_REGULAR),
- ?uint32(Permissions)],
+ Atters = [?uint32(Flags), ?byte(?SSH_FILEXFER_TYPE_REGULAR),
+ ?uint32(Permissions)],
- {ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId),
- ?UINT32(?SSH_FX_OK), _/binary>>, _} =
- set_attributes_file(FileName, Atters, Cm, Channel, ReqId),
-
- {ok, NewFileInfo} = file:read_file_info(FileName),
- NewPermissions = NewFileInfo#file_info.mode,
-
- %% Can not test that NewPermissions = Permissions as
- %% on Unix platforms, other bits than those listed in the
- %% API may be set.
- test_server:format("Org: ~p New: ~p~n", [OrigPermissions, NewPermissions]),
- true = OrigPermissions =/= NewPermissions,
-
- test_server:format("Try to open the file"),
- NewReqId = 2,
- {ok, <<?SSH_FXP_HANDLE, ?UINT32(NewReqId), Handle/binary>>, _} =
- open_file(FileName, Cm, Channel, NewReqId,
- ?ACE4_READ_DATA bor ?ACE4_WRITE_ATTRIBUTES,
- ?SSH_FXF_OPEN_EXISTING),
+ {ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId),
+ ?UINT32(?SSH_FX_OK), _/binary>>, _} =
+ set_attributes_file(FileName, Atters, Cm, Channel, ReqId),
- NewAtters = [?uint32(Flags), ?byte(?SSH_FILEXFER_TYPE_REGULAR),
- ?uint32(OrigPermissions)],
+ {ok, NewFileInfo} = file:read_file_info(FileName),
+ NewPermissions = NewFileInfo#file_info.mode,
- NewReqId1 = 3,
+ %% Can not test that NewPermissions = Permissions as
+ %% on Unix platforms, other bits than those listed in the
+ %% API may be set.
+ test_server:format("Org: ~p New: ~p~n", [OrigPermissions, NewPermissions]),
+ true = OrigPermissions =/= NewPermissions,
- test_server:format("Set original permissions on the now open file"),
+ test_server:format("Try to open the file"),
+ NewReqId = 2,
+ {ok, <<?SSH_FXP_HANDLE, ?UINT32(NewReqId), Handle/binary>>, _} =
+ open_file(FileName, Cm, Channel, NewReqId,
+ ?ACE4_READ_DATA bor ?ACE4_WRITE_ATTRIBUTES,
+ ?SSH_FXF_OPEN_EXISTING),
- {ok, <<?SSH_FXP_STATUS, ?UINT32(NewReqId1),
- ?UINT32(?SSH_FX_OK), _/binary>>, _} =
- set_attributes_open_file(Handle, NewAtters, Cm, Channel, NewReqId1),
+ NewAtters = [?uint32(Flags), ?byte(?SSH_FILEXFER_TYPE_REGULAR),
+ ?uint32(OrigPermissions)],
- {ok, NewFileInfo1} = file:read_file_info(FileName),
- OrigPermissions = NewFileInfo1#file_info.mode,
+ NewReqId1 = 3,
- ok.
+ test_server:format("Set original permissions on the now open file"),
+
+ {ok, <<?SSH_FXP_STATUS, ?UINT32(NewReqId1),
+ ?UINT32(?SSH_FX_OK), _/binary>>, _} =
+ set_attributes_open_file(Handle, NewAtters, Cm, Channel, NewReqId1),
+
+ {ok, NewFileInfo1} = file:read_file_info(FileName),
+ OrigPermissions = NewFileInfo1#file_info.mode,
+ ok
+ end.
%%--------------------------------------------------------------------
ver3_rename_OTP_6352(doc) ->
@@ -942,3 +947,6 @@ sshd_read_file(Config) when is_list(Config) ->
{ok, Data} = file:read_file(FileName),
ok.
+
+not_default_permissions() ->
+ 8#600. %% User read-write-only
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 26bbdf5c5c..609663c87a 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -43,12 +43,8 @@ connect(Host, Options) ->
connect(any, Port, Options) ->
connect(hostname(), Port, Options);
connect(Host, Port, Options) ->
- case ssh:connect(Host, Port, Options) of
- {ok, ConnectionRef} ->
- ConnectionRef;
- Error ->
- Error
- end.
+ {ok, ConnectionRef} = ssh:connect(Host, Port, Options),
+ ConnectionRef.
daemon(Options) ->
daemon(any, inet_port(), Options).
@@ -338,3 +334,13 @@ del_dirs(Dir) ->
_ ->
ok
end.
+
+inet_port(Node) ->
+ {Port, Socket} = do_inet_port(Node),
+ rpc:call(Node, gen_tcp, close, [Socket]),
+ Port.
+
+do_inet_port(Node) ->
+ {ok, Socket} = rpc:call(Node, gen_tcp, listen, [0, [{reuseaddr, true}]]),
+ {ok, Port} = rpc:call(Node, inet, port, [Socket]),
+ {Port, Socket}.
diff --git a/lib/ssh/test/ssh_to_openssh_SUITE.erl b/lib/ssh/test/ssh_to_openssh_SUITE.erl
index dfe526564d..c337617ee4 100644
--- a/lib/ssh/test/ssh_to_openssh_SUITE.erl
+++ b/lib/ssh/test/ssh_to_openssh_SUITE.erl
@@ -445,7 +445,7 @@ erlang_client_openssh_server_password(Config) when is_list(Config) ->
%% to make sure we don't public-key-auth
UserDir = ?config(data_dir, Config),
{error, Reason0} =
- ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
+ ssh:connect(any, ?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
{user, "foo"},
{password, "morot"},
{user_interaction, false},
@@ -459,12 +459,12 @@ erlang_client_openssh_server_password(Config) when is_list(Config) ->
case length(string:tokens(User, " ")) of
1 ->
{error, Reason1} =
- ssh_test_lib:connect(?SSH_DEFAULT_PORT,
- [{silently_accept_hosts, true},
- {user, User},
- {password, "foo"},
- {user_interaction, false},
- {user_dir, UserDir}]),
+ ssh:connect(any, ?SSH_DEFAULT_PORT,
+ [{silently_accept_hosts, true},
+ {user, User},
+ {password, "foo"},
+ {user_interaction, false},
+ {user_dir, UserDir}]),
test_server:format("Test of wrong Pasword. "
"Error msg: ~p~n", [Reason1]);
_ ->
diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk
index 42f860d6ae..bff73a1b40 100644
--- a/lib/ssh/vsn.mk
+++ b/lib/ssh/vsn.mk
@@ -1,5 +1,5 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
-SSH_VSN = 2.0.9
+SSH_VSN = 2.1
APP_VSN = "ssh-$(SSH_VSN)"
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
index 50268ae206..4910a6f1b8 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -62,8 +62,8 @@
</c></p>
<p>For valid options
- see <seealso marker="kernel:inet">inet(3) </seealso> and
- <seealso marker="kernel:gen_tcp">gen_tcp(3) </seealso>.
+ see <seealso marker="kernel:inet">inet(3)</seealso> and
+ <seealso marker="kernel:gen_tcp">gen_tcp(3)</seealso>.
</p>
<p> <c>ssloption() = {verify, verify_type()} |
diff --git a/lib/ssl/src/ssl.appup.src b/lib/ssl/src/ssl.appup.src
index 1b07e76d6a..e346b1e9e6 100644
--- a/lib/ssl/src/ssl.appup.src
+++ b/lib/ssl/src/ssl.appup.src
@@ -1,23 +1,13 @@
%% -*- erlang -*-
{"%VSN%",
[
- {"4.1.6", [{restart_application, ssl}]},
- {"4.1.5", [{restart_application, ssl}]},
- {"4.1.4", [{restart_application, ssl}]},
- {"4.1.3", [{restart_application, ssl}]},
- {"4.1.2", [{restart_application, ssl}]},
- {"4.1.1", [{restart_application, ssl}]},
- {"4.1", [{restart_application, ssl}]},
- {"4.0.1", [{restart_application, ssl}]}
+ {"5.0", [{restart_application, ssl}]},
+ {<<"4\\.*">>, [{restart_application, ssl}]},
+ {<<"3\\.*">>, [{restart_application, ssl}]}
],
[
- {"4.1.6", [{restart_application, ssl}]},
- {"4.1.5", [{restart_application, ssl}]},
- {"4.1.4", [{restart_application, ssl}]},
- {"4.1.3", [{restart_application, ssl}]},
- {"4.1.2", [{restart_application, ssl}]},
- {"4.1.1", [{restart_application, ssl}]},
- {"4.1", [{restart_application, ssl}]},
- {"4.0.1", [{restart_application, ssl}]}
+ {"5.0", [{restart_application, ssl}]},
+ {<<"4\\.*">>, [{restart_application, ssl}]},
+ {<<"3\\.*">>, [{restart_application, ssl}]}
]}.
diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk
index 2255798f1d..0fccbfe908 100644
--- a/lib/ssl/vsn.mk
+++ b/lib/ssl/vsn.mk
@@ -1 +1 @@
-SSL_VSN = 5.0
+SSL_VSN = 5.0.1
diff --git a/lib/stdlib/doc/src/digraph_utils.xml b/lib/stdlib/doc/src/digraph_utils.xml
index e44632bfd2..ef6e1cb46f 100644
--- a/lib/stdlib/doc/src/digraph_utils.xml
+++ b/lib/stdlib/doc/src/digraph_utils.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -156,7 +156,7 @@
<p>Creates a digraph where the vertices are
the <seealso marker="#strong_components">strongly connected
components</seealso> of <c><anno>Digraph</anno></c> as returned by
- <c>strong_components/1</c>. If X and Y are strongly
+ <c>strong_components/1</c>. If X and Y are two different strongly
connected components, and there exist vertices x and y in X
and Y respectively such that there is an
edge <seealso marker="#emanate">emanating</seealso> from x
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml
index efd9514db6..0486090e92 100644
--- a/lib/stdlib/doc/src/ets.xml
+++ b/lib/stdlib/doc/src/ets.xml
@@ -671,7 +671,7 @@ ets:is_compiled_ms(Broken).</code>
<c>duplicate_bag</c>, the function returns a list of
arbitrary length.</p>
<p>Note that the time order of object insertions is preserved;
- The first object inserted with the given key will be first
+ the first object inserted with the given key will be first
in the resulting list, and so on.</p>
<p>Insert and look-up times in tables of type <c>set</c>,
<c>bag</c> and <c>duplicate_bag</c> are constant, regardless
diff --git a/lib/stdlib/doc/src/gen_event.xml b/lib/stdlib/doc/src/gen_event.xml
index 79a0c8ad89..ef81b06500 100644
--- a/lib/stdlib/doc/src/gen_event.xml
+++ b/lib/stdlib/doc/src/gen_event.xml
@@ -120,8 +120,10 @@ gen_event:stop -----> Module:terminate/2
<name>start_link(EventMgrName) -> Result</name>
<fsummary>Create a generic event manager process in a supervision tree.</fsummary>
<type>
- <v>EventMgrName = {local,Name} | {global,Name}</v>
+ <v>EventMgrName = {local,Name} | {global,GlobalName}
+ | {via,Module,ViaName}</v>
<v>&nbsp;Name = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Result = {ok,Pid} | {error,{already_started,Pid}}</v>
<v>&nbsp;Pid = pid()</v>
</type>
@@ -132,10 +134,17 @@ gen_event:stop -----> Module:terminate/2
the event manager is linked to the supervisor.</p>
<p>If <c>EventMgrName={local,Name}</c>, the event manager is
registered locally as <c>Name</c> using <c>register/2</c>.
- If <c>EventMgrName={global,Name}</c>, the event manager is
- registered globally as <c>Name</c> using
+ If <c>EventMgrName={global,GlobalName}</c>, the event manager is
+ registered globally as <c>GlobalName</c> using
<c>global:register_name/2</c>. If no name is provided,
- the event manager is not registered.</p>
+ the event manager is not registered.
+ If <c>EventMgrName={via,Module,ViaName}</c>, the event manager will
+ register with the registry represented by <c>Module</c>.
+ The <c>Module</c> callback should export the functions
+ <c>register_name/2</c>, <c>unregister_name/1</c>,
+ <c>whereis_name/1</c> and <c>send/2</c>, which should behave like the
+ corresponding functions in <c>global</c>. Thus,
+ <c>{via,global,GlobalName}</c> is a valid reference.</p>
<p>If the event manager is successfully created the function
returns <c>{ok,Pid}</c>, where <c>Pid</c> is the pid of
the event manager. If there already exists a process with
@@ -149,8 +158,10 @@ gen_event:stop -----> Module:terminate/2
<name>start(EventMgrName) -> Result</name>
<fsummary>Create a stand-alone event manager process.</fsummary>
<type>
- <v>EventMgrName = {local,Name} | {global,Name}</v>
+ <v>EventMgrName = {local,Name} | {global,GlobalName}
+ | {via,Module,ViaName}</v>
<v>&nbsp;Name = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Result = {ok,Pid} | {error,{already_started,Pid}}</v>
<v>&nbsp;Pid = pid()</v>
</type>
@@ -166,8 +177,10 @@ gen_event:stop -----> Module:terminate/2
<name>add_handler(EventMgrRef, Handler, Args) -> Result</name>
<fsummary>Add an event handler to a generic event manager.</fsummary>
<type>
- <v>EventMgr = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgr = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Handler = Module | {Module,Id}</v>
<v>&nbsp;Module = atom()</v>
<v>&nbsp;Id = term()</v>
@@ -185,8 +198,10 @@ gen_event:stop -----> Module:terminate/2
<item><c>Name</c>, if the event manager is locally registered,</item>
<item><c>{Name,Node}</c>, if the event manager is locally
registered at another node, or</item>
- <item><c>{global,Name}</c>, if the event manager is globally
+ <item><c>{global,GlobalName}</c>, if the event manager is globally
registered.</item>
+ <item><c>{via,Module,ViaName}</c>, if the event manager is registered
+ through an alternative process registry.</item>
</list>
<p><c>Handler</c> is the name of the callback module <c>Module</c> or
a tuple <c>{Module,Id}</c>, where <c>Id</c> is any term.
@@ -208,8 +223,10 @@ gen_event:stop -----> Module:terminate/2
<name>add_sup_handler(EventMgrRef, Handler, Args) -> Result</name>
<fsummary>Add a supervised event handler to a generic event manager.</fsummary>
<type>
- <v>EventMgr = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgr = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Handler = Module | {Module,Id}</v>
<v>&nbsp;Module = atom()</v>
<v>&nbsp;Id = term()</v>
@@ -253,8 +270,10 @@ gen_event:stop -----> Module:terminate/2
<name>sync_notify(EventMgrRef, Event) -> ok</name>
<fsummary>Notify an event manager about an event.</fsummary>
<type>
- <v>EventMgrRef = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Event = term()</v>
</type>
<desc>
@@ -278,8 +297,10 @@ gen_event:stop -----> Module:terminate/2
<name>call(EventMgrRef, Handler, Request, Timeout) -> Result</name>
<fsummary>Make a synchronous call to a generic event manager.</fsummary>
<type>
- <v>EventMgrRef = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Handler = Module | {Module,Id}</v>
<v>&nbsp;Module = atom()</v>
<v>&nbsp;Id = term()</v>
@@ -318,8 +339,10 @@ gen_event:stop -----> Module:terminate/2
<name>delete_handler(EventMgrRef, Handler, Args) -> Result</name>
<fsummary>Delete an event handler from a generic event manager.</fsummary>
<type>
- <v>EventMgrRef = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Handler = Module | {Module,Id}</v>
<v>&nbsp;Module = atom()</v>
<v>&nbsp;Id = term()</v>
@@ -346,8 +369,10 @@ gen_event:stop -----> Module:terminate/2
<name>swap_handler(EventMgrRef, {Handler1,Args1}, {Handler2,Args2}) -> Result</name>
<fsummary>Replace an event handler in a generic event manager.</fsummary>
<type>
- <v>EventMgrRef = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Handler1 = Handler2 = Module | {Module,Id}</v>
<v>&nbsp;Module = atom()</v>
<v>&nbsp;Id = term()</v>
@@ -390,8 +415,10 @@ gen_event:stop -----> Module:terminate/2
<name>swap_sup_handler(EventMgrRef, {Handler1,Args1}, {Handler2,Args2}) -> Result</name>
<fsummary>Replace an event handler in a generic event manager.</fsummary>
<type>
- <v>EventMgrRef = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Handler1 = Handler 2 = Module | {Module,Id}</v>
<v>&nbsp;Module = atom()</v>
<v>&nbsp;Id = term()</v>
@@ -412,8 +439,10 @@ gen_event:stop -----> Module:terminate/2
<name>which_handlers(EventMgrRef) -> [Handler]</name>
<fsummary>Return all event handlers installed in a generic event manager.</fsummary>
<type>
- <v>EventMgrRef = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Handler = Module | {Module,Id}</v>
<v>&nbsp;Module = atom()</v>
<v>&nbsp;Id = term()</v>
@@ -429,8 +458,10 @@ gen_event:stop -----> Module:terminate/2
<name>stop(EventMgrRef) -> ok</name>
<fsummary>Terminate a generic event manager.</fsummary>
<type>
- <v>EventMgrRef = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>Name = Node = atom()</v>
+ <v>GlobalName = ViaName = term()</v>
</type>
<desc>
<p>Terminates the event manager <c>EventMgrRef</c>. Before
diff --git a/lib/stdlib/doc/src/gen_fsm.xml b/lib/stdlib/doc/src/gen_fsm.xml
index 421eeb4fd3..73c1911f1e 100644
--- a/lib/stdlib/doc/src/gen_fsm.xml
+++ b/lib/stdlib/doc/src/gen_fsm.xml
@@ -84,9 +84,10 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
<name>start_link(FsmName, Module, Args, Options) -> Result</name>
<fsummary>Create a gen_fsm process in a supervision tree.</fsummary>
<type>
- <v>FsmName = {local,Name} | {global,GlobalName}</v>
+ <v>FsmName = {local,Name} | {global,GlobalName}
+ | {via,Module,ViaName}</v>
<v>&nbsp;Name = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Module = atom()</v>
<v>Args = term()</v>
<v>Options = [Option]</v>
@@ -113,8 +114,16 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
locally as <c>Name</c> using <c>register/2</c>.
If <c>FsmName={global,GlobalName}</c>, the gen_fsm is
registered globally as <c>GlobalName</c> using
- <c>global:register_name/2</c>. If no name is provided,
- the gen_fsm is not registered.</p>
+ <c>global:register_name/2</c>.
+ If <c>EventMgrName={via,Module,ViaName}</c>, the event manager will
+ register with the registry represented by <c>Module</c>.
+ The <c>Module</c> callback should export the functions
+ <c>register_name/2</c>, <c>unregister_name/1</c>,
+ <c>whereis_name/1</c> and <c>send/2</c>, which should behave like the
+ corresponding functions in <c>global</c>. Thus,
+ <c>{via,global,GlobalName}</c> is a valid reference.</p>
+ <p>If no name is provided,
+ the gen_fsm is not registered.</p>
<p><c>Module</c> is the name of the callback module.</p>
<p><c>Args</c> is an arbitrary term which is passed as
the argument to <c>Module:init/1</c>.</p>
@@ -154,9 +163,10 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
<name>start(FsmName, Module, Args, Options) -> Result</name>
<fsummary>Create a stand-alone gen_fsm process.</fsummary>
<type>
- <v>FsmName = {local,Name} | {global,GlobalName}</v>
+ <v>FsmName = {local,Name} | {global,GlobalName}
+ | {via,Module,ViaName}</v>
<v>&nbsp;Name = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Module = atom()</v>
<v>Args = term()</v>
<v>Options = [Option]</v>
@@ -180,9 +190,10 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
<name>send_event(FsmRef, Event) -> ok</name>
<fsummary>Send an event asynchronously to a generic FSM.</fsummary>
<type>
- <v>FsmRef = Name | {Name,Node} | {global,GlobalName} | pid()</v>
+ <v>FsmRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Event = term()</v>
</type>
<desc>
@@ -196,9 +207,11 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
<item>the pid,</item>
<item><c>Name</c>, if the gen_fsm is locally registered,</item>
<item><c>{Name,Node}</c>, if the gen_fsm is locally
- registered at another node, or</item>
- <item><c>{global,GlobalName}</c>, if the gen_fsm is globally
- registered.</item>
+ registered at another node, or</item>
+ <item><c>{global,GlobalName}</c>, if the gen_fsm is globally
+ registered.</item>
+ <item><c>{via,Module,ViaName}</c>, if the event manager is registered
+ through an alternative process registry.</item>
</list>
<p><c>Event</c> is an arbitrary term which is passed as one of
the arguments to <c>Module:StateName/2</c>.</p>
@@ -208,9 +221,10 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
<name>send_all_state_event(FsmRef, Event) -> ok</name>
<fsummary>Send an event asynchronously to a generic FSM.</fsummary>
<type>
- <v>FsmRef = Name | {Name,Node} | {global,GlobalName} | pid()</v>
+ <v>FsmRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Event = term()</v>
</type>
<desc>
@@ -232,9 +246,10 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
<name>sync_send_event(FsmRef, Event, Timeout) -> Reply</name>
<fsummary>Send an event synchronously to a generic FSM.</fsummary>
<type>
- <v>FsmRef = Name | {Name,Node} | {global,GlobalName} | pid()</v>
+ <v>FsmRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Event = term()</v>
<v>Timeout = int()>0 | infinity</v>
<v>Reply = term()</v>
@@ -264,9 +279,10 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
<name>sync_send_all_state_event(FsmRef, Event, Timeout) -> Reply</name>
<fsummary>Send an event synchronously to a generic FSM.</fsummary>
<type>
- <v>FsmRef = Name | {Name,Node} | {global,GlobalName} | pid()</v>
+ <v>FsmRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Name = Node = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Event = term()</v>
<v>Timeout = int()>0 | infinity</v>
<v>Reply = term()</v>
@@ -388,9 +404,10 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
<v>&nbsp;&nbsp;&nbsp;&nbsp;| {log_to_file,FileName} | {install,{Func,FuncState}}</v>
<v>StateName = atom()</v>
<v>StateData = term()</v>
- <v>FsmName = {local,Name} | {global,GlobalName}</v>
+ <v>FsmName = {local,Name} | {global,GlobalName}
+ | {via,Module,ViaName}</v>
<v>&nbsp;Name = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Timeout = int() | infinity</v>
</type>
<desc>
diff --git a/lib/stdlib/doc/src/gen_server.xml b/lib/stdlib/doc/src/gen_server.xml
index edeb7dff91..9edff1b9cf 100644
--- a/lib/stdlib/doc/src/gen_server.xml
+++ b/lib/stdlib/doc/src/gen_server.xml
@@ -83,9 +83,10 @@ gen_server:abcast -----> Module:handle_cast/2
<name>start_link(ServerName, Module, Args, Options) -> Result</name>
<fsummary>Create a gen_server process in a supervision tree.</fsummary>
<type>
- <v>ServerName = {local,Name} | {global,GlobalName}</v>
+ <v>ServerName = {local,Name} | {global,GlobalName}
+ | {via,Module,ViaName}</v>
<v>&nbsp;Name = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Module = atom()</v>
<v>Args = term()</v>
<v>Options = [Option]</v>
@@ -111,14 +112,22 @@ gen_server:abcast -----> Module:handle_cast/2
If <c>ServerName={global,GlobalName}</c> the gen_server is
registered globally as <c>GlobalName</c> using
<c>global:register_name/2</c>. If no name is provided,
- the gen_server is not registered.</p>
+ the gen_server is not registered.
+ If <c>EventMgrName={via,Module,ViaName}</c>, the event manager will
+ register with the registry represented by <c>Module</c>.
+ The <c>Module</c> callback should export the functions
+ <c>register_name/2</c>, <c>unregister_name/1</c>,
+ <c>whereis_name/1</c> and <c>send/2</c>, which should behave like the
+ corresponding functions in <c>global</c>. Thus,
+ <c>{via,global,GlobalName}</c> is a valid reference.</p>
<p><c>Module</c> is the name of the callback module.</p>
<p><c>Args</c> is an arbitrary term which is passed as
the argument to <c>Module:init/1</c>.</p>
<p>If the option <c>{timeout,Time}</c> is present,
the gen_server is allowed to spend <c>Time</c> milliseconds
initializing or it will be terminated and the start function
- will return <c>{error,timeout}</c>.</p>
+ will return <c>{error,timeout}</c>.
+ </p>
<p>If the option <c>{debug,Dbgs}</c> is present,
the corresponding <c>sys</c> function will be called for each
item in <c>Dbgs</c>. See
@@ -151,9 +160,10 @@ gen_server:abcast -----> Module:handle_cast/2
<name>start(ServerName, Module, Args, Options) -> Result</name>
<fsummary>Create a stand-alone gen_server process.</fsummary>
<type>
- <v>ServerName = {local,Name} | {global,GlobalName}</v>
+ <v>ServerName = {local,Name} | {global,GlobalName}
+ | {via,Module,ViaName}</v>
<v>&nbsp;Name = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Module = atom()</v>
<v>Args = term()</v>
<v>Options = [Option]</v>
@@ -178,9 +188,10 @@ gen_server:abcast -----> Module:handle_cast/2
<name>call(ServerRef, Request, Timeout) -> Reply</name>
<fsummary>Make a synchronous call to a generic server.</fsummary>
<type>
- <v>ServerRef = Name | {Name,Node} | {global,GlobalName} | pid()</v>
+ <v>ServerRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Node = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Request = term()</v>
<v>Timeout = int()>0 | infinity</v>
<v>Reply = term()</v>
@@ -198,6 +209,8 @@ gen_server:abcast -----> Module:handle_cast/2
registered at another node, or</item>
<item><c>{global,GlobalName}</c>, if the gen_server is
globally registered.</item>
+ <item><c>{via,Module,ViaName}</c>, if the gen_server is
+ registered through an alternative process registry.</item>
</list>
<p><c>Request</c> is an arbitrary term which is passed as one of
the arguments to <c>Module:handle_call/3</c>.</p>
@@ -281,9 +294,10 @@ gen_server:abcast -----> Module:handle_cast/2
<name>cast(ServerRef, Request) -> ok</name>
<fsummary>Send an asynchronous request to a generic server.</fsummary>
<type>
- <v>ServerRef = Name | {Name,Node} | {global,GlobalName} | pid()</v>
+ <v>ServerRef = Name | {Name,Node} | {global,GlobalName}
+ | {via,Module,ViaName} | pid()</v>
<v>&nbsp;Node = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Request = term()</v>
</type>
<desc>
@@ -355,9 +369,10 @@ gen_server:abcast -----> Module:handle_cast/2
<v>&nbsp;&nbsp;&nbsp;Dbg = trace | log | statistics</v>
<v>&nbsp;&nbsp;&nbsp;&nbsp;| {log_to_file,FileName} | {install,{Func,FuncState}}</v>
<v>State = term()</v>
- <v>ServerName = {local,Name} | {global,GlobalName}</v>
+ <v>ServerName = {local,Name} | {global,GlobalName}
+ | {via,Module,ViaName}</v>
<v>&nbsp;Name = atom()</v>
- <v>&nbsp;GlobalName = term()</v>
+ <v>&nbsp;GlobalName = ViaName = term()</v>
<v>Timeout = int() | infinity</v>
</type>
<desc>
diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml
index 7042c84437..96a0942710 100644
--- a/lib/stdlib/doc/src/lists.xml
+++ b/lib/stdlib/doc/src/lists.xml
@@ -663,7 +663,7 @@ splitwith(Pred, List) ->
<desc>
<p>Returns the sub-list of <c><anno>List1</anno></c> starting at position 1
and with (max) <c><anno>Len</anno></c> elements. It is not an error for
- <c><anno>Len</anno></c> to exceed the length of the list -- in that case
+ <c><anno>Len</anno></c> to exceed the length of the list, in that case
the whole list is returned.</p>
</desc>
</func>
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index 33a7f5bb6a..9b41672bf1 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -55,7 +55,8 @@
monitoring its child processes. The basic idea of a supervisor is
that it should keep its child processes alive by restarting them
when necessary.</p>
- <p>The children of a supervisor is defined as a list of <em>child specifications</em>. When the supervisor is started, the child
+ <p>The children of a supervisor is defined as a list of
+ <em>child specifications</em>. When the supervisor is started, the child
processes are started in order from left to right according to
this list. When the supervisor terminates, it first terminates
its child processes in reversed start order, from right to left.</p>
@@ -100,7 +101,8 @@
</item>
</list>
<p>To prevent a supervisor from getting into an infinite loop of
- child process terminations and restarts, a <em>maximum restart frequency</em> is defined using two integer values <c>MaxR</c>
+ child process terminations and restarts, a <em>maximum restart frequency</em>
+ is defined using two integer values <c>MaxR</c>
and <c>MaxT</c>. If more than <c>MaxR</c> restarts occur within
<c>MaxT</c> seconds, the supervisor terminates all child
processes and then itself.
@@ -114,7 +116,7 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
M = F = atom()
A = [term()]
Restart = permanent | transient | temporary
- Shutdown = brutal_kill | int()>=0 | infinity
+ Shutdown = brutal_kill | int()>0 | infinity
Type = worker | supervisor
Modules = [Module] | dynamic
Module = atom()</pre>
@@ -197,7 +199,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
the callback module, if the child process is a supervisor,
gen_server or gen_fsm. If the child process is an event
manager (gen_event) with a dynamic set of callback modules,
- <c>Modules</c> should be <c>dynamic</c>. See <em>OTP Design Principles</em> for more information about release handling.</p>
+ <c>Modules</c> should be <c>dynamic</c>. See <em>OTP Design Principles</em>
+ for more information about release handling.</p>
</item>
<item>
<p>Internally, the supervisor also keeps track of the pid
@@ -264,8 +267,14 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
<p>If <c><anno>SupName</anno>={local,Name}</c> the supervisor is registered
locally as <c>Name</c> using <c>register/2</c>. If
<c><anno>SupName</anno>={global,Name}</c> the supervisor is registered
- globally as <c>Name</c> using <c>global:register_name/2</c>.
- If no name is provided, the supervisor is not registered.</p>
+ globally as <c>Name</c> using <c>global:register_name/2</c>. If
+ <c><anno>SupName</anno>={via,Module,Name}</c> the supervisor
+ is registered as <c>Name</c> using the registry represented by
+ <c>Module</c>. The <c>Module</c> callback should export the functions
+ <c>register_name/2</c>, <c>unregister_name/1</c> and <c>send/2</c>,
+ which should behave like the corresponding functions in <c>global</c>.
+ Thus, <c>{via,global,Name}</c> is a valid reference.</p>
+ <p>If no name is provided, the supervisor is not registered.</p>
<p><c><anno>Module</anno></c> is the name of the callback module.</p>
<p><c><anno>Args</anno></c> is an arbitrary term which is passed as
the argument to <c><anno>Module</anno>:init/1</c>.</p>
@@ -308,6 +317,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
registered at another node, or</item>
<item><c>{global,Name}</c>, if the supervisor is globally
registered.</item>
+ <item><c>{via,Module,Name}</c>, if the supervisor is registered
+ through an alternative process registry.</item>
</list>
<p><c><anno>ChildSpec</anno></c> should be a valid child specification
(unless the supervisor is a <c>simple_one_for_one</c>
@@ -391,10 +402,11 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
<c>SupRef</c>.</p>
<p>If successful, the function returns <c>ok</c>. If the child
specification identified by <c><anno>Id</anno></c> exists but
- the corresponding child process is running, the function
- returns <c>{error,running}</c>. If the child specification
- identified by <c><anno>Id</anno></c> does not exist, the function returns
- <c>{error,not_found}</c>.</p>
+ the corresponding child process is running or about to be restarted,
+ the function returns <c>{error,running}</c> or
+ <c>{error,restarting}</c> respectively. If the child specification
+ identified by <c><anno>Id</anno></c> does not exist, the function
+ returns <c>{error,not_found}</c>.</p>
</desc>
</func>
<func>
@@ -434,7 +446,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
</func>
<func>
<name name="which_children" arity="1"/>
- <fsummary>Return information about all children specifications and child processes belonging to a supervisor.</fsummary>
+ <fsummary>Return information about all children specifications and
+ child processes belonging to a supervisor.</fsummary>
<desc>
<p>Returns a newly created list with information about all child
specifications and child processes belonging to
@@ -454,7 +467,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
</item>
<item>
<p><c><anno>Child</anno></c> - the pid of the corresponding child
- process, or <c>undefined</c> if there is no such process.</p>
+ process, the atom <c>restarting</c> if the process is about to be
+ restarted or <c>undefined</c> if there is no such process.</p>
</item>
<item>
<p><c><anno>Type</anno></c> - as defined in the child specification.</p>
@@ -467,7 +481,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
</func>
<func>
<name name="count_children" arity="1"/>
- <fsummary>Return counts for the number of childspecs, active children, supervisors and workers.</fsummary>
+ <fsummary>Return counts for the number of childspecs, active children,
+ supervisors and workers.</fsummary>
<desc>
<p>Returns a property list (see <c>proplists</c>) containing the
counts for each of the following elements of the supervisor's
@@ -517,7 +532,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
<v>Args = term()</v>
<v>Result = {ok,{{RestartStrategy,MaxR,MaxT},[ChildSpec]}} | ignore</v>
<v>&nbsp;RestartStrategy = <seealso marker="#type-strategy">strategy()</seealso></v>
- <v>&nbsp;MaxR = MaxT = integer()>=0</v>
+ <v>&nbsp;MaxR = integer()>=0</v>
+ <v>&nbsp;MaxT = integer()>0</v>
<v>&nbsp;ChildSpec = <seealso marker="#type-child_spec">child_spec()</seealso></v>
</type>
<desc>
diff --git a/lib/stdlib/doc/src/supervisor_bridge.xml b/lib/stdlib/doc/src/supervisor_bridge.xml
index c1a5e7947f..f6712d6c1d 100644
--- a/lib/stdlib/doc/src/supervisor_bridge.xml
+++ b/lib/stdlib/doc/src/supervisor_bridge.xml
@@ -63,6 +63,13 @@
If <c><anno>SupBridgeName</anno>={global,<anno>Name</anno>}</c> the supervisor_bridge is
registered globally as <c><anno>Name</anno></c> using
<c>global:register_name/2</c>.
+ If <c><anno>SupBridgeName</anno>={via,<anno>Module</anno>,<anno>Name</anno>}</c> the supervisor_bridge is
+ registered as <c><anno>Name</anno></c> using a registry represented
+ by <anno>Module</anno>. The <c>Module</c> callback should export
+ the functions <c>register_name/2</c>, <c>unregister_name/1</c>
+ and <c>send/2</c>, which should behave like the
+ corresponding functions in <c>global</c>. Thus,
+ <c>{via,global,GlobalName}</c> is a valid reference.
If no name is provided, the supervisor_bridge is not registered.
If there already exists a process with the specified
<c><anno>SupBridgeName</anno></c> the function returns
diff --git a/lib/stdlib/src/digraph_utils.erl b/lib/stdlib/src/digraph_utils.erl
index e221be15a1..807b5c12a1 100644
--- a/lib/stdlib/src/digraph_utils.erl
+++ b/lib/stdlib/src/digraph_utils.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -370,5 +370,5 @@ condense('$end_of_table', _T, _SC, _G, _SCG, _I2C) ->
condense(I, T, SC, G, SCG, I2C) ->
[{_,C}] = ets:lookup(I2C, I),
digraph:add_vertex(SCG, C),
- digraph:add_edge(SCG, SC, C),
+ [digraph:add_edge(SCG, SC, C) || C =/= SC],
condense(ets:next(T, I), T, SC, G, SCG, I2C).
diff --git a/lib/stdlib/src/gen.erl b/lib/stdlib/src/gen.erl
index 5d803091b6..42555aedd7 100644
--- a/lib/stdlib/src/gen.erl
+++ b/lib/stdlib/src/gen.erl
@@ -36,7 +36,7 @@
%%-----------------------------------------------------------------
-type linkage() :: 'link' | 'nolink'.
--type emgr_name() :: {'local', atom()} | {'global', term()}.
+-type emgr_name() :: {'local', atom()} | {'global', term()} | {via, atom(), term()}.
-type start_ret() :: {'ok', pid()} | 'ignore' | {'error', term()}.
@@ -53,7 +53,7 @@
%% start(GenMod, LinkP, Name, Mod, Args, Options)
%% GenMod = atom(), callback module implementing the 'real' fsm
%% LinkP = link | nolink
-%% Name = {local, atom()} | {global, term()}
+%% Name = {local, atom()} | {global, term()} | {via, atom(), term()}
%% Args = term(), init arguments (to Mod:init/1)
%% Options = [{timeout, Timeout} | {debug, [Flag]} | {spawn_opt, OptionList}]
%% Flag = trace | log | {logfile, File} | statistics | debug
@@ -158,9 +158,12 @@ call(Name, Label, Request, Timeout)
exit(noproc)
end;
%% Global by name
-call({global, _Name}=Process, Label, Request, Timeout)
- when Timeout =:= infinity;
- is_integer(Timeout), Timeout >= 0 ->
+call(Process, Label, Request, Timeout)
+ when ((tuple_size(Process) == 2 andalso element(1, Process) == global)
+ orelse
+ (tuple_size(Process) == 3 andalso element(1, Process) == via))
+ andalso
+ (Timeout =:= infinity orelse (is_integer(Timeout) andalso Timeout >= 0)) ->
case where(Process) of
Pid when is_pid(Pid) ->
Node = node(Pid),
@@ -274,6 +277,7 @@ reply({To, Tag}, Reply) ->
%%% Misc. functions.
%%%-----------------------------------------------------------------
where({global, Name}) -> global:whereis_name(Name);
+where({via, Module, Name}) -> Module:whereis_name(Name);
where({local, Name}) -> whereis(Name).
name_register({local, Name} = LN) ->
@@ -287,8 +291,16 @@ name_register({global, Name} = GN) ->
case global:register_name(Name, self()) of
yes -> true;
no -> {false, where(GN)}
+ end;
+name_register({via, Module, Name} = GN) ->
+ case Module:register_name(Name, self()) of
+ yes ->
+ true;
+ no ->
+ {false, where(GN)}
end.
+
timeout(Options) ->
case opt(timeout, Options) of
{ok, Time} ->
diff --git a/lib/stdlib/src/gen_event.erl b/lib/stdlib/src/gen_event.erl
index 3317b30e5c..ca05df20c0 100644
--- a/lib/stdlib/src/gen_event.erl
+++ b/lib/stdlib/src/gen_event.erl
@@ -107,8 +107,10 @@
-type add_handler_ret() :: ok | term() | {'EXIT',term()}.
-type del_handler_ret() :: ok | term() | {'EXIT',term()}.
--type emgr_name() :: {'local', atom()} | {'global', atom()}.
--type emgr_ref() :: atom() | {atom(), atom()} | {'global', atom()} | pid().
+-type emgr_name() :: {'local', atom()} | {'global', atom()}
+ | {'via', atom(), term()}.
+-type emgr_ref() :: atom() | {atom(), atom()} | {'global', atom()}
+ | {'via', atom(), term()} | pid().
-type start_ret() :: {'ok', pid()} | {'error', term()}.
%%---------------------------------------------------------------------------
@@ -143,6 +145,7 @@ init_it(Starter, Parent, Name0, _, _, Options) ->
name({local,Name}) -> Name;
name({global,Name}) -> Name;
+name({via,_, Name}) -> Name;
name(Pid) when is_pid(Pid) -> Pid.
-spec add_handler(emgr_ref(), handler(), term()) -> term().
@@ -209,6 +212,9 @@ call1(M, Handler, Query, Timeout) ->
send({global, Name}, Cmd) ->
catch global:send(Name, Cmd),
ok;
+send({via, Mod, Name}, Cmd) ->
+ catch Mod:send(Name, Cmd),
+ ok;
send(M, Cmd) ->
M ! Cmd,
ok.
diff --git a/lib/stdlib/src/gen_fsm.erl b/lib/stdlib/src/gen_fsm.erl
index 80866c0806..51dc0bcee2 100644
--- a/lib/stdlib/src/gen_fsm.erl
+++ b/lib/stdlib/src/gen_fsm.erl
@@ -165,7 +165,7 @@
%%% start(Name, Mod, Args, Options)
%%% start_link(Mod, Args, Options)
%%% start_link(Name, Mod, Args, Options) where:
-%%% Name ::= {local, atom()} | {global, atom()}
+%%% Name ::= {local, atom()} | {global, atom()} | {via, atom(), term()}
%%% Mod ::= atom(), callback module implementing the 'real' fsm
%%% Args ::= term(), init arguments (to Mod:init/1)
%%% Options ::= [{debug, [Flag]}]
@@ -191,6 +191,9 @@ start_link(Name, Mod, Args, Options) ->
send_event({global, Name}, Event) ->
catch global:send(Name, {'$gen_event', Event}),
ok;
+send_event({via, Mod, Name}, Event) ->
+ catch Mod:send(Name, {'$gen_event', Event}),
+ ok;
send_event(Name, Event) ->
Name ! {'$gen_event', Event},
ok.
@@ -214,6 +217,9 @@ sync_send_event(Name, Event, Timeout) ->
send_all_state_event({global, Name}, Event) ->
catch global:send(Name, {'$gen_all_state_event', Event}),
ok;
+send_all_state_event({via, Mod, Name}, Event) ->
+ catch Mod:send(Name, {'$gen_all_state_event', Event}),
+ ok;
send_all_state_event(Name, Event) ->
Name ! {'$gen_all_state_event', Event},
ok.
@@ -273,7 +279,10 @@ cancel_timer(Ref) ->
enter_loop(Mod, Options, StateName, StateData) ->
enter_loop(Mod, Options, StateName, StateData, self(), infinity).
-enter_loop(Mod, Options, StateName, StateData, ServerName = {_,_}) ->
+enter_loop(Mod, Options, StateName, StateData, {Scope,_} = ServerName)
+ when Scope == local; Scope == global ->
+ enter_loop(Mod, Options, StateName, StateData, ServerName,infinity);
+enter_loop(Mod, Options, StateName, StateData, {via,_,_} = ServerName) ->
enter_loop(Mod, Options, StateName, StateData, ServerName,infinity);
enter_loop(Mod, Options, StateName, StateData, Timeout) ->
enter_loop(Mod, Options, StateName, StateData, self(), Timeout).
@@ -303,6 +312,15 @@ get_proc_name({global, Name}) ->
Name;
_Pid ->
exit(process_not_registered_globally)
+ end;
+get_proc_name({via, Mod, Name}) ->
+ case Mod:whereis_name(Name) of
+ undefined ->
+ exit({process_not_registered_via, Mod});
+ Pid when Pid =:= self() ->
+ Name;
+ _Pid ->
+ exit({process_not_registered_via, Mod})
end.
get_parent() ->
@@ -367,12 +385,15 @@ init_it(Starter, Parent, Name0, Mod, Args, Options) ->
name({local,Name}) -> Name;
name({global,Name}) -> Name;
+name({via,_, Name}) -> Name;
name(Pid) when is_pid(Pid) -> Pid.
unregister_name({local,Name}) ->
_ = (catch unregister(Name));
unregister_name({global,Name}) ->
_ = global:unregister_name(Name);
+unregister_name({via, Mod, Name}) ->
+ _ = Mod:unregister_name(Name);
unregister_name(Pid) when is_pid(Pid) ->
Pid.
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl
index f720ec15f5..b384e8baf7 100644
--- a/lib/stdlib/src/gen_server.erl
+++ b/lib/stdlib/src/gen_server.erl
@@ -142,7 +142,7 @@
%%% start(Name, Mod, Args, Options)
%%% start_link(Mod, Args, Options)
%%% start_link(Name, Mod, Args, Options) where:
-%%% Name ::= {local, atom()} | {global, atom()}
+%%% Name ::= {local, atom()} | {global, atom()} | {via, atom(), term()}
%%% Mod ::= atom(), callback module implementing the 'real' server
%%% Args ::= term(), init arguments (to Mod:init/1)
%%% Options ::= [{timeout, Timeout} | {debug, [Flag]}]
@@ -194,6 +194,9 @@ call(Name, Request, Timeout) ->
cast({global,Name}, Request) ->
catch global:send(Name, cast_msg(Request)),
ok;
+cast({via, Mod, Name}, Request) ->
+ catch Mod:send(Name, cast_msg(Request)),
+ ok;
cast({Name,Node}=Dest, Request) when is_atom(Name), is_atom(Node) ->
do_cast(Dest, Request);
cast(Dest, Request) when is_atom(Dest) ->
@@ -266,7 +269,11 @@ multi_call(Nodes, Name, Req, Timeout)
enter_loop(Mod, Options, State) ->
enter_loop(Mod, Options, State, self(), infinity).
-enter_loop(Mod, Options, State, ServerName = {_, _}) ->
+enter_loop(Mod, Options, State, ServerName = {Scope, _})
+ when Scope == local; Scope == local ->
+ enter_loop(Mod, Options, State, ServerName, infinity);
+
+enter_loop(Mod, Options, State, ServerName = {via, _, _}) ->
enter_loop(Mod, Options, State, ServerName, infinity);
enter_loop(Mod, Options, State, Timeout) ->
@@ -327,12 +334,15 @@ init_it(Starter, Parent, Name0, Mod, Args, Options) ->
name({local,Name}) -> Name;
name({global,Name}) -> Name;
+name({via,_, Name}) -> Name;
name(Pid) when is_pid(Pid) -> Pid.
unregister_name({local,Name}) ->
_ = (catch unregister(Name));
unregister_name({global,Name}) ->
_ = global:unregister_name(Name);
+unregister_name({via, Mod, Name}) ->
+ _ = Mod:unregister_name(Name);
unregister_name(Pid) when is_pid(Pid) ->
Pid.
@@ -827,6 +837,15 @@ get_proc_name({global, Name}) ->
Name;
_Pid ->
exit(process_not_registered_globally)
+ end;
+get_proc_name({via, Mod, Name}) ->
+ case Mod:whereis_name(Name) of
+ undefined ->
+ exit({process_not_registered_via, Mod});
+ Pid when Pid =:= self() ->
+ Name;
+ _Pid ->
+ exit({process_not_registered_via, Mod})
end.
get_parent() ->
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index ac5b078c29..c10da1989c 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -28,8 +28,9 @@
check_childspecs/1]).
%% Internal exports
--export([init/1, handle_call/3, handle_info/2, terminate/2, code_change/3]).
--export([handle_cast/2]).
+-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
+ terminate/2, code_change/3]).
+-export([try_again_restart/2]).
%%--------------------------------------------------------------------------
@@ -37,7 +38,7 @@
%%--------------------------------------------------------------------------
--type child() :: 'undefined' | pid() | [pid()].
+-type child() :: 'undefined' | pid().
-type child_id() :: term().
-type mfargs() :: {M :: module(), F :: atom(), A :: [term()] | undefined}.
-type modules() :: [module()] | 'dynamic'.
@@ -62,8 +63,8 @@
%%--------------------------------------------------------------------------
-record(child, {% pid is undefined when child is not running
- pid = undefined :: child(),
- name,
+ pid = undefined :: child() | {restarting,pid()} | [pid()],
+ name :: child_id(),
mfargs :: mfargs(),
restart_type :: restart(),
shutdown :: shutdown(),
@@ -95,6 +96,8 @@
[ChildSpec :: child_spec()]}}
| ignore.
+-define(restarting(_Pid_), {restarting,_Pid_}).
+
%%% ---------------------------------------------------
%%% This is a general process supervisor built upon gen_server.erl.
%%% Servers/processes should/could also be built using gen_server.erl.
@@ -139,7 +142,8 @@ start_child(Supervisor, ChildSpec) ->
Result :: {'ok', Child :: child()}
| {'ok', Child :: child(), Info :: term()}
| {'error', Error},
- Error :: 'running' | 'not_found' | 'simple_one_for_one' | term().
+ Error :: 'running' | 'restarting' | 'not_found' | 'simple_one_for_one' |
+ term().
restart_child(Supervisor, Name) ->
call(Supervisor, {restart_child, Name}).
@@ -147,7 +151,7 @@ restart_child(Supervisor, Name) ->
SupRef :: sup_ref(),
Id :: child_id(),
Result :: 'ok' | {'error', Error},
- Error :: 'running' | 'not_found' | 'simple_one_for_one'.
+ Error :: 'running' | 'restarting' | 'not_found' | 'simple_one_for_one'.
delete_child(Supervisor, Name) ->
call(Supervisor, {delete_child, Name}).
@@ -169,7 +173,7 @@ terminate_child(Supervisor, Name) ->
-spec which_children(SupRef) -> [{Id,Child,Type,Modules}] when
SupRef :: sup_ref(),
Id :: child_id() | undefined,
- Child :: child(),
+ Child :: child() | 'restarting',
Type :: worker(),
Modules :: modules().
which_children(Supervisor) ->
@@ -198,6 +202,17 @@ check_childspecs(ChildSpecs) when is_list(ChildSpecs) ->
end;
check_childspecs(X) -> {error, {badarg, X}}.
+%%%-----------------------------------------------------------------
+%%% Called by timer:apply_after from restart/2
+-spec try_again_restart(SupRef, Child) -> ok when
+ SupRef :: sup_ref(),
+ Child :: child_id() | pid().
+try_again_restart(Supervisor, Child) ->
+ cast(Supervisor, {try_again_restart, Child}).
+
+cast(Supervisor, Req) ->
+ gen_server:cast(Supervisor, Req).
+
%%% ---------------------------------------------------
%%%
%%% Initialize the supervisor.
@@ -384,6 +399,8 @@ handle_call({restart_child, Name}, _From, State) ->
Error ->
{reply, Error, State}
end;
+ {value, #child{pid=?restarting(_)}} ->
+ {reply, {error, restarting}, State};
{value, _} ->
{reply, {error, running}, State};
_ ->
@@ -395,6 +412,8 @@ handle_call({delete_child, Name}, _From, State) ->
{value, Child} when Child#child.pid =:= undefined ->
NState = remove_child(Child, State),
{reply, ok, NState};
+ {value, #child{pid=?restarting(_)}} ->
+ {reply, {error, restarting}, State};
{value, _} ->
{reply, {error, running}, State};
_ ->
@@ -413,13 +432,17 @@ handle_call(which_children, _From, #state{children = [#child{restart_type = RTyp
child_type = CT,
modules = Mods}]} =
State) when ?is_simple(State) ->
- Reply = lists:map(fun({Pid, _}) -> {undefined, Pid, CT, Mods} end,
+ Reply = lists:map(fun({?restarting(_),_}) -> {undefined,restarting,CT,Mods};
+ ({Pid, _}) -> {undefined, Pid, CT, Mods} end,
?DICT:to_list(dynamics_db(RType, State#state.dynamics))),
{reply, Reply, State};
handle_call(which_children, _From, State) ->
Resp =
- lists:map(fun(#child{pid = Pid, name = Name,
+ lists:map(fun(#child{pid = ?restarting(_), name = Name,
+ child_type = ChildType, modules = Mods}) ->
+ {Name, restarting, ChildType, Mods};
+ (#child{pid = Pid, name = Name,
child_type = ChildType, modules = Mods}) ->
{Name, Pid, ChildType, Mods}
end,
@@ -432,8 +455,11 @@ handle_call(count_children, _From, #state{children = [#child{restart_type = temp
when ?is_simple(State) ->
{Active, Count} =
?SETS:fold(fun(Pid, {Alive, Tot}) ->
- if is_pid(Pid) -> {Alive+1, Tot +1};
- true -> {Alive, Tot + 1} end
+ case is_pid(Pid) andalso is_process_alive(Pid) of
+ true ->{Alive+1, Tot +1};
+ false ->
+ {Alive, Tot + 1}
+ end
end, {0, 0}, dynamics_db(temporary, State#state.dynamics)),
Reply = case CT of
supervisor -> [{specs, 1}, {active, Active},
@@ -448,8 +474,12 @@ handle_call(count_children, _From, #state{children = [#child{restart_type = RTy
when ?is_simple(State) ->
{Active, Count} =
?DICT:fold(fun(Pid, _Val, {Alive, Tot}) ->
- if is_pid(Pid) -> {Alive+1, Tot +1};
- true -> {Alive, Tot + 1} end
+ case is_pid(Pid) andalso is_process_alive(Pid) of
+ true ->
+ {Alive+1, Tot +1};
+ false ->
+ {Alive, Tot + 1}
+ end
end, {0, 0}, dynamics_db(RType, State#state.dynamics)),
Reply = case CT of
supervisor -> [{specs, 1}, {active, Active},
@@ -486,14 +516,42 @@ count_child(#child{pid = Pid, child_type = supervisor},
end.
-%%% Hopefully cause a function-clause as there is no API function
-%%% that utilizes cast.
--spec handle_cast('null', state()) -> {'noreply', state()}.
+%%% If a restart attempt failed, this message is sent via
+%%% timer:apply_after(0,...) in order to give gen_server the chance to
+%%% check it's inbox before trying again.
+-spec handle_cast({try_again_restart, child_id() | pid()}, state()) ->
+ {'noreply', state()} | {stop, shutdown, state()}.
-handle_cast(null, State) ->
- error_logger:error_msg("ERROR: Supervisor received cast-message 'null'~n",
- []),
- {noreply, State}.
+handle_cast({try_again_restart,Pid}, #state{children=[Child]}=State)
+ when ?is_simple(State) ->
+ RT = Child#child.restart_type,
+ RPid = restarting(Pid),
+ case dynamic_child_args(RPid, dynamics_db(RT, State#state.dynamics)) of
+ {ok, Args} ->
+ {M, F, _} = Child#child.mfargs,
+ NChild = Child#child{pid = RPid, mfargs = {M, F, Args}},
+ case restart(NChild,State) of
+ {ok, State1} ->
+ {noreply, State1};
+ {shutdown, State1} ->
+ {stop, shutdown, State1}
+ end;
+ error ->
+ {noreply, State}
+ end;
+
+handle_cast({try_again_restart,Name}, State) ->
+ case lists:keyfind(Name,#child.name,State#state.children) of
+ Child = #child{pid=?restarting(_)} ->
+ case restart(Child,State) of
+ {ok, State1} ->
+ {noreply, State1};
+ {shutdown, State1} ->
+ {stop, shutdown, State1}
+ end;
+ _ ->
+ {noreply,State}
+ end.
%%
%% Take care of terminated children.
@@ -566,13 +624,12 @@ check_flags(What) ->
{bad_flags, What}.
update_childspec(State, StartSpec) when ?is_simple(State) ->
- case check_startspec(StartSpec) of
- {ok, [Child]} ->
- {ok, State#state{children = [Child]}};
- Error ->
- {error, Error}
- end;
-
+ case check_startspec(StartSpec) of
+ {ok, [Child]} ->
+ {ok, State#state{children = [Child]}};
+ Error ->
+ {error, Error}
+ end;
update_childspec(State, StartSpec) ->
case check_startspec(StartSpec) of
{ok, Children} ->
@@ -592,7 +649,7 @@ update_childspec1([Child|OldC], Children, KeepOld) ->
end;
update_childspec1([], Children, KeepOld) ->
%% Return them in (kept) reverse start order.
- lists:reverse(Children ++ KeepOld).
+ lists:reverse(Children ++ KeepOld).
update_chsp(OldCh, Children) ->
case lists:map(fun(Ch) when OldCh#child.name =:= Ch#child.name ->
@@ -624,7 +681,7 @@ handle_start_child(Child, State) ->
{error, What} ->
{{error, {What, Child}}, State}
end;
- {value, OldChild} when OldChild#child.pid =/= undefined ->
+ {value, OldChild} when is_pid(OldChild#child.pid) ->
{{error, {already_started, OldChild#child.pid}}, State};
{value, _OldChild} ->
{{error, already_present}, State}
@@ -678,7 +735,21 @@ do_restart(temporary, Reason, Child, State) ->
restart(Child, State) ->
case add_restart(State) of
{ok, NState} ->
- restart(NState#state.strategy, Child, NState);
+ case restart(NState#state.strategy, Child, NState) of
+ {try_again,NState2} ->
+ %% Leaving control back to gen_server before
+ %% trying again. This way other incoming requsts
+ %% for the supervisor can be handled - e.g. a
+ %% shutdown request for the supervisor or the
+ %% child.
+ Id = if ?is_simple(State) -> Child#child.pid;
+ true -> Child#child.name
+ end,
+ timer:apply_after(0,?MODULE,try_again_restart,[self(),Id]),
+ {ok,NState2};
+ Other ->
+ Other
+ end;
{terminate, NState} ->
report_error(shutdown, reached_max_restart_intensity,
Child, State#state.name),
@@ -686,9 +757,9 @@ restart(Child, State) ->
end.
restart(simple_one_for_one, Child, State) ->
- #child{mfargs = {M, F, A}} = Child,
- Dynamics = ?DICT:erase(Child#child.pid, dynamics_db(Child#child.restart_type,
- State#state.dynamics)),
+ #child{pid = OldPid, mfargs = {M, F, A}} = Child,
+ Dynamics = ?DICT:erase(OldPid, dynamics_db(Child#child.restart_type,
+ State#state.dynamics)),
case do_start_child_i(M, F, A) of
{ok, Pid} ->
NState = State#state{dynamics = ?DICT:store(Pid, A, Dynamics)},
@@ -697,10 +768,13 @@ restart(simple_one_for_one, Child, State) ->
NState = State#state{dynamics = ?DICT:store(Pid, A, Dynamics)},
{ok, NState};
{error, Error} ->
+ NState = State#state{dynamics = ?DICT:store(restarting(OldPid), A,
+ Dynamics)},
report_error(start_error, Error, Child, State#state.name),
- restart(Child, State)
+ {try_again, NState}
end;
restart(one_for_one, Child, State) ->
+ OldPid = Child#child.pid,
case do_start_child(State#state.name, Child) of
{ok, Pid} ->
NState = replace_child(Child#child{pid = Pid}, State),
@@ -709,8 +783,9 @@ restart(one_for_one, Child, State) ->
NState = replace_child(Child#child{pid = Pid}, State),
{ok, NState};
{error, Reason} ->
+ NState = replace_child(Child#child{pid = restarting(OldPid)}, State),
report_error(start_error, Reason, Child, State#state.name),
- restart(Child, State)
+ {try_again, NState}
end;
restart(rest_for_one, Child, State) ->
{ChAfter, ChBefore} = split_child(Child#child.pid, State#state.children),
@@ -719,7 +794,9 @@ restart(rest_for_one, Child, State) ->
{ok, ChAfter3} ->
{ok, State#state{children = ChAfter3 ++ ChBefore}};
{error, ChAfter3} ->
- restart(Child, State#state{children = ChAfter3 ++ ChBefore})
+ NChild = Child#child{pid=restarting(Child#child.pid)},
+ NState = State#state{children = ChAfter3 ++ ChBefore},
+ {try_again, replace_child(NChild,NState)}
end;
restart(one_for_all, Child, State) ->
Children1 = del_child(Child#child.pid, State#state.children),
@@ -728,9 +805,14 @@ restart(one_for_all, Child, State) ->
{ok, NChs} ->
{ok, State#state{children = NChs}};
{error, NChs} ->
- restart(Child, State#state{children = NChs})
+ NChild = Child#child{pid=restarting(Child#child.pid)},
+ NState = State#state{children = NChs},
+ {try_again, replace_child(NChild,NState)}
end.
+restarting(Pid) when is_pid(Pid) -> ?restarting(Pid);
+restarting(RPid) -> RPid.
+
%%-----------------------------------------------------------------
%% Func: terminate_children/2
%% Args: Children = [child_rec()] in termination order
@@ -754,7 +836,7 @@ terminate_children([Child | Children], SupName, Res) ->
terminate_children([], _SupName, Res) ->
Res.
-do_terminate(Child, SupName) when Child#child.pid =/= undefined ->
+do_terminate(Child, SupName) when is_pid(Child#child.pid) ->
case shutdown(Child#child.pid, Child#child.shutdown) of
ok ->
ok;
@@ -765,7 +847,7 @@ do_terminate(Child, SupName) when Child#child.pid =/= undefined ->
end,
Child#child{pid = undefined};
do_terminate(Child, _SupName) ->
- Child.
+ Child#child{pid = undefined}.
%%-----------------------------------------------------------------
%% Shutdowns a child. We must check the EXIT value
@@ -866,7 +948,7 @@ terminate_dynamic_children(Child, Dynamics, SupName) ->
TRef = erlang:start_timer(Time, self(), kill),
wait_dynamic_children(Child, Pids, Sz, TRef, EStack0)
end,
- %% Unrool stacked errors and report them
+ %% Unroll stacked errors and report them
?DICT:fold(fun(Reason, Ls, _) ->
report_error(shutdown_error, Reason,
Child#child{pid=Ls}, SupName)
@@ -885,7 +967,7 @@ monitor_dynamic_children(#child{restart_type=temporary}, Dynamics) ->
end
end, {?SETS:new(), ?DICT:new()}, Dynamics);
monitor_dynamic_children(#child{restart_type=RType}, Dynamics) ->
- ?DICT:fold(fun(P, _, {Pids, EStack}) ->
+ ?DICT:fold(fun(P, _, {Pids, EStack}) when is_pid(P) ->
case monitor_child(P) of
ok ->
{?SETS:add_element(P, Pids), EStack};
@@ -893,7 +975,9 @@ monitor_dynamic_children(#child{restart_type=RType}, Dynamics) ->
{Pids, EStack};
{error, Reason} ->
{Pids, ?DICT:append(Reason, P, EStack)}
- end
+ end;
+ (?restarting(_), _, {Pids, EStack}) ->
+ {Pids, EStack}
end, {?SETS:new(), ?DICT:new()}, Dynamics).
@@ -1020,13 +1104,20 @@ get_child(Name, State, _) ->
lists:keysearch(Name, #child.name, State#state.children).
get_dynamic_child(Pid, #state{children=[Child], dynamics=Dynamics}) ->
- case is_dynamic_pid(Pid, dynamics_db(Child#child.restart_type, Dynamics)) of
+ DynamicsDb = dynamics_db(Child#child.restart_type, Dynamics),
+ case is_dynamic_pid(Pid, DynamicsDb) of
true ->
{value, Child#child{pid=Pid}};
false ->
- case erlang:is_process_alive(Pid) of
- true -> false;
- false -> {value, Child}
+ RPid = restarting(Pid),
+ case is_dynamic_pid(RPid, DynamicsDb) of
+ true ->
+ {value, Child#child{pid=RPid}};
+ false ->
+ case erlang:is_process_alive(Pid) of
+ true -> false;
+ false -> {value, Child}
+ end
end
end.
@@ -1056,9 +1147,9 @@ remove_child(Child, State) ->
%% Args: SupName = {local, atom()} | {global, atom()} | self
%% Type = {Strategy, MaxIntensity, Period}
%% Strategy = one_for_one | one_for_all | simple_one_for_one |
-%% rest_for_one
-%% MaxIntensity = integer()
-%% Period = integer()
+%% rest_for_one
+%% MaxIntensity = integer() >= 0
+%% Period = integer() > 0
%% Mod :== atom()
%% Args :== term()
%% Purpose: Check that Type is of correct type (!)
@@ -1109,7 +1200,7 @@ supname(N, _) -> N.
%%% where Name is an atom
%%% Func is {Mod, Fun, Args} == {atom(), atom(), list()}
%%% RestartType is permanent | temporary | transient
-%%% Shutdown = integer() | infinity | brutal_kill
+%%% Shutdown = integer() > 0 | infinity | brutal_kill
%%% ChildType = supervisor | worker
%%% Modules = [atom()] | dynamic
%%% Returns: {ok, [child_rec()]} | Error
diff --git a/lib/stdlib/test/Makefile b/lib/stdlib/test/Makefile
index aa6a660c34..4de6ea3ee7 100644
--- a/lib/stdlib/test/Makefile
+++ b/lib/stdlib/test/Makefile
@@ -20,6 +20,7 @@ MODULES= \
digraph_utils_SUITE \
dummy1_h \
dummy_h \
+ dummy_via \
edlin_expand_SUITE \
epp_SUITE \
erl_eval_helper \
@@ -66,6 +67,7 @@ MODULES= \
string_SUITE \
supervisor_1 \
supervisor_2 \
+ supervisor_deadlock \
naughty_child \
shell_SUITE \
supervisor_SUITE \
diff --git a/lib/stdlib/test/digraph_utils_SUITE.erl b/lib/stdlib/test/digraph_utils_SUITE.erl
index 12c486c25f..6b554c2fb7 100644
--- a/lib/stdlib/test/digraph_utils_SUITE.erl
+++ b/lib/stdlib/test/digraph_utils_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -211,8 +211,7 @@ condensation(Config) when is_list(Config) ->
{lists:sort(V1), lists:sort(V2)}
end,
?line Es = lists:map(Fun, digraph:edges(CG)),
- ?line [{[b],[c]},{[b],[d]},{[e,f,g],[e,f,g]},{[h],[h]},{[i,j],[i,j]}] =
- lists:sort(Es),
+ ?line [{[b],[c]},{[b],[d]}] = lists:sort(Es),
?line true = digraph:delete(CG),
?line true = digraph:delete(G),
ok.
diff --git a/lib/stdlib/test/dummy_via.erl b/lib/stdlib/test/dummy_via.erl
new file mode 100644
index 0000000000..e405811cbe
--- /dev/null
+++ b/lib/stdlib/test/dummy_via.erl
@@ -0,0 +1,94 @@
+-module(dummy_via).
+-export([reset/0,
+ register_name/2,
+ whereis_name/1,
+ unregister_name/1,
+ send/2]).
+
+
+reset() ->
+ P = whereis(?MODULE),
+ catch unlink(P),
+ Ref = erlang:monitor(process, P),
+ catch exit(P, kill),
+ receive {'DOWN',Ref,_,_,_} -> ok end,
+ Me = self(),
+ Pid = spawn_link(fun() ->
+ register(?MODULE, self()),
+ Me ! {self(), started},
+ loop([])
+ end),
+ receive
+ {Pid, started} ->
+ Pid
+ after 10000 ->
+ exit(timeout)
+ end.
+
+register_name(Name, Pid) when is_pid(Pid) ->
+ call({register_name, Name, Pid}).
+
+unregister_name(Name) ->
+ call({unregister_name, Name}).
+
+whereis_name(Name) ->
+ call({whereis_name, Name}).
+
+send(Name, Msg) ->
+ case whereis_name(Name) of
+ undefined ->
+ exit({badarg, {Name, Msg}});
+ Pid when is_pid(Pid) ->
+ Pid ! Msg,
+ Pid
+ end.
+
+call(Req) ->
+ MRef = erlang:monitor(process, ?MODULE),
+ ?MODULE ! {self(), MRef, Req},
+ receive
+ {'DOWN', MRef, _, _, _} ->
+ erlang:error(badarg);
+ {MRef, badarg} ->
+ erlang:error(badarg);
+ {MRef, Reply} ->
+ Reply
+ after 5000 ->
+ erlang:error(timeout)
+ end.
+
+loop(Reg) ->
+ receive
+ {'DOWN', _, _, P, _} when is_pid(P) ->
+ loop([X || {_,Pid,_} = X <- Reg, Pid =/= P]);
+ {From, Ref, Request} when is_pid(From), is_reference(Ref) ->
+ {Reply, NewReg} = handle_request(Request, Reg),
+ From ! {Ref, Reply},
+ loop(NewReg)
+ end.
+
+handle_request({register_name, Name, Pid}, Reg) when is_pid(Pid) ->
+ case lists:keyfind(Name, 1, Reg) of
+ false ->
+ Ref = erlang:monitor(process, Pid),
+ {yes, [{Name, Pid, Ref}|Reg]};
+ _ ->
+ {no, Reg}
+ end;
+handle_request({whereis_name, Name}, Reg) ->
+ case lists:keyfind(Name, 1, Reg) of
+ {_, Pid, _} ->
+ {Pid, Reg};
+ false ->
+ {undefined, Reg}
+ end;
+handle_request({unregister_name, Name}, Reg) ->
+ case lists:keyfind(Name, 1, Reg) of
+ {_, _, Ref} ->
+ catch erlang:demonitor(Ref);
+ _ ->
+ ok
+ end,
+ {ok, lists:keydelete(Name, 1, Reg)};
+handle_request(_, Reg) ->
+ {badarg, Reg}.
diff --git a/lib/stdlib/test/edlin_expand_SUITE.erl b/lib/stdlib/test/edlin_expand_SUITE.erl
index a0e198ce09..f8d4fb4b6a 100644
--- a/lib/stdlib/test/edlin_expand_SUITE.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE.erl
@@ -46,10 +46,10 @@ groups() ->
[].
init_per_suite(Config) ->
- true = code:delete(expand_test),
- true = code:delete(expand_test1),
- true = code:delete('ExpandTestCaps'),
- true = code:delete('ExpandTestCaps1'),
+ (catch code:delete(expand_test)),
+ (catch code:delete(expand_test1)),
+ (catch code:delete('ExpandTestCaps')),
+ (catch code:delete('ExpandTestCaps1')),
Config.
end_per_suite(_Config) ->
diff --git a/lib/stdlib/test/gen_event_SUITE.erl b/lib/stdlib/test/gen_event_SUITE.erl
index b3a7edc140..5c51e12e35 100644
--- a/lib/stdlib/test/gen_event_SUITE.erl
+++ b/lib/stdlib/test/gen_event_SUITE.erl
@@ -62,6 +62,8 @@ start(suite) -> [];
start(Config) when is_list(Config) ->
OldFl = process_flag(trap_exit, true),
+ ?line dummy_via:reset(),
+
?line {ok, Pid0} = gen_event:start(), %anonymous
?line [] = gen_event:which_handlers(Pid0),
?line ok = gen_event:stop(Pid0),
@@ -85,6 +87,11 @@ start(Config) when is_list(Config) ->
?line [] = gen_event:which_handlers(Pid4),
?line ok = gen_event:stop({global, my_dummy_name}),
+ ?line {ok, Pid5} = gen_event:start_link({via, dummy_via, my_dummy_name}),
+ ?line [] = gen_event:which_handlers({via, dummy_via, my_dummy_name}),
+ ?line [] = gen_event:which_handlers(Pid5),
+ ?line ok = gen_event:stop({via, dummy_via, my_dummy_name}),
+
?line {ok, _} = gen_event:start_link({local, my_dummy_name}),
?line {error, {already_started, _}} =
gen_event:start_link({local, my_dummy_name}),
@@ -92,15 +99,28 @@ start(Config) when is_list(Config) ->
gen_event:start({local, my_dummy_name}),
?line ok = gen_event:stop(my_dummy_name),
- ?line {ok, Pid5} = gen_event:start_link({global, my_dummy_name}),
+ ?line {ok, Pid6} = gen_event:start_link({global, my_dummy_name}),
?line {error, {already_started, _}} =
gen_event:start_link({global, my_dummy_name}),
?line {error, {already_started, _}} =
gen_event:start({global, my_dummy_name}),
- exit(Pid5, shutdown),
+ exit(Pid6, shutdown),
+ receive
+ {'EXIT', Pid6, shutdown} -> ok
+ after 10000 ->
+ ?t:fail(exit_gen_event)
+ end,
+
+ ?line {ok, Pid7} = gen_event:start_link({via, dummy_via, my_dummy_name}),
+ ?line {error, {already_started, _}} =
+ gen_event:start_link({via, dummy_via, my_dummy_name}),
+ ?line {error, {already_started, _}} =
+ gen_event:start({via, dummy_via, my_dummy_name}),
+
+ exit(Pid7, shutdown),
receive
- {'EXIT', Pid5, shutdown} -> ok
+ {'EXIT', Pid7, shutdown} -> ok
after 10000 ->
?t:fail(exit_gen_event)
end,
diff --git a/lib/stdlib/test/gen_fsm_SUITE.erl b/lib/stdlib/test/gen_fsm_SUITE.erl
index d60629d841..bdb4ea65b5 100644
--- a/lib/stdlib/test/gen_fsm_SUITE.erl
+++ b/lib/stdlib/test/gen_fsm_SUITE.erl
@@ -21,11 +21,11 @@
-include_lib("test_server/include/test_server.hrl").
%% Test cases
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
--export([ start1/1, start2/1, start3/1, start4/1 , start5/1, start6/1,
- start7/1, start8/1, start9/1, start10/1, start11/1]).
+-export([start1/1, start2/1, start3/1, start4/1, start5/1, start6/1,
+ start7/1, start8/1, start9/1, start10/1, start11/1, start12/1]).
-export([ abnormal1/1, abnormal2/1]).
@@ -56,14 +56,14 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
-all() ->
+all() ->
[{group, start}, {group, abnormal}, shutdown,
{group, sys}, hibernate, enter_loop].
-groups() ->
+groups() ->
[{start, [],
[start1, start2, start3, start4, start5, start6, start7,
- start8, start9, start10, start11]},
+ start8, start9, start10, start11, start12]},
{abnormal, [], [abnormal1, abnormal2]},
{sys, [],
[sys1, call_format_status, error_format_status]}].
@@ -258,6 +258,25 @@ start11(Config) when is_list(Config) ->
test_server:messages_get(),
ok.
+%% Via register linked
+start12(Config) when is_list(Config) ->
+ ?line dummy_via:reset(),
+ ?line {ok, Pid} =
+ gen_fsm:start_link({via, dummy_via, my_fsm}, gen_fsm_SUITE, [], []),
+ ?line {error, {already_started, Pid}} =
+ gen_fsm:start_link({via, dummy_via, my_fsm}, gen_fsm_SUITE, [], []),
+ ?line {error, {already_started, Pid}} =
+ gen_fsm:start({via, dummy_via, my_fsm}, gen_fsm_SUITE, [], []),
+
+ ?line ok = do_func_test(Pid),
+ ?line ok = do_sync_func_test(Pid),
+ ?line ok = do_func_test({via, dummy_via, my_fsm}),
+ ?line ok = do_sync_func_test({via, dummy_via, my_fsm}),
+ ?line stop_it({via, dummy_via, my_fsm}),
+
+ test_server:messages_get(),
+ ok.
+
%% Check that time outs in calls work
abnormal1(suite) -> [];
@@ -362,7 +381,25 @@ call_format_status(Config) when is_list(Config) ->
?line Status4 = sys:get_status(GlobalName2),
?line {status, Pid4, _Mod, [_PDict4, running, _, _, Data4]} = Status4,
?line [format_status_called | _] = lists:reverse(Data4),
- ?line stop_it(Pid4).
+ ?line stop_it(Pid4),
+
+ %% check that format_status can handle a name being a term other than a
+ %% pid or atom
+ ?line dummy_via:reset(),
+ ViaName1 = {via, dummy_via, "CallFormatStatus"},
+ ?line {ok, Pid5} = gen_fsm:start(ViaName1, gen_fsm_SUITE, [], []),
+ ?line Status5 = sys:get_status(ViaName1),
+ ?line {status, Pid5, _Mod, [_PDict5, running, _, _, Data5]} = Status5,
+ ?line [format_status_called | _] = lists:reverse(Data5),
+ ?line stop_it(Pid5),
+ ViaName2 = {via, dummy_via, {name, "term"}},
+ ?line {ok, Pid6} = gen_fsm:start(ViaName2, gen_fsm_SUITE, [], []),
+ ?line Status6 = sys:get_status(ViaName2),
+ ?line {status, Pid6, _Mod, [_PDict6, running, _, _, Data6]} = Status6,
+ ?line [format_status_called | _] = lists:reverse(Data6),
+ ?line stop_it(Pid6).
+
+
error_format_status(Config) when is_list(Config) ->
?line error_logger_forwarder:register(),
@@ -520,6 +557,8 @@ enter_loop(doc) ->
enter_loop(Config) when is_list(Config) ->
OldFlag = process_flag(trap_exit, true),
+ ?line dummy_via:reset(),
+
%% Locally registered process + {local, Name}
?line {ok, Pid1a} =
proc_lib:start_link(?MODULE, enter_loop, [local, local]),
@@ -623,10 +662,22 @@ enter_loop(Config) when is_list(Config) ->
{'EXIT', Pid6b, process_not_registered_globally} ->
ok
after 1000 ->
- ?line test_server:fail(gen_server_started)
+ ?line test_server:fail(gen_fsm_started)
end,
global:unregister_name(armitage),
+ dummy_via:register_name(armitage, self()),
+ ?line {ok, Pid6c} =
+ proc_lib:start_link(?MODULE, enter_loop, [anon, via]),
+ receive
+ {'EXIT', Pid6c, {process_not_registered_via, dummy_via}} ->
+ ok
+ after 1000 ->
+ ?line test_server:fail({gen_fsm_started, process_info(self(),
+ messages)})
+ end,
+ dummy_via:unregister_name(armitage),
+
process_flag(trap_exit, OldFlag),
ok.
@@ -635,6 +686,7 @@ enter_loop(Reg1, Reg2) ->
case Reg1 of
local -> register(armitage, self());
global -> global:register_name(armitage, self());
+ via -> dummy_via:register_name(armitage, self());
anon -> ignore
end,
proc_lib:init_ack({ok, self()}),
@@ -643,6 +695,9 @@ enter_loop(Reg1, Reg2) ->
gen_fsm:enter_loop(?MODULE, [], state0, [], {local,armitage});
global ->
gen_fsm:enter_loop(?MODULE, [], state0, [], {global,armitage});
+ via ->
+ gen_fsm:enter_loop(?MODULE, [], state0, [],
+ {via, dummy_via, armitage});
anon ->
gen_fsm:enter_loop(?MODULE, [], state0, [])
end.
diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl
index 7fb8d54f2d..cdf15ba017 100644
--- a/lib/stdlib/test/gen_server_SUITE.erl
+++ b/lib/stdlib/test/gen_server_SUITE.erl
@@ -36,7 +36,7 @@
]).
% spawn export
--export([spec_init_local/2, spec_init_global/2,
+-export([spec_init_local/2, spec_init_global/2, spec_init_via/2,
spec_init_default_timeout/2, spec_init_anonymous/1,
spec_init_anonymous_default_timeout/1,
spec_init_not_proc_lib/1, cast_fast_messup/0]).
@@ -199,6 +199,35 @@ start(Config) when is_list(Config) ->
test_server:fail(not_stopped)
end,
+ %% via register
+ ?line dummy_via:reset(),
+ ?line {ok, Pid6} =
+ gen_server:start({via, dummy_via, my_test_name},
+ gen_server_SUITE, [], []),
+ ?line ok = gen_server:call({via, dummy_via, my_test_name}, started_p),
+ ?line {error, {already_started, Pid6}} =
+ gen_server:start({via, dummy_via, my_test_name},
+ gen_server_SUITE, [], []),
+ ?line ok = gen_server:call({via, dummy_via, my_test_name}, stop),
+ test_server:sleep(1),
+ ?line {'EXIT', {noproc,_}} = (catch gen_server:call(Pid6, started_p, 10)),
+
+ %% via register linked
+ ?line dummy_via:reset(),
+ ?line {ok, Pid7} =
+ gen_server:start_link({via, dummy_via, my_test_name},
+ gen_server_SUITE, [], []),
+ ?line ok = gen_server:call({via, dummy_via, my_test_name}, started_p),
+ ?line {error, {already_started, Pid7}} =
+ gen_server:start({via, dummy_via, my_test_name},
+ gen_server_SUITE, [], []),
+ ?line ok = gen_server:call({via, dummy_via, my_test_name}, stop),
+ ?line receive
+ {'EXIT', Pid7, stopped} ->
+ ok
+ after 5000 ->
+ test_server:fail(not_stopped)
+ end,
test_server:messages_get(),
%% Must wait for all error messages before going to next test.
@@ -853,6 +882,8 @@ otp_5854(doc) ->
otp_5854(Config) when is_list(Config) ->
OldFlag = process_flag(trap_exit, true),
+ ?line dummy_via:reset(),
+
%% Make sure gen_server:enter_loop does not accept {local,Name}
%% when it's another process than the calling one which is
%% registered under that name
@@ -881,6 +912,18 @@ otp_5854(Config) when is_list(Config) ->
end,
global:unregister_name(armitage),
+ %% (same for {via, Mod, Name})
+ dummy_via:register_name(armitage, self()),
+ ?line {ok, Pid3} =
+ start_link(spec_init_via, [{not_ok, armitage}, []]),
+ receive
+ {'EXIT', Pid3, {process_not_registered_via, dummy_via}} ->
+ ok
+ after 1000 ->
+ ?line test_server:fail(gen_server_started)
+ end,
+ dummy_via:unregister_name(armitage),
+
process_flag(trap_exit, OldFlag),
ok.
@@ -1060,7 +1103,22 @@ spec_init_global({not_ok, Name}, Options) ->
%% Supervised init can occur here ...
gen_server:enter_loop(?MODULE, Options, {}, {global, Name}, infinity).
-spec_init_default_timeout({ok, Name}, Options) ->
+spec_init_via({ok, Name}, Options) ->
+ process_flag(trap_exit, true),
+ dummy_via:register_name(Name, self()),
+ proc_lib:init_ack({ok, self()}),
+ %% Supervised init can occur here ...
+ gen_server:enter_loop(?MODULE, Options, {},
+ {via, dummy_via, Name}, infinity);
+
+spec_init_via({not_ok, Name}, Options) ->
+ process_flag(trap_exit, true),
+ proc_lib:init_ack({ok, self()}),
+ %% Supervised init can occur here ...
+ gen_server:enter_loop(?MODULE, Options, {},
+ {via, dummy_via, Name}, infinity).
+
+spec_init_default_timeout({ok, Name}, Options) ->
process_flag(trap_exit, true),
register(Name, self()),
proc_lib:init_ack({ok, self()}),
diff --git a/lib/stdlib/test/io_proto_SUITE.erl b/lib/stdlib/test/io_proto_SUITE.erl
index b69cd74edb..0b74d04b85 100644
--- a/lib/stdlib/test/io_proto_SUITE.erl
+++ b/lib/stdlib/test/io_proto_SUITE.erl
@@ -50,7 +50,7 @@
-define(privdir(Conf), ?config(priv_dir, Conf)).
-endif.
--define(debug, true).
+%%-define(debug, true).
-ifdef(debug).
-define(format(S, A), io:format(S, A)).
diff --git a/lib/stdlib/test/qlc_SUITE.erl b/lib/stdlib/test/qlc_SUITE.erl
index 50a76cdfb5..1e74ad7727 100644
--- a/lib/stdlib/test/qlc_SUITE.erl
+++ b/lib/stdlib/test/qlc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -7927,15 +7927,23 @@ run_test(Config, Extra, {cres, Body, Opts, ExpectedCompileReturn}) ->
ok
end,
+ wait_for_expected(R, Before, SourceFile, true),
+ code:purge(Mod);
+run_test(Config, Extra, Body) ->
+ run_test(Config, Extra, {cres,Body,[]}).
+
+wait_for_expected(R, Before, SourceFile, Wait) ->
Ms = erlang:process_info(self(),messages),
After = {get(), pps(), ets:all(), Ms},
- code:purge(Mod),
case {R, After} of
- {ok, Before} -> ok;
- _ -> expected({ok,Before}, {R,After}, SourceFile)
- end;
-run_test(Config, Extra, Body) ->
- run_test(Config, Extra, {cres,Body,[]}).
+ {ok, Before} ->
+ ok;
+ _ when Wait ->
+ timer:sleep(1000),
+ wait_for_expected(R, Before, SourceFile, false);
+ _ ->
+ expected({ok,Before}, {R,After}, SourceFile)
+ end.
unload_pt() ->
erlang:garbage_collect(), % get rid of references to qlc_pt...
diff --git a/lib/stdlib/test/supervisor_SUITE.erl b/lib/stdlib/test/supervisor_SUITE.erl
index 71b76c093f..767ae3d62c 100644
--- a/lib/stdlib/test/supervisor_SUITE.erl
+++ b/lib/stdlib/test/supervisor_SUITE.erl
@@ -21,7 +21,7 @@
-module(supervisor_SUITE).
-include_lib("common_test/include/ct.hrl").
--define(TIMEOUT, 1000).
+-define(TIMEOUT, ?t:minutes(1)).
%% Testserver specific export
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
@@ -62,7 +62,8 @@
do_not_save_start_parameters_for_temporary_children/1,
do_not_save_child_specs_for_temporary_children/1,
simple_one_for_one_scale_many_temporary_children/1,
- simple_global_supervisor/1]).
+ simple_global_supervisor/1, hanging_restart_loop/1,
+ hanging_restart_loop_simple/1]).
%%-------------------------------------------------------------------------
@@ -82,7 +83,7 @@ all() ->
count_children_memory, do_not_save_start_parameters_for_temporary_children,
do_not_save_child_specs_for_temporary_children,
simple_one_for_one_scale_many_temporary_children, temporary_bystander,
- simple_global_supervisor].
+ simple_global_supervisor, hanging_restart_loop, hanging_restart_loop_simple].
groups() ->
[{sup_start, [],
@@ -111,10 +112,8 @@ groups() ->
{restart_rest_for_one, [],
[rest_for_one, rest_for_one_escalation]}].
-init_per_suite(Config0) ->
- Config = lists:keydelete(watchdog, 1, Config0),
- Dog = test_server:timetrap(?TIMEOUT),
- [{watchdog, Dog} | Config].
+init_per_suite(Config) ->
+ Config.
end_per_suite(_Config) ->
ok.
@@ -129,18 +128,21 @@ init_per_testcase(count_children_memory, Config) ->
try erlang:memory() of
_ ->
erts_debug:set_internal_state(available_internal_state, true),
- Config
+ Dog = ?t:timetrap(?TIMEOUT),
+ [{watchdog,Dog}|Config]
catch error:notsup ->
{skip, "+Meamin used during test; erlang:memory/1 not available"}
end;
init_per_testcase(_Case, Config) ->
- erlang:display(_Case),
- Config.
+ Dog = ?t:timetrap(?TIMEOUT),
+ [{watchdog,Dog}|Config].
-end_per_testcase(count_children_memory, _Config) ->
+end_per_testcase(count_children_memory, Config) ->
catch erts_debug:set_internal_state(available_internal_state, false),
+ ?t:timetrap_cancel(?config(watchdog,Config)),
ok;
-end_per_testcase(_Case, _Config) ->
+end_per_testcase(_Case, Config) ->
+ ?t:timetrap_cancel(?config(watchdog,Config)),
ok.
start_link(InitResult) ->
@@ -1455,6 +1457,102 @@ gen_server9212() ->
%%-------------------------------------------------------------------------
+%% Test that child and supervisor can be shutdown while hanging in restart loop.
+%% See OTP-9549.
+hanging_restart_loop(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
+ {ok, Pid} = start_link({ok, {{one_for_one, 8, 10}, []}}),
+ Child1 = {child1, {supervisor_deadlock, start_child, []},
+ permanent, brutal_kill, worker, []},
+
+ %% Ets table with state read by supervisor_deadlock.erl
+ ets:new(supervisor_deadlock,[set,named_table,public]),
+ ets:insert(supervisor_deadlock,{fail_start,false}),
+
+ {ok, CPid1} = supervisor:start_child(sup_test, Child1),
+ link(CPid1),
+
+ ets:insert(supervisor_deadlock,{fail_start,true}),
+ supervisor_deadlock:restart_child(),
+ timer:sleep(2000), % allow restart to happen before proceeding
+
+ {error, already_present} = supervisor:start_child(sup_test, Child1),
+ {error, restarting} = supervisor:restart_child(sup_test, child1),
+ {error, restarting} = supervisor:delete_child(sup_test, child1),
+ [{child1,restarting,worker,[]}] = supervisor:which_children(sup_test),
+ [1,0,0,1] = get_child_counts(sup_test),
+
+ ok = supervisor:terminate_child(sup_test, child1),
+ check_exit_reason(CPid1, error),
+ [{child1,undefined,worker,[]}] = supervisor:which_children(sup_test),
+
+ ets:insert(supervisor_deadlock,{fail_start,false}),
+ {ok, CPid2} = supervisor:restart_child(sup_test, child1),
+ link(CPid2),
+
+ ets:insert(supervisor_deadlock,{fail_start,true}),
+ supervisor_deadlock:restart_child(),
+ timer:sleep(2000), % allow restart to happen before proceeding
+
+ %% Terminating supervisor.
+ %% OTP-9549 fixes so this does not give a timetrap timeout -
+ %% i.e. that supervisor does not hang in restart loop.
+ terminate(Pid,shutdown),
+
+ %% Check that child died with reason from 'restart' request above
+ check_exit_reason(CPid2, error),
+ undefined = whereis(sup_test),
+ ok.
+
+%%-------------------------------------------------------------------------
+%% Test that child and supervisor can be shutdown while hanging in
+%% restart loop, simple_one_for_one.
+%% See OTP-9549.
+hanging_restart_loop_simple(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
+ Child1 = {child1, {supervisor_deadlock, start_child, []},
+ permanent, brutal_kill, worker, []},
+ {ok, Pid} = start_link({ok, {{simple_one_for_one, 8, 10}, [Child1]}}),
+
+ %% Ets table with state read by supervisor_deadlock.erl
+ ets:new(supervisor_deadlock,[set,named_table,public]),
+ ets:insert(supervisor_deadlock,{fail_start,false}),
+
+ {ok, CPid1} = supervisor:start_child(sup_test, []),
+ link(CPid1),
+
+ ets:insert(supervisor_deadlock,{fail_start,true}),
+ supervisor_deadlock:restart_child(),
+ timer:sleep(2000), % allow restart to happen before proceeding
+
+ {error, simple_one_for_one} = supervisor:restart_child(sup_test, child1),
+ {error, simple_one_for_one} = supervisor:delete_child(sup_test, child1),
+ [{undefined,restarting,worker,[]}] = supervisor:which_children(sup_test),
+ [1,0,0,1] = get_child_counts(sup_test),
+
+ ok = supervisor:terminate_child(sup_test, CPid1),
+ check_exit_reason(CPid1, error),
+ [] = supervisor:which_children(sup_test),
+
+ ets:insert(supervisor_deadlock,{fail_start,false}),
+ {ok, CPid2} = supervisor:start_child(sup_test, []),
+ link(CPid2),
+
+ ets:insert(supervisor_deadlock,{fail_start,true}),
+ supervisor_deadlock:restart_child(),
+ timer:sleep(2000), % allow restart to happen before proceeding
+
+ %% Terminating supervisor.
+ %% OTP-9549 fixes so this does not give a timetrap timeout -
+ %% i.e. that supervisor does not hang in restart loop.
+ terminate(Pid,shutdown),
+
+ %% Check that child died with reason from 'restart' request above
+ check_exit_reason(CPid2, error),
+ undefined = whereis(sup_test),
+ ok.
+
+%%-------------------------------------------------------------------------
terminate(Pid, Reason) when Reason =/= supervisor ->
terminate(dummy, Pid, dummy, Reason).
diff --git a/lib/stdlib/test/supervisor_deadlock.erl b/lib/stdlib/test/supervisor_deadlock.erl
new file mode 100644
index 0000000000..288547a972
--- /dev/null
+++ b/lib/stdlib/test/supervisor_deadlock.erl
@@ -0,0 +1,45 @@
+-module(supervisor_deadlock).
+-compile(export_all).
+
+
+%%%-----------------------------------------------------------------
+%%% gen_server callbacks
+init([child]) ->
+ case ets:lookup(supervisor_deadlock,fail_start) of
+ [{fail_start, false}] ->
+ %% we must not fail on the first init, otherwise supervisor
+ %% terminates immediately
+ {ok, []};
+ [{fail_start, true}] ->
+ %% Restart frequency is MaxR=8, MaxT=10, so this will
+ %% ensure that restart intensity is not reached -> restart
+ %% loop
+ timer:sleep(2000), % NOTE: this could be a gen_server call timeout
+
+ {stop, error}
+ end.
+
+handle_call(_Req, _From, State) ->
+ {reply, ok, State}.
+
+%% Force a restart
+handle_cast(restart, State) ->
+ {stop, error, State}.
+
+handle_info(_Msg, State) ->
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
+
+%%%-----------------------------------------------------------------
+%%% Start child
+start_child() ->
+ gen_server:start_link({local, ?MODULE}, ?MODULE, [child], []).
+
+restart_child() ->
+ gen_server:cast(supervisor_deadlock, restart).
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl
index 51754cb3b4..d7ce432786 100644
--- a/lib/test_server/src/test_server.erl
+++ b/lib/test_server/src/test_server.erl
@@ -44,7 +44,7 @@
-export([start_node/3, stop_node/1, wait_for_node/1, is_release_available/1]).
-export([app_test/1, app_test/2]).
-export([is_native/1]).
--export([comment/1]).
+-export([comment/1, make_priv_dir/0]).
-export([os_type/0]).
-export([run_on_shielded_node/2]).
-export([is_cover/0,is_debug/0,is_commercial/0]).
@@ -754,6 +754,25 @@ run_test_case_msgloop(Ref, Pid, CaptureStdout, Terminate, Comment, CurrConf) ->
{set_curr_conf,From,NewCurrConf} ->
From ! {self(),set_curr_conf,ok},
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,Comment,NewCurrConf);
+ {make_priv_dir,From} when CurrConf == undefined ->
+ From ! {self(),make_priv_dir,{error,no_priv_dir_in_config}};
+ {make_priv_dir,From} ->
+ Result =
+ case proplists:get_value(priv_dir, element(2, CurrConf)) of
+ undefined ->
+ {error,no_priv_dir_in_config};
+ PrivDir ->
+ case file:make_dir(PrivDir) of
+ ok ->
+ ok;
+ {error, eexist} ->
+ ok;
+ MkDirError ->
+ {error,{MkDirError,PrivDir}}
+ end
+ end,
+ From ! {self(),make_priv_dir,Result},
+ run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,Comment,CurrConf);
{'EXIT',Pid,{Ref,Time,Value,Loc,Opts}} ->
RetVal = {Time/1000000,Value,mod_loc(Loc),Opts,Comment},
run_test_case_msgloop(Ref,Pid,CaptureStdout,{true,RetVal},Comment,undefined);
@@ -766,7 +785,7 @@ run_test_case_msgloop(Ref, Pid, CaptureStdout, Terminate, Comment, CurrConf) ->
%% timout during framework call
spawn_fw_call(FwMod,FwFunc,CurrConf,Pid,
{framework_error,{timetrap,TVal}},
- unknown,self(),Comment),
+ unknown,self()),
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,
Comment,undefined);
Loc1 ->
@@ -792,7 +811,7 @@ run_test_case_msgloop(Ref, Pid, CaptureStdout, Terminate, Comment, CurrConf) ->
%% and let the group leader go back to handle io.
spawn_fw_call(Mod,Func,CurrConf,Pid,
{timetrap_timeout,TVal},
- Loc1,self(),Comment),
+ Loc1,self()),
undefined
end,
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,
@@ -804,12 +823,12 @@ run_test_case_msgloop(Ref, Pid, CaptureStdout, Terminate, Comment, CurrConf) ->
%% timout during framework call
spawn_fw_call(FwMod,FwFunc,CurrConf,Pid,
{framework_error,{timetrap,TVal}},
- unknown,self(),Comment);
+ unknown,self());
Loc1 ->
{Mod,_Func} = get_mf(Loc1),
spawn_fw_call(Mod,InitOrEnd,CurrConf,Pid,
{timetrap_timeout,TVal},
- Loc1,self(),Comment)
+ Loc1,self())
end,
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,Comment,CurrConf);
{testcase_aborted,AbortReason,AbortLoc} ->
@@ -819,7 +838,7 @@ run_test_case_msgloop(Ref, Pid, CaptureStdout, Terminate, Comment, CurrConf) ->
%% abort during framework call
spawn_fw_call(FwMod,FwFunc,CurrConf,Pid,
{framework_error,ErrorMsg},
- unknown,self(),Comment),
+ unknown,self()),
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,
Comment,undefined);
Loc1 ->
@@ -842,7 +861,7 @@ run_test_case_msgloop(Ref, Pid, CaptureStdout, Terminate, Comment, CurrConf) ->
_ ->
{Mod,Func} = get_mf(Loc1),
spawn_fw_call(Mod,Func,CurrConf,Pid,ErrorMsg,
- Loc1,self(),Comment),
+ Loc1,self()),
undefined
end,
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,
@@ -852,32 +871,55 @@ run_test_case_msgloop(Ref, Pid, CaptureStdout, Terminate, Comment, CurrConf) ->
%% result of an exit(TestCase,kill) call, which is the
%% only way to abort a testcase process that traps exits
%% (see abort_current_testcase)
- spawn_fw_call(undefined,undefined,CurrConf,Pid,
+ {Mod,Func} = case CurrConf of
+ {MF,_} -> MF;
+ _ -> {undefined,undefined}
+ end,
+ spawn_fw_call(Mod,Func,CurrConf,Pid,
testcase_aborted_or_killed,
- unknown,self(),Comment),
+ unknown,self()),
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,Comment,CurrConf);
{fw_error,{FwMod,FwFunc,FwError}} ->
spawn_fw_call(FwMod,FwFunc,CurrConf,Pid,{framework_error,FwError},
- unknown,self(),Comment),
+ unknown,self()),
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,Comment,CurrConf);
_Other ->
%% the testcase has terminated because of Reason (e.g. an exit
%% because a linked process failed)
- spawn_fw_call(undefined,undefined,CurrConf,Pid,Reason,
- unknown,self(),Comment),
+ {Mod,Func} = case CurrConf of
+ {MF,_} -> MF;
+ _ -> {undefined,undefined}
+ end,
+ spawn_fw_call(Mod,Func,CurrConf,Pid,Reason,unknown,self()),
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,Comment,CurrConf)
end;
{EndConfPid,{call_end_conf,Data,_Result}} ->
case CurrConf of
{EndConfPid,{Mod,Func},_Conf} ->
{_Mod,_Func,TCPid,TCExitReason,Loc} = Data,
- spawn_fw_call(Mod,Func,CurrConf,TCPid,TCExitReason,Loc,self(),Comment),
+ spawn_fw_call(Mod,Func,CurrConf,TCPid,TCExitReason,Loc,self()),
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,Comment,undefined);
_ ->
run_test_case_msgloop(Ref,Pid,CaptureStdout,Terminate,Comment,CurrConf)
end;
- {_FwCallPid,fw_notify_done,RetVal} ->
+ {_FwCallPid,fw_notify_done,{T,Value,Loc,Opts,AddToComment}} ->
%% the framework has been notified, we're finished
+ RetVal =
+ case AddToComment of
+ undefined ->
+ {T,Value,Loc,Opts,Comment};
+ _ ->
+ Comment1 =
+ if Comment == "" ->
+ AddToComment;
+ true ->
+ Comment ++
+ test_server_ctrl:xhtml("<br>",
+ "<br />") ++
+ AddToComment
+ end,
+ {T,Value,Loc,Opts,Comment1}
+ end,
run_test_case_msgloop(Ref,Pid,CaptureStdout,{true,RetVal},Comment,undefined);
{'EXIT',_FwCallPid,{fw_notify_done,Func,Error}} ->
%% a framework function failed
@@ -925,17 +967,20 @@ output(Msg,Sender) ->
local_or_remote_apply({test_server_ctrl,output,[Msg,Sender]}).
call_end_conf(Mod,Func,TCPid,TCExitReason,Loc,Conf,TVal) ->
+ %% Starter is also the group leader process
Starter = self(),
Data = {Mod,Func,TCPid,TCExitReason,Loc},
EndConfProc =
fun() ->
+ group_leader(Starter, self()),
Supervisor = self(),
EndConfApply =
fun() ->
case catch apply(Mod,end_per_testcase,[Func,Conf]) of
{'EXIT',Why} ->
+ timer:sleep(1),
group_leader() ! {printout,12,
- "ERROR! ~p:end_per_testcase(~p, ~p)"
+ "WARNING! ~p:end_per_testcase(~p, ~p)"
" crashed!\n\tReason: ~p\n",
[Mod,Func,Conf,Why]};
_ ->
@@ -950,15 +995,23 @@ call_end_conf(Mod,Func,TCPid,TCExitReason,Loc,Conf,TVal) ->
{'EXIT',Pid,Reason} ->
Starter ! {self(),{call_end_conf,Data,{error,Reason}}}
after TVal ->
+ exit(Pid, kill),
+ group_leader() ! {printout,12,
+ "WARNING! ~p:end_per_testcase(~p, ~p)"
+ " failed!\n\tReason: timetrap timeout"
+ " after ~w ms!\n", [Mod,Func,Conf,TVal]},
Starter ! {self(),{call_end_conf,Data,{error,timeout}}}
end
end,
spawn_link(EndConfProc).
spawn_fw_call(Mod,{init_per_testcase,Func},_,Pid,{timetrap_timeout,TVal}=Why,
- Loc,SendTo,Comment) ->
+ Loc,SendTo) ->
FwCall =
fun() ->
+ %% set group leader so that printouts/comments
+ %% from the framework get printed in the logs
+ group_leader(SendTo, self()),
Skip = {skip,{failed,{Mod,init_per_testcase,Why}}},
%% if init_per_testcase fails, the test case
%% should be skipped
@@ -970,12 +1023,12 @@ spawn_fw_call(Mod,{init_per_testcase,Func},_,Pid,{timetrap_timeout,TVal}=Why,
end,
%% finished, report back
SendTo ! {self(),fw_notify_done,
- {TVal/1000,Skip,Loc,[],Comment}}
+ {TVal/1000,Skip,Loc,[],undefined}}
end,
spawn_link(FwCall);
spawn_fw_call(Mod,{end_per_testcase,Func},EndConf,Pid,
- {timetrap_timeout,TVal}=Why,_Loc,SendTo,Comment) ->
+ {timetrap_timeout,TVal}=Why,_Loc,SendTo) ->
%%! This is a temporary fix that keeps Test Server alive during
%%! execution of a parallel test case group, when sometimes
%%! this clause gets called with EndConf == undefined. See OTP-9594
@@ -987,6 +1040,9 @@ spawn_fw_call(Mod,{end_per_testcase,Func},EndConf,Pid,
end,
FwCall =
fun() ->
+ %% set group leader so that printouts/comments
+ %% from the framework get printed in the logs
+ group_leader(SendTo, self()),
{RetVal,Report} =
case proplists:get_value(tc_status, EndConf1) of
undefined ->
@@ -998,6 +1054,10 @@ spawn_fw_call(Mod,{end_per_testcase,Func},EndConf,Pid,
E = {failed,{Mod,end_per_testcase,Why}},
{Result,E}
end,
+ group_leader() ! {printout,12,
+ "WARNING! ~p:end_per_testcase(~p, ~p)"
+ " failed!\n\tReason: timetrap timeout"
+ " after ~w ms!\n", [Mod,Func,EndConf,TVal]},
FailLoc = proplists:get_value(tc_fail_loc, EndConf1),
case catch do_end_tc_call(Mod,Func, FailLoc,
{Pid,Report,[EndConf1]}, Why) of
@@ -1006,41 +1066,42 @@ spawn_fw_call(Mod,{end_per_testcase,Func},EndConf,Pid,
_ ->
ok
end,
- %% if end_per_testcase fails a warning should be
- %% printed as comment
- Comment1 = if Comment == "" ->
- "";
- true ->
- Comment ++ test_server_ctrl:xhtml("<br>",
- "<br />")
- end,
- %% finished, report back
+ Warn = "<font color=\"red\">"
+ "WARNING: end_per_testcase timed out!</font>",
+ %% finished, report back (if end_per_testcase fails, a warning
+ %% should be printed as part of the comment)
SendTo ! {self(),fw_notify_done,
- {TVal/1000,RetVal,FailLoc,[],
- [Comment1,"<font color=\"red\">"
- "WARNING: end_per_testcase timed out!"
- "</font>"]}}
+ {TVal/1000,RetVal,FailLoc,[],Warn}}
end,
spawn_link(FwCall);
-spawn_fw_call(FwMod,FwFunc,_,_Pid,{framework_error,FwError},_,SendTo,_Comment) ->
+spawn_fw_call(FwMod,FwFunc,_,_Pid,{framework_error,FwError},_,SendTo) ->
FwCall =
fun() ->
+ %% set group leader so that printouts/comments
+ %% from the framework get printed in the logs
+ group_leader(SendTo, self()),
test_server_sup:framework_call(report, [framework_error,
- {{FwMod,FwFunc},FwError}]),
+ {{FwMod,FwFunc},
+ FwError}]),
Comment =
lists:flatten(
io_lib:format("<font color=\"red\">"
- "WARNING! ~w:~w failed!</font>", [FwMod,FwFunc])),
+ "WARNING! ~w:~w failed!</font>",
+ [FwMod,FwFunc])),
%% finished, report back
SendTo ! {self(),fw_notify_done,
- {died,{error,{FwMod,FwFunc,FwError}},{FwMod,FwFunc},[],Comment}}
+ {died,{error,{FwMod,FwFunc,FwError}},
+ {FwMod,FwFunc},[],Comment}}
end,
spawn_link(FwCall);
-spawn_fw_call(Mod,Func,_,Pid,Error,Loc,SendTo,Comment) ->
+spawn_fw_call(Mod,Func,_,Pid,Error,Loc,SendTo) ->
FwCall =
fun() ->
+ %% set group leader so that printouts/comments
+ %% from the framework get printed in the logs
+ group_leader(SendTo, self()),
case catch fw_error_notify(Mod,Func,[],
Error,Loc) of
{'EXIT',FwErrorNotifyErr} ->
@@ -1058,7 +1119,7 @@ spawn_fw_call(Mod,Func,_,Pid,Error,Loc,SendTo,Comment) ->
ok
end,
%% finished, report back
- SendTo ! {self(),fw_notify_done,{died,Error,Loc,Comment}}
+ SendTo ! {self(),fw_notify_done,{died,Error,Loc,[],undefined}}
end,
spawn_link(FwCall).
@@ -1146,6 +1207,9 @@ run_test_case_eval(Mod, Func, Args0, Name, Ref, RunInit,
exit({Ref,Time,Value,Loc,Opts}).
run_test_case_eval1(Mod, Func, Args, Name, RunInit, TCCallback) ->
+ %% save current state in controller loop
+ sync_send(group_leader(),set_curr_conf,{{Mod,Func},hd(Args)},
+ 5000, fun() -> exit(no_answer_from_group_leader) end),
case RunInit of
run_init ->
put(test_server_init_or_end_conf,{init_per_testcase,Func}),
@@ -1204,8 +1268,8 @@ run_test_case_eval1(Mod, Func, Args, Name, RunInit, TCCallback) ->
%% call user callback function if defined
EndConf1 = user_callback(TCCallback, Mod, Func, 'end', EndConf),
%% update current state in controller loop
- sync_send(group_leader(),set_curr_conf,EndConf1,
- 5000, fun() -> exit(no_answer_from_group_leader) end),
+ sync_send(group_leader(),set_curr_conf,EndConf1, 5000,
+ fun() -> exit(no_answer_from_group_leader) end),
{FWReturn1,TSReturn1,EndConf2} =
case end_per_testcase(Mod, Func, EndConf1) of
SaveCfg1={save_config,_} ->
@@ -1530,8 +1594,18 @@ get_loc(Pid) ->
lists:foreach(fun({Key,Val}) -> put(Key, Val) end, Dict),
Stk = [rewrite_loc_item(Loc) || Loc <- Stk0],
case get(test_server_loc) of
- undefined -> put(test_server_loc, Stk);
- _ -> ok
+ undefined ->
+ put(test_server_loc, Stk);
+ {Suite,Case} ->
+ %% location info unknown, check if {Suite,Case,Line}
+ %% is available in stacktrace. and if so, use stacktrace
+ %% instead of currect test_server_loc
+ case [match || {S,C,_L} <- Stk, S == Suite, C == Case] of
+ [match|_] -> put(test_server_loc, Stk);
+ _ -> ok
+ end;
+ _ ->
+ ok
end,
get_loc().
@@ -1561,13 +1635,20 @@ mod_loc(Loc) ->
%% handle diff line num versions
case Loc of
[{{_M,_F},_L}|_] ->
- [{?pl2a(M),F,L} || {{M,F},L} <- Loc];
+ [begin if L /= 0 -> {?pl2a(M),F,L};
+ true -> {?pl2a(M),F} end end || {{M,F},L} <- Loc];
[{_M,_F}|_] ->
[{?pl2a(M),F} || {M,F} <- Loc];
+ {{M,F},0} ->
+ [{?pl2a(M),F}];
{{M,F},L} ->
[{?pl2a(M),F,L}];
{M,ForL} ->
[{?pl2a(M),ForL}];
+ {M,F,0} ->
+ [{M,F}];
+ [{M,F,0}|Stack] ->
+ [{M,F}|Stack];
_ ->
Loc
end.
@@ -2528,11 +2609,23 @@ read_comment() ->
MsgLooper = group_leader(),
MsgLooper ! {read_comment,self()},
receive
- {MsgLooper,read_comment,Comment} ->
- Comment
+ {MsgLooper,read_comment,Comment} -> Comment
+ after
+ 5000 -> ""
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% make_priv_dir() -> ok
+%%
+%% Order test server to create the private directory
+%% for the current test case.
+make_priv_dir() ->
+ MsgLooper = group_leader(),
+ group_leader() ! {make_priv_dir,self()},
+ receive
+ {MsgLooper,make_priv_dir,Result} -> Result
after
- 5000 ->
- ""
+ 5000 -> error
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl
index 3432b3bc8e..79c45de071 100644
--- a/lib/test_server/src/test_server_ctrl.erl
+++ b/lib/test_server/src/test_server_ctrl.erl
@@ -164,6 +164,7 @@
-export([start_get_totals/1, stop_get_totals/0]).
-export([get_levels/0, set_levels/3]).
-export([multiply_timetraps/1, scale_timetraps/1, get_timetrap_parameters/0]).
+-export([create_priv_dir/1]).
-export([cover/2, cover/3, cover/7,
cross_cover_analyse/1, cross_cover_analyse/2, trc/1, stop_trace/0]).
-export([testcase_callback/1]).
@@ -219,8 +220,8 @@
-define(user_skip_color, "#FF8000").
-record(state,{jobs=[],levels={1,19,10},
- multiply_timetraps=1,scale_timetraps=true,
- finish=false,
+ multiply_timetraps=1, scale_timetraps=true,
+ create_priv_dir=auto_per_run, finish=false,
target_info, trc=false, cover=false, wait_for_node=[],
testcase_callback=undefined, idle_notify=[],
get_totals=false, random_seed=undefined}).
@@ -506,6 +507,9 @@ scale_timetraps(Bool) ->
get_timetrap_parameters() ->
controller_call(get_timetrap_parameters).
+create_priv_dir(Value) ->
+ controller_call({create_priv_dir,Value}).
+
trc(TraceFile) ->
controller_call({trace,TraceFile}, 2*?ACCEPT_TIMEOUT).
@@ -646,8 +650,8 @@ init([Param]) ->
contact_main_target(local) ->
%% When used by a general framework, global registration of
%% test_server should not be required.
- case os:getenv("TEST_SERVER_FRAMEWORK") of
- FW when FW =:= false; FW =:= "undefined" ->
+ case get_fw_mod(undefined) of
+ undefined ->
%% Local target! The global test_server process implemented by
%% test_server.erl will not be started, so we simulate it by
%% globally registering this process instead.
@@ -811,6 +815,7 @@ handle_call({add_job,Dir,Name,TopCase,Skip}, _From, State) ->
[SpecName,{State#state.multiply_timetraps,
State#state.scale_timetraps}],
LogDir, Name, State#state.levels,
+ State#state.create_priv_dir,
State#state.testcase_callback, ExtraTools1),
NewJobs = [{Name,Pid}|State#state.jobs],
{reply, ok, State#state{jobs=NewJobs}};
@@ -820,6 +825,7 @@ handle_call({add_job,Dir,Name,TopCase,Skip}, _From, State) ->
[SpecList,{State#state.multiply_timetraps,
State#state.scale_timetraps}],
LogDir, Name, State#state.levels,
+ State#state.create_priv_dir,
State#state.testcase_callback, ExtraTools1),
NewJobs = [{Name,Pid}|State#state.jobs],
{reply, ok, State#state{jobs=NewJobs}};
@@ -837,6 +843,7 @@ handle_call({add_job,Dir,Name,TopCase,Skip}, _From, State) ->
{State#state.multiply_timetraps,
State#state.scale_timetraps}],
LogDir, Name, State#state.levels,
+ State#state.create_priv_dir,
State#state.testcase_callback, ExtraTools1),
NewJobs = [{Name,Pid}|State#state.jobs],
{reply, ok, State#state{jobs=NewJobs}}
@@ -1045,6 +1052,18 @@ handle_call({cover,App,Analyse}, _From, State) ->
{reply,ok,State#state{cover={App,Analyse}}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% handle_call({create_priv_dir,Value}, _, State) -> ok | {error,Reason}
+%%
+%% Set create_priv_dir to either auto_per_run (create common priv dir once
+%% per test run), manual_per_tc (the priv dir name will be unique for each
+%% test case, but the user has to call test_server:make_priv_dir/0 to create
+%% it), or auto_per_tc (unique priv dir created automatically for each test
+%% case).
+
+handle_call({create_priv_dir,Value}, _From, State) ->
+ {reply,ok,State#state{create_priv_dir=Value}};
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% handle_call({testcase_callback,{Mod,Func}}, _, State) -> ok | {error,Reason}
%%
%% Add a callback function that will be called before and after every
@@ -1301,7 +1320,12 @@ terminate(_Reason, State) ->
end,
kill_all_jobs(State#state.jobs),
test_server_node:stop(State#state.target_info),
- test_server_h:restore(),
+ case lists:keysearch(sasl, 1, application:which_applications()) of
+ {value,_} ->
+ test_server_h:restore();
+ _ ->
+ ok
+ end,
ok.
kill_all_jobs([{_Name,JobPid}|Jobs]) ->
@@ -1316,7 +1340,7 @@ kill_all_jobs([]) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% spawn_tester(Mod, Func, Args, Dir, Name, Levels,
+%% spawn_tester(Mod, Func, Args, Dir, Name, Levels, CreatePrivDir,
%% TestCaseCallback, ExtraTools) -> Pid
%% Mod = atom()
%% Func = atom()
@@ -1324,6 +1348,7 @@ kill_all_jobs([]) ->
%% Dir = string()
%% Name = string()
%% Levels = {integer(),integer(),integer()}
+%% CreatePrivDir = auto_per_run | manual_per_tc | auto_per_tc
%% TestCaseCallback = {CBMod,CBFunc} | undefined
%% ExtraTools = [ExtraTool,...]
%% ExtraTool = CoverInfo | TraceInfo | RandomSeed
@@ -1334,14 +1359,15 @@ kill_all_jobs([]) ->
%% When the named function is done executing, a summary of the results
%% is printed to the log files.
-spawn_tester(Mod, Func, Args, Dir, Name, Levels, TCCallback, ExtraTools) ->
+spawn_tester(Mod, Func, Args, Dir, Name, Levels,
+ CreatePrivDir, TCCallback, ExtraTools) ->
spawn_link(
fun() -> init_tester(Mod, Func, Args, Dir, Name, Levels,
- TCCallback, ExtraTools)
+ CreatePrivDir, TCCallback, ExtraTools)
end).
init_tester(Mod, Func, Args, Dir, Name, {SumLev,MajLev,MinLev},
- TCCallback, ExtraTools) ->
+ CreatePrivDir, TCCallback, ExtraTools) ->
process_flag(trap_exit, true),
put(test_server_name, Name),
put(test_server_dir, Dir),
@@ -1352,8 +1378,21 @@ init_tester(Mod, Func, Args, Dir, Name, {SumLev,MajLev,MinLev},
put(test_server_summary_level, SumLev),
put(test_server_major_level, MajLev),
put(test_server_minor_level, MinLev),
+ put(test_server_create_priv_dir, CreatePrivDir),
put(test_server_random_seed, proplists:get_value(random_seed, ExtraTools)),
put(test_server_testcase_callback, TCCallback),
+ case os:getenv("TEST_SERVER_FRAMEWORK") of
+ FW when FW =:= false; FW =:= "undefined" ->
+ put(test_server_framework, '$none');
+ FW ->
+ put(test_server_framework_name, list_to_atom(FW)),
+ case os:getenv("TEST_SERVER_FRAMEWORK_NAME") of
+ FWName when FWName =:= false; FWName =:= "undefined" ->
+ put(test_server_framework_name, '$none');
+ FWName ->
+ put(test_server_framework_name, list_to_atom(FWName))
+ end
+ end,
%% before first print, read and set logging options
LogOpts = test_server_sup:framework_call(get_logopts, [], []),
put(test_server_logopts, LogOpts),
@@ -1385,7 +1424,7 @@ init_tester(Mod, Func, Args, Dir, Name, {SumLev,MajLev,MinLev},
end,
OkN = get(test_server_ok),
FailedN = get(test_server_failed),
- print(html,"<tr><td></td><td><b>TOTAL</b></td><td></td><td></td>"
+ print(html,"<tr><td></td><td><b>TOTAL</b></td><td></td><td></td><td></td>"
"<td>~.3fs</td><td><b>~s</b></td><td>~p Ok, ~p Failed~s of ~p</td></tr>\n",
[Time,SuccessStr,OkN,FailedN,SkipStr,OkN+FailedN+SkippedN]).
@@ -1673,11 +1712,7 @@ do_test_cases(TopCases, SkipCases,
Config, TimetrapData) when is_list(TopCases),
is_tuple(TimetrapData) ->
{ok,TestDir} = start_log_file(),
- FwMod =
- case os:getenv("TEST_SERVER_FRAMEWORK") of
- FW when FW =:= false; FW =:= "undefined" -> ?MODULE;
- FW -> list_to_atom(FW)
- end,
+ FwMod = get_fw_mod(?MODULE),
case collect_all_cases(TopCases, SkipCases) of
{error,Why} ->
print(1, "Error starting: ~p", [Why]),
@@ -1770,8 +1805,9 @@ do_test_cases(TopCases, SkipCases,
"<p>~s</p>\n" ++
xhtml("<table bgcolor=\"white\" border=\"3\" cellpadding=\"5\">",
"<table>") ++
- "<tr><th>Num</th><th>Module</th><th>Case</th><th>Log</th>"
- "<th>Time</th><th>Result</th><th>Comment</th></tr>\n",
+ "<tr><th>Num</th><th>Module</th><th>Group</th>" ++
+ "<th>Case</th><th>Log</th><th>Time</th><th>Result</th>" ++
+ "<th>Comment</th></tr>\n",
[print_if_known(N, {"<i>Executing <b>~p</b> test cases...</i>\n",[N]},
{"",[]})]),
print(html, xhtml("<br>", "<br />")),
@@ -1812,7 +1848,7 @@ do_test_cases(TopCase, SkipCases, Config, TimetrapSpec) ->
%% Creates the log directories, the major log file and the html log file.
%% The log files are initialized with some header information.
%%
-%% The name of the log directory will be <Name>.LOGS/run.<Date>/ where
+%% The name of the log directory will be <Name>.logs/run.<Date>/ where
%% Name is the test suite name and Date is the current date and time.
start_log_file() ->
@@ -2101,17 +2137,17 @@ add_init_and_end_per_suite([{make,_,_}=Case|Cases], LastMod, LastRef, FwMod) ->
add_init_and_end_per_suite([{skip_case,{{Mod,all},_}}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
- do_add_end_per_suite_and_skip(LastMod, LastRef, Mod),
+ do_add_end_per_suite_and_skip(LastMod, LastRef, Mod, FwMod),
PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
add_init_and_end_per_suite([{skip_case,{{Mod,_},_}}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
- do_add_init_and_end_per_suite(LastMod, LastRef, Mod),
+ do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
add_init_and_end_per_suite([{skip_case,{conf,_,{Mod,_},_}}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
- do_add_init_and_end_per_suite(LastMod, LastRef, Mod),
+ do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
add_init_and_end_per_suite([{skip_case,_}=Case|Cases], LastMod, LastRef, FwMod) ->
[Case|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
@@ -2123,7 +2159,7 @@ add_init_and_end_per_suite([{conf,Ref,Props,{FwMod,Func}}=Case|Cases], LastMod,
case proplists:get_value(suite, Props) of
Suite when Suite =/= undefined, Suite =/= LastMod ->
{PreCases, NextMod, NextRef} =
- do_add_init_and_end_per_suite(LastMod, LastRef, Suite),
+ do_add_init_and_end_per_suite(LastMod, LastRef, Suite, FwMod),
Case1 = {conf,Ref,proplists:delete(suite,Props),{FwMod,Func}},
PreCases ++ [Case1|add_init_and_end_per_suite(Cases, NextMod,
NextRef, FwMod)];
@@ -2133,19 +2169,19 @@ add_init_and_end_per_suite([{conf,Ref,Props,{FwMod,Func}}=Case|Cases], LastMod,
add_init_and_end_per_suite([{conf,_,_,{Mod,_}}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
- do_add_init_and_end_per_suite(LastMod, LastRef, Mod),
+ do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
add_init_and_end_per_suite([{conf,_,_,_}=Case|Cases], LastMod, LastRef, FwMod) ->
[Case|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
add_init_and_end_per_suite([{Mod,_}=Case|Cases], LastMod, LastRef, FwMod)
when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
- do_add_init_and_end_per_suite(LastMod, LastRef, Mod),
+ do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
add_init_and_end_per_suite([{Mod,_,_}=Case|Cases], LastMod, LastRef, FwMod)
when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
- do_add_init_and_end_per_suite(LastMod, LastRef, Mod),
+ do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
add_init_and_end_per_suite([Case|Cases], LastMod, LastRef, FwMod)->
[Case|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
@@ -2153,10 +2189,23 @@ add_init_and_end_per_suite([], _LastMod, undefined, _FwMod) ->
[];
add_init_and_end_per_suite([], _LastMod, skipped_suite, _FwMod) ->
[];
-add_init_and_end_per_suite([], LastMod, LastRef, _FwMod) ->
- [{conf,LastRef,[],{LastMod,end_per_suite}}].
+add_init_and_end_per_suite([], LastMod, LastRef, FwMod) ->
+ %% we'll add end_per_suite here even if it's not exported
+ %% (and simply let the call fail if it's missing)
+ case erlang:function_exported(LastMod, end_per_suite, 1) of
+ true ->
+ [{conf,LastRef,[],{LastMod,end_per_suite}}];
+ false ->
+ %% let's call a "fake" end_per_suite if it exists
+ case erlang:function_exported(FwMod, end_per_suite, 1) of
+ true ->
+ [{conf,LastRef,[{suite,LastMod}],{FwMod,end_per_suite}}];
+ false ->
+ [{conf,LastRef,[],{LastMod,end_per_suite}}]
+ end
+ end.
-do_add_init_and_end_per_suite(LastMod, LastRef, Mod) ->
+do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod) ->
case code:is_loaded(Mod) of
false -> code:load_file(Mod);
_ -> ok
@@ -2167,7 +2216,16 @@ do_add_init_and_end_per_suite(LastMod, LastRef, Mod) ->
Ref = make_ref(),
{[{conf,Ref,[],{Mod,init_per_suite}}],Mod,Ref};
false ->
- {[],Mod,undefined}
+ %% let's call a "fake" init_per_suite if it exists
+ case erlang:function_exported(FwMod, init_per_suite, 1) of
+ true ->
+ Ref = make_ref(),
+ {[{conf,Ref,[{suite,Mod}],
+ {FwMod,init_per_suite}}],Mod,Ref};
+ false ->
+ {[],Mod,undefined}
+ end
+
end,
Cases =
if LastRef==undefined ->
@@ -2175,20 +2233,44 @@ do_add_init_and_end_per_suite(LastMod, LastRef, Mod) ->
LastRef==skipped_suite ->
Init;
true ->
- %% Adding end_per_suite here without checking if the
- %% function is actually exported. This is because a
- %% conf case must have an end case - so if it doesn't
- %% exist, it will only fail...
- [{conf,LastRef,[],{LastMod,end_per_suite}}|Init]
+ %% we'll add end_per_suite here even if it's not exported
+ %% (and simply let the call fail if it's missing)
+ case erlang:function_exported(LastMod, end_per_suite, 1) of
+ true ->
+ [{conf,LastRef,[],{LastMod,end_per_suite}}|Init];
+ false ->
+ %% let's call a "fake" end_per_suite if it exists
+ case erlang:function_exported(FwMod, end_per_suite, 1) of
+ true ->
+ [{conf,LastRef,[{suite,Mod}],
+ {FwMod,end_per_suite}}|Init];
+ false ->
+ [{conf,LastRef,[],{LastMod,end_per_suite}}|Init]
+ end
+ end
end,
{Cases,NextMod,NextRef}.
-do_add_end_per_suite_and_skip(LastMod, LastRef, Mod) ->
+do_add_end_per_suite_and_skip(LastMod, LastRef, Mod, FwMod) ->
case LastRef of
No when No==undefined ; No==skipped_suite ->
{[],Mod,skipped_suite};
_Ref ->
- {[{conf,LastRef,[],{LastMod,end_per_suite}}],Mod,skipped_suite}
+ case erlang:function_exported(LastMod, end_per_suite, 1) of
+ true ->
+ {[{conf,LastRef,[],{LastMod,end_per_suite}}],
+ Mod,skipped_suite};
+ false ->
+ case erlang:function_exported(FwMod, end_per_suite, 1) of
+ true ->
+ %% let's call "fake" end_per_suite if it exists
+ {[{conf,LastRef,[],{FwMod,end_per_suite}}],
+ Mod,skipped_suite};
+ false ->
+ {[{conf,LastRef,[],{LastMod,end_per_suite}}],
+ Mod,skipped_suite}
+ end
+ end
end.
@@ -2748,7 +2830,15 @@ run_test_cases_loop([{conf,Ref,Props,{Mod,Func}}|_Cases]=Cs0,
{skipped,TcSkip},
{failed,TcFail}]}]
end,
- TSDirs = [{priv_dir,get(test_server_priv_dir)},{data_dir,get_data_dir(Mod)}],
+
+ case get(test_server_create_priv_dir) of
+ auto_per_run -> % use common priv_dir
+ TSDirs = [{priv_dir,get(test_server_priv_dir)},
+ {data_dir,get_data_dir(Mod)}];
+ _ ->
+ TSDirs = [{data_dir,get_data_dir(Mod)}]
+ end,
+
ActualCfg =
if not StartConf ->
update_config(hd(Config), TSDirs ++ CfgProps);
@@ -2758,7 +2848,8 @@ run_test_cases_loop([{conf,Ref,Props,{Mod,Func}}|_Cases]=Cs0,
end, Mode0),
update_config(hd(Config),
TSDirs ++ [{tc_group_path,GroupPath} | CfgProps])
- end,
+ end,
+
CurrMode = curr_mode(Ref, Mode0, Mode),
ConfCaseResult = run_test_case(Ref, 0, Mod, Func, [ActualCfg], skip_init, target,
TimetrapData, CurrMode),
@@ -2910,8 +3001,13 @@ run_test_cases_loop([{conf,_Ref,_Props,_X}=Conf|_Cases0],
run_test_cases_loop([{Mod,Case}|Cases], Config, TimetrapData, Mode, Status) ->
ActualCfg =
- update_config(hd(Config), [{priv_dir,get(test_server_priv_dir)},
- {data_dir,get_data_dir(Mod)}]),
+ case get(test_server_create_priv_dir) of
+ auto_per_run ->
+ update_config(hd(Config), [{priv_dir,get(test_server_priv_dir)},
+ {data_dir,get_data_dir(Mod)}]);
+ _ ->
+ update_config(hd(Config), [{data_dir,get_data_dir(Mod)}])
+ end,
run_test_cases_loop([{Mod,Case,[ActualCfg]}|Cases], Config,
TimetrapData, Mode, Status);
@@ -3248,16 +3344,21 @@ skip_case1(Type, CaseNum, Mod, Func, Comment, Mode) ->
print(major, "=started ~s", [lists:flatten(timestamp_get(""))]),
print(major, "=result skipped: ~s", [Comment1]),
print(2,"*** Skipping test case #~w ~p ***", [CaseNum,{Mod,Func}]),
- TR = xhtml("<tr valign=\"top\">", ["<tr class=\"",odd_or_even(),"\">"]),
+ TR = xhtml("<tr valign=\"top\">", ["<tr class=\"",odd_or_even(),"\">"]),
+ GroupName = case get_name(Mode) of
+ undefined -> "";
+ Name -> cast_to_list(Name)
+ end,
print(html,
TR ++ "<td>" ++ Col0 ++ "~s" ++ Col1 ++ "</td>"
"<td>" ++ Col0 ++ "~p" ++ Col1 ++ "</td>"
+ "<td>" ++ Col0 ++ "~s" ++ Col1 ++ "</td>"
"<td>" ++ Col0 ++ "~p" ++ Col1 ++ "</td>"
"<td>" ++ Col0 ++ "< >" ++ Col1 ++ "</td>"
"<td>" ++ Col0 ++ "0.000s" ++ Col1 ++ "</td>"
"<td><font color=\"~s\">SKIPPED</font></td>"
"<td>~s</td></tr>\n",
- [num2str(CaseNum),Mod,Func,ResultCol,Comment1]),
+ [num2str(CaseNum),fw_name(Mod),GroupName,Func,ResultCol,Comment1]),
if CaseNum > 0 ->
{US,AS} = get(test_server_skipped),
case Type of
@@ -3627,9 +3728,14 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit, Where,
%% if this runs on a parallel test case process,
%% copy the dictionary from the main process
do_if_parallel(Main, fun() -> process_flag(trap_exit, true) end, ok),
- CopyDict = fun() -> lists:foreach(fun({Key,Val}) -> put(Key, Val) end, State) end,
+ CopyDict = fun() -> lists:foreach(fun({Key,Val}) ->
+ put(Key, Val)
+ end, State)
+ end,
do_if_parallel(Main, CopyDict, ok),
- do_if_parallel(Main, fun() -> put(test_server_common_io_handler, {tc,Main}) end, ok),
+ do_if_parallel(Main, fun() ->
+ put(test_server_common_io_handler, {tc,Main})
+ end, ok),
%% if io is being buffered, send start io session message
%% (no matter if case runs on parallel or main process)
case get(test_server_common_io_handler) of
@@ -3649,23 +3755,55 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit, Where,
MinorBase = filename:basename(MinorName),
print(major, "=logfile ~s", [filename:basename(MinorName)]),
- Args1 = [[{tc_logfile,MinorName} | proplists:delete(tc_logfile,hd(Args))]],
- test_server_sup:framework_call(report, [tc_start,{{?pl2a(Mod),Func},MinorName}]),
+ UpdatedArgs =
+ %% maybe create unique private directory for test case or config func
+ case get(test_server_create_priv_dir) of
+ auto_per_run ->
+ update_config(hd(Args), [{tc_logfile,MinorName}]);
+ PrivDirMode ->
+ RunDir = filename:dirname(MinorName),
+ Ext =
+ if Num == 0 ->
+ {_,S,Us} = now(),
+ lists:flatten(io_lib:format(".~w.~w", [S,Us]));
+ true ->
+ %% create unique private directory for test case
+ RunDir = filename:dirname(MinorName),
+ lists:flatten(io_lib:format(".~w", [Num]))
+ end,
+ PrivDir = filename:join(RunDir, ?priv_dir) ++ Ext,
+ if PrivDirMode == auto_per_tc ->
+ ok = file:make_dir(PrivDir);
+ PrivDirMode == manual_per_tc ->
+ ok
+ end,
+ update_config(hd(Args), [{priv_dir,PrivDir++"/"},
+ {tc_logfile,MinorName}])
+ end,
+
+ test_server_sup:framework_call(report,
+ [tc_start,{{?pl2a(Mod),Func},MinorName}]),
print_props((RunInit==skip_init), get_props(Mode)),
+ GroupName = case get_name(Mode) of
+ undefined -> "";
+ Name -> cast_to_list(Name)
+ end,
print(major, "=started ~s", [lists:flatten(timestamp_get(""))]),
{{Col0,Col1},Style} = get_font_style((RunInit==run_init), Mode),
TR = xhtml("<tr valign=\"top\">", ["<tr class=\"",odd_or_even(),"\">"]),
print(html, TR ++ "<td>" ++ Col0 ++ "~s" ++ Col1 ++ "</td>"
"<td>" ++ Col0 ++ "~p" ++ Col1 ++ "</td>"
+ "<td>" ++ Col0 ++ "~s" ++ Col1 ++ "</td>"
"<td><a href=\"~s\">~p</a></td>"
"<td><a href=\"~s#top\"><</a> <a href=\"~s#end\">></a></td>",
- [num2str(Num),Mod,MinorBase,Func,MinorBase,MinorBase]),
+ [num2str(Num),fw_name(Mod),GroupName,MinorBase,Func,
+ MinorBase,MinorBase]),
do_if_parallel(Main, ok, fun erlang:yield/0),
%% run the test case
{Result,DetectedFail,ProcsBefore,ProcsAfter} =
- run_test_case_apply(Num, Mod, Func, Args1, get_name(Mode),
+ run_test_case_apply(Num, Mod, Func, [UpdatedArgs], get_name(Mode),
RunInit, Where, TimetrapData),
{Time,RetVal,Loc,Opts,Comment} =
case Result of
@@ -4107,6 +4245,46 @@ progress(ok, _CaseNum, Mod, Func, _Loc, RetVal, Time,
%%--------------------------------------------------------------------
%% various help functions
+get_fw_mod(Mod) ->
+ case get(test_server_framework) of
+ undefined ->
+ case os:getenv("TEST_SERVER_FRAMEWORK") of
+ FW when FW =:= false; FW =:= "undefined" ->
+ Mod;
+ FW ->
+ list_to_atom(FW)
+ end;
+ '$none' -> Mod;
+ FW -> FW
+ end.
+
+fw_name(?MODULE) ->
+ test_server;
+fw_name(Mod) ->
+ case get(test_server_framework_name) of
+ undefined ->
+ case get_fw_mod(undefined) of
+ undefined ->
+ Mod;
+ Mod ->
+ case os:getenv("TEST_SERVER_FRAMEWORK_NAME") of
+ FWName when FWName =:= false; FWName =:= "undefined" ->
+ Mod;
+ FWName ->
+ list_to_atom(FWName)
+ end;
+ _ ->
+ Mod
+ end;
+ '$none' ->
+ Mod;
+ FWName ->
+ case get_fw_mod(Mod) of
+ Mod -> FWName;
+ _ -> Mod
+ end
+ end.
+
if_auto_skip(Reason={failed,{_,init_per_testcase,_}}, True, _False) ->
{Reason,True()};
if_auto_skip({_T,{skip,Reason={failed,{_,init_per_testcase,_}}},_Opts}, True, _False) ->
@@ -4210,8 +4388,8 @@ get_font_style1(default) ->
%% set to false.
format_exception(Reason={_Error,Stack}) when is_list(Stack) ->
- case os:getenv("TEST_SERVER_FRAMEWORK") of
- FW when FW =:= false; FW =:= "undefined" ->
+ case get_fw_mod(undefined) of
+ undefined ->
case application:get_env(test_server, format_exception) of
{ok,false} ->
{"~p",Reason};
@@ -4219,7 +4397,7 @@ format_exception(Reason={_Error,Stack}) when is_list(Stack) ->
do_format_exception(Reason)
end;
FW ->
- case application:get_env(list_to_atom(FW), format_exception) of
+ case application:get_env(FW, format_exception) of
{ok,false} ->
{"~p",Reason};
_ ->
@@ -4815,8 +4993,8 @@ collect_case([Case | Cases], St, Acc) ->
collect_case(Cases, NewSt, Acc ++ FlatCases).
collect_case_invoke(Mod, Case, MFA, St) ->
- case os:getenv("TEST_SERVER_FRAMEWORK") of
- FW when FW =:= false; FW =:= "undefined" ->
+ case get_fw_mod(undefined) of
+ undefined ->
case catch apply(Mod, Case, [suite]) of
{'EXIT',_} ->
{ok,[MFA],St};
@@ -4824,7 +5002,9 @@ collect_case_invoke(Mod, Case, MFA, St) ->
collect_subcases(Mod, Case, MFA, St, Suite)
end;
_ ->
- Suite = test_server_sup:framework_call(get_suite, [?pl2a(Mod),Case], []),
+ Suite = test_server_sup:framework_call(get_suite,
+ [?pl2a(Mod),Case],
+ []),
collect_subcases(Mod, Case, MFA, St, Suite)
end.
diff --git a/lib/test_server/src/test_server_h.erl b/lib/test_server/src/test_server_h.erl
index e423863b99..6707f98109 100644
--- a/lib/test_server/src/test_server_h.erl
+++ b/lib/test_server/src/test_server_h.erl
@@ -79,10 +79,21 @@ set_group_leader() ->
handle_event({_Type, GL, _Msg}, State) when node(GL)/=node() ->
{ok, State};
handle_event({Tag, _GL, {_Pid, Type, _Report}} = Event, State) ->
- case report(Tag, Type) of
- sasl ->
- tag(State#state.testcase),
- sasl_report_tty_h:handle_event(Event, State#state.sasl);
+ SASL = lists:keyfind(sasl, 1, application:which_applications()),
+ case report_receiver(Tag, Type) of
+ sasl when SASL /= false ->
+ {ok,ErrLogType} = application:get_env(sasl, errlog_type),
+ SReport = sasl_report:format_report(group_leader(), ErrLogType,
+ tag_event(Event)),
+ if is_list(SReport) ->
+ tag(State#state.testcase),
+ sasl_report_tty_h:handle_event(Event,
+ State#state.sasl);
+ true -> %% Report is an atom if no logging is to be done
+ ignore
+ end;
+ sasl -> %% SASL not running
+ ignore;
kernel ->
tag(State#state.testcase),
error_logger_tty_h:handle_event(Event, State#state.kernel);
@@ -111,19 +122,22 @@ terminate(_Reason, _State) ->
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
-report(error_report, supervisor_report) -> sasl;
-report(error_report, crash_report) -> sasl;
-report(info_report, progress) -> sasl;
-report(error, _) -> kernel;
-report(error_report, _) -> kernel;
-report(warning_msg, _) -> kernel;
-report(warning_report, _) -> kernel;
-report(info, _) -> kernel;
-report(info_msg, _) -> kernel;
-report(info_report, _) -> kernel;
-report(_, _) -> none.
+report_receiver(error_report, supervisor_report) -> sasl;
+report_receiver(error_report, crash_report) -> sasl;
+report_receiver(info_report, progress) -> sasl;
+report_receiver(error, _) -> kernel;
+report_receiver(error_report, _) -> kernel;
+report_receiver(warning_msg, _) -> kernel;
+report_receiver(warning_report, _) -> kernel;
+report_receiver(info, _) -> kernel;
+report_receiver(info_msg, _) -> kernel;
+report_receiver(info_report, _) -> kernel;
+report_receiver(_, _) -> none.
tag({M,F,A}) when is_atom(M), is_atom(F), is_integer(A) ->
io:format(user, "~n=TESTCASE: ~p:~p/~p", [M,F,A]);
tag(Testcase) ->
io:format(user, "~n=TESTCASE: ~p", [Testcase]).
+
+tag_event(Event) ->
+ {calendar:local_time(), Event}.
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl
index 729a2b11fc..7e48a11f33 100644
--- a/lib/test_server/src/ts.erl
+++ b/lib/test_server/src/ts.erl
@@ -301,7 +301,15 @@ run(List, Opts) when is_list(List), is_list(Opts) ->
run(Testspec, Config) when is_atom(Testspec), is_list(Config) ->
Options=check_test_get_opts(Testspec, Config),
File=atom_to_list(Testspec),
- run_test(File, [{spec,[File++".spec"]}], Options);
+ Spec = case code:lib_dir(Testspec) of
+ {error, bad_name} when Testspec /= emulator,
+ Testspec /= system,
+ Testspec /= epmd ->
+ create_skip_spec(Testspec, tests(Testspec));
+ _ ->
+ File++".spec"
+ end,
+ run_test(File, [{spec,[Spec]}], Options);
%% Runs one module in a spec (interactive)
run(Testspec, Mod) when is_atom(Testspec), is_atom(Mod) ->
run_test({atom_to_list(Testspec), Mod},
@@ -332,6 +340,21 @@ run(Testspec, Mod, Case, Config) when is_atom(Testspec),
Args = [{suite,atom_to_list(Mod)}, {testcase,atom_to_list(Case)}],
run_test(atom_to_list(Testspec), Args, Options).
+%% Create a spec to skip all SUITES, this is used when the application
+%% to be tested is not part of the OTP release to be tested.
+create_skip_spec(Testspec, SuitesToSkip) ->
+ {ok,Cwd} = file:get_cwd(),
+ TestspecString = atom_to_list(Testspec),
+ Specname = TestspecString++"_skip.spec",
+ {ok,D} = file:open(filename:join([filename:dirname(Cwd),
+ TestspecString++"_test",Specname]),
+ [write]),
+ TestDir = "\"../"++TestspecString++"_test\"",
+ io:format(D,"{suites, "++TestDir++", all}.~n",[]),
+ io:format(D,"{skip_suites, "++TestDir++", ~w, \"Skipped as application"
+ " is not in path!\"}.",[SuitesToSkip]),
+ Specname.
+
%% Check testspec to be valid and get possible Options
%% from the config.
check_test_get_opts(Testspec, Config) ->
diff --git a/lib/test_server/vsn.mk b/lib/test_server/vsn.mk
index 88e3856cf4..a1f4559083 100644
--- a/lib/test_server/vsn.mk
+++ b/lib/test_server/vsn.mk
@@ -1 +1 @@
-TEST_SERVER_VSN = 3.5
+TEST_SERVER_VSN = 3.5.1
diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl
index e0876381ca..78e49044a5 100644
--- a/lib/tools/test/xref_SUITE.erl
+++ b/lib/tools/test/xref_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -2141,17 +2141,17 @@ basic(Conf) when is_list(Conf) ->
?line {ok, _} = eval("components (Mod) E", [[m1,m2,m3]], S),
?line {ok, _} = eval("components closure (Mod) E", [[m1,m2,m3]], S),
?line {ok, _} = eval("condensation (Mod) E",
- [{[m1,m2,m3],[m1,m2,m3]},{[m1,m2,m3],[m17]}], S),
+ [{[m1,m2,m3],[m17]}], S),
?line {ok, _} = eval("condensation closure (Mod) E",
- [{[m1,m2,m3],[m1,m2,m3]},{[m1,m2,m3],[m17]}], S),
+ [{[m1,m2,m3],[m17]}], S),
?line {ok, _} = eval("condensation closure closure closure (Mod) E",
- [{[m1,m2,m3],[m1,m2,m3]},{[m1,m2,m3],[m17]}], S),
+ [{[m1,m2,m3],[m17]}], S),
?line {ok, _} = eval("weak condensation (Mod) E",
[{[m1,m2,m3],[m1,m2,m3]},{[m1,m2,m3],[m17]},{[m17],[m17]}], S),
?line {ok, _} = eval("strict condensation (Mod) E",
[{[m1,m2,m3],[m17]}], S),
?line {ok, _} = eval("range condensation (Mod) E",
- [[m1,m2,m3],[m17]], S),
+ [[m17]], S),
?line {ok, _} = eval("domain condensation (Mod) E",
[[m1,m2,m3]], S),
diff --git a/lib/wx/.gitignore b/lib/wx/.gitignore
index fd76f078d7..0fa427bfe5 100644
--- a/lib/wx/.gitignore
+++ b/lib/wx/.gitignore
@@ -1,2 +1,4 @@
test_log_*
wx_test_case_info
+api_gen/gl_man?
+doc/html/* \ No newline at end of file
diff --git a/lib/wx/Makefile b/lib/wx/Makefile
index 9a75b2e36e..1ec225930e 100644
--- a/lib/wx/Makefile
+++ b/lib/wx/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2008-2011. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2008-2012. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -33,53 +33,9 @@ endif #TERTIARY_BOOTSTRAP
CLEANDIRS = $(SUBDIRS) api_gen
-ifeq ($(INSIDE_ERLSRC),true)
-# we are inside erl src
# ----------------------------------------------------
# Default Subdir Targets
# ----------------------------------------------------
SUB_DIRECTORIES=$(SUBDIRS)
include $(ERL_TOP)/make/otp_subdir.mk
-else
-# we are building standalone wxErlang
-all: opt
-
-opt:
- @mkdir -p ebin
- @mkdir -p priv
- @mkdir -p c_src/$(SYS_TYPE)
- @for d in $(SUBDIRS); do \
- if test ! -d $$d ; then \
- echo "=== Skipping subdir $$d" ; \
- else \
- (cd $$d && $(MAKE) $@) ; \
- fi ; \
- done
-
-# clean, removes beam, object and target files
-
-clean:
- rm -f *~
- @for d in $(CLEANDIRS); do \
- if test ! -d $$d ; then \
- echo "=== Skipping subdir $$d" ; \
- else \
- (cd $$d && $(MAKE) $@) ; \
- fi ; \
- done
-
-docs:
- (cd doc/src/ && $(MAKE) $@)
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-libdir = @libdir@
-
-install:
- escript ./install.es $(INSTALLDIR)
-
-release:
- escript ./install.es --create_release
-
-endif
diff --git a/lib/wx/Notes b/lib/wx/Notes
deleted file mode 100644
index 3f48a3d4fb..0000000000
--- a/lib/wx/Notes
+++ /dev/null
@@ -1,60 +0,0 @@
-- [Dgud] Added wx_object implementation so user can create callback api
- as gen_server like process/objects which gets destroyed
- when the real objects are destroyed.
-- [Dgud] Added clienData to controlWithItems functions
-- [Dgud] Improved error handling, i.e. if 'This' is NULL gives a badarg
- and connect to non existing event type gives badarg.
-- [Dgud] Added wxCalendarEvent, wx*PickerEvents, wxTreeEvent wxNotebookEvent
-- [Dgud] Added wxStaticLine wxArtProvider wxClipboard
-- [Dgud] Reworked test directory
-- [RichardC] Fixed documentation Makefile
-- [Dgud] Fixed dialyzer warnings (Thanks Kostis)
- Fixed Bugs in wxBitmap and wxCursor
-- [RichardC] Fixed a lot of warnings in the demos and examples.
-- [Dgud] Fixed the internal event handling so that callbacks,
- and batch functions can not deadlock by using wxwidgets.
-- [Dgud] **Changed** backwards incompatible:
- Changed code generator so that enum and defines will be more
- stable in the future. This requires that your code will have
- to be recompiled.
-- [HarryH] wxMenuItem:GetBitmap/SetBitmap.
-- [HarryH] Started with the samples, menu.erl
-
-Old: 2008-05-26
-- [Dgud] **Changed** backwards incompatible:
- wxListBox, wxComboBox wxChoice wxCheckListBox
- function 'new': to use more optional values.
-- [Dgud] Added Notebook class
-- [Dgud] Added missing append/insert to ctrlWithItems
-- [Dgud] Added CalenderCtrl class
-- [Dgud] Added SizerItem functions
-- [Dgud] Add wxMDI* classes and wxLayoutAlgorithm
-- [Dgud] Added wxWindow:getHandle() -> integer() to be able to
- use platform dependent 3party libs
-- [Dgud] **Changed** backwards incompatible:
- #wx.user_data to #wx.userData to conform with wx api.
-- [Dgud] Fixed array of string bugs (in several functions).
-- [Dgud] Added data to command events
-- [Dgud] Added wxList(Ctrl) events
-
-- [Dgud] Fixed installer
-- [Dgud] **Changed** the wxEvtHandler:connect api
-- [Dgud] Fixed an event callback glitch.
-- [Dgud] Removed a memory leak, and optimized the object pointers.
-- [Dgud] Added wxMiniFrame and wxSash classes
-- [Dgud] Added wxStyledTextControl, requires larger binary but is nice
- for code viewing and editors.
-
-- [Dgud] Printing functionality, test implementation see sudoku demo
-- [Dgud] Added wxHtmlEasyPrinting, and classless functions to module wx_misc
-- [Dgud] Fixed Colors to actually work
-- [Dgud] Fixed enum guard tests
-
-
-- [Dgud] Fixed defines and added some global vars, incompatible
-- [Dgud] Fixed Colors to be {R,G,B,A} everywhere (optional in args)
-- [Dgud] Fixed memory cleaning and xrc (external dialog editor) support
-- [Dgud] Reworked event handling
-- [Dgud] Added GLU module and some functions
-- [Dgud] Fixed statusbar functions.
-- [Dgud] Prefix all records in wx.hrl with wx. \ No newline at end of file
diff --git a/lib/wx/README b/lib/wx/README
index e81f16681a..77cf6c6bda 100644
--- a/lib/wx/README
+++ b/lib/wx/README
@@ -1,4 +1,3 @@
-
REQUIREMENTS:
At least Erlang-R13B with smp enabled. It Requires unicode support.
@@ -10,17 +9,11 @@ REQUIREMENTS:
And I have given up on Solaris-8|9, wxWidgets on my old gtk version
doesn't run well, 7 of 10 wxWidgets examples seg fault.
Some early tests show that Solaris 10 works, though.
-
-INSTALLING:
- The prebuilt (windows and mac) version can be installed by invoking:
- install.es
- or
- /PATH/TO/ERL/bin/escript install.es
BUILDING:
You will need wxWidgets-2.8.*
- On mac I built wxwidgets with:
+ On mac (snow leopard) I built wxwidgets with:
mkdir MYBUILD; cd MYBUILD
../configure --with-opengl --enable-unicode --enable-graphics_ctx \
@@ -30,6 +23,8 @@ BUILDING:
cd contrib/src/stc/
make && make install
+ Or grab them prebuilt from macports.
+
On linux I have used the wxwidgets-libraries that came with
the distribution. It requires wxStyledTextControl which was
prebuilt on my linux, otherwise you have to build wxWidgets
@@ -48,30 +43,6 @@ BUILDING:
I havn't tested on cygwin at all.
You need to use werl on windows, erl (non-gui) hangs wxwidgets startup.
- make
- should work if erl, gcc and g++ and wx-config is found in path.
-
-
-HELPING:
- See TODO list.
- Use it, i.e. write code which tests the library, submit tests.
- See api_gen/Readme for improving the code generation.
- My C++ knowledge isn't the best, send patches and explain why
- so I can learn something.
-
-STATUS:
- Testing I havn't done more testing than the code in test directory.
- So please help by testing and writing test suites.
- Most classes needs some argument tweaking (in wxapi.conf) to
- work as expected, but I havn't read all the documentation and
- gone through every argument on every function.
-
- See (and run) the demo in the examples directory.
-
- This library is (currently) a driver, so if the you (or I) make errors,
- such as accessing deleted objects or other things wxWidgets didn't
- expect you to do, erlang will crash hard.
-
Cheers
Dan Gudmundsson
diff --git a/lib/wx/TODO b/lib/wx/TODO
deleted file mode 100644
index bf5553b9be..0000000000
--- a/lib/wx/TODO
+++ /dev/null
@@ -1,30 +0,0 @@
-
-Improve documentation.
-
-Fix all fixme's :-)
-
-Makefiles and configure tests
- Can always be improved, especially mine.
-
-Port programs instead of drivers.
- Another backend which doesn't crash the emulator during
- developing/testing or at customer site,
- Option to wx:new().
-
-Cleanup the code!!!!
-
-Platform specific classes/functions
- wxPrinterDC for example is mac and windows only.
-
-Add user_data now that erl_driver can unpack term_binaries.
-
-Add missing clases, especially the ones used in the api:
- wxDropTarget wxXmlResourceHandler wxGLContext
-
-Testing and debugging.
-
-API stuff: (Stuff I've or others have seen that I don't have time to fix right now)
-
-================
-
-Patch wxMac with CGwarpMouseCursorPosition \ No newline at end of file
diff --git a/lib/wx/api_gen/Makefile b/lib/wx/api_gen/Makefile
index 756ec598ce..8adb485ba9 100644
--- a/lib/wx/api_gen/Makefile
+++ b/lib/wx/api_gen/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2010. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -30,7 +30,7 @@ ERL_COMPILE_FLAGS=+debug_info +warn_unused_vars
COMPILER = gen_util wx_gen wx_gen_erl wx_gen_cpp
COMPILER_T = $(COMPILER:%=$(EBIN)/%.beam)
-GL_COMP = gl_gen gl_gen_erl gl_gen_c
+GL_COMP = gl_gen gl_gen_erl gl_gen_c gl_scan_doc
GL_COMP_T = $(GL_COMP:%=$(EBIN)/%.beam)
TARGET_EDIR = ../src/gen
diff --git a/lib/wx/api_gen/README b/lib/wx/api_gen/README
index 10b5209789..dd0c49d227 100644
--- a/lib/wx/api_gen/README
+++ b/lib/wx/api_gen/README
@@ -1,6 +1,6 @@
API GENERATION:
- Most of the code in wx is generated.
- Users of wxErlang should not normally need to regenerate the generated code,
+ Most of the code in wx is generated.
+ Users of wxErlang should not normally need to regenerate the generated code,
as it is checked in by wxErlang developers, when changes are made.
Code checked in is currently generated from wxwidgets 2.8.10.
@@ -10,6 +10,8 @@ REQUIREMENTS:
used to parse wxWidgets c++ headers and generate xml files (in
wx_xml/).
+ 2012-02-09 doxygen 1.7.4 is working fine
+
2008-09-29 doxygen 1.4.6 is required.
Later versions of Doxygen - up to 1.5.6 at least - have a bug in the xml generation
which causes us problems. This has been logged and we are waiting for a fix.
@@ -32,5 +34,12 @@ RUNNING:
I keep the opengl headers separate so I don't go backwards in version when generating the code
from another machine.
+ Also gl.h from different vendors differ so keep it consistent,
+ I have used mesa's gl.h and the glext.h from opengl.org
+ (version see GL_GLEXT_VERSION in gl.hrl)
+
+ I also get the xml documentation from opengl.org (subversion) and place it in
+ api_gen/gl_man2 (all old functions) and api_gen/gl_man4 (all the new functions).
+
CONTRIBUTION:
- Send me patches or update the svn version.
+ Send me patches
diff --git a/lib/wx/api_gen/gen_util.erl b/lib/wx/api_gen/gen_util.erl
index df5b4c3405..4638d4c7ea 100644
--- a/lib/wx/api_gen/gen_util.erl
+++ b/lib/wx/api_gen/gen_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -96,8 +96,8 @@ check_diff(Diff) ->
[<<>>] -> ok;
_ -> throw(diff)
end,
- <<_, _, "%% Copyright", _/binary>> = D1,
- <<_, _, "%% Copyright", _/binary>> = D2,
+ copyright(D1),
+ copyright(D2),
copyright
catch
throw:_ -> diff;
@@ -108,6 +108,10 @@ check_diff(Diff) ->
diff
end.
+copyright(<<_, _, "%% Copyright", _/binary>>) -> ok;
+copyright(<<_, _, " * Copyright", _/binary>>) -> ok;
+copyright(_) -> throw(diff).
+
w(Str) ->
w(Str, []).
w(Str,Args) ->
@@ -217,7 +221,7 @@ erl_copyright() ->
w("%%~n",[]),
w("%% %CopyrightBegin%~n",[]),
w("%%~n",[]),
- w("%% Copyright Ericsson AB ~p-2011. All Rights Reserved.~n",
+ w("%% Copyright Ericsson AB ~p-2012. All Rights Reserved.~n",
[StartYear]),
w("%%~n",[]),
w("%% The contents of this file are subject to the Erlang Public License,~n",[]),
@@ -237,7 +241,7 @@ c_copyright() ->
w("/*~n",[]),
w(" * %CopyrightBegin%~n",[]),
w(" *~n",[]),
- w(" * Copyright Ericsson AB 2008-2011. All Rights Reserved.~n",[]),
+ w(" * Copyright Ericsson AB 2008-2012. All Rights Reserved.~n",[]),
w(" *~n",[]),
w(" * The contents of this file are subject to the Erlang Public License,~n",[]),
w(" * Version 1.1, (the \"License\"); you may not use this file except in~n",[]),
diff --git a/lib/wx/api_gen/gl_gen.erl b/lib/wx/api_gen/gl_gen.erl
index 8998d341e7..331ba32ba4 100644
--- a/lib/wx/api_gen/gl_gen.erl
+++ b/lib/wx/api_gen/gl_gen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -62,11 +62,11 @@ gen_code() ->
GLDefs = parse_gl_defs(Opts),
{GLUDefines,GLUFuncs} = setup(GLUDefs, Opts),
{GLDefines,GLFuncs} = setup(GLDefs, Opts),
+ gl_gen_erl:gl_defines(GLDefines),
+ gl_gen_erl:gl_api(GLFuncs),
gl_gen_erl:glu_defines(GLUDefines),
gl_gen_erl:glu_api(GLUFuncs),
- gl_gen_erl:gl_defines(GLDefines),
- gl_gen_erl:gl_api(GLFuncs),
%%gl_gen_erl:gen_debug(GLFuncs,GLUFuncs),
gl_gen_c:gen(GLFuncs,GLUFuncs),
ok.
@@ -190,14 +190,17 @@ parse_define([#xmlElement{name=initializer,content=[#xmlText{value=V}]}|_],Def,_
try
case Val0 of
"0x" ++ Val1 ->
- Val = http_util:hexlist_to_integer(Val1),
- Def#def{val=Val, type=hex};
+ _ = http_util:hexlist_to_integer(Val1),
+ Def#def{val=Val1, type=hex};
_ ->
Val = list_to_integer(Val0),
Def#def{val=Val, type=int}
end
- catch _:_ ->
- Def#def{val=Val0, type=string}
+ catch _:_ ->
+ case catch list_to_float(Val0) of
+ {'EXIT', _} -> Def#def{val=Val0, type=string};
+ _ -> Def#def{val=Val0, type=float_str}
+ end
end;
parse_define([_|R], D, Opts) ->
parse_define(R, D, Opts);
@@ -360,7 +363,9 @@ extract_type_info2("**", Acc) -> [{by_ref,{pointer,2}}|Acc];
extract_type_info2(Type, Acc) -> [Type|Acc].
parse_type2(["void"], _T, _Opts) -> void;
-parse_type2([N="void"|R], T, Opts) ->
+parse_type2([N="void", const|R], T, Opts) ->
+ parse_type2([const|R],T#type{name=N, base=idx_binary},Opts);
+parse_type2([N="void"|R], T, Opts) ->
parse_type2(R,T#type{name=N},Opts);
parse_type2([const|R],T=#type{mod=Mod},Opts) ->
parse_type2(R,T#type{mod=[const|Mod]},Opts);
@@ -676,6 +681,7 @@ get_extension(ExtName,_Opts) ->
"IGP" ++ Name -> {reverse(Name),"PGI"};
"PH" ++ Name -> {reverse(Name),"HP"};
"YDEMERG" ++ Name -> {reverse(Name),"GREMEDY"};
+ "SEO" ++ Name -> {reverse(Name),"OES"};
%%["" ++ Name] -> {Name; %%
_ -> {ExtName, ""}
end.
diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl
index f292c8723e..25f89e4ad4 100644
--- a/lib/wx/api_gen/gl_gen_erl.erl
+++ b/lib/wx/api_gen/gl_gen_erl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,7 @@
%%%-------------------------------------------------------------------
%%% File : gl_gen_erl.erl
%%% Author : Dan Gudmundsson <[email protected]>
-%%% Description :
+%%% Description :
%%%
%%% Created : 18 Apr 2007 by Dan Gudmundsson <[email protected]>
%%%-------------------------------------------------------------------
@@ -31,7 +31,7 @@
-import(lists, [foldl/3,foldr/3,reverse/1, keysearch/3, map/2, filter/2, max/1]).
-import(gen_util, [lowercase/1, lowercase_all/1, uppercase/1, uppercase_all/1,
- open_write/1, close/0, erl_copyright/0, w/2,
+ open_write/1, close/0, erl_copyright/0, w/2,
args/3, args/4, strip_name/2]).
gl_defines(Defs) ->
@@ -40,7 +40,7 @@ gl_defines(Defs) ->
w("~n%% OPENGL DEFINITIONS~n~n", []),
w("%% This file is generated DO NOT EDIT~n~n", []),
[gen_define(Def) || Def=#def{} <- Defs],
- close(),
+ close(),
ok.
glu_defines(Defs) ->
@@ -50,36 +50,40 @@ glu_defines(Defs) ->
w("%% This file is generated DO NOT EDIT~n~n", []),
[gen_define(Def) || Def=#def{} <- Defs],
close(),
- ok.
+ ok.
gen_define(#def{name=N, val=Val, type=int}) ->
w("-define(~s, ~p).~n", [N,Val]);
+gen_define(#def{name=N, val=Val, type=float_str}) ->
+ w("-define(~s, ~s).~n", [N,Val]);
gen_define(#def{name=N, val=Val, type=hex}) ->
- w("-define(~s, ~.16#).~n", [N,Val]);
+ w("-define(~s, 16#~s).~n", [N,Val]);
gen_define(#def{name=N, val=Val, type=string}) ->
- w("-define(~s, ?~s).~n", [N,Val]).
+ w("-define(~s, ?~s).~n", [N,Val]);
+gen_define(#def{name="GLEXT_64_TYPES"++_, val=undefined, type=undefined}) ->
+ ok.
types() ->
[{"GLenum", "32/native-unsigned"},
{"GLboolean", "8/native-unsigned"},
{"GLbitfield","32/native-unsigned"}, %
%%{"GLvoid",":void "},%
- {"GLbyte", "8/native-signed"}, % 1-byte signed
- {"GLshort", "16/native-signed"}, % 2-byte signed
- {"GLint", "32/native-signed"}, % 4-byte signed
- {"GLubyte", "8/native-unsigned"}, % 1-byte unsigned
- {"GLushort", "16/native-unsigned"}, % 2-byte unsigned
- {"GLuint", "32/native-unsigned"}, % 4-byte unsigned
- {"GLsizei", "32/native-signed"}, % 4-byte signed
- {"GLfloat", "32/native-float"}, % single precision float
- {"GLclampf", "32/native-float"}, % single precision float in [0,1]
- {"GLdouble", "64/native-float"}, % double precision float
- {"GLclampd", "64/native-float"}, % double precision float in [0,1]
+ {"GLbyte", "8/native-signed"}, % 1-byte signed
+ {"GLshort", "16/native-signed"}, % 2-byte signed
+ {"GLint", "32/native-signed"}, % 4-byte signed
+ {"GLubyte", "8/native-unsigned"}, % 1-byte unsigned
+ {"GLushort", "16/native-unsigned"}, % 2-byte unsigned
+ {"GLuint", "32/native-unsigned"}, % 4-byte unsigned
+ {"GLsizei", "32/native-signed"}, % 4-byte signed
+ {"GLfloat", "32/native-float"}, % single precision float
+ {"GLclampf", "32/native-float"}, % single precision float in [0,1]
+ {"GLdouble", "64/native-float"}, % double precision float
+ {"GLclampd", "64/native-float"}, % double precision float in [0,1]
{"GLsizeiptr","64/native-unsigned"}, % 64 bits int, convert on c-side
{"GLintptr", "64/native-unsigned"}, % 64 bits int, convert on c-sidew
{"GLUquadric", "64/native-unsigned"},% Handle 32bits aargh 64bits on mac64
{"GLhandleARB","64/native-unsigned"},% Handle 32bits aargh 64bits on mac64
-
+
{"GLsync", "64/native-unsigned"}, % Pointer to record
{"GLuint64", "64/native-unsigned"},
{"GLint64", "64/native-signed"}
@@ -94,20 +98,17 @@ gl_api(Fs) ->
w("%% See <a href=\"http://www.opengl.org/sdk/docs/man/\">www.opengl.org</a>~n",[]),
w("%%~n", []),
w("%% Booleans are represented by integers 0 and 1.~n~n", []),
- w("%% @type mem(). memory block~n", []),
- w("%% @type enum(). An integer defined in gl.hrl~n", []),
- w("%% @type offset(). An integer which is an offset in an array~n", []),
- w("%% @type clamp(). A float clamped between 0.0 - 1.0~n", []),
-
- w("-module(gl).~n~n",[]),
+
+ w("-module(gl).~n~n",[]),
w("-compile(inline).~n", []),
%% w("-include(\"wxe.hrl\").~n", []),
[w("-define(~s,~s).~n", [GL,Erl]) || {GL,Erl} <- types()],
gen_types(gl),
-
+
Exp = fun(F) -> gen_export(F) end,
ExportList = lists:map(Exp,Fs),
+
w("~n-export([~s]).~n~n", [args(fun(EF) -> EF end, ",", ExportList, 60)]),
w("-export([call/2, cast/2, send_bin/1]).~n",[]),
w("%% @hidden~n", []),
@@ -140,10 +141,10 @@ gl_api(Fs) ->
w(" erlang:port_command(Port,Bin)~n", []),
w(" end.~n", []),
w("~n", []),
-
+
w("~n%% API~n~n", []),
[gen_funcs(F) || F <- Fs],
- close(),
+ close(),
ok.
glu_api(Fs) ->
@@ -155,28 +156,24 @@ glu_api(Fs) ->
w("%% See <a href=\"http://www.opengl.org/sdk/docs/man/\">www.opengl.org</a>~n",[]),
w("%%~n", []),
w("%% Booleans are represented by integers 0 and 1.~n~n", []),
- w("%% @type mem(). memory block~n", []),
- w("%% @type enum(). An integer defined in gl.hrl~n", []),
- w("%% @type offset(). An integer which is an offset in an array~n", []),
- w("%% @type clamp(). A float clamped between 0.0 - 1.0~n~n", []),
- w("-module(glu).~n",[]),
+ w("-module(glu).~n",[]),
w("-compile(inline).~n", []),
%%w("-include(\"wxe.hrl\").~n", []),
[w("-define(~s,~s).~n", [GL,Erl]) || {GL,Erl} <- types()],
gen_types(glu),
-
+
Exp = fun(F) -> gen_export(F) end,
ExportList = ["tesselate/2" | lists:map(Exp,Fs)],
w("~n-export([~s]).~n~n", [args(fun(EF) -> EF end, ",", ExportList, 60)]),
w("-import(gl, [call/2,cast/2,send_bin/1]).", []),
w("~n%% API~n~n", []),
- w("%% @spec (Vec3, [Vec3]) -> {Triangles, VertexPos}~n",[]),
- w("%% Vec3 = {float(),float(),float()}~n",[]),
- w("%% Triangles = [VertexIndex::integer()]~n",[]),
- w("%% VertexPos = binary()~n",[]),
+ %% w("%% @spec (Vec3, [Vec3]) -> {Triangles, VertexPos}~n",[]),
+ %% w("%% Vec3 = {float(),float(),float()}~n",[]),
+ %% w("%% Triangles = [VertexIndex::integer()]~n",[]),
+ %% w("%% VertexPos = binary()~n",[]),
w("%% @doc General purpose polygon triangulation.~n",[]),
w("%% The first argument is the normal and the second a list of~n"
"%% vertex positions. Returned is a list of indecies of the vertices~n"
@@ -184,6 +181,9 @@ glu_api(Fs) ->
"%% vertex positions, it starts with the vertices in Vs and~n"
"%% may contain newly created vertices in the end.~n", []),
+ w("-spec tesselate(Normal, [Vs]) -> {Triangles, VertexPos}~n", []),
+ w(" when Normal :: vertex(), Vs :: vertex(),~n", []),
+ w(" Triangles :: [integer()], VertexPos :: binary().~n", []),
w("tesselate({Nx,Ny,Nz}, Vs) ->~n",[]),
w(" call(5000, <<(length(Vs)):32/native,0:32,~n"
" Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble,~n"
@@ -215,15 +215,21 @@ gen_funcs(F) ->
erase(current_func),
w(".~n~n",[]).
-gen_types(Where) ->
+gen_types(Where) ->
case Where of
- glu -> ignore;
+ glu ->
+ w("-type vertex() :: {float(), float(), float()}.~n", []),
+ w("-type enum() :: non_neg_integer(). %% See wx/include/gl.hrl or glu.hrl~n", []);
gl ->
- w("-type clamp() :: float().~n", []),
- w("-type offset() :: non_neg_integer().~n", [])
+ w("-type enum() :: non_neg_integer(). %% See wx/include/gl.hrl~n", []),
+ w("-type clamp() :: float(). %% 0.0..1.0~n", []),
+ w("-type offset() :: non_neg_integer(). %% Offset in memory block~n", [])
end,
- w("-type enum() :: non_neg_integer().~n", []),
- w("-type mem() :: binary() | tuple().~n", []),
+ w("-type matrix() :: {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 mem() :: binary() | tuple(). %% Memory block~n", []),
ok.
gen_export(F) ->
@@ -238,43 +244,182 @@ gen_export_1([F|_]) when is_list(F) ->
gen_export_1(F) when is_list(F) ->
gen_export2(get(F)).
-gen_export2(#func{name=Name,alt={vector,VecPos,Vec}}) ->
- #func{params=As0} = get(Vec),
+gen_export2(#func{name=Name,alt=Alt={vector,VecPos,Vec}}) ->
+ #func{params=As0} = get(Vec),
{As1,_As2} = lists:split(VecPos, As0),
Args = lists:filter(fun(Arg) -> func_arg(Arg) =/= skip end, As1),
- erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args) +1);
-gen_export2(#func{name=Name,params=As0}) ->
+ Export = erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args) +1),
+ DocN = doc_name(Name,Alt),
+ (get({export_arg,DocN}) == undefined) andalso put({export_arg, DocN}, Export),
+ Export;
+gen_export2(#func{name=Name,params=As0, alt=Alt}) ->
Args = lists:filter(fun(Arg) -> func_arg(Arg) =/= skip end, As0),
- erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args)).
+ Export = erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args)),
+ DocN = doc_name(Name,Alt),
+ (get({export_arg,DocN}) == undefined) andalso put({export_arg, DocN}, Export),
+ Export.
-gen_doc([#func{name=Name, alt={vector,VecPos,Vec}}]) ->
- #func{type=T,params=As} = get(Vec),
+gen_doc([#func{name=Name, params=Orig, alt={vector,VecPos,Vec}}]) ->
+ #func{type=T,params=As} = get(Vec),
{As1,As2} = lists:split(VecPos, As),
+ #arg{name=OrigName} = lists:last(Orig),
Args1 = case args(fun func_arg/1, ",", As1) of [] -> []; Else -> Else++"," end,
Args2 = args(fun func_arg/1, ",", As2),
- w("%% @spec (~s{~s}) -> ~s~n",[Args1,Args2,doc_return_types(T,As, doc)]),
w("%% @equiv ~s(~s)~n",[erl_func_name(Vec), Args1++Args2]),
- SA1 = case doc_arg_types(As1, spec) of [] -> []; E -> E++"," end,
- SA2 = doc_arg_types(As2, spec),
- w("-spec ~s(~s{~s}) -> ~s.~n",
- [erl_func_name(Name), SA1, SA2,
- doc_return_types(T,As, spec)]);
-
-gen_doc([#func{name=Name,type=T,params=As,alt=Alt}|_]) ->
- w("%% @spec (~s) -> ~s~n", [doc_arg_types(As, doc),doc_return_types(T,As, doc)]),
- GLDoc = "http://www.opengl.org/sdk/docs/man/xhtml/",
- w("%% @doc See <a href=\"~s~s.xml\">external</a> documentation.~n",
- [GLDoc, doc_name(Name,Alt)]),
- w("-spec ~s(~s) -> ~s.~n",
- [erl_func_name(Name), doc_arg_types(As, spec), doc_return_types(T,As, spec)]).
+ SA1 = case doc_arg_types(As1) of [] -> []; E -> E++"," end,
+ SA2 = doc_arg_types(As2),
+ w("-spec ~s(~s~s) -> ~s when ~s :: {~s}.~n",
+ [erl_func_name(Name), SA1, erl_arg_name(OrigName),
+ doc_return_types(T,As), erl_arg_name(OrigName), SA2]);
+
+gen_doc([F=#func{name=Name,type=T,params=As, alt=Alt}|_]) ->
+ gen_doc(Name, Alt, gen_export2(F)),
+ Ps = [Arg || #arg{name=Arg, in=In, where=Where} <- As,
+ In =/= false, Where =/= c],
+ Args = args(fun erl_arg_name/1, ", ", Ps),
+ case Args of
+ [] ->
+ w("-spec ~s(~s) -> ~s.~n",
+ [erl_func_name(Name), Args, doc_return_types(T,As)]);
+ _ -> w("-spec ~s(~s) -> ~s when ~s.~n",
+ [erl_func_name(Name), Args, doc_return_types(T,As), doc_arg_types(As)])
+ end.
+
+-define(LINE_LEN, 90).
+
+gen_doc(Name0, Alt, Export) ->
+ Name = doc_name(Name0, Alt),
+ case get({doc, Name}) of
+ undefined ->
+ GLDoc = "http://www.opengl.org/sdk/docs/man/xhtml/",
+ case parse_doc(Name, _Dir1 ="gl_man4", _Dir2="gl_man2") of
+ {error, _} ->
+ case reverse(Name) of
+ "BRA" ++ _ -> ok;
+ "TXE" ++ _ -> ok;
+ _ ->
+ %% io:format("Missing doc: no ~s.xml (~s) found in ~s or ~s~n",
+ %% [Name, Name0, Dir1, Dir2]),
+ ok
+ end,
+ w("%% @doc ~s~n%%~n%% See <a href=\"~s~s.xml\">external</a> documentation.~n",
+ [Name, GLDoc, Name]);
+ Doc ->
+ put({doc, Name}, Export),
+ format_doc(Doc, ?LINE_LEN),
+ w("~n%%~n%% See <a href=\"~s~s.xml\">external</a> documentation.~n",
+ [GLDoc, Name])
+ end;
+ Where ->
+ w("%% @doc ~n", []),
+ w("%% See {@link ~s}~n", [Where])
+ end.
+parse_doc(Name, Dir1, Dir2) ->
+ case gl_scan_doc:file(filename:join(Dir1, Name++".xml"), []) of
+ {error, {_, "no such" ++ _}} ->
+ gl_scan_doc:file(filename:join(Dir2, Name++".xml"), []);
+ Doc ->
+ Doc
+ end.
+
+format_doc(Strs, Count) when Count < 0 ->
+ w("~n%% ", []),
+ format_doc(Strs, ?LINE_LEN);
+format_doc([{constant, Const}|Rest], Count) ->
+ w("`?~s'", [Const]),
+ format_doc(Rest, Count-length(Const)-8);
+format_doc([{emphasis, Const}|Rest], Count) ->
+ w("`~s'", [Const]),
+ format_doc(Rest, Count-length(Const)-7);
+format_doc([{function, Func}|Rest], Count) ->
+ case Func of
+ "glu" ++ _ ->
+ w("``glu:~s''", [erl_func_name(Func)]);
+ "gl" ++ _ ->
+ w("``gl:~s''", [erl_func_name(Func)]);
+ _ ->
+ w("`~s'", [Func])
+ end,
+ format_doc(Rest, Count-length(Func)-7);
+format_doc([{reffunc, Func}|Rest], Count) ->
+ Out = fun(Export) ->
+ case Func of
+ "glu" ++ _ -> w(" {@link glu:~s} ", [Export]);
+ "gl" ++ _ -> w(" {@link gl:~s} ", [Export])
+ end
+ end,
+ case get({export_arg, Func}) of
+ undefined ->
+ case get({export_arg, doc_name(Func, undefined)}) of
+ undefined ->
+ %% io:format("Func ~p undefined (~p) ~n",
+ %% [Func, doc_name(Func, undef)]),
+ w("see `~s'", [Func]);
+ Export -> Out(Export)
+ end;
+ Export ->
+ Out(Export)
+ end,
+ format_doc(Rest, Count-length(Func)-10);
+format_doc([{parameter, Param}|Rest], Count) ->
+ w(" `~s' ", [erl_arg_name(Param)]),
+ format_doc(Rest, Count-length(Param)-7);
+format_doc([{equation, Eq}|Rest], Count) ->
+%% w("```", []),
+ format_doc([Eq], Count),
+%% w("'''", []),
+ format_doc(Rest, Count);
+format_doc([{fenced, Open, Close, Eq}|Rest], Count) ->
+ w(Open, []),
+ format_doc(Eq, Count),
+ w(Close, []),
+ format_doc(Rest, Count);
+
+format_doc([{code, Code}|Rest], Count) ->
+ w("``~s''", [Code]),
+ format_doc(Rest, Count-length(Code)-7);
+
+format_doc([para|Rest], _Count) ->
+ w("~n%%~n%% ", []),
+ format_doc(Rest, ?LINE_LEN);
+format_doc([break|Rest], _Count) ->
+ w("<br />~n%% ", []),
+ format_doc(Rest, ?LINE_LEN);
+format_doc([{purpose, Purpose}, para | Doc], _Count) ->
+ w("%% @doc ~s~n%%~n%% ", [uppercase(Purpose)]),
+ format_doc(Doc, ?LINE_LEN);
+format_doc([{purpose, Purpose} | Doc], _Count) ->
+ w("%% @doc ~s~n%%~n%% ", [Purpose]),
+ format_doc(Doc, ?LINE_LEN);
+format_doc([listentry|Rest], _Count) ->
+ w("~n%%~n%% ", []),
+ format_doc(Rest, ?LINE_LEN);
+format_doc([Str|Rest], Count) ->
+ case length(Str) of
+ Len when Len < Count ->
+ w("~s", [Str]),
+ format_doc(Rest, Count-Len);
+ _ ->
+ {Str1, Str2} = split(Str, Count, []),
+ w("~s~n%% ", [Str1]),
+ format_doc([Str2|Rest], ?LINE_LEN)
+ end;
+format_doc([], _) -> ok.
+
+split([$ |Str], Count, Acc) when Count =< 5 ->
+ {reverse(Acc), Str};
+split([Chr|Str], Count, Acc) ->
+ split(Str, Count-1, [Chr|Acc]);
+split([], _, Acc) ->
+ {reverse(Acc), []}.
gen_func(#func{name=Name,alt={vector,VecPos,Vec}}) ->
- #func{params=As} = get(Vec),
+ #func{params=As} = get(Vec),
{As1,As2} = lists:split(VecPos, As),
Args1 = case args(fun func_arg/1, ",", As1) of [] -> []; Else -> Else++"," end,
Args2 = args(fun func_arg/1, ",", As2),
-
+
w("~s(~s{~s}) ->", [erl_func_name(Name),Args1,Args2]),
w(" ~s(~s)", [erl_func_name(Vec), Args1++Args2]);
gen_func(_F=#func{name=Name,type=T,params=As,id=MId}) ->
@@ -290,7 +435,7 @@ gen_func(_F=#func{name=Name,type=T,params=As,id=MId}) ->
w(" cast(~p, <<~s>>)", [MId, StrArgs])
end.
-func_arg(#arg{in=In,where=W,name=Name,type=Type})
+func_arg(#arg{in=In,where=W,name=Name,type=Type})
when In =/= false, W =/= c ->
case Type of
#type{single={tuple,TSz0}} when TSz0 =/= undefined ->
@@ -305,45 +450,39 @@ func_arg(#arg{in=In,where=W,name=Name,type=Type})
end;
func_arg(_) -> skip.
-doc_arg_types(Ps0, Type) ->
+doc_arg_types(Ps0) ->
Ps = [P || P=#arg{in=In, where=Where} <- Ps0,In =/= false, Where =/= c],
- args(fun(Arg) -> doc_arg_type(Arg, Type) end, ",", Ps).
+ args(fun(Arg) -> doc_arg_type(Arg) end, ",", Ps).
-doc_return_types(T, Ps0, Type) ->
+doc_return_types(T, Ps0) ->
Ps = [P || P=#arg{in=In, where=Where} <- Ps0,In =/= true, Where =/= c],
- doc_return_types2(T, Ps, Type).
-
-doc_return_types2(void, [], _) -> "ok";
-doc_return_types2(void, [#arg{type=T}], _) -> doc_arg_type2(T);
-doc_return_types2(T, [], _) -> doc_arg_type2(T);
-doc_return_types2(void, Ps, Type) ->
- "{" ++ args(fun(Arg) -> doc_arg_type(Arg, Type) end,",",Ps) ++ "}";
-doc_return_types2(T, Ps, Type) ->
- "{" ++ doc_arg_type2(T) ++ "," ++
- args(fun(Arg) -> doc_arg_type(Arg, Type) end,",",Ps) ++ "}".
-
-doc_arg_type(#arg{name=Name,type=T}, doc) ->
- try
- erl_arg_name(Name) ++ "::" ++ doc_arg_type2(T)
- catch _:Error ->
- io:format("Error: ~p ~p~n~p~n",[Name, Error, erlang:get_stacktrace()]),
- exit(error)
- end;
-doc_arg_type(#arg{name=Name,type=T}, spec) ->
- try
- doc_arg_type2(T)
+ doc_return_types2(T, Ps).
+
+doc_return_types2(void, []) -> "ok";
+doc_return_types2(void, [#arg{type=T}]) -> doc_arg_type2(T);
+doc_return_types2(T, []) -> doc_arg_type2(T);
+doc_return_types2(void, Ps) ->
+ "{" ++ args(fun(Arg) -> doc_arg_type(Arg) end,",",Ps) ++ "}";
+doc_return_types2(T, Ps) ->
+ "{" ++ doc_arg_type2(T) ++ "," ++
+ args(fun(Arg) -> doc_arg_type(Arg) end,",",Ps) ++ "}".
+
+doc_arg_type(#arg{name=Name,type=T}) ->
+ try
+ erl_arg_name(Name) ++ " :: " ++ doc_arg_type2(T)
catch _:Error ->
io:format("Error spec: ~p ~p~n~p~n",[Name, Error, erlang:get_stacktrace()]),
exit(error)
end.
-
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(#type{base=float, single={tuple,16}}) ->
+ "matrix()";
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}) ->
@@ -365,21 +504,21 @@ doc_arg_type3(#type{base=bool}) -> "0|1";
doc_arg_type3(#type{base=binary}) -> "binary()";
doc_arg_type3(#type{base=memory}) -> "mem()".
-guard_test(As) ->
- Str = args(fun(#arg{name=N,type=#type{base=guard_int}}) ->
- " is_integer("++erl_arg_name(N)++")";
- (_) ->
+guard_test(As) ->
+ Str = args(fun(#arg{name=N,type=#type{base=guard_int}}) ->
+ " is_integer("++erl_arg_name(N)++")";
+ (_) ->
skip
end, ",", As),
case Str of
[] -> [];
Other -> " when " ++ Other
- end.
+ end.
-pre_marshal([#arg{name=N,in=true,type=#type{base=binary}}|R]) ->
+pre_marshal([#arg{name=N,in=true,type=#type{base=binary}}|R]) ->
w(" send_bin(~s),~n", [erl_arg_name(N)]),
pre_marshal(R);
-pre_marshal([#arg{name=N,type=#type{base=memory}}|R]) ->
+pre_marshal([#arg{name=N,type=#type{base=memory}}|R]) ->
w(" send_bin(~s),~n", [erl_arg_name(N)]),
pre_marshal(R);
pre_marshal([A=#arg{name=N,type=#type{base=string,single=list}}|R]) ->
@@ -412,14 +551,14 @@ marshal_arg(#type{size=Sz,name=Type,single={tuple,undefined}},Name,A0) ->
" (<< <<C:?"++Type++ ">> ||"
"C <- tuple_to_list("++Name++")>>)/binary",
case Sz of
- 4 ->
+ 4 ->
{Str,Align} = align(4,A0,Str0),
{Str++",0:((("++integer_to_list(Align div 4)++
"+size("++Name++")) rem 2)*32)",0};
- 8 ->
+ 8 ->
align(8,A0,Str0)
end;
-marshal_arg(#type{size=BSz,name=Type,single={tuple,TSz}},Name,A0)
+marshal_arg(#type{size=BSz,name=Type,single={tuple,TSz}},Name,A0)
when is_integer(TSz) ->
NameId = hd(Name),
Names = [[NameId|integer_to_list(Id)] || Id <- lists:seq(1,TSz)],
@@ -427,7 +566,7 @@ marshal_arg(#type{size=BSz,name=Type,single={tuple,TSz}},Name,A0)
align(BSz,TSz,A0,All);
marshal_arg(#type{size=BSz,name=Type,single={tuple,matrix12}},Name,A0) ->
- NameId = hd(Name),
+ NameId = hd(Name),
Ns0 = [[NameId|integer_to_list(Id)] || Id <- lists:seq(1,3)],
Ns1 = [[NameId|integer_to_list(Id)] || Id <- lists:seq(4,6)],
Ns2 = [[NameId|integer_to_list(Id)] || Id <- lists:seq(7,9)],
@@ -436,7 +575,7 @@ marshal_arg(#type{size=BSz,name=Type,single={tuple,matrix12}},Name,A0) ->
Ns0 ++ ["0"] ++ Ns1 ++ ["0"] ++ Ns2 ++ ["0"] ++ Ns3 ++ ["1"]),
align(BSz,16,A0,All);
-marshal_arg(#type{size=Sz,name=Type,base=Base,single=list},Name,A0)
+marshal_arg(#type{size=Sz,name=Type,base=Base,single=list},Name,A0)
when Base =:= float; Base =:= int ->
KeepA = case Sz of 8 -> "0:32,"; _ -> "" end,
Str0 = "(length("++Name++")):?GLuint,"++KeepA++"\n"
@@ -459,14 +598,14 @@ marshal_arg(#type{base=string,single=true,ref={pointer,1}},Name,A0) ->
align_after(1,A0,1,1,Name,Str);
marshal_arg(#type{base=string,single=list,ref={pointer,2}},Name,A0) ->
- Str0 =
+ Str0 =
"(length("++Name++")):?GLuint,"
"(size("++Name ++ "Temp)):?GLuint,"
"(" ++ Name ++ "Temp)/binary",
{Str,A} = align(4,A0,Str0),
- {Str ++ ",0:((8-((size("++Name++"Temp)+"++
+ {Str ++ ",0:((8-((size("++Name++"Temp)+"++
integer_to_list(A) ++") rem 8)) rem 8)", 0};
-
+
marshal_arg(#type{size=Sz,name=Type,single={tuple_list,TSz}},Name,A0) ->
NameId = hd(Name),
Names = [[NameId|integer_to_list(Id)] || Id <- lists:seq(1,TSz)],
@@ -508,11 +647,11 @@ align(8,_,6,Str) -> {"0:16,"++Str, 0};
align(8,_,7,Str) -> {"0:8," ++Str, 0}.
align_after(8,0,_Add,_Multiplier,_Name,Str) -> {Str,0};
-align_after(4,0,Add,Mult,Name,Str) ->
+align_after(4,0,Add,Mult,Name,Str) ->
Extra = extra_align(Add,Mult),
Align = ",0:(((length("++Name++")"++Extra++") rem 2)*32)",
{Str ++ Align,0};
-align_after(4,4,Add,Mult,Name,Str) ->
+align_after(4,4,Add,Mult,Name,Str) ->
Extra = extra_align(Add,Mult),
Align = ",0:(((1+length("++Name++")"++Extra++") rem 2)*32)",
{Str ++ Align,0};
@@ -531,14 +670,14 @@ align_after(Sz,A,Add,Mult,Name,Str) ->
extra_align(0,1) -> "";
extra_align(0,M) when M > 1 -> "* " ++ integer_to_list(M);
extra_align(A,1) when A > 0 -> "+ " ++ integer_to_list(A);
-extra_align(A,M) when A > 0,M>1 ->
+extra_align(A,M) when A > 0,M>1 ->
"* " ++ integer_to_list(M) ++ "+ " ++ integer_to_list(A).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
have_return_vals(void, Ps) ->
- lists:any(fun(#arg{in=In, type=#type{base=B}}) ->
- In =/= true orelse B =:= memory
+ lists:any(fun(#arg{in=In, type=#type{base=B}}) ->
+ In =/= true orelse B =:= memory
end, Ps);
have_return_vals(#type{}, _) -> true.
@@ -550,21 +689,28 @@ erl_arg_name(Name) -> uppercase(Name).
check_name("begin") -> "'begin'";
check_name("end") -> "'end'";
check_name(Other) -> Other.
-
-
-doc_name(Name0, Alt) ->
- Name = doc_name2(Name0,Alt),
-%% case lists:member(lists:last(Name0), "uvbisdf987654312") of
-%% true -> io:format("~s ~s~n", [Name0,Name]);
-%% false -> ignore
-%% end,
- Name.
-
-doc_name2(N="glGetBufferParameteriv", _) -> N;
-doc_name2(N="glEnd", _) -> N;
-doc_name2(Name, {has_vector,_,_}) ->
+
+doc_name(N="glGetBufferParameteriv", _) -> N;
+doc_name("glEnd"++What, _) -> "glBegin"++What;
+doc_name("glDisable" ++ What, _) -> "glEnable" ++ What;
+doc_name("glPop" ++ What, _) -> "glPush" ++ What;
+doc_name("glGetBooleanv", _) -> "glGet";
+doc_name("glGetBooleani_v", _) -> "glGet";
+doc_name("glGetIntegerv", _) -> "glGet";
+doc_name("glGetIntegeri_v", _) -> "glGet";
+doc_name("glGetInteger64v", _) -> "glGet";
+doc_name("glGetInteger64i_v", _) -> "glGet";
+doc_name("glGetFloatv", _) -> "glGet";
+doc_name("glGetDoublev", _) -> "glGet";
+doc_name("glGetFloati_v", _) -> "glGet";
+doc_name("glGetDoublei_v", _) -> "glGet";
+doc_name("glUniformMatr" ++ _, _) -> "glUniform";
+doc_name("glTexSubImage" ++ _, _) -> "glTexSubImage";
+doc_name("glFramebufferText" ++ _, _) -> "glFramebufferTexture";
+doc_name("glProgramUniformMatr" ++ _, _) -> "glProgramUniform";
+doc_name(Name, {has_vector,_,_}) ->
strip_hard(reverse(Name));
-doc_name2(Name, _) ->
+doc_name(Name, _) ->
reverse(strip(reverse(Name))).
strip_hard(Rev) ->
@@ -583,6 +729,21 @@ strip([$v,$s,$N,N|R]) when N > 47, N < 58 -> R;
strip([$v,$d,$N,N|R]) when N > 47, N < 58 -> R;
strip([$v,$f,$N,N|R]) when N > 47, N < 58 -> R;
strip([$b,$u,$N,N|R]) when N > 47, N < 58 -> R;
+strip([$v,$b,$I,N|R]) when N > 47, N < 58 -> R;
+strip([$v,$i,$I,N|R]) when N > 47, N < 58 -> R;
+strip([$v,$s,$I,N|R]) when N > 47, N < 58 -> R;
+strip([$v,$d,$I,N|R]) when N > 47, N < 58 -> R;
+strip([$v,$f,$I,N|R]) when N > 47, N < 58 -> R;
+strip([$b,$u,$I,N|R]) when N > 47, N < 58 -> R;
+
+strip([$v,$b,$u,N,$I|R]) when N > 47, N < 58 ->R;
+strip([$v,$i,$u,N,$I|R]) when N > 47, N < 58 ->R;
+strip([$v,$s,$u,N,$I|R]) when N > 47, N < 58 ->R;
+strip([$v,$b,N,$I|R]) when N > 47, N < 58 -> R;
+strip([$v,$i,N,$I|R]) when N > 47, N < 58 -> R;
+strip([$v,$s,N,$I|R]) when N > 47, N < 58 -> R;
+strip([$v,$d,N,$I|R]) when N > 47, N < 58 -> R;
+strip([$v,$f,N,$I|R]) when N > 47, N < 58 -> R;
strip([$v,$b,$u,N|R]) when N > 47, N < 58 ->R;
strip([$v,$i,$u,N|R]) when N > 47, N < 58 ->R;
@@ -593,6 +754,15 @@ strip([$v,$s,N|R]) when N > 47, N < 58 -> R;
strip([$v,$d,N|R]) when N > 47, N < 58 -> R;
strip([$v,$f,N|R]) when N > 47, N < 58 -> R;
+strip([$b,$u,N,$I|R]) when N > 47, N < 58 ->R;
+strip([$i,$u,N,$I|R]) when N > 47, N < 58 ->R;
+strip([$s,$u,N,$I|R]) when N > 47, N < 58 ->R;
+strip([$b,N,$I|R]) when N > 47, N < 58 -> R;
+strip([$i,N,$I|R]) when N > 47, N < 58 -> R;
+strip([$s,N,$I|R]) when N > 47, N < 58 -> R;
+strip([$d,N,$I|R]) when N > 47, N < 58 -> R;
+strip([$f,N,$I|R]) when N > 47, N < 58 -> R;
+
strip([$b,$u,N|R]) when N > 47, N < 58 ->R;
strip([$i,$u,N|R]) when N > 47, N < 58 ->R;
strip([$s,$u,N|R]) when N > 47, N < 58 ->R;
@@ -606,6 +776,7 @@ strip([$v,$b,$u|R]) -> R;
strip([$v,$i,$u|R]) -> R;
strip([$v,$s,$u|R]) -> R;
strip([$v,$b|R]) -> R;
+strip([$v,$i,$I|R]) -> R;
strip([$v,$i|R]) -> R;
strip([$v,$s|R]) -> R;
strip([$v,$d|R]) -> R;
@@ -629,6 +800,12 @@ strip([$i,$n|R]) -> [$n|R];
strip([$f,$n|R]) -> [$n|R];
strip([$d,$n|R]) -> [$n|R];
+%% strip([$D,$3|R]) -> R;
+%% strip([$D,$2|R]) -> R;
+%% strip([$D,$1|R]) -> R;
+
+strip([$I|R]) -> R;
+strip([$L|R]) -> R;
strip([$v,R]) -> R;
strip([N|R]) when N > 47, N < 58 -> R;
strip([_|R="tceRlg"]) -> R;
@@ -656,7 +833,6 @@ gen_debug(GL, GLU) ->
w("].~n~n", []),
close().
-
printd([F|R],Mod) when is_list(F) ->
printd(F,Mod),
printd(R,Mod);
@@ -667,6 +843,6 @@ printd(F,Mod) ->
#func{where=erl} -> ok;
#func{id=Id, name=Method} ->
w(" {~p, {~s, ~s, 0}},~n", [Id, Mod, erl_func_name(Method)]);
- _Other ->
- io:format("F= ~p => ~p~n", [F, _Other])
+ _Other ->
+ io:format("F= ~p => ~p~n", [F, _Other])
end.
diff --git a/lib/wx/api_gen/gl_scan_doc.erl b/lib/wx/api_gen/gl_scan_doc.erl
new file mode 100644
index 0000000000..fc7b7cf275
--- /dev/null
+++ b/lib/wx/api_gen/gl_scan_doc.erl
@@ -0,0 +1,286 @@
+%%-*-erlang-*-
+%%--------------------------------------------------------------------
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%----------------------------------------------------------------------
+-module(gl_scan_doc).
+
+-export([file/2]).
+-export([event/3]).
+
+-compile(export_all).
+
+-define(error(Reason),
+ throw({gl_output_error, Reason})).
+
+-record(state, {type=undefined, gen_output=false, str=[]}).
+
+file(FileName, Options0) ->
+ {Options2, State} = parse_options(Options0),
+ Options = [skip_external_dtd, {event_fun, fun event/3}, {event_state, State}|Options2],
+ case xmerl_sax_parser:file(FileName, Options) of
+ {ok, #state{str=Str}, _} -> lists:reverse(Str);
+ Else -> Else
+ end.
+
+event(Event, _LineNo, State) ->
+ gen_output(Event, State).
+
+parse_options(Options) ->
+ parse_options(Options, #state{}).
+
+parse_options(Options, State) ->
+ {Options, State}.
+
+%% Element
+%%----------------------------------------------------------------------
+gen_output({characters, String0}, #state{gen_output=true, type=Type, str=Str} = State) ->
+ case fix_str(strip_white_space(String0)) of
+ [] -> State;
+ String ->
+ Add = case Type of
+ mi -> case hd(Str) of
+ "/" -> String;
+ "*" -> String;
+ "+" -> String;
+ "-" -> String;
+ {fenced,_,_} -> String;
+ _ ->
+ [$ |String]
+ end;
+ constant -> {constant, String};
+ emphasis -> {emphasis, String};
+ function -> {function, String};
+ reffunc -> {reffunc, String};
+ purpose -> {purpose, String};
+ parameter -> {parameter, String};
+ equation -> {equation, String};
+ _ -> String
+ end,
+ State#state{str=[Add|Str]}
+ end;
+
+gen_output({startElement, _Uri, "function", _QName, _Attributes}, #state{gen_output=true} = State) ->
+ State#state{type=function};
+gen_output({endElement, _Uri, "function", _QName}, #state{gen_output=true} = State) ->
+ State#state{type=undefined};
+
+gen_output({startElement, _Uri, "constant", _QName, _Attributes}, #state{gen_output=true} = State) ->
+ State#state{type=constant};
+gen_output({endElement, _Uri, "constant", _QName}, #state{gen_output=true} = State) ->
+ State#state{type=undefined};
+
+gen_output({startElement, _Uri, "parameter", _QName, _Attributes}, #state{gen_output=true} = State) ->
+ State#state{type=parameter};
+gen_output({endElement, _Uri, "parameter", _QName}, #state{gen_output=true} = State) ->
+ State#state{type=undefined};
+
+gen_output({startElement, _Uri, "emphasis", _QName, _Attributes}, #state{gen_output=true} = State) ->
+ State#state{type=emphasis};
+gen_output({endElement, _Uri, "emphasis", _QName}, #state{gen_output=true} = State) ->
+ State#state{type=undefined};
+
+gen_output(startDocument, State) ->
+ State;
+gen_output(endDocument, State) ->
+ State;
+
+gen_output({startElement, _Uri, "refentrytitle", _QName, _Attributes}, #state{gen_output=true} = State) ->
+ State#state{type=reffunc};
+gen_output({endElement, _Uri, "refentrytitle", _QName}, #state{gen_output=true} = State) ->
+ State#state{type=undefined};
+
+gen_output({startElement, _Uri, "refpurpose", _QName, _Attributes}, State) ->
+ State#state{gen_output=true, type=purpose};
+gen_output({endElement, _Uri, "refpurpose", _QName}, State) ->
+ State#state{gen_output=false, type=undefined};
+
+gen_output({startElement, _Uri, "refsect1", _QName, [{_, _, "id", "description"}]}, State) ->
+ State#state{gen_output=true};
+gen_output({endElement, _Uri, "refsect1", _QName}, State) ->
+ State#state{gen_output=false};
+
+gen_output({startElement, _Uri, "title", _QName, _Attributes}, #state{gen_output=true} = State) ->
+ State#state{gen_output=skip};
+gen_output({endElement, _Uri, "title", _QName}, #state{gen_output=skip} = State) ->
+ State#state{gen_output=true};
+
+%% gen_output({startElement, _Uri, "inlineequation", _QName, _Attributes}, #state{gen_output=true} = State) ->
+%% State#state{type=equation};
+%% gen_output({endElement, _Uri, "inlineequation", _QName}, #state{gen_output=skip} = State) ->
+%% State#state{type=undefined};
+%% gen_output({startElement, _Uri, "informalequation", _QName, _Attributes}, #state{gen_output=true} = State) ->
+%% State#state{type=equation};
+%% gen_output({endElement, _Uri, "informalequation", _QName}, #state{gen_output=skip} = State) ->
+%% State#state{type=undefined};
+gen_output({startElement, _Uri, "mfenced", _QName, Attributes}, #state{gen_output=true, str=Str} = State) ->
+ Fenc = get_fenc(Attributes, "(", ")"),
+ State#state{str=[Fenc|Str]};
+gen_output({endElement, _Uri, "mfenced", _QName}, #state{gen_output=true, str=Str0} = State) ->
+ Check = fun(What) -> case What of {fenced,_,_} ->false; _ -> true end end,
+ {Fenced, [{fenced, Open, Close}|Str]} = lists:splitwith(Check, Str0),
+ State#state{str=[{fenced, Open, Close, lists:reverse(Fenced)}| Str]};
+
+%% gen_output({startElement, _Uri, "tgroup", _QName, Attributes}, #state{gen_output=true, str=Str} = State) ->
+%% {_, _, _, ValueStr} = lists:keyfind(3, "cols", Attributes),
+%% ColSz = list_to_integer(ValueStr),
+%% State#state{str=[{tgroup, ColSz}|Str]};
+%% gen_output({endElement, _Uri, "tgroup", _QName}, #state{gen_output=true, str=Str0} = State) ->
+%% Check = fun(What) -> case What of {tgroup, _} ->false; _ -> true end end,
+%% {Rows, [{tgroup, ColSize}|Str]} = lists:splitwith(Check, Str0),
+%% State#state{str=[{tgroup, ColSize, lists:reverse(Rows)}| Str]};
+
+%% gen_output({endElement, _Uri, "row", _QName}, #state{gen_output=true, str=Str} = State) ->
+%% State#state{type=undefined, str=[break|Str]};
+gen_output({startElement, _Uri, "informaltable", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["<table>"|Str]};
+gen_output({endElement, _Uri, "informaltable", _QName}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["</table>"|Str]};
+gen_output({startElement, _Uri, "table", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["<table>"|Str]};
+gen_output({endElement, _Uri, "table", _QName}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["</table>"|Str]};
+
+gen_output({startElement, _Uri, "tbody", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["<tbody>"|Str]};
+gen_output({endElement, _Uri, "tbody", _QName}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["</tbody>"|Str]};
+
+gen_output({startElement, _Uri, "thead", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["<tbody>"|Str]};
+gen_output({endElement, _Uri, "thead", _QName}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["</tbody>"|Str]};
+gen_output({startElement, _Uri, "row", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["<tr>"|Str]};
+gen_output({endElement, _Uri, "row", _QName}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["</tr>"|Str]};
+gen_output({startElement, _Uri, "entry", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["<td>"|Str]};
+gen_output({endElement, _Uri, "entry", _QName}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=["</td>"|Str]};
+
+gen_output({startElement, _Uri, "mi", _QName, _Attributes}, #state{gen_output=true} = State) ->
+ State#state{type=mi};
+gen_output({endElement, _Uri, "mi", _QName}, #state{gen_output=true} = State) ->
+ State#state{type=undefined};
+gen_output({startElement, _Uri, "mn", _QName, _Attributes}, #state{gen_output=true} = State) ->
+ State#state{type=mi};
+gen_output({endElement, _Uri, "mn", _QName}, #state{gen_output=true} = State) ->
+ State#state{type=undefined};
+
+
+
+gen_output({startElement, _Uri, "varlistentry", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) ->
+ State#state{str=[listentry|Str]};
+
+gen_output({endElement, _Uri, "mfrac", _QName}, #state{gen_output=true, str=[A0,B|Str]} = State) ->
+ A = case A0 of
+ [$ |A1] -> A1;
+ A1 -> A1
+ end,
+ State#state{str=[A,"/",B|Str]};
+
+gen_output({startElement, _Uri, "para", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) ->
+ case Str of
+ [para|_] -> State;
+ [": "|_] -> State;
+ [Const, listentry | Rest] ->
+ State#state{str=[": ",Const,para|Rest]};
+ [Mod, Const, listentry | Rest] ->
+ State#state{str=[": ",Mod,Const,para|Rest]};
+ _ ->
+ State#state{str=[para|Str]}
+ end;
+
+%% gen_output({startElement, _Uri, What, _QName, _Attributes}, State) ->
+%% io:format("Skipped ~s~n",[What]),
+%% State;
+
+gen_output(_E, State) ->
+ State.
+
+%%----------------------------------------------------------------------
+%% Function : parse_attributes(Attributes) -> Result
+%% Parameters:
+%% Result :
+%% Description:
+%%----------------------------------------------------------------------
+print_attributes([]) ->
+ ok;
+print_attributes([{_Uri, _Prefix, LocalName, AttrValue} |Attributes]) ->
+ io:format(" ~s=\"~s\"",[LocalName, AttrValue]),
+ print_attributes(Attributes).
+
+get_fenc([{_Uri, _Prefix, "open", AttrValue} |Attributes], _Open, Close)
+ when AttrValue /= "" ->
+ get_fenc(Attributes, fenc(AttrValue), Close);
+get_fenc([{_Uri, _Prefix, "close", AttrValue} |Attributes], Open, _Close)
+ when AttrValue /= "" ->
+ get_fenc(Attributes, Open, fenc(AttrValue));
+get_fenc([_|Attributes], Open, Close) ->
+ get_fenc(Attributes, Open, Close);
+get_fenc([], Open, Close) ->
+ {fenced,Open,Close}.
+
+fenc("&DoubleVerticalBar;") -> "||";
+fenc("&VerticalBar;") -> "|";
+fenc("&LeftCeiling;") -> "|";
+fenc("&RightCeiling;") -> "|";
+fenc("&lceil;") -> "|";
+fenc("&rceil;") -> "|";
+fenc("&LeftFloor;") -> "|";
+fenc("&RightFloor;") -> "|";
+fenc("&lfloor;") -> "|";
+fenc("&rfloor;") -> "|";
+fenc("[") -> "[";
+fenc("]") -> "]";
+fenc(Else = [_]) -> Else.
+
+strip_white_space([$ | Str = [$ |_]]) ->
+ strip_white_space(Str);
+strip_white_space([$\n| Str]) ->
+ strip_white_space([$ |Str]);
+strip_white_space([$\t| Str]) ->
+ strip_white_space([$ |Str]);
+strip_white_space([$\\| Str]) ->
+ strip_white_space(Str);
+
+strip_white_space([Char|Str]) ->
+ [Char|strip_white_space(Str)];
+strip_white_space([]) -> [].
+
+fix_str([$<|Str]) ->
+ [$&,$l,$t,$;|fix_str(Str)];
+fix_str([$>|Str]) ->
+ [$&,$g,$t,$;|fix_str(Str)];
+fix_str("&times;"++Str) ->
+ [$*|fix_str(Str)];
+fix_str("&Prime;"++Str) ->
+ [$"|fix_str(Str)];
+fix_str("&CenterDot;"++Str) ->
+ [$.|fix_str(Str)];
+fix_str("&af;"++Str) ->
+ fix_str(Str);
+fix_str("&it;"++Str) ->
+ [$ |fix_str(Str)];
+fix_str([$&|Str]) ->
+ [$&,$a,$m,$p,$; |fix_str(Str)];
+fix_str([C|Str]) when C > 255 ->
+ fix_str(Str);
+fix_str([C|Str]) ->
+ [C|fix_str(Str)];
+fix_str([]) -> [].
diff --git a/lib/wx/api_gen/glapi.conf b/lib/wx/api_gen/glapi.conf
index 525ccf8b68..59fa8f7727 100644
--- a/lib/wx/api_gen/glapi.conf
+++ b/lib/wx/api_gen/glapi.conf
@@ -57,11 +57,13 @@
"glVertexAttribP3", %*
"glVertexAttribP4", %*
- "glGetActiveSubroutineUniformiv", %% Bad API don't know what to allocate needs to ask
+ %% Bad API don't know what to allocate needs to ask
+ "glGetActiveSubroutineUniformiv",
+ "glGetActiveAtomicCounterBufferiv",
%% EXT
%% By default skip these extensions
- "SGIX","SGIS","NV","ATI","AMD","SUN","SUNX","GREMEDY",
+ "SGIX","SGIS","NV","ATI","AMD","SUN","SUNX","GREMEDY","OES","MESA",
"HP","IBM","INTEL","APPLE","3DFX","PGI","EXT"]}.
%% Exceptions to the above
@@ -336,7 +338,6 @@
{"length", [skip, {single, true}]},
{"name", {string,"bufSize","length"}}]}.
-
{"glGenRenderbuffers", {"renderbuffers", {single,{list,"n","n"}}}}.
{"glGenFramebuffers", {"framebuffers",{single,{list,"n","n"}}}}.
{"glGetRenderbufferParameteriv", {"params", {single,true}}}.
@@ -491,4 +492,5 @@
{"glScissorIndexedv", {"v", {single,{tuple,4}}}}.
{"glDepthRangeArrayv", [{"count",{c_only,{length,"v"}}}, {"v", [{single,{tuple_list,2}}]}]}.
+{"glGetInternalformativ", {"params", [out, {single, {list, "bufSize", "bufSize"}}]}}.
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
index 080ebfa49f..23a34225ca 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
@@ -18,10 +18,7 @@
%% <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevthandler.html">
%% The orginal documentation</a>.
%%
-%% @headerfile "../../include/wx.hrl"
%%
-%%@type wxEvtHandler(). An object reference
-
-module(wxEvtHandler).
-include("wxe.hrl").
-include("../include/wx.hrl").
@@ -34,17 +31,16 @@
new_evt_listener/0, destroy_evt_listener/1,
get_callback/1, replace_fun_with_id/2]).
--record(evh, {et=null,id=?wxID_ANY,lastId=?wxID_ANY,skip=undefined,userdata=[],cb=0}).
-
+-export_type([wxEvtHandler/0, wx/0, event/0]).
+-type wxEvtHandler() :: wx:wx_object().
+-record(evh, {et=null,id=?wxID_ANY,lastId=?wxID_ANY,skip=undefined,userdata=[],cb=0}).
-%% @spec (This::wxEvtHandler(), EventType::wxEventType()) -> ok
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
-
+-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
connect(This, EventType) ->
connect(This, EventType, []).
-%% @spec (This::wxEvtHandler(), EventType::wxEventType(), [Options]) -> ok
%% @doc This function subscribes the to events of EventType,
%% in the range id, lastId. The events will be received as messages
%% if no callback is supplied.
@@ -63,6 +59,9 @@ connect(This, EventType) ->
%% to process the event. Default not specfied i.e. a message will
%% be delivered to the process calling this function.
%% {userData, term()} An erlang term that will be sent with the event. Default: [].
+-spec connect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> ok when
+ Option :: {id, integer()} | {lastId, integer()} | {skip, boolean()} |
+ {callback, function()} | {userData, term()}.
connect(This=#wx_ref{type=ThisT}, EventType, Options) ->
EvH = parse_opts(Options, #evh{et=EventType}),
?CLASS(ThisT,wxEvtHandler),
@@ -99,26 +98,27 @@ parse_opts([], Opts = #evh{id=Id,lastId=Lid,skip=Skip, cb=CB}) ->
Opts
end.
-%% @spec (This::wxEvtHandler()) -> true | false
+
%% @doc Equivalent to {@link disconnect/3. disconnect(This, null, [])}
%% Can also have an optional callback Fun() as an additional last argument.
-
+-spec disconnect(This::wxEvtHandler()) -> boolean().
disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}) ->
?CLASS(ThisT,wxEvtHandler),
disconnect(This, null, []).
-%% @spec (This::wxEvtHandler(), EventType::wxEventType()) -> true | false
%% @doc Equivalent to {@link disconnect/3. disconnect(This, EventType, [])}
+-spec disconnect(This::wxEvtHandler(), EventType::wxEventType()) -> boolean().
disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType) when is_atom(EventType) ->
?CLASS(ThisT,wxEvtHandler),
disconnect(This, EventType, []).
-%% @spec (This::wxEvtHandler(), EventType::wxEventType(), Opts) -> true | false
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevthandler.html#wxevthandlerdisconnect">external documentation</a>
%% This function unsubscribes the process or callback fun from the event handler.
%% EventType may be the atom 'null' to match any eventtype.
%% Notice that the options skip and userdata is not used to match the eventhandler.
-disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
+-spec disconnect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> boolean() when
+ Option :: {id, integer()} | {lastId, integer()} | {callback, function()}.
+disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
?CLASS(ThisT,wxEvtHandler),
EvH = parse_opts(Opts, #evh{et=EventType}),
case wxe_util:disconnect_cb(This, EvH) of
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index 209de48496..7f85151d03 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -665,7 +665,11 @@ extract_type_info2("&", Acc) -> [{by_ref,reference}|Acc];
extract_type_info2("WXDLLIMP" ++ _, Acc) -> Acc;
extract_type_info2(Type, Acc) -> [Type|Acc].
-parse_type2(["void"], _Info, _Opts, _T) -> void;
+parse_type2(["void"], _Info, _Opts, #type{by_val=ByVal}) ->
+ case ByVal of
+ true -> void;
+ false -> voidp
+ end;
parse_type2(["virtual"|R], _Info, _Opts, _T) ->
[] = R,
%% Bug in old doxygen virtual destructors have type virtual
@@ -1106,6 +1110,7 @@ type_foot_print(#type{base={enum,_}}) -> int;
type_foot_print(#type{base={ref,_}}) -> ref;
type_foot_print(#type{base={term,_}}) -> term;
type_foot_print(#type{base=eventType}) -> atom;
+type_foot_print(voidp) -> int;
%% type_foot_print({Type,Str}) when is_list(Str) ->
%% type_foot_print(Type);
type_foot_print(#type{base={comp,_,R={record,_}}}) ->
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index 1b4c32db24..2209e4a53b 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -64,11 +64,16 @@ gen_derived_dest(Defs) ->
[gen_derived_dest_2(Class) || Class <- Defs],
ok.
-gen_derived_dest_2(C=#class{name=Class}) ->
+gen_derived_dest_2(C=#class{name=Class, options=Opts}) ->
?WTC("gen_derived_dest_2"),
Derived = is_derived(C),
TaylorMade = taylormade_class(C),
+
if Derived andalso (TaylorMade =:= false) ->
+ case lists:keysearch(ifdef,1,Opts) of
+ {value, {ifdef, What}} -> w("#if ~p~n",[What]);
+ _ -> ok
+ end,
w("class E~s : public ~s {~n",[Class,Class]),
case Class of
"wxGLCanvas" -> %% Special for cleaning up gl context
@@ -78,7 +83,13 @@ gen_derived_dest_2(C=#class{name=Class}) ->
w(" public: ~~E~s() {((WxeApp *)wxTheApp)->clearPtr(this);};~n", [Class])
end,
gen_constructors(C),
- w("};~n~n", []);
+ case lists:keysearch(ifdef,1,Opts) of
+ {value, {ifdef, Endif}} ->
+ w("};~n", []),
+ w("#endif // ~p~n~n",[Endif]);
+ _ ->
+ w("};~n~n", [])
+ end;
TaylorMade /= false ->
w("~s~n", [TaylorMade]);
true ->
@@ -324,6 +335,8 @@ declare_var(P = #param{name=Name,in=In,def=Def,type=Type}) ->
declare_type(N,false,_,#type{name="wxArrayInt"}) ->
w(" wxArrayInt ~s;~n", [N]);
+declare_type(N,false,_,#type{name="wxArrayDouble"}) ->
+ w(" wxArrayDouble ~s;~n", [N]);
declare_type(N,false,_,#type{name="wxArrayString"}) ->
w(" wxArrayString ~s;~n", [N]);
declare_type(N,false,_,#type{base=Base,single=true,name=Type,by_val=false,mod=Mod})
@@ -335,8 +348,14 @@ declare_type(N,false,_,#type{name="wxArrayTreeItemIds",ref=reference}) ->
w(" wxArrayTreeItemIds ~s;~n", [N]);
declare_type(N,false,_,#type{name="wxDateTime"}) ->
w(" wxDateTime ~s;~n", [N]);
+declare_type(N,false,_,#type{name="wxColour"}) ->
+ w(" wxColour ~s;~n", [N]);
+declare_type(N,false,_,#type{name=Type, base=int, ref=reference}) ->
+ w(" ~s ~s;~n", [Type,N]);
declare_type(N,false,_,#type{name=Type, base=int64, ref=reference}) ->
w(" ~s ~s;~n", [Type,N]);
+declare_type(N,false,_,#type{base={comp,_,_},single=true,name=Type,ref=reference}) ->
+ w(" ~s ~s;~n", [Type,N]);
declare_type(N,true,Def,#type{base=Base,single=true,name=Type,by_val=true})
when Base =:= int; Base =:= long; Base =:= float; Base =:= double; Base =:= bool ->
w(" ~s ~s=~s;~n", [Type,N,Def]);
@@ -363,6 +382,8 @@ declare_type(N,true,Def,#type{base=binary, name=char}) ->
w(" char ~sD[] = {~s}, * ~s = ~sD;~n", [N,Def,N,N]);
declare_type(_N,true,_Def,void) ->
skip;
+declare_type(_N,true,_Def,voidp) ->
+ skip;
declare_type(N,true,Def,#type{name=Type, ref={pointer,2}}) ->
%% xxxx
w(" ~s ** ~s = ~s;~n", [Type,N,Def]);
@@ -645,6 +666,16 @@ decode_arg(N,#type{name=Type,single=list,base={class,Class}},arg,A0) ->
w(" ~s.Append(*(~s *) getPtr(bp,memenv)); bp += 4;}~n", [N,Class]),
w(" bp += ((~p+ *~sLen)%2 )*4;~n", [A,N]),
0;
+decode_arg(N,#type{single=array,base={comp,Class="wxPoint2DDouble",_}},arg,A0) ->
+ w(" int * ~sLen = (int *) bp; bp += 4;~n", [N]),
+ w(" ~s *~s;~n",[Class,N]),
+ w(" ~s = (~s *) driver_alloc(sizeof(~s) * *~sLen);~n",[N,Class,Class,N]),
+ store_free(N),
+ align(A0+1,64),
+ w(" for(int i=0; i < *~sLen; i++) {~n", [N]),
+ w(" double x = * (double *) bp; bp += 8;~n double y = * (double *) bp; bp += 8;~n", []),
+ w(" ~s[i] = wxPoint2DDouble(x,y);}~n", [N]),
+ 0;
decode_arg(Name,T, Arg,_A) ->
?error({unhandled_type, {Name,T, Arg}}).
@@ -785,6 +816,7 @@ call_arg(#param{name=N,in=false,type=#type{by_val=false, single=true}}) -> "&" +
call_arg(#param{name=N,def=Def,type=#type{base={comp,_,_},ref={pointer,1},single=true}})
when Def =:= none ->
"&" ++N;
+call_arg(#param{name=N,type=#type{base=int, ref=reference, single=true}}) -> "*" ++ N;
call_arg(#param{name=N,type=#type{by_val=false}}) -> N;
call_arg(#param{name=N,type={merged,_,#type{base={class,_},single=true,
by_val=ByVal,
@@ -792,6 +824,7 @@ call_arg(#param{name=N,type={merged,_,#type{base={class,_},single=true,
when ByVal =:= true; Ref =:= reference ->
"*" ++ N;
call_arg(#param{def=Def, type=void}) when Def =/= none -> Def;
+call_arg(#param{def=Def, type=voidp}) when Def =/= none -> Def;
call_arg(#param{name=N,type=#type{base={ref,_},by_val=true,single=true}}) -> N;
call_arg(#param{name=N,type={merged,_,_,_,_,_,_}}) -> N.
@@ -860,7 +893,7 @@ build_return_vals(Type,Ps) ->
build_ret_types(void,Ps) ->
Calc = fun(#param{name=N,in=False,type=T}, Free) when False =/= true ->
- case build_ret(N, False, T) of
+ case build_ret(N, {arg, False}, T) of
ok -> Free;
Other -> [Other|Free]
end;
@@ -868,12 +901,12 @@ build_ret_types(void,Ps) ->
end,
lists:foldl(Calc, [], Ps);
build_ret_types(Type,Ps) ->
- Free = case build_ret("Result", out, Type) of
+ Free = case build_ret("Result", {ret, out}, Type) of
ok -> [];
FreeStr -> [FreeStr]
end,
Calc = fun(#param{name=N,in=False,type=T}, FreeAcc) when False =/= true ->
- case build_ret(N, False, T) of
+ case build_ret(N, {arg, False}, T) of
ok -> FreeAcc;
FreeMe -> [FreeMe|FreeAcc]
end;
@@ -899,13 +932,13 @@ build_ret(Name,_,#type{base={enum,_Type},single=true}) ->
w(" rt.addInt(~s);~n",[Name]);
build_ret(Name,_,#type{base={comp,_,{record, _}},single=true}) ->
w(" rt.add(~s);~n", [Name]);
-build_ret(Name,_,#type{base={comp,_,_},single=true, ref=reference}) ->
+build_ret(Name,{ret,_},#type{base={comp,_,_},single=true, ref=reference}) ->
w(" rt.add((*~s));~n",[Name]);
build_ret(Name,_,#type{base={comp,_,_},single=true}) ->
w(" rt.add(~s);~n",[Name]);
build_ret(Name,_,#type{base=bool,single=true,by_val=true}) ->
w(" rt.addBool(~s);~n",[Name]);
-build_ret(Name,both,#type{base=int,single=true,mod=M}) ->
+build_ret(Name,{arg, both},#type{base=int,single=true,mod=M}) ->
case lists:member(unsigned, M) of
true -> w(" rt.addUint(*~s);~n",[Name]);
false -> w(" rt.addInt(*~s);~n",[Name])
@@ -917,6 +950,8 @@ build_ret(Name,_,#type{base=int,single=true,mod=M}) ->
end;
build_ret(Name,_,#type{name="wxArrayInt"}) ->
w(" rt.add(~s);~n", [Name]);
+build_ret(Name,_,#type{name="wxArrayDouble"}) ->
+ w(" rt.add(~s);~n", [Name]);
build_ret(Name,_,#type{base={comp,_,_},single=array}) ->
w(" for(unsigned int i=0; i < ~s.GetCount(); i++) {~n", [Name]),
w(" rt.add(~s[i]);~n }~n",[Name]),
@@ -1031,6 +1066,7 @@ gen_macros() ->
w("#include <wx/toolbook.h>~n"),
w("#include <wx/listbook.h>~n"),
w("#include <wx/treebook.h>~n"),
+ w("#include <wx/taskbar.h>~n"),
w("#include <wx/html/htmlwin.h>~n"),
w("#include <wx/html/htmlcell.h>~n"),
w("#include <wx/filename.h>~n"),
diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl
index 5d73d93ead..6159b7c4bd 100644
--- a/lib/wx/api_gen/wx_gen_erl.erl
+++ b/lib/wx/api_gen/wx_gen_erl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,12 +28,16 @@
-include("wx_gen.hrl").
--compile(export_all).
+%%-compile(export_all).
+-export([gen/1]).
+-export([parents/1, get_unique_names/0, get_unique_name/1,
+ event_type_name/1, event_rec_name/1, filter_attrs/1]).
--import(lists, [foldl/3,foldr/3,reverse/1, keysearch/3, map/2, filter/2]).
--import(gen_util, [lowercase/1, lowercase_all/1, uppercase/1, uppercase_all/1,
+
+-import(lists, [foldl/3,reverse/1, filter/2]).
+-import(gen_util, [lowercase/1, lowercase_all/1, uppercase/1,
open_write/1, close/0, erl_copyright/0, w/2,
- args/3, args/4, strip_name/2]).
+ args/3, args/4]).
gen(Defs) ->
[put({class,N},C) || C=#class{name=N} <- Defs],
@@ -128,8 +132,6 @@ gen_class1(C=#class{name=Name,parent=Parent,methods=Ms,options=Opts}) ->
w("%% stored on disc or distributed for use on other nodes.~n~n", []),
w("-module(~s).~n", [Name]),
w("-include(\"wxe.hrl\").~n",[]),
- %% w("-compile(export_all).~n~n", []), %% XXXX remove ???
- %% w("-compile(nowarn_unused_vars).~n~n", []), %% XXXX remove ???
Exp = fun(M) -> gen_export(C,M) end,
ExportList = lists:usort(lists:append(lists:map(Exp,reverse(Ms)))),
w("-export([~s]).~n~n", [args(fun(EF) -> EF end, ",", ExportList, 60)]),
@@ -140,10 +142,10 @@ gen_class1(C=#class{name=Name,parent=Parent,methods=Ms,options=Opts}) ->
w("-export([~s]).~n~n", [args(fun(EF) -> EF end, ",",
lists:usort(["parent_class/1"|InExported]),
60)]),
-
+ w("-export_type([~s/0]).~n", [Name]),
w("%% @hidden~n", []),
parents_check(Parents),
-
+ w("-type ~s() :: wx:wx_object().~n", [Name]),
Gen = fun(M) -> gen_method(Name,M) end,
NewMs = lists:map(Gen,reverse(Ms)),
gen_dest(C, Ms),
@@ -175,7 +177,18 @@ parents_check([Parent|Ps]) ->
w("parent_class(~s) -> true;~n",[Parent]),
parents_check(Ps).
-check_class(#type{base={class,"wx"}}) -> ok;
+check_class(#type{name="wxObject", base={class,"wx"}}) ->
+ "wx:wx_object()";
+check_class(#type{name="wxIconLocation", base={class,"wx"}}) ->
+ "wx:wx_object()";
+check_class(#type{name="wxToolBarToolBase", base={class,"wx"}, mod=Mod}) ->
+ %% Implement this some day
+ "wx:wx_object()";
+check_class(#type{name="wxValidator", base={class,"wx"}, mod=Mod}) ->
+ %% Implement this some day
+ "wx:wx_object()";
+check_class(#type{name=Name, base={class,"wx"}}) ->
+ exit({class, Name});
check_class(#type{base={class,Name},xml=Xml}) ->
case get({class,Name}) of
undefined ->
@@ -188,12 +201,15 @@ check_class(#type{base={class,Name},xml=Xml}) ->
_ ->
?warning("~s:~s: Class ~p used but not defined~n (see ~p)~n",
[get(current_class),get(current_func),Name, Xml])
- end;
+ end,
+ "wx:wx_object()";
_ ->
?warning("~s:~s: Class ~p used is enum~n",
- [get(current_class),get(current_func),Name])
+ [get(current_class),get(current_func),Name]),
+ exit(class_enum)
end;
- _ -> ok
+ _ ->
+ Name ++ ":" ++ Name ++ "()"
end.
gen_export(#class{name=Class,abstract=Abs},Ms0) ->
@@ -317,8 +333,8 @@ gen_dest(#class{name=CName,abstract=Abs}, Ms) ->
end.
gen_dest2(Class, Id) ->
- w("%% @spec (This::~s()) -> ok~n", [Class]),
w("%% @doc Destroys this object, do not use object again~n", []),
+ w("-spec destroy(This::~s()) -> ok.~n", [Class]),
w("destroy(Obj=#wx_ref{type=Type}) ->~n", []),
w(" ?CLASS(Type,~s),~n",[Class]),
case Id of
@@ -601,9 +617,9 @@ guard_test(#param{name=N,type=#type{base=int64}}) ->
guard_test(#param{name=N,type=#type{base=long}}) ->
"is_integer(" ++ erl_arg_name(N) ++ ")";
guard_test(#param{name=N,type=#type{base=float}}) ->
- "is_float(" ++ erl_arg_name(N) ++ ")";
+ "is_number(" ++ erl_arg_name(N) ++ ")";
guard_test(#param{name=N,type=#type{base=double}}) ->
- "is_float(" ++ erl_arg_name(N) ++ ")";
+ "is_number(" ++ erl_arg_name(N) ++ ")";
guard_test(#param{name=N,type=#type{base=bool}}) ->
"is_boolean(" ++ erl_arg_name(N) ++ ")";
guard_test(#param{name=N,type=#type{name="wxDateTime"}}) ->
@@ -635,245 +651,200 @@ guard_test(#param{name=N,type={class,ignore}}) ->
guard_test(T) -> ?error({unknown_type,T}).
gen_doc(_Class, [#method{method_type=destructor}]) -> skip;
-gen_doc(_Class,[#method{name=N,alias=A,params=Ps,type=T,where=erl_no_opt,method_type=MT}])->
- w("%% @spec (~s~s) -> ~s~n",[doc_arg_types(Ps),"",doc_return_types(T,Ps)]),
+gen_doc(_Class,Ms=[#method{name=N,alias=A,params=Ps,where=erl_no_opt,method_type=MT}])->
w("%% @equiv ", []),
- gen_function_clause(erl_func_name(N,A),MT,Ps,empty_list,[no_guards,name_only]);
-gen_doc(Class,[#method{name=N,params=Ps,type=T}])->
- {_, Optional} = split_optional(Ps),
- NonDef = [Arg || Arg = #param{def=Def,in=In, where=Where} <- Ps,
- Def =:= none, In =/= false, Where =/= c],
- OptsType = case Optional of
- [] -> "";
- _ when NonDef =:= [] -> "[Option]";
- _ -> ", [Option]"
- end,
- w("%% @spec (~s~s) -> ~s~n",
- [doc_arg_types(Ps),OptsType,doc_return_types(T,Ps)]),
- doc_optional(Optional, normal),
- DocEnum = doc_enum(T,Ps, normal),
- case Class of
- "utils" ->
- w("%% @doc See <a href=\"http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#~s\">"
- "external documentation</a>.~n",
- [lowercase_all(N)]);
- _ ->
- w("%% @doc See <a href=\"http://www.wxwidgets.org/manuals/stable/wx_~s.html#~s~s\">"
- "external documentation</a>.~n",
- [lowercase_all(Class),lowercase_all(Class),lowercase_all(N)])
- end,
- doc_enum_desc(DocEnum);
-gen_doc(Class, Cs = [#method{name=N, alias=A,method_type=MT}|_]) ->
- GetRet = fun(#method{params=Ps,type=T}) ->
- doc_return_types(T,Ps)
- end,
- GetArgs = fun(#method{params=Ps, where=Where}) ->
- Opt = case Where of
- erl_no_opt -> [];
- _ ->
- case split_optional(Ps) of
- {_, []} -> [];
- _ -> ["[Option]"]
- end
- end,
- [doc_arg_type(P) ||
- P=#param{in=In,def=none,where=W} <- Ps,
- In =/= false, W =/= c] ++ Opt
- end,
- Args = zip(lists:map(GetArgs, Cs)),
- Ret = lists:map(GetRet, Cs),
- w("%% @spec (~s) -> ~s~n",[args(fun doc_arg/1,",",Args),doc_ret(Ret)]),
- case Class of
- "utils" ->
- w("%% @doc See <a href=\"http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#~s\">"
- "external documentation</a>.~n",
- [lowercase_all(N)]);
- _ ->
- w("%% @doc See <a href=\"http://www.wxwidgets.org/manuals/stable/wx_~s.html#~s~s\">"
- "external documentation</a>.~n",
- [lowercase_all(Class),lowercase_all(Class),lowercase_all(N)])
- end,
- Name = case MT of constructor -> "new"; _ -> erl_func_name(N,A) end,
- w("%% <br /> Alternatives:~n",[]),
- [gen_doc2(Name, Clause) || Clause <- Cs],
+ gen_function_clause(erl_func_name(N,A),MT,Ps,empty_list,[no_guards,name_only]),
+ w("~n-spec ",[]),
+ write_specs(Ms, "\n");
+gen_doc(Class,Ms=[#method{name=N, type=T}|Rest])->
+ %%doc_optional(Optional, normal),
+ doc_link(Class, N),
+ gen_overload_doc(Rest),
+ Ps = lists:foldl(fun(#method{params=Ps}, Acc) -> Ps ++ Acc end,[],Ms),
+ doc_enum_desc(lists:usort(doc_enum(T,Ps))),
+ w("-spec ",[]),
+ write_specs(Ms, "\n"),
ok.
-gen_doc2(Name,#method{params=Ps,where=erl_no_opt,method_type=MT}) ->
- w("%% <p><c>~n",[]),
- w("%% ~s(~s) -> ", [Name,doc_arg_types(Ps)]),
- gen_function_clause(Name,MT,Ps,empty_list,[no_guards,name_only]),
- w(" </c></p>~n",[]);
-gen_doc2(Name,#method{params=Ps,type=T}) ->
+gen_overload_doc([]) -> ok;
+%%gen_overload_doc(_) -> ok;
+gen_overload_doc(Cs) ->
+ w("%% <br /> Also:<br />~n%% ",[]),
+ write_specs(Cs, "<br />\n%% "),
+ w("~n", []).
+
+write_specs(M=[#method{method_type=constructor}|_], Eol) ->
+ w("new", []),
+ write_specs1(M, Eol);
+write_specs(M=[#method{name=N, alias=A}|_], Eol) ->
+ w("~s", [erl_func_name(N,A)]),
+ write_specs1(M, Eol).
+
+write_specs1([M], Eol) ->
+ write_spec(M, Eol),
+ w(".~s", [Eol]);
+write_specs1([M|Next], Eol) ->
+ write_spec(M, Eol),
+ w(";~s ", [Eol]),
+ write_specs1(Next, Eol).
+
+write_spec(#method{params=Ps,type=T,where=erl_no_opt}, Eol) ->
+ {NonDef, _Optional} = split_optional(Ps),
+ Res = doc_return_types(T,Ps),
+ write_spec(NonDef, [], Res, Eol);
+write_spec(#method{params=Ps,type=T}, Eol) ->
{NonDef, Optional} = split_optional(Ps),
- OptsType = case Optional of
- [] -> "";
- _ when NonDef =:= [] -> "[Option]";
- _ -> ", [Option]"
- end,
- w("%% <p><c>~n",[]),
- w("%% ~s(~s~s) -> ~s </c>~n",
- [Name,doc_arg_types(Ps),OptsType,doc_return_types(T,Ps)]),
- doc_optional(Optional, xhtml),
- DocEnum = doc_enum(T,Ps, xhtml),
- doc_enum_desc(DocEnum),
- w("%% </p>~n",[]).
-
-doc_arg(ArgList) ->
- case all_eq(ArgList) of
- true -> hd(ArgList);
- false ->
- Get = fun(Str) ->
- [_Name|Types] = string:tokens(Str, ":"),
- case Types of
- [Type] -> Type;
- _ ->
- "term()"
- end
- end,
- Args0 = lists:map(Get, ArgList),
- Args = unique(Args0, []),
- "X::" ++ args(fun(A) -> A end, "|", Args)
- end.
-
-doc_ret(ArgList) ->
- case all_eq(ArgList) of
- true -> hd(ArgList);
- false ->
- args(fun(A) -> A end, "|", ArgList)
- end.
-
-unique([], U) -> reverse(U);
-unique([H|R], U) ->
- case lists:member(H,U) of
- false -> unique(R,[H|U]);
- true -> unique(R,U)
- end.
-
-all_eq([H|R]) -> all_eq(R,H).
-
-all_eq([H|R],H) -> all_eq(R,H);
-all_eq([],_) -> true;
-all_eq(_,_) -> false.
-
-zip(List) ->
- zip(List, [], [], []).
-
-zip([[F|L1]|List], Rest, AccL, Acc) ->
- zip(List, [L1|Rest], [F|AccL], Acc);
-zip(Empty, Rest, AccL, Acc) ->
- true = empty(Empty),
- case empty(Rest) andalso empty(AccL) of
- true -> reverse(Acc);
- false ->
- zip(reverse(Rest), [], [], [reverse(AccL)|Acc])
- end.
-
-empty([[]|R]) -> empty(R);
-empty([]) -> true;
-empty(_) -> false.
+ Res = doc_return_types(T,Ps),
+ write_spec(NonDef, Optional, Res, Eol).
+
+write_spec([], [], {simple, Res}, _Eol) ->
+ w("() -> ~s", [Res]);
+write_spec([], [], {complex, Res}, Eol) ->
+ w("() -> Resultwhen~s\tResult ::~s", [Eol,Res]);
+write_spec(Args, [], {simple, Res}, Eol) ->
+ w("(~s) -> ~s when~s\t~s",
+ [erl_arg_names(Args), Res, Eol, doc_arg_types(Args)]);
+write_spec(Args, [], {complex, Res}, Eol) ->
+ w("(~s) -> Result when~s\tResult ::~s,~s\t~s",
+ [erl_arg_names(Args), Eol, Res, Eol, doc_arg_types(Args)]);
+write_spec([], Optional, {simple, Res}, Eol) ->
+ w("([Option]) -> ~s when~s\t~s",
+ [Res, Eol, optional_type(Optional, Eol)]);
+write_spec([], Optional, {complex, Res}, Eol) ->
+ w("([Option]) -> Result when~s\tResult :: ~s,~s\t~s",
+ [Eol, Res, Eol, optional_type(Optional, Eol)]);
+write_spec(Args, Optional, {simple, Res}, Eol) ->
+ w("(~s, [Option]) -> ~s when~s\t~s,~s\t~s",
+ [erl_arg_names(Args), Res, Eol, doc_arg_types(Args), Eol, optional_type(Optional, Eol)]);
+write_spec(Args, Optional, {complex, Res}, Eol) ->
+ w("(~s, [Option]) -> Result when~s\tResult :: ~s,~s\t~s,~s\t~s",
+ [erl_arg_names(Args), Eol, Res, Eol, doc_arg_types(Args), Eol, optional_type(Optional, Eol)]).
+
+optional_type(Opts, Eol) ->
+ "Option :: " ++ args(fun optional_type2/1, Eol++"\t\t | ", Opts).
+optional_type2(#param{name=Name, def=Def, type=T}) ->
+ "{" ++ erl_option_name(Name) ++ ", " ++ doc_arg_type2(T) ++ "}". %% %% Default: " ++ Def.
+
+doc_link("utils", Func) ->
+ w("%% @doc See <a href=\"http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#~s\">"
+ "external documentation</a>.~n",
+ [lowercase_all(Func)]);
+doc_link(Class, Func) ->
+ w("%% @doc See <a href=\"http://www.wxwidgets.org/manuals/stable/wx_~s.html#~s~s\">"
+ "external documentation</a>.~n",
+ [lowercase_all(Class),lowercase_all(Class),lowercase_all(Func)]).
+
+erl_arg_names(Ps0) ->
+ Ps = [Name || #param{name=Name, in=In, where=Where} <- Ps0,In =/= false, Where =/= c],
+ args(fun erl_arg_name/1, ", ", Ps).
doc_arg_types(Ps0) ->
Ps = [P || P=#param{in=In, where=Where} <- Ps0,In =/= false, Where =/= c],
args(fun doc_arg_type/1, ", ", Ps).
-doc_arg_type(#param{name=Name,def=none,type=T}) ->
- erl_arg_name(Name) ++ "::" ++ doc_arg_type2(T);
-doc_arg_type(#param{name=Name,in=false,type=T}) ->
- erl_arg_name(Name) ++ "::" ++ doc_arg_type2(T);
-doc_arg_type(_) -> skip.
-
-doc_arg_type2(T=#type{single=Single}) when Single =:= array; Single =:= list ->
- "[" ++ doc_arg_type3(T) ++ "]";
+
+doc_arg_type(T) ->
+ doc_arg_type(T, in).
+
+doc_arg_type(#param{name=Name,def=none,type=T}, Out) ->
+ erl_arg_name(Name) ++ "::" ++ doc_arg_type2(T, Out);
+doc_arg_type(#param{name=Name,in=false,type=T}, Out) ->
+ erl_arg_name(Name) ++ "::" ++ doc_arg_type2(T, Out);
+doc_arg_type(_, _) -> skip.
+
doc_arg_type2(T) ->
- doc_arg_type3(T).
-
-doc_arg_type3(#type{base=string}) -> "string()";
-doc_arg_type3(#type{name="wxChar", single=S}) when S =/= true -> "string()";
-doc_arg_type3(#type{name="wxArrayString"}) -> "[string()]";
-doc_arg_type3(#type{name="wxDateTime"}) -> "wx:datetime()";
-doc_arg_type3(#type{name="wxArtClient"}) -> "string()";
-doc_arg_type3(#type{base=int}) -> "integer()";
-doc_arg_type3(#type{base=int64}) -> "integer()";
-doc_arg_type3(#type{base=long}) -> "integer()";
-doc_arg_type3(#type{name="wxTreeItemId"}) -> "wxTreeCtrl:treeItemId()";
-doc_arg_type3(#type{base=bool}) -> "bool()";
-doc_arg_type3(#type{base=float}) -> "float()";
-doc_arg_type3(#type{base=double}) -> "float()";
-doc_arg_type3(#type{base=binary}) -> "binary()";
-doc_arg_type3(#type{base={binary,_}}) -> "binary()";
-doc_arg_type3(#type{base=eventType}) -> "atom()";
-doc_arg_type3(#type{base={ref,N}}) -> N++"()";
-doc_arg_type3(#type{base={term,_N}}) -> "term()";
-doc_arg_type3(T=#type{base={class,N}}) ->
- check_class(T),
- case get(current_class) of
- N -> N ++ "()";
- _ -> N++":" ++ N++"()"
+ doc_arg_type2(T, in).
+
+doc_arg_type2(T=#type{single=Single}, Out) when Single =:= array; Single =:= list ->
+ "[" ++ doc_arg_type3(T, Out) ++ "]";
+doc_arg_type2(T, Out) ->
+ doc_arg_type3(T, Out).
+
+doc_arg_type3(#type{base=string}, in) -> "unicode:chardata()";
+doc_arg_type3(#type{base=string}, out) -> "unicode:charlist()";
+doc_arg_type3(#type{name="wxChar", single=S},in) when S =/= true -> "unicode:chardata()";
+doc_arg_type3(#type{name="wxChar", single=S},out) when S =/= true -> "unicode:charlist()";
+doc_arg_type3(#type{name="wxArrayString"},in) -> "[unicode:chardata()]";
+doc_arg_type3(#type{name="wxArrayString"},out) -> "[unicode:charlist()]";
+doc_arg_type3(#type{name="wxDateTime"}, _) -> "wx:wx_datetime()";
+doc_arg_type3(#type{name="wxArtClient"}, _) -> "unicode:chardata()";
+doc_arg_type3(#type{base=int}, _) -> "integer()";
+doc_arg_type3(#type{base=int64}, _) -> "integer()";
+doc_arg_type3(#type{base=long}, _) -> "integer()";
+doc_arg_type3(#type{name="wxTreeItemId"}, _) -> "wxTreeCtrl:treeItemId()";
+doc_arg_type3(#type{base=bool}, _) -> "boolean()";
+doc_arg_type3(#type{base=float}, _) -> "number()";
+doc_arg_type3(#type{base=double}, _) -> "number()";
+doc_arg_type3(#type{base=binary}, _) -> "binary()";
+doc_arg_type3(#type{base={binary,_}}, _) -> "binary()";
+doc_arg_type3(#type{base=eventType}, _) -> "atom()";
+doc_arg_type3(#type{base={ref,N}}, _) -> N++"()";
+doc_arg_type3(#type{base={term,_N}}, _) -> "term()";
+doc_arg_type3(T=#type{base={class,N}}, _) ->
+ ClassType = check_class(T),
+ Current = get(current_class),
+ if N =:= Current -> N ++ "()";
+ true -> ClassType
end;
-doc_arg_type3({merged,_,T1=#type{base={class,N1}},_,_,T2=#type{base={class,N2}},_}) ->
- check_class(T1),
- check_class(T2),
+doc_arg_type3({merged,_,T1=#type{base={class,N1}},_,_,T2=#type{base={class,N2}},_}, _) ->
+ CT1 = check_class(T1),
+ CT2 = check_class(T2),
Curr = get(current_class),
if
- N1 =:= Curr, N2 =:= Curr -> N1++"() | "++ N2++"()";
- N1 =:= Curr -> N1++"() | "++ N2++":" ++ N2++"()";
- N2 =:= Curr -> N1++":" ++ N1++"() | "++ N2++"()";
+ N1 =:= Curr, N2 =:= Curr -> N1++"()";
+ N1 =:= Curr -> N1++"() | "++ CT2;
+ N2 =:= Curr -> CT1 ++ " | "++ N2++"()";
true ->
- N1++":" ++ N1++"() | "++ N2++":" ++ N2++"()"
+ CT1 ++ " | " ++ CT2
end;
-doc_arg_type3(#type{base={enum,{_,N}}}) -> uppercase(N);
-doc_arg_type3(#type{base={enum,N}}) -> uppercase(N);
-doc_arg_type3(#type{base={comp,"wxColour",_Tup}}) ->
- "wx:colour()";
-doc_arg_type3(#type{base={comp,_,{record,Name}}}) ->
- "wx:" ++ atom_to_list(Name) ++ "()";
-doc_arg_type3(#type{base={comp,_,Tup}}) ->
+%% doc_arg_type3(#type{base={enum,{_,N}}}, _) -> uppercase(N);
+%% doc_arg_type3(#type{base={enum,N}}, _) -> uppercase(N);
+doc_arg_type3(#type{base={enum,_N}}, _) -> "wx:wx_enum()";
+doc_arg_type3(#type{base={comp,"wxColour",_Tup}}, in) ->
+ "wx:wx_colour()";
+doc_arg_type3(#type{base={comp,"wxColour",_Tup}}, out) ->
+ "wx:wx_colour4()";
+doc_arg_type3(#type{base={comp,_,{record,Name}}}, _) ->
+ "wx:wx_" ++ atom_to_list(Name) ++ "()";
+doc_arg_type3(#type{base={comp,_,Tup}}, _) ->
Doc = fun({int,V}) -> V ++ "::integer()";
({double,V}) -> V ++ "::float()"
end,
"{" ++ args(Doc, ", ", Tup) ++ "}";
-doc_arg_type3(T) -> ?error({unknown_type,T}).
+doc_arg_type3(T, _) -> ?error({unknown_type,T}).
doc_return_types(T, Ps) ->
doc_return_types2(T, [P || P=#param{in=In} <- Ps,In =/= true]).
-doc_return_types2(void, []) -> "ok";
-doc_return_types2(void, [#param{type=T}]) -> doc_arg_type2(T);
-doc_return_types2(T, []) -> doc_arg_type2(T);
+doc_return_types2(void, []) -> {simple, "ok"};
+doc_return_types2(void, [#param{type=T}]) -> {simple, doc_arg_type2(T, out)};
+doc_return_types2(T, []) -> {simple, doc_arg_type2(T, out)};
+doc_return_types2(void, Ps) when length(Ps) < 4 ->
+ {simple, "{" ++ args(fun(Arg) -> doc_arg_type(Arg, out) end,", ",Ps) ++ "}"};
doc_return_types2(void, Ps) ->
- "{" ++ args(fun doc_arg_type/1,", ",Ps) ++ "}";
+ {complex, "{" ++ args(fun(Arg) -> doc_arg_type(Arg, out) end,", ",Ps) ++ "}"};
doc_return_types2(T, Ps) ->
- "{" ++ doc_arg_type2(T) ++ ", " ++ args(fun doc_arg_type/1,", ",Ps) ++ "}".
-
-break(xhtml) -> "<br />";
-break(_) -> "".
-
-doc_optional([],_) -> ok;
-doc_optional(Opts,Type) ->
- w("%%~s Option = ~s~n", [break(Type),args(fun doc_optional2/1, " | ", Opts)]).
+ {complex, "{Res ::" ++ doc_arg_type2(T, out) ++ ", " ++
+ args(fun(Arg) -> doc_arg_type(Arg, out) end,", ",Ps) ++ "}"}.
-doc_optional2(#param{name=Name, def=_Def, type=T}) ->
- "{" ++ erl_option_name(Name) ++ ", " ++ doc_arg_type2(T) ++ "}".
+doc_enum(#type{base={enum,Enum}},Ps) ->
+ [doc_enum_type(Enum, "res") |
+ [doc_enum_type(Type,Name) || #param{name=Name, type=#type{base={enum,Type}}} <- Ps]];
+doc_enum(_,Ps) ->
+ [doc_enum_type(Type,Name) || #param{name=Name, type=#type{base={enum,Type}}} <- Ps].
-doc_enum(#type{base={enum,Enum}},Ps,Break) ->
- [doc_enum_type(Enum,Break) |
- [doc_enum_type(Type,Break) || #param{type=#type{base={enum,Type}}} <- Ps]];
-doc_enum(_,Ps,Break) ->
- [doc_enum_type(Type,Break) || #param{type=#type{base={enum,Type}}} <- Ps].
-
-doc_enum_type(Type,Break) ->
+doc_enum_type(Type, Name) ->
{Enum0, #enum{vals=Vals}} = wx_gen:get_enum(Type),
- case Enum0 of {_, Enum} -> Enum; Enum -> Enum end,
+ Enum = case Enum0 of {_, E} -> E; E -> E end,
Consts = get(consts),
- Format = fun({Name,_What}) ->
- #const{name=Name} = gb_trees:get(Name, Consts),
- "?" ++ enum_name(Name)
+ Format = fun({N,_What}) ->
+ #const{name=N} = gb_trees:get(N, Consts),
+ "?" ++ enum_name(N)
end,
Vs = args(Format, " | ", Vals),
- w("%%~s ~s = integer()~n", [break(Break),uppercase(Enum)]),
- {uppercase(Enum),Vs}.
+ {uppercase(Enum),Name, Vs}.
doc_enum_desc([]) -> ok;
-doc_enum_desc([{Enum,Vs}|R]) ->
- w("%%<br /> ~s is one of ~s~n", [Enum,Vs]),
+doc_enum_desc([{_Enum,Name,Vs}|R]) ->
+ w("%%<br /> ~s = ~s~n", [erl_arg_name(Name),Vs]),
doc_enum_desc(R).
%% Misc functions prefixed with wx
@@ -993,7 +964,7 @@ marshal_arg(#type{single=true,base={comp,_,Comp}}, Name, Align0) ->
Str = args(fun(Str) -> Str end, ",", A),
{Str,(Align0 + length(Comp)) rem 2};
{double,_} ->
- A = [Name++Spec++":64/float" || {double,Spec} <- Comp],
+ A = [Name++Spec++":64/?F" || {double,Spec} <- Comp],
Str = args(fun(Str) -> Str end, ",", A),
align(64,Align0,Str)
end;
@@ -1019,9 +990,14 @@ marshal_arg(#type{base=Base, single=Single}, Name, Align0)
Str0 = "(length("++Name++")):32/?UI,\n"
" (<< <<X:32/?I,Y:32/?I>> || {X,Y} <- "++Name++">>)/binary",
align(32,Align0, Str0);
+ {comp, "wxPoint2DDouble", _} ->
+ Str0 = "(length("++Name++")):32/?UI,\n",
+ Str1 = " (<< <<X:64/?F,Y:64/?F>> || {X,Y} <- "++Name++">>)/binary",
+ {Str,_Align} = align(64,Align0+1, Str1),
+ {Str0 ++ Str, 0};
double ->
Str0 = "(length("++Name++")):32/?UI,\n",
- Str1 = " (<< <<C:64/float>> || C <- "++Name++">>)/binary",
+ Str1 = " (<< <<C:64/?F>> || C <- "++Name++">>)/binary",
{Str,_Align} = align(64,Align0+1, Str1),
{Str0 ++ Str, 0};
_ ->
@@ -1048,12 +1024,13 @@ enum_name(Name) ->
gen_enums_ints() ->
%% open_write("../include/wx.hrl"), opened in gen_event_recs
w("~n%% Hardcoded Records~n", []),
- w("-record(wxMouseState, {x, y, %% integer()~n"
- " leftDown, middleDown, rightDown, %% bool()~n"
- " controlDown, shiftDown, altDown, metaDown, cmdDown %% bool()~n"
+ w("-record(wxMouseState, {x :: integer(), y :: integer(),~n"
+ " leftDown :: boolean(), middleDown :: boolean, rightDown :: boolean, ~n"
+ " controlDown :: boolean(), shiftDown :: boolean(),~n"
+ " altDown :: boolean(), metaDown :: boolean(), cmdDown :: boolean()~n"
" }).~n", []),
w("-record(wxHtmlLinkInfo, {~n"
- " href, target %% string()~n"
+ " href :: unicode:chardata(), target :: unicode:chardata()~n"
" }).~n", []),
w("~n%% Hardcoded Defines~n", []),
Enums = [E || {{enum,_},E = #enum{as_atom=false}} <- get()],
@@ -1083,16 +1060,16 @@ build_enum_ints(#enum{from=From, vals=Vals},Done) ->
Format = fun(#const{name="wxEVT_" ++ _}) ->
ignore; %% Ignore event macros they are not valid in our event model
- (#const{name=Name,val=Value,is_const=true}) when is_integer(Value) ->
+ (#const{name=Name,val=Value,is_const=true}) when is_number(Value) ->
w("-define(~s, ~p).~n", [enum_name(Name),Value]);
- (#const{name=Name,val=Value,is_const=false}) when is_integer(Value) ->
+ (#const{name=Name,val=Value,is_const=false}) when is_number(Value) ->
w("-define(~s, wxe_util:get_const(~s)).~n", [enum_name(Name),enum_name(Name)]);
(#const{name=Name,val={Str,0}}) ->
case string:tokens(Str, " |()") of
[Token] ->
- w("-define(~s, ?~s).~n", [enum_name(Name),Token]);
+ w("-define(~s, ~s).~n", [enum_name(Name),const_value(Token)]);
Tokens ->
- Def = args(fun(T) -> [$?|T] end, " bor ", Tokens),
+ Def = args(fun(T) -> const_value(T) end, " bor ", Tokens),
w("-define(~s, (~s)).~n", [enum_name(Name),Def])
end;
(#const{name=Name,val={Str,N}}) ->
@@ -1117,6 +1094,17 @@ build_enum_ints(#enum{from=From, vals=Vals},Done) ->
end,
lists:foldl(Write, Done, Vals).
+const_value(V) when is_integer(V) -> integer_to_list(V);
+const_value(V = "16#" ++ IntList) ->
+ _ = http_util:hexlist_to_integer(IntList), %% ASSERT
+ V;
+const_value(V0) ->
+ try
+ _ = list_to_integer(V0),
+ V0
+ catch _:_ -> [$?|V0]
+ end.
+
gen_event_recs() ->
open_write("../include/wx.hrl"),
erl_copyright(),
@@ -1126,82 +1114,53 @@ gen_event_recs() ->
"%% they contain the widget id and a specialized event record.~n"
"%% Each event record may be sent for one or more event types.~n"
"%% The mapping to wxWidgets is one record per class.~n~n",[]),
- w("%% @type wx() = #wx{id=integer(), obj=wx:wxObject(), userData=term(), event=Rec}. Rec is a event record.~n",[]),
- w("-record(wx, {id, %% Integer Identity of object.~n"
- " obj, %% Object reference that was used in the connect call.~n"
- " userData, %% User data specified in the connect call.~n"
- " event}).%% The event record~n~n",[]),
+ w("-record(wx, {id :: integer(), %% Integer Identity of object.~n"
+ " obj :: wx:wx_object(), %% Object reference that was used in the connect call.~n"
+ " userData :: term(), %% User data specified in the connect call.~n"
+ " event :: event() %% The event record~n"
+ " }).~n~n", []),
+ w("-type wx() :: #wx{}. %% wx event record ~n",[]),
w("%% Here comes the definitions of all event records.~n"
"%% they contain the event type and possible some extra information.~n~n",[]),
- Types = [build_event_rec(C) || {_,C=#class{event=Evs}} <- get(), Evs =/= false],
- w("%% @type wxEventType() = ~s.~n",
- [args(fun(Ev) -> Ev end, " | ", lists:sort(lists:append(Types)))]),
+ Events = [build_event_rec(C) || {_,C=#class{event=Evs}} <- get(), Evs =/= false],
+ EventSubTypes = [Type || {_Rec, Type} <- Events],
+ EventRecs = [Rec || {Rec, _Type} <- Events],
+ w("-type event() :: ~s.~n",
+ [args(fun(Ev) -> Ev++"()" end, " | ", lists:sort(EventRecs))]),
+
+ w("-type wxEventType() :: ~s.~n",
+ [args(fun(Ev) -> Ev++"()" end, " | ", lists:sort(EventSubTypes))]),
%% close(), closed in gen_enums_ints
ok.
-find_inherited_attr(Param = {PName,_}, Name) ->
- #class{parent=Parent, attributes=Attrs} = get({class, Name}),
- case lists:keysearch(atom_to_list(PName), #param.name, Attrs) of
- {value, P=#param{}} ->
- P;
- _ ->
- find_inherited_attr(Param, Parent)
- end.
-
-filter_attrs(#class{name=Name, parent=Parent,attributes=Attrs}) ->
- Attr1 = lists:foldl(fun(#param{acc=skip},Acc) -> Acc;
- (P=#param{prot=public},Acc) -> [P|Acc];
- (#param{acc=undefined},Acc) -> Acc;
- ({inherited, PName},Acc) ->
- case find_inherited_attr(PName, Parent) of
- undefined ->
- io:format("~p:~p: Missing Event Attr ~p in ~p~n",
- [?MODULE,?LINE, PName, Name]),
- Acc;
- P ->
- [P|Acc]
- end;
- (P, Acc) -> [P|Acc]
- end, [], Attrs),
- lists:reverse(Attr1).
-
build_event_rec(Class=#class{name=Name, event=Evs}) ->
EvTypes = [event_type_name(Ev) || Ev <- Evs],
- Str = args(fun(Ev) -> "<em>"++Ev++"</em>" end, ", ", EvTypes),
+ Str = args(fun(Ev) -> Ev end, " | ", EvTypes),
Attr = filter_attrs(Class),
Rec = event_rec_name(Name),
- GetName = fun(#param{name=N}) ->event_attr_name(N) end,
+ %%GetName = fun(#param{name=N}) ->event_attr_name(N) end,
GetType = fun(#param{name=N,type=T}) ->
- event_attr_name(N) ++ "=" ++ doc_arg_type2(T)
+ event_attr_name(N) ++ " :: " ++ doc_arg_type2(T)
end,
+ EventType = Name ++ "Type",
case Attr =:= [] of
true ->
- w("%% @type ~s() = #~s{type=wxEventType()}.~n", [Rec,Rec]),
- w("%% <dl><dt>EventType:</dt> <dd>~s</dd></dl>~n",[Str]),
-%% case is_command_event(Name) of
-%% true -> w("%% This event skips other event handlers.~n",[]);
-%% false -> w("%% This event will be handled by other handlers~n",[])
-%% end,
- w("%% Callback event: {@link ~s}~n", [Name]),
- w("-record(~s, {type}).~n~n", [Rec]);
+ %% w("%% <dl><dt>EventType:</dt> <dd>~s</dd></dl>~n",[Str]),
+ %% w("%% Callback event: {@link ~s}~n", [Name]),
+ w("-record(~s, {type :: ~s()}). %% Callback event: {@link ~s}~n",
+ [Rec, EventType, Name]),
+ w("-type ~s() :: ~s.~n", [EventType, Str]);
false ->
- w("%% @type ~s() = #~s{type=wxEventType(),~s}.~n",
- [Rec,Rec,args(GetType,",",Attr)]),
- w("%% <dl><dt>EventType:</dt> <dd>~s</dd></dl>~n",[Str]),
-%% case is_command_event(Name) of
-%% true -> w("%% This event skips other event handlers.~n",[]);
-%% false -> w("%% This event will be handled by other handlers~n",[])
-%% end,
- w("%% Callback event: {@link ~s}~n", [Name]),
- w("-record(~s,{type, ~s}).~n~n", [Rec,args(GetName,",",Attr)])
+ %% w("%% @type ~s() = #~s{type=wxEventType(),~s}.~n",
+ %% [Rec,Rec,args(GetType,",",Attr)]),
+ %% w("%% <dl><dt>EventType:</dt> <dd>~s</dd></dl>~n",[Str]),
+ %% w("%% Callback event: {@link ~s}~n", [Name]),
+ w("-record(~s,{type :: ~s(), %% Callback event: {@link ~s}~n\t~s}).~n",
+ [Rec,EventType, Name, args(GetType,",\n\t",Attr)]),
+ w("-type ~s() :: ~s.~n", [EventType, Str])
end,
- EvTypes.
-
-is_command_event(Name) ->
- case lists:member("wxCommandEvent", parents(Name)) of
- true -> true;
- false -> false
- end.
+ w("-type ~s() :: #~s{}. %% Callback event: {@link ~s}~n~n", [Rec,Rec,Name]),
+ {Rec, EventType}.
event_rec_name(Name0 = "wx" ++ _) ->
"tnevE" ++ Name1 = reverse(Name0),
@@ -1218,6 +1177,31 @@ event_attr_name("m_" ++ Attr) ->
event_attr_name(Attr) ->
lowercase(Attr).
+find_inherited_attr(Param = {PName,_}, Name) ->
+ #class{parent=Parent, attributes=Attrs} = get({class, Name}),
+ case lists:keysearch(atom_to_list(PName), #param.name, Attrs) of
+ {value, P=#param{}} ->
+ P;
+ _ ->
+ find_inherited_attr(Param, Parent)
+ end.
+
+filter_attrs(#class{name=Name, parent=Parent,attributes=Attrs}) ->
+ Attr1 = lists:foldl(fun(#param{acc=skip},Acc) -> Acc;
+ (P=#param{prot=public},Acc) -> [P|Acc];
+ (#param{acc=undefined},Acc) -> Acc;
+ ({inherited, PName},Acc) ->
+ case find_inherited_attr(PName, Parent) of
+ undefined ->
+ io:format("~p:~p: Missing Event Attr ~p in ~p~n",
+ [?MODULE,?LINE, PName, Name]),
+ Acc;
+ P ->
+ [P|Acc]
+ end;
+ (P, Acc) -> [P|Acc]
+ end, [], Attrs),
+ lists:reverse(Attr1).
gen_funcnames() ->
open_write("../src/gen/wxe_debug.hrl"),
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf
index ff618faf04..1f6225ce60 100644
--- a/lib/wx/api_gen/wxapi.conf
+++ b/lib/wx/api_gen/wxapi.conf
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -330,9 +330,11 @@
{'DrawRotatedText',3}, 'DrawRoundedRectangle',%'DrawSpline',
{'DrawText',2},
'EndDoc','EndPage',{'FloodFill',3},'GetBackground','GetBackgroundMode',
- 'GetBrush','GetCharHeight','GetCharWidth',{'GetClippingBox',1},'GetFont',
- 'GetLayoutDirection','GetLogicalFunction','GetMapMode','GetMultiLineTextExtent',
- 'GetPartialTextExtents','GetPen',{'GetPixel',2},'GetPPI','GetSize','GetSizeMM',
+ 'GetBrush','GetCharHeight','GetCharWidth',{'GetClippingBox',[{"rect", skip_member}]},
+ 'GetFont','GetLayoutDirection','GetLogicalFunction','GetMapMode','GetMultiLineTextExtent',
+ {'GetPartialTextExtents', [{"widths", out}]},
+ 'GetPen',{'GetPixel', [{"col", out}, {"x", skip_member}]},
+ 'GetPPI','GetSize','GetSizeMM',
'GetTextBackground','GetTextExtent','GetTextForeground',
'GetUserScale','GradientFillConcentric','GradientFillLinear',
'LogicalToDeviceX','LogicalToDeviceXRel','LogicalToDeviceY','LogicalToDeviceYRel',
@@ -355,20 +357,28 @@
%%{class,wxAutoBufferedPaintDC,wxBufferedPaintDC,[],['wxAutoBufferedPaintDC']}.
{class, wxGraphicsObject, object, [{ifdef, wxUSE_GRAPHICS_CONTEXT}],
- ['GetRenderer','IsNull']}.
-{class, wxGraphicsContext, wxGraphicsObject, [{ifdef, wxUSE_GRAPHICS_CONTEXT}],
- ['Create', %%CreateFromNative CreateFromNativeWindow
+ ['~wxGraphicsObject', 'GetRenderer','IsNull']}.
+{class, wxGraphicsContext, wxGraphicsObject,
+ [{ifdef, wxUSE_GRAPHICS_CONTEXT}, {skip, [{'StrokeLines',4}]}],
+ ['~wxGraphicsContext',
+ 'Create', %%CreateFromNative CreateFromNativeWindow
'CreatePen','CreateBrush','CreateRadialGradientBrush',
'CreateLinearGradientBrush','CreateFont','CreateMatrix',
'CreatePath','Clip','ResetClip',
- 'DrawBitmap','DrawEllipse','DrawIcon','DrawLines','DrawPath',
+ 'DrawBitmap','DrawEllipse','DrawIcon',
+ {'DrawLines', [{"n",{c_only,{length,"points"}}}, {"points", {single,array}}]},
+ 'DrawPath',
'DrawRectangle','DrawRoundedRectangle','DrawText','FillPath',
- 'StrokePath','GetNativeContext','GetPartialTextExtents',
+ 'StrokePath', %% 'GetNativeContext',
+ {'GetPartialTextExtents', [{"widths", out}]},
'GetTextExtent','Rotate','Scale','Translate',
'GetTransform','SetTransform','ConcatTransform',
- 'SetBrush','SetFont','SetPen','StrokeLine','StrokeLines']}.
+ 'SetBrush','SetFont','SetPen','StrokeLine',
+ {'StrokeLines', [{"n",{c_only,{length,"points"}}}, {"points", {single,array}}]}
+ ]}.
{class, wxGraphicsMatrix, wxGraphicsObject, [{ifdef, wxUSE_GRAPHICS_CONTEXT}],
- ['Concat','Get','GetNativeMatrix','Invert','IsEqual','IsIdentity',
+ ['Concat','Get',%%'GetNativeMatrix',
+ 'Invert','IsEqual','IsIdentity',
'Rotate','Scale','Translate','Set','TransformPoint','TransformDistance']}.
{class, wxGraphicsPath, wxGraphicsObject, [{ifdef, wxUSE_GRAPHICS_CONTEXT}],
['MoveToPoint','AddArc','AddArcToPoint','AddCircle','AddCurveToPoint',
@@ -400,17 +410,17 @@
{class, wxControl, wxWindow, [], [% 'Command','GetLabelText',
'GetLabel','SetLabel']}.
-{class, wxControlWithItems, wxControl,
- [{skip, [{'GetClientObject',1},{'SetClientObject',2}]}],
+{class, wxControlWithItems, wxControl,
+ [{skip, [{'GetClientObject',1},{'SetClientObject',2}]}],
[
- {'Append',[{"clientData",[{skip_member, void}]},
- {"strings", [{erl_func, "appendStrings"}]}]},
+ {'Append',[{"clientData",[{skip_member, voidp}]},
+ {"strings", [{erl_func, "appendStrings"}]}]},
'Clear','Delete','FindString',
%% 'GetClientData','SetClientData',
{'GetClientObject', [{"n", [{erl_func, "getClientData"}]}]},
{'SetClientObject', [{"n", [{erl_func, "setClientData"}]}]},
'GetCount','GetSelection','GetString','GetStringSelection',
- {'Insert',[{"clientData",[{skip_member, void}]}]},%'Number',
+ {'Insert',[{"clientData",[{skip_member, voidp}]}]},%'Number',
'IsEmpty','Select','SetSelection','SetString','SetStringSelection'
]}.
@@ -766,10 +776,12 @@
'GetEditControl',
'GetImageList','GetItem','GetItemBackgroundColour',
'GetItemCount',{'GetItemData', [{return, {base,int}}]},
- 'GetItemFont','GetItemPosition','GetItemRect',
- 'GetItemSpacing','GetItemState','GetItemText','GetItemTextColour',
+ 'GetItemFont', {'GetItemPosition', [{"pos", out}]},{'GetItemRect',[{"rect", out}]},
+ 'GetItemSpacing','GetItemState',
+ 'GetItemText','GetItemTextColour',
'GetNextItem','GetSelectedItemCount','GetTextColour','GetTopItem',
- 'GetViewRect',{'HitTest',[{"pSubItem",nowhere}]},'InsertColumn','InsertItem',
+ 'GetViewRect',{'HitTest',[{"pSubItem",nowhere}, {"flags", in}]},
+ 'InsertColumn','InsertItem',
%%'OnGetItemAttr', 'OnGetItemImage','OnGetItemText',
'RefreshItem','RefreshItems','ScrollList',
'SetBackgroundColour','SetColumn','SetColumnWidth','SetImageList','SetItem',
@@ -1592,9 +1604,9 @@
'HomeWrapExtend', 'LineEndWrap', 'LineEndWrapExtend', 'VCHomeWrap', 'VCHomeWrapExtend', 'LineCopy',
'MoveCaretInsideView', 'LineLength', 'BraceHighlight', 'BraceBadLight', 'BraceMatch', 'GetViewEOL',
'SetViewEOL', %'GetDocPointer', 'SetDocPointer', Hmm void pointers
- 'SetModEventMask', 'GetEdgeColumn', 'SetEdgeColumn',
- 'GetEdgeMode', 'GetEdgeColour', 'SetEdgeColour', 'SearchAnchor', 'SearchNext',
- 'SearchPrev', 'LinesOnScreen',
+ 'SetModEventMask', 'GetEdgeColumn', 'SetEdgeColumn',
+ 'SetEdgeMode', 'GetEdgeMode', 'GetEdgeColour', 'SetEdgeColour', 'SearchAnchor', 'SearchNext',
+ 'SearchPrev', 'LinesOnScreen',
'UsePopUp', 'SelectionIsRectangle', 'SetZoom', 'GetZoom',
%%'CreateDocument', 'AddRefDocument', 'ReleaseDocument', Hmm void pointers
'GetModEventMask', 'SetSTCFocus', 'GetSTCFocus', 'SetStatus', 'GetStatus',
@@ -1803,4 +1815,14 @@
{class, wxLogNull, root, [],
[wxLogNull, '~wxLogNull']}.
-
+
+{class, wxTaskBarIcon, wxEvtHandler, [],
+ [wxTaskBarIcon,'~wxTaskBarIcon',
+ %%'CreatePopupMenu', virtual overrided is a callback
+ %% 'IsIconInstalled', 'IsOk', not available on mac
+ 'PopupMenu','RemoveIcon','SetIcon']}.
+
+{class, wxTaskBarIconEvent, wxEvent,
+ [{event,[wxEVT_TASKBAR_MOVE,wxEVT_TASKBAR_LEFT_DOWN,wxEVT_TASKBAR_LEFT_UP,
+ wxEVT_TASKBAR_RIGHT_DOWN,wxEVT_TASKBAR_RIGHT_UP,
+ wxEVT_TASKBAR_LEFT_DCLICK,wxEVT_TASKBAR_RIGHT_DCLICK]}],[]}.
diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in
index d40ce88e99..ce7f4bf53e 100644
--- a/lib/wx/c_src/Makefile.in
+++ b/lib/wx/c_src/Makefile.in
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2011. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -45,20 +45,11 @@ GL_H = egl_impl.h gen/glu_finit.h gen/gl_finit.h gen/gl_fdefs.h
HAVE_OPENGL = true
OPENGL_F = gl_funcs egl_impl
-ifneq ($(INSIDE_ERLSRC),true)
-
-ERL_DIR = @ERLANG_ROOT_DIR@
-ERL_INCS = -I$(ERL_DIR)/usr/include
-
-else
-
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
ERL_INCS= $(DED_INCLUDES)
-endif
-
SYS_TYPE = @WXERL_SYS_TYPE@
GENERAL_O = $(GENERAL:%=$(SYS_TYPE)/%.o)
@@ -183,7 +174,6 @@ $(TARGET_DIR)/erl_gl$(SO_EXT): $(GL_OBJECTS)
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
-ifeq ($(INSIDE_ERLSRC),true)
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/priv
@@ -193,5 +183,3 @@ release_spec: opt
$(INSTALL_PROGRAM) $(TARGET_DIR)/erl_gl$(SO_EXT) $(RELSYSDIR)/priv/
release_docs_spec:
-
-endif
diff --git a/lib/wx/c_src/gen/gl_fdefs.h b/lib/wx/c_src/gen/gl_fdefs.h
index a45896d30d..3e742724aa 100644
--- a/lib/wx/c_src/gen/gl_fdefs.h
+++ b/lib/wx/c_src/gen/gl_fdefs.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2010. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -31,308 +31,180 @@ typedef struct {
} gl_fns_t;
#define GLE_GL_FUNC_START 5037
-typedef void (APIENTRY * WXEGLACCUM)(GLenum,GLfloat);
-WXE_EXTERN WXEGLACCUM weglAccum;
-typedef void (APIENTRY * WXEGLALPHAFUNC)(GLenum,GLclampf);
-WXE_EXTERN WXEGLALPHAFUNC weglAlphaFunc;
-typedef GLboolean (APIENTRY * WXEGLARETEXTURESRESIDENT)(GLsizei,const GLuint *,GLboolean *);
-WXE_EXTERN WXEGLARETEXTURESRESIDENT weglAreTexturesResident;
-typedef void (APIENTRY * WXEGLARRAYELEMENT)(GLint);
-WXE_EXTERN WXEGLARRAYELEMENT weglArrayElement;
-typedef void (APIENTRY * WXEGLBEGIN)(GLenum);
-WXE_EXTERN WXEGLBEGIN weglBegin;
-typedef void (APIENTRY * WXEGLBINDTEXTURE)(GLenum,GLuint);
-WXE_EXTERN WXEGLBINDTEXTURE weglBindTexture;
-typedef void (APIENTRY * WXEGLBITMAP)(GLsizei,GLsizei,GLfloat,GLfloat,GLfloat,GLfloat,const GLubyte *);
-WXE_EXTERN WXEGLBITMAP weglBitmap;
-typedef void (APIENTRY * WXEGLBLENDFUNC)(GLenum,GLenum);
-WXE_EXTERN WXEGLBLENDFUNC weglBlendFunc;
-typedef void (APIENTRY * WXEGLCALLLIST)(GLuint);
-WXE_EXTERN WXEGLCALLLIST weglCallList;
-typedef void (APIENTRY * WXEGLCALLLISTS)(GLsizei,GLenum,const GLuint *);
-WXE_EXTERN WXEGLCALLLISTS weglCallLists;
-typedef void (APIENTRY * WXEGLCLEAR)(GLbitfield);
-WXE_EXTERN WXEGLCLEAR weglClear;
-typedef void (APIENTRY * WXEGLCLEARACCUM)(GLfloat,GLfloat,GLfloat,GLfloat);
-WXE_EXTERN WXEGLCLEARACCUM weglClearAccum;
-typedef void (APIENTRY * WXEGLCLEARCOLOR)(GLclampf,GLclampf,GLclampf,GLclampf);
-WXE_EXTERN WXEGLCLEARCOLOR weglClearColor;
-typedef void (APIENTRY * WXEGLCLEARDEPTH)(GLclampd);
-WXE_EXTERN WXEGLCLEARDEPTH weglClearDepth;
typedef void (APIENTRY * WXEGLCLEARINDEX)(GLfloat);
WXE_EXTERN WXEGLCLEARINDEX weglClearIndex;
-typedef void (APIENTRY * WXEGLCLEARSTENCIL)(GLint);
-WXE_EXTERN WXEGLCLEARSTENCIL weglClearStencil;
-typedef void (APIENTRY * WXEGLCLIPPLANE)(GLenum,const GLdouble *);
-WXE_EXTERN WXEGLCLIPPLANE weglClipPlane;
-typedef void (APIENTRY * WXEGLCOLOR3BV)(const GLbyte *);
-WXE_EXTERN WXEGLCOLOR3BV weglColor3bv;
-typedef void (APIENTRY * WXEGLCOLOR3DV)(const GLdouble *);
-WXE_EXTERN WXEGLCOLOR3DV weglColor3dv;
-typedef void (APIENTRY * WXEGLCOLOR3FV)(const GLfloat *);
-WXE_EXTERN WXEGLCOLOR3FV weglColor3fv;
-typedef void (APIENTRY * WXEGLCOLOR3IV)(const GLint *);
-WXE_EXTERN WXEGLCOLOR3IV weglColor3iv;
-typedef void (APIENTRY * WXEGLCOLOR3SV)(const GLshort *);
-WXE_EXTERN WXEGLCOLOR3SV weglColor3sv;
-typedef void (APIENTRY * WXEGLCOLOR3UBV)(const GLubyte *);
-WXE_EXTERN WXEGLCOLOR3UBV weglColor3ubv;
-typedef void (APIENTRY * WXEGLCOLOR3UIV)(const GLuint *);
-WXE_EXTERN WXEGLCOLOR3UIV weglColor3uiv;
-typedef void (APIENTRY * WXEGLCOLOR3USV)(const GLushort *);
-WXE_EXTERN WXEGLCOLOR3USV weglColor3usv;
-typedef void (APIENTRY * WXEGLCOLOR4BV)(const GLbyte *);
-WXE_EXTERN WXEGLCOLOR4BV weglColor4bv;
-typedef void (APIENTRY * WXEGLCOLOR4DV)(const GLdouble *);
-WXE_EXTERN WXEGLCOLOR4DV weglColor4dv;
-typedef void (APIENTRY * WXEGLCOLOR4FV)(const GLfloat *);
-WXE_EXTERN WXEGLCOLOR4FV weglColor4fv;
-typedef void (APIENTRY * WXEGLCOLOR4IV)(const GLint *);
-WXE_EXTERN WXEGLCOLOR4IV weglColor4iv;
-typedef void (APIENTRY * WXEGLCOLOR4SV)(const GLshort *);
-WXE_EXTERN WXEGLCOLOR4SV weglColor4sv;
-typedef void (APIENTRY * WXEGLCOLOR4UBV)(const GLubyte *);
-WXE_EXTERN WXEGLCOLOR4UBV weglColor4ubv;
-typedef void (APIENTRY * WXEGLCOLOR4UIV)(const GLuint *);
-WXE_EXTERN WXEGLCOLOR4UIV weglColor4uiv;
-typedef void (APIENTRY * WXEGLCOLOR4USV)(const GLushort *);
-WXE_EXTERN WXEGLCOLOR4USV weglColor4usv;
+typedef void (APIENTRY * WXEGLCLEARCOLOR)(GLclampf,GLclampf,GLclampf,GLclampf);
+WXE_EXTERN WXEGLCLEARCOLOR weglClearColor;
+typedef void (APIENTRY * WXEGLCLEAR)(GLbitfield);
+WXE_EXTERN WXEGLCLEAR weglClear;
+typedef void (APIENTRY * WXEGLINDEXMASK)(GLuint);
+WXE_EXTERN WXEGLINDEXMASK weglIndexMask;
typedef void (APIENTRY * WXEGLCOLORMASK)(GLboolean,GLboolean,GLboolean,GLboolean);
WXE_EXTERN WXEGLCOLORMASK weglColorMask;
-typedef void (APIENTRY * WXEGLCOLORMATERIAL)(GLenum,GLenum);
-WXE_EXTERN WXEGLCOLORMATERIAL weglColorMaterial;
-typedef void (APIENTRY * WXEGLCOLORPOINTER)(GLint,GLenum,GLsizei,const GLvoid *);
-WXE_EXTERN WXEGLCOLORPOINTER weglColorPointer;
-typedef void (APIENTRY * WXEGLCOPYPIXELS)(GLint,GLint,GLsizei,GLsizei,GLenum);
-WXE_EXTERN WXEGLCOPYPIXELS weglCopyPixels;
-typedef void (APIENTRY * WXEGLCOPYTEXIMAGE1D)(GLenum,GLint,GLenum,GLint,GLint,GLsizei,GLint);
-WXE_EXTERN WXEGLCOPYTEXIMAGE1D weglCopyTexImage1D;
-typedef void (APIENTRY * WXEGLCOPYTEXIMAGE2D)(GLenum,GLint,GLenum,GLint,GLint,GLsizei,GLsizei,GLint);
-WXE_EXTERN WXEGLCOPYTEXIMAGE2D weglCopyTexImage2D;
-typedef void (APIENTRY * WXEGLCOPYTEXSUBIMAGE1D)(GLenum,GLint,GLint,GLint,GLint,GLsizei);
-WXE_EXTERN WXEGLCOPYTEXSUBIMAGE1D weglCopyTexSubImage1D;
-typedef void (APIENTRY * WXEGLCOPYTEXSUBIMAGE2D)(GLenum,GLint,GLint,GLint,GLint,GLint,GLsizei,GLsizei);
-WXE_EXTERN WXEGLCOPYTEXSUBIMAGE2D weglCopyTexSubImage2D;
+typedef void (APIENTRY * WXEGLALPHAFUNC)(GLenum,GLclampf);
+WXE_EXTERN WXEGLALPHAFUNC weglAlphaFunc;
+typedef void (APIENTRY * WXEGLBLENDFUNC)(GLenum,GLenum);
+WXE_EXTERN WXEGLBLENDFUNC weglBlendFunc;
+typedef void (APIENTRY * WXEGLLOGICOP)(GLenum);
+WXE_EXTERN WXEGLLOGICOP weglLogicOp;
typedef void (APIENTRY * WXEGLCULLFACE)(GLenum);
WXE_EXTERN WXEGLCULLFACE weglCullFace;
-typedef void (APIENTRY * WXEGLDELETELISTS)(GLuint,GLsizei);
-WXE_EXTERN WXEGLDELETELISTS weglDeleteLists;
-typedef void (APIENTRY * WXEGLDELETETEXTURES)(GLsizei,const GLuint *);
-WXE_EXTERN WXEGLDELETETEXTURES weglDeleteTextures;
-typedef void (APIENTRY * WXEGLDEPTHFUNC)(GLenum);
-WXE_EXTERN WXEGLDEPTHFUNC weglDepthFunc;
-typedef void (APIENTRY * WXEGLDEPTHMASK)(GLboolean);
-WXE_EXTERN WXEGLDEPTHMASK weglDepthMask;
-typedef void (APIENTRY * WXEGLDEPTHRANGE)(GLclampd,GLclampd);
-WXE_EXTERN WXEGLDEPTHRANGE weglDepthRange;
-typedef void (APIENTRY * WXEGLDISABLE)(GLenum);
-WXE_EXTERN WXEGLDISABLE weglDisable;
-typedef void (APIENTRY * WXEGLDISABLECLIENTSTATE)(GLenum);
-WXE_EXTERN WXEGLDISABLECLIENTSTATE weglDisableClientState;
-typedef void (APIENTRY * WXEGLDRAWARRAYS)(GLenum,GLint,GLsizei);
-WXE_EXTERN WXEGLDRAWARRAYS weglDrawArrays;
-typedef void (APIENTRY * WXEGLDRAWBUFFER)(GLenum);
-WXE_EXTERN WXEGLDRAWBUFFER weglDrawBuffer;
-typedef void (APIENTRY * WXEGLDRAWELEMENTS)(GLenum,GLsizei,GLenum,const GLvoid *);
-WXE_EXTERN WXEGLDRAWELEMENTS weglDrawElements;
-typedef void (APIENTRY * WXEGLDRAWPIXELS)(GLsizei,GLsizei,GLenum,GLenum,const GLvoid *);
-WXE_EXTERN WXEGLDRAWPIXELS weglDrawPixels;
+typedef void (APIENTRY * WXEGLFRONTFACE)(GLenum);
+WXE_EXTERN WXEGLFRONTFACE weglFrontFace;
+typedef void (APIENTRY * WXEGLPOINTSIZE)(GLfloat);
+WXE_EXTERN WXEGLPOINTSIZE weglPointSize;
+typedef void (APIENTRY * WXEGLLINEWIDTH)(GLfloat);
+WXE_EXTERN WXEGLLINEWIDTH weglLineWidth;
+typedef void (APIENTRY * WXEGLLINESTIPPLE)(GLint,GLushort);
+WXE_EXTERN WXEGLLINESTIPPLE weglLineStipple;
+typedef void (APIENTRY * WXEGLPOLYGONMODE)(GLenum,GLenum);
+WXE_EXTERN WXEGLPOLYGONMODE weglPolygonMode;
+typedef void (APIENTRY * WXEGLPOLYGONOFFSET)(GLfloat,GLfloat);
+WXE_EXTERN WXEGLPOLYGONOFFSET weglPolygonOffset;
+typedef void (APIENTRY * WXEGLPOLYGONSTIPPLE)(const GLubyte *);
+WXE_EXTERN WXEGLPOLYGONSTIPPLE weglPolygonStipple;
+typedef void (APIENTRY * WXEGLGETPOLYGONSTIPPLE)(GLubyte *);
+WXE_EXTERN WXEGLGETPOLYGONSTIPPLE weglGetPolygonStipple;
typedef void (APIENTRY * WXEGLEDGEFLAGV)(const GLboolean *);
WXE_EXTERN WXEGLEDGEFLAGV weglEdgeFlagv;
-typedef void (APIENTRY * WXEGLEDGEFLAGPOINTER)(GLsizei,const GLvoid *);
-WXE_EXTERN WXEGLEDGEFLAGPOINTER weglEdgeFlagPointer;
+typedef void (APIENTRY * WXEGLSCISSOR)(GLint,GLint,GLsizei,GLsizei);
+WXE_EXTERN WXEGLSCISSOR weglScissor;
+typedef void (APIENTRY * WXEGLCLIPPLANE)(GLenum,const GLdouble *);
+WXE_EXTERN WXEGLCLIPPLANE weglClipPlane;
+typedef void (APIENTRY * WXEGLGETCLIPPLANE)(GLenum,GLdouble *);
+WXE_EXTERN WXEGLGETCLIPPLANE weglGetClipPlane;
+typedef void (APIENTRY * WXEGLDRAWBUFFER)(GLenum);
+WXE_EXTERN WXEGLDRAWBUFFER weglDrawBuffer;
+typedef void (APIENTRY * WXEGLREADBUFFER)(GLenum);
+WXE_EXTERN WXEGLREADBUFFER weglReadBuffer;
typedef void (APIENTRY * WXEGLENABLE)(GLenum);
WXE_EXTERN WXEGLENABLE weglEnable;
+typedef void (APIENTRY * WXEGLDISABLE)(GLenum);
+WXE_EXTERN WXEGLDISABLE weglDisable;
+typedef GLboolean (APIENTRY * WXEGLISENABLED)(GLenum);
+WXE_EXTERN WXEGLISENABLED weglIsEnabled;
typedef void (APIENTRY * WXEGLENABLECLIENTSTATE)(GLenum);
WXE_EXTERN WXEGLENABLECLIENTSTATE weglEnableClientState;
-typedef void (APIENTRY * WXEGLEND)();
-WXE_EXTERN WXEGLEND weglEnd;
-typedef void (APIENTRY * WXEGLENDLIST)();
-WXE_EXTERN WXEGLENDLIST weglEndList;
-typedef void (APIENTRY * WXEGLEVALCOORD1DV)(const GLdouble *);
-WXE_EXTERN WXEGLEVALCOORD1DV weglEvalCoord1dv;
-typedef void (APIENTRY * WXEGLEVALCOORD1FV)(const GLfloat *);
-WXE_EXTERN WXEGLEVALCOORD1FV weglEvalCoord1fv;
-typedef void (APIENTRY * WXEGLEVALCOORD2DV)(const GLdouble *);
-WXE_EXTERN WXEGLEVALCOORD2DV weglEvalCoord2dv;
-typedef void (APIENTRY * WXEGLEVALCOORD2FV)(const GLfloat *);
-WXE_EXTERN WXEGLEVALCOORD2FV weglEvalCoord2fv;
-typedef void (APIENTRY * WXEGLEVALMESH1)(GLenum,GLint,GLint);
-WXE_EXTERN WXEGLEVALMESH1 weglEvalMesh1;
-typedef void (APIENTRY * WXEGLEVALMESH2)(GLenum,GLint,GLint,GLint,GLint);
-WXE_EXTERN WXEGLEVALMESH2 weglEvalMesh2;
-typedef void (APIENTRY * WXEGLEVALPOINT1)(GLint);
-WXE_EXTERN WXEGLEVALPOINT1 weglEvalPoint1;
-typedef void (APIENTRY * WXEGLEVALPOINT2)(GLint,GLint);
-WXE_EXTERN WXEGLEVALPOINT2 weglEvalPoint2;
-typedef void (APIENTRY * WXEGLFEEDBACKBUFFER)(GLsizei,GLenum,GLfloat *);
-WXE_EXTERN WXEGLFEEDBACKBUFFER weglFeedbackBuffer;
-typedef void (APIENTRY * WXEGLFINISH)();
-WXE_EXTERN WXEGLFINISH weglFinish;
-typedef void (APIENTRY * WXEGLFLUSH)();
-WXE_EXTERN WXEGLFLUSH weglFlush;
-typedef void (APIENTRY * WXEGLFOGF)(GLenum,GLfloat);
-WXE_EXTERN WXEGLFOGF weglFogf;
-typedef void (APIENTRY * WXEGLFOGFV)(GLenum,const GLfloat *);
-WXE_EXTERN WXEGLFOGFV weglFogfv;
-typedef void (APIENTRY * WXEGLFOGI)(GLenum,GLint);
-WXE_EXTERN WXEGLFOGI weglFogi;
-typedef void (APIENTRY * WXEGLFOGIV)(GLenum,const GLint *);
-WXE_EXTERN WXEGLFOGIV weglFogiv;
-typedef void (APIENTRY * WXEGLFRONTFACE)(GLenum);
-WXE_EXTERN WXEGLFRONTFACE weglFrontFace;
-typedef void (APIENTRY * WXEGLFRUSTUM)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble);
-WXE_EXTERN WXEGLFRUSTUM weglFrustum;
-typedef GLuint (APIENTRY * WXEGLGENLISTS)(GLsizei);
-WXE_EXTERN WXEGLGENLISTS weglGenLists;
-typedef void (APIENTRY * WXEGLGENTEXTURES)(GLsizei,GLuint *);
-WXE_EXTERN WXEGLGENTEXTURES weglGenTextures;
+typedef void (APIENTRY * WXEGLDISABLECLIENTSTATE)(GLenum);
+WXE_EXTERN WXEGLDISABLECLIENTSTATE weglDisableClientState;
typedef void (APIENTRY * WXEGLGETBOOLEANV)(GLenum,GLboolean *);
WXE_EXTERN WXEGLGETBOOLEANV weglGetBooleanv;
-typedef void (APIENTRY * WXEGLGETCLIPPLANE)(GLenum,GLdouble *);
-WXE_EXTERN WXEGLGETCLIPPLANE weglGetClipPlane;
typedef void (APIENTRY * WXEGLGETDOUBLEV)(GLenum,GLdouble *);
WXE_EXTERN WXEGLGETDOUBLEV weglGetDoublev;
-typedef GLenum (APIENTRY * WXEGLGETERROR)();
-WXE_EXTERN WXEGLGETERROR weglGetError;
typedef void (APIENTRY * WXEGLGETFLOATV)(GLenum,GLfloat *);
WXE_EXTERN WXEGLGETFLOATV weglGetFloatv;
typedef void (APIENTRY * WXEGLGETINTEGERV)(GLenum,GLint *);
WXE_EXTERN WXEGLGETINTEGERV weglGetIntegerv;
-typedef void (APIENTRY * WXEGLGETLIGHTFV)(GLenum,GLenum,GLfloat *);
-WXE_EXTERN WXEGLGETLIGHTFV weglGetLightfv;
-typedef void (APIENTRY * WXEGLGETLIGHTIV)(GLenum,GLenum,GLint *);
-WXE_EXTERN WXEGLGETLIGHTIV weglGetLightiv;
-typedef void (APIENTRY * WXEGLGETMAPDV)(GLenum,GLenum,GLdouble *);
-WXE_EXTERN WXEGLGETMAPDV weglGetMapdv;
-typedef void (APIENTRY * WXEGLGETMAPFV)(GLenum,GLenum,GLfloat *);
-WXE_EXTERN WXEGLGETMAPFV weglGetMapfv;
-typedef void (APIENTRY * WXEGLGETMAPIV)(GLenum,GLenum,GLint *);
-WXE_EXTERN WXEGLGETMAPIV weglGetMapiv;
-typedef void (APIENTRY * WXEGLGETMATERIALFV)(GLenum,GLenum,GLfloat *);
-WXE_EXTERN WXEGLGETMATERIALFV weglGetMaterialfv;
-typedef void (APIENTRY * WXEGLGETMATERIALIV)(GLenum,GLenum,GLint *);
-WXE_EXTERN WXEGLGETMATERIALIV weglGetMaterialiv;
-typedef void (APIENTRY * WXEGLGETPIXELMAPFV)(GLenum,GLfloat *);
-WXE_EXTERN WXEGLGETPIXELMAPFV weglGetPixelMapfv;
-typedef void (APIENTRY * WXEGLGETPIXELMAPUIV)(GLenum,GLuint *);
-WXE_EXTERN WXEGLGETPIXELMAPUIV weglGetPixelMapuiv;
-typedef void (APIENTRY * WXEGLGETPIXELMAPUSV)(GLenum,GLushort *);
-WXE_EXTERN WXEGLGETPIXELMAPUSV weglGetPixelMapusv;
-typedef void (APIENTRY * WXEGLGETPOLYGONSTIPPLE)(GLubyte *);
-WXE_EXTERN WXEGLGETPOLYGONSTIPPLE weglGetPolygonStipple;
+typedef void (APIENTRY * WXEGLPUSHATTRIB)(GLbitfield);
+WXE_EXTERN WXEGLPUSHATTRIB weglPushAttrib;
+typedef void (APIENTRY * WXEGLPOPATTRIB)();
+WXE_EXTERN WXEGLPOPATTRIB weglPopAttrib;
+typedef void (APIENTRY * WXEGLPUSHCLIENTATTRIB)(GLbitfield);
+WXE_EXTERN WXEGLPUSHCLIENTATTRIB weglPushClientAttrib;
+typedef void (APIENTRY * WXEGLPOPCLIENTATTRIB)();
+WXE_EXTERN WXEGLPOPCLIENTATTRIB weglPopClientAttrib;
+typedef GLint (APIENTRY * WXEGLRENDERMODE)(GLenum);
+WXE_EXTERN WXEGLRENDERMODE weglRenderMode;
+typedef GLenum (APIENTRY * WXEGLGETERROR)();
+WXE_EXTERN WXEGLGETERROR weglGetError;
typedef const GLubyte * (APIENTRY * WXEGLGETSTRING)(GLenum);
WXE_EXTERN WXEGLGETSTRING weglGetString;
-typedef void (APIENTRY * WXEGLGETTEXENVFV)(GLenum,GLenum,GLfloat *);
-WXE_EXTERN WXEGLGETTEXENVFV weglGetTexEnvfv;
-typedef void (APIENTRY * WXEGLGETTEXENVIV)(GLenum,GLenum,GLint *);
-WXE_EXTERN WXEGLGETTEXENVIV weglGetTexEnviv;
-typedef void (APIENTRY * WXEGLGETTEXGENDV)(GLenum,GLenum,GLdouble *);
-WXE_EXTERN WXEGLGETTEXGENDV weglGetTexGendv;
-typedef void (APIENTRY * WXEGLGETTEXGENFV)(GLenum,GLenum,GLfloat *);
-WXE_EXTERN WXEGLGETTEXGENFV weglGetTexGenfv;
-typedef void (APIENTRY * WXEGLGETTEXGENIV)(GLenum,GLenum,GLint *);
-WXE_EXTERN WXEGLGETTEXGENIV weglGetTexGeniv;
-typedef void (APIENTRY * WXEGLGETTEXIMAGE)(GLenum,GLint,GLenum,GLenum,GLvoid *);
-WXE_EXTERN WXEGLGETTEXIMAGE weglGetTexImage;
-typedef void (APIENTRY * WXEGLGETTEXLEVELPARAMETERFV)(GLenum,GLint,GLenum,GLfloat *);
-WXE_EXTERN WXEGLGETTEXLEVELPARAMETERFV weglGetTexLevelParameterfv;
-typedef void (APIENTRY * WXEGLGETTEXLEVELPARAMETERIV)(GLenum,GLint,GLenum,GLint *);
-WXE_EXTERN WXEGLGETTEXLEVELPARAMETERIV weglGetTexLevelParameteriv;
-typedef void (APIENTRY * WXEGLGETTEXPARAMETERFV)(GLenum,GLenum,GLfloat *);
-WXE_EXTERN WXEGLGETTEXPARAMETERFV weglGetTexParameterfv;
-typedef void (APIENTRY * WXEGLGETTEXPARAMETERIV)(GLenum,GLenum,GLint *);
-WXE_EXTERN WXEGLGETTEXPARAMETERIV weglGetTexParameteriv;
+typedef void (APIENTRY * WXEGLFINISH)();
+WXE_EXTERN WXEGLFINISH weglFinish;
+typedef void (APIENTRY * WXEGLFLUSH)();
+WXE_EXTERN WXEGLFLUSH weglFlush;
typedef void (APIENTRY * WXEGLHINT)(GLenum,GLenum);
WXE_EXTERN WXEGLHINT weglHint;
-typedef void (APIENTRY * WXEGLINDEXMASK)(GLuint);
-WXE_EXTERN WXEGLINDEXMASK weglIndexMask;
-typedef void (APIENTRY * WXEGLINDEXPOINTER)(GLenum,GLsizei,const GLvoid *);
-WXE_EXTERN WXEGLINDEXPOINTER weglIndexPointer;
-typedef void (APIENTRY * WXEGLINDEXDV)(const GLdouble *);
-WXE_EXTERN WXEGLINDEXDV weglIndexdv;
-typedef void (APIENTRY * WXEGLINDEXFV)(const GLfloat *);
-WXE_EXTERN WXEGLINDEXFV weglIndexfv;
-typedef void (APIENTRY * WXEGLINDEXIV)(const GLint *);
-WXE_EXTERN WXEGLINDEXIV weglIndexiv;
-typedef void (APIENTRY * WXEGLINDEXSV)(const GLshort *);
-WXE_EXTERN WXEGLINDEXSV weglIndexsv;
-typedef void (APIENTRY * WXEGLINDEXUBV)(const GLubyte *);
-WXE_EXTERN WXEGLINDEXUBV weglIndexubv;
-typedef void (APIENTRY * WXEGLINITNAMES)();
-WXE_EXTERN WXEGLINITNAMES weglInitNames;
-typedef void (APIENTRY * WXEGLINTERLEAVEDARRAYS)(GLenum,GLsizei,const GLvoid *);
-WXE_EXTERN WXEGLINTERLEAVEDARRAYS weglInterleavedArrays;
-typedef GLboolean (APIENTRY * WXEGLISENABLED)(GLenum);
-WXE_EXTERN WXEGLISENABLED weglIsEnabled;
-typedef GLboolean (APIENTRY * WXEGLISLIST)(GLuint);
-WXE_EXTERN WXEGLISLIST weglIsList;
-typedef GLboolean (APIENTRY * WXEGLISTEXTURE)(GLuint);
-WXE_EXTERN WXEGLISTEXTURE weglIsTexture;
-typedef void (APIENTRY * WXEGLLIGHTMODELF)(GLenum,GLfloat);
-WXE_EXTERN WXEGLLIGHTMODELF weglLightModelf;
-typedef void (APIENTRY * WXEGLLIGHTMODELFV)(GLenum,const GLfloat *);
-WXE_EXTERN WXEGLLIGHTMODELFV weglLightModelfv;
-typedef void (APIENTRY * WXEGLLIGHTMODELI)(GLenum,GLint);
-WXE_EXTERN WXEGLLIGHTMODELI weglLightModeli;
-typedef void (APIENTRY * WXEGLLIGHTMODELIV)(GLenum,const GLint *);
-WXE_EXTERN WXEGLLIGHTMODELIV weglLightModeliv;
-typedef void (APIENTRY * WXEGLLIGHTF)(GLenum,GLenum,GLfloat);
-WXE_EXTERN WXEGLLIGHTF weglLightf;
-typedef void (APIENTRY * WXEGLLIGHTFV)(GLenum,GLenum,const GLfloat *);
-WXE_EXTERN WXEGLLIGHTFV weglLightfv;
-typedef void (APIENTRY * WXEGLLIGHTI)(GLenum,GLenum,GLint);
-WXE_EXTERN WXEGLLIGHTI weglLighti;
-typedef void (APIENTRY * WXEGLLIGHTIV)(GLenum,GLenum,const GLint *);
-WXE_EXTERN WXEGLLIGHTIV weglLightiv;
-typedef void (APIENTRY * WXEGLLINESTIPPLE)(GLint,GLushort);
-WXE_EXTERN WXEGLLINESTIPPLE weglLineStipple;
-typedef void (APIENTRY * WXEGLLINEWIDTH)(GLfloat);
-WXE_EXTERN WXEGLLINEWIDTH weglLineWidth;
-typedef void (APIENTRY * WXEGLLISTBASE)(GLuint);
-WXE_EXTERN WXEGLLISTBASE weglListBase;
+typedef void (APIENTRY * WXEGLCLEARDEPTH)(GLclampd);
+WXE_EXTERN WXEGLCLEARDEPTH weglClearDepth;
+typedef void (APIENTRY * WXEGLDEPTHFUNC)(GLenum);
+WXE_EXTERN WXEGLDEPTHFUNC weglDepthFunc;
+typedef void (APIENTRY * WXEGLDEPTHMASK)(GLboolean);
+WXE_EXTERN WXEGLDEPTHMASK weglDepthMask;
+typedef void (APIENTRY * WXEGLDEPTHRANGE)(GLclampd,GLclampd);
+WXE_EXTERN WXEGLDEPTHRANGE weglDepthRange;
+typedef void (APIENTRY * WXEGLCLEARACCUM)(GLfloat,GLfloat,GLfloat,GLfloat);
+WXE_EXTERN WXEGLCLEARACCUM weglClearAccum;
+typedef void (APIENTRY * WXEGLACCUM)(GLenum,GLfloat);
+WXE_EXTERN WXEGLACCUM weglAccum;
+typedef void (APIENTRY * WXEGLMATRIXMODE)(GLenum);
+WXE_EXTERN WXEGLMATRIXMODE weglMatrixMode;
+typedef void (APIENTRY * WXEGLORTHO)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble);
+WXE_EXTERN WXEGLORTHO weglOrtho;
+typedef void (APIENTRY * WXEGLFRUSTUM)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble);
+WXE_EXTERN WXEGLFRUSTUM weglFrustum;
+typedef void (APIENTRY * WXEGLVIEWPORT)(GLint,GLint,GLsizei,GLsizei);
+WXE_EXTERN WXEGLVIEWPORT weglViewport;
+typedef void (APIENTRY * WXEGLPUSHMATRIX)();
+WXE_EXTERN WXEGLPUSHMATRIX weglPushMatrix;
+typedef void (APIENTRY * WXEGLPOPMATRIX)();
+WXE_EXTERN WXEGLPOPMATRIX weglPopMatrix;
typedef void (APIENTRY * WXEGLLOADIDENTITY)();
WXE_EXTERN WXEGLLOADIDENTITY weglLoadIdentity;
typedef void (APIENTRY * WXEGLLOADMATRIXD)(const GLdouble *);
WXE_EXTERN WXEGLLOADMATRIXD weglLoadMatrixd;
typedef void (APIENTRY * WXEGLLOADMATRIXF)(const GLfloat *);
WXE_EXTERN WXEGLLOADMATRIXF weglLoadMatrixf;
-typedef void (APIENTRY * WXEGLLOADNAME)(GLuint);
-WXE_EXTERN WXEGLLOADNAME weglLoadName;
-typedef void (APIENTRY * WXEGLLOGICOP)(GLenum);
-WXE_EXTERN WXEGLLOGICOP weglLogicOp;
-typedef void (APIENTRY * WXEGLMAP1D)(GLenum,GLdouble,GLdouble,GLint,GLint,const GLdouble *);
-WXE_EXTERN WXEGLMAP1D weglMap1d;
-typedef void (APIENTRY * WXEGLMAP1F)(GLenum,GLfloat,GLfloat,GLint,GLint,const GLfloat *);
-WXE_EXTERN WXEGLMAP1F weglMap1f;
-typedef void (APIENTRY * WXEGLMAP2D)(GLenum,GLdouble,GLdouble,GLint,GLint,GLdouble,GLdouble,GLint,GLint,const GLdouble *);
-WXE_EXTERN WXEGLMAP2D weglMap2d;
-typedef void (APIENTRY * WXEGLMAP2F)(GLenum,GLfloat,GLfloat,GLint,GLint,GLfloat,GLfloat,GLint,GLint,const GLfloat *);
-WXE_EXTERN WXEGLMAP2F weglMap2f;
-typedef void (APIENTRY * WXEGLMAPGRID1D)(GLint,GLdouble,GLdouble);
-WXE_EXTERN WXEGLMAPGRID1D weglMapGrid1d;
-typedef void (APIENTRY * WXEGLMAPGRID1F)(GLint,GLfloat,GLfloat);
-WXE_EXTERN WXEGLMAPGRID1F weglMapGrid1f;
-typedef void (APIENTRY * WXEGLMAPGRID2D)(GLint,GLdouble,GLdouble,GLint,GLdouble,GLdouble);
-WXE_EXTERN WXEGLMAPGRID2D weglMapGrid2d;
-typedef void (APIENTRY * WXEGLMAPGRID2F)(GLint,GLfloat,GLfloat,GLint,GLfloat,GLfloat);
-WXE_EXTERN WXEGLMAPGRID2F weglMapGrid2f;
-typedef void (APIENTRY * WXEGLMATERIALF)(GLenum,GLenum,GLfloat);
-WXE_EXTERN WXEGLMATERIALF weglMaterialf;
-typedef void (APIENTRY * WXEGLMATERIALFV)(GLenum,GLenum,const GLfloat *);
-WXE_EXTERN WXEGLMATERIALFV weglMaterialfv;
-typedef void (APIENTRY * WXEGLMATERIALI)(GLenum,GLenum,GLint);
-WXE_EXTERN WXEGLMATERIALI weglMateriali;
-typedef void (APIENTRY * WXEGLMATERIALIV)(GLenum,GLenum,const GLint *);
-WXE_EXTERN WXEGLMATERIALIV weglMaterialiv;
-typedef void (APIENTRY * WXEGLMATRIXMODE)(GLenum);
-WXE_EXTERN WXEGLMATRIXMODE weglMatrixMode;
typedef void (APIENTRY * WXEGLMULTMATRIXD)(const GLdouble *);
WXE_EXTERN WXEGLMULTMATRIXD weglMultMatrixd;
typedef void (APIENTRY * WXEGLMULTMATRIXF)(const GLfloat *);
WXE_EXTERN WXEGLMULTMATRIXF weglMultMatrixf;
+typedef void (APIENTRY * WXEGLROTATED)(GLdouble,GLdouble,GLdouble,GLdouble);
+WXE_EXTERN WXEGLROTATED weglRotated;
+typedef void (APIENTRY * WXEGLROTATEF)(GLfloat,GLfloat,GLfloat,GLfloat);
+WXE_EXTERN WXEGLROTATEF weglRotatef;
+typedef void (APIENTRY * WXEGLSCALED)(GLdouble,GLdouble,GLdouble);
+WXE_EXTERN WXEGLSCALED weglScaled;
+typedef void (APIENTRY * WXEGLSCALEF)(GLfloat,GLfloat,GLfloat);
+WXE_EXTERN WXEGLSCALEF weglScalef;
+typedef void (APIENTRY * WXEGLTRANSLATED)(GLdouble,GLdouble,GLdouble);
+WXE_EXTERN WXEGLTRANSLATED weglTranslated;
+typedef void (APIENTRY * WXEGLTRANSLATEF)(GLfloat,GLfloat,GLfloat);
+WXE_EXTERN WXEGLTRANSLATEF weglTranslatef;
+typedef GLboolean (APIENTRY * WXEGLISLIST)(GLuint);
+WXE_EXTERN WXEGLISLIST weglIsList;
+typedef void (APIENTRY * WXEGLDELETELISTS)(GLuint,GLsizei);
+WXE_EXTERN WXEGLDELETELISTS weglDeleteLists;
+typedef GLuint (APIENTRY * WXEGLGENLISTS)(GLsizei);
+WXE_EXTERN WXEGLGENLISTS weglGenLists;
typedef void (APIENTRY * WXEGLNEWLIST)(GLuint,GLenum);
WXE_EXTERN WXEGLNEWLIST weglNewList;
+typedef void (APIENTRY * WXEGLENDLIST)();
+WXE_EXTERN WXEGLENDLIST weglEndList;
+typedef void (APIENTRY * WXEGLCALLLIST)(GLuint);
+WXE_EXTERN WXEGLCALLLIST weglCallList;
+typedef void (APIENTRY * WXEGLCALLLISTS)(GLsizei,GLenum,const GLuint *);
+WXE_EXTERN WXEGLCALLLISTS weglCallLists;
+typedef void (APIENTRY * WXEGLLISTBASE)(GLuint);
+WXE_EXTERN WXEGLLISTBASE weglListBase;
+typedef void (APIENTRY * WXEGLBEGIN)(GLenum);
+WXE_EXTERN WXEGLBEGIN weglBegin;
+typedef void (APIENTRY * WXEGLEND)();
+WXE_EXTERN WXEGLEND weglEnd;
+typedef void (APIENTRY * WXEGLVERTEX2DV)(const GLdouble *);
+WXE_EXTERN WXEGLVERTEX2DV weglVertex2dv;
+typedef void (APIENTRY * WXEGLVERTEX2FV)(const GLfloat *);
+WXE_EXTERN WXEGLVERTEX2FV weglVertex2fv;
+typedef void (APIENTRY * WXEGLVERTEX2IV)(const GLint *);
+WXE_EXTERN WXEGLVERTEX2IV weglVertex2iv;
+typedef void (APIENTRY * WXEGLVERTEX2SV)(const GLshort *);
+WXE_EXTERN WXEGLVERTEX2SV weglVertex2sv;
+typedef void (APIENTRY * WXEGLVERTEX3DV)(const GLdouble *);
+WXE_EXTERN WXEGLVERTEX3DV weglVertex3dv;
+typedef void (APIENTRY * WXEGLVERTEX3FV)(const GLfloat *);
+WXE_EXTERN WXEGLVERTEX3FV weglVertex3fv;
+typedef void (APIENTRY * WXEGLVERTEX3IV)(const GLint *);
+WXE_EXTERN WXEGLVERTEX3IV weglVertex3iv;
+typedef void (APIENTRY * WXEGLVERTEX3SV)(const GLshort *);
+WXE_EXTERN WXEGLVERTEX3SV weglVertex3sv;
+typedef void (APIENTRY * WXEGLVERTEX4DV)(const GLdouble *);
+WXE_EXTERN WXEGLVERTEX4DV weglVertex4dv;
+typedef void (APIENTRY * WXEGLVERTEX4FV)(const GLfloat *);
+WXE_EXTERN WXEGLVERTEX4FV weglVertex4fv;
+typedef void (APIENTRY * WXEGLVERTEX4IV)(const GLint *);
+WXE_EXTERN WXEGLVERTEX4IV weglVertex4iv;
+typedef void (APIENTRY * WXEGLVERTEX4SV)(const GLshort *);
+WXE_EXTERN WXEGLVERTEX4SV weglVertex4sv;
typedef void (APIENTRY * WXEGLNORMAL3BV)(const GLbyte *);
WXE_EXTERN WXEGLNORMAL3BV weglNormal3bv;
typedef void (APIENTRY * WXEGLNORMAL3DV)(const GLdouble *);
@@ -343,54 +215,80 @@ typedef void (APIENTRY * WXEGLNORMAL3IV)(const GLint *);
WXE_EXTERN WXEGLNORMAL3IV weglNormal3iv;
typedef void (APIENTRY * WXEGLNORMAL3SV)(const GLshort *);
WXE_EXTERN WXEGLNORMAL3SV weglNormal3sv;
-typedef void (APIENTRY * WXEGLNORMALPOINTER)(GLenum,GLsizei,const GLvoid *);
-WXE_EXTERN WXEGLNORMALPOINTER weglNormalPointer;
-typedef void (APIENTRY * WXEGLORTHO)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble);
-WXE_EXTERN WXEGLORTHO weglOrtho;
-typedef void (APIENTRY * WXEGLPASSTHROUGH)(GLfloat);
-WXE_EXTERN WXEGLPASSTHROUGH weglPassThrough;
-typedef void (APIENTRY * WXEGLPIXELMAPFV)(GLenum,GLsizei,const GLfloat *);
-WXE_EXTERN WXEGLPIXELMAPFV weglPixelMapfv;
-typedef void (APIENTRY * WXEGLPIXELMAPUIV)(GLenum,GLsizei,const GLuint *);
-WXE_EXTERN WXEGLPIXELMAPUIV weglPixelMapuiv;
-typedef void (APIENTRY * WXEGLPIXELMAPUSV)(GLenum,GLsizei,const GLushort *);
-WXE_EXTERN WXEGLPIXELMAPUSV weglPixelMapusv;
-typedef void (APIENTRY * WXEGLPIXELSTOREF)(GLenum,GLfloat);
-WXE_EXTERN WXEGLPIXELSTOREF weglPixelStoref;
-typedef void (APIENTRY * WXEGLPIXELSTOREI)(GLenum,GLint);
-WXE_EXTERN WXEGLPIXELSTOREI weglPixelStorei;
-typedef void (APIENTRY * WXEGLPIXELTRANSFERF)(GLenum,GLfloat);
-WXE_EXTERN WXEGLPIXELTRANSFERF weglPixelTransferf;
-typedef void (APIENTRY * WXEGLPIXELTRANSFERI)(GLenum,GLint);
-WXE_EXTERN WXEGLPIXELTRANSFERI weglPixelTransferi;
-typedef void (APIENTRY * WXEGLPIXELZOOM)(GLfloat,GLfloat);
-WXE_EXTERN WXEGLPIXELZOOM weglPixelZoom;
-typedef void (APIENTRY * WXEGLPOINTSIZE)(GLfloat);
-WXE_EXTERN WXEGLPOINTSIZE weglPointSize;
-typedef void (APIENTRY * WXEGLPOLYGONMODE)(GLenum,GLenum);
-WXE_EXTERN WXEGLPOLYGONMODE weglPolygonMode;
-typedef void (APIENTRY * WXEGLPOLYGONOFFSET)(GLfloat,GLfloat);
-WXE_EXTERN WXEGLPOLYGONOFFSET weglPolygonOffset;
-typedef void (APIENTRY * WXEGLPOLYGONSTIPPLE)(const GLubyte *);
-WXE_EXTERN WXEGLPOLYGONSTIPPLE weglPolygonStipple;
-typedef void (APIENTRY * WXEGLPOPATTRIB)();
-WXE_EXTERN WXEGLPOPATTRIB weglPopAttrib;
-typedef void (APIENTRY * WXEGLPOPCLIENTATTRIB)();
-WXE_EXTERN WXEGLPOPCLIENTATTRIB weglPopClientAttrib;
-typedef void (APIENTRY * WXEGLPOPMATRIX)();
-WXE_EXTERN WXEGLPOPMATRIX weglPopMatrix;
-typedef void (APIENTRY * WXEGLPOPNAME)();
-WXE_EXTERN WXEGLPOPNAME weglPopName;
-typedef void (APIENTRY * WXEGLPRIORITIZETEXTURES)(GLsizei,const GLuint *,const GLclampf *);
-WXE_EXTERN WXEGLPRIORITIZETEXTURES weglPrioritizeTextures;
-typedef void (APIENTRY * WXEGLPUSHATTRIB)(GLbitfield);
-WXE_EXTERN WXEGLPUSHATTRIB weglPushAttrib;
-typedef void (APIENTRY * WXEGLPUSHCLIENTATTRIB)(GLbitfield);
-WXE_EXTERN WXEGLPUSHCLIENTATTRIB weglPushClientAttrib;
-typedef void (APIENTRY * WXEGLPUSHMATRIX)();
-WXE_EXTERN WXEGLPUSHMATRIX weglPushMatrix;
-typedef void (APIENTRY * WXEGLPUSHNAME)(GLuint);
-WXE_EXTERN WXEGLPUSHNAME weglPushName;
+typedef void (APIENTRY * WXEGLINDEXDV)(const GLdouble *);
+WXE_EXTERN WXEGLINDEXDV weglIndexdv;
+typedef void (APIENTRY * WXEGLINDEXFV)(const GLfloat *);
+WXE_EXTERN WXEGLINDEXFV weglIndexfv;
+typedef void (APIENTRY * WXEGLINDEXIV)(const GLint *);
+WXE_EXTERN WXEGLINDEXIV weglIndexiv;
+typedef void (APIENTRY * WXEGLINDEXSV)(const GLshort *);
+WXE_EXTERN WXEGLINDEXSV weglIndexsv;
+typedef void (APIENTRY * WXEGLINDEXUBV)(const GLubyte *);
+WXE_EXTERN WXEGLINDEXUBV weglIndexubv;
+typedef void (APIENTRY * WXEGLCOLOR3BV)(const GLbyte *);
+WXE_EXTERN WXEGLCOLOR3BV weglColor3bv;
+typedef void (APIENTRY * WXEGLCOLOR3DV)(const GLdouble *);
+WXE_EXTERN WXEGLCOLOR3DV weglColor3dv;
+typedef void (APIENTRY * WXEGLCOLOR3FV)(const GLfloat *);
+WXE_EXTERN WXEGLCOLOR3FV weglColor3fv;
+typedef void (APIENTRY * WXEGLCOLOR3IV)(const GLint *);
+WXE_EXTERN WXEGLCOLOR3IV weglColor3iv;
+typedef void (APIENTRY * WXEGLCOLOR3SV)(const GLshort *);
+WXE_EXTERN WXEGLCOLOR3SV weglColor3sv;
+typedef void (APIENTRY * WXEGLCOLOR3UBV)(const GLubyte *);
+WXE_EXTERN WXEGLCOLOR3UBV weglColor3ubv;
+typedef void (APIENTRY * WXEGLCOLOR3UIV)(const GLuint *);
+WXE_EXTERN WXEGLCOLOR3UIV weglColor3uiv;
+typedef void (APIENTRY * WXEGLCOLOR3USV)(const GLushort *);
+WXE_EXTERN WXEGLCOLOR3USV weglColor3usv;
+typedef void (APIENTRY * WXEGLCOLOR4BV)(const GLbyte *);
+WXE_EXTERN WXEGLCOLOR4BV weglColor4bv;
+typedef void (APIENTRY * WXEGLCOLOR4DV)(const GLdouble *);
+WXE_EXTERN WXEGLCOLOR4DV weglColor4dv;
+typedef void (APIENTRY * WXEGLCOLOR4FV)(const GLfloat *);
+WXE_EXTERN WXEGLCOLOR4FV weglColor4fv;
+typedef void (APIENTRY * WXEGLCOLOR4IV)(const GLint *);
+WXE_EXTERN WXEGLCOLOR4IV weglColor4iv;
+typedef void (APIENTRY * WXEGLCOLOR4SV)(const GLshort *);
+WXE_EXTERN WXEGLCOLOR4SV weglColor4sv;
+typedef void (APIENTRY * WXEGLCOLOR4UBV)(const GLubyte *);
+WXE_EXTERN WXEGLCOLOR4UBV weglColor4ubv;
+typedef void (APIENTRY * WXEGLCOLOR4UIV)(const GLuint *);
+WXE_EXTERN WXEGLCOLOR4UIV weglColor4uiv;
+typedef void (APIENTRY * WXEGLCOLOR4USV)(const GLushort *);
+WXE_EXTERN WXEGLCOLOR4USV weglColor4usv;
+typedef void (APIENTRY * WXEGLTEXCOORD1DV)(const GLdouble *);
+WXE_EXTERN WXEGLTEXCOORD1DV weglTexCoord1dv;
+typedef void (APIENTRY * WXEGLTEXCOORD1FV)(const GLfloat *);
+WXE_EXTERN WXEGLTEXCOORD1FV weglTexCoord1fv;
+typedef void (APIENTRY * WXEGLTEXCOORD1IV)(const GLint *);
+WXE_EXTERN WXEGLTEXCOORD1IV weglTexCoord1iv;
+typedef void (APIENTRY * WXEGLTEXCOORD1SV)(const GLshort *);
+WXE_EXTERN WXEGLTEXCOORD1SV weglTexCoord1sv;
+typedef void (APIENTRY * WXEGLTEXCOORD2DV)(const GLdouble *);
+WXE_EXTERN WXEGLTEXCOORD2DV weglTexCoord2dv;
+typedef void (APIENTRY * WXEGLTEXCOORD2FV)(const GLfloat *);
+WXE_EXTERN WXEGLTEXCOORD2FV weglTexCoord2fv;
+typedef void (APIENTRY * WXEGLTEXCOORD2IV)(const GLint *);
+WXE_EXTERN WXEGLTEXCOORD2IV weglTexCoord2iv;
+typedef void (APIENTRY * WXEGLTEXCOORD2SV)(const GLshort *);
+WXE_EXTERN WXEGLTEXCOORD2SV weglTexCoord2sv;
+typedef void (APIENTRY * WXEGLTEXCOORD3DV)(const GLdouble *);
+WXE_EXTERN WXEGLTEXCOORD3DV weglTexCoord3dv;
+typedef void (APIENTRY * WXEGLTEXCOORD3FV)(const GLfloat *);
+WXE_EXTERN WXEGLTEXCOORD3FV weglTexCoord3fv;
+typedef void (APIENTRY * WXEGLTEXCOORD3IV)(const GLint *);
+WXE_EXTERN WXEGLTEXCOORD3IV weglTexCoord3iv;
+typedef void (APIENTRY * WXEGLTEXCOORD3SV)(const GLshort *);
+WXE_EXTERN WXEGLTEXCOORD3SV weglTexCoord3sv;
+typedef void (APIENTRY * WXEGLTEXCOORD4DV)(const GLdouble *);
+WXE_EXTERN WXEGLTEXCOORD4DV weglTexCoord4dv;
+typedef void (APIENTRY * WXEGLTEXCOORD4FV)(const GLfloat *);
+WXE_EXTERN WXEGLTEXCOORD4FV weglTexCoord4fv;
+typedef void (APIENTRY * WXEGLTEXCOORD4IV)(const GLint *);
+WXE_EXTERN WXEGLTEXCOORD4IV weglTexCoord4iv;
+typedef void (APIENTRY * WXEGLTEXCOORD4SV)(const GLshort *);
+WXE_EXTERN WXEGLTEXCOORD4SV weglTexCoord4sv;
typedef void (APIENTRY * WXEGLRASTERPOS2DV)(const GLdouble *);
WXE_EXTERN WXEGLRASTERPOS2DV weglRasterPos2dv;
typedef void (APIENTRY * WXEGLRASTERPOS2FV)(const GLfloat *);
@@ -415,150 +313,252 @@ typedef void (APIENTRY * WXEGLRASTERPOS4IV)(const GLint *);
WXE_EXTERN WXEGLRASTERPOS4IV weglRasterPos4iv;
typedef void (APIENTRY * WXEGLRASTERPOS4SV)(const GLshort *);
WXE_EXTERN WXEGLRASTERPOS4SV weglRasterPos4sv;
-typedef void (APIENTRY * WXEGLREADBUFFER)(GLenum);
-WXE_EXTERN WXEGLREADBUFFER weglReadBuffer;
-typedef void (APIENTRY * WXEGLREADPIXELS)(GLint,GLint,GLsizei,GLsizei,GLenum,GLenum,GLvoid *);
-WXE_EXTERN WXEGLREADPIXELS weglReadPixels;
typedef void (APIENTRY * WXEGLRECTD)(GLdouble,GLdouble,GLdouble,GLdouble);
WXE_EXTERN WXEGLRECTD weglRectd;
-typedef void (APIENTRY * WXEGLRECTDV)(const GLdouble *,const GLdouble *);
-WXE_EXTERN WXEGLRECTDV weglRectdv;
typedef void (APIENTRY * WXEGLRECTF)(GLfloat,GLfloat,GLfloat,GLfloat);
WXE_EXTERN WXEGLRECTF weglRectf;
-typedef void (APIENTRY * WXEGLRECTFV)(const GLfloat *,const GLfloat *);
-WXE_EXTERN WXEGLRECTFV weglRectfv;
typedef void (APIENTRY * WXEGLRECTI)(GLint,GLint,GLint,GLint);
WXE_EXTERN WXEGLRECTI weglRecti;
-typedef void (APIENTRY * WXEGLRECTIV)(const GLint *,const GLint *);
-WXE_EXTERN WXEGLRECTIV weglRectiv;
typedef void (APIENTRY * WXEGLRECTS)(GLshort,GLshort,GLshort,GLshort);
WXE_EXTERN WXEGLRECTS weglRects;
+typedef void (APIENTRY * WXEGLRECTDV)(const GLdouble *,const GLdouble *);
+WXE_EXTERN WXEGLRECTDV weglRectdv;
+typedef void (APIENTRY * WXEGLRECTFV)(const GLfloat *,const GLfloat *);
+WXE_EXTERN WXEGLRECTFV weglRectfv;
+typedef void (APIENTRY * WXEGLRECTIV)(const GLint *,const GLint *);
+WXE_EXTERN WXEGLRECTIV weglRectiv;
typedef void (APIENTRY * WXEGLRECTSV)(const GLshort *,const GLshort *);
WXE_EXTERN WXEGLRECTSV weglRectsv;
-typedef GLint (APIENTRY * WXEGLRENDERMODE)(GLenum);
-WXE_EXTERN WXEGLRENDERMODE weglRenderMode;
-typedef void (APIENTRY * WXEGLROTATED)(GLdouble,GLdouble,GLdouble,GLdouble);
-WXE_EXTERN WXEGLROTATED weglRotated;
-typedef void (APIENTRY * WXEGLROTATEF)(GLfloat,GLfloat,GLfloat,GLfloat);
-WXE_EXTERN WXEGLROTATEF weglRotatef;
-typedef void (APIENTRY * WXEGLSCALED)(GLdouble,GLdouble,GLdouble);
-WXE_EXTERN WXEGLSCALED weglScaled;
-typedef void (APIENTRY * WXEGLSCALEF)(GLfloat,GLfloat,GLfloat);
-WXE_EXTERN WXEGLSCALEF weglScalef;
-typedef void (APIENTRY * WXEGLSCISSOR)(GLint,GLint,GLsizei,GLsizei);
-WXE_EXTERN WXEGLSCISSOR weglScissor;
-typedef void (APIENTRY * WXEGLSELECTBUFFER)(GLsizei,GLuint *);
-WXE_EXTERN WXEGLSELECTBUFFER weglSelectBuffer;
+typedef void (APIENTRY * WXEGLVERTEXPOINTER)(GLint,GLenum,GLsizei,const GLvoid *);
+WXE_EXTERN WXEGLVERTEXPOINTER weglVertexPointer;
+typedef void (APIENTRY * WXEGLNORMALPOINTER)(GLenum,GLsizei,const GLvoid *);
+WXE_EXTERN WXEGLNORMALPOINTER weglNormalPointer;
+typedef void (APIENTRY * WXEGLCOLORPOINTER)(GLint,GLenum,GLsizei,const GLvoid *);
+WXE_EXTERN WXEGLCOLORPOINTER weglColorPointer;
+typedef void (APIENTRY * WXEGLINDEXPOINTER)(GLenum,GLsizei,const GLvoid *);
+WXE_EXTERN WXEGLINDEXPOINTER weglIndexPointer;
+typedef void (APIENTRY * WXEGLTEXCOORDPOINTER)(GLint,GLenum,GLsizei,const GLvoid *);
+WXE_EXTERN WXEGLTEXCOORDPOINTER weglTexCoordPointer;
+typedef void (APIENTRY * WXEGLEDGEFLAGPOINTER)(GLsizei,const GLvoid *);
+WXE_EXTERN WXEGLEDGEFLAGPOINTER weglEdgeFlagPointer;
+typedef void (APIENTRY * WXEGLARRAYELEMENT)(GLint);
+WXE_EXTERN WXEGLARRAYELEMENT weglArrayElement;
+typedef void (APIENTRY * WXEGLDRAWARRAYS)(GLenum,GLint,GLsizei);
+WXE_EXTERN WXEGLDRAWARRAYS weglDrawArrays;
+typedef void (APIENTRY * WXEGLDRAWELEMENTS)(GLenum,GLsizei,GLenum,const GLvoid *);
+WXE_EXTERN WXEGLDRAWELEMENTS weglDrawElements;
+typedef void (APIENTRY * WXEGLINTERLEAVEDARRAYS)(GLenum,GLsizei,const GLvoid *);
+WXE_EXTERN WXEGLINTERLEAVEDARRAYS weglInterleavedArrays;
typedef void (APIENTRY * WXEGLSHADEMODEL)(GLenum);
WXE_EXTERN WXEGLSHADEMODEL weglShadeModel;
+typedef void (APIENTRY * WXEGLLIGHTF)(GLenum,GLenum,GLfloat);
+WXE_EXTERN WXEGLLIGHTF weglLightf;
+typedef void (APIENTRY * WXEGLLIGHTI)(GLenum,GLenum,GLint);
+WXE_EXTERN WXEGLLIGHTI weglLighti;
+typedef void (APIENTRY * WXEGLLIGHTFV)(GLenum,GLenum,const GLfloat *);
+WXE_EXTERN WXEGLLIGHTFV weglLightfv;
+typedef void (APIENTRY * WXEGLLIGHTIV)(GLenum,GLenum,const GLint *);
+WXE_EXTERN WXEGLLIGHTIV weglLightiv;
+typedef void (APIENTRY * WXEGLGETLIGHTFV)(GLenum,GLenum,GLfloat *);
+WXE_EXTERN WXEGLGETLIGHTFV weglGetLightfv;
+typedef void (APIENTRY * WXEGLGETLIGHTIV)(GLenum,GLenum,GLint *);
+WXE_EXTERN WXEGLGETLIGHTIV weglGetLightiv;
+typedef void (APIENTRY * WXEGLLIGHTMODELF)(GLenum,GLfloat);
+WXE_EXTERN WXEGLLIGHTMODELF weglLightModelf;
+typedef void (APIENTRY * WXEGLLIGHTMODELI)(GLenum,GLint);
+WXE_EXTERN WXEGLLIGHTMODELI weglLightModeli;
+typedef void (APIENTRY * WXEGLLIGHTMODELFV)(GLenum,const GLfloat *);
+WXE_EXTERN WXEGLLIGHTMODELFV weglLightModelfv;
+typedef void (APIENTRY * WXEGLLIGHTMODELIV)(GLenum,const GLint *);
+WXE_EXTERN WXEGLLIGHTMODELIV weglLightModeliv;
+typedef void (APIENTRY * WXEGLMATERIALF)(GLenum,GLenum,GLfloat);
+WXE_EXTERN WXEGLMATERIALF weglMaterialf;
+typedef void (APIENTRY * WXEGLMATERIALI)(GLenum,GLenum,GLint);
+WXE_EXTERN WXEGLMATERIALI weglMateriali;
+typedef void (APIENTRY * WXEGLMATERIALFV)(GLenum,GLenum,const GLfloat *);
+WXE_EXTERN WXEGLMATERIALFV weglMaterialfv;
+typedef void (APIENTRY * WXEGLMATERIALIV)(GLenum,GLenum,const GLint *);
+WXE_EXTERN WXEGLMATERIALIV weglMaterialiv;
+typedef void (APIENTRY * WXEGLGETMATERIALFV)(GLenum,GLenum,GLfloat *);
+WXE_EXTERN WXEGLGETMATERIALFV weglGetMaterialfv;
+typedef void (APIENTRY * WXEGLGETMATERIALIV)(GLenum,GLenum,GLint *);
+WXE_EXTERN WXEGLGETMATERIALIV weglGetMaterialiv;
+typedef void (APIENTRY * WXEGLCOLORMATERIAL)(GLenum,GLenum);
+WXE_EXTERN WXEGLCOLORMATERIAL weglColorMaterial;
+typedef void (APIENTRY * WXEGLPIXELZOOM)(GLfloat,GLfloat);
+WXE_EXTERN WXEGLPIXELZOOM weglPixelZoom;
+typedef void (APIENTRY * WXEGLPIXELSTOREF)(GLenum,GLfloat);
+WXE_EXTERN WXEGLPIXELSTOREF weglPixelStoref;
+typedef void (APIENTRY * WXEGLPIXELSTOREI)(GLenum,GLint);
+WXE_EXTERN WXEGLPIXELSTOREI weglPixelStorei;
+typedef void (APIENTRY * WXEGLPIXELTRANSFERF)(GLenum,GLfloat);
+WXE_EXTERN WXEGLPIXELTRANSFERF weglPixelTransferf;
+typedef void (APIENTRY * WXEGLPIXELTRANSFERI)(GLenum,GLint);
+WXE_EXTERN WXEGLPIXELTRANSFERI weglPixelTransferi;
+typedef void (APIENTRY * WXEGLPIXELMAPFV)(GLenum,GLsizei,const GLfloat *);
+WXE_EXTERN WXEGLPIXELMAPFV weglPixelMapfv;
+typedef void (APIENTRY * WXEGLPIXELMAPUIV)(GLenum,GLsizei,const GLuint *);
+WXE_EXTERN WXEGLPIXELMAPUIV weglPixelMapuiv;
+typedef void (APIENTRY * WXEGLPIXELMAPUSV)(GLenum,GLsizei,const GLushort *);
+WXE_EXTERN WXEGLPIXELMAPUSV weglPixelMapusv;
+typedef void (APIENTRY * WXEGLGETPIXELMAPFV)(GLenum,GLfloat *);
+WXE_EXTERN WXEGLGETPIXELMAPFV weglGetPixelMapfv;
+typedef void (APIENTRY * WXEGLGETPIXELMAPUIV)(GLenum,GLuint *);
+WXE_EXTERN WXEGLGETPIXELMAPUIV weglGetPixelMapuiv;
+typedef void (APIENTRY * WXEGLGETPIXELMAPUSV)(GLenum,GLushort *);
+WXE_EXTERN WXEGLGETPIXELMAPUSV weglGetPixelMapusv;
+typedef void (APIENTRY * WXEGLBITMAP)(GLsizei,GLsizei,GLfloat,GLfloat,GLfloat,GLfloat,const GLubyte *);
+WXE_EXTERN WXEGLBITMAP weglBitmap;
+typedef void (APIENTRY * WXEGLREADPIXELS)(GLint,GLint,GLsizei,GLsizei,GLenum,GLenum,GLvoid *);
+WXE_EXTERN WXEGLREADPIXELS weglReadPixels;
+typedef void (APIENTRY * WXEGLDRAWPIXELS)(GLsizei,GLsizei,GLenum,GLenum,const GLvoid *);
+WXE_EXTERN WXEGLDRAWPIXELS weglDrawPixels;
+typedef void (APIENTRY * WXEGLCOPYPIXELS)(GLint,GLint,GLsizei,GLsizei,GLenum);
+WXE_EXTERN WXEGLCOPYPIXELS weglCopyPixels;
typedef void (APIENTRY * WXEGLSTENCILFUNC)(GLenum,GLint,GLuint);
WXE_EXTERN WXEGLSTENCILFUNC weglStencilFunc;
typedef void (APIENTRY * WXEGLSTENCILMASK)(GLuint);
WXE_EXTERN WXEGLSTENCILMASK weglStencilMask;
typedef void (APIENTRY * WXEGLSTENCILOP)(GLenum,GLenum,GLenum);
WXE_EXTERN WXEGLSTENCILOP weglStencilOp;
-typedef void (APIENTRY * WXEGLTEXCOORD1DV)(const GLdouble *);
-WXE_EXTERN WXEGLTEXCOORD1DV weglTexCoord1dv;
-typedef void (APIENTRY * WXEGLTEXCOORD1FV)(const GLfloat *);
-WXE_EXTERN WXEGLTEXCOORD1FV weglTexCoord1fv;
-typedef void (APIENTRY * WXEGLTEXCOORD1IV)(const GLint *);
-WXE_EXTERN WXEGLTEXCOORD1IV weglTexCoord1iv;
-typedef void (APIENTRY * WXEGLTEXCOORD1SV)(const GLshort *);
-WXE_EXTERN WXEGLTEXCOORD1SV weglTexCoord1sv;
-typedef void (APIENTRY * WXEGLTEXCOORD2DV)(const GLdouble *);
-WXE_EXTERN WXEGLTEXCOORD2DV weglTexCoord2dv;
-typedef void (APIENTRY * WXEGLTEXCOORD2FV)(const GLfloat *);
-WXE_EXTERN WXEGLTEXCOORD2FV weglTexCoord2fv;
-typedef void (APIENTRY * WXEGLTEXCOORD2IV)(const GLint *);
-WXE_EXTERN WXEGLTEXCOORD2IV weglTexCoord2iv;
-typedef void (APIENTRY * WXEGLTEXCOORD2SV)(const GLshort *);
-WXE_EXTERN WXEGLTEXCOORD2SV weglTexCoord2sv;
-typedef void (APIENTRY * WXEGLTEXCOORD3DV)(const GLdouble *);
-WXE_EXTERN WXEGLTEXCOORD3DV weglTexCoord3dv;
-typedef void (APIENTRY * WXEGLTEXCOORD3FV)(const GLfloat *);
-WXE_EXTERN WXEGLTEXCOORD3FV weglTexCoord3fv;
-typedef void (APIENTRY * WXEGLTEXCOORD3IV)(const GLint *);
-WXE_EXTERN WXEGLTEXCOORD3IV weglTexCoord3iv;
-typedef void (APIENTRY * WXEGLTEXCOORD3SV)(const GLshort *);
-WXE_EXTERN WXEGLTEXCOORD3SV weglTexCoord3sv;
-typedef void (APIENTRY * WXEGLTEXCOORD4DV)(const GLdouble *);
-WXE_EXTERN WXEGLTEXCOORD4DV weglTexCoord4dv;
-typedef void (APIENTRY * WXEGLTEXCOORD4FV)(const GLfloat *);
-WXE_EXTERN WXEGLTEXCOORD4FV weglTexCoord4fv;
-typedef void (APIENTRY * WXEGLTEXCOORD4IV)(const GLint *);
-WXE_EXTERN WXEGLTEXCOORD4IV weglTexCoord4iv;
-typedef void (APIENTRY * WXEGLTEXCOORD4SV)(const GLshort *);
-WXE_EXTERN WXEGLTEXCOORD4SV weglTexCoord4sv;
-typedef void (APIENTRY * WXEGLTEXCOORDPOINTER)(GLint,GLenum,GLsizei,const GLvoid *);
-WXE_EXTERN WXEGLTEXCOORDPOINTER weglTexCoordPointer;
-typedef void (APIENTRY * WXEGLTEXENVF)(GLenum,GLenum,GLfloat);
-WXE_EXTERN WXEGLTEXENVF weglTexEnvf;
-typedef void (APIENTRY * WXEGLTEXENVFV)(GLenum,GLenum,const GLfloat *);
-WXE_EXTERN WXEGLTEXENVFV weglTexEnvfv;
-typedef void (APIENTRY * WXEGLTEXENVI)(GLenum,GLenum,GLint);
-WXE_EXTERN WXEGLTEXENVI weglTexEnvi;
-typedef void (APIENTRY * WXEGLTEXENVIV)(GLenum,GLenum,const GLint *);
-WXE_EXTERN WXEGLTEXENVIV weglTexEnviv;
+typedef void (APIENTRY * WXEGLCLEARSTENCIL)(GLint);
+WXE_EXTERN WXEGLCLEARSTENCIL weglClearStencil;
typedef void (APIENTRY * WXEGLTEXGEND)(GLenum,GLenum,GLdouble);
WXE_EXTERN WXEGLTEXGEND weglTexGend;
-typedef void (APIENTRY * WXEGLTEXGENDV)(GLenum,GLenum,const GLdouble *);
-WXE_EXTERN WXEGLTEXGENDV weglTexGendv;
typedef void (APIENTRY * WXEGLTEXGENF)(GLenum,GLenum,GLfloat);
WXE_EXTERN WXEGLTEXGENF weglTexGenf;
-typedef void (APIENTRY * WXEGLTEXGENFV)(GLenum,GLenum,const GLfloat *);
-WXE_EXTERN WXEGLTEXGENFV weglTexGenfv;
typedef void (APIENTRY * WXEGLTEXGENI)(GLenum,GLenum,GLint);
WXE_EXTERN WXEGLTEXGENI weglTexGeni;
+typedef void (APIENTRY * WXEGLTEXGENDV)(GLenum,GLenum,const GLdouble *);
+WXE_EXTERN WXEGLTEXGENDV weglTexGendv;
+typedef void (APIENTRY * WXEGLTEXGENFV)(GLenum,GLenum,const GLfloat *);
+WXE_EXTERN WXEGLTEXGENFV weglTexGenfv;
typedef void (APIENTRY * WXEGLTEXGENIV)(GLenum,GLenum,const GLint *);
WXE_EXTERN WXEGLTEXGENIV weglTexGeniv;
-typedef void (APIENTRY * WXEGLTEXIMAGE1D)(GLenum,GLint,GLint,GLsizei,GLint,GLenum,GLenum,const GLvoid *);
-WXE_EXTERN WXEGLTEXIMAGE1D weglTexImage1D;
-typedef void (APIENTRY * WXEGLTEXIMAGE2D)(GLenum,GLint,GLint,GLsizei,GLsizei,GLint,GLenum,GLenum,const GLvoid *);
-WXE_EXTERN WXEGLTEXIMAGE2D weglTexImage2D;
+typedef void (APIENTRY * WXEGLGETTEXGENDV)(GLenum,GLenum,GLdouble *);
+WXE_EXTERN WXEGLGETTEXGENDV weglGetTexGendv;
+typedef void (APIENTRY * WXEGLGETTEXGENFV)(GLenum,GLenum,GLfloat *);
+WXE_EXTERN WXEGLGETTEXGENFV weglGetTexGenfv;
+typedef void (APIENTRY * WXEGLGETTEXGENIV)(GLenum,GLenum,GLint *);
+WXE_EXTERN WXEGLGETTEXGENIV weglGetTexGeniv;
+typedef void (APIENTRY * WXEGLTEXENVF)(GLenum,GLenum,GLfloat);
+WXE_EXTERN WXEGLTEXENVF weglTexEnvf;
+typedef void (APIENTRY * WXEGLTEXENVI)(GLenum,GLenum,GLint);
+WXE_EXTERN WXEGLTEXENVI weglTexEnvi;
+typedef void (APIENTRY * WXEGLTEXENVFV)(GLenum,GLenum,const GLfloat *);
+WXE_EXTERN WXEGLTEXENVFV weglTexEnvfv;
+typedef void (APIENTRY * WXEGLTEXENVIV)(GLenum,GLenum,const GLint *);
+WXE_EXTERN WXEGLTEXENVIV weglTexEnviv;
+typedef void (APIENTRY * WXEGLGETTEXENVFV)(GLenum,GLenum,GLfloat *);
+WXE_EXTERN WXEGLGETTEXENVFV weglGetTexEnvfv;
+typedef void (APIENTRY * WXEGLGETTEXENVIV)(GLenum,GLenum,GLint *);
+WXE_EXTERN WXEGLGETTEXENVIV weglGetTexEnviv;
typedef void (APIENTRY * WXEGLTEXPARAMETERF)(GLenum,GLenum,GLfloat);
WXE_EXTERN WXEGLTEXPARAMETERF weglTexParameterf;
-typedef void (APIENTRY * WXEGLTEXPARAMETERFV)(GLenum,GLenum,const GLfloat *);
-WXE_EXTERN WXEGLTEXPARAMETERFV weglTexParameterfv;
typedef void (APIENTRY * WXEGLTEXPARAMETERI)(GLenum,GLenum,GLint);
WXE_EXTERN WXEGLTEXPARAMETERI weglTexParameteri;
+typedef void (APIENTRY * WXEGLTEXPARAMETERFV)(GLenum,GLenum,const GLfloat *);
+WXE_EXTERN WXEGLTEXPARAMETERFV weglTexParameterfv;
typedef void (APIENTRY * WXEGLTEXPARAMETERIV)(GLenum,GLenum,const GLint *);
WXE_EXTERN WXEGLTEXPARAMETERIV weglTexParameteriv;
+typedef void (APIENTRY * WXEGLGETTEXPARAMETERFV)(GLenum,GLenum,GLfloat *);
+WXE_EXTERN WXEGLGETTEXPARAMETERFV weglGetTexParameterfv;
+typedef void (APIENTRY * WXEGLGETTEXPARAMETERIV)(GLenum,GLenum,GLint *);
+WXE_EXTERN WXEGLGETTEXPARAMETERIV weglGetTexParameteriv;
+typedef void (APIENTRY * WXEGLGETTEXLEVELPARAMETERFV)(GLenum,GLint,GLenum,GLfloat *);
+WXE_EXTERN WXEGLGETTEXLEVELPARAMETERFV weglGetTexLevelParameterfv;
+typedef void (APIENTRY * WXEGLGETTEXLEVELPARAMETERIV)(GLenum,GLint,GLenum,GLint *);
+WXE_EXTERN WXEGLGETTEXLEVELPARAMETERIV weglGetTexLevelParameteriv;
+typedef void (APIENTRY * WXEGLTEXIMAGE1D)(GLenum,GLint,GLint,GLsizei,GLint,GLenum,GLenum,const GLvoid *);
+WXE_EXTERN WXEGLTEXIMAGE1D weglTexImage1D;
+typedef void (APIENTRY * WXEGLTEXIMAGE2D)(GLenum,GLint,GLint,GLsizei,GLsizei,GLint,GLenum,GLenum,const GLvoid *);
+WXE_EXTERN WXEGLTEXIMAGE2D weglTexImage2D;
+typedef void (APIENTRY * WXEGLGETTEXIMAGE)(GLenum,GLint,GLenum,GLenum,GLvoid *);
+WXE_EXTERN WXEGLGETTEXIMAGE weglGetTexImage;
+typedef void (APIENTRY * WXEGLGENTEXTURES)(GLsizei,GLuint *);
+WXE_EXTERN WXEGLGENTEXTURES weglGenTextures;
+typedef void (APIENTRY * WXEGLDELETETEXTURES)(GLsizei,const GLuint *);
+WXE_EXTERN WXEGLDELETETEXTURES weglDeleteTextures;
+typedef void (APIENTRY * WXEGLBINDTEXTURE)(GLenum,GLuint);
+WXE_EXTERN WXEGLBINDTEXTURE weglBindTexture;
+typedef void (APIENTRY * WXEGLPRIORITIZETEXTURES)(GLsizei,const GLuint *,const GLclampf *);
+WXE_EXTERN WXEGLPRIORITIZETEXTURES weglPrioritizeTextures;
+typedef GLboolean (APIENTRY * WXEGLARETEXTURESRESIDENT)(GLsizei,const GLuint *,GLboolean *);
+WXE_EXTERN WXEGLARETEXTURESRESIDENT weglAreTexturesResident;
+typedef GLboolean (APIENTRY * WXEGLISTEXTURE)(GLuint);
+WXE_EXTERN WXEGLISTEXTURE weglIsTexture;
typedef void (APIENTRY * WXEGLTEXSUBIMAGE1D)(GLenum,GLint,GLint,GLsizei,GLenum,GLenum,const GLvoid *);
WXE_EXTERN WXEGLTEXSUBIMAGE1D weglTexSubImage1D;
typedef void (APIENTRY * WXEGLTEXSUBIMAGE2D)(GLenum,GLint,GLint,GLint,GLsizei,GLsizei,GLenum,GLenum,const GLvoid *);
WXE_EXTERN WXEGLTEXSUBIMAGE2D weglTexSubImage2D;
-typedef void (APIENTRY * WXEGLTRANSLATED)(GLdouble,GLdouble,GLdouble);
-WXE_EXTERN WXEGLTRANSLATED weglTranslated;
-typedef void (APIENTRY * WXEGLTRANSLATEF)(GLfloat,GLfloat,GLfloat);
-WXE_EXTERN WXEGLTRANSLATEF weglTranslatef;
-typedef void (APIENTRY * WXEGLVERTEX2DV)(const GLdouble *);
-WXE_EXTERN WXEGLVERTEX2DV weglVertex2dv;
-typedef void (APIENTRY * WXEGLVERTEX2FV)(const GLfloat *);
-WXE_EXTERN WXEGLVERTEX2FV weglVertex2fv;
-typedef void (APIENTRY * WXEGLVERTEX2IV)(const GLint *);
-WXE_EXTERN WXEGLVERTEX2IV weglVertex2iv;
-typedef void (APIENTRY * WXEGLVERTEX2SV)(const GLshort *);
-WXE_EXTERN WXEGLVERTEX2SV weglVertex2sv;
-typedef void (APIENTRY * WXEGLVERTEX3DV)(const GLdouble *);
-WXE_EXTERN WXEGLVERTEX3DV weglVertex3dv;
-typedef void (APIENTRY * WXEGLVERTEX3FV)(const GLfloat *);
-WXE_EXTERN WXEGLVERTEX3FV weglVertex3fv;
-typedef void (APIENTRY * WXEGLVERTEX3IV)(const GLint *);
-WXE_EXTERN WXEGLVERTEX3IV weglVertex3iv;
-typedef void (APIENTRY * WXEGLVERTEX3SV)(const GLshort *);
-WXE_EXTERN WXEGLVERTEX3SV weglVertex3sv;
-typedef void (APIENTRY * WXEGLVERTEX4DV)(const GLdouble *);
-WXE_EXTERN WXEGLVERTEX4DV weglVertex4dv;
-typedef void (APIENTRY * WXEGLVERTEX4FV)(const GLfloat *);
-WXE_EXTERN WXEGLVERTEX4FV weglVertex4fv;
-typedef void (APIENTRY * WXEGLVERTEX4IV)(const GLint *);
-WXE_EXTERN WXEGLVERTEX4IV weglVertex4iv;
-typedef void (APIENTRY * WXEGLVERTEX4SV)(const GLshort *);
-WXE_EXTERN WXEGLVERTEX4SV weglVertex4sv;
-typedef void (APIENTRY * WXEGLVERTEXPOINTER)(GLint,GLenum,GLsizei,const GLvoid *);
-WXE_EXTERN WXEGLVERTEXPOINTER weglVertexPointer;
-typedef void (APIENTRY * WXEGLVIEWPORT)(GLint,GLint,GLsizei,GLsizei);
-WXE_EXTERN WXEGLVIEWPORT weglViewport;
+typedef void (APIENTRY * WXEGLCOPYTEXIMAGE1D)(GLenum,GLint,GLenum,GLint,GLint,GLsizei,GLint);
+WXE_EXTERN WXEGLCOPYTEXIMAGE1D weglCopyTexImage1D;
+typedef void (APIENTRY * WXEGLCOPYTEXIMAGE2D)(GLenum,GLint,GLenum,GLint,GLint,GLsizei,GLsizei,GLint);
+WXE_EXTERN WXEGLCOPYTEXIMAGE2D weglCopyTexImage2D;
+typedef void (APIENTRY * WXEGLCOPYTEXSUBIMAGE1D)(GLenum,GLint,GLint,GLint,GLint,GLsizei);
+WXE_EXTERN WXEGLCOPYTEXSUBIMAGE1D weglCopyTexSubImage1D;
+typedef void (APIENTRY * WXEGLCOPYTEXSUBIMAGE2D)(GLenum,GLint,GLint,GLint,GLint,GLint,GLsizei,GLsizei);
+WXE_EXTERN WXEGLCOPYTEXSUBIMAGE2D weglCopyTexSubImage2D;
+typedef void (APIENTRY * WXEGLMAP1D)(GLenum,GLdouble,GLdouble,GLint,GLint,const GLdouble *);
+WXE_EXTERN WXEGLMAP1D weglMap1d;
+typedef void (APIENTRY * WXEGLMAP1F)(GLenum,GLfloat,GLfloat,GLint,GLint,const GLfloat *);
+WXE_EXTERN WXEGLMAP1F weglMap1f;
+typedef void (APIENTRY * WXEGLMAP2D)(GLenum,GLdouble,GLdouble,GLint,GLint,GLdouble,GLdouble,GLint,GLint,const GLdouble *);
+WXE_EXTERN WXEGLMAP2D weglMap2d;
+typedef void (APIENTRY * WXEGLMAP2F)(GLenum,GLfloat,GLfloat,GLint,GLint,GLfloat,GLfloat,GLint,GLint,const GLfloat *);
+WXE_EXTERN WXEGLMAP2F weglMap2f;
+typedef void (APIENTRY * WXEGLGETMAPDV)(GLenum,GLenum,GLdouble *);
+WXE_EXTERN WXEGLGETMAPDV weglGetMapdv;
+typedef void (APIENTRY * WXEGLGETMAPFV)(GLenum,GLenum,GLfloat *);
+WXE_EXTERN WXEGLGETMAPFV weglGetMapfv;
+typedef void (APIENTRY * WXEGLGETMAPIV)(GLenum,GLenum,GLint *);
+WXE_EXTERN WXEGLGETMAPIV weglGetMapiv;
+typedef void (APIENTRY * WXEGLEVALCOORD1DV)(const GLdouble *);
+WXE_EXTERN WXEGLEVALCOORD1DV weglEvalCoord1dv;
+typedef void (APIENTRY * WXEGLEVALCOORD1FV)(const GLfloat *);
+WXE_EXTERN WXEGLEVALCOORD1FV weglEvalCoord1fv;
+typedef void (APIENTRY * WXEGLEVALCOORD2DV)(const GLdouble *);
+WXE_EXTERN WXEGLEVALCOORD2DV weglEvalCoord2dv;
+typedef void (APIENTRY * WXEGLEVALCOORD2FV)(const GLfloat *);
+WXE_EXTERN WXEGLEVALCOORD2FV weglEvalCoord2fv;
+typedef void (APIENTRY * WXEGLMAPGRID1D)(GLint,GLdouble,GLdouble);
+WXE_EXTERN WXEGLMAPGRID1D weglMapGrid1d;
+typedef void (APIENTRY * WXEGLMAPGRID1F)(GLint,GLfloat,GLfloat);
+WXE_EXTERN WXEGLMAPGRID1F weglMapGrid1f;
+typedef void (APIENTRY * WXEGLMAPGRID2D)(GLint,GLdouble,GLdouble,GLint,GLdouble,GLdouble);
+WXE_EXTERN WXEGLMAPGRID2D weglMapGrid2d;
+typedef void (APIENTRY * WXEGLMAPGRID2F)(GLint,GLfloat,GLfloat,GLint,GLfloat,GLfloat);
+WXE_EXTERN WXEGLMAPGRID2F weglMapGrid2f;
+typedef void (APIENTRY * WXEGLEVALPOINT1)(GLint);
+WXE_EXTERN WXEGLEVALPOINT1 weglEvalPoint1;
+typedef void (APIENTRY * WXEGLEVALPOINT2)(GLint,GLint);
+WXE_EXTERN WXEGLEVALPOINT2 weglEvalPoint2;
+typedef void (APIENTRY * WXEGLEVALMESH1)(GLenum,GLint,GLint);
+WXE_EXTERN WXEGLEVALMESH1 weglEvalMesh1;
+typedef void (APIENTRY * WXEGLEVALMESH2)(GLenum,GLint,GLint,GLint,GLint);
+WXE_EXTERN WXEGLEVALMESH2 weglEvalMesh2;
+typedef void (APIENTRY * WXEGLFOGF)(GLenum,GLfloat);
+WXE_EXTERN WXEGLFOGF weglFogf;
+typedef void (APIENTRY * WXEGLFOGI)(GLenum,GLint);
+WXE_EXTERN WXEGLFOGI weglFogi;
+typedef void (APIENTRY * WXEGLFOGFV)(GLenum,const GLfloat *);
+WXE_EXTERN WXEGLFOGFV weglFogfv;
+typedef void (APIENTRY * WXEGLFOGIV)(GLenum,const GLint *);
+WXE_EXTERN WXEGLFOGIV weglFogiv;
+typedef void (APIENTRY * WXEGLFEEDBACKBUFFER)(GLsizei,GLenum,GLfloat *);
+WXE_EXTERN WXEGLFEEDBACKBUFFER weglFeedbackBuffer;
+typedef void (APIENTRY * WXEGLPASSTHROUGH)(GLfloat);
+WXE_EXTERN WXEGLPASSTHROUGH weglPassThrough;
+typedef void (APIENTRY * WXEGLSELECTBUFFER)(GLsizei,GLuint *);
+WXE_EXTERN WXEGLSELECTBUFFER weglSelectBuffer;
+typedef void (APIENTRY * WXEGLINITNAMES)();
+WXE_EXTERN WXEGLINITNAMES weglInitNames;
+typedef void (APIENTRY * WXEGLLOADNAME)(GLuint);
+WXE_EXTERN WXEGLLOADNAME weglLoadName;
+typedef void (APIENTRY * WXEGLPUSHNAME)(GLuint);
+WXE_EXTERN WXEGLPUSHNAME weglPushName;
+typedef void (APIENTRY * WXEGLPOPNAME)();
+WXE_EXTERN WXEGLPOPNAME weglPopName;
typedef void (APIENTRY * WXEGLBLENDCOLOR)(GLclampf,GLclampf,GLclampf,GLclampf);
WXE_EXTERN WXEGLBLENDCOLOR weglBlendColor;
typedef void (APIENTRY * WXEGLBLENDEQUATION)(GLenum);
@@ -681,13 +681,13 @@ typedef void (APIENTRY * WXEGLMULTITEXCOORD4IV)(GLenum,const GLint *);
WXE_EXTERN WXEGLMULTITEXCOORD4IV weglMultiTexCoord4iv;
typedef void (APIENTRY * WXEGLMULTITEXCOORD4SV)(GLenum,const GLshort *);
WXE_EXTERN WXEGLMULTITEXCOORD4SV weglMultiTexCoord4sv;
-typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXF)(const GLfloat *);
+typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXF)(const GLfloat m[16]);
WXE_EXTERN WXEGLLOADTRANSPOSEMATRIXF weglLoadTransposeMatrixf;
-typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXD)(const GLdouble *);
+typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXD)(const GLdouble m[16]);
WXE_EXTERN WXEGLLOADTRANSPOSEMATRIXD weglLoadTransposeMatrixd;
-typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXF)(const GLfloat *);
+typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXF)(const GLfloat m[16]);
WXE_EXTERN WXEGLMULTTRANSPOSEMATRIXF weglMultTransposeMatrixf;
-typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXD)(const GLdouble *);
+typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXD)(const GLdouble m[16]);
WXE_EXTERN WXEGLMULTTRANSPOSEMATRIXD weglMultTransposeMatrixd;
typedef void (APIENTRY * WXEGLBLENDFUNCSEPARATE)(GLenum,GLenum,GLenum,GLenum);
WXE_EXTERN WXEGLBLENDFUNCSEPARATE weglBlendFuncSeparate;
@@ -1589,16 +1589,28 @@ typedef GLuint (APIENTRY * WXEGLGETDEBUGMESSAGELOGARB)(GLuint,GLsizei,GLenum *,G
WXE_EXTERN WXEGLGETDEBUGMESSAGELOGARB weglGetDebugMessageLogARB;
typedef GLenum (APIENTRY * WXEGLGETGRAPHICSRESETSTATUSARB)();
WXE_EXTERN WXEGLGETGRAPHICSRESETSTATUSARB weglGetGraphicsResetStatusARB;
-typedef void (APIENTRY * WXEGLRESIZEBUFFERSMESA)();
-WXE_EXTERN WXEGLRESIZEBUFFERSMESA weglResizeBuffersMESA;
-typedef void (APIENTRY * WXEGLWINDOWPOS4DVMESA)(const GLdouble *);
-WXE_EXTERN WXEGLWINDOWPOS4DVMESA weglWindowPos4dvMESA;
-typedef void (APIENTRY * WXEGLWINDOWPOS4FVMESA)(const GLfloat *);
-WXE_EXTERN WXEGLWINDOWPOS4FVMESA weglWindowPos4fvMESA;
-typedef void (APIENTRY * WXEGLWINDOWPOS4IVMESA)(const GLint *);
-WXE_EXTERN WXEGLWINDOWPOS4IVMESA weglWindowPos4ivMESA;
-typedef void (APIENTRY * WXEGLWINDOWPOS4SVMESA)(const GLshort *);
-WXE_EXTERN WXEGLWINDOWPOS4SVMESA weglWindowPos4svMESA;
+typedef void (APIENTRY * WXEGLDRAWARRAYSINSTANCEDBASEINSTANCE)(GLenum,GLint,GLsizei,GLsizei,GLuint);
+WXE_EXTERN WXEGLDRAWARRAYSINSTANCEDBASEINSTANCE weglDrawArraysInstancedBaseInstance;
+typedef void (APIENTRY * WXEGLDRAWELEMENTSINSTANCEDBASEINSTANCE)(GLenum,GLsizei,GLenum,const void *,GLsizei,GLuint);
+WXE_EXTERN WXEGLDRAWELEMENTSINSTANCEDBASEINSTANCE weglDrawElementsInstancedBaseInstance;
+typedef void (APIENTRY * WXEGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCE)(GLenum,GLsizei,GLenum,const void *,GLsizei,GLint,GLuint);
+WXE_EXTERN WXEGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCE weglDrawElementsInstancedBaseVertexBaseInstance;
+typedef void (APIENTRY * WXEGLDRAWTRANSFORMFEEDBACKINSTANCED)(GLenum,GLuint,GLsizei);
+WXE_EXTERN WXEGLDRAWTRANSFORMFEEDBACKINSTANCED weglDrawTransformFeedbackInstanced;
+typedef void (APIENTRY * WXEGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCED)(GLenum,GLuint,GLuint,GLsizei);
+WXE_EXTERN WXEGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCED weglDrawTransformFeedbackStreamInstanced;
+typedef void (APIENTRY * WXEGLGETINTERNALFORMATIV)(GLenum,GLenum,GLenum,GLsizei,GLint *);
+WXE_EXTERN WXEGLGETINTERNALFORMATIV weglGetInternalformativ;
+typedef void (APIENTRY * WXEGLBINDIMAGETEXTURE)(GLuint,GLuint,GLint,GLboolean,GLint,GLenum,GLenum);
+WXE_EXTERN WXEGLBINDIMAGETEXTURE weglBindImageTexture;
+typedef void (APIENTRY * WXEGLMEMORYBARRIER)(GLbitfield);
+WXE_EXTERN WXEGLMEMORYBARRIER weglMemoryBarrier;
+typedef void (APIENTRY * WXEGLTEXSTORAGE1D)(GLenum,GLsizei,GLenum,GLsizei);
+WXE_EXTERN WXEGLTEXSTORAGE1D weglTexStorage1D;
+typedef void (APIENTRY * WXEGLTEXSTORAGE2D)(GLenum,GLsizei,GLenum,GLsizei,GLsizei);
+WXE_EXTERN WXEGLTEXSTORAGE2D weglTexStorage2D;
+typedef void (APIENTRY * WXEGLTEXSTORAGE3D)(GLenum,GLsizei,GLenum,GLsizei,GLsizei,GLsizei);
+WXE_EXTERN WXEGLTEXSTORAGE3D weglTexStorage3D;
typedef void (APIENTRY * WXEGLDEPTHBOUNDSEXT)(GLclampd,GLclampd);
WXE_EXTERN WXEGLDEPTHBOUNDSEXT weglDepthBoundsEXT;
typedef void (APIENTRY * WXEGLSTENCILCLEARTAGEXT)(GLsizei,GLuint);
diff --git a/lib/wx/c_src/gen/gl_finit.h b/lib/wx/c_src/gen/gl_finit.h
index 583e36faf7..afe947ed80 100644
--- a/lib/wx/c_src/gen/gl_finit.h
+++ b/lib/wx/c_src/gen/gl_finit.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2010. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -20,186 +20,135 @@
gl_fns_t gl_fns[] =
{
- {"glAccum", NULL, &weglAccum},
- {"glAlphaFunc", NULL, &weglAlphaFunc},
- {"glAreTexturesResident", NULL, &weglAreTexturesResident},
- {"glArrayElement", NULL, &weglArrayElement},
- {"glBegin", NULL, &weglBegin},
- {"glBindTexture", NULL, &weglBindTexture},
- {"glBitmap", NULL, &weglBitmap},
- {"glBlendFunc", NULL, &weglBlendFunc},
- {"glCallList", NULL, &weglCallList},
- {"glCallLists", NULL, &weglCallLists},
- {"glClear", NULL, &weglClear},
- {"glClearAccum", NULL, &weglClearAccum},
- {"glClearColor", NULL, &weglClearColor},
- {"glClearDepth", NULL, &weglClearDepth},
{"glClearIndex", NULL, &weglClearIndex},
- {"glClearStencil", NULL, &weglClearStencil},
- {"glClipPlane", NULL, &weglClipPlane},
- {"glColor3bv", NULL, &weglColor3bv},
- {"glColor3dv", NULL, &weglColor3dv},
- {"glColor3fv", NULL, &weglColor3fv},
- {"glColor3iv", NULL, &weglColor3iv},
- {"glColor3sv", NULL, &weglColor3sv},
- {"glColor3ubv", NULL, &weglColor3ubv},
- {"glColor3uiv", NULL, &weglColor3uiv},
- {"glColor3usv", NULL, &weglColor3usv},
- {"glColor4bv", NULL, &weglColor4bv},
- {"glColor4dv", NULL, &weglColor4dv},
- {"glColor4fv", NULL, &weglColor4fv},
- {"glColor4iv", NULL, &weglColor4iv},
- {"glColor4sv", NULL, &weglColor4sv},
- {"glColor4ubv", NULL, &weglColor4ubv},
- {"glColor4uiv", NULL, &weglColor4uiv},
- {"glColor4usv", NULL, &weglColor4usv},
+ {"glClearColor", NULL, &weglClearColor},
+ {"glClear", NULL, &weglClear},
+ {"glIndexMask", NULL, &weglIndexMask},
{"glColorMask", NULL, &weglColorMask},
- {"glColorMaterial", NULL, &weglColorMaterial},
- {"glColorPointer", NULL, &weglColorPointer},
- {"glCopyPixels", NULL, &weglCopyPixels},
- {"glCopyTexImage1D", NULL, &weglCopyTexImage1D},
- {"glCopyTexImage2D", NULL, &weglCopyTexImage2D},
- {"glCopyTexSubImage1D", NULL, &weglCopyTexSubImage1D},
- {"glCopyTexSubImage2D", NULL, &weglCopyTexSubImage2D},
+ {"glAlphaFunc", NULL, &weglAlphaFunc},
+ {"glBlendFunc", NULL, &weglBlendFunc},
+ {"glLogicOp", NULL, &weglLogicOp},
{"glCullFace", NULL, &weglCullFace},
- {"glDeleteLists", NULL, &weglDeleteLists},
- {"glDeleteTextures", NULL, &weglDeleteTextures},
- {"glDepthFunc", NULL, &weglDepthFunc},
- {"glDepthMask", NULL, &weglDepthMask},
- {"glDepthRange", NULL, &weglDepthRange},
- {"glDisable", NULL, &weglDisable},
- {"glDisableClientState", NULL, &weglDisableClientState},
- {"glDrawArrays", NULL, &weglDrawArrays},
- {"glDrawBuffer", NULL, &weglDrawBuffer},
- {"glDrawElements", NULL, &weglDrawElements},
- {"glDrawPixels", NULL, &weglDrawPixels},
+ {"glFrontFace", NULL, &weglFrontFace},
+ {"glPointSize", NULL, &weglPointSize},
+ {"glLineWidth", NULL, &weglLineWidth},
+ {"glLineStipple", NULL, &weglLineStipple},
+ {"glPolygonMode", NULL, &weglPolygonMode},
+ {"glPolygonOffset", NULL, &weglPolygonOffset},
+ {"glPolygonStipple", NULL, &weglPolygonStipple},
+ {"glGetPolygonStipple", NULL, &weglGetPolygonStipple},
{"glEdgeFlagv", NULL, &weglEdgeFlagv},
- {"glEdgeFlagPointer", NULL, &weglEdgeFlagPointer},
+ {"glScissor", NULL, &weglScissor},
+ {"glClipPlane", NULL, &weglClipPlane},
+ {"glGetClipPlane", NULL, &weglGetClipPlane},
+ {"glDrawBuffer", NULL, &weglDrawBuffer},
+ {"glReadBuffer", NULL, &weglReadBuffer},
{"glEnable", NULL, &weglEnable},
+ {"glDisable", NULL, &weglDisable},
+ {"glIsEnabled", NULL, &weglIsEnabled},
{"glEnableClientState", NULL, &weglEnableClientState},
- {"glEnd", NULL, &weglEnd},
- {"glEndList", NULL, &weglEndList},
- {"glEvalCoord1dv", NULL, &weglEvalCoord1dv},
- {"glEvalCoord1fv", NULL, &weglEvalCoord1fv},
- {"glEvalCoord2dv", NULL, &weglEvalCoord2dv},
- {"glEvalCoord2fv", NULL, &weglEvalCoord2fv},
- {"glEvalMesh1", NULL, &weglEvalMesh1},
- {"glEvalMesh2", NULL, &weglEvalMesh2},
- {"glEvalPoint1", NULL, &weglEvalPoint1},
- {"glEvalPoint2", NULL, &weglEvalPoint2},
- {"glFeedbackBuffer", NULL, &weglFeedbackBuffer},
- {"glFinish", NULL, &weglFinish},
- {"glFlush", NULL, &weglFlush},
- {"glFogf", NULL, &weglFogf},
- {"glFogfv", NULL, &weglFogfv},
- {"glFogi", NULL, &weglFogi},
- {"glFogiv", NULL, &weglFogiv},
- {"glFrontFace", NULL, &weglFrontFace},
- {"glFrustum", NULL, &weglFrustum},
- {"glGenLists", NULL, &weglGenLists},
- {"glGenTextures", NULL, &weglGenTextures},
+ {"glDisableClientState", NULL, &weglDisableClientState},
{"glGetBooleanv", NULL, &weglGetBooleanv},
- {"glGetClipPlane", NULL, &weglGetClipPlane},
{"glGetDoublev", NULL, &weglGetDoublev},
- {"glGetError", NULL, &weglGetError},
{"glGetFloatv", NULL, &weglGetFloatv},
{"glGetIntegerv", NULL, &weglGetIntegerv},
- {"glGetLightfv", NULL, &weglGetLightfv},
- {"glGetLightiv", NULL, &weglGetLightiv},
- {"glGetMapdv", NULL, &weglGetMapdv},
- {"glGetMapfv", NULL, &weglGetMapfv},
- {"glGetMapiv", NULL, &weglGetMapiv},
- {"glGetMaterialfv", NULL, &weglGetMaterialfv},
- {"glGetMaterialiv", NULL, &weglGetMaterialiv},
- {"glGetPixelMapfv", NULL, &weglGetPixelMapfv},
- {"glGetPixelMapuiv", NULL, &weglGetPixelMapuiv},
- {"glGetPixelMapusv", NULL, &weglGetPixelMapusv},
- {"glGetPolygonStipple", NULL, &weglGetPolygonStipple},
+ {"glPushAttrib", NULL, &weglPushAttrib},
+ {"glPopAttrib", NULL, &weglPopAttrib},
+ {"glPushClientAttrib", NULL, &weglPushClientAttrib},
+ {"glPopClientAttrib", NULL, &weglPopClientAttrib},
+ {"glRenderMode", NULL, &weglRenderMode},
+ {"glGetError", NULL, &weglGetError},
{"glGetString", NULL, &weglGetString},
- {"glGetTexEnvfv", NULL, &weglGetTexEnvfv},
- {"glGetTexEnviv", NULL, &weglGetTexEnviv},
- {"glGetTexGendv", NULL, &weglGetTexGendv},
- {"glGetTexGenfv", NULL, &weglGetTexGenfv},
- {"glGetTexGeniv", NULL, &weglGetTexGeniv},
- {"glGetTexImage", NULL, &weglGetTexImage},
- {"glGetTexLevelParameterfv", NULL, &weglGetTexLevelParameterfv},
- {"glGetTexLevelParameteriv", NULL, &weglGetTexLevelParameteriv},
- {"glGetTexParameterfv", NULL, &weglGetTexParameterfv},
- {"glGetTexParameteriv", NULL, &weglGetTexParameteriv},
+ {"glFinish", NULL, &weglFinish},
+ {"glFlush", NULL, &weglFlush},
{"glHint", NULL, &weglHint},
- {"glIndexMask", NULL, &weglIndexMask},
- {"glIndexPointer", NULL, &weglIndexPointer},
- {"glIndexdv", NULL, &weglIndexdv},
- {"glIndexfv", NULL, &weglIndexfv},
- {"glIndexiv", NULL, &weglIndexiv},
- {"glIndexsv", NULL, &weglIndexsv},
- {"glIndexubv", NULL, &weglIndexubv},
- {"glInitNames", NULL, &weglInitNames},
- {"glInterleavedArrays", NULL, &weglInterleavedArrays},
- {"glIsEnabled", NULL, &weglIsEnabled},
- {"glIsList", NULL, &weglIsList},
- {"glIsTexture", NULL, &weglIsTexture},
- {"glLightModelf", NULL, &weglLightModelf},
- {"glLightModelfv", NULL, &weglLightModelfv},
- {"glLightModeli", NULL, &weglLightModeli},
- {"glLightModeliv", NULL, &weglLightModeliv},
- {"glLightf", NULL, &weglLightf},
- {"glLightfv", NULL, &weglLightfv},
- {"glLighti", NULL, &weglLighti},
- {"glLightiv", NULL, &weglLightiv},
- {"glLineStipple", NULL, &weglLineStipple},
- {"glLineWidth", NULL, &weglLineWidth},
- {"glListBase", NULL, &weglListBase},
+ {"glClearDepth", NULL, &weglClearDepth},
+ {"glDepthFunc", NULL, &weglDepthFunc},
+ {"glDepthMask", NULL, &weglDepthMask},
+ {"glDepthRange", NULL, &weglDepthRange},
+ {"glClearAccum", NULL, &weglClearAccum},
+ {"glAccum", NULL, &weglAccum},
+ {"glMatrixMode", NULL, &weglMatrixMode},
+ {"glOrtho", NULL, &weglOrtho},
+ {"glFrustum", NULL, &weglFrustum},
+ {"glViewport", NULL, &weglViewport},
+ {"glPushMatrix", NULL, &weglPushMatrix},
+ {"glPopMatrix", NULL, &weglPopMatrix},
{"glLoadIdentity", NULL, &weglLoadIdentity},
{"glLoadMatrixd", NULL, &weglLoadMatrixd},
{"glLoadMatrixf", NULL, &weglLoadMatrixf},
- {"glLoadName", NULL, &weglLoadName},
- {"glLogicOp", NULL, &weglLogicOp},
- {"glMap1d", NULL, &weglMap1d},
- {"glMap1f", NULL, &weglMap1f},
- {"glMap2d", NULL, &weglMap2d},
- {"glMap2f", NULL, &weglMap2f},
- {"glMapGrid1d", NULL, &weglMapGrid1d},
- {"glMapGrid1f", NULL, &weglMapGrid1f},
- {"glMapGrid2d", NULL, &weglMapGrid2d},
- {"glMapGrid2f", NULL, &weglMapGrid2f},
- {"glMaterialf", NULL, &weglMaterialf},
- {"glMaterialfv", NULL, &weglMaterialfv},
- {"glMateriali", NULL, &weglMateriali},
- {"glMaterialiv", NULL, &weglMaterialiv},
- {"glMatrixMode", NULL, &weglMatrixMode},
{"glMultMatrixd", NULL, &weglMultMatrixd},
{"glMultMatrixf", NULL, &weglMultMatrixf},
+ {"glRotated", NULL, &weglRotated},
+ {"glRotatef", NULL, &weglRotatef},
+ {"glScaled", NULL, &weglScaled},
+ {"glScalef", NULL, &weglScalef},
+ {"glTranslated", NULL, &weglTranslated},
+ {"glTranslatef", NULL, &weglTranslatef},
+ {"glIsList", NULL, &weglIsList},
+ {"glDeleteLists", NULL, &weglDeleteLists},
+ {"glGenLists", NULL, &weglGenLists},
{"glNewList", NULL, &weglNewList},
+ {"glEndList", NULL, &weglEndList},
+ {"glCallList", NULL, &weglCallList},
+ {"glCallLists", NULL, &weglCallLists},
+ {"glListBase", NULL, &weglListBase},
+ {"glBegin", NULL, &weglBegin},
+ {"glEnd", NULL, &weglEnd},
+ {"glVertex2dv", NULL, &weglVertex2dv},
+ {"glVertex2fv", NULL, &weglVertex2fv},
+ {"glVertex2iv", NULL, &weglVertex2iv},
+ {"glVertex2sv", NULL, &weglVertex2sv},
+ {"glVertex3dv", NULL, &weglVertex3dv},
+ {"glVertex3fv", NULL, &weglVertex3fv},
+ {"glVertex3iv", NULL, &weglVertex3iv},
+ {"glVertex3sv", NULL, &weglVertex3sv},
+ {"glVertex4dv", NULL, &weglVertex4dv},
+ {"glVertex4fv", NULL, &weglVertex4fv},
+ {"glVertex4iv", NULL, &weglVertex4iv},
+ {"glVertex4sv", NULL, &weglVertex4sv},
{"glNormal3bv", NULL, &weglNormal3bv},
{"glNormal3dv", NULL, &weglNormal3dv},
{"glNormal3fv", NULL, &weglNormal3fv},
{"glNormal3iv", NULL, &weglNormal3iv},
{"glNormal3sv", NULL, &weglNormal3sv},
- {"glNormalPointer", NULL, &weglNormalPointer},
- {"glOrtho", NULL, &weglOrtho},
- {"glPassThrough", NULL, &weglPassThrough},
- {"glPixelMapfv", NULL, &weglPixelMapfv},
- {"glPixelMapuiv", NULL, &weglPixelMapuiv},
- {"glPixelMapusv", NULL, &weglPixelMapusv},
- {"glPixelStoref", NULL, &weglPixelStoref},
- {"glPixelStorei", NULL, &weglPixelStorei},
- {"glPixelTransferf", NULL, &weglPixelTransferf},
- {"glPixelTransferi", NULL, &weglPixelTransferi},
- {"glPixelZoom", NULL, &weglPixelZoom},
- {"glPointSize", NULL, &weglPointSize},
- {"glPolygonMode", NULL, &weglPolygonMode},
- {"glPolygonOffset", NULL, &weglPolygonOffset},
- {"glPolygonStipple", NULL, &weglPolygonStipple},
- {"glPopAttrib", NULL, &weglPopAttrib},
- {"glPopClientAttrib", NULL, &weglPopClientAttrib},
- {"glPopMatrix", NULL, &weglPopMatrix},
- {"glPopName", NULL, &weglPopName},
- {"glPrioritizeTextures", NULL, &weglPrioritizeTextures},
- {"glPushAttrib", NULL, &weglPushAttrib},
- {"glPushClientAttrib", NULL, &weglPushClientAttrib},
- {"glPushMatrix", NULL, &weglPushMatrix},
- {"glPushName", NULL, &weglPushName},
+ {"glIndexdv", NULL, &weglIndexdv},
+ {"glIndexfv", NULL, &weglIndexfv},
+ {"glIndexiv", NULL, &weglIndexiv},
+ {"glIndexsv", NULL, &weglIndexsv},
+ {"glIndexubv", NULL, &weglIndexubv},
+ {"glColor3bv", NULL, &weglColor3bv},
+ {"glColor3dv", NULL, &weglColor3dv},
+ {"glColor3fv", NULL, &weglColor3fv},
+ {"glColor3iv", NULL, &weglColor3iv},
+ {"glColor3sv", NULL, &weglColor3sv},
+ {"glColor3ubv", NULL, &weglColor3ubv},
+ {"glColor3uiv", NULL, &weglColor3uiv},
+ {"glColor3usv", NULL, &weglColor3usv},
+ {"glColor4bv", NULL, &weglColor4bv},
+ {"glColor4dv", NULL, &weglColor4dv},
+ {"glColor4fv", NULL, &weglColor4fv},
+ {"glColor4iv", NULL, &weglColor4iv},
+ {"glColor4sv", NULL, &weglColor4sv},
+ {"glColor4ubv", NULL, &weglColor4ubv},
+ {"glColor4uiv", NULL, &weglColor4uiv},
+ {"glColor4usv", NULL, &weglColor4usv},
+ {"glTexCoord1dv", NULL, &weglTexCoord1dv},
+ {"glTexCoord1fv", NULL, &weglTexCoord1fv},
+ {"glTexCoord1iv", NULL, &weglTexCoord1iv},
+ {"glTexCoord1sv", NULL, &weglTexCoord1sv},
+ {"glTexCoord2dv", NULL, &weglTexCoord2dv},
+ {"glTexCoord2fv", NULL, &weglTexCoord2fv},
+ {"glTexCoord2iv", NULL, &weglTexCoord2iv},
+ {"glTexCoord2sv", NULL, &weglTexCoord2sv},
+ {"glTexCoord3dv", NULL, &weglTexCoord3dv},
+ {"glTexCoord3fv", NULL, &weglTexCoord3fv},
+ {"glTexCoord3iv", NULL, &weglTexCoord3iv},
+ {"glTexCoord3sv", NULL, &weglTexCoord3sv},
+ {"glTexCoord4dv", NULL, &weglTexCoord4dv},
+ {"glTexCoord4fv", NULL, &weglTexCoord4fv},
+ {"glTexCoord4iv", NULL, &weglTexCoord4iv},
+ {"glTexCoord4sv", NULL, &weglTexCoord4sv},
{"glRasterPos2dv", NULL, &weglRasterPos2dv},
{"glRasterPos2fv", NULL, &weglRasterPos2fv},
{"glRasterPos2iv", NULL, &weglRasterPos2iv},
@@ -212,78 +161,129 @@ gl_fns_t gl_fns[] =
{"glRasterPos4fv", NULL, &weglRasterPos4fv},
{"glRasterPos4iv", NULL, &weglRasterPos4iv},
{"glRasterPos4sv", NULL, &weglRasterPos4sv},
- {"glReadBuffer", NULL, &weglReadBuffer},
- {"glReadPixels", NULL, &weglReadPixels},
{"glRectd", NULL, &weglRectd},
- {"glRectdv", NULL, &weglRectdv},
{"glRectf", NULL, &weglRectf},
- {"glRectfv", NULL, &weglRectfv},
{"glRecti", NULL, &weglRecti},
- {"glRectiv", NULL, &weglRectiv},
{"glRects", NULL, &weglRects},
+ {"glRectdv", NULL, &weglRectdv},
+ {"glRectfv", NULL, &weglRectfv},
+ {"glRectiv", NULL, &weglRectiv},
{"glRectsv", NULL, &weglRectsv},
- {"glRenderMode", NULL, &weglRenderMode},
- {"glRotated", NULL, &weglRotated},
- {"glRotatef", NULL, &weglRotatef},
- {"glScaled", NULL, &weglScaled},
- {"glScalef", NULL, &weglScalef},
- {"glScissor", NULL, &weglScissor},
- {"glSelectBuffer", NULL, &weglSelectBuffer},
+ {"glVertexPointer", NULL, &weglVertexPointer},
+ {"glNormalPointer", NULL, &weglNormalPointer},
+ {"glColorPointer", NULL, &weglColorPointer},
+ {"glIndexPointer", NULL, &weglIndexPointer},
+ {"glTexCoordPointer", NULL, &weglTexCoordPointer},
+ {"glEdgeFlagPointer", NULL, &weglEdgeFlagPointer},
+ {"glArrayElement", NULL, &weglArrayElement},
+ {"glDrawArrays", NULL, &weglDrawArrays},
+ {"glDrawElements", NULL, &weglDrawElements},
+ {"glInterleavedArrays", NULL, &weglInterleavedArrays},
{"glShadeModel", NULL, &weglShadeModel},
+ {"glLightf", NULL, &weglLightf},
+ {"glLighti", NULL, &weglLighti},
+ {"glLightfv", NULL, &weglLightfv},
+ {"glLightiv", NULL, &weglLightiv},
+ {"glGetLightfv", NULL, &weglGetLightfv},
+ {"glGetLightiv", NULL, &weglGetLightiv},
+ {"glLightModelf", NULL, &weglLightModelf},
+ {"glLightModeli", NULL, &weglLightModeli},
+ {"glLightModelfv", NULL, &weglLightModelfv},
+ {"glLightModeliv", NULL, &weglLightModeliv},
+ {"glMaterialf", NULL, &weglMaterialf},
+ {"glMateriali", NULL, &weglMateriali},
+ {"glMaterialfv", NULL, &weglMaterialfv},
+ {"glMaterialiv", NULL, &weglMaterialiv},
+ {"glGetMaterialfv", NULL, &weglGetMaterialfv},
+ {"glGetMaterialiv", NULL, &weglGetMaterialiv},
+ {"glColorMaterial", NULL, &weglColorMaterial},
+ {"glPixelZoom", NULL, &weglPixelZoom},
+ {"glPixelStoref", NULL, &weglPixelStoref},
+ {"glPixelStorei", NULL, &weglPixelStorei},
+ {"glPixelTransferf", NULL, &weglPixelTransferf},
+ {"glPixelTransferi", NULL, &weglPixelTransferi},
+ {"glPixelMapfv", NULL, &weglPixelMapfv},
+ {"glPixelMapuiv", NULL, &weglPixelMapuiv},
+ {"glPixelMapusv", NULL, &weglPixelMapusv},
+ {"glGetPixelMapfv", NULL, &weglGetPixelMapfv},
+ {"glGetPixelMapuiv", NULL, &weglGetPixelMapuiv},
+ {"glGetPixelMapusv", NULL, &weglGetPixelMapusv},
+ {"glBitmap", NULL, &weglBitmap},
+ {"glReadPixels", NULL, &weglReadPixels},
+ {"glDrawPixels", NULL, &weglDrawPixels},
+ {"glCopyPixels", NULL, &weglCopyPixels},
{"glStencilFunc", NULL, &weglStencilFunc},
{"glStencilMask", NULL, &weglStencilMask},
{"glStencilOp", NULL, &weglStencilOp},
- {"glTexCoord1dv", NULL, &weglTexCoord1dv},
- {"glTexCoord1fv", NULL, &weglTexCoord1fv},
- {"glTexCoord1iv", NULL, &weglTexCoord1iv},
- {"glTexCoord1sv", NULL, &weglTexCoord1sv},
- {"glTexCoord2dv", NULL, &weglTexCoord2dv},
- {"glTexCoord2fv", NULL, &weglTexCoord2fv},
- {"glTexCoord2iv", NULL, &weglTexCoord2iv},
- {"glTexCoord2sv", NULL, &weglTexCoord2sv},
- {"glTexCoord3dv", NULL, &weglTexCoord3dv},
- {"glTexCoord3fv", NULL, &weglTexCoord3fv},
- {"glTexCoord3iv", NULL, &weglTexCoord3iv},
- {"glTexCoord3sv", NULL, &weglTexCoord3sv},
- {"glTexCoord4dv", NULL, &weglTexCoord4dv},
- {"glTexCoord4fv", NULL, &weglTexCoord4fv},
- {"glTexCoord4iv", NULL, &weglTexCoord4iv},
- {"glTexCoord4sv", NULL, &weglTexCoord4sv},
- {"glTexCoordPointer", NULL, &weglTexCoordPointer},
- {"glTexEnvf", NULL, &weglTexEnvf},
- {"glTexEnvfv", NULL, &weglTexEnvfv},
- {"glTexEnvi", NULL, &weglTexEnvi},
- {"glTexEnviv", NULL, &weglTexEnviv},
+ {"glClearStencil", NULL, &weglClearStencil},
{"glTexGend", NULL, &weglTexGend},
- {"glTexGendv", NULL, &weglTexGendv},
{"glTexGenf", NULL, &weglTexGenf},
- {"glTexGenfv", NULL, &weglTexGenfv},
{"glTexGeni", NULL, &weglTexGeni},
+ {"glTexGendv", NULL, &weglTexGendv},
+ {"glTexGenfv", NULL, &weglTexGenfv},
{"glTexGeniv", NULL, &weglTexGeniv},
- {"glTexImage1D", NULL, &weglTexImage1D},
- {"glTexImage2D", NULL, &weglTexImage2D},
+ {"glGetTexGendv", NULL, &weglGetTexGendv},
+ {"glGetTexGenfv", NULL, &weglGetTexGenfv},
+ {"glGetTexGeniv", NULL, &weglGetTexGeniv},
+ {"glTexEnvf", NULL, &weglTexEnvf},
+ {"glTexEnvi", NULL, &weglTexEnvi},
+ {"glTexEnvfv", NULL, &weglTexEnvfv},
+ {"glTexEnviv", NULL, &weglTexEnviv},
+ {"glGetTexEnvfv", NULL, &weglGetTexEnvfv},
+ {"glGetTexEnviv", NULL, &weglGetTexEnviv},
{"glTexParameterf", NULL, &weglTexParameterf},
- {"glTexParameterfv", NULL, &weglTexParameterfv},
{"glTexParameteri", NULL, &weglTexParameteri},
+ {"glTexParameterfv", NULL, &weglTexParameterfv},
{"glTexParameteriv", NULL, &weglTexParameteriv},
+ {"glGetTexParameterfv", NULL, &weglGetTexParameterfv},
+ {"glGetTexParameteriv", NULL, &weglGetTexParameteriv},
+ {"glGetTexLevelParameterfv", NULL, &weglGetTexLevelParameterfv},
+ {"glGetTexLevelParameteriv", NULL, &weglGetTexLevelParameteriv},
+ {"glTexImage1D", NULL, &weglTexImage1D},
+ {"glTexImage2D", NULL, &weglTexImage2D},
+ {"glGetTexImage", NULL, &weglGetTexImage},
+ {"glGenTextures", NULL, &weglGenTextures},
+ {"glDeleteTextures", NULL, &weglDeleteTextures},
+ {"glBindTexture", NULL, &weglBindTexture},
+ {"glPrioritizeTextures", NULL, &weglPrioritizeTextures},
+ {"glAreTexturesResident", NULL, &weglAreTexturesResident},
+ {"glIsTexture", NULL, &weglIsTexture},
{"glTexSubImage1D", NULL, &weglTexSubImage1D},
{"glTexSubImage2D", NULL, &weglTexSubImage2D},
- {"glTranslated", NULL, &weglTranslated},
- {"glTranslatef", NULL, &weglTranslatef},
- {"glVertex2dv", NULL, &weglVertex2dv},
- {"glVertex2fv", NULL, &weglVertex2fv},
- {"glVertex2iv", NULL, &weglVertex2iv},
- {"glVertex2sv", NULL, &weglVertex2sv},
- {"glVertex3dv", NULL, &weglVertex3dv},
- {"glVertex3fv", NULL, &weglVertex3fv},
- {"glVertex3iv", NULL, &weglVertex3iv},
- {"glVertex3sv", NULL, &weglVertex3sv},
- {"glVertex4dv", NULL, &weglVertex4dv},
- {"glVertex4fv", NULL, &weglVertex4fv},
- {"glVertex4iv", NULL, &weglVertex4iv},
- {"glVertex4sv", NULL, &weglVertex4sv},
- {"glVertexPointer", NULL, &weglVertexPointer},
- {"glViewport", NULL, &weglViewport},
+ {"glCopyTexImage1D", NULL, &weglCopyTexImage1D},
+ {"glCopyTexImage2D", NULL, &weglCopyTexImage2D},
+ {"glCopyTexSubImage1D", NULL, &weglCopyTexSubImage1D},
+ {"glCopyTexSubImage2D", NULL, &weglCopyTexSubImage2D},
+ {"glMap1d", NULL, &weglMap1d},
+ {"glMap1f", NULL, &weglMap1f},
+ {"glMap2d", NULL, &weglMap2d},
+ {"glMap2f", NULL, &weglMap2f},
+ {"glGetMapdv", NULL, &weglGetMapdv},
+ {"glGetMapfv", NULL, &weglGetMapfv},
+ {"glGetMapiv", NULL, &weglGetMapiv},
+ {"glEvalCoord1dv", NULL, &weglEvalCoord1dv},
+ {"glEvalCoord1fv", NULL, &weglEvalCoord1fv},
+ {"glEvalCoord2dv", NULL, &weglEvalCoord2dv},
+ {"glEvalCoord2fv", NULL, &weglEvalCoord2fv},
+ {"glMapGrid1d", NULL, &weglMapGrid1d},
+ {"glMapGrid1f", NULL, &weglMapGrid1f},
+ {"glMapGrid2d", NULL, &weglMapGrid2d},
+ {"glMapGrid2f", NULL, &weglMapGrid2f},
+ {"glEvalPoint1", NULL, &weglEvalPoint1},
+ {"glEvalPoint2", NULL, &weglEvalPoint2},
+ {"glEvalMesh1", NULL, &weglEvalMesh1},
+ {"glEvalMesh2", NULL, &weglEvalMesh2},
+ {"glFogf", NULL, &weglFogf},
+ {"glFogi", NULL, &weglFogi},
+ {"glFogfv", NULL, &weglFogfv},
+ {"glFogiv", NULL, &weglFogiv},
+ {"glFeedbackBuffer", NULL, &weglFeedbackBuffer},
+ {"glPassThrough", NULL, &weglPassThrough},
+ {"glSelectBuffer", NULL, &weglSelectBuffer},
+ {"glInitNames", NULL, &weglInitNames},
+ {"glLoadName", NULL, &weglLoadName},
+ {"glPushName", NULL, &weglPushName},
+ {"glPopName", NULL, &weglPopName},
{"glBlendColor", NULL, &weglBlendColor},
{"glBlendEquation", NULL, &weglBlendEquation},
{"glDrawRangeElements", NULL, &weglDrawRangeElements},
@@ -367,14 +367,14 @@ gl_fns_t gl_fns[] =
{"glSecondaryColor3uiv", NULL, &weglSecondaryColor3uiv},
{"glSecondaryColor3usv", NULL, &weglSecondaryColor3usv},
{"glSecondaryColorPointer", NULL, &weglSecondaryColorPointer},
- {"glWindowPos2dv", "glWindowPos2dvMESA", &weglWindowPos2dv},
- {"glWindowPos2fv", "glWindowPos2fvMESA", &weglWindowPos2fv},
- {"glWindowPos2iv", "glWindowPos2ivMESA", &weglWindowPos2iv},
- {"glWindowPos2sv", "glWindowPos2svMESA", &weglWindowPos2sv},
- {"glWindowPos3dv", "glWindowPos3dvMESA", &weglWindowPos3dv},
- {"glWindowPos3fv", "glWindowPos3fvMESA", &weglWindowPos3fv},
- {"glWindowPos3iv", "glWindowPos3ivMESA", &weglWindowPos3iv},
- {"glWindowPos3sv", "glWindowPos3svMESA", &weglWindowPos3sv},
+ {"glWindowPos2dv", "glWindowPos2dvARB", &weglWindowPos2dv},
+ {"glWindowPos2fv", "glWindowPos2fvARB", &weglWindowPos2fv},
+ {"glWindowPos2iv", "glWindowPos2ivARB", &weglWindowPos2iv},
+ {"glWindowPos2sv", "glWindowPos2svARB", &weglWindowPos2sv},
+ {"glWindowPos3dv", "glWindowPos3dvARB", &weglWindowPos3dv},
+ {"glWindowPos3fv", "glWindowPos3fvARB", &weglWindowPos3fv},
+ {"glWindowPos3iv", "glWindowPos3ivARB", &weglWindowPos3iv},
+ {"glWindowPos3sv", "glWindowPos3svARB", &weglWindowPos3sv},
{"glGenQueries", "glGenQueriesARB", &weglGenQueries},
{"glDeleteQueries", "glDeleteQueriesARB", &weglDeleteQueries},
{"glIsQuery", "glIsQueryARB", &weglIsQuery},
@@ -799,11 +799,17 @@ gl_fns_t gl_fns[] =
{"glDebugMessageInsertARB", NULL, &weglDebugMessageInsertARB},
{"glGetDebugMessageLogARB", NULL, &weglGetDebugMessageLogARB},
{"glGetGraphicsResetStatusARB", NULL, &weglGetGraphicsResetStatusARB},
- {"glResizeBuffersMESA", NULL, &weglResizeBuffersMESA},
- {"glWindowPos4dvMESA", NULL, &weglWindowPos4dvMESA},
- {"glWindowPos4fvMESA", NULL, &weglWindowPos4fvMESA},
- {"glWindowPos4ivMESA", NULL, &weglWindowPos4ivMESA},
- {"glWindowPos4svMESA", NULL, &weglWindowPos4svMESA},
+ {"glDrawArraysInstancedBaseInstance", NULL, &weglDrawArraysInstancedBaseInstance},
+ {"glDrawElementsInstancedBaseInstance", NULL, &weglDrawElementsInstancedBaseInstance},
+ {"glDrawElementsInstancedBaseVertexBaseInstance", NULL, &weglDrawElementsInstancedBaseVertexBaseInstance},
+ {"glDrawTransformFeedbackInstanced", NULL, &weglDrawTransformFeedbackInstanced},
+ {"glDrawTransformFeedbackStreamInstanced", NULL, &weglDrawTransformFeedbackStreamInstanced},
+ {"glGetInternalformativ", NULL, &weglGetInternalformativ},
+ {"glBindImageTexture", NULL, &weglBindImageTexture},
+ {"glMemoryBarrier", NULL, &weglMemoryBarrier},
+ {"glTexStorage1D", NULL, &weglTexStorage1D},
+ {"glTexStorage2D", NULL, &weglTexStorage2D},
+ {"glTexStorage3D", NULL, &weglTexStorage3D},
{"glDepthBoundsEXT", NULL, &weglDepthBoundsEXT},
{"glStencilClearTagEXT", NULL, &weglStencilClearTagEXT},
{ NULL, NULL, NULL}};
diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp
index fa1476dba5..e1bd920e71 100644
--- a/lib/wx/c_src/gen/gl_funcs.cpp
+++ b/lib/wx/c_src/gen/gl_funcs.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2011. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -346,477 +346,157 @@ case 5036: { // gluUnProject4
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5037: { // glAccum
- GLenum *op = (GLenum *) bp; bp += 4;
- GLfloat *value = (GLfloat *) bp; bp += 4;
- weglAccum(*op,*value);
-}; break;
-case 5038: { // glAlphaFunc
- GLenum *func = (GLenum *) bp; bp += 4;
- GLclampf *ref = (GLclampf *) bp; bp += 4;
- weglAlphaFunc(*func,*ref);
-}; break;
-case 5039: { // glAreTexturesResident
- int * texturesLen = (int *) bp; bp += 4;
- GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8;
- GLboolean *residences;
- residences = (GLboolean *) driver_alloc(sizeof(GLboolean) * *texturesLen);
- GLboolean result = weglAreTexturesResident(*texturesLen,textures,residences);
- int AP = 0; ErlDrvTermData *rt;
- rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(11 + (*texturesLen)*2));
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
- for(int i=0; i < *texturesLen; i++) {
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) residences[i];}
- rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*texturesLen)+1;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
- driver_free(rt);
- driver_free(residences);
-}; break;
-case 5040: { // glArrayElement
- GLint *i = (GLint *) bp; bp += 4;
- weglArrayElement(*i);
-}; break;
-case 5041: { // glBegin
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglBegin(*mode);
-}; break;
-case 5042: { // glBindTexture
- GLenum *target = (GLenum *) bp; bp += 4;
- GLuint *texture = (GLuint *) bp; bp += 4;
- weglBindTexture(*target,*texture);
-}; break;
-case 5043: { // glBitmap
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- GLfloat *xorig = (GLfloat *) bp; bp += 4;
- GLfloat *yorig = (GLfloat *) bp; bp += 4;
- GLfloat *xmove = (GLfloat *) bp; bp += 4;
- GLfloat *ymove = (GLfloat *) bp; bp += 4;
- GLubyte *bitmap = (GLubyte *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap);
-}; break;
-case 5044: { // glBitmap
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- GLfloat *xorig = (GLfloat *) bp; bp += 4;
- GLfloat *yorig = (GLfloat *) bp; bp += 4;
- GLfloat *xmove = (GLfloat *) bp; bp += 4;
- GLfloat *ymove = (GLfloat *) bp; bp += 4;
- GLubyte *bitmap = (GLubyte *) bins[0];
- weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap);
-}; break;
-case 5045: { // glBlendFunc
- GLenum *sfactor = (GLenum *) bp; bp += 4;
- GLenum *dfactor = (GLenum *) bp; bp += 4;
- weglBlendFunc(*sfactor,*dfactor);
-}; break;
-case 5046: { // glCallList
- GLuint *list = (GLuint *) bp; bp += 4;
- weglCallList(*list);
-}; break;
-case 5047: { // glCallLists
- int * listsLen = (int *) bp; bp += 4;
- GLuint * lists = (GLuint *) bp; bp += (8-((*listsLen*4+4)%8))%8;
- weglCallLists(*listsLen,GL_UNSIGNED_INT,lists);
-}; break;
-case 5048: { // glClear
- GLbitfield *mask = (GLbitfield *) bp; bp += 4;
- weglClear(*mask);
-}; break;
-case 5049: { // glClearAccum
- GLfloat *red = (GLfloat *) bp; bp += 4;
- GLfloat *green = (GLfloat *) bp; bp += 4;
- GLfloat *blue = (GLfloat *) bp; bp += 4;
- GLfloat *alpha = (GLfloat *) bp; bp += 4;
- weglClearAccum(*red,*green,*blue,*alpha);
+case 5037: { // glClearIndex
+ GLfloat *c = (GLfloat *) bp; bp += 4;
+ weglClearIndex(*c);
}; break;
-case 5050: { // glClearColor
+case 5038: { // glClearColor
GLclampf *red = (GLclampf *) bp; bp += 4;
GLclampf *green = (GLclampf *) bp; bp += 4;
GLclampf *blue = (GLclampf *) bp; bp += 4;
GLclampf *alpha = (GLclampf *) bp; bp += 4;
weglClearColor(*red,*green,*blue,*alpha);
}; break;
-case 5051: { // glClearDepth
- GLclampd *depth = (GLclampd *) bp; bp += 8;
- weglClearDepth(*depth);
-}; break;
-case 5052: { // glClearIndex
- GLfloat *c = (GLfloat *) bp; bp += 4;
- weglClearIndex(*c);
-}; break;
-case 5053: { // glClearStencil
- GLint *s = (GLint *) bp; bp += 4;
- weglClearStencil(*s);
-}; break;
-case 5054: { // glClipPlane
- GLenum *plane = (GLenum *) bp; bp += 4;
- bp += 4;
- GLdouble * equation = (GLdouble *) bp; bp += 32;
- weglClipPlane(*plane,equation);
-}; break;
-case 5055: { // glColor3bv
- GLbyte *v = (GLbyte *) bp; bp += 1;
- weglColor3bv(v);
-}; break;
-case 5056: { // glColor3dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglColor3dv(v);
-}; break;
-case 5057: { // glColor3fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglColor3fv(v);
-}; break;
-case 5058: { // glColor3iv
- GLint *v = (GLint *) bp; bp += 4;
- weglColor3iv(v);
-}; break;
-case 5059: { // glColor3sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglColor3sv(v);
-}; break;
-case 5060: { // glColor3ubv
- GLubyte *v = (GLubyte *) bp; bp += 1;
- weglColor3ubv(v);
-}; break;
-case 5061: { // glColor3uiv
- GLuint *v = (GLuint *) bp; bp += 4;
- weglColor3uiv(v);
-}; break;
-case 5062: { // glColor3usv
- GLushort *v = (GLushort *) bp; bp += 2;
- weglColor3usv(v);
-}; break;
-case 5063: { // glColor4bv
- GLbyte *v = (GLbyte *) bp; bp += 1;
- weglColor4bv(v);
-}; break;
-case 5064: { // glColor4dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglColor4dv(v);
-}; break;
-case 5065: { // glColor4fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglColor4fv(v);
-}; break;
-case 5066: { // glColor4iv
- GLint *v = (GLint *) bp; bp += 4;
- weglColor4iv(v);
-}; break;
-case 5067: { // glColor4sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglColor4sv(v);
-}; break;
-case 5068: { // glColor4ubv
- GLubyte *v = (GLubyte *) bp; bp += 1;
- weglColor4ubv(v);
-}; break;
-case 5069: { // glColor4uiv
- GLuint *v = (GLuint *) bp; bp += 4;
- weglColor4uiv(v);
+case 5039: { // glClear
+ GLbitfield *mask = (GLbitfield *) bp; bp += 4;
+ weglClear(*mask);
}; break;
-case 5070: { // glColor4usv
- GLushort *v = (GLushort *) bp; bp += 2;
- weglColor4usv(v);
+case 5040: { // glIndexMask
+ GLuint *mask = (GLuint *) bp; bp += 4;
+ weglIndexMask(*mask);
}; break;
-case 5071: { // glColorMask
+case 5041: { // glColorMask
GLboolean *red = (GLboolean *) bp; bp += 1;
GLboolean *green = (GLboolean *) bp; bp += 1;
GLboolean *blue = (GLboolean *) bp; bp += 1;
GLboolean *alpha = (GLboolean *) bp; bp += 1;
weglColorMask(*red,*green,*blue,*alpha);
}; break;
-case 5072: { // glColorMaterial
- GLenum *face = (GLenum *) bp; bp += 4;
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglColorMaterial(*face,*mode);
-}; break;
-case 5073: { // glColorPointer
- GLint *size = (GLint *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglColorPointer(*size,*type,*stride,pointer);
-}; break;
-case 5074: { // glColorPointer
- GLint *size = (GLint *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) bins[0];
- weglColorPointer(*size,*type,*stride,pointer);
-}; break;
-case 5075: { // glCopyPixels
- GLint *x = (GLint *) bp; bp += 4;
- GLint *y = (GLint *) bp; bp += 4;
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- weglCopyPixels(*x,*y,*width,*height,*type);
-}; break;
-case 5076: { // glCopyTexImage1D
- GLenum *target = (GLenum *) bp; bp += 4;
- GLint *level = (GLint *) bp; bp += 4;
- GLenum *internalFormat = (GLenum *) bp; bp += 4;
- GLint *x = (GLint *) bp; bp += 4;
- GLint *y = (GLint *) bp; bp += 4;
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLint *border = (GLint *) bp; bp += 4;
- weglCopyTexImage1D(*target,*level,*internalFormat,*x,*y,*width,*border);
-}; break;
-case 5077: { // glCopyTexImage2D
- GLenum *target = (GLenum *) bp; bp += 4;
- GLint *level = (GLint *) bp; bp += 4;
- GLenum *internalFormat = (GLenum *) bp; bp += 4;
- GLint *x = (GLint *) bp; bp += 4;
- GLint *y = (GLint *) bp; bp += 4;
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- GLint *border = (GLint *) bp; bp += 4;
- weglCopyTexImage2D(*target,*level,*internalFormat,*x,*y,*width,*height,*border);
+case 5042: { // glAlphaFunc
+ GLenum *func = (GLenum *) bp; bp += 4;
+ GLclampf *ref = (GLclampf *) bp; bp += 4;
+ weglAlphaFunc(*func,*ref);
}; break;
-case 5078: { // glCopyTexSubImage1D
- GLenum *target = (GLenum *) bp; bp += 4;
- GLint *level = (GLint *) bp; bp += 4;
- GLint *xoffset = (GLint *) bp; bp += 4;
- GLint *x = (GLint *) bp; bp += 4;
- GLint *y = (GLint *) bp; bp += 4;
- GLsizei *width = (GLsizei *) bp; bp += 4;
- weglCopyTexSubImage1D(*target,*level,*xoffset,*x,*y,*width);
+case 5043: { // glBlendFunc
+ GLenum *sfactor = (GLenum *) bp; bp += 4;
+ GLenum *dfactor = (GLenum *) bp; bp += 4;
+ weglBlendFunc(*sfactor,*dfactor);
}; break;
-case 5079: { // glCopyTexSubImage2D
- GLenum *target = (GLenum *) bp; bp += 4;
- GLint *level = (GLint *) bp; bp += 4;
- GLint *xoffset = (GLint *) bp; bp += 4;
- GLint *yoffset = (GLint *) bp; bp += 4;
- GLint *x = (GLint *) bp; bp += 4;
- GLint *y = (GLint *) bp; bp += 4;
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- weglCopyTexSubImage2D(*target,*level,*xoffset,*yoffset,*x,*y,*width,*height);
+case 5044: { // glLogicOp
+ GLenum *opcode = (GLenum *) bp; bp += 4;
+ weglLogicOp(*opcode);
}; break;
-case 5080: { // glCullFace
+case 5045: { // glCullFace
GLenum *mode = (GLenum *) bp; bp += 4;
weglCullFace(*mode);
}; break;
-case 5081: { // glDeleteLists
- GLuint *list = (GLuint *) bp; bp += 4;
- GLsizei *range = (GLsizei *) bp; bp += 4;
- weglDeleteLists(*list,*range);
-}; break;
-case 5082: { // glDeleteTextures
- int * texturesLen = (int *) bp; bp += 4;
- GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8;
- weglDeleteTextures(*texturesLen,textures);
-}; break;
-case 5083: { // glDepthFunc
- GLenum *func = (GLenum *) bp; bp += 4;
- weglDepthFunc(*func);
-}; break;
-case 5084: { // glDepthMask
- GLboolean *flag = (GLboolean *) bp; bp += 1;
- weglDepthMask(*flag);
-}; break;
-case 5085: { // glDepthRange
- GLclampd *zNear = (GLclampd *) bp; bp += 8;
- GLclampd *zFar = (GLclampd *) bp; bp += 8;
- weglDepthRange(*zNear,*zFar);
-}; break;
-case 5086: { // glDisable
- GLenum *cap = (GLenum *) bp; bp += 4;
- weglDisable(*cap);
+case 5046: { // glFrontFace
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ weglFrontFace(*mode);
}; break;
-case 5087: { // glDisableClientState
- GLenum *array = (GLenum *) bp; bp += 4;
- weglDisableClientState(*array);
+case 5047: { // glPointSize
+ GLfloat *size = (GLfloat *) bp; bp += 4;
+ weglPointSize(*size);
}; break;
-case 5088: { // glDrawArrays
- GLenum *mode = (GLenum *) bp; bp += 4;
- GLint *first = (GLint *) bp; bp += 4;
- GLsizei *count = (GLsizei *) bp; bp += 4;
- weglDrawArrays(*mode,*first,*count);
+case 5048: { // glLineWidth
+ GLfloat *width = (GLfloat *) bp; bp += 4;
+ weglLineWidth(*width);
}; break;
-case 5089: { // glDrawBuffer
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglDrawBuffer(*mode);
+case 5049: { // glLineStipple
+ GLint *factor = (GLint *) bp; bp += 4;
+ GLushort *pattern = (GLushort *) bp; bp += 2;
+ weglLineStipple(*factor,*pattern);
}; break;
-case 5090: { // glDrawElements
+case 5050: { // glPolygonMode
+ GLenum *face = (GLenum *) bp; bp += 4;
GLenum *mode = (GLenum *) bp; bp += 4;
- GLsizei *count = (GLsizei *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglDrawElements(*mode,*count,*type,indices);
+ weglPolygonMode(*face,*mode);
}; break;
-case 5091: { // glDrawElements
- GLenum *mode = (GLenum *) bp; bp += 4;
- GLsizei *count = (GLsizei *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLvoid *indices = (GLvoid *) bins[0];
- weglDrawElements(*mode,*count,*type,indices);
+case 5051: { // glPolygonOffset
+ GLfloat *factor = (GLfloat *) bp; bp += 4;
+ GLfloat *units = (GLfloat *) bp; bp += 4;
+ weglPolygonOffset(*factor,*units);
}; break;
-case 5092: { // glDrawPixels
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- GLenum *format = (GLenum *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglDrawPixels(*width,*height,*format,*type,pixels);
+case 5052: { // glPolygonStipple
+ GLubyte *mask = (GLubyte *) bins[0];
+ weglPolygonStipple(mask);
}; break;
-case 5093: { // glDrawPixels
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- GLenum *format = (GLenum *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLvoid *pixels = (GLvoid *) bins[0];
- weglDrawPixels(*width,*height,*format,*type,pixels);
+case 5053: { // glGetPolygonStipple
+ ErlDrvBinary *mask = driver_alloc_binary(128);
+ weglGetPolygonStipple((GLubyte*) mask->orig_bytes);
+ int AP = 0; ErlDrvTermData rt[8];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) mask; rt[AP++] = 128; rt[AP++] = 0;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+ driver_free_binary(mask);
}; break;
-case 5094: { // glEdgeFlagv
+case 5054: { // glEdgeFlagv
GLboolean *flag = (GLboolean *) bp; bp += 1;
weglEdgeFlagv(flag);
}; break;
-case 5095: { // glEdgeFlagPointer
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglEdgeFlagPointer(*stride,pointer);
-}; break;
-case 5096: { // glEdgeFlagPointer
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) bins[0];
- weglEdgeFlagPointer(*stride,pointer);
-}; break;
-case 5097: { // glEnable
- GLenum *cap = (GLenum *) bp; bp += 4;
- weglEnable(*cap);
-}; break;
-case 5098: { // glEnableClientState
- GLenum *array = (GLenum *) bp; bp += 4;
- weglEnableClientState(*array);
-}; break;
-case 5099: { // glEnd
- weglEnd();
-}; break;
-case 5100: { // glEndList
- weglEndList();
-}; break;
-case 5101: { // glEvalCoord1dv
- GLdouble *u = (GLdouble *) bp; bp += 8;
- weglEvalCoord1dv(u);
-}; break;
-case 5102: { // glEvalCoord1fv
- GLfloat *u = (GLfloat *) bp; bp += 4;
- weglEvalCoord1fv(u);
-}; break;
-case 5103: { // glEvalCoord2dv
- GLdouble *u = (GLdouble *) bp; bp += 8;
- weglEvalCoord2dv(u);
-}; break;
-case 5104: { // glEvalCoord2fv
- GLfloat *u = (GLfloat *) bp; bp += 4;
- weglEvalCoord2fv(u);
-}; break;
-case 5105: { // glEvalMesh1
- GLenum *mode = (GLenum *) bp; bp += 4;
- GLint *i1 = (GLint *) bp; bp += 4;
- GLint *i2 = (GLint *) bp; bp += 4;
- weglEvalMesh1(*mode,*i1,*i2);
-}; break;
-case 5106: { // glEvalMesh2
- GLenum *mode = (GLenum *) bp; bp += 4;
- GLint *i1 = (GLint *) bp; bp += 4;
- GLint *i2 = (GLint *) bp; bp += 4;
- GLint *j1 = (GLint *) bp; bp += 4;
- GLint *j2 = (GLint *) bp; bp += 4;
- weglEvalMesh2(*mode,*i1,*i2,*j1,*j2);
-}; break;
-case 5107: { // glEvalPoint1
- GLint *i = (GLint *) bp; bp += 4;
- weglEvalPoint1(*i);
+case 5055: { // glScissor
+ GLint *x = (GLint *) bp; bp += 4;
+ GLint *y = (GLint *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ weglScissor(*x,*y,*width,*height);
}; break;
-case 5108: { // glEvalPoint2
- GLint *i = (GLint *) bp; bp += 4;
- GLint *j = (GLint *) bp; bp += 4;
- weglEvalPoint2(*i,*j);
+case 5056: { // glClipPlane
+ GLenum *plane = (GLenum *) bp; bp += 4;
+ bp += 4;
+ GLdouble * equation = (GLdouble *) bp; bp += 32;
+ weglClipPlane(*plane,equation);
}; break;
-case 5109: { // glFeedbackBuffer
- GLsizei *size = (GLsizei *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLfloat *buffer = (GLfloat *) bins[0];
- weglFeedbackBuffer(*size,*type,buffer);
- int AP = 0; ErlDrvTermData rt[6];
+case 5057: { // glGetClipPlane
+ GLenum *plane = (GLenum *) bp; bp += 4;
+ GLdouble equation[4] = {0.0,0.0,0.0,0.0};
+ weglGetClipPlane(*plane,equation);
+ int AP = 0; ErlDrvTermData rt[14];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ GLdouble *equationTmp = equation;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5110: { // glFinish
- weglFinish();
-}; break;
-case 5111: { // glFlush
- weglFlush();
-}; break;
-case 5112: { // glFogf
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat *param = (GLfloat *) bp; bp += 4;
- weglFogf(*pname,*param);
-}; break;
-case 5113: { // glFogfv
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4;
- weglFogfv(*pname,params);
-}; break;
-case 5114: { // glFogi
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglFogi(*pname,*param);
-}; break;
-case 5115: { // glFogiv
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4;
- weglFogiv(*pname,params);
+case 5058: { // glDrawBuffer
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ weglDrawBuffer(*mode);
}; break;
-case 5116: { // glFrontFace
+case 5059: { // glReadBuffer
GLenum *mode = (GLenum *) bp; bp += 4;
- weglFrontFace(*mode);
+ weglReadBuffer(*mode);
}; break;
-case 5117: { // glFrustum
- GLdouble *left = (GLdouble *) bp; bp += 8;
- GLdouble *right = (GLdouble *) bp; bp += 8;
- GLdouble *bottom = (GLdouble *) bp; bp += 8;
- GLdouble *top = (GLdouble *) bp; bp += 8;
- GLdouble *zNear = (GLdouble *) bp; bp += 8;
- GLdouble *zFar = (GLdouble *) bp; bp += 8;
- weglFrustum(*left,*right,*bottom,*top,*zNear,*zFar);
+case 5060: { // glEnable
+ GLenum *cap = (GLenum *) bp; bp += 4;
+ weglEnable(*cap);
}; break;
-case 5118: { // glGenLists
- GLsizei *range = (GLsizei *) bp; bp += 4;
- GLuint result = weglGenLists(*range);
+case 5061: { // glDisable
+ GLenum *cap = (GLenum *) bp; bp += 4;
+ weglDisable(*cap);
+}; break;
+case 5062: { // glIsEnabled
+ GLenum *cap = (GLenum *) bp; bp += 4;
+ GLboolean result = weglIsEnabled(*cap);
int AP = 0; ErlDrvTermData rt[6];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5119: { // glGenTextures
- GLsizei *n = (GLsizei *) bp; bp += 4;
- GLuint *textures;
- textures = (GLuint *) driver_alloc(sizeof(GLuint) * *n);
- weglGenTextures(*n,textures);
- int AP = 0; ErlDrvTermData *rt;
- rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*n)*2));
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- for(int i=0; i < *n; i++) {
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) textures[i];}
- rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
- driver_free(rt);
- driver_free(textures);
+case 5063: { // glEnableClientState
+ GLenum *cap = (GLenum *) bp; bp += 4;
+ weglEnableClientState(*cap);
}; break;
-case 5120: { // glGetBooleanv
+case 5064: { // glDisableClientState
+ GLenum *cap = (GLenum *) bp; bp += 4;
+ weglDisableClientState(*cap);
+}; break;
+case 5065: { // glGetBooleanv
GLenum *pname = (GLenum *) bp; bp += 4;
GLboolean params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
weglGetBooleanv(*pname,params);
@@ -843,22 +523,7 @@ case 5120: { // glGetBooleanv
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5121: { // glGetClipPlane
- GLenum *plane = (GLenum *) bp; bp += 4;
- GLdouble equation[4] = {0.0,0.0,0.0,0.0};
- weglGetClipPlane(*plane,equation);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLdouble *equationTmp = equation;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
-}; break;
-case 5122: { // glGetDoublev
+case 5066: { // glGetDoublev
GLenum *pname = (GLenum *) bp; bp += 4;
GLdouble params[16] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
weglGetDoublev(*pname,params);
@@ -885,15 +550,7 @@ case 5122: { // glGetDoublev
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5123: { // glGetError
- GLenum result = weglGetError();
- int AP = 0; ErlDrvTermData rt[6];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
-}; break;
-case 5124: { // glGetFloatv
+case 5067: { // glGetFloatv
GLenum *pname = (GLenum *) bp; bp += 4;
GLfloat params[16] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
weglGetFloatv(*pname,params);
@@ -921,7 +578,7 @@ case 5124: { // glGetFloatv
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5125: { // glGetIntegerv
+case 5068: { // glGetIntegerv
GLenum *pname = (GLenum *) bp; bp += 4;
GLint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
weglGetIntegerv(*pname,params);
@@ -948,146 +605,38 @@ case 5125: { // glGetIntegerv
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5126: { // glGetLightfv
- GLenum *light = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat params[4] = {0.0,0.0,0.0,0.0};
- weglGetLightfv(*light,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLdouble paramsConv[4], *paramsTmp = paramsConv;
- for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
-}; break;
-case 5127: { // glGetLightiv
- GLenum *light = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint params[4] = {0,0,0,0};
- weglGetLightiv(*light,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLint *paramsTmp = params;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
-}; break;
-case 5128: { // glGetMapdv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *query = (GLenum *) bp; bp += 4;
- GLdouble *v = (GLdouble *) bins[0];
- weglGetMapdv(*target,*query,v);
- int AP = 0; ErlDrvTermData rt[6];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
-}; break;
-case 5129: { // glGetMapfv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *query = (GLenum *) bp; bp += 4;
- GLfloat *v = (GLfloat *) bins[0];
- weglGetMapfv(*target,*query,v);
- int AP = 0; ErlDrvTermData rt[6];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
-}; break;
-case 5130: { // glGetMapiv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *query = (GLenum *) bp; bp += 4;
- GLint *v = (GLint *) bins[0];
- weglGetMapiv(*target,*query,v);
- int AP = 0; ErlDrvTermData rt[6];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5069: { // glPushAttrib
+ GLbitfield *mask = (GLbitfield *) bp; bp += 4;
+ weglPushAttrib(*mask);
}; break;
-case 5131: { // glGetMaterialfv
- GLenum *face = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat params[4] = {0.0,0.0,0.0,0.0};
- weglGetMaterialfv(*face,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLdouble paramsConv[4], *paramsTmp = paramsConv;
- for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5070: { // glPopAttrib
+ weglPopAttrib();
}; break;
-case 5132: { // glGetMaterialiv
- GLenum *face = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint params[4] = {0,0,0,0};
- weglGetMaterialiv(*face,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLint *paramsTmp = params;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5071: { // glPushClientAttrib
+ GLbitfield *mask = (GLbitfield *) bp; bp += 4;
+ weglPushClientAttrib(*mask);
}; break;
-case 5133: { // glGetPixelMapfv
- GLenum *map = (GLenum *) bp; bp += 4;
- GLfloat *values = (GLfloat *) bins[0];
- weglGetPixelMapfv(*map,values);
- int AP = 0; ErlDrvTermData rt[6];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5072: { // glPopClientAttrib
+ weglPopClientAttrib();
}; break;
-case 5134: { // glGetPixelMapuiv
- GLenum *map = (GLenum *) bp; bp += 4;
- GLuint *values = (GLuint *) bins[0];
- weglGetPixelMapuiv(*map,values);
+case 5073: { // glRenderMode
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLint result = weglRenderMode(*mode);
int AP = 0; ErlDrvTermData rt[6];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5135: { // glGetPixelMapusv
- GLenum *map = (GLenum *) bp; bp += 4;
- GLushort *values = (GLushort *) bins[0];
- weglGetPixelMapusv(*map,values);
+case 5074: { // glGetError
+ GLenum result = weglGetError();
int AP = 0; ErlDrvTermData rt[6];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
-}; break;
-case 5136: { // glGetPolygonStipple
- ErlDrvBinary *mask = driver_alloc_binary(128);
- weglGetPolygonStipple((GLubyte*) mask->orig_bytes);
- int AP = 0; ErlDrvTermData rt[8];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) mask; rt[AP++] = 128; rt[AP++] = 0;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
- driver_free_binary(mask);
}; break;
-case 5137: { // glGetString
+case 5075: { // glGetString
GLenum *name = (GLenum *) bp; bp += 4;
const GLubyte * result = weglGetString(*name);
int AP = 0; ErlDrvTermData rt[7];
@@ -1096,229 +645,139 @@ case 5137: { // glGetString
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5138: { // glGetTexEnvfv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat params[4] = {0.0,0.0,0.0,0.0};
- weglGetTexEnvfv(*target,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLdouble paramsConv[4], *paramsTmp = paramsConv;
- for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5076: { // glFinish
+ weglFinish();
}; break;
-case 5139: { // glGetTexEnviv
+case 5077: { // glFlush
+ weglFlush();
+}; break;
+case 5078: { // glHint
GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint params[4] = {0,0,0,0};
- weglGetTexEnviv(*target,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLint *paramsTmp = params;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ weglHint(*target,*mode);
}; break;
-case 5140: { // glGetTexGendv
- GLenum *coord = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLdouble params[4] = {0.0,0.0,0.0,0.0};
- weglGetTexGendv(*coord,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLdouble *paramsTmp = params;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5079: { // glClearDepth
+ GLclampd *depth = (GLclampd *) bp; bp += 8;
+ weglClearDepth(*depth);
}; break;
-case 5141: { // glGetTexGenfv
- GLenum *coord = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat params[4] = {0.0,0.0,0.0,0.0};
- weglGetTexGenfv(*coord,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLdouble paramsConv[4], *paramsTmp = paramsConv;
- for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5080: { // glDepthFunc
+ GLenum *func = (GLenum *) bp; bp += 4;
+ weglDepthFunc(*func);
}; break;
-case 5142: { // glGetTexGeniv
- GLenum *coord = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint params[4] = {0,0,0,0};
- weglGetTexGeniv(*coord,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLint *paramsTmp = params;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5081: { // glDepthMask
+ GLboolean *flag = (GLboolean *) bp; bp += 1;
+ weglDepthMask(*flag);
}; break;
-case 5143: { // glGetTexImage
- GLenum *target = (GLenum *) bp; bp += 4;
- GLint *level = (GLint *) bp; bp += 4;
- GLenum *format = (GLenum *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLvoid *pixels = (GLvoid *) bins[0];
- weglGetTexImage(*target,*level,*format,*type,pixels);
- int AP = 0; ErlDrvTermData rt[6];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5082: { // glDepthRange
+ GLclampd *near_val = (GLclampd *) bp; bp += 8;
+ GLclampd *far_val = (GLclampd *) bp; bp += 8;
+ weglDepthRange(*near_val,*far_val);
}; break;
-case 5144: { // glGetTexLevelParameterfv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLint *level = (GLint *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat params[1] = {0.0};
- weglGetTexLevelParameterfv(*target,*level,*pname,params);
- int AP = 0; ErlDrvTermData rt[8];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLdouble paramsConv[1], *paramsTmp = paramsConv;
- for(int i=0; i < 1; i++) paramsConv[i] = (GLdouble) params[i];
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5083: { // glClearAccum
+ GLfloat *red = (GLfloat *) bp; bp += 4;
+ GLfloat *green = (GLfloat *) bp; bp += 4;
+ GLfloat *blue = (GLfloat *) bp; bp += 4;
+ GLfloat *alpha = (GLfloat *) bp; bp += 4;
+ weglClearAccum(*red,*green,*blue,*alpha);
}; break;
-case 5145: { // glGetTexLevelParameteriv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLint *level = (GLint *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint params[1] = {0};
- weglGetTexLevelParameteriv(*target,*level,*pname,params);
- int AP = 0; ErlDrvTermData rt[8];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLint *paramsTmp = params;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5084: { // glAccum
+ GLenum *op = (GLenum *) bp; bp += 4;
+ GLfloat *value = (GLfloat *) bp; bp += 4;
+ weglAccum(*op,*value);
}; break;
-case 5146: { // glGetTexParameterfv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat params[4] = {0.0,0.0,0.0,0.0};
- weglGetTexParameterfv(*target,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLdouble paramsConv[4], *paramsTmp = paramsConv;
- for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5085: { // glMatrixMode
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ weglMatrixMode(*mode);
}; break;
-case 5147: { // glGetTexParameteriv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint params[4] = {0,0,0,0};
- weglGetTexParameteriv(*target,*pname,params);
- int AP = 0; ErlDrvTermData rt[14];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- GLint *paramsTmp = params;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5086: { // glOrtho
+ GLdouble *left = (GLdouble *) bp; bp += 8;
+ GLdouble *right = (GLdouble *) bp; bp += 8;
+ GLdouble *bottom = (GLdouble *) bp; bp += 8;
+ GLdouble *top = (GLdouble *) bp; bp += 8;
+ GLdouble *near_val = (GLdouble *) bp; bp += 8;
+ GLdouble *far_val = (GLdouble *) bp; bp += 8;
+ weglOrtho(*left,*right,*bottom,*top,*near_val,*far_val);
}; break;
-case 5148: { // glHint
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglHint(*target,*mode);
+case 5087: { // glFrustum
+ GLdouble *left = (GLdouble *) bp; bp += 8;
+ GLdouble *right = (GLdouble *) bp; bp += 8;
+ GLdouble *bottom = (GLdouble *) bp; bp += 8;
+ GLdouble *top = (GLdouble *) bp; bp += 8;
+ GLdouble *near_val = (GLdouble *) bp; bp += 8;
+ GLdouble *far_val = (GLdouble *) bp; bp += 8;
+ weglFrustum(*left,*right,*bottom,*top,*near_val,*far_val);
}; break;
-case 5149: { // glIndexMask
- GLuint *mask = (GLuint *) bp; bp += 4;
- weglIndexMask(*mask);
+case 5088: { // glViewport
+ GLint *x = (GLint *) bp; bp += 4;
+ GLint *y = (GLint *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ weglViewport(*x,*y,*width,*height);
}; break;
-case 5150: { // glIndexPointer
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglIndexPointer(*type,*stride,pointer);
+case 5089: { // glPushMatrix
+ weglPushMatrix();
}; break;
-case 5151: { // glIndexPointer
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) bins[0];
- weglIndexPointer(*type,*stride,pointer);
+case 5090: { // glPopMatrix
+ weglPopMatrix();
}; break;
-case 5152: { // glIndexdv
- GLdouble *c = (GLdouble *) bp; bp += 8;
- weglIndexdv(c);
+case 5091: { // glLoadIdentity
+ weglLoadIdentity();
}; break;
-case 5153: { // glIndexfv
- GLfloat *c = (GLfloat *) bp; bp += 4;
- weglIndexfv(c);
+case 5092: { // glLoadMatrixd
+ GLdouble * m = (GLdouble *) bp; bp += 128;
+ weglLoadMatrixd(m);
}; break;
-case 5154: { // glIndexiv
- GLint *c = (GLint *) bp; bp += 4;
- weglIndexiv(c);
+case 5093: { // glLoadMatrixf
+ GLfloat * m = (GLfloat *) bp; bp += 64;
+ weglLoadMatrixf(m);
}; break;
-case 5155: { // glIndexsv
- GLshort *c = (GLshort *) bp; bp += 2;
- weglIndexsv(c);
+case 5094: { // glMultMatrixd
+ GLdouble * m = (GLdouble *) bp; bp += 128;
+ weglMultMatrixd(m);
}; break;
-case 5156: { // glIndexubv
- GLubyte *c = (GLubyte *) bp; bp += 1;
- weglIndexubv(c);
+case 5095: { // glMultMatrixf
+ GLfloat * m = (GLfloat *) bp; bp += 64;
+ weglMultMatrixf(m);
}; break;
-case 5157: { // glInitNames
- weglInitNames();
+case 5096: { // glRotated
+ GLdouble *angle = (GLdouble *) bp; bp += 8;
+ GLdouble *x = (GLdouble *) bp; bp += 8;
+ GLdouble *y = (GLdouble *) bp; bp += 8;
+ GLdouble *z = (GLdouble *) bp; bp += 8;
+ weglRotated(*angle,*x,*y,*z);
}; break;
-case 5158: { // glInterleavedArrays
- GLenum *format = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglInterleavedArrays(*format,*stride,pointer);
+case 5097: { // glRotatef
+ GLfloat *angle = (GLfloat *) bp; bp += 4;
+ GLfloat *x = (GLfloat *) bp; bp += 4;
+ GLfloat *y = (GLfloat *) bp; bp += 4;
+ GLfloat *z = (GLfloat *) bp; bp += 4;
+ weglRotatef(*angle,*x,*y,*z);
}; break;
-case 5159: { // glInterleavedArrays
- GLenum *format = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) bins[0];
- weglInterleavedArrays(*format,*stride,pointer);
+case 5098: { // glScaled
+ GLdouble *x = (GLdouble *) bp; bp += 8;
+ GLdouble *y = (GLdouble *) bp; bp += 8;
+ GLdouble *z = (GLdouble *) bp; bp += 8;
+ weglScaled(*x,*y,*z);
}; break;
-case 5160: { // glIsEnabled
- GLenum *cap = (GLenum *) bp; bp += 4;
- GLboolean result = weglIsEnabled(*cap);
- int AP = 0; ErlDrvTermData rt[6];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
+case 5099: { // glScalef
+ GLfloat *x = (GLfloat *) bp; bp += 4;
+ GLfloat *y = (GLfloat *) bp; bp += 4;
+ GLfloat *z = (GLfloat *) bp; bp += 4;
+ weglScalef(*x,*y,*z);
}; break;
-case 5161: { // glIsList
+case 5100: { // glTranslated
+ GLdouble *x = (GLdouble *) bp; bp += 8;
+ GLdouble *y = (GLdouble *) bp; bp += 8;
+ GLdouble *z = (GLdouble *) bp; bp += 8;
+ weglTranslated(*x,*y,*z);
+}; break;
+case 5101: { // glTranslatef
+ GLfloat *x = (GLfloat *) bp; bp += 4;
+ GLfloat *y = (GLfloat *) bp; bp += 4;
+ GLfloat *z = (GLfloat *) bp; bp += 4;
+ weglTranslatef(*x,*y,*z);
+}; break;
+case 5102: { // glIsList
GLuint *list = (GLuint *) bp; bp += 4;
GLboolean result = weglIsList(*list);
int AP = 0; ErlDrvTermData rt[6];
@@ -1327,760 +786,1129 @@ case 5161: { // glIsList
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5162: { // glIsTexture
- GLuint *texture = (GLuint *) bp; bp += 4;
- GLboolean result = weglIsTexture(*texture);
+case 5103: { // glDeleteLists
+ GLuint *list = (GLuint *) bp; bp += 4;
+ GLsizei *range = (GLsizei *) bp; bp += 4;
+ weglDeleteLists(*list,*range);
+}; break;
+case 5104: { // glGenLists
+ GLsizei *range = (GLsizei *) bp; bp += 4;
+ GLuint result = weglGenLists(*range);
int AP = 0; ErlDrvTermData rt[6];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5163: { // glLightModelf
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat *param = (GLfloat *) bp; bp += 4;
- weglLightModelf(*pname,*param);
-}; break;
-case 5164: { // glLightModelfv
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4;
- weglLightModelfv(*pname,params);
-}; break;
-case 5165: { // glLightModeli
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglLightModeli(*pname,*param);
-}; break;
-case 5166: { // glLightModeliv
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4;
- weglLightModeliv(*pname,params);
+case 5105: { // glNewList
+ GLuint *list = (GLuint *) bp; bp += 4;
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ weglNewList(*list,*mode);
}; break;
-case 5167: { // glLightf
- GLenum *light = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat *param = (GLfloat *) bp; bp += 4;
- weglLightf(*light,*pname,*param);
+case 5106: { // glEndList
+ weglEndList();
}; break;
-case 5168: { // glLightfv
- GLenum *light = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglLightfv(*light,*pname,params);
+case 5107: { // glCallList
+ GLuint *list = (GLuint *) bp; bp += 4;
+ weglCallList(*list);
}; break;
-case 5169: { // glLighti
- GLenum *light = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglLighti(*light,*pname,*param);
+case 5108: { // glCallLists
+ int * listsLen = (int *) bp; bp += 4;
+ GLuint * lists = (GLuint *) bp; bp += (8-((*listsLen*4+4)%8))%8;
+ weglCallLists(*listsLen,GL_UNSIGNED_INT,lists);
}; break;
-case 5170: { // glLightiv
- GLenum *light = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglLightiv(*light,*pname,params);
+case 5109: { // glListBase
+ GLuint *base = (GLuint *) bp; bp += 4;
+ weglListBase(*base);
}; break;
-case 5171: { // glLineStipple
- GLint *factor = (GLint *) bp; bp += 4;
- GLushort *pattern = (GLushort *) bp; bp += 2;
- weglLineStipple(*factor,*pattern);
+case 5110: { // glBegin
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ weglBegin(*mode);
}; break;
-case 5172: { // glLineWidth
- GLfloat *width = (GLfloat *) bp; bp += 4;
- weglLineWidth(*width);
+case 5111: { // glEnd
+ weglEnd();
}; break;
-case 5173: { // glListBase
- GLuint *base = (GLuint *) bp; bp += 4;
- weglListBase(*base);
+case 5112: { // glVertex2dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglVertex2dv(v);
}; break;
-case 5174: { // glLoadIdentity
- weglLoadIdentity();
+case 5113: { // glVertex2fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglVertex2fv(v);
}; break;
-case 5175: { // glLoadMatrixd
- GLdouble * m = (GLdouble *) bp; bp += 128;
- weglLoadMatrixd(m);
+case 5114: { // glVertex2iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglVertex2iv(v);
}; break;
-case 5176: { // glLoadMatrixf
- GLfloat * m = (GLfloat *) bp; bp += 64;
- weglLoadMatrixf(m);
+case 5115: { // glVertex2sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglVertex2sv(v);
}; break;
-case 5177: { // glLoadName
- GLuint *name = (GLuint *) bp; bp += 4;
- weglLoadName(*name);
+case 5116: { // glVertex3dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglVertex3dv(v);
}; break;
-case 5178: { // glLogicOp
- GLenum *opcode = (GLenum *) bp; bp += 4;
- weglLogicOp(*opcode);
+case 5117: { // glVertex3fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglVertex3fv(v);
}; break;
-case 5179: { // glMap1d
- GLenum *target = (GLenum *) bp; bp += 4;
- bp += 4;
- GLdouble *u1 = (GLdouble *) bp; bp += 8;
- GLdouble *u2 = (GLdouble *) bp; bp += 8;
- GLint *stride = (GLint *) bp; bp += 4;
- GLint *order = (GLint *) bp; bp += 4;
- GLdouble *points = (GLdouble *) bins[0];
- weglMap1d(*target,*u1,*u2,*stride,*order,points);
+case 5118: { // glVertex3iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglVertex3iv(v);
}; break;
-case 5180: { // glMap1f
- GLenum *target = (GLenum *) bp; bp += 4;
- GLfloat *u1 = (GLfloat *) bp; bp += 4;
- GLfloat *u2 = (GLfloat *) bp; bp += 4;
- GLint *stride = (GLint *) bp; bp += 4;
- GLint *order = (GLint *) bp; bp += 4;
- GLfloat *points = (GLfloat *) bins[0];
- weglMap1f(*target,*u1,*u2,*stride,*order,points);
+case 5119: { // glVertex3sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglVertex3sv(v);
}; break;
-case 5181: { // glMap2d
- GLenum *target = (GLenum *) bp; bp += 4;
- bp += 4;
- GLdouble *u1 = (GLdouble *) bp; bp += 8;
- GLdouble *u2 = (GLdouble *) bp; bp += 8;
- GLint *ustride = (GLint *) bp; bp += 4;
- GLint *uorder = (GLint *) bp; bp += 4;
- GLdouble *v1 = (GLdouble *) bp; bp += 8;
- GLdouble *v2 = (GLdouble *) bp; bp += 8;
- GLint *vstride = (GLint *) bp; bp += 4;
- GLint *vorder = (GLint *) bp; bp += 4;
- GLdouble *points = (GLdouble *) bins[0];
- weglMap2d(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points);
+case 5120: { // glVertex4dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglVertex4dv(v);
}; break;
-case 5182: { // glMap2f
- GLenum *target = (GLenum *) bp; bp += 4;
- GLfloat *u1 = (GLfloat *) bp; bp += 4;
- GLfloat *u2 = (GLfloat *) bp; bp += 4;
- GLint *ustride = (GLint *) bp; bp += 4;
- GLint *uorder = (GLint *) bp; bp += 4;
- GLfloat *v1 = (GLfloat *) bp; bp += 4;
- GLfloat *v2 = (GLfloat *) bp; bp += 4;
- GLint *vstride = (GLint *) bp; bp += 4;
- GLint *vorder = (GLint *) bp; bp += 4;
- GLfloat *points = (GLfloat *) bins[0];
- weglMap2f(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points);
+case 5121: { // glVertex4fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglVertex4fv(v);
}; break;
-case 5183: { // glMapGrid1d
- GLint *un = (GLint *) bp; bp += 4;
- bp += 4;
- GLdouble *u1 = (GLdouble *) bp; bp += 8;
- GLdouble *u2 = (GLdouble *) bp; bp += 8;
- weglMapGrid1d(*un,*u1,*u2);
+case 5122: { // glVertex4iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglVertex4iv(v);
}; break;
-case 5184: { // glMapGrid1f
- GLint *un = (GLint *) bp; bp += 4;
- GLfloat *u1 = (GLfloat *) bp; bp += 4;
- GLfloat *u2 = (GLfloat *) bp; bp += 4;
- weglMapGrid1f(*un,*u1,*u2);
+case 5123: { // glVertex4sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglVertex4sv(v);
}; break;
-case 5185: { // glMapGrid2d
- GLint *un = (GLint *) bp; bp += 4;
- bp += 4;
- GLdouble *u1 = (GLdouble *) bp; bp += 8;
- GLdouble *u2 = (GLdouble *) bp; bp += 8;
- GLint *vn = (GLint *) bp; bp += 4;
- bp += 4;
- GLdouble *v1 = (GLdouble *) bp; bp += 8;
- GLdouble *v2 = (GLdouble *) bp; bp += 8;
- weglMapGrid2d(*un,*u1,*u2,*vn,*v1,*v2);
+case 5124: { // glNormal3bv
+ GLbyte *v = (GLbyte *) bp; bp += 1;
+ weglNormal3bv(v);
}; break;
-case 5186: { // glMapGrid2f
- GLint *un = (GLint *) bp; bp += 4;
- GLfloat *u1 = (GLfloat *) bp; bp += 4;
- GLfloat *u2 = (GLfloat *) bp; bp += 4;
- GLint *vn = (GLint *) bp; bp += 4;
- GLfloat *v1 = (GLfloat *) bp; bp += 4;
- GLfloat *v2 = (GLfloat *) bp; bp += 4;
- weglMapGrid2f(*un,*u1,*u2,*vn,*v1,*v2);
+case 5125: { // glNormal3dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglNormal3dv(v);
}; break;
-case 5187: { // glMaterialf
- GLenum *face = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat *param = (GLfloat *) bp; bp += 4;
- weglMaterialf(*face,*pname,*param);
+case 5126: { // glNormal3fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglNormal3fv(v);
}; break;
-case 5188: { // glMaterialfv
- GLenum *face = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglMaterialfv(*face,*pname,params);
+case 5127: { // glNormal3iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglNormal3iv(v);
}; break;
-case 5189: { // glMateriali
- GLenum *face = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglMateriali(*face,*pname,*param);
+case 5128: { // glNormal3sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglNormal3sv(v);
}; break;
-case 5190: { // glMaterialiv
- GLenum *face = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglMaterialiv(*face,*pname,params);
+case 5129: { // glIndexdv
+ GLdouble *c = (GLdouble *) bp; bp += 8;
+ weglIndexdv(c);
}; break;
-case 5191: { // glMatrixMode
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglMatrixMode(*mode);
+case 5130: { // glIndexfv
+ GLfloat *c = (GLfloat *) bp; bp += 4;
+ weglIndexfv(c);
}; break;
-case 5192: { // glMultMatrixd
- GLdouble * m = (GLdouble *) bp; bp += 128;
- weglMultMatrixd(m);
+case 5131: { // glIndexiv
+ GLint *c = (GLint *) bp; bp += 4;
+ weglIndexiv(c);
}; break;
-case 5193: { // glMultMatrixf
- GLfloat * m = (GLfloat *) bp; bp += 64;
- weglMultMatrixf(m);
+case 5132: { // glIndexsv
+ GLshort *c = (GLshort *) bp; bp += 2;
+ weglIndexsv(c);
}; break;
-case 5194: { // glNewList
- GLuint *list = (GLuint *) bp; bp += 4;
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglNewList(*list,*mode);
+case 5133: { // glIndexubv
+ GLubyte *c = (GLubyte *) bp; bp += 1;
+ weglIndexubv(c);
}; break;
-case 5195: { // glNormal3bv
+case 5134: { // glColor3bv
GLbyte *v = (GLbyte *) bp; bp += 1;
- weglNormal3bv(v);
+ weglColor3bv(v);
}; break;
-case 5196: { // glNormal3dv
+case 5135: { // glColor3dv
GLdouble *v = (GLdouble *) bp; bp += 8;
- weglNormal3dv(v);
+ weglColor3dv(v);
}; break;
-case 5197: { // glNormal3fv
+case 5136: { // glColor3fv
GLfloat *v = (GLfloat *) bp; bp += 4;
- weglNormal3fv(v);
+ weglColor3fv(v);
}; break;
-case 5198: { // glNormal3iv
+case 5137: { // glColor3iv
GLint *v = (GLint *) bp; bp += 4;
- weglNormal3iv(v);
+ weglColor3iv(v);
}; break;
-case 5199: { // glNormal3sv
+case 5138: { // glColor3sv
GLshort *v = (GLshort *) bp; bp += 2;
- weglNormal3sv(v);
+ weglColor3sv(v);
}; break;
-case 5200: { // glNormalPointer
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglNormalPointer(*type,*stride,pointer);
+case 5139: { // glColor3ubv
+ GLubyte *v = (GLubyte *) bp; bp += 1;
+ weglColor3ubv(v);
}; break;
-case 5201: { // glNormalPointer
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) bins[0];
- weglNormalPointer(*type,*stride,pointer);
+case 5140: { // glColor3uiv
+ GLuint *v = (GLuint *) bp; bp += 4;
+ weglColor3uiv(v);
}; break;
-case 5202: { // glOrtho
- GLdouble *left = (GLdouble *) bp; bp += 8;
- GLdouble *right = (GLdouble *) bp; bp += 8;
- GLdouble *bottom = (GLdouble *) bp; bp += 8;
- GLdouble *top = (GLdouble *) bp; bp += 8;
- GLdouble *zNear = (GLdouble *) bp; bp += 8;
- GLdouble *zFar = (GLdouble *) bp; bp += 8;
- weglOrtho(*left,*right,*bottom,*top,*zNear,*zFar);
+case 5141: { // glColor3usv
+ GLushort *v = (GLushort *) bp; bp += 2;
+ weglColor3usv(v);
}; break;
-case 5203: { // glPassThrough
- GLfloat *token = (GLfloat *) bp; bp += 4;
- weglPassThrough(*token);
+case 5142: { // glColor4bv
+ GLbyte *v = (GLbyte *) bp; bp += 1;
+ weglColor4bv(v);
}; break;
-case 5204: { // glPixelMapfv
- GLenum *map = (GLenum *) bp; bp += 4;
- GLsizei *mapsize = (GLsizei *) bp; bp += 4;
- GLfloat *values = (GLfloat *) bins[0];
- weglPixelMapfv(*map,*mapsize,values);
+case 5143: { // glColor4dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglColor4dv(v);
}; break;
-case 5205: { // glPixelMapuiv
- GLenum *map = (GLenum *) bp; bp += 4;
- GLsizei *mapsize = (GLsizei *) bp; bp += 4;
- GLuint *values = (GLuint *) bins[0];
- weglPixelMapuiv(*map,*mapsize,values);
+case 5144: { // glColor4fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglColor4fv(v);
}; break;
-case 5206: { // glPixelMapusv
- GLenum *map = (GLenum *) bp; bp += 4;
- GLsizei *mapsize = (GLsizei *) bp; bp += 4;
- GLushort *values = (GLushort *) bins[0];
- weglPixelMapusv(*map,*mapsize,values);
+case 5145: { // glColor4iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglColor4iv(v);
}; break;
-case 5207: { // glPixelStoref
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat *param = (GLfloat *) bp; bp += 4;
- weglPixelStoref(*pname,*param);
+case 5146: { // glColor4sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglColor4sv(v);
}; break;
-case 5208: { // glPixelStorei
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglPixelStorei(*pname,*param);
+case 5147: { // glColor4ubv
+ GLubyte *v = (GLubyte *) bp; bp += 1;
+ weglColor4ubv(v);
}; break;
-case 5209: { // glPixelTransferf
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat *param = (GLfloat *) bp; bp += 4;
- weglPixelTransferf(*pname,*param);
+case 5148: { // glColor4uiv
+ GLuint *v = (GLuint *) bp; bp += 4;
+ weglColor4uiv(v);
}; break;
-case 5210: { // glPixelTransferi
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglPixelTransferi(*pname,*param);
+case 5149: { // glColor4usv
+ GLushort *v = (GLushort *) bp; bp += 2;
+ weglColor4usv(v);
}; break;
-case 5211: { // glPixelZoom
- GLfloat *xfactor = (GLfloat *) bp; bp += 4;
- GLfloat *yfactor = (GLfloat *) bp; bp += 4;
- weglPixelZoom(*xfactor,*yfactor);
+case 5150: { // glTexCoord1dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglTexCoord1dv(v);
}; break;
-case 5212: { // glPointSize
- GLfloat *size = (GLfloat *) bp; bp += 4;
- weglPointSize(*size);
+case 5151: { // glTexCoord1fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglTexCoord1fv(v);
}; break;
-case 5213: { // glPolygonMode
- GLenum *face = (GLenum *) bp; bp += 4;
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglPolygonMode(*face,*mode);
+case 5152: { // glTexCoord1iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglTexCoord1iv(v);
}; break;
-case 5214: { // glPolygonOffset
- GLfloat *factor = (GLfloat *) bp; bp += 4;
- GLfloat *units = (GLfloat *) bp; bp += 4;
- weglPolygonOffset(*factor,*units);
+case 5153: { // glTexCoord1sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglTexCoord1sv(v);
}; break;
-case 5215: { // glPolygonStipple
- GLubyte *mask = (GLubyte *) bins[0];
- weglPolygonStipple(mask);
+case 5154: { // glTexCoord2dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglTexCoord2dv(v);
}; break;
-case 5216: { // glPopAttrib
- weglPopAttrib();
+case 5155: { // glTexCoord2fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglTexCoord2fv(v);
}; break;
-case 5217: { // glPopClientAttrib
- weglPopClientAttrib();
+case 5156: { // glTexCoord2iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglTexCoord2iv(v);
}; break;
-case 5218: { // glPopMatrix
- weglPopMatrix();
+case 5157: { // glTexCoord2sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglTexCoord2sv(v);
}; break;
-case 5219: { // glPopName
- weglPopName();
+case 5158: { // glTexCoord3dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglTexCoord3dv(v);
}; break;
-case 5220: { // glPrioritizeTextures
- int * texturesLen = (int *) bp; bp += 4;
- GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8;
- int * prioritiesLen = (int *) bp; bp += 4;
- GLclampf * priorities = (GLclampf *) bp; bp += (8-((*prioritiesLen*4+4)%8))%8;
- weglPrioritizeTextures(*texturesLen,textures,priorities);
+case 5159: { // glTexCoord3fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglTexCoord3fv(v);
}; break;
-case 5221: { // glPushAttrib
- GLbitfield *mask = (GLbitfield *) bp; bp += 4;
- weglPushAttrib(*mask);
+case 5160: { // glTexCoord3iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglTexCoord3iv(v);
}; break;
-case 5222: { // glPushClientAttrib
- GLbitfield *mask = (GLbitfield *) bp; bp += 4;
- weglPushClientAttrib(*mask);
+case 5161: { // glTexCoord3sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglTexCoord3sv(v);
}; break;
-case 5223: { // glPushMatrix
- weglPushMatrix();
+case 5162: { // glTexCoord4dv
+ GLdouble *v = (GLdouble *) bp; bp += 8;
+ weglTexCoord4dv(v);
}; break;
-case 5224: { // glPushName
- GLuint *name = (GLuint *) bp; bp += 4;
- weglPushName(*name);
+case 5163: { // glTexCoord4fv
+ GLfloat *v = (GLfloat *) bp; bp += 4;
+ weglTexCoord4fv(v);
}; break;
-case 5225: { // glRasterPos2dv
+case 5164: { // glTexCoord4iv
+ GLint *v = (GLint *) bp; bp += 4;
+ weglTexCoord4iv(v);
+}; break;
+case 5165: { // glTexCoord4sv
+ GLshort *v = (GLshort *) bp; bp += 2;
+ weglTexCoord4sv(v);
+}; break;
+case 5166: { // glRasterPos2dv
GLdouble *v = (GLdouble *) bp; bp += 8;
weglRasterPos2dv(v);
}; break;
-case 5226: { // glRasterPos2fv
+case 5167: { // glRasterPos2fv
GLfloat *v = (GLfloat *) bp; bp += 4;
weglRasterPos2fv(v);
}; break;
-case 5227: { // glRasterPos2iv
+case 5168: { // glRasterPos2iv
GLint *v = (GLint *) bp; bp += 4;
weglRasterPos2iv(v);
}; break;
-case 5228: { // glRasterPos2sv
+case 5169: { // glRasterPos2sv
GLshort *v = (GLshort *) bp; bp += 2;
weglRasterPos2sv(v);
}; break;
-case 5229: { // glRasterPos3dv
+case 5170: { // glRasterPos3dv
GLdouble *v = (GLdouble *) bp; bp += 8;
weglRasterPos3dv(v);
}; break;
-case 5230: { // glRasterPos3fv
+case 5171: { // glRasterPos3fv
GLfloat *v = (GLfloat *) bp; bp += 4;
weglRasterPos3fv(v);
}; break;
-case 5231: { // glRasterPos3iv
+case 5172: { // glRasterPos3iv
GLint *v = (GLint *) bp; bp += 4;
weglRasterPos3iv(v);
}; break;
-case 5232: { // glRasterPos3sv
+case 5173: { // glRasterPos3sv
GLshort *v = (GLshort *) bp; bp += 2;
weglRasterPos3sv(v);
}; break;
-case 5233: { // glRasterPos4dv
+case 5174: { // glRasterPos4dv
GLdouble *v = (GLdouble *) bp; bp += 8;
weglRasterPos4dv(v);
}; break;
-case 5234: { // glRasterPos4fv
+case 5175: { // glRasterPos4fv
GLfloat *v = (GLfloat *) bp; bp += 4;
weglRasterPos4fv(v);
}; break;
-case 5235: { // glRasterPos4iv
+case 5176: { // glRasterPos4iv
GLint *v = (GLint *) bp; bp += 4;
weglRasterPos4iv(v);
}; break;
-case 5236: { // glRasterPos4sv
+case 5177: { // glRasterPos4sv
GLshort *v = (GLshort *) bp; bp += 2;
weglRasterPos4sv(v);
}; break;
-case 5237: { // glReadBuffer
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglReadBuffer(*mode);
-}; break;
-case 5238: { // glReadPixels
- GLint *x = (GLint *) bp; bp += 4;
- GLint *y = (GLint *) bp; bp += 4;
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- GLenum *format = (GLenum *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLvoid *pixels = (GLvoid *) bins[0];
- weglReadPixels(*x,*y,*width,*height,*format,*type,pixels);
- int AP = 0; ErlDrvTermData rt[6];
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
- rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
- driver_send_term(port,caller,rt,AP);
-}; break;
-case 5239: { // glRectd
+case 5178: { // glRectd
GLdouble *x1 = (GLdouble *) bp; bp += 8;
GLdouble *y1 = (GLdouble *) bp; bp += 8;
GLdouble *x2 = (GLdouble *) bp; bp += 8;
GLdouble *y2 = (GLdouble *) bp; bp += 8;
weglRectd(*x1,*y1,*x2,*y2);
}; break;
-case 5240: { // glRectdv
- GLdouble * v1 = (GLdouble *) bp; bp += 16;
- GLdouble * v2 = (GLdouble *) bp; bp += 16;
- weglRectdv(v1,v2);
-}; break;
-case 5241: { // glRectf
+case 5179: { // glRectf
GLfloat *x1 = (GLfloat *) bp; bp += 4;
GLfloat *y1 = (GLfloat *) bp; bp += 4;
GLfloat *x2 = (GLfloat *) bp; bp += 4;
GLfloat *y2 = (GLfloat *) bp; bp += 4;
weglRectf(*x1,*y1,*x2,*y2);
}; break;
-case 5242: { // glRectfv
- GLfloat * v1 = (GLfloat *) bp; bp += 8;
- GLfloat * v2 = (GLfloat *) bp; bp += 8;
- weglRectfv(v1,v2);
-}; break;
-case 5243: { // glRecti
+case 5180: { // glRecti
GLint *x1 = (GLint *) bp; bp += 4;
GLint *y1 = (GLint *) bp; bp += 4;
GLint *x2 = (GLint *) bp; bp += 4;
GLint *y2 = (GLint *) bp; bp += 4;
weglRecti(*x1,*y1,*x2,*y2);
}; break;
-case 5244: { // glRectiv
- GLint * v1 = (GLint *) bp; bp += 8;
- GLint * v2 = (GLint *) bp; bp += 8;
- weglRectiv(v1,v2);
-}; break;
-case 5245: { // glRects
+case 5181: { // glRects
GLshort *x1 = (GLshort *) bp; bp += 2;
GLshort *y1 = (GLshort *) bp; bp += 2;
GLshort *x2 = (GLshort *) bp; bp += 2;
GLshort *y2 = (GLshort *) bp; bp += 2;
weglRects(*x1,*y1,*x2,*y2);
}; break;
-case 5246: { // glRectsv
+case 5182: { // glRectdv
+ GLdouble * v1 = (GLdouble *) bp; bp += 16;
+ GLdouble * v2 = (GLdouble *) bp; bp += 16;
+ weglRectdv(v1,v2);
+}; break;
+case 5183: { // glRectfv
+ GLfloat * v1 = (GLfloat *) bp; bp += 8;
+ GLfloat * v2 = (GLfloat *) bp; bp += 8;
+ weglRectfv(v1,v2);
+}; break;
+case 5184: { // glRectiv
+ GLint * v1 = (GLint *) bp; bp += 8;
+ GLint * v2 = (GLint *) bp; bp += 8;
+ weglRectiv(v1,v2);
+}; break;
+case 5185: { // glRectsv
GLshort * v1 = (GLshort *) bp; bp += 4;
GLshort * v2 = (GLshort *) bp; bp += 4;
weglRectsv(v1,v2);
}; break;
-case 5247: { // glRenderMode
+case 5186: { // glVertexPointer
+ GLint *size = (GLint *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglVertexPointer(*size,*type,*stride,ptr);
+}; break;
+case 5187: { // glVertexPointer
+ GLint *size = (GLint *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) bins[0];
+ weglVertexPointer(*size,*type,*stride,ptr);
+}; break;
+case 5188: { // glNormalPointer
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglNormalPointer(*type,*stride,ptr);
+}; break;
+case 5189: { // glNormalPointer
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) bins[0];
+ weglNormalPointer(*type,*stride,ptr);
+}; break;
+case 5190: { // glColorPointer
+ GLint *size = (GLint *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglColorPointer(*size,*type,*stride,ptr);
+}; break;
+case 5191: { // glColorPointer
+ GLint *size = (GLint *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) bins[0];
+ weglColorPointer(*size,*type,*stride,ptr);
+}; break;
+case 5192: { // glIndexPointer
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglIndexPointer(*type,*stride,ptr);
+}; break;
+case 5193: { // glIndexPointer
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) bins[0];
+ weglIndexPointer(*type,*stride,ptr);
+}; break;
+case 5194: { // glTexCoordPointer
+ GLint *size = (GLint *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglTexCoordPointer(*size,*type,*stride,ptr);
+}; break;
+case 5195: { // glTexCoordPointer
+ GLint *size = (GLint *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) bins[0];
+ weglTexCoordPointer(*size,*type,*stride,ptr);
+}; break;
+case 5196: { // glEdgeFlagPointer
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglEdgeFlagPointer(*stride,ptr);
+}; break;
+case 5197: { // glEdgeFlagPointer
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *ptr = (GLvoid *) bins[0];
+ weglEdgeFlagPointer(*stride,ptr);
+}; break;
+case 5198: { // glArrayElement
+ GLint *i = (GLint *) bp; bp += 4;
+ weglArrayElement(*i);
+}; break;
+case 5199: { // glDrawArrays
GLenum *mode = (GLenum *) bp; bp += 4;
- GLint result = weglRenderMode(*mode);
+ GLint *first = (GLint *) bp; bp += 4;
+ GLsizei *count = (GLsizei *) bp; bp += 4;
+ weglDrawArrays(*mode,*first,*count);
+}; break;
+case 5200: { // glDrawElements
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLsizei *count = (GLsizei *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglDrawElements(*mode,*count,*type,indices);
+}; break;
+case 5201: { // glDrawElements
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLsizei *count = (GLsizei *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLvoid *indices = (GLvoid *) bins[0];
+ weglDrawElements(*mode,*count,*type,indices);
+}; break;
+case 5202: { // glInterleavedArrays
+ GLenum *format = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglInterleavedArrays(*format,*stride,pointer);
+}; break;
+case 5203: { // glInterleavedArrays
+ GLenum *format = (GLenum *) bp; bp += 4;
+ GLsizei *stride = (GLsizei *) bp; bp += 4;
+ GLvoid *pointer = (GLvoid *) bins[0];
+ weglInterleavedArrays(*format,*stride,pointer);
+}; break;
+case 5204: { // glShadeModel
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ weglShadeModel(*mode);
+}; break;
+case 5205: { // glLightf
+ GLenum *light = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat *param = (GLfloat *) bp; bp += 4;
+ weglLightf(*light,*pname,*param);
+}; break;
+case 5206: { // glLighti
+ GLenum *light = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint *param = (GLint *) bp; bp += 4;
+ weglLighti(*light,*pname,*param);
+}; break;
+case 5207: { // glLightfv
+ GLenum *light = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
+ weglLightfv(*light,*pname,params);
+}; break;
+case 5208: { // glLightiv
+ GLenum *light = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
+ weglLightiv(*light,*pname,params);
+}; break;
+case 5209: { // glGetLightfv
+ GLenum *light = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat params[4] = {0.0,0.0,0.0,0.0};
+ weglGetLightfv(*light,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLdouble paramsConv[4], *paramsTmp = paramsConv;
+ for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5210: { // glGetLightiv
+ GLenum *light = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint params[4] = {0,0,0,0};
+ weglGetLightiv(*light,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLint *paramsTmp = params;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5211: { // glLightModelf
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat *param = (GLfloat *) bp; bp += 4;
+ weglLightModelf(*pname,*param);
+}; break;
+case 5212: { // glLightModeli
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint *param = (GLint *) bp; bp += 4;
+ weglLightModeli(*pname,*param);
+}; break;
+case 5213: { // glLightModelfv
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4;
+ weglLightModelfv(*pname,params);
+}; break;
+case 5214: { // glLightModeliv
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4;
+ weglLightModeliv(*pname,params);
+}; break;
+case 5215: { // glMaterialf
+ GLenum *face = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat *param = (GLfloat *) bp; bp += 4;
+ weglMaterialf(*face,*pname,*param);
+}; break;
+case 5216: { // glMateriali
+ GLenum *face = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint *param = (GLint *) bp; bp += 4;
+ weglMateriali(*face,*pname,*param);
+}; break;
+case 5217: { // glMaterialfv
+ GLenum *face = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
+ weglMaterialfv(*face,*pname,params);
+}; break;
+case 5218: { // glMaterialiv
+ GLenum *face = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
+ weglMaterialiv(*face,*pname,params);
+}; break;
+case 5219: { // glGetMaterialfv
+ GLenum *face = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat params[4] = {0.0,0.0,0.0,0.0};
+ weglGetMaterialfv(*face,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLdouble paramsConv[4], *paramsTmp = paramsConv;
+ for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5220: { // glGetMaterialiv
+ GLenum *face = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint params[4] = {0,0,0,0};
+ weglGetMaterialiv(*face,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLint *paramsTmp = params;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5221: { // glColorMaterial
+ GLenum *face = (GLenum *) bp; bp += 4;
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ weglColorMaterial(*face,*mode);
+}; break;
+case 5222: { // glPixelZoom
+ GLfloat *xfactor = (GLfloat *) bp; bp += 4;
+ GLfloat *yfactor = (GLfloat *) bp; bp += 4;
+ weglPixelZoom(*xfactor,*yfactor);
+}; break;
+case 5223: { // glPixelStoref
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat *param = (GLfloat *) bp; bp += 4;
+ weglPixelStoref(*pname,*param);
+}; break;
+case 5224: { // glPixelStorei
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint *param = (GLint *) bp; bp += 4;
+ weglPixelStorei(*pname,*param);
+}; break;
+case 5225: { // glPixelTransferf
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat *param = (GLfloat *) bp; bp += 4;
+ weglPixelTransferf(*pname,*param);
+}; break;
+case 5226: { // glPixelTransferi
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint *param = (GLint *) bp; bp += 4;
+ weglPixelTransferi(*pname,*param);
+}; break;
+case 5227: { // glPixelMapfv
+ GLenum *map = (GLenum *) bp; bp += 4;
+ GLsizei *mapsize = (GLsizei *) bp; bp += 4;
+ GLfloat *values = (GLfloat *) bins[0];
+ weglPixelMapfv(*map,*mapsize,values);
+}; break;
+case 5228: { // glPixelMapuiv
+ GLenum *map = (GLenum *) bp; bp += 4;
+ GLsizei *mapsize = (GLsizei *) bp; bp += 4;
+ GLuint *values = (GLuint *) bins[0];
+ weglPixelMapuiv(*map,*mapsize,values);
+}; break;
+case 5229: { // glPixelMapusv
+ GLenum *map = (GLenum *) bp; bp += 4;
+ GLsizei *mapsize = (GLsizei *) bp; bp += 4;
+ GLushort *values = (GLushort *) bins[0];
+ weglPixelMapusv(*map,*mapsize,values);
+}; break;
+case 5230: { // glGetPixelMapfv
+ GLenum *map = (GLenum *) bp; bp += 4;
+ GLfloat *values = (GLfloat *) bins[0];
+ weglGetPixelMapfv(*map,values);
int AP = 0; ErlDrvTermData rt[6];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
- rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5248: { // glRotated
- GLdouble *angle = (GLdouble *) bp; bp += 8;
- GLdouble *x = (GLdouble *) bp; bp += 8;
- GLdouble *y = (GLdouble *) bp; bp += 8;
- GLdouble *z = (GLdouble *) bp; bp += 8;
- weglRotated(*angle,*x,*y,*z);
+case 5231: { // glGetPixelMapuiv
+ GLenum *map = (GLenum *) bp; bp += 4;
+ GLuint *values = (GLuint *) bins[0];
+ weglGetPixelMapuiv(*map,values);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5249: { // glRotatef
- GLfloat *angle = (GLfloat *) bp; bp += 4;
- GLfloat *x = (GLfloat *) bp; bp += 4;
- GLfloat *y = (GLfloat *) bp; bp += 4;
- GLfloat *z = (GLfloat *) bp; bp += 4;
- weglRotatef(*angle,*x,*y,*z);
+case 5232: { // glGetPixelMapusv
+ GLenum *map = (GLenum *) bp; bp += 4;
+ GLushort *values = (GLushort *) bins[0];
+ weglGetPixelMapusv(*map,values);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5250: { // glScaled
- GLdouble *x = (GLdouble *) bp; bp += 8;
- GLdouble *y = (GLdouble *) bp; bp += 8;
- GLdouble *z = (GLdouble *) bp; bp += 8;
- weglScaled(*x,*y,*z);
+case 5233: { // glBitmap
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ GLfloat *xorig = (GLfloat *) bp; bp += 4;
+ GLfloat *yorig = (GLfloat *) bp; bp += 4;
+ GLfloat *xmove = (GLfloat *) bp; bp += 4;
+ GLfloat *ymove = (GLfloat *) bp; bp += 4;
+ GLubyte *bitmap = (GLubyte *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap);
}; break;
-case 5251: { // glScalef
- GLfloat *x = (GLfloat *) bp; bp += 4;
- GLfloat *y = (GLfloat *) bp; bp += 4;
- GLfloat *z = (GLfloat *) bp; bp += 4;
- weglScalef(*x,*y,*z);
+case 5234: { // glBitmap
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ GLfloat *xorig = (GLfloat *) bp; bp += 4;
+ GLfloat *yorig = (GLfloat *) bp; bp += 4;
+ GLfloat *xmove = (GLfloat *) bp; bp += 4;
+ GLfloat *ymove = (GLfloat *) bp; bp += 4;
+ GLubyte *bitmap = (GLubyte *) bins[0];
+ weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap);
}; break;
-case 5252: { // glScissor
+case 5235: { // glReadPixels
GLint *x = (GLint *) bp; bp += 4;
GLint *y = (GLint *) bp; bp += 4;
GLsizei *width = (GLsizei *) bp; bp += 4;
GLsizei *height = (GLsizei *) bp; bp += 4;
- weglScissor(*x,*y,*width,*height);
-}; break;
-case 5253: { // glSelectBuffer
- GLsizei *size = (GLsizei *) bp; bp += 4;
- GLuint *buffer = (GLuint *) bins[0];
- weglSelectBuffer(*size,buffer);
+ GLenum *format = (GLenum *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLvoid *pixels = (GLvoid *) bins[0];
+ weglReadPixels(*x,*y,*width,*height,*format,*type,pixels);
int AP = 0; ErlDrvTermData rt[6];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5254: { // glShadeModel
- GLenum *mode = (GLenum *) bp; bp += 4;
- weglShadeModel(*mode);
+case 5236: { // glDrawPixels
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ GLenum *format = (GLenum *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ weglDrawPixels(*width,*height,*format,*type,pixels);
+}; break;
+case 5237: { // glDrawPixels
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ GLenum *format = (GLenum *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLvoid *pixels = (GLvoid *) bins[0];
+ weglDrawPixels(*width,*height,*format,*type,pixels);
+}; break;
+case 5238: { // glCopyPixels
+ GLint *x = (GLint *) bp; bp += 4;
+ GLint *y = (GLint *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ weglCopyPixels(*x,*y,*width,*height,*type);
}; break;
-case 5255: { // glStencilFunc
+case 5239: { // glStencilFunc
GLenum *func = (GLenum *) bp; bp += 4;
GLint *ref = (GLint *) bp; bp += 4;
GLuint *mask = (GLuint *) bp; bp += 4;
weglStencilFunc(*func,*ref,*mask);
}; break;
-case 5256: { // glStencilMask
+case 5240: { // glStencilMask
GLuint *mask = (GLuint *) bp; bp += 4;
weglStencilMask(*mask);
}; break;
-case 5257: { // glStencilOp
+case 5241: { // glStencilOp
GLenum *fail = (GLenum *) bp; bp += 4;
GLenum *zfail = (GLenum *) bp; bp += 4;
GLenum *zpass = (GLenum *) bp; bp += 4;
weglStencilOp(*fail,*zfail,*zpass);
}; break;
-case 5258: { // glTexCoord1dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglTexCoord1dv(v);
-}; break;
-case 5259: { // glTexCoord1fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglTexCoord1fv(v);
-}; break;
-case 5260: { // glTexCoord1iv
- GLint *v = (GLint *) bp; bp += 4;
- weglTexCoord1iv(v);
-}; break;
-case 5261: { // glTexCoord1sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglTexCoord1sv(v);
-}; break;
-case 5262: { // glTexCoord2dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglTexCoord2dv(v);
-}; break;
-case 5263: { // glTexCoord2fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglTexCoord2fv(v);
-}; break;
-case 5264: { // glTexCoord2iv
- GLint *v = (GLint *) bp; bp += 4;
- weglTexCoord2iv(v);
-}; break;
-case 5265: { // glTexCoord2sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglTexCoord2sv(v);
-}; break;
-case 5266: { // glTexCoord3dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglTexCoord3dv(v);
+case 5242: { // glClearStencil
+ GLint *s = (GLint *) bp; bp += 4;
+ weglClearStencil(*s);
}; break;
-case 5267: { // glTexCoord3fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglTexCoord3fv(v);
+case 5243: { // glTexGend
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLdouble *param = (GLdouble *) bp; bp += 8;
+ weglTexGend(*coord,*pname,*param);
}; break;
-case 5268: { // glTexCoord3iv
- GLint *v = (GLint *) bp; bp += 4;
- weglTexCoord3iv(v);
+case 5244: { // glTexGenf
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat *param = (GLfloat *) bp; bp += 4;
+ weglTexGenf(*coord,*pname,*param);
}; break;
-case 5269: { // glTexCoord3sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglTexCoord3sv(v);
+case 5245: { // glTexGeni
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint *param = (GLint *) bp; bp += 4;
+ weglTexGeni(*coord,*pname,*param);
}; break;
-case 5270: { // glTexCoord4dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglTexCoord4dv(v);
+case 5246: { // glTexGendv
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 8;
+ GLdouble *params = (GLdouble *) bp; bp += *paramsLen*8;
+ weglTexGendv(*coord,*pname,params);
}; break;
-case 5271: { // glTexCoord4fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglTexCoord4fv(v);
+case 5247: { // glTexGenfv
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
+ weglTexGenfv(*coord,*pname,params);
}; break;
-case 5272: { // glTexCoord4iv
- GLint *v = (GLint *) bp; bp += 4;
- weglTexCoord4iv(v);
+case 5248: { // glTexGeniv
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
+ weglTexGeniv(*coord,*pname,params);
}; break;
-case 5273: { // glTexCoord4sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglTexCoord4sv(v);
+case 5249: { // glGetTexGendv
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLdouble params[4] = {0.0,0.0,0.0,0.0};
+ weglGetTexGendv(*coord,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLdouble *paramsTmp = params;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5274: { // glTexCoordPointer
- GLint *size = (GLint *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglTexCoordPointer(*size,*type,*stride,pointer);
+case 5250: { // glGetTexGenfv
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat params[4] = {0.0,0.0,0.0,0.0};
+ weglGetTexGenfv(*coord,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLdouble paramsConv[4], *paramsTmp = paramsConv;
+ for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5275: { // glTexCoordPointer
- GLint *size = (GLint *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) bins[0];
- weglTexCoordPointer(*size,*type,*stride,pointer);
+case 5251: { // glGetTexGeniv
+ GLenum *coord = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint params[4] = {0,0,0,0};
+ weglGetTexGeniv(*coord,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLint *paramsTmp = params;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5276: { // glTexEnvf
+case 5252: { // glTexEnvf
GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
GLfloat *param = (GLfloat *) bp; bp += 4;
weglTexEnvf(*target,*pname,*param);
}; break;
-case 5277: { // glTexEnvfv
+case 5253: { // glTexEnvi
GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglTexEnvfv(*target,*pname,params);
+ GLint *param = (GLint *) bp; bp += 4;
+ weglTexEnvi(*target,*pname,*param);
}; break;
-case 5278: { // glTexEnvi
+case 5254: { // glTexEnvfv
GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglTexEnvi(*target,*pname,*param);
+ int *paramsLen = (int *) bp; bp += 4;
+ GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
+ weglTexEnvfv(*target,*pname,params);
}; break;
-case 5279: { // glTexEnviv
+case 5255: { // glTexEnviv
GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
int *paramsLen = (int *) bp; bp += 4;
GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
weglTexEnviv(*target,*pname,params);
}; break;
-case 5280: { // glTexGend
- GLenum *coord = (GLenum *) bp; bp += 4;
+case 5256: { // glGetTexEnvfv
+ GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
- GLdouble *param = (GLdouble *) bp; bp += 8;
- weglTexGend(*coord,*pname,*param);
+ GLfloat params[4] = {0.0,0.0,0.0,0.0};
+ weglGetTexEnvfv(*target,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLdouble paramsConv[4], *paramsTmp = paramsConv;
+ for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5281: { // glTexGendv
- GLenum *coord = (GLenum *) bp; bp += 4;
+case 5257: { // glGetTexEnviv
+ GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 8;
- GLdouble *params = (GLdouble *) bp; bp += *paramsLen*8;
- weglTexGendv(*coord,*pname,params);
+ GLint params[4] = {0,0,0,0};
+ weglGetTexEnviv(*target,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLint *paramsTmp = params;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5282: { // glTexGenf
- GLenum *coord = (GLenum *) bp; bp += 4;
+case 5258: { // glTexParameterf
+ GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
GLfloat *param = (GLfloat *) bp; bp += 4;
- weglTexGenf(*coord,*pname,*param);
+ weglTexParameterf(*target,*pname,*param);
}; break;
-case 5283: { // glTexGenfv
- GLenum *coord = (GLenum *) bp; bp += 4;
+case 5259: { // glTexParameteri
+ GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglTexGenfv(*coord,*pname,params);
+ GLint *param = (GLint *) bp; bp += 4;
+ weglTexParameteri(*target,*pname,*param);
}; break;
-case 5284: { // glTexGeni
- GLenum *coord = (GLenum *) bp; bp += 4;
+case 5260: { // glTexParameterfv
+ GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglTexGeni(*coord,*pname,*param);
+ int *paramsLen = (int *) bp; bp += 4;
+ GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
+ weglTexParameterfv(*target,*pname,params);
}; break;
-case 5285: { // glTexGeniv
- GLenum *coord = (GLenum *) bp; bp += 4;
+case 5261: { // glTexParameteriv
+ GLenum *target = (GLenum *) bp; bp += 4;
GLenum *pname = (GLenum *) bp; bp += 4;
int *paramsLen = (int *) bp; bp += 4;
GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglTexGeniv(*coord,*pname,params);
+ weglTexParameteriv(*target,*pname,params);
+}; break;
+case 5262: { // glGetTexParameterfv
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat params[4] = {0.0,0.0,0.0,0.0};
+ weglGetTexParameterfv(*target,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLdouble paramsConv[4], *paramsTmp = paramsConv;
+ for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i];
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5263: { // glGetTexParameteriv
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint params[4] = {0,0,0,0};
+ weglGetTexParameteriv(*target,*pname,params);
+ int AP = 0; ErlDrvTermData rt[14];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLint *paramsTmp = params;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5286: { // glTexImage1D
+case 5264: { // glGetTexLevelParameterfv
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
- GLint *internalformat = (GLint *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat params[1] = {0.0};
+ weglGetTexLevelParameterfv(*target,*level,*pname,params);
+ int AP = 0; ErlDrvTermData rt[8];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLdouble paramsConv[1], *paramsTmp = paramsConv;
+ for(int i=0; i < 1; i++) paramsConv[i] = (GLdouble) params[i];
+ rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5265: { // glGetTexLevelParameteriv
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLint *level = (GLint *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint params[1] = {0};
+ weglGetTexLevelParameteriv(*target,*level,*pname,params);
+ int AP = 0; ErlDrvTermData rt[8];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ GLint *paramsTmp = params;
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5266: { // glTexImage1D
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLint *level = (GLint *) bp; bp += 4;
+ GLint *internalFormat = (GLint *) bp; bp += 4;
GLsizei *width = (GLsizei *) bp; bp += 4;
GLint *border = (GLint *) bp; bp += 4;
GLenum *format = (GLenum *) bp; bp += 4;
GLenum *type = (GLenum *) bp; bp += 4;
GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglTexImage1D(*target,*level,*internalformat,*width,*border,*format,*type,pixels);
+ weglTexImage1D(*target,*level,*internalFormat,*width,*border,*format,*type,pixels);
}; break;
-case 5287: { // glTexImage1D
+case 5267: { // glTexImage1D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
- GLint *internalformat = (GLint *) bp; bp += 4;
+ GLint *internalFormat = (GLint *) bp; bp += 4;
GLsizei *width = (GLsizei *) bp; bp += 4;
GLint *border = (GLint *) bp; bp += 4;
GLenum *format = (GLenum *) bp; bp += 4;
GLenum *type = (GLenum *) bp; bp += 4;
GLvoid *pixels = (GLvoid *) bins[0];
- weglTexImage1D(*target,*level,*internalformat,*width,*border,*format,*type,pixels);
+ weglTexImage1D(*target,*level,*internalFormat,*width,*border,*format,*type,pixels);
}; break;
-case 5288: { // glTexImage2D
+case 5268: { // glTexImage2D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
- GLint *internalformat = (GLint *) bp; bp += 4;
+ GLint *internalFormat = (GLint *) bp; bp += 4;
GLsizei *width = (GLsizei *) bp; bp += 4;
GLsizei *height = (GLsizei *) bp; bp += 4;
GLint *border = (GLint *) bp; bp += 4;
GLenum *format = (GLenum *) bp; bp += 4;
GLenum *type = (GLenum *) bp; bp += 4;
GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglTexImage2D(*target,*level,*internalformat,*width,*height,*border,*format,*type,pixels);
+ weglTexImage2D(*target,*level,*internalFormat,*width,*height,*border,*format,*type,pixels);
}; break;
-case 5289: { // glTexImage2D
+case 5269: { // glTexImage2D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
- GLint *internalformat = (GLint *) bp; bp += 4;
+ GLint *internalFormat = (GLint *) bp; bp += 4;
GLsizei *width = (GLsizei *) bp; bp += 4;
GLsizei *height = (GLsizei *) bp; bp += 4;
GLint *border = (GLint *) bp; bp += 4;
GLenum *format = (GLenum *) bp; bp += 4;
GLenum *type = (GLenum *) bp; bp += 4;
GLvoid *pixels = (GLvoid *) bins[0];
- weglTexImage2D(*target,*level,*internalformat,*width,*height,*border,*format,*type,pixels);
+ weglTexImage2D(*target,*level,*internalFormat,*width,*height,*border,*format,*type,pixels);
}; break;
-case 5290: { // glTexParameterf
+case 5270: { // glGetTexImage
GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLfloat *param = (GLfloat *) bp; bp += 4;
- weglTexParameterf(*target,*pname,*param);
+ GLint *level = (GLint *) bp; bp += 4;
+ GLenum *format = (GLenum *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ GLvoid *pixels = (GLvoid *) bins[0];
+ weglGetTexImage(*target,*level,*format,*type,pixels);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5291: { // glTexParameterfv
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglTexParameterfv(*target,*pname,params);
+case 5271: { // glGenTextures
+ GLsizei *n = (GLsizei *) bp; bp += 4;
+ GLuint *textures;
+ textures = (GLuint *) driver_alloc(sizeof(GLuint) * *n);
+ weglGenTextures(*n,textures);
+ int AP = 0; ErlDrvTermData *rt;
+ rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*n)*2));
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ for(int i=0; i < *n; i++) {
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) textures[i];}
+ rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+ driver_free(rt);
+ driver_free(textures);
}; break;
-case 5292: { // glTexParameteri
- GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- GLint *param = (GLint *) bp; bp += 4;
- weglTexParameteri(*target,*pname,*param);
+case 5272: { // glDeleteTextures
+ int * texturesLen = (int *) bp; bp += 4;
+ GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8;
+ weglDeleteTextures(*texturesLen,textures);
}; break;
-case 5293: { // glTexParameteriv
+case 5273: { // glBindTexture
GLenum *target = (GLenum *) bp; bp += 4;
- GLenum *pname = (GLenum *) bp; bp += 4;
- int *paramsLen = (int *) bp; bp += 4;
- GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4;
- weglTexParameteriv(*target,*pname,params);
+ GLuint *texture = (GLuint *) bp; bp += 4;
+ weglBindTexture(*target,*texture);
}; break;
-case 5294: { // glTexSubImage1D
+case 5274: { // glPrioritizeTextures
+ int * texturesLen = (int *) bp; bp += 4;
+ GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8;
+ int * prioritiesLen = (int *) bp; bp += 4;
+ GLclampf * priorities = (GLclampf *) bp; bp += (8-((*prioritiesLen*4+4)%8))%8;
+ weglPrioritizeTextures(*texturesLen,textures,priorities);
+}; break;
+case 5275: { // glAreTexturesResident
+ int * texturesLen = (int *) bp; bp += 4;
+ GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8;
+ GLboolean *residences;
+ residences = (GLboolean *) driver_alloc(sizeof(GLboolean) * *texturesLen);
+ GLboolean result = weglAreTexturesResident(*texturesLen,textures,residences);
+ int AP = 0; ErlDrvTermData *rt;
+ rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(11 + (*texturesLen)*2));
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
+ for(int i=0; i < *texturesLen; i++) {
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) residences[i];}
+ rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*texturesLen)+1;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+ driver_free(rt);
+ driver_free(residences);
+}; break;
+case 5276: { // glIsTexture
+ GLuint *texture = (GLuint *) bp; bp += 4;
+ GLboolean result = weglIsTexture(*texture);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5277: { // glTexSubImage1D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
GLint *xoffset = (GLint *) bp; bp += 4;
@@ -2090,7 +1918,7 @@ case 5294: { // glTexSubImage1D
GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
weglTexSubImage1D(*target,*level,*xoffset,*width,*format,*type,pixels);
}; break;
-case 5295: { // glTexSubImage1D
+case 5278: { // glTexSubImage1D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
GLint *xoffset = (GLint *) bp; bp += 4;
@@ -2100,7 +1928,7 @@ case 5295: { // glTexSubImage1D
GLvoid *pixels = (GLvoid *) bins[0];
weglTexSubImage1D(*target,*level,*xoffset,*width,*format,*type,pixels);
}; break;
-case 5296: { // glTexSubImage2D
+case 5279: { // glTexSubImage2D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
GLint *xoffset = (GLint *) bp; bp += 4;
@@ -2112,7 +1940,7 @@ case 5296: { // glTexSubImage2D
GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
weglTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*type,pixels);
}; break;
-case 5297: { // glTexSubImage2D
+case 5280: { // glTexSubImage2D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
GLint *xoffset = (GLint *) bp; bp += 4;
@@ -2124,86 +1952,258 @@ case 5297: { // glTexSubImage2D
GLvoid *pixels = (GLvoid *) bins[0];
weglTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*type,pixels);
}; break;
-case 5298: { // glTranslated
- GLdouble *x = (GLdouble *) bp; bp += 8;
- GLdouble *y = (GLdouble *) bp; bp += 8;
- GLdouble *z = (GLdouble *) bp; bp += 8;
- weglTranslated(*x,*y,*z);
+case 5281: { // glCopyTexImage1D
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLint *level = (GLint *) bp; bp += 4;
+ GLenum *internalformat = (GLenum *) bp; bp += 4;
+ GLint *x = (GLint *) bp; bp += 4;
+ GLint *y = (GLint *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLint *border = (GLint *) bp; bp += 4;
+ weglCopyTexImage1D(*target,*level,*internalformat,*x,*y,*width,*border);
}; break;
-case 5299: { // glTranslatef
- GLfloat *x = (GLfloat *) bp; bp += 4;
- GLfloat *y = (GLfloat *) bp; bp += 4;
- GLfloat *z = (GLfloat *) bp; bp += 4;
- weglTranslatef(*x,*y,*z);
+case 5282: { // glCopyTexImage2D
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLint *level = (GLint *) bp; bp += 4;
+ GLenum *internalformat = (GLenum *) bp; bp += 4;
+ GLint *x = (GLint *) bp; bp += 4;
+ GLint *y = (GLint *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ GLint *border = (GLint *) bp; bp += 4;
+ weglCopyTexImage2D(*target,*level,*internalformat,*x,*y,*width,*height,*border);
}; break;
-case 5300: { // glVertex2dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglVertex2dv(v);
+case 5283: { // glCopyTexSubImage1D
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLint *level = (GLint *) bp; bp += 4;
+ GLint *xoffset = (GLint *) bp; bp += 4;
+ GLint *x = (GLint *) bp; bp += 4;
+ GLint *y = (GLint *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ weglCopyTexSubImage1D(*target,*level,*xoffset,*x,*y,*width);
}; break;
-case 5301: { // glVertex2fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglVertex2fv(v);
+case 5284: { // glCopyTexSubImage2D
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLint *level = (GLint *) bp; bp += 4;
+ GLint *xoffset = (GLint *) bp; bp += 4;
+ GLint *yoffset = (GLint *) bp; bp += 4;
+ GLint *x = (GLint *) bp; bp += 4;
+ GLint *y = (GLint *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ weglCopyTexSubImage2D(*target,*level,*xoffset,*yoffset,*x,*y,*width,*height);
}; break;
-case 5302: { // glVertex2iv
- GLint *v = (GLint *) bp; bp += 4;
- weglVertex2iv(v);
+case 5285: { // glMap1d
+ GLenum *target = (GLenum *) bp; bp += 4;
+ bp += 4;
+ GLdouble *u1 = (GLdouble *) bp; bp += 8;
+ GLdouble *u2 = (GLdouble *) bp; bp += 8;
+ GLint *stride = (GLint *) bp; bp += 4;
+ GLint *order = (GLint *) bp; bp += 4;
+ GLdouble *points = (GLdouble *) bins[0];
+ weglMap1d(*target,*u1,*u2,*stride,*order,points);
}; break;
-case 5303: { // glVertex2sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglVertex2sv(v);
+case 5286: { // glMap1f
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLfloat *u1 = (GLfloat *) bp; bp += 4;
+ GLfloat *u2 = (GLfloat *) bp; bp += 4;
+ GLint *stride = (GLint *) bp; bp += 4;
+ GLint *order = (GLint *) bp; bp += 4;
+ GLfloat *points = (GLfloat *) bins[0];
+ weglMap1f(*target,*u1,*u2,*stride,*order,points);
}; break;
-case 5304: { // glVertex3dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglVertex3dv(v);
+case 5287: { // glMap2d
+ GLenum *target = (GLenum *) bp; bp += 4;
+ bp += 4;
+ GLdouble *u1 = (GLdouble *) bp; bp += 8;
+ GLdouble *u2 = (GLdouble *) bp; bp += 8;
+ GLint *ustride = (GLint *) bp; bp += 4;
+ GLint *uorder = (GLint *) bp; bp += 4;
+ GLdouble *v1 = (GLdouble *) bp; bp += 8;
+ GLdouble *v2 = (GLdouble *) bp; bp += 8;
+ GLint *vstride = (GLint *) bp; bp += 4;
+ GLint *vorder = (GLint *) bp; bp += 4;
+ GLdouble *points = (GLdouble *) bins[0];
+ weglMap2d(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points);
}; break;
-case 5305: { // glVertex3fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglVertex3fv(v);
+case 5288: { // glMap2f
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLfloat *u1 = (GLfloat *) bp; bp += 4;
+ GLfloat *u2 = (GLfloat *) bp; bp += 4;
+ GLint *ustride = (GLint *) bp; bp += 4;
+ GLint *uorder = (GLint *) bp; bp += 4;
+ GLfloat *v1 = (GLfloat *) bp; bp += 4;
+ GLfloat *v2 = (GLfloat *) bp; bp += 4;
+ GLint *vstride = (GLint *) bp; bp += 4;
+ GLint *vorder = (GLint *) bp; bp += 4;
+ GLfloat *points = (GLfloat *) bins[0];
+ weglMap2f(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points);
}; break;
-case 5306: { // glVertex3iv
- GLint *v = (GLint *) bp; bp += 4;
- weglVertex3iv(v);
+case 5289: { // glGetMapdv
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLenum *query = (GLenum *) bp; bp += 4;
+ GLdouble *v = (GLdouble *) bins[0];
+ weglGetMapdv(*target,*query,v);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5307: { // glVertex3sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglVertex3sv(v);
+case 5290: { // glGetMapfv
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLenum *query = (GLenum *) bp; bp += 4;
+ GLfloat *v = (GLfloat *) bins[0];
+ weglGetMapfv(*target,*query,v);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5308: { // glVertex4dv
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglVertex4dv(v);
+case 5291: { // glGetMapiv
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLenum *query = (GLenum *) bp; bp += 4;
+ GLint *v = (GLint *) bins[0];
+ weglGetMapiv(*target,*query,v);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5309: { // glVertex4fv
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglVertex4fv(v);
+case 5292: { // glEvalCoord1dv
+ GLdouble *u = (GLdouble *) bp; bp += 8;
+ weglEvalCoord1dv(u);
}; break;
-case 5310: { // glVertex4iv
- GLint *v = (GLint *) bp; bp += 4;
- weglVertex4iv(v);
+case 5293: { // glEvalCoord1fv
+ GLfloat *u = (GLfloat *) bp; bp += 4;
+ weglEvalCoord1fv(u);
}; break;
-case 5311: { // glVertex4sv
- GLshort *v = (GLshort *) bp; bp += 2;
- weglVertex4sv(v);
+case 5294: { // glEvalCoord2dv
+ GLdouble *u = (GLdouble *) bp; bp += 8;
+ weglEvalCoord2dv(u);
}; break;
-case 5312: { // glVertexPointer
- GLint *size = (GLint *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglVertexPointer(*size,*type,*stride,pointer);
+case 5295: { // glEvalCoord2fv
+ GLfloat *u = (GLfloat *) bp; bp += 4;
+ weglEvalCoord2fv(u);
}; break;
-case 5313: { // glVertexPointer
- GLint *size = (GLint *) bp; bp += 4;
+case 5296: { // glMapGrid1d
+ GLint *un = (GLint *) bp; bp += 4;
+ bp += 4;
+ GLdouble *u1 = (GLdouble *) bp; bp += 8;
+ GLdouble *u2 = (GLdouble *) bp; bp += 8;
+ weglMapGrid1d(*un,*u1,*u2);
+}; break;
+case 5297: { // glMapGrid1f
+ GLint *un = (GLint *) bp; bp += 4;
+ GLfloat *u1 = (GLfloat *) bp; bp += 4;
+ GLfloat *u2 = (GLfloat *) bp; bp += 4;
+ weglMapGrid1f(*un,*u1,*u2);
+}; break;
+case 5298: { // glMapGrid2d
+ GLint *un = (GLint *) bp; bp += 4;
+ bp += 4;
+ GLdouble *u1 = (GLdouble *) bp; bp += 8;
+ GLdouble *u2 = (GLdouble *) bp; bp += 8;
+ GLint *vn = (GLint *) bp; bp += 4;
+ bp += 4;
+ GLdouble *v1 = (GLdouble *) bp; bp += 8;
+ GLdouble *v2 = (GLdouble *) bp; bp += 8;
+ weglMapGrid2d(*un,*u1,*u2,*vn,*v1,*v2);
+}; break;
+case 5299: { // glMapGrid2f
+ GLint *un = (GLint *) bp; bp += 4;
+ GLfloat *u1 = (GLfloat *) bp; bp += 4;
+ GLfloat *u2 = (GLfloat *) bp; bp += 4;
+ GLint *vn = (GLint *) bp; bp += 4;
+ GLfloat *v1 = (GLfloat *) bp; bp += 4;
+ GLfloat *v2 = (GLfloat *) bp; bp += 4;
+ weglMapGrid2f(*un,*u1,*u2,*vn,*v1,*v2);
+}; break;
+case 5300: { // glEvalPoint1
+ GLint *i = (GLint *) bp; bp += 4;
+ weglEvalPoint1(*i);
+}; break;
+case 5301: { // glEvalPoint2
+ GLint *i = (GLint *) bp; bp += 4;
+ GLint *j = (GLint *) bp; bp += 4;
+ weglEvalPoint2(*i,*j);
+}; break;
+case 5302: { // glEvalMesh1
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLint *i1 = (GLint *) bp; bp += 4;
+ GLint *i2 = (GLint *) bp; bp += 4;
+ weglEvalMesh1(*mode,*i1,*i2);
+}; break;
+case 5303: { // glEvalMesh2
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLint *i1 = (GLint *) bp; bp += 4;
+ GLint *i2 = (GLint *) bp; bp += 4;
+ GLint *j1 = (GLint *) bp; bp += 4;
+ GLint *j2 = (GLint *) bp; bp += 4;
+ weglEvalMesh2(*mode,*i1,*i2,*j1,*j2);
+}; break;
+case 5304: { // glFogf
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLfloat *param = (GLfloat *) bp; bp += 4;
+ weglFogf(*pname,*param);
+}; break;
+case 5305: { // glFogi
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLint *param = (GLint *) bp; bp += 4;
+ weglFogi(*pname,*param);
+}; break;
+case 5306: { // glFogfv
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4;
+ weglFogfv(*pname,params);
+}; break;
+case 5307: { // glFogiv
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ int *paramsLen = (int *) bp; bp += 4;
+ GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4;
+ weglFogiv(*pname,params);
+}; break;
+case 5308: { // glFeedbackBuffer
+ GLsizei *size = (GLsizei *) bp; bp += 4;
GLenum *type = (GLenum *) bp; bp += 4;
- GLsizei *stride = (GLsizei *) bp; bp += 4;
- GLvoid *pointer = (GLvoid *) bins[0];
- weglVertexPointer(*size,*type,*stride,pointer);
+ GLfloat *buffer = (GLfloat *) bins[0];
+ weglFeedbackBuffer(*size,*type,buffer);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
}; break;
-case 5314: { // glViewport
- GLint *x = (GLint *) bp; bp += 4;
- GLint *y = (GLint *) bp; bp += 4;
- GLsizei *width = (GLsizei *) bp; bp += 4;
- GLsizei *height = (GLsizei *) bp; bp += 4;
- weglViewport(*x,*y,*width,*height);
+case 5309: { // glPassThrough
+ GLfloat *token = (GLfloat *) bp; bp += 4;
+ weglPassThrough(*token);
+}; break;
+case 5310: { // glSelectBuffer
+ GLsizei *size = (GLsizei *) bp; bp += 4;
+ GLuint *buffer = (GLuint *) bins[0];
+ weglSelectBuffer(*size,buffer);
+ int AP = 0; ErlDrvTermData rt[6];
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+}; break;
+case 5311: { // glInitNames
+ weglInitNames();
+}; break;
+case 5312: { // glLoadName
+ GLuint *name = (GLuint *) bp; bp += 4;
+ weglLoadName(*name);
+}; break;
+case 5313: { // glPushName
+ GLuint *name = (GLuint *) bp; bp += 4;
+ weglPushName(*name);
+}; break;
+case 5314: { // glPopName
+ weglPopName();
}; break;
case 5315: { // glBlendColor
GLclampf *red = (GLclampf *) bp; bp += 4;
@@ -2237,7 +2237,7 @@ case 5318: { // glDrawRangeElements
case 5319: { // glTexImage3D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
- GLint *internalformat = (GLint *) bp; bp += 4;
+ GLint *internalFormat = (GLint *) bp; bp += 4;
GLsizei *width = (GLsizei *) bp; bp += 4;
GLsizei *height = (GLsizei *) bp; bp += 4;
GLsizei *depth = (GLsizei *) bp; bp += 4;
@@ -2245,12 +2245,12 @@ case 5319: { // glTexImage3D
GLenum *format = (GLenum *) bp; bp += 4;
GLenum *type = (GLenum *) bp; bp += 4;
GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4;
- weglTexImage3D(*target,*level,*internalformat,*width,*height,*depth,*border,*format,*type,pixels);
+ weglTexImage3D(*target,*level,*internalFormat,*width,*height,*depth,*border,*format,*type,pixels);
}; break;
case 5320: { // glTexImage3D
GLenum *target = (GLenum *) bp; bp += 4;
GLint *level = (GLint *) bp; bp += 4;
- GLint *internalformat = (GLint *) bp; bp += 4;
+ GLint *internalFormat = (GLint *) bp; bp += 4;
GLsizei *width = (GLsizei *) bp; bp += 4;
GLsizei *height = (GLsizei *) bp; bp += 4;
GLsizei *depth = (GLsizei *) bp; bp += 4;
@@ -2258,7 +2258,7 @@ case 5320: { // glTexImage3D
GLenum *format = (GLenum *) bp; bp += 4;
GLenum *type = (GLenum *) bp; bp += 4;
GLvoid *pixels = (GLvoid *) bins[0];
- weglTexImage3D(*target,*level,*internalformat,*width,*height,*depth,*border,*format,*type,pixels);
+ weglTexImage3D(*target,*level,*internalFormat,*width,*height,*depth,*border,*format,*type,pixels);
}; break;
case 5321: { // glTexSubImage3D
GLenum *target = (GLenum *) bp; bp += 4;
@@ -2591,9 +2591,9 @@ case 5351: { // glGetMinmax
GLboolean *reset = (GLboolean *) bp; bp += 1;
bp += 3;
GLenum *format = (GLenum *) bp; bp += 4;
- GLenum *type = (GLenum *) bp; bp += 4;
+ GLenum *types = (GLenum *) bp; bp += 4;
GLvoid *values = (GLvoid *) bins[0];
- weglGetMinmax(*target,*reset,*format,*type,values);
+ weglGetMinmax(*target,*reset,*format,*types,values);
int AP = 0; ErlDrvTermData rt[6];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
@@ -2797,9 +2797,9 @@ case 5371: { // glCompressedTexSubImage1D
}; break;
case 5372: { // glGetCompressedTexImage
GLenum *target = (GLenum *) bp; bp += 4;
- GLint *level = (GLint *) bp; bp += 4;
+ GLint *lod = (GLint *) bp; bp += 4;
GLvoid *img = (GLvoid *) bins[0];
- weglGetCompressedTexImage(*target,*level,img);
+ weglGetCompressedTexImage(*target,*lod,img);
int AP = 0; ErlDrvTermData rt[6];
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok");
@@ -6927,31 +6927,129 @@ case 5856: { // glGetGraphicsResetStatusARB
rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
driver_send_term(port,caller,rt,AP);
}; break;
-case 5857: { // glResizeBuffersMESA
- weglResizeBuffersMESA();
+case 5857: { // glDrawArraysInstancedBaseInstance
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLint *first = (GLint *) bp; bp += 4;
+ GLsizei *count = (GLsizei *) bp; bp += 4;
+ GLsizei *primcount = (GLsizei *) bp; bp += 4;
+ GLuint *baseinstance = (GLuint *) bp; bp += 4;
+ weglDrawArraysInstancedBaseInstance(*mode,*first,*count,*primcount,*baseinstance);
}; break;
-case 5858: { // glWindowPos4dvMESA
- GLdouble *v = (GLdouble *) bp; bp += 8;
- weglWindowPos4dvMESA(v);
+case 5858: { // glDrawElementsInstancedBaseInstance
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLsizei *count = (GLsizei *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ void *indices = (void *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ GLsizei *primcount = (GLsizei *) bp; bp += 4;
+ GLuint *baseinstance = (GLuint *) bp; bp += 4;
+ weglDrawElementsInstancedBaseInstance(*mode,*count,*type,indices,*primcount,*baseinstance);
}; break;
-case 5859: { // glWindowPos4fvMESA
- GLfloat *v = (GLfloat *) bp; bp += 4;
- weglWindowPos4fvMESA(v);
+case 5859: { // glDrawElementsInstancedBaseInstance
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLsizei *count = (GLsizei *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ void *indices = (void *) bins[0];
+ GLsizei *primcount = (GLsizei *) bp; bp += 4;
+ GLuint *baseinstance = (GLuint *) bp; bp += 4;
+ weglDrawElementsInstancedBaseInstance(*mode,*count,*type,indices,*primcount,*baseinstance);
}; break;
-case 5860: { // glWindowPos4ivMESA
- GLint *v = (GLint *) bp; bp += 4;
- weglWindowPos4ivMESA(v);
+case 5860: { // glDrawElementsInstancedBaseVertexBaseInstance
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLsizei *count = (GLsizei *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ void *indices = (void *) (ErlDrvSInt) * (int *) bp; bp += 4;
+ GLsizei *primcount = (GLsizei *) bp; bp += 4;
+ GLint *basevertex = (GLint *) bp; bp += 4;
+ GLuint *baseinstance = (GLuint *) bp; bp += 4;
+ weglDrawElementsInstancedBaseVertexBaseInstance(*mode,*count,*type,indices,*primcount,*basevertex,*baseinstance);
}; break;
-case 5861: { // glWindowPos4svMESA
- GLshort *v = (GLshort *) bp; bp += 2;
- weglWindowPos4svMESA(v);
+case 5861: { // glDrawElementsInstancedBaseVertexBaseInstance
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLsizei *count = (GLsizei *) bp; bp += 4;
+ GLenum *type = (GLenum *) bp; bp += 4;
+ void *indices = (void *) bins[0];
+ GLsizei *primcount = (GLsizei *) bp; bp += 4;
+ GLint *basevertex = (GLint *) bp; bp += 4;
+ GLuint *baseinstance = (GLuint *) bp; bp += 4;
+ weglDrawElementsInstancedBaseVertexBaseInstance(*mode,*count,*type,indices,*primcount,*basevertex,*baseinstance);
+}; break;
+case 5862: { // glDrawTransformFeedbackInstanced
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLuint *id = (GLuint *) bp; bp += 4;
+ GLsizei *primcount = (GLsizei *) bp; bp += 4;
+ weglDrawTransformFeedbackInstanced(*mode,*id,*primcount);
+}; break;
+case 5863: { // glDrawTransformFeedbackStreamInstanced
+ GLenum *mode = (GLenum *) bp; bp += 4;
+ GLuint *id = (GLuint *) bp; bp += 4;
+ GLuint *stream = (GLuint *) bp; bp += 4;
+ GLsizei *primcount = (GLsizei *) bp; bp += 4;
+ weglDrawTransformFeedbackStreamInstanced(*mode,*id,*stream,*primcount);
+}; break;
+case 5864: { // glGetInternalformativ
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLenum *internalformat = (GLenum *) bp; bp += 4;
+ GLenum *pname = (GLenum *) bp; bp += 4;
+ GLsizei *bufSize = (GLsizei *) bp; bp += 4;
+ GLint *params;
+ params = (GLint *) driver_alloc(sizeof(GLint) * *bufSize);
+ weglGetInternalformativ(*target,*internalformat,*pname,*bufSize,params);
+ int AP = 0; ErlDrvTermData *rt;
+ rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*bufSize)*2));
+ rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_");
+ for(int i=0; i < *bufSize; i++) {
+ rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) params[i];}
+ rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*bufSize)+1;
+ rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+ driver_send_term(port,caller,rt,AP);
+ driver_free(rt);
+ driver_free(params);
+}; break;
+case 5865: { // glBindImageTexture
+ GLuint *unit = (GLuint *) bp; bp += 4;
+ GLuint *texture = (GLuint *) bp; bp += 4;
+ GLint *level = (GLint *) bp; bp += 4;
+ GLboolean *layered = (GLboolean *) bp; bp += 1;
+ bp += 3;
+ GLint *layer = (GLint *) bp; bp += 4;
+ GLenum *access = (GLenum *) bp; bp += 4;
+ GLenum *format = (GLenum *) bp; bp += 4;
+ weglBindImageTexture(*unit,*texture,*level,*layered,*layer,*access,*format);
+}; break;
+case 5866: { // glMemoryBarrier
+ GLbitfield *barriers = (GLbitfield *) bp; bp += 4;
+ weglMemoryBarrier(*barriers);
+}; break;
+case 5867: { // glTexStorage1D
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLsizei *levels = (GLsizei *) bp; bp += 4;
+ GLenum *internalformat = (GLenum *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ weglTexStorage1D(*target,*levels,*internalformat,*width);
+}; break;
+case 5868: { // glTexStorage2D
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLsizei *levels = (GLsizei *) bp; bp += 4;
+ GLenum *internalformat = (GLenum *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ weglTexStorage2D(*target,*levels,*internalformat,*width,*height);
+}; break;
+case 5869: { // glTexStorage3D
+ GLenum *target = (GLenum *) bp; bp += 4;
+ GLsizei *levels = (GLsizei *) bp; bp += 4;
+ GLenum *internalformat = (GLenum *) bp; bp += 4;
+ GLsizei *width = (GLsizei *) bp; bp += 4;
+ GLsizei *height = (GLsizei *) bp; bp += 4;
+ GLsizei *depth = (GLsizei *) bp; bp += 4;
+ weglTexStorage3D(*target,*levels,*internalformat,*width,*height,*depth);
}; break;
-case 5862: { // glDepthBoundsEXT
+case 5870: { // glDepthBoundsEXT
GLclampd *zmin = (GLclampd *) bp; bp += 8;
GLclampd *zmax = (GLclampd *) bp; bp += 8;
weglDepthBoundsEXT(*zmin,*zmax);
}; break;
-case 5863: { // glStencilClearTagEXT
+case 5871: { // glStencilClearTagEXT
GLsizei *stencilTagBits = (GLsizei *) bp; bp += 4;
GLuint *stencilClearTag = (GLuint *) bp; bp += 4;
weglStencilClearTagEXT(*stencilTagBits,*stencilClearTag);
diff --git a/lib/wx/c_src/gen/glu_finit.h b/lib/wx/c_src/gen/glu_finit.h
index 63e9c2fc78..0e55d48a2a 100644
--- a/lib/wx/c_src/gen/glu_finit.h
+++ b/lib/wx/c_src/gen/glu_finit.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2010. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/wx/c_src/gen/wxe_derived_dest.h b/lib/wx/c_src/gen/wxe_derived_dest.h
index 4e4aea098d..6b7a5378cb 100644
--- a/lib/wx/c_src/gen/wxe_derived_dest.h
+++ b/lib/wx/c_src/gen/wxe_derived_dest.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2011. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -129,6 +129,18 @@ class EwxBufferedPaintDC : public wxBufferedPaintDC {
EwxBufferedPaintDC(wxWindow * window,int style) : wxBufferedPaintDC(window,style) {};
};
+#if wxUSE_GRAPHICS_CONTEXT
+class EwxGraphicsObject : public wxGraphicsObject {
+ public: ~EwxGraphicsObject() {((WxeApp *)wxTheApp)->clearPtr(this);};
+};
+#endif // wxUSE_GRAPHICS_CONTEXT
+
+#if wxUSE_GRAPHICS_CONTEXT
+class EwxGraphicsContext : public wxGraphicsContext {
+ public: ~EwxGraphicsContext() {((WxeApp *)wxTheApp)->clearPtr(this);};
+};
+#endif // wxUSE_GRAPHICS_CONTEXT
+
class EwxMenuBar : public wxMenuBar {
public: ~EwxMenuBar() {((WxeApp *)wxTheApp)->clearPtr(this);};
EwxMenuBar(long style) : wxMenuBar(style) {};
@@ -671,16 +683,20 @@ class EwxGLCanvas : public wxGLCanvas {
EwxGLCanvas(wxWindow * parent,wxWindowID id,const wxPoint& pos,const wxSize& size,long style,const wxString& name,int * attribList,const wxPalette& palette) : wxGLCanvas(parent,id,pos,size,style,name,attribList,palette) {};
};
+#if wxUSE_AUI
class EwxAuiManager : public wxAuiManager {
public: ~EwxAuiManager() {((WxeApp *)wxTheApp)->clearPtr(this);};
EwxAuiManager(wxWindow * managed_wnd,unsigned int flags) : wxAuiManager(managed_wnd,flags) {};
};
+#endif // wxUSE_AUI
+#if wxUSE_AUI
class EwxAuiNotebook : public wxAuiNotebook {
public: ~EwxAuiNotebook() {((WxeApp *)wxTheApp)->clearPtr(this);};
EwxAuiNotebook(wxWindow * parent,wxWindowID id,const wxPoint& pos,const wxSize& size,long style) : wxAuiNotebook(parent,id,pos,size,style) {};
EwxAuiNotebook() : wxAuiNotebook() {};
};
+#endif // wxUSE_AUI
class EwxMDIParentFrame : public wxMDIParentFrame {
public: ~EwxMDIParentFrame() {((WxeApp *)wxTheApp)->clearPtr(this);};
@@ -727,3 +743,8 @@ class EwxHtmlWindow : public wxHtmlWindow {
EwxHtmlWindow() : wxHtmlWindow() {};
};
+class EwxTaskBarIcon : public wxTaskBarIcon {
+ public: ~EwxTaskBarIcon() {((WxeApp *)wxTheApp)->clearPtr(this);};
+ EwxTaskBarIcon() : wxTaskBarIcon() {};
+};
+
diff --git a/lib/wx/c_src/gen/wxe_events.cpp b/lib/wx/c_src/gen/wxe_events.cpp
index cda98bfc3f..0afb02150a 100644
--- a/lib/wx/c_src/gen/wxe_events.cpp
+++ b/lib/wx/c_src/gen/wxe_events.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2011. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -301,6 +301,13 @@ void initEventTable()
{wxEVT_AUI_PANE_RESTORE, 224, "aui_pane_restore"},
{wxEVT_AUI_RENDER, 224, "aui_render"},
{wxEVT_AUI_FIND_MANAGER, 224, "aui_find_manager"},
+ {wxEVT_TASKBAR_MOVE, 227, "taskbar_move"},
+ {wxEVT_TASKBAR_LEFT_DOWN, 227, "taskbar_left_down"},
+ {wxEVT_TASKBAR_LEFT_UP, 227, "taskbar_left_up"},
+ {wxEVT_TASKBAR_RIGHT_DOWN, 227, "taskbar_right_down"},
+ {wxEVT_TASKBAR_RIGHT_UP, 227, "taskbar_right_up"},
+ {wxEVT_TASKBAR_LEFT_DCLICK, 227, "taskbar_left_dclick"},
+ {wxEVT_TASKBAR_RIGHT_DCLICK, 227, "taskbar_right_dclick"},
{-1, 0, }
};
for(int i=0; event_types[i].ev_type != -1; i++) {
@@ -807,6 +814,13 @@ case 224: {// wxAuiManagerEvent
rt.addTupleCount(8);
break;
}
+case 227: {// wxTaskBarIconEvent
+ evClass = (char*)"wxTaskBarIconEvent";
+ rt.addAtom((char*)"wxTaskBarIcon");
+ rt.addAtom(Etype->eName);
+ rt.addTupleCount(2);
+ break;
+}
}
rt.addTupleCount(5);
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp
index f456bd3287..15012011ed 100644
--- a/lib/wx/c_src/gen/wxe_funcs.cpp
+++ b/lib/wx/c_src/gen/wxe_funcs.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2011. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -5334,14 +5334,18 @@ case wxDC_GetCharWidth: { // wxDC::GetCharWidth
break;
}
case wxDC_GetClippingBox: { // wxDC::GetClippingBox
+ wxCoord x;
+ wxCoord y;
+ wxCoord w;
+ wxCoord h;
wxDC *This = (wxDC *) getPtr(bp,memenv); bp += 4;
- int * rectX = (int *) bp; bp += 4;
- int * rectY = (int *) bp; bp += 4;
- int * rectW = (int *) bp; bp += 4;
- int * rectH = (int *) bp; bp += 4;
- wxRect rect = wxRect(*rectX,*rectY,*rectW,*rectH);
if(!This) throw wxe_badarg(0);
- This->GetClippingBox(rect);
+ This->GetClippingBox(&x,&y,&w,&h);
+ rt.addInt(x);
+ rt.addInt(y);
+ rt.addInt(w);
+ rt.addInt(h);
+ rt.addTupleCount(4);
break;
}
case wxDC_GetFont: { // wxDC::GetFont
@@ -5405,17 +5409,16 @@ case wxDC_GetMultiLineTextExtent_1: { // wxDC::GetMultiLineTextExtent
break;
}
case wxDC_GetPartialTextExtents: { // wxDC::GetPartialTextExtents
+ wxArrayInt widths;
wxDC *This = (wxDC *) getPtr(bp,memenv); bp += 4;
int * textLen = (int *) bp; bp += 4;
wxString text = wxString(bp, wxConvUTF8);
bp += *textLen+((8-((0+ *textLen) & 7)) & 7);
- int * widthsLen = (int *) bp; bp += 4;
- wxArrayInt widths;
- for(int i=0; i < *widthsLen; i++) { widths.Add(*(int *) bp); bp += 4;}
- bp += ((*widthsLen + 1) % 2 )*4;
if(!This) throw wxe_badarg(0);
bool Result = This->GetPartialTextExtents(text,widths);
rt.addBool(Result);
+ rt.add(widths);
+ rt.addTupleCount(2);
break;
}
case wxDC_GetPen: { // wxDC::GetPen
@@ -5426,18 +5429,16 @@ case wxDC_GetPen: { // wxDC::GetPen
break;
}
case wxDC_GetPixel: { // wxDC::GetPixel
+ wxColour col;
wxDC *This = (wxDC *) getPtr(bp,memenv); bp += 4;
int * ptX = (int *) bp; bp += 4;
int * ptY = (int *) bp; bp += 4;
wxPoint pt = wxPoint(*ptX,*ptY);
- int * colR = (int *) bp; bp += 4;
- int * colG = (int *) bp; bp += 4;
- int * colB = (int *) bp; bp += 4;
- int * colA = (int *) bp; bp += 4;
- wxColour col = wxColour(*colR,*colG,*colB,*colA);
if(!This) throw wxe_badarg(0);
bool Result = This->GetPixel(pt,&col);
rt.addBool(Result);
+ rt.add(col);
+ rt.addTupleCount(2);
break;
}
case wxDC_GetPPI: { // wxDC::GetPPI
@@ -6255,17 +6256,21 @@ case wxGraphicsContext_DrawIcon: { // wxGraphicsContext::DrawIcon
case wxGraphicsContext_DrawLines: { // wxGraphicsContext::DrawLines
int fillStyle=wxODDEVEN_RULE;
wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
- int * n = (int *) bp; bp += 4;
- wxDouble * pointsX = (wxDouble *) bp; bp += 8;
- wxDouble * pointsY = (wxDouble *) bp; bp += 8;
- wxPoint2DDouble points = wxPoint2DDouble(*pointsX,*pointsY);
+ int * pointsLen = (int *) bp; bp += 4;
+ wxPoint2DDouble *points;
+ points = (wxPoint2DDouble *) driver_alloc(sizeof(wxPoint2DDouble) * *pointsLen);
+ for(int i=0; i < *pointsLen; i++) {
+ double x = * (double *) bp; bp += 8;
+ double y = * (double *) bp; bp += 8;
+ points[i] = wxPoint2DDouble(x,y);}
while( * (int*) bp) { switch (* (int*) bp) {
case 1: {bp += 4;
fillStyle = (int)*(int *) bp; bp += 4;
} break;
}};
if(!This) throw wxe_badarg(0);
- This->DrawLines((size_t) *n,&points,fillStyle);
+ This->DrawLines(*pointsLen,points,fillStyle);
+ driver_free(points);
break;
}
case wxGraphicsContext_DrawPath: { // wxGraphicsContext::DrawPath
@@ -6372,23 +6377,15 @@ case wxGraphicsContext_StrokePath: { // wxGraphicsContext::StrokePath
This->StrokePath(*path);
break;
}
-case wxGraphicsContext_GetNativeContext: { // wxGraphicsContext::GetNativeContext
- wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
- if(!This) throw wxe_badarg(0);
- This->GetNativeContext();
- break;
-}
case wxGraphicsContext_GetPartialTextExtents: { // wxGraphicsContext::GetPartialTextExtents
+ wxArrayDouble widths;
wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
int * textLen = (int *) bp; bp += 4;
wxString text = wxString(bp, wxConvUTF8);
bp += *textLen+((8-((0+ *textLen) & 7)) & 7);
- int * widthsLen = (int *) bp; bp += 4;
- bp += 4; /* Align */
- wxArrayDouble widths;
- for(int i=0; i < *widthsLen; i++) { widths.Add(*(int *) bp); bp += 4;}
if(!This) throw wxe_badarg(0);
This->GetPartialTextExtents(text,widths);
+ rt.add(widths);
break;
}
case wxGraphicsContext_GetTextExtent: { // wxGraphicsContext::GetTextExtent
@@ -6514,27 +6511,18 @@ case wxGraphicsContext_StrokeLine: { // wxGraphicsContext::StrokeLine
This->StrokeLine((wxDouble) *x1,(wxDouble) *y1,(wxDouble) *x2,(wxDouble) *y2);
break;
}
-case wxGraphicsContext_StrokeLines_2: { // wxGraphicsContext::StrokeLines
+case wxGraphicsContext_StrokeLines: { // wxGraphicsContext::StrokeLines
wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
- int * n = (int *) bp; bp += 4;
- wxDouble * pointsX = (wxDouble *) bp; bp += 8;
- wxDouble * pointsY = (wxDouble *) bp; bp += 8;
- wxPoint2DDouble points = wxPoint2DDouble(*pointsX,*pointsY);
- if(!This) throw wxe_badarg(0);
- This->StrokeLines((size_t) *n,&points);
- break;
-}
-case wxGraphicsContext_StrokeLines_3: { // wxGraphicsContext::StrokeLines
- wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
- int * n = (int *) bp; bp += 4;
- wxDouble * beginPointsX = (wxDouble *) bp; bp += 8;
- wxDouble * beginPointsY = (wxDouble *) bp; bp += 8;
- wxPoint2DDouble beginPoints = wxPoint2DDouble(*beginPointsX,*beginPointsY);
- wxDouble * endPointsX = (wxDouble *) bp; bp += 8;
- wxDouble * endPointsY = (wxDouble *) bp; bp += 8;
- wxPoint2DDouble endPoints = wxPoint2DDouble(*endPointsX,*endPointsY);
+ int * pointsLen = (int *) bp; bp += 4;
+ wxPoint2DDouble *points;
+ points = (wxPoint2DDouble *) driver_alloc(sizeof(wxPoint2DDouble) * *pointsLen);
+ for(int i=0; i < *pointsLen; i++) {
+ double x = * (double *) bp; bp += 8;
+ double y = * (double *) bp; bp += 8;
+ points[i] = wxPoint2DDouble(x,y);}
if(!This) throw wxe_badarg(0);
- This->StrokeLines((size_t) *n,&beginPoints,&endPoints);
+ This->StrokeLines(*pointsLen,points);
+ driver_free(points);
break;
}
#endif // wxUSE_GRAPHICS_CONTEXT
@@ -6565,12 +6553,6 @@ case wxGraphicsMatrix_Get: { // wxGraphicsMatrix::Get
rt.addTupleCount(6);
break;
}
-case wxGraphicsMatrix_GetNativeMatrix: { // wxGraphicsMatrix::GetNativeMatrix
- wxGraphicsMatrix *This = (wxGraphicsMatrix *) getPtr(bp,memenv); bp += 4;
- if(!This) throw wxe_badarg(0);
- This->GetNativeMatrix();
- break;
-}
case wxGraphicsMatrix_Invert: { // wxGraphicsMatrix::Invert
wxGraphicsMatrix *This = (wxGraphicsMatrix *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
@@ -15438,25 +15420,21 @@ case wxListCtrl_GetItemFont: { // wxListCtrl::GetItemFont
break;
}
case wxListCtrl_GetItemPosition: { // wxListCtrl::GetItemPosition
+ wxPoint pos;
wxListCtrl *This = (wxListCtrl *) getPtr(bp,memenv); bp += 4;
int * item = (int *) bp; bp += 4;
- int * posX = (int *) bp; bp += 4;
- int * posY = (int *) bp; bp += 4;
- wxPoint pos = wxPoint(*posX,*posY);
if(!This) throw wxe_badarg(0);
bool Result = This->GetItemPosition((long) *item,pos);
rt.addBool(Result);
+ rt.add(pos);
+ rt.addTupleCount(2);
break;
}
case wxListCtrl_GetItemRect: { // wxListCtrl::GetItemRect
+ wxRect rect;
int code=wxLIST_RECT_BOUNDS;
wxListCtrl *This = (wxListCtrl *) getPtr(bp,memenv); bp += 4;
int * item = (int *) bp; bp += 4;
- int * rectX = (int *) bp; bp += 4;
- int * rectY = (int *) bp; bp += 4;
- int * rectW = (int *) bp; bp += 4;
- int * rectH = (int *) bp; bp += 4;
- wxRect rect = wxRect(*rectX,*rectY,*rectW,*rectH);
while( * (int*) bp) { switch (* (int*) bp) {
case 1: {bp += 4;
code = (int)*(int *) bp; bp += 4;
@@ -15465,6 +15443,8 @@ case wxListCtrl_GetItemRect: { // wxListCtrl::GetItemRect
if(!This) throw wxe_badarg(0);
bool Result = This->GetItemRect((long) *item,rect,code);
rt.addBool(Result);
+ rt.add(rect);
+ rt.addTupleCount(2);
break;
}
case wxListCtrl_GetItemSpacing: { // wxListCtrl::GetItemSpacing
@@ -15546,16 +15526,14 @@ case wxListCtrl_GetViewRect: { // wxListCtrl::GetViewRect
break;
}
case wxListCtrl_HitTest: { // wxListCtrl::HitTest
- int flags;
wxListCtrl *This = (wxListCtrl *) getPtr(bp,memenv); bp += 4;
int * pointX = (int *) bp; bp += 4;
int * pointY = (int *) bp; bp += 4;
wxPoint point = wxPoint(*pointX,*pointY);
+ int * flags = (int *) bp; bp += 4;
if(!This) throw wxe_badarg(0);
- long Result = This->HitTest(point,flags);
+ long Result = This->HitTest(point,*flags);
rt.addInt(Result);
- rt.addInt(flags);
- rt.addTupleCount(2);
break;
}
case wxListCtrl_InsertColumn_2: { // wxListCtrl::InsertColumn
@@ -29383,6 +29361,13 @@ case wxStyledTextCtrl_SetEdgeColumn: { // wxStyledTextCtrl::SetEdgeColumn
This->SetEdgeColumn((int) *column);
break;
}
+case wxStyledTextCtrl_SetEdgeMode: { // wxStyledTextCtrl::SetEdgeMode
+ wxStyledTextCtrl *This = (wxStyledTextCtrl *) getPtr(bp,memenv); bp += 4;
+ int * mode = (int *) bp; bp += 4;
+ if(!This) throw wxe_badarg(0);
+ This->SetEdgeMode((int) *mode);
+ break;
+}
case wxStyledTextCtrl_GetEdgeMode: { // wxStyledTextCtrl::GetEdgeMode
wxStyledTextCtrl *This = (wxStyledTextCtrl *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
@@ -31354,6 +31339,43 @@ case wxLogNull_destroy: { // wxLogNull::destroy
delete This;}
break;
}
+case wxTaskBarIcon_new: { // wxTaskBarIcon::wxTaskBarIcon
+ wxTaskBarIcon * Result = new EwxTaskBarIcon();
+ newPtr((void *) Result, 1, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxTaskBarIcon");
+ break;
+}
+case wxTaskBarIcon_PopupMenu: { // wxTaskBarIcon::PopupMenu
+ wxTaskBarIcon *This = (wxTaskBarIcon *) getPtr(bp,memenv); bp += 4;
+ wxMenu *menu = (wxMenu *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->PopupMenu(menu);
+ rt.addBool(Result);
+ break;
+}
+case wxTaskBarIcon_RemoveIcon: { // wxTaskBarIcon::RemoveIcon
+ wxTaskBarIcon *This = (wxTaskBarIcon *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->RemoveIcon();
+ rt.addBool(Result);
+ break;
+}
+case wxTaskBarIcon_SetIcon: { // wxTaskBarIcon::SetIcon
+ wxString tooltip= wxEmptyString;
+ wxTaskBarIcon *This = (wxTaskBarIcon *) getPtr(bp,memenv); bp += 4;
+ wxIcon *icon = (wxIcon *) getPtr(bp,memenv); bp += 4;
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ int * tooltipLen = (int *) bp; bp += 4;
+ tooltip = wxString(bp, wxConvUTF8);
+ bp += *tooltipLen+((8-((0+ *tooltipLen) & 7)) & 7);
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->SetIcon(*icon,tooltip);
+ rt.addBool(Result);
+ break;
+}
default: {
wxeReturn error = wxeReturn(WXE_DRV_PORT, Ecmd.caller, false); error.addAtom("_wxe_error_");
error.addInt((int) Ecmd.op);
diff --git a/lib/wx/c_src/gen/wxe_macros.h b/lib/wx/c_src/gen/wxe_macros.h
index ddc7c0155f..b24becae06 100644
--- a/lib/wx/c_src/gen/wxe_macros.h
+++ b/lib/wx/c_src/gen/wxe_macros.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2011. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -57,6 +57,7 @@
#include <wx/toolbook.h>
#include <wx/listbook.h>
#include <wx/treebook.h>
+#include <wx/taskbar.h>
#include <wx/html/htmlwin.h>
#include <wx/html/htmlcell.h>
#include <wx/filename.h>
@@ -610,2740 +611,2745 @@
#define wxDC_GetCharHeight 663
#define wxDC_GetCharWidth 664
#define wxDC_GetClippingBox 665
-#define wxDC_GetFont 666
-#define wxDC_GetLayoutDirection 667
-#define wxDC_GetLogicalFunction 668
-#define wxDC_GetMapMode 669
-#define wxDC_GetMultiLineTextExtent_4 670
-#define wxDC_GetMultiLineTextExtent_1 671
-#define wxDC_GetPartialTextExtents 672
-#define wxDC_GetPen 673
-#define wxDC_GetPixel 674
-#define wxDC_GetPPI 675
-#define wxDC_GetSize 677
-#define wxDC_GetSizeMM 679
-#define wxDC_GetTextBackground 680
-#define wxDC_GetTextExtent_4 681
-#define wxDC_GetTextExtent_1 682
-#define wxDC_GetTextForeground 684
-#define wxDC_GetUserScale 685
-#define wxDC_GradientFillConcentric_3 686
-#define wxDC_GradientFillConcentric_4 687
-#define wxDC_GradientFillLinear 688
-#define wxDC_LogicalToDeviceX 689
-#define wxDC_LogicalToDeviceXRel 690
-#define wxDC_LogicalToDeviceY 691
-#define wxDC_LogicalToDeviceYRel 692
-#define wxDC_MaxX 693
-#define wxDC_MaxY 694
-#define wxDC_MinX 695
-#define wxDC_MinY 696
-#define wxDC_IsOk 697
-#define wxDC_ResetBoundingBox 698
-#define wxDC_SetAxisOrientation 699
-#define wxDC_SetBackground 700
-#define wxDC_SetBackgroundMode 701
-#define wxDC_SetBrush 702
-#define wxDC_SetClippingRegion_2 704
-#define wxDC_SetClippingRegion_1_1 705
-#define wxDC_SetClippingRegion_1_0 706
-#define wxDC_SetDeviceOrigin 707
-#define wxDC_SetFont 708
-#define wxDC_SetLayoutDirection 709
-#define wxDC_SetLogicalFunction 710
-#define wxDC_SetMapMode 711
-#define wxDC_SetPalette 712
-#define wxDC_SetPen 713
-#define wxDC_SetTextBackground 714
-#define wxDC_SetTextForeground 715
-#define wxDC_SetUserScale 716
-#define wxDC_StartDoc 717
-#define wxDC_StartPage 718
-#define wxMirrorDC_new 719
-#define wxMirrorDC_destroy 720
-#define wxScreenDC_new 721
-#define wxScreenDC_destruct 722
-#define wxPostScriptDC_new_0 723
-#define wxPostScriptDC_new_1 724
-#define wxPostScriptDC_destruct 725
-#define wxPostScriptDC_SetResolution 726
-#define wxPostScriptDC_GetResolution 727
-#define wxWindowDC_new_0 728
-#define wxWindowDC_new_1 729
-#define wxWindowDC_destruct 730
-#define wxClientDC_new_0 731
-#define wxClientDC_new_1 732
-#define wxClientDC_destroy 733
-#define wxPaintDC_new_0 734
-#define wxPaintDC_new_1 735
-#define wxPaintDC_destroy 736
-#define wxMemoryDC_new_1_0 738
-#define wxMemoryDC_new_1_1 739
-#define wxMemoryDC_new_0 740
-#define wxMemoryDC_destruct 742
-#define wxMemoryDC_SelectObject 743
-#define wxMemoryDC_SelectObjectAsSource 744
-#define wxBufferedDC_new_0 745
-#define wxBufferedDC_new_2 746
-#define wxBufferedDC_new_3 747
-#define wxBufferedDC_destruct 748
-#define wxBufferedDC_Init_2 749
-#define wxBufferedDC_Init_3 750
-#define wxBufferedPaintDC_new_3 751
-#define wxBufferedPaintDC_new_2 752
-#define wxBufferedPaintDC_destruct 753
-#define wxGraphicsObject_GetRenderer 754
-#define wxGraphicsObject_IsNull 755
-#define wxGraphicsContext_Create_1_1 756
-#define wxGraphicsContext_Create_1_0 757
-#define wxGraphicsContext_Create_0 758
-#define wxGraphicsContext_CreatePen 759
-#define wxGraphicsContext_CreateBrush 760
-#define wxGraphicsContext_CreateRadialGradientBrush 761
-#define wxGraphicsContext_CreateLinearGradientBrush 762
-#define wxGraphicsContext_CreateFont 763
-#define wxGraphicsContext_CreateMatrix 764
-#define wxGraphicsContext_CreatePath 765
-#define wxGraphicsContext_Clip_1 766
-#define wxGraphicsContext_Clip_4 767
-#define wxGraphicsContext_ResetClip 768
-#define wxGraphicsContext_DrawBitmap 769
-#define wxGraphicsContext_DrawEllipse 770
-#define wxGraphicsContext_DrawIcon 771
-#define wxGraphicsContext_DrawLines 772
-#define wxGraphicsContext_DrawPath 773
-#define wxGraphicsContext_DrawRectangle 774
-#define wxGraphicsContext_DrawRoundedRectangle 775
-#define wxGraphicsContext_DrawText_3 776
-#define wxGraphicsContext_DrawText_4_0 777
-#define wxGraphicsContext_DrawText_4_1 778
-#define wxGraphicsContext_DrawText_5 779
-#define wxGraphicsContext_FillPath 780
-#define wxGraphicsContext_StrokePath 781
-#define wxGraphicsContext_GetNativeContext 782
-#define wxGraphicsContext_GetPartialTextExtents 783
-#define wxGraphicsContext_GetTextExtent 784
-#define wxGraphicsContext_Rotate 785
-#define wxGraphicsContext_Scale 786
-#define wxGraphicsContext_Translate 787
-#define wxGraphicsContext_GetTransform 788
-#define wxGraphicsContext_SetTransform 789
-#define wxGraphicsContext_ConcatTransform 790
-#define wxGraphicsContext_SetBrush_1_1 791
-#define wxGraphicsContext_SetBrush_1_0 792
-#define wxGraphicsContext_SetFont_1 793
-#define wxGraphicsContext_SetFont_2 794
-#define wxGraphicsContext_SetPen_1_0 795
-#define wxGraphicsContext_SetPen_1_1 796
-#define wxGraphicsContext_StrokeLine 797
-#define wxGraphicsContext_StrokeLines_2 798
-#define wxGraphicsContext_StrokeLines_3 799
-#define wxGraphicsMatrix_Concat 800
-#define wxGraphicsMatrix_Get 802
-#define wxGraphicsMatrix_GetNativeMatrix 803
-#define wxGraphicsMatrix_Invert 804
-#define wxGraphicsMatrix_IsEqual 805
-#define wxGraphicsMatrix_IsIdentity 807
-#define wxGraphicsMatrix_Rotate 808
-#define wxGraphicsMatrix_Scale 809
-#define wxGraphicsMatrix_Translate 810
-#define wxGraphicsMatrix_Set 811
-#define wxGraphicsMatrix_TransformPoint 812
-#define wxGraphicsMatrix_TransformDistance 813
-#define wxGraphicsPath_MoveToPoint_2 814
-#define wxGraphicsPath_MoveToPoint_1 815
-#define wxGraphicsPath_AddArc_6 816
-#define wxGraphicsPath_AddArc_5 817
-#define wxGraphicsPath_AddArcToPoint 818
-#define wxGraphicsPath_AddCircle 819
-#define wxGraphicsPath_AddCurveToPoint_6 820
-#define wxGraphicsPath_AddCurveToPoint_3 821
-#define wxGraphicsPath_AddEllipse 822
-#define wxGraphicsPath_AddLineToPoint_2 823
-#define wxGraphicsPath_AddLineToPoint_1 824
-#define wxGraphicsPath_AddPath 825
-#define wxGraphicsPath_AddQuadCurveToPoint 826
-#define wxGraphicsPath_AddRectangle 827
-#define wxGraphicsPath_AddRoundedRectangle 828
-#define wxGraphicsPath_CloseSubpath 829
-#define wxGraphicsPath_Contains_3 830
-#define wxGraphicsPath_Contains_2 831
-#define wxGraphicsPath_GetBox 833
-#define wxGraphicsPath_GetCurrentPoint 835
-#define wxGraphicsPath_Transform 836
-#define wxGraphicsRenderer_GetDefaultRenderer 837
-#define wxGraphicsRenderer_CreateContext_1_1 838
-#define wxGraphicsRenderer_CreateContext_1_0 839
-#define wxGraphicsRenderer_CreatePen 840
-#define wxGraphicsRenderer_CreateBrush 841
-#define wxGraphicsRenderer_CreateLinearGradientBrush 842
-#define wxGraphicsRenderer_CreateRadialGradientBrush 843
-#define wxGraphicsRenderer_CreateFont 844
-#define wxGraphicsRenderer_CreateMatrix 845
-#define wxGraphicsRenderer_CreatePath 846
-#define wxMenuBar_new_1 848
-#define wxMenuBar_new_0 850
-#define wxMenuBar_destruct 852
-#define wxMenuBar_Append 853
-#define wxMenuBar_Check 854
-#define wxMenuBar_Enable_2 855
-#define wxMenuBar_Enable_1 856
-#define wxMenuBar_EnableTop 857
-#define wxMenuBar_FindMenu 858
-#define wxMenuBar_FindMenuItem 859
-#define wxMenuBar_FindItem 860
-#define wxMenuBar_GetHelpString 861
-#define wxMenuBar_GetLabel_1 862
-#define wxMenuBar_GetLabel_0 863
-#define wxMenuBar_GetLabelTop 864
-#define wxMenuBar_GetMenu 865
-#define wxMenuBar_GetMenuCount 866
-#define wxMenuBar_Insert 867
-#define wxMenuBar_IsChecked 868
-#define wxMenuBar_IsEnabled_1 869
-#define wxMenuBar_IsEnabled_0 870
-#define wxMenuBar_Remove 871
-#define wxMenuBar_Replace 872
-#define wxMenuBar_SetHelpString 873
-#define wxMenuBar_SetLabel_2 874
-#define wxMenuBar_SetLabel_1 875
-#define wxMenuBar_SetLabelTop 876
-#define wxControl_GetLabel 877
-#define wxControl_SetLabel 878
-#define wxControlWithItems_Append_1 879
-#define wxControlWithItems_Append_2 880
-#define wxControlWithItems_appendStrings_1 881
-#define wxControlWithItems_Clear 882
-#define wxControlWithItems_Delete 883
-#define wxControlWithItems_FindString 884
-#define wxControlWithItems_getClientData 885
-#define wxControlWithItems_setClientData 886
-#define wxControlWithItems_GetCount 887
-#define wxControlWithItems_GetSelection 888
-#define wxControlWithItems_GetString 889
-#define wxControlWithItems_GetStringSelection 890
-#define wxControlWithItems_Insert_2 891
-#define wxControlWithItems_Insert_3 892
-#define wxControlWithItems_IsEmpty 893
-#define wxControlWithItems_Select 894
-#define wxControlWithItems_SetSelection 895
-#define wxControlWithItems_SetString 896
-#define wxControlWithItems_SetStringSelection 897
-#define wxMenu_new_2 900
-#define wxMenu_new_1 901
-#define wxMenu_destruct 903
-#define wxMenu_Append_3 904
-#define wxMenu_Append_1 905
-#define wxMenu_Append_4_0 906
-#define wxMenu_Append_4_1 907
-#define wxMenu_AppendCheckItem 908
-#define wxMenu_AppendRadioItem 909
-#define wxMenu_AppendSeparator 910
-#define wxMenu_Break 911
-#define wxMenu_Check 912
-#define wxMenu_Delete_1_0 913
-#define wxMenu_Delete_1_1 914
-#define wxMenu_Destroy_1_0 915
-#define wxMenu_Destroy_1_1 916
-#define wxMenu_Enable 917
-#define wxMenu_FindItem_1 918
-#define wxMenu_FindItem_2 919
-#define wxMenu_FindItemByPosition 920
-#define wxMenu_GetHelpString 921
-#define wxMenu_GetLabel 922
-#define wxMenu_GetMenuItemCount 923
-#define wxMenu_GetMenuItems 924
-#define wxMenu_GetTitle 926
-#define wxMenu_Insert_2 927
-#define wxMenu_Insert_3 928
-#define wxMenu_Insert_5_1 929
-#define wxMenu_Insert_5_0 930
-#define wxMenu_InsertCheckItem 931
-#define wxMenu_InsertRadioItem 932
-#define wxMenu_InsertSeparator 933
-#define wxMenu_IsChecked 934
-#define wxMenu_IsEnabled 935
-#define wxMenu_Prepend_1 936
-#define wxMenu_Prepend_2 937
-#define wxMenu_Prepend_4_1 938
-#define wxMenu_Prepend_4_0 939
-#define wxMenu_PrependCheckItem 940
-#define wxMenu_PrependRadioItem 941
-#define wxMenu_PrependSeparator 942
-#define wxMenu_Remove_1_0 943
-#define wxMenu_Remove_1_1 944
-#define wxMenu_SetHelpString 945
-#define wxMenu_SetLabel 946
-#define wxMenu_SetTitle 947
-#define wxMenuItem_new 948
-#define wxMenuItem_destruct 950
-#define wxMenuItem_Check 951
-#define wxMenuItem_Enable 952
-#define wxMenuItem_GetBitmap 953
-#define wxMenuItem_GetHelp 954
-#define wxMenuItem_GetId 955
-#define wxMenuItem_GetKind 956
-#define wxMenuItem_GetLabel 957
-#define wxMenuItem_GetLabelFromText 958
-#define wxMenuItem_GetMenu 959
-#define wxMenuItem_GetText 960
-#define wxMenuItem_GetSubMenu 961
-#define wxMenuItem_IsCheckable 962
-#define wxMenuItem_IsChecked 963
-#define wxMenuItem_IsEnabled 964
-#define wxMenuItem_IsSeparator 965
-#define wxMenuItem_IsSubMenu 966
-#define wxMenuItem_SetBitmap 967
-#define wxMenuItem_SetHelp 968
-#define wxMenuItem_SetMenu 969
-#define wxMenuItem_SetSubMenu 970
-#define wxMenuItem_SetText 971
-#define wxToolBar_AddControl 972
-#define wxToolBar_AddSeparator 973
-#define wxToolBar_AddTool_5 974
-#define wxToolBar_AddTool_4_0 975
-#define wxToolBar_AddTool_1 976
-#define wxToolBar_AddTool_4_1 977
-#define wxToolBar_AddTool_3 978
-#define wxToolBar_AddTool_6 979
-#define wxToolBar_AddCheckTool 980
-#define wxToolBar_AddRadioTool 981
-#define wxToolBar_DeleteTool 982
-#define wxToolBar_DeleteToolByPos 983
-#define wxToolBar_EnableTool 984
-#define wxToolBar_FindById 985
-#define wxToolBar_FindControl 986
-#define wxToolBar_FindToolForPosition 987
-#define wxToolBar_GetToolSize 988
-#define wxToolBar_GetToolBitmapSize 989
-#define wxToolBar_GetMargins 990
-#define wxToolBar_GetToolEnabled 991
-#define wxToolBar_GetToolLongHelp 992
-#define wxToolBar_GetToolPacking 993
-#define wxToolBar_GetToolPos 994
-#define wxToolBar_GetToolSeparation 995
-#define wxToolBar_GetToolShortHelp 996
-#define wxToolBar_GetToolState 997
-#define wxToolBar_InsertControl 998
-#define wxToolBar_InsertSeparator 999
-#define wxToolBar_InsertTool_5 1000
-#define wxToolBar_InsertTool_2 1001
-#define wxToolBar_InsertTool_4 1002
-#define wxToolBar_Realize 1003
-#define wxToolBar_RemoveTool 1004
-#define wxToolBar_SetMargins 1005
-#define wxToolBar_SetToolBitmapSize 1006
-#define wxToolBar_SetToolLongHelp 1007
-#define wxToolBar_SetToolPacking 1008
-#define wxToolBar_SetToolShortHelp 1009
-#define wxToolBar_SetToolSeparation 1010
-#define wxToolBar_ToggleTool 1011
-#define wxStatusBar_new_0 1013
-#define wxStatusBar_new_2 1014
-#define wxStatusBar_destruct 1016
-#define wxStatusBar_Create 1017
-#define wxStatusBar_GetFieldRect 1018
-#define wxStatusBar_GetFieldsCount 1019
-#define wxStatusBar_GetStatusText 1020
-#define wxStatusBar_PopStatusText 1021
-#define wxStatusBar_PushStatusText 1022
-#define wxStatusBar_SetFieldsCount 1023
-#define wxStatusBar_SetMinHeight 1024
-#define wxStatusBar_SetStatusText 1025
-#define wxStatusBar_SetStatusWidths 1026
-#define wxStatusBar_SetStatusStyles 1027
-#define wxBitmap_new_0 1028
-#define wxBitmap_new_3 1029
-#define wxBitmap_new_4 1030
-#define wxBitmap_new_2_0 1031
-#define wxBitmap_new_2_1 1032
-#define wxBitmap_destruct 1033
-#define wxBitmap_ConvertToImage 1034
-#define wxBitmap_CopyFromIcon 1035
-#define wxBitmap_Create 1036
-#define wxBitmap_GetDepth 1037
-#define wxBitmap_GetHeight 1038
-#define wxBitmap_GetPalette 1039
-#define wxBitmap_GetMask 1040
-#define wxBitmap_GetWidth 1041
-#define wxBitmap_GetSubBitmap 1042
-#define wxBitmap_LoadFile 1043
-#define wxBitmap_Ok 1044
-#define wxBitmap_SaveFile 1045
-#define wxBitmap_SetDepth 1046
-#define wxBitmap_SetHeight 1047
-#define wxBitmap_SetMask 1048
-#define wxBitmap_SetPalette 1049
-#define wxBitmap_SetWidth 1050
-#define wxIcon_new_0 1051
-#define wxIcon_new_2 1052
-#define wxIcon_new_1 1053
-#define wxIcon_CopyFromBitmap 1054
-#define wxIcon_destroy 1055
-#define wxIconBundle_new_0 1056
-#define wxIconBundle_new_2 1057
-#define wxIconBundle_new_1_0 1058
-#define wxIconBundle_new_1_1 1059
-#define wxIconBundle_destruct 1060
-#define wxIconBundle_AddIcon_2 1061
-#define wxIconBundle_AddIcon_1 1062
-#define wxIconBundle_GetIcon_1_1 1063
-#define wxIconBundle_GetIcon_1_0 1064
-#define wxCursor_new_0 1065
-#define wxCursor_new_1_0 1066
-#define wxCursor_new_1_1 1067
-#define wxCursor_new_4 1068
-#define wxCursor_destruct 1069
-#define wxCursor_Ok 1070
-#define wxMask_new_0 1071
-#define wxMask_new_2_1 1072
-#define wxMask_new_2_0 1073
-#define wxMask_new_1 1074
-#define wxMask_destruct 1075
-#define wxMask_Create_2_1 1076
-#define wxMask_Create_2_0 1077
-#define wxMask_Create_1 1078
-#define wxImage_new_0 1079
-#define wxImage_new_3_0 1080
-#define wxImage_new_4 1081
-#define wxImage_new_5 1082
-#define wxImage_new_2 1083
-#define wxImage_new_3_1 1084
-#define wxImage_Blur 1085
-#define wxImage_BlurHorizontal 1086
-#define wxImage_BlurVertical 1087
-#define wxImage_ConvertAlphaToMask 1088
-#define wxImage_ConvertToGreyscale 1089
-#define wxImage_ConvertToMono 1090
-#define wxImage_Copy 1091
-#define wxImage_Create_3 1092
-#define wxImage_Create_4 1093
-#define wxImage_Create_5 1094
-#define wxImage_Destroy 1095
-#define wxImage_FindFirstUnusedColour 1096
-#define wxImage_GetImageExtWildcard 1097
-#define wxImage_GetAlpha_2 1098
-#define wxImage_GetAlpha_0 1099
-#define wxImage_GetBlue 1100
-#define wxImage_GetData 1101
-#define wxImage_GetGreen 1102
-#define wxImage_GetImageCount 1103
-#define wxImage_GetHeight 1104
-#define wxImage_GetMaskBlue 1105
-#define wxImage_GetMaskGreen 1106
-#define wxImage_GetMaskRed 1107
-#define wxImage_GetOrFindMaskColour 1108
-#define wxImage_GetPalette 1109
-#define wxImage_GetRed 1110
-#define wxImage_GetSubImage 1111
-#define wxImage_GetWidth 1112
-#define wxImage_HasAlpha 1113
-#define wxImage_HasMask 1114
-#define wxImage_GetOption 1115
-#define wxImage_GetOptionInt 1116
-#define wxImage_HasOption 1117
-#define wxImage_InitAlpha 1118
-#define wxImage_InitStandardHandlers 1119
-#define wxImage_IsTransparent 1120
-#define wxImage_LoadFile_2 1121
-#define wxImage_LoadFile_3 1122
-#define wxImage_Ok 1123
-#define wxImage_RemoveHandler 1124
-#define wxImage_Mirror 1125
-#define wxImage_Replace 1126
-#define wxImage_Rescale 1127
-#define wxImage_Resize 1128
-#define wxImage_Rotate 1129
-#define wxImage_RotateHue 1130
-#define wxImage_Rotate90 1131
-#define wxImage_SaveFile_1 1132
-#define wxImage_SaveFile_2_0 1133
-#define wxImage_SaveFile_2_1 1134
-#define wxImage_Scale 1135
-#define wxImage_Size 1136
-#define wxImage_SetAlpha_3 1137
-#define wxImage_SetAlpha_2 1138
-#define wxImage_SetData_2 1139
-#define wxImage_SetData_4 1140
-#define wxImage_SetMask 1141
-#define wxImage_SetMaskColour 1142
-#define wxImage_SetMaskFromImage 1143
-#define wxImage_SetOption_2_1 1144
-#define wxImage_SetOption_2_0 1145
-#define wxImage_SetPalette 1146
-#define wxImage_SetRGB_5 1147
-#define wxImage_SetRGB_4 1148
-#define wxImage_destroy 1149
-#define wxBrush_new_0 1150
-#define wxBrush_new_2 1151
-#define wxBrush_new_1 1152
-#define wxBrush_destruct 1154
-#define wxBrush_GetColour 1155
-#define wxBrush_GetStipple 1156
-#define wxBrush_GetStyle 1157
-#define wxBrush_IsHatch 1158
-#define wxBrush_IsOk 1159
-#define wxBrush_SetColour_1 1160
-#define wxBrush_SetColour_3 1161
-#define wxBrush_SetStipple 1162
-#define wxBrush_SetStyle 1163
-#define wxPen_new_0 1164
-#define wxPen_new_2 1165
-#define wxPen_destruct 1166
-#define wxPen_GetCap 1167
-#define wxPen_GetColour 1168
-#define wxPen_GetJoin 1169
-#define wxPen_GetStyle 1170
-#define wxPen_GetWidth 1171
-#define wxPen_IsOk 1172
-#define wxPen_SetCap 1173
-#define wxPen_SetColour_1 1174
-#define wxPen_SetColour_3 1175
-#define wxPen_SetJoin 1176
-#define wxPen_SetStyle 1177
-#define wxPen_SetWidth 1178
-#define wxRegion_new_0 1179
-#define wxRegion_new_4 1180
-#define wxRegion_new_2 1181
-#define wxRegion_new_1_1 1182
-#define wxRegion_new_1_0 1184
-#define wxRegion_destruct 1186
-#define wxRegion_Clear 1187
-#define wxRegion_Contains_2 1188
-#define wxRegion_Contains_1_0 1189
-#define wxRegion_Contains_4 1190
-#define wxRegion_Contains_1_1 1191
-#define wxRegion_ConvertToBitmap 1192
-#define wxRegion_GetBox 1193
-#define wxRegion_Intersect_4 1194
-#define wxRegion_Intersect_1_1 1195
-#define wxRegion_Intersect_1_0 1196
-#define wxRegion_IsEmpty 1197
-#define wxRegion_Subtract_4 1198
-#define wxRegion_Subtract_1_1 1199
-#define wxRegion_Subtract_1_0 1200
-#define wxRegion_Offset_2 1201
-#define wxRegion_Offset_1 1202
-#define wxRegion_Union_4 1203
-#define wxRegion_Union_1_2 1204
-#define wxRegion_Union_1_1 1205
-#define wxRegion_Union_1_0 1206
-#define wxRegion_Union_3 1207
-#define wxRegion_Xor_4 1208
-#define wxRegion_Xor_1_1 1209
-#define wxRegion_Xor_1_0 1210
-#define wxAcceleratorTable_new_0 1211
-#define wxAcceleratorTable_new_2 1212
-#define wxAcceleratorTable_destruct 1213
-#define wxAcceleratorTable_Ok 1214
-#define wxAcceleratorEntry_new_1_0 1215
-#define wxAcceleratorEntry_new_1_1 1216
-#define wxAcceleratorEntry_GetCommand 1217
-#define wxAcceleratorEntry_GetFlags 1218
-#define wxAcceleratorEntry_GetKeyCode 1219
-#define wxAcceleratorEntry_Set 1220
-#define wxAcceleratorEntry_destroy 1221
-#define wxCaret_new_3 1226
-#define wxCaret_new_2 1227
-#define wxCaret_destruct 1229
-#define wxCaret_Create_3 1230
-#define wxCaret_Create_2 1231
-#define wxCaret_GetBlinkTime 1232
-#define wxCaret_GetPosition 1234
-#define wxCaret_GetSize 1236
-#define wxCaret_GetWindow 1237
-#define wxCaret_Hide 1238
-#define wxCaret_IsOk 1239
-#define wxCaret_IsVisible 1240
-#define wxCaret_Move_2 1241
-#define wxCaret_Move_1 1242
-#define wxCaret_SetBlinkTime 1243
-#define wxCaret_SetSize_2 1244
-#define wxCaret_SetSize_1 1245
-#define wxCaret_Show 1246
-#define wxSizer_Add_2_1 1247
-#define wxSizer_Add_2_0 1248
-#define wxSizer_Add_3 1249
-#define wxSizer_Add_2_3 1250
-#define wxSizer_Add_2_2 1251
-#define wxSizer_AddSpacer 1252
-#define wxSizer_AddStretchSpacer 1253
-#define wxSizer_CalcMin 1254
-#define wxSizer_Clear 1255
-#define wxSizer_Detach_1_2 1256
-#define wxSizer_Detach_1_1 1257
-#define wxSizer_Detach_1_0 1258
-#define wxSizer_Fit 1259
-#define wxSizer_FitInside 1260
-#define wxSizer_GetChildren 1261
-#define wxSizer_GetItem_2_1 1262
-#define wxSizer_GetItem_2_0 1263
-#define wxSizer_GetItem_1 1264
-#define wxSizer_GetSize 1265
-#define wxSizer_GetPosition 1266
-#define wxSizer_GetMinSize 1267
-#define wxSizer_Hide_2_0 1268
-#define wxSizer_Hide_2_1 1269
-#define wxSizer_Hide_1 1270
-#define wxSizer_Insert_3_1 1271
-#define wxSizer_Insert_3_0 1272
-#define wxSizer_Insert_4 1273
-#define wxSizer_Insert_3_3 1274
-#define wxSizer_Insert_3_2 1275
-#define wxSizer_Insert_2 1276
-#define wxSizer_InsertSpacer 1277
-#define wxSizer_InsertStretchSpacer 1278
-#define wxSizer_IsShown_1_2 1279
-#define wxSizer_IsShown_1_1 1280
-#define wxSizer_IsShown_1_0 1281
-#define wxSizer_Layout 1282
-#define wxSizer_Prepend_2_1 1283
-#define wxSizer_Prepend_2_0 1284
-#define wxSizer_Prepend_3 1285
-#define wxSizer_Prepend_2_3 1286
-#define wxSizer_Prepend_2_2 1287
-#define wxSizer_Prepend_1 1288
-#define wxSizer_PrependSpacer 1289
-#define wxSizer_PrependStretchSpacer 1290
-#define wxSizer_RecalcSizes 1291
-#define wxSizer_Remove_1_1 1292
-#define wxSizer_Remove_1_0 1293
-#define wxSizer_Replace_3_1 1294
-#define wxSizer_Replace_3_0 1295
-#define wxSizer_Replace_2 1296
-#define wxSizer_SetDimension 1297
-#define wxSizer_SetMinSize_2 1298
-#define wxSizer_SetMinSize_1 1299
-#define wxSizer_SetItemMinSize_3_2 1300
-#define wxSizer_SetItemMinSize_2_2 1301
-#define wxSizer_SetItemMinSize_3_1 1302
-#define wxSizer_SetItemMinSize_2_1 1303
-#define wxSizer_SetItemMinSize_3_0 1304
-#define wxSizer_SetItemMinSize_2_0 1305
-#define wxSizer_SetSizeHints 1306
-#define wxSizer_SetVirtualSizeHints 1307
-#define wxSizer_Show_2_2 1308
-#define wxSizer_Show_2_1 1309
-#define wxSizer_Show_2_0 1310
-#define wxSizer_Show_1 1311
-#define wxSizerFlags_new 1312
-#define wxSizerFlags_Align 1313
-#define wxSizerFlags_Border_2 1314
-#define wxSizerFlags_Border_1 1315
-#define wxSizerFlags_Center 1316
-#define wxSizerFlags_Centre 1317
-#define wxSizerFlags_Expand 1318
-#define wxSizerFlags_Left 1319
-#define wxSizerFlags_Proportion 1320
-#define wxSizerFlags_Right 1321
-#define wxSizerFlags_destroy 1322
-#define wxSizerItem_new_5_1 1323
-#define wxSizerItem_new_2_1 1324
-#define wxSizerItem_new_5_0 1325
-#define wxSizerItem_new_2_0 1326
-#define wxSizerItem_new_6 1327
-#define wxSizerItem_new_3 1328
-#define wxSizerItem_new_0 1329
-#define wxSizerItem_destruct 1330
-#define wxSizerItem_CalcMin 1331
-#define wxSizerItem_DeleteWindows 1332
-#define wxSizerItem_DetachSizer 1333
-#define wxSizerItem_GetBorder 1334
-#define wxSizerItem_GetFlag 1335
-#define wxSizerItem_GetMinSize 1336
-#define wxSizerItem_GetPosition 1337
-#define wxSizerItem_GetProportion 1338
-#define wxSizerItem_GetRatio 1339
-#define wxSizerItem_GetRect 1340
-#define wxSizerItem_GetSize 1341
-#define wxSizerItem_GetSizer 1342
-#define wxSizerItem_GetSpacer 1343
-#define wxSizerItem_GetUserData 1344
-#define wxSizerItem_GetWindow 1345
-#define wxSizerItem_IsSizer 1346
-#define wxSizerItem_IsShown 1347
-#define wxSizerItem_IsSpacer 1348
-#define wxSizerItem_IsWindow 1349
-#define wxSizerItem_SetBorder 1350
-#define wxSizerItem_SetDimension 1351
-#define wxSizerItem_SetFlag 1352
-#define wxSizerItem_SetInitSize 1353
-#define wxSizerItem_SetMinSize_1 1354
-#define wxSizerItem_SetMinSize_2 1355
-#define wxSizerItem_SetProportion 1356
-#define wxSizerItem_SetRatio_2 1357
-#define wxSizerItem_SetRatio_1_1 1358
-#define wxSizerItem_SetRatio_1_0 1359
-#define wxSizerItem_SetSizer 1360
-#define wxSizerItem_SetSpacer_1 1361
-#define wxSizerItem_SetSpacer_2 1362
-#define wxSizerItem_SetWindow 1363
-#define wxSizerItem_Show 1364
-#define wxBoxSizer_new 1365
-#define wxBoxSizer_GetOrientation 1366
-#define wxBoxSizer_destroy 1367
-#define wxStaticBoxSizer_new_2 1368
-#define wxStaticBoxSizer_new_3 1369
-#define wxStaticBoxSizer_GetStaticBox 1370
-#define wxStaticBoxSizer_destroy 1371
-#define wxGridSizer_new_4 1372
-#define wxGridSizer_new_2 1373
-#define wxGridSizer_GetCols 1374
-#define wxGridSizer_GetHGap 1375
-#define wxGridSizer_GetRows 1376
-#define wxGridSizer_GetVGap 1377
-#define wxGridSizer_SetCols 1378
-#define wxGridSizer_SetHGap 1379
-#define wxGridSizer_SetRows 1380
-#define wxGridSizer_SetVGap 1381
-#define wxGridSizer_destroy 1382
-#define wxFlexGridSizer_new_4 1383
-#define wxFlexGridSizer_new_2 1384
-#define wxFlexGridSizer_AddGrowableCol 1385
-#define wxFlexGridSizer_AddGrowableRow 1386
-#define wxFlexGridSizer_GetFlexibleDirection 1387
-#define wxFlexGridSizer_GetNonFlexibleGrowMode 1388
-#define wxFlexGridSizer_RemoveGrowableCol 1389
-#define wxFlexGridSizer_RemoveGrowableRow 1390
-#define wxFlexGridSizer_SetFlexibleDirection 1391
-#define wxFlexGridSizer_SetNonFlexibleGrowMode 1392
-#define wxFlexGridSizer_destroy 1393
-#define wxGridBagSizer_new 1394
-#define wxGridBagSizer_Add_3_2 1395
-#define wxGridBagSizer_Add_3_1 1396
-#define wxGridBagSizer_Add_4 1397
-#define wxGridBagSizer_Add_1_0 1398
-#define wxGridBagSizer_Add_2_1 1399
-#define wxGridBagSizer_Add_2_0 1400
-#define wxGridBagSizer_Add_3_0 1401
-#define wxGridBagSizer_Add_1_1 1402
-#define wxGridBagSizer_CalcMin 1403
-#define wxGridBagSizer_CheckForIntersection_2 1404
-#define wxGridBagSizer_CheckForIntersection_3 1405
-#define wxGridBagSizer_FindItem_1_1 1406
-#define wxGridBagSizer_FindItem_1_0 1407
-#define wxGridBagSizer_FindItemAtPoint 1408
-#define wxGridBagSizer_FindItemAtPosition 1409
-#define wxGridBagSizer_FindItemWithData 1410
-#define wxGridBagSizer_GetCellSize 1411
-#define wxGridBagSizer_GetEmptyCellSize 1412
-#define wxGridBagSizer_GetItemPosition_1_2 1413
-#define wxGridBagSizer_GetItemPosition_1_1 1414
-#define wxGridBagSizer_GetItemPosition_1_0 1415
-#define wxGridBagSizer_GetItemSpan_1_2 1416
-#define wxGridBagSizer_GetItemSpan_1_1 1417
-#define wxGridBagSizer_GetItemSpan_1_0 1418
-#define wxGridBagSizer_SetEmptyCellSize 1419
-#define wxGridBagSizer_SetItemPosition_2_2 1420
-#define wxGridBagSizer_SetItemPosition_2_1 1421
-#define wxGridBagSizer_SetItemPosition_2_0 1422
-#define wxGridBagSizer_SetItemSpan_2_2 1423
-#define wxGridBagSizer_SetItemSpan_2_1 1424
-#define wxGridBagSizer_SetItemSpan_2_0 1425
-#define wxGridBagSizer_destroy 1426
-#define wxStdDialogButtonSizer_new 1427
-#define wxStdDialogButtonSizer_AddButton 1428
-#define wxStdDialogButtonSizer_Realize 1429
-#define wxStdDialogButtonSizer_SetAffirmativeButton 1430
-#define wxStdDialogButtonSizer_SetCancelButton 1431
-#define wxStdDialogButtonSizer_SetNegativeButton 1432
-#define wxStdDialogButtonSizer_destroy 1433
-#define wxFont_new_0 1434
-#define wxFont_new_1 1435
-#define wxFont_new_5 1436
-#define wxFont_destruct 1438
-#define wxFont_IsFixedWidth 1439
-#define wxFont_GetDefaultEncoding 1440
-#define wxFont_GetFaceName 1441
-#define wxFont_GetFamily 1442
-#define wxFont_GetNativeFontInfoDesc 1443
-#define wxFont_GetNativeFontInfoUserDesc 1444
-#define wxFont_GetPointSize 1445
-#define wxFont_GetStyle 1446
-#define wxFont_GetUnderlined 1447
-#define wxFont_GetWeight 1448
-#define wxFont_Ok 1449
-#define wxFont_SetDefaultEncoding 1450
-#define wxFont_SetFaceName 1451
-#define wxFont_SetFamily 1452
-#define wxFont_SetPointSize 1453
-#define wxFont_SetStyle 1454
-#define wxFont_SetUnderlined 1455
-#define wxFont_SetWeight 1456
-#define wxToolTip_Enable 1457
-#define wxToolTip_SetDelay 1458
-#define wxToolTip_new 1459
-#define wxToolTip_SetTip 1460
-#define wxToolTip_GetTip 1461
-#define wxToolTip_GetWindow 1462
-#define wxToolTip_destroy 1463
-#define wxButton_new_3 1465
-#define wxButton_new_0 1466
-#define wxButton_destruct 1467
-#define wxButton_Create 1468
-#define wxButton_GetDefaultSize 1469
-#define wxButton_SetDefault 1470
-#define wxButton_SetLabel 1471
-#define wxBitmapButton_new_4 1473
-#define wxBitmapButton_new_0 1474
-#define wxBitmapButton_Create 1475
-#define wxBitmapButton_GetBitmapDisabled 1476
-#define wxBitmapButton_GetBitmapFocus 1478
-#define wxBitmapButton_GetBitmapLabel 1480
-#define wxBitmapButton_GetBitmapSelected 1482
-#define wxBitmapButton_SetBitmapDisabled 1484
-#define wxBitmapButton_SetBitmapFocus 1485
-#define wxBitmapButton_SetBitmapLabel 1486
-#define wxBitmapButton_SetBitmapSelected 1487
-#define wxBitmapButton_destroy 1488
-#define wxToggleButton_new_0 1489
-#define wxToggleButton_new_4 1490
-#define wxToggleButton_Create 1491
-#define wxToggleButton_GetValue 1492
-#define wxToggleButton_SetValue 1493
-#define wxToggleButton_destroy 1494
-#define wxCalendarCtrl_new_0 1495
-#define wxCalendarCtrl_new_3 1496
-#define wxCalendarCtrl_Create 1497
-#define wxCalendarCtrl_destruct 1498
-#define wxCalendarCtrl_SetDate 1499
-#define wxCalendarCtrl_GetDate 1500
-#define wxCalendarCtrl_EnableYearChange 1501
-#define wxCalendarCtrl_EnableMonthChange 1502
-#define wxCalendarCtrl_EnableHolidayDisplay 1503
-#define wxCalendarCtrl_SetHeaderColours 1504
-#define wxCalendarCtrl_GetHeaderColourFg 1505
-#define wxCalendarCtrl_GetHeaderColourBg 1506
-#define wxCalendarCtrl_SetHighlightColours 1507
-#define wxCalendarCtrl_GetHighlightColourFg 1508
-#define wxCalendarCtrl_GetHighlightColourBg 1509
-#define wxCalendarCtrl_SetHolidayColours 1510
-#define wxCalendarCtrl_GetHolidayColourFg 1511
-#define wxCalendarCtrl_GetHolidayColourBg 1512
-#define wxCalendarCtrl_GetAttr 1513
-#define wxCalendarCtrl_SetAttr 1514
-#define wxCalendarCtrl_SetHoliday 1515
-#define wxCalendarCtrl_ResetAttr 1516
-#define wxCalendarCtrl_HitTest 1517
-#define wxCalendarDateAttr_new_0 1518
-#define wxCalendarDateAttr_new_2_1 1519
-#define wxCalendarDateAttr_new_2_0 1520
-#define wxCalendarDateAttr_SetTextColour 1521
-#define wxCalendarDateAttr_SetBackgroundColour 1522
-#define wxCalendarDateAttr_SetBorderColour 1523
-#define wxCalendarDateAttr_SetFont 1524
-#define wxCalendarDateAttr_SetBorder 1525
-#define wxCalendarDateAttr_SetHoliday 1526
-#define wxCalendarDateAttr_HasTextColour 1527
-#define wxCalendarDateAttr_HasBackgroundColour 1528
-#define wxCalendarDateAttr_HasBorderColour 1529
-#define wxCalendarDateAttr_HasFont 1530
-#define wxCalendarDateAttr_HasBorder 1531
-#define wxCalendarDateAttr_IsHoliday 1532
-#define wxCalendarDateAttr_GetTextColour 1533
-#define wxCalendarDateAttr_GetBackgroundColour 1534
-#define wxCalendarDateAttr_GetBorderColour 1535
-#define wxCalendarDateAttr_GetFont 1536
-#define wxCalendarDateAttr_GetBorder 1537
-#define wxCalendarDateAttr_destroy 1538
-#define wxCheckBox_new_4 1540
-#define wxCheckBox_new_0 1541
-#define wxCheckBox_Create 1542
-#define wxCheckBox_GetValue 1543
-#define wxCheckBox_Get3StateValue 1544
-#define wxCheckBox_Is3rdStateAllowedForUser 1545
-#define wxCheckBox_Is3State 1546
-#define wxCheckBox_IsChecked 1547
-#define wxCheckBox_SetValue 1548
-#define wxCheckBox_Set3StateValue 1549
-#define wxCheckBox_destroy 1550
-#define wxCheckListBox_new_0 1551
-#define wxCheckListBox_new_3 1553
-#define wxCheckListBox_Check 1554
-#define wxCheckListBox_IsChecked 1555
-#define wxCheckListBox_destroy 1556
-#define wxChoice_new_3 1559
-#define wxChoice_new_0 1560
-#define wxChoice_destruct 1562
-#define wxChoice_Create 1564
-#define wxChoice_Delete 1565
-#define wxChoice_GetColumns 1566
-#define wxChoice_SetColumns 1567
-#define wxComboBox_new_0 1568
-#define wxComboBox_new_3 1570
-#define wxComboBox_destruct 1571
-#define wxComboBox_Create 1573
-#define wxComboBox_CanCopy 1574
-#define wxComboBox_CanCut 1575
-#define wxComboBox_CanPaste 1576
-#define wxComboBox_CanRedo 1577
-#define wxComboBox_CanUndo 1578
-#define wxComboBox_Copy 1579
-#define wxComboBox_Cut 1580
-#define wxComboBox_GetInsertionPoint 1581
-#define wxComboBox_GetLastPosition 1582
-#define wxComboBox_GetValue 1583
-#define wxComboBox_Paste 1584
-#define wxComboBox_Redo 1585
-#define wxComboBox_Replace 1586
-#define wxComboBox_Remove 1587
-#define wxComboBox_SetInsertionPoint 1588
-#define wxComboBox_SetInsertionPointEnd 1589
-#define wxComboBox_SetSelection_1 1590
-#define wxComboBox_SetSelection_2 1591
-#define wxComboBox_SetValue 1592
-#define wxComboBox_Undo 1593
-#define wxGauge_new_0 1594
-#define wxGauge_new_4 1595
-#define wxGauge_Create 1596
-#define wxGauge_GetBezelFace 1597
-#define wxGauge_GetRange 1598
-#define wxGauge_GetShadowWidth 1599
-#define wxGauge_GetValue 1600
-#define wxGauge_IsVertical 1601
-#define wxGauge_SetBezelFace 1602
-#define wxGauge_SetRange 1603
-#define wxGauge_SetShadowWidth 1604
-#define wxGauge_SetValue 1605
-#define wxGauge_Pulse 1606
-#define wxGauge_destroy 1607
-#define wxGenericDirCtrl_new_0 1608
-#define wxGenericDirCtrl_new_2 1609
-#define wxGenericDirCtrl_destruct 1610
-#define wxGenericDirCtrl_Create 1611
-#define wxGenericDirCtrl_Init 1612
-#define wxGenericDirCtrl_CollapseTree 1613
-#define wxGenericDirCtrl_ExpandPath 1614
-#define wxGenericDirCtrl_GetDefaultPath 1615
-#define wxGenericDirCtrl_GetPath 1616
-#define wxGenericDirCtrl_GetFilePath 1617
-#define wxGenericDirCtrl_GetFilter 1618
-#define wxGenericDirCtrl_GetFilterIndex 1619
-#define wxGenericDirCtrl_GetRootId 1620
-#define wxGenericDirCtrl_GetTreeCtrl 1621
-#define wxGenericDirCtrl_ReCreateTree 1622
-#define wxGenericDirCtrl_SetDefaultPath 1623
-#define wxGenericDirCtrl_SetFilter 1624
-#define wxGenericDirCtrl_SetFilterIndex 1625
-#define wxGenericDirCtrl_SetPath 1626
-#define wxStaticBox_new_4 1628
-#define wxStaticBox_new_0 1629
-#define wxStaticBox_Create 1630
-#define wxStaticBox_destroy 1631
-#define wxStaticLine_new_2 1633
-#define wxStaticLine_new_0 1634
-#define wxStaticLine_Create 1635
-#define wxStaticLine_IsVertical 1636
-#define wxStaticLine_GetDefaultSize 1637
-#define wxStaticLine_destroy 1638
-#define wxListBox_new_3 1641
-#define wxListBox_new_0 1642
-#define wxListBox_destruct 1644
-#define wxListBox_Create 1646
-#define wxListBox_Deselect 1647
-#define wxListBox_GetSelections 1648
-#define wxListBox_InsertItems 1649
-#define wxListBox_IsSelected 1650
-#define wxListBox_Set 1652
-#define wxListBox_HitTest 1653
-#define wxListBox_SetFirstItem_1_0 1654
-#define wxListBox_SetFirstItem_1_1 1655
-#define wxListCtrl_new_0 1656
-#define wxListCtrl_new_2 1657
-#define wxListCtrl_Arrange 1658
-#define wxListCtrl_AssignImageList 1659
-#define wxListCtrl_ClearAll 1660
-#define wxListCtrl_Create 1661
-#define wxListCtrl_DeleteAllItems 1662
-#define wxListCtrl_DeleteColumn 1663
-#define wxListCtrl_DeleteItem 1664
-#define wxListCtrl_EditLabel 1665
-#define wxListCtrl_EnsureVisible 1666
-#define wxListCtrl_FindItem_3_0 1667
-#define wxListCtrl_FindItem_3_1 1668
-#define wxListCtrl_GetColumn 1669
-#define wxListCtrl_GetColumnCount 1670
-#define wxListCtrl_GetColumnWidth 1671
-#define wxListCtrl_GetCountPerPage 1672
-#define wxListCtrl_GetEditControl 1673
-#define wxListCtrl_GetImageList 1674
-#define wxListCtrl_GetItem 1675
-#define wxListCtrl_GetItemBackgroundColour 1676
-#define wxListCtrl_GetItemCount 1677
-#define wxListCtrl_GetItemData 1678
-#define wxListCtrl_GetItemFont 1679
-#define wxListCtrl_GetItemPosition 1680
-#define wxListCtrl_GetItemRect 1681
-#define wxListCtrl_GetItemSpacing 1682
-#define wxListCtrl_GetItemState 1683
-#define wxListCtrl_GetItemText 1684
-#define wxListCtrl_GetItemTextColour 1685
-#define wxListCtrl_GetNextItem 1686
-#define wxListCtrl_GetSelectedItemCount 1687
-#define wxListCtrl_GetTextColour 1688
-#define wxListCtrl_GetTopItem 1689
-#define wxListCtrl_GetViewRect 1690
-#define wxListCtrl_HitTest 1691
-#define wxListCtrl_InsertColumn_2 1692
-#define wxListCtrl_InsertColumn_3 1693
-#define wxListCtrl_InsertItem_1 1694
-#define wxListCtrl_InsertItem_2_1 1695
-#define wxListCtrl_InsertItem_2_0 1696
-#define wxListCtrl_InsertItem_3 1697
-#define wxListCtrl_RefreshItem 1698
-#define wxListCtrl_RefreshItems 1699
-#define wxListCtrl_ScrollList 1700
-#define wxListCtrl_SetBackgroundColour 1701
-#define wxListCtrl_SetColumn 1702
-#define wxListCtrl_SetColumnWidth 1703
-#define wxListCtrl_SetImageList 1704
-#define wxListCtrl_SetItem_1 1705
-#define wxListCtrl_SetItem_4 1706
-#define wxListCtrl_SetItemBackgroundColour 1707
-#define wxListCtrl_SetItemCount 1708
-#define wxListCtrl_SetItemData 1709
-#define wxListCtrl_SetItemFont 1710
-#define wxListCtrl_SetItemImage 1711
-#define wxListCtrl_SetItemColumnImage 1712
-#define wxListCtrl_SetItemPosition 1713
-#define wxListCtrl_SetItemState 1714
-#define wxListCtrl_SetItemText 1715
-#define wxListCtrl_SetItemTextColour 1716
-#define wxListCtrl_SetSingleStyle 1717
-#define wxListCtrl_SetTextColour 1718
-#define wxListCtrl_SetWindowStyleFlag 1719
-#define wxListCtrl_SortItems 1720
-#define wxListCtrl_destroy 1721
-#define wxListView_ClearColumnImage 1722
-#define wxListView_Focus 1723
-#define wxListView_GetFirstSelected 1724
-#define wxListView_GetFocusedItem 1725
-#define wxListView_GetNextSelected 1726
-#define wxListView_IsSelected 1727
-#define wxListView_Select 1728
-#define wxListView_SetColumnImage 1729
-#define wxListItem_new_0 1730
-#define wxListItem_new_1 1731
-#define wxListItem_destruct 1732
-#define wxListItem_Clear 1733
-#define wxListItem_GetAlign 1734
-#define wxListItem_GetBackgroundColour 1735
-#define wxListItem_GetColumn 1736
-#define wxListItem_GetFont 1737
-#define wxListItem_GetId 1738
-#define wxListItem_GetImage 1739
-#define wxListItem_GetMask 1740
-#define wxListItem_GetState 1741
-#define wxListItem_GetText 1742
-#define wxListItem_GetTextColour 1743
-#define wxListItem_GetWidth 1744
-#define wxListItem_SetAlign 1745
-#define wxListItem_SetBackgroundColour 1746
-#define wxListItem_SetColumn 1747
-#define wxListItem_SetFont 1748
-#define wxListItem_SetId 1749
-#define wxListItem_SetImage 1750
-#define wxListItem_SetMask 1751
-#define wxListItem_SetState 1752
-#define wxListItem_SetStateMask 1753
-#define wxListItem_SetText 1754
-#define wxListItem_SetTextColour 1755
-#define wxListItem_SetWidth 1756
-#define wxListItemAttr_new_0 1757
-#define wxListItemAttr_new_3 1758
-#define wxListItemAttr_GetBackgroundColour 1759
-#define wxListItemAttr_GetFont 1760
-#define wxListItemAttr_GetTextColour 1761
-#define wxListItemAttr_HasBackgroundColour 1762
-#define wxListItemAttr_HasFont 1763
-#define wxListItemAttr_HasTextColour 1764
-#define wxListItemAttr_SetBackgroundColour 1765
-#define wxListItemAttr_SetFont 1766
-#define wxListItemAttr_SetTextColour 1767
-#define wxListItemAttr_destroy 1768
-#define wxImageList_new_0 1769
-#define wxImageList_new_3 1770
-#define wxImageList_Add_1 1771
-#define wxImageList_Add_2_0 1772
-#define wxImageList_Add_2_1 1773
-#define wxImageList_Create 1774
-#define wxImageList_Draw 1776
-#define wxImageList_GetBitmap 1777
-#define wxImageList_GetIcon 1778
-#define wxImageList_GetImageCount 1779
-#define wxImageList_GetSize 1780
-#define wxImageList_Remove 1781
-#define wxImageList_RemoveAll 1782
-#define wxImageList_Replace_2 1783
-#define wxImageList_Replace_3 1784
-#define wxImageList_destroy 1785
-#define wxTextAttr_new_0 1786
-#define wxTextAttr_new_2 1787
-#define wxTextAttr_GetAlignment 1788
-#define wxTextAttr_GetBackgroundColour 1789
-#define wxTextAttr_GetFont 1790
-#define wxTextAttr_GetLeftIndent 1791
-#define wxTextAttr_GetLeftSubIndent 1792
-#define wxTextAttr_GetRightIndent 1793
-#define wxTextAttr_GetTabs 1794
-#define wxTextAttr_GetTextColour 1795
-#define wxTextAttr_HasBackgroundColour 1796
-#define wxTextAttr_HasFont 1797
-#define wxTextAttr_HasTextColour 1798
-#define wxTextAttr_GetFlags 1799
-#define wxTextAttr_IsDefault 1800
-#define wxTextAttr_SetAlignment 1801
-#define wxTextAttr_SetBackgroundColour 1802
-#define wxTextAttr_SetFlags 1803
-#define wxTextAttr_SetFont 1804
-#define wxTextAttr_SetLeftIndent 1805
-#define wxTextAttr_SetRightIndent 1806
-#define wxTextAttr_SetTabs 1807
-#define wxTextAttr_SetTextColour 1808
-#define wxTextAttr_destroy 1809
-#define wxTextCtrl_new_3 1811
-#define wxTextCtrl_new_0 1812
-#define wxTextCtrl_destruct 1814
-#define wxTextCtrl_AppendText 1815
-#define wxTextCtrl_CanCopy 1816
-#define wxTextCtrl_CanCut 1817
-#define wxTextCtrl_CanPaste 1818
-#define wxTextCtrl_CanRedo 1819
-#define wxTextCtrl_CanUndo 1820
-#define wxTextCtrl_Clear 1821
-#define wxTextCtrl_Copy 1822
-#define wxTextCtrl_Create 1823
-#define wxTextCtrl_Cut 1824
-#define wxTextCtrl_DiscardEdits 1825
-#define wxTextCtrl_EmulateKeyPress 1826
-#define wxTextCtrl_GetDefaultStyle 1827
-#define wxTextCtrl_GetInsertionPoint 1828
-#define wxTextCtrl_GetLastPosition 1829
-#define wxTextCtrl_GetLineLength 1830
-#define wxTextCtrl_GetLineText 1831
-#define wxTextCtrl_GetNumberOfLines 1832
-#define wxTextCtrl_GetRange 1833
-#define wxTextCtrl_GetSelection 1834
-#define wxTextCtrl_GetStringSelection 1835
-#define wxTextCtrl_GetStyle 1836
-#define wxTextCtrl_GetValue 1837
-#define wxTextCtrl_IsEditable 1838
-#define wxTextCtrl_IsModified 1839
-#define wxTextCtrl_IsMultiLine 1840
-#define wxTextCtrl_IsSingleLine 1841
-#define wxTextCtrl_LoadFile 1842
-#define wxTextCtrl_MarkDirty 1843
-#define wxTextCtrl_Paste 1844
-#define wxTextCtrl_PositionToXY 1845
-#define wxTextCtrl_Redo 1846
-#define wxTextCtrl_Remove 1847
-#define wxTextCtrl_Replace 1848
-#define wxTextCtrl_SaveFile 1849
-#define wxTextCtrl_SetDefaultStyle 1850
-#define wxTextCtrl_SetEditable 1851
-#define wxTextCtrl_SetInsertionPoint 1852
-#define wxTextCtrl_SetInsertionPointEnd 1853
-#define wxTextCtrl_SetMaxLength 1855
-#define wxTextCtrl_SetSelection 1856
-#define wxTextCtrl_SetStyle 1857
-#define wxTextCtrl_SetValue 1858
-#define wxTextCtrl_ShowPosition 1859
-#define wxTextCtrl_Undo 1860
-#define wxTextCtrl_WriteText 1861
-#define wxTextCtrl_XYToPosition 1862
-#define wxNotebook_new_0 1865
-#define wxNotebook_new_3 1866
-#define wxNotebook_destruct 1867
-#define wxNotebook_AddPage 1868
-#define wxNotebook_AdvanceSelection 1869
-#define wxNotebook_AssignImageList 1870
-#define wxNotebook_Create 1871
-#define wxNotebook_DeleteAllPages 1872
-#define wxNotebook_DeletePage 1873
-#define wxNotebook_RemovePage 1874
-#define wxNotebook_GetCurrentPage 1875
-#define wxNotebook_GetImageList 1876
-#define wxNotebook_GetPage 1878
-#define wxNotebook_GetPageCount 1879
-#define wxNotebook_GetPageImage 1880
-#define wxNotebook_GetPageText 1881
-#define wxNotebook_GetRowCount 1882
-#define wxNotebook_GetSelection 1883
-#define wxNotebook_GetThemeBackgroundColour 1884
-#define wxNotebook_HitTest 1886
-#define wxNotebook_InsertPage 1888
-#define wxNotebook_SetImageList 1889
-#define wxNotebook_SetPadding 1890
-#define wxNotebook_SetPageSize 1891
-#define wxNotebook_SetPageImage 1892
-#define wxNotebook_SetPageText 1893
-#define wxNotebook_SetSelection 1894
-#define wxNotebook_ChangeSelection 1895
-#define wxChoicebook_new_0 1896
-#define wxChoicebook_new_3 1897
-#define wxChoicebook_AddPage 1898
-#define wxChoicebook_AdvanceSelection 1899
-#define wxChoicebook_AssignImageList 1900
-#define wxChoicebook_Create 1901
-#define wxChoicebook_DeleteAllPages 1902
-#define wxChoicebook_DeletePage 1903
-#define wxChoicebook_RemovePage 1904
-#define wxChoicebook_GetCurrentPage 1905
-#define wxChoicebook_GetImageList 1906
-#define wxChoicebook_GetPage 1908
-#define wxChoicebook_GetPageCount 1909
-#define wxChoicebook_GetPageImage 1910
-#define wxChoicebook_GetPageText 1911
-#define wxChoicebook_GetSelection 1912
-#define wxChoicebook_HitTest 1913
-#define wxChoicebook_InsertPage 1914
-#define wxChoicebook_SetImageList 1915
-#define wxChoicebook_SetPageSize 1916
-#define wxChoicebook_SetPageImage 1917
-#define wxChoicebook_SetPageText 1918
-#define wxChoicebook_SetSelection 1919
-#define wxChoicebook_ChangeSelection 1920
-#define wxChoicebook_destroy 1921
-#define wxToolbook_new_0 1922
-#define wxToolbook_new_3 1923
-#define wxToolbook_AddPage 1924
-#define wxToolbook_AdvanceSelection 1925
-#define wxToolbook_AssignImageList 1926
-#define wxToolbook_Create 1927
-#define wxToolbook_DeleteAllPages 1928
-#define wxToolbook_DeletePage 1929
-#define wxToolbook_RemovePage 1930
-#define wxToolbook_GetCurrentPage 1931
-#define wxToolbook_GetImageList 1932
-#define wxToolbook_GetPage 1934
-#define wxToolbook_GetPageCount 1935
-#define wxToolbook_GetPageImage 1936
-#define wxToolbook_GetPageText 1937
-#define wxToolbook_GetSelection 1938
-#define wxToolbook_HitTest 1940
-#define wxToolbook_InsertPage 1941
-#define wxToolbook_SetImageList 1942
-#define wxToolbook_SetPageSize 1943
-#define wxToolbook_SetPageImage 1944
-#define wxToolbook_SetPageText 1945
-#define wxToolbook_SetSelection 1946
-#define wxToolbook_ChangeSelection 1947
-#define wxToolbook_destroy 1948
-#define wxListbook_new_0 1949
-#define wxListbook_new_3 1950
-#define wxListbook_AddPage 1951
-#define wxListbook_AdvanceSelection 1952
-#define wxListbook_AssignImageList 1953
-#define wxListbook_Create 1954
-#define wxListbook_DeleteAllPages 1955
-#define wxListbook_DeletePage 1956
-#define wxListbook_RemovePage 1957
-#define wxListbook_GetCurrentPage 1958
-#define wxListbook_GetImageList 1959
-#define wxListbook_GetPage 1961
-#define wxListbook_GetPageCount 1962
-#define wxListbook_GetPageImage 1963
-#define wxListbook_GetPageText 1964
-#define wxListbook_GetSelection 1965
-#define wxListbook_HitTest 1967
-#define wxListbook_InsertPage 1968
-#define wxListbook_SetImageList 1969
-#define wxListbook_SetPageSize 1970
-#define wxListbook_SetPageImage 1971
-#define wxListbook_SetPageText 1972
-#define wxListbook_SetSelection 1973
-#define wxListbook_ChangeSelection 1974
-#define wxListbook_destroy 1975
-#define wxTreebook_new_0 1976
-#define wxTreebook_new_3 1977
-#define wxTreebook_AddPage 1978
-#define wxTreebook_AdvanceSelection 1979
-#define wxTreebook_AssignImageList 1980
-#define wxTreebook_Create 1981
-#define wxTreebook_DeleteAllPages 1982
-#define wxTreebook_DeletePage 1983
-#define wxTreebook_RemovePage 1984
-#define wxTreebook_GetCurrentPage 1985
-#define wxTreebook_GetImageList 1986
-#define wxTreebook_GetPage 1988
-#define wxTreebook_GetPageCount 1989
-#define wxTreebook_GetPageImage 1990
-#define wxTreebook_GetPageText 1991
-#define wxTreebook_GetSelection 1992
-#define wxTreebook_ExpandNode 1993
-#define wxTreebook_IsNodeExpanded 1994
-#define wxTreebook_HitTest 1996
-#define wxTreebook_InsertPage 1997
-#define wxTreebook_InsertSubPage 1998
-#define wxTreebook_SetImageList 1999
-#define wxTreebook_SetPageSize 2000
-#define wxTreebook_SetPageImage 2001
-#define wxTreebook_SetPageText 2002
-#define wxTreebook_SetSelection 2003
-#define wxTreebook_ChangeSelection 2004
-#define wxTreebook_destroy 2005
-#define wxTreeCtrl_new_2 2008
-#define wxTreeCtrl_new_0 2009
-#define wxTreeCtrl_destruct 2011
-#define wxTreeCtrl_AddRoot 2012
-#define wxTreeCtrl_AppendItem 2013
-#define wxTreeCtrl_AssignImageList 2014
-#define wxTreeCtrl_AssignStateImageList 2015
-#define wxTreeCtrl_Collapse 2016
-#define wxTreeCtrl_CollapseAndReset 2017
-#define wxTreeCtrl_Create 2018
-#define wxTreeCtrl_Delete 2019
-#define wxTreeCtrl_DeleteAllItems 2020
-#define wxTreeCtrl_DeleteChildren 2021
-#define wxTreeCtrl_EditLabel 2022
-#define wxTreeCtrl_EnsureVisible 2023
-#define wxTreeCtrl_Expand 2024
-#define wxTreeCtrl_GetBoundingRect 2025
-#define wxTreeCtrl_GetChildrenCount 2027
-#define wxTreeCtrl_GetCount 2028
-#define wxTreeCtrl_GetEditControl 2029
-#define wxTreeCtrl_GetFirstChild 2030
-#define wxTreeCtrl_GetNextChild 2031
-#define wxTreeCtrl_GetFirstVisibleItem 2032
-#define wxTreeCtrl_GetImageList 2033
-#define wxTreeCtrl_GetIndent 2034
-#define wxTreeCtrl_GetItemBackgroundColour 2035
-#define wxTreeCtrl_GetItemData 2036
-#define wxTreeCtrl_GetItemFont 2037
-#define wxTreeCtrl_GetItemImage_1 2038
-#define wxTreeCtrl_GetItemImage_2 2039
-#define wxTreeCtrl_GetItemText 2040
-#define wxTreeCtrl_GetItemTextColour 2041
-#define wxTreeCtrl_GetLastChild 2042
-#define wxTreeCtrl_GetNextSibling 2043
-#define wxTreeCtrl_GetNextVisible 2044
-#define wxTreeCtrl_GetItemParent 2045
-#define wxTreeCtrl_GetPrevSibling 2046
-#define wxTreeCtrl_GetPrevVisible 2047
-#define wxTreeCtrl_GetRootItem 2048
-#define wxTreeCtrl_GetSelection 2049
-#define wxTreeCtrl_GetSelections 2050
-#define wxTreeCtrl_GetStateImageList 2051
-#define wxTreeCtrl_HitTest 2052
-#define wxTreeCtrl_InsertItem 2054
-#define wxTreeCtrl_IsBold 2055
-#define wxTreeCtrl_IsExpanded 2056
-#define wxTreeCtrl_IsSelected 2057
-#define wxTreeCtrl_IsVisible 2058
-#define wxTreeCtrl_ItemHasChildren 2059
-#define wxTreeCtrl_PrependItem 2060
-#define wxTreeCtrl_ScrollTo 2061
-#define wxTreeCtrl_SelectItem_1 2062
-#define wxTreeCtrl_SelectItem_2 2063
-#define wxTreeCtrl_SetIndent 2064
-#define wxTreeCtrl_SetImageList 2065
-#define wxTreeCtrl_SetItemBackgroundColour 2066
-#define wxTreeCtrl_SetItemBold 2067
-#define wxTreeCtrl_SetItemData 2068
-#define wxTreeCtrl_SetItemDropHighlight 2069
-#define wxTreeCtrl_SetItemFont 2070
-#define wxTreeCtrl_SetItemHasChildren 2071
-#define wxTreeCtrl_SetItemImage_2 2072
-#define wxTreeCtrl_SetItemImage_3 2073
-#define wxTreeCtrl_SetItemText 2074
-#define wxTreeCtrl_SetItemTextColour 2075
-#define wxTreeCtrl_SetStateImageList 2076
-#define wxTreeCtrl_SetWindowStyle 2077
-#define wxTreeCtrl_SortChildren 2078
-#define wxTreeCtrl_Toggle 2079
-#define wxTreeCtrl_ToggleItemSelection 2080
-#define wxTreeCtrl_Unselect 2081
-#define wxTreeCtrl_UnselectAll 2082
-#define wxTreeCtrl_UnselectItem 2083
-#define wxScrollBar_new_0 2084
-#define wxScrollBar_new_3 2085
-#define wxScrollBar_destruct 2086
-#define wxScrollBar_Create 2087
-#define wxScrollBar_GetRange 2088
-#define wxScrollBar_GetPageSize 2089
-#define wxScrollBar_GetThumbPosition 2090
-#define wxScrollBar_GetThumbSize 2091
-#define wxScrollBar_SetThumbPosition 2092
-#define wxScrollBar_SetScrollbar 2093
-#define wxSpinButton_new_2 2095
-#define wxSpinButton_new_0 2096
-#define wxSpinButton_Create 2097
-#define wxSpinButton_GetMax 2098
-#define wxSpinButton_GetMin 2099
-#define wxSpinButton_GetValue 2100
-#define wxSpinButton_SetRange 2101
-#define wxSpinButton_SetValue 2102
-#define wxSpinButton_destroy 2103
-#define wxSpinCtrl_new_0 2104
-#define wxSpinCtrl_new_2 2105
-#define wxSpinCtrl_Create 2107
-#define wxSpinCtrl_SetValue_1_1 2110
-#define wxSpinCtrl_SetValue_1_0 2111
-#define wxSpinCtrl_GetValue 2113
-#define wxSpinCtrl_SetRange 2115
-#define wxSpinCtrl_SetSelection 2116
-#define wxSpinCtrl_GetMin 2118
-#define wxSpinCtrl_GetMax 2120
-#define wxSpinCtrl_destroy 2121
-#define wxStaticText_new_0 2122
-#define wxStaticText_new_4 2123
-#define wxStaticText_Create 2124
-#define wxStaticText_GetLabel 2125
-#define wxStaticText_SetLabel 2126
-#define wxStaticText_Wrap 2127
-#define wxStaticText_destroy 2128
-#define wxStaticBitmap_new_0 2129
-#define wxStaticBitmap_new_4 2130
-#define wxStaticBitmap_Create 2131
-#define wxStaticBitmap_GetBitmap 2132
-#define wxStaticBitmap_SetBitmap 2133
-#define wxStaticBitmap_destroy 2134
-#define wxRadioBox_new 2135
-#define wxRadioBox_destruct 2137
-#define wxRadioBox_Create 2138
-#define wxRadioBox_Enable_2 2139
-#define wxRadioBox_Enable_1 2140
-#define wxRadioBox_GetSelection 2141
-#define wxRadioBox_GetString 2142
-#define wxRadioBox_SetSelection 2143
-#define wxRadioBox_Show_2 2144
-#define wxRadioBox_Show_1 2145
-#define wxRadioBox_GetColumnCount 2146
-#define wxRadioBox_GetItemHelpText 2147
-#define wxRadioBox_GetItemToolTip 2148
-#define wxRadioBox_GetItemFromPoint 2150
-#define wxRadioBox_GetRowCount 2151
-#define wxRadioBox_IsItemEnabled 2152
-#define wxRadioBox_IsItemShown 2153
-#define wxRadioBox_SetItemHelpText 2154
-#define wxRadioBox_SetItemToolTip 2155
-#define wxRadioButton_new_0 2156
-#define wxRadioButton_new_4 2157
-#define wxRadioButton_Create 2158
-#define wxRadioButton_GetValue 2159
-#define wxRadioButton_SetValue 2160
-#define wxRadioButton_destroy 2161
-#define wxSlider_new_6 2163
-#define wxSlider_new_0 2164
-#define wxSlider_Create 2165
-#define wxSlider_GetLineSize 2166
-#define wxSlider_GetMax 2167
-#define wxSlider_GetMin 2168
-#define wxSlider_GetPageSize 2169
-#define wxSlider_GetThumbLength 2170
-#define wxSlider_GetValue 2171
-#define wxSlider_SetLineSize 2172
-#define wxSlider_SetPageSize 2173
-#define wxSlider_SetRange 2174
-#define wxSlider_SetThumbLength 2175
-#define wxSlider_SetValue 2176
-#define wxSlider_destroy 2177
-#define wxDialog_new_4 2179
-#define wxDialog_new_0 2180
-#define wxDialog_destruct 2182
-#define wxDialog_Create 2183
-#define wxDialog_CreateButtonSizer 2184
-#define wxDialog_CreateStdDialogButtonSizer 2185
-#define wxDialog_EndModal 2186
-#define wxDialog_GetAffirmativeId 2187
-#define wxDialog_GetReturnCode 2188
-#define wxDialog_IsModal 2189
-#define wxDialog_SetAffirmativeId 2190
-#define wxDialog_SetReturnCode 2191
-#define wxDialog_Show 2192
-#define wxDialog_ShowModal 2193
-#define wxColourDialog_new_0 2194
-#define wxColourDialog_new_2 2195
-#define wxColourDialog_destruct 2196
-#define wxColourDialog_Create 2197
-#define wxColourDialog_GetColourData 2198
-#define wxColourData_new_0 2199
-#define wxColourData_new_1 2200
-#define wxColourData_destruct 2201
-#define wxColourData_GetChooseFull 2202
-#define wxColourData_GetColour 2203
-#define wxColourData_GetCustomColour 2205
-#define wxColourData_SetChooseFull 2206
-#define wxColourData_SetColour 2207
-#define wxColourData_SetCustomColour 2208
-#define wxPalette_new_0 2209
-#define wxPalette_new_4 2210
-#define wxPalette_destruct 2212
-#define wxPalette_Create 2213
-#define wxPalette_GetColoursCount 2214
-#define wxPalette_GetPixel 2215
-#define wxPalette_GetRGB 2216
-#define wxPalette_IsOk 2217
-#define wxDirDialog_new 2221
-#define wxDirDialog_destruct 2222
-#define wxDirDialog_GetPath 2223
-#define wxDirDialog_GetMessage 2224
-#define wxDirDialog_SetMessage 2225
-#define wxDirDialog_SetPath 2226
-#define wxFileDialog_new 2230
-#define wxFileDialog_destruct 2231
-#define wxFileDialog_GetDirectory 2232
-#define wxFileDialog_GetFilename 2233
-#define wxFileDialog_GetFilenames 2234
-#define wxFileDialog_GetFilterIndex 2235
-#define wxFileDialog_GetMessage 2236
-#define wxFileDialog_GetPath 2237
-#define wxFileDialog_GetPaths 2238
-#define wxFileDialog_GetWildcard 2239
-#define wxFileDialog_SetDirectory 2240
-#define wxFileDialog_SetFilename 2241
-#define wxFileDialog_SetFilterIndex 2242
-#define wxFileDialog_SetMessage 2243
-#define wxFileDialog_SetPath 2244
-#define wxFileDialog_SetWildcard 2245
-#define wxPickerBase_SetInternalMargin 2246
-#define wxPickerBase_GetInternalMargin 2247
-#define wxPickerBase_SetTextCtrlProportion 2248
-#define wxPickerBase_SetPickerCtrlProportion 2249
-#define wxPickerBase_GetTextCtrlProportion 2250
-#define wxPickerBase_GetPickerCtrlProportion 2251
-#define wxPickerBase_HasTextCtrl 2252
-#define wxPickerBase_GetTextCtrl 2253
-#define wxPickerBase_IsTextCtrlGrowable 2254
-#define wxPickerBase_SetPickerCtrlGrowable 2255
-#define wxPickerBase_SetTextCtrlGrowable 2256
-#define wxPickerBase_IsPickerCtrlGrowable 2257
-#define wxFilePickerCtrl_new_0 2258
-#define wxFilePickerCtrl_new_3 2259
-#define wxFilePickerCtrl_Create 2260
-#define wxFilePickerCtrl_GetPath 2261
-#define wxFilePickerCtrl_SetPath 2262
-#define wxFilePickerCtrl_destroy 2263
-#define wxDirPickerCtrl_new_0 2264
-#define wxDirPickerCtrl_new_3 2265
-#define wxDirPickerCtrl_Create 2266
-#define wxDirPickerCtrl_GetPath 2267
-#define wxDirPickerCtrl_SetPath 2268
-#define wxDirPickerCtrl_destroy 2269
-#define wxColourPickerCtrl_new_0 2270
-#define wxColourPickerCtrl_new_3 2271
-#define wxColourPickerCtrl_Create 2272
-#define wxColourPickerCtrl_GetColour 2273
-#define wxColourPickerCtrl_SetColour_1_1 2274
-#define wxColourPickerCtrl_SetColour_1_0 2275
-#define wxColourPickerCtrl_destroy 2276
-#define wxDatePickerCtrl_new_0 2277
-#define wxDatePickerCtrl_new_3 2278
-#define wxDatePickerCtrl_GetRange 2279
-#define wxDatePickerCtrl_GetValue 2280
-#define wxDatePickerCtrl_SetRange 2281
-#define wxDatePickerCtrl_SetValue 2282
-#define wxDatePickerCtrl_destroy 2283
-#define wxFontPickerCtrl_new_0 2284
-#define wxFontPickerCtrl_new_3 2285
-#define wxFontPickerCtrl_Create 2286
-#define wxFontPickerCtrl_GetSelectedFont 2287
-#define wxFontPickerCtrl_SetSelectedFont 2288
-#define wxFontPickerCtrl_GetMaxPointSize 2289
-#define wxFontPickerCtrl_SetMaxPointSize 2290
-#define wxFontPickerCtrl_destroy 2291
-#define wxFindReplaceDialog_new_0 2294
-#define wxFindReplaceDialog_new_4 2295
-#define wxFindReplaceDialog_destruct 2296
-#define wxFindReplaceDialog_Create 2297
-#define wxFindReplaceDialog_GetData 2298
-#define wxFindReplaceData_new_0 2299
-#define wxFindReplaceData_new_1 2300
-#define wxFindReplaceData_GetFindString 2301
-#define wxFindReplaceData_GetReplaceString 2302
-#define wxFindReplaceData_GetFlags 2303
-#define wxFindReplaceData_SetFlags 2304
-#define wxFindReplaceData_SetFindString 2305
-#define wxFindReplaceData_SetReplaceString 2306
-#define wxFindReplaceData_destroy 2307
-#define wxMultiChoiceDialog_new_0 2308
-#define wxMultiChoiceDialog_new_5 2310
-#define wxMultiChoiceDialog_GetSelections 2311
-#define wxMultiChoiceDialog_SetSelections 2312
-#define wxMultiChoiceDialog_destroy 2313
-#define wxSingleChoiceDialog_new_0 2314
-#define wxSingleChoiceDialog_new_5 2316
-#define wxSingleChoiceDialog_GetSelection 2317
-#define wxSingleChoiceDialog_GetStringSelection 2318
-#define wxSingleChoiceDialog_SetSelection 2319
-#define wxSingleChoiceDialog_destroy 2320
-#define wxTextEntryDialog_new 2321
-#define wxTextEntryDialog_GetValue 2322
-#define wxTextEntryDialog_SetValue 2323
-#define wxTextEntryDialog_destroy 2324
-#define wxPasswordEntryDialog_new 2325
-#define wxPasswordEntryDialog_destroy 2326
-#define wxFontData_new_0 2327
-#define wxFontData_new_1 2328
-#define wxFontData_destruct 2329
-#define wxFontData_EnableEffects 2330
-#define wxFontData_GetAllowSymbols 2331
-#define wxFontData_GetColour 2332
-#define wxFontData_GetChosenFont 2333
-#define wxFontData_GetEnableEffects 2334
-#define wxFontData_GetInitialFont 2335
-#define wxFontData_GetShowHelp 2336
-#define wxFontData_SetAllowSymbols 2337
-#define wxFontData_SetChosenFont 2338
-#define wxFontData_SetColour 2339
-#define wxFontData_SetInitialFont 2340
-#define wxFontData_SetRange 2341
-#define wxFontData_SetShowHelp 2342
-#define wxFontDialog_new_0 2346
-#define wxFontDialog_new_2 2348
-#define wxFontDialog_Create 2350
-#define wxFontDialog_GetFontData 2351
-#define wxFontDialog_destroy 2353
-#define wxProgressDialog_new 2354
-#define wxProgressDialog_destruct 2355
-#define wxProgressDialog_Resume 2356
-#define wxProgressDialog_Update_2 2357
-#define wxProgressDialog_Update_0 2358
-#define wxMessageDialog_new 2359
-#define wxMessageDialog_destruct 2360
-#define wxPageSetupDialog_new 2361
-#define wxPageSetupDialog_destruct 2362
-#define wxPageSetupDialog_GetPageSetupData 2363
-#define wxPageSetupDialog_ShowModal 2364
-#define wxPageSetupDialogData_new_0 2365
-#define wxPageSetupDialogData_new_1_0 2366
-#define wxPageSetupDialogData_new_1_1 2367
-#define wxPageSetupDialogData_destruct 2368
-#define wxPageSetupDialogData_EnableHelp 2369
-#define wxPageSetupDialogData_EnableMargins 2370
-#define wxPageSetupDialogData_EnableOrientation 2371
-#define wxPageSetupDialogData_EnablePaper 2372
-#define wxPageSetupDialogData_EnablePrinter 2373
-#define wxPageSetupDialogData_GetDefaultMinMargins 2374
-#define wxPageSetupDialogData_GetEnableMargins 2375
-#define wxPageSetupDialogData_GetEnableOrientation 2376
-#define wxPageSetupDialogData_GetEnablePaper 2377
-#define wxPageSetupDialogData_GetEnablePrinter 2378
-#define wxPageSetupDialogData_GetEnableHelp 2379
-#define wxPageSetupDialogData_GetDefaultInfo 2380
-#define wxPageSetupDialogData_GetMarginTopLeft 2381
-#define wxPageSetupDialogData_GetMarginBottomRight 2382
-#define wxPageSetupDialogData_GetMinMarginTopLeft 2383
-#define wxPageSetupDialogData_GetMinMarginBottomRight 2384
-#define wxPageSetupDialogData_GetPaperId 2385
-#define wxPageSetupDialogData_GetPaperSize 2386
-#define wxPageSetupDialogData_GetPrintData 2388
-#define wxPageSetupDialogData_IsOk 2389
-#define wxPageSetupDialogData_SetDefaultInfo 2390
-#define wxPageSetupDialogData_SetDefaultMinMargins 2391
-#define wxPageSetupDialogData_SetMarginTopLeft 2392
-#define wxPageSetupDialogData_SetMarginBottomRight 2393
-#define wxPageSetupDialogData_SetMinMarginTopLeft 2394
-#define wxPageSetupDialogData_SetMinMarginBottomRight 2395
-#define wxPageSetupDialogData_SetPaperId 2396
-#define wxPageSetupDialogData_SetPaperSize_1_1 2397
-#define wxPageSetupDialogData_SetPaperSize_1_0 2398
-#define wxPageSetupDialogData_SetPrintData 2399
-#define wxPrintDialog_new_2_0 2400
-#define wxPrintDialog_new_2_1 2401
-#define wxPrintDialog_destruct 2402
-#define wxPrintDialog_GetPrintDialogData 2403
-#define wxPrintDialog_GetPrintDC 2404
-#define wxPrintDialogData_new_0 2405
-#define wxPrintDialogData_new_1_1 2406
-#define wxPrintDialogData_new_1_0 2407
-#define wxPrintDialogData_destruct 2408
-#define wxPrintDialogData_EnableHelp 2409
-#define wxPrintDialogData_EnablePageNumbers 2410
-#define wxPrintDialogData_EnablePrintToFile 2411
-#define wxPrintDialogData_EnableSelection 2412
-#define wxPrintDialogData_GetAllPages 2413
-#define wxPrintDialogData_GetCollate 2414
-#define wxPrintDialogData_GetFromPage 2415
-#define wxPrintDialogData_GetMaxPage 2416
-#define wxPrintDialogData_GetMinPage 2417
-#define wxPrintDialogData_GetNoCopies 2418
-#define wxPrintDialogData_GetPrintData 2419
-#define wxPrintDialogData_GetPrintToFile 2420
-#define wxPrintDialogData_GetSelection 2421
-#define wxPrintDialogData_GetToPage 2422
-#define wxPrintDialogData_IsOk 2423
-#define wxPrintDialogData_SetCollate 2424
-#define wxPrintDialogData_SetFromPage 2425
-#define wxPrintDialogData_SetMaxPage 2426
-#define wxPrintDialogData_SetMinPage 2427
-#define wxPrintDialogData_SetNoCopies 2428
-#define wxPrintDialogData_SetPrintData 2429
-#define wxPrintDialogData_SetPrintToFile 2430
-#define wxPrintDialogData_SetSelection 2431
-#define wxPrintDialogData_SetToPage 2432
-#define wxPrintData_new_0 2433
-#define wxPrintData_new_1 2434
-#define wxPrintData_destruct 2435
-#define wxPrintData_GetCollate 2436
-#define wxPrintData_GetBin 2437
-#define wxPrintData_GetColour 2438
-#define wxPrintData_GetDuplex 2439
-#define wxPrintData_GetNoCopies 2440
-#define wxPrintData_GetOrientation 2441
-#define wxPrintData_GetPaperId 2442
-#define wxPrintData_GetPrinterName 2443
-#define wxPrintData_GetQuality 2444
-#define wxPrintData_IsOk 2445
-#define wxPrintData_SetBin 2446
-#define wxPrintData_SetCollate 2447
-#define wxPrintData_SetColour 2448
-#define wxPrintData_SetDuplex 2449
-#define wxPrintData_SetNoCopies 2450
-#define wxPrintData_SetOrientation 2451
-#define wxPrintData_SetPaperId 2452
-#define wxPrintData_SetPrinterName 2453
-#define wxPrintData_SetQuality 2454
-#define wxPrintPreview_new_2 2457
-#define wxPrintPreview_new_3 2458
-#define wxPrintPreview_destruct 2460
-#define wxPrintPreview_GetCanvas 2461
-#define wxPrintPreview_GetCurrentPage 2462
-#define wxPrintPreview_GetFrame 2463
-#define wxPrintPreview_GetMaxPage 2464
-#define wxPrintPreview_GetMinPage 2465
-#define wxPrintPreview_GetPrintout 2466
-#define wxPrintPreview_GetPrintoutForPrinting 2467
-#define wxPrintPreview_IsOk 2468
-#define wxPrintPreview_PaintPage 2469
-#define wxPrintPreview_Print 2470
-#define wxPrintPreview_RenderPage 2471
-#define wxPrintPreview_SetCanvas 2472
-#define wxPrintPreview_SetCurrentPage 2473
-#define wxPrintPreview_SetFrame 2474
-#define wxPrintPreview_SetPrintout 2475
-#define wxPrintPreview_SetZoom 2476
-#define wxPreviewFrame_new 2477
-#define wxPreviewFrame_destruct 2478
-#define wxPreviewFrame_CreateControlBar 2479
-#define wxPreviewFrame_CreateCanvas 2480
-#define wxPreviewFrame_Initialize 2481
-#define wxPreviewFrame_OnCloseWindow 2482
-#define wxPreviewControlBar_new 2483
-#define wxPreviewControlBar_destruct 2484
-#define wxPreviewControlBar_CreateButtons 2485
-#define wxPreviewControlBar_GetPrintPreview 2486
-#define wxPreviewControlBar_GetZoomControl 2487
-#define wxPreviewControlBar_SetZoomControl 2488
-#define wxPrinter_new 2490
-#define wxPrinter_CreateAbortWindow 2491
-#define wxPrinter_GetAbort 2492
-#define wxPrinter_GetLastError 2493
-#define wxPrinter_GetPrintDialogData 2494
-#define wxPrinter_Print 2495
-#define wxPrinter_PrintDialog 2496
-#define wxPrinter_ReportError 2497
-#define wxPrinter_Setup 2498
-#define wxPrinter_destroy 2499
-#define wxXmlResource_new_1 2500
-#define wxXmlResource_new_2 2501
-#define wxXmlResource_destruct 2502
-#define wxXmlResource_AttachUnknownControl 2503
-#define wxXmlResource_ClearHandlers 2504
-#define wxXmlResource_CompareVersion 2505
-#define wxXmlResource_Get 2506
-#define wxXmlResource_GetFlags 2507
-#define wxXmlResource_GetVersion 2508
-#define wxXmlResource_GetXRCID 2509
-#define wxXmlResource_InitAllHandlers 2510
-#define wxXmlResource_Load 2511
-#define wxXmlResource_LoadBitmap 2512
-#define wxXmlResource_LoadDialog_2 2513
-#define wxXmlResource_LoadDialog_3 2514
-#define wxXmlResource_LoadFrame_2 2515
-#define wxXmlResource_LoadFrame_3 2516
-#define wxXmlResource_LoadIcon 2517
-#define wxXmlResource_LoadMenu 2518
-#define wxXmlResource_LoadMenuBar_2 2519
-#define wxXmlResource_LoadMenuBar_1 2520
-#define wxXmlResource_LoadPanel_2 2521
-#define wxXmlResource_LoadPanel_3 2522
-#define wxXmlResource_LoadToolBar 2523
-#define wxXmlResource_Set 2524
-#define wxXmlResource_SetFlags 2525
-#define wxXmlResource_Unload 2526
-#define wxXmlResource_xrcctrl 2527
-#define wxHtmlEasyPrinting_new 2528
-#define wxHtmlEasyPrinting_destruct 2529
-#define wxHtmlEasyPrinting_GetPrintData 2530
-#define wxHtmlEasyPrinting_GetPageSetupData 2531
-#define wxHtmlEasyPrinting_PreviewFile 2532
-#define wxHtmlEasyPrinting_PreviewText 2533
-#define wxHtmlEasyPrinting_PrintFile 2534
-#define wxHtmlEasyPrinting_PrintText 2535
-#define wxHtmlEasyPrinting_PageSetup 2536
-#define wxHtmlEasyPrinting_SetFonts 2537
-#define wxHtmlEasyPrinting_SetHeader 2538
-#define wxHtmlEasyPrinting_SetFooter 2539
-#define wxGLCanvas_new_2 2541
-#define wxGLCanvas_new_3_1 2542
-#define wxGLCanvas_new_3_0 2543
-#define wxGLCanvas_GetContext 2544
-#define wxGLCanvas_SetCurrent 2546
-#define wxGLCanvas_SwapBuffers 2547
-#define wxGLCanvas_destroy 2548
-#define wxAuiManager_new 2549
-#define wxAuiManager_destruct 2550
-#define wxAuiManager_AddPane_2_1 2551
-#define wxAuiManager_AddPane_3 2552
-#define wxAuiManager_AddPane_2_0 2553
-#define wxAuiManager_DetachPane 2554
-#define wxAuiManager_GetAllPanes 2555
-#define wxAuiManager_GetArtProvider 2556
-#define wxAuiManager_GetDockSizeConstraint 2557
-#define wxAuiManager_GetFlags 2558
-#define wxAuiManager_GetManagedWindow 2559
-#define wxAuiManager_GetManager 2560
-#define wxAuiManager_GetPane_1_1 2561
-#define wxAuiManager_GetPane_1_0 2562
-#define wxAuiManager_HideHint 2563
-#define wxAuiManager_InsertPane 2564
-#define wxAuiManager_LoadPaneInfo 2565
-#define wxAuiManager_LoadPerspective 2566
-#define wxAuiManager_SavePaneInfo 2567
-#define wxAuiManager_SavePerspective 2568
-#define wxAuiManager_SetArtProvider 2569
-#define wxAuiManager_SetDockSizeConstraint 2570
-#define wxAuiManager_SetFlags 2571
-#define wxAuiManager_SetManagedWindow 2572
-#define wxAuiManager_ShowHint 2573
-#define wxAuiManager_UnInit 2574
-#define wxAuiManager_Update 2575
-#define wxAuiPaneInfo_new_0 2576
-#define wxAuiPaneInfo_new_1 2577
-#define wxAuiPaneInfo_destruct 2578
-#define wxAuiPaneInfo_BestSize_1 2579
-#define wxAuiPaneInfo_BestSize_2 2580
-#define wxAuiPaneInfo_Bottom 2581
-#define wxAuiPaneInfo_BottomDockable 2582
-#define wxAuiPaneInfo_Caption 2583
-#define wxAuiPaneInfo_CaptionVisible 2584
-#define wxAuiPaneInfo_Centre 2585
-#define wxAuiPaneInfo_CentrePane 2586
-#define wxAuiPaneInfo_CloseButton 2587
-#define wxAuiPaneInfo_DefaultPane 2588
-#define wxAuiPaneInfo_DestroyOnClose 2589
-#define wxAuiPaneInfo_Direction 2590
-#define wxAuiPaneInfo_Dock 2591
-#define wxAuiPaneInfo_Dockable 2592
-#define wxAuiPaneInfo_Fixed 2593
-#define wxAuiPaneInfo_Float 2594
-#define wxAuiPaneInfo_Floatable 2595
-#define wxAuiPaneInfo_FloatingPosition_1 2596
-#define wxAuiPaneInfo_FloatingPosition_2 2597
-#define wxAuiPaneInfo_FloatingSize_1 2598
-#define wxAuiPaneInfo_FloatingSize_2 2599
-#define wxAuiPaneInfo_Gripper 2600
-#define wxAuiPaneInfo_GripperTop 2601
-#define wxAuiPaneInfo_HasBorder 2602
-#define wxAuiPaneInfo_HasCaption 2603
-#define wxAuiPaneInfo_HasCloseButton 2604
-#define wxAuiPaneInfo_HasFlag 2605
-#define wxAuiPaneInfo_HasGripper 2606
-#define wxAuiPaneInfo_HasGripperTop 2607
-#define wxAuiPaneInfo_HasMaximizeButton 2608
-#define wxAuiPaneInfo_HasMinimizeButton 2609
-#define wxAuiPaneInfo_HasPinButton 2610
-#define wxAuiPaneInfo_Hide 2611
-#define wxAuiPaneInfo_IsBottomDockable 2612
-#define wxAuiPaneInfo_IsDocked 2613
-#define wxAuiPaneInfo_IsFixed 2614
-#define wxAuiPaneInfo_IsFloatable 2615
-#define wxAuiPaneInfo_IsFloating 2616
-#define wxAuiPaneInfo_IsLeftDockable 2617
-#define wxAuiPaneInfo_IsMovable 2618
-#define wxAuiPaneInfo_IsOk 2619
-#define wxAuiPaneInfo_IsResizable 2620
-#define wxAuiPaneInfo_IsRightDockable 2621
-#define wxAuiPaneInfo_IsShown 2622
-#define wxAuiPaneInfo_IsToolbar 2623
-#define wxAuiPaneInfo_IsTopDockable 2624
-#define wxAuiPaneInfo_Layer 2625
-#define wxAuiPaneInfo_Left 2626
-#define wxAuiPaneInfo_LeftDockable 2627
-#define wxAuiPaneInfo_MaxSize_1 2628
-#define wxAuiPaneInfo_MaxSize_2 2629
-#define wxAuiPaneInfo_MaximizeButton 2630
-#define wxAuiPaneInfo_MinSize_1 2631
-#define wxAuiPaneInfo_MinSize_2 2632
-#define wxAuiPaneInfo_MinimizeButton 2633
-#define wxAuiPaneInfo_Movable 2634
-#define wxAuiPaneInfo_Name 2635
-#define wxAuiPaneInfo_PaneBorder 2636
-#define wxAuiPaneInfo_PinButton 2637
-#define wxAuiPaneInfo_Position 2638
-#define wxAuiPaneInfo_Resizable 2639
-#define wxAuiPaneInfo_Right 2640
-#define wxAuiPaneInfo_RightDockable 2641
-#define wxAuiPaneInfo_Row 2642
-#define wxAuiPaneInfo_SafeSet 2643
-#define wxAuiPaneInfo_SetFlag 2644
-#define wxAuiPaneInfo_Show 2645
-#define wxAuiPaneInfo_ToolbarPane 2646
-#define wxAuiPaneInfo_Top 2647
-#define wxAuiPaneInfo_TopDockable 2648
-#define wxAuiPaneInfo_Window 2649
-#define wxAuiNotebook_new_0 2650
-#define wxAuiNotebook_new_2 2651
-#define wxAuiNotebook_AddPage 2652
-#define wxAuiNotebook_Create 2653
-#define wxAuiNotebook_DeletePage 2654
-#define wxAuiNotebook_GetArtProvider 2655
-#define wxAuiNotebook_GetPage 2656
-#define wxAuiNotebook_GetPageBitmap 2657
-#define wxAuiNotebook_GetPageCount 2658
-#define wxAuiNotebook_GetPageIndex 2659
-#define wxAuiNotebook_GetPageText 2660
-#define wxAuiNotebook_GetSelection 2661
-#define wxAuiNotebook_InsertPage 2662
-#define wxAuiNotebook_RemovePage 2663
-#define wxAuiNotebook_SetArtProvider 2664
-#define wxAuiNotebook_SetFont 2665
-#define wxAuiNotebook_SetPageBitmap 2666
-#define wxAuiNotebook_SetPageText 2667
-#define wxAuiNotebook_SetSelection 2668
-#define wxAuiNotebook_SetTabCtrlHeight 2669
-#define wxAuiNotebook_SetUniformBitmapSize 2670
-#define wxAuiNotebook_destroy 2671
-#define wxMDIParentFrame_new_0 2672
-#define wxMDIParentFrame_new_4 2673
-#define wxMDIParentFrame_destruct 2674
-#define wxMDIParentFrame_ActivateNext 2675
-#define wxMDIParentFrame_ActivatePrevious 2676
-#define wxMDIParentFrame_ArrangeIcons 2677
-#define wxMDIParentFrame_Cascade 2678
-#define wxMDIParentFrame_Create 2679
-#define wxMDIParentFrame_GetActiveChild 2680
-#define wxMDIParentFrame_GetClientWindow 2681
-#define wxMDIParentFrame_Tile 2682
-#define wxMDIChildFrame_new_0 2683
-#define wxMDIChildFrame_new_4 2684
-#define wxMDIChildFrame_destruct 2685
-#define wxMDIChildFrame_Activate 2686
-#define wxMDIChildFrame_Create 2687
-#define wxMDIChildFrame_Maximize 2688
-#define wxMDIChildFrame_Restore 2689
-#define wxMDIClientWindow_new_0 2690
-#define wxMDIClientWindow_new_2 2691
-#define wxMDIClientWindow_destruct 2692
-#define wxMDIClientWindow_CreateClient 2693
-#define wxLayoutAlgorithm_new 2694
-#define wxLayoutAlgorithm_LayoutFrame 2695
-#define wxLayoutAlgorithm_LayoutMDIFrame 2696
-#define wxLayoutAlgorithm_LayoutWindow 2697
-#define wxLayoutAlgorithm_destroy 2698
-#define wxEvent_GetId 2699
-#define wxEvent_GetSkipped 2700
-#define wxEvent_GetTimestamp 2701
-#define wxEvent_IsCommandEvent 2702
-#define wxEvent_ResumePropagation 2703
-#define wxEvent_ShouldPropagate 2704
-#define wxEvent_Skip 2705
-#define wxEvent_StopPropagation 2706
-#define wxCommandEvent_getClientData 2707
-#define wxCommandEvent_GetExtraLong 2708
-#define wxCommandEvent_GetInt 2709
-#define wxCommandEvent_GetSelection 2710
-#define wxCommandEvent_GetString 2711
-#define wxCommandEvent_IsChecked 2712
-#define wxCommandEvent_IsSelection 2713
-#define wxCommandEvent_SetInt 2714
-#define wxCommandEvent_SetString 2715
-#define wxScrollEvent_GetOrientation 2716
-#define wxScrollEvent_GetPosition 2717
-#define wxScrollWinEvent_GetOrientation 2718
-#define wxScrollWinEvent_GetPosition 2719
-#define wxMouseEvent_AltDown 2720
-#define wxMouseEvent_Button 2721
-#define wxMouseEvent_ButtonDClick 2722
-#define wxMouseEvent_ButtonDown 2723
-#define wxMouseEvent_ButtonUp 2724
-#define wxMouseEvent_CmdDown 2725
-#define wxMouseEvent_ControlDown 2726
-#define wxMouseEvent_Dragging 2727
-#define wxMouseEvent_Entering 2728
-#define wxMouseEvent_GetButton 2729
-#define wxMouseEvent_GetPosition 2732
-#define wxMouseEvent_GetLogicalPosition 2733
-#define wxMouseEvent_GetLinesPerAction 2734
-#define wxMouseEvent_GetWheelRotation 2735
-#define wxMouseEvent_GetWheelDelta 2736
-#define wxMouseEvent_GetX 2737
-#define wxMouseEvent_GetY 2738
-#define wxMouseEvent_IsButton 2739
-#define wxMouseEvent_IsPageScroll 2740
-#define wxMouseEvent_Leaving 2741
-#define wxMouseEvent_LeftDClick 2742
-#define wxMouseEvent_LeftDown 2743
-#define wxMouseEvent_LeftIsDown 2744
-#define wxMouseEvent_LeftUp 2745
-#define wxMouseEvent_MetaDown 2746
-#define wxMouseEvent_MiddleDClick 2747
-#define wxMouseEvent_MiddleDown 2748
-#define wxMouseEvent_MiddleIsDown 2749
-#define wxMouseEvent_MiddleUp 2750
-#define wxMouseEvent_Moving 2751
-#define wxMouseEvent_RightDClick 2752
-#define wxMouseEvent_RightDown 2753
-#define wxMouseEvent_RightIsDown 2754
-#define wxMouseEvent_RightUp 2755
-#define wxMouseEvent_ShiftDown 2756
-#define wxSetCursorEvent_GetCursor 2757
-#define wxSetCursorEvent_GetX 2758
-#define wxSetCursorEvent_GetY 2759
-#define wxSetCursorEvent_HasCursor 2760
-#define wxSetCursorEvent_SetCursor 2761
-#define wxKeyEvent_AltDown 2762
-#define wxKeyEvent_CmdDown 2763
-#define wxKeyEvent_ControlDown 2764
-#define wxKeyEvent_GetKeyCode 2765
-#define wxKeyEvent_GetModifiers 2766
-#define wxKeyEvent_GetPosition 2769
-#define wxKeyEvent_GetRawKeyCode 2770
-#define wxKeyEvent_GetRawKeyFlags 2771
-#define wxKeyEvent_GetUnicodeKey 2772
-#define wxKeyEvent_GetX 2773
-#define wxKeyEvent_GetY 2774
-#define wxKeyEvent_HasModifiers 2775
-#define wxKeyEvent_MetaDown 2776
-#define wxKeyEvent_ShiftDown 2777
-#define wxSizeEvent_GetSize 2778
-#define wxMoveEvent_GetPosition 2779
-#define wxEraseEvent_GetDC 2780
-#define wxFocusEvent_GetWindow 2781
-#define wxChildFocusEvent_GetWindow 2782
-#define wxMenuEvent_GetMenu 2783
-#define wxMenuEvent_GetMenuId 2784
-#define wxMenuEvent_IsPopup 2785
-#define wxCloseEvent_CanVeto 2786
-#define wxCloseEvent_GetLoggingOff 2787
-#define wxCloseEvent_SetCanVeto 2788
-#define wxCloseEvent_SetLoggingOff 2789
-#define wxCloseEvent_Veto 2790
-#define wxShowEvent_SetShow 2791
-#define wxShowEvent_GetShow 2792
-#define wxIconizeEvent_Iconized 2793
-#define wxJoystickEvent_ButtonDown 2794
-#define wxJoystickEvent_ButtonIsDown 2795
-#define wxJoystickEvent_ButtonUp 2796
-#define wxJoystickEvent_GetButtonChange 2797
-#define wxJoystickEvent_GetButtonState 2798
-#define wxJoystickEvent_GetJoystick 2799
-#define wxJoystickEvent_GetPosition 2800
-#define wxJoystickEvent_GetZPosition 2801
-#define wxJoystickEvent_IsButton 2802
-#define wxJoystickEvent_IsMove 2803
-#define wxJoystickEvent_IsZMove 2804
-#define wxUpdateUIEvent_CanUpdate 2805
-#define wxUpdateUIEvent_Check 2806
-#define wxUpdateUIEvent_Enable 2807
-#define wxUpdateUIEvent_Show 2808
-#define wxUpdateUIEvent_GetChecked 2809
-#define wxUpdateUIEvent_GetEnabled 2810
-#define wxUpdateUIEvent_GetShown 2811
-#define wxUpdateUIEvent_GetSetChecked 2812
-#define wxUpdateUIEvent_GetSetEnabled 2813
-#define wxUpdateUIEvent_GetSetShown 2814
-#define wxUpdateUIEvent_GetSetText 2815
-#define wxUpdateUIEvent_GetText 2816
-#define wxUpdateUIEvent_GetMode 2817
-#define wxUpdateUIEvent_GetUpdateInterval 2818
-#define wxUpdateUIEvent_ResetUpdateTime 2819
-#define wxUpdateUIEvent_SetMode 2820
-#define wxUpdateUIEvent_SetText 2821
-#define wxUpdateUIEvent_SetUpdateInterval 2822
-#define wxMouseCaptureChangedEvent_GetCapturedWindow 2823
-#define wxPaletteChangedEvent_SetChangedWindow 2824
-#define wxPaletteChangedEvent_GetChangedWindow 2825
-#define wxQueryNewPaletteEvent_SetPaletteRealized 2826
-#define wxQueryNewPaletteEvent_GetPaletteRealized 2827
-#define wxNavigationKeyEvent_GetDirection 2828
-#define wxNavigationKeyEvent_SetDirection 2829
-#define wxNavigationKeyEvent_IsWindowChange 2830
-#define wxNavigationKeyEvent_SetWindowChange 2831
-#define wxNavigationKeyEvent_IsFromTab 2832
-#define wxNavigationKeyEvent_SetFromTab 2833
-#define wxNavigationKeyEvent_GetCurrentFocus 2834
-#define wxNavigationKeyEvent_SetCurrentFocus 2835
-#define wxHelpEvent_GetOrigin 2836
-#define wxHelpEvent_GetPosition 2837
-#define wxHelpEvent_SetOrigin 2838
-#define wxHelpEvent_SetPosition 2839
-#define wxContextMenuEvent_GetPosition 2840
-#define wxContextMenuEvent_SetPosition 2841
-#define wxIdleEvent_CanSend 2842
-#define wxIdleEvent_GetMode 2843
-#define wxIdleEvent_RequestMore 2844
-#define wxIdleEvent_MoreRequested 2845
-#define wxIdleEvent_SetMode 2846
-#define wxGridEvent_AltDown 2847
-#define wxGridEvent_ControlDown 2848
-#define wxGridEvent_GetCol 2849
-#define wxGridEvent_GetPosition 2850
-#define wxGridEvent_GetRow 2851
-#define wxGridEvent_MetaDown 2852
-#define wxGridEvent_Selecting 2853
-#define wxGridEvent_ShiftDown 2854
-#define wxNotifyEvent_Allow 2855
-#define wxNotifyEvent_IsAllowed 2856
-#define wxNotifyEvent_Veto 2857
-#define wxSashEvent_GetEdge 2858
-#define wxSashEvent_GetDragRect 2859
-#define wxSashEvent_GetDragStatus 2860
-#define wxListEvent_GetCacheFrom 2861
-#define wxListEvent_GetCacheTo 2862
-#define wxListEvent_GetKeyCode 2863
-#define wxListEvent_GetIndex 2864
-#define wxListEvent_GetColumn 2865
-#define wxListEvent_GetPoint 2866
-#define wxListEvent_GetLabel 2867
-#define wxListEvent_GetText 2868
-#define wxListEvent_GetImage 2869
-#define wxListEvent_GetData 2870
-#define wxListEvent_GetMask 2871
-#define wxListEvent_GetItem 2872
-#define wxListEvent_IsEditCancelled 2873
-#define wxDateEvent_GetDate 2874
-#define wxCalendarEvent_GetWeekDay 2875
-#define wxFileDirPickerEvent_GetPath 2876
-#define wxColourPickerEvent_GetColour 2877
-#define wxFontPickerEvent_GetFont 2878
-#define wxStyledTextEvent_GetPosition 2879
-#define wxStyledTextEvent_GetKey 2880
-#define wxStyledTextEvent_GetModifiers 2881
-#define wxStyledTextEvent_GetModificationType 2882
-#define wxStyledTextEvent_GetText 2883
-#define wxStyledTextEvent_GetLength 2884
-#define wxStyledTextEvent_GetLinesAdded 2885
-#define wxStyledTextEvent_GetLine 2886
-#define wxStyledTextEvent_GetFoldLevelNow 2887
-#define wxStyledTextEvent_GetFoldLevelPrev 2888
-#define wxStyledTextEvent_GetMargin 2889
-#define wxStyledTextEvent_GetMessage 2890
-#define wxStyledTextEvent_GetWParam 2891
-#define wxStyledTextEvent_GetLParam 2892
-#define wxStyledTextEvent_GetListType 2893
-#define wxStyledTextEvent_GetX 2894
-#define wxStyledTextEvent_GetY 2895
-#define wxStyledTextEvent_GetDragText 2896
-#define wxStyledTextEvent_GetDragAllowMove 2897
-#define wxStyledTextEvent_GetDragResult 2898
-#define wxStyledTextEvent_GetShift 2899
-#define wxStyledTextEvent_GetControl 2900
-#define wxStyledTextEvent_GetAlt 2901
-#define utils_wxGetKeyState 2902
-#define utils_wxGetMousePosition 2903
-#define utils_wxGetMouseState 2904
-#define utils_wxSetDetectableAutoRepeat 2905
-#define utils_wxBell 2906
-#define utils_wxFindMenuItemId 2907
-#define utils_wxGenericFindWindowAtPoint 2908
-#define utils_wxFindWindowAtPoint 2909
-#define utils_wxBeginBusyCursor 2910
-#define utils_wxEndBusyCursor 2911
-#define utils_wxIsBusy 2912
-#define utils_wxShutdown 2913
-#define utils_wxShell 2914
-#define utils_wxLaunchDefaultBrowser 2915
-#define utils_wxGetEmailAddress 2916
-#define utils_wxGetUserId 2917
-#define utils_wxGetHomeDir 2918
-#define utils_wxNewId 2919
-#define utils_wxRegisterId 2920
-#define utils_wxGetCurrentId 2921
-#define utils_wxGetOsDescription 2922
-#define utils_wxIsPlatformLittleEndian 2923
-#define utils_wxIsPlatform64Bit 2924
-#define wxPrintout_new 2925
-#define wxPrintout_destruct 2926
-#define wxPrintout_GetDC 2927
-#define wxPrintout_GetPageSizeMM 2928
-#define wxPrintout_GetPageSizePixels 2929
-#define wxPrintout_GetPaperRectPixels 2930
-#define wxPrintout_GetPPIPrinter 2931
-#define wxPrintout_GetPPIScreen 2932
-#define wxPrintout_GetTitle 2933
-#define wxPrintout_IsPreview 2934
-#define wxPrintout_FitThisSizeToPaper 2935
-#define wxPrintout_FitThisSizeToPage 2936
-#define wxPrintout_FitThisSizeToPageMargins 2937
-#define wxPrintout_MapScreenSizeToPaper 2938
-#define wxPrintout_MapScreenSizeToPage 2939
-#define wxPrintout_MapScreenSizeToPageMargins 2940
-#define wxPrintout_MapScreenSizeToDevice 2941
-#define wxPrintout_GetLogicalPaperRect 2942
-#define wxPrintout_GetLogicalPageRect 2943
-#define wxPrintout_GetLogicalPageMarginsRect 2944
-#define wxPrintout_SetLogicalOrigin 2945
-#define wxPrintout_OffsetLogicalOrigin 2946
-#define wxStyledTextCtrl_new_2 2947
-#define wxStyledTextCtrl_new_0 2948
-#define wxStyledTextCtrl_destruct 2949
-#define wxStyledTextCtrl_Create 2950
-#define wxStyledTextCtrl_AddText 2951
-#define wxStyledTextCtrl_AddStyledText 2952
-#define wxStyledTextCtrl_InsertText 2953
-#define wxStyledTextCtrl_ClearAll 2954
-#define wxStyledTextCtrl_ClearDocumentStyle 2955
-#define wxStyledTextCtrl_GetLength 2956
-#define wxStyledTextCtrl_GetCharAt 2957
-#define wxStyledTextCtrl_GetCurrentPos 2958
-#define wxStyledTextCtrl_GetAnchor 2959
-#define wxStyledTextCtrl_GetStyleAt 2960
-#define wxStyledTextCtrl_Redo 2961
-#define wxStyledTextCtrl_SetUndoCollection 2962
-#define wxStyledTextCtrl_SelectAll 2963
-#define wxStyledTextCtrl_SetSavePoint 2964
-#define wxStyledTextCtrl_GetStyledText 2965
-#define wxStyledTextCtrl_CanRedo 2966
-#define wxStyledTextCtrl_MarkerLineFromHandle 2967
-#define wxStyledTextCtrl_MarkerDeleteHandle 2968
-#define wxStyledTextCtrl_GetUndoCollection 2969
-#define wxStyledTextCtrl_GetViewWhiteSpace 2970
-#define wxStyledTextCtrl_SetViewWhiteSpace 2971
-#define wxStyledTextCtrl_PositionFromPoint 2972
-#define wxStyledTextCtrl_PositionFromPointClose 2973
-#define wxStyledTextCtrl_GotoLine 2974
-#define wxStyledTextCtrl_GotoPos 2975
-#define wxStyledTextCtrl_SetAnchor 2976
-#define wxStyledTextCtrl_GetCurLine 2977
-#define wxStyledTextCtrl_GetEndStyled 2978
-#define wxStyledTextCtrl_ConvertEOLs 2979
-#define wxStyledTextCtrl_GetEOLMode 2980
-#define wxStyledTextCtrl_SetEOLMode 2981
-#define wxStyledTextCtrl_StartStyling 2982
-#define wxStyledTextCtrl_SetStyling 2983
-#define wxStyledTextCtrl_GetBufferedDraw 2984
-#define wxStyledTextCtrl_SetBufferedDraw 2985
-#define wxStyledTextCtrl_SetTabWidth 2986
-#define wxStyledTextCtrl_GetTabWidth 2987
-#define wxStyledTextCtrl_SetCodePage 2988
-#define wxStyledTextCtrl_MarkerDefine 2989
-#define wxStyledTextCtrl_MarkerSetForeground 2990
-#define wxStyledTextCtrl_MarkerSetBackground 2991
-#define wxStyledTextCtrl_MarkerAdd 2992
-#define wxStyledTextCtrl_MarkerDelete 2993
-#define wxStyledTextCtrl_MarkerDeleteAll 2994
-#define wxStyledTextCtrl_MarkerGet 2995
-#define wxStyledTextCtrl_MarkerNext 2996
-#define wxStyledTextCtrl_MarkerPrevious 2997
-#define wxStyledTextCtrl_MarkerDefineBitmap 2998
-#define wxStyledTextCtrl_MarkerAddSet 2999
-#define wxStyledTextCtrl_MarkerSetAlpha 3000
-#define wxStyledTextCtrl_SetMarginType 3001
-#define wxStyledTextCtrl_GetMarginType 3002
-#define wxStyledTextCtrl_SetMarginWidth 3003
-#define wxStyledTextCtrl_GetMarginWidth 3004
-#define wxStyledTextCtrl_SetMarginMask 3005
-#define wxStyledTextCtrl_GetMarginMask 3006
-#define wxStyledTextCtrl_SetMarginSensitive 3007
-#define wxStyledTextCtrl_GetMarginSensitive 3008
-#define wxStyledTextCtrl_StyleClearAll 3009
-#define wxStyledTextCtrl_StyleSetForeground 3010
-#define wxStyledTextCtrl_StyleSetBackground 3011
-#define wxStyledTextCtrl_StyleSetBold 3012
-#define wxStyledTextCtrl_StyleSetItalic 3013
-#define wxStyledTextCtrl_StyleSetSize 3014
-#define wxStyledTextCtrl_StyleSetFaceName 3015
-#define wxStyledTextCtrl_StyleSetEOLFilled 3016
-#define wxStyledTextCtrl_StyleResetDefault 3017
-#define wxStyledTextCtrl_StyleSetUnderline 3018
-#define wxStyledTextCtrl_StyleSetCase 3019
-#define wxStyledTextCtrl_StyleSetHotSpot 3020
-#define wxStyledTextCtrl_SetSelForeground 3021
-#define wxStyledTextCtrl_SetSelBackground 3022
-#define wxStyledTextCtrl_GetSelAlpha 3023
-#define wxStyledTextCtrl_SetSelAlpha 3024
-#define wxStyledTextCtrl_SetCaretForeground 3025
-#define wxStyledTextCtrl_CmdKeyAssign 3026
-#define wxStyledTextCtrl_CmdKeyClear 3027
-#define wxStyledTextCtrl_CmdKeyClearAll 3028
-#define wxStyledTextCtrl_SetStyleBytes 3029
-#define wxStyledTextCtrl_StyleSetVisible 3030
-#define wxStyledTextCtrl_GetCaretPeriod 3031
-#define wxStyledTextCtrl_SetCaretPeriod 3032
-#define wxStyledTextCtrl_SetWordChars 3033
-#define wxStyledTextCtrl_BeginUndoAction 3034
-#define wxStyledTextCtrl_EndUndoAction 3035
-#define wxStyledTextCtrl_IndicatorSetStyle 3036
-#define wxStyledTextCtrl_IndicatorGetStyle 3037
-#define wxStyledTextCtrl_IndicatorSetForeground 3038
-#define wxStyledTextCtrl_IndicatorGetForeground 3039
-#define wxStyledTextCtrl_SetWhitespaceForeground 3040
-#define wxStyledTextCtrl_SetWhitespaceBackground 3041
-#define wxStyledTextCtrl_GetStyleBits 3042
-#define wxStyledTextCtrl_SetLineState 3043
-#define wxStyledTextCtrl_GetLineState 3044
-#define wxStyledTextCtrl_GetMaxLineState 3045
-#define wxStyledTextCtrl_GetCaretLineVisible 3046
-#define wxStyledTextCtrl_SetCaretLineVisible 3047
-#define wxStyledTextCtrl_GetCaretLineBackground 3048
-#define wxStyledTextCtrl_SetCaretLineBackground 3049
-#define wxStyledTextCtrl_AutoCompShow 3050
-#define wxStyledTextCtrl_AutoCompCancel 3051
-#define wxStyledTextCtrl_AutoCompActive 3052
-#define wxStyledTextCtrl_AutoCompPosStart 3053
-#define wxStyledTextCtrl_AutoCompComplete 3054
-#define wxStyledTextCtrl_AutoCompStops 3055
-#define wxStyledTextCtrl_AutoCompSetSeparator 3056
-#define wxStyledTextCtrl_AutoCompGetSeparator 3057
-#define wxStyledTextCtrl_AutoCompSelect 3058
-#define wxStyledTextCtrl_AutoCompSetCancelAtStart 3059
-#define wxStyledTextCtrl_AutoCompGetCancelAtStart 3060
-#define wxStyledTextCtrl_AutoCompSetFillUps 3061
-#define wxStyledTextCtrl_AutoCompSetChooseSingle 3062
-#define wxStyledTextCtrl_AutoCompGetChooseSingle 3063
-#define wxStyledTextCtrl_AutoCompSetIgnoreCase 3064
-#define wxStyledTextCtrl_AutoCompGetIgnoreCase 3065
-#define wxStyledTextCtrl_UserListShow 3066
-#define wxStyledTextCtrl_AutoCompSetAutoHide 3067
-#define wxStyledTextCtrl_AutoCompGetAutoHide 3068
-#define wxStyledTextCtrl_AutoCompSetDropRestOfWord 3069
-#define wxStyledTextCtrl_AutoCompGetDropRestOfWord 3070
-#define wxStyledTextCtrl_RegisterImage 3071
-#define wxStyledTextCtrl_ClearRegisteredImages 3072
-#define wxStyledTextCtrl_AutoCompGetTypeSeparator 3073
-#define wxStyledTextCtrl_AutoCompSetTypeSeparator 3074
-#define wxStyledTextCtrl_AutoCompSetMaxWidth 3075
-#define wxStyledTextCtrl_AutoCompGetMaxWidth 3076
-#define wxStyledTextCtrl_AutoCompSetMaxHeight 3077
-#define wxStyledTextCtrl_AutoCompGetMaxHeight 3078
-#define wxStyledTextCtrl_SetIndent 3079
-#define wxStyledTextCtrl_GetIndent 3080
-#define wxStyledTextCtrl_SetUseTabs 3081
-#define wxStyledTextCtrl_GetUseTabs 3082
-#define wxStyledTextCtrl_SetLineIndentation 3083
-#define wxStyledTextCtrl_GetLineIndentation 3084
-#define wxStyledTextCtrl_GetLineIndentPosition 3085
-#define wxStyledTextCtrl_GetColumn 3086
-#define wxStyledTextCtrl_SetUseHorizontalScrollBar 3087
-#define wxStyledTextCtrl_GetUseHorizontalScrollBar 3088
-#define wxStyledTextCtrl_SetIndentationGuides 3089
-#define wxStyledTextCtrl_GetIndentationGuides 3090
-#define wxStyledTextCtrl_SetHighlightGuide 3091
-#define wxStyledTextCtrl_GetHighlightGuide 3092
-#define wxStyledTextCtrl_GetLineEndPosition 3093
-#define wxStyledTextCtrl_GetCodePage 3094
-#define wxStyledTextCtrl_GetCaretForeground 3095
-#define wxStyledTextCtrl_GetReadOnly 3096
-#define wxStyledTextCtrl_SetCurrentPos 3097
-#define wxStyledTextCtrl_SetSelectionStart 3098
-#define wxStyledTextCtrl_GetSelectionStart 3099
-#define wxStyledTextCtrl_SetSelectionEnd 3100
-#define wxStyledTextCtrl_GetSelectionEnd 3101
-#define wxStyledTextCtrl_SetPrintMagnification 3102
-#define wxStyledTextCtrl_GetPrintMagnification 3103
-#define wxStyledTextCtrl_SetPrintColourMode 3104
-#define wxStyledTextCtrl_GetPrintColourMode 3105
-#define wxStyledTextCtrl_FindText 3106
-#define wxStyledTextCtrl_FormatRange 3107
-#define wxStyledTextCtrl_GetFirstVisibleLine 3108
-#define wxStyledTextCtrl_GetLine 3109
-#define wxStyledTextCtrl_GetLineCount 3110
-#define wxStyledTextCtrl_SetMarginLeft 3111
-#define wxStyledTextCtrl_GetMarginLeft 3112
-#define wxStyledTextCtrl_SetMarginRight 3113
-#define wxStyledTextCtrl_GetMarginRight 3114
-#define wxStyledTextCtrl_GetModify 3115
-#define wxStyledTextCtrl_SetSelection 3116
-#define wxStyledTextCtrl_GetSelectedText 3117
-#define wxStyledTextCtrl_GetTextRange 3118
-#define wxStyledTextCtrl_HideSelection 3119
-#define wxStyledTextCtrl_LineFromPosition 3120
-#define wxStyledTextCtrl_PositionFromLine 3121
-#define wxStyledTextCtrl_LineScroll 3122
-#define wxStyledTextCtrl_EnsureCaretVisible 3123
-#define wxStyledTextCtrl_ReplaceSelection 3124
-#define wxStyledTextCtrl_SetReadOnly 3125
-#define wxStyledTextCtrl_CanPaste 3126
-#define wxStyledTextCtrl_CanUndo 3127
-#define wxStyledTextCtrl_EmptyUndoBuffer 3128
-#define wxStyledTextCtrl_Undo 3129
-#define wxStyledTextCtrl_Cut 3130
-#define wxStyledTextCtrl_Copy 3131
-#define wxStyledTextCtrl_Paste 3132
-#define wxStyledTextCtrl_Clear 3133
-#define wxStyledTextCtrl_SetText 3134
-#define wxStyledTextCtrl_GetText 3135
-#define wxStyledTextCtrl_GetTextLength 3136
-#define wxStyledTextCtrl_GetOvertype 3137
-#define wxStyledTextCtrl_SetCaretWidth 3138
-#define wxStyledTextCtrl_GetCaretWidth 3139
-#define wxStyledTextCtrl_SetTargetStart 3140
-#define wxStyledTextCtrl_GetTargetStart 3141
-#define wxStyledTextCtrl_SetTargetEnd 3142
-#define wxStyledTextCtrl_GetTargetEnd 3143
-#define wxStyledTextCtrl_ReplaceTarget 3144
-#define wxStyledTextCtrl_SearchInTarget 3145
-#define wxStyledTextCtrl_SetSearchFlags 3146
-#define wxStyledTextCtrl_GetSearchFlags 3147
-#define wxStyledTextCtrl_CallTipShow 3148
-#define wxStyledTextCtrl_CallTipCancel 3149
-#define wxStyledTextCtrl_CallTipActive 3150
-#define wxStyledTextCtrl_CallTipPosAtStart 3151
-#define wxStyledTextCtrl_CallTipSetHighlight 3152
-#define wxStyledTextCtrl_CallTipSetBackground 3153
-#define wxStyledTextCtrl_CallTipSetForeground 3154
-#define wxStyledTextCtrl_CallTipSetForegroundHighlight 3155
-#define wxStyledTextCtrl_CallTipUseStyle 3156
-#define wxStyledTextCtrl_VisibleFromDocLine 3157
-#define wxStyledTextCtrl_DocLineFromVisible 3158
-#define wxStyledTextCtrl_WrapCount 3159
-#define wxStyledTextCtrl_SetFoldLevel 3160
-#define wxStyledTextCtrl_GetFoldLevel 3161
-#define wxStyledTextCtrl_GetLastChild 3162
-#define wxStyledTextCtrl_GetFoldParent 3163
-#define wxStyledTextCtrl_ShowLines 3164
-#define wxStyledTextCtrl_HideLines 3165
-#define wxStyledTextCtrl_GetLineVisible 3166
-#define wxStyledTextCtrl_SetFoldExpanded 3167
-#define wxStyledTextCtrl_GetFoldExpanded 3168
-#define wxStyledTextCtrl_ToggleFold 3169
-#define wxStyledTextCtrl_EnsureVisible 3170
-#define wxStyledTextCtrl_SetFoldFlags 3171
-#define wxStyledTextCtrl_EnsureVisibleEnforcePolicy 3172
-#define wxStyledTextCtrl_SetTabIndents 3173
-#define wxStyledTextCtrl_GetTabIndents 3174
-#define wxStyledTextCtrl_SetBackSpaceUnIndents 3175
-#define wxStyledTextCtrl_GetBackSpaceUnIndents 3176
-#define wxStyledTextCtrl_SetMouseDwellTime 3177
-#define wxStyledTextCtrl_GetMouseDwellTime 3178
-#define wxStyledTextCtrl_WordStartPosition 3179
-#define wxStyledTextCtrl_WordEndPosition 3180
-#define wxStyledTextCtrl_SetWrapMode 3181
-#define wxStyledTextCtrl_GetWrapMode 3182
-#define wxStyledTextCtrl_SetWrapVisualFlags 3183
-#define wxStyledTextCtrl_GetWrapVisualFlags 3184
-#define wxStyledTextCtrl_SetWrapVisualFlagsLocation 3185
-#define wxStyledTextCtrl_GetWrapVisualFlagsLocation 3186
-#define wxStyledTextCtrl_SetWrapStartIndent 3187
-#define wxStyledTextCtrl_GetWrapStartIndent 3188
-#define wxStyledTextCtrl_SetLayoutCache 3189
-#define wxStyledTextCtrl_GetLayoutCache 3190
-#define wxStyledTextCtrl_SetScrollWidth 3191
-#define wxStyledTextCtrl_GetScrollWidth 3192
-#define wxStyledTextCtrl_TextWidth 3193
-#define wxStyledTextCtrl_GetEndAtLastLine 3194
-#define wxStyledTextCtrl_TextHeight 3195
-#define wxStyledTextCtrl_SetUseVerticalScrollBar 3196
-#define wxStyledTextCtrl_GetUseVerticalScrollBar 3197
-#define wxStyledTextCtrl_AppendText 3198
-#define wxStyledTextCtrl_GetTwoPhaseDraw 3199
-#define wxStyledTextCtrl_SetTwoPhaseDraw 3200
-#define wxStyledTextCtrl_TargetFromSelection 3201
-#define wxStyledTextCtrl_LinesJoin 3202
-#define wxStyledTextCtrl_LinesSplit 3203
-#define wxStyledTextCtrl_SetFoldMarginColour 3204
-#define wxStyledTextCtrl_SetFoldMarginHiColour 3205
-#define wxStyledTextCtrl_LineDown 3206
-#define wxStyledTextCtrl_LineDownExtend 3207
-#define wxStyledTextCtrl_LineUp 3208
-#define wxStyledTextCtrl_LineUpExtend 3209
-#define wxStyledTextCtrl_CharLeft 3210
-#define wxStyledTextCtrl_CharLeftExtend 3211
-#define wxStyledTextCtrl_CharRight 3212
-#define wxStyledTextCtrl_CharRightExtend 3213
-#define wxStyledTextCtrl_WordLeft 3214
-#define wxStyledTextCtrl_WordLeftExtend 3215
-#define wxStyledTextCtrl_WordRight 3216
-#define wxStyledTextCtrl_WordRightExtend 3217
-#define wxStyledTextCtrl_Home 3218
-#define wxStyledTextCtrl_HomeExtend 3219
-#define wxStyledTextCtrl_LineEnd 3220
-#define wxStyledTextCtrl_LineEndExtend 3221
-#define wxStyledTextCtrl_DocumentStart 3222
-#define wxStyledTextCtrl_DocumentStartExtend 3223
-#define wxStyledTextCtrl_DocumentEnd 3224
-#define wxStyledTextCtrl_DocumentEndExtend 3225
-#define wxStyledTextCtrl_PageUp 3226
-#define wxStyledTextCtrl_PageUpExtend 3227
-#define wxStyledTextCtrl_PageDown 3228
-#define wxStyledTextCtrl_PageDownExtend 3229
-#define wxStyledTextCtrl_EditToggleOvertype 3230
-#define wxStyledTextCtrl_Cancel 3231
-#define wxStyledTextCtrl_DeleteBack 3232
-#define wxStyledTextCtrl_Tab 3233
-#define wxStyledTextCtrl_BackTab 3234
-#define wxStyledTextCtrl_NewLine 3235
-#define wxStyledTextCtrl_FormFeed 3236
-#define wxStyledTextCtrl_VCHome 3237
-#define wxStyledTextCtrl_VCHomeExtend 3238
-#define wxStyledTextCtrl_ZoomIn 3239
-#define wxStyledTextCtrl_ZoomOut 3240
-#define wxStyledTextCtrl_DelWordLeft 3241
-#define wxStyledTextCtrl_DelWordRight 3242
-#define wxStyledTextCtrl_LineCut 3243
-#define wxStyledTextCtrl_LineDelete 3244
-#define wxStyledTextCtrl_LineTranspose 3245
-#define wxStyledTextCtrl_LineDuplicate 3246
-#define wxStyledTextCtrl_LowerCase 3247
-#define wxStyledTextCtrl_UpperCase 3248
-#define wxStyledTextCtrl_LineScrollDown 3249
-#define wxStyledTextCtrl_LineScrollUp 3250
-#define wxStyledTextCtrl_DeleteBackNotLine 3251
-#define wxStyledTextCtrl_HomeDisplay 3252
-#define wxStyledTextCtrl_HomeDisplayExtend 3253
-#define wxStyledTextCtrl_LineEndDisplay 3254
-#define wxStyledTextCtrl_LineEndDisplayExtend 3255
-#define wxStyledTextCtrl_HomeWrapExtend 3256
-#define wxStyledTextCtrl_LineEndWrap 3257
-#define wxStyledTextCtrl_LineEndWrapExtend 3258
-#define wxStyledTextCtrl_VCHomeWrap 3259
-#define wxStyledTextCtrl_VCHomeWrapExtend 3260
-#define wxStyledTextCtrl_LineCopy 3261
-#define wxStyledTextCtrl_MoveCaretInsideView 3262
-#define wxStyledTextCtrl_LineLength 3263
-#define wxStyledTextCtrl_BraceHighlight 3264
-#define wxStyledTextCtrl_BraceBadLight 3265
-#define wxStyledTextCtrl_BraceMatch 3266
-#define wxStyledTextCtrl_GetViewEOL 3267
-#define wxStyledTextCtrl_SetViewEOL 3268
-#define wxStyledTextCtrl_SetModEventMask 3269
-#define wxStyledTextCtrl_GetEdgeColumn 3270
-#define wxStyledTextCtrl_SetEdgeColumn 3271
-#define wxStyledTextCtrl_GetEdgeMode 3272
-#define wxStyledTextCtrl_GetEdgeColour 3273
-#define wxStyledTextCtrl_SetEdgeColour 3274
-#define wxStyledTextCtrl_SearchAnchor 3275
-#define wxStyledTextCtrl_SearchNext 3276
-#define wxStyledTextCtrl_SearchPrev 3277
-#define wxStyledTextCtrl_LinesOnScreen 3278
-#define wxStyledTextCtrl_UsePopUp 3279
-#define wxStyledTextCtrl_SelectionIsRectangle 3280
-#define wxStyledTextCtrl_SetZoom 3281
-#define wxStyledTextCtrl_GetZoom 3282
-#define wxStyledTextCtrl_GetModEventMask 3283
-#define wxStyledTextCtrl_SetSTCFocus 3284
-#define wxStyledTextCtrl_GetSTCFocus 3285
-#define wxStyledTextCtrl_SetStatus 3286
-#define wxStyledTextCtrl_GetStatus 3287
-#define wxStyledTextCtrl_SetMouseDownCaptures 3288
-#define wxStyledTextCtrl_GetMouseDownCaptures 3289
-#define wxStyledTextCtrl_SetSTCCursor 3290
-#define wxStyledTextCtrl_GetSTCCursor 3291
-#define wxStyledTextCtrl_SetControlCharSymbol 3292
-#define wxStyledTextCtrl_GetControlCharSymbol 3293
-#define wxStyledTextCtrl_WordPartLeft 3294
-#define wxStyledTextCtrl_WordPartLeftExtend 3295
-#define wxStyledTextCtrl_WordPartRight 3296
-#define wxStyledTextCtrl_WordPartRightExtend 3297
-#define wxStyledTextCtrl_SetVisiblePolicy 3298
-#define wxStyledTextCtrl_DelLineLeft 3299
-#define wxStyledTextCtrl_DelLineRight 3300
-#define wxStyledTextCtrl_GetXOffset 3301
-#define wxStyledTextCtrl_ChooseCaretX 3302
-#define wxStyledTextCtrl_SetXCaretPolicy 3303
-#define wxStyledTextCtrl_SetYCaretPolicy 3304
-#define wxStyledTextCtrl_GetPrintWrapMode 3305
-#define wxStyledTextCtrl_SetHotspotActiveForeground 3306
-#define wxStyledTextCtrl_SetHotspotActiveBackground 3307
-#define wxStyledTextCtrl_SetHotspotActiveUnderline 3308
-#define wxStyledTextCtrl_SetHotspotSingleLine 3309
-#define wxStyledTextCtrl_ParaDownExtend 3310
-#define wxStyledTextCtrl_ParaUp 3311
-#define wxStyledTextCtrl_ParaUpExtend 3312
-#define wxStyledTextCtrl_PositionBefore 3313
-#define wxStyledTextCtrl_PositionAfter 3314
-#define wxStyledTextCtrl_CopyRange 3315
-#define wxStyledTextCtrl_CopyText 3316
-#define wxStyledTextCtrl_SetSelectionMode 3317
-#define wxStyledTextCtrl_GetSelectionMode 3318
-#define wxStyledTextCtrl_LineDownRectExtend 3319
-#define wxStyledTextCtrl_LineUpRectExtend 3320
-#define wxStyledTextCtrl_CharLeftRectExtend 3321
-#define wxStyledTextCtrl_CharRightRectExtend 3322
-#define wxStyledTextCtrl_HomeRectExtend 3323
-#define wxStyledTextCtrl_VCHomeRectExtend 3324
-#define wxStyledTextCtrl_LineEndRectExtend 3325
-#define wxStyledTextCtrl_PageUpRectExtend 3326
-#define wxStyledTextCtrl_PageDownRectExtend 3327
-#define wxStyledTextCtrl_StutteredPageUp 3328
-#define wxStyledTextCtrl_StutteredPageUpExtend 3329
-#define wxStyledTextCtrl_StutteredPageDown 3330
-#define wxStyledTextCtrl_StutteredPageDownExtend 3331
-#define wxStyledTextCtrl_WordLeftEnd 3332
-#define wxStyledTextCtrl_WordLeftEndExtend 3333
-#define wxStyledTextCtrl_WordRightEnd 3334
-#define wxStyledTextCtrl_WordRightEndExtend 3335
-#define wxStyledTextCtrl_SetWhitespaceChars 3336
-#define wxStyledTextCtrl_SetCharsDefault 3337
-#define wxStyledTextCtrl_AutoCompGetCurrent 3338
-#define wxStyledTextCtrl_Allocate 3339
-#define wxStyledTextCtrl_FindColumn 3340
-#define wxStyledTextCtrl_GetCaretSticky 3341
-#define wxStyledTextCtrl_SetCaretSticky 3342
-#define wxStyledTextCtrl_ToggleCaretSticky 3343
-#define wxStyledTextCtrl_SetPasteConvertEndings 3344
-#define wxStyledTextCtrl_GetPasteConvertEndings 3345
-#define wxStyledTextCtrl_SelectionDuplicate 3346
-#define wxStyledTextCtrl_SetCaretLineBackAlpha 3347
-#define wxStyledTextCtrl_GetCaretLineBackAlpha 3348
-#define wxStyledTextCtrl_StartRecord 3349
-#define wxStyledTextCtrl_StopRecord 3350
-#define wxStyledTextCtrl_SetLexer 3351
-#define wxStyledTextCtrl_GetLexer 3352
-#define wxStyledTextCtrl_Colourise 3353
-#define wxStyledTextCtrl_SetProperty 3354
-#define wxStyledTextCtrl_SetKeyWords 3355
-#define wxStyledTextCtrl_SetLexerLanguage 3356
-#define wxStyledTextCtrl_GetProperty 3357
-#define wxStyledTextCtrl_GetStyleBitsNeeded 3358
-#define wxStyledTextCtrl_GetCurrentLine 3359
-#define wxStyledTextCtrl_StyleSetSpec 3360
-#define wxStyledTextCtrl_StyleSetFont 3361
-#define wxStyledTextCtrl_StyleSetFontAttr 3362
-#define wxStyledTextCtrl_StyleSetCharacterSet 3363
-#define wxStyledTextCtrl_StyleSetFontEncoding 3364
-#define wxStyledTextCtrl_CmdKeyExecute 3365
-#define wxStyledTextCtrl_SetMargins 3366
-#define wxStyledTextCtrl_GetSelection 3367
-#define wxStyledTextCtrl_PointFromPosition 3368
-#define wxStyledTextCtrl_ScrollToLine 3369
-#define wxStyledTextCtrl_ScrollToColumn 3370
-#define wxStyledTextCtrl_SendMsg 3371
-#define wxStyledTextCtrl_SetVScrollBar 3372
-#define wxStyledTextCtrl_SetHScrollBar 3373
-#define wxStyledTextCtrl_GetLastKeydownProcessed 3374
-#define wxStyledTextCtrl_SetLastKeydownProcessed 3375
-#define wxStyledTextCtrl_SaveFile 3376
-#define wxStyledTextCtrl_LoadFile 3377
-#define wxStyledTextCtrl_DoDragOver 3378
-#define wxStyledTextCtrl_DoDropText 3379
-#define wxStyledTextCtrl_GetUseAntiAliasing 3380
-#define wxStyledTextCtrl_AddTextRaw 3381
-#define wxStyledTextCtrl_InsertTextRaw 3382
-#define wxStyledTextCtrl_GetCurLineRaw 3383
-#define wxStyledTextCtrl_GetLineRaw 3384
-#define wxStyledTextCtrl_GetSelectedTextRaw 3385
-#define wxStyledTextCtrl_GetTextRangeRaw 3386
-#define wxStyledTextCtrl_SetTextRaw 3387
-#define wxStyledTextCtrl_GetTextRaw 3388
-#define wxStyledTextCtrl_AppendTextRaw 3389
-#define wxArtProvider_GetBitmap 3390
-#define wxArtProvider_GetIcon 3391
-#define wxTreeEvent_GetKeyCode 3392
-#define wxTreeEvent_GetItem 3393
-#define wxTreeEvent_GetKeyEvent 3394
-#define wxTreeEvent_GetLabel 3395
-#define wxTreeEvent_GetOldItem 3396
-#define wxTreeEvent_GetPoint 3397
-#define wxTreeEvent_IsEditCancelled 3398
-#define wxTreeEvent_SetToolTip 3399
-#define wxNotebookEvent_GetOldSelection 3400
-#define wxNotebookEvent_GetSelection 3401
-#define wxNotebookEvent_SetOldSelection 3402
-#define wxNotebookEvent_SetSelection 3403
-#define wxFileDataObject_new 3404
-#define wxFileDataObject_AddFile 3405
-#define wxFileDataObject_GetFilenames 3406
-#define wxFileDataObject_destroy 3407
-#define wxTextDataObject_new 3408
-#define wxTextDataObject_GetTextLength 3409
-#define wxTextDataObject_GetText 3410
-#define wxTextDataObject_SetText 3411
-#define wxTextDataObject_destroy 3412
-#define wxBitmapDataObject_new_1_1 3413
-#define wxBitmapDataObject_new_1_0 3414
-#define wxBitmapDataObject_GetBitmap 3415
-#define wxBitmapDataObject_SetBitmap 3416
-#define wxBitmapDataObject_destroy 3417
-#define wxClipboard_new 3419
-#define wxClipboard_destruct 3420
-#define wxClipboard_AddData 3421
-#define wxClipboard_Clear 3422
-#define wxClipboard_Close 3423
-#define wxClipboard_Flush 3424
-#define wxClipboard_GetData 3425
-#define wxClipboard_IsOpened 3426
-#define wxClipboard_Open 3427
-#define wxClipboard_SetData 3428
-#define wxClipboard_UsePrimarySelection 3430
-#define wxClipboard_IsSupported 3431
-#define wxClipboard_Get 3432
-#define wxSpinEvent_GetPosition 3433
-#define wxSpinEvent_SetPosition 3434
-#define wxSplitterWindow_new_0 3435
-#define wxSplitterWindow_new_2 3436
-#define wxSplitterWindow_destruct 3437
-#define wxSplitterWindow_Create 3438
-#define wxSplitterWindow_GetMinimumPaneSize 3439
-#define wxSplitterWindow_GetSashGravity 3440
-#define wxSplitterWindow_GetSashPosition 3441
-#define wxSplitterWindow_GetSplitMode 3442
-#define wxSplitterWindow_GetWindow1 3443
-#define wxSplitterWindow_GetWindow2 3444
-#define wxSplitterWindow_Initialize 3445
-#define wxSplitterWindow_IsSplit 3446
-#define wxSplitterWindow_ReplaceWindow 3447
-#define wxSplitterWindow_SetSashGravity 3448
-#define wxSplitterWindow_SetSashPosition 3449
-#define wxSplitterWindow_SetSashSize 3450
-#define wxSplitterWindow_SetMinimumPaneSize 3451
-#define wxSplitterWindow_SetSplitMode 3452
-#define wxSplitterWindow_SplitHorizontally 3453
-#define wxSplitterWindow_SplitVertically 3454
-#define wxSplitterWindow_Unsplit 3455
-#define wxSplitterWindow_UpdateSize 3456
-#define wxSplitterEvent_GetSashPosition 3457
-#define wxSplitterEvent_GetX 3458
-#define wxSplitterEvent_GetY 3459
-#define wxSplitterEvent_GetWindowBeingRemoved 3460
-#define wxSplitterEvent_SetSashPosition 3461
-#define wxHtmlWindow_new_0 3462
-#define wxHtmlWindow_new_2 3463
-#define wxHtmlWindow_AppendToPage 3464
-#define wxHtmlWindow_GetOpenedAnchor 3465
-#define wxHtmlWindow_GetOpenedPage 3466
-#define wxHtmlWindow_GetOpenedPageTitle 3467
-#define wxHtmlWindow_GetRelatedFrame 3468
-#define wxHtmlWindow_HistoryBack 3469
-#define wxHtmlWindow_HistoryCanBack 3470
-#define wxHtmlWindow_HistoryCanForward 3471
-#define wxHtmlWindow_HistoryClear 3472
-#define wxHtmlWindow_HistoryForward 3473
-#define wxHtmlWindow_LoadFile 3474
-#define wxHtmlWindow_LoadPage 3475
-#define wxHtmlWindow_SelectAll 3476
-#define wxHtmlWindow_SelectionToText 3477
-#define wxHtmlWindow_SelectLine 3478
-#define wxHtmlWindow_SelectWord 3479
-#define wxHtmlWindow_SetBorders 3480
-#define wxHtmlWindow_SetFonts 3481
-#define wxHtmlWindow_SetPage 3482
-#define wxHtmlWindow_SetRelatedFrame 3483
-#define wxHtmlWindow_SetRelatedStatusBar 3484
-#define wxHtmlWindow_ToText 3485
-#define wxHtmlWindow_destroy 3486
-#define wxHtmlLinkEvent_GetLinkInfo 3487
-#define wxSystemSettings_GetColour 3488
-#define wxSystemSettings_GetFont 3489
-#define wxSystemSettings_GetMetric 3490
-#define wxSystemSettings_GetScreenType 3491
-#define wxSystemOptions_GetOption 3492
-#define wxSystemOptions_GetOptionInt 3493
-#define wxSystemOptions_HasOption 3494
-#define wxSystemOptions_IsFalse 3495
-#define wxSystemOptions_SetOption_2_1 3496
-#define wxSystemOptions_SetOption_2_0 3497
-#define wxAuiNotebookEvent_SetSelection 3498
-#define wxAuiNotebookEvent_GetSelection 3499
-#define wxAuiNotebookEvent_SetOldSelection 3500
-#define wxAuiNotebookEvent_GetOldSelection 3501
-#define wxAuiNotebookEvent_SetDragSource 3502
-#define wxAuiNotebookEvent_GetDragSource 3503
-#define wxAuiManagerEvent_SetManager 3504
-#define wxAuiManagerEvent_GetManager 3505
-#define wxAuiManagerEvent_SetPane 3506
-#define wxAuiManagerEvent_GetPane 3507
-#define wxAuiManagerEvent_SetButton 3508
-#define wxAuiManagerEvent_GetButton 3509
-#define wxAuiManagerEvent_SetDC 3510
-#define wxAuiManagerEvent_GetDC 3511
-#define wxAuiManagerEvent_Veto 3512
-#define wxAuiManagerEvent_GetVeto 3513
-#define wxAuiManagerEvent_SetCanVeto 3514
-#define wxAuiManagerEvent_CanVeto 3515
-#define wxLogNull_new 3516
-#define wxLogNull_destroy 3517
+#define wxDC_GetFont 667
+#define wxDC_GetLayoutDirection 668
+#define wxDC_GetLogicalFunction 669
+#define wxDC_GetMapMode 670
+#define wxDC_GetMultiLineTextExtent_4 671
+#define wxDC_GetMultiLineTextExtent_1 672
+#define wxDC_GetPartialTextExtents 673
+#define wxDC_GetPen 674
+#define wxDC_GetPixel 675
+#define wxDC_GetPPI 676
+#define wxDC_GetSize 678
+#define wxDC_GetSizeMM 680
+#define wxDC_GetTextBackground 681
+#define wxDC_GetTextExtent_4 682
+#define wxDC_GetTextExtent_1 683
+#define wxDC_GetTextForeground 685
+#define wxDC_GetUserScale 686
+#define wxDC_GradientFillConcentric_3 687
+#define wxDC_GradientFillConcentric_4 688
+#define wxDC_GradientFillLinear 689
+#define wxDC_LogicalToDeviceX 690
+#define wxDC_LogicalToDeviceXRel 691
+#define wxDC_LogicalToDeviceY 692
+#define wxDC_LogicalToDeviceYRel 693
+#define wxDC_MaxX 694
+#define wxDC_MaxY 695
+#define wxDC_MinX 696
+#define wxDC_MinY 697
+#define wxDC_IsOk 698
+#define wxDC_ResetBoundingBox 699
+#define wxDC_SetAxisOrientation 700
+#define wxDC_SetBackground 701
+#define wxDC_SetBackgroundMode 702
+#define wxDC_SetBrush 703
+#define wxDC_SetClippingRegion_2 705
+#define wxDC_SetClippingRegion_1_1 706
+#define wxDC_SetClippingRegion_1_0 707
+#define wxDC_SetDeviceOrigin 708
+#define wxDC_SetFont 709
+#define wxDC_SetLayoutDirection 710
+#define wxDC_SetLogicalFunction 711
+#define wxDC_SetMapMode 712
+#define wxDC_SetPalette 713
+#define wxDC_SetPen 714
+#define wxDC_SetTextBackground 715
+#define wxDC_SetTextForeground 716
+#define wxDC_SetUserScale 717
+#define wxDC_StartDoc 718
+#define wxDC_StartPage 719
+#define wxMirrorDC_new 720
+#define wxMirrorDC_destroy 721
+#define wxScreenDC_new 722
+#define wxScreenDC_destruct 723
+#define wxPostScriptDC_new_0 724
+#define wxPostScriptDC_new_1 725
+#define wxPostScriptDC_destruct 726
+#define wxPostScriptDC_SetResolution 727
+#define wxPostScriptDC_GetResolution 728
+#define wxWindowDC_new_0 729
+#define wxWindowDC_new_1 730
+#define wxWindowDC_destruct 731
+#define wxClientDC_new_0 732
+#define wxClientDC_new_1 733
+#define wxClientDC_destroy 734
+#define wxPaintDC_new_0 735
+#define wxPaintDC_new_1 736
+#define wxPaintDC_destroy 737
+#define wxMemoryDC_new_1_0 739
+#define wxMemoryDC_new_1_1 740
+#define wxMemoryDC_new_0 741
+#define wxMemoryDC_destruct 743
+#define wxMemoryDC_SelectObject 744
+#define wxMemoryDC_SelectObjectAsSource 745
+#define wxBufferedDC_new_0 746
+#define wxBufferedDC_new_2 747
+#define wxBufferedDC_new_3 748
+#define wxBufferedDC_destruct 749
+#define wxBufferedDC_Init_2 750
+#define wxBufferedDC_Init_3 751
+#define wxBufferedPaintDC_new_3 752
+#define wxBufferedPaintDC_new_2 753
+#define wxBufferedPaintDC_destruct 754
+#define wxGraphicsObject_destruct 755
+#define wxGraphicsObject_GetRenderer 756
+#define wxGraphicsObject_IsNull 757
+#define wxGraphicsContext_destruct 758
+#define wxGraphicsContext_Create_1_1 759
+#define wxGraphicsContext_Create_1_0 760
+#define wxGraphicsContext_Create_0 761
+#define wxGraphicsContext_CreatePen 762
+#define wxGraphicsContext_CreateBrush 763
+#define wxGraphicsContext_CreateRadialGradientBrush 764
+#define wxGraphicsContext_CreateLinearGradientBrush 765
+#define wxGraphicsContext_CreateFont 766
+#define wxGraphicsContext_CreateMatrix 767
+#define wxGraphicsContext_CreatePath 768
+#define wxGraphicsContext_Clip_1 769
+#define wxGraphicsContext_Clip_4 770
+#define wxGraphicsContext_ResetClip 771
+#define wxGraphicsContext_DrawBitmap 772
+#define wxGraphicsContext_DrawEllipse 773
+#define wxGraphicsContext_DrawIcon 774
+#define wxGraphicsContext_DrawLines 775
+#define wxGraphicsContext_DrawPath 776
+#define wxGraphicsContext_DrawRectangle 777
+#define wxGraphicsContext_DrawRoundedRectangle 778
+#define wxGraphicsContext_DrawText_3 779
+#define wxGraphicsContext_DrawText_4_0 780
+#define wxGraphicsContext_DrawText_4_1 781
+#define wxGraphicsContext_DrawText_5 782
+#define wxGraphicsContext_FillPath 783
+#define wxGraphicsContext_StrokePath 784
+#define wxGraphicsContext_GetPartialTextExtents 785
+#define wxGraphicsContext_GetTextExtent 786
+#define wxGraphicsContext_Rotate 787
+#define wxGraphicsContext_Scale 788
+#define wxGraphicsContext_Translate 789
+#define wxGraphicsContext_GetTransform 790
+#define wxGraphicsContext_SetTransform 791
+#define wxGraphicsContext_ConcatTransform 792
+#define wxGraphicsContext_SetBrush_1_1 793
+#define wxGraphicsContext_SetBrush_1_0 794
+#define wxGraphicsContext_SetFont_1 795
+#define wxGraphicsContext_SetFont_2 796
+#define wxGraphicsContext_SetPen_1_0 797
+#define wxGraphicsContext_SetPen_1_1 798
+#define wxGraphicsContext_StrokeLine 799
+#define wxGraphicsContext_StrokeLines 800
+#define wxGraphicsMatrix_Concat 802
+#define wxGraphicsMatrix_Get 804
+#define wxGraphicsMatrix_Invert 805
+#define wxGraphicsMatrix_IsEqual 806
+#define wxGraphicsMatrix_IsIdentity 808
+#define wxGraphicsMatrix_Rotate 809
+#define wxGraphicsMatrix_Scale 810
+#define wxGraphicsMatrix_Translate 811
+#define wxGraphicsMatrix_Set 812
+#define wxGraphicsMatrix_TransformPoint 813
+#define wxGraphicsMatrix_TransformDistance 814
+#define wxGraphicsPath_MoveToPoint_2 815
+#define wxGraphicsPath_MoveToPoint_1 816
+#define wxGraphicsPath_AddArc_6 817
+#define wxGraphicsPath_AddArc_5 818
+#define wxGraphicsPath_AddArcToPoint 819
+#define wxGraphicsPath_AddCircle 820
+#define wxGraphicsPath_AddCurveToPoint_6 821
+#define wxGraphicsPath_AddCurveToPoint_3 822
+#define wxGraphicsPath_AddEllipse 823
+#define wxGraphicsPath_AddLineToPoint_2 824
+#define wxGraphicsPath_AddLineToPoint_1 825
+#define wxGraphicsPath_AddPath 826
+#define wxGraphicsPath_AddQuadCurveToPoint 827
+#define wxGraphicsPath_AddRectangle 828
+#define wxGraphicsPath_AddRoundedRectangle 829
+#define wxGraphicsPath_CloseSubpath 830
+#define wxGraphicsPath_Contains_3 831
+#define wxGraphicsPath_Contains_2 832
+#define wxGraphicsPath_GetBox 834
+#define wxGraphicsPath_GetCurrentPoint 836
+#define wxGraphicsPath_Transform 837
+#define wxGraphicsRenderer_GetDefaultRenderer 838
+#define wxGraphicsRenderer_CreateContext_1_1 839
+#define wxGraphicsRenderer_CreateContext_1_0 840
+#define wxGraphicsRenderer_CreatePen 841
+#define wxGraphicsRenderer_CreateBrush 842
+#define wxGraphicsRenderer_CreateLinearGradientBrush 843
+#define wxGraphicsRenderer_CreateRadialGradientBrush 844
+#define wxGraphicsRenderer_CreateFont 845
+#define wxGraphicsRenderer_CreateMatrix 846
+#define wxGraphicsRenderer_CreatePath 847
+#define wxMenuBar_new_1 849
+#define wxMenuBar_new_0 851
+#define wxMenuBar_destruct 853
+#define wxMenuBar_Append 854
+#define wxMenuBar_Check 855
+#define wxMenuBar_Enable_2 856
+#define wxMenuBar_Enable_1 857
+#define wxMenuBar_EnableTop 858
+#define wxMenuBar_FindMenu 859
+#define wxMenuBar_FindMenuItem 860
+#define wxMenuBar_FindItem 861
+#define wxMenuBar_GetHelpString 862
+#define wxMenuBar_GetLabel_1 863
+#define wxMenuBar_GetLabel_0 864
+#define wxMenuBar_GetLabelTop 865
+#define wxMenuBar_GetMenu 866
+#define wxMenuBar_GetMenuCount 867
+#define wxMenuBar_Insert 868
+#define wxMenuBar_IsChecked 869
+#define wxMenuBar_IsEnabled_1 870
+#define wxMenuBar_IsEnabled_0 871
+#define wxMenuBar_Remove 872
+#define wxMenuBar_Replace 873
+#define wxMenuBar_SetHelpString 874
+#define wxMenuBar_SetLabel_2 875
+#define wxMenuBar_SetLabel_1 876
+#define wxMenuBar_SetLabelTop 877
+#define wxControl_GetLabel 878
+#define wxControl_SetLabel 879
+#define wxControlWithItems_Append_1 880
+#define wxControlWithItems_Append_2 881
+#define wxControlWithItems_appendStrings_1 882
+#define wxControlWithItems_Clear 883
+#define wxControlWithItems_Delete 884
+#define wxControlWithItems_FindString 885
+#define wxControlWithItems_getClientData 886
+#define wxControlWithItems_setClientData 887
+#define wxControlWithItems_GetCount 888
+#define wxControlWithItems_GetSelection 889
+#define wxControlWithItems_GetString 890
+#define wxControlWithItems_GetStringSelection 891
+#define wxControlWithItems_Insert_2 892
+#define wxControlWithItems_Insert_3 893
+#define wxControlWithItems_IsEmpty 894
+#define wxControlWithItems_Select 895
+#define wxControlWithItems_SetSelection 896
+#define wxControlWithItems_SetString 897
+#define wxControlWithItems_SetStringSelection 898
+#define wxMenu_new_2 901
+#define wxMenu_new_1 902
+#define wxMenu_destruct 904
+#define wxMenu_Append_3 905
+#define wxMenu_Append_1 906
+#define wxMenu_Append_4_0 907
+#define wxMenu_Append_4_1 908
+#define wxMenu_AppendCheckItem 909
+#define wxMenu_AppendRadioItem 910
+#define wxMenu_AppendSeparator 911
+#define wxMenu_Break 912
+#define wxMenu_Check 913
+#define wxMenu_Delete_1_0 914
+#define wxMenu_Delete_1_1 915
+#define wxMenu_Destroy_1_0 916
+#define wxMenu_Destroy_1_1 917
+#define wxMenu_Enable 918
+#define wxMenu_FindItem_1 919
+#define wxMenu_FindItem_2 920
+#define wxMenu_FindItemByPosition 921
+#define wxMenu_GetHelpString 922
+#define wxMenu_GetLabel 923
+#define wxMenu_GetMenuItemCount 924
+#define wxMenu_GetMenuItems 925
+#define wxMenu_GetTitle 927
+#define wxMenu_Insert_2 928
+#define wxMenu_Insert_3 929
+#define wxMenu_Insert_5_1 930
+#define wxMenu_Insert_5_0 931
+#define wxMenu_InsertCheckItem 932
+#define wxMenu_InsertRadioItem 933
+#define wxMenu_InsertSeparator 934
+#define wxMenu_IsChecked 935
+#define wxMenu_IsEnabled 936
+#define wxMenu_Prepend_1 937
+#define wxMenu_Prepend_2 938
+#define wxMenu_Prepend_4_1 939
+#define wxMenu_Prepend_4_0 940
+#define wxMenu_PrependCheckItem 941
+#define wxMenu_PrependRadioItem 942
+#define wxMenu_PrependSeparator 943
+#define wxMenu_Remove_1_0 944
+#define wxMenu_Remove_1_1 945
+#define wxMenu_SetHelpString 946
+#define wxMenu_SetLabel 947
+#define wxMenu_SetTitle 948
+#define wxMenuItem_new 949
+#define wxMenuItem_destruct 951
+#define wxMenuItem_Check 952
+#define wxMenuItem_Enable 953
+#define wxMenuItem_GetBitmap 954
+#define wxMenuItem_GetHelp 955
+#define wxMenuItem_GetId 956
+#define wxMenuItem_GetKind 957
+#define wxMenuItem_GetLabel 958
+#define wxMenuItem_GetLabelFromText 959
+#define wxMenuItem_GetMenu 960
+#define wxMenuItem_GetText 961
+#define wxMenuItem_GetSubMenu 962
+#define wxMenuItem_IsCheckable 963
+#define wxMenuItem_IsChecked 964
+#define wxMenuItem_IsEnabled 965
+#define wxMenuItem_IsSeparator 966
+#define wxMenuItem_IsSubMenu 967
+#define wxMenuItem_SetBitmap 968
+#define wxMenuItem_SetHelp 969
+#define wxMenuItem_SetMenu 970
+#define wxMenuItem_SetSubMenu 971
+#define wxMenuItem_SetText 972
+#define wxToolBar_AddControl 973
+#define wxToolBar_AddSeparator 974
+#define wxToolBar_AddTool_5 975
+#define wxToolBar_AddTool_4_0 976
+#define wxToolBar_AddTool_1 977
+#define wxToolBar_AddTool_4_1 978
+#define wxToolBar_AddTool_3 979
+#define wxToolBar_AddTool_6 980
+#define wxToolBar_AddCheckTool 981
+#define wxToolBar_AddRadioTool 982
+#define wxToolBar_DeleteTool 983
+#define wxToolBar_DeleteToolByPos 984
+#define wxToolBar_EnableTool 985
+#define wxToolBar_FindById 986
+#define wxToolBar_FindControl 987
+#define wxToolBar_FindToolForPosition 988
+#define wxToolBar_GetToolSize 989
+#define wxToolBar_GetToolBitmapSize 990
+#define wxToolBar_GetMargins 991
+#define wxToolBar_GetToolEnabled 992
+#define wxToolBar_GetToolLongHelp 993
+#define wxToolBar_GetToolPacking 994
+#define wxToolBar_GetToolPos 995
+#define wxToolBar_GetToolSeparation 996
+#define wxToolBar_GetToolShortHelp 997
+#define wxToolBar_GetToolState 998
+#define wxToolBar_InsertControl 999
+#define wxToolBar_InsertSeparator 1000
+#define wxToolBar_InsertTool_5 1001
+#define wxToolBar_InsertTool_2 1002
+#define wxToolBar_InsertTool_4 1003
+#define wxToolBar_Realize 1004
+#define wxToolBar_RemoveTool 1005
+#define wxToolBar_SetMargins 1006
+#define wxToolBar_SetToolBitmapSize 1007
+#define wxToolBar_SetToolLongHelp 1008
+#define wxToolBar_SetToolPacking 1009
+#define wxToolBar_SetToolShortHelp 1010
+#define wxToolBar_SetToolSeparation 1011
+#define wxToolBar_ToggleTool 1012
+#define wxStatusBar_new_0 1014
+#define wxStatusBar_new_2 1015
+#define wxStatusBar_destruct 1017
+#define wxStatusBar_Create 1018
+#define wxStatusBar_GetFieldRect 1019
+#define wxStatusBar_GetFieldsCount 1020
+#define wxStatusBar_GetStatusText 1021
+#define wxStatusBar_PopStatusText 1022
+#define wxStatusBar_PushStatusText 1023
+#define wxStatusBar_SetFieldsCount 1024
+#define wxStatusBar_SetMinHeight 1025
+#define wxStatusBar_SetStatusText 1026
+#define wxStatusBar_SetStatusWidths 1027
+#define wxStatusBar_SetStatusStyles 1028
+#define wxBitmap_new_0 1029
+#define wxBitmap_new_3 1030
+#define wxBitmap_new_4 1031
+#define wxBitmap_new_2_0 1032
+#define wxBitmap_new_2_1 1033
+#define wxBitmap_destruct 1034
+#define wxBitmap_ConvertToImage 1035
+#define wxBitmap_CopyFromIcon 1036
+#define wxBitmap_Create 1037
+#define wxBitmap_GetDepth 1038
+#define wxBitmap_GetHeight 1039
+#define wxBitmap_GetPalette 1040
+#define wxBitmap_GetMask 1041
+#define wxBitmap_GetWidth 1042
+#define wxBitmap_GetSubBitmap 1043
+#define wxBitmap_LoadFile 1044
+#define wxBitmap_Ok 1045
+#define wxBitmap_SaveFile 1046
+#define wxBitmap_SetDepth 1047
+#define wxBitmap_SetHeight 1048
+#define wxBitmap_SetMask 1049
+#define wxBitmap_SetPalette 1050
+#define wxBitmap_SetWidth 1051
+#define wxIcon_new_0 1052
+#define wxIcon_new_2 1053
+#define wxIcon_new_1 1054
+#define wxIcon_CopyFromBitmap 1055
+#define wxIcon_destroy 1056
+#define wxIconBundle_new_0 1057
+#define wxIconBundle_new_2 1058
+#define wxIconBundle_new_1_0 1059
+#define wxIconBundle_new_1_1 1060
+#define wxIconBundle_destruct 1061
+#define wxIconBundle_AddIcon_2 1062
+#define wxIconBundle_AddIcon_1 1063
+#define wxIconBundle_GetIcon_1_1 1064
+#define wxIconBundle_GetIcon_1_0 1065
+#define wxCursor_new_0 1066
+#define wxCursor_new_1_0 1067
+#define wxCursor_new_1_1 1068
+#define wxCursor_new_4 1069
+#define wxCursor_destruct 1070
+#define wxCursor_Ok 1071
+#define wxMask_new_0 1072
+#define wxMask_new_2_1 1073
+#define wxMask_new_2_0 1074
+#define wxMask_new_1 1075
+#define wxMask_destruct 1076
+#define wxMask_Create_2_1 1077
+#define wxMask_Create_2_0 1078
+#define wxMask_Create_1 1079
+#define wxImage_new_0 1080
+#define wxImage_new_3_0 1081
+#define wxImage_new_4 1082
+#define wxImage_new_5 1083
+#define wxImage_new_2 1084
+#define wxImage_new_3_1 1085
+#define wxImage_Blur 1086
+#define wxImage_BlurHorizontal 1087
+#define wxImage_BlurVertical 1088
+#define wxImage_ConvertAlphaToMask 1089
+#define wxImage_ConvertToGreyscale 1090
+#define wxImage_ConvertToMono 1091
+#define wxImage_Copy 1092
+#define wxImage_Create_3 1093
+#define wxImage_Create_4 1094
+#define wxImage_Create_5 1095
+#define wxImage_Destroy 1096
+#define wxImage_FindFirstUnusedColour 1097
+#define wxImage_GetImageExtWildcard 1098
+#define wxImage_GetAlpha_2 1099
+#define wxImage_GetAlpha_0 1100
+#define wxImage_GetBlue 1101
+#define wxImage_GetData 1102
+#define wxImage_GetGreen 1103
+#define wxImage_GetImageCount 1104
+#define wxImage_GetHeight 1105
+#define wxImage_GetMaskBlue 1106
+#define wxImage_GetMaskGreen 1107
+#define wxImage_GetMaskRed 1108
+#define wxImage_GetOrFindMaskColour 1109
+#define wxImage_GetPalette 1110
+#define wxImage_GetRed 1111
+#define wxImage_GetSubImage 1112
+#define wxImage_GetWidth 1113
+#define wxImage_HasAlpha 1114
+#define wxImage_HasMask 1115
+#define wxImage_GetOption 1116
+#define wxImage_GetOptionInt 1117
+#define wxImage_HasOption 1118
+#define wxImage_InitAlpha 1119
+#define wxImage_InitStandardHandlers 1120
+#define wxImage_IsTransparent 1121
+#define wxImage_LoadFile_2 1122
+#define wxImage_LoadFile_3 1123
+#define wxImage_Ok 1124
+#define wxImage_RemoveHandler 1125
+#define wxImage_Mirror 1126
+#define wxImage_Replace 1127
+#define wxImage_Rescale 1128
+#define wxImage_Resize 1129
+#define wxImage_Rotate 1130
+#define wxImage_RotateHue 1131
+#define wxImage_Rotate90 1132
+#define wxImage_SaveFile_1 1133
+#define wxImage_SaveFile_2_0 1134
+#define wxImage_SaveFile_2_1 1135
+#define wxImage_Scale 1136
+#define wxImage_Size 1137
+#define wxImage_SetAlpha_3 1138
+#define wxImage_SetAlpha_2 1139
+#define wxImage_SetData_2 1140
+#define wxImage_SetData_4 1141
+#define wxImage_SetMask 1142
+#define wxImage_SetMaskColour 1143
+#define wxImage_SetMaskFromImage 1144
+#define wxImage_SetOption_2_1 1145
+#define wxImage_SetOption_2_0 1146
+#define wxImage_SetPalette 1147
+#define wxImage_SetRGB_5 1148
+#define wxImage_SetRGB_4 1149
+#define wxImage_destroy 1150
+#define wxBrush_new_0 1151
+#define wxBrush_new_2 1152
+#define wxBrush_new_1 1153
+#define wxBrush_destruct 1155
+#define wxBrush_GetColour 1156
+#define wxBrush_GetStipple 1157
+#define wxBrush_GetStyle 1158
+#define wxBrush_IsHatch 1159
+#define wxBrush_IsOk 1160
+#define wxBrush_SetColour_1 1161
+#define wxBrush_SetColour_3 1162
+#define wxBrush_SetStipple 1163
+#define wxBrush_SetStyle 1164
+#define wxPen_new_0 1165
+#define wxPen_new_2 1166
+#define wxPen_destruct 1167
+#define wxPen_GetCap 1168
+#define wxPen_GetColour 1169
+#define wxPen_GetJoin 1170
+#define wxPen_GetStyle 1171
+#define wxPen_GetWidth 1172
+#define wxPen_IsOk 1173
+#define wxPen_SetCap 1174
+#define wxPen_SetColour_1 1175
+#define wxPen_SetColour_3 1176
+#define wxPen_SetJoin 1177
+#define wxPen_SetStyle 1178
+#define wxPen_SetWidth 1179
+#define wxRegion_new_0 1180
+#define wxRegion_new_4 1181
+#define wxRegion_new_2 1182
+#define wxRegion_new_1_1 1183
+#define wxRegion_new_1_0 1185
+#define wxRegion_destruct 1187
+#define wxRegion_Clear 1188
+#define wxRegion_Contains_2 1189
+#define wxRegion_Contains_1_0 1190
+#define wxRegion_Contains_4 1191
+#define wxRegion_Contains_1_1 1192
+#define wxRegion_ConvertToBitmap 1193
+#define wxRegion_GetBox 1194
+#define wxRegion_Intersect_4 1195
+#define wxRegion_Intersect_1_1 1196
+#define wxRegion_Intersect_1_0 1197
+#define wxRegion_IsEmpty 1198
+#define wxRegion_Subtract_4 1199
+#define wxRegion_Subtract_1_1 1200
+#define wxRegion_Subtract_1_0 1201
+#define wxRegion_Offset_2 1202
+#define wxRegion_Offset_1 1203
+#define wxRegion_Union_4 1204
+#define wxRegion_Union_1_2 1205
+#define wxRegion_Union_1_1 1206
+#define wxRegion_Union_1_0 1207
+#define wxRegion_Union_3 1208
+#define wxRegion_Xor_4 1209
+#define wxRegion_Xor_1_1 1210
+#define wxRegion_Xor_1_0 1211
+#define wxAcceleratorTable_new_0 1212
+#define wxAcceleratorTable_new_2 1213
+#define wxAcceleratorTable_destruct 1214
+#define wxAcceleratorTable_Ok 1215
+#define wxAcceleratorEntry_new_1_0 1216
+#define wxAcceleratorEntry_new_1_1 1217
+#define wxAcceleratorEntry_GetCommand 1218
+#define wxAcceleratorEntry_GetFlags 1219
+#define wxAcceleratorEntry_GetKeyCode 1220
+#define wxAcceleratorEntry_Set 1221
+#define wxAcceleratorEntry_destroy 1222
+#define wxCaret_new_3 1227
+#define wxCaret_new_2 1228
+#define wxCaret_destruct 1230
+#define wxCaret_Create_3 1231
+#define wxCaret_Create_2 1232
+#define wxCaret_GetBlinkTime 1233
+#define wxCaret_GetPosition 1235
+#define wxCaret_GetSize 1237
+#define wxCaret_GetWindow 1238
+#define wxCaret_Hide 1239
+#define wxCaret_IsOk 1240
+#define wxCaret_IsVisible 1241
+#define wxCaret_Move_2 1242
+#define wxCaret_Move_1 1243
+#define wxCaret_SetBlinkTime 1244
+#define wxCaret_SetSize_2 1245
+#define wxCaret_SetSize_1 1246
+#define wxCaret_Show 1247
+#define wxSizer_Add_2_1 1248
+#define wxSizer_Add_2_0 1249
+#define wxSizer_Add_3 1250
+#define wxSizer_Add_2_3 1251
+#define wxSizer_Add_2_2 1252
+#define wxSizer_AddSpacer 1253
+#define wxSizer_AddStretchSpacer 1254
+#define wxSizer_CalcMin 1255
+#define wxSizer_Clear 1256
+#define wxSizer_Detach_1_2 1257
+#define wxSizer_Detach_1_1 1258
+#define wxSizer_Detach_1_0 1259
+#define wxSizer_Fit 1260
+#define wxSizer_FitInside 1261
+#define wxSizer_GetChildren 1262
+#define wxSizer_GetItem_2_1 1263
+#define wxSizer_GetItem_2_0 1264
+#define wxSizer_GetItem_1 1265
+#define wxSizer_GetSize 1266
+#define wxSizer_GetPosition 1267
+#define wxSizer_GetMinSize 1268
+#define wxSizer_Hide_2_0 1269
+#define wxSizer_Hide_2_1 1270
+#define wxSizer_Hide_1 1271
+#define wxSizer_Insert_3_1 1272
+#define wxSizer_Insert_3_0 1273
+#define wxSizer_Insert_4 1274
+#define wxSizer_Insert_3_3 1275
+#define wxSizer_Insert_3_2 1276
+#define wxSizer_Insert_2 1277
+#define wxSizer_InsertSpacer 1278
+#define wxSizer_InsertStretchSpacer 1279
+#define wxSizer_IsShown_1_2 1280
+#define wxSizer_IsShown_1_1 1281
+#define wxSizer_IsShown_1_0 1282
+#define wxSizer_Layout 1283
+#define wxSizer_Prepend_2_1 1284
+#define wxSizer_Prepend_2_0 1285
+#define wxSizer_Prepend_3 1286
+#define wxSizer_Prepend_2_3 1287
+#define wxSizer_Prepend_2_2 1288
+#define wxSizer_Prepend_1 1289
+#define wxSizer_PrependSpacer 1290
+#define wxSizer_PrependStretchSpacer 1291
+#define wxSizer_RecalcSizes 1292
+#define wxSizer_Remove_1_1 1293
+#define wxSizer_Remove_1_0 1294
+#define wxSizer_Replace_3_1 1295
+#define wxSizer_Replace_3_0 1296
+#define wxSizer_Replace_2 1297
+#define wxSizer_SetDimension 1298
+#define wxSizer_SetMinSize_2 1299
+#define wxSizer_SetMinSize_1 1300
+#define wxSizer_SetItemMinSize_3_2 1301
+#define wxSizer_SetItemMinSize_2_2 1302
+#define wxSizer_SetItemMinSize_3_1 1303
+#define wxSizer_SetItemMinSize_2_1 1304
+#define wxSizer_SetItemMinSize_3_0 1305
+#define wxSizer_SetItemMinSize_2_0 1306
+#define wxSizer_SetSizeHints 1307
+#define wxSizer_SetVirtualSizeHints 1308
+#define wxSizer_Show_2_2 1309
+#define wxSizer_Show_2_1 1310
+#define wxSizer_Show_2_0 1311
+#define wxSizer_Show_1 1312
+#define wxSizerFlags_new 1313
+#define wxSizerFlags_Align 1314
+#define wxSizerFlags_Border_2 1315
+#define wxSizerFlags_Border_1 1316
+#define wxSizerFlags_Center 1317
+#define wxSizerFlags_Centre 1318
+#define wxSizerFlags_Expand 1319
+#define wxSizerFlags_Left 1320
+#define wxSizerFlags_Proportion 1321
+#define wxSizerFlags_Right 1322
+#define wxSizerFlags_destroy 1323
+#define wxSizerItem_new_5_1 1324
+#define wxSizerItem_new_2_1 1325
+#define wxSizerItem_new_5_0 1326
+#define wxSizerItem_new_2_0 1327
+#define wxSizerItem_new_6 1328
+#define wxSizerItem_new_3 1329
+#define wxSizerItem_new_0 1330
+#define wxSizerItem_destruct 1331
+#define wxSizerItem_CalcMin 1332
+#define wxSizerItem_DeleteWindows 1333
+#define wxSizerItem_DetachSizer 1334
+#define wxSizerItem_GetBorder 1335
+#define wxSizerItem_GetFlag 1336
+#define wxSizerItem_GetMinSize 1337
+#define wxSizerItem_GetPosition 1338
+#define wxSizerItem_GetProportion 1339
+#define wxSizerItem_GetRatio 1340
+#define wxSizerItem_GetRect 1341
+#define wxSizerItem_GetSize 1342
+#define wxSizerItem_GetSizer 1343
+#define wxSizerItem_GetSpacer 1344
+#define wxSizerItem_GetUserData 1345
+#define wxSizerItem_GetWindow 1346
+#define wxSizerItem_IsSizer 1347
+#define wxSizerItem_IsShown 1348
+#define wxSizerItem_IsSpacer 1349
+#define wxSizerItem_IsWindow 1350
+#define wxSizerItem_SetBorder 1351
+#define wxSizerItem_SetDimension 1352
+#define wxSizerItem_SetFlag 1353
+#define wxSizerItem_SetInitSize 1354
+#define wxSizerItem_SetMinSize_1 1355
+#define wxSizerItem_SetMinSize_2 1356
+#define wxSizerItem_SetProportion 1357
+#define wxSizerItem_SetRatio_2 1358
+#define wxSizerItem_SetRatio_1_1 1359
+#define wxSizerItem_SetRatio_1_0 1360
+#define wxSizerItem_SetSizer 1361
+#define wxSizerItem_SetSpacer_1 1362
+#define wxSizerItem_SetSpacer_2 1363
+#define wxSizerItem_SetWindow 1364
+#define wxSizerItem_Show 1365
+#define wxBoxSizer_new 1366
+#define wxBoxSizer_GetOrientation 1367
+#define wxBoxSizer_destroy 1368
+#define wxStaticBoxSizer_new_2 1369
+#define wxStaticBoxSizer_new_3 1370
+#define wxStaticBoxSizer_GetStaticBox 1371
+#define wxStaticBoxSizer_destroy 1372
+#define wxGridSizer_new_4 1373
+#define wxGridSizer_new_2 1374
+#define wxGridSizer_GetCols 1375
+#define wxGridSizer_GetHGap 1376
+#define wxGridSizer_GetRows 1377
+#define wxGridSizer_GetVGap 1378
+#define wxGridSizer_SetCols 1379
+#define wxGridSizer_SetHGap 1380
+#define wxGridSizer_SetRows 1381
+#define wxGridSizer_SetVGap 1382
+#define wxGridSizer_destroy 1383
+#define wxFlexGridSizer_new_4 1384
+#define wxFlexGridSizer_new_2 1385
+#define wxFlexGridSizer_AddGrowableCol 1386
+#define wxFlexGridSizer_AddGrowableRow 1387
+#define wxFlexGridSizer_GetFlexibleDirection 1388
+#define wxFlexGridSizer_GetNonFlexibleGrowMode 1389
+#define wxFlexGridSizer_RemoveGrowableCol 1390
+#define wxFlexGridSizer_RemoveGrowableRow 1391
+#define wxFlexGridSizer_SetFlexibleDirection 1392
+#define wxFlexGridSizer_SetNonFlexibleGrowMode 1393
+#define wxFlexGridSizer_destroy 1394
+#define wxGridBagSizer_new 1395
+#define wxGridBagSizer_Add_3_2 1396
+#define wxGridBagSizer_Add_3_1 1397
+#define wxGridBagSizer_Add_4 1398
+#define wxGridBagSizer_Add_1_0 1399
+#define wxGridBagSizer_Add_2_1 1400
+#define wxGridBagSizer_Add_2_0 1401
+#define wxGridBagSizer_Add_3_0 1402
+#define wxGridBagSizer_Add_1_1 1403
+#define wxGridBagSizer_CalcMin 1404
+#define wxGridBagSizer_CheckForIntersection_2 1405
+#define wxGridBagSizer_CheckForIntersection_3 1406
+#define wxGridBagSizer_FindItem_1_1 1407
+#define wxGridBagSizer_FindItem_1_0 1408
+#define wxGridBagSizer_FindItemAtPoint 1409
+#define wxGridBagSizer_FindItemAtPosition 1410
+#define wxGridBagSizer_FindItemWithData 1411
+#define wxGridBagSizer_GetCellSize 1412
+#define wxGridBagSizer_GetEmptyCellSize 1413
+#define wxGridBagSizer_GetItemPosition_1_2 1414
+#define wxGridBagSizer_GetItemPosition_1_1 1415
+#define wxGridBagSizer_GetItemPosition_1_0 1416
+#define wxGridBagSizer_GetItemSpan_1_2 1417
+#define wxGridBagSizer_GetItemSpan_1_1 1418
+#define wxGridBagSizer_GetItemSpan_1_0 1419
+#define wxGridBagSizer_SetEmptyCellSize 1420
+#define wxGridBagSizer_SetItemPosition_2_2 1421
+#define wxGridBagSizer_SetItemPosition_2_1 1422
+#define wxGridBagSizer_SetItemPosition_2_0 1423
+#define wxGridBagSizer_SetItemSpan_2_2 1424
+#define wxGridBagSizer_SetItemSpan_2_1 1425
+#define wxGridBagSizer_SetItemSpan_2_0 1426
+#define wxGridBagSizer_destroy 1427
+#define wxStdDialogButtonSizer_new 1428
+#define wxStdDialogButtonSizer_AddButton 1429
+#define wxStdDialogButtonSizer_Realize 1430
+#define wxStdDialogButtonSizer_SetAffirmativeButton 1431
+#define wxStdDialogButtonSizer_SetCancelButton 1432
+#define wxStdDialogButtonSizer_SetNegativeButton 1433
+#define wxStdDialogButtonSizer_destroy 1434
+#define wxFont_new_0 1435
+#define wxFont_new_1 1436
+#define wxFont_new_5 1437
+#define wxFont_destruct 1439
+#define wxFont_IsFixedWidth 1440
+#define wxFont_GetDefaultEncoding 1441
+#define wxFont_GetFaceName 1442
+#define wxFont_GetFamily 1443
+#define wxFont_GetNativeFontInfoDesc 1444
+#define wxFont_GetNativeFontInfoUserDesc 1445
+#define wxFont_GetPointSize 1446
+#define wxFont_GetStyle 1447
+#define wxFont_GetUnderlined 1448
+#define wxFont_GetWeight 1449
+#define wxFont_Ok 1450
+#define wxFont_SetDefaultEncoding 1451
+#define wxFont_SetFaceName 1452
+#define wxFont_SetFamily 1453
+#define wxFont_SetPointSize 1454
+#define wxFont_SetStyle 1455
+#define wxFont_SetUnderlined 1456
+#define wxFont_SetWeight 1457
+#define wxToolTip_Enable 1458
+#define wxToolTip_SetDelay 1459
+#define wxToolTip_new 1460
+#define wxToolTip_SetTip 1461
+#define wxToolTip_GetTip 1462
+#define wxToolTip_GetWindow 1463
+#define wxToolTip_destroy 1464
+#define wxButton_new_3 1466
+#define wxButton_new_0 1467
+#define wxButton_destruct 1468
+#define wxButton_Create 1469
+#define wxButton_GetDefaultSize 1470
+#define wxButton_SetDefault 1471
+#define wxButton_SetLabel 1472
+#define wxBitmapButton_new_4 1474
+#define wxBitmapButton_new_0 1475
+#define wxBitmapButton_Create 1476
+#define wxBitmapButton_GetBitmapDisabled 1477
+#define wxBitmapButton_GetBitmapFocus 1479
+#define wxBitmapButton_GetBitmapLabel 1481
+#define wxBitmapButton_GetBitmapSelected 1483
+#define wxBitmapButton_SetBitmapDisabled 1485
+#define wxBitmapButton_SetBitmapFocus 1486
+#define wxBitmapButton_SetBitmapLabel 1487
+#define wxBitmapButton_SetBitmapSelected 1488
+#define wxBitmapButton_destroy 1489
+#define wxToggleButton_new_0 1490
+#define wxToggleButton_new_4 1491
+#define wxToggleButton_Create 1492
+#define wxToggleButton_GetValue 1493
+#define wxToggleButton_SetValue 1494
+#define wxToggleButton_destroy 1495
+#define wxCalendarCtrl_new_0 1496
+#define wxCalendarCtrl_new_3 1497
+#define wxCalendarCtrl_Create 1498
+#define wxCalendarCtrl_destruct 1499
+#define wxCalendarCtrl_SetDate 1500
+#define wxCalendarCtrl_GetDate 1501
+#define wxCalendarCtrl_EnableYearChange 1502
+#define wxCalendarCtrl_EnableMonthChange 1503
+#define wxCalendarCtrl_EnableHolidayDisplay 1504
+#define wxCalendarCtrl_SetHeaderColours 1505
+#define wxCalendarCtrl_GetHeaderColourFg 1506
+#define wxCalendarCtrl_GetHeaderColourBg 1507
+#define wxCalendarCtrl_SetHighlightColours 1508
+#define wxCalendarCtrl_GetHighlightColourFg 1509
+#define wxCalendarCtrl_GetHighlightColourBg 1510
+#define wxCalendarCtrl_SetHolidayColours 1511
+#define wxCalendarCtrl_GetHolidayColourFg 1512
+#define wxCalendarCtrl_GetHolidayColourBg 1513
+#define wxCalendarCtrl_GetAttr 1514
+#define wxCalendarCtrl_SetAttr 1515
+#define wxCalendarCtrl_SetHoliday 1516
+#define wxCalendarCtrl_ResetAttr 1517
+#define wxCalendarCtrl_HitTest 1518
+#define wxCalendarDateAttr_new_0 1519
+#define wxCalendarDateAttr_new_2_1 1520
+#define wxCalendarDateAttr_new_2_0 1521
+#define wxCalendarDateAttr_SetTextColour 1522
+#define wxCalendarDateAttr_SetBackgroundColour 1523
+#define wxCalendarDateAttr_SetBorderColour 1524
+#define wxCalendarDateAttr_SetFont 1525
+#define wxCalendarDateAttr_SetBorder 1526
+#define wxCalendarDateAttr_SetHoliday 1527
+#define wxCalendarDateAttr_HasTextColour 1528
+#define wxCalendarDateAttr_HasBackgroundColour 1529
+#define wxCalendarDateAttr_HasBorderColour 1530
+#define wxCalendarDateAttr_HasFont 1531
+#define wxCalendarDateAttr_HasBorder 1532
+#define wxCalendarDateAttr_IsHoliday 1533
+#define wxCalendarDateAttr_GetTextColour 1534
+#define wxCalendarDateAttr_GetBackgroundColour 1535
+#define wxCalendarDateAttr_GetBorderColour 1536
+#define wxCalendarDateAttr_GetFont 1537
+#define wxCalendarDateAttr_GetBorder 1538
+#define wxCalendarDateAttr_destroy 1539
+#define wxCheckBox_new_4 1541
+#define wxCheckBox_new_0 1542
+#define wxCheckBox_Create 1543
+#define wxCheckBox_GetValue 1544
+#define wxCheckBox_Get3StateValue 1545
+#define wxCheckBox_Is3rdStateAllowedForUser 1546
+#define wxCheckBox_Is3State 1547
+#define wxCheckBox_IsChecked 1548
+#define wxCheckBox_SetValue 1549
+#define wxCheckBox_Set3StateValue 1550
+#define wxCheckBox_destroy 1551
+#define wxCheckListBox_new_0 1552
+#define wxCheckListBox_new_3 1554
+#define wxCheckListBox_Check 1555
+#define wxCheckListBox_IsChecked 1556
+#define wxCheckListBox_destroy 1557
+#define wxChoice_new_3 1560
+#define wxChoice_new_0 1561
+#define wxChoice_destruct 1563
+#define wxChoice_Create 1565
+#define wxChoice_Delete 1566
+#define wxChoice_GetColumns 1567
+#define wxChoice_SetColumns 1568
+#define wxComboBox_new_0 1569
+#define wxComboBox_new_3 1571
+#define wxComboBox_destruct 1572
+#define wxComboBox_Create 1574
+#define wxComboBox_CanCopy 1575
+#define wxComboBox_CanCut 1576
+#define wxComboBox_CanPaste 1577
+#define wxComboBox_CanRedo 1578
+#define wxComboBox_CanUndo 1579
+#define wxComboBox_Copy 1580
+#define wxComboBox_Cut 1581
+#define wxComboBox_GetInsertionPoint 1582
+#define wxComboBox_GetLastPosition 1583
+#define wxComboBox_GetValue 1584
+#define wxComboBox_Paste 1585
+#define wxComboBox_Redo 1586
+#define wxComboBox_Replace 1587
+#define wxComboBox_Remove 1588
+#define wxComboBox_SetInsertionPoint 1589
+#define wxComboBox_SetInsertionPointEnd 1590
+#define wxComboBox_SetSelection_1 1591
+#define wxComboBox_SetSelection_2 1592
+#define wxComboBox_SetValue 1593
+#define wxComboBox_Undo 1594
+#define wxGauge_new_0 1595
+#define wxGauge_new_4 1596
+#define wxGauge_Create 1597
+#define wxGauge_GetBezelFace 1598
+#define wxGauge_GetRange 1599
+#define wxGauge_GetShadowWidth 1600
+#define wxGauge_GetValue 1601
+#define wxGauge_IsVertical 1602
+#define wxGauge_SetBezelFace 1603
+#define wxGauge_SetRange 1604
+#define wxGauge_SetShadowWidth 1605
+#define wxGauge_SetValue 1606
+#define wxGauge_Pulse 1607
+#define wxGauge_destroy 1608
+#define wxGenericDirCtrl_new_0 1609
+#define wxGenericDirCtrl_new_2 1610
+#define wxGenericDirCtrl_destruct 1611
+#define wxGenericDirCtrl_Create 1612
+#define wxGenericDirCtrl_Init 1613
+#define wxGenericDirCtrl_CollapseTree 1614
+#define wxGenericDirCtrl_ExpandPath 1615
+#define wxGenericDirCtrl_GetDefaultPath 1616
+#define wxGenericDirCtrl_GetPath 1617
+#define wxGenericDirCtrl_GetFilePath 1618
+#define wxGenericDirCtrl_GetFilter 1619
+#define wxGenericDirCtrl_GetFilterIndex 1620
+#define wxGenericDirCtrl_GetRootId 1621
+#define wxGenericDirCtrl_GetTreeCtrl 1622
+#define wxGenericDirCtrl_ReCreateTree 1623
+#define wxGenericDirCtrl_SetDefaultPath 1624
+#define wxGenericDirCtrl_SetFilter 1625
+#define wxGenericDirCtrl_SetFilterIndex 1626
+#define wxGenericDirCtrl_SetPath 1627
+#define wxStaticBox_new_4 1629
+#define wxStaticBox_new_0 1630
+#define wxStaticBox_Create 1631
+#define wxStaticBox_destroy 1632
+#define wxStaticLine_new_2 1634
+#define wxStaticLine_new_0 1635
+#define wxStaticLine_Create 1636
+#define wxStaticLine_IsVertical 1637
+#define wxStaticLine_GetDefaultSize 1638
+#define wxStaticLine_destroy 1639
+#define wxListBox_new_3 1642
+#define wxListBox_new_0 1643
+#define wxListBox_destruct 1645
+#define wxListBox_Create 1647
+#define wxListBox_Deselect 1648
+#define wxListBox_GetSelections 1649
+#define wxListBox_InsertItems 1650
+#define wxListBox_IsSelected 1651
+#define wxListBox_Set 1653
+#define wxListBox_HitTest 1654
+#define wxListBox_SetFirstItem_1_0 1655
+#define wxListBox_SetFirstItem_1_1 1656
+#define wxListCtrl_new_0 1657
+#define wxListCtrl_new_2 1658
+#define wxListCtrl_Arrange 1659
+#define wxListCtrl_AssignImageList 1660
+#define wxListCtrl_ClearAll 1661
+#define wxListCtrl_Create 1662
+#define wxListCtrl_DeleteAllItems 1663
+#define wxListCtrl_DeleteColumn 1664
+#define wxListCtrl_DeleteItem 1665
+#define wxListCtrl_EditLabel 1666
+#define wxListCtrl_EnsureVisible 1667
+#define wxListCtrl_FindItem_3_0 1668
+#define wxListCtrl_FindItem_3_1 1669
+#define wxListCtrl_GetColumn 1670
+#define wxListCtrl_GetColumnCount 1671
+#define wxListCtrl_GetColumnWidth 1672
+#define wxListCtrl_GetCountPerPage 1673
+#define wxListCtrl_GetEditControl 1674
+#define wxListCtrl_GetImageList 1675
+#define wxListCtrl_GetItem 1676
+#define wxListCtrl_GetItemBackgroundColour 1677
+#define wxListCtrl_GetItemCount 1678
+#define wxListCtrl_GetItemData 1679
+#define wxListCtrl_GetItemFont 1680
+#define wxListCtrl_GetItemPosition 1681
+#define wxListCtrl_GetItemRect 1682
+#define wxListCtrl_GetItemSpacing 1683
+#define wxListCtrl_GetItemState 1684
+#define wxListCtrl_GetItemText 1685
+#define wxListCtrl_GetItemTextColour 1686
+#define wxListCtrl_GetNextItem 1687
+#define wxListCtrl_GetSelectedItemCount 1688
+#define wxListCtrl_GetTextColour 1689
+#define wxListCtrl_GetTopItem 1690
+#define wxListCtrl_GetViewRect 1691
+#define wxListCtrl_HitTest 1692
+#define wxListCtrl_InsertColumn_2 1693
+#define wxListCtrl_InsertColumn_3 1694
+#define wxListCtrl_InsertItem_1 1695
+#define wxListCtrl_InsertItem_2_1 1696
+#define wxListCtrl_InsertItem_2_0 1697
+#define wxListCtrl_InsertItem_3 1698
+#define wxListCtrl_RefreshItem 1699
+#define wxListCtrl_RefreshItems 1700
+#define wxListCtrl_ScrollList 1701
+#define wxListCtrl_SetBackgroundColour 1702
+#define wxListCtrl_SetColumn 1703
+#define wxListCtrl_SetColumnWidth 1704
+#define wxListCtrl_SetImageList 1705
+#define wxListCtrl_SetItem_1 1706
+#define wxListCtrl_SetItem_4 1707
+#define wxListCtrl_SetItemBackgroundColour 1708
+#define wxListCtrl_SetItemCount 1709
+#define wxListCtrl_SetItemData 1710
+#define wxListCtrl_SetItemFont 1711
+#define wxListCtrl_SetItemImage 1712
+#define wxListCtrl_SetItemColumnImage 1713
+#define wxListCtrl_SetItemPosition 1714
+#define wxListCtrl_SetItemState 1715
+#define wxListCtrl_SetItemText 1716
+#define wxListCtrl_SetItemTextColour 1717
+#define wxListCtrl_SetSingleStyle 1718
+#define wxListCtrl_SetTextColour 1719
+#define wxListCtrl_SetWindowStyleFlag 1720
+#define wxListCtrl_SortItems 1721
+#define wxListCtrl_destroy 1722
+#define wxListView_ClearColumnImage 1723
+#define wxListView_Focus 1724
+#define wxListView_GetFirstSelected 1725
+#define wxListView_GetFocusedItem 1726
+#define wxListView_GetNextSelected 1727
+#define wxListView_IsSelected 1728
+#define wxListView_Select 1729
+#define wxListView_SetColumnImage 1730
+#define wxListItem_new_0 1731
+#define wxListItem_new_1 1732
+#define wxListItem_destruct 1733
+#define wxListItem_Clear 1734
+#define wxListItem_GetAlign 1735
+#define wxListItem_GetBackgroundColour 1736
+#define wxListItem_GetColumn 1737
+#define wxListItem_GetFont 1738
+#define wxListItem_GetId 1739
+#define wxListItem_GetImage 1740
+#define wxListItem_GetMask 1741
+#define wxListItem_GetState 1742
+#define wxListItem_GetText 1743
+#define wxListItem_GetTextColour 1744
+#define wxListItem_GetWidth 1745
+#define wxListItem_SetAlign 1746
+#define wxListItem_SetBackgroundColour 1747
+#define wxListItem_SetColumn 1748
+#define wxListItem_SetFont 1749
+#define wxListItem_SetId 1750
+#define wxListItem_SetImage 1751
+#define wxListItem_SetMask 1752
+#define wxListItem_SetState 1753
+#define wxListItem_SetStateMask 1754
+#define wxListItem_SetText 1755
+#define wxListItem_SetTextColour 1756
+#define wxListItem_SetWidth 1757
+#define wxListItemAttr_new_0 1758
+#define wxListItemAttr_new_3 1759
+#define wxListItemAttr_GetBackgroundColour 1760
+#define wxListItemAttr_GetFont 1761
+#define wxListItemAttr_GetTextColour 1762
+#define wxListItemAttr_HasBackgroundColour 1763
+#define wxListItemAttr_HasFont 1764
+#define wxListItemAttr_HasTextColour 1765
+#define wxListItemAttr_SetBackgroundColour 1766
+#define wxListItemAttr_SetFont 1767
+#define wxListItemAttr_SetTextColour 1768
+#define wxListItemAttr_destroy 1769
+#define wxImageList_new_0 1770
+#define wxImageList_new_3 1771
+#define wxImageList_Add_1 1772
+#define wxImageList_Add_2_0 1773
+#define wxImageList_Add_2_1 1774
+#define wxImageList_Create 1775
+#define wxImageList_Draw 1777
+#define wxImageList_GetBitmap 1778
+#define wxImageList_GetIcon 1779
+#define wxImageList_GetImageCount 1780
+#define wxImageList_GetSize 1781
+#define wxImageList_Remove 1782
+#define wxImageList_RemoveAll 1783
+#define wxImageList_Replace_2 1784
+#define wxImageList_Replace_3 1785
+#define wxImageList_destroy 1786
+#define wxTextAttr_new_0 1787
+#define wxTextAttr_new_2 1788
+#define wxTextAttr_GetAlignment 1789
+#define wxTextAttr_GetBackgroundColour 1790
+#define wxTextAttr_GetFont 1791
+#define wxTextAttr_GetLeftIndent 1792
+#define wxTextAttr_GetLeftSubIndent 1793
+#define wxTextAttr_GetRightIndent 1794
+#define wxTextAttr_GetTabs 1795
+#define wxTextAttr_GetTextColour 1796
+#define wxTextAttr_HasBackgroundColour 1797
+#define wxTextAttr_HasFont 1798
+#define wxTextAttr_HasTextColour 1799
+#define wxTextAttr_GetFlags 1800
+#define wxTextAttr_IsDefault 1801
+#define wxTextAttr_SetAlignment 1802
+#define wxTextAttr_SetBackgroundColour 1803
+#define wxTextAttr_SetFlags 1804
+#define wxTextAttr_SetFont 1805
+#define wxTextAttr_SetLeftIndent 1806
+#define wxTextAttr_SetRightIndent 1807
+#define wxTextAttr_SetTabs 1808
+#define wxTextAttr_SetTextColour 1809
+#define wxTextAttr_destroy 1810
+#define wxTextCtrl_new_3 1812
+#define wxTextCtrl_new_0 1813
+#define wxTextCtrl_destruct 1815
+#define wxTextCtrl_AppendText 1816
+#define wxTextCtrl_CanCopy 1817
+#define wxTextCtrl_CanCut 1818
+#define wxTextCtrl_CanPaste 1819
+#define wxTextCtrl_CanRedo 1820
+#define wxTextCtrl_CanUndo 1821
+#define wxTextCtrl_Clear 1822
+#define wxTextCtrl_Copy 1823
+#define wxTextCtrl_Create 1824
+#define wxTextCtrl_Cut 1825
+#define wxTextCtrl_DiscardEdits 1826
+#define wxTextCtrl_EmulateKeyPress 1827
+#define wxTextCtrl_GetDefaultStyle 1828
+#define wxTextCtrl_GetInsertionPoint 1829
+#define wxTextCtrl_GetLastPosition 1830
+#define wxTextCtrl_GetLineLength 1831
+#define wxTextCtrl_GetLineText 1832
+#define wxTextCtrl_GetNumberOfLines 1833
+#define wxTextCtrl_GetRange 1834
+#define wxTextCtrl_GetSelection 1835
+#define wxTextCtrl_GetStringSelection 1836
+#define wxTextCtrl_GetStyle 1837
+#define wxTextCtrl_GetValue 1838
+#define wxTextCtrl_IsEditable 1839
+#define wxTextCtrl_IsModified 1840
+#define wxTextCtrl_IsMultiLine 1841
+#define wxTextCtrl_IsSingleLine 1842
+#define wxTextCtrl_LoadFile 1843
+#define wxTextCtrl_MarkDirty 1844
+#define wxTextCtrl_Paste 1845
+#define wxTextCtrl_PositionToXY 1846
+#define wxTextCtrl_Redo 1847
+#define wxTextCtrl_Remove 1848
+#define wxTextCtrl_Replace 1849
+#define wxTextCtrl_SaveFile 1850
+#define wxTextCtrl_SetDefaultStyle 1851
+#define wxTextCtrl_SetEditable 1852
+#define wxTextCtrl_SetInsertionPoint 1853
+#define wxTextCtrl_SetInsertionPointEnd 1854
+#define wxTextCtrl_SetMaxLength 1856
+#define wxTextCtrl_SetSelection 1857
+#define wxTextCtrl_SetStyle 1858
+#define wxTextCtrl_SetValue 1859
+#define wxTextCtrl_ShowPosition 1860
+#define wxTextCtrl_Undo 1861
+#define wxTextCtrl_WriteText 1862
+#define wxTextCtrl_XYToPosition 1863
+#define wxNotebook_new_0 1866
+#define wxNotebook_new_3 1867
+#define wxNotebook_destruct 1868
+#define wxNotebook_AddPage 1869
+#define wxNotebook_AdvanceSelection 1870
+#define wxNotebook_AssignImageList 1871
+#define wxNotebook_Create 1872
+#define wxNotebook_DeleteAllPages 1873
+#define wxNotebook_DeletePage 1874
+#define wxNotebook_RemovePage 1875
+#define wxNotebook_GetCurrentPage 1876
+#define wxNotebook_GetImageList 1877
+#define wxNotebook_GetPage 1879
+#define wxNotebook_GetPageCount 1880
+#define wxNotebook_GetPageImage 1881
+#define wxNotebook_GetPageText 1882
+#define wxNotebook_GetRowCount 1883
+#define wxNotebook_GetSelection 1884
+#define wxNotebook_GetThemeBackgroundColour 1885
+#define wxNotebook_HitTest 1887
+#define wxNotebook_InsertPage 1889
+#define wxNotebook_SetImageList 1890
+#define wxNotebook_SetPadding 1891
+#define wxNotebook_SetPageSize 1892
+#define wxNotebook_SetPageImage 1893
+#define wxNotebook_SetPageText 1894
+#define wxNotebook_SetSelection 1895
+#define wxNotebook_ChangeSelection 1896
+#define wxChoicebook_new_0 1897
+#define wxChoicebook_new_3 1898
+#define wxChoicebook_AddPage 1899
+#define wxChoicebook_AdvanceSelection 1900
+#define wxChoicebook_AssignImageList 1901
+#define wxChoicebook_Create 1902
+#define wxChoicebook_DeleteAllPages 1903
+#define wxChoicebook_DeletePage 1904
+#define wxChoicebook_RemovePage 1905
+#define wxChoicebook_GetCurrentPage 1906
+#define wxChoicebook_GetImageList 1907
+#define wxChoicebook_GetPage 1909
+#define wxChoicebook_GetPageCount 1910
+#define wxChoicebook_GetPageImage 1911
+#define wxChoicebook_GetPageText 1912
+#define wxChoicebook_GetSelection 1913
+#define wxChoicebook_HitTest 1914
+#define wxChoicebook_InsertPage 1915
+#define wxChoicebook_SetImageList 1916
+#define wxChoicebook_SetPageSize 1917
+#define wxChoicebook_SetPageImage 1918
+#define wxChoicebook_SetPageText 1919
+#define wxChoicebook_SetSelection 1920
+#define wxChoicebook_ChangeSelection 1921
+#define wxChoicebook_destroy 1922
+#define wxToolbook_new_0 1923
+#define wxToolbook_new_3 1924
+#define wxToolbook_AddPage 1925
+#define wxToolbook_AdvanceSelection 1926
+#define wxToolbook_AssignImageList 1927
+#define wxToolbook_Create 1928
+#define wxToolbook_DeleteAllPages 1929
+#define wxToolbook_DeletePage 1930
+#define wxToolbook_RemovePage 1931
+#define wxToolbook_GetCurrentPage 1932
+#define wxToolbook_GetImageList 1933
+#define wxToolbook_GetPage 1935
+#define wxToolbook_GetPageCount 1936
+#define wxToolbook_GetPageImage 1937
+#define wxToolbook_GetPageText 1938
+#define wxToolbook_GetSelection 1939
+#define wxToolbook_HitTest 1941
+#define wxToolbook_InsertPage 1942
+#define wxToolbook_SetImageList 1943
+#define wxToolbook_SetPageSize 1944
+#define wxToolbook_SetPageImage 1945
+#define wxToolbook_SetPageText 1946
+#define wxToolbook_SetSelection 1947
+#define wxToolbook_ChangeSelection 1948
+#define wxToolbook_destroy 1949
+#define wxListbook_new_0 1950
+#define wxListbook_new_3 1951
+#define wxListbook_AddPage 1952
+#define wxListbook_AdvanceSelection 1953
+#define wxListbook_AssignImageList 1954
+#define wxListbook_Create 1955
+#define wxListbook_DeleteAllPages 1956
+#define wxListbook_DeletePage 1957
+#define wxListbook_RemovePage 1958
+#define wxListbook_GetCurrentPage 1959
+#define wxListbook_GetImageList 1960
+#define wxListbook_GetPage 1962
+#define wxListbook_GetPageCount 1963
+#define wxListbook_GetPageImage 1964
+#define wxListbook_GetPageText 1965
+#define wxListbook_GetSelection 1966
+#define wxListbook_HitTest 1968
+#define wxListbook_InsertPage 1969
+#define wxListbook_SetImageList 1970
+#define wxListbook_SetPageSize 1971
+#define wxListbook_SetPageImage 1972
+#define wxListbook_SetPageText 1973
+#define wxListbook_SetSelection 1974
+#define wxListbook_ChangeSelection 1975
+#define wxListbook_destroy 1976
+#define wxTreebook_new_0 1977
+#define wxTreebook_new_3 1978
+#define wxTreebook_AddPage 1979
+#define wxTreebook_AdvanceSelection 1980
+#define wxTreebook_AssignImageList 1981
+#define wxTreebook_Create 1982
+#define wxTreebook_DeleteAllPages 1983
+#define wxTreebook_DeletePage 1984
+#define wxTreebook_RemovePage 1985
+#define wxTreebook_GetCurrentPage 1986
+#define wxTreebook_GetImageList 1987
+#define wxTreebook_GetPage 1989
+#define wxTreebook_GetPageCount 1990
+#define wxTreebook_GetPageImage 1991
+#define wxTreebook_GetPageText 1992
+#define wxTreebook_GetSelection 1993
+#define wxTreebook_ExpandNode 1994
+#define wxTreebook_IsNodeExpanded 1995
+#define wxTreebook_HitTest 1997
+#define wxTreebook_InsertPage 1998
+#define wxTreebook_InsertSubPage 1999
+#define wxTreebook_SetImageList 2000
+#define wxTreebook_SetPageSize 2001
+#define wxTreebook_SetPageImage 2002
+#define wxTreebook_SetPageText 2003
+#define wxTreebook_SetSelection 2004
+#define wxTreebook_ChangeSelection 2005
+#define wxTreebook_destroy 2006
+#define wxTreeCtrl_new_2 2009
+#define wxTreeCtrl_new_0 2010
+#define wxTreeCtrl_destruct 2012
+#define wxTreeCtrl_AddRoot 2013
+#define wxTreeCtrl_AppendItem 2014
+#define wxTreeCtrl_AssignImageList 2015
+#define wxTreeCtrl_AssignStateImageList 2016
+#define wxTreeCtrl_Collapse 2017
+#define wxTreeCtrl_CollapseAndReset 2018
+#define wxTreeCtrl_Create 2019
+#define wxTreeCtrl_Delete 2020
+#define wxTreeCtrl_DeleteAllItems 2021
+#define wxTreeCtrl_DeleteChildren 2022
+#define wxTreeCtrl_EditLabel 2023
+#define wxTreeCtrl_EnsureVisible 2024
+#define wxTreeCtrl_Expand 2025
+#define wxTreeCtrl_GetBoundingRect 2026
+#define wxTreeCtrl_GetChildrenCount 2028
+#define wxTreeCtrl_GetCount 2029
+#define wxTreeCtrl_GetEditControl 2030
+#define wxTreeCtrl_GetFirstChild 2031
+#define wxTreeCtrl_GetNextChild 2032
+#define wxTreeCtrl_GetFirstVisibleItem 2033
+#define wxTreeCtrl_GetImageList 2034
+#define wxTreeCtrl_GetIndent 2035
+#define wxTreeCtrl_GetItemBackgroundColour 2036
+#define wxTreeCtrl_GetItemData 2037
+#define wxTreeCtrl_GetItemFont 2038
+#define wxTreeCtrl_GetItemImage_1 2039
+#define wxTreeCtrl_GetItemImage_2 2040
+#define wxTreeCtrl_GetItemText 2041
+#define wxTreeCtrl_GetItemTextColour 2042
+#define wxTreeCtrl_GetLastChild 2043
+#define wxTreeCtrl_GetNextSibling 2044
+#define wxTreeCtrl_GetNextVisible 2045
+#define wxTreeCtrl_GetItemParent 2046
+#define wxTreeCtrl_GetPrevSibling 2047
+#define wxTreeCtrl_GetPrevVisible 2048
+#define wxTreeCtrl_GetRootItem 2049
+#define wxTreeCtrl_GetSelection 2050
+#define wxTreeCtrl_GetSelections 2051
+#define wxTreeCtrl_GetStateImageList 2052
+#define wxTreeCtrl_HitTest 2053
+#define wxTreeCtrl_InsertItem 2055
+#define wxTreeCtrl_IsBold 2056
+#define wxTreeCtrl_IsExpanded 2057
+#define wxTreeCtrl_IsSelected 2058
+#define wxTreeCtrl_IsVisible 2059
+#define wxTreeCtrl_ItemHasChildren 2060
+#define wxTreeCtrl_PrependItem 2061
+#define wxTreeCtrl_ScrollTo 2062
+#define wxTreeCtrl_SelectItem_1 2063
+#define wxTreeCtrl_SelectItem_2 2064
+#define wxTreeCtrl_SetIndent 2065
+#define wxTreeCtrl_SetImageList 2066
+#define wxTreeCtrl_SetItemBackgroundColour 2067
+#define wxTreeCtrl_SetItemBold 2068
+#define wxTreeCtrl_SetItemData 2069
+#define wxTreeCtrl_SetItemDropHighlight 2070
+#define wxTreeCtrl_SetItemFont 2071
+#define wxTreeCtrl_SetItemHasChildren 2072
+#define wxTreeCtrl_SetItemImage_2 2073
+#define wxTreeCtrl_SetItemImage_3 2074
+#define wxTreeCtrl_SetItemText 2075
+#define wxTreeCtrl_SetItemTextColour 2076
+#define wxTreeCtrl_SetStateImageList 2077
+#define wxTreeCtrl_SetWindowStyle 2078
+#define wxTreeCtrl_SortChildren 2079
+#define wxTreeCtrl_Toggle 2080
+#define wxTreeCtrl_ToggleItemSelection 2081
+#define wxTreeCtrl_Unselect 2082
+#define wxTreeCtrl_UnselectAll 2083
+#define wxTreeCtrl_UnselectItem 2084
+#define wxScrollBar_new_0 2085
+#define wxScrollBar_new_3 2086
+#define wxScrollBar_destruct 2087
+#define wxScrollBar_Create 2088
+#define wxScrollBar_GetRange 2089
+#define wxScrollBar_GetPageSize 2090
+#define wxScrollBar_GetThumbPosition 2091
+#define wxScrollBar_GetThumbSize 2092
+#define wxScrollBar_SetThumbPosition 2093
+#define wxScrollBar_SetScrollbar 2094
+#define wxSpinButton_new_2 2096
+#define wxSpinButton_new_0 2097
+#define wxSpinButton_Create 2098
+#define wxSpinButton_GetMax 2099
+#define wxSpinButton_GetMin 2100
+#define wxSpinButton_GetValue 2101
+#define wxSpinButton_SetRange 2102
+#define wxSpinButton_SetValue 2103
+#define wxSpinButton_destroy 2104
+#define wxSpinCtrl_new_0 2105
+#define wxSpinCtrl_new_2 2106
+#define wxSpinCtrl_Create 2108
+#define wxSpinCtrl_SetValue_1_1 2111
+#define wxSpinCtrl_SetValue_1_0 2112
+#define wxSpinCtrl_GetValue 2114
+#define wxSpinCtrl_SetRange 2116
+#define wxSpinCtrl_SetSelection 2117
+#define wxSpinCtrl_GetMin 2119
+#define wxSpinCtrl_GetMax 2121
+#define wxSpinCtrl_destroy 2122
+#define wxStaticText_new_0 2123
+#define wxStaticText_new_4 2124
+#define wxStaticText_Create 2125
+#define wxStaticText_GetLabel 2126
+#define wxStaticText_SetLabel 2127
+#define wxStaticText_Wrap 2128
+#define wxStaticText_destroy 2129
+#define wxStaticBitmap_new_0 2130
+#define wxStaticBitmap_new_4 2131
+#define wxStaticBitmap_Create 2132
+#define wxStaticBitmap_GetBitmap 2133
+#define wxStaticBitmap_SetBitmap 2134
+#define wxStaticBitmap_destroy 2135
+#define wxRadioBox_new 2136
+#define wxRadioBox_destruct 2138
+#define wxRadioBox_Create 2139
+#define wxRadioBox_Enable_2 2140
+#define wxRadioBox_Enable_1 2141
+#define wxRadioBox_GetSelection 2142
+#define wxRadioBox_GetString 2143
+#define wxRadioBox_SetSelection 2144
+#define wxRadioBox_Show_2 2145
+#define wxRadioBox_Show_1 2146
+#define wxRadioBox_GetColumnCount 2147
+#define wxRadioBox_GetItemHelpText 2148
+#define wxRadioBox_GetItemToolTip 2149
+#define wxRadioBox_GetItemFromPoint 2151
+#define wxRadioBox_GetRowCount 2152
+#define wxRadioBox_IsItemEnabled 2153
+#define wxRadioBox_IsItemShown 2154
+#define wxRadioBox_SetItemHelpText 2155
+#define wxRadioBox_SetItemToolTip 2156
+#define wxRadioButton_new_0 2157
+#define wxRadioButton_new_4 2158
+#define wxRadioButton_Create 2159
+#define wxRadioButton_GetValue 2160
+#define wxRadioButton_SetValue 2161
+#define wxRadioButton_destroy 2162
+#define wxSlider_new_6 2164
+#define wxSlider_new_0 2165
+#define wxSlider_Create 2166
+#define wxSlider_GetLineSize 2167
+#define wxSlider_GetMax 2168
+#define wxSlider_GetMin 2169
+#define wxSlider_GetPageSize 2170
+#define wxSlider_GetThumbLength 2171
+#define wxSlider_GetValue 2172
+#define wxSlider_SetLineSize 2173
+#define wxSlider_SetPageSize 2174
+#define wxSlider_SetRange 2175
+#define wxSlider_SetThumbLength 2176
+#define wxSlider_SetValue 2177
+#define wxSlider_destroy 2178
+#define wxDialog_new_4 2180
+#define wxDialog_new_0 2181
+#define wxDialog_destruct 2183
+#define wxDialog_Create 2184
+#define wxDialog_CreateButtonSizer 2185
+#define wxDialog_CreateStdDialogButtonSizer 2186
+#define wxDialog_EndModal 2187
+#define wxDialog_GetAffirmativeId 2188
+#define wxDialog_GetReturnCode 2189
+#define wxDialog_IsModal 2190
+#define wxDialog_SetAffirmativeId 2191
+#define wxDialog_SetReturnCode 2192
+#define wxDialog_Show 2193
+#define wxDialog_ShowModal 2194
+#define wxColourDialog_new_0 2195
+#define wxColourDialog_new_2 2196
+#define wxColourDialog_destruct 2197
+#define wxColourDialog_Create 2198
+#define wxColourDialog_GetColourData 2199
+#define wxColourData_new_0 2200
+#define wxColourData_new_1 2201
+#define wxColourData_destruct 2202
+#define wxColourData_GetChooseFull 2203
+#define wxColourData_GetColour 2204
+#define wxColourData_GetCustomColour 2206
+#define wxColourData_SetChooseFull 2207
+#define wxColourData_SetColour 2208
+#define wxColourData_SetCustomColour 2209
+#define wxPalette_new_0 2210
+#define wxPalette_new_4 2211
+#define wxPalette_destruct 2213
+#define wxPalette_Create 2214
+#define wxPalette_GetColoursCount 2215
+#define wxPalette_GetPixel 2216
+#define wxPalette_GetRGB 2217
+#define wxPalette_IsOk 2218
+#define wxDirDialog_new 2222
+#define wxDirDialog_destruct 2223
+#define wxDirDialog_GetPath 2224
+#define wxDirDialog_GetMessage 2225
+#define wxDirDialog_SetMessage 2226
+#define wxDirDialog_SetPath 2227
+#define wxFileDialog_new 2231
+#define wxFileDialog_destruct 2232
+#define wxFileDialog_GetDirectory 2233
+#define wxFileDialog_GetFilename 2234
+#define wxFileDialog_GetFilenames 2235
+#define wxFileDialog_GetFilterIndex 2236
+#define wxFileDialog_GetMessage 2237
+#define wxFileDialog_GetPath 2238
+#define wxFileDialog_GetPaths 2239
+#define wxFileDialog_GetWildcard 2240
+#define wxFileDialog_SetDirectory 2241
+#define wxFileDialog_SetFilename 2242
+#define wxFileDialog_SetFilterIndex 2243
+#define wxFileDialog_SetMessage 2244
+#define wxFileDialog_SetPath 2245
+#define wxFileDialog_SetWildcard 2246
+#define wxPickerBase_SetInternalMargin 2247
+#define wxPickerBase_GetInternalMargin 2248
+#define wxPickerBase_SetTextCtrlProportion 2249
+#define wxPickerBase_SetPickerCtrlProportion 2250
+#define wxPickerBase_GetTextCtrlProportion 2251
+#define wxPickerBase_GetPickerCtrlProportion 2252
+#define wxPickerBase_HasTextCtrl 2253
+#define wxPickerBase_GetTextCtrl 2254
+#define wxPickerBase_IsTextCtrlGrowable 2255
+#define wxPickerBase_SetPickerCtrlGrowable 2256
+#define wxPickerBase_SetTextCtrlGrowable 2257
+#define wxPickerBase_IsPickerCtrlGrowable 2258
+#define wxFilePickerCtrl_new_0 2259
+#define wxFilePickerCtrl_new_3 2260
+#define wxFilePickerCtrl_Create 2261
+#define wxFilePickerCtrl_GetPath 2262
+#define wxFilePickerCtrl_SetPath 2263
+#define wxFilePickerCtrl_destroy 2264
+#define wxDirPickerCtrl_new_0 2265
+#define wxDirPickerCtrl_new_3 2266
+#define wxDirPickerCtrl_Create 2267
+#define wxDirPickerCtrl_GetPath 2268
+#define wxDirPickerCtrl_SetPath 2269
+#define wxDirPickerCtrl_destroy 2270
+#define wxColourPickerCtrl_new_0 2271
+#define wxColourPickerCtrl_new_3 2272
+#define wxColourPickerCtrl_Create 2273
+#define wxColourPickerCtrl_GetColour 2274
+#define wxColourPickerCtrl_SetColour_1_1 2275
+#define wxColourPickerCtrl_SetColour_1_0 2276
+#define wxColourPickerCtrl_destroy 2277
+#define wxDatePickerCtrl_new_0 2278
+#define wxDatePickerCtrl_new_3 2279
+#define wxDatePickerCtrl_GetRange 2280
+#define wxDatePickerCtrl_GetValue 2281
+#define wxDatePickerCtrl_SetRange 2282
+#define wxDatePickerCtrl_SetValue 2283
+#define wxDatePickerCtrl_destroy 2284
+#define wxFontPickerCtrl_new_0 2285
+#define wxFontPickerCtrl_new_3 2286
+#define wxFontPickerCtrl_Create 2287
+#define wxFontPickerCtrl_GetSelectedFont 2288
+#define wxFontPickerCtrl_SetSelectedFont 2289
+#define wxFontPickerCtrl_GetMaxPointSize 2290
+#define wxFontPickerCtrl_SetMaxPointSize 2291
+#define wxFontPickerCtrl_destroy 2292
+#define wxFindReplaceDialog_new_0 2295
+#define wxFindReplaceDialog_new_4 2296
+#define wxFindReplaceDialog_destruct 2297
+#define wxFindReplaceDialog_Create 2298
+#define wxFindReplaceDialog_GetData 2299
+#define wxFindReplaceData_new_0 2300
+#define wxFindReplaceData_new_1 2301
+#define wxFindReplaceData_GetFindString 2302
+#define wxFindReplaceData_GetReplaceString 2303
+#define wxFindReplaceData_GetFlags 2304
+#define wxFindReplaceData_SetFlags 2305
+#define wxFindReplaceData_SetFindString 2306
+#define wxFindReplaceData_SetReplaceString 2307
+#define wxFindReplaceData_destroy 2308
+#define wxMultiChoiceDialog_new_0 2309
+#define wxMultiChoiceDialog_new_5 2311
+#define wxMultiChoiceDialog_GetSelections 2312
+#define wxMultiChoiceDialog_SetSelections 2313
+#define wxMultiChoiceDialog_destroy 2314
+#define wxSingleChoiceDialog_new_0 2315
+#define wxSingleChoiceDialog_new_5 2317
+#define wxSingleChoiceDialog_GetSelection 2318
+#define wxSingleChoiceDialog_GetStringSelection 2319
+#define wxSingleChoiceDialog_SetSelection 2320
+#define wxSingleChoiceDialog_destroy 2321
+#define wxTextEntryDialog_new 2322
+#define wxTextEntryDialog_GetValue 2323
+#define wxTextEntryDialog_SetValue 2324
+#define wxTextEntryDialog_destroy 2325
+#define wxPasswordEntryDialog_new 2326
+#define wxPasswordEntryDialog_destroy 2327
+#define wxFontData_new_0 2328
+#define wxFontData_new_1 2329
+#define wxFontData_destruct 2330
+#define wxFontData_EnableEffects 2331
+#define wxFontData_GetAllowSymbols 2332
+#define wxFontData_GetColour 2333
+#define wxFontData_GetChosenFont 2334
+#define wxFontData_GetEnableEffects 2335
+#define wxFontData_GetInitialFont 2336
+#define wxFontData_GetShowHelp 2337
+#define wxFontData_SetAllowSymbols 2338
+#define wxFontData_SetChosenFont 2339
+#define wxFontData_SetColour 2340
+#define wxFontData_SetInitialFont 2341
+#define wxFontData_SetRange 2342
+#define wxFontData_SetShowHelp 2343
+#define wxFontDialog_new_0 2347
+#define wxFontDialog_new_2 2349
+#define wxFontDialog_Create 2351
+#define wxFontDialog_GetFontData 2352
+#define wxFontDialog_destroy 2354
+#define wxProgressDialog_new 2355
+#define wxProgressDialog_destruct 2356
+#define wxProgressDialog_Resume 2357
+#define wxProgressDialog_Update_2 2358
+#define wxProgressDialog_Update_0 2359
+#define wxMessageDialog_new 2360
+#define wxMessageDialog_destruct 2361
+#define wxPageSetupDialog_new 2362
+#define wxPageSetupDialog_destruct 2363
+#define wxPageSetupDialog_GetPageSetupData 2364
+#define wxPageSetupDialog_ShowModal 2365
+#define wxPageSetupDialogData_new_0 2366
+#define wxPageSetupDialogData_new_1_0 2367
+#define wxPageSetupDialogData_new_1_1 2368
+#define wxPageSetupDialogData_destruct 2369
+#define wxPageSetupDialogData_EnableHelp 2370
+#define wxPageSetupDialogData_EnableMargins 2371
+#define wxPageSetupDialogData_EnableOrientation 2372
+#define wxPageSetupDialogData_EnablePaper 2373
+#define wxPageSetupDialogData_EnablePrinter 2374
+#define wxPageSetupDialogData_GetDefaultMinMargins 2375
+#define wxPageSetupDialogData_GetEnableMargins 2376
+#define wxPageSetupDialogData_GetEnableOrientation 2377
+#define wxPageSetupDialogData_GetEnablePaper 2378
+#define wxPageSetupDialogData_GetEnablePrinter 2379
+#define wxPageSetupDialogData_GetEnableHelp 2380
+#define wxPageSetupDialogData_GetDefaultInfo 2381
+#define wxPageSetupDialogData_GetMarginTopLeft 2382
+#define wxPageSetupDialogData_GetMarginBottomRight 2383
+#define wxPageSetupDialogData_GetMinMarginTopLeft 2384
+#define wxPageSetupDialogData_GetMinMarginBottomRight 2385
+#define wxPageSetupDialogData_GetPaperId 2386
+#define wxPageSetupDialogData_GetPaperSize 2387
+#define wxPageSetupDialogData_GetPrintData 2389
+#define wxPageSetupDialogData_IsOk 2390
+#define wxPageSetupDialogData_SetDefaultInfo 2391
+#define wxPageSetupDialogData_SetDefaultMinMargins 2392
+#define wxPageSetupDialogData_SetMarginTopLeft 2393
+#define wxPageSetupDialogData_SetMarginBottomRight 2394
+#define wxPageSetupDialogData_SetMinMarginTopLeft 2395
+#define wxPageSetupDialogData_SetMinMarginBottomRight 2396
+#define wxPageSetupDialogData_SetPaperId 2397
+#define wxPageSetupDialogData_SetPaperSize_1_1 2398
+#define wxPageSetupDialogData_SetPaperSize_1_0 2399
+#define wxPageSetupDialogData_SetPrintData 2400
+#define wxPrintDialog_new_2_0 2401
+#define wxPrintDialog_new_2_1 2402
+#define wxPrintDialog_destruct 2403
+#define wxPrintDialog_GetPrintDialogData 2404
+#define wxPrintDialog_GetPrintDC 2405
+#define wxPrintDialogData_new_0 2406
+#define wxPrintDialogData_new_1_1 2407
+#define wxPrintDialogData_new_1_0 2408
+#define wxPrintDialogData_destruct 2409
+#define wxPrintDialogData_EnableHelp 2410
+#define wxPrintDialogData_EnablePageNumbers 2411
+#define wxPrintDialogData_EnablePrintToFile 2412
+#define wxPrintDialogData_EnableSelection 2413
+#define wxPrintDialogData_GetAllPages 2414
+#define wxPrintDialogData_GetCollate 2415
+#define wxPrintDialogData_GetFromPage 2416
+#define wxPrintDialogData_GetMaxPage 2417
+#define wxPrintDialogData_GetMinPage 2418
+#define wxPrintDialogData_GetNoCopies 2419
+#define wxPrintDialogData_GetPrintData 2420
+#define wxPrintDialogData_GetPrintToFile 2421
+#define wxPrintDialogData_GetSelection 2422
+#define wxPrintDialogData_GetToPage 2423
+#define wxPrintDialogData_IsOk 2424
+#define wxPrintDialogData_SetCollate 2425
+#define wxPrintDialogData_SetFromPage 2426
+#define wxPrintDialogData_SetMaxPage 2427
+#define wxPrintDialogData_SetMinPage 2428
+#define wxPrintDialogData_SetNoCopies 2429
+#define wxPrintDialogData_SetPrintData 2430
+#define wxPrintDialogData_SetPrintToFile 2431
+#define wxPrintDialogData_SetSelection 2432
+#define wxPrintDialogData_SetToPage 2433
+#define wxPrintData_new_0 2434
+#define wxPrintData_new_1 2435
+#define wxPrintData_destruct 2436
+#define wxPrintData_GetCollate 2437
+#define wxPrintData_GetBin 2438
+#define wxPrintData_GetColour 2439
+#define wxPrintData_GetDuplex 2440
+#define wxPrintData_GetNoCopies 2441
+#define wxPrintData_GetOrientation 2442
+#define wxPrintData_GetPaperId 2443
+#define wxPrintData_GetPrinterName 2444
+#define wxPrintData_GetQuality 2445
+#define wxPrintData_IsOk 2446
+#define wxPrintData_SetBin 2447
+#define wxPrintData_SetCollate 2448
+#define wxPrintData_SetColour 2449
+#define wxPrintData_SetDuplex 2450
+#define wxPrintData_SetNoCopies 2451
+#define wxPrintData_SetOrientation 2452
+#define wxPrintData_SetPaperId 2453
+#define wxPrintData_SetPrinterName 2454
+#define wxPrintData_SetQuality 2455
+#define wxPrintPreview_new_2 2458
+#define wxPrintPreview_new_3 2459
+#define wxPrintPreview_destruct 2461
+#define wxPrintPreview_GetCanvas 2462
+#define wxPrintPreview_GetCurrentPage 2463
+#define wxPrintPreview_GetFrame 2464
+#define wxPrintPreview_GetMaxPage 2465
+#define wxPrintPreview_GetMinPage 2466
+#define wxPrintPreview_GetPrintout 2467
+#define wxPrintPreview_GetPrintoutForPrinting 2468
+#define wxPrintPreview_IsOk 2469
+#define wxPrintPreview_PaintPage 2470
+#define wxPrintPreview_Print 2471
+#define wxPrintPreview_RenderPage 2472
+#define wxPrintPreview_SetCanvas 2473
+#define wxPrintPreview_SetCurrentPage 2474
+#define wxPrintPreview_SetFrame 2475
+#define wxPrintPreview_SetPrintout 2476
+#define wxPrintPreview_SetZoom 2477
+#define wxPreviewFrame_new 2478
+#define wxPreviewFrame_destruct 2479
+#define wxPreviewFrame_CreateControlBar 2480
+#define wxPreviewFrame_CreateCanvas 2481
+#define wxPreviewFrame_Initialize 2482
+#define wxPreviewFrame_OnCloseWindow 2483
+#define wxPreviewControlBar_new 2484
+#define wxPreviewControlBar_destruct 2485
+#define wxPreviewControlBar_CreateButtons 2486
+#define wxPreviewControlBar_GetPrintPreview 2487
+#define wxPreviewControlBar_GetZoomControl 2488
+#define wxPreviewControlBar_SetZoomControl 2489
+#define wxPrinter_new 2491
+#define wxPrinter_CreateAbortWindow 2492
+#define wxPrinter_GetAbort 2493
+#define wxPrinter_GetLastError 2494
+#define wxPrinter_GetPrintDialogData 2495
+#define wxPrinter_Print 2496
+#define wxPrinter_PrintDialog 2497
+#define wxPrinter_ReportError 2498
+#define wxPrinter_Setup 2499
+#define wxPrinter_destroy 2500
+#define wxXmlResource_new_1 2501
+#define wxXmlResource_new_2 2502
+#define wxXmlResource_destruct 2503
+#define wxXmlResource_AttachUnknownControl 2504
+#define wxXmlResource_ClearHandlers 2505
+#define wxXmlResource_CompareVersion 2506
+#define wxXmlResource_Get 2507
+#define wxXmlResource_GetFlags 2508
+#define wxXmlResource_GetVersion 2509
+#define wxXmlResource_GetXRCID 2510
+#define wxXmlResource_InitAllHandlers 2511
+#define wxXmlResource_Load 2512
+#define wxXmlResource_LoadBitmap 2513
+#define wxXmlResource_LoadDialog_2 2514
+#define wxXmlResource_LoadDialog_3 2515
+#define wxXmlResource_LoadFrame_2 2516
+#define wxXmlResource_LoadFrame_3 2517
+#define wxXmlResource_LoadIcon 2518
+#define wxXmlResource_LoadMenu 2519
+#define wxXmlResource_LoadMenuBar_2 2520
+#define wxXmlResource_LoadMenuBar_1 2521
+#define wxXmlResource_LoadPanel_2 2522
+#define wxXmlResource_LoadPanel_3 2523
+#define wxXmlResource_LoadToolBar 2524
+#define wxXmlResource_Set 2525
+#define wxXmlResource_SetFlags 2526
+#define wxXmlResource_Unload 2527
+#define wxXmlResource_xrcctrl 2528
+#define wxHtmlEasyPrinting_new 2529
+#define wxHtmlEasyPrinting_destruct 2530
+#define wxHtmlEasyPrinting_GetPrintData 2531
+#define wxHtmlEasyPrinting_GetPageSetupData 2532
+#define wxHtmlEasyPrinting_PreviewFile 2533
+#define wxHtmlEasyPrinting_PreviewText 2534
+#define wxHtmlEasyPrinting_PrintFile 2535
+#define wxHtmlEasyPrinting_PrintText 2536
+#define wxHtmlEasyPrinting_PageSetup 2537
+#define wxHtmlEasyPrinting_SetFonts 2538
+#define wxHtmlEasyPrinting_SetHeader 2539
+#define wxHtmlEasyPrinting_SetFooter 2540
+#define wxGLCanvas_new_2 2542
+#define wxGLCanvas_new_3_1 2543
+#define wxGLCanvas_new_3_0 2544
+#define wxGLCanvas_GetContext 2545
+#define wxGLCanvas_SetCurrent 2547
+#define wxGLCanvas_SwapBuffers 2548
+#define wxGLCanvas_destroy 2549
+#define wxAuiManager_new 2550
+#define wxAuiManager_destruct 2551
+#define wxAuiManager_AddPane_2_1 2552
+#define wxAuiManager_AddPane_3 2553
+#define wxAuiManager_AddPane_2_0 2554
+#define wxAuiManager_DetachPane 2555
+#define wxAuiManager_GetAllPanes 2556
+#define wxAuiManager_GetArtProvider 2557
+#define wxAuiManager_GetDockSizeConstraint 2558
+#define wxAuiManager_GetFlags 2559
+#define wxAuiManager_GetManagedWindow 2560
+#define wxAuiManager_GetManager 2561
+#define wxAuiManager_GetPane_1_1 2562
+#define wxAuiManager_GetPane_1_0 2563
+#define wxAuiManager_HideHint 2564
+#define wxAuiManager_InsertPane 2565
+#define wxAuiManager_LoadPaneInfo 2566
+#define wxAuiManager_LoadPerspective 2567
+#define wxAuiManager_SavePaneInfo 2568
+#define wxAuiManager_SavePerspective 2569
+#define wxAuiManager_SetArtProvider 2570
+#define wxAuiManager_SetDockSizeConstraint 2571
+#define wxAuiManager_SetFlags 2572
+#define wxAuiManager_SetManagedWindow 2573
+#define wxAuiManager_ShowHint 2574
+#define wxAuiManager_UnInit 2575
+#define wxAuiManager_Update 2576
+#define wxAuiPaneInfo_new_0 2577
+#define wxAuiPaneInfo_new_1 2578
+#define wxAuiPaneInfo_destruct 2579
+#define wxAuiPaneInfo_BestSize_1 2580
+#define wxAuiPaneInfo_BestSize_2 2581
+#define wxAuiPaneInfo_Bottom 2582
+#define wxAuiPaneInfo_BottomDockable 2583
+#define wxAuiPaneInfo_Caption 2584
+#define wxAuiPaneInfo_CaptionVisible 2585
+#define wxAuiPaneInfo_Centre 2586
+#define wxAuiPaneInfo_CentrePane 2587
+#define wxAuiPaneInfo_CloseButton 2588
+#define wxAuiPaneInfo_DefaultPane 2589
+#define wxAuiPaneInfo_DestroyOnClose 2590
+#define wxAuiPaneInfo_Direction 2591
+#define wxAuiPaneInfo_Dock 2592
+#define wxAuiPaneInfo_Dockable 2593
+#define wxAuiPaneInfo_Fixed 2594
+#define wxAuiPaneInfo_Float 2595
+#define wxAuiPaneInfo_Floatable 2596
+#define wxAuiPaneInfo_FloatingPosition_1 2597
+#define wxAuiPaneInfo_FloatingPosition_2 2598
+#define wxAuiPaneInfo_FloatingSize_1 2599
+#define wxAuiPaneInfo_FloatingSize_2 2600
+#define wxAuiPaneInfo_Gripper 2601
+#define wxAuiPaneInfo_GripperTop 2602
+#define wxAuiPaneInfo_HasBorder 2603
+#define wxAuiPaneInfo_HasCaption 2604
+#define wxAuiPaneInfo_HasCloseButton 2605
+#define wxAuiPaneInfo_HasFlag 2606
+#define wxAuiPaneInfo_HasGripper 2607
+#define wxAuiPaneInfo_HasGripperTop 2608
+#define wxAuiPaneInfo_HasMaximizeButton 2609
+#define wxAuiPaneInfo_HasMinimizeButton 2610
+#define wxAuiPaneInfo_HasPinButton 2611
+#define wxAuiPaneInfo_Hide 2612
+#define wxAuiPaneInfo_IsBottomDockable 2613
+#define wxAuiPaneInfo_IsDocked 2614
+#define wxAuiPaneInfo_IsFixed 2615
+#define wxAuiPaneInfo_IsFloatable 2616
+#define wxAuiPaneInfo_IsFloating 2617
+#define wxAuiPaneInfo_IsLeftDockable 2618
+#define wxAuiPaneInfo_IsMovable 2619
+#define wxAuiPaneInfo_IsOk 2620
+#define wxAuiPaneInfo_IsResizable 2621
+#define wxAuiPaneInfo_IsRightDockable 2622
+#define wxAuiPaneInfo_IsShown 2623
+#define wxAuiPaneInfo_IsToolbar 2624
+#define wxAuiPaneInfo_IsTopDockable 2625
+#define wxAuiPaneInfo_Layer 2626
+#define wxAuiPaneInfo_Left 2627
+#define wxAuiPaneInfo_LeftDockable 2628
+#define wxAuiPaneInfo_MaxSize_1 2629
+#define wxAuiPaneInfo_MaxSize_2 2630
+#define wxAuiPaneInfo_MaximizeButton 2631
+#define wxAuiPaneInfo_MinSize_1 2632
+#define wxAuiPaneInfo_MinSize_2 2633
+#define wxAuiPaneInfo_MinimizeButton 2634
+#define wxAuiPaneInfo_Movable 2635
+#define wxAuiPaneInfo_Name 2636
+#define wxAuiPaneInfo_PaneBorder 2637
+#define wxAuiPaneInfo_PinButton 2638
+#define wxAuiPaneInfo_Position 2639
+#define wxAuiPaneInfo_Resizable 2640
+#define wxAuiPaneInfo_Right 2641
+#define wxAuiPaneInfo_RightDockable 2642
+#define wxAuiPaneInfo_Row 2643
+#define wxAuiPaneInfo_SafeSet 2644
+#define wxAuiPaneInfo_SetFlag 2645
+#define wxAuiPaneInfo_Show 2646
+#define wxAuiPaneInfo_ToolbarPane 2647
+#define wxAuiPaneInfo_Top 2648
+#define wxAuiPaneInfo_TopDockable 2649
+#define wxAuiPaneInfo_Window 2650
+#define wxAuiNotebook_new_0 2651
+#define wxAuiNotebook_new_2 2652
+#define wxAuiNotebook_AddPage 2653
+#define wxAuiNotebook_Create 2654
+#define wxAuiNotebook_DeletePage 2655
+#define wxAuiNotebook_GetArtProvider 2656
+#define wxAuiNotebook_GetPage 2657
+#define wxAuiNotebook_GetPageBitmap 2658
+#define wxAuiNotebook_GetPageCount 2659
+#define wxAuiNotebook_GetPageIndex 2660
+#define wxAuiNotebook_GetPageText 2661
+#define wxAuiNotebook_GetSelection 2662
+#define wxAuiNotebook_InsertPage 2663
+#define wxAuiNotebook_RemovePage 2664
+#define wxAuiNotebook_SetArtProvider 2665
+#define wxAuiNotebook_SetFont 2666
+#define wxAuiNotebook_SetPageBitmap 2667
+#define wxAuiNotebook_SetPageText 2668
+#define wxAuiNotebook_SetSelection 2669
+#define wxAuiNotebook_SetTabCtrlHeight 2670
+#define wxAuiNotebook_SetUniformBitmapSize 2671
+#define wxAuiNotebook_destroy 2672
+#define wxMDIParentFrame_new_0 2673
+#define wxMDIParentFrame_new_4 2674
+#define wxMDIParentFrame_destruct 2675
+#define wxMDIParentFrame_ActivateNext 2676
+#define wxMDIParentFrame_ActivatePrevious 2677
+#define wxMDIParentFrame_ArrangeIcons 2678
+#define wxMDIParentFrame_Cascade 2679
+#define wxMDIParentFrame_Create 2680
+#define wxMDIParentFrame_GetActiveChild 2681
+#define wxMDIParentFrame_GetClientWindow 2682
+#define wxMDIParentFrame_Tile 2683
+#define wxMDIChildFrame_new_0 2684
+#define wxMDIChildFrame_new_4 2685
+#define wxMDIChildFrame_destruct 2686
+#define wxMDIChildFrame_Activate 2687
+#define wxMDIChildFrame_Create 2688
+#define wxMDIChildFrame_Maximize 2689
+#define wxMDIChildFrame_Restore 2690
+#define wxMDIClientWindow_new_0 2691
+#define wxMDIClientWindow_new_2 2692
+#define wxMDIClientWindow_destruct 2693
+#define wxMDIClientWindow_CreateClient 2694
+#define wxLayoutAlgorithm_new 2695
+#define wxLayoutAlgorithm_LayoutFrame 2696
+#define wxLayoutAlgorithm_LayoutMDIFrame 2697
+#define wxLayoutAlgorithm_LayoutWindow 2698
+#define wxLayoutAlgorithm_destroy 2699
+#define wxEvent_GetId 2700
+#define wxEvent_GetSkipped 2701
+#define wxEvent_GetTimestamp 2702
+#define wxEvent_IsCommandEvent 2703
+#define wxEvent_ResumePropagation 2704
+#define wxEvent_ShouldPropagate 2705
+#define wxEvent_Skip 2706
+#define wxEvent_StopPropagation 2707
+#define wxCommandEvent_getClientData 2708
+#define wxCommandEvent_GetExtraLong 2709
+#define wxCommandEvent_GetInt 2710
+#define wxCommandEvent_GetSelection 2711
+#define wxCommandEvent_GetString 2712
+#define wxCommandEvent_IsChecked 2713
+#define wxCommandEvent_IsSelection 2714
+#define wxCommandEvent_SetInt 2715
+#define wxCommandEvent_SetString 2716
+#define wxScrollEvent_GetOrientation 2717
+#define wxScrollEvent_GetPosition 2718
+#define wxScrollWinEvent_GetOrientation 2719
+#define wxScrollWinEvent_GetPosition 2720
+#define wxMouseEvent_AltDown 2721
+#define wxMouseEvent_Button 2722
+#define wxMouseEvent_ButtonDClick 2723
+#define wxMouseEvent_ButtonDown 2724
+#define wxMouseEvent_ButtonUp 2725
+#define wxMouseEvent_CmdDown 2726
+#define wxMouseEvent_ControlDown 2727
+#define wxMouseEvent_Dragging 2728
+#define wxMouseEvent_Entering 2729
+#define wxMouseEvent_GetButton 2730
+#define wxMouseEvent_GetPosition 2733
+#define wxMouseEvent_GetLogicalPosition 2734
+#define wxMouseEvent_GetLinesPerAction 2735
+#define wxMouseEvent_GetWheelRotation 2736
+#define wxMouseEvent_GetWheelDelta 2737
+#define wxMouseEvent_GetX 2738
+#define wxMouseEvent_GetY 2739
+#define wxMouseEvent_IsButton 2740
+#define wxMouseEvent_IsPageScroll 2741
+#define wxMouseEvent_Leaving 2742
+#define wxMouseEvent_LeftDClick 2743
+#define wxMouseEvent_LeftDown 2744
+#define wxMouseEvent_LeftIsDown 2745
+#define wxMouseEvent_LeftUp 2746
+#define wxMouseEvent_MetaDown 2747
+#define wxMouseEvent_MiddleDClick 2748
+#define wxMouseEvent_MiddleDown 2749
+#define wxMouseEvent_MiddleIsDown 2750
+#define wxMouseEvent_MiddleUp 2751
+#define wxMouseEvent_Moving 2752
+#define wxMouseEvent_RightDClick 2753
+#define wxMouseEvent_RightDown 2754
+#define wxMouseEvent_RightIsDown 2755
+#define wxMouseEvent_RightUp 2756
+#define wxMouseEvent_ShiftDown 2757
+#define wxSetCursorEvent_GetCursor 2758
+#define wxSetCursorEvent_GetX 2759
+#define wxSetCursorEvent_GetY 2760
+#define wxSetCursorEvent_HasCursor 2761
+#define wxSetCursorEvent_SetCursor 2762
+#define wxKeyEvent_AltDown 2763
+#define wxKeyEvent_CmdDown 2764
+#define wxKeyEvent_ControlDown 2765
+#define wxKeyEvent_GetKeyCode 2766
+#define wxKeyEvent_GetModifiers 2767
+#define wxKeyEvent_GetPosition 2770
+#define wxKeyEvent_GetRawKeyCode 2771
+#define wxKeyEvent_GetRawKeyFlags 2772
+#define wxKeyEvent_GetUnicodeKey 2773
+#define wxKeyEvent_GetX 2774
+#define wxKeyEvent_GetY 2775
+#define wxKeyEvent_HasModifiers 2776
+#define wxKeyEvent_MetaDown 2777
+#define wxKeyEvent_ShiftDown 2778
+#define wxSizeEvent_GetSize 2779
+#define wxMoveEvent_GetPosition 2780
+#define wxEraseEvent_GetDC 2781
+#define wxFocusEvent_GetWindow 2782
+#define wxChildFocusEvent_GetWindow 2783
+#define wxMenuEvent_GetMenu 2784
+#define wxMenuEvent_GetMenuId 2785
+#define wxMenuEvent_IsPopup 2786
+#define wxCloseEvent_CanVeto 2787
+#define wxCloseEvent_GetLoggingOff 2788
+#define wxCloseEvent_SetCanVeto 2789
+#define wxCloseEvent_SetLoggingOff 2790
+#define wxCloseEvent_Veto 2791
+#define wxShowEvent_SetShow 2792
+#define wxShowEvent_GetShow 2793
+#define wxIconizeEvent_Iconized 2794
+#define wxJoystickEvent_ButtonDown 2795
+#define wxJoystickEvent_ButtonIsDown 2796
+#define wxJoystickEvent_ButtonUp 2797
+#define wxJoystickEvent_GetButtonChange 2798
+#define wxJoystickEvent_GetButtonState 2799
+#define wxJoystickEvent_GetJoystick 2800
+#define wxJoystickEvent_GetPosition 2801
+#define wxJoystickEvent_GetZPosition 2802
+#define wxJoystickEvent_IsButton 2803
+#define wxJoystickEvent_IsMove 2804
+#define wxJoystickEvent_IsZMove 2805
+#define wxUpdateUIEvent_CanUpdate 2806
+#define wxUpdateUIEvent_Check 2807
+#define wxUpdateUIEvent_Enable 2808
+#define wxUpdateUIEvent_Show 2809
+#define wxUpdateUIEvent_GetChecked 2810
+#define wxUpdateUIEvent_GetEnabled 2811
+#define wxUpdateUIEvent_GetShown 2812
+#define wxUpdateUIEvent_GetSetChecked 2813
+#define wxUpdateUIEvent_GetSetEnabled 2814
+#define wxUpdateUIEvent_GetSetShown 2815
+#define wxUpdateUIEvent_GetSetText 2816
+#define wxUpdateUIEvent_GetText 2817
+#define wxUpdateUIEvent_GetMode 2818
+#define wxUpdateUIEvent_GetUpdateInterval 2819
+#define wxUpdateUIEvent_ResetUpdateTime 2820
+#define wxUpdateUIEvent_SetMode 2821
+#define wxUpdateUIEvent_SetText 2822
+#define wxUpdateUIEvent_SetUpdateInterval 2823
+#define wxMouseCaptureChangedEvent_GetCapturedWindow 2824
+#define wxPaletteChangedEvent_SetChangedWindow 2825
+#define wxPaletteChangedEvent_GetChangedWindow 2826
+#define wxQueryNewPaletteEvent_SetPaletteRealized 2827
+#define wxQueryNewPaletteEvent_GetPaletteRealized 2828
+#define wxNavigationKeyEvent_GetDirection 2829
+#define wxNavigationKeyEvent_SetDirection 2830
+#define wxNavigationKeyEvent_IsWindowChange 2831
+#define wxNavigationKeyEvent_SetWindowChange 2832
+#define wxNavigationKeyEvent_IsFromTab 2833
+#define wxNavigationKeyEvent_SetFromTab 2834
+#define wxNavigationKeyEvent_GetCurrentFocus 2835
+#define wxNavigationKeyEvent_SetCurrentFocus 2836
+#define wxHelpEvent_GetOrigin 2837
+#define wxHelpEvent_GetPosition 2838
+#define wxHelpEvent_SetOrigin 2839
+#define wxHelpEvent_SetPosition 2840
+#define wxContextMenuEvent_GetPosition 2841
+#define wxContextMenuEvent_SetPosition 2842
+#define wxIdleEvent_CanSend 2843
+#define wxIdleEvent_GetMode 2844
+#define wxIdleEvent_RequestMore 2845
+#define wxIdleEvent_MoreRequested 2846
+#define wxIdleEvent_SetMode 2847
+#define wxGridEvent_AltDown 2848
+#define wxGridEvent_ControlDown 2849
+#define wxGridEvent_GetCol 2850
+#define wxGridEvent_GetPosition 2851
+#define wxGridEvent_GetRow 2852
+#define wxGridEvent_MetaDown 2853
+#define wxGridEvent_Selecting 2854
+#define wxGridEvent_ShiftDown 2855
+#define wxNotifyEvent_Allow 2856
+#define wxNotifyEvent_IsAllowed 2857
+#define wxNotifyEvent_Veto 2858
+#define wxSashEvent_GetEdge 2859
+#define wxSashEvent_GetDragRect 2860
+#define wxSashEvent_GetDragStatus 2861
+#define wxListEvent_GetCacheFrom 2862
+#define wxListEvent_GetCacheTo 2863
+#define wxListEvent_GetKeyCode 2864
+#define wxListEvent_GetIndex 2865
+#define wxListEvent_GetColumn 2866
+#define wxListEvent_GetPoint 2867
+#define wxListEvent_GetLabel 2868
+#define wxListEvent_GetText 2869
+#define wxListEvent_GetImage 2870
+#define wxListEvent_GetData 2871
+#define wxListEvent_GetMask 2872
+#define wxListEvent_GetItem 2873
+#define wxListEvent_IsEditCancelled 2874
+#define wxDateEvent_GetDate 2875
+#define wxCalendarEvent_GetWeekDay 2876
+#define wxFileDirPickerEvent_GetPath 2877
+#define wxColourPickerEvent_GetColour 2878
+#define wxFontPickerEvent_GetFont 2879
+#define wxStyledTextEvent_GetPosition 2880
+#define wxStyledTextEvent_GetKey 2881
+#define wxStyledTextEvent_GetModifiers 2882
+#define wxStyledTextEvent_GetModificationType 2883
+#define wxStyledTextEvent_GetText 2884
+#define wxStyledTextEvent_GetLength 2885
+#define wxStyledTextEvent_GetLinesAdded 2886
+#define wxStyledTextEvent_GetLine 2887
+#define wxStyledTextEvent_GetFoldLevelNow 2888
+#define wxStyledTextEvent_GetFoldLevelPrev 2889
+#define wxStyledTextEvent_GetMargin 2890
+#define wxStyledTextEvent_GetMessage 2891
+#define wxStyledTextEvent_GetWParam 2892
+#define wxStyledTextEvent_GetLParam 2893
+#define wxStyledTextEvent_GetListType 2894
+#define wxStyledTextEvent_GetX 2895
+#define wxStyledTextEvent_GetY 2896
+#define wxStyledTextEvent_GetDragText 2897
+#define wxStyledTextEvent_GetDragAllowMove 2898
+#define wxStyledTextEvent_GetDragResult 2899
+#define wxStyledTextEvent_GetShift 2900
+#define wxStyledTextEvent_GetControl 2901
+#define wxStyledTextEvent_GetAlt 2902
+#define utils_wxGetKeyState 2903
+#define utils_wxGetMousePosition 2904
+#define utils_wxGetMouseState 2905
+#define utils_wxSetDetectableAutoRepeat 2906
+#define utils_wxBell 2907
+#define utils_wxFindMenuItemId 2908
+#define utils_wxGenericFindWindowAtPoint 2909
+#define utils_wxFindWindowAtPoint 2910
+#define utils_wxBeginBusyCursor 2911
+#define utils_wxEndBusyCursor 2912
+#define utils_wxIsBusy 2913
+#define utils_wxShutdown 2914
+#define utils_wxShell 2915
+#define utils_wxLaunchDefaultBrowser 2916
+#define utils_wxGetEmailAddress 2917
+#define utils_wxGetUserId 2918
+#define utils_wxGetHomeDir 2919
+#define utils_wxNewId 2920
+#define utils_wxRegisterId 2921
+#define utils_wxGetCurrentId 2922
+#define utils_wxGetOsDescription 2923
+#define utils_wxIsPlatformLittleEndian 2924
+#define utils_wxIsPlatform64Bit 2925
+#define wxPrintout_new 2926
+#define wxPrintout_destruct 2927
+#define wxPrintout_GetDC 2928
+#define wxPrintout_GetPageSizeMM 2929
+#define wxPrintout_GetPageSizePixels 2930
+#define wxPrintout_GetPaperRectPixels 2931
+#define wxPrintout_GetPPIPrinter 2932
+#define wxPrintout_GetPPIScreen 2933
+#define wxPrintout_GetTitle 2934
+#define wxPrintout_IsPreview 2935
+#define wxPrintout_FitThisSizeToPaper 2936
+#define wxPrintout_FitThisSizeToPage 2937
+#define wxPrintout_FitThisSizeToPageMargins 2938
+#define wxPrintout_MapScreenSizeToPaper 2939
+#define wxPrintout_MapScreenSizeToPage 2940
+#define wxPrintout_MapScreenSizeToPageMargins 2941
+#define wxPrintout_MapScreenSizeToDevice 2942
+#define wxPrintout_GetLogicalPaperRect 2943
+#define wxPrintout_GetLogicalPageRect 2944
+#define wxPrintout_GetLogicalPageMarginsRect 2945
+#define wxPrintout_SetLogicalOrigin 2946
+#define wxPrintout_OffsetLogicalOrigin 2947
+#define wxStyledTextCtrl_new_2 2948
+#define wxStyledTextCtrl_new_0 2949
+#define wxStyledTextCtrl_destruct 2950
+#define wxStyledTextCtrl_Create 2951
+#define wxStyledTextCtrl_AddText 2952
+#define wxStyledTextCtrl_AddStyledText 2953
+#define wxStyledTextCtrl_InsertText 2954
+#define wxStyledTextCtrl_ClearAll 2955
+#define wxStyledTextCtrl_ClearDocumentStyle 2956
+#define wxStyledTextCtrl_GetLength 2957
+#define wxStyledTextCtrl_GetCharAt 2958
+#define wxStyledTextCtrl_GetCurrentPos 2959
+#define wxStyledTextCtrl_GetAnchor 2960
+#define wxStyledTextCtrl_GetStyleAt 2961
+#define wxStyledTextCtrl_Redo 2962
+#define wxStyledTextCtrl_SetUndoCollection 2963
+#define wxStyledTextCtrl_SelectAll 2964
+#define wxStyledTextCtrl_SetSavePoint 2965
+#define wxStyledTextCtrl_GetStyledText 2966
+#define wxStyledTextCtrl_CanRedo 2967
+#define wxStyledTextCtrl_MarkerLineFromHandle 2968
+#define wxStyledTextCtrl_MarkerDeleteHandle 2969
+#define wxStyledTextCtrl_GetUndoCollection 2970
+#define wxStyledTextCtrl_GetViewWhiteSpace 2971
+#define wxStyledTextCtrl_SetViewWhiteSpace 2972
+#define wxStyledTextCtrl_PositionFromPoint 2973
+#define wxStyledTextCtrl_PositionFromPointClose 2974
+#define wxStyledTextCtrl_GotoLine 2975
+#define wxStyledTextCtrl_GotoPos 2976
+#define wxStyledTextCtrl_SetAnchor 2977
+#define wxStyledTextCtrl_GetCurLine 2978
+#define wxStyledTextCtrl_GetEndStyled 2979
+#define wxStyledTextCtrl_ConvertEOLs 2980
+#define wxStyledTextCtrl_GetEOLMode 2981
+#define wxStyledTextCtrl_SetEOLMode 2982
+#define wxStyledTextCtrl_StartStyling 2983
+#define wxStyledTextCtrl_SetStyling 2984
+#define wxStyledTextCtrl_GetBufferedDraw 2985
+#define wxStyledTextCtrl_SetBufferedDraw 2986
+#define wxStyledTextCtrl_SetTabWidth 2987
+#define wxStyledTextCtrl_GetTabWidth 2988
+#define wxStyledTextCtrl_SetCodePage 2989
+#define wxStyledTextCtrl_MarkerDefine 2990
+#define wxStyledTextCtrl_MarkerSetForeground 2991
+#define wxStyledTextCtrl_MarkerSetBackground 2992
+#define wxStyledTextCtrl_MarkerAdd 2993
+#define wxStyledTextCtrl_MarkerDelete 2994
+#define wxStyledTextCtrl_MarkerDeleteAll 2995
+#define wxStyledTextCtrl_MarkerGet 2996
+#define wxStyledTextCtrl_MarkerNext 2997
+#define wxStyledTextCtrl_MarkerPrevious 2998
+#define wxStyledTextCtrl_MarkerDefineBitmap 2999
+#define wxStyledTextCtrl_MarkerAddSet 3000
+#define wxStyledTextCtrl_MarkerSetAlpha 3001
+#define wxStyledTextCtrl_SetMarginType 3002
+#define wxStyledTextCtrl_GetMarginType 3003
+#define wxStyledTextCtrl_SetMarginWidth 3004
+#define wxStyledTextCtrl_GetMarginWidth 3005
+#define wxStyledTextCtrl_SetMarginMask 3006
+#define wxStyledTextCtrl_GetMarginMask 3007
+#define wxStyledTextCtrl_SetMarginSensitive 3008
+#define wxStyledTextCtrl_GetMarginSensitive 3009
+#define wxStyledTextCtrl_StyleClearAll 3010
+#define wxStyledTextCtrl_StyleSetForeground 3011
+#define wxStyledTextCtrl_StyleSetBackground 3012
+#define wxStyledTextCtrl_StyleSetBold 3013
+#define wxStyledTextCtrl_StyleSetItalic 3014
+#define wxStyledTextCtrl_StyleSetSize 3015
+#define wxStyledTextCtrl_StyleSetFaceName 3016
+#define wxStyledTextCtrl_StyleSetEOLFilled 3017
+#define wxStyledTextCtrl_StyleResetDefault 3018
+#define wxStyledTextCtrl_StyleSetUnderline 3019
+#define wxStyledTextCtrl_StyleSetCase 3020
+#define wxStyledTextCtrl_StyleSetHotSpot 3021
+#define wxStyledTextCtrl_SetSelForeground 3022
+#define wxStyledTextCtrl_SetSelBackground 3023
+#define wxStyledTextCtrl_GetSelAlpha 3024
+#define wxStyledTextCtrl_SetSelAlpha 3025
+#define wxStyledTextCtrl_SetCaretForeground 3026
+#define wxStyledTextCtrl_CmdKeyAssign 3027
+#define wxStyledTextCtrl_CmdKeyClear 3028
+#define wxStyledTextCtrl_CmdKeyClearAll 3029
+#define wxStyledTextCtrl_SetStyleBytes 3030
+#define wxStyledTextCtrl_StyleSetVisible 3031
+#define wxStyledTextCtrl_GetCaretPeriod 3032
+#define wxStyledTextCtrl_SetCaretPeriod 3033
+#define wxStyledTextCtrl_SetWordChars 3034
+#define wxStyledTextCtrl_BeginUndoAction 3035
+#define wxStyledTextCtrl_EndUndoAction 3036
+#define wxStyledTextCtrl_IndicatorSetStyle 3037
+#define wxStyledTextCtrl_IndicatorGetStyle 3038
+#define wxStyledTextCtrl_IndicatorSetForeground 3039
+#define wxStyledTextCtrl_IndicatorGetForeground 3040
+#define wxStyledTextCtrl_SetWhitespaceForeground 3041
+#define wxStyledTextCtrl_SetWhitespaceBackground 3042
+#define wxStyledTextCtrl_GetStyleBits 3043
+#define wxStyledTextCtrl_SetLineState 3044
+#define wxStyledTextCtrl_GetLineState 3045
+#define wxStyledTextCtrl_GetMaxLineState 3046
+#define wxStyledTextCtrl_GetCaretLineVisible 3047
+#define wxStyledTextCtrl_SetCaretLineVisible 3048
+#define wxStyledTextCtrl_GetCaretLineBackground 3049
+#define wxStyledTextCtrl_SetCaretLineBackground 3050
+#define wxStyledTextCtrl_AutoCompShow 3051
+#define wxStyledTextCtrl_AutoCompCancel 3052
+#define wxStyledTextCtrl_AutoCompActive 3053
+#define wxStyledTextCtrl_AutoCompPosStart 3054
+#define wxStyledTextCtrl_AutoCompComplete 3055
+#define wxStyledTextCtrl_AutoCompStops 3056
+#define wxStyledTextCtrl_AutoCompSetSeparator 3057
+#define wxStyledTextCtrl_AutoCompGetSeparator 3058
+#define wxStyledTextCtrl_AutoCompSelect 3059
+#define wxStyledTextCtrl_AutoCompSetCancelAtStart 3060
+#define wxStyledTextCtrl_AutoCompGetCancelAtStart 3061
+#define wxStyledTextCtrl_AutoCompSetFillUps 3062
+#define wxStyledTextCtrl_AutoCompSetChooseSingle 3063
+#define wxStyledTextCtrl_AutoCompGetChooseSingle 3064
+#define wxStyledTextCtrl_AutoCompSetIgnoreCase 3065
+#define wxStyledTextCtrl_AutoCompGetIgnoreCase 3066
+#define wxStyledTextCtrl_UserListShow 3067
+#define wxStyledTextCtrl_AutoCompSetAutoHide 3068
+#define wxStyledTextCtrl_AutoCompGetAutoHide 3069
+#define wxStyledTextCtrl_AutoCompSetDropRestOfWord 3070
+#define wxStyledTextCtrl_AutoCompGetDropRestOfWord 3071
+#define wxStyledTextCtrl_RegisterImage 3072
+#define wxStyledTextCtrl_ClearRegisteredImages 3073
+#define wxStyledTextCtrl_AutoCompGetTypeSeparator 3074
+#define wxStyledTextCtrl_AutoCompSetTypeSeparator 3075
+#define wxStyledTextCtrl_AutoCompSetMaxWidth 3076
+#define wxStyledTextCtrl_AutoCompGetMaxWidth 3077
+#define wxStyledTextCtrl_AutoCompSetMaxHeight 3078
+#define wxStyledTextCtrl_AutoCompGetMaxHeight 3079
+#define wxStyledTextCtrl_SetIndent 3080
+#define wxStyledTextCtrl_GetIndent 3081
+#define wxStyledTextCtrl_SetUseTabs 3082
+#define wxStyledTextCtrl_GetUseTabs 3083
+#define wxStyledTextCtrl_SetLineIndentation 3084
+#define wxStyledTextCtrl_GetLineIndentation 3085
+#define wxStyledTextCtrl_GetLineIndentPosition 3086
+#define wxStyledTextCtrl_GetColumn 3087
+#define wxStyledTextCtrl_SetUseHorizontalScrollBar 3088
+#define wxStyledTextCtrl_GetUseHorizontalScrollBar 3089
+#define wxStyledTextCtrl_SetIndentationGuides 3090
+#define wxStyledTextCtrl_GetIndentationGuides 3091
+#define wxStyledTextCtrl_SetHighlightGuide 3092
+#define wxStyledTextCtrl_GetHighlightGuide 3093
+#define wxStyledTextCtrl_GetLineEndPosition 3094
+#define wxStyledTextCtrl_GetCodePage 3095
+#define wxStyledTextCtrl_GetCaretForeground 3096
+#define wxStyledTextCtrl_GetReadOnly 3097
+#define wxStyledTextCtrl_SetCurrentPos 3098
+#define wxStyledTextCtrl_SetSelectionStart 3099
+#define wxStyledTextCtrl_GetSelectionStart 3100
+#define wxStyledTextCtrl_SetSelectionEnd 3101
+#define wxStyledTextCtrl_GetSelectionEnd 3102
+#define wxStyledTextCtrl_SetPrintMagnification 3103
+#define wxStyledTextCtrl_GetPrintMagnification 3104
+#define wxStyledTextCtrl_SetPrintColourMode 3105
+#define wxStyledTextCtrl_GetPrintColourMode 3106
+#define wxStyledTextCtrl_FindText 3107
+#define wxStyledTextCtrl_FormatRange 3108
+#define wxStyledTextCtrl_GetFirstVisibleLine 3109
+#define wxStyledTextCtrl_GetLine 3110
+#define wxStyledTextCtrl_GetLineCount 3111
+#define wxStyledTextCtrl_SetMarginLeft 3112
+#define wxStyledTextCtrl_GetMarginLeft 3113
+#define wxStyledTextCtrl_SetMarginRight 3114
+#define wxStyledTextCtrl_GetMarginRight 3115
+#define wxStyledTextCtrl_GetModify 3116
+#define wxStyledTextCtrl_SetSelection 3117
+#define wxStyledTextCtrl_GetSelectedText 3118
+#define wxStyledTextCtrl_GetTextRange 3119
+#define wxStyledTextCtrl_HideSelection 3120
+#define wxStyledTextCtrl_LineFromPosition 3121
+#define wxStyledTextCtrl_PositionFromLine 3122
+#define wxStyledTextCtrl_LineScroll 3123
+#define wxStyledTextCtrl_EnsureCaretVisible 3124
+#define wxStyledTextCtrl_ReplaceSelection 3125
+#define wxStyledTextCtrl_SetReadOnly 3126
+#define wxStyledTextCtrl_CanPaste 3127
+#define wxStyledTextCtrl_CanUndo 3128
+#define wxStyledTextCtrl_EmptyUndoBuffer 3129
+#define wxStyledTextCtrl_Undo 3130
+#define wxStyledTextCtrl_Cut 3131
+#define wxStyledTextCtrl_Copy 3132
+#define wxStyledTextCtrl_Paste 3133
+#define wxStyledTextCtrl_Clear 3134
+#define wxStyledTextCtrl_SetText 3135
+#define wxStyledTextCtrl_GetText 3136
+#define wxStyledTextCtrl_GetTextLength 3137
+#define wxStyledTextCtrl_GetOvertype 3138
+#define wxStyledTextCtrl_SetCaretWidth 3139
+#define wxStyledTextCtrl_GetCaretWidth 3140
+#define wxStyledTextCtrl_SetTargetStart 3141
+#define wxStyledTextCtrl_GetTargetStart 3142
+#define wxStyledTextCtrl_SetTargetEnd 3143
+#define wxStyledTextCtrl_GetTargetEnd 3144
+#define wxStyledTextCtrl_ReplaceTarget 3145
+#define wxStyledTextCtrl_SearchInTarget 3146
+#define wxStyledTextCtrl_SetSearchFlags 3147
+#define wxStyledTextCtrl_GetSearchFlags 3148
+#define wxStyledTextCtrl_CallTipShow 3149
+#define wxStyledTextCtrl_CallTipCancel 3150
+#define wxStyledTextCtrl_CallTipActive 3151
+#define wxStyledTextCtrl_CallTipPosAtStart 3152
+#define wxStyledTextCtrl_CallTipSetHighlight 3153
+#define wxStyledTextCtrl_CallTipSetBackground 3154
+#define wxStyledTextCtrl_CallTipSetForeground 3155
+#define wxStyledTextCtrl_CallTipSetForegroundHighlight 3156
+#define wxStyledTextCtrl_CallTipUseStyle 3157
+#define wxStyledTextCtrl_VisibleFromDocLine 3158
+#define wxStyledTextCtrl_DocLineFromVisible 3159
+#define wxStyledTextCtrl_WrapCount 3160
+#define wxStyledTextCtrl_SetFoldLevel 3161
+#define wxStyledTextCtrl_GetFoldLevel 3162
+#define wxStyledTextCtrl_GetLastChild 3163
+#define wxStyledTextCtrl_GetFoldParent 3164
+#define wxStyledTextCtrl_ShowLines 3165
+#define wxStyledTextCtrl_HideLines 3166
+#define wxStyledTextCtrl_GetLineVisible 3167
+#define wxStyledTextCtrl_SetFoldExpanded 3168
+#define wxStyledTextCtrl_GetFoldExpanded 3169
+#define wxStyledTextCtrl_ToggleFold 3170
+#define wxStyledTextCtrl_EnsureVisible 3171
+#define wxStyledTextCtrl_SetFoldFlags 3172
+#define wxStyledTextCtrl_EnsureVisibleEnforcePolicy 3173
+#define wxStyledTextCtrl_SetTabIndents 3174
+#define wxStyledTextCtrl_GetTabIndents 3175
+#define wxStyledTextCtrl_SetBackSpaceUnIndents 3176
+#define wxStyledTextCtrl_GetBackSpaceUnIndents 3177
+#define wxStyledTextCtrl_SetMouseDwellTime 3178
+#define wxStyledTextCtrl_GetMouseDwellTime 3179
+#define wxStyledTextCtrl_WordStartPosition 3180
+#define wxStyledTextCtrl_WordEndPosition 3181
+#define wxStyledTextCtrl_SetWrapMode 3182
+#define wxStyledTextCtrl_GetWrapMode 3183
+#define wxStyledTextCtrl_SetWrapVisualFlags 3184
+#define wxStyledTextCtrl_GetWrapVisualFlags 3185
+#define wxStyledTextCtrl_SetWrapVisualFlagsLocation 3186
+#define wxStyledTextCtrl_GetWrapVisualFlagsLocation 3187
+#define wxStyledTextCtrl_SetWrapStartIndent 3188
+#define wxStyledTextCtrl_GetWrapStartIndent 3189
+#define wxStyledTextCtrl_SetLayoutCache 3190
+#define wxStyledTextCtrl_GetLayoutCache 3191
+#define wxStyledTextCtrl_SetScrollWidth 3192
+#define wxStyledTextCtrl_GetScrollWidth 3193
+#define wxStyledTextCtrl_TextWidth 3194
+#define wxStyledTextCtrl_GetEndAtLastLine 3195
+#define wxStyledTextCtrl_TextHeight 3196
+#define wxStyledTextCtrl_SetUseVerticalScrollBar 3197
+#define wxStyledTextCtrl_GetUseVerticalScrollBar 3198
+#define wxStyledTextCtrl_AppendText 3199
+#define wxStyledTextCtrl_GetTwoPhaseDraw 3200
+#define wxStyledTextCtrl_SetTwoPhaseDraw 3201
+#define wxStyledTextCtrl_TargetFromSelection 3202
+#define wxStyledTextCtrl_LinesJoin 3203
+#define wxStyledTextCtrl_LinesSplit 3204
+#define wxStyledTextCtrl_SetFoldMarginColour 3205
+#define wxStyledTextCtrl_SetFoldMarginHiColour 3206
+#define wxStyledTextCtrl_LineDown 3207
+#define wxStyledTextCtrl_LineDownExtend 3208
+#define wxStyledTextCtrl_LineUp 3209
+#define wxStyledTextCtrl_LineUpExtend 3210
+#define wxStyledTextCtrl_CharLeft 3211
+#define wxStyledTextCtrl_CharLeftExtend 3212
+#define wxStyledTextCtrl_CharRight 3213
+#define wxStyledTextCtrl_CharRightExtend 3214
+#define wxStyledTextCtrl_WordLeft 3215
+#define wxStyledTextCtrl_WordLeftExtend 3216
+#define wxStyledTextCtrl_WordRight 3217
+#define wxStyledTextCtrl_WordRightExtend 3218
+#define wxStyledTextCtrl_Home 3219
+#define wxStyledTextCtrl_HomeExtend 3220
+#define wxStyledTextCtrl_LineEnd 3221
+#define wxStyledTextCtrl_LineEndExtend 3222
+#define wxStyledTextCtrl_DocumentStart 3223
+#define wxStyledTextCtrl_DocumentStartExtend 3224
+#define wxStyledTextCtrl_DocumentEnd 3225
+#define wxStyledTextCtrl_DocumentEndExtend 3226
+#define wxStyledTextCtrl_PageUp 3227
+#define wxStyledTextCtrl_PageUpExtend 3228
+#define wxStyledTextCtrl_PageDown 3229
+#define wxStyledTextCtrl_PageDownExtend 3230
+#define wxStyledTextCtrl_EditToggleOvertype 3231
+#define wxStyledTextCtrl_Cancel 3232
+#define wxStyledTextCtrl_DeleteBack 3233
+#define wxStyledTextCtrl_Tab 3234
+#define wxStyledTextCtrl_BackTab 3235
+#define wxStyledTextCtrl_NewLine 3236
+#define wxStyledTextCtrl_FormFeed 3237
+#define wxStyledTextCtrl_VCHome 3238
+#define wxStyledTextCtrl_VCHomeExtend 3239
+#define wxStyledTextCtrl_ZoomIn 3240
+#define wxStyledTextCtrl_ZoomOut 3241
+#define wxStyledTextCtrl_DelWordLeft 3242
+#define wxStyledTextCtrl_DelWordRight 3243
+#define wxStyledTextCtrl_LineCut 3244
+#define wxStyledTextCtrl_LineDelete 3245
+#define wxStyledTextCtrl_LineTranspose 3246
+#define wxStyledTextCtrl_LineDuplicate 3247
+#define wxStyledTextCtrl_LowerCase 3248
+#define wxStyledTextCtrl_UpperCase 3249
+#define wxStyledTextCtrl_LineScrollDown 3250
+#define wxStyledTextCtrl_LineScrollUp 3251
+#define wxStyledTextCtrl_DeleteBackNotLine 3252
+#define wxStyledTextCtrl_HomeDisplay 3253
+#define wxStyledTextCtrl_HomeDisplayExtend 3254
+#define wxStyledTextCtrl_LineEndDisplay 3255
+#define wxStyledTextCtrl_LineEndDisplayExtend 3256
+#define wxStyledTextCtrl_HomeWrapExtend 3257
+#define wxStyledTextCtrl_LineEndWrap 3258
+#define wxStyledTextCtrl_LineEndWrapExtend 3259
+#define wxStyledTextCtrl_VCHomeWrap 3260
+#define wxStyledTextCtrl_VCHomeWrapExtend 3261
+#define wxStyledTextCtrl_LineCopy 3262
+#define wxStyledTextCtrl_MoveCaretInsideView 3263
+#define wxStyledTextCtrl_LineLength 3264
+#define wxStyledTextCtrl_BraceHighlight 3265
+#define wxStyledTextCtrl_BraceBadLight 3266
+#define wxStyledTextCtrl_BraceMatch 3267
+#define wxStyledTextCtrl_GetViewEOL 3268
+#define wxStyledTextCtrl_SetViewEOL 3269
+#define wxStyledTextCtrl_SetModEventMask 3270
+#define wxStyledTextCtrl_GetEdgeColumn 3271
+#define wxStyledTextCtrl_SetEdgeColumn 3272
+#define wxStyledTextCtrl_SetEdgeMode 3273
+#define wxStyledTextCtrl_GetEdgeMode 3274
+#define wxStyledTextCtrl_GetEdgeColour 3275
+#define wxStyledTextCtrl_SetEdgeColour 3276
+#define wxStyledTextCtrl_SearchAnchor 3277
+#define wxStyledTextCtrl_SearchNext 3278
+#define wxStyledTextCtrl_SearchPrev 3279
+#define wxStyledTextCtrl_LinesOnScreen 3280
+#define wxStyledTextCtrl_UsePopUp 3281
+#define wxStyledTextCtrl_SelectionIsRectangle 3282
+#define wxStyledTextCtrl_SetZoom 3283
+#define wxStyledTextCtrl_GetZoom 3284
+#define wxStyledTextCtrl_GetModEventMask 3285
+#define wxStyledTextCtrl_SetSTCFocus 3286
+#define wxStyledTextCtrl_GetSTCFocus 3287
+#define wxStyledTextCtrl_SetStatus 3288
+#define wxStyledTextCtrl_GetStatus 3289
+#define wxStyledTextCtrl_SetMouseDownCaptures 3290
+#define wxStyledTextCtrl_GetMouseDownCaptures 3291
+#define wxStyledTextCtrl_SetSTCCursor 3292
+#define wxStyledTextCtrl_GetSTCCursor 3293
+#define wxStyledTextCtrl_SetControlCharSymbol 3294
+#define wxStyledTextCtrl_GetControlCharSymbol 3295
+#define wxStyledTextCtrl_WordPartLeft 3296
+#define wxStyledTextCtrl_WordPartLeftExtend 3297
+#define wxStyledTextCtrl_WordPartRight 3298
+#define wxStyledTextCtrl_WordPartRightExtend 3299
+#define wxStyledTextCtrl_SetVisiblePolicy 3300
+#define wxStyledTextCtrl_DelLineLeft 3301
+#define wxStyledTextCtrl_DelLineRight 3302
+#define wxStyledTextCtrl_GetXOffset 3303
+#define wxStyledTextCtrl_ChooseCaretX 3304
+#define wxStyledTextCtrl_SetXCaretPolicy 3305
+#define wxStyledTextCtrl_SetYCaretPolicy 3306
+#define wxStyledTextCtrl_GetPrintWrapMode 3307
+#define wxStyledTextCtrl_SetHotspotActiveForeground 3308
+#define wxStyledTextCtrl_SetHotspotActiveBackground 3309
+#define wxStyledTextCtrl_SetHotspotActiveUnderline 3310
+#define wxStyledTextCtrl_SetHotspotSingleLine 3311
+#define wxStyledTextCtrl_ParaDownExtend 3312
+#define wxStyledTextCtrl_ParaUp 3313
+#define wxStyledTextCtrl_ParaUpExtend 3314
+#define wxStyledTextCtrl_PositionBefore 3315
+#define wxStyledTextCtrl_PositionAfter 3316
+#define wxStyledTextCtrl_CopyRange 3317
+#define wxStyledTextCtrl_CopyText 3318
+#define wxStyledTextCtrl_SetSelectionMode 3319
+#define wxStyledTextCtrl_GetSelectionMode 3320
+#define wxStyledTextCtrl_LineDownRectExtend 3321
+#define wxStyledTextCtrl_LineUpRectExtend 3322
+#define wxStyledTextCtrl_CharLeftRectExtend 3323
+#define wxStyledTextCtrl_CharRightRectExtend 3324
+#define wxStyledTextCtrl_HomeRectExtend 3325
+#define wxStyledTextCtrl_VCHomeRectExtend 3326
+#define wxStyledTextCtrl_LineEndRectExtend 3327
+#define wxStyledTextCtrl_PageUpRectExtend 3328
+#define wxStyledTextCtrl_PageDownRectExtend 3329
+#define wxStyledTextCtrl_StutteredPageUp 3330
+#define wxStyledTextCtrl_StutteredPageUpExtend 3331
+#define wxStyledTextCtrl_StutteredPageDown 3332
+#define wxStyledTextCtrl_StutteredPageDownExtend 3333
+#define wxStyledTextCtrl_WordLeftEnd 3334
+#define wxStyledTextCtrl_WordLeftEndExtend 3335
+#define wxStyledTextCtrl_WordRightEnd 3336
+#define wxStyledTextCtrl_WordRightEndExtend 3337
+#define wxStyledTextCtrl_SetWhitespaceChars 3338
+#define wxStyledTextCtrl_SetCharsDefault 3339
+#define wxStyledTextCtrl_AutoCompGetCurrent 3340
+#define wxStyledTextCtrl_Allocate 3341
+#define wxStyledTextCtrl_FindColumn 3342
+#define wxStyledTextCtrl_GetCaretSticky 3343
+#define wxStyledTextCtrl_SetCaretSticky 3344
+#define wxStyledTextCtrl_ToggleCaretSticky 3345
+#define wxStyledTextCtrl_SetPasteConvertEndings 3346
+#define wxStyledTextCtrl_GetPasteConvertEndings 3347
+#define wxStyledTextCtrl_SelectionDuplicate 3348
+#define wxStyledTextCtrl_SetCaretLineBackAlpha 3349
+#define wxStyledTextCtrl_GetCaretLineBackAlpha 3350
+#define wxStyledTextCtrl_StartRecord 3351
+#define wxStyledTextCtrl_StopRecord 3352
+#define wxStyledTextCtrl_SetLexer 3353
+#define wxStyledTextCtrl_GetLexer 3354
+#define wxStyledTextCtrl_Colourise 3355
+#define wxStyledTextCtrl_SetProperty 3356
+#define wxStyledTextCtrl_SetKeyWords 3357
+#define wxStyledTextCtrl_SetLexerLanguage 3358
+#define wxStyledTextCtrl_GetProperty 3359
+#define wxStyledTextCtrl_GetStyleBitsNeeded 3360
+#define wxStyledTextCtrl_GetCurrentLine 3361
+#define wxStyledTextCtrl_StyleSetSpec 3362
+#define wxStyledTextCtrl_StyleSetFont 3363
+#define wxStyledTextCtrl_StyleSetFontAttr 3364
+#define wxStyledTextCtrl_StyleSetCharacterSet 3365
+#define wxStyledTextCtrl_StyleSetFontEncoding 3366
+#define wxStyledTextCtrl_CmdKeyExecute 3367
+#define wxStyledTextCtrl_SetMargins 3368
+#define wxStyledTextCtrl_GetSelection 3369
+#define wxStyledTextCtrl_PointFromPosition 3370
+#define wxStyledTextCtrl_ScrollToLine 3371
+#define wxStyledTextCtrl_ScrollToColumn 3372
+#define wxStyledTextCtrl_SendMsg 3373
+#define wxStyledTextCtrl_SetVScrollBar 3374
+#define wxStyledTextCtrl_SetHScrollBar 3375
+#define wxStyledTextCtrl_GetLastKeydownProcessed 3376
+#define wxStyledTextCtrl_SetLastKeydownProcessed 3377
+#define wxStyledTextCtrl_SaveFile 3378
+#define wxStyledTextCtrl_LoadFile 3379
+#define wxStyledTextCtrl_DoDragOver 3380
+#define wxStyledTextCtrl_DoDropText 3381
+#define wxStyledTextCtrl_GetUseAntiAliasing 3382
+#define wxStyledTextCtrl_AddTextRaw 3383
+#define wxStyledTextCtrl_InsertTextRaw 3384
+#define wxStyledTextCtrl_GetCurLineRaw 3385
+#define wxStyledTextCtrl_GetLineRaw 3386
+#define wxStyledTextCtrl_GetSelectedTextRaw 3387
+#define wxStyledTextCtrl_GetTextRangeRaw 3388
+#define wxStyledTextCtrl_SetTextRaw 3389
+#define wxStyledTextCtrl_GetTextRaw 3390
+#define wxStyledTextCtrl_AppendTextRaw 3391
+#define wxArtProvider_GetBitmap 3392
+#define wxArtProvider_GetIcon 3393
+#define wxTreeEvent_GetKeyCode 3394
+#define wxTreeEvent_GetItem 3395
+#define wxTreeEvent_GetKeyEvent 3396
+#define wxTreeEvent_GetLabel 3397
+#define wxTreeEvent_GetOldItem 3398
+#define wxTreeEvent_GetPoint 3399
+#define wxTreeEvent_IsEditCancelled 3400
+#define wxTreeEvent_SetToolTip 3401
+#define wxNotebookEvent_GetOldSelection 3402
+#define wxNotebookEvent_GetSelection 3403
+#define wxNotebookEvent_SetOldSelection 3404
+#define wxNotebookEvent_SetSelection 3405
+#define wxFileDataObject_new 3406
+#define wxFileDataObject_AddFile 3407
+#define wxFileDataObject_GetFilenames 3408
+#define wxFileDataObject_destroy 3409
+#define wxTextDataObject_new 3410
+#define wxTextDataObject_GetTextLength 3411
+#define wxTextDataObject_GetText 3412
+#define wxTextDataObject_SetText 3413
+#define wxTextDataObject_destroy 3414
+#define wxBitmapDataObject_new_1_1 3415
+#define wxBitmapDataObject_new_1_0 3416
+#define wxBitmapDataObject_GetBitmap 3417
+#define wxBitmapDataObject_SetBitmap 3418
+#define wxBitmapDataObject_destroy 3419
+#define wxClipboard_new 3421
+#define wxClipboard_destruct 3422
+#define wxClipboard_AddData 3423
+#define wxClipboard_Clear 3424
+#define wxClipboard_Close 3425
+#define wxClipboard_Flush 3426
+#define wxClipboard_GetData 3427
+#define wxClipboard_IsOpened 3428
+#define wxClipboard_Open 3429
+#define wxClipboard_SetData 3430
+#define wxClipboard_UsePrimarySelection 3432
+#define wxClipboard_IsSupported 3433
+#define wxClipboard_Get 3434
+#define wxSpinEvent_GetPosition 3435
+#define wxSpinEvent_SetPosition 3436
+#define wxSplitterWindow_new_0 3437
+#define wxSplitterWindow_new_2 3438
+#define wxSplitterWindow_destruct 3439
+#define wxSplitterWindow_Create 3440
+#define wxSplitterWindow_GetMinimumPaneSize 3441
+#define wxSplitterWindow_GetSashGravity 3442
+#define wxSplitterWindow_GetSashPosition 3443
+#define wxSplitterWindow_GetSplitMode 3444
+#define wxSplitterWindow_GetWindow1 3445
+#define wxSplitterWindow_GetWindow2 3446
+#define wxSplitterWindow_Initialize 3447
+#define wxSplitterWindow_IsSplit 3448
+#define wxSplitterWindow_ReplaceWindow 3449
+#define wxSplitterWindow_SetSashGravity 3450
+#define wxSplitterWindow_SetSashPosition 3451
+#define wxSplitterWindow_SetSashSize 3452
+#define wxSplitterWindow_SetMinimumPaneSize 3453
+#define wxSplitterWindow_SetSplitMode 3454
+#define wxSplitterWindow_SplitHorizontally 3455
+#define wxSplitterWindow_SplitVertically 3456
+#define wxSplitterWindow_Unsplit 3457
+#define wxSplitterWindow_UpdateSize 3458
+#define wxSplitterEvent_GetSashPosition 3459
+#define wxSplitterEvent_GetX 3460
+#define wxSplitterEvent_GetY 3461
+#define wxSplitterEvent_GetWindowBeingRemoved 3462
+#define wxSplitterEvent_SetSashPosition 3463
+#define wxHtmlWindow_new_0 3464
+#define wxHtmlWindow_new_2 3465
+#define wxHtmlWindow_AppendToPage 3466
+#define wxHtmlWindow_GetOpenedAnchor 3467
+#define wxHtmlWindow_GetOpenedPage 3468
+#define wxHtmlWindow_GetOpenedPageTitle 3469
+#define wxHtmlWindow_GetRelatedFrame 3470
+#define wxHtmlWindow_HistoryBack 3471
+#define wxHtmlWindow_HistoryCanBack 3472
+#define wxHtmlWindow_HistoryCanForward 3473
+#define wxHtmlWindow_HistoryClear 3474
+#define wxHtmlWindow_HistoryForward 3475
+#define wxHtmlWindow_LoadFile 3476
+#define wxHtmlWindow_LoadPage 3477
+#define wxHtmlWindow_SelectAll 3478
+#define wxHtmlWindow_SelectionToText 3479
+#define wxHtmlWindow_SelectLine 3480
+#define wxHtmlWindow_SelectWord 3481
+#define wxHtmlWindow_SetBorders 3482
+#define wxHtmlWindow_SetFonts 3483
+#define wxHtmlWindow_SetPage 3484
+#define wxHtmlWindow_SetRelatedFrame 3485
+#define wxHtmlWindow_SetRelatedStatusBar 3486
+#define wxHtmlWindow_ToText 3487
+#define wxHtmlWindow_destroy 3488
+#define wxHtmlLinkEvent_GetLinkInfo 3489
+#define wxSystemSettings_GetColour 3490
+#define wxSystemSettings_GetFont 3491
+#define wxSystemSettings_GetMetric 3492
+#define wxSystemSettings_GetScreenType 3493
+#define wxSystemOptions_GetOption 3494
+#define wxSystemOptions_GetOptionInt 3495
+#define wxSystemOptions_HasOption 3496
+#define wxSystemOptions_IsFalse 3497
+#define wxSystemOptions_SetOption_2_1 3498
+#define wxSystemOptions_SetOption_2_0 3499
+#define wxAuiNotebookEvent_SetSelection 3500
+#define wxAuiNotebookEvent_GetSelection 3501
+#define wxAuiNotebookEvent_SetOldSelection 3502
+#define wxAuiNotebookEvent_GetOldSelection 3503
+#define wxAuiNotebookEvent_SetDragSource 3504
+#define wxAuiNotebookEvent_GetDragSource 3505
+#define wxAuiManagerEvent_SetManager 3506
+#define wxAuiManagerEvent_GetManager 3507
+#define wxAuiManagerEvent_SetPane 3508
+#define wxAuiManagerEvent_GetPane 3509
+#define wxAuiManagerEvent_SetButton 3510
+#define wxAuiManagerEvent_GetButton 3511
+#define wxAuiManagerEvent_SetDC 3512
+#define wxAuiManagerEvent_GetDC 3513
+#define wxAuiManagerEvent_Veto 3514
+#define wxAuiManagerEvent_GetVeto 3515
+#define wxAuiManagerEvent_SetCanVeto 3516
+#define wxAuiManagerEvent_CanVeto 3517
+#define wxLogNull_new 3518
+#define wxLogNull_destroy 3519
+#define wxTaskBarIcon_new 3520
+#define wxTaskBarIcon_destruct 3521
+#define wxTaskBarIcon_PopupMenu 3522
+#define wxTaskBarIcon_RemoveIcon 3523
+#define wxTaskBarIcon_SetIcon 3524
diff --git a/lib/wx/c_src/wxe_return.cpp b/lib/wx/c_src/wxe_return.cpp
index 9fd627829e..0f3eb40efc 100644
--- a/lib/wx/c_src/wxe_return.cpp
+++ b/lib/wx/c_src/wxe_return.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2010. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -220,6 +220,16 @@ void wxeReturn::add(wxArrayInt val) {
endList(len);
}
+INLINE
+void wxeReturn::add(wxArrayDouble val) {
+ unsigned int len = val.GetCount();
+
+ for (unsigned int i = 0; i< len; i++) {
+ addFloat(val[i]);
+ }
+ endList(len);
+}
+
INLINE
void wxeReturn::add(wxUIntPtr *val) {
add(ERL_DRV_UINT, (ErlDrvTermData) val);
diff --git a/lib/wx/c_src/wxe_return.h b/lib/wx/c_src/wxe_return.h
index 0daf12eab2..b6bfa85e63 100644
--- a/lib/wx/c_src/wxe_return.h
+++ b/lib/wx/c_src/wxe_return.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2009. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -108,6 +108,8 @@ public:
void add(wxArrayInt val);
+ void add(wxArrayDouble val);
+
void add(wxUIntPtr *val);
void add(const wxHtmlLinkInfo *val);
diff --git a/lib/wx/doc/src/Makefile b/lib/wx/doc/src/Makefile
index 03e9f1e1bb..834f887076 100644
--- a/lib/wx/doc/src/Makefile
+++ b/lib/wx/doc/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2010. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -33,40 +33,7 @@ GenMods = $(shell ls ../../src/gen | grep 'wx[A-Z].*\.erl') \
ModsNoExt = $(ErlMods:%.erl=%) $(GenMods:%.erl=%)
-ifneq ($(INSIDE_ERLSRC),true)
-# ----------------------------------------------------
-# Standalone release
-# ----------------------------------------------------
-Mods = $(ErlMods:%=../../src/%) $(GenMods:%=../../src/gen/%)
-HTML_FILES = $(ErlMods:%.erl=../html/%.html) $(GenMods:%.erl=../html/%.html)
-
-GIF_FILES = ../html/erlang.png
-EXTRA_FILES = ../html/index.html \
- ../html/modules-frame.html \
- ../html/overview-summary.html \
- ../html/packages-frame.html
-
-HTML_STYLESHEET_FILES = ../html/stylesheet.css
-
-html: ../html/edoc-info
-
-docs: ../html/edoc-info
-
-../html/edoc-info: $(Mods)
- @echo "Building documentation."
- -mkdir -p ../html
- erl -noshell -pa doc -run edoc_run application "wx" '"../.."' '[{private,true},no_packages,{dir,"../html"}, {sort_functions,false}]'
-
-clean:
- rm -f *~
- (cd ../html; rm -f *.html *.css erlang.png edoc-info)
-
-opt debug:
-else
# Release directory specification
-# ----------------------------------------------------
-# Inside the erlang src
-# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
XML_REF3_FILES = $(ErlMods:%.erl=%.xml) $(GenMods:%.erl=%.xml)
@@ -96,10 +63,10 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
# ----------------------------------------------------
-# FLAGS
+# FLAGS
# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
+XML_FLAGS +=
+DVIPS_FLAGS +=
# ----------------------------------------------------
# Targets
@@ -117,30 +84,30 @@ man: $(MAN3_FILES)
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-xml: $(XML_REF3_FILES) $(XML_CHAPTER_FILES)
+xml: $(XML_REF3_FILES) $(XML_CHAPTER_FILES)
-ref_man.xml: ref_man.xml.src
+ref_man.xml: ref_man.xml.src
@echo Preparing ref_man.xml
@cat ref_man.xml.src > ref_man.xml
@for d in $(ModsNoExt); do \
echo " <xi:include href=\"$$d.xml\"/>" >> ref_man.xml ; \
done
@echo "</application>" >> ref_man.xml
- @echo
+ @echo
$(ErlMods:%.erl=%.xml):
- escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -sort_functions false ../../src/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -preprocess true -sort_functions false ../../src/$(@:%.xml=%.erl)
$(GenMods:%.erl=%.xml):
- escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -sort_functions false ../../src/gen/$(@:%.xml=%.erl)
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -i ../../src -preprocess true -sort_functions false ../../src/gen/$(@:%.xml=%.erl)
$(XML_CHAPTER_FILES):
- escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -chapter ../overview.edoc
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -chapter ../overview.edoc
-debug opt:
+debug opt:
clean clean_docs:
- rm -rf $(HTMLDIR)/*
+ rm -rf $(HTMLDIR)/*
rm -f $(MAN3DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
rm -f errs core *~ ../html/edoc-info
@@ -148,7 +115,7 @@ clean clean_docs:
# ----------------------------------------------------
# Release Target
-# ----------------------------------------------------
+# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
@@ -162,8 +129,6 @@ release_docs_spec: docs
$(INSTALL_DIR) $(RELEASE_PATH)/man/man3
$(INSTALL_DATA) $(MAN3_FILES) $(RELEASE_PATH)/man/man3
-release_spec:
+release_spec:
release_tests_spec:
-
-endif
diff --git a/lib/wx/examples/Makefile b/lib/wx/examples/Makefile
index ae0ed687eb..48fccc88f7 100644
--- a/lib/wx/examples/Makefile
+++ b/lib/wx/examples/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -22,24 +22,8 @@ include ../config.mk
SUBDIRS = demo sudoku simple xrc
-ifeq ($(INSIDE_ERLSRC),true)
SUB_DIRECTORIES=$(SUBDIRS)
# ----------------------------------------------------
# Default Subdir Targets
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_subdir.mk
-
-else
-# standalone build
-opt debug clean:
- @for d in $(SUBDIRS); do \
- if test ! -d $$d ; then \
- echo "=== Skipping subdir $$d" ; \
- else \
- (cd $$d && $(MAKE) $@) ; \
- fi ; \
- done
-
-docs:
-
-endif
diff --git a/lib/wx/examples/demo/Makefile b/lib/wx/examples/demo/Makefile
index 3f054ec75f..872723fb98 100644
--- a/lib/wx/examples/demo/Makefile
+++ b/lib/wx/examples/demo/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -52,7 +52,7 @@ TESTMODS = \
ex_static \
ex_textCtrl \
ex_treeCtrl \
- ex_graphicsContext
+ ex_graphicsContext
TESTTARGETS = $(TESTMODS:%=%.beam)
@@ -64,21 +64,15 @@ clean:
rm -f $(TESTTARGETS)
rm -f *~ core erl_crash.dump
-docs:
+docs:
run: opt
- erl -smp -detached -pa $(TOPDIR)/ebin -s demo
-
-ifneq ($(INSIDE_ERLSRC),true)
+ erl -smp -detached -pa $(TOPDIR)/ebin -s demo
-%.beam: %.erl
- $(ERLC) -W -I$(ERLINC) -bbeam -o$(BIN) $<
-
-else
EXRELSYSDIR = $(RELSYSDIR)/examples/demo
include $(ERL_TOP)/make/otp_release_targets.mk
-docs:
+docs:
release_spec: opt
$(INSTALL_DIR) $(EXRELSYSDIR)
@@ -89,8 +83,3 @@ release_spec: opt
release_tests_spec:
release_docs_spec:
-
-endif
-
-
-
diff --git a/lib/wx/examples/simple/Makefile b/lib/wx/examples/simple/Makefile
index 295e739202..0178aea890 100644
--- a/lib/wx/examples/simple/Makefile
+++ b/lib/wx/examples/simple/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -35,21 +35,15 @@ clean:
rm -f $(TESTTARGETS)
rm -f *~ core erl_crash.dump
-docs:
+docs:
run: opt
- erl -smp -detached -pa $(TOPDIR)/ebin -s hello
-
-ifneq ($(INSIDE_ERLSRC),true)
+ erl -smp -detached -pa $(TOPDIR)/ebin -s hello
-%.beam: %.erl
- $(ERLC) -W -I$(ERLINC) -bbeam -o$(BIN) $<
-
-else
EXRELSYSDIR = $(RELSYSDIR)/examples/simple
include $(ERL_TOP)/make/otp_release_targets.mk
-docs:
+docs:
release_spec: opt
$(INSTALL_DIR) $(EXRELSYSDIR)
@@ -59,7 +53,3 @@ release_spec: opt
release_tests_spec:
release_docs_spec:
-
-endif
-
-
diff --git a/lib/wx/examples/sudoku/Makefile b/lib/wx/examples/sudoku/Makefile
index a7cbf85e03..89919ff50c 100644
--- a/lib/wx/examples/sudoku/Makefile
+++ b/lib/wx/examples/sudoku/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -25,7 +25,7 @@ SRC = .
BIN = .
ERLINC = $(TOPDIR)/include
ERLC = erlc
-TESTMODS = sudoku sudoku_board sudoku_game sudoku_gui
+TESTMODS = sudoku sudoku_board sudoku_game sudoku_gui
TESTTARGETS = $(TESTMODS:%=%.beam)
TESTSRC = $(TESTMODS:%=%.erl)
@@ -35,21 +35,15 @@ clean:
rm -f $(TESTTARGETS)
rm -f *~ core erl_crash.dump
-docs:
+docs:
run: opt
- erl -smp -detached -pa $(TOPDIR)/ebin -s sudoku
-
-ifneq ($(INSIDE_ERLSRC),true)
+ erl -smp -detached -pa $(TOPDIR)/ebin -s sudoku
-%.beam: %.erl
- $(ERLC) -W -I$(ERLINC) -bbeam -o$(BIN) $<
-
-else
EXRELSYSDIR = $(RELSYSDIR)/examples/sudoku
include $(ERL_TOP)/make/otp_release_targets.mk
-docs:
+docs:
release_spec: opt
$(INSTALL_DIR) $(EXRELSYSDIR)
@@ -59,8 +53,3 @@ release_spec: opt
release_tests_spec:
release_docs_spec:
-
-endif
-
-
-
diff --git a/lib/wx/examples/xrc/Makefile b/lib/wx/examples/xrc/Makefile
index 79d86ac1b9..341fdbb2cc 100644
--- a/lib/wx/examples/xrc/Makefile
+++ b/lib/wx/examples/xrc/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
+# Copyright Ericsson AB 2009-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -49,12 +49,6 @@ docs:
run: opt
erl -smp -detached -pa $(TOPDIR)/ebin -s xrc
-ifneq ($(INSIDE_ERLSRC),true)
-
-%.beam: %.erl
- $(ERLC) -W -I$(ERLINC) -bbeam -o$(BIN) $<
-
-else
EXRELSYSDIR = $(RELSYSDIR)/examples/xrc
include $(ERL_TOP)/make/otp_release_targets.mk
@@ -71,7 +65,5 @@ release_tests_spec:
release_docs_spec:
-endif
-
diff --git a/lib/wx/include/gl.hrl b/lib/wx/include/gl.hrl
index 54eb551285..9004a8aa31 100644
--- a/lib/wx/include/gl.hrl
+++ b/lib/wx/include/gl.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,16 +37,16 @@
-define(GL_3_BYTES, 16#1408).
-define(GL_4_BYTES, 16#1409).
-define(GL_DOUBLE, 16#140A).
--define(GL_POINTS, 16#0).
--define(GL_LINES, 16#1).
--define(GL_LINE_LOOP, 16#2).
--define(GL_LINE_STRIP, 16#3).
--define(GL_TRIANGLES, 16#4).
--define(GL_TRIANGLE_STRIP, 16#5).
--define(GL_TRIANGLE_FAN, 16#6).
--define(GL_QUADS, 16#7).
--define(GL_QUAD_STRIP, 16#8).
--define(GL_POLYGON, 16#9).
+-define(GL_POINTS, 16#0000).
+-define(GL_LINES, 16#0001).
+-define(GL_LINE_LOOP, 16#0002).
+-define(GL_LINE_STRIP, 16#0003).
+-define(GL_TRIANGLES, 16#0004).
+-define(GL_TRIANGLE_STRIP, 16#0005).
+-define(GL_TRIANGLE_FAN, 16#0006).
+-define(GL_QUADS, 16#0007).
+-define(GL_QUAD_STRIP, 16#0008).
+-define(GL_POLYGON, 16#0009).
-define(GL_VERTEX_ARRAY, 16#8074).
-define(GL_NORMAL_ARRAY, 16#8075).
-define(GL_COLOR_ARRAY, 16#8076).
@@ -87,35 +87,35 @@
-define(GL_T2F_N3F_V3F, 16#2A2B).
-define(GL_T2F_C4F_N3F_V3F, 16#2A2C).
-define(GL_T4F_C4F_N3F_V4F, 16#2A2D).
--define(GL_MATRIX_MODE, 16#BA0).
+-define(GL_MATRIX_MODE, 16#0BA0).
-define(GL_MODELVIEW, 16#1700).
-define(GL_PROJECTION, 16#1701).
-define(GL_TEXTURE, 16#1702).
--define(GL_POINT_SMOOTH, 16#B10).
--define(GL_POINT_SIZE, 16#B11).
--define(GL_POINT_SIZE_GRANULARITY, 16#B13).
--define(GL_POINT_SIZE_RANGE, 16#B12).
--define(GL_LINE_SMOOTH, 16#B20).
--define(GL_LINE_STIPPLE, 16#B24).
--define(GL_LINE_STIPPLE_PATTERN, 16#B25).
--define(GL_LINE_STIPPLE_REPEAT, 16#B26).
--define(GL_LINE_WIDTH, 16#B21).
--define(GL_LINE_WIDTH_GRANULARITY, 16#B23).
--define(GL_LINE_WIDTH_RANGE, 16#B22).
+-define(GL_POINT_SMOOTH, 16#0B10).
+-define(GL_POINT_SIZE, 16#0B11).
+-define(GL_POINT_SIZE_GRANULARITY, 16#0B13).
+-define(GL_POINT_SIZE_RANGE, 16#0B12).
+-define(GL_LINE_SMOOTH, 16#0B20).
+-define(GL_LINE_STIPPLE, 16#0B24).
+-define(GL_LINE_STIPPLE_PATTERN, 16#0B25).
+-define(GL_LINE_STIPPLE_REPEAT, 16#0B26).
+-define(GL_LINE_WIDTH, 16#0B21).
+-define(GL_LINE_WIDTH_GRANULARITY, 16#0B23).
+-define(GL_LINE_WIDTH_RANGE, 16#0B22).
-define(GL_POINT, 16#1B00).
-define(GL_LINE, 16#1B01).
-define(GL_FILL, 16#1B02).
--define(GL_CW, 16#900).
--define(GL_CCW, 16#901).
--define(GL_FRONT, 16#404).
--define(GL_BACK, 16#405).
--define(GL_POLYGON_MODE, 16#B40).
--define(GL_POLYGON_SMOOTH, 16#B41).
--define(GL_POLYGON_STIPPLE, 16#B42).
--define(GL_EDGE_FLAG, 16#B43).
--define(GL_CULL_FACE, 16#B44).
--define(GL_CULL_FACE_MODE, 16#B45).
--define(GL_FRONT_FACE, 16#B46).
+-define(GL_CW, 16#0900).
+-define(GL_CCW, 16#0901).
+-define(GL_FRONT, 16#0404).
+-define(GL_BACK, 16#0405).
+-define(GL_POLYGON_MODE, 16#0B40).
+-define(GL_POLYGON_SMOOTH, 16#0B41).
+-define(GL_POLYGON_STIPPLE, 16#0B42).
+-define(GL_EDGE_FLAG, 16#0B43).
+-define(GL_CULL_FACE, 16#0B44).
+-define(GL_CULL_FACE_MODE, 16#0B45).
+-define(GL_FRONT_FACE, 16#0B46).
-define(GL_POLYGON_OFFSET_FACTOR, 16#8038).
-define(GL_POLYGON_OFFSET_UNITS, 16#2A00).
-define(GL_POLYGON_OFFSET_POINT, 16#2A01).
@@ -123,25 +123,25 @@
-define(GL_POLYGON_OFFSET_FILL, 16#8037).
-define(GL_COMPILE, 16#1300).
-define(GL_COMPILE_AND_EXECUTE, 16#1301).
--define(GL_LIST_BASE, 16#B32).
--define(GL_LIST_INDEX, 16#B33).
--define(GL_LIST_MODE, 16#B30).
--define(GL_NEVER, 16#200).
--define(GL_LESS, 16#201).
--define(GL_EQUAL, 16#202).
--define(GL_LEQUAL, 16#203).
--define(GL_GREATER, 16#204).
--define(GL_NOTEQUAL, 16#205).
--define(GL_GEQUAL, 16#206).
--define(GL_ALWAYS, 16#207).
--define(GL_DEPTH_TEST, 16#B71).
--define(GL_DEPTH_BITS, 16#D56).
--define(GL_DEPTH_CLEAR_VALUE, 16#B73).
--define(GL_DEPTH_FUNC, 16#B74).
--define(GL_DEPTH_RANGE, 16#B70).
--define(GL_DEPTH_WRITEMASK, 16#B72).
+-define(GL_LIST_BASE, 16#0B32).
+-define(GL_LIST_INDEX, 16#0B33).
+-define(GL_LIST_MODE, 16#0B30).
+-define(GL_NEVER, 16#0200).
+-define(GL_LESS, 16#0201).
+-define(GL_EQUAL, 16#0202).
+-define(GL_LEQUAL, 16#0203).
+-define(GL_GREATER, 16#0204).
+-define(GL_NOTEQUAL, 16#0205).
+-define(GL_GEQUAL, 16#0206).
+-define(GL_ALWAYS, 16#0207).
+-define(GL_DEPTH_TEST, 16#0B71).
+-define(GL_DEPTH_BITS, 16#0D56).
+-define(GL_DEPTH_CLEAR_VALUE, 16#0B73).
+-define(GL_DEPTH_FUNC, 16#0B74).
+-define(GL_DEPTH_RANGE, 16#0B70).
+-define(GL_DEPTH_WRITEMASK, 16#0B72).
-define(GL_DEPTH_COMPONENT, 16#1902).
--define(GL_LIGHTING, 16#B50).
+-define(GL_LIGHTING, 16#0B50).
-define(GL_LIGHT0, 16#4000).
-define(GL_LIGHT1, 16#4001).
-define(GL_LIGHT2, 16#4002).
@@ -164,85 +164,85 @@
-define(GL_SPOT_DIRECTION, 16#1204).
-define(GL_AMBIENT_AND_DIFFUSE, 16#1602).
-define(GL_COLOR_INDEXES, 16#1603).
--define(GL_LIGHT_MODEL_TWO_SIDE, 16#B52).
--define(GL_LIGHT_MODEL_LOCAL_VIEWER, 16#B51).
--define(GL_LIGHT_MODEL_AMBIENT, 16#B53).
--define(GL_FRONT_AND_BACK, 16#408).
--define(GL_SHADE_MODEL, 16#B54).
+-define(GL_LIGHT_MODEL_TWO_SIDE, 16#0B52).
+-define(GL_LIGHT_MODEL_LOCAL_VIEWER, 16#0B51).
+-define(GL_LIGHT_MODEL_AMBIENT, 16#0B53).
+-define(GL_FRONT_AND_BACK, 16#0408).
+-define(GL_SHADE_MODEL, 16#0B54).
-define(GL_FLAT, 16#1D00).
-define(GL_SMOOTH, 16#1D01).
--define(GL_COLOR_MATERIAL, 16#B57).
--define(GL_COLOR_MATERIAL_FACE, 16#B55).
--define(GL_COLOR_MATERIAL_PARAMETER, 16#B56).
--define(GL_NORMALIZE, 16#BA1).
+-define(GL_COLOR_MATERIAL, 16#0B57).
+-define(GL_COLOR_MATERIAL_FACE, 16#0B55).
+-define(GL_COLOR_MATERIAL_PARAMETER, 16#0B56).
+-define(GL_NORMALIZE, 16#0BA1).
-define(GL_CLIP_PLANE0, 16#3000).
-define(GL_CLIP_PLANE1, 16#3001).
-define(GL_CLIP_PLANE2, 16#3002).
-define(GL_CLIP_PLANE3, 16#3003).
-define(GL_CLIP_PLANE4, 16#3004).
-define(GL_CLIP_PLANE5, 16#3005).
--define(GL_ACCUM_RED_BITS, 16#D58).
--define(GL_ACCUM_GREEN_BITS, 16#D59).
--define(GL_ACCUM_BLUE_BITS, 16#D5A).
--define(GL_ACCUM_ALPHA_BITS, 16#D5B).
--define(GL_ACCUM_CLEAR_VALUE, 16#B80).
--define(GL_ACCUM, 16#100).
--define(GL_ADD, 16#104).
--define(GL_LOAD, 16#101).
--define(GL_MULT, 16#103).
--define(GL_RETURN, 16#102).
--define(GL_ALPHA_TEST, 16#BC0).
--define(GL_ALPHA_TEST_REF, 16#BC2).
--define(GL_ALPHA_TEST_FUNC, 16#BC1).
--define(GL_BLEND, 16#BE2).
--define(GL_BLEND_SRC, 16#BE1).
--define(GL_BLEND_DST, 16#BE0).
+-define(GL_ACCUM_RED_BITS, 16#0D58).
+-define(GL_ACCUM_GREEN_BITS, 16#0D59).
+-define(GL_ACCUM_BLUE_BITS, 16#0D5A).
+-define(GL_ACCUM_ALPHA_BITS, 16#0D5B).
+-define(GL_ACCUM_CLEAR_VALUE, 16#0B80).
+-define(GL_ACCUM, 16#0100).
+-define(GL_ADD, 16#0104).
+-define(GL_LOAD, 16#0101).
+-define(GL_MULT, 16#0103).
+-define(GL_RETURN, 16#0102).
+-define(GL_ALPHA_TEST, 16#0BC0).
+-define(GL_ALPHA_TEST_REF, 16#0BC2).
+-define(GL_ALPHA_TEST_FUNC, 16#0BC1).
+-define(GL_BLEND, 16#0BE2).
+-define(GL_BLEND_SRC, 16#0BE1).
+-define(GL_BLEND_DST, 16#0BE0).
-define(GL_ZERO, 16#0).
-define(GL_ONE, 16#1).
--define(GL_SRC_COLOR, 16#300).
--define(GL_ONE_MINUS_SRC_COLOR, 16#301).
--define(GL_SRC_ALPHA, 16#302).
--define(GL_ONE_MINUS_SRC_ALPHA, 16#303).
--define(GL_DST_ALPHA, 16#304).
--define(GL_ONE_MINUS_DST_ALPHA, 16#305).
--define(GL_DST_COLOR, 16#306).
--define(GL_ONE_MINUS_DST_COLOR, 16#307).
--define(GL_SRC_ALPHA_SATURATE, 16#308).
+-define(GL_SRC_COLOR, 16#0300).
+-define(GL_ONE_MINUS_SRC_COLOR, 16#0301).
+-define(GL_SRC_ALPHA, 16#0302).
+-define(GL_ONE_MINUS_SRC_ALPHA, 16#0303).
+-define(GL_DST_ALPHA, 16#0304).
+-define(GL_ONE_MINUS_DST_ALPHA, 16#0305).
+-define(GL_DST_COLOR, 16#0306).
+-define(GL_ONE_MINUS_DST_COLOR, 16#0307).
+-define(GL_SRC_ALPHA_SATURATE, 16#0308).
-define(GL_FEEDBACK, 16#1C01).
-define(GL_RENDER, 16#1C00).
-define(GL_SELECT, 16#1C02).
--define(GL_2D, 16#600).
--define(GL_3D, 16#601).
--define(GL_3D_COLOR, 16#602).
--define(GL_3D_COLOR_TEXTURE, 16#603).
--define(GL_4D_COLOR_TEXTURE, 16#604).
--define(GL_POINT_TOKEN, 16#701).
--define(GL_LINE_TOKEN, 16#702).
--define(GL_LINE_RESET_TOKEN, 16#707).
--define(GL_POLYGON_TOKEN, 16#703).
--define(GL_BITMAP_TOKEN, 16#704).
--define(GL_DRAW_PIXEL_TOKEN, 16#705).
--define(GL_COPY_PIXEL_TOKEN, 16#706).
--define(GL_PASS_THROUGH_TOKEN, 16#700).
--define(GL_FEEDBACK_BUFFER_POINTER, 16#DF0).
--define(GL_FEEDBACK_BUFFER_SIZE, 16#DF1).
--define(GL_FEEDBACK_BUFFER_TYPE, 16#DF2).
--define(GL_SELECTION_BUFFER_POINTER, 16#DF3).
--define(GL_SELECTION_BUFFER_SIZE, 16#DF4).
--define(GL_FOG, 16#B60).
--define(GL_FOG_MODE, 16#B65).
--define(GL_FOG_DENSITY, 16#B62).
--define(GL_FOG_COLOR, 16#B66).
--define(GL_FOG_INDEX, 16#B61).
--define(GL_FOG_START, 16#B63).
--define(GL_FOG_END, 16#B64).
+-define(GL_2D, 16#0600).
+-define(GL_3D, 16#0601).
+-define(GL_3D_COLOR, 16#0602).
+-define(GL_3D_COLOR_TEXTURE, 16#0603).
+-define(GL_4D_COLOR_TEXTURE, 16#0604).
+-define(GL_POINT_TOKEN, 16#0701).
+-define(GL_LINE_TOKEN, 16#0702).
+-define(GL_LINE_RESET_TOKEN, 16#0707).
+-define(GL_POLYGON_TOKEN, 16#0703).
+-define(GL_BITMAP_TOKEN, 16#0704).
+-define(GL_DRAW_PIXEL_TOKEN, 16#0705).
+-define(GL_COPY_PIXEL_TOKEN, 16#0706).
+-define(GL_PASS_THROUGH_TOKEN, 16#0700).
+-define(GL_FEEDBACK_BUFFER_POINTER, 16#0DF0).
+-define(GL_FEEDBACK_BUFFER_SIZE, 16#0DF1).
+-define(GL_FEEDBACK_BUFFER_TYPE, 16#0DF2).
+-define(GL_SELECTION_BUFFER_POINTER, 16#0DF3).
+-define(GL_SELECTION_BUFFER_SIZE, 16#0DF4).
+-define(GL_FOG, 16#0B60).
+-define(GL_FOG_MODE, 16#0B65).
+-define(GL_FOG_DENSITY, 16#0B62).
+-define(GL_FOG_COLOR, 16#0B66).
+-define(GL_FOG_INDEX, 16#0B61).
+-define(GL_FOG_START, 16#0B63).
+-define(GL_FOG_END, 16#0B64).
-define(GL_LINEAR, 16#2601).
--define(GL_EXP, 16#800).
--define(GL_EXP2, 16#801).
--define(GL_LOGIC_OP, 16#BF1).
--define(GL_INDEX_LOGIC_OP, 16#BF1).
--define(GL_COLOR_LOGIC_OP, 16#BF2).
--define(GL_LOGIC_OP_MODE, 16#BF0).
+-define(GL_EXP, 16#0800).
+-define(GL_EXP2, 16#0801).
+-define(GL_LOGIC_OP, 16#0BF1).
+-define(GL_INDEX_LOGIC_OP, 16#0BF1).
+-define(GL_COLOR_LOGIC_OP, 16#0BF2).
+-define(GL_LOGIC_OP_MODE, 16#0BF0).
-define(GL_CLEAR, 16#1500).
-define(GL_SET, 16#150F).
-define(GL_COPY, 16#1503).
@@ -259,32 +259,32 @@
-define(GL_AND_INVERTED, 16#1504).
-define(GL_OR_REVERSE, 16#150B).
-define(GL_OR_INVERTED, 16#150D).
--define(GL_STENCIL_BITS, 16#D57).
--define(GL_STENCIL_TEST, 16#B90).
--define(GL_STENCIL_CLEAR_VALUE, 16#B91).
--define(GL_STENCIL_FUNC, 16#B92).
--define(GL_STENCIL_VALUE_MASK, 16#B93).
--define(GL_STENCIL_FAIL, 16#B94).
--define(GL_STENCIL_PASS_DEPTH_FAIL, 16#B95).
--define(GL_STENCIL_PASS_DEPTH_PASS, 16#B96).
--define(GL_STENCIL_REF, 16#B97).
--define(GL_STENCIL_WRITEMASK, 16#B98).
+-define(GL_STENCIL_BITS, 16#0D57).
+-define(GL_STENCIL_TEST, 16#0B90).
+-define(GL_STENCIL_CLEAR_VALUE, 16#0B91).
+-define(GL_STENCIL_FUNC, 16#0B92).
+-define(GL_STENCIL_VALUE_MASK, 16#0B93).
+-define(GL_STENCIL_FAIL, 16#0B94).
+-define(GL_STENCIL_PASS_DEPTH_FAIL, 16#0B95).
+-define(GL_STENCIL_PASS_DEPTH_PASS, 16#0B96).
+-define(GL_STENCIL_REF, 16#0B97).
+-define(GL_STENCIL_WRITEMASK, 16#0B98).
-define(GL_STENCIL_INDEX, 16#1901).
-define(GL_KEEP, 16#1E00).
-define(GL_REPLACE, 16#1E01).
-define(GL_INCR, 16#1E02).
-define(GL_DECR, 16#1E03).
-define(GL_NONE, 16#0).
--define(GL_LEFT, 16#406).
--define(GL_RIGHT, 16#407).
--define(GL_FRONT_LEFT, 16#400).
--define(GL_FRONT_RIGHT, 16#401).
--define(GL_BACK_LEFT, 16#402).
--define(GL_BACK_RIGHT, 16#403).
--define(GL_AUX0, 16#409).
--define(GL_AUX1, 16#40A).
--define(GL_AUX2, 16#40B).
--define(GL_AUX3, 16#40C).
+-define(GL_LEFT, 16#0406).
+-define(GL_RIGHT, 16#0407).
+-define(GL_FRONT_LEFT, 16#0400).
+-define(GL_FRONT_RIGHT, 16#0401).
+-define(GL_BACK_LEFT, 16#0402).
+-define(GL_BACK_RIGHT, 16#0403).
+-define(GL_AUX0, 16#0409).
+-define(GL_AUX1, 16#040A).
+-define(GL_AUX2, 16#040B).
+-define(GL_AUX3, 16#040C).
-define(GL_COLOR_INDEX, 16#1900).
-define(GL_RED, 16#1903).
-define(GL_GREEN, 16#1904).
@@ -292,159 +292,161 @@
-define(GL_ALPHA, 16#1906).
-define(GL_LUMINANCE, 16#1909).
-define(GL_LUMINANCE_ALPHA, 16#190A).
--define(GL_ALPHA_BITS, 16#D55).
--define(GL_RED_BITS, 16#D52).
--define(GL_GREEN_BITS, 16#D53).
--define(GL_BLUE_BITS, 16#D54).
--define(GL_INDEX_BITS, 16#D51).
--define(GL_SUBPIXEL_BITS, 16#D50).
--define(GL_AUX_BUFFERS, 16#C00).
--define(GL_READ_BUFFER, 16#C02).
--define(GL_DRAW_BUFFER, 16#C01).
--define(GL_DOUBLEBUFFER, 16#C32).
--define(GL_STEREO, 16#C33).
+-define(GL_ALPHA_BITS, 16#0D55).
+-define(GL_RED_BITS, 16#0D52).
+-define(GL_GREEN_BITS, 16#0D53).
+-define(GL_BLUE_BITS, 16#0D54).
+-define(GL_INDEX_BITS, 16#0D51).
+-define(GL_SUBPIXEL_BITS, 16#0D50).
+-define(GL_AUX_BUFFERS, 16#0C00).
+-define(GL_READ_BUFFER, 16#0C02).
+-define(GL_DRAW_BUFFER, 16#0C01).
+-define(GL_DOUBLEBUFFER, 16#0C32).
+-define(GL_STEREO, 16#0C33).
-define(GL_BITMAP, 16#1A00).
-define(GL_COLOR, 16#1800).
-define(GL_DEPTH, 16#1801).
-define(GL_STENCIL, 16#1802).
--define(GL_DITHER, 16#BD0).
+-define(GL_DITHER, 16#0BD0).
-define(GL_RGB, 16#1907).
-define(GL_RGBA, 16#1908).
--define(GL_MAX_LIST_NESTING, 16#B31).
--define(GL_MAX_EVAL_ORDER, 16#D30).
--define(GL_MAX_LIGHTS, 16#D31).
--define(GL_MAX_CLIP_PLANES, 16#D32).
--define(GL_MAX_TEXTURE_SIZE, 16#D33).
--define(GL_MAX_PIXEL_MAP_TABLE, 16#D34).
--define(GL_MAX_ATTRIB_STACK_DEPTH, 16#D35).
--define(GL_MAX_MODELVIEW_STACK_DEPTH, 16#D36).
--define(GL_MAX_NAME_STACK_DEPTH, 16#D37).
--define(GL_MAX_PROJECTION_STACK_DEPTH, 16#D38).
--define(GL_MAX_TEXTURE_STACK_DEPTH, 16#D39).
--define(GL_MAX_VIEWPORT_DIMS, 16#D3A).
--define(GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, 16#D3B).
--define(GL_ATTRIB_STACK_DEPTH, 16#BB0).
--define(GL_CLIENT_ATTRIB_STACK_DEPTH, 16#BB1).
--define(GL_COLOR_CLEAR_VALUE, 16#C22).
--define(GL_COLOR_WRITEMASK, 16#C23).
--define(GL_CURRENT_INDEX, 16#B01).
--define(GL_CURRENT_COLOR, 16#B00).
--define(GL_CURRENT_NORMAL, 16#B02).
--define(GL_CURRENT_RASTER_COLOR, 16#B04).
--define(GL_CURRENT_RASTER_DISTANCE, 16#B09).
--define(GL_CURRENT_RASTER_INDEX, 16#B05).
--define(GL_CURRENT_RASTER_POSITION, 16#B07).
--define(GL_CURRENT_RASTER_TEXTURE_COORDS, 16#B06).
--define(GL_CURRENT_RASTER_POSITION_VALID, 16#B08).
--define(GL_CURRENT_TEXTURE_COORDS, 16#B03).
--define(GL_INDEX_CLEAR_VALUE, 16#C20).
--define(GL_INDEX_MODE, 16#C30).
--define(GL_INDEX_WRITEMASK, 16#C21).
--define(GL_MODELVIEW_MATRIX, 16#BA6).
--define(GL_MODELVIEW_STACK_DEPTH, 16#BA3).
--define(GL_NAME_STACK_DEPTH, 16#D70).
--define(GL_PROJECTION_MATRIX, 16#BA7).
--define(GL_PROJECTION_STACK_DEPTH, 16#BA4).
--define(GL_RENDER_MODE, 16#C40).
--define(GL_RGBA_MODE, 16#C31).
--define(GL_TEXTURE_MATRIX, 16#BA8).
--define(GL_TEXTURE_STACK_DEPTH, 16#BA5).
--define(GL_VIEWPORT, 16#BA2).
--define(GL_AUTO_NORMAL, 16#D80).
--define(GL_MAP1_COLOR_4, 16#D90).
--define(GL_MAP1_INDEX, 16#D91).
--define(GL_MAP1_NORMAL, 16#D92).
--define(GL_MAP1_TEXTURE_COORD_1, 16#D93).
--define(GL_MAP1_TEXTURE_COORD_2, 16#D94).
--define(GL_MAP1_TEXTURE_COORD_3, 16#D95).
--define(GL_MAP1_TEXTURE_COORD_4, 16#D96).
--define(GL_MAP1_VERTEX_3, 16#D97).
--define(GL_MAP1_VERTEX_4, 16#D98).
--define(GL_MAP2_COLOR_4, 16#DB0).
--define(GL_MAP2_INDEX, 16#DB1).
--define(GL_MAP2_NORMAL, 16#DB2).
--define(GL_MAP2_TEXTURE_COORD_1, 16#DB3).
--define(GL_MAP2_TEXTURE_COORD_2, 16#DB4).
--define(GL_MAP2_TEXTURE_COORD_3, 16#DB5).
--define(GL_MAP2_TEXTURE_COORD_4, 16#DB6).
--define(GL_MAP2_VERTEX_3, 16#DB7).
--define(GL_MAP2_VERTEX_4, 16#DB8).
--define(GL_MAP1_GRID_DOMAIN, 16#DD0).
--define(GL_MAP1_GRID_SEGMENTS, 16#DD1).
--define(GL_MAP2_GRID_DOMAIN, 16#DD2).
--define(GL_MAP2_GRID_SEGMENTS, 16#DD3).
--define(GL_COEFF, 16#A00).
--define(GL_ORDER, 16#A01).
--define(GL_DOMAIN, 16#A02).
--define(GL_PERSPECTIVE_CORRECTION_HINT, 16#C50).
--define(GL_POINT_SMOOTH_HINT, 16#C51).
--define(GL_LINE_SMOOTH_HINT, 16#C52).
--define(GL_POLYGON_SMOOTH_HINT, 16#C53).
--define(GL_FOG_HINT, 16#C54).
+-define(GL_MAX_LIST_NESTING, 16#0B31).
+-define(GL_MAX_EVAL_ORDER, 16#0D30).
+-define(GL_MAX_LIGHTS, 16#0D31).
+-define(GL_MAX_CLIP_PLANES, 16#0D32).
+-define(GL_MAX_TEXTURE_SIZE, 16#0D33).
+-define(GL_MAX_PIXEL_MAP_TABLE, 16#0D34).
+-define(GL_MAX_ATTRIB_STACK_DEPTH, 16#0D35).
+-define(GL_MAX_MODELVIEW_STACK_DEPTH, 16#0D36).
+-define(GL_MAX_NAME_STACK_DEPTH, 16#0D37).
+-define(GL_MAX_PROJECTION_STACK_DEPTH, 16#0D38).
+-define(GL_MAX_TEXTURE_STACK_DEPTH, 16#0D39).
+-define(GL_MAX_VIEWPORT_DIMS, 16#0D3A).
+-define(GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, 16#0D3B).
+-define(GL_ATTRIB_STACK_DEPTH, 16#0BB0).
+-define(GL_CLIENT_ATTRIB_STACK_DEPTH, 16#0BB1).
+-define(GL_COLOR_CLEAR_VALUE, 16#0C22).
+-define(GL_COLOR_WRITEMASK, 16#0C23).
+-define(GL_CURRENT_INDEX, 16#0B01).
+-define(GL_CURRENT_COLOR, 16#0B00).
+-define(GL_CURRENT_NORMAL, 16#0B02).
+-define(GL_CURRENT_RASTER_COLOR, 16#0B04).
+-define(GL_CURRENT_RASTER_DISTANCE, 16#0B09).
+-define(GL_CURRENT_RASTER_INDEX, 16#0B05).
+-define(GL_CURRENT_RASTER_POSITION, 16#0B07).
+-define(GL_CURRENT_RASTER_TEXTURE_COORDS, 16#0B06).
+-define(GL_CURRENT_RASTER_POSITION_VALID, 16#0B08).
+-define(GL_CURRENT_TEXTURE_COORDS, 16#0B03).
+-define(GL_INDEX_CLEAR_VALUE, 16#0C20).
+-define(GL_INDEX_MODE, 16#0C30).
+-define(GL_INDEX_WRITEMASK, 16#0C21).
+-define(GL_MODELVIEW_MATRIX, 16#0BA6).
+-define(GL_MODELVIEW_STACK_DEPTH, 16#0BA3).
+-define(GL_NAME_STACK_DEPTH, 16#0D70).
+-define(GL_PROJECTION_MATRIX, 16#0BA7).
+-define(GL_PROJECTION_STACK_DEPTH, 16#0BA4).
+-define(GL_RENDER_MODE, 16#0C40).
+-define(GL_RGBA_MODE, 16#0C31).
+-define(GL_TEXTURE_MATRIX, 16#0BA8).
+-define(GL_TEXTURE_STACK_DEPTH, 16#0BA5).
+-define(GL_VIEWPORT, 16#0BA2).
+-define(GL_AUTO_NORMAL, 16#0D80).
+-define(GL_MAP1_COLOR_4, 16#0D90).
+-define(GL_MAP1_INDEX, 16#0D91).
+-define(GL_MAP1_NORMAL, 16#0D92).
+-define(GL_MAP1_TEXTURE_COORD_1, 16#0D93).
+-define(GL_MAP1_TEXTURE_COORD_2, 16#0D94).
+-define(GL_MAP1_TEXTURE_COORD_3, 16#0D95).
+-define(GL_MAP1_TEXTURE_COORD_4, 16#0D96).
+-define(GL_MAP1_VERTEX_3, 16#0D97).
+-define(GL_MAP1_VERTEX_4, 16#0D98).
+-define(GL_MAP2_COLOR_4, 16#0DB0).
+-define(GL_MAP2_INDEX, 16#0DB1).
+-define(GL_MAP2_NORMAL, 16#0DB2).
+-define(GL_MAP2_TEXTURE_COORD_1, 16#0DB3).
+-define(GL_MAP2_TEXTURE_COORD_2, 16#0DB4).
+-define(GL_MAP2_TEXTURE_COORD_3, 16#0DB5).
+-define(GL_MAP2_TEXTURE_COORD_4, 16#0DB6).
+-define(GL_MAP2_VERTEX_3, 16#0DB7).
+-define(GL_MAP2_VERTEX_4, 16#0DB8).
+-define(GL_MAP1_GRID_DOMAIN, 16#0DD0).
+-define(GL_MAP1_GRID_SEGMENTS, 16#0DD1).
+-define(GL_MAP2_GRID_DOMAIN, 16#0DD2).
+-define(GL_MAP2_GRID_SEGMENTS, 16#0DD3).
+-define(GL_COEFF, 16#0A00).
+-define(GL_ORDER, 16#0A01).
+-define(GL_DOMAIN, 16#0A02).
+-define(GL_PERSPECTIVE_CORRECTION_HINT, 16#0C50).
+-define(GL_POINT_SMOOTH_HINT, 16#0C51).
+-define(GL_LINE_SMOOTH_HINT, 16#0C52).
+-define(GL_POLYGON_SMOOTH_HINT, 16#0C53).
+-define(GL_FOG_HINT, 16#0C54).
-define(GL_DONT_CARE, 16#1100).
-define(GL_FASTEST, 16#1101).
-define(GL_NICEST, 16#1102).
--define(GL_SCISSOR_BOX, 16#C10).
--define(GL_SCISSOR_TEST, 16#C11).
--define(GL_MAP_COLOR, 16#D10).
--define(GL_MAP_STENCIL, 16#D11).
--define(GL_INDEX_SHIFT, 16#D12).
--define(GL_INDEX_OFFSET, 16#D13).
--define(GL_RED_SCALE, 16#D14).
--define(GL_RED_BIAS, 16#D15).
--define(GL_GREEN_SCALE, 16#D18).
--define(GL_GREEN_BIAS, 16#D19).
--define(GL_BLUE_SCALE, 16#D1A).
--define(GL_BLUE_BIAS, 16#D1B).
--define(GL_ALPHA_SCALE, 16#D1C).
--define(GL_ALPHA_BIAS, 16#D1D).
--define(GL_DEPTH_SCALE, 16#D1E).
--define(GL_DEPTH_BIAS, 16#D1F).
--define(GL_PIXEL_MAP_S_TO_S_SIZE, 16#CB1).
--define(GL_PIXEL_MAP_I_TO_I_SIZE, 16#CB0).
--define(GL_PIXEL_MAP_I_TO_R_SIZE, 16#CB2).
--define(GL_PIXEL_MAP_I_TO_G_SIZE, 16#CB3).
--define(GL_PIXEL_MAP_I_TO_B_SIZE, 16#CB4).
--define(GL_PIXEL_MAP_I_TO_A_SIZE, 16#CB5).
--define(GL_PIXEL_MAP_R_TO_R_SIZE, 16#CB6).
--define(GL_PIXEL_MAP_G_TO_G_SIZE, 16#CB7).
--define(GL_PIXEL_MAP_B_TO_B_SIZE, 16#CB8).
--define(GL_PIXEL_MAP_A_TO_A_SIZE, 16#CB9).
--define(GL_PIXEL_MAP_S_TO_S, 16#C71).
--define(GL_PIXEL_MAP_I_TO_I, 16#C70).
--define(GL_PIXEL_MAP_I_TO_R, 16#C72).
--define(GL_PIXEL_MAP_I_TO_G, 16#C73).
--define(GL_PIXEL_MAP_I_TO_B, 16#C74).
--define(GL_PIXEL_MAP_I_TO_A, 16#C75).
--define(GL_PIXEL_MAP_R_TO_R, 16#C76).
--define(GL_PIXEL_MAP_G_TO_G, 16#C77).
--define(GL_PIXEL_MAP_B_TO_B, 16#C78).
--define(GL_PIXEL_MAP_A_TO_A, 16#C79).
--define(GL_PACK_ALIGNMENT, 16#D05).
--define(GL_PACK_LSB_FIRST, 16#D01).
--define(GL_PACK_ROW_LENGTH, 16#D02).
--define(GL_PACK_SKIP_PIXELS, 16#D04).
--define(GL_PACK_SKIP_ROWS, 16#D03).
--define(GL_PACK_SWAP_BYTES, 16#D00).
--define(GL_UNPACK_ALIGNMENT, 16#CF5).
--define(GL_UNPACK_LSB_FIRST, 16#CF1).
--define(GL_UNPACK_ROW_LENGTH, 16#CF2).
--define(GL_UNPACK_SKIP_PIXELS, 16#CF4).
--define(GL_UNPACK_SKIP_ROWS, 16#CF3).
--define(GL_UNPACK_SWAP_BYTES, 16#CF0).
--define(GL_ZOOM_X, 16#D16).
--define(GL_ZOOM_Y, 16#D17).
+-define(GL_SCISSOR_BOX, 16#0C10).
+-define(GL_SCISSOR_TEST, 16#0C11).
+-define(GL_MAP_COLOR, 16#0D10).
+-define(GL_MAP_STENCIL, 16#0D11).
+-define(GL_INDEX_SHIFT, 16#0D12).
+-define(GL_INDEX_OFFSET, 16#0D13).
+-define(GL_RED_SCALE, 16#0D14).
+-define(GL_RED_BIAS, 16#0D15).
+-define(GL_GREEN_SCALE, 16#0D18).
+-define(GL_GREEN_BIAS, 16#0D19).
+-define(GL_BLUE_SCALE, 16#0D1A).
+-define(GL_BLUE_BIAS, 16#0D1B).
+-define(GL_ALPHA_SCALE, 16#0D1C).
+-define(GL_ALPHA_BIAS, 16#0D1D).
+-define(GL_DEPTH_SCALE, 16#0D1E).
+-define(GL_DEPTH_BIAS, 16#0D1F).
+-define(GL_PIXEL_MAP_S_TO_S_SIZE, 16#0CB1).
+-define(GL_PIXEL_MAP_I_TO_I_SIZE, 16#0CB0).
+-define(GL_PIXEL_MAP_I_TO_R_SIZE, 16#0CB2).
+-define(GL_PIXEL_MAP_I_TO_G_SIZE, 16#0CB3).
+-define(GL_PIXEL_MAP_I_TO_B_SIZE, 16#0CB4).
+-define(GL_PIXEL_MAP_I_TO_A_SIZE, 16#0CB5).
+-define(GL_PIXEL_MAP_R_TO_R_SIZE, 16#0CB6).
+-define(GL_PIXEL_MAP_G_TO_G_SIZE, 16#0CB7).
+-define(GL_PIXEL_MAP_B_TO_B_SIZE, 16#0CB8).
+-define(GL_PIXEL_MAP_A_TO_A_SIZE, 16#0CB9).
+-define(GL_PIXEL_MAP_S_TO_S, 16#0C71).
+-define(GL_PIXEL_MAP_I_TO_I, 16#0C70).
+-define(GL_PIXEL_MAP_I_TO_R, 16#0C72).
+-define(GL_PIXEL_MAP_I_TO_G, 16#0C73).
+-define(GL_PIXEL_MAP_I_TO_B, 16#0C74).
+-define(GL_PIXEL_MAP_I_TO_A, 16#0C75).
+-define(GL_PIXEL_MAP_R_TO_R, 16#0C76).
+-define(GL_PIXEL_MAP_G_TO_G, 16#0C77).
+-define(GL_PIXEL_MAP_B_TO_B, 16#0C78).
+-define(GL_PIXEL_MAP_A_TO_A, 16#0C79).
+-define(GL_PACK_ALIGNMENT, 16#0D05).
+-define(GL_PACK_LSB_FIRST, 16#0D01).
+-define(GL_PACK_ROW_LENGTH, 16#0D02).
+-define(GL_PACK_SKIP_PIXELS, 16#0D04).
+-define(GL_PACK_SKIP_ROWS, 16#0D03).
+-define(GL_PACK_SWAP_BYTES, 16#0D00).
+-define(GL_UNPACK_ALIGNMENT, 16#0CF5).
+-define(GL_UNPACK_LSB_FIRST, 16#0CF1).
+-define(GL_UNPACK_ROW_LENGTH, 16#0CF2).
+-define(GL_UNPACK_SKIP_PIXELS, 16#0CF4).
+-define(GL_UNPACK_SKIP_ROWS, 16#0CF3).
+-define(GL_UNPACK_SWAP_BYTES, 16#0CF0).
+-define(GL_ZOOM_X, 16#0D16).
+-define(GL_ZOOM_Y, 16#0D17).
-define(GL_TEXTURE_ENV, 16#2300).
-define(GL_TEXTURE_ENV_MODE, 16#2200).
--define(GL_TEXTURE_1D, 16#DE0).
--define(GL_TEXTURE_2D, 16#DE1).
+-define(GL_TEXTURE_1D, 16#0DE0).
+-define(GL_TEXTURE_2D, 16#0DE1).
-define(GL_TEXTURE_WRAP_S, 16#2802).
-define(GL_TEXTURE_WRAP_T, 16#2803).
-define(GL_TEXTURE_MAG_FILTER, 16#2800).
-define(GL_TEXTURE_MIN_FILTER, 16#2801).
-define(GL_TEXTURE_ENV_COLOR, 16#2201).
--define(GL_TEXTURE_GEN_S, 16#C60).
--define(GL_TEXTURE_GEN_T, 16#C61).
+-define(GL_TEXTURE_GEN_S, 16#0C60).
+-define(GL_TEXTURE_GEN_T, 16#0C61).
+-define(GL_TEXTURE_GEN_R, 16#0C62).
+-define(GL_TEXTURE_GEN_Q, 16#0C63).
-define(GL_TEXTURE_GEN_MODE, 16#2500).
-define(GL_TEXTURE_BORDER_COLOR, 16#1004).
-define(GL_TEXTURE_WIDTH, 16#1000).
@@ -475,40 +477,38 @@
-define(GL_T, 16#2001).
-define(GL_R, 16#2002).
-define(GL_Q, 16#2003).
--define(GL_TEXTURE_GEN_R, 16#C62).
--define(GL_TEXTURE_GEN_Q, 16#C63).
-define(GL_VENDOR, 16#1F00).
-define(GL_RENDERER, 16#1F01).
-define(GL_VERSION, 16#1F02).
-define(GL_EXTENSIONS, 16#1F03).
-define(GL_NO_ERROR, 16#0).
--define(GL_INVALID_ENUM, 16#500).
--define(GL_INVALID_VALUE, 16#501).
--define(GL_INVALID_OPERATION, 16#502).
--define(GL_STACK_OVERFLOW, 16#503).
--define(GL_STACK_UNDERFLOW, 16#504).
--define(GL_OUT_OF_MEMORY, 16#505).
--define(GL_CURRENT_BIT, 16#1).
--define(GL_POINT_BIT, 16#2).
--define(GL_LINE_BIT, 16#4).
--define(GL_POLYGON_BIT, 16#8).
--define(GL_POLYGON_STIPPLE_BIT, 16#10).
--define(GL_PIXEL_MODE_BIT, 16#20).
--define(GL_LIGHTING_BIT, 16#40).
--define(GL_FOG_BIT, 16#80).
--define(GL_DEPTH_BUFFER_BIT, 16#100).
--define(GL_ACCUM_BUFFER_BIT, 16#200).
--define(GL_STENCIL_BUFFER_BIT, 16#400).
--define(GL_VIEWPORT_BIT, 16#800).
--define(GL_TRANSFORM_BIT, 16#1000).
--define(GL_ENABLE_BIT, 16#2000).
--define(GL_COLOR_BUFFER_BIT, 16#4000).
--define(GL_HINT_BIT, 16#8000).
--define(GL_EVAL_BIT, 16#10000).
--define(GL_LIST_BIT, 16#20000).
--define(GL_TEXTURE_BIT, 16#40000).
--define(GL_SCISSOR_BIT, 16#80000).
--define(GL_ALL_ATTRIB_BITS, 16#FFFFF).
+-define(GL_INVALID_ENUM, 16#0500).
+-define(GL_INVALID_VALUE, 16#0501).
+-define(GL_INVALID_OPERATION, 16#0502).
+-define(GL_STACK_OVERFLOW, 16#0503).
+-define(GL_STACK_UNDERFLOW, 16#0504).
+-define(GL_OUT_OF_MEMORY, 16#0505).
+-define(GL_CURRENT_BIT, 16#00000001).
+-define(GL_POINT_BIT, 16#00000002).
+-define(GL_LINE_BIT, 16#00000004).
+-define(GL_POLYGON_BIT, 16#00000008).
+-define(GL_POLYGON_STIPPLE_BIT, 16#00000010).
+-define(GL_PIXEL_MODE_BIT, 16#00000020).
+-define(GL_LIGHTING_BIT, 16#00000040).
+-define(GL_FOG_BIT, 16#00000080).
+-define(GL_DEPTH_BUFFER_BIT, 16#00000100).
+-define(GL_ACCUM_BUFFER_BIT, 16#00000200).
+-define(GL_STENCIL_BUFFER_BIT, 16#00000400).
+-define(GL_VIEWPORT_BIT, 16#00000800).
+-define(GL_TRANSFORM_BIT, 16#00001000).
+-define(GL_ENABLE_BIT, 16#00002000).
+-define(GL_COLOR_BUFFER_BIT, 16#00004000).
+-define(GL_HINT_BIT, 16#00008000).
+-define(GL_EVAL_BIT, 16#00010000).
+-define(GL_LIST_BIT, 16#00020000).
+-define(GL_TEXTURE_BIT, 16#00040000).
+-define(GL_SCISSOR_BIT, 16#00080000).
+-define(GL_ALL_ATTRIB_BITS, 16#000FFFFF).
-define(GL_PROXY_TEXTURE_1D, 16#8063).
-define(GL_PROXY_TEXTURE_2D, 16#8064).
-define(GL_TEXTURE_PRIORITY, 16#8066).
@@ -549,8 +549,8 @@
-define(GL_RGB10_A2, 16#8059).
-define(GL_RGBA12, 16#805A).
-define(GL_RGBA16, 16#805B).
--define(GL_CLIENT_PIXEL_STORE_BIT, 16#1).
--define(GL_CLIENT_VERTEX_ARRAY_BIT, 16#2).
+-define(GL_CLIENT_PIXEL_STORE_BIT, 16#00000001).
+-define(GL_CLIENT_VERTEX_ARRAY_BIT, 16#00000002).
-define(GL_ALL_CLIENT_ATTRIB_BITS, 16#FFFFFFFF).
-define(GL_CLIENT_ALL_ATTRIB_BITS, 16#FFFFFFFF).
-define(GL_RESCALE_NORMAL, 16#803A).
@@ -578,10 +578,10 @@
-define(GL_TEXTURE_MAX_LOD, 16#813B).
-define(GL_TEXTURE_BASE_LEVEL, 16#813C).
-define(GL_TEXTURE_MAX_LEVEL, 16#813D).
--define(GL_SMOOTH_POINT_SIZE_RANGE, 16#B12).
--define(GL_SMOOTH_POINT_SIZE_GRANULARITY, 16#B13).
--define(GL_SMOOTH_LINE_WIDTH_RANGE, 16#B22).
--define(GL_SMOOTH_LINE_WIDTH_GRANULARITY, 16#B23).
+-define(GL_SMOOTH_POINT_SIZE_RANGE, 16#0B12).
+-define(GL_SMOOTH_POINT_SIZE_GRANULARITY, 16#0B13).
+-define(GL_SMOOTH_LINE_WIDTH_RANGE, 16#0B22).
+-define(GL_SMOOTH_LINE_WIDTH_GRANULARITY, 16#0B23).
-define(GL_ALIASED_POINT_SIZE_RANGE, 16#846D).
-define(GL_ALIASED_LINE_WIDTH_RANGE, 16#846E).
-define(GL_PACK_SKIP_IMAGES, 16#806B).
@@ -808,14 +808,14 @@
-define(GL_UNSIGNED_SHORT_15_1_MESA, 16#8753).
-define(GL_UNSIGNED_SHORT_1_15_REV_MESA, 16#8754).
-define(GL_MESA_program_debug, 1).
--define(GL_FRAGMENT_PROGRAM_POSITION_MESA, 16#8BB0).
--define(GL_FRAGMENT_PROGRAM_CALLBACK_MESA, 16#8BB1).
--define(GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA, 16#8BB2).
--define(GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA, 16#8BB3).
--define(GL_VERTEX_PROGRAM_POSITION_MESA, 16#8BB4).
--define(GL_VERTEX_PROGRAM_CALLBACK_MESA, 16#8BB5).
--define(GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA, 16#8BB6).
--define(GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA, 16#8BB7).
+-define(GL_FRAGMENT_PROGRAM_POSITION_MESA, 16#8bb0).
+-define(GL_FRAGMENT_PROGRAM_CALLBACK_MESA, 16#8bb1).
+-define(GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA, 16#8bb2).
+-define(GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA, 16#8bb3).
+-define(GL_VERTEX_PROGRAM_POSITION_MESA, 16#8bb4).
+-define(GL_VERTEX_PROGRAM_CALLBACK_MESA, 16#8bb5).
+-define(GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA, 16#8bb6).
+-define(GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA, 16#8bb7).
-define(GL_MESA_texture_array, 1).
-define(GL_TEXTURE_1D_ARRAY_EXT, 16#8C18).
-define(GL_PROXY_TEXTURE_1D_ARRAY_EXT, 16#8C19).
@@ -828,7 +828,7 @@
-define(GL_ATI_blend_equation_separate, 1).
-define(GL_ALPHA_BLEND_EQUATION_ATI, 16#883D).
-define(GL_OES_EGL_image, 1).
--define(GL_GLEXT_VERSION, 66).
+-define(GL_GLEXT_VERSION, 75).
-define(GL_BLEND_DST_RGB, 16#80C8).
-define(GL_BLEND_SRC_RGB, 16#80C9).
-define(GL_BLEND_DST_ALPHA, 16#80CA).
@@ -1034,16 +1034,14 @@
-define(GL_CLIP_DISTANCE5, 16#3005).
-define(GL_CLIP_DISTANCE6, 16#3006).
-define(GL_CLIP_DISTANCE7, 16#3007).
--define(GL_MAX_CLIP_DISTANCES, 16#D32).
+-define(GL_MAX_CLIP_DISTANCES, 16#0D32).
-define(GL_MAJOR_VERSION, 16#821B).
-define(GL_MINOR_VERSION, 16#821C).
-define(GL_NUM_EXTENSIONS, 16#821D).
-define(GL_CONTEXT_FLAGS, 16#821E).
--define(GL_DEPTH_BUFFER, 16#8223).
--define(GL_STENCIL_BUFFER, 16#8224).
-define(GL_COMPRESSED_RED, 16#8225).
-define(GL_COMPRESSED_RG, 16#8226).
--define(GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT, 16#1).
+-define(GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT, 16#0001).
-define(GL_RGBA32F, 16#8814).
-define(GL_RGB32F, 16#8815).
-define(GL_RGBA16F, 16#881A).
@@ -1161,12 +1159,12 @@
-define(GL_SIGNED_NORMALIZED, 16#8F9C).
-define(GL_PRIMITIVE_RESTART, 16#8F9D).
-define(GL_PRIMITIVE_RESTART_INDEX, 16#8F9E).
--define(GL_CONTEXT_CORE_PROFILE_BIT, 16#1).
--define(GL_CONTEXT_COMPATIBILITY_PROFILE_BIT, 16#2).
--define(GL_LINES_ADJACENCY, 16#A).
--define(GL_LINE_STRIP_ADJACENCY, 16#B).
--define(GL_TRIANGLES_ADJACENCY, 16#C).
--define(GL_TRIANGLE_STRIP_ADJACENCY, 16#D).
+-define(GL_CONTEXT_CORE_PROFILE_BIT, 16#00000001).
+-define(GL_CONTEXT_COMPATIBILITY_PROFILE_BIT, 16#00000002).
+-define(GL_LINES_ADJACENCY, 16#000A).
+-define(GL_LINE_STRIP_ADJACENCY, 16#000B).
+-define(GL_TRIANGLES_ADJACENCY, 16#000C).
+-define(GL_TRIANGLE_STRIP_ADJACENCY, 16#000D).
-define(GL_PROGRAM_POINT_SIZE, 16#8642).
-define(GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS, 16#8C29).
-define(GL_FRAMEBUFFER_ATTACHMENT_LAYERED, 16#8DA7).
@@ -1553,7 +1551,7 @@
-define(GL_DEPTH_COMPONENT32F, 16#8CAC).
-define(GL_DEPTH32F_STENCIL8, 16#8CAD).
-define(GL_FLOAT_32_UNSIGNED_INT_24_8_REV, 16#8DAD).
--define(GL_INVALID_FRAMEBUFFER_OPERATION, 16#506).
+-define(GL_INVALID_FRAMEBUFFER_OPERATION, 16#0506).
-define(GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, 16#8210).
-define(GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE, 16#8211).
-define(GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, 16#8212).
@@ -1634,10 +1632,10 @@
-define(GL_TEXTURE_LUMINANCE_TYPE, 16#8C14).
-define(GL_TEXTURE_INTENSITY_TYPE, 16#8C15).
-define(GL_FRAMEBUFFER_SRGB, 16#8DB9).
--define(GL_LINES_ADJACENCY_ARB, 16#A).
--define(GL_LINE_STRIP_ADJACENCY_ARB, 16#B).
--define(GL_TRIANGLES_ADJACENCY_ARB, 16#C).
--define(GL_TRIANGLE_STRIP_ADJACENCY_ARB, 16#D).
+-define(GL_LINES_ADJACENCY_ARB, 16#000A).
+-define(GL_LINE_STRIP_ADJACENCY_ARB, 16#000B).
+-define(GL_TRIANGLES_ADJACENCY_ARB, 16#000C).
+-define(GL_TRIANGLE_STRIP_ADJACENCY_ARB, 16#000D).
-define(GL_PROGRAM_POINT_SIZE_ARB, 16#8642).
-define(GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB, 16#8C29).
-define(GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB, 16#8DA7).
@@ -1654,12 +1652,12 @@
-define(GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB, 16#8DE1).
-define(GL_HALF_FLOAT, 16#140B).
-define(GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB, 16#88FE).
--define(GL_MAP_READ_BIT, 16#1).
--define(GL_MAP_WRITE_BIT, 16#2).
--define(GL_MAP_INVALIDATE_RANGE_BIT, 16#4).
--define(GL_MAP_INVALIDATE_BUFFER_BIT, 16#8).
--define(GL_MAP_FLUSH_EXPLICIT_BIT, 16#10).
--define(GL_MAP_UNSYNCHRONIZED_BIT, 16#20).
+-define(GL_MAP_READ_BIT, 16#0001).
+-define(GL_MAP_WRITE_BIT, 16#0002).
+-define(GL_MAP_INVALIDATE_RANGE_BIT, 16#0004).
+-define(GL_MAP_INVALIDATE_BUFFER_BIT, 16#0008).
+-define(GL_MAP_FLUSH_EXPLICIT_BIT, 16#0010).
+-define(GL_MAP_UNSYNCHRONIZED_BIT, 16#0020).
-define(GL_TEXTURE_BUFFER_ARB, 16#8C2A).
-define(GL_MAX_TEXTURE_BUFFER_SIZE_ARB, 16#8C2B).
-define(GL_TEXTURE_BINDING_BUFFER_ARB, 16#8C2C).
@@ -1724,7 +1722,7 @@
-define(GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER, 16#8A44).
-define(GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER, 16#8A45).
-define(GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER, 16#8A46).
--define(GL_INVALID_INDEX, 16#FFFFFFFF).
+-define(GL_INVALID_INDEX, 16#FFFFFFFFu).
-define(GL_COPY_READ_BUFFER, 16#8F36).
-define(GL_COPY_WRITE_BUFFER, 16#8F37).
-define(GL_DEPTH_CLAMP, 16#864F).
@@ -1746,8 +1744,8 @@
-define(GL_TIMEOUT_EXPIRED, 16#911B).
-define(GL_CONDITION_SATISFIED, 16#911C).
-define(GL_WAIT_FAILED, 16#911D).
--define(GL_SYNC_FLUSH_COMMANDS_BIT, 16#1).
--define(GL_TIMEOUT_IGNORED, 16#FFFFFFFFFFFFFFFF).
+-define(GL_SYNC_FLUSH_COMMANDS_BIT, 16#00000001).
+-define(GL_TIMEOUT_IGNORED, 16#FFFFFFFFFFFFFFFFull).
-define(GL_SAMPLE_POSITION, 16#8E50).
-define(GL_SAMPLE_MASK, 16#8E51).
-define(GL_SAMPLE_MASK_VALUE, 16#8E52).
@@ -1830,7 +1828,7 @@
-define(GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS, 16#8DE8).
-define(GL_NUM_COMPATIBLE_SUBROUTINES, 16#8E4A).
-define(GL_COMPATIBLE_SUBROUTINES, 16#8E4B).
--define(GL_PATCHES, 16#E).
+-define(GL_PATCHES, 16#000E).
-define(GL_PATCH_VERTICES, 16#8E72).
-define(GL_PATCH_DEFAULT_INNER_LEVEL, 16#8E73).
-define(GL_PATCH_DEFAULT_OUTER_LEVEL, 16#8E74).
@@ -1886,11 +1884,11 @@
-define(GL_PROGRAM_BINARY_LENGTH, 16#8741).
-define(GL_NUM_PROGRAM_BINARY_FORMATS, 16#87FE).
-define(GL_PROGRAM_BINARY_FORMATS, 16#87FF).
--define(GL_VERTEX_SHADER_BIT, 16#1).
--define(GL_FRAGMENT_SHADER_BIT, 16#2).
--define(GL_GEOMETRY_SHADER_BIT, 16#4).
--define(GL_TESS_CONTROL_SHADER_BIT, 16#8).
--define(GL_TESS_EVALUATION_SHADER_BIT, 16#10).
+-define(GL_VERTEX_SHADER_BIT, 16#00000001).
+-define(GL_FRAGMENT_SHADER_BIT, 16#00000002).
+-define(GL_GEOMETRY_SHADER_BIT, 16#00000004).
+-define(GL_TESS_CONTROL_SHADER_BIT, 16#00000008).
+-define(GL_TESS_EVALUATION_SHADER_BIT, 16#00000010).
-define(GL_ALL_SHADER_BITS, 16#FFFFFFFF).
-define(GL_PROGRAM_SEPARABLE, 16#8258).
-define(GL_ACTIVE_PROGRAM, 16#8259).
@@ -1925,13 +1923,117 @@
-define(GL_DEBUG_SEVERITY_HIGH_ARB, 16#9146).
-define(GL_DEBUG_SEVERITY_MEDIUM_ARB, 16#9147).
-define(GL_DEBUG_SEVERITY_LOW_ARB, 16#9148).
--define(GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB, 16#4).
+-define(GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB, 16#00000004).
-define(GL_LOSE_CONTEXT_ON_RESET_ARB, 16#8252).
-define(GL_GUILTY_CONTEXT_RESET_ARB, 16#8253).
-define(GL_INNOCENT_CONTEXT_RESET_ARB, 16#8254).
-define(GL_UNKNOWN_CONTEXT_RESET_ARB, 16#8255).
-define(GL_RESET_NOTIFICATION_STRATEGY_ARB, 16#8256).
-define(GL_NO_RESET_NOTIFICATION_ARB, 16#8261).
+-define(GL_UNPACK_COMPRESSED_BLOCK_WIDTH, 16#9127).
+-define(GL_UNPACK_COMPRESSED_BLOCK_HEIGHT, 16#9128).
+-define(GL_UNPACK_COMPRESSED_BLOCK_DEPTH, 16#9129).
+-define(GL_UNPACK_COMPRESSED_BLOCK_SIZE, 16#912A).
+-define(GL_PACK_COMPRESSED_BLOCK_WIDTH, 16#912B).
+-define(GL_PACK_COMPRESSED_BLOCK_HEIGHT, 16#912C).
+-define(GL_PACK_COMPRESSED_BLOCK_DEPTH, 16#912D).
+-define(GL_PACK_COMPRESSED_BLOCK_SIZE, 16#912E).
+-define(GL_NUM_SAMPLE_COUNTS, 16#9380).
+-define(GL_MIN_MAP_BUFFER_ALIGNMENT, 16#90BC).
+-define(GL_ATOMIC_COUNTER_BUFFER, 16#92C0).
+-define(GL_ATOMIC_COUNTER_BUFFER_BINDING, 16#92C1).
+-define(GL_ATOMIC_COUNTER_BUFFER_START, 16#92C2).
+-define(GL_ATOMIC_COUNTER_BUFFER_SIZE, 16#92C3).
+-define(GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE, 16#92C4).
+-define(GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS, 16#92C5).
+-define(GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES, 16#92C6).
+-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER, 16#92C7).
+-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER, 16#92C8).
+-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER, 16#92C9).
+-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER, 16#92CA).
+-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER, 16#92CB).
+-define(GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS, 16#92CC).
+-define(GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS, 16#92CD).
+-define(GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS, 16#92CE).
+-define(GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS, 16#92CF).
+-define(GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS, 16#92D0).
+-define(GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS, 16#92D1).
+-define(GL_MAX_VERTEX_ATOMIC_COUNTERS, 16#92D2).
+-define(GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS, 16#92D3).
+-define(GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS, 16#92D4).
+-define(GL_MAX_GEOMETRY_ATOMIC_COUNTERS, 16#92D5).
+-define(GL_MAX_FRAGMENT_ATOMIC_COUNTERS, 16#92D6).
+-define(GL_MAX_COMBINED_ATOMIC_COUNTERS, 16#92D7).
+-define(GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE, 16#92D8).
+-define(GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS, 16#92DC).
+-define(GL_ACTIVE_ATOMIC_COUNTER_BUFFERS, 16#92D9).
+-define(GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX, 16#92DA).
+-define(GL_UNSIGNED_INT_ATOMIC_COUNTER, 16#92DB).
+-define(GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT, 16#00000001).
+-define(GL_ELEMENT_ARRAY_BARRIER_BIT, 16#00000002).
+-define(GL_UNIFORM_BARRIER_BIT, 16#00000004).
+-define(GL_TEXTURE_FETCH_BARRIER_BIT, 16#00000008).
+-define(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT, 16#00000020).
+-define(GL_COMMAND_BARRIER_BIT, 16#00000040).
+-define(GL_PIXEL_BUFFER_BARRIER_BIT, 16#00000080).
+-define(GL_TEXTURE_UPDATE_BARRIER_BIT, 16#00000100).
+-define(GL_BUFFER_UPDATE_BARRIER_BIT, 16#00000200).
+-define(GL_FRAMEBUFFER_BARRIER_BIT, 16#00000400).
+-define(GL_TRANSFORM_FEEDBACK_BARRIER_BIT, 16#00000800).
+-define(GL_ATOMIC_COUNTER_BARRIER_BIT, 16#00001000).
+-define(GL_ALL_BARRIER_BITS, 16#FFFFFFFF).
+-define(GL_MAX_IMAGE_UNITS, 16#8F38).
+-define(GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS, 16#8F39).
+-define(GL_IMAGE_BINDING_NAME, 16#8F3A).
+-define(GL_IMAGE_BINDING_LEVEL, 16#8F3B).
+-define(GL_IMAGE_BINDING_LAYERED, 16#8F3C).
+-define(GL_IMAGE_BINDING_LAYER, 16#8F3D).
+-define(GL_IMAGE_BINDING_ACCESS, 16#8F3E).
+-define(GL_IMAGE_1D, 16#904C).
+-define(GL_IMAGE_2D, 16#904D).
+-define(GL_IMAGE_3D, 16#904E).
+-define(GL_IMAGE_2D_RECT, 16#904F).
+-define(GL_IMAGE_CUBE, 16#9050).
+-define(GL_IMAGE_BUFFER, 16#9051).
+-define(GL_IMAGE_1D_ARRAY, 16#9052).
+-define(GL_IMAGE_2D_ARRAY, 16#9053).
+-define(GL_IMAGE_CUBE_MAP_ARRAY, 16#9054).
+-define(GL_IMAGE_2D_MULTISAMPLE, 16#9055).
+-define(GL_IMAGE_2D_MULTISAMPLE_ARRAY, 16#9056).
+-define(GL_INT_IMAGE_1D, 16#9057).
+-define(GL_INT_IMAGE_2D, 16#9058).
+-define(GL_INT_IMAGE_3D, 16#9059).
+-define(GL_INT_IMAGE_2D_RECT, 16#905A).
+-define(GL_INT_IMAGE_CUBE, 16#905B).
+-define(GL_INT_IMAGE_BUFFER, 16#905C).
+-define(GL_INT_IMAGE_1D_ARRAY, 16#905D).
+-define(GL_INT_IMAGE_2D_ARRAY, 16#905E).
+-define(GL_INT_IMAGE_CUBE_MAP_ARRAY, 16#905F).
+-define(GL_INT_IMAGE_2D_MULTISAMPLE, 16#9060).
+-define(GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY, 16#9061).
+-define(GL_UNSIGNED_INT_IMAGE_1D, 16#9062).
+-define(GL_UNSIGNED_INT_IMAGE_2D, 16#9063).
+-define(GL_UNSIGNED_INT_IMAGE_3D, 16#9064).
+-define(GL_UNSIGNED_INT_IMAGE_2D_RECT, 16#9065).
+-define(GL_UNSIGNED_INT_IMAGE_CUBE, 16#9066).
+-define(GL_UNSIGNED_INT_IMAGE_BUFFER, 16#9067).
+-define(GL_UNSIGNED_INT_IMAGE_1D_ARRAY, 16#9068).
+-define(GL_UNSIGNED_INT_IMAGE_2D_ARRAY, 16#9069).
+-define(GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY, 16#906A).
+-define(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE, 16#906B).
+-define(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY, 16#906C).
+-define(GL_MAX_IMAGE_SAMPLES, 16#906D).
+-define(GL_IMAGE_BINDING_FORMAT, 16#906E).
+-define(GL_IMAGE_FORMAT_COMPATIBILITY_TYPE, 16#90C7).
+-define(GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE, 16#90C8).
+-define(GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS, 16#90C9).
+-define(GL_MAX_VERTEX_IMAGE_UNIFORMS, 16#90CA).
+-define(GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS, 16#90CB).
+-define(GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS, 16#90CC).
+-define(GL_MAX_GEOMETRY_IMAGE_UNIFORMS, 16#90CD).
+-define(GL_MAX_FRAGMENT_IMAGE_UNIFORMS, 16#90CE).
+-define(GL_MAX_COMBINED_IMAGE_UNIFORMS, 16#90CF).
+-define(GL_TEXTURE_IMMUTABLE_FORMAT, 16#912F).
-define(GL_ABGR_EXT, 16#8000).
-define(GL_CONSTANT_COLOR_EXT, 16#8001).
-define(GL_ONE_MINUS_CONSTANT_COLOR_EXT, 16#8002).
@@ -2235,8 +2337,8 @@
-define(GL_FRAMEZOOM_SGIX, 16#818B).
-define(GL_FRAMEZOOM_FACTOR_SGIX, 16#818C).
-define(GL_MAX_FRAMEZOOM_FACTOR_SGIX, 16#818D).
--define(GL_TEXTURE_DEFORMATION_BIT_SGIX, 16#1).
--define(GL_GEOMETRY_DEFORMATION_BIT_SGIX, 16#2).
+-define(GL_TEXTURE_DEFORMATION_BIT_SGIX, 16#00000001).
+-define(GL_GEOMETRY_DEFORMATION_BIT_SGIX, 16#00000002).
-define(GL_GEOMETRY_DEFORMATION_SGIX, 16#8194).
-define(GL_TEXTURE_DEFORMATION_SGIX, 16#8195).
-define(GL_DEFORMATIONS_MASK_SGIX, 16#8196).
@@ -2275,24 +2377,24 @@
-define(GL_VERTEX_CONSISTENT_HINT_PGI, 16#1A22B).
-define(GL_MATERIAL_SIDE_HINT_PGI, 16#1A22C).
-define(GL_MAX_VERTEX_HINT_PGI, 16#1A22D).
--define(GL_COLOR3_BIT_PGI, 16#10000).
--define(GL_COLOR4_BIT_PGI, 16#20000).
--define(GL_EDGEFLAG_BIT_PGI, 16#40000).
--define(GL_INDEX_BIT_PGI, 16#80000).
--define(GL_MAT_AMBIENT_BIT_PGI, 16#100000).
--define(GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI, 16#200000).
--define(GL_MAT_DIFFUSE_BIT_PGI, 16#400000).
--define(GL_MAT_EMISSION_BIT_PGI, 16#800000).
--define(GL_MAT_COLOR_INDEXES_BIT_PGI, 16#1000000).
--define(GL_MAT_SHININESS_BIT_PGI, 16#2000000).
--define(GL_MAT_SPECULAR_BIT_PGI, 16#4000000).
--define(GL_NORMAL_BIT_PGI, 16#8000000).
+-define(GL_COLOR3_BIT_PGI, 16#00010000).
+-define(GL_COLOR4_BIT_PGI, 16#00020000).
+-define(GL_EDGEFLAG_BIT_PGI, 16#00040000).
+-define(GL_INDEX_BIT_PGI, 16#00080000).
+-define(GL_MAT_AMBIENT_BIT_PGI, 16#00100000).
+-define(GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI, 16#00200000).
+-define(GL_MAT_DIFFUSE_BIT_PGI, 16#00400000).
+-define(GL_MAT_EMISSION_BIT_PGI, 16#00800000).
+-define(GL_MAT_COLOR_INDEXES_BIT_PGI, 16#01000000).
+-define(GL_MAT_SHININESS_BIT_PGI, 16#02000000).
+-define(GL_MAT_SPECULAR_BIT_PGI, 16#04000000).
+-define(GL_NORMAL_BIT_PGI, 16#08000000).
-define(GL_TEXCOORD1_BIT_PGI, 16#10000000).
-define(GL_TEXCOORD2_BIT_PGI, 16#20000000).
-define(GL_TEXCOORD3_BIT_PGI, 16#40000000).
-define(GL_TEXCOORD4_BIT_PGI, 16#80000000).
--define(GL_VERTEX23_BIT_PGI, 16#4).
--define(GL_VERTEX4_BIT_PGI, 16#8).
+-define(GL_VERTEX23_BIT_PGI, 16#00000004).
+-define(GL_VERTEX4_BIT_PGI, 16#00000008).
-define(GL_PREFER_DOUBLEBUFFER_HINT_PGI, 16#1A1F8).
-define(GL_CONSERVE_MEMORY_HINT_PGI, 16#1A1FD).
-define(GL_RECLAIM_MEMORY_HINT_PGI, 16#1A1FE).
@@ -2489,9 +2591,9 @@
-define(GL_TEXTURE_CONSTANT_DATA_SUNX, 16#81D6).
-define(GL_GLOBAL_ALPHA_SUN, 16#81D9).
-define(GL_GLOBAL_ALPHA_FACTOR_SUN, 16#81DA).
--define(GL_RESTART_SUN, 16#1).
--define(GL_REPLACE_MIDDLE_SUN, 16#2).
--define(GL_REPLACE_OLDEST_SUN, 16#3).
+-define(GL_RESTART_SUN, 16#0001).
+-define(GL_REPLACE_MIDDLE_SUN, 16#0002).
+-define(GL_REPLACE_OLDEST_SUN, 16#0003).
-define(GL_TRIANGLE_LIST_SUN, 16#81D7).
-define(GL_REPLACEMENT_CODE_SUN, 16#81D8).
-define(GL_REPLACEMENT_CODE_ARRAY_SUN, 16#85C0).
@@ -3010,19 +3112,19 @@
-define(GL_SWIZZLE_STQ_DQ_ATI, 16#8979).
-define(GL_SWIZZLE_STRQ_ATI, 16#897A).
-define(GL_SWIZZLE_STRQ_DQ_ATI, 16#897B).
--define(GL_RED_BIT_ATI, 16#1).
--define(GL_GREEN_BIT_ATI, 16#2).
--define(GL_BLUE_BIT_ATI, 16#4).
--define(GL_2X_BIT_ATI, 16#1).
--define(GL_4X_BIT_ATI, 16#2).
--define(GL_8X_BIT_ATI, 16#4).
--define(GL_HALF_BIT_ATI, 16#8).
--define(GL_QUARTER_BIT_ATI, 16#10).
--define(GL_EIGHTH_BIT_ATI, 16#20).
--define(GL_SATURATE_BIT_ATI, 16#40).
--define(GL_COMP_BIT_ATI, 16#2).
--define(GL_NEGATE_BIT_ATI, 16#4).
--define(GL_BIAS_BIT_ATI, 16#8).
+-define(GL_RED_BIT_ATI, 16#00000001).
+-define(GL_GREEN_BIT_ATI, 16#00000002).
+-define(GL_BLUE_BIT_ATI, 16#00000004).
+-define(GL_2X_BIT_ATI, 16#00000001).
+-define(GL_4X_BIT_ATI, 16#00000002).
+-define(GL_8X_BIT_ATI, 16#00000004).
+-define(GL_HALF_BIT_ATI, 16#00000008).
+-define(GL_QUARTER_BIT_ATI, 16#00000010).
+-define(GL_EIGHTH_BIT_ATI, 16#00000020).
+-define(GL_SATURATE_BIT_ATI, 16#00000040).
+-define(GL_COMP_BIT_ATI, 16#00000002).
+-define(GL_NEGATE_BIT_ATI, 16#00000004).
+-define(GL_BIAS_BIT_ATI, 16#00000008).
-define(GL_PN_TRIANGLES_ATI, 16#87F0).
-define(GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI, 16#87F1).
-define(GL_PN_TRIANGLES_POINT_MODE_ATI, 16#87F2).
@@ -3307,7 +3409,7 @@
-define(GL_MAX_PROGRAM_IF_DEPTH_NV, 16#88F6).
-define(GL_MAX_PROGRAM_LOOP_DEPTH_NV, 16#88F7).
-define(GL_MAX_PROGRAM_LOOP_COUNT_NV, 16#88F8).
--define(GL_INVALID_FRAMEBUFFER_OPERATION_EXT, 16#506).
+-define(GL_INVALID_FRAMEBUFFER_OPERATION_EXT, 16#0506).
-define(GL_MAX_RENDERBUFFER_SIZE_EXT, 16#84E8).
-define(GL_FRAMEBUFFER_BINDING_EXT, 16#8CA6).
-define(GL_RENDERBUFFER_BINDING_EXT, 16#8CA7).
@@ -3404,10 +3506,10 @@
-define(GL_MAX_PROGRAM_RESULT_COMPONENTS_NV, 16#8909).
-define(GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV, 16#8DA5).
-define(GL_MAX_PROGRAM_GENERIC_RESULTS_NV, 16#8DA6).
--define(GL_LINES_ADJACENCY_EXT, 16#A).
--define(GL_LINE_STRIP_ADJACENCY_EXT, 16#B).
--define(GL_TRIANGLES_ADJACENCY_EXT, 16#C).
--define(GL_TRIANGLE_STRIP_ADJACENCY_EXT, 16#D).
+-define(GL_LINES_ADJACENCY_EXT, 16#000A).
+-define(GL_LINE_STRIP_ADJACENCY_EXT, 16#000B).
+-define(GL_TRIANGLES_ADJACENCY_EXT, 16#000C).
+-define(GL_TRIANGLE_STRIP_ADJACENCY_EXT, 16#000D).
-define(GL_GEOMETRY_PROGRAM_NV, 16#8C26).
-define(GL_MAX_PROGRAM_OUTPUT_VERTICES_NV, 16#8C27).
-define(GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV, 16#8C28).
@@ -3789,18 +3891,18 @@
-define(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT, 16#906C).
-define(GL_MAX_IMAGE_SAMPLES_EXT, 16#906D).
-define(GL_IMAGE_BINDING_FORMAT_EXT, 16#906E).
--define(GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT, 16#1).
--define(GL_ELEMENT_ARRAY_BARRIER_BIT_EXT, 16#2).
--define(GL_UNIFORM_BARRIER_BIT_EXT, 16#4).
--define(GL_TEXTURE_FETCH_BARRIER_BIT_EXT, 16#8).
--define(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT, 16#20).
--define(GL_COMMAND_BARRIER_BIT_EXT, 16#40).
--define(GL_PIXEL_BUFFER_BARRIER_BIT_EXT, 16#80).
--define(GL_TEXTURE_UPDATE_BARRIER_BIT_EXT, 16#100).
--define(GL_BUFFER_UPDATE_BARRIER_BIT_EXT, 16#200).
--define(GL_FRAMEBUFFER_BARRIER_BIT_EXT, 16#400).
--define(GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT, 16#800).
--define(GL_ATOMIC_COUNTER_BARRIER_BIT_EXT, 16#1000).
+-define(GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT, 16#00000001).
+-define(GL_ELEMENT_ARRAY_BARRIER_BIT_EXT, 16#00000002).
+-define(GL_UNIFORM_BARRIER_BIT_EXT, 16#00000004).
+-define(GL_TEXTURE_FETCH_BARRIER_BIT_EXT, 16#00000008).
+-define(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT, 16#00000020).
+-define(GL_COMMAND_BARRIER_BIT_EXT, 16#00000040).
+-define(GL_PIXEL_BUFFER_BARRIER_BIT_EXT, 16#00000080).
+-define(GL_TEXTURE_UPDATE_BARRIER_BIT_EXT, 16#00000100).
+-define(GL_BUFFER_UPDATE_BARRIER_BIT_EXT, 16#00000200).
+-define(GL_FRAMEBUFFER_BARRIER_BIT_EXT, 16#00000400).
+-define(GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT, 16#00000800).
+-define(GL_ATOMIC_COUNTER_BARRIER_BIT_EXT, 16#00001000).
-define(GL_ALL_BARRIER_BITS_EXT, 16#FFFFFFFF).
-define(GL_DOUBLE_VEC2_EXT, 16#8FFC).
-define(GL_DOUBLE_VEC3_EXT, 16#8FFD).
@@ -3850,7 +3952,7 @@
-define(GL_FLOAT16_VEC2_NV, 16#8FF9).
-define(GL_FLOAT16_VEC3_NV, 16#8FFA).
-define(GL_FLOAT16_VEC4_NV, 16#8FFB).
--define(GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV, 16#10).
+-define(GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV, 16#00000010).
-define(GL_MAX_PROGRAM_PATCH_ATTRIBS_NV, 16#86D8).
-define(GL_TESS_CONTROL_PROGRAM_NV, 16#891E).
-define(GL_TESS_EVALUATION_PROGRAM_NV, 16#891F).
@@ -3882,3 +3984,432 @@
-define(GL_WRITE_DISCARD_NV, 16#88BE).
-define(GL_DEPTH_CLAMP_NEAR_AMD, 16#901E).
-define(GL_DEPTH_CLAMP_FAR_AMD, 16#901F).
+-define(GL_TEXTURE_SRGB_DECODE_EXT, 16#8A48).
+-define(GL_DECODE_EXT, 16#8A49).
+-define(GL_SKIP_DECODE_EXT, 16#8A4A).
+-define(GL_TEXTURE_COVERAGE_SAMPLES_NV, 16#9045).
+-define(GL_TEXTURE_COLOR_SAMPLES_NV, 16#9046).
+-define(GL_FACTOR_MIN_AMD, 16#901C).
+-define(GL_FACTOR_MAX_AMD, 16#901D).
+-define(GL_SUBSAMPLE_DISTANCE_AMD, 16#883F).
+-define(GL_SYNC_X11_FENCE_EXT, 16#90E1).
+-define(GL_SCALED_RESOLVE_FASTEST_EXT, 16#90BA).
+-define(GL_SCALED_RESOLVE_NICEST_EXT, 16#90BB).
+-define(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, 16#9160).
+-define(GL_SET_AMD, 16#874A).
+-define(GL_REPLACE_VALUE_AMD, 16#874B).
+-define(GL_STENCIL_OP_VALUE_AMD, 16#874C).
+-define(GL_STENCIL_BACK_OP_VALUE_AMD, 16#874D).
+-define(GL_VERSION_1_2_DEPRECATED, 1).
+-define(GL_VERSION_1_3_DEPRECATED, 1).
+-define(GL_VERSION_1_4, 1).
+-define(GL_VERSION_1_4_DEPRECATED, 1).
+-define(GL_VERSION_1_5, 1).
+-define(GL_VERSION_2_0, 1).
+-define(GL_VERSION_2_1, 1).
+-define(GL_VERSION_3_0, 1).
+-define(GL_VERSION_3_1, 1).
+-define(GL_VERSION_3_2, 1).
+-define(GL_VERSION_3_3, 1).
+-define(GL_VERSION_4_0, 1).
+-define(GL_VERSION_4_1, 1).
+-define(GL_VERSION_4_2, 1).
+-define(GL_ARB_transpose_matrix, 1).
+-define(GL_ARB_multisample, 1).
+-define(GL_ARB_texture_env_add, 1).
+-define(GL_ARB_texture_cube_map, 1).
+-define(GL_ARB_texture_compression, 1).
+-define(GL_ARB_texture_border_clamp, 1).
+-define(GL_ARB_point_parameters, 1).
+-define(GL_ARB_vertex_blend, 1).
+-define(GL_ARB_matrix_palette, 1).
+-define(GL_ARB_texture_env_combine, 1).
+-define(GL_ARB_texture_env_crossbar, 1).
+-define(GL_ARB_texture_env_dot3, 1).
+-define(GL_ARB_texture_mirrored_repeat, 1).
+-define(GL_ARB_depth_texture, 1).
+-define(GL_ARB_shadow, 1).
+-define(GL_ARB_shadow_ambient, 1).
+-define(GL_ARB_window_pos, 1).
+-define(GL_ARB_vertex_program, 1).
+-define(GL_ARB_fragment_program, 1).
+-define(GL_ARB_vertex_buffer_object, 1).
+-define(GL_ARB_occlusion_query, 1).
+-define(GL_ARB_shader_objects, 1).
+-define(GL_ARB_vertex_shader, 1).
+-define(GL_ARB_fragment_shader, 1).
+-define(GL_ARB_shading_language_100, 1).
+-define(GL_ARB_texture_non_power_of_two, 1).
+-define(GL_ARB_point_sprite, 1).
+-define(GL_ARB_fragment_program_shadow, 1).
+-define(GL_ARB_draw_buffers, 1).
+-define(GL_ARB_texture_rectangle, 1).
+-define(GL_ARB_color_buffer_float, 1).
+-define(GL_ARB_half_float_pixel, 1).
+-define(GL_ARB_texture_float, 1).
+-define(GL_ARB_pixel_buffer_object, 1).
+-define(GL_ARB_depth_buffer_float, 1).
+-define(GL_ARB_draw_instanced, 1).
+-define(GL_ARB_framebuffer_object, 1).
+-define(GL_ARB_framebuffer_sRGB, 1).
+-define(GL_ARB_geometry_shader4, 1).
+-define(GL_ARB_half_float_vertex, 1).
+-define(GL_ARB_instanced_arrays, 1).
+-define(GL_ARB_map_buffer_range, 1).
+-define(GL_ARB_texture_buffer_object, 1).
+-define(GL_ARB_texture_compression_rgtc, 1).
+-define(GL_ARB_texture_rg, 1).
+-define(GL_ARB_vertex_array_object, 1).
+-define(GL_ARB_uniform_buffer_object, 1).
+-define(GL_ARB_compatibility, 1).
+-define(GL_ARB_copy_buffer, 1).
+-define(GL_ARB_shader_texture_lod, 1).
+-define(GL_ARB_depth_clamp, 1).
+-define(GL_ARB_draw_elements_base_vertex, 1).
+-define(GL_ARB_fragment_coord_conventions, 1).
+-define(GL_ARB_provoking_vertex, 1).
+-define(GL_ARB_seamless_cube_map, 1).
+-define(GL_ARB_sync, 1).
+-define(GL_ARB_texture_multisample, 1).
+-define(GL_ARB_vertex_array_bgra, 1).
+-define(GL_ARB_draw_buffers_blend, 1).
+-define(GL_ARB_sample_shading, 1).
+-define(GL_ARB_texture_cube_map_array, 1).
+-define(GL_ARB_texture_gather, 1).
+-define(GL_ARB_texture_query_lod, 1).
+-define(GL_ARB_shading_language_include, 1).
+-define(GL_ARB_texture_compression_bptc, 1).
+-define(GL_ARB_blend_func_extended, 1).
+-define(GL_ARB_explicit_attrib_location, 1).
+-define(GL_ARB_occlusion_query2, 1).
+-define(GL_ARB_sampler_objects, 1).
+-define(GL_ARB_shader_bit_encoding, 1).
+-define(GL_ARB_texture_rgb10_a2ui, 1).
+-define(GL_ARB_texture_swizzle, 1).
+-define(GL_ARB_timer_query, 1).
+-define(GL_ARB_vertex_type_2_10_10_10_rev, 1).
+-define(GL_ARB_draw_indirect, 1).
+-define(GL_ARB_gpu_shader5, 1).
+-define(GL_ARB_gpu_shader_fp64, 1).
+-define(GL_ARB_shader_subroutine, 1).
+-define(GL_ARB_tessellation_shader, 1).
+-define(GL_ARB_texture_buffer_object_rgb32, 1).
+-define(GL_ARB_transform_feedback2, 1).
+-define(GL_ARB_transform_feedback3, 1).
+-define(GL_ARB_ES2_compatibility, 1).
+-define(GL_ARB_get_program_binary, 1).
+-define(GL_ARB_separate_shader_objects, 1).
+-define(GL_ARB_vertex_attrib_64bit, 1).
+-define(GL_ARB_viewport_array, 1).
+-define(GL_ARB_cl_event, 1).
+-define(GL_ARB_debug_output, 1).
+-define(GL_ARB_robustness, 1).
+-define(GL_ARB_shader_stencil_export, 1).
+-define(GL_ARB_base_instance, 1).
+-define(GL_ARB_shading_language_420pack, 1).
+-define(GL_ARB_transform_feedback_instanced, 1).
+-define(GL_ARB_compressed_texture_pixel_storage, 1).
+-define(GL_ARB_conservative_depth, 1).
+-define(GL_ARB_internalformat_query, 1).
+-define(GL_ARB_map_buffer_alignment, 1).
+-define(GL_ARB_shader_atomic_counters, 1).
+-define(GL_ARB_shader_image_load_store, 1).
+-define(GL_ARB_shading_language_packing, 1).
+-define(GL_ARB_texture_storage, 1).
+-define(GL_EXT_abgr, 1).
+-define(GL_EXT_blend_color, 1).
+-define(GL_EXT_polygon_offset, 1).
+-define(GL_EXT_texture, 1).
+-define(GL_EXT_texture3D, 1).
+-define(GL_SGIS_texture_filter4, 1).
+-define(GL_EXT_subtexture, 1).
+-define(GL_EXT_copy_texture, 1).
+-define(GL_EXT_histogram, 1).
+-define(GL_EXT_convolution, 1).
+-define(GL_SGI_color_matrix, 1).
+-define(GL_SGI_color_table, 1).
+-define(GL_SGIX_pixel_texture, 1).
+-define(GL_SGIS_pixel_texture, 1).
+-define(GL_SGIS_texture4D, 1).
+-define(GL_SGI_texture_color_table, 1).
+-define(GL_EXT_cmyka, 1).
+-define(GL_EXT_texture_object, 1).
+-define(GL_SGIS_detail_texture, 1).
+-define(GL_SGIS_sharpen_texture, 1).
+-define(GL_EXT_packed_pixels, 1).
+-define(GL_SGIS_texture_lod, 1).
+-define(GL_SGIS_multisample, 1).
+-define(GL_EXT_rescale_normal, 1).
+-define(GL_EXT_vertex_array, 1).
+-define(GL_EXT_misc_attribute, 1).
+-define(GL_SGIS_generate_mipmap, 1).
+-define(GL_SGIX_clipmap, 1).
+-define(GL_SGIX_shadow, 1).
+-define(GL_SGIS_texture_edge_clamp, 1).
+-define(GL_SGIS_texture_border_clamp, 1).
+-define(GL_EXT_blend_minmax, 1).
+-define(GL_EXT_blend_subtract, 1).
+-define(GL_EXT_blend_logic_op, 1).
+-define(GL_SGIX_interlace, 1).
+-define(GL_SGIX_pixel_tiles, 1).
+-define(GL_SGIX_texture_select, 1).
+-define(GL_SGIX_sprite, 1).
+-define(GL_SGIX_texture_multi_buffer, 1).
+-define(GL_EXT_point_parameters, 1).
+-define(GL_SGIS_point_parameters, 1).
+-define(GL_SGIX_instruments, 1).
+-define(GL_SGIX_texture_scale_bias, 1).
+-define(GL_SGIX_framezoom, 1).
+-define(GL_SGIX_tag_sample_buffer, 1).
+-define(GL_SGIX_polynomial_ffd, 1).
+-define(GL_SGIX_reference_plane, 1).
+-define(GL_SGIX_flush_raster, 1).
+-define(GL_SGIX_depth_texture, 1).
+-define(GL_SGIS_fog_function, 1).
+-define(GL_SGIX_fog_offset, 1).
+-define(GL_HP_image_transform, 1).
+-define(GL_HP_convolution_border_modes, 1).
+-define(GL_SGIX_texture_add_env, 1).
+-define(GL_EXT_color_subtable, 1).
+-define(GL_PGI_vertex_hints, 1).
+-define(GL_PGI_misc_hints, 1).
+-define(GL_EXT_paletted_texture, 1).
+-define(GL_EXT_clip_volume_hint, 1).
+-define(GL_SGIX_list_priority, 1).
+-define(GL_SGIX_ir_instrument1, 1).
+-define(GL_SGIX_calligraphic_fragment, 1).
+-define(GL_SGIX_texture_lod_bias, 1).
+-define(GL_SGIX_shadow_ambient, 1).
+-define(GL_EXT_index_texture, 1).
+-define(GL_EXT_index_material, 1).
+-define(GL_EXT_index_func, 1).
+-define(GL_EXT_index_array_formats, 1).
+-define(GL_EXT_compiled_vertex_array, 1).
+-define(GL_EXT_cull_vertex, 1).
+-define(GL_SGIX_ycrcb, 1).
+-define(GL_SGIX_fragment_lighting, 1).
+-define(GL_IBM_rasterpos_clip, 1).
+-define(GL_HP_texture_lighting, 1).
+-define(GL_EXT_draw_range_elements, 1).
+-define(GL_WIN_phong_shading, 1).
+-define(GL_WIN_specular_fog, 1).
+-define(GL_EXT_light_texture, 1).
+-define(GL_SGIX_blend_alpha_minmax, 1).
+-define(GL_EXT_bgra, 1).
+-define(GL_SGIX_async, 1).
+-define(GL_SGIX_async_pixel, 1).
+-define(GL_SGIX_async_histogram, 1).
+-define(GL_INTEL_parallel_arrays, 1).
+-define(GL_HP_occlusion_test, 1).
+-define(GL_EXT_pixel_transform, 1).
+-define(GL_EXT_pixel_transform_color_table, 1).
+-define(GL_EXT_shared_texture_palette, 1).
+-define(GL_EXT_separate_specular_color, 1).
+-define(GL_EXT_secondary_color, 1).
+-define(GL_EXT_texture_perturb_normal, 1).
+-define(GL_EXT_multi_draw_arrays, 1).
+-define(GL_EXT_fog_coord, 1).
+-define(GL_REND_screen_coordinates, 1).
+-define(GL_EXT_coordinate_frame, 1).
+-define(GL_EXT_texture_env_combine, 1).
+-define(GL_APPLE_specular_vector, 1).
+-define(GL_APPLE_transform_hint, 1).
+-define(GL_SGIX_fog_scale, 1).
+-define(GL_SUNX_constant_data, 1).
+-define(GL_SUN_global_alpha, 1).
+-define(GL_SUN_triangle_list, 1).
+-define(GL_SUN_vertex, 1).
+-define(GL_EXT_blend_func_separate, 1).
+-define(GL_INGR_blend_func_separate, 1).
+-define(GL_INGR_color_clamp, 1).
+-define(GL_INGR_interlace_read, 1).
+-define(GL_EXT_stencil_wrap, 1).
+-define(GL_EXT_422_pixels, 1).
+-define(GL_NV_texgen_reflection, 1).
+-define(GL_SUN_convolution_border_modes, 1).
+-define(GL_EXT_texture_env_add, 1).
+-define(GL_EXT_texture_lod_bias, 1).
+-define(GL_EXT_texture_filter_anisotropic, 1).
+-define(GL_EXT_vertex_weighting, 1).
+-define(GL_NV_light_max_exponent, 1).
+-define(GL_NV_vertex_array_range, 1).
+-define(GL_NV_register_combiners, 1).
+-define(GL_NV_fog_distance, 1).
+-define(GL_NV_texgen_emboss, 1).
+-define(GL_NV_blend_square, 1).
+-define(GL_NV_texture_env_combine4, 1).
+-define(GL_MESA_resize_buffers, 1).
+-define(GL_MESA_window_pos, 1).
+-define(GL_IBM_cull_vertex, 1).
+-define(GL_IBM_multimode_draw_arrays, 1).
+-define(GL_IBM_vertex_array_lists, 1).
+-define(GL_SGIX_subsample, 1).
+-define(GL_SGIX_ycrcba, 1).
+-define(GL_SGIX_ycrcb_subsample, 1).
+-define(GL_SGIX_depth_pass_instrument, 1).
+-define(GL_3DFX_texture_compression_FXT1, 1).
+-define(GL_3DFX_multisample, 1).
+-define(GL_3DFX_tbuffer, 1).
+-define(GL_EXT_multisample, 1).
+-define(GL_SGIX_vertex_preclip, 1).
+-define(GL_SGIX_convolution_accuracy, 1).
+-define(GL_SGIX_resample, 1).
+-define(GL_SGIS_point_line_texgen, 1).
+-define(GL_SGIS_texture_color_mask, 1).
+-define(GL_SGIX_igloo_interface, 1).
+-define(GL_EXT_texture_env_dot3, 1).
+-define(GL_ATI_texture_mirror_once, 1).
+-define(GL_NV_fence, 1).
+-define(GL_NV_evaluators, 1).
+-define(GL_NV_packed_depth_stencil, 1).
+-define(GL_NV_register_combiners2, 1).
+-define(GL_NV_texture_compression_vtc, 1).
+-define(GL_NV_texture_rectangle, 1).
+-define(GL_NV_texture_shader, 1).
+-define(GL_NV_texture_shader2, 1).
+-define(GL_NV_vertex_array_range2, 1).
+-define(GL_NV_vertex_program, 1).
+-define(GL_SGIX_texture_coordinate_clamp, 1).
+-define(GL_SGIX_scalebias_hint, 1).
+-define(GL_OML_interlace, 1).
+-define(GL_OML_subsample, 1).
+-define(GL_OML_resample, 1).
+-define(GL_NV_copy_depth_to_color, 1).
+-define(GL_ATI_envmap_bumpmap, 1).
+-define(GL_ATI_fragment_shader, 1).
+-define(GL_ATI_pn_triangles, 1).
+-define(GL_ATI_vertex_array_object, 1).
+-define(GL_EXT_vertex_shader, 1).
+-define(GL_ATI_vertex_streams, 1).
+-define(GL_ATI_element_array, 1).
+-define(GL_SUN_mesh_array, 1).
+-define(GL_SUN_slice_accum, 1).
+-define(GL_NV_multisample_filter_hint, 1).
+-define(GL_NV_depth_clamp, 1).
+-define(GL_NV_occlusion_query, 1).
+-define(GL_NV_point_sprite, 1).
+-define(GL_NV_texture_shader3, 1).
+-define(GL_NV_vertex_program1_1, 1).
+-define(GL_EXT_shadow_funcs, 1).
+-define(GL_EXT_stencil_two_side, 1).
+-define(GL_ATI_text_fragment_shader, 1).
+-define(GL_APPLE_client_storage, 1).
+-define(GL_APPLE_element_array, 1).
+-define(GL_APPLE_fence, 1).
+-define(GL_APPLE_vertex_array_object, 1).
+-define(GL_APPLE_vertex_array_range, 1).
+-define(GL_APPLE_ycbcr_422, 1).
+-define(GL_S3_s3tc, 1).
+-define(GL_ATI_draw_buffers, 1).
+-define(GL_ATI_pixel_format_float, 1).
+-define(GL_ATI_texture_env_combine3, 1).
+-define(GL_ATI_texture_float, 1).
+-define(GL_NV_float_buffer, 1).
+-define(GL_NV_fragment_program, 1).
+-define(GL_NV_half_float, 1).
+-define(GL_NV_pixel_data_range, 1).
+-define(GL_NV_primitive_restart, 1).
+-define(GL_NV_texture_expand_normal, 1).
+-define(GL_NV_vertex_program2, 1).
+-define(GL_ATI_map_object_buffer, 1).
+-define(GL_ATI_separate_stencil, 1).
+-define(GL_ATI_vertex_attrib_array_object, 1).
+-define(GL_OES_read_format, 1).
+-define(GL_EXT_depth_bounds_test, 1).
+-define(GL_EXT_texture_mirror_clamp, 1).
+-define(GL_EXT_blend_equation_separate, 1).
+-define(GL_MESA_pack_invert, 1).
+-define(GL_MESA_ycbcr_texture, 1).
+-define(GL_EXT_pixel_buffer_object, 1).
+-define(GL_NV_fragment_program_option, 1).
+-define(GL_NV_fragment_program2, 1).
+-define(GL_NV_vertex_program2_option, 1).
+-define(GL_NV_vertex_program3, 1).
+-define(GL_EXT_framebuffer_object, 1).
+-define(GL_GREMEDY_string_marker, 1).
+-define(GL_EXT_packed_depth_stencil, 1).
+-define(GL_EXT_stencil_clear_tag, 1).
+-define(GL_EXT_texture_sRGB, 1).
+-define(GL_EXT_framebuffer_blit, 1).
+-define(GL_EXT_framebuffer_multisample, 1).
+-define(GL_MESAX_texture_stack, 1).
+-define(GL_EXT_timer_query, 1).
+-define(GL_EXT_gpu_program_parameters, 1).
+-define(GL_APPLE_flush_buffer_range, 1).
+-define(GL_NV_gpu_program4, 1).
+-define(GL_NV_geometry_program4, 1).
+-define(GL_EXT_geometry_shader4, 1).
+-define(GL_NV_vertex_program4, 1).
+-define(GL_EXT_gpu_shader4, 1).
+-define(GL_EXT_draw_instanced, 1).
+-define(GL_EXT_packed_float, 1).
+-define(GL_EXT_texture_array, 1).
+-define(GL_EXT_texture_buffer_object, 1).
+-define(GL_EXT_texture_compression_latc, 1).
+-define(GL_EXT_texture_compression_rgtc, 1).
+-define(GL_EXT_texture_shared_exponent, 1).
+-define(GL_NV_depth_buffer_float, 1).
+-define(GL_NV_fragment_program4, 1).
+-define(GL_NV_framebuffer_multisample_coverage, 1).
+-define(GL_EXT_framebuffer_sRGB, 1).
+-define(GL_NV_geometry_shader4, 1).
+-define(GL_NV_parameter_buffer_object, 1).
+-define(GL_EXT_draw_buffers2, 1).
+-define(GL_NV_transform_feedback, 1).
+-define(GL_EXT_bindable_uniform, 1).
+-define(GL_EXT_texture_integer, 1).
+-define(GL_GREMEDY_frame_terminator, 1).
+-define(GL_NV_conditional_render, 1).
+-define(GL_NV_present_video, 1).
+-define(GL_EXT_transform_feedback, 1).
+-define(GL_EXT_direct_state_access, 1).
+-define(GL_EXT_vertex_array_bgra, 1).
+-define(GL_EXT_texture_swizzle, 1).
+-define(GL_NV_explicit_multisample, 1).
+-define(GL_NV_transform_feedback2, 1).
+-define(GL_ATI_meminfo, 1).
+-define(GL_AMD_performance_monitor, 1).
+-define(GL_AMD_texture_texture4, 1).
+-define(GL_AMD_vertex_shader_tesselator, 1).
+-define(GL_EXT_provoking_vertex, 1).
+-define(GL_EXT_texture_snorm, 1).
+-define(GL_AMD_draw_buffers_blend, 1).
+-define(GL_APPLE_texture_range, 1).
+-define(GL_APPLE_float_pixels, 1).
+-define(GL_APPLE_vertex_program_evaluators, 1).
+-define(GL_APPLE_aux_depth_stencil, 1).
+-define(GL_APPLE_object_purgeable, 1).
+-define(GL_APPLE_row_bytes, 1).
+-define(GL_APPLE_rgb_422, 1).
+-define(GL_NV_video_capture, 1).
+-define(GL_NV_copy_image, 1).
+-define(GL_EXT_separate_shader_objects, 1).
+-define(GL_NV_parameter_buffer_object2, 1).
+-define(GL_NV_shader_buffer_load, 1).
+-define(GL_NV_vertex_buffer_unified_memory, 1).
+-define(GL_NV_texture_barrier, 1).
+-define(GL_AMD_shader_stencil_export, 1).
+-define(GL_AMD_seamless_cubemap_per_texture, 1).
+-define(GL_AMD_conservative_depth, 1).
+-define(GL_EXT_shader_image_load_store, 1).
+-define(GL_EXT_vertex_attrib_64bit, 1).
+-define(GL_NV_gpu_program5, 1).
+-define(GL_NV_gpu_shader5, 1).
+-define(GL_NV_shader_buffer_store, 1).
+-define(GL_NV_tessellation_program5, 1).
+-define(GL_NV_vertex_attrib_integer_64bit, 1).
+-define(GL_NV_multisample_coverage, 1).
+-define(GL_AMD_name_gen_delete, 1).
+-define(GL_AMD_debug_output, 1).
+-define(GL_NV_vdpau_interop, 1).
+-define(GL_AMD_transform_feedback3_lines_triangles, 1).
+-define(GL_AMD_depth_clamp_separate, 1).
+-define(GL_EXT_texture_sRGB_decode, 1).
+-define(GL_NV_texture_multisample, 1).
+-define(GL_AMD_blend_minmax_factor, 1).
+-define(GL_AMD_sample_positions, 1).
+-define(GL_EXT_x11_sync_object, 1).
+-define(GL_AMD_multi_draw_indirect, 1).
+-define(GL_EXT_framebuffer_multisample_blit_scaled, 1).
+-define(GL_AMD_pinned_memory, 1).
+-define(GL_AMD_stencil_operation_extended, 1).
diff --git a/lib/wx/include/glu.hrl b/lib/wx/include/glu.hrl
index a2ab55d054..dc55c5bb96 100644
--- a/lib/wx/include/glu.hrl
+++ b/lib/wx/include/glu.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -174,4 +174,4 @@
-define(GLU_TESS_WINDING_POSITIVE, 100132).
-define(GLU_TESS_WINDING_NEGATIVE, 100133).
-define(GLU_TESS_WINDING_ABS_GEQ_TWO, 100134).
--define(GLU_TESS_MAX_COORD, ?1.0e150).
+-define(GLU_TESS_MAX_COORD, 1.0e150).
diff --git a/lib/wx/include/wx.hrl b/lib/wx/include/wx.hrl
index 029b9a88df..62979908a6 100644
--- a/lib/wx/include/wx.hrl
+++ b/lib/wx/include/wx.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,259 +22,307 @@
%% Each event record may be sent for one or more event types.
%% The mapping to wxWidgets is one record per class.
-%% @type wx() = #wx{id=integer(), obj=wx:wxObject(), userData=term(), event=Rec}. Rec is a event record.
--record(wx, {id, %% Integer Identity of object.
- obj, %% Object reference that was used in the connect call.
- userData, %% User data specified in the connect call.
- event}).%% The event record
+-record(wx, {id :: integer(), %% Integer Identity of object.
+ obj :: wx:wx_object(), %% Object reference that was used in the connect call.
+ userData :: term(), %% User data specified in the connect call.
+ event :: event() %% The event record
+ }).
+-type wx() :: #wx{}. %% wx event record
%% Here comes the definitions of all event records.
%% they contain the event type and possible some extra information.
-%% @type wxNavigationKey() = #wxNavigationKey{type=wxEventType(),flags=integer(),focus=wxWindow:wxWindow()}.
-%% <dl><dt>EventType:</dt> <dd><em>navigation_key</em></dd></dl>
-%% Callback event: {@link wxNavigationKeyEvent}
--record(wxNavigationKey,{type, flags,focus}).
+-record(wxNavigationKey,{type :: wxNavigationKeyEventType(), %% Callback event: {@link wxNavigationKeyEvent}
+ flags :: integer(),
+ focus :: wxWindow:wxWindow()}).
+-type wxNavigationKeyEventType() :: navigation_key.
+-type wxNavigationKey() :: #wxNavigationKey{}. %% Callback event: {@link wxNavigationKeyEvent}
-%% @type wxSash() = #wxSash{type=wxEventType(),edge=WxSashEdgePosition,dragRect={X::integer(), Y::integer(), W::integer(), H::integer()},dragStatus=WxSashDragStatus}.
-%% <dl><dt>EventType:</dt> <dd><em>sash_dragged</em></dd></dl>
-%% Callback event: {@link wxSashEvent}
--record(wxSash,{type, edge,dragRect,dragStatus}).
+-record(wxSash,{type :: wxSashEventType(), %% Callback event: {@link wxSashEvent}
+ edge :: wx:wx_enum(),
+ dragRect :: {X::integer(), Y::integer(), W::integer(), H::integer()},
+ dragStatus :: wx:wx_enum()}).
+-type wxSashEventType() :: sash_dragged.
+-type wxSash() :: #wxSash{}. %% Callback event: {@link wxSashEvent}
-%% @type wxList() = #wxList{type=wxEventType(),code=integer(),oldItemIndex=integer(),itemIndex=integer(),col=integer(),pointDrag={X::integer(), Y::integer()}}.
-%% <dl><dt>EventType:</dt> <dd><em>command_list_begin_drag</em>, <em>command_list_begin_rdrag</em>, <em>command_list_begin_label_edit</em>, <em>command_list_end_label_edit</em>, <em>command_list_delete_item</em>, <em>command_list_delete_all_items</em>, <em>command_list_key_down</em>, <em>command_list_insert_item</em>, <em>command_list_col_click</em>, <em>command_list_col_right_click</em>, <em>command_list_col_begin_drag</em>, <em>command_list_col_dragging</em>, <em>command_list_col_end_drag</em>, <em>command_list_item_selected</em>, <em>command_list_item_deselected</em>, <em>command_list_item_right_click</em>, <em>command_list_item_middle_click</em>, <em>command_list_item_activated</em>, <em>command_list_item_focused</em>, <em>command_list_cache_hint</em></dd></dl>
-%% Callback event: {@link wxListEvent}
--record(wxList,{type, code,oldItemIndex,itemIndex,col,pointDrag}).
+-record(wxList,{type :: wxListEventType(), %% Callback event: {@link wxListEvent}
+ code :: integer(),
+ oldItemIndex :: integer(),
+ itemIndex :: integer(),
+ col :: integer(),
+ pointDrag :: {X::integer(), Y::integer()}}).
+-type wxListEventType() :: command_list_begin_drag | command_list_begin_rdrag | command_list_begin_label_edit | command_list_end_label_edit | command_list_delete_item | command_list_delete_all_items | command_list_key_down | command_list_insert_item | command_list_col_click | command_list_col_right_click | command_list_col_begin_drag | command_list_col_dragging | command_list_col_end_drag | command_list_item_selected | command_list_item_deselected | command_list_item_right_click | command_list_item_middle_click | command_list_item_activated | command_list_item_focused | command_list_cache_hint.
+-type wxList() :: #wxList{}. %% Callback event: {@link wxListEvent}
-%% @type wxNotebook() = #wxNotebook{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_notebook_page_changed</em>, <em>command_notebook_page_changing</em></dd></dl>
-%% Callback event: {@link wxNotebookEvent}
--record(wxNotebook, {type}).
+-record(wxNotebook, {type :: wxNotebookEventType()}). %% Callback event: {@link wxNotebookEvent}
+-type wxNotebookEventType() :: command_notebook_page_changed | command_notebook_page_changing.
+-type wxNotebook() :: #wxNotebook{}. %% Callback event: {@link wxNotebookEvent}
-%% @type wxDisplayChanged() = #wxDisplayChanged{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>display_changed</em></dd></dl>
-%% Callback event: {@link wxDisplayChangedEvent}
--record(wxDisplayChanged, {type}).
+-record(wxDisplayChanged, {type :: wxDisplayChangedEventType()}). %% Callback event: {@link wxDisplayChangedEvent}
+-type wxDisplayChangedEventType() :: display_changed.
+-type wxDisplayChanged() :: #wxDisplayChanged{}. %% Callback event: {@link wxDisplayChangedEvent}
-%% @type wxErase() = #wxErase{type=wxEventType(),dc=wxDC:wxDC()}.
-%% <dl><dt>EventType:</dt> <dd><em>erase_background</em></dd></dl>
-%% Callback event: {@link wxEraseEvent}
--record(wxErase,{type, dc}).
+-record(wxErase,{type :: wxEraseEventType(), %% Callback event: {@link wxEraseEvent}
+ dc :: wxDC:wxDC()}).
+-type wxEraseEventType() :: erase_background.
+-type wxErase() :: #wxErase{}. %% Callback event: {@link wxEraseEvent}
-%% @type wxKey() = #wxKey{type=wxEventType(),x=integer(),y=integer(),keyCode=integer(),controlDown=bool(),shiftDown=bool(),altDown=bool(),metaDown=bool(),scanCode=bool(),uniChar=integer(),rawCode=integer(),rawFlags=integer()}.
-%% <dl><dt>EventType:</dt> <dd><em>char</em>, <em>char_hook</em>, <em>key_down</em>, <em>key_up</em></dd></dl>
-%% Callback event: {@link wxKeyEvent}
--record(wxKey,{type, x,y,keyCode,controlDown,shiftDown,altDown,metaDown,scanCode,uniChar,rawCode,rawFlags}).
+-record(wxKey,{type :: wxKeyEventType(), %% Callback event: {@link wxKeyEvent}
+ x :: integer(),
+ y :: integer(),
+ keyCode :: integer(),
+ controlDown :: boolean(),
+ shiftDown :: boolean(),
+ altDown :: boolean(),
+ metaDown :: boolean(),
+ scanCode :: boolean(),
+ uniChar :: integer(),
+ rawCode :: integer(),
+ rawFlags :: integer()}).
+-type wxKeyEventType() :: char | char_hook | key_down | key_up.
+-type wxKey() :: #wxKey{}. %% Callback event: {@link wxKeyEvent}
-%% @type wxWindowDestroy() = #wxWindowDestroy{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>destroy</em></dd></dl>
-%% Callback event: {@link wxWindowDestroyEvent}
--record(wxWindowDestroy, {type}).
+-record(wxWindowDestroy, {type :: wxWindowDestroyEventType()}). %% Callback event: {@link wxWindowDestroyEvent}
+-type wxWindowDestroyEventType() :: destroy.
+-type wxWindowDestroy() :: #wxWindowDestroy{}. %% Callback event: {@link wxWindowDestroyEvent}
-%% @type wxCalendar() = #wxCalendar{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>calendar_sel_changed</em>, <em>calendar_day_changed</em>, <em>calendar_month_changed</em>, <em>calendar_year_changed</em>, <em>calendar_doubleclicked</em>, <em>calendar_weekday_clicked</em></dd></dl>
-%% Callback event: {@link wxCalendarEvent}
--record(wxCalendar, {type}).
+-record(wxCalendar, {type :: wxCalendarEventType()}). %% Callback event: {@link wxCalendarEvent}
+-type wxCalendarEventType() :: calendar_sel_changed | calendar_day_changed | calendar_month_changed | calendar_year_changed | calendar_doubleclicked | calendar_weekday_clicked.
+-type wxCalendar() :: #wxCalendar{}. %% Callback event: {@link wxCalendarEvent}
-%% @type wxSplitter() = #wxSplitter{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_splitter_sash_pos_changed</em>, <em>command_splitter_sash_pos_changing</em>, <em>command_splitter_doubleclicked</em>, <em>command_splitter_unsplit</em></dd></dl>
-%% Callback event: {@link wxSplitterEvent}
--record(wxSplitter, {type}).
+-record(wxSplitter, {type :: wxSplitterEventType()}). %% Callback event: {@link wxSplitterEvent}
+-type wxSplitterEventType() :: command_splitter_sash_pos_changed | command_splitter_sash_pos_changing | command_splitter_doubleclicked | command_splitter_unsplit.
+-type wxSplitter() :: #wxSplitter{}. %% Callback event: {@link wxSplitterEvent}
-%% @type wxScroll() = #wxScroll{type=wxEventType(),commandInt=integer(),extraLong=integer()}.
-%% <dl><dt>EventType:</dt> <dd><em>scroll_top</em>, <em>scroll_bottom</em>, <em>scroll_lineup</em>, <em>scroll_linedown</em>, <em>scroll_pageup</em>, <em>scroll_pagedown</em>, <em>scroll_thumbtrack</em>, <em>scroll_thumbrelease</em>, <em>scroll_changed</em></dd></dl>
-%% Callback event: {@link wxScrollEvent}
--record(wxScroll,{type, commandInt,extraLong}).
+-record(wxScroll,{type :: wxScrollEventType(), %% Callback event: {@link wxScrollEvent}
+ commandInt :: integer(),
+ extraLong :: integer()}).
+-type wxScrollEventType() :: scroll_top | scroll_bottom | scroll_lineup | scroll_linedown | scroll_pageup | scroll_pagedown | scroll_thumbtrack | scroll_thumbrelease | scroll_changed.
+-type wxScroll() :: #wxScroll{}. %% Callback event: {@link wxScrollEvent}
-%% @type wxMenu() = #wxMenu{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>menu_open</em>, <em>menu_close</em>, <em>menu_highlight</em></dd></dl>
-%% Callback event: {@link wxMenuEvent}
--record(wxMenu, {type}).
+-record(wxMenu, {type :: wxMenuEventType()}). %% Callback event: {@link wxMenuEvent}
+-type wxMenuEventType() :: menu_open | menu_close | menu_highlight.
+-type wxMenu() :: #wxMenu{}. %% Callback event: {@link wxMenuEvent}
-%% @type wxContextMenu() = #wxContextMenu{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>context_menu</em></dd></dl>
-%% Callback event: {@link wxContextMenuEvent}
--record(wxContextMenu, {type}).
+-record(wxContextMenu, {type :: wxContextMenuEventType()}). %% Callback event: {@link wxContextMenuEvent}
+-type wxContextMenuEventType() :: context_menu.
+-type wxContextMenu() :: #wxContextMenu{}. %% Callback event: {@link wxContextMenuEvent}
-%% @type wxShow() = #wxShow{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>show</em></dd></dl>
-%% Callback event: {@link wxShowEvent}
--record(wxShow, {type}).
+-record(wxShow, {type :: wxShowEventType()}). %% Callback event: {@link wxShowEvent}
+-type wxShowEventType() :: show.
+-type wxShow() :: #wxShow{}. %% Callback event: {@link wxShowEvent}
-%% @type wxSpin() = #wxSpin{type=wxEventType(),commandInt=integer()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_spinctrl_updated</em>, <em>spin_up</em>, <em>spin_down</em>, <em>spin</em></dd></dl>
-%% Callback event: {@link wxSpinEvent}
--record(wxSpin,{type, commandInt}).
+-record(wxSpin,{type :: wxSpinEventType(), %% Callback event: {@link wxSpinEvent}
+ commandInt :: integer()}).
+-type wxSpinEventType() :: command_spinctrl_updated | spin_up | spin_down | spin.
+-type wxSpin() :: #wxSpin{}. %% Callback event: {@link wxSpinEvent}
-%% @type wxSetCursor() = #wxSetCursor{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>set_cursor</em></dd></dl>
-%% Callback event: {@link wxSetCursorEvent}
--record(wxSetCursor, {type}).
+-record(wxSetCursor, {type :: wxSetCursorEventType()}). %% Callback event: {@link wxSetCursorEvent}
+-type wxSetCursorEventType() :: set_cursor.
+-type wxSetCursor() :: #wxSetCursor{}. %% Callback event: {@link wxSetCursorEvent}
-%% @type wxFontPicker() = #wxFontPicker{type=wxEventType(),font=wxFont:wxFont()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_fontpicker_changed</em></dd></dl>
-%% Callback event: {@link wxFontPickerEvent}
--record(wxFontPicker,{type, font}).
+-record(wxFontPicker,{type :: wxFontPickerEventType(), %% Callback event: {@link wxFontPickerEvent}
+ font :: wxFont:wxFont()}).
+-type wxFontPickerEventType() :: command_fontpicker_changed.
+-type wxFontPicker() :: #wxFontPicker{}. %% Callback event: {@link wxFontPickerEvent}
-%% @type wxScrollWin() = #wxScrollWin{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>scrollwin_top</em>, <em>scrollwin_bottom</em>, <em>scrollwin_lineup</em>, <em>scrollwin_linedown</em>, <em>scrollwin_pageup</em>, <em>scrollwin_pagedown</em>, <em>scrollwin_thumbtrack</em>, <em>scrollwin_thumbrelease</em></dd></dl>
-%% Callback event: {@link wxScrollWinEvent}
--record(wxScrollWin, {type}).
+-record(wxScrollWin, {type :: wxScrollWinEventType()}). %% Callback event: {@link wxScrollWinEvent}
+-type wxScrollWinEventType() :: scrollwin_top | scrollwin_bottom | scrollwin_lineup | scrollwin_linedown | scrollwin_pageup | scrollwin_pagedown | scrollwin_thumbtrack | scrollwin_thumbrelease.
+-type wxScrollWin() :: #wxScrollWin{}. %% Callback event: {@link wxScrollWinEvent}
-%% @type wxPaint() = #wxPaint{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>paint</em>, <em>paint_icon</em></dd></dl>
-%% Callback event: {@link wxPaintEvent}
--record(wxPaint, {type}).
+-record(wxPaint, {type :: wxPaintEventType()}). %% Callback event: {@link wxPaintEvent}
+-type wxPaintEventType() :: paint | paint_icon.
+-type wxPaint() :: #wxPaint{}. %% Callback event: {@link wxPaintEvent}
-%% @type wxChildFocus() = #wxChildFocus{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>child_focus</em></dd></dl>
-%% Callback event: {@link wxChildFocusEvent}
--record(wxChildFocus, {type}).
+-record(wxChildFocus, {type :: wxChildFocusEventType()}). %% Callback event: {@link wxChildFocusEvent}
+-type wxChildFocusEventType() :: child_focus.
+-type wxChildFocus() :: #wxChildFocus{}. %% Callback event: {@link wxChildFocusEvent}
-%% @type wxMaximize() = #wxMaximize{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>maximize</em></dd></dl>
-%% Callback event: {@link wxMaximizeEvent}
--record(wxMaximize, {type}).
+-record(wxMaximize, {type :: wxMaximizeEventType()}). %% Callback event: {@link wxMaximizeEvent}
+-type wxMaximizeEventType() :: maximize.
+-type wxMaximize() :: #wxMaximize{}. %% Callback event: {@link wxMaximizeEvent}
-%% @type wxFileDirPicker() = #wxFileDirPicker{type=wxEventType(),path=string()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_filepicker_changed</em>, <em>command_dirpicker_changed</em></dd></dl>
-%% Callback event: {@link wxFileDirPickerEvent}
--record(wxFileDirPicker,{type, path}).
+-record(wxFileDirPicker,{type :: wxFileDirPickerEventType(), %% Callback event: {@link wxFileDirPickerEvent}
+ path :: unicode:chardata()}).
+-type wxFileDirPickerEventType() :: command_filepicker_changed | command_dirpicker_changed.
+-type wxFileDirPicker() :: #wxFileDirPicker{}. %% Callback event: {@link wxFileDirPickerEvent}
-%% @type wxFocus() = #wxFocus{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>set_focus</em>, <em>kill_focus</em></dd></dl>
-%% Callback event: {@link wxFocusEvent}
--record(wxFocus, {type}).
+-record(wxFocus, {type :: wxFocusEventType()}). %% Callback event: {@link wxFocusEvent}
+-type wxFocusEventType() :: set_focus | kill_focus.
+-type wxFocus() :: #wxFocus{}. %% Callback event: {@link wxFocusEvent}
-%% @type wxDate() = #wxDate{type=wxEventType(),date=wx:datetime()}.
-%% <dl><dt>EventType:</dt> <dd><em>date_changed</em></dd></dl>
-%% Callback event: {@link wxDateEvent}
--record(wxDate,{type, date}).
+-record(wxDate,{type :: wxDateEventType(), %% Callback event: {@link wxDateEvent}
+ date :: wx:wx_datetime()}).
+-type wxDateEventType() :: date_changed.
+-type wxDate() :: #wxDate{}. %% Callback event: {@link wxDateEvent}
-%% @type wxHtmlLink() = #wxHtmlLink{type=wxEventType(),linkInfo=wx:wxHtmlLinkInfo()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_html_link_clicked</em></dd></dl>
-%% Callback event: {@link wxHtmlLinkEvent}
--record(wxHtmlLink,{type, linkInfo}).
+-record(wxHtmlLink,{type :: wxHtmlLinkEventType(), %% Callback event: {@link wxHtmlLinkEvent}
+ linkInfo :: wx:wx_wxHtmlLinkInfo()}).
+-type wxHtmlLinkEventType() :: command_html_link_clicked.
+-type wxHtmlLink() :: #wxHtmlLink{}. %% Callback event: {@link wxHtmlLinkEvent}
-%% @type wxHelp() = #wxHelp{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>help</em>, <em>detailed_help</em></dd></dl>
-%% Callback event: {@link wxHelpEvent}
--record(wxHelp, {type}).
+-record(wxHelp, {type :: wxHelpEventType()}). %% Callback event: {@link wxHelpEvent}
+-type wxHelpEventType() :: help | detailed_help.
+-type wxHelp() :: #wxHelp{}. %% Callback event: {@link wxHelpEvent}
-%% @type wxStyledText() = #wxStyledText{type=wxEventType(),position=integer(),key=integer(),modifiers=integer(),modificationType=integer(),text=string(),length=integer(),linesAdded=integer(),line=integer(),foldLevelNow=integer(),foldLevelPrev=integer(),margin=integer(),message=integer(),wParam=integer(),lParam=integer(),listType=integer(),x=integer(),y=integer(),dragText=string(),dragAllowMove=bool(),dragResult=WxDragResult}.
-%% <dl><dt>EventType:</dt> <dd><em>stc_change</em>, <em>stc_styleneeded</em>, <em>stc_charadded</em>, <em>stc_savepointreached</em>, <em>stc_savepointleft</em>, <em>stc_romodifyattempt</em>, <em>stc_key</em>, <em>stc_doubleclick</em>, <em>stc_updateui</em>, <em>stc_modified</em>, <em>stc_macrorecord</em>, <em>stc_marginclick</em>, <em>stc_needshown</em>, <em>stc_painted</em>, <em>stc_userlistselection</em>, <em>stc_uridropped</em>, <em>stc_dwellstart</em>, <em>stc_dwellend</em>, <em>stc_start_drag</em>, <em>stc_drag_over</em>, <em>stc_do_drop</em>, <em>stc_zoom</em>, <em>stc_hotspot_click</em>, <em>stc_hotspot_dclick</em>, <em>stc_calltip_click</em>, <em>stc_autocomp_selection</em></dd></dl>
-%% Callback event: {@link wxStyledTextEvent}
--record(wxStyledText,{type, position,key,modifiers,modificationType,text,length,linesAdded,line,foldLevelNow,foldLevelPrev,margin,message,wParam,lParam,listType,x,y,dragText,dragAllowMove,dragResult}).
+-record(wxStyledText,{type :: wxStyledTextEventType(), %% Callback event: {@link wxStyledTextEvent}
+ position :: integer(),
+ key :: integer(),
+ modifiers :: integer(),
+ modificationType :: integer(),
+ text :: unicode:chardata(),
+ length :: integer(),
+ linesAdded :: integer(),
+ line :: integer(),
+ foldLevelNow :: integer(),
+ foldLevelPrev :: integer(),
+ margin :: integer(),
+ message :: integer(),
+ wParam :: integer(),
+ lParam :: integer(),
+ listType :: integer(),
+ x :: integer(),
+ y :: integer(),
+ dragText :: unicode:chardata(),
+ dragAllowMove :: boolean(),
+ dragResult :: wx:wx_enum()}).
+-type wxStyledTextEventType() :: stc_change | stc_styleneeded | stc_charadded | stc_savepointreached | stc_savepointleft | stc_romodifyattempt | stc_key | stc_doubleclick | stc_updateui | stc_modified | stc_macrorecord | stc_marginclick | stc_needshown | stc_painted | stc_userlistselection | stc_uridropped | stc_dwellstart | stc_dwellend | stc_start_drag | stc_drag_over | stc_do_drop | stc_zoom | stc_hotspot_click | stc_hotspot_dclick | stc_calltip_click | stc_autocomp_selection.
+-type wxStyledText() :: #wxStyledText{}. %% Callback event: {@link wxStyledTextEvent}
-%% @type wxSysColourChanged() = #wxSysColourChanged{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>sys_colour_changed</em></dd></dl>
-%% Callback event: {@link wxSysColourChangedEvent}
--record(wxSysColourChanged, {type}).
+-record(wxSysColourChanged, {type :: wxSysColourChangedEventType()}). %% Callback event: {@link wxSysColourChangedEvent}
+-type wxSysColourChangedEventType() :: sys_colour_changed.
+-type wxSysColourChanged() :: #wxSysColourChanged{}. %% Callback event: {@link wxSysColourChangedEvent}
-%% @type wxGrid() = #wxGrid{type=wxEventType(),row=integer(),col=integer(),x=integer(),y=integer(),selecting=bool(),control=bool(),meta=bool(),shift=bool(),alt=bool()}.
-%% <dl><dt>EventType:</dt> <dd><em>grid_cell_left_click</em>, <em>grid_cell_right_click</em>, <em>grid_cell_left_dclick</em>, <em>grid_cell_right_dclick</em>, <em>grid_label_left_click</em>, <em>grid_label_right_click</em>, <em>grid_label_left_dclick</em>, <em>grid_label_right_dclick</em>, <em>grid_row_size</em>, <em>grid_col_size</em>, <em>grid_range_select</em>, <em>grid_cell_change</em>, <em>grid_select_cell</em>, <em>grid_editor_shown</em>, <em>grid_editor_hidden</em>, <em>grid_editor_created</em>, <em>grid_cell_begin_drag</em></dd></dl>
-%% Callback event: {@link wxGridEvent}
--record(wxGrid,{type, row,col,x,y,selecting,control,meta,shift,alt}).
+-record(wxGrid,{type :: wxGridEventType(), %% Callback event: {@link wxGridEvent}
+ row :: integer(),
+ col :: integer(),
+ x :: integer(),
+ y :: integer(),
+ selecting :: boolean(),
+ control :: boolean(),
+ meta :: boolean(),
+ shift :: boolean(),
+ alt :: boolean()}).
+-type wxGridEventType() :: grid_cell_left_click | grid_cell_right_click | grid_cell_left_dclick | grid_cell_right_dclick | grid_label_left_click | grid_label_right_click | grid_label_left_dclick | grid_label_right_dclick | grid_row_size | grid_col_size | grid_range_select | grid_cell_change | grid_select_cell | grid_editor_shown | grid_editor_hidden | grid_editor_created | grid_cell_begin_drag.
+-type wxGrid() :: #wxGrid{}. %% Callback event: {@link wxGridEvent}
-%% @type wxPaletteChanged() = #wxPaletteChanged{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>palette_changed</em></dd></dl>
-%% Callback event: {@link wxPaletteChangedEvent}
--record(wxPaletteChanged, {type}).
+-record(wxPaletteChanged, {type :: wxPaletteChangedEventType()}). %% Callback event: {@link wxPaletteChangedEvent}
+-type wxPaletteChangedEventType() :: palette_changed.
+-type wxPaletteChanged() :: #wxPaletteChanged{}. %% Callback event: {@link wxPaletteChangedEvent}
-%% @type wxUpdateUI() = #wxUpdateUI{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>update_ui</em></dd></dl>
-%% Callback event: {@link wxUpdateUIEvent}
--record(wxUpdateUI, {type}).
+-record(wxUpdateUI, {type :: wxUpdateUIEventType()}). %% Callback event: {@link wxUpdateUIEvent}
+-type wxUpdateUIEventType() :: update_ui.
+-type wxUpdateUI() :: #wxUpdateUI{}. %% Callback event: {@link wxUpdateUIEvent}
-%% @type wxSize() = #wxSize{type=wxEventType(),size={W::integer(), H::integer()},rect={X::integer(), Y::integer(), W::integer(), H::integer()}}.
-%% <dl><dt>EventType:</dt> <dd><em>size</em></dd></dl>
-%% Callback event: {@link wxSizeEvent}
--record(wxSize,{type, size,rect}).
+-record(wxSize,{type :: wxSizeEventType(), %% Callback event: {@link wxSizeEvent}
+ size :: {W::integer(), H::integer()},
+ rect :: {X::integer(), Y::integer(), W::integer(), H::integer()}}).
+-type wxSizeEventType() :: size.
+-type wxSize() :: #wxSize{}. %% Callback event: {@link wxSizeEvent}
-%% @type wxIconize() = #wxIconize{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>iconize</em></dd></dl>
-%% Callback event: {@link wxIconizeEvent}
--record(wxIconize, {type}).
+-record(wxIconize, {type :: wxIconizeEventType()}). %% Callback event: {@link wxIconizeEvent}
+-type wxIconizeEventType() :: iconize.
+-type wxIconize() :: #wxIconize{}. %% Callback event: {@link wxIconizeEvent}
-%% @type wxAuiNotebook() = #wxAuiNotebook{type=wxEventType(),old_selection=integer(),selection=integer(),drag_source=wxAuiNotebook:wxAuiNotebook()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_auinotebook_page_close</em>, <em>command_auinotebook_page_changed</em>, <em>command_auinotebook_page_changing</em>, <em>command_auinotebook_button</em>, <em>command_auinotebook_begin_drag</em>, <em>command_auinotebook_end_drag</em>, <em>command_auinotebook_drag_motion</em>, <em>command_auinotebook_allow_dnd</em>, <em>command_auinotebook_tab_middle_down</em>, <em>command_auinotebook_tab_middle_up</em>, <em>command_auinotebook_tab_right_down</em>, <em>command_auinotebook_tab_right_up</em>, <em>command_auinotebook_page_closed</em>, <em>command_auinotebook_drag_done</em>, <em>command_auinotebook_bg_dclick</em></dd></dl>
-%% Callback event: {@link wxAuiNotebookEvent}
--record(wxAuiNotebook,{type, old_selection,selection,drag_source}).
+-record(wxAuiNotebook,{type :: wxAuiNotebookEventType(), %% Callback event: {@link wxAuiNotebookEvent}
+ old_selection :: integer(),
+ selection :: integer(),
+ drag_source :: wxAuiNotebook:wxAuiNotebook()}).
+-type wxAuiNotebookEventType() :: command_auinotebook_page_close | command_auinotebook_page_changed | command_auinotebook_page_changing | command_auinotebook_button | command_auinotebook_begin_drag | command_auinotebook_end_drag | command_auinotebook_drag_motion | command_auinotebook_allow_dnd | command_auinotebook_tab_middle_down | command_auinotebook_tab_middle_up | command_auinotebook_tab_right_down | command_auinotebook_tab_right_up | command_auinotebook_page_closed | command_auinotebook_drag_done | command_auinotebook_bg_dclick.
+-type wxAuiNotebook() :: #wxAuiNotebook{}. %% Callback event: {@link wxAuiNotebookEvent}
-%% @type wxClose() = #wxClose{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>close_window</em>, <em>end_session</em>, <em>query_end_session</em></dd></dl>
-%% Callback event: {@link wxCloseEvent}
--record(wxClose, {type}).
+-record(wxClose, {type :: wxCloseEventType()}). %% Callback event: {@link wxCloseEvent}
+-type wxCloseEventType() :: close_window | end_session | query_end_session.
+-type wxClose() :: #wxClose{}. %% Callback event: {@link wxCloseEvent}
-%% @type wxMouseCaptureChanged() = #wxMouseCaptureChanged{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>mouse_capture_changed</em></dd></dl>
-%% Callback event: {@link wxMouseCaptureChangedEvent}
--record(wxMouseCaptureChanged, {type}).
+-record(wxMouseCaptureChanged, {type :: wxMouseCaptureChangedEventType()}). %% Callback event: {@link wxMouseCaptureChangedEvent}
+-type wxMouseCaptureChangedEventType() :: mouse_capture_changed.
+-type wxMouseCaptureChanged() :: #wxMouseCaptureChanged{}. %% Callback event: {@link wxMouseCaptureChangedEvent}
-%% @type wxMouse() = #wxMouse{type=wxEventType(),x=integer(),y=integer(),leftDown=bool(),middleDown=bool(),rightDown=bool(),controlDown=bool(),shiftDown=bool(),altDown=bool(),metaDown=bool(),wheelRotation=integer(),wheelDelta=integer(),linesPerAction=integer()}.
-%% <dl><dt>EventType:</dt> <dd><em>left_down</em>, <em>left_up</em>, <em>middle_down</em>, <em>middle_up</em>, <em>right_down</em>, <em>right_up</em>, <em>motion</em>, <em>enter_window</em>, <em>leave_window</em>, <em>left_dclick</em>, <em>middle_dclick</em>, <em>right_dclick</em>, <em>mousewheel</em>, <em>nc_left_down</em>, <em>nc_left_up</em>, <em>nc_middle_down</em>, <em>nc_middle_up</em>, <em>nc_right_down</em>, <em>nc_right_up</em>, <em>nc_motion</em>, <em>nc_enter_window</em>, <em>nc_leave_window</em>, <em>nc_left_dclick</em>, <em>nc_middle_dclick</em>, <em>nc_right_dclick</em></dd></dl>
-%% Callback event: {@link wxMouseEvent}
--record(wxMouse,{type, x,y,leftDown,middleDown,rightDown,controlDown,shiftDown,altDown,metaDown,wheelRotation,wheelDelta,linesPerAction}).
+-record(wxMouse,{type :: wxMouseEventType(), %% Callback event: {@link wxMouseEvent}
+ x :: integer(),
+ y :: integer(),
+ leftDown :: boolean(),
+ middleDown :: boolean(),
+ rightDown :: boolean(),
+ controlDown :: boolean(),
+ shiftDown :: boolean(),
+ altDown :: boolean(),
+ metaDown :: boolean(),
+ wheelRotation :: integer(),
+ wheelDelta :: integer(),
+ linesPerAction :: integer()}).
+-type wxMouseEventType() :: left_down | left_up | middle_down | middle_up | right_down | right_up | motion | enter_window | leave_window | left_dclick | middle_dclick | right_dclick | mousewheel | nc_left_down | nc_left_up | nc_middle_down | nc_middle_up | nc_right_down | nc_right_up | nc_motion | nc_enter_window | nc_leave_window | nc_left_dclick | nc_middle_dclick | nc_right_dclick.
+-type wxMouse() :: #wxMouse{}. %% Callback event: {@link wxMouseEvent}
-%% @type wxWindowCreate() = #wxWindowCreate{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>create</em></dd></dl>
-%% Callback event: {@link wxWindowCreateEvent}
--record(wxWindowCreate, {type}).
+-record(wxWindowCreate, {type :: wxWindowCreateEventType()}). %% Callback event: {@link wxWindowCreateEvent}
+-type wxWindowCreateEventType() :: create.
+-type wxWindowCreate() :: #wxWindowCreate{}. %% Callback event: {@link wxWindowCreateEvent}
-%% @type wxAuiManager() = #wxAuiManager{type=wxEventType(),manager=wxAuiManager:wxAuiManager(),pane=wxAuiPaneInfo:wxAuiPaneInfo(),button=integer(),veto_flag=bool(),canveto_flag=bool(),dc=wxDC:wxDC()}.
-%% <dl><dt>EventType:</dt> <dd><em>aui_pane_button</em>, <em>aui_pane_close</em>, <em>aui_pane_maximize</em>, <em>aui_pane_restore</em>, <em>aui_render</em>, <em>aui_find_manager</em></dd></dl>
-%% Callback event: {@link wxAuiManagerEvent}
--record(wxAuiManager,{type, manager,pane,button,veto_flag,canveto_flag,dc}).
+-record(wxAuiManager,{type :: wxAuiManagerEventType(), %% Callback event: {@link wxAuiManagerEvent}
+ manager :: wxAuiManager:wxAuiManager(),
+ pane :: wxAuiPaneInfo:wxAuiPaneInfo(),
+ button :: integer(),
+ veto_flag :: boolean(),
+ canveto_flag :: boolean(),
+ dc :: wxDC:wxDC()}).
+-type wxAuiManagerEventType() :: aui_pane_button | aui_pane_close | aui_pane_maximize | aui_pane_restore | aui_render | aui_find_manager.
+-type wxAuiManager() :: #wxAuiManager{}. %% Callback event: {@link wxAuiManagerEvent}
-%% @type wxCommand() = #wxCommand{type=wxEventType(),cmdString=string(),commandInt=integer(),extraLong=integer()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_button_clicked</em>, <em>command_checkbox_clicked</em>, <em>command_choice_selected</em>, <em>command_listbox_selected</em>, <em>command_listbox_doubleclicked</em>, <em>command_text_updated</em>, <em>command_text_enter</em>, <em>command_menu_selected</em>, <em>command_slider_updated</em>, <em>command_radiobox_selected</em>, <em>command_radiobutton_selected</em>, <em>command_scrollbar_updated</em>, <em>command_vlbox_selected</em>, <em>command_combobox_selected</em>, <em>command_tool_rclicked</em>, <em>command_tool_enter</em>, <em>command_checklistbox_toggled</em>, <em>command_togglebutton_clicked</em>, <em>command_left_click</em>, <em>command_left_dclick</em>, <em>command_right_click</em>, <em>command_set_focus</em>, <em>command_kill_focus</em>, <em>command_enter</em></dd></dl>
-%% Callback event: {@link wxCommandEvent}
--record(wxCommand,{type, cmdString,commandInt,extraLong}).
+-record(wxCommand,{type :: wxCommandEventType(), %% Callback event: {@link wxCommandEvent}
+ cmdString :: unicode:chardata(),
+ commandInt :: integer(),
+ extraLong :: integer()}).
+-type wxCommandEventType() :: command_button_clicked | command_checkbox_clicked | command_choice_selected | command_listbox_selected | command_listbox_doubleclicked | command_text_updated | command_text_enter | command_menu_selected | command_slider_updated | command_radiobox_selected | command_radiobutton_selected | command_scrollbar_updated | command_vlbox_selected | command_combobox_selected | command_tool_rclicked | command_tool_enter | command_checklistbox_toggled | command_togglebutton_clicked | command_left_click | command_left_dclick | command_right_click | command_set_focus | command_kill_focus | command_enter.
+-type wxCommand() :: #wxCommand{}. %% Callback event: {@link wxCommandEvent}
-%% @type wxJoystick() = #wxJoystick{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>joy_button_down</em>, <em>joy_button_up</em>, <em>joy_move</em>, <em>joy_zmove</em></dd></dl>
-%% Callback event: {@link wxJoystickEvent}
--record(wxJoystick, {type}).
+-record(wxJoystick, {type :: wxJoystickEventType()}). %% Callback event: {@link wxJoystickEvent}
+-type wxJoystickEventType() :: joy_button_down | joy_button_up | joy_move | joy_zmove.
+-type wxJoystick() :: #wxJoystick{}. %% Callback event: {@link wxJoystickEvent}
-%% @type wxQueryNewPalette() = #wxQueryNewPalette{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>query_new_palette</em></dd></dl>
-%% Callback event: {@link wxQueryNewPaletteEvent}
--record(wxQueryNewPalette, {type}).
+-record(wxQueryNewPalette, {type :: wxQueryNewPaletteEventType()}). %% Callback event: {@link wxQueryNewPaletteEvent}
+-type wxQueryNewPaletteEventType() :: query_new_palette.
+-type wxQueryNewPalette() :: #wxQueryNewPalette{}. %% Callback event: {@link wxQueryNewPaletteEvent}
-%% @type wxMove() = #wxMove{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>move</em></dd></dl>
-%% Callback event: {@link wxMoveEvent}
--record(wxMove, {type}).
+-record(wxMove, {type :: wxMoveEventType()}). %% Callback event: {@link wxMoveEvent}
+-type wxMoveEventType() :: move.
+-type wxMove() :: #wxMove{}. %% Callback event: {@link wxMoveEvent}
-%% @type wxIdle() = #wxIdle{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>idle</em></dd></dl>
-%% Callback event: {@link wxIdleEvent}
--record(wxIdle, {type}).
+-record(wxIdle, {type :: wxIdleEventType()}). %% Callback event: {@link wxIdleEvent}
+-type wxIdleEventType() :: idle.
+-type wxIdle() :: #wxIdle{}. %% Callback event: {@link wxIdleEvent}
-%% @type wxNcPaint() = #wxNcPaint{type=wxEventType()}.
-%% <dl><dt>EventType:</dt> <dd><em>nc_paint</em></dd></dl>
-%% Callback event: {@link wxNcPaintEvent}
--record(wxNcPaint, {type}).
+-record(wxNcPaint, {type :: wxNcPaintEventType()}). %% Callback event: {@link wxNcPaintEvent}
+-type wxNcPaintEventType() :: nc_paint.
+-type wxNcPaint() :: #wxNcPaint{}. %% Callback event: {@link wxNcPaintEvent}
-%% @type wxColourPicker() = #wxColourPicker{type=wxEventType(),colour=wx:colour()}.
-%% <dl><dt>EventType:</dt> <dd><em>command_colourpicker_changed</em></dd></dl>
-%% Callback event: {@link wxColourPickerEvent}
--record(wxColourPicker,{type, colour}).
+-record(wxColourPicker,{type :: wxColourPickerEventType(), %% Callback event: {@link wxColourPickerEvent}
+ colour :: wx:wx_colour()}).
+-type wxColourPickerEventType() :: command_colourpicker_changed.
+-type wxColourPicker() :: #wxColourPicker{}. %% Callback event: {@link wxColourPickerEvent}
-%% @type wxTree() = #wxTree{type=wxEventType(),item=integer(),itemOld=integer(),pointDrag={X::integer(), Y::integer()}}.
-%% <dl><dt>EventType:</dt> <dd><em>command_tree_begin_drag</em>, <em>command_tree_begin_rdrag</em>, <em>command_tree_begin_label_edit</em>, <em>command_tree_end_label_edit</em>, <em>command_tree_delete_item</em>, <em>command_tree_get_info</em>, <em>command_tree_set_info</em>, <em>command_tree_item_expanded</em>, <em>command_tree_item_expanding</em>, <em>command_tree_item_collapsed</em>, <em>command_tree_item_collapsing</em>, <em>command_tree_sel_changed</em>, <em>command_tree_sel_changing</em>, <em>command_tree_key_down</em>, <em>command_tree_item_activated</em>, <em>command_tree_item_right_click</em>, <em>command_tree_item_middle_click</em>, <em>command_tree_end_drag</em>, <em>command_tree_state_image_click</em>, <em>command_tree_item_gettooltip</em>, <em>command_tree_item_menu</em></dd></dl>
-%% Callback event: {@link wxTreeEvent}
--record(wxTree,{type, item,itemOld,pointDrag}).
+-record(wxTaskBarIcon, {type :: wxTaskBarIconEventType()}). %% Callback event: {@link wxTaskBarIconEvent}
+-type wxTaskBarIconEventType() :: taskbar_move | taskbar_left_down | taskbar_left_up | taskbar_right_down | taskbar_right_up | taskbar_left_dclick | taskbar_right_dclick.
+-type wxTaskBarIcon() :: #wxTaskBarIcon{}. %% Callback event: {@link wxTaskBarIconEvent}
-%% @type wxEventType() = aui_find_manager | aui_pane_button | aui_pane_close | aui_pane_maximize | aui_pane_restore | aui_render | calendar_day_changed | calendar_doubleclicked | calendar_month_changed | calendar_sel_changed | calendar_weekday_clicked | calendar_year_changed | char | char_hook | child_focus | close_window | command_auinotebook_allow_dnd | command_auinotebook_begin_drag | command_auinotebook_bg_dclick | command_auinotebook_button | command_auinotebook_drag_done | command_auinotebook_drag_motion | command_auinotebook_end_drag | command_auinotebook_page_changed | command_auinotebook_page_changing | command_auinotebook_page_close | command_auinotebook_page_closed | command_auinotebook_tab_middle_down | command_auinotebook_tab_middle_up | command_auinotebook_tab_right_down | command_auinotebook_tab_right_up | command_button_clicked | command_checkbox_clicked | command_checklistbox_toggled | command_choice_selected | command_colourpicker_changed | command_combobox_selected | command_dirpicker_changed | command_enter | command_filepicker_changed | command_fontpicker_changed | command_html_link_clicked | command_kill_focus | command_left_click | command_left_dclick | command_list_begin_drag | command_list_begin_label_edit | command_list_begin_rdrag | command_list_cache_hint | command_list_col_begin_drag | command_list_col_click | command_list_col_dragging | command_list_col_end_drag | command_list_col_right_click | command_list_delete_all_items | command_list_delete_item | command_list_end_label_edit | command_list_insert_item | command_list_item_activated | command_list_item_deselected | command_list_item_focused | command_list_item_middle_click | command_list_item_right_click | command_list_item_selected | command_list_key_down | command_listbox_doubleclicked | command_listbox_selected | command_menu_selected | command_notebook_page_changed | command_notebook_page_changing | command_radiobox_selected | command_radiobutton_selected | command_right_click | command_scrollbar_updated | command_set_focus | command_slider_updated | command_spinctrl_updated | command_splitter_doubleclicked | command_splitter_sash_pos_changed | command_splitter_sash_pos_changing | command_splitter_unsplit | command_text_enter | command_text_updated | command_togglebutton_clicked | command_tool_enter | command_tool_rclicked | command_tree_begin_drag | command_tree_begin_label_edit | command_tree_begin_rdrag | command_tree_delete_item | command_tree_end_drag | command_tree_end_label_edit | command_tree_get_info | command_tree_item_activated | command_tree_item_collapsed | command_tree_item_collapsing | command_tree_item_expanded | command_tree_item_expanding | command_tree_item_gettooltip | command_tree_item_menu | command_tree_item_middle_click | command_tree_item_right_click | command_tree_key_down | command_tree_sel_changed | command_tree_sel_changing | command_tree_set_info | command_tree_state_image_click | command_vlbox_selected | context_menu | create | date_changed | destroy | detailed_help | display_changed | end_session | enter_window | erase_background | grid_cell_begin_drag | grid_cell_change | grid_cell_left_click | grid_cell_left_dclick | grid_cell_right_click | grid_cell_right_dclick | grid_col_size | grid_editor_created | grid_editor_hidden | grid_editor_shown | grid_label_left_click | grid_label_left_dclick | grid_label_right_click | grid_label_right_dclick | grid_range_select | grid_row_size | grid_select_cell | help | iconize | idle | joy_button_down | joy_button_up | joy_move | joy_zmove | key_down | key_up | kill_focus | leave_window | left_dclick | left_down | left_up | maximize | menu_close | menu_highlight | menu_open | middle_dclick | middle_down | middle_up | motion | mouse_capture_changed | mousewheel | move | navigation_key | nc_enter_window | nc_leave_window | nc_left_dclick | nc_left_down | nc_left_up | nc_middle_dclick | nc_middle_down | nc_middle_up | nc_motion | nc_paint | nc_right_dclick | nc_right_down | nc_right_up | paint | paint_icon | palette_changed | query_end_session | query_new_palette | right_dclick | right_down | right_up | sash_dragged | scroll_bottom | scroll_changed | scroll_linedown | scroll_lineup | scroll_pagedown | scroll_pageup | scroll_thumbrelease | scroll_thumbtrack | scroll_top | scrollwin_bottom | scrollwin_linedown | scrollwin_lineup | scrollwin_pagedown | scrollwin_pageup | scrollwin_thumbrelease | scrollwin_thumbtrack | scrollwin_top | set_cursor | set_focus | show | size | spin | spin_down | spin_up | stc_autocomp_selection | stc_calltip_click | stc_change | stc_charadded | stc_do_drop | stc_doubleclick | stc_drag_over | stc_dwellend | stc_dwellstart | stc_hotspot_click | stc_hotspot_dclick | stc_key | stc_macrorecord | stc_marginclick | stc_modified | stc_needshown | stc_painted | stc_romodifyattempt | stc_savepointleft | stc_savepointreached | stc_start_drag | stc_styleneeded | stc_updateui | stc_uridropped | stc_userlistselection | stc_zoom | sys_colour_changed | update_ui.
+-record(wxTree,{type :: wxTreeEventType(), %% Callback event: {@link wxTreeEvent}
+ item :: integer(),
+ itemOld :: integer(),
+ pointDrag :: {X::integer(), Y::integer()}}).
+-type wxTreeEventType() :: command_tree_begin_drag | command_tree_begin_rdrag | command_tree_begin_label_edit | command_tree_end_label_edit | command_tree_delete_item | command_tree_get_info | command_tree_set_info | command_tree_item_expanded | command_tree_item_expanding | command_tree_item_collapsed | command_tree_item_collapsing | command_tree_sel_changed | command_tree_sel_changing | command_tree_key_down | command_tree_item_activated | command_tree_item_right_click | command_tree_item_middle_click | command_tree_end_drag | command_tree_state_image_click | command_tree_item_gettooltip | command_tree_item_menu.
+-type wxTree() :: #wxTree{}. %% Callback event: {@link wxTreeEvent}
+
+-type event() :: wxAuiManager() | wxAuiNotebook() | wxCalendar() | wxChildFocus() | wxClose() | wxColourPicker() | wxCommand() | wxContextMenu() | wxDate() | wxDisplayChanged() | wxErase() | wxFileDirPicker() | wxFocus() | wxFontPicker() | wxGrid() | wxHelp() | wxHtmlLink() | wxIconize() | wxIdle() | wxJoystick() | wxKey() | wxList() | wxMaximize() | wxMenu() | wxMouse() | wxMouseCaptureChanged() | wxMove() | wxNavigationKey() | wxNcPaint() | wxNotebook() | wxPaint() | wxPaletteChanged() | wxQueryNewPalette() | wxSash() | wxScroll() | wxScrollWin() | wxSetCursor() | wxShow() | wxSize() | wxSpin() | wxSplitter() | wxStyledText() | wxSysColourChanged() | wxTaskBarIcon() | wxTree() | wxUpdateUI() | wxWindowCreate() | wxWindowDestroy().
+-type wxEventType() :: wxAuiManagerEventType() | wxAuiNotebookEventType() | wxCalendarEventType() | wxChildFocusEventType() | wxCloseEventType() | wxColourPickerEventType() | wxCommandEventType() | wxContextMenuEventType() | wxDateEventType() | wxDisplayChangedEventType() | wxEraseEventType() | wxFileDirPickerEventType() | wxFocusEventType() | wxFontPickerEventType() | wxGridEventType() | wxHelpEventType() | wxHtmlLinkEventType() | wxIconizeEventType() | wxIdleEventType() | wxJoystickEventType() | wxKeyEventType() | wxListEventType() | wxMaximizeEventType() | wxMenuEventType() | wxMouseCaptureChangedEventType() | wxMouseEventType() | wxMoveEventType() | wxNavigationKeyEventType() | wxNcPaintEventType() | wxNotebookEventType() | wxPaintEventType() | wxPaletteChangedEventType() | wxQueryNewPaletteEventType() | wxSashEventType() | wxScrollEventType() | wxScrollWinEventType() | wxSetCursorEventType() | wxShowEventType() | wxSizeEventType() | wxSpinEventType() | wxSplitterEventType() | wxStyledTextEventType() | wxSysColourChangedEventType() | wxTaskBarIconEventType() | wxTreeEventType() | wxUpdateUIEventType() | wxWindowCreateEventType() | wxWindowDestroyEventType().
%% Hardcoded Records
--record(wxMouseState, {x, y, %% integer()
- leftDown, middleDown, rightDown, %% bool()
- controlDown, shiftDown, altDown, metaDown, cmdDown %% bool()
+-record(wxMouseState, {x :: integer(), y :: integer(),
+ leftDown :: boolean(), middleDown :: boolean, rightDown :: boolean,
+ controlDown :: boolean(), shiftDown :: boolean(),
+ altDown :: boolean(), metaDown :: boolean(), cmdDown :: boolean()
}).
-record(wxHtmlLinkInfo, {
- href, target %% string()
+ href :: unicode:chardata(), target :: unicode:chardata()
}).
%% Hardcoded Defines
@@ -937,7 +985,7 @@
-define(wxRESET, 16384).
-define(wxBACKWARD, 8192).
-define(wxFORWARD, 4096).
--define(wxICON_MASK, (?16#00000100 bor ?16#00000200 bor ?16#00000400 bor ?16#00000800)).
+-define(wxICON_MASK, (16#00000100 bor 16#00000200 bor 16#00000400 bor 16#00000800)).
-define(wxICON_ASTERISK, ?wxICON_INFORMATION).
-define(wxICON_STOP, ?wxICON_HAND).
-define(wxICON_INFORMATION, 2048).
diff --git a/lib/wx/install.es b/lib/wx/install.es
deleted file mode 100755
index 2811c7728c..0000000000
--- a/lib/wx/install.es
+++ /dev/null
@@ -1,302 +0,0 @@
-#!/usr/bin/env escript
-%% -*- erlang -*-
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%% Install wx to an erlang distribution.
-%%
-
--module('install_es'). %% Temp workaround for buggy escript
--mode(compile).
-
-usage() ->
- io:format("install [Opts] [InstallDir]~n",[]),
- io:format(" -v verbose~n",[]),
- io:format(" -q quiet and direct no questions~n",[]),
- io:format(" --create_release To create a release~n~n",[]),
- ok.
-
-main([]) ->
- IDir = filename:join(code:root_dir(),"lib"),
- install(IDir),
- ok;
-main(Opts) ->
- IDir = options(Opts),
- install(IDir),
- ok.
-
-install_files() ->
- [{[], {files, ["README","TODO", "Notes", "license.terms"]}},
- {[src], {list, "*.?rl"}},
- {[include], {list, "*.hrl"}},
- {[src,gen], {list, "*.?rl"}},
- {[test], {list, "*.?rl"}},
- {[test], {list, "*.bmp"}},
- {[test], {files, ["wxt", "Readme"]}},
- {[samples], {files, ["sample.xpm"]}},
- {[samples,menu], {files, ["copy.xpm"]}},
- {[samples,'*'], {list, "*.?rl"}},
- {[demos,'*'], {list, "*.?rl"}},
- {[demos,xrc,rc], {list, "*"}},
- {[doc,html], {files, ["edoc-info", "erlang.png", "stylesheet.css"]}}
- ].
-
-built_files(SrcDir, Type) ->
- Dirs = [{[doc], {list, "*.html"}},
- {[ebin], {list, "*"}},
- {[test], {list, "*.beam"}},
- {[demos,'*'], {list, "*.beam"}},
- {[samples,'*'], {list, "*.beam"}}],
- case Type of
- install ->
- [{[priv,'*'], {list, "*"}}|Dirs];
- _ -> %% Create Rel
- Win32 = [{[priv,win32], {list, "*"}}| Dirs],
- case filelib:wildcard("i386-apple*",
- filename:join(SrcDir, "priv")) of
- [Mac] ->
- [{[priv,list_to_atom(Mac)], {list, "*"}}|Win32];
- [] ->
- io:format("WARNING: Missing Mac driver!~n",[]),
- Win32
- end
- end.
-
-release_files() ->
- [{[], {files, ["configure.in","Makefile","wxwin.m4", "config.mk.in", "vsn.mk"]}},
- {[], {files, ["configure", "install.es"]}},
- {[autoconf], {files, ["config.guess","config.sub","install-sh"]}},
- {[src], {files, ["Makefile"]}},
- {[c_src], {files, ["Makefile.in"]}},
- {[c_src], {list, "*.c*"}},
- {[c_src], {list, "*.h"}},
- {[c_src,gen], {list, "*.cpp"}},
- {[c_src,gen], {list, "*.h"}},
- {[doc], {files, ["overview.edoc"]}},
- {[doc,src], {files, ["Makefile"]}},
- {[test], {files, ["Makefile"]}},
-%% {[demos], {files, ["Makefile"]}},
-%% {[demos,'*'], {files, ["Makefile"]}},
-%% {[samples], {files, ["Makefile"]}},
-%% {[samples,'*'], {files, ["Makefile"]}},
- {[api_gen], {list, "*.?rl"}},
- {[api_gen], {list, "*.conf"}},
- {[api_gen], {files, ["Makefile", "README"]}},
- {[api_gen, wx_extra], {list, "*"}}
- ].
-
-options(["-v"|Os]) ->
- put(verbose,true),
- options(Os);
-options(["-q"|Os]) ->
- put(quiet,true),
- options(Os);
-options(["--help"|_]) ->
- usage(),
- halt(0);
-options(["-h"|_]) ->
- usage(),
- halt(0);
-options(["--create_release"|Os]) ->
- put(create_release,true),
- options(Os);
-options(["-" ++_ |_Os]) ->
- usage(),
- halt(1);
-options([Dir]) -> Dir;
-options([]) ->
- filename:join(code:root_dir(),"lib").
-
-install(Dir) ->
- try
- case get(create_release) of
- true -> create_release();
- _ -> install2(Dir)
- end
- catch E:R ->
- io:format("Error ~p:~p in ~n ~p~n",[E,R, erlang:get_stacktrace()])
- end.
-
-install2(IDir) ->
- SrcD = get_src_dir(),
- Ver = get_version(SrcD),
- case get(quiet) of
- true ->
- copy_files(SrcD, filename:append(IDir,Ver)),
- ok;
- _ ->
- io:format("Installing ~p~n From ~p to ~p ~n",[Ver,SrcD,IDir]),
- case is_ok('ok [y|n]? ',[y,n]) of
- y ->
- copy_files(SrcD, filename:append(IDir,Ver)),
- io:format("Install complete~n",[]),
- ok;
- n ->
- usage(),
- halt(1)
- end
- end.
-
-copy_files(FromD, ToD) ->
- Fs = install_files() ++ built_files(FromD, install),
- Copy = fun(File, From, To, Acc) ->
- ensure_dir(To),
- case file:copy(filename:join(From,File),
- filename:join(To,File)) of
- {ok, _Bytes} ->
- [File|Acc];
- {error,_} ->
- io:format("ERROR Could not install file: ~p in~n ~p~n",
- [filename:join(From,File),
- filename:join(To,File)]),
- Acc
- end
- end,
- [expand_dirs(Dir,Files,FromD,ToD,Copy,[]) || {Dir,Files} <- Fs].
-
-expand_dirs(['*'|Ds],Fs,From,To,Fun,Acc) ->
- All = filelib:wildcard("[A-Za-z]*", From),
- Filter = fun(F) -> filelib:is_dir(filename:join(From,F)) end,
- Dirs = lists:filter(Filter, All),
- lists:foldl(fun(Dir,Nacc) ->
- expand_dirs([Dir|Ds],Fs,From,To,Fun,Nacc)
- end,
- Acc, Dirs);
-expand_dirs([Dir|Ds],Fs,From,To,Fun,Acc) ->
- expand_dirs(Ds,Fs,filename:join(From,Dir),filename:join(To,Dir),Fun,Acc);
-expand_dirs([],Fs,From,To,Fun,Acc) ->
- expand_files(Fs,From,To,Fun,Acc).
-
-expand_files({files,Fs},From,To,Fun,Acc) ->
- case get(verbose) of
- true -> io:format(" Check dir ~p to ~p~n", [From,To]);
- _ -> ok
- end,
- expand_files2(Fs,From,To,Fun,Acc);
-expand_files({list,WildCard},From,To,Fun,Acc) ->
- All = filelib:wildcard(WildCard, From),
- Filter = fun(F) -> filelib:is_regular(filename:join(From,F)) end,
- Fs = lists:filter(Filter, All),
- case get(verbose) of
- true -> io:format(" Check dir ~p to ~p~n", [From,To]);
- _ -> ok
- end,
- expand_files2(Fs,From,To,Fun,Acc).
-
-expand_files2(Fs,From,To,Fun,PrevAcc) ->
- lists:foldl(fun(File, Acc) -> Fun(File, From, To, Acc) end, PrevAcc, Fs).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-create_release() ->
- All = release_files() ++ install_files(),
- SrcD = get_src_dir(),
- Ver = "wx-" ++ get_version(SrcD),
- io:format("Create release ~p~n From ~p ~n",[Ver,SrcD]),
- case is_ok('ok [y|n]? ',[y,n]) of
- y ->
- List = fun(File, From, To, Acc) ->
- case filelib:is_regular(filename:join(From,File)) of
- true ->
- [{filename:join(To, File),
- filename:join(From,File)}|Acc];
- false ->
- io:format("Warning: File ~s/~s is missing~n",[From,File]),
- Acc
- end
- end,
- Expand = fun({Dir,Fs},Acc) ->
- expand_dirs(Dir,Fs,SrcD,Ver,List,Acc)
- end,
- Files = lists:foldl(Expand,[], All),
- ok = erl_tar:create(Ver ++ ".src.tar.gz", Files, [compressed]),
- BuiltDir = built_files(SrcD, create_release),
- BuiltFs = lists:foldl(Expand,[], BuiltDir),
- ok = erl_tar:create(Ver ++ ".built.tar.gz",
- Files ++ BuiltFs,
- [compressed]),
- ok;
- n ->
- usage()
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-is_ok(Str, Answers) ->
- {ok, [Ans]} = io:fread(Str, "~a"),
- case lists:member(Ans, Answers) of
- true -> Ans;
- false ->
- io:format("Please answer ~p~n",[Answers]),
- is_ok(Str,Answers)
- end.
-
-
-ensure_dir(To) ->
- case filelib:ensure_dir(filename:join(To, "dummy")) of
- ok -> ok;
- Error ->
- io:format("Error ~p in ~p ~n",[Error, To]),
- halt(1)
- end.
-
-get_version(Dir) ->
- %% Have we installed this from a release
- %% get the directory name
- DateVariant =
- fun() ->
- {_,Month,Day} = erlang:date(),
- Date = io_lib:format("~.2.0w~.2.0w",[Month,Day]),
- {ok, Bin} = file:read_file("vsn.mk"),
- Opt = [{capture, all_but_first, list}],
- case re:run(Bin, "WX_VSN\s*=\s*(.*)", Opt) of
- {match, [Ver]} ->
- lists:flatten([Ver,"."|Date]);
- _ ->
- lists:flatten(["wx-0.98."|Date])
- end
- end,
- case Dir of
- "." ->
- %% Installing from src without a release
- DateVariant();
- Dir ->
- Base = filename:basename(Dir),
- case string:tokens(Base, "-.") of
- ["wx", Ma, Mi|_]
- when is_integer(Ma),is_integer(Mi) ->
- Base;
- _ ->
- DateVariant()
- end
- end.
-
-%% Get src dir of installation
-get_src_dir() ->
- Escript = escript:script_name(),
- Abs = filename:dirname(filename:absname(Escript)),
- Test = filename:join(Abs, "README"),
- case file:read_file(Test) of
- {ok, _} -> ok;
- {error, enoent} ->
- io:format("Error couldn't read ~s ~n",[Test]),
- halt(1)
- end,
- Abs.
-
-
diff --git a/lib/wx/src/Makefile b/lib/wx/src/Makefile
index 4e5971de03..16b425e6f0 100644
--- a/lib/wx/src/Makefile
+++ b/lib/wx/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2011. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
include ../vsn.mk
ifdef TERTIARY_BOOTSTRAP
VSN = $(WX_VSN)
- INSIDE_ERLSRC = true
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
RELSYSDIR = $(RELEASE_PATH)/lib/wx-$(VSN)
@@ -119,7 +118,6 @@ $(EBIN)/%.beam: $(EGEN)/%.erl $(HEADER_FILES)
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
-ifeq ($(INSIDE_ERLSRC), true)
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/src
@@ -134,4 +132,3 @@ release_spec: opt
# $(INSTALL_DATA) ../$(ARCHIVE) $(RELEASE_PATH)/lib
release_docs_spec:
-endif
diff --git a/lib/wx/src/gen/gl.erl b/lib/wx/src/gen/gl.erl
index 0ebf51d28a..ff381683ee 100644
--- a/lib/wx/src/gen/gl.erl
+++ b/lib/wx/src/gen/gl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,10 +25,6 @@
%%
%% Booleans are represented by integers 0 and 1.
-%% @type mem(). memory block
-%% @type enum(). An integer defined in gl.hrl
-%% @type offset(). An integer which is an offset in an array
-%% @type clamp(). A float clamped between 0.0 - 1.0
-module(gl).
-compile(inline).
@@ -53,71 +49,75 @@
-define(GLsync,64/native-unsigned).
-define(GLuint64,64/native-unsigned).
-define(GLint64,64/native-signed).
--type clamp() :: float().
--type offset() :: non_neg_integer().
--type enum() :: non_neg_integer().
--type mem() :: binary() | tuple().
-
--export([accum/2,alphaFunc/2,areTexturesResident/1,arrayElement/1,'begin'/1,
- bindTexture/2,bitmap/7,blendFunc/2,callList/1,callLists/1,clear/1,clearAccum/4,
- clearColor/4,clearDepth/1,clearIndex/1,clearStencil/1,clipPlane/2,
- color3b/3,color3bv/1,color3d/3,color3dv/1,color3f/3,color3fv/1,color3i/3,
- color3iv/1,color3s/3,color3sv/1,color3ub/3,color3ubv/1,color3ui/3,color3uiv/1,
- color3us/3,color3usv/1,color4b/4,color4bv/1,color4d/4,color4dv/1,color4f/4,
- color4fv/1,color4i/4,color4iv/1,color4s/4,color4sv/1,color4ub/4,color4ubv/1,
- color4ui/4,color4uiv/1,color4us/4,color4usv/1,colorMask/4,colorMaterial/2,
- colorPointer/4,copyPixels/5,copyTexImage1D/7,copyTexImage2D/8,copyTexSubImage1D/6,
- copyTexSubImage2D/8,cullFace/1,deleteLists/2,deleteTextures/1,depthFunc/1,
- depthMask/1,depthRange/2,disable/1,disableClientState/1,drawArrays/3,
- drawBuffer/1,drawElements/4,drawPixels/5,edgeFlag/1,edgeFlagPointer/2,
- edgeFlagv/1,enable/1,enableClientState/1,'end'/0,endList/0,evalCoord1d/1,
- evalCoord1dv/1,evalCoord1f/1,evalCoord1fv/1,evalCoord2d/2,evalCoord2dv/1,
- evalCoord2f/2,evalCoord2fv/1,evalMesh1/3,evalMesh2/5,evalPoint1/1,
- evalPoint2/2,feedbackBuffer/3,finish/0,flush/0,fogf/2,fogfv/2,fogi/2,
- fogiv/2,frontFace/1,frustum/6,genLists/1,genTextures/1,getBooleanv/1,
- getClipPlane/1,getDoublev/1,getError/0,getFloatv/1,getIntegerv/1,getLightfv/2,
- getLightiv/2,getMapdv/3,getMapfv/3,getMapiv/3,getMaterialfv/2,getMaterialiv/2,
- getPixelMapfv/2,getPixelMapuiv/2,getPixelMapusv/2,getPolygonStipple/0,
- getString/1,getTexEnvfv/2,getTexEnviv/2,getTexGendv/2,getTexGenfv/2,
- getTexGeniv/2,getTexImage/5,getTexLevelParameterfv/3,getTexLevelParameteriv/3,
- getTexParameterfv/2,getTexParameteriv/2,hint/2,indexMask/1,indexPointer/3,
- indexd/1,indexdv/1,indexf/1,indexfv/1,indexi/1,indexiv/1,indexs/1,indexsv/1,
- indexub/1,indexubv/1,initNames/0,interleavedArrays/3,isEnabled/1,isList/1,
- isTexture/1,lightModelf/2,lightModelfv/2,lightModeli/2,lightModeliv/2,
- lightf/3,lightfv/3,lighti/3,lightiv/3,lineStipple/2,lineWidth/1,listBase/1,
- loadIdentity/0,loadMatrixd/1,loadMatrixf/1,loadName/1,logicOp/1,map1d/6,
- map1f/6,map2d/10,map2f/10,mapGrid1d/3,mapGrid1f/3,mapGrid2d/6,mapGrid2f/6,
- materialf/3,materialfv/3,materiali/3,materialiv/3,matrixMode/1,multMatrixd/1,
- multMatrixf/1,newList/2,normal3b/3,normal3bv/1,normal3d/3,normal3dv/1,
- normal3f/3,normal3fv/1,normal3i/3,normal3iv/1,normal3s/3,normal3sv/1,
- normalPointer/3,ortho/6,passThrough/1,pixelMapfv/3,pixelMapuiv/3,pixelMapusv/3,
- pixelStoref/2,pixelStorei/2,pixelTransferf/2,pixelTransferi/2,pixelZoom/2,
- pointSize/1,polygonMode/2,polygonOffset/2,polygonStipple/1,popAttrib/0,
- popClientAttrib/0,popMatrix/0,popName/0,prioritizeTextures/2,pushAttrib/1,
- pushClientAttrib/1,pushMatrix/0,pushName/1,rasterPos2d/2,rasterPos2dv/1,
- rasterPos2f/2,rasterPos2fv/1,rasterPos2i/2,rasterPos2iv/1,rasterPos2s/2,
- rasterPos2sv/1,rasterPos3d/3,rasterPos3dv/1,rasterPos3f/3,rasterPos3fv/1,
- rasterPos3i/3,rasterPos3iv/1,rasterPos3s/3,rasterPos3sv/1,rasterPos4d/4,
- rasterPos4dv/1,rasterPos4f/4,rasterPos4fv/1,rasterPos4i/4,rasterPos4iv/1,
- rasterPos4s/4,rasterPos4sv/1,readBuffer/1,readPixels/7,rectd/4,rectdv/2,
- rectf/4,rectfv/2,recti/4,rectiv/2,rects/4,rectsv/2,renderMode/1,rotated/4,
- rotatef/4,scaled/3,scalef/3,scissor/4,selectBuffer/2,shadeModel/1,stencilFunc/3,
- stencilMask/1,stencilOp/3,texCoord1d/1,texCoord1dv/1,texCoord1f/1,
- texCoord1fv/1,texCoord1i/1,texCoord1iv/1,texCoord1s/1,texCoord1sv/1,
- texCoord2d/2,texCoord2dv/1,texCoord2f/2,texCoord2fv/1,texCoord2i/2,
- texCoord2iv/1,texCoord2s/2,texCoord2sv/1,texCoord3d/3,texCoord3dv/1,
- texCoord3f/3,texCoord3fv/1,texCoord3i/3,texCoord3iv/1,texCoord3s/3,
- texCoord3sv/1,texCoord4d/4,texCoord4dv/1,texCoord4f/4,texCoord4fv/1,
- texCoord4i/4,texCoord4iv/1,texCoord4s/4,texCoord4sv/1,texCoordPointer/4,
- texEnvf/3,texEnvfv/3,texEnvi/3,texEnviv/3,texGend/3,texGendv/3,texGenf/3,
- texGenfv/3,texGeni/3,texGeniv/3,texImage1D/8,texImage2D/9,texParameterf/3,
- texParameterfv/3,texParameteri/3,texParameteriv/3,texSubImage1D/7,
- texSubImage2D/9,translated/3,translatef/3,vertex2d/2,vertex2dv/1,vertex2f/2,
- vertex2fv/1,vertex2i/2,vertex2iv/1,vertex2s/2,vertex2sv/1,vertex3d/3,
- vertex3dv/1,vertex3f/3,vertex3fv/1,vertex3i/3,vertex3iv/1,vertex3s/3,
- vertex3sv/1,vertex4d/4,vertex4dv/1,vertex4f/4,vertex4fv/1,vertex4i/4,
- vertex4iv/1,vertex4s/4,vertex4sv/1,vertexPointer/4,viewport/4,blendColor/4,
- blendEquation/1,drawRangeElements/6,texImage3D/10,texSubImage3D/11,
+-type enum() :: non_neg_integer(). %% See wx/include/gl.hrl
+-type clamp() :: float(). %% 0.0..1.0
+-type offset() :: non_neg_integer(). %% Offset in memory block
+-type matrix() :: {float(),float(),float(),float(),
+ float(),float(),float(),float(),
+ float(),float(),float(),float(),
+ float(),float(),float(),float()}.
+-type mem() :: binary() | tuple(). %% Memory block
+
+-export([clearIndex/1,clearColor/4,clear/1,indexMask/1,colorMask/4,alphaFunc/2,
+ blendFunc/2,logicOp/1,cullFace/1,frontFace/1,pointSize/1,lineWidth/1,
+ lineStipple/2,polygonMode/2,polygonOffset/2,polygonStipple/1,getPolygonStipple/0,
+ edgeFlag/1,edgeFlagv/1,scissor/4,clipPlane/2,getClipPlane/1,drawBuffer/1,
+ readBuffer/1,enable/1,disable/1,isEnabled/1,enableClientState/1,disableClientState/1,
+ getBooleanv/1,getDoublev/1,getFloatv/1,getIntegerv/1,pushAttrib/1,
+ popAttrib/0,pushClientAttrib/1,popClientAttrib/0,renderMode/1,getError/0,
+ getString/1,finish/0,flush/0,hint/2,clearDepth/1,depthFunc/1,depthMask/1,
+ depthRange/2,clearAccum/4,accum/2,matrixMode/1,ortho/6,frustum/6,viewport/4,
+ pushMatrix/0,popMatrix/0,loadIdentity/0,loadMatrixd/1,loadMatrixf/1,
+ multMatrixd/1,multMatrixf/1,rotated/4,rotatef/4,scaled/3,scalef/3,translated/3,
+ translatef/3,isList/1,deleteLists/2,genLists/1,newList/2,endList/0,
+ callList/1,callLists/1,listBase/1,'begin'/1,'end'/0,vertex2d/2,vertex2f/2,
+ vertex2i/2,vertex2s/2,vertex3d/3,vertex3f/3,vertex3i/3,vertex3s/3,vertex4d/4,
+ vertex4f/4,vertex4i/4,vertex4s/4,vertex2dv/1,vertex2fv/1,vertex2iv/1,
+ vertex2sv/1,vertex3dv/1,vertex3fv/1,vertex3iv/1,vertex3sv/1,vertex4dv/1,
+ vertex4fv/1,vertex4iv/1,vertex4sv/1,normal3b/3,normal3d/3,normal3f/3,
+ normal3i/3,normal3s/3,normal3bv/1,normal3dv/1,normal3fv/1,normal3iv/1,
+ normal3sv/1,indexd/1,indexf/1,indexi/1,indexs/1,indexub/1,indexdv/1,
+ indexfv/1,indexiv/1,indexsv/1,indexubv/1,color3b/3,color3d/3,color3f/3,
+ color3i/3,color3s/3,color3ub/3,color3ui/3,color3us/3,color4b/4,color4d/4,
+ color4f/4,color4i/4,color4s/4,color4ub/4,color4ui/4,color4us/4,color3bv/1,
+ color3dv/1,color3fv/1,color3iv/1,color3sv/1,color3ubv/1,color3uiv/1,
+ color3usv/1,color4bv/1,color4dv/1,color4fv/1,color4iv/1,color4sv/1,
+ color4ubv/1,color4uiv/1,color4usv/1,texCoord1d/1,texCoord1f/1,texCoord1i/1,
+ texCoord1s/1,texCoord2d/2,texCoord2f/2,texCoord2i/2,texCoord2s/2,texCoord3d/3,
+ texCoord3f/3,texCoord3i/3,texCoord3s/3,texCoord4d/4,texCoord4f/4,texCoord4i/4,
+ texCoord4s/4,texCoord1dv/1,texCoord1fv/1,texCoord1iv/1,texCoord1sv/1,
+ texCoord2dv/1,texCoord2fv/1,texCoord2iv/1,texCoord2sv/1,texCoord3dv/1,
+ texCoord3fv/1,texCoord3iv/1,texCoord3sv/1,texCoord4dv/1,texCoord4fv/1,
+ texCoord4iv/1,texCoord4sv/1,rasterPos2d/2,rasterPos2f/2,rasterPos2i/2,
+ rasterPos2s/2,rasterPos3d/3,rasterPos3f/3,rasterPos3i/3,rasterPos3s/3,
+ rasterPos4d/4,rasterPos4f/4,rasterPos4i/4,rasterPos4s/4,rasterPos2dv/1,
+ rasterPos2fv/1,rasterPos2iv/1,rasterPos2sv/1,rasterPos3dv/1,rasterPos3fv/1,
+ rasterPos3iv/1,rasterPos3sv/1,rasterPos4dv/1,rasterPos4fv/1,rasterPos4iv/1,
+ rasterPos4sv/1,rectd/4,rectf/4,recti/4,rects/4,rectdv/2,rectfv/2,rectiv/2,
+ rectsv/2,vertexPointer/4,normalPointer/3,colorPointer/4,indexPointer/3,
+ texCoordPointer/4,edgeFlagPointer/2,arrayElement/1,drawArrays/3,drawElements/4,
+ interleavedArrays/3,shadeModel/1,lightf/3,lighti/3,lightfv/3,lightiv/3,
+ getLightfv/2,getLightiv/2,lightModelf/2,lightModeli/2,lightModelfv/2,
+ lightModeliv/2,materialf/3,materiali/3,materialfv/3,materialiv/3,getMaterialfv/2,
+ getMaterialiv/2,colorMaterial/2,pixelZoom/2,pixelStoref/2,pixelStorei/2,
+ pixelTransferf/2,pixelTransferi/2,pixelMapfv/3,pixelMapuiv/3,pixelMapusv/3,
+ getPixelMapfv/2,getPixelMapuiv/2,getPixelMapusv/2,bitmap/7,readPixels/7,
+ drawPixels/5,copyPixels/5,stencilFunc/3,stencilMask/1,stencilOp/3,
+ clearStencil/1,texGend/3,texGenf/3,texGeni/3,texGendv/3,texGenfv/3,
+ texGeniv/3,getTexGendv/2,getTexGenfv/2,getTexGeniv/2,texEnvf/3,texEnvi/3,
+ texEnvfv/3,texEnviv/3,getTexEnvfv/2,getTexEnviv/2,texParameterf/3,
+ texParameteri/3,texParameterfv/3,texParameteriv/3,getTexParameterfv/2,
+ getTexParameteriv/2,getTexLevelParameterfv/3,getTexLevelParameteriv/3,
+ texImage1D/8,texImage2D/9,getTexImage/5,genTextures/1,deleteTextures/1,
+ bindTexture/2,prioritizeTextures/2,areTexturesResident/1,isTexture/1,
+ texSubImage1D/7,texSubImage2D/9,copyTexImage1D/7,copyTexImage2D/8,
+ copyTexSubImage1D/6,copyTexSubImage2D/8,map1d/6,map1f/6,map2d/10,map2f/10,
+ getMapdv/3,getMapfv/3,getMapiv/3,evalCoord1d/1,evalCoord1f/1,evalCoord1dv/1,
+ evalCoord1fv/1,evalCoord2d/2,evalCoord2f/2,evalCoord2dv/1,evalCoord2fv/1,
+ mapGrid1d/3,mapGrid1f/3,mapGrid2d/6,mapGrid2f/6,evalPoint1/1,evalPoint2/2,
+ evalMesh1/3,evalMesh2/5,fogf/2,fogi/2,fogfv/2,fogiv/2,feedbackBuffer/3,
+ passThrough/1,selectBuffer/2,initNames/0,loadName/1,pushName/1,popName/0,
+ blendColor/4,blendEquation/1,drawRangeElements/6,texImage3D/10,texSubImage3D/11,
copyTexSubImage3D/9,colorTable/6,colorTableParameterfv/3,colorTableParameteriv/3,
copyColorTable/5,getColorTable/4,getColorTableParameterfv/2,getColorTableParameteriv/2,
colorSubTable/6,copyColorSubTable/5,convolutionFilter1D/6,convolutionFilter2D/7,
@@ -267,9 +267,10 @@
viewportIndexedfv/2,scissorArrayv/2,scissorIndexed/5,scissorIndexedv/2,
depthRangeArrayv/2,depthRangeIndexed/3,getFloati_v/2,getDoublei_v/2,
debugMessageControlARB/5,debugMessageInsertARB/5,getDebugMessageLogARB/2,
- getGraphicsResetStatusARB/0,resizeBuffersMESA/0,windowPos4dMESA/4,
- windowPos4dvMESA/1,windowPos4fMESA/4,windowPos4fvMESA/1,windowPos4iMESA/4,
- windowPos4ivMESA/1,windowPos4sMESA/4,windowPos4svMESA/1,depthBoundsEXT/2,
+ getGraphicsResetStatusARB/0,drawArraysInstancedBaseInstance/5,drawElementsInstancedBaseInstance/6,
+ drawElementsInstancedBaseVertexBaseInstance/7,drawTransformFeedbackInstanced/3,
+ drawTransformFeedbackStreamInstanced/4,getInternalformativ/4,bindImageTexture/7,
+ memoryBarrier/1,texStorage1D/4,texStorage2D/5,texStorage3D/6,depthBoundsEXT/2,
stencilClearTagEXT/2]).
-export([call/2, cast/2, send_bin/1]).
@@ -306,2215 +307,8470 @@ send_bin(Tuple) when is_tuple(Tuple) ->
%% API
-%% @spec (Op::enum(),Value::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAccum.xml">external</a> documentation.
--spec accum(enum(),float()) -> ok.
-accum(Op,Value) ->
- cast(5037, <<Op:?GLenum,Value:?GLfloat>>).
-
-%% @spec (Func::enum(),Ref::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml">external</a> documentation.
--spec alphaFunc(enum(),clamp()) -> ok.
-alphaFunc(Func,Ref) ->
- cast(5038, <<Func:?GLenum,Ref:?GLclampf>>).
+%% @doc Specify the clear value for the color index buffers
+%%
+%% ``gl:clearIndex'' specifies the index used by {@link gl:clear/1} to clear the color index
+%% buffers. `C' is not clamped. Rather, `C' is converted to a fixed-point value
+%% with unspecified precision to the right of the binary point. The integer part of this
+%% value is then masked with 2 m-1, where m is the number of bits in a color index stored
+%% in the frame buffer.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearIndex.xml">external</a> documentation.
+-spec clearIndex(C) -> ok when C :: float().
+clearIndex(C) ->
+ cast(5037, <<C:?GLfloat>>).
-%% @spec (Textures::[integer()]) -> {0|1,Residences::[0|1]}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAreTexturesResident.xml">external</a> documentation.
--spec areTexturesResident([integer()]) -> {0|1,[0|1]}.
-areTexturesResident(Textures) ->
- call(5039, <<(length(Textures)):?GLuint,
- (<< <<C:?GLuint>> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>).
+%% @doc Specify clear values for the color buffers
+%%
+%% ``gl:clearColor'' specifies the red, green, blue, and alpha values used by {@link gl:clear/1}
+%% to clear the color buffers. Values specified by ``gl:clearColor'' are clamped to the
+%% range [0 1].
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearColor.xml">external</a> documentation.
+-spec clearColor(Red, Green, Blue, Alpha) -> ok when Red :: clamp(),Green :: clamp(),Blue :: clamp(),Alpha :: clamp().
+clearColor(Red,Green,Blue,Alpha) ->
+ cast(5038, <<Red:?GLclampf,Green:?GLclampf,Blue:?GLclampf,Alpha:?GLclampf>>).
-%% @spec (I::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glArrayElement.xml">external</a> documentation.
--spec arrayElement(integer()) -> ok.
-arrayElement(I) ->
- cast(5040, <<I:?GLint>>).
+%% @doc Clear buffers to preset values
+%%
+%% ``gl:clear'' sets the bitplane area of the window to values previously selected by ``gl:clearColor''
+%% , ``gl:clearDepth'', and ``gl:clearStencil''. Multiple color buffers can be cleared
+%% simultaneously by selecting more than one buffer at a time using {@link gl:drawBuffer/1} .
+%%
+%% The pixel ownership test, the scissor test, dithering, and the buffer writemasks affect
+%% the operation of ``gl:clear''. The scissor box bounds the cleared region. Alpha function,
+%% blend function, logical operation, stenciling, texture mapping, and depth-buffering are
+%% ignored by ``gl:clear''.
+%%
+%% ``gl:clear'' takes a single argument that is the bitwise OR of several values indicating
+%% which buffer is to be cleared.
+%%
+%% The values are as follows:
+%%
+%% `?GL_COLOR_BUFFER_BIT': Indicates the buffers currently enabled for color writing.
+%%
+%% `?GL_DEPTH_BUFFER_BIT': Indicates the depth buffer.
+%%
+%% `?GL_STENCIL_BUFFER_BIT': Indicates the stencil buffer.
+%%
+%% The value to which each buffer is cleared depends on the setting of the clear value for
+%% that buffer.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClear.xml">external</a> documentation.
+-spec clear(Mask) -> ok when Mask :: integer().
+clear(Mask) ->
+ cast(5039, <<Mask:?GLbitfield>>).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBegin.xml">external</a> documentation.
--spec 'begin'(enum()) -> ok.
-'begin'(Mode) ->
- cast(5041, <<Mode:?GLenum>>).
+%% @doc Control the writing of individual bits in the color index buffers
+%%
+%% ``gl:indexMask'' controls the writing of individual bits in the color index buffers.
+%% The least significant n bits of `Mask' , where n is the number of bits in a color
+%% index buffer, specify a mask. Where a 1 (one) appears in the mask, it's possible to write
+%% to the corresponding bit in the color index buffer (or buffers). Where a 0 (zero) appears,
+%% the corresponding bit is write-protected.
+%%
+%% This mask is used only in color index mode, and it affects only the buffers currently
+%% selected for writing (see {@link gl:drawBuffer/1} ). Initially, all bits are enabled for
+%% writing.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndexMask.xml">external</a> documentation.
+-spec indexMask(Mask) -> ok when Mask :: integer().
+indexMask(Mask) ->
+ cast(5040, <<Mask:?GLuint>>).
-%% @spec (Target::enum(),Texture::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindTexture.xml">external</a> documentation.
--spec bindTexture(enum(),integer()) -> ok.
-bindTexture(Target,Texture) ->
- cast(5042, <<Target:?GLenum,Texture:?GLuint>>).
+%% @doc Enable and disable writing of frame buffer color components
+%%
+%% ``gl:colorMask'' and ``gl:colorMaski'' specify whether the individual color components
+%% in the frame buffer can or cannot be written. ``gl:colorMaski'' sets the mask for a
+%% specific draw buffer, whereas ``gl:colorMask'' sets the mask for all draw buffers. If `Red'
+%% is `?GL_FALSE', for example, no change is made to the red component of any pixel
+%% in any of the color buffers, regardless of the drawing operation attempted.
+%%
+%% Changes to individual bits of components cannot be controlled. Rather, changes are either
+%% enabled or disabled for entire color components.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml">external</a> documentation.
+-spec colorMask(Red, Green, Blue, Alpha) -> ok when Red :: 0|1,Green :: 0|1,Blue :: 0|1,Alpha :: 0|1.
+colorMask(Red,Green,Blue,Alpha) ->
+ cast(5041, <<Red:?GLboolean,Green:?GLboolean,Blue:?GLboolean,Alpha:?GLboolean>>).
-%% @spec (Width::integer(),Height::integer(),Xorig::float(),Yorig::float(),Xmove::float(),Ymove::float(),Bitmap::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBitmap.xml">external</a> documentation.
--spec bitmap(integer(),integer(),float(),float(),float(),float(),offset()|mem()) -> ok.
-bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) when is_integer(Bitmap) ->
- cast(5043, <<Width:?GLsizei,Height:?GLsizei,Xorig:?GLfloat,Yorig:?GLfloat,Xmove:?GLfloat,Ymove:?GLfloat,Bitmap:?GLuint>>);
-bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) ->
- send_bin(Bitmap),
- cast(5044, <<Width:?GLsizei,Height:?GLsizei,Xorig:?GLfloat,Yorig:?GLfloat,Xmove:?GLfloat,Ymove:?GLfloat>>).
+%% @doc Specify the alpha test function
+%%
+%% The alpha test discards fragments depending on the outcome of a comparison between an
+%% incoming fragment's alpha value and a constant reference value. ``gl:alphaFunc'' specifies
+%% the reference value and the comparison function. The comparison is performed only if alpha
+%% testing is enabled. By default, it is not enabled. (See {@link gl:enable/1} and {@link gl:enable/1}
+%% of `?GL_ALPHA_TEST'.)
+%%
+%% `Func' and `Ref' specify the conditions under which the pixel is drawn. The
+%% incoming alpha value is compared to `Ref' using the function specified by `Func' .
+%% If the value passes the comparison, the incoming fragment is drawn if it also passes subsequent
+%% stencil and depth buffer tests. If the value fails the comparison, no change is made to
+%% the frame buffer at that pixel location. The comparison functions are as follows:
+%%
+%% `?GL_NEVER': Never passes.
+%%
+%% `?GL_LESS': Passes if the incoming alpha value is less than the reference value.
+%%
+%% `?GL_EQUAL': Passes if the incoming alpha value is equal to the reference value.
+%%
+%% `?GL_LEQUAL': Passes if the incoming alpha value is less than or equal to the reference
+%% value.
+%%
+%% `?GL_GREATER': Passes if the incoming alpha value is greater than the reference
+%% value.
+%%
+%% `?GL_NOTEQUAL': Passes if the incoming alpha value is not equal to the reference
+%% value.
+%%
+%% `?GL_GEQUAL': Passes if the incoming alpha value is greater than or equal to the
+%% reference value.
+%%
+%% `?GL_ALWAYS': Always passes (initial value).
+%%
+%% ``gl:alphaFunc'' operates on all pixel write operations, including those resulting from
+%% the scan conversion of points, lines, polygons, and bitmaps, and from pixel draw and copy
+%% operations. ``gl:alphaFunc'' does not affect screen clear operations.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml">external</a> documentation.
+-spec alphaFunc(Func, Ref) -> ok when Func :: enum(),Ref :: clamp().
+alphaFunc(Func,Ref) ->
+ cast(5042, <<Func:?GLenum,Ref:?GLclampf>>).
-%% @spec (Sfactor::enum(),Dfactor::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml">external</a> documentation.
--spec blendFunc(enum(),enum()) -> ok.
+%% @doc Specify pixel arithmetic
+%%
+%% Pixels can be drawn using a function that blends the incoming (source) RGBA values with
+%% the RGBA values that are already in the frame buffer (the destination values). Blending
+%% is initially disabled. Use {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_BLEND'
+%% to enable and disable blending.
+%%
+%% ``gl:blendFunc'' defines the operation of blending for all draw buffers when it is enabled.
+%% ``gl:blendFunci'' defines the operation of blending for a single draw buffer specified
+%% by `Buf' when enabled for that draw buffer. `Sfactor' specifies which method
+%% is used to scale the source color components. `Dfactor' specifies which method is
+%% used to scale the destination color components. Both parameters must be one of the following
+%% symbolic constants: `?GL_ZERO', `?GL_ONE', `?GL_SRC_COLOR', `?GL_ONE_MINUS_SRC_COLOR'
+%% , `?GL_DST_COLOR', `?GL_ONE_MINUS_DST_COLOR', `?GL_SRC_ALPHA', `?GL_ONE_MINUS_SRC_ALPHA'
+%% , `?GL_DST_ALPHA', `?GL_ONE_MINUS_DST_ALPHA', `?GL_CONSTANT_COLOR', `?GL_ONE_MINUS_CONSTANT_COLOR'
+%% , `?GL_CONSTANT_ALPHA', `?GL_ONE_MINUS_CONSTANT_ALPHA', `?GL_SRC_ALPHA_SATURATE'
+%% , `?GL_SRC1_COLOR', `?GL_ONE_MINUS_SRC1_COLOR', `?GL_SRC1_ALPHA', and `?GL_ONE_MINUS_SRC1_ALPHA'
+%% . The possible methods are described in the following table. Each method defines four
+%% scale factors, one each for red, green, blue, and alpha. In the table and in subsequent
+%% equations, first source, second source and destination color components are referred to
+%% as (R s0 G s0 B s0 A s0), (R s1 G s1 B s1 A s1) and (R d G d B d A d), respectively. The color specified by {@link gl:blendColor/4} is referred to
+%% as (R c G c B c A c). They are understood to have integer values between 0 and (k R k G k B k A), where
+%%
+%% k c= 2(m c)-1
+%%
+%% and (m R m G m B m A) is the number of red, green, blue, and alpha bitplanes.
+%%
+%% Source and destination scale factors are referred to as (s R s G s B s A) and (d R d G d B d A). The scale factors described
+%% in the table, denoted (f R f G f B f A), represent either source or destination factors. All scale factors
+%% have range [0 1].
+%%
+%% <table><tbody><tr><td>` Parameter '</td><td>(f R f G f B f A)</td></tr></tbody><tbody><tr><td>`?GL_ZERO'
+%% </td><td>(0 0 0 0)</td></tr><tr><td>`?GL_ONE'</td><td>(1 1 1 1)</td></tr><tr><td>`?GL_SRC_COLOR'</td>
+%% <td>(R s0 k/R G s0 k/G B s0 k/B A s0 k/A)</td></tr><tr><td>`?GL_ONE_MINUS_SRC_COLOR'</td><td>(1 1 1 1)-(R s0 k/R G s0 k/G B s0 k/B
+%% A s0 k/A)</td></tr><tr><td>`?GL_DST_COLOR'
+%% </td><td>(R d k/R G d k/G B d k/B A d k/A)</td></tr><tr><td>`?GL_ONE_MINUS_DST_COLOR'</td><td>(1 1 1 1)-(R d k/R G d k/G B d k/B
+%% A d k/A)</td></tr><tr><td>`?GL_SRC_ALPHA'
+%% </td><td>(A s0 k/A A s0 k/A A s0 k/A A s0 k/A)</td></tr><tr><td>`?GL_ONE_MINUS_SRC_ALPHA'</td><td>(1 1 1 1)-(A s0 k/A A s0 k/A A s0
+%% k/A A s0 k/A)</td></tr><tr><td>`?GL_DST_ALPHA'
+%% </td><td>(A d k/A A d k/A A d k/A A d k/A)</td></tr><tr><td>`?GL_ONE_MINUS_DST_ALPHA'</td><td>(1 1 1 1)-(A d k/A A d k/A A d k/A
+%% A d k/A)</td></tr><tr><td>`?GL_CONSTANT_COLOR'
+%% </td><td>(R c G c B c A c)</td></tr><tr><td>`?GL_ONE_MINUS_CONSTANT_COLOR'</td><td>(1 1 1 1)-(R c G c B c A c)</td></tr><tr><td>
+%% `?GL_CONSTANT_ALPHA'</td><td>(A c A c A c A c)</td></tr><tr><td>`?GL_ONE_MINUS_CONSTANT_ALPHA'</td>
+%% <td>(1 1 1 1)-(A c A c A c A c)</td></tr><tr><td>`?GL_SRC_ALPHA_SATURATE'</td><td>(i i i 1)</td></tr><tr><td>`?GL_SRC1_COLOR'
+%% </td><td>(R s1 k/R G s1 k/G B s1 k/B A s1 k/A)</td></tr><tr><td>`?GL_ONE_MINUS_SRC1_COLOR'</td><td>(1 1 1 1)-(R s1 k/R G s1 k/G B
+%% s1 k/B A s1 k/A)</td></tr><tr><td>`?GL_SRC1_ALPHA'
+%% </td><td>(A s1 k/A A s1 k/A A s1 k/A A s1 k/A)</td></tr><tr><td>`?GL_ONE_MINUS_SRC1_ALPHA'</td><td>(1 1 1 1)-(A s1 k/A A s1 k/A A
+%% s1 k/A A s1 k/A)</td></tr></tbody></table>
+%%
+%%
+%% In the table,
+%%
+%% i= min(A s k A-A d) k/A
+%%
+%% To determine the blended RGBA values of a pixel, the system uses the following equations:
+%%
+%%
+%% R d= min(k R R s s R+R d d R) G d= min(k G G s s G+G d d G) B d= min(k B B s s B+B d d B) A d= min(k A A s s A+A d d A)
+%%
+%% Despite the apparent precision of the above equations, blending arithmetic is not exactly
+%% specified, because blending operates with imprecise integer color values. However, a blend
+%% factor that should be equal to 1 is guaranteed not to modify its multiplicand, and a blend
+%% factor equal to 0 reduces its multiplicand to 0. For example, when `Sfactor' is `?GL_SRC_ALPHA'
+%% , `Dfactor' is `?GL_ONE_MINUS_SRC_ALPHA', and A s is equal to k A, the equations
+%% reduce to simple replacement:
+%%
+%% R d= R s G d= G s B d= B s A d= A s
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml">external</a> documentation.
+-spec blendFunc(Sfactor, Dfactor) -> ok when Sfactor :: enum(),Dfactor :: enum().
blendFunc(Sfactor,Dfactor) ->
- cast(5045, <<Sfactor:?GLenum,Dfactor:?GLenum>>).
+ cast(5043, <<Sfactor:?GLenum,Dfactor:?GLenum>>).
-%% @spec (List::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCallList.xml">external</a> documentation.
--spec callList(integer()) -> ok.
-callList(List) ->
- cast(5046, <<List:?GLuint>>).
-
-%% @spec (Lists::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCallLists.xml">external</a> documentation.
--spec callLists([integer()]) -> ok.
-callLists(Lists) ->
- cast(5047, <<(length(Lists)):?GLuint,
- (<< <<C:?GLuint>> || C <- Lists>>)/binary,0:(((1+length(Lists)) rem 2)*32)>>).
+%% @doc Specify a logical pixel operation for rendering
+%%
+%% ``gl:logicOp'' specifies a logical operation that, when enabled, is applied between
+%% the incoming RGBA color and the RGBA color at the corresponding location in the frame
+%% buffer. To enable or disable the logical operation, call {@link gl:enable/1} and {@link gl:enable/1}
+%% using the symbolic constant `?GL_COLOR_LOGIC_OP'. The initial value is disabled.
+%%
+%% <table><tbody><tr><td>` Opcode '</td><td>` Resulting Operation '</td></tr></tbody>
+%% <tbody><tr><td>`?GL_CLEAR'</td><td> 0 </td></tr><tr><td>`?GL_SET'</td><td> 1 </td>
+%% </tr><tr><td>`?GL_COPY'</td><td> s </td></tr><tr><td>`?GL_COPY_INVERTED'</td><td>
+%% ~s </td></tr><tr><td>`?GL_NOOP'</td><td> d </td></tr><tr><td>`?GL_INVERT'</td><td>
+%% ~d </td></tr><tr><td>`?GL_AND'</td><td> s &amp; d </td></tr><tr><td>`?GL_NAND'</td>
+%% <td> ~(s &amp; d) </td></tr><tr><td>`?GL_OR'</td><td> s | d </td></tr><tr><td>`?GL_NOR'
+%% </td><td> ~(s | d) </td></tr><tr><td>`?GL_XOR'</td><td> s ^ d </td></tr><tr><td>`?GL_EQUIV'
+%% </td><td> ~(s ^ d) </td></tr><tr><td>`?GL_AND_REVERSE'</td><td> s &amp; ~d </td></tr>
+%% <tr><td>`?GL_AND_INVERTED'</td><td> ~s &amp; d </td></tr><tr><td>`?GL_OR_REVERSE'
+%% </td><td> s | ~d </td></tr><tr><td>`?GL_OR_INVERTED'</td><td> ~s | d </td></tr></tbody>
+%% </table>
+%%
+%% `Opcode' is a symbolic constant chosen from the list above. In the explanation of
+%% the logical operations, `s' represents the incoming color and `d' represents
+%% the color in the frame buffer. Standard C-language operators are used. As these bitwise
+%% operators suggest, the logical operation is applied independently to each bit pair of
+%% the source and destination colors.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLogicOp.xml">external</a> documentation.
+-spec logicOp(Opcode) -> ok when Opcode :: enum().
+logicOp(Opcode) ->
+ cast(5044, <<Opcode:?GLenum>>).
-%% @spec (Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClear.xml">external</a> documentation.
--spec clear(integer()) -> ok.
-clear(Mask) ->
- cast(5048, <<Mask:?GLbitfield>>).
+%% @doc Specify whether front- or back-facing facets can be culled
+%%
+%% ``gl:cullFace'' specifies whether front- or back-facing facets are culled (as specified
+%% by `mode') when facet culling is enabled. Facet culling is initially disabled. To
+%% enable and disable facet culling, call the {@link gl:enable/1} and {@link gl:enable/1}
+%% commands with the argument `?GL_CULL_FACE'. Facets include triangles, quadrilaterals,
+%% polygons, and rectangles.
+%%
+%% {@link gl:frontFace/1} specifies which of the clockwise and counterclockwise facets are
+%% front-facing and back-facing. See {@link gl:frontFace/1} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCullFace.xml">external</a> documentation.
+-spec cullFace(Mode) -> ok when Mode :: enum().
+cullFace(Mode) ->
+ cast(5045, <<Mode:?GLenum>>).
-%% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearAccum.xml">external</a> documentation.
--spec clearAccum(float(),float(),float(),float()) -> ok.
-clearAccum(Red,Green,Blue,Alpha) ->
- cast(5049, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat,Alpha:?GLfloat>>).
+%% @doc Define front- and back-facing polygons
+%%
+%% In a scene composed entirely of opaque closed surfaces, back-facing polygons are never
+%% visible. Eliminating these invisible polygons has the obvious benefit of speeding up the
+%% rendering of the image. To enable and disable elimination of back-facing polygons, call {@link gl:enable/1}
+%% and {@link gl:enable/1} with argument `?GL_CULL_FACE'.
+%%
+%% The projection of a polygon to window coordinates is said to have clockwise winding if
+%% an imaginary object following the path from its first vertex, its second vertex, and so
+%% on, to its last vertex, and finally back to its first vertex, moves in a clockwise direction
+%% about the interior of the polygon. The polygon's winding is said to be counterclockwise
+%% if the imaginary object following the same path moves in a counterclockwise direction
+%% about the interior of the polygon. ``gl:frontFace'' specifies whether polygons with
+%% clockwise winding in window coordinates, or counterclockwise winding in window coordinates,
+%% are taken to be front-facing. Passing `?GL_CCW' to `Mode' selects counterclockwise
+%% polygons as front-facing; `?GL_CW' selects clockwise polygons as front-facing. By
+%% default, counterclockwise polygons are taken to be front-facing.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFrontFace.xml">external</a> documentation.
+-spec frontFace(Mode) -> ok when Mode :: enum().
+frontFace(Mode) ->
+ cast(5046, <<Mode:?GLenum>>).
-%% @spec (Red::clamp(),Green::clamp(),Blue::clamp(),Alpha::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearColor.xml">external</a> documentation.
--spec clearColor(clamp(),clamp(),clamp(),clamp()) -> ok.
-clearColor(Red,Green,Blue,Alpha) ->
- cast(5050, <<Red:?GLclampf,Green:?GLclampf,Blue:?GLclampf,Alpha:?GLclampf>>).
+%% @doc Specify the diameter of rasterized points
+%%
+%% ``gl:pointSize'' specifies the rasterized diameter of points. If point size mode is
+%% disabled (see {@link gl:enable/1} with parameter `?GL_PROGRAM_POINT_SIZE'), this value
+%% will be used to rasterize points. Otherwise, the value written to the shading language
+%% built-in variable gl_PointSize will be used.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointSize.xml">external</a> documentation.
+-spec pointSize(Size) -> ok when Size :: float().
+pointSize(Size) ->
+ cast(5047, <<Size:?GLfloat>>).
-%% @spec (Depth::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearDepth.xml">external</a> documentation.
--spec clearDepth(clamp()) -> ok.
-clearDepth(Depth) ->
- cast(5051, <<Depth:?GLclampd>>).
+%% @doc Specify the width of rasterized lines
+%%
+%% ``gl:lineWidth'' specifies the rasterized width of both aliased and antialiased lines.
+%% Using a line width other than 1 has different effects, depending on whether line antialiasing
+%% is enabled. To enable and disable line antialiasing, call {@link gl:enable/1} and {@link gl:enable/1}
+%% with argument `?GL_LINE_SMOOTH'. Line antialiasing is initially disabled.
+%%
+%% If line antialiasing is disabled, the actual width is determined by rounding the supplied
+%% width to the nearest integer. (If the rounding results in the value 0, it is as if the
+%% line width were 1.) If |&amp;Delta; x|&gt;=|&amp;Delta; y|, `i' pixels are filled in each column that is rasterized,
+%% where `i' is the rounded value of `Width' . Otherwise, `i' pixels are filled
+%% in each row that is rasterized.
+%%
+%% If antialiasing is enabled, line rasterization produces a fragment for each pixel square
+%% that intersects the region lying within the rectangle having width equal to the current
+%% line width, length equal to the actual length of the line, and centered on the mathematical
+%% line segment. The coverage value for each fragment is the window coordinate area of the
+%% intersection of the rectangular region with the corresponding pixel square. This value
+%% is saved and used in the final rasterization step.
+%%
+%% Not all widths can be supported when line antialiasing is enabled. If an unsupported
+%% width is requested, the nearest supported width is used. Only width 1 is guaranteed to
+%% be supported; others depend on the implementation. Likewise, there is a range for aliased
+%% line widths as well. To query the range of supported widths and the size difference between
+%% supported widths within the range, call {@link gl:getBooleanv/1} with arguments `?GL_ALIASED_LINE_WIDTH_RANGE'
+%% , `?GL_SMOOTH_LINE_WIDTH_RANGE', and `?GL_SMOOTH_LINE_WIDTH_GRANULARITY'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLineWidth.xml">external</a> documentation.
+-spec lineWidth(Width) -> ok when Width :: float().
+lineWidth(Width) ->
+ cast(5048, <<Width:?GLfloat>>).
-%% @spec (C::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearIndex.xml">external</a> documentation.
--spec clearIndex(float()) -> ok.
-clearIndex(C) ->
- cast(5052, <<C:?GLfloat>>).
+%% @doc Specify the line stipple pattern
+%%
+%% Line stippling masks out certain fragments produced by rasterization; those fragments
+%% will not be drawn. The masking is achieved by using three parameters: the 16-bit line
+%% stipple pattern `Pattern' , the repeat count `Factor' , and an integer stipple
+%% counter s.
+%%
+%% Counter s is reset to 0 whenever {@link gl:'begin'/1} is called and before each line segment
+%% of a {@link gl:'begin'/1} (`?GL_LINES')/ {@link gl:'begin'/1} sequence is generated. It is
+%% incremented after each fragment of a unit width aliased line segment is generated or after
+%% each i fragments of an i width line segment are generated. The i fragments associated
+%% with count s are masked out if
+%%
+%% `Pattern' bit (s/factor)% 16
+%%
+%% is 0, otherwise these fragments are sent to the frame buffer. Bit zero of `Pattern'
+%% is the least significant bit.
+%%
+%% Antialiased lines are treated as a sequence of 1*width rectangles for purposes of stippling.
+%% Whether rectangle s is rasterized or not depends on the fragment rule described for
+%% aliased lines, counting rectangles rather than groups of fragments.
+%%
+%% To enable and disable line stippling, call {@link gl:enable/1} and {@link gl:enable/1}
+%% with argument `?GL_LINE_STIPPLE'. When enabled, the line stipple pattern is applied
+%% as described above. When disabled, it is as if the pattern were all 1's. Initially, line
+%% stippling is disabled.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLineStipple.xml">external</a> documentation.
+-spec lineStipple(Factor, Pattern) -> ok when Factor :: integer(),Pattern :: integer().
+lineStipple(Factor,Pattern) ->
+ cast(5049, <<Factor:?GLint,Pattern:?GLushort>>).
-%% @spec (S::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearStencil.xml">external</a> documentation.
--spec clearStencil(integer()) -> ok.
-clearStencil(S) ->
- cast(5053, <<S:?GLint>>).
+%% @doc Select a polygon rasterization mode
+%%
+%% ``gl:polygonMode'' controls the interpretation of polygons for rasterization. `Face'
+%% describes which polygons `Mode' applies to: both front and back-facing polygons (`?GL_FRONT_AND_BACK'
+%% ). The polygon mode affects only the final rasterization of polygons. In particular, a
+%% polygon's vertices are lit and the polygon is clipped and possibly culled before these
+%% modes are applied.
+%%
+%% Three modes are defined and can be specified in `Mode' :
+%%
+%% `?GL_POINT': Polygon vertices that are marked as the start of a boundary edge are
+%% drawn as points. Point attributes such as `?GL_POINT_SIZE' and `?GL_POINT_SMOOTH'
+%% control the rasterization of the points. Polygon rasterization attributes other than `?GL_POLYGON_MODE'
+%% have no effect.
+%%
+%% `?GL_LINE': Boundary edges of the polygon are drawn as line segments. Line attributes
+%% such as `?GL_LINE_WIDTH' and `?GL_LINE_SMOOTH' control the rasterization of
+%% the lines. Polygon rasterization attributes other than `?GL_POLYGON_MODE' have no
+%% effect.
+%%
+%% `?GL_FILL': The interior of the polygon is filled. Polygon attributes such as `?GL_POLYGON_SMOOTH'
+%% control the rasterization of the polygon.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonMode.xml">external</a> documentation.
+-spec polygonMode(Face, Mode) -> ok when Face :: enum(),Mode :: enum().
+polygonMode(Face,Mode) ->
+ cast(5050, <<Face:?GLenum,Mode:?GLenum>>).
-%% @spec (Plane::enum(),Equation::{float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClipPlane.xml">external</a> documentation.
--spec clipPlane(enum(),{float(),float(),float(),float()}) -> ok.
-clipPlane(Plane,{E1,E2,E3,E4}) ->
- cast(5054, <<Plane:?GLenum,0:32,E1:?GLdouble,E2:?GLdouble,E3:?GLdouble,E4:?GLdouble>>).
+%% @doc Set the scale and units used to calculate depth values
+%%
+%% When `?GL_POLYGON_OFFSET_FILL', `?GL_POLYGON_OFFSET_LINE', or `?GL_POLYGON_OFFSET_POINT'
+%% is enabled, each fragment's `depth' value will be offset after it is interpolated
+%% from the `depth' values of the appropriate vertices. The value of the offset is
+%% factor*DZ+r*units, where DZ is a measurement of the change in depth relative to the
+%% screen area of the polygon, and r is the smallest value that is guaranteed to produce
+%% a resolvable offset for a given implementation. The offset is added before the depth test
+%% is performed and before the value is written into the depth buffer.
+%%
+%% ``gl:polygonOffset'' is useful for rendering hidden-line images, for applying decals
+%% to surfaces, and for rendering solids with highlighted edges.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml">external</a> documentation.
+-spec polygonOffset(Factor, Units) -> ok when Factor :: float(),Units :: float().
+polygonOffset(Factor,Units) ->
+ cast(5051, <<Factor:?GLfloat,Units:?GLfloat>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3b(integer(),integer(),integer()) -> ok.
-color3b(Red,Green,Blue) ->
- cast(5055, <<Red:?GLbyte,Green:?GLbyte,Blue:?GLbyte>>).
+%% @doc Set the polygon stippling pattern
+%%
+%% Polygon stippling, like line stippling (see {@link gl:lineStipple/2} ), masks out certain
+%% fragments produced by rasterization, creating a pattern. Stippling is independent of polygon
+%% antialiasing.
+%%
+%% `Pattern' is a pointer to a 32*32 stipple pattern that is stored in memory just
+%% like the pixel data supplied to a {@link gl:drawPixels/5} call with height and `width'
+%% both equal to 32, a pixel format of `?GL_COLOR_INDEX', and data type of `?GL_BITMAP'
+%% . That is, the stipple pattern is represented as a 32*32 array of 1-bit color indices
+%% packed in unsigned bytes. {@link gl:pixelStoref/2} parameters like `?GL_UNPACK_SWAP_BYTES'
+%% and `?GL_UNPACK_LSB_FIRST' affect the assembling of the bits into a stipple pattern.
+%% Pixel transfer operations (shift, offset, pixel map) are not applied to the stipple image,
+%% however.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a stipple pattern is specified, `Pattern' is
+%% treated as a byte offset into the buffer object's data store.
+%%
+%% To enable and disable polygon stippling, call {@link gl:enable/1} and {@link gl:enable/1}
+%% with argument `?GL_POLYGON_STIPPLE'. Polygon stippling is initially disabled. If
+%% it's enabled, a rasterized polygon fragment with window coordinates x w and y w is
+%% sent to the next stage of the GL if and only if the ( x w% 32)th bit in the ( y w% 32)th
+%% row of the stipple pattern is 1 (one). When polygon stippling is disabled, it is as if
+%% the stipple pattern consists of all 1's.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonStipple.xml">external</a> documentation.
+-spec polygonStipple(Mask) -> ok when Mask :: binary().
+polygonStipple(Mask) ->
+ send_bin(Mask),
+ cast(5052, <<>>).
-%% @spec ({Red,Green,Blue}) -> ok
-%% @equiv color3b(Red,Green,Blue)
--spec color3bv({integer(),integer(),integer()}) -> ok.
-color3bv({Red,Green,Blue}) -> color3b(Red,Green,Blue).
+%% @doc Return the polygon stipple pattern
+%%
+%% ``gl:getPolygonStipple'' returns to `Pattern' a 32*32 polygon stipple pattern.
+%% The pattern is packed into memory as if {@link gl:readPixels/7} with both `height'
+%% and `width' of 32, `type' of `?GL_BITMAP', and `format' of `?GL_COLOR_INDEX'
+%% were called, and the stipple pattern were stored in an internal 32*32 color index buffer.
+%% Unlike {@link gl:readPixels/7} , however, pixel transfer operations (shift, offset, pixel
+%% map) are not applied to the returned stipple image.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a polygon stipple pattern is requested, `Pattern'
+%% is treated as a byte offset into the buffer object's data store.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetPolygonStipple.xml">external</a> documentation.
+-spec getPolygonStipple() -> binary().
+getPolygonStipple() ->
+ call(5053, <<>>).
-%% @spec (Red::float(),Green::float(),Blue::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3d(float(),float(),float()) -> ok.
-color3d(Red,Green,Blue) ->
- cast(5056, <<Red:?GLdouble,Green:?GLdouble,Blue:?GLdouble>>).
+%% @doc Flag edges as either boundary or nonboundary
+%%
+%% Each vertex of a polygon, separate triangle, or separate quadrilateral specified between
+%% a {@link gl:'begin'/1} / {@link gl:'begin'/1} pair is marked as the start of either a boundary or
+%% nonboundary edge. If the current edge flag is true when the vertex is specified, the vertex
+%% is marked as the start of a boundary edge. Otherwise, the vertex is marked as the start
+%% of a nonboundary edge. ``gl:edgeFlag'' sets the edge flag bit to `?GL_TRUE' if `Flag'
+%% is `?GL_TRUE' and to `?GL_FALSE' otherwise.
+%%
+%% The vertices of connected triangles and connected quadrilaterals are always marked as
+%% boundary, regardless of the value of the edge flag.
+%%
+%% Boundary and nonboundary edge flags on vertices are significant only if `?GL_POLYGON_MODE'
+%% is set to `?GL_POINT' or `?GL_LINE'. See {@link gl:polygonMode/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEdgeFlag.xml">external</a> documentation.
+-spec edgeFlag(Flag) -> ok when Flag :: 0|1.
+edgeFlag(Flag) ->
+ cast(5054, <<Flag:?GLboolean>>).
-%% @spec ({Red,Green,Blue}) -> ok
-%% @equiv color3d(Red,Green,Blue)
--spec color3dv({float(),float(),float()}) -> ok.
-color3dv({Red,Green,Blue}) -> color3d(Red,Green,Blue).
+%% @equiv edgeFlag(Flag)
+-spec edgeFlagv(Flag) -> ok when Flag :: {Flag :: 0|1}.
+edgeFlagv({Flag}) -> edgeFlag(Flag).
-%% @spec (Red::float(),Green::float(),Blue::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3f(float(),float(),float()) -> ok.
-color3f(Red,Green,Blue) ->
- cast(5057, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat>>).
+%% @doc Define the scissor box
+%%
+%% ``gl:scissor'' defines a rectangle, called the scissor box, in window coordinates. The
+%% first two arguments, `X' and `Y' , specify the lower left corner of the box. `Width'
+%% and `Height' specify the width and height of the box.
+%%
+%% To enable and disable the scissor test, call {@link gl:enable/1} and {@link gl:enable/1}
+%% with argument `?GL_SCISSOR_TEST'. The test is initially disabled. While the test
+%% is enabled, only pixels that lie within the scissor box can be modified by drawing commands.
+%% Window coordinates have integer values at the shared corners of frame buffer pixels. glScissor(0,0,1,1)
+%% allows modification of only the lower left pixel in the window, and glScissor(0,0,0,0)
+%% doesn't allow modification of any pixels in the window.
+%%
+%% When the scissor test is disabled, it is as though the scissor box includes the entire
+%% window.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissor.xml">external</a> documentation.
+-spec scissor(X, Y, Width, Height) -> ok when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
+scissor(X,Y,Width,Height) ->
+ cast(5055, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
-%% @spec ({Red,Green,Blue}) -> ok
-%% @equiv color3f(Red,Green,Blue)
--spec color3fv({float(),float(),float()}) -> ok.
-color3fv({Red,Green,Blue}) -> color3f(Red,Green,Blue).
+%% @doc Specify a plane against which all geometry is clipped
+%%
+%% Geometry is always clipped against the boundaries of a six-plane frustum in `x', `y'
+%% , and `z'. ``gl:clipPlane'' allows the specification of additional planes, not
+%% necessarily perpendicular to the `x', `y', or `z' axis, against which all
+%% geometry is clipped. To determine the maximum number of additional clipping planes, call {@link gl:getBooleanv/1}
+%% with argument `?GL_MAX_CLIP_PLANES'. All implementations support at least six such
+%% clipping planes. Because the resulting clipping region is the intersection of the defined
+%% half-spaces, it is always convex.
+%%
+%% ``gl:clipPlane'' specifies a half-space using a four-component plane equation. When ``gl:clipPlane''
+%% is called, `Equation' is transformed by the inverse of the modelview matrix and
+%% stored in the resulting eye coordinates. Subsequent changes to the modelview matrix have
+%% no effect on the stored plane-equation components. If the dot product of the eye coordinates
+%% of a vertex with the stored plane equation components is positive or zero, the vertex is `in'
+%% with respect to that clipping plane. Otherwise, it is `out'.
+%%
+%% To enable and disable clipping planes, call {@link gl:enable/1} and {@link gl:enable/1}
+%% with the argument `?GL_CLIP_PLANE'`i', where `i' is the plane number.
+%%
+%% All clipping planes are initially defined as (0, 0, 0, 0) in eye coordinates and are
+%% disabled.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClipPlane.xml">external</a> documentation.
+-spec clipPlane(Plane, Equation) -> ok when Plane :: enum(),Equation :: {float(),float(),float(),float()}.
+clipPlane(Plane,{E1,E2,E3,E4}) ->
+ cast(5056, <<Plane:?GLenum,0:32,E1:?GLdouble,E2:?GLdouble,E3:?GLdouble,E4:?GLdouble>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3i(integer(),integer(),integer()) -> ok.
-color3i(Red,Green,Blue) ->
- cast(5058, <<Red:?GLint,Green:?GLint,Blue:?GLint>>).
+%% @doc Return the coefficients of the specified clipping plane
+%%
+%% ``gl:getClipPlane'' returns in `Equation' the four coefficients of the plane equation
+%% for `Plane' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetClipPlane.xml">external</a> documentation.
+-spec getClipPlane(Plane) -> {float(),float(),float(),float()} when Plane :: enum().
+getClipPlane(Plane) ->
+ call(5057, <<Plane:?GLenum>>).
-%% @spec ({Red,Green,Blue}) -> ok
-%% @equiv color3i(Red,Green,Blue)
--spec color3iv({integer(),integer(),integer()}) -> ok.
-color3iv({Red,Green,Blue}) -> color3i(Red,Green,Blue).
+%% @doc Specify which color buffers are to be drawn into
+%%
+%% When colors are written to the frame buffer, they are written into the color buffers
+%% specified by ``gl:drawBuffer''. The specifications are as follows:
+%%
+%% `?GL_NONE': No color buffers are written.
+%%
+%% `?GL_FRONT_LEFT': Only the front left color buffer is written.
+%%
+%% `?GL_FRONT_RIGHT': Only the front right color buffer is written.
+%%
+%% `?GL_BACK_LEFT': Only the back left color buffer is written.
+%%
+%% `?GL_BACK_RIGHT': Only the back right color buffer is written.
+%%
+%% `?GL_FRONT': Only the front left and front right color buffers are written. If there
+%% is no front right color buffer, only the front left color buffer is written.
+%%
+%% `?GL_BACK': Only the back left and back right color buffers are written. If there
+%% is no back right color buffer, only the back left color buffer is written.
+%%
+%% `?GL_LEFT': Only the front left and back left color buffers are written. If there
+%% is no back left color buffer, only the front left color buffer is written.
+%%
+%% `?GL_RIGHT': Only the front right and back right color buffers are written. If there
+%% is no back right color buffer, only the front right color buffer is written.
+%%
+%% `?GL_FRONT_AND_BACK': All the front and back color buffers (front left, front right,
+%% back left, back right) are written. If there are no back color buffers, only the front
+%% left and front right color buffers are written. If there are no right color buffers, only
+%% the front left and back left color buffers are written. If there are no right or back
+%% color buffers, only the front left color buffer is written.
+%%
+%% If more than one color buffer is selected for drawing, then blending or logical operations
+%% are computed and applied independently for each color buffer and can produce different
+%% results in each buffer.
+%%
+%% Monoscopic contexts include only `left' buffers, and stereoscopic contexts include
+%% both `left' and `right' buffers. Likewise, single-buffered contexts include
+%% only `front' buffers, and double-buffered contexts include both `front' and `back'
+%% buffers. The context is selected at GL initialization.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffer.xml">external</a> documentation.
+-spec drawBuffer(Mode) -> ok when Mode :: enum().
+drawBuffer(Mode) ->
+ cast(5058, <<Mode:?GLenum>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3s(integer(),integer(),integer()) -> ok.
-color3s(Red,Green,Blue) ->
- cast(5059, <<Red:?GLshort,Green:?GLshort,Blue:?GLshort>>).
+%% @doc Select a color buffer source for pixels
+%%
+%% ``gl:readBuffer'' specifies a color buffer as the source for subsequent {@link gl:readPixels/7}
+%% , {@link gl:copyTexImage1D/7} , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8}
+%% , and {@link gl:copyTexSubImage3D/9} commands. `Mode' accepts one of twelve or more
+%% predefined values. In a fully configured system, `?GL_FRONT', `?GL_LEFT', and `?GL_FRONT_LEFT'
+%% all name the front left buffer, `?GL_FRONT_RIGHT' and `?GL_RIGHT' name the
+%% front right buffer, and `?GL_BACK_LEFT' and `?GL_BACK' name the back left buffer.
+%% Further more, the constants `?GL_COLOR_ATTACHMENT'`i' may be used to indicate
+%% the `i'th color attachment where `i' ranges from zero to the value of `?GL_MAX_COLOR_ATTACHMENTS'
+%% minus one.
+%%
+%% Nonstereo double-buffered configurations have only a front left and a back left buffer.
+%% Single-buffered configurations have a front left and a front right buffer if stereo, and
+%% only a front left buffer if nonstereo. It is an error to specify a nonexistent buffer to ``gl:readBuffer''
+%% .
+%%
+%% `Mode' is initially `?GL_FRONT' in single-buffered configurations and `?GL_BACK'
+%% in double-buffered configurations.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReadBuffer.xml">external</a> documentation.
+-spec readBuffer(Mode) -> ok when Mode :: enum().
+readBuffer(Mode) ->
+ cast(5059, <<Mode:?GLenum>>).
-%% @spec ({Red,Green,Blue}) -> ok
-%% @equiv color3s(Red,Green,Blue)
--spec color3sv({integer(),integer(),integer()}) -> ok.
-color3sv({Red,Green,Blue}) -> color3s(Red,Green,Blue).
+%% @doc Enable or disable server-side GL capabilities
+%%
+%% ``gl:enable'' and {@link gl:enable/1} enable and disable various capabilities. Use {@link gl:isEnabled/1}
+%% or {@link gl:getBooleanv/1} to determine the current setting of any capability. The initial value
+%% for each capability with the exception of `?GL_DITHER' and `?GL_MULTISAMPLE'
+%% is `?GL_FALSE'. The initial value for `?GL_DITHER' and `?GL_MULTISAMPLE'
+%% is `?GL_TRUE'.
+%%
+%% Both ``gl:enable'' and {@link gl:enable/1} take a single argument, `Cap' , which
+%% can assume one of the following values:
+%%
+%% Some of the GL's capabilities are indexed. ``gl:enablei'' and ``gl:disablei'' enable
+%% and disable indexed capabilities.
+%%
+%% `?GL_BLEND': If enabled, blend the computed fragment color values with the values
+%% in the color buffers. See {@link gl:blendFunc/2} .
+%%
+%% `?GL_CLIP_DISTANCE'`i': If enabled, clip geometry against user-defined half
+%% space `i'.
+%%
+%% `?GL_COLOR_LOGIC_OP': If enabled, apply the currently selected logical operation
+%% to the computed fragment color and color buffer values. See {@link gl:logicOp/1} .
+%%
+%% `?GL_CULL_FACE': If enabled, cull polygons based on their winding in window coordinates.
+%% See {@link gl:cullFace/1} .
+%%
+%% `?GL_DEPTH_CLAMP': If enabled, the -w c&amp;le; z c&amp;le; w c plane equation is
+%% ignored by view volume clipping (effectively, there is no near or far plane clipping).
+%% See {@link gl:depthRange/2} .
+%%
+%% `?GL_DEPTH_TEST': If enabled, do depth comparisons and update the depth buffer.
+%% Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer
+%% is not updated if the depth test is disabled. See {@link gl:depthFunc/1} and {@link gl:depthRange/2}
+%% .
+%%
+%% `?GL_DITHER': If enabled, dither color components or indices before they are written
+%% to the color buffer.
+%%
+%% `?GL_FRAMEBUFFER_SRGB': If enabled and the value of `?GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING'
+%% for the framebuffer attachment corresponding to the destination buffer is `?GL_SRGB',
+%% the R, G, and B destination color values (after conversion from fixed-point to floating-point)
+%% are considered to be encoded for the sRGB color space and hence are linearized prior to
+%% their use in blending.
+%%
+%% `?GL_LINE_SMOOTH': If enabled, draw lines with correct filtering. Otherwise, draw
+%% aliased lines. See {@link gl:lineWidth/1} .
+%%
+%% `?GL_MULTISAMPLE': If enabled, use multiple fragment samples in computing the final
+%% color of a pixel. See {@link gl:sampleCoverage/2} .
+%%
+%% `?GL_POLYGON_OFFSET_FILL': If enabled, and if the polygon is rendered in `?GL_FILL'
+%% mode, an offset is added to depth values of a polygon's fragments before the depth comparison
+%% is performed. See {@link gl:polygonOffset/2} .
+%%
+%% `?GL_POLYGON_OFFSET_LINE': If enabled, and if the polygon is rendered in `?GL_LINE'
+%% mode, an offset is added to depth values of a polygon's fragments before the depth comparison
+%% is performed. See {@link gl:polygonOffset/2} .
+%%
+%% `?GL_POLYGON_OFFSET_POINT': If enabled, an offset is added to depth values of a
+%% polygon's fragments before the depth comparison is performed, if the polygon is rendered
+%% in `?GL_POINT' mode. See {@link gl:polygonOffset/2} .
+%%
+%% `?GL_POLYGON_SMOOTH': If enabled, draw polygons with proper filtering. Otherwise,
+%% draw aliased polygons. For correct antialiased polygons, an alpha buffer is needed and
+%% the polygons must be sorted front to back.
+%%
+%% `?GL_PRIMITIVE_RESTART': Enables primitive restarting. If enabled, any one of the
+%% draw commands which transfers a set of generic attribute array elements to the GL will
+%% restart the primitive when the index of the vertex is equal to the primitive restart
+%% index. See {@link gl:primitiveRestartIndex/1} .
+%%
+%% `?GL_SAMPLE_ALPHA_TO_COVERAGE': If enabled, compute a temporary coverage value where
+%% each bit is determined by the alpha value at the corresponding sample location. The temporary
+%% coverage value is then ANDed with the fragment coverage value.
+%%
+%% `?GL_SAMPLE_ALPHA_TO_ONE': If enabled, each sample alpha value is replaced by the
+%% maximum representable alpha value.
+%%
+%% `?GL_SAMPLE_COVERAGE': If enabled, the fragment's coverage is ANDed with the temporary
+%% coverage value. If `?GL_SAMPLE_COVERAGE_INVERT' is set to `?GL_TRUE', invert
+%% the coverage value. See {@link gl:sampleCoverage/2} .
+%%
+%% `?GL_SAMPLE_SHADING': If enabled, the active fragment shader is run once for each
+%% covered sample, or at fraction of this rate as determined by the current value of `?GL_MIN_SAMPLE_SHADING_VALUE'
+%% . See {@link gl:minSampleShading/1} .
+%%
+%% `?GL_SAMPLE_MASK': If enabled, the sample coverage mask generated for a fragment
+%% during rasterization will be ANDed with the value of `?GL_SAMPLE_MASK_VALUE' before
+%% shading occurs. See {@link gl:sampleMaski/2} .
+%%
+%% `?GL_SCISSOR_TEST': If enabled, discard fragments that are outside the scissor rectangle.
+%% See {@link gl:scissor/4} .
+%%
+%% `?GL_STENCIL_TEST': If enabled, do stencil testing and update the stencil buffer.
+%% See {@link gl:stencilFunc/3} and {@link gl:stencilOp/3} .
+%%
+%% `?GL_TEXTURE_CUBE_MAP_SEAMLESS': If enabled, cubemap textures are sampled such that
+%% when linearly sampling from the border between two adjacent faces, texels from both faces
+%% are used to generate the final sample value. When disabled, texels from only a single
+%% face are used to construct the final sample value.
+%%
+%% `?GL_PROGRAM_POINT_SIZE': If enabled and a vertex or geometry shader is active,
+%% then the derived point size is taken from the (potentially clipped) shader builtin `?gl_PointSize'
+%% and clamped to the implementation-dependent point size range.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml">external</a> documentation.
+-spec enable(Cap) -> ok when Cap :: enum().
+enable(Cap) ->
+ cast(5060, <<Cap:?GLenum>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3ub(integer(),integer(),integer()) -> ok.
-color3ub(Red,Green,Blue) ->
- cast(5060, <<Red:?GLubyte,Green:?GLubyte,Blue:?GLubyte>>).
+%% @doc
+%% See {@link enable/1}
+-spec disable(Cap) -> ok when Cap :: enum().
+disable(Cap) ->
+ cast(5061, <<Cap:?GLenum>>).
-%% @spec ({Red,Green,Blue}) -> ok
-%% @equiv color3ub(Red,Green,Blue)
--spec color3ubv({integer(),integer(),integer()}) -> ok.
-color3ubv({Red,Green,Blue}) -> color3ub(Red,Green,Blue).
+%% @doc Test whether a capability is enabled
+%%
+%% ``gl:isEnabled'' returns `?GL_TRUE' if `Cap' is an enabled capability and
+%% returns `?GL_FALSE' otherwise. Boolean states that are indexed may be tested with ``gl:isEnabledi''
+%% . For ``gl:isEnabledi'', `Index' specifies the index of the capability to test. `Index'
+%% must be between zero and the count of indexed capabilities for `Cap' . Initially
+%% all capabilities except `?GL_DITHER' are disabled; `?GL_DITHER' is initially
+%% enabled.
+%%
+%% The following capabilities are accepted for `Cap' : <table><tbody><tr><td>` Constant '
+%% </td><td>` See '</td></tr></tbody><tbody><tr><td>`?GL_BLEND'</td><td> {@link gl:blendFunc/2}
+%% , {@link gl:logicOp/1} </td></tr><tr><td>`?GL_CLIP_DISTANCE'`i'</td><td> {@link gl:enable/1}
+%% </td></tr><tr><td>`?GL_COLOR_LOGIC_OP'</td><td> {@link gl:logicOp/1} </td></tr><tr><td>`?GL_CULL_FACE'
+%% </td><td> {@link gl:cullFace/1} </td></tr><tr><td>`?GL_DEPTH_CLAMP'</td><td> {@link gl:enable/1}
+%% </td></tr><tr><td>`?GL_DEPTH_TEST'</td><td> {@link gl:depthFunc/1} , {@link gl:depthRange/2}
+%% </td></tr><tr><td>`?GL_DITHER'</td><td> {@link gl:enable/1} </td></tr><tr><td>`?GL_FRAMEBUFFER_SRGB'
+%% </td><td> {@link gl:enable/1} </td></tr><tr><td>`?GL_LINE_SMOOTH'</td><td> {@link gl:lineWidth/1}
+%% </td></tr><tr><td>`?GL_MULTISAMPLE'</td><td> {@link gl:sampleCoverage/2} </td></tr><tr><td>
+%% `?GL_POLYGON_SMOOTH'</td><td> {@link gl:polygonMode/2} </td></tr><tr><td>`?GL_POLYGON_OFFSET_FILL'
+%% </td><td> {@link gl:polygonOffset/2} </td></tr><tr><td>`?GL_POLYGON_OFFSET_LINE'</td><td>
+%% {@link gl:polygonOffset/2} </td></tr><tr><td>`?GL_POLYGON_OFFSET_POINT'</td><td> {@link gl:polygonOffset/2}
+%% </td></tr><tr><td>`?GL_PROGRAM_POINT_SIZE'</td><td> {@link gl:enable/1} </td></tr><tr><td>
+%% `?GL_PRIMITIVE_RESTART'</td><td> {@link gl:enable/1} , {@link gl:primitiveRestartIndex/1} </td>
+%% </tr><tr><td>`?GL_SAMPLE_ALPHA_TO_COVERAGE'</td><td> {@link gl:sampleCoverage/2} </td></tr>
+%% <tr><td>`?GL_SAMPLE_ALPHA_TO_ONE'</td><td> {@link gl:sampleCoverage/2} </td></tr><tr><td>
+%% `?GL_SAMPLE_COVERAGE'</td><td> {@link gl:sampleCoverage/2} </td></tr><tr><td>`?GL_SAMPLE_MASK'
+%% </td><td> {@link gl:enable/1} </td></tr><tr><td>`?GL_SCISSOR_TEST'</td><td> {@link gl:scissor/4}
+%% </td></tr><tr><td>`?GL_STENCIL_TEST'</td><td> {@link gl:stencilFunc/3} , {@link gl:stencilOp/3}
+%% </td></tr><tr><td>`?GL_TEXTURE_CUBEMAP_SEAMLESS'</td><td> {@link gl:enable/1} </td></tr>
+%% </tbody></table>
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsEnabled.xml">external</a> documentation.
+-spec isEnabled(Cap) -> 0|1 when Cap :: enum().
+isEnabled(Cap) ->
+ call(5062, <<Cap:?GLenum>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3ui(integer(),integer(),integer()) -> ok.
-color3ui(Red,Green,Blue) ->
- cast(5061, <<Red:?GLuint,Green:?GLuint,Blue:?GLuint>>).
+%% @doc Enable or disable client-side capability
+%%
+%% ``gl:enableClientState'' and {@link gl:enableClientState/1} enable or disable individual
+%% client-side capabilities. By default, all client-side capabilities are disabled. Both ``gl:enableClientState''
+%% and {@link gl:enableClientState/1} take a single argument, `Cap' , which can assume
+%% one of the following values:
+%%
+%% `?GL_COLOR_ARRAY': If enabled, the color array is enabled for writing and used during
+%% rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} ,
+%% {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements'
+%% is called. See {@link gl:colorPointer/4} .
+%%
+%% `?GL_EDGE_FLAG_ARRAY': If enabled, the edge flag array is enabled for writing and
+%% used during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4}
+%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements'
+%% is called. See {@link gl:edgeFlagPointer/2} .
+%%
+%% `?GL_FOG_COORD_ARRAY': If enabled, the fog coordinate array is enabled for writing
+%% and used during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4}
+%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements'
+%% is called. See {@link gl:fogCoordPointer/3} .
+%%
+%% `?GL_INDEX_ARRAY': If enabled, the index array is enabled for writing and used during
+%% rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} ,
+%% {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements'
+%% is called. See {@link gl:indexPointer/3} .
+%%
+%% `?GL_NORMAL_ARRAY': If enabled, the normal array is enabled for writing and used
+%% during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4}
+%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements'
+%% is called. See {@link gl:normalPointer/3} .
+%%
+%% `?GL_SECONDARY_COLOR_ARRAY': If enabled, the secondary color array is enabled for
+%% writing and used during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4}
+%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements'
+%% is called. See {@link gl:colorPointer/4} .
+%%
+%% `?GL_TEXTURE_COORD_ARRAY': If enabled, the texture coordinate array is enabled for
+%% writing and used during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4}
+%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements'
+%% is called. See {@link gl:texCoordPointer/4} .
+%%
+%% `?GL_VERTEX_ARRAY': If enabled, the vertex array is enabled for writing and used
+%% during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4}
+%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements'
+%% is called. See {@link gl:vertexPointer/4} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnableClientState.xml">external</a> documentation.
+-spec enableClientState(Cap) -> ok when Cap :: enum().
+enableClientState(Cap) ->
+ cast(5063, <<Cap:?GLenum>>).
+
+%% @doc
+%% See {@link enableClientState/1}
+-spec disableClientState(Cap) -> ok when Cap :: enum().
+disableClientState(Cap) ->
+ cast(5064, <<Cap:?GLenum>>).
+
+%% @doc Return the value or values of a selected parameter
+%%
+%% These four commands return values for simple state variables in GL. `Pname' is a
+%% symbolic constant indicating the state variable to be returned, and `Params' is a
+%% pointer to an array of the indicated type in which to place the returned data.
+%%
+%% Type conversion is performed if `Params' has a different type than the state variable
+%% value being requested. If ``gl:getBooleanv'' is called, a floating-point (or integer)
+%% value is converted to `?GL_FALSE' if and only if it is 0.0 (or 0). Otherwise, it
+%% is converted to `?GL_TRUE'. If ``gl:getIntegerv'' is called, boolean values are
+%% returned as `?GL_TRUE' or `?GL_FALSE', and most floating-point values are rounded
+%% to the nearest integer value. Floating-point colors and normals, however, are returned
+%% with a linear mapping that maps 1.0 to the most positive representable integer value and
+%% -1.0 to the most negative representable integer value. If ``gl:getFloatv'' or ``gl:getDoublev''
+%% is called, boolean values are returned as `?GL_TRUE' or `?GL_FALSE', and integer
+%% values are converted to floating-point values.
+%%
+%% The following symbolic constants are accepted by `Pname' :
+%%
+%% `?GL_ACTIVE_TEXTURE': `Params' returns a single value indicating the active
+%% multitexture unit. The initial value is `?GL_TEXTURE0'. See {@link gl:activeTexture/1} .
+%%
+%%
+%% `?GL_ALIASED_LINE_WIDTH_RANGE': `Params' returns a pair of values indicating
+%% the range of widths supported for aliased lines. See {@link gl:lineWidth/1} .
+%%
+%% `?GL_ARRAY_BUFFER_BINDING': `Params' returns a single value, the name of the
+%% buffer object currently bound to the target `?GL_ARRAY_BUFFER'. If no buffer object
+%% is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindBuffer/2} .
+%%
+%%
+%% `?GL_BLEND': `Params' returns a single boolean value indicating whether blending
+%% is enabled. The initial value is `?GL_FALSE'. See {@link gl:blendFunc/2} .
+%%
+%% `?GL_BLEND_COLOR': `Params' returns four values, the red, green, blue, and alpha
+%% values which are the components of the blend color. See {@link gl:blendColor/4} .
+%%
+%% `?GL_BLEND_DST_ALPHA': `Params' returns one value, the symbolic constant identifying
+%% the alpha destination blend function. The initial value is `?GL_ZERO'. See {@link gl:blendFunc/2}
+%% and {@link gl:blendFuncSeparate/4} .
+%%
+%% `?GL_BLEND_DST_RGB': `Params' returns one value, the symbolic constant identifying
+%% the RGB destination blend function. The initial value is `?GL_ZERO'. See {@link gl:blendFunc/2}
+%% and {@link gl:blendFuncSeparate/4} .
+%%
+%% `?GL_BLEND_EQUATION_RGB': `Params' returns one value, a symbolic constant indicating
+%% whether the RGB blend equation is `?GL_FUNC_ADD', `?GL_FUNC_SUBTRACT', `?GL_FUNC_REVERSE_SUBTRACT'
+%% , `?GL_MIN' or `?GL_MAX'. See {@link gl:blendEquationSeparate/2} .
+%%
+%% `?GL_BLEND_EQUATION_ALPHA': `Params' returns one value, a symbolic constant
+%% indicating whether the Alpha blend equation is `?GL_FUNC_ADD', `?GL_FUNC_SUBTRACT'
+%% , `?GL_FUNC_REVERSE_SUBTRACT', `?GL_MIN' or `?GL_MAX'. See {@link gl:blendEquationSeparate/2}
+%% .
+%%
+%% `?GL_BLEND_SRC_ALPHA': `Params' returns one value, the symbolic constant identifying
+%% the alpha source blend function. The initial value is `?GL_ONE'. See {@link gl:blendFunc/2}
+%% and {@link gl:blendFuncSeparate/4} .
+%%
+%% `?GL_BLEND_SRC_RGB': `Params' returns one value, the symbolic constant identifying
+%% the RGB source blend function. The initial value is `?GL_ONE'. See {@link gl:blendFunc/2}
+%% and {@link gl:blendFuncSeparate/4} .
+%%
+%% `?GL_COLOR_CLEAR_VALUE': `Params' returns four values: the red, green, blue,
+%% and alpha values used to clear the color buffers. Integer values, if requested, are linearly
+%% mapped from the internal floating-point representation such that 1.0 returns the most
+%% positive representable integer value, and -1.0 returns the most negative representable
+%% integer value. The initial value is (0, 0, 0, 0). See {@link gl:clearColor/4} .
+%%
+%% `?GL_COLOR_LOGIC_OP': `Params' returns a single boolean value indicating whether
+%% a fragment's RGBA color values are merged into the framebuffer using a logical operation.
+%% The initial value is `?GL_FALSE'. See {@link gl:logicOp/1} .
+%%
+%% `?GL_COLOR_WRITEMASK': `Params' returns four boolean values: the red, green,
+%% blue, and alpha write enables for the color buffers. The initial value is (`?GL_TRUE',
+%% `?GL_TRUE', `?GL_TRUE', `?GL_TRUE'). See {@link gl:colorMask/4} .
+%%
+%% `?GL_COMPRESSED_TEXTURE_FORMATS': `Params' returns a list of symbolic constants
+%% of length `?GL_NUM_COMPRESSED_TEXTURE_FORMATS' indicating which compressed texture
+%% formats are available. See {@link gl:compressedTexImage2D/8} .
+%%
+%% `?GL_CONTEXT_FLAGS': `Params' returns one value, the flags with which the context
+%% was created (such as debugging functionality).
+%%
+%% `?GL_CULL_FACE': `Params' returns a single boolean value indicating whether
+%% polygon culling is enabled. The initial value is `?GL_FALSE'. See {@link gl:cullFace/1}
+%% .
+%%
+%% `?GL_CURRENT_PROGRAM': `Params' returns one value, the name of the program object
+%% that is currently active, or 0 if no program object is active. See {@link gl:useProgram/1} .
+%%
+%%
+%% `?GL_DEPTH_CLEAR_VALUE': `Params' returns one value, the value that is used
+%% to clear the depth buffer. Integer values, if requested, are linearly mapped from the
+%% internal floating-point representation such that 1.0 returns the most positive representable
+%% integer value, and -1.0 returns the most negative representable integer value. The initial
+%% value is 1. See {@link gl:clearDepth/1} .
+%%
+%% `?GL_DEPTH_FUNC': `Params' returns one value, the symbolic constant that indicates
+%% the depth comparison function. The initial value is `?GL_LESS'. See {@link gl:depthFunc/1}
+%% .
+%%
+%% `?GL_DEPTH_RANGE': `Params' returns two values: the near and far mapping limits
+%% for the depth buffer. Integer values, if requested, are linearly mapped from the internal
+%% floating-point representation such that 1.0 returns the most positive representable integer
+%% value, and -1.0 returns the most negative representable integer value. The initial value
+%% is (0, 1). See {@link gl:depthRange/2} .
+%%
+%% `?GL_DEPTH_TEST': `Params' returns a single boolean value indicating whether
+%% depth testing of fragments is enabled. The initial value is `?GL_FALSE'. See {@link gl:depthFunc/1}
+%% and {@link gl:depthRange/2} .
+%%
+%% `?GL_DEPTH_WRITEMASK': `Params' returns a single boolean value indicating if
+%% the depth buffer is enabled for writing. The initial value is `?GL_TRUE'. See {@link gl:depthMask/1}
+%% .
+%%
+%% `?GL_DITHER': `Params' returns a single boolean value indicating whether dithering
+%% of fragment colors and indices is enabled. The initial value is `?GL_TRUE'.
+%%
+%% `?GL_DOUBLEBUFFER': `Params' returns a single boolean value indicating whether
+%% double buffering is supported.
+%%
+%% `?GL_DRAW_BUFFER': `Params' returns one value, a symbolic constant indicating
+%% which buffers are being drawn to. See {@link gl:drawBuffer/1} . The initial value is `?GL_BACK'
+%% if there are back buffers, otherwise it is `?GL_FRONT'.
+%%
+%% `?GL_DRAW_BUFFER'`i': `Params' returns one value, a symbolic constant indicating
+%% which buffers are being drawn to by the corresponding output color. See {@link gl:drawBuffers/1}
+%% . The initial value of `?GL_DRAW_BUFFER0' is `?GL_BACK' if there are back buffers,
+%% otherwise it is `?GL_FRONT'. The initial values of draw buffers for all other output
+%% colors is `?GL_NONE'.
+%%
+%% `?GL_DRAW_FRAMEBUFFER_BINDING': `Params' returns one value, the name of the
+%% framebuffer object currently bound to the `?GL_DRAW_FRAMEBUFFER' target. If the default
+%% framebuffer is bound, this value will be zero. The initial value is zero. See {@link gl:bindFramebuffer/2}
+%% .
+%%
+%% `?GL_READ_FRAMEBUFFER_BINDING': `Params' returns one value, the name of the
+%% framebuffer object currently bound to the `?GL_READ_FRAMEBUFFER' target. If the default
+%% framebuffer is bound, this value will be zero. The initial value is zero. See {@link gl:bindFramebuffer/2}
+%% .
+%%
+%% `?GL_ELEMENT_ARRAY_BUFFER_BINDING': `Params' returns a single value, the name
+%% of the buffer object currently bound to the target `?GL_ELEMENT_ARRAY_BUFFER'. If
+%% no buffer object is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindBuffer/2}
+%% .
+%%
+%% `?GL_FRAGMENT_SHADER_DERIVATIVE_HINT': `Params' returns one value, a symbolic
+%% constant indicating the mode of the derivative accuracy hint for fragment shaders. The
+%% initial value is `?GL_DONT_CARE'. See {@link gl:hint/2} .
+%%
+%% `?GL_IMPLEMENTATION_COLOR_READ_FORMAT': `Params' returns a single GLenum value
+%% indicating the implementation's preferred pixel data format. See {@link gl:readPixels/7} .
+%%
+%% `?GL_IMPLEMENTATION_COLOR_READ_TYPE': `Params' returns a single GLenum value
+%% indicating the implementation's preferred pixel data type. See {@link gl:readPixels/7} .
+%%
+%% `?GL_LINE_SMOOTH': `Params' returns a single boolean value indicating whether
+%% antialiasing of lines is enabled. The initial value is `?GL_FALSE'. See {@link gl:lineWidth/1}
+%% .
+%%
+%% `?GL_LINE_SMOOTH_HINT': `Params' returns one value, a symbolic constant indicating
+%% the mode of the line antialiasing hint. The initial value is `?GL_DONT_CARE'. See {@link gl:hint/2}
+%% .
+%%
+%% `?GL_LINE_WIDTH': `Params' returns one value, the line width as specified with {@link gl:lineWidth/1}
+%% . The initial value is 1.
+%%
+%% `?GL_LAYER_PROVOKING_VERTEX': `Params' returns one value, the implementation
+%% dependent specifc vertex of a primitive that is used to select the rendering layer. If
+%% the value returned is equivalent to `?GL_PROVOKING_VERTEX', then the vertex selection
+%% follows the convention specified by {@link gl:provokingVertex/1} . If the value returned
+%% is equivalent to `?GL_FIRST_VERTEX_CONVENTION', then the selection is always taken
+%% from the first vertex in the primitive. If the value returned is equivalent to `?GL_LAST_VERTEX_CONVENTION'
+%% , then the selection is always taken from the last vertex in the primitive. If the value
+%% returned is equivalent to `?GL_UNDEFINED_VERTEX', then the selection is not guaranteed
+%% to be taken from any specific vertex in the primitive.
+%%
+%% `?GL_LINE_WIDTH_GRANULARITY': `Params' returns one value, the width difference
+%% between adjacent supported widths for antialiased lines. See {@link gl:lineWidth/1} .
+%%
+%% `?GL_LINE_WIDTH_RANGE': `Params' returns two values: the smallest and largest
+%% supported widths for antialiased lines. See {@link gl:lineWidth/1} .
+%%
+%% `?GL_LOGIC_OP_MODE': `Params' returns one value, a symbolic constant indicating
+%% the selected logic operation mode. The initial value is `?GL_COPY'. See {@link gl:logicOp/1}
+%% .
+%%
+%% `?GL_MAJOR_VERSION': `Params' returns one value, the major version number of
+%% the OpenGL API supported by the current context.
+%%
+%% `?GL_MAX_3D_TEXTURE_SIZE': `Params' returns one value, a rough estimate of the
+%% largest 3D texture that the GL can handle. The value must be at least 64. Use `?GL_PROXY_TEXTURE_3D'
+%% to determine if a texture is too large. See {@link gl:texImage3D/10} .
+%%
+%% `?GL_MAX_ARRAY_TEXTURE_LAYERS': `Params' returns one value. The value indicates
+%% the maximum number of layers allowed in an array texture, and must be at least 256. See {@link gl:texImage2D/9}
+%% .
+%%
+%% `?GL_MAX_CLIP_DISTANCES': `Params' returns one value, the maximum number of
+%% application-defined clipping distances. The value must be at least 8.
+%%
+%% `?GL_MAX_COLOR_TEXTURE_SAMPLES': `Params' returns one value, the maximum number
+%% of samples in a color multisample texture.
+%%
+%% `?GL_MAX_COMBINED_ATOMIC_COUNTERS': `Params' returns a single value, the maximum
+%% number of atomic counters available to all active shaders.
+%%
+%% `?GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS': `Params' returns one value,
+%% the number of words for fragment shader uniform variables in all uniform blocks (including
+%% default). The value must be at least 1. See {@link gl:uniform1f/2} .
+%%
+%% `?GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS': `Params' returns one value,
+%% the number of words for geometry shader uniform variables in all uniform blocks (including
+%% default). The value must be at least 1. See {@link gl:uniform1f/2} .
+%%
+%% `?GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS': `Params' returns one value, the maximum
+%% supported texture image units that can be used to access texture maps from the vertex
+%% shader and the fragment processor combined. If both the vertex shader and the fragment
+%% processing stage access the same texture image unit, then that counts as using two texture
+%% image units against this limit. The value must be at least 48. See {@link gl:activeTexture/1}
+%% .
+%%
+%% `?GL_MAX_COMBINED_UNIFORM_BLOCKS': `Params' returns one value, the maximum number
+%% of uniform blocks per program. The value must be at least 36. See {@link gl:uniformBlockBinding/3}
+%% .
+%%
+%% `?GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS': `Params' returns one value, the
+%% number of words for vertex shader uniform variables in all uniform blocks (including default).
+%% The value must be at least 1. See {@link gl:uniform1f/2} .
+%%
+%% `?GL_MAX_CUBE_MAP_TEXTURE_SIZE': `Params' returns one value. The value gives
+%% a rough estimate of the largest cube-map texture that the GL can handle. The value must
+%% be at least 1024. Use `?GL_PROXY_TEXTURE_CUBE_MAP' to determine if a texture is too
+%% large. See {@link gl:texImage2D/9} .
+%%
+%% `?GL_MAX_DEPTH_TEXTURE_SAMPLES': `Params' returns one value, the maximum number
+%% of samples in a multisample depth or depth-stencil texture.
+%%
+%% `?GL_MAX_DRAW_BUFFERS': `Params' returns one value, the maximum number of simultaneous
+%% outputs that may be written in a fragment shader. The value must be at least 8. See {@link gl:drawBuffers/1}
+%% .
+%%
+%% `?GL_MAX_DUALSOURCE_DRAW_BUFFERS': `Params' returns one value, the maximum number
+%% of active draw buffers when using dual-source blending. The value must be at least 1.
+%% See {@link gl:blendFunc/2} and {@link gl:blendFuncSeparate/4} .
+%%
+%% `?GL_MAX_ELEMENTS_INDICES': `Params' returns one value, the recommended maximum
+%% number of vertex array indices. See {@link gl:drawRangeElements/6} .
+%%
+%% `?GL_MAX_ELEMENTS_VERTICES': `Params' returns one value, the recommended maximum
+%% number of vertex array vertices. See {@link gl:drawRangeElements/6} .
+%%
+%% `?GL_MAX_FRAGMENT_ATOMIC_COUNTERS': `Params' returns a single value, the maximum
+%% number of atomic counters available to fragment shaders.
+%%
+%% `?GL_MAX_FRAGMENT_INPUT_COMPONENTS': `Params' returns one value, the maximum
+%% number of components of the inputs read by the fragment shader, which must be at least
+%% 128.
+%%
+%% `?GL_MAX_FRAGMENT_UNIFORM_COMPONENTS': `Params' returns one value, the maximum
+%% number of individual floating-point, integer, or boolean values that can be held in uniform
+%% variable storage for a fragment shader. The value must be at least 1024. See {@link gl:uniform1f/2}
+%% .
+%%
+%% `?GL_MAX_FRAGMENT_UNIFORM_VECTORS': `Params' returns one value, the maximum
+%% number of individual 4-vectors of floating-point, integer, or boolean values that can
+%% be held in uniform variable storage for a fragment shader. The value is equal to the value
+%% of `?GL_MAX_FRAGMENT_UNIFORM_COMPONENTS' divided by 4 and must be at least 256. See {@link gl:uniform1f/2}
+%% .
+%%
+%% `?GL_MAX_FRAGMENT_UNIFORM_BLOCKS': `Params' returns one value, the maximum number
+%% of uniform blocks per fragment shader. The value must be at least 12. See {@link gl:uniformBlockBinding/3}
+%% .
+%%
+%% `?GL_MAX_GEOMETRY_ATOMIC_COUNTERS': `Params' returns a single value, the maximum
+%% number of atomic counters available to geometry shaders.
+%%
+%% `?GL_MAX_GEOMETRY_INPUT_COMPONENTS': `Params' returns one value, the maximum
+%% number of components of inputs read by a geometry shader, which must be at least 64.
+%%
+%% `?GL_MAX_GEOMETRY_OUTPUT_COMPONENTS': `Params' returns one value, the maximum
+%% number of components of outputs written by a geometry shader, which must be at least 128.
+%%
+%%
+%% `?GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS': `Params' returns one value, the maximum
+%% supported texture image units that can be used to access texture maps from the geometry
+%% shader. The value must be at least 16. See {@link gl:activeTexture/1} .
+%%
+%% `?GL_MAX_GEOMETRY_UNIFORM_BLOCKS': `Params' returns one value, the maximum number
+%% of uniform blocks per geometry shader. The value must be at least 12. See {@link gl:uniformBlockBinding/3}
+%% .
+%%
+%% `?GL_MAX_GEOMETRY_UNIFORM_COMPONENTS': `Params' returns one value, the maximum
+%% number of individual floating-point, integer, or boolean values that can be held in uniform
+%% variable storage for a geometry shader. The value must be at least 1024. See {@link gl:uniform1f/2}
+%% .
+%%
+%% `?GL_MAX_INTEGER_SAMPLES': `Params' returns one value, the maximum number of
+%% samples supported in integer format multisample buffers.
+%%
+%% `?GL_MIN_MAP_BUFFER_ALIGNMENT': `Params' returns one value, the minimum alignment
+%% in basic machine units of pointers returned fromsee `glMapBuffer' and see `glMapBufferRange'
+%% . This value must be a power of two and must be at least 64.
+%%
+%% `?GL_MAX_PROGRAM_TEXEL_OFFSET': `Params' returns one value, the maximum texel
+%% offset allowed in a texture lookup, which must be at least 7.
+%%
+%% `?GL_MIN_PROGRAM_TEXEL_OFFSET': `Params' returns one value, the minimum texel
+%% offset allowed in a texture lookup, which must be at most -8.
+%%
+%% `?GL_MAX_RECTANGLE_TEXTURE_SIZE': `Params' returns one value. The value gives
+%% a rough estimate of the largest rectangular texture that the GL can handle. The value
+%% must be at least 1024. Use `?GL_PROXY_RECTANGLE_TEXTURE' to determine if a texture
+%% is too large. See {@link gl:texImage2D/9} .
+%%
+%% `?GL_MAX_RENDERBUFFER_SIZE': `Params' returns one value. The value indicates
+%% the maximum supported size for renderbuffers. See {@link gl:framebufferRenderbuffer/4} .
+%%
+%% `?GL_MAX_SAMPLE_MASK_WORDS': `Params' returns one value, the maximum number
+%% of sample mask words.
+%%
+%% `?GL_MAX_SERVER_WAIT_TIMEOUT': `Params' returns one value, the maximum {@link gl:waitSync/3}
+%% timeout interval.
+%%
+%% `?GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS': `Params' returns a single value, the
+%% maximum number of atomic counters available to tessellation control shaders.
+%%
+%% `?GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS': `Params' returns a single value,
+%% the maximum number of atomic counters available to tessellation evaluation shaders.
+%%
+%% `?GL_MAX_TEXTURE_BUFFER_SIZE': `Params' returns one value. The value gives the
+%% maximum number of texels allowed in the texel array of a texture buffer object. Value
+%% must be at least 65536.
+%%
+%% `?GL_MAX_TEXTURE_IMAGE_UNITS': `Params' returns one value, the maximum supported
+%% texture image units that can be used to access texture maps from the fragment shader.
+%% The value must be at least 16. See {@link gl:activeTexture/1} .
+%%
+%% `?GL_MAX_TEXTURE_LOD_BIAS': `Params' returns one value, the maximum, absolute
+%% value of the texture level-of-detail bias. The value must be at least 2.0.
+%%
+%% `?GL_MAX_TEXTURE_SIZE': `Params' returns one value. The value gives a rough
+%% estimate of the largest texture that the GL can handle. The value must be at least 1024.
+%% Use a proxy texture target such as `?GL_PROXY_TEXTURE_1D' or `?GL_PROXY_TEXTURE_2D'
+%% to determine if a texture is too large. See {@link gl:texImage1D/8} and {@link gl:texImage2D/9}
+%% .
+%%
+%% `?GL_MAX_UNIFORM_BUFFER_BINDINGS': `Params' returns one value, the maximum number
+%% of uniform buffer binding points on the context, which must be at least 36.
+%%
+%% `?GL_MAX_UNIFORM_BLOCK_SIZE': `Params' returns one value, the maximum size in
+%% basic machine units of a uniform block, which must be at least 16384.
+%%
+%% `?GL_MAX_VARYING_COMPONENTS': `Params' returns one value, the number components
+%% for varying variables, which must be at least 60.
+%%
+%% `?GL_MAX_VARYING_VECTORS': `Params' returns one value, the number 4-vectors
+%% for varying variables, which is equal to the value of `?GL_MAX_VARYING_COMPONENTS'
+%% and must be at least 15.
+%%
+%% `?GL_MAX_VARYING_FLOATS': `Params' returns one value, the maximum number of
+%% interpolators available for processing varying variables used by vertex and fragment shaders.
+%% This value represents the number of individual floating-point values that can be interpolated;
+%% varying variables declared as vectors, matrices, and arrays will all consume multiple
+%% interpolators. The value must be at least 32.
+%%
+%% `?GL_MAX_VERTEX_ATOMIC_COUNTERS': `Params' returns a single value, the maximum
+%% number of atomic counters available to vertex shaders.
+%%
+%% `?GL_MAX_VERTEX_ATTRIBS': `Params' returns one value, the maximum number of
+%% 4-component generic vertex attributes accessible to a vertex shader. The value must be
+%% at least 16. See {@link gl:vertexAttrib1d/2} .
+%%
+%% `?GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS': `Params' returns one value, the maximum
+%% supported texture image units that can be used to access texture maps from the vertex
+%% shader. The value may be at least 16. See {@link gl:activeTexture/1} .
+%%
+%% `?GL_MAX_VERTEX_UNIFORM_COMPONENTS': `Params' returns one value, the maximum
+%% number of individual floating-point, integer, or boolean values that can be held in uniform
+%% variable storage for a vertex shader. The value must be at least 1024. See {@link gl:uniform1f/2}
+%% .
+%%
+%% `?GL_MAX_VERTEX_UNIFORM_VECTORS': `Params' returns one value, the maximum number
+%% of 4-vectors that may be held in uniform variable storage for the vertex shader. The value
+%% of `?GL_MAX_VERTEX_UNIFORM_VECTORS' is equal to the value of `?GL_MAX_VERTEX_UNIFORM_COMPONENTS'
+%% and must be at least 256.
+%%
+%% `?GL_MAX_VERTEX_OUTPUT_COMPONENTS': `Params' returns one value, the maximum
+%% number of components of output written by a vertex shader, which must be at least 64.
+%%
+%% `?GL_MAX_VERTEX_UNIFORM_BLOCKS': `Params' returns one value, the maximum number
+%% of uniform blocks per vertex shader. The value must be at least 12. See {@link gl:uniformBlockBinding/3}
+%% .
+%%
+%% `?GL_MAX_VIEWPORT_DIMS': `Params' returns two values: the maximum supported
+%% width and height of the viewport. These must be at least as large as the visible dimensions
+%% of the display being rendered to. See {@link gl:viewport/4} .
+%%
+%% `?GL_MAX_VIEWPORTS': `Params' returns one value, the maximum number of simultaneous
+%% viewports that are supported. The value must be at least 16. See {@link gl:viewportIndexedf/5}
+%% .
+%%
+%% `?GL_MINOR_VERSION': `Params' returns one value, the minor version number of
+%% the OpenGL API supported by the current context.
+%%
+%% `?GL_NUM_COMPRESSED_TEXTURE_FORMATS': `Params' returns a single integer value
+%% indicating the number of available compressed texture formats. The minimum value is 4.
+%% See {@link gl:compressedTexImage2D/8} .
+%%
+%% `?GL_NUM_EXTENSIONS': `Params' returns one value, the number of extensions supported
+%% by the GL implementation for the current context. See {@link gl:getString/1} .
+%%
+%% `?GL_NUM_PROGRAM_BINARY_FORMATS': `Params' returns one value, the number of
+%% program binary formats supported by the implementation.
+%%
+%% `?GL_NUM_SHADER_BINARY_FORMATS': `Params' returns one value, the number of binary
+%% shader formats supported by the implementation. If this value is greater than zero, then
+%% the implementation supports loading binary shaders. If it is zero, then the loading of
+%% binary shaders by the implementation is not supported.
+%%
+%% `?GL_PACK_ALIGNMENT': `Params' returns one value, the byte alignment used for
+%% writing pixel data to memory. The initial value is 4. See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_PACK_IMAGE_HEIGHT': `Params' returns one value, the image height used for
+%% writing pixel data to memory. The initial value is 0. See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_PACK_LSB_FIRST': `Params' returns a single boolean value indicating whether
+%% single-bit pixels being written to memory are written first to the least significant bit
+%% of each unsigned byte. The initial value is `?GL_FALSE'. See {@link gl:pixelStoref/2} .
+%%
+%%
+%% `?GL_PACK_ROW_LENGTH': `Params' returns one value, the row length used for writing
+%% pixel data to memory. The initial value is 0. See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_PACK_SKIP_IMAGES': `Params' returns one value, the number of pixel images
+%% skipped before the first pixel is written into memory. The initial value is 0. See {@link gl:pixelStoref/2}
+%% .
+%%
+%% `?GL_PACK_SKIP_PIXELS': `Params' returns one value, the number of pixel locations
+%% skipped before the first pixel is written into memory. The initial value is 0. See {@link gl:pixelStoref/2}
+%% .
+%%
+%% `?GL_PACK_SKIP_ROWS': `Params' returns one value, the number of rows of pixel
+%% locations skipped before the first pixel is written into memory. The initial value is
+%% 0. See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_PACK_SWAP_BYTES': `Params' returns a single boolean value indicating whether
+%% the bytes of two-byte and four-byte pixel indices and components are swapped before being
+%% written to memory. The initial value is `?GL_FALSE'. See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_PIXEL_PACK_BUFFER_BINDING': `Params' returns a single value, the name of
+%% the buffer object currently bound to the target `?GL_PIXEL_PACK_BUFFER'. If no buffer
+%% object is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindBuffer/2}
+%% .
+%%
+%% `?GL_PIXEL_UNPACK_BUFFER_BINDING': `Params' returns a single value, the name
+%% of the buffer object currently bound to the target `?GL_PIXEL_UNPACK_BUFFER'. If
+%% no buffer object is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindBuffer/2}
+%% .
+%%
+%% `?GL_POINT_FADE_THRESHOLD_SIZE': `Params' returns one value, the point size
+%% threshold for determining the point size. See {@link gl:pointParameterf/2} .
+%%
+%% `?GL_PRIMITIVE_RESTART_INDEX': `Params' returns one value, the current primitive
+%% restart index. The initial value is 0. See {@link gl:primitiveRestartIndex/1} .
+%%
+%% `?GL_PROGRAM_BINARY_FORMATS': `Params' an array of `?GL_NUM_PROGRAM_BINARY_FORMATS'
+%% values, indicating the proram binary formats supported by the implementation.
+%%
+%% `?GL_PROGRAM_PIPELINE_BINDING': `Params' a single value, the name of the currently
+%% bound program pipeline object, or zero if no program pipeline object is bound. See {@link gl:bindProgramPipeline/1}
+%% .
+%%
+%% `?GL_PROVOKING_VERTEX': `Params' returns one value, the currently selected provoking
+%% vertex convention. The initial value is `?GL_LAST_VERTEX_CONVENTION'. See {@link gl:provokingVertex/1}
+%% .
+%%
+%% `?GL_POINT_SIZE': `Params' returns one value, the point size as specified by {@link gl:pointSize/1}
+%% . The initial value is 1.
+%%
+%% `?GL_POINT_SIZE_GRANULARITY': `Params' returns one value, the size difference
+%% between adjacent supported sizes for antialiased points. See {@link gl:pointSize/1} .
+%%
+%% `?GL_POINT_SIZE_RANGE': `Params' returns two values: the smallest and largest
+%% supported sizes for antialiased points. The smallest size must be at most 1, and the largest
+%% size must be at least 1. See {@link gl:pointSize/1} .
+%%
+%% `?GL_POLYGON_OFFSET_FACTOR': `Params' returns one value, the scaling factor
+%% used to determine the variable offset that is added to the depth value of each fragment
+%% generated when a polygon is rasterized. The initial value is 0. See {@link gl:polygonOffset/2}
+%% .
+%%
+%% `?GL_POLYGON_OFFSET_UNITS': `Params' returns one value. This value is multiplied
+%% by an implementation-specific value and then added to the depth value of each fragment
+%% generated when a polygon is rasterized. The initial value is 0. See {@link gl:polygonOffset/2}
+%% .
+%%
+%% `?GL_POLYGON_OFFSET_FILL': `Params' returns a single boolean value indicating
+%% whether polygon offset is enabled for polygons in fill mode. The initial value is `?GL_FALSE'
+%% . See {@link gl:polygonOffset/2} .
+%%
+%% `?GL_POLYGON_OFFSET_LINE': `Params' returns a single boolean value indicating
+%% whether polygon offset is enabled for polygons in line mode. The initial value is `?GL_FALSE'
+%% . See {@link gl:polygonOffset/2} .
+%%
+%% `?GL_POLYGON_OFFSET_POINT': `Params' returns a single boolean value indicating
+%% whether polygon offset is enabled for polygons in point mode. The initial value is `?GL_FALSE'
+%% . See {@link gl:polygonOffset/2} .
+%%
+%% `?GL_POLYGON_SMOOTH': `Params' returns a single boolean value indicating whether
+%% antialiasing of polygons is enabled. The initial value is `?GL_FALSE'. See {@link gl:polygonMode/2}
+%% .
+%%
+%% `?GL_POLYGON_SMOOTH_HINT': `Params' returns one value, a symbolic constant indicating
+%% the mode of the polygon antialiasing hint. The initial value is `?GL_DONT_CARE'.
+%% See {@link gl:hint/2} .
+%%
+%% `?GL_READ_BUFFER': `Params' returns one value, a symbolic constant indicating
+%% which color buffer is selected for reading. The initial value is `?GL_BACK' if there
+%% is a back buffer, otherwise it is `?GL_FRONT'. See {@link gl:readPixels/7} .
+%%
+%% `?GL_RENDERBUFFER_BINDING': `Params' returns a single value, the name of the
+%% renderbuffer object currently bound to the target `?GL_RENDERBUFFER'. If no renderbuffer
+%% object is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindRenderbuffer/2}
+%% .
+%%
+%% `?GL_SAMPLE_BUFFERS': `Params' returns a single integer value indicating the
+%% number of sample buffers associated with the framebuffer. See {@link gl:sampleCoverage/2} .
+%%
+%%
+%% `?GL_SAMPLE_COVERAGE_VALUE': `Params' returns a single positive floating-point
+%% value indicating the current sample coverage value. See {@link gl:sampleCoverage/2} .
+%%
+%% `?GL_SAMPLE_COVERAGE_INVERT': `Params' returns a single boolean value indicating
+%% if the temporary coverage value should be inverted. See {@link gl:sampleCoverage/2} .
+%%
+%% `?GL_SAMPLER_BINDING': `Params' returns a single value, the name of the sampler
+%% object currently bound to the active texture unit. The initial value is 0. See {@link gl:bindSampler/2}
+%% .
+%%
+%% `?GL_SAMPLES': `Params' returns a single integer value indicating the coverage
+%% mask size. See {@link gl:sampleCoverage/2} .
+%%
+%% `?GL_SCISSOR_BOX': `Params' returns four values: the x and y window coordinates
+%% of the scissor box, followed by its width and height. Initially the x and y window
+%% coordinates are both 0 and the width and height are set to the size of the window. See {@link gl:scissor/4}
+%% .
+%%
+%% `?GL_SCISSOR_TEST': `Params' returns a single boolean value indicating whether
+%% scissoring is enabled. The initial value is `?GL_FALSE'. See {@link gl:scissor/4} .
+%%
+%% `?GL_SHADER_COMPILER': `Params' returns a single boolean value indicating whether
+%% an online shader compiler is present in the implementation. All desktop OpenGL implementations
+%% must support online shader compilations, and therefore the value of `?GL_SHADER_COMPILER'
+%% will always be `?GL_TRUE'.
+%%
+%% `?GL_SMOOTH_LINE_WIDTH_RANGE': `Params' returns a pair of values indicating
+%% the range of widths supported for smooth (antialiased) lines. See {@link gl:lineWidth/1} .
+%%
+%% `?GL_SMOOTH_LINE_WIDTH_GRANULARITY': `Params' returns a single value indicating
+%% the level of quantization applied to smooth line width parameters.
+%%
+%% `?GL_STENCIL_BACK_FAIL': `Params' returns one value, a symbolic constant indicating
+%% what action is taken for back-facing polygons when the stencil test fails. The initial
+%% value is `?GL_KEEP'. See {@link gl:stencilOpSeparate/4} .
+%%
+%% `?GL_STENCIL_BACK_FUNC': `Params' returns one value, a symbolic constant indicating
+%% what function is used for back-facing polygons to compare the stencil reference value
+%% with the stencil buffer value. The initial value is `?GL_ALWAYS'. See {@link gl:stencilFuncSeparate/4}
+%% .
+%%
+%% `?GL_STENCIL_BACK_PASS_DEPTH_FAIL': `Params' returns one value, a symbolic constant
+%% indicating what action is taken for back-facing polygons when the stencil test passes,
+%% but the depth test fails. The initial value is `?GL_KEEP'. See {@link gl:stencilOpSeparate/4}
+%% .
+%%
+%% `?GL_STENCIL_BACK_PASS_DEPTH_PASS': `Params' returns one value, a symbolic constant
+%% indicating what action is taken for back-facing polygons when the stencil test passes
+%% and the depth test passes. The initial value is `?GL_KEEP'. See {@link gl:stencilOpSeparate/4}
+%% .
+%%
+%% `?GL_STENCIL_BACK_REF': `Params' returns one value, the reference value that
+%% is compared with the contents of the stencil buffer for back-facing polygons. The initial
+%% value is 0. See {@link gl:stencilFuncSeparate/4} .
+%%
+%% `?GL_STENCIL_BACK_VALUE_MASK': `Params' returns one value, the mask that is
+%% used for back-facing polygons to mask both the stencil reference value and the stencil
+%% buffer value before they are compared. The initial value is all 1's. See {@link gl:stencilFuncSeparate/4}
+%% .
+%%
+%% `?GL_STENCIL_BACK_WRITEMASK': `Params' returns one value, the mask that controls
+%% writing of the stencil bitplanes for back-facing polygons. The initial value is all 1's.
+%% See {@link gl:stencilMaskSeparate/2} .
+%%
+%% `?GL_STENCIL_CLEAR_VALUE': `Params' returns one value, the index to which the
+%% stencil bitplanes are cleared. The initial value is 0. See {@link gl:clearStencil/1} .
+%%
+%% `?GL_STENCIL_FAIL': `Params' returns one value, a symbolic constant indicating
+%% what action is taken when the stencil test fails. The initial value is `?GL_KEEP'.
+%% See {@link gl:stencilOp/3} . This stencil state only affects non-polygons and front-facing
+%% polygons. Back-facing polygons use separate stencil state. See {@link gl:stencilOpSeparate/4}
+%% .
+%%
+%% `?GL_STENCIL_FUNC': `Params' returns one value, a symbolic constant indicating
+%% what function is used to compare the stencil reference value with the stencil buffer value.
+%% The initial value is `?GL_ALWAYS'. See {@link gl:stencilFunc/3} . This stencil state
+%% only affects non-polygons and front-facing polygons. Back-facing polygons use separate
+%% stencil state. See {@link gl:stencilFuncSeparate/4} .
+%%
+%% `?GL_STENCIL_PASS_DEPTH_FAIL': `Params' returns one value, a symbolic constant
+%% indicating what action is taken when the stencil test passes, but the depth test fails.
+%% The initial value is `?GL_KEEP'. See {@link gl:stencilOp/3} . This stencil state only
+%% affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil
+%% state. See {@link gl:stencilOpSeparate/4} .
+%%
+%% `?GL_STENCIL_PASS_DEPTH_PASS': `Params' returns one value, a symbolic constant
+%% indicating what action is taken when the stencil test passes and the depth test passes.
+%% The initial value is `?GL_KEEP'. See {@link gl:stencilOp/3} . This stencil state only
+%% affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil
+%% state. See {@link gl:stencilOpSeparate/4} .
+%%
+%% `?GL_STENCIL_REF': `Params' returns one value, the reference value that is compared
+%% with the contents of the stencil buffer. The initial value is 0. See {@link gl:stencilFunc/3}
+%% . This stencil state only affects non-polygons and front-facing polygons. Back-facing
+%% polygons use separate stencil state. See {@link gl:stencilFuncSeparate/4} .
+%%
+%% `?GL_STENCIL_TEST': `Params' returns a single boolean value indicating whether
+%% stencil testing of fragments is enabled. The initial value is `?GL_FALSE'. See {@link gl:stencilFunc/3}
+%% and {@link gl:stencilOp/3} .
+%%
+%% `?GL_STENCIL_VALUE_MASK': `Params' returns one value, the mask that is used
+%% to mask both the stencil reference value and the stencil buffer value before they are
+%% compared. The initial value is all 1's. See {@link gl:stencilFunc/3} . This stencil state
+%% only affects non-polygons and front-facing polygons. Back-facing polygons use separate
+%% stencil state. See {@link gl:stencilFuncSeparate/4} .
+%%
+%% `?GL_STENCIL_WRITEMASK': `Params' returns one value, the mask that controls
+%% writing of the stencil bitplanes. The initial value is all 1's. See {@link gl:stencilMask/1}
+%% . This stencil state only affects non-polygons and front-facing polygons. Back-facing
+%% polygons use separate stencil state. See {@link gl:stencilMaskSeparate/2} .
+%%
+%% `?GL_STEREO': `Params' returns a single boolean value indicating whether stereo
+%% buffers (left and right) are supported.
+%%
+%% `?GL_SUBPIXEL_BITS': `Params' returns one value, an estimate of the number of
+%% bits of subpixel resolution that are used to position rasterized geometry in window coordinates.
+%% The value must be at least 4.
+%%
+%% `?GL_TEXTURE_BINDING_1D': `Params' returns a single value, the name of the texture
+%% currently bound to the target `?GL_TEXTURE_1D'. The initial value is 0. See {@link gl:bindTexture/2}
+%% .
+%%
+%% `?GL_TEXTURE_BINDING_1D_ARRAY': `Params' returns a single value, the name of
+%% the texture currently bound to the target `?GL_TEXTURE_1D_ARRAY'. The initial value
+%% is 0. See {@link gl:bindTexture/2} .
+%%
+%% `?GL_TEXTURE_BINDING_2D': `Params' returns a single value, the name of the texture
+%% currently bound to the target `?GL_TEXTURE_2D'. The initial value is 0. See {@link gl:bindTexture/2}
+%% .
+%%
+%% `?GL_TEXTURE_BINDING_2D_ARRAY': `Params' returns a single value, the name of
+%% the texture currently bound to the target `?GL_TEXTURE_2D_ARRAY'. The initial value
+%% is 0. See {@link gl:bindTexture/2} .
+%%
+%% `?GL_TEXTURE_BINDING_2D_MULTISAMPLE': `Params' returns a single value, the name
+%% of the texture currently bound to the target `?GL_TEXTURE_2D_MULTISAMPLE'. The initial
+%% value is 0. See {@link gl:bindTexture/2} .
+%%
+%% `?GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY': `Params' returns a single value,
+%% the name of the texture currently bound to the target `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY'
+%% . The initial value is 0. See {@link gl:bindTexture/2} .
+%%
+%% `?GL_TEXTURE_BINDING_3D': `Params' returns a single value, the name of the texture
+%% currently bound to the target `?GL_TEXTURE_3D'. The initial value is 0. See {@link gl:bindTexture/2}
+%% .
+%%
+%% `?GL_TEXTURE_BINDING_BUFFER': `Params' returns a single value, the name of the
+%% texture currently bound to the target `?GL_TEXTURE_BUFFER'. The initial value is
+%% 0. See {@link gl:bindTexture/2} .
+%%
+%% `?GL_TEXTURE_BINDING_CUBE_MAP': `Params' returns a single value, the name of
+%% the texture currently bound to the target `?GL_TEXTURE_CUBE_MAP'. The initial value
+%% is 0. See {@link gl:bindTexture/2} .
+%%
+%% `?GL_TEXTURE_BINDING_RECTANGLE': `Params' returns a single value, the name of
+%% the texture currently bound to the target `?GL_TEXTURE_RECTANGLE'. The initial value
+%% is 0. See {@link gl:bindTexture/2} .
+%%
+%% `?GL_TEXTURE_COMPRESSION_HINT': `Params' returns a single value indicating the
+%% mode of the texture compression hint. The initial value is `?GL_DONT_CARE'.
+%%
+%% `?GL_TEXTURE_BUFFER_BINDING': `Params' returns a single value, the name of the
+%% texture buffer object currently bound. The initial value is 0. See {@link gl:bindBuffer/2} .
+%%
+%%
+%% `?GL_TIMESTAMP': `Params' returns a single value, the 64-bit value of the current
+%% GL time. See {@link gl:queryCounter/2} .
+%%
+%% `?GL_TRANSFORM_FEEDBACK_BUFFER_BINDING': When used with non-indexed variants of ``gl:get''
+%% (such as ``gl:getIntegerv''), `Params' returns a single value, the name of the
+%% buffer object currently bound to the target `?GL_TRANSFORM_FEEDBACK_BUFFER'. If no
+%% buffer object is bound to this target, 0 is returned. When used with indexed variants of ``gl:get''
+%% (such as ``gl:getIntegeri_v''), `Params' returns a single value, the name of the
+%% buffer object bound to the indexed transform feedback attribute stream. The initial value
+%% is 0 for all targets. See {@link gl:bindBuffer/2} , {@link gl:bindBufferBase/3} , and {@link gl:bindBufferRange/5}
+%% .
+%%
+%% `?GL_TRANSFORM_FEEDBACK_BUFFER_START': When used with indexed variants of ``gl:get''
+%% (such as ``gl:getInteger64i_v''), `Params' returns a single value, the start offset
+%% of the binding range for each transform feedback attribute stream. The initial value is
+%% 0 for all streams. See {@link gl:bindBufferRange/5} .
+%%
+%% `?GL_TRANSFORM_FEEDBACK_BUFFER_SIZE': When used with indexed variants of ``gl:get''
+%% (such as ``gl:getInteger64i_v''), `Params' returns a single value, the size of
+%% the binding range for each transform feedback attribute stream. The initial value is 0
+%% for all streams. See {@link gl:bindBufferRange/5} .
+%%
+%% `?GL_UNIFORM_BUFFER_BINDING': When used with non-indexed variants of ``gl:get''
+%% (such as ``gl:getIntegerv''), `Params' returns a single value, the name of the
+%% buffer object currently bound to the target `?GL_UNIFORM_BUFFER'. If no buffer object
+%% is bound to this target, 0 is returned. When used with indexed variants of ``gl:get''
+%% (such as ``gl:getIntegeri_v''), `Params' returns a single value, the name of the
+%% buffer object bound to the indexed uniform buffer binding point. The initial value is
+%% 0 for all targets. See {@link gl:bindBuffer/2} , {@link gl:bindBufferBase/3} , and {@link gl:bindBufferRange/5}
+%% .
+%%
+%% `?GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT': `Params' returns a single value, the
+%% minimum required alignment for uniform buffer sizes and offset. The initial value is 1.
+%% See {@link gl:uniformBlockBinding/3} .
+%%
+%% `?GL_UNIFORM_BUFFER_SIZE': When used with indexed variants of ``gl:get'' (such
+%% as ``gl:getInteger64i_v''), `Params' returns a single value, the size of the binding
+%% range for each indexed uniform buffer binding. The initial value is 0 for all bindings.
+%% See {@link gl:bindBufferRange/5} .
+%%
+%% `?GL_UNIFORM_BUFFER_START': When used with indexed variants of ``gl:get'' (such
+%% as ``gl:getInteger64i_v''), `Params' returns a single value, the start offset of
+%% the binding range for each indexed uniform buffer binding. The initial value is 0 for
+%% all bindings. See {@link gl:bindBufferRange/5} .
+%%
+%% `?GL_UNPACK_ALIGNMENT': `Params' returns one value, the byte alignment used
+%% for reading pixel data from memory. The initial value is 4. See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_UNPACK_IMAGE_HEIGHT': `Params' returns one value, the image height used
+%% for reading pixel data from memory. The initial is 0. See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_UNPACK_LSB_FIRST': `Params' returns a single boolean value indicating whether
+%% single-bit pixels being read from memory are read first from the least significant bit
+%% of each unsigned byte. The initial value is `?GL_FALSE'. See {@link gl:pixelStoref/2} .
+%%
+%%
+%% `?GL_UNPACK_ROW_LENGTH': `Params' returns one value, the row length used for
+%% reading pixel data from memory. The initial value is 0. See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_UNPACK_SKIP_IMAGES': `Params' returns one value, the number of pixel images
+%% skipped before the first pixel is read from memory. The initial value is 0. See {@link gl:pixelStoref/2}
+%% .
+%%
+%% `?GL_UNPACK_SKIP_PIXELS': `Params' returns one value, the number of pixel locations
+%% skipped before the first pixel is read from memory. The initial value is 0. See {@link gl:pixelStoref/2}
+%% .
+%%
+%% `?GL_UNPACK_SKIP_ROWS': `Params' returns one value, the number of rows of pixel
+%% locations skipped before the first pixel is read from memory. The initial value is 0.
+%% See {@link gl:pixelStoref/2} .
+%%
+%% `?GL_UNPACK_SWAP_BYTES': `Params' returns a single boolean value indicating
+%% whether the bytes of two-byte and four-byte pixel indices and components are swapped after
+%% being read from memory. The initial value is `?GL_FALSE'. See {@link gl:pixelStoref/2} .
+%%
+%%
+%% `?GL_VERTEX_PROGRAM_POINT_SIZE': `Params' returns a single boolean value indicating
+%% whether vertex program point size mode is enabled. If enabled, and a vertex shader is
+%% active, then the point size is taken from the shader built-in gl_PointSize. If disabled,
+%% and a vertex shader is active, then the point size is taken from the point state as specified
+%% by {@link gl:pointSize/1} . The initial value is `?GL_FALSE'.
+%%
+%% `?GL_VIEWPORT': When used with non-indexed variants of ``gl:get'' (such as ``gl:getIntegerv''
+%% ), `Params' returns four values: the x and y window coordinates of the viewport,
+%% followed by its width and height. Initially the x and y window coordinates are both
+%% set to 0, and the width and height are set to the width and height of the window into
+%% which the GL will do its rendering. See {@link gl:viewport/4} . When used with indexed
+%% variants of ``gl:get'' (such as ``gl:getIntegeri_v''), `Params' returns four
+%% values: the x and y window coordinates of the indexed viewport, followed by its width
+%% and height. Initially the x and y window coordinates are both set to 0, and the width
+%% and height are set to the width and height of the window into which the GL will do its
+%% rendering. See {@link gl:viewportIndexedf/5} .
+%%
+%% `?GL_VIEWPORT_BOUNDS_RANGE': `Params' returns two values, the minimum and maximum
+%% viewport bounds range. The minimum range should be at least [-32768, 32767].
+%%
+%% `?GL_VIEWPORT_INDEX_PROVOKING_VERTEX': `Params' returns one value, the implementation
+%% dependent specifc vertex of a primitive that is used to select the viewport index. If
+%% the value returned is equivalent to `?GL_PROVOKING_VERTEX', then the vertex selection
+%% follows the convention specified by {@link gl:provokingVertex/1} . If the value returned
+%% is equivalent to `?GL_FIRST_VERTEX_CONVENTION', then the selection is always taken
+%% from the first vertex in the primitive. If the value returned is equivalent to `?GL_LAST_VERTEX_CONVENTION'
+%% , then the selection is always taken from the last vertex in the primitive. If the value
+%% returned is equivalent to `?GL_UNDEFINED_VERTEX', then the selection is not guaranteed
+%% to be taken from any specific vertex in the primitive.
+%%
+%% `?GL_VIEWPORT_SUBPIXEL_BITS': `Params' returns a single value, the number of
+%% bits of sub-pixel precision which the GL uses to interpret the floating point viewport
+%% bounds. The minimum value is 0.
+%%
+%% Many of the boolean parameters can also be queried more easily using {@link gl:isEnabled/1}
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGet.xml">external</a> documentation.
+-spec getBooleanv(Pname) -> [0|1] when Pname :: enum().
+getBooleanv(Pname) ->
+ call(5065, <<Pname:?GLenum>>).
-%% @spec ({Red,Green,Blue}) -> ok
-%% @equiv color3ui(Red,Green,Blue)
--spec color3uiv({integer(),integer(),integer()}) -> ok.
-color3uiv({Red,Green,Blue}) -> color3ui(Red,Green,Blue).
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getDoublev(Pname) -> [float()] when Pname :: enum().
+getDoublev(Pname) ->
+ call(5066, <<Pname:?GLenum>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3us(integer(),integer(),integer()) -> ok.
-color3us(Red,Green,Blue) ->
- cast(5062, <<Red:?GLushort,Green:?GLushort,Blue:?GLushort>>).
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getFloatv(Pname) -> [float()] when Pname :: enum().
+getFloatv(Pname) ->
+ call(5067, <<Pname:?GLenum>>).
-%% @spec ({Red,Green,Blue}) -> ok
-%% @equiv color3us(Red,Green,Blue)
--spec color3usv({integer(),integer(),integer()}) -> ok.
-color3usv({Red,Green,Blue}) -> color3us(Red,Green,Blue).
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getIntegerv(Pname) -> [integer()] when Pname :: enum().
+getIntegerv(Pname) ->
+ call(5068, <<Pname:?GLenum>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color4b(integer(),integer(),integer(),integer()) -> ok.
-color4b(Red,Green,Blue,Alpha) ->
- cast(5063, <<Red:?GLbyte,Green:?GLbyte,Blue:?GLbyte,Alpha:?GLbyte>>).
+%% @doc Push and pop the server attribute stack
+%%
+%% ``gl:pushAttrib'' takes one argument, a mask that indicates which groups of state variables
+%% to save on the attribute stack. Symbolic constants are used to set bits in the mask. `Mask'
+%% is typically constructed by specifying the bitwise-or of several of these constants
+%% together. The special mask `?GL_ALL_ATTRIB_BITS' can be used to save all stackable
+%% states.
+%%
+%% The symbolic mask constants and their associated GL state are as follows (the second
+%% column lists which attributes are saved):
+%%
+%% <table><tbody><tr><td>`?GL_ACCUM_BUFFER_BIT'</td><td> Accumulation buffer clear value
+%% </td></tr><tr><td>`?GL_COLOR_BUFFER_BIT'</td><td>`?GL_ALPHA_TEST' enable bit </td>
+%% </tr><tr><td></td><td> Alpha test function and reference value </td></tr><tr><td></td><td>
+%% `?GL_BLEND' enable bit </td></tr><tr><td></td><td> Blending source and destination
+%% functions </td></tr><tr><td></td><td> Constant blend color </td></tr><tr><td></td><td>
+%% Blending equation </td></tr><tr><td></td><td>`?GL_DITHER' enable bit </td></tr><tr><td>
+%% </td><td>`?GL_DRAW_BUFFER' setting </td></tr><tr><td></td><td>`?GL_COLOR_LOGIC_OP'
+%% enable bit </td></tr><tr><td></td><td>`?GL_INDEX_LOGIC_OP' enable bit </td></tr><tr>
+%% <td></td><td> Logic op function </td></tr><tr><td></td><td> Color mode and index mode
+%% clear values </td></tr><tr><td></td><td> Color mode and index mode writemasks </td></tr><tr>
+%% <td>`?GL_CURRENT_BIT'</td><td> Current RGBA color </td></tr><tr><td></td><td> Current
+%% color index </td></tr><tr><td></td><td> Current normal vector </td></tr><tr><td></td><td>
+%% Current texture coordinates </td></tr><tr><td></td><td> Current raster position </td></tr>
+%% <tr><td></td><td>`?GL_CURRENT_RASTER_POSITION_VALID' flag </td></tr><tr><td></td><td>
+%% RGBA color associated with current raster position </td></tr><tr><td></td><td> Color
+%% index associated with current raster position </td></tr><tr><td></td><td> Texture coordinates
+%% associated with current raster position </td></tr><tr><td></td><td>`?GL_EDGE_FLAG'
+%% flag </td></tr><tr><td>`?GL_DEPTH_BUFFER_BIT'</td><td>`?GL_DEPTH_TEST' enable
+%% bit </td></tr><tr><td></td><td> Depth buffer test function </td></tr><tr><td></td><td>
+%% Depth buffer clear value </td></tr><tr><td></td><td>`?GL_DEPTH_WRITEMASK' enable
+%% bit </td></tr><tr><td>`?GL_ENABLE_BIT'</td><td>`?GL_ALPHA_TEST' flag </td></tr><tr>
+%% <td></td><td>`?GL_AUTO_NORMAL' flag </td></tr><tr><td></td><td>`?GL_BLEND' flag
+%% </td></tr><tr><td></td><td> Enable bits for the user-definable clipping planes </td></tr><tr>
+%% <td></td><td>`?GL_COLOR_MATERIAL'</td></tr><tr><td></td><td>`?GL_CULL_FACE'
+%% flag </td></tr><tr><td></td><td>`?GL_DEPTH_TEST' flag </td></tr><tr><td></td><td>`?GL_DITHER'
+%% flag </td></tr><tr><td></td><td>`?GL_FOG' flag </td></tr><tr><td></td><td>`?GL_LIGHT'
+%% `i' where `?0' &lt;= `i' &lt; `?GL_MAX_LIGHTS'</td></tr>
+%% <tr><td></td><td>`?GL_LIGHTING' flag </td></tr><tr><td></td><td>`?GL_LINE_SMOOTH'
+%% flag </td></tr><tr><td></td><td>`?GL_LINE_STIPPLE' flag </td></tr><tr><td></td><td>`?GL_COLOR_LOGIC_OP'
+%% flag </td></tr><tr><td></td><td>`?GL_INDEX_LOGIC_OP' flag </td></tr><tr><td></td><td>
+%% `?GL_MAP1_'`x' where `x' is a map type </td></tr><tr><td></td><td>`?GL_MAP2_'
+%% `x' where `x' is a map type </td></tr><tr><td></td><td>`?GL_MULTISAMPLE'
+%% flag </td></tr><tr><td></td><td>`?GL_NORMALIZE' flag </td></tr><tr><td></td><td>`?GL_POINT_SMOOTH'
+%% flag </td></tr><tr><td></td><td>`?GL_POLYGON_OFFSET_LINE' flag </td></tr><tr><td></td>
+%% <td>`?GL_POLYGON_OFFSET_FILL' flag </td></tr><tr><td></td><td>`?GL_POLYGON_OFFSET_POINT'
+%% flag </td></tr><tr><td></td><td>`?GL_POLYGON_SMOOTH' flag </td></tr><tr><td></td><td>
+%% `?GL_POLYGON_STIPPLE' flag </td></tr><tr><td></td><td>`?GL_SAMPLE_ALPHA_TO_COVERAGE'
+%% flag </td></tr><tr><td></td><td>`?GL_SAMPLE_ALPHA_TO_ONE' flag </td></tr><tr><td></td>
+%% <td>`?GL_SAMPLE_COVERAGE' flag </td></tr><tr><td></td><td>`?GL_SCISSOR_TEST'
+%% flag </td></tr><tr><td></td><td>`?GL_STENCIL_TEST' flag </td></tr><tr><td></td><td>`?GL_TEXTURE_1D'
+%% flag </td></tr><tr><td></td><td>`?GL_TEXTURE_2D' flag </td></tr><tr><td></td><td>`?GL_TEXTURE_3D'
+%% flag </td></tr><tr><td></td><td> Flags `?GL_TEXTURE_GEN_'`x' where `x'
+%% is S, T, R, or Q </td></tr><tr><td>`?GL_EVAL_BIT'</td><td>`?GL_MAP1_'`x'
+%% enable bits, where `x' is a map type </td></tr><tr><td></td><td>`?GL_MAP2_'`x'
+%% enable bits, where `x' is a map type </td></tr><tr><td></td><td> 1D grid endpoints
+%% and divisions </td></tr><tr><td></td><td> 2D grid endpoints and divisions </td></tr><tr><td>
+%% </td><td>`?GL_AUTO_NORMAL' enable bit </td></tr><tr><td>`?GL_FOG_BIT'</td><td>`?GL_FOG'
+%% enable bit </td></tr><tr><td></td><td> Fog color </td></tr><tr><td></td><td> Fog density
+%% </td></tr><tr><td></td><td> Linear fog start </td></tr><tr><td></td><td> Linear fog end </td>
+%% </tr><tr><td></td><td> Fog index </td></tr><tr><td></td><td>`?GL_FOG_MODE' value </td>
+%% </tr><tr><td>`?GL_HINT_BIT'</td><td>`?GL_PERSPECTIVE_CORRECTION_HINT' setting </td>
+%% </tr><tr><td></td><td>`?GL_POINT_SMOOTH_HINT' setting </td></tr><tr><td></td><td>`?GL_LINE_SMOOTH_HINT'
+%% setting </td></tr><tr><td></td><td>`?GL_POLYGON_SMOOTH_HINT' setting </td></tr><tr><td>
+%% </td><td>`?GL_FOG_HINT' setting </td></tr><tr><td></td><td>`?GL_GENERATE_MIPMAP_HINT'
+%% setting </td></tr><tr><td></td><td>`?GL_TEXTURE_COMPRESSION_HINT' setting </td></tr>
+%% <tr><td>`?GL_LIGHTING_BIT'</td><td>`?GL_COLOR_MATERIAL' enable bit </td></tr><tr>
+%% <td></td><td>`?GL_COLOR_MATERIAL_FACE' value </td></tr><tr><td></td><td> Color material
+%% parameters that are tracking the current color </td></tr><tr><td></td><td> Ambient scene
+%% color </td></tr><tr><td></td><td>`?GL_LIGHT_MODEL_LOCAL_VIEWER' value </td></tr><tr><td>
+%% </td><td>`?GL_LIGHT_MODEL_TWO_SIDE' setting </td></tr><tr><td></td><td>`?GL_LIGHTING'
+%% enable bit </td></tr><tr><td></td><td> Enable bit for each light </td></tr><tr><td></td><td>
+%% Ambient, diffuse, and specular intensity for each light </td></tr><tr><td></td><td> Direction,
+%% position, exponent, and cutoff angle for each light </td></tr><tr><td></td><td> Constant,
+%% linear, and quadratic attenuation factors for each light </td></tr><tr><td></td><td> Ambient,
+%% diffuse, specular, and emissive color for each material </td></tr><tr><td></td><td> Ambient,
+%% diffuse, and specular color indices for each material </td></tr><tr><td></td><td> Specular
+%% exponent for each material </td></tr><tr><td></td><td>`?GL_SHADE_MODEL' setting </td>
+%% </tr><tr><td>`?GL_LINE_BIT'</td><td>`?GL_LINE_SMOOTH' flag </td></tr><tr><td></td>
+%% <td>`?GL_LINE_STIPPLE' enable bit </td></tr><tr><td></td><td> Line stipple pattern
+%% and repeat counter </td></tr><tr><td></td><td> Line width </td></tr><tr><td>`?GL_LIST_BIT'
+%% </td><td>`?GL_LIST_BASE' setting </td></tr><tr><td>`?GL_MULTISAMPLE_BIT'</td><td>
+%% `?GL_MULTISAMPLE' flag </td></tr><tr><td></td><td>`?GL_SAMPLE_ALPHA_TO_COVERAGE'
+%% flag </td></tr><tr><td></td><td>`?GL_SAMPLE_ALPHA_TO_ONE' flag </td></tr><tr><td></td>
+%% <td>`?GL_SAMPLE_COVERAGE' flag </td></tr><tr><td></td><td>`?GL_SAMPLE_COVERAGE_VALUE'
+%% value </td></tr><tr><td></td><td>`?GL_SAMPLE_COVERAGE_INVERT' value </td></tr><tr><td>
+%% `?GL_PIXEL_MODE_BIT'</td><td>`?GL_RED_BIAS' and `?GL_RED_SCALE' settings </td>
+%% </tr><tr><td></td><td>`?GL_GREEN_BIAS' and `?GL_GREEN_SCALE' values </td></tr><tr>
+%% <td></td><td>`?GL_BLUE_BIAS' and `?GL_BLUE_SCALE'</td></tr><tr><td></td><td>`?GL_ALPHA_BIAS'
+%% and `?GL_ALPHA_SCALE'</td></tr><tr><td></td><td>`?GL_DEPTH_BIAS' and `?GL_DEPTH_SCALE'
+%% </td></tr><tr><td></td><td>`?GL_INDEX_OFFSET' and `?GL_INDEX_SHIFT' values </td>
+%% </tr><tr><td></td><td>`?GL_MAP_COLOR' and `?GL_MAP_STENCIL' flags </td></tr><tr>
+%% <td></td><td>`?GL_ZOOM_X' and `?GL_ZOOM_Y' factors </td></tr><tr><td></td><td>`?GL_READ_BUFFER'
+%% setting </td></tr><tr><td>`?GL_POINT_BIT'</td><td>`?GL_POINT_SMOOTH' flag </td>
+%% </tr><tr><td></td><td> Point size </td></tr><tr><td>`?GL_POLYGON_BIT'</td><td>`?GL_CULL_FACE'
+%% enable bit </td></tr><tr><td></td><td>`?GL_CULL_FACE_MODE' value </td></tr><tr><td></td>
+%% <td>`?GL_FRONT_FACE' indicator </td></tr><tr><td></td><td>`?GL_POLYGON_MODE'
+%% setting </td></tr><tr><td></td><td>`?GL_POLYGON_SMOOTH' flag </td></tr><tr><td></td><td>
+%% `?GL_POLYGON_STIPPLE' enable bit </td></tr><tr><td></td><td>`?GL_POLYGON_OFFSET_FILL'
+%% flag </td></tr><tr><td></td><td>`?GL_POLYGON_OFFSET_LINE' flag </td></tr><tr><td></td>
+%% <td>`?GL_POLYGON_OFFSET_POINT' flag </td></tr><tr><td></td><td>`?GL_POLYGON_OFFSET_FACTOR'
+%% </td></tr><tr><td></td><td>`?GL_POLYGON_OFFSET_UNITS'</td></tr><tr><td>`?GL_POLYGON_STIPPLE_BIT'
+%% </td><td> Polygon stipple image </td></tr><tr><td>`?GL_SCISSOR_BIT'</td><td>`?GL_SCISSOR_TEST'
+%% flag </td></tr><tr><td></td><td> Scissor box </td></tr><tr><td>`?GL_STENCIL_BUFFER_BIT'
+%% </td><td>`?GL_STENCIL_TEST' enable bit </td></tr><tr><td></td><td> Stencil function
+%% and reference value </td></tr><tr><td></td><td> Stencil value mask </td></tr><tr><td></td>
+%% <td> Stencil fail, pass, and depth buffer pass actions </td></tr><tr><td></td><td> Stencil
+%% buffer clear value </td></tr><tr><td></td><td> Stencil buffer writemask </td></tr><tr><td>
+%% `?GL_TEXTURE_BIT'</td><td> Enable bits for the four texture coordinates </td></tr><tr>
+%% <td></td><td> Border color for each texture image </td></tr><tr><td></td><td> Minification
+%% function for each texture image </td></tr><tr><td></td><td> Magnification function for
+%% each texture image </td></tr><tr><td></td><td> Texture coordinates and wrap mode for each
+%% texture image </td></tr><tr><td></td><td> Color and mode for each texture environment </td>
+%% </tr><tr><td></td><td> Enable bits `?GL_TEXTURE_GEN_'`x', `x' is S, T,
+%% R, and Q </td></tr><tr><td></td><td>`?GL_TEXTURE_GEN_MODE' setting for S, T, R, and
+%% Q </td></tr><tr><td></td><td> {@link gl:texGend/3} plane equations for S, T, R, and Q </td></tr>
+%% <tr><td></td><td> Current texture bindings (for example, `?GL_TEXTURE_BINDING_2D') </td>
+%% </tr><tr><td>`?GL_TRANSFORM_BIT'</td><td> Coefficients of the six clipping planes </td>
+%% </tr><tr><td></td><td> Enable bits for the user-definable clipping planes </td></tr><tr><td>
+%% </td><td>`?GL_MATRIX_MODE' value </td></tr><tr><td></td><td>`?GL_NORMALIZE'
+%% flag </td></tr><tr><td></td><td>`?GL_RESCALE_NORMAL' flag </td></tr><tr><td>`?GL_VIEWPORT_BIT'
+%% </td><td> Depth range (near and far) </td></tr><tr><td></td><td> Viewport origin and extent
+%% </td></tr></tbody></table>
+%%
+%% {@link gl:pushAttrib/1} restores the values of the state variables saved with the last ``gl:pushAttrib''
+%% command. Those not saved are left unchanged.
+%%
+%% It is an error to push attributes onto a full stack or to pop attributes off an empty
+%% stack. In either case, the error flag is set and no other change is made to GL state.
+%%
+%% Initially, the attribute stack is empty.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushAttrib.xml">external</a> documentation.
+-spec pushAttrib(Mask) -> ok when Mask :: integer().
+pushAttrib(Mask) ->
+ cast(5069, <<Mask:?GLbitfield>>).
-%% @spec ({Red,Green,Blue,Alpha}) -> ok
-%% @equiv color4b(Red,Green,Blue,Alpha)
--spec color4bv({integer(),integer(),integer(),integer()}) -> ok.
-color4bv({Red,Green,Blue,Alpha}) -> color4b(Red,Green,Blue,Alpha).
+%% @doc
+%% See {@link pushAttrib/1}
+-spec popAttrib() -> ok.
+popAttrib() ->
+ cast(5070, <<>>).
-%% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color4d(float(),float(),float(),float()) -> ok.
-color4d(Red,Green,Blue,Alpha) ->
- cast(5064, <<Red:?GLdouble,Green:?GLdouble,Blue:?GLdouble,Alpha:?GLdouble>>).
+%% @doc Push and pop the client attribute stack
+%%
+%% ``gl:pushClientAttrib'' takes one argument, a mask that indicates which groups of client-state
+%% variables to save on the client attribute stack. Symbolic constants are used to set bits
+%% in the mask. `Mask' is typically constructed by specifying the bitwise-or of several
+%% of these constants together. The special mask `?GL_CLIENT_ALL_ATTRIB_BITS' can
+%% be used to save all stackable client state.
+%%
+%% The symbolic mask constants and their associated GL client state are as follows (the
+%% second column lists which attributes are saved):
+%%
+%% `?GL_CLIENT_PIXEL_STORE_BIT' Pixel storage modes `?GL_CLIENT_VERTEX_ARRAY_BIT'
+%% Vertex arrays (and enables)
+%%
+%% {@link gl:pushClientAttrib/1} restores the values of the client-state variables saved with
+%% the last ``gl:pushClientAttrib''. Those not saved are left unchanged.
+%%
+%% It is an error to push attributes onto a full client attribute stack or to pop attributes
+%% off an empty stack. In either case, the error flag is set, and no other change is made
+%% to GL state.
+%%
+%% Initially, the client attribute stack is empty.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushClientAttrib.xml">external</a> documentation.
+-spec pushClientAttrib(Mask) -> ok when Mask :: integer().
+pushClientAttrib(Mask) ->
+ cast(5071, <<Mask:?GLbitfield>>).
-%% @spec ({Red,Green,Blue,Alpha}) -> ok
-%% @equiv color4d(Red,Green,Blue,Alpha)
--spec color4dv({float(),float(),float(),float()}) -> ok.
-color4dv({Red,Green,Blue,Alpha}) -> color4d(Red,Green,Blue,Alpha).
+%% @doc
+%% See {@link pushClientAttrib/1}
+-spec popClientAttrib() -> ok.
+popClientAttrib() ->
+ cast(5072, <<>>).
-%% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color4f(float(),float(),float(),float()) -> ok.
-color4f(Red,Green,Blue,Alpha) ->
- cast(5065, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat,Alpha:?GLfloat>>).
+%% @doc Set rasterization mode
+%%
+%% ``gl:renderMode'' sets the rasterization mode. It takes one argument, `Mode' , which
+%% can assume one of three predefined values:
+%%
+%% `?GL_RENDER': Render mode. Primitives are rasterized, producing pixel fragments,
+%% which are written into the frame buffer. This is the normal mode and also the default
+%% mode.
+%%
+%% `?GL_SELECT': Selection mode. No pixel fragments are produced, and no change to
+%% the frame buffer contents is made. Instead, a record of the names of primitives that would
+%% have been drawn if the render mode had been `?GL_RENDER' is returned in a select
+%% buffer, which must be created (see {@link gl:selectBuffer/2} ) before selection mode is
+%% entered.
+%%
+%% `?GL_FEEDBACK': Feedback mode. No pixel fragments are produced, and no change to
+%% the frame buffer contents is made. Instead, the coordinates and attributes of vertices
+%% that would have been drawn if the render mode had been `?GL_RENDER' is returned in
+%% a feedback buffer, which must be created (see {@link gl:feedbackBuffer/3} ) before feedback
+%% mode is entered.
+%%
+%% The return value of ``gl:renderMode'' is determined by the render mode at the time ``gl:renderMode''
+%% is called, rather than by `Mode' . The values returned for the three render modes
+%% are as follows:
+%%
+%% `?GL_RENDER': 0.
+%%
+%% `?GL_SELECT': The number of hit records transferred to the select buffer.
+%%
+%% `?GL_FEEDBACK': The number of values (not vertices) transferred to the feedback
+%% buffer.
+%%
+%% See the {@link gl:selectBuffer/2} and {@link gl:feedbackBuffer/3} reference pages for more
+%% details concerning selection and feedback operation.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRenderMode.xml">external</a> documentation.
+-spec renderMode(Mode) -> integer() when Mode :: enum().
+renderMode(Mode) ->
+ call(5073, <<Mode:?GLenum>>).
-%% @spec ({Red,Green,Blue,Alpha}) -> ok
-%% @equiv color4f(Red,Green,Blue,Alpha)
--spec color4fv({float(),float(),float(),float()}) -> ok.
-color4fv({Red,Green,Blue,Alpha}) -> color4f(Red,Green,Blue,Alpha).
+%% @doc Return error information
+%%
+%% ``gl:getError'' returns the value of the error flag. Each detectable error is assigned
+%% a numeric code and symbolic name. When an error occurs, the error flag is set to the appropriate
+%% error code value. No other errors are recorded until ``gl:getError'' is called, the
+%% error code is returned, and the flag is reset to `?GL_NO_ERROR'. If a call to ``gl:getError''
+%% returns `?GL_NO_ERROR', there has been no detectable error since the last call to ``gl:getError''
+%% , or since the GL was initialized.
+%%
+%% To allow for distributed implementations, there may be several error flags. If any single
+%% error flag has recorded an error, the value of that flag is returned and that flag is
+%% reset to `?GL_NO_ERROR' when ``gl:getError'' is called. If more than one flag has
+%% recorded an error, ``gl:getError'' returns and clears an arbitrary error flag value.
+%% Thus, ``gl:getError'' should always be called in a loop, until it returns `?GL_NO_ERROR'
+%% , if all error flags are to be reset.
+%%
+%% Initially, all error flags are set to `?GL_NO_ERROR'.
+%%
+%% The following errors are currently defined:
+%%
+%% `?GL_NO_ERROR': No error has been recorded. The value of this symbolic constant
+%% is guaranteed to be 0.
+%%
+%% `?GL_INVALID_ENUM': An unacceptable value is specified for an enumerated argument.
+%% The offending command is ignored and has no other side effect than to set the error flag.
+%%
+%%
+%% `?GL_INVALID_VALUE': A numeric argument is out of range. The offending command is
+%% ignored and has no other side effect than to set the error flag.
+%%
+%% `?GL_INVALID_OPERATION': The specified operation is not allowed in the current state.
+%% The offending command is ignored and has no other side effect than to set the error flag.
+%%
+%%
+%% `?GL_INVALID_FRAMEBUFFER_OPERATION': The framebuffer object is not complete. The
+%% offending command is ignored and has no other side effect than to set the error flag.
+%%
+%% `?GL_OUT_OF_MEMORY': There is not enough memory left to execute the command. The
+%% state of the GL is undefined, except for the state of the error flags, after this error
+%% is recorded.
+%%
+%% When an error flag is set, results of a GL operation are undefined only if `?GL_OUT_OF_MEMORY'
+%% has occurred. In all other cases, the command generating the error is ignored and has
+%% no effect on the GL state or frame buffer contents. If the generating command returns
+%% a value, it returns 0. If ``gl:getError'' itself generates an error, it returns 0.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetError.xml">external</a> documentation.
+-spec getError() -> enum().
+getError() ->
+ call(5074, <<>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color4i(integer(),integer(),integer(),integer()) -> ok.
-color4i(Red,Green,Blue,Alpha) ->
- cast(5066, <<Red:?GLint,Green:?GLint,Blue:?GLint,Alpha:?GLint>>).
+%% @doc Return a string describing the current GL connection
+%%
+%% ``gl:getString'' returns a pointer to a static string describing some aspect of the
+%% current GL connection. `Name' can be one of the following:
+%%
+%% `?GL_VENDOR': Returns the company responsible for this GL implementation. This name
+%% does not change from release to release.
+%%
+%% `?GL_RENDERER': Returns the name of the renderer. This name is typically specific
+%% to a particular configuration of a hardware platform. It does not change from release
+%% to release.
+%%
+%% `?GL_VERSION': Returns a version or release number.
+%%
+%% `?GL_SHADING_LANGUAGE_VERSION': Returns a version or release number for the shading
+%% language.
+%%
+%% ``gl:getStringi'' returns a pointer to a static string indexed by `Index' . `Name'
+%% can be one of the following:
+%%
+%% `?GL_EXTENSIONS': For ``gl:getStringi'' only, returns the extension string supported
+%% by the implementation at `Index' .
+%%
+%% Strings `?GL_VENDOR' and `?GL_RENDERER' together uniquely specify a platform.
+%% They do not change from release to release and should be used by platform-recognition
+%% algorithms.
+%%
+%% The `?GL_VERSION' and `?GL_SHADING_LANGUAGE_VERSION' strings begin with a version
+%% number. The version number uses one of these forms:
+%%
+%% `major_number.minor_number'`major_number.minor_number.release_number'
+%%
+%% Vendor-specific information may follow the version number. Its format depends on the
+%% implementation, but a space always separates the version number and the vendor-specific
+%% information.
+%%
+%% All strings are null-terminated.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetString.xml">external</a> documentation.
+-spec getString(Name) -> string() when Name :: enum().
+getString(Name) ->
+ call(5075, <<Name:?GLenum>>).
-%% @spec ({Red,Green,Blue,Alpha}) -> ok
-%% @equiv color4i(Red,Green,Blue,Alpha)
--spec color4iv({integer(),integer(),integer(),integer()}) -> ok.
-color4iv({Red,Green,Blue,Alpha}) -> color4i(Red,Green,Blue,Alpha).
+%% @doc Block until all GL execution is complete
+%%
+%% ``gl:finish'' does not return until the effects of all previously called GL commands
+%% are complete. Such effects include all changes to GL state, all changes to connection
+%% state, and all changes to the frame buffer contents.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFinish.xml">external</a> documentation.
+-spec finish() -> ok.
+finish() ->
+ cast(5076, <<>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color4s(integer(),integer(),integer(),integer()) -> ok.
-color4s(Red,Green,Blue,Alpha) ->
- cast(5067, <<Red:?GLshort,Green:?GLshort,Blue:?GLshort,Alpha:?GLshort>>).
+%% @doc Force execution of GL commands in finite time
+%%
+%% Different GL implementations buffer commands in several different locations, including
+%% network buffers and the graphics accelerator itself. ``gl:flush'' empties all of these
+%% buffers, causing all issued commands to be executed as quickly as they are accepted by
+%% the actual rendering engine. Though this execution may not be completed in any particular
+%% time period, it does complete in finite time.
+%%
+%% Because any GL program might be executed over a network, or on an accelerator that buffers
+%% commands, all programs should call ``gl:flush'' whenever they count on having all of
+%% their previously issued commands completed. For example, call ``gl:flush'' before waiting
+%% for user input that depends on the generated image.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFlush.xml">external</a> documentation.
+-spec flush() -> ok.
+flush() ->
+ cast(5077, <<>>).
-%% @spec ({Red,Green,Blue,Alpha}) -> ok
-%% @equiv color4s(Red,Green,Blue,Alpha)
--spec color4sv({integer(),integer(),integer(),integer()}) -> ok.
-color4sv({Red,Green,Blue,Alpha}) -> color4s(Red,Green,Blue,Alpha).
+%% @doc Specify implementation-specific hints
+%%
+%% Certain aspects of GL behavior, when there is room for interpretation, can be controlled
+%% with hints. A hint is specified with two arguments. `Target' is a symbolic constant
+%% indicating the behavior to be controlled, and `Mode' is another symbolic constant
+%% indicating the desired behavior. The initial value for each `Target' is `?GL_DONT_CARE'
+%% . `Mode' can be one of the following:
+%%
+%% `?GL_FASTEST': The most efficient option should be chosen.
+%%
+%% `?GL_NICEST': The most correct, or highest quality, option should be chosen.
+%%
+%% `?GL_DONT_CARE': No preference.
+%%
+%% Though the implementation aspects that can be hinted are well defined, the interpretation
+%% of the hints depends on the implementation. The hint aspects that can be specified with `Target'
+%% , along with suggested semantics, are as follows:
+%%
+%% `?GL_FRAGMENT_SHADER_DERIVATIVE_HINT': Indicates the accuracy of the derivative
+%% calculation for the GL shading language fragment processing built-in functions: `?dFdx'
+%% , `?dFdy', and `?fwidth'.
+%%
+%% `?GL_LINE_SMOOTH_HINT': Indicates the sampling quality of antialiased lines. If
+%% a larger filter function is applied, hinting `?GL_NICEST' can result in more pixel
+%% fragments being generated during rasterization.
+%%
+%% `?GL_POLYGON_SMOOTH_HINT': Indicates the sampling quality of antialiased polygons.
+%% Hinting `?GL_NICEST' can result in more pixel fragments being generated during rasterization,
+%% if a larger filter function is applied.
+%%
+%% `?GL_TEXTURE_COMPRESSION_HINT': Indicates the quality and performance of the compressing
+%% texture images. Hinting `?GL_FASTEST' indicates that texture images should be compressed
+%% as quickly as possible, while `?GL_NICEST' indicates that texture images should be
+%% compressed with as little image quality loss as possible. `?GL_NICEST' should be
+%% selected if the texture is to be retrieved by {@link gl:getCompressedTexImage/3} for reuse.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glHint.xml">external</a> documentation.
+-spec hint(Target, Mode) -> ok when Target :: enum(),Mode :: enum().
+hint(Target,Mode) ->
+ cast(5078, <<Target:?GLenum,Mode:?GLenum>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color4ub(integer(),integer(),integer(),integer()) -> ok.
-color4ub(Red,Green,Blue,Alpha) ->
- cast(5068, <<Red:?GLubyte,Green:?GLubyte,Blue:?GLubyte,Alpha:?GLubyte>>).
+%% @doc Specify the clear value for the depth buffer
+%%
+%% ``gl:clearDepth'' specifies the depth value used by {@link gl:clear/1} to clear the depth
+%% buffer. Values specified by ``gl:clearDepth'' are clamped to the range [0 1].
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearDepth.xml">external</a> documentation.
+-spec clearDepth(Depth) -> ok when Depth :: clamp().
+clearDepth(Depth) ->
+ cast(5079, <<Depth:?GLclampd>>).
-%% @spec ({Red,Green,Blue,Alpha}) -> ok
-%% @equiv color4ub(Red,Green,Blue,Alpha)
--spec color4ubv({integer(),integer(),integer(),integer()}) -> ok.
-color4ubv({Red,Green,Blue,Alpha}) -> color4ub(Red,Green,Blue,Alpha).
+%% @doc Specify the value used for depth buffer comparisons
+%%
+%% ``gl:depthFunc'' specifies the function used to compare each incoming pixel depth value
+%% with the depth value present in the depth buffer. The comparison is performed only if
+%% depth testing is enabled. (See {@link gl:enable/1} and {@link gl:enable/1} of `?GL_DEPTH_TEST'
+%% .)
+%%
+%% `Func' specifies the conditions under which the pixel will be drawn. The comparison
+%% functions are as follows:
+%%
+%% `?GL_NEVER': Never passes.
+%%
+%% `?GL_LESS': Passes if the incoming depth value is less than the stored depth value.
+%%
+%%
+%% `?GL_EQUAL': Passes if the incoming depth value is equal to the stored depth value.
+%%
+%%
+%% `?GL_LEQUAL': Passes if the incoming depth value is less than or equal to the stored
+%% depth value.
+%%
+%% `?GL_GREATER': Passes if the incoming depth value is greater than the stored depth
+%% value.
+%%
+%% `?GL_NOTEQUAL': Passes if the incoming depth value is not equal to the stored depth
+%% value.
+%%
+%% `?GL_GEQUAL': Passes if the incoming depth value is greater than or equal to the
+%% stored depth value.
+%%
+%% `?GL_ALWAYS': Always passes.
+%%
+%% The initial value of `Func' is `?GL_LESS'. Initially, depth testing is disabled.
+%% If depth testing is disabled or if no depth buffer exists, it is as if the depth test
+%% always passes.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthFunc.xml">external</a> documentation.
+-spec depthFunc(Func) -> ok when Func :: enum().
+depthFunc(Func) ->
+ cast(5080, <<Func:?GLenum>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color4ui(integer(),integer(),integer(),integer()) -> ok.
-color4ui(Red,Green,Blue,Alpha) ->
- cast(5069, <<Red:?GLuint,Green:?GLuint,Blue:?GLuint,Alpha:?GLuint>>).
+%% @doc Enable or disable writing into the depth buffer
+%%
+%% ``gl:depthMask'' specifies whether the depth buffer is enabled for writing. If `Flag'
+%% is `?GL_FALSE', depth buffer writing is disabled. Otherwise, it is enabled. Initially,
+%% depth buffer writing is enabled.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthMask.xml">external</a> documentation.
+-spec depthMask(Flag) -> ok when Flag :: 0|1.
+depthMask(Flag) ->
+ cast(5081, <<Flag:?GLboolean>>).
-%% @spec ({Red,Green,Blue,Alpha}) -> ok
-%% @equiv color4ui(Red,Green,Blue,Alpha)
--spec color4uiv({integer(),integer(),integer(),integer()}) -> ok.
-color4uiv({Red,Green,Blue,Alpha}) -> color4ui(Red,Green,Blue,Alpha).
+%% @doc Specify mapping of depth values from normalized device coordinates to window coordinates
+%%
+%% After clipping and division by `w', depth coordinates range from -1 to 1, corresponding
+%% to the near and far clipping planes. ``gl:depthRange'' specifies a linear mapping of
+%% the normalized depth coordinates in this range to window depth coordinates. Regardless
+%% of the actual depth buffer implementation, window coordinate depth values are treated
+%% as though they range from 0 through 1 (like color components). Thus, the values accepted
+%% by ``gl:depthRange'' are both clamped to this range before they are accepted.
+%%
+%% The setting of (0,1) maps the near plane to 0 and the far plane to 1. With this mapping,
+%% the depth buffer range is fully utilized.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRange.xml">external</a> documentation.
+-spec depthRange(Near_val, Far_val) -> ok when Near_val :: clamp(),Far_val :: clamp().
+depthRange(Near_val,Far_val) ->
+ cast(5082, <<Near_val:?GLclampd,Far_val:?GLclampd>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color4us(integer(),integer(),integer(),integer()) -> ok.
-color4us(Red,Green,Blue,Alpha) ->
- cast(5070, <<Red:?GLushort,Green:?GLushort,Blue:?GLushort,Alpha:?GLushort>>).
+%% @doc Specify clear values for the accumulation buffer
+%%
+%% ``gl:clearAccum'' specifies the red, green, blue, and alpha values used by {@link gl:clear/1}
+%% to clear the accumulation buffer.
+%%
+%% Values specified by ``gl:clearAccum'' are clamped to the range [-1 1].
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearAccum.xml">external</a> documentation.
+-spec clearAccum(Red, Green, Blue, Alpha) -> ok when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
+clearAccum(Red,Green,Blue,Alpha) ->
+ cast(5083, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat,Alpha:?GLfloat>>).
-%% @spec ({Red,Green,Blue,Alpha}) -> ok
-%% @equiv color4us(Red,Green,Blue,Alpha)
--spec color4usv({integer(),integer(),integer(),integer()}) -> ok.
-color4usv({Red,Green,Blue,Alpha}) -> color4us(Red,Green,Blue,Alpha).
+%% @doc Operate on the accumulation buffer
+%%
+%% The accumulation buffer is an extended-range color buffer. Images are not rendered into
+%% it. Rather, images rendered into one of the color buffers are added to the contents of
+%% the accumulation buffer after rendering. Effects such as antialiasing (of points, lines,
+%% and polygons), motion blur, and depth of field can be created by accumulating images generated
+%% with different transformation matrices.
+%%
+%% Each pixel in the accumulation buffer consists of red, green, blue, and alpha values.
+%% The number of bits per component in the accumulation buffer depends on the implementation.
+%% You can examine this number by calling {@link gl:getBooleanv/1} four times, with arguments
+%% `?GL_ACCUM_RED_BITS', `?GL_ACCUM_GREEN_BITS', `?GL_ACCUM_BLUE_BITS', and `?GL_ACCUM_ALPHA_BITS'
+%% . Regardless of the number of bits per component, the range of values stored by each component
+%% is [-1 1]. The accumulation buffer pixels are mapped one-to-one with frame buffer pixels.
+%%
+%% ``gl:accum'' operates on the accumulation buffer. The first argument, `Op' , is
+%% a symbolic constant that selects an accumulation buffer operation. The second argument, `Value'
+%% , is a floating-point value to be used in that operation. Five operations are specified: `?GL_ACCUM'
+%% , `?GL_LOAD', `?GL_ADD', `?GL_MULT', and `?GL_RETURN'.
+%%
+%% All accumulation buffer operations are limited to the area of the current scissor box
+%% and applied identically to the red, green, blue, and alpha components of each pixel. If
+%% a ``gl:accum'' operation results in a value outside the range [-1 1], the contents of an
+%% accumulation buffer pixel component are undefined.
+%%
+%% The operations are as follows:
+%%
+%% `?GL_ACCUM': Obtains R, G, B, and A values from the buffer currently selected for
+%% reading (see {@link gl:readBuffer/1} ). Each component value is divided by 2 n-1, where
+%% n is the number of bits allocated to each color component in the currently selected buffer.
+%% The result is a floating-point value in the range [0 1], which is multiplied by `Value'
+%% and added to the corresponding pixel component in the accumulation buffer, thereby updating
+%% the accumulation buffer.
+%%
+%% `?GL_LOAD': Similar to `?GL_ACCUM', except that the current value in the accumulation
+%% buffer is not used in the calculation of the new value. That is, the R, G, B, and A values
+%% from the currently selected buffer are divided by 2 n-1, multiplied by `Value' ,
+%% and then stored in the corresponding accumulation buffer cell, overwriting the current
+%% value.
+%%
+%% `?GL_ADD': Adds `Value' to each R, G, B, and A in the accumulation buffer.
+%%
+%% `?GL_MULT': Multiplies each R, G, B, and A in the accumulation buffer by `Value'
+%% and returns the scaled component to its corresponding accumulation buffer location.
+%%
+%% `?GL_RETURN': Transfers accumulation buffer values to the color buffer or buffers
+%% currently selected for writing. Each R, G, B, and A component is multiplied by `Value'
+%% , then multiplied by 2 n-1, clamped to the range [0 2 n-1], and stored in the corresponding
+%% display buffer cell. The only fragment operations that are applied to this transfer are
+%% pixel ownership, scissor, dithering, and color writemasks.
+%%
+%% To clear the accumulation buffer, call {@link gl:clearAccum/4} with R, G, B, and A values
+%% to set it to, then call {@link gl:clear/1} with the accumulation buffer enabled.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAccum.xml">external</a> documentation.
+-spec accum(Op, Value) -> ok when Op :: enum(),Value :: float().
+accum(Op,Value) ->
+ cast(5084, <<Op:?GLenum,Value:?GLfloat>>).
-%% @spec (Red::0|1,Green::0|1,Blue::0|1,Alpha::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml">external</a> documentation.
--spec colorMask(0|1,0|1,0|1,0|1) -> ok.
-colorMask(Red,Green,Blue,Alpha) ->
- cast(5071, <<Red:?GLboolean,Green:?GLboolean,Blue:?GLboolean,Alpha:?GLboolean>>).
+%% @doc Specify which matrix is the current matrix
+%%
+%% ``gl:matrixMode'' sets the current matrix mode. `Mode' can assume one of four values:
+%%
+%%
+%% `?GL_MODELVIEW': Applies subsequent matrix operations to the modelview matrix stack.
+%%
+%%
+%% `?GL_PROJECTION': Applies subsequent matrix operations to the projection matrix
+%% stack.
+%%
+%% `?GL_TEXTURE': Applies subsequent matrix operations to the texture matrix stack.
+%%
+%% `?GL_COLOR': Applies subsequent matrix operations to the color matrix stack.
+%%
+%% To find out which matrix stack is currently the target of all matrix operations, call {@link gl:getBooleanv/1}
+%% with argument `?GL_MATRIX_MODE'. The initial value is `?GL_MODELVIEW'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixMode.xml">external</a> documentation.
+-spec matrixMode(Mode) -> ok when Mode :: enum().
+matrixMode(Mode) ->
+ cast(5085, <<Mode:?GLenum>>).
-%% @spec (Face::enum(),Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml">external</a> documentation.
--spec colorMaterial(enum(),enum()) -> ok.
-colorMaterial(Face,Mode) ->
- cast(5072, <<Face:?GLenum,Mode:?GLenum>>).
-
-%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorPointer.xml">external</a> documentation.
--spec colorPointer(integer(),enum(),integer(),offset()|mem()) -> ok.
-colorPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) ->
- cast(5073, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
-colorPointer(Size,Type,Stride,Pointer) ->
- send_bin(Pointer),
- cast(5074, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
+%% @doc Multiply the current matrix with an orthographic matrix
+%%
+%% ``gl:ortho'' describes a transformation that produces a parallel projection. The current
+%% matrix (see {@link gl:matrixMode/1} ) is multiplied by this matrix and the result replaces
+%% the current matrix, as if {@link gl:multMatrixd/1} were called with the following matrix
+%% as its argument:
+%%
+%% ((2/(right-left)) 0 0(t x) 0(2/(top-bottom)) 0(t y) 0 0(-2/(farVal-nearVal))(t z) 0 0 0 1)
+%%
+%% where t x=-((right+left)/(right-left)) t y=-((top+bottom)/(top-bottom)) t z=-((farVal+nearVal)/(farVal-nearVal))
+%%
+%% Typically, the matrix mode is `?GL_PROJECTION', and (left bottom-nearVal) and (right top-nearVal) specify the points on
+%% the near clipping plane that are mapped to the lower left and upper right corners of the
+%% window, respectively, assuming that the eye is located at (0, 0, 0). -farVal specifies
+%% the location of the far clipping plane. Both `NearVal' and `FarVal' can be either
+%% positive or negative.
+%%
+%% Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} to save and restore the current
+%% matrix stack.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml">external</a> documentation.
+-spec ortho(Left, Right, Bottom, Top, Near_val, Far_val) -> ok when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(),Near_val :: float(),Far_val :: float().
+ortho(Left,Right,Bottom,Top,Near_val,Far_val) ->
+ cast(5086, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble,Near_val:?GLdouble,Far_val:?GLdouble>>).
-%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer(),Type::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyPixels.xml">external</a> documentation.
--spec copyPixels(integer(),integer(),integer(),integer(),enum()) -> ok.
-copyPixels(X,Y,Width,Height,Type) ->
- cast(5075, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Type:?GLenum>>).
-
-%% @spec (Target::enum(),Level::integer(),InternalFormat::enum(),X::integer(),Y::integer(),Width::integer(),Border::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage1D.xml">external</a> documentation.
--spec copyTexImage1D(enum(),integer(),enum(),integer(),integer(),integer(),integer()) -> ok.
-copyTexImage1D(Target,Level,InternalFormat,X,Y,Width,Border) ->
- cast(5076, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei,Border:?GLint>>).
-
-%% @spec (Target::enum(),Level::integer(),InternalFormat::enum(),X::integer(),Y::integer(),Width::integer(),Height::integer(),Border::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml">external</a> documentation.
--spec copyTexImage2D(enum(),integer(),enum(),integer(),integer(),integer(),integer(),integer()) -> ok.
-copyTexImage2D(Target,Level,InternalFormat,X,Y,Width,Height,Border) ->
- cast(5077, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Border:?GLint>>).
-
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),X::integer(),Y::integer(),Width::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage1D.xml">external</a> documentation.
--spec copyTexSubImage1D(enum(),integer(),integer(),integer(),integer(),integer()) -> ok.
-copyTexSubImage1D(Target,Level,Xoffset,X,Y,Width) ->
- cast(5078, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,X:?GLint,Y:?GLint,Width:?GLsizei>>).
+%% @doc Multiply the current matrix by a perspective matrix
+%%
+%% ``gl:frustum'' describes a perspective matrix that produces a perspective projection.
+%% The current matrix (see {@link gl:matrixMode/1} ) is multiplied by this matrix and the result
+%% replaces the current matrix, as if {@link gl:multMatrixd/1} were called with the following
+%% matrix as its argument:
+%%
+%% [((2 nearVal)/(right-left)) 0 A 0 0((2 nearVal)/(top-bottom)) B 0 0 0 C D 0 0 -1 0]
+%%
+%% A=(right+left)/(right-left)
+%%
+%% B=(top+bottom)/(top-bottom)
+%%
+%% C=-((farVal+nearVal)/(farVal-nearVal))
+%%
+%% D=-((2 farVal nearVal)/(farVal-nearVal))
+%%
+%% Typically, the matrix mode is `?GL_PROJECTION', and (left bottom-nearVal) and (right top-nearVal) specify the points on
+%% the near clipping plane that are mapped to the lower left and upper right corners of the
+%% window, assuming that the eye is located at (0, 0, 0). -farVal specifies the location
+%% of the far clipping plane. Both `NearVal' and `FarVal' must be positive.
+%%
+%% Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} to save and restore the current
+%% matrix stack.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFrustum.xml">external</a> documentation.
+-spec frustum(Left, Right, Bottom, Top, Near_val, Far_val) -> ok when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(),Near_val :: float(),Far_val :: float().
+frustum(Left,Right,Bottom,Top,Near_val,Far_val) ->
+ cast(5087, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble,Near_val:?GLdouble,Far_val:?GLdouble>>).
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage2D.xml">external</a> documentation.
--spec copyTexSubImage2D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),integer()) -> ok.
-copyTexSubImage2D(Target,Level,Xoffset,Yoffset,X,Y,Width,Height) ->
- cast(5079, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
+%% @doc Set the viewport
+%%
+%% ``gl:viewport'' specifies the affine transformation of x and y from normalized device
+%% coordinates to window coordinates. Let (x nd y nd) be normalized device coordinates. Then the window
+%% coordinates (x w y w) are computed as follows:
+%%
+%% x w=(x nd+1) (width/2)+x
+%%
+%% y w=(y nd+1) (height/2)+y
+%%
+%% Viewport width and height are silently clamped to a range that depends on the implementation.
+%% To query this range, call {@link gl:getBooleanv/1} with argument `?GL_MAX_VIEWPORT_DIMS'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml">external</a> documentation.
+-spec viewport(X, Y, Width, Height) -> ok when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
+viewport(X,Y,Width,Height) ->
+ cast(5088, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCullFace.xml">external</a> documentation.
--spec cullFace(enum()) -> ok.
-cullFace(Mode) ->
- cast(5080, <<Mode:?GLenum>>).
+%% @doc Push and pop the current matrix stack
+%%
+%% There is a stack of matrices for each of the matrix modes. In `?GL_MODELVIEW' mode,
+%% the stack depth is at least 32. In the other modes, `?GL_COLOR', `?GL_PROJECTION'
+%% , and `?GL_TEXTURE', the depth is at least 2. The current matrix in any mode is the
+%% matrix on the top of the stack for that mode.
+%%
+%% ``gl:pushMatrix'' pushes the current matrix stack down by one, duplicating the current
+%% matrix. That is, after a ``gl:pushMatrix'' call, the matrix on top of the stack is identical
+%% to the one below it.
+%%
+%% {@link gl:pushMatrix/0} pops the current matrix stack, replacing the current matrix with
+%% the one below it on the stack.
+%%
+%% Initially, each of the stacks contains one matrix, an identity matrix.
+%%
+%% It is an error to push a full matrix stack or to pop a matrix stack that contains only
+%% a single matrix. In either case, the error flag is set and no other change is made to
+%% GL state.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushMatrix.xml">external</a> documentation.
+-spec pushMatrix() -> ok.
+pushMatrix() ->
+ cast(5089, <<>>).
-%% @spec (List::integer(),Range::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteLists.xml">external</a> documentation.
--spec deleteLists(integer(),integer()) -> ok.
-deleteLists(List,Range) ->
- cast(5081, <<List:?GLuint,Range:?GLsizei>>).
+%% @doc
+%% See {@link pushMatrix/0}
+-spec popMatrix() -> ok.
+popMatrix() ->
+ cast(5090, <<>>).
-%% @spec (Textures::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteTextures.xml">external</a> documentation.
--spec deleteTextures([integer()]) -> ok.
-deleteTextures(Textures) ->
- cast(5082, <<(length(Textures)):?GLuint,
- (<< <<C:?GLuint>> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>).
+%% @doc Replace the current matrix with the identity matrix
+%%
+%% ``gl:loadIdentity'' replaces the current matrix with the identity matrix. It is semantically
+%% equivalent to calling {@link gl:loadMatrixd/1} with the identity matrix
+%%
+%% ((1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1))
+%%
+%% but in some cases it is more efficient.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadIdentity.xml">external</a> documentation.
+-spec loadIdentity() -> ok.
+loadIdentity() ->
+ cast(5091, <<>>).
-%% @spec (Func::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthFunc.xml">external</a> documentation.
--spec depthFunc(enum()) -> ok.
-depthFunc(Func) ->
- cast(5083, <<Func:?GLenum>>).
+%% @doc Replace the current matrix with the specified matrix
+%%
+%% ``gl:loadMatrix'' replaces the current matrix with the one whose elements are specified
+%% by `M' . The current matrix is the projection matrix, modelview matrix, or texture
+%% matrix, depending on the current matrix mode (see {@link gl:matrixMode/1} ).
+%%
+%% The current matrix, M, defines a transformation of coordinates. For instance, assume
+%% M refers to the modelview matrix. If v=(v[0] v[1] v[2] v[3]) is the set of object coordinates of a vertex,
+%% and `M' points to an array of 16 single- or double-precision floating-point values
+%% m={m[0] m[1] ... m[15]}, then the modelview transformation M(v) does the following:
+%%
+%% M(v)=(m[0] m[4] m[8] m[12] m[1] m[5] m[9] m[13] m[2] m[6] m[10] m[14] m[3] m[7] m[11] m[15])*(v[0] v[1] v[2] v[3])
+%%
+%% Projection and texture transformations are similarly defined.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadMatrix.xml">external</a> documentation.
+-spec loadMatrixd(M) -> ok when M :: matrix().
+loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
+ cast(5092, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
+loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
+ cast(5092, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble>>).
-%% @spec (Flag::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthMask.xml">external</a> documentation.
--spec depthMask(0|1) -> ok.
-depthMask(Flag) ->
- cast(5084, <<Flag:?GLboolean>>).
+%% @doc
+%% See {@link loadMatrixd/1}
+-spec loadMatrixf(M) -> ok when M :: matrix().
+loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
+ cast(5093, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
+loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
+ cast(5093, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,0:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,0:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,0:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,1:?GLfloat>>).
-%% @spec (ZNear::clamp(),ZFar::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRange.xml">external</a> documentation.
--spec depthRange(clamp(),clamp()) -> ok.
-depthRange(ZNear,ZFar) ->
- cast(5085, <<ZNear:?GLclampd,ZFar:?GLclampd>>).
+%% @doc Multiply the current matrix with the specified matrix
+%%
+%% ``gl:multMatrix'' multiplies the current matrix with the one specified using `M' ,
+%% and replaces the current matrix with the product.
+%%
+%% The current matrix is determined by the current matrix mode (see {@link gl:matrixMode/1} ).
+%% It is either the projection matrix, modelview matrix, or the texture matrix.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultMatrix.xml">external</a> documentation.
+-spec multMatrixd(M) -> ok when M :: matrix().
+multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
+ cast(5094, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
+multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
+ cast(5094, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble>>).
-%% @spec (Cap::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDisable.xml">external</a> documentation.
--spec disable(enum()) -> ok.
-disable(Cap) ->
- cast(5086, <<Cap:?GLenum>>).
+%% @doc
+%% See {@link multMatrixd/1}
+-spec multMatrixf(M) -> ok when M :: matrix().
+multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
+ cast(5095, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
+multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
+ cast(5095, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,0:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,0:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,0:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,1:?GLfloat>>).
-%% @spec (Array::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDisableClientState.xml">external</a> documentation.
--spec disableClientState(enum()) -> ok.
-disableClientState(Array) ->
- cast(5087, <<Array:?GLenum>>).
+%% @doc Multiply the current matrix by a rotation matrix
+%%
+%% ``gl:rotate'' produces a rotation of `Angle' degrees around the vector (x y z). The current
+%% matrix (see {@link gl:matrixMode/1} ) is multiplied by a rotation matrix with the product
+%% replacing the current matrix, as if {@link gl:multMatrixd/1} were called with the following
+%% matrix as its argument:
+%%
+%% (x 2(1-c)+c x y(1-c)-z s x z(1-c)+y s 0 y x(1-c)+z s y 2(1-c)+c y z(1-c)-x s 0 x z(1-c)-y s y z(1-c)+x s z 2(1-c)+c 0 0 0 0
+%% 1)
+%%
+%% Where c= cos(angle), s= sin(angle), and ||(x y z)||= 1 (if not, the GL will normalize this vector).
+%%
+%% If the matrix mode is either `?GL_MODELVIEW' or `?GL_PROJECTION', all objects
+%% drawn after ``gl:rotate'' is called are rotated. Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0}
+%% to save and restore the unrotated coordinate system.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml">external</a> documentation.
+-spec rotated(Angle, X, Y, Z) -> ok when Angle :: float(),X :: float(),Y :: float(),Z :: float().
+rotated(Angle,X,Y,Z) ->
+ cast(5096, <<Angle:?GLdouble,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec (Mode::enum(),First::integer(),Count::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArrays.xml">external</a> documentation.
--spec drawArrays(enum(),integer(),integer()) -> ok.
-drawArrays(Mode,First,Count) ->
- cast(5088, <<Mode:?GLenum,First:?GLint,Count:?GLsizei>>).
+%% @doc
+%% See {@link rotated/4}
+-spec rotatef(Angle, X, Y, Z) -> ok when Angle :: float(),X :: float(),Y :: float(),Z :: float().
+rotatef(Angle,X,Y,Z) ->
+ cast(5097, <<Angle:?GLfloat,X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffer.xml">external</a> documentation.
--spec drawBuffer(enum()) -> ok.
-drawBuffer(Mode) ->
- cast(5089, <<Mode:?GLenum>>).
+%% @doc Multiply the current matrix by a general scaling matrix
+%%
+%% ``gl:scale'' produces a nonuniform scaling along the `x', `y', and `z'
+%% axes. The three parameters indicate the desired scale factor along each of the three axes.
+%%
+%%
+%% The current matrix (see {@link gl:matrixMode/1} ) is multiplied by this scale matrix, and
+%% the product replaces the current matrix as if {@link gl:multMatrixd/1} were called with
+%% the following matrix as its argument:
+%%
+%% (x 0 0 0 0 y 0 0 0 0 z 0 0 0 0 1)
+%%
+%% If the matrix mode is either `?GL_MODELVIEW' or `?GL_PROJECTION', all objects
+%% drawn after ``gl:scale'' is called are scaled.
+%%
+%% Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} to save and restore the unscaled
+%% coordinate system.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScale.xml">external</a> documentation.
+-spec scaled(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+scaled(X,Y,Z) ->
+ cast(5098, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElements.xml">external</a> documentation.
--spec drawElements(enum(),integer(),enum(),offset()|mem()) -> ok.
-drawElements(Mode,Count,Type,Indices) when is_integer(Indices) ->
- cast(5090, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint>>);
-drawElements(Mode,Count,Type,Indices) ->
- send_bin(Indices),
- cast(5091, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum>>).
+%% @doc
+%% See {@link scaled/3}
+-spec scalef(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+scalef(X,Y,Z) ->
+ cast(5099, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
-%% @spec (Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawPixels.xml">external</a> documentation.
--spec drawPixels(integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
-drawPixels(Width,Height,Format,Type,Pixels) when is_integer(Pixels) ->
- cast(5092, <<Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
-drawPixels(Width,Height,Format,Type,Pixels) ->
- send_bin(Pixels),
- cast(5093, <<Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
+%% @doc Multiply the current matrix by a translation matrix
+%%
+%% ``gl:translate'' produces a translation by (x y z). The current matrix (see {@link gl:matrixMode/1}
+%% ) is multiplied by this translation matrix, with the product replacing the current matrix,
+%% as if {@link gl:multMatrixd/1} were called with the following matrix for its argument:
+%%
+%% (1 0 0 x 0 1 0 y 0 0 1 z 0 0 0 1)
+%%
+%% If the matrix mode is either `?GL_MODELVIEW' or `?GL_PROJECTION', all objects
+%% drawn after a call to ``gl:translate'' are translated.
+%%
+%% Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} to save and restore the untranslated
+%% coordinate system.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml">external</a> documentation.
+-spec translated(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+translated(X,Y,Z) ->
+ cast(5100, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec (Flag::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEdgeFlag.xml">external</a> documentation.
--spec edgeFlag(0|1) -> ok.
-edgeFlag(Flag) ->
- cast(5094, <<Flag:?GLboolean>>).
-
-%% @spec (Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEdgeFlagPointer.xml">external</a> documentation.
--spec edgeFlagPointer(integer(),offset()|mem()) -> ok.
-edgeFlagPointer(Stride,Pointer) when is_integer(Pointer) ->
- cast(5095, <<Stride:?GLsizei,Pointer:?GLuint>>);
-edgeFlagPointer(Stride,Pointer) ->
- send_bin(Pointer),
- cast(5096, <<Stride:?GLsizei>>).
+%% @doc
+%% See {@link translated/3}
+-spec translatef(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+translatef(X,Y,Z) ->
+ cast(5101, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
-%% @spec ({Flag}) -> ok
-%% @equiv edgeFlag(Flag)
--spec edgeFlagv({0|1}) -> ok.
-edgeFlagv({Flag}) -> edgeFlag(Flag).
+%% @doc Determine if a name corresponds to a display list
+%%
+%% ``gl:isList'' returns `?GL_TRUE' if `List' is the name of a display list and
+%% returns `?GL_FALSE' if it is not, or if an error occurs.
+%%
+%% A name returned by {@link gl:genLists/1} , but not yet associated with a display list by
+%% calling {@link gl:newList/2} , is not the name of a display list.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsList.xml">external</a> documentation.
+-spec isList(List) -> 0|1 when List :: integer().
+isList(List) ->
+ call(5102, <<List:?GLuint>>).
-%% @spec (Cap::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml">external</a> documentation.
--spec enable(enum()) -> ok.
-enable(Cap) ->
- cast(5097, <<Cap:?GLenum>>).
+%% @doc Delete a contiguous group of display lists
+%%
+%% ``gl:deleteLists'' causes a contiguous group of display lists to be deleted. `List'
+%% is the name of the first display list to be deleted, and `Range' is the number of
+%% display lists to delete. All display lists d with list&lt;= d&lt;= list+range-1 are
+%% deleted.
+%%
+%% All storage locations allocated to the specified display lists are freed, and the names
+%% are available for reuse at a later time. Names within the range that do not have an associated
+%% display list are ignored. If `Range' is 0, nothing happens.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteLists.xml">external</a> documentation.
+-spec deleteLists(List, Range) -> ok when List :: integer(),Range :: integer().
+deleteLists(List,Range) ->
+ cast(5103, <<List:?GLuint,Range:?GLsizei>>).
-%% @spec (Array::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnableClientState.xml">external</a> documentation.
--spec enableClientState(enum()) -> ok.
-enableClientState(Array) ->
- cast(5098, <<Array:?GLenum>>).
+%% @doc Generate a contiguous set of empty display lists
+%%
+%% ``gl:genLists'' has one argument, `Range' . It returns an integer `n' such
+%% that `Range' contiguous empty display lists, named n, n+1, ..., n+range-1,
+%% are created. If `Range' is 0, if there is no group of `Range' contiguous names
+%% available, or if any error is generated, no display lists are generated, and 0 is returned.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenLists.xml">external</a> documentation.
+-spec genLists(Range) -> integer() when Range :: integer().
+genLists(Range) ->
+ call(5104, <<Range:?GLsizei>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnd.xml">external</a> documentation.
--spec 'end'() -> ok.
-'end'() ->
- cast(5099, <<>>).
+%% @doc Create or replace a display list
+%%
+%% Display lists are groups of GL commands that have been stored for subsequent execution.
+%% Display lists are created with ``gl:newList''. All subsequent commands are placed in
+%% the display list, in the order issued, until {@link gl:endList/0} is called.
+%%
+%% ``gl:newList'' has two arguments. The first argument, `List' , is a positive integer
+%% that becomes the unique name for the display list. Names can be created and reserved with
+%% {@link gl:genLists/1} and tested for uniqueness with {@link gl:isList/1} . The second argument,
+%% `Mode' , is a symbolic constant that can assume one of two values:
+%%
+%% `?GL_COMPILE': Commands are merely compiled.
+%%
+%% `?GL_COMPILE_AND_EXECUTE': Commands are executed as they are compiled into the display
+%% list.
+%%
+%% Certain commands are not compiled into the display list but are executed immediately,
+%% regardless of the display-list mode. These commands are {@link gl:areTexturesResident/1} , {@link gl:colorPointer/4}
+%% , {@link gl:deleteLists/2} , {@link gl:deleteTextures/1} , {@link gl:enableClientState/1} , {@link gl:edgeFlagPointer/2}
+%% , {@link gl:enableClientState/1} , {@link gl:feedbackBuffer/3} , {@link gl:finish/0} , {@link gl:flush/0}
+%% , {@link gl:genLists/1} , {@link gl:genTextures/1} , {@link gl:indexPointer/3} , {@link gl:interleavedArrays/3}
+%% , {@link gl:isEnabled/1} , {@link gl:isList/1} , {@link gl:isTexture/1} , {@link gl:normalPointer/3}
+%% , {@link gl:pushClientAttrib/1} , {@link gl:pixelStoref/2} , {@link gl:pushClientAttrib/1} , {@link gl:readPixels/7}
+%% , {@link gl:renderMode/1} , {@link gl:selectBuffer/2} , {@link gl:texCoordPointer/4} , {@link gl:vertexPointer/4}
+%% , and all of the {@link gl:getBooleanv/1} commands.
+%%
+%% Similarly, {@link gl:texImage1D/8} , {@link gl:texImage2D/9} , and {@link gl:texImage3D/10}
+%% are executed immediately and not compiled into the display list when their first argument
+%% is `?GL_PROXY_TEXTURE_1D', `?GL_PROXY_TEXTURE_1D', or `?GL_PROXY_TEXTURE_3D'
+%% , respectively.
+%%
+%% When the ARB_imaging extension is supported, {@link gl:histogram/4} executes immediately
+%% when its argument is `?GL_PROXY_HISTOGRAM'. Similarly, {@link gl:colorTable/6} executes
+%% immediately when its first argument is `?GL_PROXY_COLOR_TABLE', `?GL_PROXY_POST_CONVOLUTION_COLOR_TABLE'
+%% , or `?GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
+%%
+%% For OpenGL versions 1.3 and greater, or when the ARB_multitexture extension is supported,
+%% {@link gl:clientActiveTexture/1} is not compiled into display lists, but executed immediately.
+%%
+%%
+%% When {@link gl:endList/0} is encountered, the display-list definition is completed by
+%% associating the list with the unique name `List' (specified in the ``gl:newList''
+%% command). If a display list with name `List' already exists, it is replaced only
+%% when {@link gl:endList/0} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNewList.xml">external</a> documentation.
+-spec newList(List, Mode) -> ok when List :: integer(),Mode :: enum().
+newList(List,Mode) ->
+ cast(5105, <<List:?GLuint,Mode:?GLenum>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEndList.xml">external</a> documentation.
+%% @doc glBeginList
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginList.xml">external</a> documentation.
-spec endList() -> ok.
endList() ->
- cast(5100, <<>>).
-
-%% @spec (U::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalCoord.xml">external</a> documentation.
--spec evalCoord1d(float()) -> ok.
-evalCoord1d(U) ->
- cast(5101, <<U:?GLdouble>>).
-
-%% @spec ({U}) -> ok
-%% @equiv evalCoord1d(U)
--spec evalCoord1dv({float()}) -> ok.
-evalCoord1dv({U}) -> evalCoord1d(U).
-
-%% @spec (U::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalCoord.xml">external</a> documentation.
--spec evalCoord1f(float()) -> ok.
-evalCoord1f(U) ->
- cast(5102, <<U:?GLfloat>>).
-
-%% @spec ({U}) -> ok
-%% @equiv evalCoord1f(U)
--spec evalCoord1fv({float()}) -> ok.
-evalCoord1fv({U}) -> evalCoord1f(U).
-
-%% @spec (U::float(),V::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalCoord.xml">external</a> documentation.
--spec evalCoord2d(float(),float()) -> ok.
-evalCoord2d(U,V) ->
- cast(5103, <<U:?GLdouble,V:?GLdouble>>).
+ cast(5106, <<>>).
-%% @spec ({U,V}) -> ok
-%% @equiv evalCoord2d(U,V)
--spec evalCoord2dv({float(),float()}) -> ok.
-evalCoord2dv({U,V}) -> evalCoord2d(U,V).
-
-%% @spec (U::float(),V::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalCoord.xml">external</a> documentation.
--spec evalCoord2f(float(),float()) -> ok.
-evalCoord2f(U,V) ->
- cast(5104, <<U:?GLfloat,V:?GLfloat>>).
-
-%% @spec ({U,V}) -> ok
-%% @equiv evalCoord2f(U,V)
--spec evalCoord2fv({float(),float()}) -> ok.
-evalCoord2fv({U,V}) -> evalCoord2f(U,V).
-
-%% @spec (Mode::enum(),I1::integer(),I2::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalMesh.xml">external</a> documentation.
--spec evalMesh1(enum(),integer(),integer()) -> ok.
-evalMesh1(Mode,I1,I2) ->
- cast(5105, <<Mode:?GLenum,I1:?GLint,I2:?GLint>>).
-
-%% @spec (Mode::enum(),I1::integer(),I2::integer(),J1::integer(),J2::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalMesh.xml">external</a> documentation.
--spec evalMesh2(enum(),integer(),integer(),integer(),integer()) -> ok.
-evalMesh2(Mode,I1,I2,J1,J2) ->
- cast(5106, <<Mode:?GLenum,I1:?GLint,I2:?GLint,J1:?GLint,J2:?GLint>>).
-
-%% @spec (I::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalPoint.xml">external</a> documentation.
--spec evalPoint1(integer()) -> ok.
-evalPoint1(I) ->
- cast(5107, <<I:?GLint>>).
+%% @doc Execute a display list
+%%
+%% ``gl:callList'' causes the named display list to be executed. The commands saved in
+%% the display list are executed in order, just as if they were called without using a display
+%% list. If `List' has not been defined as a display list, ``gl:callList'' is ignored.
+%%
+%%
+%% ``gl:callList'' can appear inside a display list. To avoid the possibility of infinite
+%% recursion resulting from display lists calling one another, a limit is placed on the nesting
+%% level of display lists during display-list execution. This limit is at least 64, and it
+%% depends on the implementation.
+%%
+%% GL state is not saved and restored across a call to ``gl:callList''. Thus, changes
+%% made to GL state during the execution of a display list remain after execution of the
+%% display list is completed. Use {@link gl:pushAttrib/1} , {@link gl:pushAttrib/1} , {@link gl:pushMatrix/0}
+%% , and {@link gl:pushMatrix/0} to preserve GL state across ``gl:callList'' calls.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCallList.xml">external</a> documentation.
+-spec callList(List) -> ok when List :: integer().
+callList(List) ->
+ cast(5107, <<List:?GLuint>>).
-%% @spec (I::integer(),J::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalPoint.xml">external</a> documentation.
--spec evalPoint2(integer(),integer()) -> ok.
-evalPoint2(I,J) ->
- cast(5108, <<I:?GLint,J:?GLint>>).
+%% @doc Execute a list of display lists
+%%
+%% ``gl:callLists'' causes each display list in the list of names passed as `Lists'
+%% to be executed. As a result, the commands saved in each display list are executed in order,
+%% just as if they were called without using a display list. Names of display lists that
+%% have not been defined are ignored.
+%%
+%% ``gl:callLists'' provides an efficient means for executing more than one display list. `Type'
+%% allows lists with various name formats to be accepted. The formats are as follows:
+%%
+%% `?GL_BYTE': `Lists' is treated as an array of signed bytes, each in the range
+%% -128 through 127.
+%%
+%% `?GL_UNSIGNED_BYTE': `Lists' is treated as an array of unsigned bytes, each
+%% in the range 0 through 255.
+%%
+%% `?GL_SHORT': `Lists' is treated as an array of signed two-byte integers, each
+%% in the range -32768 through 32767.
+%%
+%% `?GL_UNSIGNED_SHORT': `Lists' is treated as an array of unsigned two-byte integers,
+%% each in the range 0 through 65535.
+%%
+%% `?GL_INT': `Lists' is treated as an array of signed four-byte integers.
+%%
+%% `?GL_UNSIGNED_INT': `Lists' is treated as an array of unsigned four-byte integers.
+%%
+%%
+%% `?GL_FLOAT': `Lists' is treated as an array of four-byte floating-point values.
+%%
+%%
+%% `?GL_2_BYTES': `Lists' is treated as an array of unsigned bytes. Each pair of
+%% bytes specifies a single display-list name. The value of the pair is computed as 256 times
+%% the unsigned value of the first byte plus the unsigned value of the second byte.
+%%
+%% `?GL_3_BYTES': `Lists' is treated as an array of unsigned bytes. Each triplet
+%% of bytes specifies a single display-list name. The value of the triplet is computed as
+%% 65536 times the unsigned value of the first byte, plus 256 times the unsigned value of
+%% the second byte, plus the unsigned value of the third byte.
+%%
+%% `?GL_4_BYTES': `Lists' is treated as an array of unsigned bytes. Each quadruplet
+%% of bytes specifies a single display-list name. The value of the quadruplet is computed
+%% as 16777216 times the unsigned value of the first byte, plus 65536 times the unsigned
+%% value of the second byte, plus 256 times the unsigned value of the third byte, plus the
+%% unsigned value of the fourth byte.
+%%
+%% The list of display-list names is not null-terminated. Rather, `N' specifies how
+%% many names are to be taken from `Lists' .
+%%
+%% An additional level of indirection is made available with the {@link gl:listBase/1} command,
+%% which specifies an unsigned offset that is added to each display-list name specified in `Lists'
+%% before that display list is executed.
+%%
+%% ``gl:callLists'' can appear inside a display list. To avoid the possibility of infinite
+%% recursion resulting from display lists calling one another, a limit is placed on the nesting
+%% level of display lists during display-list execution. This limit must be at least 64,
+%% and it depends on the implementation.
+%%
+%% GL state is not saved and restored across a call to ``gl:callLists''. Thus, changes
+%% made to GL state during the execution of the display lists remain after execution is completed.
+%% Use {@link gl:pushAttrib/1} , {@link gl:pushAttrib/1} , {@link gl:pushMatrix/0} , and {@link gl:pushMatrix/0}
+%% to preserve GL state across ``gl:callLists'' calls.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCallLists.xml">external</a> documentation.
+-spec callLists(Lists) -> ok when Lists :: [integer()].
+callLists(Lists) ->
+ cast(5108, <<(length(Lists)):?GLuint,
+ (<< <<C:?GLuint>> || C <- Lists>>)/binary,0:(((1+length(Lists)) rem 2)*32)>>).
-%% @spec (Size::integer(),Type::enum(),Buffer::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFeedbackBuffer.xml">external</a> documentation.
--spec feedbackBuffer(integer(),enum(),mem()) -> ok.
-feedbackBuffer(Size,Type,Buffer) ->
- send_bin(Buffer),
- call(5109, <<Size:?GLsizei,Type:?GLenum>>).
+%% @doc set the display-list base for
+%%
+%% {@link gl:callLists/1}
+%%
+%% {@link gl:callLists/1} specifies an array of offsets. Display-list names are generated
+%% by adding `Base' to each offset. Names that reference valid display lists are executed;
+%% the others are ignored.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glListBase.xml">external</a> documentation.
+-spec listBase(Base) -> ok when Base :: integer().
+listBase(Base) ->
+ cast(5109, <<Base:?GLuint>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFinish.xml">external</a> documentation.
--spec finish() -> ok.
-finish() ->
- cast(5110, <<>>).
+%% @doc Delimit the vertices of a primitive or a group of like primitives
+%%
+%% ``gl:'begin''' and {@link gl:'begin'/1} delimit the vertices that define a primitive or a group
+%% of like primitives. ``gl:'begin''' accepts a single argument that specifies in which of
+%% ten ways the vertices are interpreted. Taking n as an integer count starting at one,
+%% and N as the total number of vertices specified, the interpretations are as follows:
+%%
+%% `?GL_POINTS': Treats each vertex as a single point. Vertex n defines point n.
+%% N points are drawn.
+%%
+%% `?GL_LINES': Treats each pair of vertices as an independent line segment. Vertices
+%% 2 n-1 and 2 n define line n. N/2 lines are drawn.
+%%
+%% `?GL_LINE_STRIP': Draws a connected group of line segments from the first vertex
+%% to the last. Vertices n and n+1 define line n. N-1 lines are drawn.
+%%
+%% `?GL_LINE_LOOP': Draws a connected group of line segments from the first vertex
+%% to the last, then back to the first. Vertices n and n+1 define line n. The last
+%% line, however, is defined by vertices N and 1. N lines are drawn.
+%%
+%% `?GL_TRIANGLES': Treats each triplet of vertices as an independent triangle. Vertices
+%% 3 n-2, 3 n-1, and 3 n define triangle n. N/3 triangles are drawn.
+%%
+%% `?GL_TRIANGLE_STRIP': Draws a connected group of triangles. One triangle is defined
+%% for each vertex presented after the first two vertices. For odd n, vertices n, n+1,
+%% and n+2 define triangle n. For even n, vertices n+1, n, and n+2 define triangle
+%% n. N-2 triangles are drawn.
+%%
+%% `?GL_TRIANGLE_FAN': Draws a connected group of triangles. One triangle is defined
+%% for each vertex presented after the first two vertices. Vertices 1, n+1, and n+2
+%% define triangle n. N-2 triangles are drawn.
+%%
+%% `?GL_QUADS': Treats each group of four vertices as an independent quadrilateral.
+%% Vertices 4 n-3, 4 n-2, 4 n-1, and 4 n define quadrilateral n. N/4 quadrilaterals
+%% are drawn.
+%%
+%% `?GL_QUAD_STRIP': Draws a connected group of quadrilaterals. One quadrilateral is
+%% defined for each pair of vertices presented after the first pair. Vertices 2 n-1, 2
+%% n, 2 n+2, and 2 n+1 define quadrilateral n. N/2-1 quadrilaterals are drawn. Note
+%% that the order in which vertices are used to construct a quadrilateral from strip data
+%% is different from that used with independent data.
+%%
+%% `?GL_POLYGON': Draws a single, convex polygon. Vertices 1 through N define this
+%% polygon.
+%%
+%% Only a subset of GL commands can be used between ``gl:'begin''' and {@link gl:'begin'/1} .
+%% The commands are {@link gl:vertex2d/2} , {@link gl:color3b/3} , {@link gl:secondaryColor3b/3} , {@link gl:indexd/1}
+%% , {@link gl:normal3b/3} , {@link gl:fogCoordf/1} , {@link gl:texCoord1d/1} , {@link gl:multiTexCoord1d/2}
+%% , {@link gl:vertexAttrib1d/2} , {@link gl:evalCoord1d/1} , {@link gl:evalPoint1/1} , {@link gl:arrayElement/1}
+%% , {@link gl:materialf/3} , and {@link gl:edgeFlag/1} . Also, it is acceptable to use {@link gl:callList/1}
+%% or {@link gl:callLists/1} to execute display lists that include only the preceding commands.
+%% If any other GL command is executed between ``gl:'begin''' and {@link gl:'begin'/1} , the error
+%% flag is set and the command is ignored.
+%%
+%% Regardless of the value chosen for `Mode' , there is no limit to the number of vertices
+%% that can be defined between ``gl:'begin''' and {@link gl:'begin'/1} . Lines, triangles, quadrilaterals,
+%% and polygons that are incompletely specified are not drawn. Incomplete specification results
+%% when either too few vertices are provided to specify even a single primitive or when an
+%% incorrect multiple of vertices is specified. The incomplete primitive is ignored; the
+%% rest are drawn.
+%%
+%% The minimum specification of vertices for each primitive is as follows: 1 for a point,
+%% 2 for a line, 3 for a triangle, 4 for a quadrilateral, and 3 for a polygon. Modes that
+%% require a certain multiple of vertices are `?GL_LINES' (2), `?GL_TRIANGLES'
+%% (3), `?GL_QUADS' (4), and `?GL_QUAD_STRIP' (2).
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBegin.xml">external</a> documentation.
+-spec 'begin'(Mode) -> ok when Mode :: enum().
+'begin'(Mode) ->
+ cast(5110, <<Mode:?GLenum>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFlush.xml">external</a> documentation.
--spec flush() -> ok.
-flush() ->
+%% @doc
+%% See {@link 'begin'/1}
+-spec 'end'() -> ok.
+'end'() ->
cast(5111, <<>>).
-%% @spec (Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml">external</a> documentation.
--spec fogf(enum(),float()) -> ok.
-fogf(Pname,Param) ->
- cast(5112, <<Pname:?GLenum,Param:?GLfloat>>).
+%% @doc Specify a vertex
+%%
+%% ``gl:vertex'' commands are used within {@link gl:'begin'/1} / {@link gl:'begin'/1} pairs to specify
+%% point, line, and polygon vertices. The current color, normal, texture coordinates, and
+%% fog coordinate are associated with the vertex when ``gl:vertex'' is called.
+%%
+%% When only x and y are specified, z defaults to 0 and w defaults to 1. When x,
+%% y, and z are specified, w defaults to 1.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
+-spec vertex2d(X, Y) -> ok when X :: float(),Y :: float().
+vertex2d(X,Y) ->
+ cast(5112, <<X:?GLdouble,Y:?GLdouble>>).
-%% @spec (Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml">external</a> documentation.
--spec fogfv(enum(),{float()}) -> ok.
-fogfv(Pname,Params) ->
- cast(5113, <<Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex2f(X, Y) -> ok when X :: float(),Y :: float().
+vertex2f(X,Y) ->
+ cast(5113, <<X:?GLfloat,Y:?GLfloat>>).
-%% @spec (Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml">external</a> documentation.
--spec fogi(enum(),integer()) -> ok.
-fogi(Pname,Param) ->
- cast(5114, <<Pname:?GLenum,Param:?GLint>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex2i(X, Y) -> ok when X :: integer(),Y :: integer().
+vertex2i(X,Y) ->
+ cast(5114, <<X:?GLint,Y:?GLint>>).
-%% @spec (Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml">external</a> documentation.
--spec fogiv(enum(),{integer()}) -> ok.
-fogiv(Pname,Params) ->
- cast(5115, <<Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex2s(X, Y) -> ok when X :: integer(),Y :: integer().
+vertex2s(X,Y) ->
+ cast(5115, <<X:?GLshort,Y:?GLshort>>).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFrontFace.xml">external</a> documentation.
--spec frontFace(enum()) -> ok.
-frontFace(Mode) ->
- cast(5116, <<Mode:?GLenum>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+vertex3d(X,Y,Z) ->
+ cast(5116, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec (Left::float(),Right::float(),Bottom::float(),Top::float(),ZNear::float(),ZFar::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFrustum.xml">external</a> documentation.
--spec frustum(float(),float(),float(),float(),float(),float()) -> ok.
-frustum(Left,Right,Bottom,Top,ZNear,ZFar) ->
- cast(5117, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble,ZNear:?GLdouble,ZFar:?GLdouble>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+vertex3f(X,Y,Z) ->
+ cast(5117, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
-%% @spec (Range::integer()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenLists.xml">external</a> documentation.
--spec genLists(integer()) -> integer().
-genLists(Range) ->
- call(5118, <<Range:?GLsizei>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+vertex3i(X,Y,Z) ->
+ cast(5118, <<X:?GLint,Y:?GLint,Z:?GLint>>).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenTextures.xml">external</a> documentation.
--spec genTextures(integer()) -> [integer()].
-genTextures(N) ->
- call(5119, <<N:?GLsizei>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+vertex3s(X,Y,Z) ->
+ cast(5119, <<X:?GLshort,Y:?GLshort,Z:?GLshort>>).
-%% @spec (Pname::enum()) -> [0|1]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBooleanv.xml">external</a> documentation.
--spec getBooleanv(enum()) -> [0|1].
-getBooleanv(Pname) ->
- call(5120, <<Pname:?GLenum>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex4d(X, Y, Z, W) -> ok when X :: float(),Y :: float(),Z :: float(),W :: float().
+vertex4d(X,Y,Z,W) ->
+ cast(5120, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
-%% @spec (Plane::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetClipPlane.xml">external</a> documentation.
--spec getClipPlane(enum()) -> {float(),float(),float(),float()}.
-getClipPlane(Plane) ->
- call(5121, <<Plane:?GLenum>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex4f(X, Y, Z, W) -> ok when X :: float(),Y :: float(),Z :: float(),W :: float().
+vertex4f(X,Y,Z,W) ->
+ cast(5121, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
-%% @spec (Pname::enum()) -> [float()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetDoublev.xml">external</a> documentation.
--spec getDoublev(enum()) -> [float()].
-getDoublev(Pname) ->
- call(5122, <<Pname:?GLenum>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex4i(X, Y, Z, W) -> ok when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+vertex4i(X,Y,Z,W) ->
+ cast(5122, <<X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
-%% @spec () -> enum()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetError.xml">external</a> documentation.
--spec getError() -> enum().
-getError() ->
- call(5123, <<>>).
+%% @doc
+%% See {@link vertex2d/2}
+-spec vertex4s(X, Y, Z, W) -> ok when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+vertex4s(X,Y,Z,W) ->
+ cast(5123, <<X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
-%% @spec (Pname::enum()) -> [float()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetFloatv.xml">external</a> documentation.
--spec getFloatv(enum()) -> [float()].
-getFloatv(Pname) ->
- call(5124, <<Pname:?GLenum>>).
+%% @equiv vertex2d(X,Y)
+-spec vertex2dv(V) -> ok when V :: {X :: float(),Y :: float()}.
+vertex2dv({X,Y}) -> vertex2d(X,Y).
-%% @spec (Pname::enum()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetIntegerv.xml">external</a> documentation.
--spec getIntegerv(enum()) -> [integer()].
-getIntegerv(Pname) ->
- call(5125, <<Pname:?GLenum>>).
+%% @equiv vertex2f(X,Y)
+-spec vertex2fv(V) -> ok when V :: {X :: float(),Y :: float()}.
+vertex2fv({X,Y}) -> vertex2f(X,Y).
-%% @spec (Light::enum(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetLight.xml">external</a> documentation.
--spec getLightfv(enum(),enum()) -> {float(),float(),float(),float()}.
-getLightfv(Light,Pname) ->
- call(5126, <<Light:?GLenum,Pname:?GLenum>>).
+%% @equiv vertex2i(X,Y)
+-spec vertex2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
+vertex2iv({X,Y}) -> vertex2i(X,Y).
-%% @spec (Light::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetLight.xml">external</a> documentation.
--spec getLightiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
-getLightiv(Light,Pname) ->
- call(5127, <<Light:?GLenum,Pname:?GLenum>>).
+%% @equiv vertex2s(X,Y)
+-spec vertex2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
+vertex2sv({X,Y}) -> vertex2s(X,Y).
-%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMap.xml">external</a> documentation.
--spec getMapdv(enum(),enum(),mem()) -> ok.
-getMapdv(Target,Query,V) ->
- send_bin(V),
- call(5128, <<Target:?GLenum,Query:?GLenum>>).
+%% @equiv vertex3d(X,Y,Z)
+-spec vertex3dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+vertex3dv({X,Y,Z}) -> vertex3d(X,Y,Z).
-%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMap.xml">external</a> documentation.
--spec getMapfv(enum(),enum(),mem()) -> ok.
-getMapfv(Target,Query,V) ->
- send_bin(V),
- call(5129, <<Target:?GLenum,Query:?GLenum>>).
+%% @equiv vertex3f(X,Y,Z)
+-spec vertex3fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+vertex3fv({X,Y,Z}) -> vertex3f(X,Y,Z).
-%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMap.xml">external</a> documentation.
--spec getMapiv(enum(),enum(),mem()) -> ok.
-getMapiv(Target,Query,V) ->
- send_bin(V),
- call(5130, <<Target:?GLenum,Query:?GLenum>>).
+%% @equiv vertex3i(X,Y,Z)
+-spec vertex3iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+vertex3iv({X,Y,Z}) -> vertex3i(X,Y,Z).
-%% @spec (Face::enum(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMaterial.xml">external</a> documentation.
--spec getMaterialfv(enum(),enum()) -> {float(),float(),float(),float()}.
-getMaterialfv(Face,Pname) ->
- call(5131, <<Face:?GLenum,Pname:?GLenum>>).
+%% @equiv vertex3s(X,Y,Z)
+-spec vertex3sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+vertex3sv({X,Y,Z}) -> vertex3s(X,Y,Z).
-%% @spec (Face::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMaterial.xml">external</a> documentation.
--spec getMaterialiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
-getMaterialiv(Face,Pname) ->
- call(5132, <<Face:?GLenum,Pname:?GLenum>>).
+%% @equiv vertex4d(X,Y,Z,W)
+-spec vertex4dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+vertex4dv({X,Y,Z,W}) -> vertex4d(X,Y,Z,W).
-%% @spec (Map::enum(),Values::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetPixelMap.xml">external</a> documentation.
--spec getPixelMapfv(enum(),mem()) -> ok.
-getPixelMapfv(Map,Values) ->
- send_bin(Values),
- call(5133, <<Map:?GLenum>>).
+%% @equiv vertex4f(X,Y,Z,W)
+-spec vertex4fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+vertex4fv({X,Y,Z,W}) -> vertex4f(X,Y,Z,W).
-%% @spec (Map::enum(),Values::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetPixelMap.xml">external</a> documentation.
--spec getPixelMapuiv(enum(),mem()) -> ok.
-getPixelMapuiv(Map,Values) ->
- send_bin(Values),
- call(5134, <<Map:?GLenum>>).
+%% @equiv vertex4i(X,Y,Z,W)
+-spec vertex4iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+vertex4iv({X,Y,Z,W}) -> vertex4i(X,Y,Z,W).
-%% @spec (Map::enum(),Values::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetPixelMap.xml">external</a> documentation.
--spec getPixelMapusv(enum(),mem()) -> ok.
-getPixelMapusv(Map,Values) ->
- send_bin(Values),
- call(5135, <<Map:?GLenum>>).
+%% @equiv vertex4s(X,Y,Z,W)
+-spec vertex4sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+vertex4sv({X,Y,Z,W}) -> vertex4s(X,Y,Z,W).
-%% @spec () -> binary()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetPolygonStipple.xml">external</a> documentation.
--spec getPolygonStipple() -> binary().
-getPolygonStipple() ->
- call(5136, <<>>).
+%% @doc Set the current normal vector
+%%
+%% The current normal is set to the given coordinates whenever ``gl:normal'' is issued.
+%% Byte, short, or integer arguments are converted to floating-point format with a linear
+%% mapping that maps the most positive representable integer value to 1.0 and the most negative
+%% representable integer value to -1.0.
+%%
+%% Normals specified with ``gl:normal'' need not have unit length. If `?GL_NORMALIZE'
+%% is enabled, then normals of any length specified with ``gl:normal'' are normalized after
+%% transformation. If `?GL_RESCALE_NORMAL' is enabled, normals are scaled by a scaling
+%% factor derived from the modelview matrix. `?GL_RESCALE_NORMAL' requires that the
+%% originally specified normals were of unit length, and that the modelview matrix contain
+%% only uniform scales for proper results. To enable and disable normalization, call {@link gl:enable/1}
+%% and {@link gl:enable/1} with either `?GL_NORMALIZE' or `?GL_RESCALE_NORMAL'.
+%% Normalization is initially disabled.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml">external</a> documentation.
+-spec normal3b(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer().
+normal3b(Nx,Ny,Nz) ->
+ cast(5124, <<Nx:?GLbyte,Ny:?GLbyte,Nz:?GLbyte>>).
-%% @spec (Name::enum()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetString.xml">external</a> documentation.
--spec getString(enum()) -> string().
-getString(Name) ->
- call(5137, <<Name:?GLenum>>).
+%% @doc
+%% See {@link normal3b/3}
+-spec normal3d(Nx, Ny, Nz) -> ok when Nx :: float(),Ny :: float(),Nz :: float().
+normal3d(Nx,Ny,Nz) ->
+ cast(5125, <<Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble>>).
-%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexEnv.xml">external</a> documentation.
--spec getTexEnvfv(enum(),enum()) -> {float(),float(),float(),float()}.
-getTexEnvfv(Target,Pname) ->
- call(5138, <<Target:?GLenum,Pname:?GLenum>>).
+%% @doc
+%% See {@link normal3b/3}
+-spec normal3f(Nx, Ny, Nz) -> ok when Nx :: float(),Ny :: float(),Nz :: float().
+normal3f(Nx,Ny,Nz) ->
+ cast(5126, <<Nx:?GLfloat,Ny:?GLfloat,Nz:?GLfloat>>).
-%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexEnv.xml">external</a> documentation.
--spec getTexEnviv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
-getTexEnviv(Target,Pname) ->
- call(5139, <<Target:?GLenum,Pname:?GLenum>>).
+%% @doc
+%% See {@link normal3b/3}
+-spec normal3i(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer().
+normal3i(Nx,Ny,Nz) ->
+ cast(5127, <<Nx:?GLint,Ny:?GLint,Nz:?GLint>>).
-%% @spec (Coord::enum(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexGen.xml">external</a> documentation.
--spec getTexGendv(enum(),enum()) -> {float(),float(),float(),float()}.
-getTexGendv(Coord,Pname) ->
- call(5140, <<Coord:?GLenum,Pname:?GLenum>>).
+%% @doc
+%% See {@link normal3b/3}
+-spec normal3s(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer().
+normal3s(Nx,Ny,Nz) ->
+ cast(5128, <<Nx:?GLshort,Ny:?GLshort,Nz:?GLshort>>).
-%% @spec (Coord::enum(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexGen.xml">external</a> documentation.
--spec getTexGenfv(enum(),enum()) -> {float(),float(),float(),float()}.
-getTexGenfv(Coord,Pname) ->
- call(5141, <<Coord:?GLenum,Pname:?GLenum>>).
+%% @equiv normal3b(Nx,Ny,Nz)
+-spec normal3bv(V) -> ok when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
+normal3bv({Nx,Ny,Nz}) -> normal3b(Nx,Ny,Nz).
-%% @spec (Coord::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexGen.xml">external</a> documentation.
--spec getTexGeniv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
-getTexGeniv(Coord,Pname) ->
- call(5142, <<Coord:?GLenum,Pname:?GLenum>>).
+%% @equiv normal3d(Nx,Ny,Nz)
+-spec normal3dv(V) -> ok when V :: {Nx :: float(),Ny :: float(),Nz :: float()}.
+normal3dv({Nx,Ny,Nz}) -> normal3d(Nx,Ny,Nz).
-%% @spec (Target::enum(),Level::integer(),Format::enum(),Type::enum(),Pixels::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexImage.xml">external</a> documentation.
--spec getTexImage(enum(),integer(),enum(),enum(),mem()) -> ok.
-getTexImage(Target,Level,Format,Type,Pixels) ->
- send_bin(Pixels),
- call(5143, <<Target:?GLenum,Level:?GLint,Format:?GLenum,Type:?GLenum>>).
+%% @equiv normal3f(Nx,Ny,Nz)
+-spec normal3fv(V) -> ok when V :: {Nx :: float(),Ny :: float(),Nz :: float()}.
+normal3fv({Nx,Ny,Nz}) -> normal3f(Nx,Ny,Nz).
-%% @spec (Target::enum(),Level::integer(),Pname::enum()) -> {float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexLevelParameter.xml">external</a> documentation.
--spec getTexLevelParameterfv(enum(),integer(),enum()) -> {float()}.
-getTexLevelParameterfv(Target,Level,Pname) ->
- call(5144, <<Target:?GLenum,Level:?GLint,Pname:?GLenum>>).
+%% @equiv normal3i(Nx,Ny,Nz)
+-spec normal3iv(V) -> ok when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
+normal3iv({Nx,Ny,Nz}) -> normal3i(Nx,Ny,Nz).
-%% @spec (Target::enum(),Level::integer(),Pname::enum()) -> {integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexLevelParameter.xml">external</a> documentation.
--spec getTexLevelParameteriv(enum(),integer(),enum()) -> {integer()}.
-getTexLevelParameteriv(Target,Level,Pname) ->
- call(5145, <<Target:?GLenum,Level:?GLint,Pname:?GLenum>>).
+%% @equiv normal3s(Nx,Ny,Nz)
+-spec normal3sv(V) -> ok when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
+normal3sv({Nx,Ny,Nz}) -> normal3s(Nx,Ny,Nz).
-%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameter.xml">external</a> documentation.
--spec getTexParameterfv(enum(),enum()) -> {float(),float(),float(),float()}.
-getTexParameterfv(Target,Pname) ->
- call(5146, <<Target:?GLenum,Pname:?GLenum>>).
+%% @doc Set the current color index
+%%
+%% ``gl:index'' updates the current (single-valued) color index. It takes one argument,
+%% the new value for the current color index.
+%%
+%% The current index is stored as a floating-point value. Integer values are converted directly
+%% to floating-point values, with no special mapping. The initial value is 1.
+%%
+%% Index values outside the representable range of the color index buffer are not clamped.
+%% However, before an index is dithered (if enabled) and written to the frame buffer, it
+%% is converted to fixed-point format. Any bits in the integer portion of the resulting fixed-point
+%% value that do not correspond to bits in the frame buffer are masked out.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml">external</a> documentation.
+-spec indexd(C) -> ok when C :: float().
+indexd(C) ->
+ cast(5129, <<C:?GLdouble>>).
-%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameter.xml">external</a> documentation.
--spec getTexParameteriv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
-getTexParameteriv(Target,Pname) ->
- call(5147, <<Target:?GLenum,Pname:?GLenum>>).
+%% @doc
+%% See {@link indexd/1}
+-spec indexf(C) -> ok when C :: float().
+indexf(C) ->
+ cast(5130, <<C:?GLfloat>>).
-%% @spec (Target::enum(),Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glHint.xml">external</a> documentation.
--spec hint(enum(),enum()) -> ok.
-hint(Target,Mode) ->
- cast(5148, <<Target:?GLenum,Mode:?GLenum>>).
+%% @doc
+%% See {@link indexd/1}
+-spec indexi(C) -> ok when C :: integer().
+indexi(C) ->
+ cast(5131, <<C:?GLint>>).
-%% @spec (Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndexMask.xml">external</a> documentation.
--spec indexMask(integer()) -> ok.
-indexMask(Mask) ->
- cast(5149, <<Mask:?GLuint>>).
-
-%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndexPointer.xml">external</a> documentation.
--spec indexPointer(enum(),integer(),offset()|mem()) -> ok.
-indexPointer(Type,Stride,Pointer) when is_integer(Pointer) ->
- cast(5150, <<Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
-indexPointer(Type,Stride,Pointer) ->
- send_bin(Pointer),
- cast(5151, <<Type:?GLenum,Stride:?GLsizei>>).
+%% @doc
+%% See {@link indexd/1}
+-spec indexs(C) -> ok when C :: integer().
+indexs(C) ->
+ cast(5132, <<C:?GLshort>>).
-%% @spec (C::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml">external</a> documentation.
--spec indexd(float()) -> ok.
-indexd(C) ->
- cast(5152, <<C:?GLdouble>>).
+%% @doc
+%% See {@link indexd/1}
+-spec indexub(C) -> ok when C :: integer().
+indexub(C) ->
+ cast(5133, <<C:?GLubyte>>).
-%% @spec ({C}) -> ok
%% @equiv indexd(C)
--spec indexdv({float()}) -> ok.
+-spec indexdv(C) -> ok when C :: {C :: float()}.
indexdv({C}) -> indexd(C).
-%% @spec (C::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml">external</a> documentation.
--spec indexf(float()) -> ok.
-indexf(C) ->
- cast(5153, <<C:?GLfloat>>).
-
-%% @spec ({C}) -> ok
%% @equiv indexf(C)
--spec indexfv({float()}) -> ok.
+-spec indexfv(C) -> ok when C :: {C :: float()}.
indexfv({C}) -> indexf(C).
-%% @spec (C::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml">external</a> documentation.
--spec indexi(integer()) -> ok.
-indexi(C) ->
- cast(5154, <<C:?GLint>>).
-
-%% @spec ({C}) -> ok
%% @equiv indexi(C)
--spec indexiv({integer()}) -> ok.
+-spec indexiv(C) -> ok when C :: {C :: integer()}.
indexiv({C}) -> indexi(C).
-%% @spec (C::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml">external</a> documentation.
--spec indexs(integer()) -> ok.
-indexs(C) ->
- cast(5155, <<C:?GLshort>>).
-
-%% @spec ({C}) -> ok
%% @equiv indexs(C)
--spec indexsv({integer()}) -> ok.
+-spec indexsv(C) -> ok when C :: {C :: integer()}.
indexsv({C}) -> indexs(C).
-%% @spec (C::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml">external</a> documentation.
--spec indexub(integer()) -> ok.
-indexub(C) ->
- cast(5156, <<C:?GLubyte>>).
-
-%% @spec ({C}) -> ok
%% @equiv indexub(C)
--spec indexubv({integer()}) -> ok.
+-spec indexubv(C) -> ok when C :: {C :: integer()}.
indexubv({C}) -> indexub(C).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glInitNames.xml">external</a> documentation.
--spec initNames() -> ok.
-initNames() ->
- cast(5157, <<>>).
+%% @doc Set the current color
+%%
+%% The GL stores both a current single-valued color index and a current four-valued RGBA
+%% color. ``gl:color'' sets a new four-valued RGBA color. ``gl:color'' has two major
+%% variants: ``gl:color3'' and ``gl:color4''. ``gl:color3'' variants specify new red,
+%% green, and blue values explicitly and set the current alpha value to 1.0 (full intensity)
+%% implicitly. ``gl:color4'' variants specify all four color components explicitly.
+%%
+%% ``gl:color3b'', ``gl:color4b'', ``gl:color3s'', ``gl:color4s'', ``gl:color3i'',
+%% and ``gl:color4i'' take three or four signed byte, short, or long integers as arguments.
+%% When `v' is appended to the name, the color commands can take a pointer to an array
+%% of such values.
+%%
+%% Current color values are stored in floating-point format, with unspecified mantissa and
+%% exponent sizes. Unsigned integer color components, when specified, are linearly mapped
+%% to floating-point values such that the largest representable value maps to 1.0 (full intensity),
+%% and 0 maps to 0.0 (zero intensity). Signed integer color components, when specified, are
+%% linearly mapped to floating-point values such that the most positive representable value
+%% maps to 1.0, and the most negative representable value maps to -1.0. (Note that this
+%% mapping does not convert 0 precisely to 0.0.) Floating-point values are mapped directly.
+%%
+%% Neither floating-point nor signed integer values are clamped to the range [0 1] before the
+%% current color is updated. However, color components are clamped to this range before they
+%% are interpolated or written into a color buffer.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
+-spec color3b(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+color3b(Red,Green,Blue) ->
+ cast(5134, <<Red:?GLbyte,Green:?GLbyte,Blue:?GLbyte>>).
-%% @spec (Format::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glInterleavedArrays.xml">external</a> documentation.
--spec interleavedArrays(enum(),integer(),offset()|mem()) -> ok.
-interleavedArrays(Format,Stride,Pointer) when is_integer(Pointer) ->
- cast(5158, <<Format:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
-interleavedArrays(Format,Stride,Pointer) ->
- send_bin(Pointer),
- cast(5159, <<Format:?GLenum,Stride:?GLsizei>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color3d(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float().
+color3d(Red,Green,Blue) ->
+ cast(5135, <<Red:?GLdouble,Green:?GLdouble,Blue:?GLdouble>>).
-%% @spec (Cap::enum()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsEnabled.xml">external</a> documentation.
--spec isEnabled(enum()) -> 0|1.
-isEnabled(Cap) ->
- call(5160, <<Cap:?GLenum>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color3f(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float().
+color3f(Red,Green,Blue) ->
+ cast(5136, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat>>).
-%% @spec (List::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsList.xml">external</a> documentation.
--spec isList(integer()) -> 0|1.
-isList(List) ->
- call(5161, <<List:?GLuint>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color3i(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+color3i(Red,Green,Blue) ->
+ cast(5137, <<Red:?GLint,Green:?GLint,Blue:?GLint>>).
-%% @spec (Texture::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsTexture.xml">external</a> documentation.
--spec isTexture(integer()) -> 0|1.
-isTexture(Texture) ->
- call(5162, <<Texture:?GLuint>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color3s(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+color3s(Red,Green,Blue) ->
+ cast(5138, <<Red:?GLshort,Green:?GLshort,Blue:?GLshort>>).
-%% @spec (Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml">external</a> documentation.
--spec lightModelf(enum(),float()) -> ok.
-lightModelf(Pname,Param) ->
- cast(5163, <<Pname:?GLenum,Param:?GLfloat>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color3ub(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+color3ub(Red,Green,Blue) ->
+ cast(5139, <<Red:?GLubyte,Green:?GLubyte,Blue:?GLubyte>>).
-%% @spec (Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml">external</a> documentation.
--spec lightModelfv(enum(),{float()}) -> ok.
-lightModelfv(Pname,Params) ->
- cast(5164, <<Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color3ui(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+color3ui(Red,Green,Blue) ->
+ cast(5140, <<Red:?GLuint,Green:?GLuint,Blue:?GLuint>>).
-%% @spec (Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml">external</a> documentation.
--spec lightModeli(enum(),integer()) -> ok.
-lightModeli(Pname,Param) ->
- cast(5165, <<Pname:?GLenum,Param:?GLint>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color3us(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+color3us(Red,Green,Blue) ->
+ cast(5141, <<Red:?GLushort,Green:?GLushort,Blue:?GLushort>>).
-%% @spec (Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml">external</a> documentation.
--spec lightModeliv(enum(),{integer()}) -> ok.
-lightModeliv(Pname,Params) ->
- cast(5166, <<Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color4b(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+color4b(Red,Green,Blue,Alpha) ->
+ cast(5142, <<Red:?GLbyte,Green:?GLbyte,Blue:?GLbyte,Alpha:?GLbyte>>).
-%% @spec (Light::enum(),Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml">external</a> documentation.
--spec lightf(enum(),enum(),float()) -> ok.
-lightf(Light,Pname,Param) ->
- cast(5167, <<Light:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color4d(Red, Green, Blue, Alpha) -> ok when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
+color4d(Red,Green,Blue,Alpha) ->
+ cast(5143, <<Red:?GLdouble,Green:?GLdouble,Blue:?GLdouble,Alpha:?GLdouble>>).
-%% @spec (Light::enum(),Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml">external</a> documentation.
--spec lightfv(enum(),enum(),{float()}) -> ok.
-lightfv(Light,Pname,Params) ->
- cast(5168, <<Light:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color4f(Red, Green, Blue, Alpha) -> ok when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
+color4f(Red,Green,Blue,Alpha) ->
+ cast(5144, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat,Alpha:?GLfloat>>).
-%% @spec (Light::enum(),Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml">external</a> documentation.
--spec lighti(enum(),enum(),integer()) -> ok.
-lighti(Light,Pname,Param) ->
- cast(5169, <<Light:?GLenum,Pname:?GLenum,Param:?GLint>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color4i(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+color4i(Red,Green,Blue,Alpha) ->
+ cast(5145, <<Red:?GLint,Green:?GLint,Blue:?GLint,Alpha:?GLint>>).
-%% @spec (Light::enum(),Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml">external</a> documentation.
--spec lightiv(enum(),enum(),{integer()}) -> ok.
-lightiv(Light,Pname,Params) ->
- cast(5170, <<Light:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color4s(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+color4s(Red,Green,Blue,Alpha) ->
+ cast(5146, <<Red:?GLshort,Green:?GLshort,Blue:?GLshort,Alpha:?GLshort>>).
-%% @spec (Factor::integer(),Pattern::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLineStipple.xml">external</a> documentation.
--spec lineStipple(integer(),integer()) -> ok.
-lineStipple(Factor,Pattern) ->
- cast(5171, <<Factor:?GLint,Pattern:?GLushort>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color4ub(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+color4ub(Red,Green,Blue,Alpha) ->
+ cast(5147, <<Red:?GLubyte,Green:?GLubyte,Blue:?GLubyte,Alpha:?GLubyte>>).
-%% @spec (Width::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLineWidth.xml">external</a> documentation.
--spec lineWidth(float()) -> ok.
-lineWidth(Width) ->
- cast(5172, <<Width:?GLfloat>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color4ui(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+color4ui(Red,Green,Blue,Alpha) ->
+ cast(5148, <<Red:?GLuint,Green:?GLuint,Blue:?GLuint,Alpha:?GLuint>>).
-%% @spec (Base::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glListBase.xml">external</a> documentation.
--spec listBase(integer()) -> ok.
-listBase(Base) ->
- cast(5173, <<Base:?GLuint>>).
+%% @doc
+%% See {@link color3b/3}
+-spec color4us(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+color4us(Red,Green,Blue,Alpha) ->
+ cast(5149, <<Red:?GLushort,Green:?GLushort,Blue:?GLushort,Alpha:?GLushort>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadIdentity.xml">external</a> documentation.
--spec loadIdentity() -> ok.
-loadIdentity() ->
- cast(5174, <<>>).
+%% @equiv color3b(Red,Green,Blue)
+-spec color3bv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+color3bv({Red,Green,Blue}) -> color3b(Red,Green,Blue).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadMatrix.xml">external</a> documentation.
--spec loadMatrixd({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
-loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
- cast(5175, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
-loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
- cast(5175, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble>>).
+%% @equiv color3d(Red,Green,Blue)
+-spec color3dv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}.
+color3dv({Red,Green,Blue}) -> color3d(Red,Green,Blue).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadMatrix.xml">external</a> documentation.
--spec loadMatrixf({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
-loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
- cast(5176, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
-loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
- cast(5176, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,0:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,0:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,0:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,1:?GLfloat>>).
+%% @equiv color3f(Red,Green,Blue)
+-spec color3fv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}.
+color3fv({Red,Green,Blue}) -> color3f(Red,Green,Blue).
-%% @spec (Name::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadName.xml">external</a> documentation.
--spec loadName(integer()) -> ok.
-loadName(Name) ->
- cast(5177, <<Name:?GLuint>>).
+%% @equiv color3i(Red,Green,Blue)
+-spec color3iv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+color3iv({Red,Green,Blue}) -> color3i(Red,Green,Blue).
-%% @spec (Opcode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLogicOp.xml">external</a> documentation.
--spec logicOp(enum()) -> ok.
-logicOp(Opcode) ->
- cast(5178, <<Opcode:?GLenum>>).
+%% @equiv color3s(Red,Green,Blue)
+-spec color3sv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+color3sv({Red,Green,Blue}) -> color3s(Red,Green,Blue).
-%% @spec (Target::enum(),U1::float(),U2::float(),Stride::integer(),Order::integer(),Points::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
--spec map1d(enum(),float(),float(),integer(),integer(),binary()) -> ok.
-map1d(Target,U1,U2,Stride,Order,Points) ->
- send_bin(Points),
- cast(5179, <<Target:?GLenum,0:32,U1:?GLdouble,U2:?GLdouble,Stride:?GLint,Order:?GLint>>).
+%% @equiv color3ub(Red,Green,Blue)
+-spec color3ubv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+color3ubv({Red,Green,Blue}) -> color3ub(Red,Green,Blue).
-%% @spec (Target::enum(),U1::float(),U2::float(),Stride::integer(),Order::integer(),Points::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
--spec map1f(enum(),float(),float(),integer(),integer(),binary()) -> ok.
-map1f(Target,U1,U2,Stride,Order,Points) ->
- send_bin(Points),
- cast(5180, <<Target:?GLenum,U1:?GLfloat,U2:?GLfloat,Stride:?GLint,Order:?GLint>>).
+%% @equiv color3ui(Red,Green,Blue)
+-spec color3uiv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+color3uiv({Red,Green,Blue}) -> color3ui(Red,Green,Blue).
-%% @spec (Target::enum(),U1::float(),U2::float(),Ustride::integer(),Uorder::integer(),V1::float(),V2::float(),Vstride::integer(),Vorder::integer(),Points::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
--spec map2d(enum(),float(),float(),integer(),integer(),float(),float(),integer(),integer(),binary()) -> ok.
-map2d(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
- send_bin(Points),
- cast(5181, <<Target:?GLenum,0:32,U1:?GLdouble,U2:?GLdouble,Ustride:?GLint,Uorder:?GLint,V1:?GLdouble,V2:?GLdouble,Vstride:?GLint,Vorder:?GLint>>).
+%% @equiv color3us(Red,Green,Blue)
+-spec color3usv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+color3usv({Red,Green,Blue}) -> color3us(Red,Green,Blue).
-%% @spec (Target::enum(),U1::float(),U2::float(),Ustride::integer(),Uorder::integer(),V1::float(),V2::float(),Vstride::integer(),Vorder::integer(),Points::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
--spec map2f(enum(),float(),float(),integer(),integer(),float(),float(),integer(),integer(),binary()) -> ok.
-map2f(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
- send_bin(Points),
- cast(5182, <<Target:?GLenum,U1:?GLfloat,U2:?GLfloat,Ustride:?GLint,Uorder:?GLint,V1:?GLfloat,V2:?GLfloat,Vstride:?GLint,Vorder:?GLint>>).
+%% @equiv color4b(Red,Green,Blue,Alpha)
+-spec color4bv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+color4bv({Red,Green,Blue,Alpha}) -> color4b(Red,Green,Blue,Alpha).
-%% @spec (Un::integer(),U1::float(),U2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMapGrid.xml">external</a> documentation.
--spec mapGrid1d(integer(),float(),float()) -> ok.
-mapGrid1d(Un,U1,U2) ->
- cast(5183, <<Un:?GLint,0:32,U1:?GLdouble,U2:?GLdouble>>).
+%% @equiv color4d(Red,Green,Blue,Alpha)
+-spec color4dv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float(),Alpha :: float()}.
+color4dv({Red,Green,Blue,Alpha}) -> color4d(Red,Green,Blue,Alpha).
-%% @spec (Un::integer(),U1::float(),U2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMapGrid.xml">external</a> documentation.
--spec mapGrid1f(integer(),float(),float()) -> ok.
-mapGrid1f(Un,U1,U2) ->
- cast(5184, <<Un:?GLint,U1:?GLfloat,U2:?GLfloat>>).
+%% @equiv color4f(Red,Green,Blue,Alpha)
+-spec color4fv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float(),Alpha :: float()}.
+color4fv({Red,Green,Blue,Alpha}) -> color4f(Red,Green,Blue,Alpha).
-%% @spec (Un::integer(),U1::float(),U2::float(),Vn::integer(),V1::float(),V2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMapGrid.xml">external</a> documentation.
--spec mapGrid2d(integer(),float(),float(),integer(),float(),float()) -> ok.
-mapGrid2d(Un,U1,U2,Vn,V1,V2) ->
- cast(5185, <<Un:?GLint,0:32,U1:?GLdouble,U2:?GLdouble,Vn:?GLint,0:32,V1:?GLdouble,V2:?GLdouble>>).
+%% @equiv color4i(Red,Green,Blue,Alpha)
+-spec color4iv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+color4iv({Red,Green,Blue,Alpha}) -> color4i(Red,Green,Blue,Alpha).
-%% @spec (Un::integer(),U1::float(),U2::float(),Vn::integer(),V1::float(),V2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMapGrid.xml">external</a> documentation.
--spec mapGrid2f(integer(),float(),float(),integer(),float(),float()) -> ok.
-mapGrid2f(Un,U1,U2,Vn,V1,V2) ->
- cast(5186, <<Un:?GLint,U1:?GLfloat,U2:?GLfloat,Vn:?GLint,V1:?GLfloat,V2:?GLfloat>>).
+%% @equiv color4s(Red,Green,Blue,Alpha)
+-spec color4sv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+color4sv({Red,Green,Blue,Alpha}) -> color4s(Red,Green,Blue,Alpha).
-%% @spec (Face::enum(),Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml">external</a> documentation.
--spec materialf(enum(),enum(),float()) -> ok.
-materialf(Face,Pname,Param) ->
- cast(5187, <<Face:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
+%% @equiv color4ub(Red,Green,Blue,Alpha)
+-spec color4ubv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+color4ubv({Red,Green,Blue,Alpha}) -> color4ub(Red,Green,Blue,Alpha).
-%% @spec (Face::enum(),Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml">external</a> documentation.
--spec materialfv(enum(),enum(),{float()}) -> ok.
-materialfv(Face,Pname,Params) ->
- cast(5188, <<Face:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
+%% @equiv color4ui(Red,Green,Blue,Alpha)
+-spec color4uiv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+color4uiv({Red,Green,Blue,Alpha}) -> color4ui(Red,Green,Blue,Alpha).
-%% @spec (Face::enum(),Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml">external</a> documentation.
--spec materiali(enum(),enum(),integer()) -> ok.
-materiali(Face,Pname,Param) ->
- cast(5189, <<Face:?GLenum,Pname:?GLenum,Param:?GLint>>).
+%% @equiv color4us(Red,Green,Blue,Alpha)
+-spec color4usv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+color4usv({Red,Green,Blue,Alpha}) -> color4us(Red,Green,Blue,Alpha).
-%% @spec (Face::enum(),Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml">external</a> documentation.
--spec materialiv(enum(),enum(),{integer()}) -> ok.
-materialiv(Face,Pname,Params) ->
- cast(5190, <<Face:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
+%% @doc Set the current texture coordinates
+%%
+%% ``gl:texCoord'' specifies texture coordinates in one, two, three, or four dimensions. ``gl:texCoord1''
+%% sets the current texture coordinates to (s 0 0 1); a call to ``gl:texCoord2'' sets them to (s t
+%% 0 1).
+%% Similarly, ``gl:texCoord3'' specifies the texture coordinates as (s t r 1), and ``gl:texCoord4''
+%% defines all four components explicitly as (s t r q).
+%%
+%% The current texture coordinates are part of the data that is associated with each vertex
+%% and with the current raster position. Initially, the values for `s', `t', `r'
+%% , and `q' are (0, 0, 0, 1).
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
+-spec texCoord1d(S) -> ok when S :: float().
+texCoord1d(S) ->
+ cast(5150, <<S:?GLdouble>>).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixMode.xml">external</a> documentation.
--spec matrixMode(enum()) -> ok.
-matrixMode(Mode) ->
- cast(5191, <<Mode:?GLenum>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord1f(S) -> ok when S :: float().
+texCoord1f(S) ->
+ cast(5151, <<S:?GLfloat>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultMatrix.xml">external</a> documentation.
--spec multMatrixd({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
-multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
- cast(5192, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
-multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
- cast(5192, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord1i(S) -> ok when S :: integer().
+texCoord1i(S) ->
+ cast(5152, <<S:?GLint>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultMatrix.xml">external</a> documentation.
--spec multMatrixf({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
-multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
- cast(5193, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
-multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
- cast(5193, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,0:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,0:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,0:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,1:?GLfloat>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord1s(S) -> ok when S :: integer().
+texCoord1s(S) ->
+ cast(5153, <<S:?GLshort>>).
-%% @spec (List::integer(),Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNewList.xml">external</a> documentation.
--spec newList(integer(),enum()) -> ok.
-newList(List,Mode) ->
- cast(5194, <<List:?GLuint,Mode:?GLenum>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord2d(S, T) -> ok when S :: float(),T :: float().
+texCoord2d(S,T) ->
+ cast(5154, <<S:?GLdouble,T:?GLdouble>>).
-%% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml">external</a> documentation.
--spec normal3b(integer(),integer(),integer()) -> ok.
-normal3b(Nx,Ny,Nz) ->
- cast(5195, <<Nx:?GLbyte,Ny:?GLbyte,Nz:?GLbyte>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord2f(S, T) -> ok when S :: float(),T :: float().
+texCoord2f(S,T) ->
+ cast(5155, <<S:?GLfloat,T:?GLfloat>>).
-%% @spec ({Nx,Ny,Nz}) -> ok
-%% @equiv normal3b(Nx,Ny,Nz)
--spec normal3bv({integer(),integer(),integer()}) -> ok.
-normal3bv({Nx,Ny,Nz}) -> normal3b(Nx,Ny,Nz).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord2i(S, T) -> ok when S :: integer(),T :: integer().
+texCoord2i(S,T) ->
+ cast(5156, <<S:?GLint,T:?GLint>>).
-%% @spec (Nx::float(),Ny::float(),Nz::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml">external</a> documentation.
--spec normal3d(float(),float(),float()) -> ok.
-normal3d(Nx,Ny,Nz) ->
- cast(5196, <<Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord2s(S, T) -> ok when S :: integer(),T :: integer().
+texCoord2s(S,T) ->
+ cast(5157, <<S:?GLshort,T:?GLshort>>).
-%% @spec ({Nx,Ny,Nz}) -> ok
-%% @equiv normal3d(Nx,Ny,Nz)
--spec normal3dv({float(),float(),float()}) -> ok.
-normal3dv({Nx,Ny,Nz}) -> normal3d(Nx,Ny,Nz).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord3d(S, T, R) -> ok when S :: float(),T :: float(),R :: float().
+texCoord3d(S,T,R) ->
+ cast(5158, <<S:?GLdouble,T:?GLdouble,R:?GLdouble>>).
-%% @spec (Nx::float(),Ny::float(),Nz::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml">external</a> documentation.
--spec normal3f(float(),float(),float()) -> ok.
-normal3f(Nx,Ny,Nz) ->
- cast(5197, <<Nx:?GLfloat,Ny:?GLfloat,Nz:?GLfloat>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord3f(S, T, R) -> ok when S :: float(),T :: float(),R :: float().
+texCoord3f(S,T,R) ->
+ cast(5159, <<S:?GLfloat,T:?GLfloat,R:?GLfloat>>).
-%% @spec ({Nx,Ny,Nz}) -> ok
-%% @equiv normal3f(Nx,Ny,Nz)
--spec normal3fv({float(),float(),float()}) -> ok.
-normal3fv({Nx,Ny,Nz}) -> normal3f(Nx,Ny,Nz).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord3i(S, T, R) -> ok when S :: integer(),T :: integer(),R :: integer().
+texCoord3i(S,T,R) ->
+ cast(5160, <<S:?GLint,T:?GLint,R:?GLint>>).
-%% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml">external</a> documentation.
--spec normal3i(integer(),integer(),integer()) -> ok.
-normal3i(Nx,Ny,Nz) ->
- cast(5198, <<Nx:?GLint,Ny:?GLint,Nz:?GLint>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord3s(S, T, R) -> ok when S :: integer(),T :: integer(),R :: integer().
+texCoord3s(S,T,R) ->
+ cast(5161, <<S:?GLshort,T:?GLshort,R:?GLshort>>).
-%% @spec ({Nx,Ny,Nz}) -> ok
-%% @equiv normal3i(Nx,Ny,Nz)
--spec normal3iv({integer(),integer(),integer()}) -> ok.
-normal3iv({Nx,Ny,Nz}) -> normal3i(Nx,Ny,Nz).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord4d(S, T, R, Q) -> ok when S :: float(),T :: float(),R :: float(),Q :: float().
+texCoord4d(S,T,R,Q) ->
+ cast(5162, <<S:?GLdouble,T:?GLdouble,R:?GLdouble,Q:?GLdouble>>).
-%% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml">external</a> documentation.
--spec normal3s(integer(),integer(),integer()) -> ok.
-normal3s(Nx,Ny,Nz) ->
- cast(5199, <<Nx:?GLshort,Ny:?GLshort,Nz:?GLshort>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord4f(S, T, R, Q) -> ok when S :: float(),T :: float(),R :: float(),Q :: float().
+texCoord4f(S,T,R,Q) ->
+ cast(5163, <<S:?GLfloat,T:?GLfloat,R:?GLfloat,Q:?GLfloat>>).
-%% @spec ({Nx,Ny,Nz}) -> ok
-%% @equiv normal3s(Nx,Ny,Nz)
--spec normal3sv({integer(),integer(),integer()}) -> ok.
-normal3sv({Nx,Ny,Nz}) -> normal3s(Nx,Ny,Nz).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord4i(S, T, R, Q) -> ok when S :: integer(),T :: integer(),R :: integer(),Q :: integer().
+texCoord4i(S,T,R,Q) ->
+ cast(5164, <<S:?GLint,T:?GLint,R:?GLint,Q:?GLint>>).
-%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormalPointer.xml">external</a> documentation.
--spec normalPointer(enum(),integer(),offset()|mem()) -> ok.
-normalPointer(Type,Stride,Pointer) when is_integer(Pointer) ->
- cast(5200, <<Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
-normalPointer(Type,Stride,Pointer) ->
- send_bin(Pointer),
- cast(5201, <<Type:?GLenum,Stride:?GLsizei>>).
+%% @doc
+%% See {@link texCoord1d/1}
+-spec texCoord4s(S, T, R, Q) -> ok when S :: integer(),T :: integer(),R :: integer(),Q :: integer().
+texCoord4s(S,T,R,Q) ->
+ cast(5165, <<S:?GLshort,T:?GLshort,R:?GLshort,Q:?GLshort>>).
-%% @spec (Left::float(),Right::float(),Bottom::float(),Top::float(),ZNear::float(),ZFar::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml">external</a> documentation.
--spec ortho(float(),float(),float(),float(),float(),float()) -> ok.
-ortho(Left,Right,Bottom,Top,ZNear,ZFar) ->
- cast(5202, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble,ZNear:?GLdouble,ZFar:?GLdouble>>).
+%% @equiv texCoord1d(S)
+-spec texCoord1dv(V) -> ok when V :: {S :: float()}.
+texCoord1dv({S}) -> texCoord1d(S).
-%% @spec (Token::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPassThrough.xml">external</a> documentation.
--spec passThrough(float()) -> ok.
-passThrough(Token) ->
- cast(5203, <<Token:?GLfloat>>).
+%% @equiv texCoord1f(S)
+-spec texCoord1fv(V) -> ok when V :: {S :: float()}.
+texCoord1fv({S}) -> texCoord1f(S).
-%% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelMap.xml">external</a> documentation.
--spec pixelMapfv(enum(),integer(),binary()) -> ok.
-pixelMapfv(Map,Mapsize,Values) ->
- send_bin(Values),
- cast(5204, <<Map:?GLenum,Mapsize:?GLsizei>>).
+%% @equiv texCoord1i(S)
+-spec texCoord1iv(V) -> ok when V :: {S :: integer()}.
+texCoord1iv({S}) -> texCoord1i(S).
-%% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelMap.xml">external</a> documentation.
--spec pixelMapuiv(enum(),integer(),binary()) -> ok.
-pixelMapuiv(Map,Mapsize,Values) ->
- send_bin(Values),
- cast(5205, <<Map:?GLenum,Mapsize:?GLsizei>>).
+%% @equiv texCoord1s(S)
+-spec texCoord1sv(V) -> ok when V :: {S :: integer()}.
+texCoord1sv({S}) -> texCoord1s(S).
-%% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelMap.xml">external</a> documentation.
--spec pixelMapusv(enum(),integer(),binary()) -> ok.
-pixelMapusv(Map,Mapsize,Values) ->
- send_bin(Values),
- cast(5206, <<Map:?GLenum,Mapsize:?GLsizei>>).
+%% @equiv texCoord2d(S,T)
+-spec texCoord2dv(V) -> ok when V :: {S :: float(),T :: float()}.
+texCoord2dv({S,T}) -> texCoord2d(S,T).
-%% @spec (Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelStore.xml">external</a> documentation.
--spec pixelStoref(enum(),float()) -> ok.
-pixelStoref(Pname,Param) ->
- cast(5207, <<Pname:?GLenum,Param:?GLfloat>>).
+%% @equiv texCoord2f(S,T)
+-spec texCoord2fv(V) -> ok when V :: {S :: float(),T :: float()}.
+texCoord2fv({S,T}) -> texCoord2f(S,T).
-%% @spec (Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelStore.xml">external</a> documentation.
--spec pixelStorei(enum(),integer()) -> ok.
-pixelStorei(Pname,Param) ->
- cast(5208, <<Pname:?GLenum,Param:?GLint>>).
+%% @equiv texCoord2i(S,T)
+-spec texCoord2iv(V) -> ok when V :: {S :: integer(),T :: integer()}.
+texCoord2iv({S,T}) -> texCoord2i(S,T).
-%% @spec (Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelTransfer.xml">external</a> documentation.
--spec pixelTransferf(enum(),float()) -> ok.
-pixelTransferf(Pname,Param) ->
- cast(5209, <<Pname:?GLenum,Param:?GLfloat>>).
+%% @equiv texCoord2s(S,T)
+-spec texCoord2sv(V) -> ok when V :: {S :: integer(),T :: integer()}.
+texCoord2sv({S,T}) -> texCoord2s(S,T).
-%% @spec (Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelTransfer.xml">external</a> documentation.
--spec pixelTransferi(enum(),integer()) -> ok.
-pixelTransferi(Pname,Param) ->
- cast(5210, <<Pname:?GLenum,Param:?GLint>>).
+%% @equiv texCoord3d(S,T,R)
+-spec texCoord3dv(V) -> ok when V :: {S :: float(),T :: float(),R :: float()}.
+texCoord3dv({S,T,R}) -> texCoord3d(S,T,R).
-%% @spec (Xfactor::float(),Yfactor::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelZoom.xml">external</a> documentation.
--spec pixelZoom(float(),float()) -> ok.
-pixelZoom(Xfactor,Yfactor) ->
- cast(5211, <<Xfactor:?GLfloat,Yfactor:?GLfloat>>).
+%% @equiv texCoord3f(S,T,R)
+-spec texCoord3fv(V) -> ok when V :: {S :: float(),T :: float(),R :: float()}.
+texCoord3fv({S,T,R}) -> texCoord3f(S,T,R).
-%% @spec (Size::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointSize.xml">external</a> documentation.
--spec pointSize(float()) -> ok.
-pointSize(Size) ->
- cast(5212, <<Size:?GLfloat>>).
+%% @equiv texCoord3i(S,T,R)
+-spec texCoord3iv(V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}.
+texCoord3iv({S,T,R}) -> texCoord3i(S,T,R).
-%% @spec (Face::enum(),Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonMode.xml">external</a> documentation.
--spec polygonMode(enum(),enum()) -> ok.
-polygonMode(Face,Mode) ->
- cast(5213, <<Face:?GLenum,Mode:?GLenum>>).
+%% @equiv texCoord3s(S,T,R)
+-spec texCoord3sv(V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}.
+texCoord3sv({S,T,R}) -> texCoord3s(S,T,R).
-%% @spec (Factor::float(),Units::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml">external</a> documentation.
--spec polygonOffset(float(),float()) -> ok.
-polygonOffset(Factor,Units) ->
- cast(5214, <<Factor:?GLfloat,Units:?GLfloat>>).
+%% @equiv texCoord4d(S,T,R,Q)
+-spec texCoord4dv(V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
+texCoord4dv({S,T,R,Q}) -> texCoord4d(S,T,R,Q).
-%% @spec (Mask::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonStipple.xml">external</a> documentation.
--spec polygonStipple(binary()) -> ok.
-polygonStipple(Mask) ->
- send_bin(Mask),
- cast(5215, <<>>).
+%% @equiv texCoord4f(S,T,R,Q)
+-spec texCoord4fv(V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
+texCoord4fv({S,T,R,Q}) -> texCoord4f(S,T,R,Q).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPopAttrib.xml">external</a> documentation.
--spec popAttrib() -> ok.
-popAttrib() ->
- cast(5216, <<>>).
+%% @equiv texCoord4i(S,T,R,Q)
+-spec texCoord4iv(V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
+texCoord4iv({S,T,R,Q}) -> texCoord4i(S,T,R,Q).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPopClientAttrib.xml">external</a> documentation.
--spec popClientAttrib() -> ok.
-popClientAttrib() ->
- cast(5217, <<>>).
+%% @equiv texCoord4s(S,T,R,Q)
+-spec texCoord4sv(V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
+texCoord4sv({S,T,R,Q}) -> texCoord4s(S,T,R,Q).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPopMatrix.xml">external</a> documentation.
--spec popMatrix() -> ok.
-popMatrix() ->
- cast(5218, <<>>).
+%% @doc Specify the raster position for pixel operations
+%%
+%% The GL maintains a 3D position in window coordinates. This position, called the raster
+%% position, is used to position pixel and bitmap write operations. It is maintained with
+%% subpixel accuracy. See {@link gl:bitmap/7} , {@link gl:drawPixels/5} , and {@link gl:copyPixels/5}
+%% .
+%%
+%% The current raster position consists of three window coordinates ( x, y, z), a clip
+%% coordinate value ( w), an eye coordinate distance, a valid bit, and associated color
+%% data and texture coordinates. The w coordinate is a clip coordinate, because w is
+%% not projected to window coordinates. ``gl:rasterPos4'' specifies object coordinates x,
+%% y, z, and w explicitly. ``gl:rasterPos3'' specifies object coordinate x, y, and
+%% z explicitly, while w is implicitly set to 1. ``gl:rasterPos2'' uses the argument
+%% values for x and y while implicitly setting z and w to 0 and 1.
+%%
+%% The object coordinates presented by ``gl:rasterPos'' are treated just like those of a {@link gl:vertex2d/2}
+%% command: They are transformed by the current modelview and projection matrices and passed
+%% to the clipping stage. If the vertex is not culled, then it is projected and scaled to
+%% window coordinates, which become the new current raster position, and the `?GL_CURRENT_RASTER_POSITION_VALID'
+%% flag is set. If the vertex `is' culled, then the valid bit is cleared and the current
+%% raster position and associated color and texture coordinates are undefined.
+%%
+%% The current raster position also includes some associated color data and texture coordinates.
+%% If lighting is enabled, then `?GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `?GL_CURRENT_RASTER_INDEX'
+%% (in color index mode) is set to the color produced by the lighting calculation (see {@link gl:lightf/3}
+%% , {@link gl:lightModelf/2} , and {@link gl:shadeModel/1} ). If lighting is disabled, current
+%% color (in RGBA mode, state variable `?GL_CURRENT_COLOR') or color index (in color
+%% index mode, state variable `?GL_CURRENT_INDEX') is used to update the current raster
+%% color. `?GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
+%%
+%% Likewise, `?GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of `?GL_CURRENT_TEXTURE_COORDS'
+%% , based on the texture matrix and the texture generation functions (see {@link gl:texGend/3} ).
+%% Finally, the distance from the origin of the eye coordinate system to the vertex as transformed
+%% by only the modelview matrix replaces `?GL_CURRENT_RASTER_DISTANCE'.
+%%
+%% Initially, the current raster position is (0, 0, 0, 1), the current raster distance is
+%% 0, the valid bit is set, the associated RGBA color is (1, 1, 1, 1), the associated color
+%% index is 1, and the associated texture coordinates are (0, 0, 0, 1). In RGBA mode, `?GL_CURRENT_RASTER_INDEX'
+%% is always 1; in color index mode, the current raster RGBA color always maintains its
+%% initial value.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
+-spec rasterPos2d(X, Y) -> ok when X :: float(),Y :: float().
+rasterPos2d(X,Y) ->
+ cast(5166, <<X:?GLdouble,Y:?GLdouble>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPopName.xml">external</a> documentation.
--spec popName() -> ok.
-popName() ->
- cast(5219, <<>>).
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos2f(X, Y) -> ok when X :: float(),Y :: float().
+rasterPos2f(X,Y) ->
+ cast(5167, <<X:?GLfloat,Y:?GLfloat>>).
-%% @spec (Textures::[integer()],Priorities::[clamp()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPrioritizeTextures.xml">external</a> documentation.
--spec prioritizeTextures([integer()],[clamp()]) -> ok.
-prioritizeTextures(Textures,Priorities) ->
- cast(5220, <<(length(Textures)):?GLuint,
- (<< <<C:?GLuint>> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32),(length(Priorities)):?GLuint,
- (<< <<C:?GLclampf>> || C <- Priorities>>)/binary,0:(((1+length(Priorities)) rem 2)*32)>>).
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos2i(X, Y) -> ok when X :: integer(),Y :: integer().
+rasterPos2i(X,Y) ->
+ cast(5168, <<X:?GLint,Y:?GLint>>).
-%% @spec (Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushAttrib.xml">external</a> documentation.
--spec pushAttrib(integer()) -> ok.
-pushAttrib(Mask) ->
- cast(5221, <<Mask:?GLbitfield>>).
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos2s(X, Y) -> ok when X :: integer(),Y :: integer().
+rasterPos2s(X,Y) ->
+ cast(5169, <<X:?GLshort,Y:?GLshort>>).
-%% @spec (Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushClientAttrib.xml">external</a> documentation.
--spec pushClientAttrib(integer()) -> ok.
-pushClientAttrib(Mask) ->
- cast(5222, <<Mask:?GLbitfield>>).
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+rasterPos3d(X,Y,Z) ->
+ cast(5170, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushMatrix.xml">external</a> documentation.
--spec pushMatrix() -> ok.
-pushMatrix() ->
- cast(5223, <<>>).
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+rasterPos3f(X,Y,Z) ->
+ cast(5171, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
-%% @spec (Name::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushName.xml">external</a> documentation.
--spec pushName(integer()) -> ok.
-pushName(Name) ->
- cast(5224, <<Name:?GLuint>>).
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+rasterPos3i(X,Y,Z) ->
+ cast(5172, <<X:?GLint,Y:?GLint,Z:?GLint>>).
-%% @spec (X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos2d(float(),float()) -> ok.
-rasterPos2d(X,Y) ->
- cast(5225, <<X:?GLdouble,Y:?GLdouble>>).
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+rasterPos3s(X,Y,Z) ->
+ cast(5173, <<X:?GLshort,Y:?GLshort,Z:?GLshort>>).
+
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos4d(X, Y, Z, W) -> ok when X :: float(),Y :: float(),Z :: float(),W :: float().
+rasterPos4d(X,Y,Z,W) ->
+ cast(5174, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
+
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos4f(X, Y, Z, W) -> ok when X :: float(),Y :: float(),Z :: float(),W :: float().
+rasterPos4f(X,Y,Z,W) ->
+ cast(5175, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
+
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos4i(X, Y, Z, W) -> ok when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+rasterPos4i(X,Y,Z,W) ->
+ cast(5176, <<X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
+
+%% @doc
+%% See {@link rasterPos2d/2}
+-spec rasterPos4s(X, Y, Z, W) -> ok when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+rasterPos4s(X,Y,Z,W) ->
+ cast(5177, <<X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
-%% @spec ({X,Y}) -> ok
%% @equiv rasterPos2d(X,Y)
--spec rasterPos2dv({float(),float()}) -> ok.
+-spec rasterPos2dv(V) -> ok when V :: {X :: float(),Y :: float()}.
rasterPos2dv({X,Y}) -> rasterPos2d(X,Y).
-%% @spec (X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos2f(float(),float()) -> ok.
-rasterPos2f(X,Y) ->
- cast(5226, <<X:?GLfloat,Y:?GLfloat>>).
-
-%% @spec ({X,Y}) -> ok
%% @equiv rasterPos2f(X,Y)
--spec rasterPos2fv({float(),float()}) -> ok.
+-spec rasterPos2fv(V) -> ok when V :: {X :: float(),Y :: float()}.
rasterPos2fv({X,Y}) -> rasterPos2f(X,Y).
-%% @spec (X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos2i(integer(),integer()) -> ok.
-rasterPos2i(X,Y) ->
- cast(5227, <<X:?GLint,Y:?GLint>>).
-
-%% @spec ({X,Y}) -> ok
%% @equiv rasterPos2i(X,Y)
--spec rasterPos2iv({integer(),integer()}) -> ok.
+-spec rasterPos2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
rasterPos2iv({X,Y}) -> rasterPos2i(X,Y).
-%% @spec (X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos2s(integer(),integer()) -> ok.
-rasterPos2s(X,Y) ->
- cast(5228, <<X:?GLshort,Y:?GLshort>>).
-
-%% @spec ({X,Y}) -> ok
%% @equiv rasterPos2s(X,Y)
--spec rasterPos2sv({integer(),integer()}) -> ok.
+-spec rasterPos2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
rasterPos2sv({X,Y}) -> rasterPos2s(X,Y).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos3d(float(),float(),float()) -> ok.
-rasterPos3d(X,Y,Z) ->
- cast(5229, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-
-%% @spec ({X,Y,Z}) -> ok
%% @equiv rasterPos3d(X,Y,Z)
--spec rasterPos3dv({float(),float(),float()}) -> ok.
+-spec rasterPos3dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
rasterPos3dv({X,Y,Z}) -> rasterPos3d(X,Y,Z).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos3f(float(),float(),float()) -> ok.
-rasterPos3f(X,Y,Z) ->
- cast(5230, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
-
-%% @spec ({X,Y,Z}) -> ok
%% @equiv rasterPos3f(X,Y,Z)
--spec rasterPos3fv({float(),float(),float()}) -> ok.
+-spec rasterPos3fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
rasterPos3fv({X,Y,Z}) -> rasterPos3f(X,Y,Z).
-%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos3i(integer(),integer(),integer()) -> ok.
-rasterPos3i(X,Y,Z) ->
- cast(5231, <<X:?GLint,Y:?GLint,Z:?GLint>>).
-
-%% @spec ({X,Y,Z}) -> ok
%% @equiv rasterPos3i(X,Y,Z)
--spec rasterPos3iv({integer(),integer(),integer()}) -> ok.
+-spec rasterPos3iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
rasterPos3iv({X,Y,Z}) -> rasterPos3i(X,Y,Z).
-%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos3s(integer(),integer(),integer()) -> ok.
-rasterPos3s(X,Y,Z) ->
- cast(5232, <<X:?GLshort,Y:?GLshort,Z:?GLshort>>).
-
-%% @spec ({X,Y,Z}) -> ok
%% @equiv rasterPos3s(X,Y,Z)
--spec rasterPos3sv({integer(),integer(),integer()}) -> ok.
+-spec rasterPos3sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
rasterPos3sv({X,Y,Z}) -> rasterPos3s(X,Y,Z).
-%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos4d(float(),float(),float(),float()) -> ok.
-rasterPos4d(X,Y,Z,W) ->
- cast(5233, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
-
-%% @spec ({X,Y,Z,W}) -> ok
%% @equiv rasterPos4d(X,Y,Z,W)
--spec rasterPos4dv({float(),float(),float(),float()}) -> ok.
+-spec rasterPos4dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
rasterPos4dv({X,Y,Z,W}) -> rasterPos4d(X,Y,Z,W).
-%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos4f(float(),float(),float(),float()) -> ok.
-rasterPos4f(X,Y,Z,W) ->
- cast(5234, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
-
-%% @spec ({X,Y,Z,W}) -> ok
%% @equiv rasterPos4f(X,Y,Z,W)
--spec rasterPos4fv({float(),float(),float(),float()}) -> ok.
+-spec rasterPos4fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
rasterPos4fv({X,Y,Z,W}) -> rasterPos4f(X,Y,Z,W).
-%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos4i(integer(),integer(),integer(),integer()) -> ok.
-rasterPos4i(X,Y,Z,W) ->
- cast(5235, <<X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
-
-%% @spec ({X,Y,Z,W}) -> ok
%% @equiv rasterPos4i(X,Y,Z,W)
--spec rasterPos4iv({integer(),integer(),integer(),integer()}) -> ok.
+-spec rasterPos4iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
rasterPos4iv({X,Y,Z,W}) -> rasterPos4i(X,Y,Z,W).
-%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos4s(integer(),integer(),integer(),integer()) -> ok.
-rasterPos4s(X,Y,Z,W) ->
- cast(5236, <<X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
-
-%% @spec ({X,Y,Z,W}) -> ok
%% @equiv rasterPos4s(X,Y,Z,W)
--spec rasterPos4sv({integer(),integer(),integer(),integer()}) -> ok.
+-spec rasterPos4sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
rasterPos4sv({X,Y,Z,W}) -> rasterPos4s(X,Y,Z,W).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReadBuffer.xml">external</a> documentation.
--spec readBuffer(enum()) -> ok.
-readBuffer(Mode) ->
- cast(5237, <<Mode:?GLenum>>).
+%% @doc Draw a rectangle
+%%
+%% ``gl:rect'' supports efficient specification of rectangles as two corner points. Each
+%% rectangle command takes four arguments, organized either as two consecutive pairs of (x y)
+%% coordinates or as two pointers to arrays, each containing an (x y) pair. The resulting rectangle
+%% is defined in the z= 0 plane.
+%%
+%% ``gl:rect''( `X1' , `Y1' , `X2' , `Y2' ) is exactly equivalent to the
+%% following sequence: glBegin(`?GL_POLYGON'); glVertex2( `X1' , `Y1' ); glVertex2(
+%% `X2' , `Y1' ); glVertex2( `X2' , `Y2' ); glVertex2( `X1' , `Y2' );
+%% glEnd(); Note that if the second vertex is above and to the right of the first vertex,
+%% the rectangle is constructed with a counterclockwise winding.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
+-spec rectd(X1, Y1, X2, Y2) -> ok when X1 :: float(),Y1 :: float(),X2 :: float(),Y2 :: float().
+rectd(X1,Y1,X2,Y2) ->
+ cast(5178, <<X1:?GLdouble,Y1:?GLdouble,X2:?GLdouble,Y2:?GLdouble>>).
-%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml">external</a> documentation.
--spec readPixels(integer(),integer(),integer(),integer(),enum(),enum(),mem()) -> ok.
-readPixels(X,Y,Width,Height,Format,Type,Pixels) ->
- send_bin(Pixels),
- call(5238, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
+%% @doc
+%% See {@link rectd/4}
+-spec rectf(X1, Y1, X2, Y2) -> ok when X1 :: float(),Y1 :: float(),X2 :: float(),Y2 :: float().
+rectf(X1,Y1,X2,Y2) ->
+ cast(5179, <<X1:?GLfloat,Y1:?GLfloat,X2:?GLfloat,Y2:?GLfloat>>).
-%% @spec (X1::float(),Y1::float(),X2::float(),Y2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec rectd(float(),float(),float(),float()) -> ok.
-rectd(X1,Y1,X2,Y2) ->
- cast(5239, <<X1:?GLdouble,Y1:?GLdouble,X2:?GLdouble,Y2:?GLdouble>>).
+%% @doc
+%% See {@link rectd/4}
+-spec recti(X1, Y1, X2, Y2) -> ok when X1 :: integer(),Y1 :: integer(),X2 :: integer(),Y2 :: integer().
+recti(X1,Y1,X2,Y2) ->
+ cast(5180, <<X1:?GLint,Y1:?GLint,X2:?GLint,Y2:?GLint>>).
-%% @spec (V1::{float(),float()},V2::{float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec rectdv({float(),float()},{float(),float()}) -> ok.
-rectdv({V1,V2},{V1,V2}) ->
- cast(5240, <<V1:?GLdouble,V2:?GLdouble,V1:?GLdouble,V2:?GLdouble>>).
+%% @doc
+%% See {@link rectd/4}
+-spec rects(X1, Y1, X2, Y2) -> ok when X1 :: integer(),Y1 :: integer(),X2 :: integer(),Y2 :: integer().
+rects(X1,Y1,X2,Y2) ->
+ cast(5181, <<X1:?GLshort,Y1:?GLshort,X2:?GLshort,Y2:?GLshort>>).
-%% @spec (X1::float(),Y1::float(),X2::float(),Y2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec rectf(float(),float(),float(),float()) -> ok.
-rectf(X1,Y1,X2,Y2) ->
- cast(5241, <<X1:?GLfloat,Y1:?GLfloat,X2:?GLfloat,Y2:?GLfloat>>).
+%% @doc
+%% See {@link rectd/4}
+-spec rectdv(V1, V2) -> ok when V1 :: {float(),float()},V2 :: {float(),float()}.
+rectdv({V1,V2},{V1,V2}) ->
+ cast(5182, <<V1:?GLdouble,V2:?GLdouble,V1:?GLdouble,V2:?GLdouble>>).
-%% @spec (V1::{float(),float()},V2::{float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec rectfv({float(),float()},{float(),float()}) -> ok.
+%% @doc
+%% See {@link rectd/4}
+-spec rectfv(V1, V2) -> ok when V1 :: {float(),float()},V2 :: {float(),float()}.
rectfv({V1,V2},{V1,V2}) ->
- cast(5242, <<V1:?GLfloat,V2:?GLfloat,V1:?GLfloat,V2:?GLfloat>>).
+ cast(5183, <<V1:?GLfloat,V2:?GLfloat,V1:?GLfloat,V2:?GLfloat>>).
-%% @spec (X1::integer(),Y1::integer(),X2::integer(),Y2::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec recti(integer(),integer(),integer(),integer()) -> ok.
-recti(X1,Y1,X2,Y2) ->
- cast(5243, <<X1:?GLint,Y1:?GLint,X2:?GLint,Y2:?GLint>>).
-
-%% @spec (V1::{integer(),integer()},V2::{integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec rectiv({integer(),integer()},{integer(),integer()}) -> ok.
+%% @doc
+%% See {@link rectd/4}
+-spec rectiv(V1, V2) -> ok when V1 :: {integer(),integer()},V2 :: {integer(),integer()}.
rectiv({V1,V2},{V1,V2}) ->
- cast(5244, <<V1:?GLint,V2:?GLint,V1:?GLint,V2:?GLint>>).
+ cast(5184, <<V1:?GLint,V2:?GLint,V1:?GLint,V2:?GLint>>).
-%% @spec (X1::integer(),Y1::integer(),X2::integer(),Y2::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec rects(integer(),integer(),integer(),integer()) -> ok.
-rects(X1,Y1,X2,Y2) ->
- cast(5245, <<X1:?GLshort,Y1:?GLshort,X2:?GLshort,Y2:?GLshort>>).
-
-%% @spec (V1::{integer(),integer()},V2::{integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec rectsv({integer(),integer()},{integer(),integer()}) -> ok.
+%% @doc
+%% See {@link rectd/4}
+-spec rectsv(V1, V2) -> ok when V1 :: {integer(),integer()},V2 :: {integer(),integer()}.
rectsv({V1,V2},{V1,V2}) ->
- cast(5246, <<V1:?GLshort,V2:?GLshort,V1:?GLshort,V2:?GLshort>>).
+ cast(5185, <<V1:?GLshort,V2:?GLshort,V1:?GLshort,V2:?GLshort>>).
-%% @spec (Mode::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRenderMode.xml">external</a> documentation.
--spec renderMode(enum()) -> integer().
-renderMode(Mode) ->
- call(5247, <<Mode:?GLenum>>).
+%% @doc Define an array of vertex data
+%%
+%% ``gl:vertexPointer'' specifies the location and data format of an array of vertex coordinates
+%% to use when rendering. `Size' specifies the number of coordinates per vertex, and
+%% must be 2, 3, or 4. `Type' specifies the data type of each coordinate, and `Stride'
+%% specifies the byte stride from one vertex to the next, allowing vertices and attributes
+%% to be packed into a single array or stored in separate arrays. (Single-array storage may
+%% be more efficient on some implementations; see {@link gl:interleavedArrays/3} .)
+%%
+%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2}
+%% ) while a vertex array is specified, `Pointer' is treated as a byte offset into the
+%% buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING'
+%% ) is saved as vertex array client-side state (`?GL_VERTEX_ARRAY_BUFFER_BINDING').
+%%
+%% When a vertex array is specified, `Size' , `Type' , `Stride' , and `Pointer'
+%% are saved as client-side state, in addition to the current vertex array buffer object
+%% binding.
+%%
+%% To enable and disable the vertex array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1}
+%% with the argument `?GL_VERTEX_ARRAY'. If enabled, the vertex array is used when {@link gl:arrayElement/1}
+%% , {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements'
+%% , or {@link gl:drawRangeElements/6} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexPointer.xml">external</a> documentation.
+-spec vertexPointer(Size, Type, Stride, Ptr) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+vertexPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
+ cast(5186, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
+vertexPointer(Size,Type,Stride,Ptr) ->
+ send_bin(Ptr),
+ cast(5187, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
+
+%% @doc Define an array of normals
+%%
+%% ``gl:normalPointer'' specifies the location and data format of an array of normals to
+%% use when rendering. `Type' specifies the data type of each normal coordinate, and `Stride'
+%% specifies the byte stride from one normal to the next, allowing vertices and attributes
+%% to be packed into a single array or stored in separate arrays. (Single-array storage may
+%% be more efficient on some implementations; see {@link gl:interleavedArrays/3} .)
+%%
+%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2}
+%% ) while a normal array is specified, `Pointer' is treated as a byte offset into the
+%% buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING'
+%% ) is saved as normal vertex array client-side state (`?GL_NORMAL_ARRAY_BUFFER_BINDING'
+%% ).
+%%
+%% When a normal array is specified, `Type' , `Stride' , and `Pointer' are
+%% saved as client-side state, in addition to the current vertex array buffer object binding.
+%%
+%%
+%% To enable and disable the normal array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1}
+%% with the argument `?GL_NORMAL_ARRAY'. If enabled, the normal array is used when {@link gl:drawArrays/3}
+%% , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements', {@link gl:drawRangeElements/6}
+%% , or {@link gl:arrayElement/1} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormalPointer.xml">external</a> documentation.
+-spec normalPointer(Type, Stride, Ptr) -> ok when Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+normalPointer(Type,Stride,Ptr) when is_integer(Ptr) ->
+ cast(5188, <<Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
+normalPointer(Type,Stride,Ptr) ->
+ send_bin(Ptr),
+ cast(5189, <<Type:?GLenum,Stride:?GLsizei>>).
+
+%% @doc Define an array of colors
+%%
+%% ``gl:colorPointer'' specifies the location and data format of an array of color components
+%% to use when rendering. `Size' specifies the number of components per color, and must
+%% be 3 or 4. `Type' specifies the data type of each color component, and `Stride'
+%% specifies the byte stride from one color to the next, allowing vertices and attributes
+%% to be packed into a single array or stored in separate arrays. (Single-array storage may
+%% be more efficient on some implementations; see {@link gl:interleavedArrays/3} .)
+%%
+%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2}
+%% ) while a color array is specified, `Pointer' is treated as a byte offset into the
+%% buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING'
+%% ) is saved as color vertex array client-side state (`?GL_COLOR_ARRAY_BUFFER_BINDING').
+%%
+%%
+%% When a color array is specified, `Size' , `Type' , `Stride' , and `Pointer'
+%% are saved as client-side state, in addition to the current vertex array buffer object
+%% binding.
+%%
+%% To enable and disable the color array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1}
+%% with the argument `?GL_COLOR_ARRAY'. If enabled, the color array is used when {@link gl:drawArrays/3}
+%% , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements', {@link gl:drawRangeElements/6}
+%% , or {@link gl:arrayElement/1} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorPointer.xml">external</a> documentation.
+-spec colorPointer(Size, Type, Stride, Ptr) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+colorPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
+ cast(5190, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
+colorPointer(Size,Type,Stride,Ptr) ->
+ send_bin(Ptr),
+ cast(5191, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
+
+%% @doc Define an array of color indexes
+%%
+%% ``gl:indexPointer'' specifies the location and data format of an array of color indexes
+%% to use when rendering. `Type' specifies the data type of each color index and `Stride'
+%% specifies the byte stride from one color index to the next, allowing vertices and attributes
+%% to be packed into a single array or stored in separate arrays.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2}
+%% ) while a color index array is specified, `Pointer' is treated as a byte offset into
+%% the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING'
+%% ) is saved as color index vertex array client-side state (`?GL_INDEX_ARRAY_BUFFER_BINDING'
+%% ).
+%%
+%% When a color index array is specified, `Type' , `Stride' , and `Pointer'
+%% are saved as client-side state, in addition to the current vertex array buffer object
+%% binding.
+%%
+%% To enable and disable the color index array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1}
+%% with the argument `?GL_INDEX_ARRAY'. If enabled, the color index array is used when
+%% {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements'
+%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndexPointer.xml">external</a> documentation.
+-spec indexPointer(Type, Stride, Ptr) -> ok when Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+indexPointer(Type,Stride,Ptr) when is_integer(Ptr) ->
+ cast(5192, <<Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
+indexPointer(Type,Stride,Ptr) ->
+ send_bin(Ptr),
+ cast(5193, <<Type:?GLenum,Stride:?GLsizei>>).
+
+%% @doc Define an array of texture coordinates
+%%
+%% ``gl:texCoordPointer'' specifies the location and data format of an array of texture
+%% coordinates to use when rendering. `Size' specifies the number of coordinates per
+%% texture coordinate set, and must be 1, 2, 3, or 4. `Type' specifies the data type
+%% of each texture coordinate, and `Stride' specifies the byte stride from one texture
+%% coordinate set to the next, allowing vertices and attributes to be packed into a single
+%% array or stored in separate arrays. (Single-array storage may be more efficient on some
+%% implementations; see {@link gl:interleavedArrays/3} .)
+%%
+%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2}
+%% ) while a texture coordinate array is specified, `Pointer' is treated as a byte offset
+%% into the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING'
+%% ) is saved as texture coordinate vertex array client-side state (`?GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING'
+%% ).
+%%
+%% When a texture coordinate array is specified, `Size' , `Type' , `Stride' ,
+%% and `Pointer' are saved as client-side state, in addition to the current vertex array
+%% buffer object binding.
+%%
+%% To enable and disable a texture coordinate array, call {@link gl:enableClientState/1}
+%% and {@link gl:enableClientState/1} with the argument `?GL_TEXTURE_COORD_ARRAY'. If
+%% enabled, the texture coordinate array is used when {@link gl:arrayElement/1} , {@link gl:drawArrays/3}
+%% , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements',
+%% or {@link gl:drawRangeElements/6} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoordPointer.xml">external</a> documentation.
+-spec texCoordPointer(Size, Type, Stride, Ptr) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+texCoordPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
+ cast(5194, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
+texCoordPointer(Size,Type,Stride,Ptr) ->
+ send_bin(Ptr),
+ cast(5195, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
+
+%% @doc Define an array of edge flags
+%%
+%% ``gl:edgeFlagPointer'' specifies the location and data format of an array of boolean
+%% edge flags to use when rendering. `Stride' specifies the byte stride from one edge
+%% flag to the next, allowing vertices and attributes to be packed into a single array or
+%% stored in separate arrays.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2}
+%% ) while an edge flag array is specified, `Pointer' is treated as a byte offset into
+%% the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING'
+%% ) is saved as edge flag vertex array client-side state (`?GL_EDGE_FLAG_ARRAY_BUFFER_BINDING'
+%% ).
+%%
+%% When an edge flag array is specified, `Stride' and `Pointer' are saved as client-side
+%% state, in addition to the current vertex array buffer object binding.
+%%
+%% To enable and disable the edge flag array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1}
+%% with the argument `?GL_EDGE_FLAG_ARRAY'. If enabled, the edge flag array is used
+%% when {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements'
+%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEdgeFlagPointer.xml">external</a> documentation.
+-spec edgeFlagPointer(Stride, Ptr) -> ok when Stride :: integer(),Ptr :: offset()|mem().
+edgeFlagPointer(Stride,Ptr) when is_integer(Ptr) ->
+ cast(5196, <<Stride:?GLsizei,Ptr:?GLuint>>);
+edgeFlagPointer(Stride,Ptr) ->
+ send_bin(Ptr),
+ cast(5197, <<Stride:?GLsizei>>).
+
+%% @doc Render a vertex using the specified vertex array element
+%%
+%% ``gl:arrayElement'' commands are used within {@link gl:'begin'/1} / {@link gl:'begin'/1} pairs
+%% to specify vertex and attribute data for point, line, and polygon primitives. If `?GL_VERTEX_ARRAY'
+%% is enabled when ``gl:arrayElement'' is called, a single vertex is drawn, using vertex
+%% and attribute data taken from location `I' of the enabled arrays. If `?GL_VERTEX_ARRAY'
+%% is not enabled, no drawing occurs but the attributes corresponding to the enabled arrays
+%% are modified.
+%%
+%% Use ``gl:arrayElement'' to construct primitives by indexing vertex data, rather than
+%% by streaming through arrays of data in first-to-last order. Because each call specifies
+%% only a single vertex, it is possible to explicitly specify per-primitive attributes such
+%% as a single normal for each triangle.
+%%
+%% Changes made to array data between the execution of {@link gl:'begin'/1} and the corresponding
+%% execution of {@link gl:'begin'/1} may affect calls to ``gl:arrayElement'' that are made within
+%% the same {@link gl:'begin'/1} / {@link gl:'begin'/1} period in nonsequential ways. That is, a call
+%% to ``gl:arrayElement'' that precedes a change to array data may access the changed data,
+%% and a call that follows a change to array data may access original data.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glArrayElement.xml">external</a> documentation.
+-spec arrayElement(I) -> ok when I :: integer().
+arrayElement(I) ->
+ cast(5198, <<I:?GLint>>).
-%% @spec (Angle::float(),X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml">external</a> documentation.
--spec rotated(float(),float(),float(),float()) -> ok.
-rotated(Angle,X,Y,Z) ->
- cast(5248, <<Angle:?GLdouble,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
+%% @doc Render primitives from array data
+%%
+%% ``gl:drawArrays'' specifies multiple geometric primitives with very few subroutine calls.
+%% Instead of calling a GL procedure to pass each individual vertex, normal, texture coordinate,
+%% edge flag, or color, you can prespecify separate arrays of vertices, normals, and colors
+%% and use them to construct a sequence of primitives with a single call to ``gl:drawArrays''
+%% .
+%%
+%% When ``gl:drawArrays'' is called, it uses `Count' sequential elements from each
+%% enabled array to construct a sequence of geometric primitives, beginning with element `First'
+%% . `Mode' specifies what kind of primitives are constructed and how the array elements
+%% construct those primitives.
+%%
+%% Vertex attributes that are modified by ``gl:drawArrays'' have an unspecified value
+%% after ``gl:drawArrays'' returns. Attributes that aren't modified remain well defined.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArrays.xml">external</a> documentation.
+-spec drawArrays(Mode, First, Count) -> ok when Mode :: enum(),First :: integer(),Count :: integer().
+drawArrays(Mode,First,Count) ->
+ cast(5199, <<Mode:?GLenum,First:?GLint,Count:?GLsizei>>).
-%% @spec (Angle::float(),X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml">external</a> documentation.
--spec rotatef(float(),float(),float(),float()) -> ok.
-rotatef(Angle,X,Y,Z) ->
- cast(5249, <<Angle:?GLfloat,X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
+%% @doc Render primitives from array data
+%%
+%% ``gl:drawElements'' specifies multiple geometric primitives with very few subroutine
+%% calls. Instead of calling a GL function to pass each individual vertex, normal, texture
+%% coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals,
+%% and so on, and use them to construct a sequence of primitives with a single call to ``gl:drawElements''
+%% .
+%%
+%% When ``gl:drawElements'' is called, it uses `Count' sequential elements from an
+%% enabled array, starting at `Indices' to construct a sequence of geometric primitives.
+%% `Mode' specifies what kind of primitives are constructed and how the array elements
+%% construct these primitives. If more than one array is enabled, each is used.
+%%
+%% Vertex attributes that are modified by ``gl:drawElements'' have an unspecified value
+%% after ``gl:drawElements'' returns. Attributes that aren't modified maintain their previous
+%% values.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElements.xml">external</a> documentation.
+-spec drawElements(Mode, Count, Type, Indices) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem().
+drawElements(Mode,Count,Type,Indices) when is_integer(Indices) ->
+ cast(5200, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint>>);
+drawElements(Mode,Count,Type,Indices) ->
+ send_bin(Indices),
+ cast(5201, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum>>).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScale.xml">external</a> documentation.
--spec scaled(float(),float(),float()) -> ok.
-scaled(X,Y,Z) ->
- cast(5250, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
+%% @doc Simultaneously specify and enable several interleaved arrays
+%%
+%% ``gl:interleavedArrays'' lets you specify and enable individual color, normal, texture
+%% and vertex arrays whose elements are part of a larger aggregate array element. For some
+%% implementations, this is more efficient than specifying the arrays separately.
+%%
+%% If `Stride' is 0, the aggregate elements are stored consecutively. Otherwise, `Stride'
+%% bytes occur between the beginning of one aggregate array element and the beginning of
+%% the next aggregate array element.
+%%
+%% `Format' serves as a ``key'' describing the extraction of individual arrays from
+%% the aggregate array. If `Format' contains a T, then texture coordinates are extracted
+%% from the interleaved array. If C is present, color values are extracted. If N is present,
+%% normal coordinates are extracted. Vertex coordinates are always extracted.
+%%
+%% The digits 2, 3, and 4 denote how many values are extracted. F indicates that values
+%% are extracted as floating-point values. Colors may also be extracted as 4 unsigned bytes
+%% if 4UB follows the C. If a color is extracted as 4 unsigned bytes, the vertex array element
+%% which follows is located at the first possible floating-point aligned address.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glInterleavedArrays.xml">external</a> documentation.
+-spec interleavedArrays(Format, Stride, Pointer) -> ok when Format :: enum(),Stride :: integer(),Pointer :: offset()|mem().
+interleavedArrays(Format,Stride,Pointer) when is_integer(Pointer) ->
+ cast(5202, <<Format:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
+interleavedArrays(Format,Stride,Pointer) ->
+ send_bin(Pointer),
+ cast(5203, <<Format:?GLenum,Stride:?GLsizei>>).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScale.xml">external</a> documentation.
--spec scalef(float(),float(),float()) -> ok.
-scalef(X,Y,Z) ->
- cast(5251, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
+%% @doc Select flat or smooth shading
+%%
+%% GL primitives can have either flat or smooth shading. Smooth shading, the default, causes
+%% the computed colors of vertices to be interpolated as the primitive is rasterized, typically
+%% assigning different colors to each resulting pixel fragment. Flat shading selects the
+%% computed color of just one vertex and assigns it to all the pixel fragments generated
+%% by rasterizing a single primitive. In either case, the computed color of a vertex is the
+%% result of lighting if lighting is enabled, or it is the current color at the time the
+%% vertex was specified if lighting is disabled.
+%%
+%% Flat and smooth shading are indistinguishable for points. Starting when {@link gl:'begin'/1}
+%% is issued and counting vertices and primitives from 1, the GL gives each flat-shaded line
+%% segment i the computed color of vertex i+1, its second vertex. Counting similarly
+%% from 1, the GL gives each flat-shaded polygon the computed color of the vertex listed
+%% in the following table. This is the last vertex to specify the polygon in all cases except
+%% single polygons, where the first vertex specifies the flat-shaded color.
+%%
+%% <table><tbody><tr><td>` Primitive Type of Polygon ' i</td><td>` Vertex '</td></tr>
+%% </tbody><tbody><tr><td> Single polygon ( i== 1) </td><td> 1 </td></tr><tr><td> Triangle
+%% strip </td><td> i+2</td></tr><tr><td> Triangle fan </td><td> i+2</td></tr><tr><td> Independent
+%% triangle </td><td> 3 i</td></tr><tr><td> Quad strip </td><td> 2 i+2</td></tr><tr><td>
+%% Independent quad </td><td> 4 i</td></tr></tbody></table>
+%%
+%% Flat and smooth shading are specified by ``gl:shadeModel'' with `Mode' set to `?GL_FLAT'
+%% and `?GL_SMOOTH', respectively.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShadeModel.xml">external</a> documentation.
+-spec shadeModel(Mode) -> ok when Mode :: enum().
+shadeModel(Mode) ->
+ cast(5204, <<Mode:?GLenum>>).
-%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissor.xml">external</a> documentation.
--spec scissor(integer(),integer(),integer(),integer()) -> ok.
-scissor(X,Y,Width,Height) ->
- cast(5252, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
+%% @doc Set light source parameters
+%%
+%% ``gl:light'' sets the values of individual light source parameters. `Light' names
+%% the light and is a symbolic name of the form `?GL_LIGHT' i, where i ranges from 0
+%% to the value of `?GL_MAX_LIGHTS' - 1. `Pname' specifies one of ten light source
+%% parameters, again by symbolic name. `Params' is either a single value or a pointer
+%% to an array that contains the new values.
+%%
+%% To enable and disable lighting calculation, call {@link gl:enable/1} and {@link gl:enable/1}
+%% with argument `?GL_LIGHTING'. Lighting is initially disabled. When it is enabled,
+%% light sources that are enabled contribute to the lighting calculation. Light source i
+%% is enabled and disabled using {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_LIGHT'
+%% i.
+%%
+%% The ten light parameters are as follows:
+%%
+%% `?GL_AMBIENT': `Params' contains four integer or floating-point values that
+%% specify the ambient RGBA intensity of the light. Integer values are mapped linearly such
+%% that the most positive representable value maps to 1.0, and the most negative representable
+%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point
+%% values are clamped. The initial ambient light intensity is (0, 0, 0, 1).
+%%
+%% `?GL_DIFFUSE': `Params' contains four integer or floating-point values that
+%% specify the diffuse RGBA intensity of the light. Integer values are mapped linearly such
+%% that the most positive representable value maps to 1.0, and the most negative representable
+%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point
+%% values are clamped. The initial value for `?GL_LIGHT0' is (1, 1, 1, 1); for other
+%% lights, the initial value is (0, 0, 0, 1).
+%%
+%% `?GL_SPECULAR': `Params' contains four integer or floating-point values that
+%% specify the specular RGBA intensity of the light. Integer values are mapped linearly such
+%% that the most positive representable value maps to 1.0, and the most negative representable
+%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point
+%% values are clamped. The initial value for `?GL_LIGHT0' is (1, 1, 1, 1); for other
+%% lights, the initial value is (0, 0, 0, 1).
+%%
+%% `?GL_POSITION': `Params' contains four integer or floating-point values that
+%% specify the position of the light in homogeneous object coordinates. Both integer and
+%% floating-point values are mapped directly. Neither integer nor floating-point values are
+%% clamped.
+%%
+%% The position is transformed by the modelview matrix when ``gl:light'' is called (just
+%% as if it were a point), and it is stored in eye coordinates. If the w component of the
+%% position is 0, the light is treated as a directional source. Diffuse and specular lighting
+%% calculations take the light's direction, but not its actual position, into account, and
+%% attenuation is disabled. Otherwise, diffuse and specular lighting calculations are based
+%% on the actual location of the light in eye coordinates, and attenuation is enabled. The
+%% initial position is (0, 0, 1, 0); thus, the initial light source is directional, parallel
+%% to, and in the direction of the -z axis.
+%%
+%% `?GL_SPOT_DIRECTION': `Params' contains three integer or floating-point values
+%% that specify the direction of the light in homogeneous object coordinates. Both integer
+%% and floating-point values are mapped directly. Neither integer nor floating-point values
+%% are clamped.
+%%
+%% The spot direction is transformed by the upper 3x3 of the modelview matrix when ``gl:light''
+%% is called, and it is stored in eye coordinates. It is significant only when `?GL_SPOT_CUTOFF'
+%% is not 180, which it is initially. The initial direction is (0 0 -1).
+%%
+%% `?GL_SPOT_EXPONENT': `Params' is a single integer or floating-point value that
+%% specifies the intensity distribution of the light. Integer and floating-point values are
+%% mapped directly. Only values in the range [0 128] are accepted.
+%%
+%% Effective light intensity is attenuated by the cosine of the angle between the direction
+%% of the light and the direction from the light to the vertex being lighted, raised to the
+%% power of the spot exponent. Thus, higher spot exponents result in a more focused light
+%% source, regardless of the spot cutoff angle (see `?GL_SPOT_CUTOFF', next paragraph).
+%% The initial spot exponent is 0, resulting in uniform light distribution.
+%%
+%% `?GL_SPOT_CUTOFF': `Params' is a single integer or floating-point value that
+%% specifies the maximum spread angle of a light source. Integer and floating-point values
+%% are mapped directly. Only values in the range [0 90] and the special value 180 are accepted.
+%% If the angle between the direction of the light and the direction from the light to the
+%% vertex being lighted is greater than the spot cutoff angle, the light is completely masked.
+%% Otherwise, its intensity is controlled by the spot exponent and the attenuation factors.
+%% The initial spot cutoff is 180, resulting in uniform light distribution.
+%%
+%% `?GL_CONSTANT_ATTENUATION'
+%%
+%% `?GL_LINEAR_ATTENUATION'
+%%
+%% `?GL_QUADRATIC_ATTENUATION': `Params' is a single integer or floating-point
+%% value that specifies one of the three light attenuation factors. Integer and floating-point
+%% values are mapped directly. Only nonnegative values are accepted. If the light is positional,
+%% rather than directional, its intensity is attenuated by the reciprocal of the sum of the
+%% constant factor, the linear factor times the distance between the light and the vertex
+%% being lighted, and the quadratic factor times the square of the same distance. The initial
+%% attenuation factors are (1, 0, 0), resulting in no attenuation.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml">external</a> documentation.
+-spec lightf(Light, Pname, Param) -> ok when Light :: enum(),Pname :: enum(),Param :: float().
+lightf(Light,Pname,Param) ->
+ cast(5205, <<Light:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
-%% @spec (Size::integer(),Buffer::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSelectBuffer.xml">external</a> documentation.
--spec selectBuffer(integer(),mem()) -> ok.
-selectBuffer(Size,Buffer) ->
- send_bin(Buffer),
- call(5253, <<Size:?GLsizei>>).
+%% @doc
+%% See {@link lightf/3}
+-spec lighti(Light, Pname, Param) -> ok when Light :: enum(),Pname :: enum(),Param :: integer().
+lighti(Light,Pname,Param) ->
+ cast(5206, <<Light:?GLenum,Pname:?GLenum,Param:?GLint>>).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShadeModel.xml">external</a> documentation.
--spec shadeModel(enum()) -> ok.
-shadeModel(Mode) ->
- cast(5254, <<Mode:?GLenum>>).
+%% @doc
+%% See {@link lightf/3}
+-spec lightfv(Light, Pname, Params) -> ok when Light :: enum(),Pname :: enum(),Params :: {float()}.
+lightfv(Light,Pname,Params) ->
+ cast(5207, <<Light:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Func::enum(),Ref::integer(),Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml">external</a> documentation.
--spec stencilFunc(enum(),integer(),integer()) -> ok.
-stencilFunc(Func,Ref,Mask) ->
- cast(5255, <<Func:?GLenum,Ref:?GLint,Mask:?GLuint>>).
+%% @doc
+%% See {@link lightf/3}
+-spec lightiv(Light, Pname, Params) -> ok when Light :: enum(),Pname :: enum(),Params :: {integer()}.
+lightiv(Light,Pname,Params) ->
+ cast(5208, <<Light:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilMask.xml">external</a> documentation.
--spec stencilMask(integer()) -> ok.
-stencilMask(Mask) ->
- cast(5256, <<Mask:?GLuint>>).
+%% @doc Return light source parameter values
+%%
+%% ``gl:getLight'' returns in `Params' the value or values of a light source parameter.
+%% `Light' names the light and is a symbolic name of the form `?GL_LIGHT' i where
+%% i ranges from 0 to the value of `?GL_MAX_LIGHTS' - 1. `?GL_MAX_LIGHTS' is an
+%% implementation dependent constant that is greater than or equal to eight. `Pname'
+%% specifies one of ten light source parameters, again by symbolic name.
+%%
+%% The following parameters are defined:
+%%
+%% `?GL_AMBIENT': `Params' returns four integer or floating-point values representing
+%% the ambient intensity of the light source. Integer values, when requested, are linearly
+%% mapped from the internal floating-point representation such that 1.0 maps to the most
+%% positive representable integer value, and -1.0 maps to the most negative representable
+%% integer value. If the internal value is outside the range [-1 1], the corresponding integer
+%% return value is undefined. The initial value is (0, 0, 0, 1).
+%%
+%% `?GL_DIFFUSE': `Params' returns four integer or floating-point values representing
+%% the diffuse intensity of the light source. Integer values, when requested, are linearly
+%% mapped from the internal floating-point representation such that 1.0 maps to the most
+%% positive representable integer value, and -1.0 maps to the most negative representable
+%% integer value. If the internal value is outside the range [-1 1], the corresponding integer
+%% return value is undefined. The initial value for `?GL_LIGHT0' is (1, 1, 1, 1); for
+%% other lights, the initial value is (0, 0, 0, 0).
+%%
+%% `?GL_SPECULAR': `Params' returns four integer or floating-point values representing
+%% the specular intensity of the light source. Integer values, when requested, are linearly
+%% mapped from the internal floating-point representation such that 1.0 maps to the most
+%% positive representable integer value, and -1.0 maps to the most negative representable
+%% integer value. If the internal value is outside the range [-1 1], the corresponding integer
+%% return value is undefined. The initial value for `?GL_LIGHT0' is (1, 1, 1, 1); for
+%% other lights, the initial value is (0, 0, 0, 0).
+%%
+%% `?GL_POSITION': `Params' returns four integer or floating-point values representing
+%% the position of the light source. Integer values, when requested, are computed by rounding
+%% the internal floating-point values to the nearest integer value. The returned values are
+%% those maintained in eye coordinates. They will not be equal to the values specified using
+%% {@link gl:lightf/3} , unless the modelview matrix was identity at the time {@link gl:lightf/3}
+%% was called. The initial value is (0, 0, 1, 0).
+%%
+%% `?GL_SPOT_DIRECTION': `Params' returns three integer or floating-point values
+%% representing the direction of the light source. Integer values, when requested, are computed
+%% by rounding the internal floating-point values to the nearest integer value. The returned
+%% values are those maintained in eye coordinates. They will not be equal to the values specified
+%% using {@link gl:lightf/3} , unless the modelview matrix was identity at the time {@link gl:lightf/3}
+%% was called. Although spot direction is normalized before being used in the lighting equation,
+%% the returned values are the transformed versions of the specified values prior to normalization.
+%% The initial value is (0 0 -1).
+%%
+%% `?GL_SPOT_EXPONENT': `Params' returns a single integer or floating-point value
+%% representing the spot exponent of the light. An integer value, when requested, is computed
+%% by rounding the internal floating-point representation to the nearest integer. The initial
+%% value is 0.
+%%
+%% `?GL_SPOT_CUTOFF': `Params' returns a single integer or floating-point value
+%% representing the spot cutoff angle of the light. An integer value, when requested, is
+%% computed by rounding the internal floating-point representation to the nearest integer.
+%% The initial value is 180.
+%%
+%% `?GL_CONSTANT_ATTENUATION': `Params' returns a single integer or floating-point
+%% value representing the constant (not distance-related) attenuation of the light. An integer
+%% value, when requested, is computed by rounding the internal floating-point representation
+%% to the nearest integer. The initial value is 1.
+%%
+%% `?GL_LINEAR_ATTENUATION': `Params' returns a single integer or floating-point
+%% value representing the linear attenuation of the light. An integer value, when requested,
+%% is computed by rounding the internal floating-point representation to the nearest integer.
+%% The initial value is 0.
+%%
+%% `?GL_QUADRATIC_ATTENUATION': `Params' returns a single integer or floating-point
+%% value representing the quadratic attenuation of the light. An integer value, when requested,
+%% is computed by rounding the internal floating-point representation to the nearest integer.
+%% The initial value is 0.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetLight.xml">external</a> documentation.
+-spec getLightfv(Light, Pname) -> {float(),float(),float(),float()} when Light :: enum(),Pname :: enum().
+getLightfv(Light,Pname) ->
+ call(5209, <<Light:?GLenum,Pname:?GLenum>>).
-%% @spec (Fail::enum(),Zfail::enum(),Zpass::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml">external</a> documentation.
--spec stencilOp(enum(),enum(),enum()) -> ok.
-stencilOp(Fail,Zfail,Zpass) ->
- cast(5257, <<Fail:?GLenum,Zfail:?GLenum,Zpass:?GLenum>>).
+%% @doc
+%% See {@link getLightfv/2}
+-spec getLightiv(Light, Pname) -> {integer(),integer(),integer(),integer()} when Light :: enum(),Pname :: enum().
+getLightiv(Light,Pname) ->
+ call(5210, <<Light:?GLenum,Pname:?GLenum>>).
-%% @spec (S::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord1d(float()) -> ok.
-texCoord1d(S) ->
- cast(5258, <<S:?GLdouble>>).
+%% @doc Set the lighting model parameters
+%%
+%% ``gl:lightModel'' sets the lighting model parameter. `Pname' names a parameter
+%% and `Params' gives the new value. There are three lighting model parameters:
+%%
+%% `?GL_LIGHT_MODEL_AMBIENT': `Params' contains four integer or floating-point
+%% values that specify the ambient RGBA intensity of the entire scene. Integer values are
+%% mapped linearly such that the most positive representable value maps to 1.0, and the most
+%% negative representable value maps to -1.0. Floating-point values are mapped directly.
+%% Neither integer nor floating-point values are clamped. The initial ambient scene intensity
+%% is (0.2, 0.2, 0.2, 1.0).
+%%
+%% `?GL_LIGHT_MODEL_COLOR_CONTROL': `Params' must be either `?GL_SEPARATE_SPECULAR_COLOR'
+%% or `?GL_SINGLE_COLOR'. `?GL_SINGLE_COLOR' specifies that a single color is
+%% generated from the lighting computation for a vertex. `?GL_SEPARATE_SPECULAR_COLOR'
+%% specifies that the specular color computation of lighting be stored separately from the
+%% remainder of the lighting computation. The specular color is summed into the generated
+%% fragment's color after the application of texture mapping (if enabled). The initial value
+%% is `?GL_SINGLE_COLOR'.
+%%
+%% `?GL_LIGHT_MODEL_LOCAL_VIEWER': `Params' is a single integer or floating-point
+%% value that specifies how specular reflection angles are computed. If `Params' is
+%% 0 (or 0.0), specular reflection angles take the view direction to be parallel to and in
+%% the direction of the -`z' axis, regardless of the location of the vertex in eye coordinates.
+%% Otherwise, specular reflections are computed from the origin of the eye coordinate system.
+%% The initial value is 0.
+%%
+%% `?GL_LIGHT_MODEL_TWO_SIDE': `Params' is a single integer or floating-point value
+%% that specifies whether one- or two-sided lighting calculations are done for polygons.
+%% It has no effect on the lighting calculations for points, lines, or bitmaps. If `Params'
+%% is 0 (or 0.0), one-sided lighting is specified, and only the `front' material parameters
+%% are used in the lighting equation. Otherwise, two-sided lighting is specified. In this
+%% case, vertices of back-facing polygons are lighted using the `back' material parameters
+%% and have their normals reversed before the lighting equation is evaluated. Vertices of
+%% front-facing polygons are always lighted using the `front' material parameters, with
+%% no change to their normals. The initial value is 0.
+%%
+%% In RGBA mode, the lighted color of a vertex is the sum of the material emission intensity,
+%% the product of the material ambient reflectance and the lighting model full-scene ambient
+%% intensity, and the contribution of each enabled light source. Each light source contributes
+%% the sum of three terms: ambient, diffuse, and specular. The ambient light source contribution
+%% is the product of the material ambient reflectance and the light's ambient intensity.
+%% The diffuse light source contribution is the product of the material diffuse reflectance,
+%% the light's diffuse intensity, and the dot product of the vertex's normal with the normalized
+%% vector from the vertex to the light source. The specular light source contribution is
+%% the product of the material specular reflectance, the light's specular intensity, and
+%% the dot product of the normalized vertex-to-eye and vertex-to-light vectors, raised to
+%% the power of the shininess of the material. All three light source contributions are attenuated
+%% equally based on the distance from the vertex to the light source and on light source
+%% direction, spread exponent, and spread cutoff angle. All dot products are replaced with
+%% 0 if they evaluate to a negative value.
+%%
+%% The alpha component of the resulting lighted color is set to the alpha value of the material
+%% diffuse reflectance.
+%%
+%% In color index mode, the value of the lighted index of a vertex ranges from the ambient
+%% to the specular values passed to {@link gl:materialf/3} using `?GL_COLOR_INDEXES'.
+%% Diffuse and specular coefficients, computed with a (.30, .59, .11) weighting of the lights'
+%% colors, the shininess of the material, and the same reflection and attenuation equations
+%% as in the RGBA case, determine how much above ambient the resulting index is.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml">external</a> documentation.
+-spec lightModelf(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+lightModelf(Pname,Param) ->
+ cast(5211, <<Pname:?GLenum,Param:?GLfloat>>).
-%% @spec ({S}) -> ok
-%% @equiv texCoord1d(S)
--spec texCoord1dv({float()}) -> ok.
-texCoord1dv({S}) -> texCoord1d(S).
+%% @doc
+%% See {@link lightModelf/2}
+-spec lightModeli(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+lightModeli(Pname,Param) ->
+ cast(5212, <<Pname:?GLenum,Param:?GLint>>).
-%% @spec (S::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord1f(float()) -> ok.
-texCoord1f(S) ->
- cast(5259, <<S:?GLfloat>>).
+%% @doc
+%% See {@link lightModelf/2}
+-spec lightModelfv(Pname, Params) -> ok when Pname :: enum(),Params :: {float()}.
+lightModelfv(Pname,Params) ->
+ cast(5213, <<Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
-%% @spec ({S}) -> ok
-%% @equiv texCoord1f(S)
--spec texCoord1fv({float()}) -> ok.
-texCoord1fv({S}) -> texCoord1f(S).
+%% @doc
+%% See {@link lightModelf/2}
+-spec lightModeliv(Pname, Params) -> ok when Pname :: enum(),Params :: {integer()}.
+lightModeliv(Pname,Params) ->
+ cast(5214, <<Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
-%% @spec (S::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord1i(integer()) -> ok.
-texCoord1i(S) ->
- cast(5260, <<S:?GLint>>).
+%% @doc Specify material parameters for the lighting model
+%%
+%% ``gl:material'' assigns values to material parameters. There are two matched sets of
+%% material parameters. One, the `front-facing' set, is used to shade points, lines,
+%% bitmaps, and all polygons (when two-sided lighting is disabled), or just front-facing
+%% polygons (when two-sided lighting is enabled). The other set, `back-facing', is used
+%% to shade back-facing polygons only when two-sided lighting is enabled. Refer to the {@link gl:lightModelf/2}
+%% reference page for details concerning one- and two-sided lighting calculations.
+%%
+%% ``gl:material'' takes three arguments. The first, `Face' , specifies whether the `?GL_FRONT'
+%% materials, the `?GL_BACK' materials, or both `?GL_FRONT_AND_BACK' materials
+%% will be modified. The second, `Pname' , specifies which of several parameters in one
+%% or both sets will be modified. The third, `Params' , specifies what value or values
+%% will be assigned to the specified parameter.
+%%
+%% Material parameters are used in the lighting equation that is optionally applied to each
+%% vertex. The equation is discussed in the {@link gl:lightModelf/2} reference page. The parameters
+%% that can be specified using ``gl:material'', and their interpretations by the lighting
+%% equation, are as follows:
+%%
+%% `?GL_AMBIENT': `Params' contains four integer or floating-point values that
+%% specify the ambient RGBA reflectance of the material. Integer values are mapped linearly
+%% such that the most positive representable value maps to 1.0, and the most negative representable
+%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point
+%% values are clamped. The initial ambient reflectance for both front- and back-facing materials
+%% is (0.2, 0.2, 0.2, 1.0).
+%%
+%% `?GL_DIFFUSE': `Params' contains four integer or floating-point values that
+%% specify the diffuse RGBA reflectance of the material. Integer values are mapped linearly
+%% such that the most positive representable value maps to 1.0, and the most negative representable
+%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point
+%% values are clamped. The initial diffuse reflectance for both front- and back-facing materials
+%% is (0.8, 0.8, 0.8, 1.0).
+%%
+%% `?GL_SPECULAR': `Params' contains four integer or floating-point values that
+%% specify the specular RGBA reflectance of the material. Integer values are mapped linearly
+%% such that the most positive representable value maps to 1.0, and the most negative representable
+%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point
+%% values are clamped. The initial specular reflectance for both front- and back-facing materials
+%% is (0, 0, 0, 1).
+%%
+%% `?GL_EMISSION': `Params' contains four integer or floating-point values that
+%% specify the RGBA emitted light intensity of the material. Integer values are mapped linearly
+%% such that the most positive representable value maps to 1.0, and the most negative representable
+%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point
+%% values are clamped. The initial emission intensity for both front- and back-facing materials
+%% is (0, 0, 0, 1).
+%%
+%% `?GL_SHININESS': `Params' is a single integer or floating-point value that specifies
+%% the RGBA specular exponent of the material. Integer and floating-point values are mapped
+%% directly. Only values in the range [0 128] are accepted. The initial specular exponent for both
+%% front- and back-facing materials is 0.
+%%
+%% `?GL_AMBIENT_AND_DIFFUSE': Equivalent to calling ``gl:material'' twice with the
+%% same parameter values, once with `?GL_AMBIENT' and once with `?GL_DIFFUSE'.
+%%
+%% `?GL_COLOR_INDEXES': `Params' contains three integer or floating-point values
+%% specifying the color indices for ambient, diffuse, and specular lighting. These three
+%% values, and `?GL_SHININESS', are the only material values used by the color index
+%% mode lighting equation. Refer to the {@link gl:lightModelf/2} reference page for a discussion
+%% of color index lighting.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml">external</a> documentation.
+-spec materialf(Face, Pname, Param) -> ok when Face :: enum(),Pname :: enum(),Param :: float().
+materialf(Face,Pname,Param) ->
+ cast(5215, <<Face:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
-%% @spec ({S}) -> ok
-%% @equiv texCoord1i(S)
--spec texCoord1iv({integer()}) -> ok.
-texCoord1iv({S}) -> texCoord1i(S).
+%% @doc
+%% See {@link materialf/3}
+-spec materiali(Face, Pname, Param) -> ok when Face :: enum(),Pname :: enum(),Param :: integer().
+materiali(Face,Pname,Param) ->
+ cast(5216, <<Face:?GLenum,Pname:?GLenum,Param:?GLint>>).
-%% @spec (S::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord1s(integer()) -> ok.
-texCoord1s(S) ->
- cast(5261, <<S:?GLshort>>).
+%% @doc
+%% See {@link materialf/3}
+-spec materialfv(Face, Pname, Params) -> ok when Face :: enum(),Pname :: enum(),Params :: {float()}.
+materialfv(Face,Pname,Params) ->
+ cast(5217, <<Face:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec ({S}) -> ok
-%% @equiv texCoord1s(S)
--spec texCoord1sv({integer()}) -> ok.
-texCoord1sv({S}) -> texCoord1s(S).
+%% @doc
+%% See {@link materialf/3}
+-spec materialiv(Face, Pname, Params) -> ok when Face :: enum(),Pname :: enum(),Params :: {integer()}.
+materialiv(Face,Pname,Params) ->
+ cast(5218, <<Face:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (S::float(),T::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord2d(float(),float()) -> ok.
-texCoord2d(S,T) ->
- cast(5262, <<S:?GLdouble,T:?GLdouble>>).
+%% @doc Return material parameters
+%%
+%% ``gl:getMaterial'' returns in `Params' the value or values of parameter `Pname'
+%% of material `Face' . Six parameters are defined:
+%%
+%% `?GL_AMBIENT': `Params' returns four integer or floating-point values representing
+%% the ambient reflectance of the material. Integer values, when requested, are linearly
+%% mapped from the internal floating-point representation such that 1.0 maps to the most
+%% positive representable integer value, and -1.0 maps to the most negative representable
+%% integer value. If the internal value is outside the range [-1 1], the corresponding integer
+%% return value is undefined. The initial value is (0.2, 0.2, 0.2, 1.0)
+%%
+%% `?GL_DIFFUSE': `Params' returns four integer or floating-point values representing
+%% the diffuse reflectance of the material. Integer values, when requested, are linearly
+%% mapped from the internal floating-point representation such that 1.0 maps to the most
+%% positive representable integer value, and -1.0 maps to the most negative representable
+%% integer value. If the internal value is outside the range [-1 1], the corresponding integer
+%% return value is undefined. The initial value is (0.8, 0.8, 0.8, 1.0).
+%%
+%% `?GL_SPECULAR': `Params' returns four integer or floating-point values representing
+%% the specular reflectance of the material. Integer values, when requested, are linearly
+%% mapped from the internal floating-point representation such that 1.0 maps to the most
+%% positive representable integer value, and -1.0 maps to the most negative representable
+%% integer value. If the internal value is outside the range [-1 1], the corresponding integer
+%% return value is undefined. The initial value is (0, 0, 0, 1).
+%%
+%% `?GL_EMISSION': `Params' returns four integer or floating-point values representing
+%% the emitted light intensity of the material. Integer values, when requested, are linearly
+%% mapped from the internal floating-point representation such that 1.0 maps to the most
+%% positive representable integer value, and -1.0 maps to the most negative representable
+%% integer value. If the internal value is outside the range [-1 1], the corresponding integer
+%% return value is undefined. The initial value is (0, 0, 0, 1).
+%%
+%% `?GL_SHININESS': `Params' returns one integer or floating-point value representing
+%% the specular exponent of the material. Integer values, when requested, are computed by
+%% rounding the internal floating-point value to the nearest integer value. The initial value
+%% is 0.
+%%
+%% `?GL_COLOR_INDEXES': `Params' returns three integer or floating-point values
+%% representing the ambient, diffuse, and specular indices of the material. These indices
+%% are used only for color index lighting. (All the other parameters are used only for RGBA
+%% lighting.) Integer values, when requested, are computed by rounding the internal floating-point
+%% values to the nearest integer values.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMaterial.xml">external</a> documentation.
+-spec getMaterialfv(Face, Pname) -> {float(),float(),float(),float()} when Face :: enum(),Pname :: enum().
+getMaterialfv(Face,Pname) ->
+ call(5219, <<Face:?GLenum,Pname:?GLenum>>).
-%% @spec ({S,T}) -> ok
-%% @equiv texCoord2d(S,T)
--spec texCoord2dv({float(),float()}) -> ok.
-texCoord2dv({S,T}) -> texCoord2d(S,T).
+%% @doc
+%% See {@link getMaterialfv/2}
+-spec getMaterialiv(Face, Pname) -> {integer(),integer(),integer(),integer()} when Face :: enum(),Pname :: enum().
+getMaterialiv(Face,Pname) ->
+ call(5220, <<Face:?GLenum,Pname:?GLenum>>).
-%% @spec (S::float(),T::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord2f(float(),float()) -> ok.
-texCoord2f(S,T) ->
- cast(5263, <<S:?GLfloat,T:?GLfloat>>).
+%% @doc Cause a material color to track the current color
+%%
+%% ``gl:colorMaterial'' specifies which material parameters track the current color. When `?GL_COLOR_MATERIAL'
+%% is enabled, the material parameter or parameters specified by `Mode' , of the material
+%% or materials specified by `Face' , track the current color at all times.
+%%
+%% To enable and disable `?GL_COLOR_MATERIAL', call {@link gl:enable/1} and {@link gl:enable/1}
+%% with argument `?GL_COLOR_MATERIAL'. `?GL_COLOR_MATERIAL' is initially disabled.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml">external</a> documentation.
+-spec colorMaterial(Face, Mode) -> ok when Face :: enum(),Mode :: enum().
+colorMaterial(Face,Mode) ->
+ cast(5221, <<Face:?GLenum,Mode:?GLenum>>).
-%% @spec ({S,T}) -> ok
-%% @equiv texCoord2f(S,T)
--spec texCoord2fv({float(),float()}) -> ok.
-texCoord2fv({S,T}) -> texCoord2f(S,T).
+%% @doc Specify the pixel zoom factors
+%%
+%% ``gl:pixelZoom'' specifies values for the x and y zoom factors. During the execution
+%% of {@link gl:drawPixels/5} or {@link gl:copyPixels/5} , if ( xr, yr) is the current raster
+%% position, and a given element is in the mth row and nth column of the pixel rectangle,
+%% then pixels whose centers are in the rectangle with corners at
+%%
+%% ( xr+n. xfactor, yr+m. yfactor)
+%%
+%% ( xr+(n+1). xfactor, yr+(m+1). yfactor)
+%%
+%% are candidates for replacement. Any pixel whose center lies on the bottom or left edge
+%% of this rectangular region is also modified.
+%%
+%% Pixel zoom factors are not limited to positive values. Negative zoom factors reflect
+%% the resulting image about the current raster position.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelZoom.xml">external</a> documentation.
+-spec pixelZoom(Xfactor, Yfactor) -> ok when Xfactor :: float(),Yfactor :: float().
+pixelZoom(Xfactor,Yfactor) ->
+ cast(5222, <<Xfactor:?GLfloat,Yfactor:?GLfloat>>).
-%% @spec (S::integer(),T::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord2i(integer(),integer()) -> ok.
-texCoord2i(S,T) ->
- cast(5264, <<S:?GLint,T:?GLint>>).
+%% @doc Set pixel storage modes
+%%
+%% ``gl:pixelStore'' sets pixel storage modes that affect the operation of subsequent {@link gl:readPixels/7}
+%% as well as the unpacking of texture patterns (see {@link gl:texImage1D/8} , {@link gl:texImage2D/9}
+%% , {@link gl:texImage3D/10} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7}
+%% ), {@link gl:compressedTexImage1D/7} , {@link gl:compressedTexImage2D/8} , {@link gl:compressedTexImage3D/9}
+%% , {@link gl:compressedTexSubImage1D/7} , {@link gl:compressedTexSubImage2D/9} or {@link gl:compressedTexSubImage1D/7}
+%% .
+%%
+%% `Pname' is a symbolic constant indicating the parameter to be set, and `Param'
+%% is the new value. Six of the twelve storage parameters affect how pixel data is returned
+%% to client memory. They are as follows:
+%%
+%% `?GL_PACK_SWAP_BYTES': If true, byte ordering for multibyte color components, depth
+%% components, or stencil indices is reversed. That is, if a four-byte component consists
+%% of bytes b 0, b 1, b 2, b 3, it is stored in memory as b 3, b 2, b 1, b 0 if `?GL_PACK_SWAP_BYTES'
+%% is true. `?GL_PACK_SWAP_BYTES' has no effect on the memory order of components within
+%% a pixel, only on the order of bytes within components or indices. For example, the three
+%% components of a `?GL_RGB' format pixel are always stored with red first, green second,
+%% and blue third, regardless of the value of `?GL_PACK_SWAP_BYTES'.
+%%
+%% `?GL_PACK_LSB_FIRST': If true, bits are ordered within a byte from least significant
+%% to most significant; otherwise, the first bit in each byte is the most significant one.
+%%
+%% `?GL_PACK_ROW_LENGTH': If greater than 0, `?GL_PACK_ROW_LENGTH' defines the
+%% number of pixels in a row. If the first pixel of a row is placed at location p in memory,
+%% then the location of the first pixel of the next row is obtained by skipping
+%%
+%% k={n l(a/s) |(s n l)/a| s&gt;= a s&lt; a)
+%%
+%% components or indices, where n is the number of components or indices in a pixel, l
+%% is the number of pixels in a row (`?GL_PACK_ROW_LENGTH' if it is greater than 0,
+%% the width argument to the pixel routine otherwise), a is the value of `?GL_PACK_ALIGNMENT'
+%% , and s is the size, in bytes, of a single component (if a&lt; s, then it is as if a=
+%% s). In the case of 1-bit values, the location of the next row is obtained by skipping
+%%
+%% k= 8 a |(n l)/(8 a)|
+%%
+%% components or indices.
+%%
+%% The word `component' in this description refers to the nonindex values red, green,
+%% blue, alpha, and depth. Storage format `?GL_RGB', for example, has three components
+%% per pixel: first red, then green, and finally blue.
+%%
+%% `?GL_PACK_IMAGE_HEIGHT': If greater than 0, `?GL_PACK_IMAGE_HEIGHT' defines
+%% the number of pixels in an image three-dimensional texture volume, where ``image'' is
+%% defined by all pixels sharing the same third dimension index. If the first pixel of a
+%% row is placed at location p in memory, then the location of the first pixel of the next
+%% row is obtained by skipping
+%%
+%% k={n l h(a/s) |(s n l h)/a| s&gt;= a s&lt; a)
+%%
+%% components or indices, where n is the number of components or indices in a pixel, l
+%% is the number of pixels in a row (`?GL_PACK_ROW_LENGTH' if it is greater than 0,
+%% the width argument to {@link gl:texImage3D/10} otherwise), h is the number of rows in
+%% a pixel image (`?GL_PACK_IMAGE_HEIGHT' if it is greater than 0, the height argument
+%% to the {@link gl:texImage3D/10} routine otherwise), a is the value of `?GL_PACK_ALIGNMENT'
+%% , and s is the size, in bytes, of a single component (if a&lt; s, then it is as if
+%% a= s).
+%%
+%% The word `component' in this description refers to the nonindex values red, green,
+%% blue, alpha, and depth. Storage format `?GL_RGB', for example, has three components
+%% per pixel: first red, then green, and finally blue.
+%%
+%% `?GL_PACK_SKIP_PIXELS', `?GL_PACK_SKIP_ROWS', and `?GL_PACK_SKIP_IMAGES'
+%%
+%% These values are provided as a convenience to the programmer; they provide no functionality
+%% that cannot be duplicated simply by incrementing the pointer passed to {@link gl:readPixels/7}
+%% . Setting `?GL_PACK_SKIP_PIXELS' to i is equivalent to incrementing the pointer
+%% by i n components or indices, where n is the number of components or indices in each
+%% pixel. Setting `?GL_PACK_SKIP_ROWS' to j is equivalent to incrementing the pointer
+%% by j m components or indices, where m is the number of components or indices per
+%% row, as just computed in the `?GL_PACK_ROW_LENGTH' section. Setting `?GL_PACK_SKIP_IMAGES'
+%% to k is equivalent to incrementing the pointer by k p, where p is the number of
+%% components or indices per image, as computed in the `?GL_PACK_IMAGE_HEIGHT' section.
+%%
+%%
+%% `?GL_PACK_ALIGNMENT': Specifies the alignment requirements for the start of each
+%% pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered
+%% bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries).
+%%
+%% The other six of the twelve storage parameters affect how pixel data is read from client
+%% memory. These values are significant for {@link gl:texImage1D/8} , {@link gl:texImage2D/9} , {@link gl:texImage3D/10}
+%% , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7} , and {@link gl:texSubImage1D/7}
+%%
+%% They are as follows:
+%%
+%% `?GL_UNPACK_SWAP_BYTES': If true, byte ordering for multibyte color components,
+%% depth components, or stencil indices is reversed. That is, if a four-byte component consists
+%% of bytes b 0, b 1, b 2, b 3, it is taken from memory as b 3, b 2, b 1, b 0 if `?GL_UNPACK_SWAP_BYTES'
+%% is true. `?GL_UNPACK_SWAP_BYTES' has no effect on the memory order of components
+%% within a pixel, only on the order of bytes within components or indices. For example,
+%% the three components of a `?GL_RGB' format pixel are always stored with red first,
+%% green second, and blue third, regardless of the value of `?GL_UNPACK_SWAP_BYTES'.
+%%
+%% `?GL_UNPACK_LSB_FIRST': If true, bits are ordered within a byte from least significant
+%% to most significant; otherwise, the first bit in each byte is the most significant one.
+%%
+%% `?GL_UNPACK_ROW_LENGTH': If greater than 0, `?GL_UNPACK_ROW_LENGTH' defines
+%% the number of pixels in a row. If the first pixel of a row is placed at location p in
+%% memory, then the location of the first pixel of the next row is obtained by skipping
+%%
+%% k={n l(a/s) |(s n l)/a| s&gt;= a s&lt; a)
+%%
+%% components or indices, where n is the number of components or indices in a pixel, l
+%% is the number of pixels in a row (`?GL_UNPACK_ROW_LENGTH' if it is greater than 0,
+%% the width argument to the pixel routine otherwise), a is the value of `?GL_UNPACK_ALIGNMENT'
+%% , and s is the size, in bytes, of a single component (if a&lt; s, then it is as if a=
+%% s). In the case of 1-bit values, the location of the next row is obtained by skipping
+%%
+%% k= 8 a |(n l)/(8 a)|
+%%
+%% components or indices.
+%%
+%% The word `component' in this description refers to the nonindex values red, green,
+%% blue, alpha, and depth. Storage format `?GL_RGB', for example, has three components
+%% per pixel: first red, then green, and finally blue.
+%%
+%% `?GL_UNPACK_IMAGE_HEIGHT': If greater than 0, `?GL_UNPACK_IMAGE_HEIGHT' defines
+%% the number of pixels in an image of a three-dimensional texture volume. Where ``image''
+%% is defined by all pixel sharing the same third dimension index. If the first pixel of
+%% a row is placed at location p in memory, then the location of the first pixel of the
+%% next row is obtained by skipping
+%%
+%% k={n l h(a/s) |(s n l h)/a| s&gt;= a s&lt; a)
+%%
+%% components or indices, where n is the number of components or indices in a pixel, l
+%% is the number of pixels in a row (`?GL_UNPACK_ROW_LENGTH' if it is greater than 0,
+%% the width argument to {@link gl:texImage3D/10} otherwise), h is the number of rows in
+%% an image (`?GL_UNPACK_IMAGE_HEIGHT' if it is greater than 0, the height argument
+%% to {@link gl:texImage3D/10} otherwise), a is the value of `?GL_UNPACK_ALIGNMENT',
+%% and s is the size, in bytes, of a single component (if a&lt; s, then it is as if a=
+%% s).
+%%
+%% The word `component' in this description refers to the nonindex values red, green,
+%% blue, alpha, and depth. Storage format `?GL_RGB', for example, has three components
+%% per pixel: first red, then green, and finally blue.
+%%
+%% `?GL_UNPACK_SKIP_PIXELS' and `?GL_UNPACK_SKIP_ROWS'
+%%
+%% These values are provided as a convenience to the programmer; they provide no functionality
+%% that cannot be duplicated by incrementing the pointer passed to {@link gl:texImage1D/8} , {@link gl:texImage2D/9}
+%% , {@link gl:texSubImage1D/7} or {@link gl:texSubImage1D/7} . Setting `?GL_UNPACK_SKIP_PIXELS'
+%% to i is equivalent to incrementing the pointer by i n components or indices, where
+%% n is the number of components or indices in each pixel. Setting `?GL_UNPACK_SKIP_ROWS'
+%% to j is equivalent to incrementing the pointer by j k components or indices, where
+%% k is the number of components or indices per row, as just computed in the `?GL_UNPACK_ROW_LENGTH'
+%% section.
+%%
+%% `?GL_UNPACK_ALIGNMENT': Specifies the alignment requirements for the start of each
+%% pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered
+%% bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries).
+%%
+%% The following table gives the type, initial value, and range of valid values for each
+%% storage parameter that can be set with ``gl:pixelStore''.
+%%
+%% <table><tbody><tr><td> `Pname' </td><td>` Type '</td><td>` Initial Value '</td>
+%% <td>` Valid Range '</td></tr></tbody><tbody><tr><td>`?GL_PACK_SWAP_BYTES'</td><td>
+%% boolean </td><td> false </td><td> true or false </td></tr><tr><td>`?GL_PACK_LSB_FIRST'
+%% </td><td> boolean </td><td> false </td><td> true or false </td></tr><tr><td>`?GL_PACK_ROW_LENGTH'
+%% </td><td> integer </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_PACK_IMAGE_HEIGHT'</td>
+%% <td> integer </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_PACK_SKIP_ROWS'</td><td>
+%% integer </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_PACK_SKIP_PIXELS'</td><td> integer
+%% </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_PACK_SKIP_IMAGES'</td><td> integer </td><td>
+%% 0 </td><td>[0)</td></tr><tr><td>`?GL_PACK_ALIGNMENT'</td><td> integer </td><td> 4 </td>
+%% <td> 1, 2, 4, or 8 </td></tr><tr><td>`?GL_UNPACK_SWAP_BYTES'</td><td> boolean </td><td>
+%% false </td><td> true or false </td></tr><tr><td>`?GL_UNPACK_LSB_FIRST'</td><td>
+%% boolean </td><td> false </td><td> true or false </td></tr><tr><td>`?GL_UNPACK_ROW_LENGTH'
+%% </td><td> integer </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_UNPACK_IMAGE_HEIGHT'</td>
+%% <td> integer </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_UNPACK_SKIP_ROWS'</td><td>
+%% integer </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_UNPACK_SKIP_PIXELS'</td><td>
+%% integer </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_UNPACK_SKIP_IMAGES'</td><td>
+%% integer </td><td> 0 </td><td>[0)</td></tr><tr><td>`?GL_UNPACK_ALIGNMENT'</td><td> integer
+%% </td><td> 4 </td><td> 1, 2, 4, or 8 </td></tr></tbody></table>
+%%
+%% ``gl:pixelStoref'' can be used to set any pixel store parameter. If the parameter type
+%% is boolean, then if `Param' is 0, the parameter is false; otherwise it is set to
+%% true. If `Pname' is a integer type parameter, `Param' is rounded to the nearest
+%% integer.
+%%
+%% Likewise, ``gl:pixelStorei'' can also be used to set any of the pixel store parameters.
+%% Boolean parameters are set to false if `Param' is 0 and true otherwise.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelStore.xml">external</a> documentation.
+-spec pixelStoref(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+pixelStoref(Pname,Param) ->
+ cast(5223, <<Pname:?GLenum,Param:?GLfloat>>).
-%% @spec ({S,T}) -> ok
-%% @equiv texCoord2i(S,T)
--spec texCoord2iv({integer(),integer()}) -> ok.
-texCoord2iv({S,T}) -> texCoord2i(S,T).
+%% @doc
+%% See {@link pixelStoref/2}
+-spec pixelStorei(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+pixelStorei(Pname,Param) ->
+ cast(5224, <<Pname:?GLenum,Param:?GLint>>).
-%% @spec (S::integer(),T::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord2s(integer(),integer()) -> ok.
-texCoord2s(S,T) ->
- cast(5265, <<S:?GLshort,T:?GLshort>>).
+%% @doc Set pixel transfer modes
+%%
+%% ``gl:pixelTransfer'' sets pixel transfer modes that affect the operation of subsequent {@link gl:copyPixels/5}
+%% , {@link gl:copyTexImage1D/7} , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8}
+%% , {@link gl:copyTexSubImage3D/9} , {@link gl:drawPixels/5} , {@link gl:readPixels/7} , {@link gl:texImage1D/8}
+%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7}
+%% , and {@link gl:texSubImage1D/7} commands. Additionally, if the ARB_imaging subset is supported,
+%% the routines {@link gl:colorTable/6} , {@link gl:colorSubTable/6} , {@link gl:convolutionFilter1D/6}
+%% , {@link gl:convolutionFilter2D/7} , {@link gl:histogram/4} , {@link gl:minmax/3} , and {@link gl:separableFilter2D/8}
+%% are also affected. The algorithms that are specified by pixel transfer modes operate
+%% on pixels after they are read from the frame buffer ( {@link gl:copyPixels/5} {@link gl:copyTexImage1D/7}
+%% , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8} ,
+%% {@link gl:copyTexSubImage3D/9} , and {@link gl:readPixels/7} ), or unpacked from client memory
+%% ( {@link gl:drawPixels/5} , {@link gl:texImage1D/8} , {@link gl:texImage2D/9} , {@link gl:texImage3D/10}
+%% , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7} , and {@link gl:texSubImage1D/7} ).
+%% Pixel transfer operations happen in the same order, and in the same manner, regardless
+%% of the command that resulted in the pixel operation. Pixel storage modes (see {@link gl:pixelStoref/2}
+%% ) control the unpacking of pixels being read from client memory and the packing of pixels
+%% being written back into client memory.
+%%
+%% Pixel transfer operations handle four fundamental pixel types: `color', `color index'
+%% , `depth', and `stencil'. `Color' pixels consist of four floating-point
+%% values with unspecified mantissa and exponent sizes, scaled such that 0 represents zero
+%% intensity and 1 represents full intensity. `Color indices' comprise a single fixed-point
+%% value, with unspecified precision to the right of the binary point. `Depth' pixels
+%% comprise a single floating-point value, with unspecified mantissa and exponent sizes,
+%% scaled such that 0.0 represents the minimum depth buffer value, and 1.0 represents the
+%% maximum depth buffer value. Finally, `stencil' pixels comprise a single fixed-point
+%% value, with unspecified precision to the right of the binary point.
+%%
+%% The pixel transfer operations performed on the four basic pixel types are as follows:
+%%
+%% `Color': Each of the four color components is multiplied by a scale factor, then
+%% added to a bias factor. That is, the red component is multiplied by `?GL_RED_SCALE',
+%% then added to `?GL_RED_BIAS'; the green component is multiplied by `?GL_GREEN_SCALE'
+%% , then added to `?GL_GREEN_BIAS'; the blue component is multiplied by `?GL_BLUE_SCALE'
+%% , then added to `?GL_BLUE_BIAS'; and the alpha component is multiplied by `?GL_ALPHA_SCALE'
+%% , then added to `?GL_ALPHA_BIAS'. After all four color components are scaled and
+%% biased, each is clamped to the range [0 1]. All color, scale, and bias values are specified
+%% with ``gl:pixelTransfer''.
+%%
+%% If `?GL_MAP_COLOR' is true, each color component is scaled by the size of the corresponding
+%% color-to-color map, then replaced by the contents of that map indexed by the scaled component.
+%% That is, the red component is scaled by `?GL_PIXEL_MAP_R_TO_R_SIZE', then replaced
+%% by the contents of `?GL_PIXEL_MAP_R_TO_R' indexed by itself. The green component
+%% is scaled by `?GL_PIXEL_MAP_G_TO_G_SIZE', then replaced by the contents of `?GL_PIXEL_MAP_G_TO_G'
+%% indexed by itself. The blue component is scaled by `?GL_PIXEL_MAP_B_TO_B_SIZE',
+%% then replaced by the contents of `?GL_PIXEL_MAP_B_TO_B' indexed by itself. And the
+%% alpha component is scaled by `?GL_PIXEL_MAP_A_TO_A_SIZE', then replaced by the contents
+%% of `?GL_PIXEL_MAP_A_TO_A' indexed by itself. All components taken from the maps are
+%% then clamped to the range [0 1]. `?GL_MAP_COLOR' is specified with ``gl:pixelTransfer''.
+%% The contents of the various maps are specified with {@link gl:pixelMapfv/3} .
+%%
+%% If the ARB_imaging extension is supported, each of the four color components may be scaled
+%% and biased after transformation by the color matrix. That is, the red component is multiplied
+%% by `?GL_POST_COLOR_MATRIX_RED_SCALE', then added to `?GL_POST_COLOR_MATRIX_RED_BIAS'
+%% ; the green component is multiplied by `?GL_POST_COLOR_MATRIX_GREEN_SCALE', then
+%% added to `?GL_POST_COLOR_MATRIX_GREEN_BIAS'; the blue component is multiplied by `?GL_POST_COLOR_MATRIX_BLUE_SCALE'
+%% , then added to `?GL_POST_COLOR_MATRIX_BLUE_BIAS'; and the alpha component is multiplied
+%% by `?GL_POST_COLOR_MATRIX_ALPHA_SCALE', then added to `?GL_POST_COLOR_MATRIX_ALPHA_BIAS'
+%% . After all four color components are scaled and biased, each is clamped to the range [0
+%% 1].
+%%
+%% Similarly, if the ARB_imaging extension is supported, each of the four color components
+%% may be scaled and biased after processing by the enabled convolution filter. That is,
+%% the red component is multiplied by `?GL_POST_CONVOLUTION_RED_SCALE', then added to `?GL_POST_CONVOLUTION_RED_BIAS'
+%% ; the green component is multiplied by `?GL_POST_CONVOLUTION_GREEN_SCALE', then added
+%% to `?GL_POST_CONVOLUTION_GREEN_BIAS'; the blue component is multiplied by `?GL_POST_CONVOLUTION_BLUE_SCALE'
+%% , then added to `?GL_POST_CONVOLUTION_BLUE_BIAS'; and the alpha component is multiplied
+%% by `?GL_POST_CONVOLUTION_ALPHA_SCALE', then added to `?GL_POST_CONVOLUTION_ALPHA_BIAS'
+%% . After all four color components are scaled and biased, each is clamped to the range [0
+%% 1].
+%%
+%% `Color index': Each color index is shifted left by `?GL_INDEX_SHIFT' bits;
+%% any bits beyond the number of fraction bits carried by the fixed-point index are filled
+%% with zeros. If `?GL_INDEX_SHIFT' is negative, the shift is to the right, again zero
+%% filled. Then `?GL_INDEX_OFFSET' is added to the index. `?GL_INDEX_SHIFT' and `?GL_INDEX_OFFSET'
+%% are specified with ``gl:pixelTransfer''.
+%%
+%% From this point, operation diverges depending on the required format of the resulting
+%% pixels. If the resulting pixels are to be written to a color index buffer, or if they
+%% are being read back to client memory in `?GL_COLOR_INDEX' format, the pixels continue
+%% to be treated as indices. If `?GL_MAP_COLOR' is true, each index is masked by 2 n-1
+%% , where n is `?GL_PIXEL_MAP_I_TO_I_SIZE', then replaced by the contents of `?GL_PIXEL_MAP_I_TO_I'
+%% indexed by the masked value. `?GL_MAP_COLOR' is specified with ``gl:pixelTransfer''
+%% . The contents of the index map is specified with {@link gl:pixelMapfv/3} .
+%%
+%% If the resulting pixels are to be written to an RGBA color buffer, or if they are read
+%% back to client memory in a format other than `?GL_COLOR_INDEX', the pixels are converted
+%% from indices to colors by referencing the four maps `?GL_PIXEL_MAP_I_TO_R', `?GL_PIXEL_MAP_I_TO_G'
+%% , `?GL_PIXEL_MAP_I_TO_B', and `?GL_PIXEL_MAP_I_TO_A'. Before being dereferenced,
+%% the index is masked by 2 n-1, where n is `?GL_PIXEL_MAP_I_TO_R_SIZE' for the
+%% red map, `?GL_PIXEL_MAP_I_TO_G_SIZE' for the green map, `?GL_PIXEL_MAP_I_TO_B_SIZE'
+%% for the blue map, and `?GL_PIXEL_MAP_I_TO_A_SIZE' for the alpha map. All components
+%% taken from the maps are then clamped to the range [0 1]. The contents of the four maps is
+%% specified with {@link gl:pixelMapfv/3} .
+%%
+%% `Depth': Each depth value is multiplied by `?GL_DEPTH_SCALE', added to `?GL_DEPTH_BIAS'
+%% , then clamped to the range [0 1].
+%%
+%% `Stencil': Each index is shifted `?GL_INDEX_SHIFT' bits just as a color index
+%% is, then added to `?GL_INDEX_OFFSET'. If `?GL_MAP_STENCIL' is true, each index
+%% is masked by 2 n-1, where n is `?GL_PIXEL_MAP_S_TO_S_SIZE', then replaced by
+%% the contents of `?GL_PIXEL_MAP_S_TO_S' indexed by the masked value.
+%%
+%% The following table gives the type, initial value, and range of valid values for each
+%% of the pixel transfer parameters that are set with ``gl:pixelTransfer''.
+%%
+%% <table><tbody><tr><td> `Pname' </td><td>` Type '</td><td>` Initial Value '</td>
+%% <td>` Valid Range '</td></tr></tbody><tbody><tr><td>`?GL_MAP_COLOR'</td><td>
+%% boolean </td><td> false </td><td> true/false </td></tr><tr><td>`?GL_MAP_STENCIL'</td>
+%% <td> boolean </td><td> false </td><td> true/false </td></tr><tr><td>`?GL_INDEX_SHIFT'</td>
+%% <td> integer </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_INDEX_OFFSET'</td><td> integer
+%% </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_RED_SCALE'</td><td> float </td><td> 1 </td>
+%% <td>(-)</td></tr><tr><td>`?GL_GREEN_SCALE'</td><td> float </td><td> 1 </td><td>(-)</td></tr>
+%% <tr><td>`?GL_BLUE_SCALE'</td><td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_ALPHA_SCALE'
+%% </td><td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_DEPTH_SCALE'</td><td>
+%% float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_RED_BIAS'</td><td> float </td><td>
+%% 0 </td><td>(-)</td></tr><tr><td>`?GL_GREEN_BIAS'</td><td> float </td><td> 0 </td><td>(-)</td>
+%% </tr><tr><td>`?GL_BLUE_BIAS'</td><td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_ALPHA_BIAS'
+%% </td><td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_DEPTH_BIAS'</td><td>
+%% float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_POST_COLOR_MATRIX_RED_SCALE'</td><td>
+%% float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_POST_COLOR_MATRIX_GREEN_SCALE'</td>
+%% <td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_POST_COLOR_MATRIX_BLUE_SCALE'</td>
+%% <td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_POST_COLOR_MATRIX_ALPHA_SCALE'</td>
+%% <td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_POST_COLOR_MATRIX_RED_BIAS'</td>
+%% <td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_POST_COLOR_MATRIX_GREEN_BIAS'</td>
+%% <td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_POST_COLOR_MATRIX_BLUE_BIAS'</td>
+%% <td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_POST_COLOR_MATRIX_ALPHA_BIAS'</td>
+%% <td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_POST_CONVOLUTION_RED_SCALE'</td>
+%% <td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_POST_CONVOLUTION_GREEN_SCALE'</td>
+%% <td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_POST_CONVOLUTION_BLUE_SCALE'</td>
+%% <td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_POST_CONVOLUTION_ALPHA_SCALE'</td>
+%% <td> float </td><td> 1 </td><td>(-)</td></tr><tr><td>`?GL_POST_CONVOLUTION_RED_BIAS'</td>
+%% <td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_POST_CONVOLUTION_GREEN_BIAS'</td>
+%% <td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_POST_CONVOLUTION_BLUE_BIAS'</td>
+%% <td> float </td><td> 0 </td><td>(-)</td></tr><tr><td>`?GL_POST_CONVOLUTION_ALPHA_BIAS'</td>
+%% <td> float </td><td> 0 </td><td>(-)</td></tr></tbody></table>
+%%
+%% ``gl:pixelTransferf'' can be used to set any pixel transfer parameter. If the parameter
+%% type is boolean, 0 implies false and any other value implies true. If `Pname' is
+%% an integer parameter, `Param' is rounded to the nearest integer.
+%%
+%% Likewise, ``gl:pixelTransferi'' can be used to set any of the pixel transfer parameters.
+%% Boolean parameters are set to false if `Param' is 0 and to true otherwise. `Param'
+%% is converted to floating point before being assigned to real-valued parameters.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelTransfer.xml">external</a> documentation.
+-spec pixelTransferf(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+pixelTransferf(Pname,Param) ->
+ cast(5225, <<Pname:?GLenum,Param:?GLfloat>>).
-%% @spec ({S,T}) -> ok
-%% @equiv texCoord2s(S,T)
--spec texCoord2sv({integer(),integer()}) -> ok.
-texCoord2sv({S,T}) -> texCoord2s(S,T).
+%% @doc
+%% See {@link pixelTransferf/2}
+-spec pixelTransferi(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+pixelTransferi(Pname,Param) ->
+ cast(5226, <<Pname:?GLenum,Param:?GLint>>).
-%% @spec (S::float(),T::float(),R::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord3d(float(),float(),float()) -> ok.
-texCoord3d(S,T,R) ->
- cast(5266, <<S:?GLdouble,T:?GLdouble,R:?GLdouble>>).
+%% @doc Set up pixel transfer maps
+%%
+%% ``gl:pixelMap'' sets up translation tables, or `maps', used by {@link gl:copyPixels/5}
+%% , {@link gl:copyTexImage1D/7} , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8}
+%% , {@link gl:copyTexSubImage3D/9} , {@link gl:drawPixels/5} , {@link gl:readPixels/7} , {@link gl:texImage1D/8}
+%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7}
+%% , and {@link gl:texSubImage1D/7} . Additionally, if the ARB_imaging subset is supported,
+%% the routines {@link gl:colorTable/6} , {@link gl:colorSubTable/6} , {@link gl:convolutionFilter1D/6}
+%% , {@link gl:convolutionFilter2D/7} , {@link gl:histogram/4} , {@link gl:minmax/3} , and {@link gl:separableFilter2D/8}
+%% . Use of these maps is described completely in the {@link gl:pixelTransferf/2} reference
+%% page, and partly in the reference pages for the pixel and texture image commands. Only
+%% the specification of the maps is described in this reference page.
+%%
+%% `Map' is a symbolic map name, indicating one of ten maps to set. `Mapsize' specifies
+%% the number of entries in the map, and `Values' is a pointer to an array of `Mapsize'
+%% map values.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a pixel transfer map is specified, `Values' is
+%% treated as a byte offset into the buffer object's data store.
+%%
+%% The ten maps are as follows:
+%%
+%% `?GL_PIXEL_MAP_I_TO_I': Maps color indices to color indices.
+%%
+%% `?GL_PIXEL_MAP_S_TO_S': Maps stencil indices to stencil indices.
+%%
+%% `?GL_PIXEL_MAP_I_TO_R': Maps color indices to red components.
+%%
+%% `?GL_PIXEL_MAP_I_TO_G': Maps color indices to green components.
+%%
+%% `?GL_PIXEL_MAP_I_TO_B': Maps color indices to blue components.
+%%
+%% `?GL_PIXEL_MAP_I_TO_A': Maps color indices to alpha components.
+%%
+%% `?GL_PIXEL_MAP_R_TO_R': Maps red components to red components.
+%%
+%% `?GL_PIXEL_MAP_G_TO_G': Maps green components to green components.
+%%
+%% `?GL_PIXEL_MAP_B_TO_B': Maps blue components to blue components.
+%%
+%% `?GL_PIXEL_MAP_A_TO_A': Maps alpha components to alpha components.
+%%
+%% The entries in a map can be specified as single-precision floating-point numbers, unsigned
+%% short integers, or unsigned int integers. Maps that store color component values (all
+%% but `?GL_PIXEL_MAP_I_TO_I' and `?GL_PIXEL_MAP_S_TO_S') retain their values in
+%% floating-point format, with unspecified mantissa and exponent sizes. Floating-point values
+%% specified by ``gl:pixelMapfv'' are converted directly to the internal floating-point
+%% format of these maps, then clamped to the range [0,1]. Unsigned integer values specified
+%% by ``gl:pixelMapusv'' and ``gl:pixelMapuiv'' are converted linearly such that the
+%% largest representable integer maps to 1.0, and 0 maps to 0.0.
+%%
+%% Maps that store indices, `?GL_PIXEL_MAP_I_TO_I' and `?GL_PIXEL_MAP_S_TO_S',
+%% retain their values in fixed-point format, with an unspecified number of bits to the right
+%% of the binary point. Floating-point values specified by ``gl:pixelMapfv'' are converted
+%% directly to the internal fixed-point format of these maps. Unsigned integer values specified
+%% by ``gl:pixelMapusv'' and ``gl:pixelMapuiv'' specify integer values, with all 0's
+%% to the right of the binary point.
+%%
+%% The following table shows the initial sizes and values for each of the maps. Maps that
+%% are indexed by either color or stencil indices must have `Mapsize' = 2 n for some
+%% n or the results are undefined. The maximum allowable size for each map depends on the
+%% implementation and can be determined by calling {@link gl:getBooleanv/1} with argument `?GL_MAX_PIXEL_MAP_TABLE'
+%% . The single maximum applies to all maps; it is at least 32. <table><tbody><tr><td> `Map'
+%% </td><td>` Lookup Index '</td><td>` Lookup Value '</td><td>` Initial Size '</td>
+%% <td>` Initial Value '</td></tr></tbody><tbody><tr><td>`?GL_PIXEL_MAP_I_TO_I'</td>
+%% <td> color index </td><td> color index </td><td> 1 </td><td> 0 </td></tr><tr><td>`?GL_PIXEL_MAP_S_TO_S'
+%% </td><td> stencil index </td><td> stencil index </td><td> 1 </td><td> 0 </td></tr><tr><td>
+%% `?GL_PIXEL_MAP_I_TO_R'</td><td> color index </td><td> R </td><td> 1 </td><td> 0 </td>
+%% </tr><tr><td>`?GL_PIXEL_MAP_I_TO_G'</td><td> color index </td><td> G </td><td> 1 </td>
+%% <td> 0 </td></tr><tr><td>`?GL_PIXEL_MAP_I_TO_B'</td><td> color index </td><td> B </td>
+%% <td> 1 </td><td> 0 </td></tr><tr><td>`?GL_PIXEL_MAP_I_TO_A'</td><td> color index </td>
+%% <td> A </td><td> 1 </td><td> 0 </td></tr><tr><td>`?GL_PIXEL_MAP_R_TO_R'</td><td> R </td>
+%% <td> R </td><td> 1 </td><td> 0 </td></tr><tr><td>`?GL_PIXEL_MAP_G_TO_G'</td><td> G </td>
+%% <td> G </td><td> 1 </td><td> 0 </td></tr><tr><td>`?GL_PIXEL_MAP_B_TO_B'</td><td> B </td>
+%% <td> B </td><td> 1 </td><td> 0 </td></tr><tr><td>`?GL_PIXEL_MAP_A_TO_A'</td><td> A </td>
+%% <td> A </td><td> 1 </td><td> 0 </td></tr></tbody></table>
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelMap.xml">external</a> documentation.
+-spec pixelMapfv(Map, Mapsize, Values) -> ok when Map :: enum(),Mapsize :: integer(),Values :: binary().
+pixelMapfv(Map,Mapsize,Values) ->
+ send_bin(Values),
+ cast(5227, <<Map:?GLenum,Mapsize:?GLsizei>>).
-%% @spec ({S,T,R}) -> ok
-%% @equiv texCoord3d(S,T,R)
--spec texCoord3dv({float(),float(),float()}) -> ok.
-texCoord3dv({S,T,R}) -> texCoord3d(S,T,R).
+%% @doc
+%% See {@link pixelMapfv/3}
+-spec pixelMapuiv(Map, Mapsize, Values) -> ok when Map :: enum(),Mapsize :: integer(),Values :: binary().
+pixelMapuiv(Map,Mapsize,Values) ->
+ send_bin(Values),
+ cast(5228, <<Map:?GLenum,Mapsize:?GLsizei>>).
-%% @spec (S::float(),T::float(),R::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord3f(float(),float(),float()) -> ok.
-texCoord3f(S,T,R) ->
- cast(5267, <<S:?GLfloat,T:?GLfloat,R:?GLfloat>>).
+%% @doc
+%% See {@link pixelMapfv/3}
+-spec pixelMapusv(Map, Mapsize, Values) -> ok when Map :: enum(),Mapsize :: integer(),Values :: binary().
+pixelMapusv(Map,Mapsize,Values) ->
+ send_bin(Values),
+ cast(5229, <<Map:?GLenum,Mapsize:?GLsizei>>).
-%% @spec ({S,T,R}) -> ok
-%% @equiv texCoord3f(S,T,R)
--spec texCoord3fv({float(),float(),float()}) -> ok.
-texCoord3fv({S,T,R}) -> texCoord3f(S,T,R).
+%% @doc Return the specified pixel map
+%%
+%% See the {@link gl:pixelMapfv/3} reference page for a description of the acceptable values
+%% for the `Map' parameter. ``gl:getPixelMap'' returns in `Data' the contents
+%% of the pixel map specified in `Map' . Pixel maps are used during the execution of {@link gl:readPixels/7}
+%% , {@link gl:drawPixels/5} , {@link gl:copyPixels/5} , {@link gl:texImage1D/8} , {@link gl:texImage2D/9}
+%% , {@link gl:texImage3D/10} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7}
+%% , {@link gl:copyTexImage1D/7} , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8}
+%% , and {@link gl:copyTexSubImage3D/9} . to map color indices, stencil indices, color components,
+%% and depth components to other values.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a pixel map is requested, `Data' is treated as
+%% a byte offset into the buffer object's data store.
+%%
+%% Unsigned integer values, if requested, are linearly mapped from the internal fixed or
+%% floating-point representation such that 1.0 maps to the largest representable integer
+%% value, and 0.0 maps to 0. Return unsigned integer values are undefined if the map value
+%% was not in the range [0,1].
+%%
+%% To determine the required size of `Map' , call {@link gl:getBooleanv/1} with the appropriate
+%% symbolic constant.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetPixelMap.xml">external</a> documentation.
+-spec getPixelMapfv(Map, Values) -> ok when Map :: enum(),Values :: mem().
+getPixelMapfv(Map,Values) ->
+ send_bin(Values),
+ call(5230, <<Map:?GLenum>>).
-%% @spec (S::integer(),T::integer(),R::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord3i(integer(),integer(),integer()) -> ok.
-texCoord3i(S,T,R) ->
- cast(5268, <<S:?GLint,T:?GLint,R:?GLint>>).
+%% @doc
+%% See {@link getPixelMapfv/2}
+-spec getPixelMapuiv(Map, Values) -> ok when Map :: enum(),Values :: mem().
+getPixelMapuiv(Map,Values) ->
+ send_bin(Values),
+ call(5231, <<Map:?GLenum>>).
-%% @spec ({S,T,R}) -> ok
-%% @equiv texCoord3i(S,T,R)
--spec texCoord3iv({integer(),integer(),integer()}) -> ok.
-texCoord3iv({S,T,R}) -> texCoord3i(S,T,R).
+%% @doc
+%% See {@link getPixelMapfv/2}
+-spec getPixelMapusv(Map, Values) -> ok when Map :: enum(),Values :: mem().
+getPixelMapusv(Map,Values) ->
+ send_bin(Values),
+ call(5232, <<Map:?GLenum>>).
-%% @spec (S::integer(),T::integer(),R::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord3s(integer(),integer(),integer()) -> ok.
-texCoord3s(S,T,R) ->
- cast(5269, <<S:?GLshort,T:?GLshort,R:?GLshort>>).
+%% @doc Draw a bitmap
+%%
+%% A bitmap is a binary image. When drawn, the bitmap is positioned relative to the current
+%% raster position, and frame buffer pixels corresponding to 1's in the bitmap are written
+%% using the current raster color or index. Frame buffer pixels corresponding to 0's in the
+%% bitmap are not modified.
+%%
+%% ``gl:bitmap'' takes seven arguments. The first pair specifies the width and height of
+%% the bitmap image. The second pair specifies the location of the bitmap origin relative
+%% to the lower left corner of the bitmap image. The third pair of arguments specifies `x'
+%% and `y' offsets to be added to the current raster position after the bitmap has
+%% been drawn. The final argument is a pointer to the bitmap image itself.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a bitmap image is specified, `Bitmap' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% The bitmap image is interpreted like image data for the {@link gl:drawPixels/5} command,
+%% with `Width' and `Height' corresponding to the width and height arguments of
+%% that command, and with `type' set to `?GL_BITMAP' and `format' set to `?GL_COLOR_INDEX'
+%% . Modes specified using {@link gl:pixelStoref/2} affect the interpretation of bitmap image
+%% data; modes specified using {@link gl:pixelTransferf/2} do not.
+%%
+%% If the current raster position is invalid, ``gl:bitmap'' is ignored. Otherwise, the
+%% lower left corner of the bitmap image is positioned at the window coordinates
+%%
+%% x w=|x r-x o|
+%%
+%% y w=|y r-y o|
+%%
+%% where (x r y r) is the raster position and (x o y o) is the bitmap origin. Fragments are then generated
+%% for each pixel corresponding to a 1 (one) in the bitmap image. These fragments are generated
+%% using the current raster `z' coordinate, color or color index, and current raster
+%% texture coordinates. They are then treated just as if they had been generated by a point,
+%% line, or polygon, including texture mapping, fogging, and all per-fragment operations
+%% such as alpha and depth testing.
+%%
+%% After the bitmap has been drawn, the `x' and `y' coordinates of the current
+%% raster position are offset by `Xmove' and `Ymove' . No change is made to the `z'
+%% coordinate of the current raster position, or to the current raster color, texture coordinates,
+%% or index.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBitmap.xml">external</a> documentation.
+-spec bitmap(Width, Height, Xorig, Yorig, Xmove, Ymove, Bitmap) -> ok when Width :: integer(),Height :: integer(),Xorig :: float(),Yorig :: float(),Xmove :: float(),Ymove :: float(),Bitmap :: offset()|mem().
+bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) when is_integer(Bitmap) ->
+ cast(5233, <<Width:?GLsizei,Height:?GLsizei,Xorig:?GLfloat,Yorig:?GLfloat,Xmove:?GLfloat,Ymove:?GLfloat,Bitmap:?GLuint>>);
+bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) ->
+ send_bin(Bitmap),
+ cast(5234, <<Width:?GLsizei,Height:?GLsizei,Xorig:?GLfloat,Yorig:?GLfloat,Xmove:?GLfloat,Ymove:?GLfloat>>).
-%% @spec ({S,T,R}) -> ok
-%% @equiv texCoord3s(S,T,R)
--spec texCoord3sv({integer(),integer(),integer()}) -> ok.
-texCoord3sv({S,T,R}) -> texCoord3s(S,T,R).
+%% @doc Read a block of pixels from the frame buffer
+%%
+%% ``gl:readPixels'' returns pixel data from the frame buffer, starting with the pixel
+%% whose lower left corner is at location ( `X' , `Y' ), into client memory starting
+%% at location `Data' . Several parameters control the processing of the pixel data before
+%% it is placed into client memory. These parameters are set with {@link gl:pixelStoref/2} .
+%% This reference page describes the effects on ``gl:readPixels'' of most, but not all
+%% of the parameters specified by these three commands.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a block of pixels is requested, `Data' is treated
+%% as a byte offset into the buffer object's data store rather than a pointer to client memory.
+%%
+%%
+%% ``gl:readPixels'' returns values from each pixel with lower left corner at (x+i y+j) for 0&lt;=
+%% i&lt; width and 0&lt;= j&lt; height. This pixel is said to be the ith pixel in the
+%% jth row. Pixels are returned in row order from the lowest to the highest row, left to
+%% right in each row.
+%%
+%% `Format' specifies the format for the returned pixel values; accepted values are:
+%%
+%% `?GL_STENCIL_INDEX': Stencil values are read from the stencil buffer. Each index
+%% is converted to fixed point, shifted left or right depending on the value and sign of `?GL_INDEX_SHIFT'
+%% , and added to `?GL_INDEX_OFFSET'. If `?GL_MAP_STENCIL' is `?GL_TRUE',
+%% indices are replaced by their mappings in the table `?GL_PIXEL_MAP_S_TO_S'.
+%%
+%% `?GL_DEPTH_COMPONENT': Depth values are read from the depth buffer. Each component
+%% is converted to floating point such that the minimum depth value maps to 0 and the maximum
+%% value maps to 1. Each component is then multiplied by `?GL_DEPTH_SCALE', added to `?GL_DEPTH_BIAS'
+%% , and finally clamped to the range [0 1].
+%%
+%% `?GL_DEPTH_STENCIL': Values are taken from both the depth and stencil buffers. The `Type'
+%% parameter must be `?GL_UNSIGNED_INT_24_8' or `?GL_FLOAT_32_UNSIGNED_INT_24_8_REV'
+%% .
+%%
+%% `?GL_RED'
+%%
+%% `?GL_GREEN'
+%%
+%% `?GL_BLUE'
+%%
+%% `?GL_RGB'
+%%
+%% `?GL_BGR'
+%%
+%% `?GL_RGBA'
+%%
+%% `?GL_BGRA': Finally, the indices or components are converted to the proper format,
+%% as specified by `Type' . If `Format' is `?GL_STENCIL_INDEX' and `Type'
+%% is not `?GL_FLOAT', each index is masked with the mask value given in the following
+%% table. If `Type' is `?GL_FLOAT', then each integer index is converted to single-precision
+%% floating-point format.
+%%
+%% If `Format' is `?GL_RED', `?GL_GREEN', `?GL_BLUE', `?GL_RGB', `?GL_BGR'
+%% , `?GL_RGBA', or `?GL_BGRA' and `Type' is not `?GL_FLOAT', each component
+%% is multiplied by the multiplier shown in the following table. If type is `?GL_FLOAT',
+%% then each component is passed as is (or converted to the client's single-precision floating-point
+%% format if it is different from the one used by the GL).
+%%
+%% <table><tbody><tr><td> `Type' </td><td>` Index Mask '</td><td>` Component Conversion '
+%% </td></tr></tbody><tbody><tr><td>`?GL_UNSIGNED_BYTE'</td><td> 2 8-1</td><td>(2 8-1) c</td></tr>
+%% <tr><td>`?GL_BYTE'</td><td> 2 7-1</td><td>((2 8-1) c-1)/2</td></tr><tr><td>`?GL_UNSIGNED_SHORT'
+%% </td><td> 2 16-1</td><td>(2 16-1) c</td></tr><tr><td>`?GL_SHORT'</td><td> 2 15-1</td><td>((2
+%% 16-1)
+%% c-1)/2</td>
+%% </tr><tr><td>`?GL_UNSIGNED_INT'</td><td> 2 32-1</td><td>(2 32-1) c</td></tr><tr><td>`?GL_INT'
+%% </td><td> 2 31-1</td><td>((2 32-1) c-1)/2</td></tr><tr><td>`?GL_HALF_FLOAT'</td><td> none </td><td>
+%% c</td></tr><tr><td>`?GL_FLOAT'</td><td> none </td><td> c</td></tr><tr><td>`?GL_UNSIGNED_BYTE_3_3_2'
+%% </td><td> 2 N-1</td><td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_BYTE_2_3_3_REV'</td><td>
+%% 2 N-1</td><td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_SHORT_5_6_5'</td><td> 2 N-1</td><td>
+%% (2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_SHORT_5_6_5_REV'</td><td> 2 N-1</td><td>(2 N-1) c</td></tr>
+%% <tr><td>`?GL_UNSIGNED_SHORT_4_4_4_4'</td><td> 2 N-1</td><td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_SHORT_4_4_4_4_REV'
+%% </td><td> 2 N-1</td><td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_SHORT_5_5_5_1'</td><td> 2
+%% N-1</td><td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_SHORT_1_5_5_5_REV'</td><td> 2 N-1</td>
+%% <td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_INT_8_8_8_8'</td><td> 2 N-1</td><td>(2 N-1) c</td></tr>
+%% <tr><td>`?GL_UNSIGNED_INT_8_8_8_8_REV'</td><td> 2 N-1</td><td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_INT_10_10_10_2'
+%% </td><td> 2 N-1</td><td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_INT_2_10_10_10_REV'</td><td>
+%% 2 N-1</td><td>(2 N-1) c</td></tr><tr><td>`?GL_UNSIGNED_INT_24_8'</td><td> 2 N-1</td><td>(2
+%% N-1)
+%% c</td></tr><tr><td>`?GL_UNSIGNED_INT_10F_11F_11F_REV'</td><td> -- </td><td> Special </td>
+%% </tr><tr><td>`?GL_UNSIGNED_INT_5_9_9_9_REV'</td><td> -- </td><td> Special </td></tr><tr>
+%% <td>`?GL_FLOAT_32_UNSIGNED_INT_24_8_REV'</td><td> none </td><td> c (Depth Only) </td>
+%% </tr></tbody></table>
+%%
+%% Return values are placed in memory as follows. If `Format' is `?GL_STENCIL_INDEX'
+%% , `?GL_DEPTH_COMPONENT', `?GL_RED', `?GL_GREEN', or `?GL_BLUE', a
+%% single value is returned and the data for the ith pixel in the jth row is placed in
+%% location (j) width+i. `?GL_RGB' and `?GL_BGR' return three values, `?GL_RGBA'
+%% and `?GL_BGRA' return four values for each pixel, with all values corresponding
+%% to a single pixel occupying contiguous space in `Data' . Storage parameters set by {@link gl:pixelStoref/2}
+%% , such as `?GL_PACK_LSB_FIRST' and `?GL_PACK_SWAP_BYTES', affect the way that
+%% data is written into memory. See {@link gl:pixelStoref/2} for a description.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml">external</a> documentation.
+-spec readPixels(X, Y, Width, Height, Format, Type, Pixels) -> ok when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: mem().
+readPixels(X,Y,Width,Height,Format,Type,Pixels) ->
+ send_bin(Pixels),
+ call(5235, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (S::float(),T::float(),R::float(),Q::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord4d(float(),float(),float(),float()) -> ok.
-texCoord4d(S,T,R,Q) ->
- cast(5270, <<S:?GLdouble,T:?GLdouble,R:?GLdouble,Q:?GLdouble>>).
+%% @doc Write a block of pixels to the frame buffer
+%%
+%% ``gl:drawPixels'' reads pixel data from memory and writes it into the frame buffer relative
+%% to the current raster position, provided that the raster position is valid. Use {@link gl:rasterPos2d/2}
+%% or {@link gl:windowPos2d/2} to set the current raster position; use {@link gl:getBooleanv/1} with
+%% argument `?GL_CURRENT_RASTER_POSITION_VALID' to determine if the specified raster
+%% position is valid, and {@link gl:getBooleanv/1} with argument `?GL_CURRENT_RASTER_POSITION'
+%% to query the raster position.
+%%
+%% Several parameters define the encoding of pixel data in memory and control the processing
+%% of the pixel data before it is placed in the frame buffer. These parameters are set with
+%% four commands: {@link gl:pixelStoref/2} , {@link gl:pixelTransferf/2} , {@link gl:pixelMapfv/3} ,
+%% and {@link gl:pixelZoom/2} . This reference page describes the effects on ``gl:drawPixels''
+%% of many, but not all, of the parameters specified by these four commands.
+%%
+%% Data is read from `Data' as a sequence of signed or unsigned bytes, signed or unsigned
+%% shorts, signed or unsigned integers, or single-precision floating-point values, depending
+%% on `Type' . When `Type' is one of `?GL_UNSIGNED_BYTE', `?GL_BYTE', `?GL_UNSIGNED_SHORT'
+%% , `?GL_SHORT', `?GL_UNSIGNED_INT', `?GL_INT', or `?GL_FLOAT' each
+%% of these bytes, shorts, integers, or floating-point values is interpreted as one color
+%% or depth component, or one index, depending on `Format' . When `Type' is one of `?GL_UNSIGNED_BYTE_3_3_2'
+%% , `?GL_UNSIGNED_SHORT_5_6_5', `?GL_UNSIGNED_SHORT_4_4_4_4', `?GL_UNSIGNED_SHORT_5_5_5_1'
+%% , `?GL_UNSIGNED_INT_8_8_8_8', or `?GL_UNSIGNED_INT_10_10_10_2', each unsigned
+%% value is interpreted as containing all the components for a single pixel, with the color
+%% components arranged according to `Format' . When `Type' is one of `?GL_UNSIGNED_BYTE_2_3_3_REV'
+%% , `?GL_UNSIGNED_SHORT_5_6_5_REV', `?GL_UNSIGNED_SHORT_4_4_4_4_REV', `?GL_UNSIGNED_SHORT_1_5_5_5_REV'
+%% , `?GL_UNSIGNED_INT_8_8_8_8_REV', or `?GL_UNSIGNED_INT_2_10_10_10_REV', each
+%% unsigned value is interpreted as containing all color components, specified by `Format'
+%% , for a single pixel in a reversed order. Indices are always treated individually. Color
+%% components are treated as groups of one, two, three, or four values, again based on `Format'
+%% . Both individual indices and groups of components are referred to as pixels. If `Type'
+%% is `?GL_BITMAP', the data must be unsigned bytes, and `Format' must be either `?GL_COLOR_INDEX'
+%% or `?GL_STENCIL_INDEX'. Each unsigned byte is treated as eight 1-bit pixels, with
+%% bit ordering determined by `?GL_UNPACK_LSB_FIRST' (see {@link gl:pixelStoref/2} ).
+%%
+%% width*height pixels are read from memory, starting at location `Data' . By default,
+%% these pixels are taken from adjacent memory locations, except that after all `Width'
+%% pixels are read, the read pointer is advanced to the next four-byte boundary. The four-byte
+%% row alignment is specified by {@link gl:pixelStoref/2} with argument `?GL_UNPACK_ALIGNMENT'
+%% , and it can be set to one, two, four, or eight bytes. Other pixel store parameters specify
+%% different read pointer advancements, both before the first pixel is read and after all `Width'
+%% pixels are read. See the {@link gl:pixelStoref/2} reference page for details on these options.
+%%
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a block of pixels is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% The width*height pixels that are read from memory are each operated on in the same
+%% way, based on the values of several parameters specified by {@link gl:pixelTransferf/2}
+%% and {@link gl:pixelMapfv/3} . The details of these operations, as well as the target buffer
+%% into which the pixels are drawn, are specific to the format of the pixels, as specified
+%% by `Format' . `Format' can assume one of 13 symbolic values:
+%%
+%% `?GL_COLOR_INDEX': Each pixel is a single value, a color index. It is converted
+%% to fixed-point format, with an unspecified number of bits to the right of the binary point,
+%% regardless of the memory data type. Floating-point values convert to true fixed-point
+%% values. Signed and unsigned integer data is converted with all fraction bits set to 0.
+%% Bitmap data convert to either 0 or 1.
+%%
+%% Each fixed-point index is then shifted left by `?GL_INDEX_SHIFT' bits and added to `?GL_INDEX_OFFSET'
+%% . If `?GL_INDEX_SHIFT' is negative, the shift is to the right. In either case, zero
+%% bits fill otherwise unspecified bit locations in the result.
+%%
+%% If the GL is in RGBA mode, the resulting index is converted to an RGBA pixel with the
+%% help of the `?GL_PIXEL_MAP_I_TO_R', `?GL_PIXEL_MAP_I_TO_G', `?GL_PIXEL_MAP_I_TO_B'
+%% , and `?GL_PIXEL_MAP_I_TO_A' tables. If the GL is in color index mode, and if `?GL_MAP_COLOR'
+%% is true, the index is replaced with the value that it references in lookup table `?GL_PIXEL_MAP_I_TO_I'
+%% . Whether the lookup replacement of the index is done or not, the integer part of the
+%% index is then ANDed with 2 b-1, where b is the number of bits in a color index buffer.
+%%
+%%
+%% The GL then converts the resulting indices or RGBA colors to fragments by attaching the
+%% current raster position `z' coordinate and texture coordinates to each pixel, then
+%% assigning x and y window coordinates to the nth fragment such that x n= x r+n%
+%% width
+%%
+%% y n= y r+|n/width|
+%%
+%% where (x r y r) is the current raster position. These pixel fragments are then treated just like
+%% the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog,
+%% and all the fragment operations are applied before the fragments are written to the frame
+%% buffer.
+%%
+%% `?GL_STENCIL_INDEX': Each pixel is a single value, a stencil index. It is converted
+%% to fixed-point format, with an unspecified number of bits to the right of the binary point,
+%% regardless of the memory data type. Floating-point values convert to true fixed-point
+%% values. Signed and unsigned integer data is converted with all fraction bits set to 0.
+%% Bitmap data convert to either 0 or 1.
+%%
+%% Each fixed-point index is then shifted left by `?GL_INDEX_SHIFT' bits, and added
+%% to `?GL_INDEX_OFFSET'. If `?GL_INDEX_SHIFT' is negative, the shift is to the
+%% right. In either case, zero bits fill otherwise unspecified bit locations in the result.
+%% If `?GL_MAP_STENCIL' is true, the index is replaced with the value that it references
+%% in lookup table `?GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement of the index
+%% is done or not, the integer part of the index is then ANDed with 2 b-1, where b is
+%% the number of bits in the stencil buffer. The resulting stencil indices are then written
+%% to the stencil buffer such that the nth index is written to location
+%%
+%% x n= x r+n% width
+%%
+%% y n= y r+|n/width|
+%%
+%% where (x r y r) is the current raster position. Only the pixel ownership test, the scissor test,
+%% and the stencil writemask affect these write operations.
+%%
+%% `?GL_DEPTH_COMPONENT': Each pixel is a single-depth component. Floating-point data
+%% is converted directly to an internal floating-point format with unspecified precision.
+%% Signed integer data is mapped linearly to the internal floating-point format such that
+%% the most positive representable integer value maps to 1.0, and the most negative representable
+%% value maps to -1.0. Unsigned integer data is mapped similarly: the largest integer value
+%% maps to 1.0, and 0 maps to 0.0. The resulting floating-point depth value is then multiplied
+%% by `?GL_DEPTH_SCALE' and added to `?GL_DEPTH_BIAS'. The result is clamped to
+%% the range [0 1].
+%%
+%% The GL then converts the resulting depth components to fragments by attaching the current
+%% raster position color or color index and texture coordinates to each pixel, then assigning
+%% x and y window coordinates to the nth fragment such that
+%%
+%% x n= x r+n% width
+%%
+%% y n= y r+|n/width|
+%%
+%% where (x r y r) is the current raster position. These pixel fragments are then treated just like
+%% the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog,
+%% and all the fragment operations are applied before the fragments are written to the frame
+%% buffer.
+%%
+%% `?GL_RGBA'
+%%
+%% `?GL_BGRA': Each pixel is a four-component group: For `?GL_RGBA', the red component
+%% is first, followed by green, followed by blue, followed by alpha; for `?GL_BGRA'
+%% the order is blue, green, red and then alpha. Floating-point values are converted directly
+%% to an internal floating-point format with unspecified precision. Signed integer values
+%% are mapped linearly to the internal floating-point format such that the most positive
+%% representable integer value maps to 1.0, and the most negative representable value maps
+%% to -1.0. (Note that this mapping does not convert 0 precisely to 0.0.) Unsigned integer
+%% data is mapped similarly: The largest integer value maps to 1.0, and 0 maps to 0.0. The
+%% resulting floating-point color values are then multiplied by `?GL_c_SCALE' and added
+%% to `?GL_c_BIAS', where `c' is RED, GREEN, BLUE, and ALPHA for the respective
+%% color components. The results are clamped to the range [0 1].
+%%
+%% If `?GL_MAP_COLOR' is true, each color component is scaled by the size of lookup
+%% table `?GL_PIXEL_MAP_c_TO_c', then replaced by the value that it references in that
+%% table. `c' is R, G, B, or A respectively.
+%%
+%% The GL then converts the resulting RGBA colors to fragments by attaching the current
+%% raster position `z' coordinate and texture coordinates to each pixel, then assigning
+%% x and y window coordinates to the nth fragment such that
+%%
+%% x n= x r+n% width
+%%
+%% y n= y r+|n/width|
+%%
+%% where (x r y r) is the current raster position. These pixel fragments are then treated just like
+%% the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog,
+%% and all the fragment operations are applied before the fragments are written to the frame
+%% buffer.
+%%
+%% `?GL_RED': Each pixel is a single red component. This component is converted to
+%% the internal floating-point format in the same way the red component of an RGBA pixel
+%% is. It is then converted to an RGBA pixel with green and blue set to 0, and alpha set
+%% to 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel.
+%%
+%%
+%% `?GL_GREEN': Each pixel is a single green component. This component is converted
+%% to the internal floating-point format in the same way the green component of an RGBA pixel
+%% is. It is then converted to an RGBA pixel with red and blue set to 0, and alpha set to
+%% 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel.
+%%
+%% `?GL_BLUE': Each pixel is a single blue component. This component is converted to
+%% the internal floating-point format in the same way the blue component of an RGBA pixel
+%% is. It is then converted to an RGBA pixel with red and green set to 0, and alpha set to
+%% 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel.
+%%
+%% `?GL_ALPHA': Each pixel is a single alpha component. This component is converted
+%% to the internal floating-point format in the same way the alpha component of an RGBA pixel
+%% is. It is then converted to an RGBA pixel with red, green, and blue set to 0. After this
+%% conversion, the pixel is treated as if it had been read as an RGBA pixel.
+%%
+%% `?GL_RGB'
+%%
+%% `?GL_BGR': Each pixel is a three-component group: red first, followed by green,
+%% followed by blue; for `?GL_BGR', the first component is blue, followed by green and
+%% then red. Each component is converted to the internal floating-point format in the same
+%% way the red, green, and blue components of an RGBA pixel are. The color triple is converted
+%% to an RGBA pixel with alpha set to 1. After this conversion, the pixel is treated as if
+%% it had been read as an RGBA pixel.
+%%
+%% `?GL_LUMINANCE': Each pixel is a single luminance component. This component is converted
+%% to the internal floating-point format in the same way the red component of an RGBA pixel
+%% is. It is then converted to an RGBA pixel with red, green, and blue set to the converted
+%% luminance value, and alpha set to 1. After this conversion, the pixel is treated as if
+%% it had been read as an RGBA pixel.
+%%
+%% `?GL_LUMINANCE_ALPHA': Each pixel is a two-component group: luminance first, followed
+%% by alpha. The two components are converted to the internal floating-point format in the
+%% same way the red component of an RGBA pixel is. They are then converted to an RGBA pixel
+%% with red, green, and blue set to the converted luminance value, and alpha set to the converted
+%% alpha value. After this conversion, the pixel is treated as if it had been read as an
+%% RGBA pixel.
+%%
+%% The following table summarizes the meaning of the valid constants for the `type'
+%% parameter:
+%%
+%% <table><tbody><tr><td>` Type '</td><td>` Corresponding Type '</td></tr></tbody><tbody>
+%% <tr><td>`?GL_UNSIGNED_BYTE'</td><td> unsigned 8-bit integer </td></tr><tr><td>`?GL_BYTE'
+%% </td><td> signed 8-bit integer </td></tr><tr><td>`?GL_BITMAP'</td><td> single bits
+%% in unsigned 8-bit integers </td></tr><tr><td>`?GL_UNSIGNED_SHORT'</td><td> unsigned
+%% 16-bit integer </td></tr><tr><td>`?GL_SHORT'</td><td> signed 16-bit integer </td></tr>
+%% <tr><td>`?GL_UNSIGNED_INT'</td><td> unsigned 32-bit integer </td></tr><tr><td>`?GL_INT'
+%% </td><td> 32-bit integer </td></tr><tr><td>`?GL_FLOAT'</td><td> single-precision
+%% floating-point </td></tr><tr><td>`?GL_UNSIGNED_BYTE_3_3_2'</td><td> unsigned 8-bit
+%% integer </td></tr><tr><td>`?GL_UNSIGNED_BYTE_2_3_3_REV'</td><td> unsigned 8-bit
+%% integer with reversed component ordering </td></tr><tr><td>`?GL_UNSIGNED_SHORT_5_6_5'</td>
+%% <td> unsigned 16-bit integer </td></tr><tr><td>`?GL_UNSIGNED_SHORT_5_6_5_REV'</td><td>
+%% unsigned 16-bit integer with reversed component ordering </td></tr><tr><td>`?GL_UNSIGNED_SHORT_4_4_4_4'
+%% </td><td> unsigned 16-bit integer </td></tr><tr><td>`?GL_UNSIGNED_SHORT_4_4_4_4_REV'</td>
+%% <td> unsigned 16-bit integer with reversed component ordering </td></tr><tr><td>`?GL_UNSIGNED_SHORT_5_5_5_1'
+%% </td><td> unsigned 16-bit integer </td></tr><tr><td>`?GL_UNSIGNED_SHORT_1_5_5_5_REV'</td>
+%% <td> unsigned 16-bit integer with reversed component ordering </td></tr><tr><td>`?GL_UNSIGNED_INT_8_8_8_8'
+%% </td><td> unsigned 32-bit integer </td></tr><tr><td>`?GL_UNSIGNED_INT_8_8_8_8_REV'</td>
+%% <td> unsigned 32-bit integer with reversed component ordering </td></tr><tr><td>`?GL_UNSIGNED_INT_10_10_10_2'
+%% </td><td> unsigned 32-bit integer </td></tr><tr><td>`?GL_UNSIGNED_INT_2_10_10_10_REV'</td>
+%% <td> unsigned 32-bit integer with reversed component ordering </td></tr></tbody></table>
+%%
+%% The rasterization described so far assumes pixel zoom factors of 1. If {@link gl:pixelZoom/2}
+%% is used to change the x and y pixel zoom factors, pixels are converted to fragments
+%% as follows. If (x r y r) is the current raster position, and a given pixel is in the nth column
+%% and mth row of the pixel rectangle, then fragments are generated for pixels whose centers
+%% are in the rectangle with corners at
+%%
+%% (x r+(zoom x) n y r+(zoom y) m)
+%%
+%% (x r+(zoom x)(n+1) y r+(zoom y)(m+1))
+%%
+%% where zoom x is the value of `?GL_ZOOM_X' and zoom y is the value of `?GL_ZOOM_Y'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawPixels.xml">external</a> documentation.
+-spec drawPixels(Width, Height, Format, Type, Pixels) -> ok when Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+drawPixels(Width,Height,Format,Type,Pixels) when is_integer(Pixels) ->
+ cast(5236, <<Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
+drawPixels(Width,Height,Format,Type,Pixels) ->
+ send_bin(Pixels),
+ cast(5237, <<Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec ({S,T,R,Q}) -> ok
-%% @equiv texCoord4d(S,T,R,Q)
--spec texCoord4dv({float(),float(),float(),float()}) -> ok.
-texCoord4dv({S,T,R,Q}) -> texCoord4d(S,T,R,Q).
+%% @doc Copy pixels in the frame buffer
+%%
+%% ``gl:copyPixels'' copies a screen-aligned rectangle of pixels from the specified frame
+%% buffer location to a region relative to the current raster position. Its operation is
+%% well defined only if the entire pixel source region is within the exposed portion of the
+%% window. Results of copies from outside the window, or from regions of the window that
+%% are not exposed, are hardware dependent and undefined.
+%%
+%% `X' and `Y' specify the window coordinates of the lower left corner of the rectangular
+%% region to be copied. `Width' and `Height' specify the dimensions of the rectangular
+%% region to be copied. Both `Width' and `Height' must not be negative.
+%%
+%% Several parameters control the processing of the pixel data while it is being copied.
+%% These parameters are set with three commands: {@link gl:pixelTransferf/2} , {@link gl:pixelMapfv/3}
+%% , and {@link gl:pixelZoom/2} . This reference page describes the effects on ``gl:copyPixels''
+%% of most, but not all, of the parameters specified by these three commands.
+%%
+%% ``gl:copyPixels'' copies values from each pixel with the lower left-hand corner at (x+i
+%% y+j)
+%% for 0&lt;= i&lt; width and 0&lt;= j&lt; height. This pixel is said to be the ith
+%% pixel in the jth row. Pixels are copied in row order from the lowest to the highest
+%% row, left to right in each row.
+%%
+%% `Type' specifies whether color, depth, or stencil data is to be copied. The details
+%% of the transfer for each data type are as follows:
+%%
+%% `?GL_COLOR': Indices or RGBA colors are read from the buffer currently specified
+%% as the read source buffer (see {@link gl:readBuffer/1} ). If the GL is in color index mode,
+%% each index that is read from this buffer is converted to a fixed-point format with an
+%% unspecified number of bits to the right of the binary point. Each index is then shifted
+%% left by `?GL_INDEX_SHIFT' bits, and added to `?GL_INDEX_OFFSET'. If `?GL_INDEX_SHIFT'
+%% is negative, the shift is to the right. In either case, zero bits fill otherwise unspecified
+%% bit locations in the result. If `?GL_MAP_COLOR' is true, the index is replaced with
+%% the value that it references in lookup table `?GL_PIXEL_MAP_I_TO_I'. Whether the
+%% lookup replacement of the index is done or not, the integer part of the index is then
+%% ANDed with 2 b-1, where b is the number of bits in a color index buffer.
+%%
+%% If the GL is in RGBA mode, the red, green, blue, and alpha components of each pixel that
+%% is read are converted to an internal floating-point format with unspecified precision.
+%% The conversion maps the largest representable component value to 1.0, and component value
+%% 0 to 0.0. The resulting floating-point color values are then multiplied by `?GL_c_SCALE'
+%% and added to `?GL_c_BIAS', where `c' is RED, GREEN, BLUE, and ALPHA for the
+%% respective color components. The results are clamped to the range [0,1]. If `?GL_MAP_COLOR'
+%% is true, each color component is scaled by the size of lookup table `?GL_PIXEL_MAP_c_TO_c'
+%% , then replaced by the value that it references in that table. `c' is R, G, B, or
+%% A.
+%%
+%% If the ARB_imaging extension is supported, the color values may be additionally processed
+%% by color-table lookups, color-matrix transformations, and convolution filters.
+%%
+%% The GL then converts the resulting indices or RGBA colors to fragments by attaching the
+%% current raster position `z' coordinate and texture coordinates to each pixel, then
+%% assigning window coordinates (x r+i y r+j), where (x r y r) is the current raster position, and the pixel was
+%% the ith pixel in the jth row. These pixel fragments are then treated just like the
+%% fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, and
+%% all the fragment operations are applied before the fragments are written to the frame
+%% buffer.
+%%
+%% `?GL_DEPTH': Depth values are read from the depth buffer and converted directly
+%% to an internal floating-point format with unspecified precision. The resulting floating-point
+%% depth value is then multiplied by `?GL_DEPTH_SCALE' and added to `?GL_DEPTH_BIAS'
+%% . The result is clamped to the range [0,1].
+%%
+%% The GL then converts the resulting depth components to fragments by attaching the current
+%% raster position color or color index and texture coordinates to each pixel, then assigning
+%% window coordinates (x r+i y r+j), where (x r y r) is the current raster position, and the pixel was the ith
+%% pixel in the jth row. These pixel fragments are then treated just like the fragments
+%% generated by rasterizing points, lines, or polygons. Texture mapping, fog, and all the
+%% fragment operations are applied before the fragments are written to the frame buffer.
+%%
+%% `?GL_STENCIL': Stencil indices are read from the stencil buffer and converted to
+%% an internal fixed-point format with an unspecified number of bits to the right of the
+%% binary point. Each fixed-point index is then shifted left by `?GL_INDEX_SHIFT' bits,
+%% and added to `?GL_INDEX_OFFSET'. If `?GL_INDEX_SHIFT' is negative, the shift
+%% is to the right. In either case, zero bits fill otherwise unspecified bit locations in
+%% the result. If `?GL_MAP_STENCIL' is true, the index is replaced with the value that
+%% it references in lookup table `?GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement
+%% of the index is done or not, the integer part of the index is then ANDed with 2 b-1,
+%% where b is the number of bits in the stencil buffer. The resulting stencil indices are
+%% then written to the stencil buffer such that the index read from the ith location of
+%% the jth row is written to location (x r+i y r+j), where (x r y r) is the current raster position. Only the
+%% pixel ownership test, the scissor test, and the stencil writemask affect these write operations.
+%%
+%%
+%% The rasterization described thus far assumes pixel zoom factors of 1.0. If {@link gl:pixelZoom/2}
+%% is used to change the x and y pixel zoom factors, pixels are converted to fragments
+%% as follows. If (x r y r) is the current raster position, and a given pixel is in the ith location
+%% in the jth row of the source pixel rectangle, then fragments are generated for pixels
+%% whose centers are in the rectangle with corners at
+%%
+%% (x r+(zoom x) i y r+(zoom y) j)
+%%
+%% and
+%%
+%% (x r+(zoom x)(i+1) y r+(zoom y)(j+1))
+%%
+%% where zoom x is the value of `?GL_ZOOM_X' and zoom y is the value of `?GL_ZOOM_Y'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyPixels.xml">external</a> documentation.
+-spec copyPixels(X, Y, Width, Height, Type) -> ok when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Type :: enum().
+copyPixels(X,Y,Width,Height,Type) ->
+ cast(5238, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Type:?GLenum>>).
-%% @spec (S::float(),T::float(),R::float(),Q::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord4f(float(),float(),float(),float()) -> ok.
-texCoord4f(S,T,R,Q) ->
- cast(5271, <<S:?GLfloat,T:?GLfloat,R:?GLfloat,Q:?GLfloat>>).
+%% @doc Set front and back function and reference value for stencil testing
+%%
+%% Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis.
+%% Stencil planes are first drawn into using GL drawing primitives, then geometry and images
+%% are rendered using the stencil planes to mask out portions of the screen. Stenciling is
+%% typically used in multipass rendering algorithms to achieve special effects, such as decals,
+%% outlining, and constructive solid geometry rendering.
+%%
+%% The stencil test conditionally eliminates a pixel based on the outcome of a comparison
+%% between the reference value and the value in the stencil buffer. To enable and disable
+%% the test, call {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_STENCIL_TEST'
+%% . To specify actions based on the outcome of the stencil test, call {@link gl:stencilOp/3}
+%% or {@link gl:stencilOpSeparate/4} .
+%%
+%% There can be two separate sets of `Func' , `Ref' , and `Mask' parameters;
+%% one affects back-facing polygons, and the other affects front-facing polygons as well
+%% as other non-polygon primitives. {@link gl:stencilFunc/3} sets both front and back stencil
+%% state to the same values. Use {@link gl:stencilFuncSeparate/4} to set front and back stencil
+%% state to different values.
+%%
+%% `Func' is a symbolic constant that determines the stencil comparison function. It
+%% accepts one of eight values, shown in the following list. `Ref' is an integer reference
+%% value that is used in the stencil comparison. It is clamped to the range [0 2 n-1], where n
+%% is the number of bitplanes in the stencil buffer. `Mask' is bitwise ANDed with both
+%% the reference value and the stored stencil value, with the ANDed values participating
+%% in the comparison.
+%%
+%% If `stencil' represents the value stored in the corresponding stencil buffer location,
+%% the following list shows the effect of each comparison function that can be specified by `Func'
+%% . Only if the comparison succeeds is the pixel passed through to the next stage in the
+%% rasterization process (see {@link gl:stencilOp/3} ). All tests treat `stencil' values
+%% as unsigned integers in the range [0 2 n-1], where n is the number of bitplanes in the stencil
+%% buffer.
+%%
+%% The following values are accepted by `Func' :
+%%
+%% `?GL_NEVER': Always fails.
+%%
+%% `?GL_LESS': Passes if ( `Ref' &amp; `Mask' ) &lt; ( `stencil' &amp; `Mask'
+%% ).
+%%
+%% `?GL_LEQUAL': Passes if ( `Ref' &amp; `Mask' ) &lt;= ( `stencil'
+%% &amp; `Mask' ).
+%%
+%% `?GL_GREATER': Passes if ( `Ref' &amp; `Mask' ) &gt; ( `stencil'
+%% &amp; `Mask' ).
+%%
+%% `?GL_GEQUAL': Passes if ( `Ref' &amp; `Mask' ) &gt;= ( `stencil'
+%% &amp; `Mask' ).
+%%
+%% `?GL_EQUAL': Passes if ( `Ref' &amp; `Mask' ) = ( `stencil' &amp; `Mask'
+%% ).
+%%
+%% `?GL_NOTEQUAL': Passes if ( `Ref' &amp; `Mask' ) != ( `stencil' &amp;
+%% `Mask' ).
+%%
+%% `?GL_ALWAYS': Always passes.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml">external</a> documentation.
+-spec stencilFunc(Func, Ref, Mask) -> ok when Func :: enum(),Ref :: integer(),Mask :: integer().
+stencilFunc(Func,Ref,Mask) ->
+ cast(5239, <<Func:?GLenum,Ref:?GLint,Mask:?GLuint>>).
-%% @spec ({S,T,R,Q}) -> ok
-%% @equiv texCoord4f(S,T,R,Q)
--spec texCoord4fv({float(),float(),float(),float()}) -> ok.
-texCoord4fv({S,T,R,Q}) -> texCoord4f(S,T,R,Q).
+%% @doc Control the front and back writing of individual bits in the stencil planes
+%%
+%% ``gl:stencilMask'' controls the writing of individual bits in the stencil planes. The
+%% least significant n bits of `Mask' , where n is the number of bits in the stencil
+%% buffer, specify a mask. Where a 1 appears in the mask, it's possible to write to the corresponding
+%% bit in the stencil buffer. Where a 0 appears, the corresponding bit is write-protected.
+%% Initially, all bits are enabled for writing.
+%%
+%% There can be two separate `Mask' writemasks; one affects back-facing polygons, and
+%% the other affects front-facing polygons as well as other non-polygon primitives. {@link gl:stencilMask/1}
+%% sets both front and back stencil writemasks to the same values. Use {@link gl:stencilMaskSeparate/2}
+%% to set front and back stencil writemasks to different values.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilMask.xml">external</a> documentation.
+-spec stencilMask(Mask) -> ok when Mask :: integer().
+stencilMask(Mask) ->
+ cast(5240, <<Mask:?GLuint>>).
-%% @spec (S::integer(),T::integer(),R::integer(),Q::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord4i(integer(),integer(),integer(),integer()) -> ok.
-texCoord4i(S,T,R,Q) ->
- cast(5272, <<S:?GLint,T:?GLint,R:?GLint,Q:?GLint>>).
+%% @doc Set front and back stencil test actions
+%%
+%% Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis.
+%% You draw into the stencil planes using GL drawing primitives, then render geometry and
+%% images, using the stencil planes to mask out portions of the screen. Stenciling is typically
+%% used in multipass rendering algorithms to achieve special effects, such as decals, outlining,
+%% and constructive solid geometry rendering.
+%%
+%% The stencil test conditionally eliminates a pixel based on the outcome of a comparison
+%% between the value in the stencil buffer and a reference value. To enable and disable the
+%% test, call {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_STENCIL_TEST'
+%% ; to control it, call {@link gl:stencilFunc/3} or {@link gl:stencilFuncSeparate/4} .
+%%
+%% There can be two separate sets of `Sfail' , `Dpfail' , and `Dppass' parameters;
+%% one affects back-facing polygons, and the other affects front-facing polygons as well
+%% as other non-polygon primitives. {@link gl:stencilOp/3} sets both front and back stencil
+%% state to the same values. Use {@link gl:stencilOpSeparate/4} to set front and back stencil
+%% state to different values.
+%%
+%% ``gl:stencilOp'' takes three arguments that indicate what happens to the stored stencil
+%% value while stenciling is enabled. If the stencil test fails, no change is made to the
+%% pixel's color or depth buffers, and `Sfail' specifies what happens to the stencil
+%% buffer contents. The following eight actions are possible.
+%%
+%% `?GL_KEEP': Keeps the current value.
+%%
+%% `?GL_ZERO': Sets the stencil buffer value to 0.
+%%
+%% `?GL_REPLACE': Sets the stencil buffer value to `ref', as specified by {@link gl:stencilFunc/3}
+%% .
+%%
+%% `?GL_INCR': Increments the current stencil buffer value. Clamps to the maximum representable
+%% unsigned value.
+%%
+%% `?GL_INCR_WRAP': Increments the current stencil buffer value. Wraps stencil buffer
+%% value to zero when incrementing the maximum representable unsigned value.
+%%
+%% `?GL_DECR': Decrements the current stencil buffer value. Clamps to 0.
+%%
+%% `?GL_DECR_WRAP': Decrements the current stencil buffer value. Wraps stencil buffer
+%% value to the maximum representable unsigned value when decrementing a stencil buffer value
+%% of zero.
+%%
+%% `?GL_INVERT': Bitwise inverts the current stencil buffer value.
+%%
+%% Stencil buffer values are treated as unsigned integers. When incremented and decremented,
+%% values are clamped to 0 and 2 n-1, where n is the value returned by querying `?GL_STENCIL_BITS'
+%% .
+%%
+%% The other two arguments to ``gl:stencilOp'' specify stencil buffer actions that depend
+%% on whether subsequent depth buffer tests succeed ( `Dppass' ) or fail ( `Dpfail' )
+%% (see {@link gl:depthFunc/1} ). The actions are specified using the same eight symbolic constants
+%% as `Sfail' . Note that `Dpfail' is ignored when there is no depth buffer, or
+%% when the depth buffer is not enabled. In these cases, `Sfail' and `Dppass' specify
+%% stencil action when the stencil test fails and passes, respectively.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml">external</a> documentation.
+-spec stencilOp(Fail, Zfail, Zpass) -> ok when Fail :: enum(),Zfail :: enum(),Zpass :: enum().
+stencilOp(Fail,Zfail,Zpass) ->
+ cast(5241, <<Fail:?GLenum,Zfail:?GLenum,Zpass:?GLenum>>).
-%% @spec ({S,T,R,Q}) -> ok
-%% @equiv texCoord4i(S,T,R,Q)
--spec texCoord4iv({integer(),integer(),integer(),integer()}) -> ok.
-texCoord4iv({S,T,R,Q}) -> texCoord4i(S,T,R,Q).
+%% @doc Specify the clear value for the stencil buffer
+%%
+%% ``gl:clearStencil'' specifies the index used by {@link gl:clear/1} to clear the stencil
+%% buffer. `S' is masked with 2 m-1, where m is the number of bits in the stencil
+%% buffer.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearStencil.xml">external</a> documentation.
+-spec clearStencil(S) -> ok when S :: integer().
+clearStencil(S) ->
+ cast(5242, <<S:?GLint>>).
-%% @spec (S::integer(),T::integer(),R::integer(),Q::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord4s(integer(),integer(),integer(),integer()) -> ok.
-texCoord4s(S,T,R,Q) ->
- cast(5273, <<S:?GLshort,T:?GLshort,R:?GLshort,Q:?GLshort>>).
+%% @doc Control the generation of texture coordinates
+%%
+%% ``gl:texGen'' selects a texture-coordinate generation function or supplies coefficients
+%% for one of the functions. `Coord' names one of the (`s', `t', `r', `q'
+%% ) texture coordinates; it must be one of the symbols `?GL_S', `?GL_T', `?GL_R'
+%% , or `?GL_Q'. `Pname' must be one of three symbolic constants: `?GL_TEXTURE_GEN_MODE'
+%% , `?GL_OBJECT_PLANE', or `?GL_EYE_PLANE'. If `Pname' is `?GL_TEXTURE_GEN_MODE'
+%% , then `Params' chooses a mode, one of `?GL_OBJECT_LINEAR', `?GL_EYE_LINEAR'
+%% , `?GL_SPHERE_MAP', `?GL_NORMAL_MAP', or `?GL_REFLECTION_MAP'. If `Pname'
+%% is either `?GL_OBJECT_PLANE' or `?GL_EYE_PLANE', `Params' contains coefficients
+%% for the corresponding texture generation function.
+%%
+%% If the texture generation function is `?GL_OBJECT_LINEAR', the function
+%%
+%% g= p 1*x o+p 2*y o+p 3*z o+p 4*w o
+%%
+%% is used, where g is the value computed for the coordinate named in `Coord' , p 1,
+%% p 2, p 3, and p 4 are the four values supplied in `Params' , and x o, y o, z o,
+%% and w o are the object coordinates of the vertex. This function can be used, for example,
+%% to texture-map terrain using sea level as a reference plane (defined by p 1, p 2, p
+%% 3, and p 4). The altitude of a terrain vertex is computed by the `?GL_OBJECT_LINEAR'
+%% coordinate generation function as its distance from sea level; that altitude can then
+%% be used to index the texture image to map white snow onto peaks and green grass onto foothills.
+%%
+%%
+%% If the texture generation function is `?GL_EYE_LINEAR', the function
+%%
+%% g=(p 1)"*x e+(p 2)"*y e+(p 3)"*z e+(p 4)"*w e
+%%
+%% is used, where
+%%
+%% ((p 1)" (p 2)" (p 3)" (p 4)")=(p 1 p 2 p 3 p 4) M -1
+%%
+%% and x e, y e, z e, and w e are the eye coordinates of the vertex, p 1, p 2, p 3,
+%% and p 4 are the values supplied in `Params' , and M is the modelview matrix when ``gl:texGen''
+%% is invoked. If M is poorly conditioned or singular, texture coordinates generated by
+%% the resulting function may be inaccurate or undefined.
+%%
+%% Note that the values in `Params' define a reference plane in eye coordinates. The
+%% modelview matrix that is applied to them may not be the same one in effect when the polygon
+%% vertices are transformed. This function establishes a field of texture coordinates that
+%% can produce dynamic contour lines on moving objects.
+%%
+%% If the texture generation function is `?GL_SPHERE_MAP' and `Coord' is either `?GL_S'
+%% or `?GL_T', s and t texture coordinates are generated as follows. Let `u'
+%% be the unit vector pointing from the origin to the polygon vertex (in eye coordinates).
+%% Let `n' sup prime be the current normal, after transformation to eye coordinates.
+%% Let
+%%
+%% f=(f x f y f z) T be the reflection vector such that
+%%
+%% f= u-2 n" (n") T u
+%%
+%% Finally, let m= 2 ((f x) 2+(f y) 2+(f z+1) 2). Then the values assigned to the s and t texture coordinates
+%% are
+%%
+%% s= f x/m+1/2
+%%
+%% t= f y/m+1/2
+%%
+%% To enable or disable a texture-coordinate generation function, call {@link gl:enable/1}
+%% or {@link gl:enable/1} with one of the symbolic texture-coordinate names (`?GL_TEXTURE_GEN_S'
+%% , `?GL_TEXTURE_GEN_T', `?GL_TEXTURE_GEN_R', or `?GL_TEXTURE_GEN_Q') as
+%% the argument. When enabled, the specified texture coordinate is computed according to
+%% the generating function associated with that coordinate. When disabled, subsequent vertices
+%% take the specified texture coordinate from the current set of texture coordinates. Initially,
+%% all texture generation functions are set to `?GL_EYE_LINEAR' and are disabled. Both
+%% s plane equations are (1, 0, 0, 0), both t plane equations are (0, 1, 0, 0), and all
+%% r and q plane equations are (0, 0, 0, 0).
+%%
+%% When the ARB_multitexture extension is supported, ``gl:texGen'' sets the texture generation
+%% parameters for the currently active texture unit, selected with {@link gl:activeTexture/1} .
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml">external</a> documentation.
+-spec texGend(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: float().
+texGend(Coord,Pname,Param) ->
+ cast(5243, <<Coord:?GLenum,Pname:?GLenum,Param:?GLdouble>>).
-%% @spec ({S,T,R,Q}) -> ok
-%% @equiv texCoord4s(S,T,R,Q)
--spec texCoord4sv({integer(),integer(),integer(),integer()}) -> ok.
-texCoord4sv({S,T,R,Q}) -> texCoord4s(S,T,R,Q).
+%% @doc
+%% See {@link texGend/3}
+-spec texGenf(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: float().
+texGenf(Coord,Pname,Param) ->
+ cast(5244, <<Coord:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
-%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoordPointer.xml">external</a> documentation.
--spec texCoordPointer(integer(),enum(),integer(),offset()|mem()) -> ok.
-texCoordPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) ->
- cast(5274, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
-texCoordPointer(Size,Type,Stride,Pointer) ->
- send_bin(Pointer),
- cast(5275, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
+%% @doc
+%% See {@link texGend/3}
+-spec texGeni(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: integer().
+texGeni(Coord,Pname,Param) ->
+ cast(5245, <<Coord:?GLenum,Pname:?GLenum,Param:?GLint>>).
-%% @spec (Target::enum(),Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnvf.xml">external</a> documentation.
--spec texEnvf(enum(),enum(),float()) -> ok.
-texEnvf(Target,Pname,Param) ->
- cast(5276, <<Target:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
+%% @doc
+%% See {@link texGend/3}
+-spec texGendv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: {float()}.
+texGendv(Coord,Pname,Params) ->
+ cast(5246, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,0:32,
+ (<< <<C:?GLdouble>> ||C <- tuple_to_list(Params)>>)/binary>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml">external</a> documentation.
--spec texEnvfv(enum(),enum(),{float()}) -> ok.
-texEnvfv(Target,Pname,Params) ->
- cast(5277, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+%% @doc
+%% See {@link texGend/3}
+-spec texGenfv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: {float()}.
+texGenfv(Coord,Pname,Params) ->
+ cast(5247, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Target::enum(),Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnvi.xml">external</a> documentation.
--spec texEnvi(enum(),enum(),integer()) -> ok.
+%% @doc
+%% See {@link texGend/3}
+-spec texGeniv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: {integer()}.
+texGeniv(Coord,Pname,Params) ->
+ cast(5248, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
+
+%% @doc Return texture coordinate generation parameters
+%%
+%% ``gl:getTexGen'' returns in `Params' selected parameters of a texture coordinate
+%% generation function that was specified using {@link gl:texGend/3} . `Coord' names one
+%% of the (`s', `t', `r', `q') texture coordinates, using the symbolic
+%% constant `?GL_S', `?GL_T', `?GL_R', or `?GL_Q'.
+%%
+%% `Pname' specifies one of three symbolic names:
+%%
+%% `?GL_TEXTURE_GEN_MODE': `Params' returns the single-valued texture generation
+%% function, a symbolic constant. The initial value is `?GL_EYE_LINEAR'.
+%%
+%% `?GL_OBJECT_PLANE': `Params' returns the four plane equation coefficients that
+%% specify object linear-coordinate generation. Integer values, when requested, are mapped
+%% directly from the internal floating-point representation.
+%%
+%% `?GL_EYE_PLANE': `Params' returns the four plane equation coefficients that
+%% specify eye linear-coordinate generation. Integer values, when requested, are mapped directly
+%% from the internal floating-point representation. The returned values are those maintained
+%% in eye coordinates. They are not equal to the values specified using {@link gl:texGend/3} ,
+%% unless the modelview matrix was identity when {@link gl:texGend/3} was called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexGen.xml">external</a> documentation.
+-spec getTexGendv(Coord, Pname) -> {float(),float(),float(),float()} when Coord :: enum(),Pname :: enum().
+getTexGendv(Coord,Pname) ->
+ call(5249, <<Coord:?GLenum,Pname:?GLenum>>).
+
+%% @doc
+%% See {@link getTexGendv/2}
+-spec getTexGenfv(Coord, Pname) -> {float(),float(),float(),float()} when Coord :: enum(),Pname :: enum().
+getTexGenfv(Coord,Pname) ->
+ call(5250, <<Coord:?GLenum,Pname:?GLenum>>).
+
+%% @doc
+%% See {@link getTexGendv/2}
+-spec getTexGeniv(Coord, Pname) -> {integer(),integer(),integer(),integer()} when Coord :: enum(),Pname :: enum().
+getTexGeniv(Coord,Pname) ->
+ call(5251, <<Coord:?GLenum,Pname:?GLenum>>).
+
+%% @doc glTexEnvf
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnvf.xml">external</a> documentation.
+-spec texEnvf(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: float().
+texEnvf(Target,Pname,Param) ->
+ cast(5252, <<Target:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
+
+%% @doc glTexEnvi
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnvi.xml">external</a> documentation.
+-spec texEnvi(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: integer().
texEnvi(Target,Pname,Param) ->
- cast(5278, <<Target:?GLenum,Pname:?GLenum,Param:?GLint>>).
+ cast(5253, <<Target:?GLenum,Pname:?GLenum,Param:?GLint>>).
+
+%% @doc Set texture environment parameters
+%%
+%% A texture environment specifies how texture values are interpreted when a fragment is
+%% textured. When `Target' is `?GL_TEXTURE_FILTER_CONTROL', `Pname' must be `?GL_TEXTURE_LOD_BIAS'
+%% . When `Target' is `?GL_TEXTURE_ENV', `Pname' can be `?GL_TEXTURE_ENV_MODE'
+%% , `?GL_TEXTURE_ENV_COLOR', `?GL_COMBINE_RGB', `?GL_COMBINE_ALPHA', `?GL_RGB_SCALE'
+%% , `?GL_ALPHA_SCALE', `?GL_SRC0_RGB', `?GL_SRC1_RGB', `?GL_SRC2_RGB', `?GL_SRC0_ALPHA'
+%% , `?GL_SRC1_ALPHA', or `?GL_SRC2_ALPHA'.
+%%
+%% If `Pname' is `?GL_TEXTURE_ENV_MODE', then `Params' is (or points to)
+%% the symbolic name of a texture function. Six texture functions may be specified: `?GL_ADD'
+%% , `?GL_MODULATE', `?GL_DECAL', `?GL_BLEND', `?GL_REPLACE', or `?GL_COMBINE'
+%% .
+%%
+%% The following table shows the correspondence of filtered texture values R t, G t, B t,
+%% A t, L t, I t to texture source components. C s and A s are used by the texture functions
+%% described below.
+%%
+%% <table><tbody><tr><td> Texture Base Internal Format </td><td> C s</td><td> A s</td></tr></tbody>
+%% <tbody><tr><td>`?GL_ALPHA'</td><td> (0, 0, 0) </td><td> A t</td></tr><tr><td>`?GL_LUMINANCE'
+%% </td><td> ( L t, L t, L t ) </td><td> 1 </td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td>
+%% <td> ( L t, L t, L t ) </td><td> A t</td></tr><tr><td>`?GL_INTENSITY'</td><td> (
+%% I t, I t, I t ) </td><td> I t</td></tr><tr><td>`?GL_RGB'</td><td> ( R t, G t, B
+%% t ) </td><td> 1 </td></tr><tr><td>`?GL_RGBA'</td><td> ( R t, G t, B t ) </td><td>
+%% A t</td></tr></tbody></table>
+%%
+%% A texture function acts on the fragment to be textured using the texture image value
+%% that applies to the fragment (see {@link gl:texParameterf/3} ) and produces an RGBA color
+%% for that fragment. The following table shows how the RGBA color is produced for each of
+%% the first five texture functions that can be chosen. C is a triple of color values (RGB)
+%% and A is the associated alpha value. RGBA values extracted from a texture image are in
+%% the range [0,1]. The subscript p refers to the color computed from the previous texture
+%% stage (or the incoming fragment if processing texture stage 0), the subscript s to the
+%% texture source color, the subscript c to the texture environment color, and the subscript
+%% v indicates a value produced by the texture function.
+%%
+%% <table><tbody><tr><td> Texture Base Internal Format </td><td>`?Value'</td><td>`?GL_REPLACE'
+%% Function </td><td>`?GL_MODULATE' Function </td><td>`?GL_DECAL' Function </td><td>
+%% `?GL_BLEND' Function </td><td>`?GL_ADD' Function </td></tr></tbody><tbody><tr><td>
+%% `?GL_ALPHA'</td><td> C v=</td><td> C p</td><td> C p</td><td> undefined </td><td> C p</td>
+%% <td> C p</td></tr><tr><td></td><td> A v=</td><td> A s</td><td> A p A s</td><td></td><td>
+%% A v= A p A s</td><td> A p A s</td></tr><tr><td>`?GL_LUMINANCE'</td><td> C v=</td><td>
+%% C s</td><td> C p C s</td><td> undefined </td><td> C p (1-C s)+C c C s</td><td> C p+C s</td></tr>
+%% <tr><td> (or 1) </td><td> A v=</td><td> A p</td><td> A p</td><td></td><td> A p</td><td> A
+%% p</td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td><td> C v=</td><td> C s</td><td> C p C
+%% s</td><td> undefined </td><td> C p (1-C s)+C c C s</td><td> C p+C s</td></tr><tr><td> (or 2) </td>
+%% <td> A v=</td><td> A s</td><td> A p A s</td><td></td><td> A p A s</td><td> A p A s</td>
+%% </tr><tr><td>`?GL_INTENSITY'</td><td> C v=</td><td> C s</td><td> C p C s</td><td>
+%% undefined </td><td> C p (1-C s)+C c C s</td><td> C p+C s</td></tr><tr><td></td><td> A v=</td><td>
+%% A s</td><td> A p A s</td><td></td><td> A p (1-A s)+A c A s</td><td> A p+A s</td></tr><tr><td>`?GL_RGB'
+%% </td><td> C v=</td><td> C s</td><td> C p C s</td><td> C s</td><td> C p (1-C s)+C c C s</td><td>
+%% C p+C s</td></tr><tr><td> (or 3) </td><td> A v=</td><td> A p</td><td> A p</td><td> A p</td>
+%% <td> A p</td><td> A p</td></tr><tr><td>`?GL_RGBA'</td><td> C v=</td><td> C s</td><td>
+%% C p C s</td><td> C p (1-A s)+C s A s</td><td> C p (1-C s)+C c C s</td><td> C p+C s</td></tr><tr><td>
+%% (or 4) </td><td> A v=</td><td> A s</td><td> A p A s</td><td> A p</td><td> A p A s</td><td>
+%% A p A s</td></tr></tbody></table>
+%%
+%% If `Pname' is `?GL_TEXTURE_ENV_MODE', and `Params' is `?GL_COMBINE',
+%% the form of the texture function depends on the values of `?GL_COMBINE_RGB' and `?GL_COMBINE_ALPHA'
+%% .
+%%
+%% The following describes how the texture sources, as specified by `?GL_SRC0_RGB', `?GL_SRC1_RGB'
+%% , `?GL_SRC2_RGB', `?GL_SRC0_ALPHA', `?GL_SRC1_ALPHA', and `?GL_SRC2_ALPHA'
+%% , are combined to produce a final texture color. In the following tables, `?GL_SRC0_c'
+%% is represented by Arg0, `?GL_SRC1_c' is represented by Arg1, and `?GL_SRC2_c'
+%% is represented by Arg2.
+%%
+%% `?GL_COMBINE_RGB' accepts any of `?GL_REPLACE', `?GL_MODULATE', `?GL_ADD'
+%% , `?GL_ADD_SIGNED', `?GL_INTERPOLATE', `?GL_SUBTRACT', `?GL_DOT3_RGB',
+%% or `?GL_DOT3_RGBA'.
+%%
+%% <table><tbody><tr><td>`?GL_COMBINE_RGB'</td><td>` Texture Function '</td></tr></tbody>
+%% <tbody><tr><td>`?GL_REPLACE'</td><td> Arg0</td></tr><tr><td>`?GL_MODULATE'</td><td>
+%% Arg0*Arg1</td></tr><tr><td>`?GL_ADD'</td><td> Arg0+Arg1</td></tr><tr><td>`?GL_ADD_SIGNED'
+%% </td><td> Arg0+Arg1-0.5</td></tr><tr><td>`?GL_INTERPOLATE'</td><td> Arg0*Arg2+Arg1*(1-
+%% Arg2)</td>
+%% </tr><tr><td>`?GL_SUBTRACT'</td><td> Arg0-Arg1</td></tr><tr><td>`?GL_DOT3_RGB'
+%% or `?GL_DOT3_RGBA'</td><td> 4*((((Arg0 r)-0.5)*((Arg1 r)-0.5))+(((Arg0 g)-0.5)*((Arg1 g)-0.5))+(((Arg0 b)-0.5)*((Arg1 b)-0.5)))</td></tr></tbody></table>
+%%
+%% The scalar results for `?GL_DOT3_RGB' and `?GL_DOT3_RGBA' are placed into each
+%% of the 3 (RGB) or 4 (RGBA) components on output.
+%%
+%% Likewise, `?GL_COMBINE_ALPHA' accepts any of `?GL_REPLACE', `?GL_MODULATE',
+%% `?GL_ADD', `?GL_ADD_SIGNED', `?GL_INTERPOLATE', or `?GL_SUBTRACT'.
+%% The following table describes how alpha values are combined:
+%%
+%% <table><tbody><tr><td>`?GL_COMBINE_ALPHA'</td><td>` Texture Function '</td></tr>
+%% </tbody><tbody><tr><td>`?GL_REPLACE'</td><td> Arg0</td></tr><tr><td>`?GL_MODULATE'
+%% </td><td> Arg0*Arg1</td></tr><tr><td>`?GL_ADD'</td><td> Arg0+Arg1</td></tr><tr><td>`?GL_ADD_SIGNED'
+%% </td><td> Arg0+Arg1-0.5</td></tr><tr><td>`?GL_INTERPOLATE'</td><td> Arg0*Arg2+Arg1*(1-
+%% Arg2)</td>
+%% </tr><tr><td>`?GL_SUBTRACT'</td><td> Arg0-Arg1</td></tr></tbody></table>
+%%
+%% In the following tables, the value C s represents the color sampled from the currently
+%% bound texture, C c represents the constant texture-environment color, C f represents
+%% the primary color of the incoming fragment, and C p represents the color computed from
+%% the previous texture stage or C f if processing texture stage 0. Likewise, A s, A c,
+%% A f, and A p represent the respective alpha values.
+%%
+%% The following table describes the values assigned to Arg0, Arg1, and Arg2 based upon
+%% the RGB sources and operands:
+%%
+%% <table><tbody><tr><td>`?GL_SRCn_RGB'</td><td>`?GL_OPERANDn_RGB'</td><td>` Argument Value '
+%% </td></tr></tbody><tbody><tr><td>`?GL_TEXTURE'</td><td>`?GL_SRC_COLOR'</td><td>(C
+%% s)</td>
+%% </tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_COLOR'</td><td> 1-(C s)</td></tr><tr><td></td><td>
+%% `?GL_SRC_ALPHA'</td><td>(A s)</td></tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_ALPHA'</td>
+%% <td> 1-(A s)</td></tr><tr><td>`?GL_TEXTUREn'</td><td>`?GL_SRC_COLOR'</td><td>(C s)</td></tr>
+%% <tr><td></td><td>`?GL_ONE_MINUS_SRC_COLOR'</td><td> 1-(C s)</td></tr><tr><td></td><td>`?GL_SRC_ALPHA'
+%% </td><td>(A s)</td></tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_ALPHA'</td><td> 1-(A s)</td></tr><tr>
+%% <td>`?GL_CONSTANT'</td><td>`?GL_SRC_COLOR'</td><td>(C c)</td></tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_COLOR'
+%% </td><td> 1-(C c)</td></tr><tr><td></td><td>`?GL_SRC_ALPHA'</td><td>(A c)</td></tr><tr><td></td>
+%% <td>`?GL_ONE_MINUS_SRC_ALPHA'</td><td> 1-(A c)</td></tr><tr><td>`?GL_PRIMARY_COLOR'</td>
+%% <td>`?GL_SRC_COLOR'</td><td>(C f)</td></tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_COLOR'</td>
+%% <td> 1-(C f)</td></tr><tr><td></td><td>`?GL_SRC_ALPHA'</td><td>(A f)</td></tr><tr><td></td><td>
+%% `?GL_ONE_MINUS_SRC_ALPHA'</td><td> 1-(A f)</td></tr><tr><td>`?GL_PREVIOUS'</td><td>`?GL_SRC_COLOR'
+%% </td><td>(C p)</td></tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_COLOR'</td><td> 1-(C p)</td></tr><tr>
+%% <td></td><td>`?GL_SRC_ALPHA'</td><td>(A p)</td></tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_ALPHA'
+%% </td><td> 1-(A p)</td></tr></tbody></table>
+%%
+%% For `?GL_TEXTUREn' sources, C s and A s represent the color and alpha, respectively,
+%% produced from texture stage n.
+%%
+%% The follow table describes the values assigned to Arg0, Arg1, and Arg2 based upon
+%% the alpha sources and operands:
+%%
+%% <table><tbody><tr><td>`?GL_SRCn_ALPHA'</td><td>`?GL_OPERANDn_ALPHA'</td><td>` Argument Value '
+%% </td></tr></tbody><tbody><tr><td>`?GL_TEXTURE'</td><td>`?GL_SRC_ALPHA'</td><td>(A
+%% s)</td>
+%% </tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_ALPHA'</td><td> 1-(A s)</td></tr><tr><td>`?GL_TEXTUREn'
+%% </td><td>`?GL_SRC_ALPHA'</td><td>(A s)</td></tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_ALPHA'
+%% </td><td> 1-(A s)</td></tr><tr><td>`?GL_CONSTANT'</td><td>`?GL_SRC_ALPHA'</td><td>(A
+%% c)</td>
+%% </tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_ALPHA'</td><td> 1-(A c)</td></tr><tr><td>`?GL_PRIMARY_COLOR'
+%% </td><td>`?GL_SRC_ALPHA'</td><td>(A f)</td></tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_ALPHA'
+%% </td><td> 1-(A f)</td></tr><tr><td>`?GL_PREVIOUS'</td><td>`?GL_SRC_ALPHA'</td><td>(A
+%% p)</td>
+%% </tr><tr><td></td><td>`?GL_ONE_MINUS_SRC_ALPHA'</td><td> 1-(A p)</td></tr></tbody></table>
+%%
+%%
+%% The RGB and alpha results of the texture function are multipled by the values of `?GL_RGB_SCALE'
+%% and `?GL_ALPHA_SCALE', respectively, and clamped to the range [0 1].
+%%
+%% If `Pname' is `?GL_TEXTURE_ENV_COLOR', `Params' is a pointer to an array
+%% that holds an RGBA color consisting of four values. Integer color components are interpreted
+%% linearly such that the most positive integer maps to 1.0, and the most negative integer
+%% maps to -1.0. The values are clamped to the range [0,1] when they are specified. C c
+%% takes these four values.
+%%
+%% If `Pname' is `?GL_TEXTURE_LOD_BIAS', the value specified is added to the texture
+%% level-of-detail parameter, that selects which mipmap, or mipmaps depending upon the selected
+%% `?GL_TEXTURE_MIN_FILTER', will be sampled.
+%%
+%% `?GL_TEXTURE_ENV_MODE' defaults to `?GL_MODULATE' and `?GL_TEXTURE_ENV_COLOR'
+%% defaults to (0, 0, 0, 0).
+%%
+%% If `Target' is `?GL_POINT_SPRITE' and `Pname' is `?GL_COORD_REPLACE',
+%% the boolean value specified is used to either enable or disable point sprite texture coordinate
+%% replacement. The default value is `?GL_FALSE'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml">external</a> documentation.
+-spec texEnvfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float()}.
+texEnvfv(Target,Pname,Params) ->
+ cast(5254, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml">external</a> documentation.
--spec texEnviv(enum(),enum(),{integer()}) -> ok.
+%% @doc
+%% See {@link texEnvfv/3}
+-spec texEnviv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}.
texEnviv(Target,Pname,Params) ->
- cast(5279, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+ cast(5255, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Coord::enum(),Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml">external</a> documentation.
--spec texGend(enum(),enum(),float()) -> ok.
-texGend(Coord,Pname,Param) ->
- cast(5280, <<Coord:?GLenum,Pname:?GLenum,Param:?GLdouble>>).
+%% @doc Return texture environment parameters
+%%
+%% ``gl:getTexEnv'' returns in `Params' selected values of a texture environment that
+%% was specified with {@link gl:texEnvfv/3} . `Target' specifies a texture environment.
+%%
+%% When `Target' is `?GL_TEXTURE_FILTER_CONTROL', `Pname' must be `?GL_TEXTURE_LOD_BIAS'
+%% . When `Target' is `?GL_POINT_SPRITE', `Pname' must be `?GL_COORD_REPLACE'
+%% . When `Target' is `?GL_TEXTURE_ENV', `Pname' can be `?GL_TEXTURE_ENV_MODE'
+%% , `?GL_TEXTURE_ENV_COLOR', `?GL_COMBINE_RGB', `?GL_COMBINE_ALPHA', `?GL_RGB_SCALE'
+%% , `?GL_ALPHA_SCALE', `?GL_SRC0_RGB', `?GL_SRC1_RGB', `?GL_SRC2_RGB',
+%% `?GL_SRC0_ALPHA', `?GL_SRC1_ALPHA', or `?GL_SRC2_ALPHA'.
+%%
+%% `Pname' names a specific texture environment parameter, as follows:
+%%
+%% `?GL_TEXTURE_ENV_MODE': `Params' returns the single-valued texture environment
+%% mode, a symbolic constant. The initial value is `?GL_MODULATE'.
+%%
+%% `?GL_TEXTURE_ENV_COLOR': `Params' returns four integer or floating-point values
+%% that are the texture environment color. Integer values, when requested, are linearly mapped
+%% from the internal floating-point representation such that 1.0 maps to the most positive
+%% representable integer, and -1.0 maps to the most negative representable integer. The
+%% initial value is (0, 0, 0, 0).
+%%
+%% `?GL_TEXTURE_LOD_BIAS': `Params' returns a single floating-point value that
+%% is the texture level-of-detail bias. The initial value is 0.
+%%
+%% `?GL_COMBINE_RGB': `Params' returns a single symbolic constant value representing
+%% the current RGB combine mode. The initial value is `?GL_MODULATE'.
+%%
+%% `?GL_COMBINE_ALPHA': `Params' returns a single symbolic constant value representing
+%% the current alpha combine mode. The initial value is `?GL_MODULATE'.
+%%
+%% `?GL_SRC0_RGB': `Params' returns a single symbolic constant value representing
+%% the texture combiner zero's RGB source. The initial value is `?GL_TEXTURE'.
+%%
+%% `?GL_SRC1_RGB': `Params' returns a single symbolic constant value representing
+%% the texture combiner one's RGB source. The initial value is `?GL_PREVIOUS'.
+%%
+%% `?GL_SRC2_RGB': `Params' returns a single symbolic constant value representing
+%% the texture combiner two's RGB source. The initial value is `?GL_CONSTANT'.
+%%
+%% `?GL_SRC0_ALPHA': `Params' returns a single symbolic constant value representing
+%% the texture combiner zero's alpha source. The initial value is `?GL_TEXTURE'.
+%%
+%% `?GL_SRC1_ALPHA': `Params' returns a single symbolic constant value representing
+%% the texture combiner one's alpha source. The initial value is `?GL_PREVIOUS'.
+%%
+%% `?GL_SRC2_ALPHA': `Params' returns a single symbolic constant value representing
+%% the texture combiner two's alpha source. The initial value is `?GL_CONSTANT'.
+%%
+%% `?GL_OPERAND0_RGB': `Params' returns a single symbolic constant value representing
+%% the texture combiner zero's RGB operand. The initial value is `?GL_SRC_COLOR'.
+%%
+%% `?GL_OPERAND1_RGB': `Params' returns a single symbolic constant value representing
+%% the texture combiner one's RGB operand. The initial value is `?GL_SRC_COLOR'.
+%%
+%% `?GL_OPERAND2_RGB': `Params' returns a single symbolic constant value representing
+%% the texture combiner two's RGB operand. The initial value is `?GL_SRC_ALPHA'.
+%%
+%% `?GL_OPERAND0_ALPHA': `Params' returns a single symbolic constant value representing
+%% the texture combiner zero's alpha operand. The initial value is `?GL_SRC_ALPHA'.
+%%
+%% `?GL_OPERAND1_ALPHA': `Params' returns a single symbolic constant value representing
+%% the texture combiner one's alpha operand. The initial value is `?GL_SRC_ALPHA'.
+%%
+%% `?GL_OPERAND2_ALPHA': `Params' returns a single symbolic constant value representing
+%% the texture combiner two's alpha operand. The initial value is `?GL_SRC_ALPHA'.
+%%
+%% `?GL_RGB_SCALE': `Params' returns a single floating-point value representing
+%% the current RGB texture combiner scaling factor. The initial value is 1.0.
+%%
+%% `?GL_ALPHA_SCALE': `Params' returns a single floating-point value representing
+%% the current alpha texture combiner scaling factor. The initial value is 1.0.
+%%
+%% `?GL_COORD_REPLACE': `Params' returns a single boolean value representing the
+%% current point sprite texture coordinate replacement enable state. The initial value is `?GL_FALSE'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexEnv.xml">external</a> documentation.
+-spec getTexEnvfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum().
+getTexEnvfv(Target,Pname) ->
+ call(5256, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Coord::enum(),Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml">external</a> documentation.
--spec texGendv(enum(),enum(),{float()}) -> ok.
-texGendv(Coord,Pname,Params) ->
- cast(5281, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,0:32,
- (<< <<C:?GLdouble>> ||C <- tuple_to_list(Params)>>)/binary>>).
+%% @doc
+%% See {@link getTexEnvfv/2}
+-spec getTexEnviv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum().
+getTexEnviv(Target,Pname) ->
+ call(5257, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Coord::enum(),Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml">external</a> documentation.
--spec texGenf(enum(),enum(),float()) -> ok.
-texGenf(Coord,Pname,Param) ->
- cast(5282, <<Coord:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
+%% @doc Set texture parameters
+%%
+%% ``gl:texParameter'' assigns the value or values in `Params' to the texture parameter
+%% specified as `Pname' . `Target' defines the target texture, either `?GL_TEXTURE_1D'
+%% , `?GL_TEXTURE_2D', `?GL_TEXTURE_1D_ARRAY', `?GL_TEXTURE_2D_ARRAY', `?GL_TEXTURE_RECTANGLE'
+%% , or `?GL_TEXTURE_3D'. The following symbols are accepted in `Pname' :
+%%
+%% `?GL_TEXTURE_BASE_LEVEL': Specifies the index of the lowest defined mipmap level.
+%% This is an integer value. The initial value is 0.
+%%
+%%
+%%
+%% `?GL_TEXTURE_BORDER_COLOR': The data in `Params' specifies four values that
+%% define the border values that should be used for border texels. If a texel is sampled
+%% from the border of the texture, the values of `?GL_TEXTURE_BORDER_COLOR' are interpreted
+%% as an RGBA color to match the texture's internal format and substituted for the non-existent
+%% texel data. If the texture contains depth components, the first component of `?GL_TEXTURE_BORDER_COLOR'
+%% is interpreted as a depth value. The initial value is ( 0.0, 0.0, 0.0, 0.0 ).
+%%
+%% If the values for `?GL_TEXTURE_BORDER_COLOR' are specified with ``gl:texParameterIiv''
+%% or ``gl:texParameterIuiv'', the values are stored unmodified with an internal data
+%% type of integer. If specified with ``gl:texParameteriv'', they are converted to floating
+%% point with the following equation: f= 2 c+1 2 b-/1. If specified with ``gl:texParameterfv''
+%% , they are stored unmodified as floating-point values.
+%%
+%% `?GL_TEXTURE_COMPARE_FUNC': Specifies the comparison operator used when `?GL_TEXTURE_COMPARE_MODE'
+%% is set to `?GL_COMPARE_REF_TO_TEXTURE'. Permissible values are: <table><tbody><tr><td>
+%% ` Texture Comparison Function '</td><td>` Computed result '</td></tr></tbody><tbody>
+%% <tr><td>`?GL_LEQUAL'</td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&lt;=(D t) r&gt;(D t))</td></tr><tr><td>`?GL_GEQUAL'</td><td>
+%% result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&gt;=(D t) r&lt;(D t))</td></tr><tr><td>`?GL_LESS'</td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&lt;
+%% (D t) r&gt;=(D t))</td></tr><tr><td>`?GL_GREATER'
+%% </td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&gt;(D t) r&lt;=(D t))</td></tr><tr><td>`?GL_EQUAL'</td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp;
+%% r=(D t) r&amp;ne;(D t))</td></tr><tr><td>`?GL_NOTEQUAL'
+%% </td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&amp;ne;(D t) r=(D t))</td></tr><tr><td>`?GL_ALWAYS'</td><td> result= 1.0</td></tr><tr><td>
+%% `?GL_NEVER'</td><td> result= 0.0</td></tr></tbody></table> where r is the current
+%% interpolated texture coordinate, and D t is the depth texture value sampled from the
+%% currently bound depth texture. result is assigned to the the red channel.
+%%
+%% `?GL_TEXTURE_COMPARE_MODE': Specifies the texture comparison mode for currently
+%% bound depth textures. That is, a texture whose internal format is `?GL_DEPTH_COMPONENT_*'
+%% ; see {@link gl:texImage2D/9} ) Permissible values are:
+%%
+%% `?GL_COMPARE_REF_TO_TEXTURE': Specifies that the interpolated and clamped r texture
+%% coordinate should be compared to the value in the currently bound depth texture. See the
+%% discussion of `?GL_TEXTURE_COMPARE_FUNC' for details of how the comparison is evaluated.
+%% The result of the comparison is assigned to the red channel.
+%%
+%% `?GL_NONE': Specifies that the red channel should be assigned the appropriate value
+%% from the currently bound depth texture.
+%%
+%% `?GL_TEXTURE_LOD_BIAS': `Params' specifies a fixed bias value that is to be
+%% added to the level-of-detail parameter for the texture before texture sampling. The specified
+%% value is added to the shader-supplied bias value (if any) and subsequently clamped into
+%% the implementation-defined range [( - bias max)(bias max)], where bias max is the value of the implementation
+%% defined constant `?GL_MAX_TEXTURE_LOD_BIAS'. The initial value is 0.0.
+%%
+%% `?GL_TEXTURE_MIN_FILTER': The texture minifying function is used whenever the level-of-detail
+%% function used when sampling from the texture determines that the texture should be minified.
+%% There are six defined minifying functions. Two of them use either the nearest texture
+%% elements or a weighted average of multiple texture elements to compute the texture value.
+%% The other four use mipmaps.
+%%
+%% A mipmap is an ordered set of arrays representing the same image at progressively lower
+%% resolutions. If the texture has dimensions 2 n*2 m, there are max(n m)+1 mipmaps. The first
+%% mipmap is the original texture, with dimensions 2 n*2 m. Each subsequent mipmap has
+%% dimensions 2(k-1)*2(l-1), where 2 k*2 l are the dimensions of the previous mipmap, until either
+%% k= 0 or l= 0. At that point, subsequent mipmaps have dimension 1*2(l-1) or 2(k-1)*1 until
+%% the final mipmap, which has dimension 1*1. To define the mipmaps, call {@link gl:texImage1D/8}
+%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} , {@link gl:copyTexImage1D/7} , or {@link gl:copyTexImage2D/8}
+%% with the `level' argument indicating the order of the mipmaps. Level 0 is the original
+%% texture; level max(n m) is the final 1*1 mipmap.
+%%
+%% `Params' supplies a function for minifying the texture as one of the following:
+%%
+%% `?GL_NEAREST': Returns the value of the texture element that is nearest (in Manhattan
+%% distance) to the specified texture coordinates.
+%%
+%% `?GL_LINEAR': Returns the weighted average of the four texture elements that are
+%% closest to the specified texture coordinates. These can include items wrapped or repeated
+%% from other parts of a texture, depending on the values of `?GL_TEXTURE_WRAP_S' and `?GL_TEXTURE_WRAP_T'
+%% , and on the exact mapping.
+%%
+%% `?GL_NEAREST_MIPMAP_NEAREST': Chooses the mipmap that most closely matches the size
+%% of the pixel being textured and uses the `?GL_NEAREST' criterion (the texture element
+%% closest to the specified texture coordinates) to produce a texture value.
+%%
+%% `?GL_LINEAR_MIPMAP_NEAREST': Chooses the mipmap that most closely matches the size
+%% of the pixel being textured and uses the `?GL_LINEAR' criterion (a weighted average
+%% of the four texture elements that are closest to the specified texture coordinates) to
+%% produce a texture value.
+%%
+%% `?GL_NEAREST_MIPMAP_LINEAR': Chooses the two mipmaps that most closely match the
+%% size of the pixel being textured and uses the `?GL_NEAREST' criterion (the texture
+%% element closest to the specified texture coordinates ) to produce a texture value from
+%% each mipmap. The final texture value is a weighted average of those two values.
+%%
+%% `?GL_LINEAR_MIPMAP_LINEAR': Chooses the two mipmaps that most closely match the
+%% size of the pixel being textured and uses the `?GL_LINEAR' criterion (a weighted
+%% average of the texture elements that are closest to the specified texture coordinates)
+%% to produce a texture value from each mipmap. The final texture value is a weighted average
+%% of those two values.
+%%
+%% As more texture elements are sampled in the minification process, fewer aliasing artifacts
+%% will be apparent. While the `?GL_NEAREST' and `?GL_LINEAR' minification functions
+%% can be faster than the other four, they sample only one or multiple texture elements to
+%% determine the texture value of the pixel being rendered and can produce moire patterns
+%% or ragged transitions. The initial value of `?GL_TEXTURE_MIN_FILTER' is `?GL_NEAREST_MIPMAP_LINEAR'
+%% .
+%%
+%%
+%%
+%% `?GL_TEXTURE_MAG_FILTER': The texture magnification function is used whenever the
+%% level-of-detail function used when sampling from the texture determines that the texture
+%% should be magified. It sets the texture magnification function to either `?GL_NEAREST'
+%% or `?GL_LINEAR' (see below). `?GL_NEAREST' is generally faster than `?GL_LINEAR'
+%% , but it can produce textured images with sharper edges because the transition between
+%% texture elements is not as smooth. The initial value of `?GL_TEXTURE_MAG_FILTER' is `?GL_LINEAR'
+%% .
+%%
+%% `?GL_NEAREST': Returns the value of the texture element that is nearest (in Manhattan
+%% distance) to the specified texture coordinates.
+%%
+%% `?GL_LINEAR': Returns the weighted average of the texture elements that are closest
+%% to the specified texture coordinates. These can include items wrapped or repeated from
+%% other parts of a texture, depending on the values of `?GL_TEXTURE_WRAP_S' and `?GL_TEXTURE_WRAP_T'
+%% , and on the exact mapping.
+%%
+%%
+%%
+%% `?GL_TEXTURE_MIN_LOD': Sets the minimum level-of-detail parameter. This floating-point
+%% value limits the selection of highest resolution mipmap (lowest mipmap level). The initial
+%% value is -1000.
+%%
+%%
+%%
+%% `?GL_TEXTURE_MAX_LOD': Sets the maximum level-of-detail parameter. This floating-point
+%% value limits the selection of the lowest resolution mipmap (highest mipmap level). The
+%% initial value is 1000.
+%%
+%%
+%%
+%% `?GL_TEXTURE_MAX_LEVEL': Sets the index of the highest defined mipmap level. This
+%% is an integer value. The initial value is 1000.
+%%
+%%
+%%
+%% `?GL_TEXTURE_SWIZZLE_R': Sets the swizzle that will be applied to the r component
+%% of a texel before it is returned to the shader. Valid values for `Param' are `?GL_RED'
+%% , `?GL_GREEN', `?GL_BLUE', `?GL_ALPHA', `?GL_ZERO' and `?GL_ONE'.
+%% If `?GL_TEXTURE_SWIZZLE_R' is `?GL_RED', the value for r will be taken from
+%% the first channel of the fetched texel. If `?GL_TEXTURE_SWIZZLE_R' is `?GL_GREEN'
+%% , the value for r will be taken from the second channel of the fetched texel. If `?GL_TEXTURE_SWIZZLE_R'
+%% is `?GL_BLUE', the value for r will be taken from the third channel of the fetched
+%% texel. If `?GL_TEXTURE_SWIZZLE_R' is `?GL_ALPHA', the value for r will be taken
+%% from the fourth channel of the fetched texel. If `?GL_TEXTURE_SWIZZLE_R' is `?GL_ZERO'
+%% , the value for r will be subtituted with 0.0. If `?GL_TEXTURE_SWIZZLE_R' is `?GL_ONE'
+%% , the value for r will be subtituted with 1.0. The initial value is `?GL_RED'.
+%%
+%%
+%%
+%% `?GL_TEXTURE_SWIZZLE_G': Sets the swizzle that will be applied to the g component
+%% of a texel before it is returned to the shader. Valid values for `Param' and their
+%% effects are similar to those of `?GL_TEXTURE_SWIZZLE_R'. The initial value is `?GL_GREEN'
+%% .
+%%
+%%
+%%
+%% `?GL_TEXTURE_SWIZZLE_B': Sets the swizzle that will be applied to the b component
+%% of a texel before it is returned to the shader. Valid values for `Param' and their
+%% effects are similar to those of `?GL_TEXTURE_SWIZZLE_R'. The initial value is `?GL_BLUE'
+%% .
+%%
+%%
+%%
+%% `?GL_TEXTURE_SWIZZLE_A': Sets the swizzle that will be applied to the a component
+%% of a texel before it is returned to the shader. Valid values for `Param' and their
+%% effects are similar to those of `?GL_TEXTURE_SWIZZLE_R'. The initial value is `?GL_ALPHA'
+%% .
+%%
+%%
+%%
+%% `?GL_TEXTURE_SWIZZLE_RGBA': Sets the swizzles that will be applied to the r, g,
+%% b, and a components of a texel before they are returned to the shader. Valid values for `Params'
+%% and their effects are similar to those of `?GL_TEXTURE_SWIZZLE_R', except that all
+%% channels are specified simultaneously. Setting the value of `?GL_TEXTURE_SWIZZLE_RGBA'
+%% is equivalent (assuming no errors are generated) to setting the parameters of each of `?GL_TEXTURE_SWIZZLE_R'
+%% , `?GL_TEXTURE_SWIZZLE_G', `?GL_TEXTURE_SWIZZLE_B', and `?GL_TEXTURE_SWIZZLE_A'
+%% successively.
+%%
+%%
+%%
+%% `?GL_TEXTURE_WRAP_S': Sets the wrap parameter for texture coordinate s to either `?GL_CLAMP_TO_EDGE'
+%% , `?GL_CLAMP_TO_BORDER', `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. `?GL_CLAMP_TO_EDGE'
+%% causes s coordinates to be clamped to the range [(1 2/N) 1-(1 2/N)], where N is the size of the texture
+%% in the direction of clamping. `?GL_CLAMP_TO_BORDER' evaluates s coordinates in a
+%% similar manner to `?GL_CLAMP_TO_EDGE'. However, in cases where clamping would have
+%% occurred in `?GL_CLAMP_TO_EDGE' mode, the fetched texel data is substituted with
+%% the values specified by `?GL_TEXTURE_BORDER_COLOR'. `?GL_REPEAT' causes the
+%% integer part of the s coordinate to be ignored; the GL uses only the fractional part,
+%% thereby creating a repeating pattern. `?GL_MIRRORED_REPEAT' causes the s coordinate
+%% to be set to the fractional part of the texture coordinate if the integer part of s
+%% is even; if the integer part of s is odd, then the s texture coordinate is set to 1-
+%% frac(s), where frac(s) represents the fractional part of s. Initially, `?GL_TEXTURE_WRAP_S'
+%% is set to `?GL_REPEAT'.
+%%
+%%
+%%
+%% `?GL_TEXTURE_WRAP_T': Sets the wrap parameter for texture coordinate t to either `?GL_CLAMP_TO_EDGE'
+%% , `?GL_CLAMP_TO_BORDER', `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. See the
+%% discussion under `?GL_TEXTURE_WRAP_S'. Initially, `?GL_TEXTURE_WRAP_T' is set
+%% to `?GL_REPEAT'.
+%%
+%%
+%%
+%% `?GL_TEXTURE_WRAP_R': Sets the wrap parameter for texture coordinate r to either `?GL_CLAMP_TO_EDGE'
+%% , `?GL_CLAMP_TO_BORDER', `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. See the
+%% discussion under `?GL_TEXTURE_WRAP_S'. Initially, `?GL_TEXTURE_WRAP_R' is set
+%% to `?GL_REPEAT'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml">external</a> documentation.
+-spec texParameterf(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: float().
+texParameterf(Target,Pname,Param) ->
+ cast(5258, <<Target:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
-%% @spec (Coord::enum(),Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml">external</a> documentation.
--spec texGenfv(enum(),enum(),{float()}) -> ok.
-texGenfv(Coord,Pname,Params) ->
- cast(5283, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
+%% @doc
+%% See {@link texParameterf/3}
+-spec texParameteri(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: integer().
+texParameteri(Target,Pname,Param) ->
+ cast(5259, <<Target:?GLenum,Pname:?GLenum,Param:?GLint>>).
-%% @spec (Coord::enum(),Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml">external</a> documentation.
--spec texGeni(enum(),enum(),integer()) -> ok.
-texGeni(Coord,Pname,Param) ->
- cast(5284, <<Coord:?GLenum,Pname:?GLenum,Param:?GLint>>).
+%% @doc
+%% See {@link texParameterf/3}
+-spec texParameterfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float()}.
+texParameterfv(Target,Pname,Params) ->
+ cast(5260, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Coord::enum(),Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml">external</a> documentation.
--spec texGeniv(enum(),enum(),{integer()}) -> ok.
-texGeniv(Coord,Pname,Params) ->
- cast(5285, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
+%% @doc
+%% See {@link texParameterf/3}
+-spec texParameteriv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}.
+texParameteriv(Target,Pname,Params) ->
+ cast(5261, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage1D.xml">external</a> documentation.
--spec texImage1D(enum(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
-texImage1D(Target,Level,Internalformat,Width,Border,Format,Type,Pixels) when is_integer(Pixels) ->
- cast(5286, <<Target:?GLenum,Level:?GLint,Internalformat:?GLint,Width:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
-texImage1D(Target,Level,Internalformat,Width,Border,Format,Type,Pixels) ->
+%% @doc Return texture parameter values
+%%
+%% ``gl:getTexParameter'' returns in `Params' the value or values of the texture parameter
+%% specified as `Pname' . `Target' defines the target texture. `?GL_TEXTURE_1D',
+%% `?GL_TEXTURE_2D', `?GL_TEXTURE_3D', `?GL_TEXTURE_1D_ARRAY', `?GL_TEXTURE_2D_ARRAY'
+%% , `?GL_TEXTURE_RECTANGLE', `?GL_TEXTURE_CUBE_MAP', `?GL_TEXTURE_CUBE_MAP_ARRAY'
+%% specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array,
+%% rectangle, cube-mapped or cube-mapped array texturing, respectively. `Pname' accepts
+%% the same symbols as {@link gl:texParameterf/3} , with the same interpretations:
+%%
+%% `?GL_TEXTURE_MAG_FILTER': Returns the single-valued texture magnification filter,
+%% a symbolic constant. The initial value is `?GL_LINEAR'.
+%%
+%% `?GL_TEXTURE_MIN_FILTER': Returns the single-valued texture minification filter,
+%% a symbolic constant. The initial value is `?GL_NEAREST_MIPMAP_LINEAR'.
+%%
+%% `?GL_TEXTURE_MIN_LOD': Returns the single-valued texture minimum level-of-detail
+%% value. The initial value is -1000.
+%%
+%% `?GL_TEXTURE_MAX_LOD': Returns the single-valued texture maximum level-of-detail
+%% value. The initial value is 1000.
+%%
+%% `?GL_TEXTURE_BASE_LEVEL': Returns the single-valued base texture mipmap level. The
+%% initial value is 0.
+%%
+%% `?GL_TEXTURE_MAX_LEVEL': Returns the single-valued maximum texture mipmap array
+%% level. The initial value is 1000.
+%%
+%% `?GL_TEXTURE_SWIZZLE_R': Returns the red component swizzle. The initial value is `?GL_RED'
+%% .
+%%
+%% `?GL_TEXTURE_SWIZZLE_G': Returns the green component swizzle. The initial value is `?GL_GREEN'
+%% .
+%%
+%% `?GL_TEXTURE_SWIZZLE_B': Returns the blue component swizzle. The initial value is `?GL_BLUE'
+%% .
+%%
+%% `?GL_TEXTURE_SWIZZLE_A': Returns the alpha component swizzle. The initial value is `?GL_ALPHA'
+%% .
+%%
+%% `?GL_TEXTURE_SWIZZLE_RGBA': Returns the component swizzle for all channels in a
+%% single query.
+%%
+%% `?GL_TEXTURE_WRAP_S': Returns the single-valued wrapping function for texture coordinate
+%% s, a symbolic constant. The initial value is `?GL_REPEAT'.
+%%
+%% `?GL_TEXTURE_WRAP_T': Returns the single-valued wrapping function for texture coordinate
+%% t, a symbolic constant. The initial value is `?GL_REPEAT'.
+%%
+%% `?GL_TEXTURE_WRAP_R': Returns the single-valued wrapping function for texture coordinate
+%% r, a symbolic constant. The initial value is `?GL_REPEAT'.
+%%
+%% `?GL_TEXTURE_BORDER_COLOR': Returns four integer or floating-point numbers that
+%% comprise the RGBA color of the texture border. Floating-point values are returned in the
+%% range [0 1]. Integer values are returned as a linear mapping of the internal floating-point
+%% representation such that 1.0 maps to the most positive representable integer and -1.0
+%% maps to the most negative representable integer. The initial value is (0, 0, 0, 0).
+%%
+%% `?GL_TEXTURE_COMPARE_MODE': Returns a single-valued texture comparison mode, a symbolic
+%% constant. The initial value is `?GL_NONE'. See {@link gl:texParameterf/3} .
+%%
+%% `?GL_TEXTURE_COMPARE_FUNC': Returns a single-valued texture comparison function,
+%% a symbolic constant. The initial value is `?GL_LEQUAL'. See {@link gl:texParameterf/3} .
+%%
+%%
+%% In addition to the parameters that may be set with {@link gl:texParameterf/3} , ``gl:getTexParameter''
+%% accepts the following read-only parameters:
+%%
+%% `?GL_TEXTURE_IMMUTABLE_FORMAT': Returns non-zero if the texture has an immutable
+%% format. Textures become immutable if their storage is specified with {@link gl:texStorage1D/4}
+%% , {@link gl:texStorage2D/5} or {@link gl:texStorage3D/6} . The initial value is `?GL_FALSE'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameter.xml">external</a> documentation.
+-spec getTexParameterfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum().
+getTexParameterfv(Target,Pname) ->
+ call(5262, <<Target:?GLenum,Pname:?GLenum>>).
+
+%% @doc
+%% See {@link getTexParameterfv/2}
+-spec getTexParameteriv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum().
+getTexParameteriv(Target,Pname) ->
+ call(5263, <<Target:?GLenum,Pname:?GLenum>>).
+
+%% @doc Return texture parameter values for a specific level of detail
+%%
+%% ``gl:getTexLevelParameter'' returns in `Params' texture parameter values for a
+%% specific level-of-detail value, specified as `Level' . `Target' defines the target
+%% texture, either `?GL_TEXTURE_1D', `?GL_TEXTURE_2D', `?GL_TEXTURE_3D', `?GL_PROXY_TEXTURE_1D'
+%% , `?GL_PROXY_TEXTURE_2D', `?GL_PROXY_TEXTURE_3D', `?GL_TEXTURE_CUBE_MAP_POSITIVE_X'
+%% , `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y'
+%% , `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `?GL_PROXY_TEXTURE_CUBE_MAP'
+%% .
+%%
+%% `?GL_MAX_TEXTURE_SIZE', and `?GL_MAX_3D_TEXTURE_SIZE' are not really descriptive
+%% enough. It has to report the largest square texture image that can be accommodated with
+%% mipmaps and borders, but a long skinny texture, or a texture without mipmaps and borders,
+%% may easily fit in texture memory. The proxy targets allow the user to more accurately
+%% query whether the GL can accommodate a texture of a given configuration. If the texture
+%% cannot be accommodated, the texture state variables, which may be queried with ``gl:getTexLevelParameter''
+%% , are set to 0. If the texture can be accommodated, the texture state values will be set
+%% as they would be set for a non-proxy target.
+%%
+%% `Pname' specifies the texture parameter whose value or values will be returned.
+%%
+%% The accepted parameter names are as follows:
+%%
+%% `?GL_TEXTURE_WIDTH': `Params' returns a single value, the width of the texture
+%% image. This value includes the border of the texture image. The initial value is 0.
+%%
+%% `?GL_TEXTURE_HEIGHT': `Params' returns a single value, the height of the texture
+%% image. This value includes the border of the texture image. The initial value is 0.
+%%
+%% `?GL_TEXTURE_DEPTH': `Params' returns a single value, the depth of the texture
+%% image. This value includes the border of the texture image. The initial value is 0.
+%%
+%% `?GL_TEXTURE_INTERNAL_FORMAT': `Params' returns a single value, the internal
+%% format of the texture image.
+%%
+%% `?GL_TEXTURE_RED_TYPE',
+%%
+%% `?GL_TEXTURE_GREEN_TYPE',
+%%
+%% `?GL_TEXTURE_BLUE_TYPE',
+%%
+%% `?GL_TEXTURE_ALPHA_TYPE',
+%%
+%% `?GL_TEXTURE_DEPTH_TYPE': The data type used to store the component. The types `?GL_NONE'
+%% , `?GL_SIGNED_NORMALIZED', `?GL_UNSIGNED_NORMALIZED', `?GL_FLOAT', `?GL_INT'
+%% , and `?GL_UNSIGNED_INT' may be returned to indicate signed normalized fixed-point,
+%% unsigned normalized fixed-point, floating-point, integer unnormalized, and unsigned integer
+%% unnormalized components, respectively.
+%%
+%% `?GL_TEXTURE_RED_SIZE',
+%%
+%% `?GL_TEXTURE_GREEN_SIZE',
+%%
+%% `?GL_TEXTURE_BLUE_SIZE',
+%%
+%% `?GL_TEXTURE_ALPHA_SIZE',
+%%
+%% `?GL_TEXTURE_DEPTH_SIZE': The internal storage resolution of an individual component.
+%% The resolution chosen by the GL will be a close match for the resolution requested by
+%% the user with the component argument of {@link gl:texImage1D/8} , {@link gl:texImage2D/9} , {@link gl:texImage3D/10}
+%% , {@link gl:copyTexImage1D/7} , and {@link gl:copyTexImage2D/8} . The initial value is 0.
+%%
+%% `?GL_TEXTURE_COMPRESSED': `Params' returns a single boolean value indicating
+%% if the texture image is stored in a compressed internal format. The initiali value is `?GL_FALSE'
+%% .
+%%
+%% `?GL_TEXTURE_COMPRESSED_IMAGE_SIZE': `Params' returns a single integer value,
+%% the number of unsigned bytes of the compressed texture image that would be returned from {@link gl:getCompressedTexImage/3}
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexLevelParameter.xml">external</a> documentation.
+-spec getTexLevelParameterfv(Target, Level, Pname) -> {float()} when Target :: enum(),Level :: integer(),Pname :: enum().
+getTexLevelParameterfv(Target,Level,Pname) ->
+ call(5264, <<Target:?GLenum,Level:?GLint,Pname:?GLenum>>).
+
+%% @doc
+%% See {@link getTexLevelParameterfv/3}
+-spec getTexLevelParameteriv(Target, Level, Pname) -> {integer()} when Target :: enum(),Level :: integer(),Pname :: enum().
+getTexLevelParameteriv(Target,Level,Pname) ->
+ call(5265, <<Target:?GLenum,Level:?GLint,Pname:?GLenum>>).
+
+%% @doc Specify a one-dimensional texture image
+%%
+%% Texturing maps a portion of a specified texture image onto each graphical primitive for
+%% which texturing is enabled. To enable and disable one-dimensional texturing, call {@link gl:enable/1}
+%% and {@link gl:enable/1} with argument `?GL_TEXTURE_1D'.
+%%
+%% Texture images are defined with ``gl:texImage1D''. The arguments describe the parameters
+%% of the texture image, such as width, width of the border, level-of-detail number (see {@link gl:texParameterf/3}
+%% ), and the internal resolution and format used to store the image. The last three arguments
+%% describe how the image is represented in memory.
+%%
+%% If `Target' is `?GL_PROXY_TEXTURE_1D', no data is read from `Data' , but
+%% all of the texture image state is recalculated, checked for consistency, and checked against
+%% the implementation's capabilities. If the implementation cannot handle a texture of the
+%% requested texture size, it sets all of the image state to 0, but does not generate an
+%% error (see {@link gl:getError/0} ). To query for an entire mipmap array, use an image array
+%% level greater than or equal to 1.
+%%
+%% If `Target' is `?GL_TEXTURE_1D', data is read from `Data' as a sequence
+%% of signed or unsigned bytes, shorts, or longs, or single-precision floating-point values,
+%% depending on `Type' . These values are grouped into sets of one, two, three, or four
+%% values, depending on `Format' , to form elements. Each data byte is treated as eight
+%% 1-bit elements, with bit ordering determined by `?GL_UNPACK_LSB_FIRST' (see {@link gl:pixelStoref/2}
+%% ).
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% The first element corresponds to the left end of the texture array. Subsequent elements
+%% progress left-to-right through the remaining texels in the texture array. The final element
+%% corresponds to the right end of the texture array.
+%%
+%% `Format' determines the composition of each element in `Data' . It can assume
+%% one of these symbolic values:
+%%
+%% `?GL_RED': Each element is a single red component. The GL converts it to floating
+%% point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for
+%% alpha. Each component is then multiplied by the signed scale factor `?GL_c_SCALE',
+%% added to the signed bias `?GL_c_BIAS', and clamped to the range [0,1].
+%%
+%% `?GL_RG': Each element is a single red/green double The GL converts it to floating
+%% point and assembles it into an RGBA element by attaching 0 for blue, and 1 for alpha.
+%% Each component is then multiplied by the signed scale factor `?GL_c_SCALE', added
+%% to the signed bias `?GL_c_BIAS', and clamped to the range [0,1].
+%%
+%% `?GL_RGB'
+%%
+%% `?GL_BGR': Each element is an RGB triple. The GL converts it to floating point and
+%% assembles it into an RGBA element by attaching 1 for alpha. Each component is then multiplied
+%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS',
+%% and clamped to the range [0,1].
+%%
+%% `?GL_RGBA'
+%%
+%% `?GL_BGRA': Each element contains all four components. Each component is multiplied
+%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS',
+%% and clamped to the range [0,1].
+%%
+%% `?GL_DEPTH_COMPONENT': Each element is a single depth value. The GL converts it
+%% to floating point, multiplies by the signed scale factor `?GL_DEPTH_SCALE', adds
+%% the signed bias `?GL_DEPTH_BIAS', and clamps to the range [0,1].
+%%
+%% If an application wants to store the texture at a certain resolution or in a certain
+%% format, it can request the resolution and format with `InternalFormat' . The GL will
+%% choose an internal representation that closely approximates that requested by `InternalFormat'
+%% , but it may not match exactly. (The representations specified by `?GL_RED', `?GL_RG'
+%% , `?GL_RGB' and `?GL_RGBA' must match exactly.)
+%%
+%% `InternalFormat' may be one of the base internal formats shown in Table 1, below
+%%
+%% `InternalFormat' may also be one of the sized internal formats shown in Table 2,
+%% below
+%%
+%% Finally, `InternalFormat' may also be one of the generic or compressed compressed
+%% texture formats shown in Table 3 below
+%%
+%% If the `InternalFormat' parameter is one of the generic compressed formats, `?GL_COMPRESSED_RED'
+%% , `?GL_COMPRESSED_RG', `?GL_COMPRESSED_RGB', or `?GL_COMPRESSED_RGBA',
+%% the GL will replace the internal format with the symbolic constant for a specific internal
+%% format and compress the texture before storage. If no corresponding internal format is
+%% available, or the GL can not compress that image for any reason, the internal format is
+%% instead replaced with a corresponding base internal format.
+%%
+%% If the `InternalFormat' parameter is `?GL_SRGB', `?GL_SRGB8', `?GL_SRGB_ALPHA'
+%% or `?GL_SRGB8_ALPHA8', the texture is treated as if the red, green, or blue components
+%% are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion
+%% from the sRGB encoded component c s to a linear component c l is:
+%%
+%% c l={ c s/12.92if c s&amp;le; 0.04045( c s+0.055/1.055) 2.4if c s&gt; 0.04045
+%%
+%% Assume c s is the sRGB component in the range [0,1].
+%%
+%% Use the `?GL_PROXY_TEXTURE_1D' target to try out a resolution and format. The implementation
+%% will update and recompute its best match for the requested storage resolution and format.
+%% To then query this state, call {@link gl:getTexLevelParameterfv/3} . If the texture cannot
+%% be accommodated, texture state is set to 0.
+%%
+%% A one-component texture image uses only the red component of the RGBA color from `Data'
+%% . A two-component image uses the R and A values. A three-component image uses the R, G,
+%% and B values. A four-component image uses all of the RGBA components.
+%%
+%% Image-based shadowing can be enabled by comparing texture r coordinates to depth texture
+%% values to generate a boolean result. See {@link gl:texParameterf/3} for details on texture
+%% comparison.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage1D.xml">external</a> documentation.
+-spec texImage1D(Target, Level, InternalFormat, Width, Border, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+texImage1D(Target,Level,InternalFormat,Width,Border,Format,Type,Pixels) when is_integer(Pixels) ->
+ cast(5266, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
+texImage1D(Target,Level,InternalFormat,Width,Border,Format,Type,Pixels) ->
+ send_bin(Pixels),
+ cast(5267, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum>>).
+
+%% @doc Specify a two-dimensional texture image
+%%
+%% Texturing allows elements of an image array to be read by shaders.
+%%
+%% To define texture images, call ``gl:texImage2D''. The arguments describe the parameters
+%% of the texture image, such as height, width, width of the border, level-of-detail number
+%% (see {@link gl:texParameterf/3} ), and number of color components provided. The last three
+%% arguments describe how the image is represented in memory.
+%%
+%% If `Target' is `?GL_PROXY_TEXTURE_2D', `?GL_PROXY_TEXTURE_1D_ARRAY', `?GL_PROXY_TEXTURE_CUBE_MAP'
+%% , or `?GL_PROXY_TEXTURE_RECTANGLE', no data is read from `Data' , but all of
+%% the texture image state is recalculated, checked for consistency, and checked against
+%% the implementation's capabilities. If the implementation cannot handle a texture of the
+%% requested texture size, it sets all of the image state to 0, but does not generate an
+%% error (see {@link gl:getError/0} ). To query for an entire mipmap array, use an image array
+%% level greater than or equal to 1.
+%%
+%% If `Target' is `?GL_TEXTURE_2D', `?GL_TEXTURE_RECTANGLE' or one of the `?GL_TEXTURE_CUBE_MAP'
+%% targets, data is read from `Data' as a sequence of signed or unsigned bytes, shorts,
+%% or longs, or single-precision floating-point values, depending on `Type' . These values
+%% are grouped into sets of one, two, three, or four values, depending on `Format' ,
+%% to form elements. Each data byte is treated as eight 1-bit elements, with bit ordering
+%% determined by `?GL_UNPACK_LSB_FIRST' (see {@link gl:pixelStoref/2} ).
+%%
+%% If `Target' is `?GL_TEXTURE_1D_ARRAY', data is interpreted as an array of one-dimensional
+%% images.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% The first element corresponds to the lower left corner of the texture image. Subsequent
+%% elements progress left-to-right through the remaining texels in the lowest row of the
+%% texture image, and then in successively higher rows of the texture image. The final element
+%% corresponds to the upper right corner of the texture image.
+%%
+%% `Format' determines the composition of each element in `Data' . It can assume
+%% one of these symbolic values:
+%%
+%% `?GL_RED': Each element is a single red component. The GL converts it to floating
+%% point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for
+%% alpha. Each component is then multiplied by the signed scale factor `?GL_c_SCALE',
+%% added to the signed bias `?GL_c_BIAS', and clamped to the range [0,1].
+%%
+%% `?GL_RG': Each element is a red/green double. The GL converts it to floating point
+%% and assembles it into an RGBA element by attaching 0 for blue, and 1 for alpha. Each component
+%% is then multiplied by the signed scale factor `?GL_c_SCALE', added to the signed
+%% bias `?GL_c_BIAS', and clamped to the range [0,1].
+%%
+%% `?GL_RGB'
+%%
+%% `?GL_BGR': Each element is an RGB triple. The GL converts it to floating point and
+%% assembles it into an RGBA element by attaching 1 for alpha. Each component is then multiplied
+%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS',
+%% and clamped to the range [0,1].
+%%
+%% `?GL_RGBA'
+%%
+%% `?GL_BGRA': Each element contains all four components. Each component is multiplied
+%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS',
+%% and clamped to the range [0,1].
+%%
+%% `?GL_DEPTH_COMPONENT': Each element is a single depth value. The GL converts it
+%% to floating point, multiplies by the signed scale factor `?GL_DEPTH_SCALE', adds
+%% the signed bias `?GL_DEPTH_BIAS', and clamps to the range [0,1].
+%%
+%% `?GL_DEPTH_STENCIL': Each element is a pair of depth and stencil values. The depth
+%% component of the pair is interpreted as in `?GL_DEPTH_COMPONENT'. The stencil component
+%% is interpreted based on specified the depth + stencil internal format.
+%%
+%% If an application wants to store the texture at a certain resolution or in a certain
+%% format, it can request the resolution and format with `InternalFormat' . The GL will
+%% choose an internal representation that closely approximates that requested by `InternalFormat'
+%% , but it may not match exactly. (The representations specified by `?GL_RED', `?GL_RG'
+%% , `?GL_RGB', and `?GL_RGBA' must match exactly.)
+%%
+%% `InternalFormat' may be one of the base internal formats shown in Table 1, below
+%%
+%% `InternalFormat' may also be one of the sized internal formats shown in Table 2,
+%% below
+%%
+%% Finally, `InternalFormat' may also be one of the generic or compressed compressed
+%% texture formats shown in Table 3 below
+%%
+%% If the `InternalFormat' parameter is one of the generic compressed formats, `?GL_COMPRESSED_RED'
+%% , `?GL_COMPRESSED_RG', `?GL_COMPRESSED_RGB', or `?GL_COMPRESSED_RGBA',
+%% the GL will replace the internal format with the symbolic constant for a specific internal
+%% format and compress the texture before storage. If no corresponding internal format is
+%% available, or the GL can not compress that image for any reason, the internal format is
+%% instead replaced with a corresponding base internal format.
+%%
+%% If the `InternalFormat' parameter is `?GL_SRGB', `?GL_SRGB8', `?GL_SRGB_ALPHA'
+%% , or `?GL_SRGB8_ALPHA8', the texture is treated as if the red, green, or blue components
+%% are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion
+%% from the sRGB encoded component c s to a linear component c l is:
+%%
+%% c l={ c s/12.92if c s&amp;le; 0.04045( c s+0.055/1.055) 2.4if c s&gt; 0.04045
+%%
+%% Assume c s is the sRGB component in the range [0,1].
+%%
+%% Use the `?GL_PROXY_TEXTURE_2D', `?GL_PROXY_TEXTURE_1D_ARRAY', `?GL_PROXY_TEXTURE_RECTANGLE'
+%% , or `?GL_PROXY_TEXTURE_CUBE_MAP' target to try out a resolution and format. The
+%% implementation will update and recompute its best match for the requested storage resolution
+%% and format. To then query this state, call {@link gl:getTexLevelParameterfv/3} . If the texture
+%% cannot be accommodated, texture state is set to 0.
+%%
+%% A one-component texture image uses only the red component of the RGBA color extracted
+%% from `Data' . A two-component image uses the R and G values. A three-component image
+%% uses the R, G, and B values. A four-component image uses all of the RGBA components.
+%%
+%% Image-based shadowing can be enabled by comparing texture r coordinates to depth texture
+%% values to generate a boolean result. See {@link gl:texParameterf/3} for details on texture
+%% comparison.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml">external</a> documentation.
+-spec texImage2D(Target, Level, InternalFormat, Width, Height, Border, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+texImage2D(Target,Level,InternalFormat,Width,Height,Border,Format,Type,Pixels) when is_integer(Pixels) ->
+ cast(5268, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
+texImage2D(Target,Level,InternalFormat,Width,Height,Border,Format,Type,Pixels) ->
send_bin(Pixels),
- cast(5287, <<Target:?GLenum,Level:?GLint,Internalformat:?GLint,Width:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum>>).
-
-%% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml">external</a> documentation.
--spec texImage2D(enum(),integer(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
-texImage2D(Target,Level,Internalformat,Width,Height,Border,Format,Type,Pixels) when is_integer(Pixels) ->
- cast(5288, <<Target:?GLenum,Level:?GLint,Internalformat:?GLint,Width:?GLsizei,Height:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
-texImage2D(Target,Level,Internalformat,Width,Height,Border,Format,Type,Pixels) ->
+ cast(5269, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum>>).
+
+%% @doc Return a texture image
+%%
+%% ``gl:getTexImage'' returns a texture image into `Img' . `Target' specifies
+%% whether the desired texture image is one specified by {@link gl:texImage1D/8} (`?GL_TEXTURE_1D'
+%% ), {@link gl:texImage2D/9} (`?GL_TEXTURE_1D_ARRAY', `?GL_TEXTURE_RECTANGLE', `?GL_TEXTURE_2D'
+%% or any of `?GL_TEXTURE_CUBE_MAP_*'), or {@link gl:texImage3D/10} (`?GL_TEXTURE_2D_ARRAY'
+%% , `?GL_TEXTURE_3D'). `Level' specifies the level-of-detail number of the desired
+%% image. `Format' and `Type' specify the format and type of the desired image
+%% array. See the reference page for {@link gl:texImage1D/8} for a description of the acceptable
+%% values for the `Format' and `Type' parameters, respectively.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is requested, `Img' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% To understand the operation of ``gl:getTexImage'', consider the selected internal four-component
+%% texture image to be an RGBA color buffer the size of the image. The semantics of ``gl:getTexImage''
+%% are then identical to those of {@link gl:readPixels/7} , with the exception that no pixel
+%% transfer operations are performed, when called with the same `Format' and `Type' ,
+%% with `x' and `y' set to 0, `width' set to the width of the texture image
+%% and `height' set to 1 for 1D images, or to the height of the texture image for 2D
+%% images.
+%%
+%% If the selected texture image does not contain four components, the following mappings
+%% are applied. Single-component textures are treated as RGBA buffers with red set to the
+%% single-component value, green set to 0, blue set to 0, and alpha set to 1. Two-component
+%% textures are treated as RGBA buffers with red set to the value of component zero, alpha
+%% set to the value of component one, and green and blue set to 0. Finally, three-component
+%% textures are treated as RGBA buffers with red set to component zero, green set to component
+%% one, blue set to component two, and alpha set to 1.
+%%
+%% To determine the required size of `Img' , use {@link gl:getTexLevelParameterfv/3} to
+%% determine the dimensions of the internal texture image, then scale the required number
+%% of pixels by the storage required for each pixel, based on `Format' and `Type' .
+%% Be sure to take the pixel storage parameters into account, especially `?GL_PACK_ALIGNMENT'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexImage.xml">external</a> documentation.
+-spec getTexImage(Target, Level, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Format :: enum(),Type :: enum(),Pixels :: mem().
+getTexImage(Target,Level,Format,Type,Pixels) ->
send_bin(Pixels),
- cast(5289, <<Target:?GLenum,Level:?GLint,Internalformat:?GLint,Width:?GLsizei,Height:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum>>).
+ call(5270, <<Target:?GLenum,Level:?GLint,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml">external</a> documentation.
--spec texParameterf(enum(),enum(),float()) -> ok.
-texParameterf(Target,Pname,Param) ->
- cast(5290, <<Target:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
+%% @doc Generate texture names
+%%
+%% ``gl:genTextures'' returns `N' texture names in `Textures' . There is no guarantee
+%% that the names form a contiguous set of integers; however, it is guaranteed that none
+%% of the returned names was in use immediately before the call to ``gl:genTextures''.
+%%
+%% The generated textures have no dimensionality; they assume the dimensionality of the
+%% texture target to which they are first bound (see {@link gl:bindTexture/2} ).
+%%
+%% Texture names returned by a call to ``gl:genTextures'' are not returned by subsequent
+%% calls, unless they are first deleted with {@link gl:deleteTextures/1} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenTextures.xml">external</a> documentation.
+-spec genTextures(N) -> [integer()] when N :: integer().
+genTextures(N) ->
+ call(5271, <<N:?GLsizei>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml">external</a> documentation.
--spec texParameterfv(enum(),enum(),{float()}) -> ok.
-texParameterfv(Target,Pname,Params) ->
- cast(5291, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
+%% @doc Delete named textures
+%%
+%% ``gl:deleteTextures'' deletes `N' textures named by the elements of the array `Textures'
+%% . After a texture is deleted, it has no contents or dimensionality, and its name is free
+%% for reuse (for example by {@link gl:genTextures/1} ). If a texture that is currently bound
+%% is deleted, the binding reverts to 0 (the default texture).
+%%
+%% ``gl:deleteTextures'' silently ignores 0's and names that do not correspond to existing
+%% textures.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteTextures.xml">external</a> documentation.
+-spec deleteTextures(Textures) -> ok when Textures :: [integer()].
+deleteTextures(Textures) ->
+ cast(5272, <<(length(Textures)):?GLuint,
+ (<< <<C:?GLuint>> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>).
-%% @spec (Target::enum(),Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml">external</a> documentation.
--spec texParameteri(enum(),enum(),integer()) -> ok.
-texParameteri(Target,Pname,Param) ->
- cast(5292, <<Target:?GLenum,Pname:?GLenum,Param:?GLint>>).
+%% @doc Bind a named texture to a texturing target
+%%
+%% ``gl:bindTexture'' lets you create or use a named texture. Calling ``gl:bindTexture''
+%% with `Target' set to `?GL_TEXTURE_1D', `?GL_TEXTURE_2D', `?GL_TEXTURE_3D'
+%% , or `?GL_TEXTURE_1D_ARRAY', `?GL_TEXTURE_2D_ARRAY', `?GL_TEXTURE_RECTANGLE'
+%% , `?GL_TEXTURE_CUBE_MAP', `?GL_TEXTURE_2D_MULTISAMPLE' or `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY'
+%% and `Texture' set to the name of the new texture binds the texture name to the target.
+%% When a texture is bound to a target, the previous binding for that target is automatically
+%% broken.
+%%
+%% Texture names are unsigned integers. The value zero is reserved to represent the default
+%% texture for each texture target. Texture names and the corresponding texture contents
+%% are local to the shared object space of the current GL rendering context; two rendering
+%% contexts share texture names only if they explicitly enable sharing between contexts through
+%% the appropriate GL windows interfaces functions.
+%%
+%% You must use {@link gl:genTextures/1} to generate a set of new texture names.
+%%
+%% When a texture is first bound, it assumes the specified target: A texture first bound
+%% to `?GL_TEXTURE_1D' becomes one-dimensional texture, a texture first bound to `?GL_TEXTURE_2D'
+%% becomes two-dimensional texture, a texture first bound to `?GL_TEXTURE_3D' becomes
+%% three-dimensional texture, a texture first bound to `?GL_TEXTURE_1D_ARRAY' becomes
+%% one-dimensional array texture, a texture first bound to `?GL_TEXTURE_2D_ARRAY' becomes
+%% two-dimensional arary texture, a texture first bound to `?GL_TEXTURE_RECTANGLE' becomes
+%% rectangle texture, a, texture first bound to `?GL_TEXTURE_CUBE_MAP' becomes a cube-mapped
+%% texture, a texture first bound to `?GL_TEXTURE_2D_MULTISAMPLE' becomes a two-dimensional
+%% multisampled texture, and a texture first bound to `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY'
+%% becomes a two-dimensional multisampled array texture. The state of a one-dimensional texture
+%% immediately after it is first bound is equivalent to the state of the default `?GL_TEXTURE_1D'
+%% at GL initialization, and similarly for the other texture types.
+%%
+%% While a texture is bound, GL operations on the target to which it is bound affect the
+%% bound texture, and queries of the target to which it is bound return state from the bound
+%% texture. In effect, the texture targets become aliases for the textures currently bound
+%% to them, and the texture name zero refers to the default textures that were bound to them
+%% at initialization.
+%%
+%% A texture binding created with ``gl:bindTexture'' remains active until a different
+%% texture is bound to the same target, or until the bound texture is deleted with {@link gl:deleteTextures/1}
+%% .
+%%
+%% Once created, a named texture may be re-bound to its same original target as often as
+%% needed. It is usually much faster to use ``gl:bindTexture'' to bind an existing named
+%% texture to one of the texture targets than it is to reload the texture image using {@link gl:texImage1D/8}
+%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} or another similar function.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindTexture.xml">external</a> documentation.
+-spec bindTexture(Target, Texture) -> ok when Target :: enum(),Texture :: integer().
+bindTexture(Target,Texture) ->
+ cast(5273, <<Target:?GLenum,Texture:?GLuint>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml">external</a> documentation.
--spec texParameteriv(enum(),enum(),{integer()}) -> ok.
-texParameteriv(Target,Pname,Params) ->
- cast(5293, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
- (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
+%% @doc Set texture residence priority
+%%
+%% ``gl:prioritizeTextures'' assigns the `N' texture priorities given in `Priorities'
+%% to the `N' textures named in `Textures' .
+%%
+%% The GL establishes a ``working set'' of textures that are resident in texture memory.
+%% These textures may be bound to a texture target much more efficiently than textures that
+%% are not resident. By specifying a priority for each texture, ``gl:prioritizeTextures''
+%% allows applications to guide the GL implementation in determining which textures should
+%% be resident.
+%%
+%% The priorities given in `Priorities' are clamped to the range [0 1] before they are
+%% assigned. 0 indicates the lowest priority; textures with priority 0 are least likely to
+%% be resident. 1 indicates the highest priority; textures with priority 1 are most likely
+%% to be resident. However, textures are not guaranteed to be resident until they are used.
+%%
+%% ``gl:prioritizeTextures'' silently ignores attempts to prioritize texture 0 or any texture
+%% name that does not correspond to an existing texture.
+%%
+%% ``gl:prioritizeTextures'' does not require that any of the textures named by `Textures'
+%% be bound to a texture target. {@link gl:texParameterf/3} may also be used to set a texture's
+%% priority, but only if the texture is currently bound. This is the only way to set the
+%% priority of a default texture.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPrioritizeTextures.xml">external</a> documentation.
+-spec prioritizeTextures(Textures, Priorities) -> ok when Textures :: [integer()],Priorities :: [clamp()].
+prioritizeTextures(Textures,Priorities) ->
+ cast(5274, <<(length(Textures)):?GLuint,
+ (<< <<C:?GLuint>> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32),(length(Priorities)):?GLuint,
+ (<< <<C:?GLclampf>> || C <- Priorities>>)/binary,0:(((1+length(Priorities)) rem 2)*32)>>).
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Width::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage1D.xml">external</a> documentation.
--spec texSubImage1D(enum(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
+%% @doc Determine if textures are loaded in texture memory
+%%
+%% GL establishes a ``working set'' of textures that are resident in texture memory. These
+%% textures can be bound to a texture target much more efficiently than textures that are
+%% not resident.
+%%
+%% ``gl:areTexturesResident'' queries the texture residence status of the `N' textures
+%% named by the elements of `Textures' . If all the named textures are resident, ``gl:areTexturesResident''
+%% returns `?GL_TRUE', and the contents of `Residences' are undisturbed. If not
+%% all the named textures are resident, ``gl:areTexturesResident'' returns `?GL_FALSE',
+%% and detailed status is returned in the `N' elements of `Residences' . If an element
+%% of `Residences' is `?GL_TRUE', then the texture named by the corresponding element
+%% of `Textures' is resident.
+%%
+%% The residence status of a single bound texture may also be queried by calling {@link gl:getTexParameterfv/2}
+%% with the `target' argument set to the target to which the texture is bound, and
+%% the `pname' argument set to `?GL_TEXTURE_RESIDENT'. This is the only way that
+%% the residence status of a default texture can be queried.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAreTexturesResident.xml">external</a> documentation.
+-spec areTexturesResident(Textures) -> {0|1,Residences :: [0|1]} when Textures :: [integer()].
+areTexturesResident(Textures) ->
+ call(5275, <<(length(Textures)):?GLuint,
+ (<< <<C:?GLuint>> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>).
+
+%% @doc Determine if a name corresponds to a texture
+%%
+%% ``gl:isTexture'' returns `?GL_TRUE' if `Texture' is currently the name of
+%% a texture. If `Texture' is zero, or is a non-zero value that is not currently the
+%% name of a texture, or if an error occurs, ``gl:isTexture'' returns `?GL_FALSE'.
+%%
+%% A name returned by {@link gl:genTextures/1} , but not yet associated with a texture by
+%% calling {@link gl:bindTexture/2} , is not the name of a texture.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsTexture.xml">external</a> documentation.
+-spec isTexture(Texture) -> 0|1 when Texture :: integer().
+isTexture(Texture) ->
+ call(5276, <<Texture:?GLuint>>).
+
+%% @doc glTexSubImage
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage.xml">external</a> documentation.
+-spec texSubImage1D(Target, Level, Xoffset, Width, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) when is_integer(Pixels) ->
- cast(5294, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Width:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
+ cast(5277, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Width:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) ->
send_bin(Pixels),
- cast(5295, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Width:?GLsizei,Format:?GLenum,Type:?GLenum>>).
+ cast(5278, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Width:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage2D.xml">external</a> documentation.
--spec texSubImage2D(enum(),integer(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
+%% @doc glTexSubImage
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage.xml">external</a> documentation.
+-spec texSubImage2D(Target, Level, Xoffset, Yoffset, Width, Height, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) when is_integer(Pixels) ->
- cast(5296, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
+ cast(5279, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) ->
send_bin(Pixels),
- cast(5297, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
+ cast(5280, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml">external</a> documentation.
--spec translated(float(),float(),float()) -> ok.
-translated(X,Y,Z) ->
- cast(5298, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
+%% @doc Copy pixels into a 1D texture image
+%%
+%% ``gl:copyTexImage1D'' defines a one-dimensional texture image with pixels from the current
+%% `?GL_READ_BUFFER'.
+%%
+%% The screen-aligned pixel row with left corner at (x y) and with a length of width+2(border) defines
+%% the texture array at the mipmap level specified by `Level' . `Internalformat'
+%% specifies the internal format of the texture array.
+%%
+%% The pixels in the row are processed exactly as if {@link gl:readPixels/7} had been called,
+%% but the process stops just before final conversion. At this point all pixel component
+%% values are clamped to the range [0 1] and then converted to the texture's internal format
+%% for storage in the texel array.
+%%
+%% Pixel ordering is such that lower x screen coordinates correspond to lower texture
+%% coordinates.
+%%
+%% If any of the pixels within the specified row of the current `?GL_READ_BUFFER' are
+%% outside the window associated with the current rendering context, then the values obtained
+%% for those pixels are undefined.
+%%
+%% ``gl:copyTexImage1D'' defines a one-dimensional texture image with pixels from the current
+%% `?GL_READ_BUFFER'.
+%%
+%% When `Internalformat' is one of the sRGB types, the GL does not automatically convert
+%% the source pixels to the sRGB color space. In this case, the ``gl:pixelMap'' function
+%% can be used to accomplish the conversion.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage1D.xml">external</a> documentation.
+-spec copyTexImage1D(Target, Level, Internalformat, X, Y, Width, Border) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Border :: integer().
+copyTexImage1D(Target,Level,Internalformat,X,Y,Width,Border) ->
+ cast(5281, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei,Border:?GLint>>).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml">external</a> documentation.
--spec translatef(float(),float(),float()) -> ok.
-translatef(X,Y,Z) ->
- cast(5299, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
+%% @doc Copy pixels into a 2D texture image
+%%
+%% ``gl:copyTexImage2D'' defines a two-dimensional texture image, or cube-map texture image
+%% with pixels from the current `?GL_READ_BUFFER'.
+%%
+%% The screen-aligned pixel rectangle with lower left corner at ( `X' , `Y' ) and
+%% with a width of width+2(border) and a height of height+2(border) defines the texture array at the mipmap
+%% level specified by `Level' . `Internalformat' specifies the internal format of
+%% the texture array.
+%%
+%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been
+%% called, but the process stops just before final conversion. At this point all pixel component
+%% values are clamped to the range [0 1] and then converted to the texture's internal format
+%% for storage in the texel array.
+%%
+%% Pixel ordering is such that lower x and y screen coordinates correspond to lower s
+%% and t texture coordinates.
+%%
+%% If any of the pixels within the specified rectangle of the current `?GL_READ_BUFFER'
+%% are outside the window associated with the current rendering context, then the values
+%% obtained for those pixels are undefined.
+%%
+%% When `Internalformat' is one of the sRGB types, the GL does not automatically convert
+%% the source pixels to the sRGB color space. In this case, the ``gl:pixelMap'' function
+%% can be used to accomplish the conversion.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml">external</a> documentation.
+-spec copyTexImage2D(Target, Level, Internalformat, X, Y, Width, Height, Border) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Border :: integer().
+copyTexImage2D(Target,Level,Internalformat,X,Y,Width,Height,Border) ->
+ cast(5282, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Border:?GLint>>).
-%% @spec (X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex2d(float(),float()) -> ok.
-vertex2d(X,Y) ->
- cast(5300, <<X:?GLdouble,Y:?GLdouble>>).
+%% @doc Copy a one-dimensional texture subimage
+%%
+%% ``gl:copyTexSubImage1D'' replaces a portion of a one-dimensional texture image with
+%% pixels from the current `?GL_READ_BUFFER' (rather than from main memory, as is the
+%% case for {@link gl:texSubImage1D/7} ).
+%%
+%% The screen-aligned pixel row with left corner at ( `X' , `Y' ), and with length `Width'
+%% replaces the portion of the texture array with x indices `Xoffset' through xoffset
+%% +width-1, inclusive. The destination in the texture array may not include any texels outside
+%% the texture array as it was originally specified.
+%%
+%% The pixels in the row are processed exactly as if {@link gl:readPixels/7} had been called,
+%% but the process stops just before final conversion. At this point, all pixel component
+%% values are clamped to the range [0 1] and then converted to the texture's internal format
+%% for storage in the texel array.
+%%
+%% It is not an error to specify a subtexture with zero width, but such a specification
+%% has no effect. If any of the pixels within the specified row of the current `?GL_READ_BUFFER'
+%% are outside the read window associated with the current rendering context, then the values
+%% obtained for those pixels are undefined.
+%%
+%% No change is made to the `internalformat', `width', or `border' parameters
+%% of the specified texture array or to texel values outside the specified subregion.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage1D.xml">external</a> documentation.
+-spec copyTexSubImage1D(Target, Level, Xoffset, X, Y, Width) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer().
+copyTexSubImage1D(Target,Level,Xoffset,X,Y,Width) ->
+ cast(5283, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,X:?GLint,Y:?GLint,Width:?GLsizei>>).
-%% @spec ({X,Y}) -> ok
-%% @equiv vertex2d(X,Y)
--spec vertex2dv({float(),float()}) -> ok.
-vertex2dv({X,Y}) -> vertex2d(X,Y).
+%% @doc Copy a two-dimensional texture subimage
+%%
+%% ``gl:copyTexSubImage2D'' replaces a rectangular portion of a two-dimensional texture
+%% image or cube-map texture image with pixels from the current `?GL_READ_BUFFER' (rather
+%% than from main memory, as is the case for {@link gl:texSubImage1D/7} ).
+%%
+%% The screen-aligned pixel rectangle with lower left corner at (x y) and with width `Width'
+%% and height `Height' replaces the portion of the texture array with x indices `Xoffset'
+%% through xoffset+width-1, inclusive, and y indices `Yoffset' through yoffset+height
+%% -1, inclusive, at the mipmap level specified by `Level' .
+%%
+%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been
+%% called, but the process stops just before final conversion. At this point, all pixel component
+%% values are clamped to the range [0 1] and then converted to the texture's internal format
+%% for storage in the texel array.
+%%
+%% The destination rectangle in the texture array may not include any texels outside the
+%% texture array as it was originally specified. It is not an error to specify a subtexture
+%% with zero width or height, but such a specification has no effect.
+%%
+%% If any of the pixels within the specified rectangle of the current `?GL_READ_BUFFER'
+%% are outside the read window associated with the current rendering context, then the values
+%% obtained for those pixels are undefined.
+%%
+%% No change is made to the `internalformat', `width', `height', or `border'
+%% parameters of the specified texture array or to texel values outside the specified subregion.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage2D.xml">external</a> documentation.
+-spec copyTexSubImage2D(Target, Level, Xoffset, Yoffset, X, Y, Width, Height) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
+copyTexSubImage2D(Target,Level,Xoffset,Yoffset,X,Y,Width,Height) ->
+ cast(5284, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
-%% @spec (X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex2f(float(),float()) -> ok.
-vertex2f(X,Y) ->
- cast(5301, <<X:?GLfloat,Y:?GLfloat>>).
+%% @doc glMap
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
+-spec map1d(Target, U1, U2, Stride, Order, Points) -> ok when Target :: enum(),U1 :: float(),U2 :: float(),Stride :: integer(),Order :: integer(),Points :: binary().
+map1d(Target,U1,U2,Stride,Order,Points) ->
+ send_bin(Points),
+ cast(5285, <<Target:?GLenum,0:32,U1:?GLdouble,U2:?GLdouble,Stride:?GLint,Order:?GLint>>).
-%% @spec ({X,Y}) -> ok
-%% @equiv vertex2f(X,Y)
--spec vertex2fv({float(),float()}) -> ok.
-vertex2fv({X,Y}) -> vertex2f(X,Y).
+%% @doc glMap
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
+-spec map1f(Target, U1, U2, Stride, Order, Points) -> ok when Target :: enum(),U1 :: float(),U2 :: float(),Stride :: integer(),Order :: integer(),Points :: binary().
+map1f(Target,U1,U2,Stride,Order,Points) ->
+ send_bin(Points),
+ cast(5286, <<Target:?GLenum,U1:?GLfloat,U2:?GLfloat,Stride:?GLint,Order:?GLint>>).
-%% @spec (X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex2i(integer(),integer()) -> ok.
-vertex2i(X,Y) ->
- cast(5302, <<X:?GLint,Y:?GLint>>).
+%% @doc glMap
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
+-spec map2d(Target, U1, U2, Ustride, Uorder, V1, V2, Vstride, Vorder, Points) -> ok when Target :: enum(),U1 :: float(),U2 :: float(),Ustride :: integer(),Uorder :: integer(),V1 :: float(),V2 :: float(),Vstride :: integer(),Vorder :: integer(),Points :: binary().
+map2d(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
+ send_bin(Points),
+ cast(5287, <<Target:?GLenum,0:32,U1:?GLdouble,U2:?GLdouble,Ustride:?GLint,Uorder:?GLint,V1:?GLdouble,V2:?GLdouble,Vstride:?GLint,Vorder:?GLint>>).
-%% @spec ({X,Y}) -> ok
-%% @equiv vertex2i(X,Y)
--spec vertex2iv({integer(),integer()}) -> ok.
-vertex2iv({X,Y}) -> vertex2i(X,Y).
+%% @doc glMap
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
+-spec map2f(Target, U1, U2, Ustride, Uorder, V1, V2, Vstride, Vorder, Points) -> ok when Target :: enum(),U1 :: float(),U2 :: float(),Ustride :: integer(),Uorder :: integer(),V1 :: float(),V2 :: float(),Vstride :: integer(),Vorder :: integer(),Points :: binary().
+map2f(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
+ send_bin(Points),
+ cast(5288, <<Target:?GLenum,U1:?GLfloat,U2:?GLfloat,Ustride:?GLint,Uorder:?GLint,V1:?GLfloat,V2:?GLfloat,Vstride:?GLint,Vorder:?GLint>>).
-%% @spec (X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex2s(integer(),integer()) -> ok.
-vertex2s(X,Y) ->
- cast(5303, <<X:?GLshort,Y:?GLshort>>).
+%% @doc Return evaluator parameters
+%%
+%% {@link gl:map1d/6} and {@link gl:map1d/6} define evaluators. ``gl:getMap'' returns evaluator
+%% parameters. `Target' chooses a map, `Query' selects a specific parameter, and `V'
+%% points to storage where the values will be returned.
+%%
+%% The acceptable values for the `Target' parameter are described in the {@link gl:map1d/6}
+%% and {@link gl:map1d/6} reference pages.
+%%
+%% `Query' can assume the following values:
+%%
+%% `?GL_COEFF': `V' returns the control points for the evaluator function. One-dimensional
+%% evaluators return order control points, and two-dimensional evaluators return uorder*vorder
+%% control points. Each control point consists of one, two, three, or four integer, single-precision
+%% floating-point, or double-precision floating-point values, depending on the type of the
+%% evaluator. The GL returns two-dimensional control points in row-major order, incrementing
+%% the uorder index quickly and the vorder index after each row. Integer values, when
+%% requested, are computed by rounding the internal floating-point values to the nearest
+%% integer values.
+%%
+%% `?GL_ORDER': `V' returns the order of the evaluator function. One-dimensional
+%% evaluators return a single value, order. The initial value is 1. Two-dimensional evaluators
+%% return two values, uorder and vorder. The initial value is 1,1.
+%%
+%% `?GL_DOMAIN': `V' returns the linear u and v mapping parameters. One-dimensional
+%% evaluators return two values, u1 and u2, as specified by {@link gl:map1d/6} . Two-dimensional
+%% evaluators return four values ( u1, u2, v1, and v2) as specified by {@link gl:map1d/6} .
+%% Integer values, when requested, are computed by rounding the internal floating-point values
+%% to the nearest integer values.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMap.xml">external</a> documentation.
+-spec getMapdv(Target, Query, V) -> ok when Target :: enum(),Query :: enum(),V :: mem().
+getMapdv(Target,Query,V) ->
+ send_bin(V),
+ call(5289, <<Target:?GLenum,Query:?GLenum>>).
-%% @spec ({X,Y}) -> ok
-%% @equiv vertex2s(X,Y)
--spec vertex2sv({integer(),integer()}) -> ok.
-vertex2sv({X,Y}) -> vertex2s(X,Y).
+%% @doc
+%% See {@link getMapdv/3}
+-spec getMapfv(Target, Query, V) -> ok when Target :: enum(),Query :: enum(),V :: mem().
+getMapfv(Target,Query,V) ->
+ send_bin(V),
+ call(5290, <<Target:?GLenum,Query:?GLenum>>).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex3d(float(),float(),float()) -> ok.
-vertex3d(X,Y,Z) ->
- cast(5304, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
+%% @doc
+%% See {@link getMapdv/3}
+-spec getMapiv(Target, Query, V) -> ok when Target :: enum(),Query :: enum(),V :: mem().
+getMapiv(Target,Query,V) ->
+ send_bin(V),
+ call(5291, <<Target:?GLenum,Query:?GLenum>>).
-%% @spec ({X,Y,Z}) -> ok
-%% @equiv vertex3d(X,Y,Z)
--spec vertex3dv({float(),float(),float()}) -> ok.
-vertex3dv({X,Y,Z}) -> vertex3d(X,Y,Z).
+%% @doc Evaluate enabled one- and two-dimensional maps
+%%
+%% ``gl:evalCoord1'' evaluates enabled one-dimensional maps at argument `U' . ``gl:evalCoord2''
+%% does the same for two-dimensional maps using two domain values, `U' and `V' .
+%% To define a map, call {@link gl:map1d/6} and {@link gl:map1d/6} ; to enable and disable it,
+%% call {@link gl:enable/1} and {@link gl:enable/1} .
+%%
+%% When one of the ``gl:evalCoord'' commands is issued, all currently enabled maps of
+%% the indicated dimension are evaluated. Then, for each enabled map, it is as if the corresponding
+%% GL command had been issued with the computed value. That is, if `?GL_MAP1_INDEX' or `?GL_MAP2_INDEX'
+%% is enabled, a {@link gl:indexd/1} command is simulated. If `?GL_MAP1_COLOR_4' or `?GL_MAP2_COLOR_4'
+%% is enabled, a {@link gl:color3b/3} command is simulated. If `?GL_MAP1_NORMAL' or `?GL_MAP2_NORMAL'
+%% is enabled, a normal vector is produced, and if any of `?GL_MAP1_TEXTURE_COORD_1', `?GL_MAP1_TEXTURE_COORD_2'
+%% , `?GL_MAP1_TEXTURE_COORD_3', `?GL_MAP1_TEXTURE_COORD_4', `?GL_MAP2_TEXTURE_COORD_1'
+%% , `?GL_MAP2_TEXTURE_COORD_2', `?GL_MAP2_TEXTURE_COORD_3', or `?GL_MAP2_TEXTURE_COORD_4'
+%% is enabled, then an appropriate {@link gl:texCoord1d/1} command is simulated.
+%%
+%% For color, color index, normal, and texture coordinates the GL uses evaluated values
+%% instead of current values for those evaluations that are enabled, and current values otherwise,
+%% However, the evaluated values do not update the current values. Thus, if {@link gl:vertex2d/2}
+%% commands are interspersed with ``gl:evalCoord'' commands, the color, normal, and texture
+%% coordinates associated with the {@link gl:vertex2d/2} commands are not affected by the values
+%% generated by the ``gl:evalCoord'' commands, but only by the most recent {@link gl:color3b/3}
+%% , {@link gl:indexd/1} , {@link gl:normal3b/3} , and {@link gl:texCoord1d/1} commands.
+%%
+%% No commands are issued for maps that are not enabled. If more than one texture evaluation
+%% is enabled for a particular dimension (for example, `?GL_MAP2_TEXTURE_COORD_1' and `?GL_MAP2_TEXTURE_COORD_2'
+%% ), then only the evaluation of the map that produces the larger number of coordinates
+%% (in this case, `?GL_MAP2_TEXTURE_COORD_2') is carried out. `?GL_MAP1_VERTEX_4'
+%% overrides `?GL_MAP1_VERTEX_3', and `?GL_MAP2_VERTEX_4' overrides `?GL_MAP2_VERTEX_3'
+%% , in the same manner. If neither a three- nor a four-component vertex map is enabled for
+%% the specified dimension, the ``gl:evalCoord'' command is ignored.
+%%
+%% If you have enabled automatic normal generation, by calling {@link gl:enable/1} with argument
+%% `?GL_AUTO_NORMAL', ``gl:evalCoord2'' generates surface normals analytically, regardless
+%% of the contents or enabling of the `?GL_MAP2_NORMAL' map. Let
+%%
+%% m=((&amp;PartialD; p)/(&amp;PartialD; u))*((&amp;PartialD; p)/(&amp;PartialD; v))
+%%
+%% Then the generated normal n is n= m/(||m||)
+%%
+%% If automatic normal generation is disabled, the corresponding normal map `?GL_MAP2_NORMAL'
+%% , if enabled, is used to produce a normal. If neither automatic normal generation nor
+%% a normal map is enabled, no normal is generated for ``gl:evalCoord2'' commands.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalCoord.xml">external</a> documentation.
+-spec evalCoord1d(U) -> ok when U :: float().
+evalCoord1d(U) ->
+ cast(5292, <<U:?GLdouble>>).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex3f(float(),float(),float()) -> ok.
-vertex3f(X,Y,Z) ->
- cast(5305, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
+%% @doc
+%% See {@link evalCoord1d/1}
+-spec evalCoord1f(U) -> ok when U :: float().
+evalCoord1f(U) ->
+ cast(5293, <<U:?GLfloat>>).
-%% @spec ({X,Y,Z}) -> ok
-%% @equiv vertex3f(X,Y,Z)
--spec vertex3fv({float(),float(),float()}) -> ok.
-vertex3fv({X,Y,Z}) -> vertex3f(X,Y,Z).
+%% @equiv evalCoord1d(U)
+-spec evalCoord1dv(U) -> ok when U :: {U :: float()}.
+evalCoord1dv({U}) -> evalCoord1d(U).
-%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex3i(integer(),integer(),integer()) -> ok.
-vertex3i(X,Y,Z) ->
- cast(5306, <<X:?GLint,Y:?GLint,Z:?GLint>>).
+%% @equiv evalCoord1f(U)
+-spec evalCoord1fv(U) -> ok when U :: {U :: float()}.
+evalCoord1fv({U}) -> evalCoord1f(U).
-%% @spec ({X,Y,Z}) -> ok
-%% @equiv vertex3i(X,Y,Z)
--spec vertex3iv({integer(),integer(),integer()}) -> ok.
-vertex3iv({X,Y,Z}) -> vertex3i(X,Y,Z).
+%% @doc
+%% See {@link evalCoord1d/1}
+-spec evalCoord2d(U, V) -> ok when U :: float(),V :: float().
+evalCoord2d(U,V) ->
+ cast(5294, <<U:?GLdouble,V:?GLdouble>>).
-%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex3s(integer(),integer(),integer()) -> ok.
-vertex3s(X,Y,Z) ->
- cast(5307, <<X:?GLshort,Y:?GLshort,Z:?GLshort>>).
+%% @doc
+%% See {@link evalCoord1d/1}
+-spec evalCoord2f(U, V) -> ok when U :: float(),V :: float().
+evalCoord2f(U,V) ->
+ cast(5295, <<U:?GLfloat,V:?GLfloat>>).
-%% @spec ({X,Y,Z}) -> ok
-%% @equiv vertex3s(X,Y,Z)
--spec vertex3sv({integer(),integer(),integer()}) -> ok.
-vertex3sv({X,Y,Z}) -> vertex3s(X,Y,Z).
+%% @equiv evalCoord2d(U,V)
+-spec evalCoord2dv(U) -> ok when U :: {U :: float(),V :: float()}.
+evalCoord2dv({U,V}) -> evalCoord2d(U,V).
-%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex4d(float(),float(),float(),float()) -> ok.
-vertex4d(X,Y,Z,W) ->
- cast(5308, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
+%% @equiv evalCoord2f(U,V)
+-spec evalCoord2fv(U) -> ok when U :: {U :: float(),V :: float()}.
+evalCoord2fv({U,V}) -> evalCoord2f(U,V).
-%% @spec ({X,Y,Z,W}) -> ok
-%% @equiv vertex4d(X,Y,Z,W)
--spec vertex4dv({float(),float(),float(),float()}) -> ok.
-vertex4dv({X,Y,Z,W}) -> vertex4d(X,Y,Z,W).
+%% @doc Define a one- or two-dimensional mesh
+%%
+%% ``gl:mapGrid'' and {@link gl:evalMesh1/3} are used together to efficiently generate and
+%% evaluate a series of evenly-spaced map domain values. {@link gl:evalMesh1/3} steps through
+%% the integer domain of a one- or two-dimensional grid, whose range is the domain of the
+%% evaluation maps specified by {@link gl:map1d/6} and {@link gl:map1d/6} .
+%%
+%% ``gl:mapGrid1'' and ``gl:mapGrid2'' specify the linear grid mappings between the i
+%% (or i and j) integer grid coordinates, to the u (or u and v) floating-point
+%% evaluation map coordinates. See {@link gl:map1d/6} and {@link gl:map1d/6} for details of how
+%% u and v coordinates are evaluated.
+%%
+%% ``gl:mapGrid1'' specifies a single linear mapping such that integer grid coordinate
+%% 0 maps exactly to `U1' , and integer grid coordinate `Un' maps exactly to `U2'
+%% . All other integer grid coordinates i are mapped so that
+%%
+%% u= i(u2-u1)/un+u1
+%%
+%% ``gl:mapGrid2'' specifies two such linear mappings. One maps integer grid coordinate
+%% i= 0 exactly to `U1' , and integer grid coordinate i= un exactly to `U2' . The
+%% other maps integer grid coordinate j= 0 exactly to `V1' , and integer grid coordinate
+%% j= vn exactly to `V2' . Other integer grid coordinates i and j are mapped such
+%% that
+%%
+%% u= i(u2-u1)/un+u1
+%%
+%% v= j(v2-v1)/vn+v1
+%%
+%% The mappings specified by ``gl:mapGrid'' are used identically by {@link gl:evalMesh1/3}
+%% and {@link gl:evalPoint1/1} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMapGrid.xml">external</a> documentation.
+-spec mapGrid1d(Un, U1, U2) -> ok when Un :: integer(),U1 :: float(),U2 :: float().
+mapGrid1d(Un,U1,U2) ->
+ cast(5296, <<Un:?GLint,0:32,U1:?GLdouble,U2:?GLdouble>>).
-%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex4f(float(),float(),float(),float()) -> ok.
-vertex4f(X,Y,Z,W) ->
- cast(5309, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
+%% @doc
+%% See {@link mapGrid1d/3}
+-spec mapGrid1f(Un, U1, U2) -> ok when Un :: integer(),U1 :: float(),U2 :: float().
+mapGrid1f(Un,U1,U2) ->
+ cast(5297, <<Un:?GLint,U1:?GLfloat,U2:?GLfloat>>).
-%% @spec ({X,Y,Z,W}) -> ok
-%% @equiv vertex4f(X,Y,Z,W)
--spec vertex4fv({float(),float(),float(),float()}) -> ok.
-vertex4fv({X,Y,Z,W}) -> vertex4f(X,Y,Z,W).
+%% @doc
+%% See {@link mapGrid1d/3}
+-spec mapGrid2d(Un, U1, U2, Vn, V1, V2) -> ok when Un :: integer(),U1 :: float(),U2 :: float(),Vn :: integer(),V1 :: float(),V2 :: float().
+mapGrid2d(Un,U1,U2,Vn,V1,V2) ->
+ cast(5298, <<Un:?GLint,0:32,U1:?GLdouble,U2:?GLdouble,Vn:?GLint,0:32,V1:?GLdouble,V2:?GLdouble>>).
-%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex4i(integer(),integer(),integer(),integer()) -> ok.
-vertex4i(X,Y,Z,W) ->
- cast(5310, <<X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
+%% @doc
+%% See {@link mapGrid1d/3}
+-spec mapGrid2f(Un, U1, U2, Vn, V1, V2) -> ok when Un :: integer(),U1 :: float(),U2 :: float(),Vn :: integer(),V1 :: float(),V2 :: float().
+mapGrid2f(Un,U1,U2,Vn,V1,V2) ->
+ cast(5299, <<Un:?GLint,U1:?GLfloat,U2:?GLfloat,Vn:?GLint,V1:?GLfloat,V2:?GLfloat>>).
-%% @spec ({X,Y,Z,W}) -> ok
-%% @equiv vertex4i(X,Y,Z,W)
--spec vertex4iv({integer(),integer(),integer(),integer()}) -> ok.
-vertex4iv({X,Y,Z,W}) -> vertex4i(X,Y,Z,W).
+%% @doc Generate and evaluate a single point in a mesh
+%%
+%% {@link gl:mapGrid1d/3} and {@link gl:evalMesh1/3} are used in tandem to efficiently generate
+%% and evaluate a series of evenly spaced map domain values. ``gl:evalPoint'' can be used
+%% to evaluate a single grid point in the same gridspace that is traversed by {@link gl:evalMesh1/3}
+%% . Calling ``gl:evalPoint1'' is equivalent to calling glEvalCoord1( i.&amp;Delta; u+u
+%% 1 ); where &amp;Delta; u=(u 2-u 1)/n
+%%
+%% and n, u 1, and u 2 are the arguments to the most recent {@link gl:mapGrid1d/3} command.
+%% The one absolute numeric requirement is that if i= n, then the value computed from i.&amp;Delta;
+%% u+u 1 is exactly u 2.
+%%
+%% In the two-dimensional case, ``gl:evalPoint2'', let
+%%
+%% &amp;Delta; u=(u 2-u 1)/n
+%%
+%% &amp;Delta; v=(v 2-v 1)/m
+%%
+%% where n, u 1, u 2, m, v 1, and v 2 are the arguments to the most recent {@link gl:mapGrid1d/3}
+%% command. Then the ``gl:evalPoint2'' command is equivalent to calling glEvalCoord2( i.
+%% &amp;Delta; u+u 1, j.&amp;Delta; v+v 1 ); The only absolute numeric requirements are
+%% that if i= n, then the value computed from i.&amp;Delta; u+u 1 is exactly u 2, and
+%% if j= m, then the value computed from j.&amp;Delta; v+v 1 is exactly v 2.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalPoint.xml">external</a> documentation.
+-spec evalPoint1(I) -> ok when I :: integer().
+evalPoint1(I) ->
+ cast(5300, <<I:?GLint>>).
-%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex4s(integer(),integer(),integer(),integer()) -> ok.
-vertex4s(X,Y,Z,W) ->
- cast(5311, <<X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
+%% @doc
+%% See {@link evalPoint1/1}
+-spec evalPoint2(I, J) -> ok when I :: integer(),J :: integer().
+evalPoint2(I,J) ->
+ cast(5301, <<I:?GLint,J:?GLint>>).
-%% @spec ({X,Y,Z,W}) -> ok
-%% @equiv vertex4s(X,Y,Z,W)
--spec vertex4sv({integer(),integer(),integer(),integer()}) -> ok.
-vertex4sv({X,Y,Z,W}) -> vertex4s(X,Y,Z,W).
+%% @doc Compute a one- or two-dimensional grid of points or lines
+%%
+%% {@link gl:mapGrid1d/3} and ``gl:evalMesh'' are used in tandem to efficiently generate and
+%% evaluate a series of evenly-spaced map domain values. ``gl:evalMesh'' steps through
+%% the integer domain of a one- or two-dimensional grid, whose range is the domain of the
+%% evaluation maps specified by {@link gl:map1d/6} and {@link gl:map1d/6} . `Mode' determines
+%% whether the resulting vertices are connected as points, lines, or filled polygons.
+%%
+%% In the one-dimensional case, ``gl:evalMesh1'', the mesh is generated as if the following
+%% code fragment were executed:
+%%
+%% glBegin( `Type' ); for ( i = `I1' ; i &lt;= `I2' ; i += 1 ) glEvalCoord1(
+%% i.&amp;Delta; u+u 1 ); glEnd(); where
+%%
+%% &amp;Delta; u=(u 2-u 1)/n
+%%
+%% and n, u 1, and u 2 are the arguments to the most recent {@link gl:mapGrid1d/3} command.
+%% `type' is `?GL_POINTS' if `Mode' is `?GL_POINT', or `?GL_LINES'
+%% if `Mode' is `?GL_LINE'.
+%%
+%% The one absolute numeric requirement is that if i= n, then the value computed from i.
+%% &amp;Delta; u+u 1 is exactly u 2.
+%%
+%% In the two-dimensional case, ``gl:evalMesh2'', let .cp &amp;Delta; u=(u 2-u 1)/n
+%%
+%% &amp;Delta; v=(v 2-v 1)/m
+%%
+%% where n, u 1, u 2, m, v 1, and v 2 are the arguments to the most recent {@link gl:mapGrid1d/3}
+%% command. Then, if `Mode' is `?GL_FILL', the ``gl:evalMesh2'' command is equivalent
+%% to:
+%%
+%% for ( j = `J1' ; j &lt; `J2' ; j += 1 ) { glBegin( GL_QUAD_STRIP ); for ( i = `I1'
+%% ; i &lt;= `I2' ; i += 1 ) { glEvalCoord2( i.&amp;Delta; u+u 1, j.&amp;Delta; v+v 1
+%% ); glEvalCoord2( i.&amp;Delta; u+u 1,(j+1).&amp;Delta; v+v 1 ); } glEnd(); }
+%%
+%% If `Mode' is `?GL_LINE', then a call to ``gl:evalMesh2'' is equivalent to:
+%%
+%% for ( j = `J1' ; j &lt;= `J2' ; j += 1 ) { glBegin( GL_LINE_STRIP ); for ( i = `I1'
+%% ; i &lt;= `I2' ; i += 1 ) glEvalCoord2( i.&amp;Delta; u+u 1, j.&amp;Delta; v+v 1
+%% ); glEnd(); } for ( i = `I1' ; i &lt;= `I2' ; i += 1 ) { glBegin( GL_LINE_STRIP
+%% ); for ( j = `J1' ; j &lt;= `J1' ; j += 1 ) glEvalCoord2( i.&amp;Delta; u+u 1, j.
+%% &amp;Delta; v+v 1 ); glEnd(); }
+%%
+%% And finally, if `Mode' is `?GL_POINT', then a call to ``gl:evalMesh2'' is
+%% equivalent to:
+%%
+%% glBegin( GL_POINTS ); for ( j = `J1' ; j &lt;= `J2' ; j += 1 ) for ( i = `I1'
+%% ; i &lt;= `I2' ; i += 1 ) glEvalCoord2( i.&amp;Delta; u+u 1, j.&amp;Delta; v+v 1
+%% ); glEnd();
+%%
+%% In all three cases, the only absolute numeric requirements are that if i= n, then the
+%% value computed from i.&amp;Delta; u+u 1 is exactly u 2, and if j= m, then the value
+%% computed from j.&amp;Delta; v+v 1 is exactly v 2.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalMesh.xml">external</a> documentation.
+-spec evalMesh1(Mode, I1, I2) -> ok when Mode :: enum(),I1 :: integer(),I2 :: integer().
+evalMesh1(Mode,I1,I2) ->
+ cast(5302, <<Mode:?GLenum,I1:?GLint,I2:?GLint>>).
-%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexPointer.xml">external</a> documentation.
--spec vertexPointer(integer(),enum(),integer(),offset()|mem()) -> ok.
-vertexPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) ->
- cast(5312, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
-vertexPointer(Size,Type,Stride,Pointer) ->
- send_bin(Pointer),
- cast(5313, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
+%% @doc
+%% See {@link evalMesh1/3}
+-spec evalMesh2(Mode, I1, I2, J1, J2) -> ok when Mode :: enum(),I1 :: integer(),I2 :: integer(),J1 :: integer(),J2 :: integer().
+evalMesh2(Mode,I1,I2,J1,J2) ->
+ cast(5303, <<Mode:?GLenum,I1:?GLint,I2:?GLint,J1:?GLint,J2:?GLint>>).
-%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml">external</a> documentation.
--spec viewport(integer(),integer(),integer(),integer()) -> ok.
-viewport(X,Y,Width,Height) ->
- cast(5314, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
+%% @doc Specify fog parameters
+%%
+%% Fog is initially disabled. While enabled, fog affects rasterized geometry, bitmaps, and
+%% pixel blocks, but not buffer clear operations. To enable and disable fog, call {@link gl:enable/1}
+%% and {@link gl:enable/1} with argument `?GL_FOG'.
+%%
+%% ``gl:fog'' assigns the value or values in `Params' to the fog parameter specified
+%% by `Pname' . The following values are accepted for `Pname' :
+%%
+%% `?GL_FOG_MODE': `Params' is a single integer or floating-point value that specifies
+%% the equation to be used to compute the fog blend factor, f. Three symbolic constants
+%% are accepted: `?GL_LINEAR', `?GL_EXP', and `?GL_EXP2'. The equations corresponding
+%% to these symbolic constants are defined below. The initial fog mode is `?GL_EXP'.
+%%
+%% `?GL_FOG_DENSITY': `Params' is a single integer or floating-point value that
+%% specifies density, the fog density used in both exponential fog equations. Only nonnegative
+%% densities are accepted. The initial fog density is 1.
+%%
+%% `?GL_FOG_START': `Params' is a single integer or floating-point value that specifies
+%% start, the near distance used in the linear fog equation. The initial near distance
+%% is 0.
+%%
+%% `?GL_FOG_END': `Params' is a single integer or floating-point value that specifies
+%% end, the far distance used in the linear fog equation. The initial far distance is 1.
+%%
+%% `?GL_FOG_INDEX': `Params' is a single integer or floating-point value that specifies
+%% i f, the fog color index. The initial fog index is 0.
+%%
+%% `?GL_FOG_COLOR': `Params' contains four integer or floating-point values that
+%% specify C f, the fog color. Integer values are mapped linearly such that the most positive
+%% representable value maps to 1.0, and the most negative representable value maps to -1.0.
+%% Floating-point values are mapped directly. After conversion, all color components are
+%% clamped to the range [0 1]. The initial fog color is (0, 0, 0, 0).
+%%
+%% `?GL_FOG_COORD_SRC': `Params' contains either of the following symbolic constants:
+%% `?GL_FOG_COORD' or `?GL_FRAGMENT_DEPTH'. `?GL_FOG_COORD' specifies that
+%% the current fog coordinate should be used as distance value in the fog color computation.
+%% `?GL_FRAGMENT_DEPTH' specifies that the current fragment depth should be used as
+%% distance value in the fog computation.
+%%
+%% Fog blends a fog color with each rasterized pixel fragment's post-texturing color using
+%% a blending factor f. Factor f is computed in one of three ways, depending on the fog
+%% mode. Let c be either the distance in eye coordinate from the origin (in the case that
+%% the `?GL_FOG_COORD_SRC' is `?GL_FRAGMENT_DEPTH') or the current fog coordinate
+%% (in the case that `?GL_FOG_COORD_SRC' is `?GL_FOG_COORD'). The equation for `?GL_LINEAR'
+%% fog is f=(end-c)/(end-start)
+%%
+%% The equation for `?GL_EXP' fog is f= e(-(density. c))
+%%
+%% The equation for `?GL_EXP2' fog is f= e(-(density. c)) 2
+%%
+%% Regardless of the fog mode, f is clamped to the range [0 1] after it is computed. Then,
+%% if the GL is in RGBA color mode, the fragment's red, green, and blue colors, represented
+%% by C r, are replaced by
+%%
+%% (C r)"= f*C r+(1-f)*C f
+%%
+%% Fog does not affect a fragment's alpha component.
+%%
+%% In color index mode, the fragment's color index i r is replaced by
+%%
+%% (i r)"= i r+(1-f)*i f
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml">external</a> documentation.
+-spec fogf(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+fogf(Pname,Param) ->
+ cast(5304, <<Pname:?GLenum,Param:?GLfloat>>).
+
+%% @doc
+%% See {@link fogf/2}
+-spec fogi(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+fogi(Pname,Param) ->
+ cast(5305, <<Pname:?GLenum,Param:?GLint>>).
+
+%% @doc
+%% See {@link fogf/2}
+-spec fogfv(Pname, Params) -> ok when Pname :: enum(),Params :: {float()}.
+fogfv(Pname,Params) ->
+ cast(5306, <<Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
+
+%% @doc
+%% See {@link fogf/2}
+-spec fogiv(Pname, Params) -> ok when Pname :: enum(),Params :: {integer()}.
+fogiv(Pname,Params) ->
+ cast(5307, <<Pname:?GLenum,(size(Params)):?GLuint,
+ (<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
+
+%% @doc Controls feedback mode
+%%
+%% The ``gl:feedbackBuffer'' function controls feedback. Feedback, like selection, is
+%% a GL mode. The mode is selected by calling {@link gl:renderMode/1} with `?GL_FEEDBACK'.
+%% When the GL is in feedback mode, no pixels are produced by rasterization. Instead, information
+%% about primitives that would have been rasterized is fed back to the application using
+%% the GL.
+%%
+%% ``gl:feedbackBuffer'' has three arguments: `Buffer' is a pointer to an array of
+%% floating-point values into which feedback information is placed. `Size' indicates
+%% the size of the array. `Type' is a symbolic constant describing the information that
+%% is fed back for each vertex. ``gl:feedbackBuffer'' must be issued before feedback mode
+%% is enabled (by calling {@link gl:renderMode/1} with argument `?GL_FEEDBACK'). Setting
+%% `?GL_FEEDBACK' without establishing the feedback buffer, or calling ``gl:feedbackBuffer''
+%% while the GL is in feedback mode, is an error.
+%%
+%% When {@link gl:renderMode/1} is called while in feedback mode, it returns the number of
+%% entries placed in the feedback array and resets the feedback array pointer to the base
+%% of the feedback buffer. The returned value never exceeds `Size' . If the feedback
+%% data required more room than was available in `Buffer' , {@link gl:renderMode/1} returns
+%% a negative value. To take the GL out of feedback mode, call {@link gl:renderMode/1} with
+%% a parameter value other than `?GL_FEEDBACK'.
+%%
+%% While in feedback mode, each primitive, bitmap, or pixel rectangle that would be rasterized
+%% generates a block of values that are copied into the feedback array. If doing so would
+%% cause the number of entries to exceed the maximum, the block is partially written so as
+%% to fill the array (if there is any room left at all), and an overflow flag is set. Each
+%% block begins with a code indicating the primitive type, followed by values that describe
+%% the primitive's vertices and associated data. Entries are also written for bitmaps and
+%% pixel rectangles. Feedback occurs after polygon culling and {@link gl:polygonMode/2} interpretation
+%% of polygons has taken place, so polygons that are culled are not returned in the feedback
+%% buffer. It can also occur after polygons with more than three edges are broken up into
+%% triangles, if the GL implementation renders polygons by performing this decomposition.
+%%
+%% The {@link gl:passThrough/1} command can be used to insert a marker into the feedback
+%% buffer. See {@link gl:passThrough/1} .
+%%
+%% Following is the grammar for the blocks of values written into the feedback buffer. Each
+%% primitive is indicated with a unique identifying value followed by some number of vertices.
+%% Polygon entries include an integer value indicating how many vertices follow. A vertex
+%% is fed back as some number of floating-point values, as determined by `Type' . Colors
+%% are fed back as four values in RGBA mode and one value in color index mode.
+%%
+%% feedbackList feedbackItem feedbackList | feedbackItem
+%%
+%% feedbackItem point | lineSegment | polygon | bitmap | pixelRectangle | passThru
+%%
+%% point `?GL_POINT_TOKEN' vertex
+%%
+%% lineSegment `?GL_LINE_TOKEN' vertex vertex | `?GL_LINE_RESET_TOKEN' vertex
+%% vertex
+%%
+%% polygon `?GL_POLYGON_TOKEN' n polySpec
+%%
+%% polySpec polySpec vertex | vertex vertex vertex
+%%
+%% bitmap `?GL_BITMAP_TOKEN' vertex
+%%
+%% pixelRectangle `?GL_DRAW_PIXEL_TOKEN' vertex | `?GL_COPY_PIXEL_TOKEN' vertex
+%%
+%% passThru `?GL_PASS_THROUGH_TOKEN' value
+%%
+%% vertex 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture
+%%
+%% 2d value value
+%%
+%% 3d value value value
+%%
+%% 3dColor value value value color
+%%
+%% 3dColorTexture value value value color tex
+%%
+%% 4dColorTexture value value value value color tex
+%%
+%% color rgba | index
+%%
+%% rgba value value value value
+%%
+%% index value
+%%
+%% tex value value value value
+%%
+%% `value' is a floating-point number, and `n' is a floating-point integer giving
+%% the number of vertices in the polygon. `?GL_POINT_TOKEN', `?GL_LINE_TOKEN', `?GL_LINE_RESET_TOKEN'
+%% , `?GL_POLYGON_TOKEN', `?GL_BITMAP_TOKEN', `?GL_DRAW_PIXEL_TOKEN', `?GL_COPY_PIXEL_TOKEN'
+%% and `?GL_PASS_THROUGH_TOKEN' are symbolic floating-point constants. `?GL_LINE_RESET_TOKEN'
+%% is returned whenever the line stipple pattern is reset. The data returned as a vertex
+%% depends on the feedback `Type' .
+%%
+%% The following table gives the correspondence between `Type' and the number of values
+%% per vertex. `k' is 1 in color index mode and 4 in RGBA mode.
+%%
+%% <table><tbody><tr><td>` Type '</td><td>` Coordinates '</td><td>` Color '</td>
+%% <td>` Texture '</td><td>` Total Number of Values '</td></tr></tbody><tbody><tr><td>
+%% `?GL_2D'</td><td>`x', `y'</td><td></td><td></td><td> 2 </td></tr><tr><td>`?GL_3D'
+%% </td><td>`x', `y', `z'</td><td></td><td></td><td> 3 </td></tr><tr><td>`?GL_3D_COLOR'
+%% </td><td>`x', `y', `z'</td><td> k</td><td></td><td> 3+k</td></tr><tr><td>`?GL_3D_COLOR_TEXTURE'
+%% </td><td>`x', `y', `z'</td><td> k</td><td> 4 </td><td> 7+k</td></tr><tr><td>
+%% `?GL_4D_COLOR_TEXTURE'</td><td>`x', `y', `z', `w'</td><td> k</td>
+%% <td> 4 </td><td> 8+k</td></tr></tbody></table>
+%%
+%% Feedback vertex coordinates are in window coordinates, except `w', which is in clip
+%% coordinates. Feedback colors are lighted, if lighting is enabled. Feedback texture coordinates
+%% are generated, if texture coordinate generation is enabled. They are always transformed
+%% by the texture matrix.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFeedbackBuffer.xml">external</a> documentation.
+-spec feedbackBuffer(Size, Type, Buffer) -> ok when Size :: integer(),Type :: enum(),Buffer :: mem().
+feedbackBuffer(Size,Type,Buffer) ->
+ send_bin(Buffer),
+ call(5308, <<Size:?GLsizei,Type:?GLenum>>).
+
+%% @doc Place a marker in the feedback buffer
+%%
+%% Feedback is a GL render mode. The mode is selected by calling {@link gl:renderMode/1}
+%% with `?GL_FEEDBACK'. When the GL is in feedback mode, no pixels are produced by rasterization.
+%% Instead, information about primitives that would have been rasterized is fed back to the
+%% application using the GL. See the {@link gl:feedbackBuffer/3} reference page for a description
+%% of the feedback buffer and the values in it.
+%%
+%% ``gl:passThrough'' inserts a user-defined marker in the feedback buffer when it is executed
+%% in feedback mode. `Token' is returned as if it were a primitive; it is indicated
+%% with its own unique identifying value: `?GL_PASS_THROUGH_TOKEN'. The order of ``gl:passThrough''
+%% commands with respect to the specification of graphics primitives is maintained.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPassThrough.xml">external</a> documentation.
+-spec passThrough(Token) -> ok when Token :: float().
+passThrough(Token) ->
+ cast(5309, <<Token:?GLfloat>>).
-%% @spec (Red::clamp(),Green::clamp(),Blue::clamp(),Alpha::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendColor.xml">external</a> documentation.
--spec blendColor(clamp(),clamp(),clamp(),clamp()) -> ok.
+%% @doc Establish a buffer for selection mode values
+%%
+%% ``gl:selectBuffer'' has two arguments: `Buffer' is a pointer to an array of unsigned
+%% integers, and `Size' indicates the size of the array. `Buffer' returns values
+%% from the name stack (see {@link gl:initNames/0} , {@link gl:loadName/1} , {@link gl:pushName/1} )
+%% when the rendering mode is `?GL_SELECT' (see {@link gl:renderMode/1} ). ``gl:selectBuffer''
+%% must be issued before selection mode is enabled, and it must not be issued while the
+%% rendering mode is `?GL_SELECT'.
+%%
+%% A programmer can use selection to determine which primitives are drawn into some region
+%% of a window. The region is defined by the current modelview and perspective matrices.
+%%
+%% In selection mode, no pixel fragments are produced from rasterization. Instead, if a
+%% primitive or a raster position intersects the clipping volume defined by the viewing frustum
+%% and the user-defined clipping planes, this primitive causes a selection hit. (With polygons,
+%% no hit occurs if the polygon is culled.) When a change is made to the name stack, or when
+%% {@link gl:renderMode/1} is called, a hit record is copied to `Buffer' if any hits
+%% have occurred since the last such event (name stack change or {@link gl:renderMode/1} call).
+%% The hit record consists of the number of names in the name stack at the time of the event,
+%% followed by the minimum and maximum depth values of all vertices that hit since the previous
+%% event, followed by the name stack contents, bottom name first.
+%%
+%% Depth values (which are in the range [0,1]) are multiplied by 2 32-1, before being
+%% placed in the hit record.
+%%
+%% An internal index into `Buffer' is reset to 0 whenever selection mode is entered.
+%% Each time a hit record is copied into `Buffer' , the index is incremented to point
+%% to the cell just past the end of the block of names(emthat is, to the next available cell
+%% If the hit record is larger than the number of remaining locations in `Buffer' , as
+%% much data as can fit is copied, and the overflow flag is set. If the name stack is empty
+%% when a hit record is copied, that record consists of 0 followed by the minimum and maximum
+%% depth values.
+%%
+%% To exit selection mode, call {@link gl:renderMode/1} with an argument other than `?GL_SELECT'
+%% . Whenever {@link gl:renderMode/1} is called while the render mode is `?GL_SELECT',
+%% it returns the number of hit records copied to `Buffer' , resets the overflow flag
+%% and the selection buffer pointer, and initializes the name stack to be empty. If the overflow
+%% bit was set when {@link gl:renderMode/1} was called, a negative hit record count is returned.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSelectBuffer.xml">external</a> documentation.
+-spec selectBuffer(Size, Buffer) -> ok when Size :: integer(),Buffer :: mem().
+selectBuffer(Size,Buffer) ->
+ send_bin(Buffer),
+ call(5310, <<Size:?GLsizei>>).
+
+%% @doc Initialize the name stack
+%%
+%% The name stack is used during selection mode to allow sets of rendering commands to be
+%% uniquely identified. It consists of an ordered set of unsigned integers. ``gl:initNames''
+%% causes the name stack to be initialized to its default empty state.
+%%
+%% The name stack is always empty while the render mode is not `?GL_SELECT'. Calls to ``gl:initNames''
+%% while the render mode is not `?GL_SELECT' are ignored.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glInitNames.xml">external</a> documentation.
+-spec initNames() -> ok.
+initNames() ->
+ cast(5311, <<>>).
+
+%% @doc Load a name onto the name stack
+%%
+%% The name stack is used during selection mode to allow sets of rendering commands to be
+%% uniquely identified. It consists of an ordered set of unsigned integers and is initially
+%% empty.
+%%
+%% ``gl:loadName'' causes `Name' to replace the value on the top of the name stack.
+%%
+%% The name stack is always empty while the render mode is not `?GL_SELECT'. Calls to ``gl:loadName''
+%% while the render mode is not `?GL_SELECT' are ignored.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadName.xml">external</a> documentation.
+-spec loadName(Name) -> ok when Name :: integer().
+loadName(Name) ->
+ cast(5312, <<Name:?GLuint>>).
+
+%% @doc Push and pop the name stack
+%%
+%% The name stack is used during selection mode to allow sets of rendering commands to be
+%% uniquely identified. It consists of an ordered set of unsigned integers and is initially
+%% empty.
+%%
+%% ``gl:pushName'' causes `Name' to be pushed onto the name stack. {@link gl:pushName/1}
+%% pops one name off the top of the stack.
+%%
+%% The maximum name stack depth is implementation-dependent; call `?GL_MAX_NAME_STACK_DEPTH'
+%% to find out the value for a particular implementation. It is an error to push a name
+%% onto a full stack or to pop a name off an empty stack. It is also an error to manipulate
+%% the name stack between the execution of {@link gl:'begin'/1} and the corresponding execution
+%% of {@link gl:'begin'/1} . In any of these cases, the error flag is set and no other change is
+%% made to GL state.
+%%
+%% The name stack is always empty while the render mode is not `?GL_SELECT'. Calls to ``gl:pushName''
+%% or {@link gl:pushName/1} while the render mode is not `?GL_SELECT' are ignored.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushName.xml">external</a> documentation.
+-spec pushName(Name) -> ok when Name :: integer().
+pushName(Name) ->
+ cast(5313, <<Name:?GLuint>>).
+
+%% @doc
+%% See {@link pushName/1}
+-spec popName() -> ok.
+popName() ->
+ cast(5314, <<>>).
+
+%% @doc Set the blend color
+%%
+%% The `?GL_BLEND_COLOR' may be used to calculate the source and destination blending
+%% factors. The color components are clamped to the range [0 1] before being stored. See {@link gl:blendFunc/2}
+%% for a complete description of the blending operations. Initially the `?GL_BLEND_COLOR'
+%% is set to (0, 0, 0, 0).
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendColor.xml">external</a> documentation.
+-spec blendColor(Red, Green, Blue, Alpha) -> ok when Red :: clamp(),Green :: clamp(),Blue :: clamp(),Alpha :: clamp().
blendColor(Red,Green,Blue,Alpha) ->
cast(5315, <<Red:?GLclampf,Green:?GLclampf,Blue:?GLclampf,Alpha:?GLclampf>>).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquation.xml">external</a> documentation.
--spec blendEquation(enum()) -> ok.
+%% @doc Specify the equation used for both the RGB blend equation and the Alpha blend equation
+%%
+%% The blend equations determine how a new pixel (the ''source'' color) is combined with
+%% a pixel already in the framebuffer (the ''destination'' color). This function sets both
+%% the RGB blend equation and the alpha blend equation to a single equation. ``gl:blendEquationi''
+%% specifies the blend equation for a single draw buffer whereas ``gl:blendEquation''
+%% sets the blend equation for all draw buffers.
+%%
+%% These equations use the source and destination blend factors specified by either {@link gl:blendFunc/2}
+%% or {@link gl:blendFuncSeparate/4} . See {@link gl:blendFunc/2} or {@link gl:blendFuncSeparate/4}
+%% for a description of the various blend factors.
+%%
+%% In the equations that follow, source and destination color components are referred to
+%% as (R s G s B s A s) and (R d G d B d A d), respectively. The result color is referred to as (R r G r B r A r). The source and destination
+%% blend factors are denoted (s R s G s B s A) and (d R d G d B d A), respectively. For these equations all color components
+%% are understood to have values in the range [0 1]. <table><tbody><tr><td>` Mode '</td><td>
+%% ` RGB Components '</td><td>` Alpha Component '</td></tr></tbody><tbody><tr><td>`?GL_FUNC_ADD'
+%% </td><td> Rr= R s s R+R d d R Gr= G s s G+G d d G Br= B s s B+B d d B</td><td> Ar=
+%% A s s A+A d d A</td></tr><tr><td>`?GL_FUNC_SUBTRACT'</td><td> Rr= R s s R-R d d
+%% R Gr= G s s G-G d d G Br= B s s B-B d d B</td><td> Ar= A s s A-A d d A</td></tr><tr>
+%% <td>`?GL_FUNC_REVERSE_SUBTRACT'</td><td> Rr= R d d R-R s s R Gr= G d d G-G s s G
+%% Br= B d d B-B s s B</td><td> Ar= A d d A-A s s A</td></tr><tr><td>`?GL_MIN'</td><td>
+%% Rr= min(R s R d) Gr= min(G s G d) Br= min(B s B d)</td><td> Ar= min(A s A d)</td></tr><tr><td>`?GL_MAX'</td><td> Rr=
+%% max(R s R d) Gr= max(G s G d) Br= max(B s B d)</td><td> Ar= max(A s A d)</td></tr></tbody></table>
+%%
+%% The results of these equations are clamped to the range [0 1].
+%%
+%% The `?GL_MIN' and `?GL_MAX' equations are useful for applications that analyze
+%% image data (image thresholding against a constant color, for example). The `?GL_FUNC_ADD'
+%% equation is useful for antialiasing and transparency, among other things.
+%%
+%% Initially, both the RGB blend equation and the alpha blend equation are set to `?GL_FUNC_ADD'
+%% .
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquation.xml">external</a> documentation.
+-spec blendEquation(Mode) -> ok when Mode :: enum().
blendEquation(Mode) ->
cast(5316, <<Mode:?GLenum>>).
-%% @spec (Mode::enum(),Start::integer(),End::integer(),Count::integer(),Type::enum(),Indices::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawRangeElements.xml">external</a> documentation.
--spec drawRangeElements(enum(),integer(),integer(),integer(),enum(),offset()|mem()) -> ok.
+%% @doc Render primitives from array data
+%%
+%% ``gl:drawRangeElements'' is a restricted form of {@link gl:drawElements/4} . `Mode' ,
+%% `Start' , `End' , and `Count' match the corresponding arguments to {@link gl:drawElements/4}
+%% , with the additional constraint that all values in the arrays `Count' must lie between
+%% `Start' and `End' , inclusive.
+%%
+%% Implementations denote recommended maximum amounts of vertex and index data, which may
+%% be queried by calling {@link gl:getBooleanv/1} with argument `?GL_MAX_ELEMENTS_VERTICES' and `?GL_MAX_ELEMENTS_INDICES'
+%% . If end-start+1 is greater than the value of `?GL_MAX_ELEMENTS_VERTICES', or if `Count'
+%% is greater than the value of `?GL_MAX_ELEMENTS_INDICES', then the call may operate
+%% at reduced performance. There is no requirement that all vertices in the range [start end] be referenced.
+%% However, the implementation may partially process unused vertices, reducing performance
+%% from what could be achieved with an optimal index set.
+%%
+%% When ``gl:drawRangeElements'' is called, it uses `Count' sequential elements from
+%% an enabled array, starting at `Start' to construct a sequence of geometric primitives.
+%% `Mode' specifies what kind of primitives are constructed, and how the array elements
+%% construct these primitives. If more than one array is enabled, each is used.
+%%
+%% Vertex attributes that are modified by ``gl:drawRangeElements'' have an unspecified
+%% value after ``gl:drawRangeElements'' returns. Attributes that aren't modified maintain
+%% their previous values.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawRangeElements.xml">external</a> documentation.
+-spec drawRangeElements(Mode, Start, End, Count, Type, Indices) -> ok when Mode :: enum(),Start :: integer(),End :: integer(),Count :: integer(),Type :: enum(),Indices :: offset()|mem().
drawRangeElements(Mode,Start,End,Count,Type,Indices) when is_integer(Indices) ->
cast(5317, <<Mode:?GLenum,Start:?GLuint,End:?GLuint,Count:?GLsizei,Type:?GLenum,Indices:?GLuint>>);
drawRangeElements(Mode,Start,End,Count,Type,Indices) ->
send_bin(Indices),
cast(5318, <<Mode:?GLenum,Start:?GLuint,End:?GLuint,Count:?GLsizei,Type:?GLenum>>).
-%% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Depth::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage3D.xml">external</a> documentation.
--spec texImage3D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
-texImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,Format,Type,Pixels) when is_integer(Pixels) ->
- cast(5319, <<Target:?GLenum,Level:?GLint,Internalformat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
-texImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,Format,Type,Pixels) ->
+%% @doc Specify a three-dimensional texture image
+%%
+%% Texturing maps a portion of a specified texture image onto each graphical primitive for
+%% which texturing is enabled. To enable and disable three-dimensional texturing, call {@link gl:enable/1}
+%% and {@link gl:enable/1} with argument `?GL_TEXTURE_3D'.
+%%
+%% To define texture images, call ``gl:texImage3D''. The arguments describe the parameters
+%% of the texture image, such as height, width, depth, width of the border, level-of-detail
+%% number (see {@link gl:texParameterf/3} ), and number of color components provided. The last
+%% three arguments describe how the image is represented in memory.
+%%
+%% If `Target' is `?GL_PROXY_TEXTURE_3D', no data is read from `Data' , but
+%% all of the texture image state is recalculated, checked for consistency, and checked against
+%% the implementation's capabilities. If the implementation cannot handle a texture of the
+%% requested texture size, it sets all of the image state to 0, but does not generate an
+%% error (see {@link gl:getError/0} ). To query for an entire mipmap array, use an image array
+%% level greater than or equal to 1.
+%%
+%% If `Target' is `?GL_TEXTURE_3D', data is read from `Data' as a sequence
+%% of signed or unsigned bytes, shorts, or longs, or single-precision floating-point values,
+%% depending on `Type' . These values are grouped into sets of one, two, three, or four
+%% values, depending on `Format' , to form elements. Each data byte is treated as eight
+%% 1-bit elements, with bit ordering determined by `?GL_UNPACK_LSB_FIRST' (see {@link gl:pixelStoref/2}
+%% ).
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% The first element corresponds to the lower left corner of the texture image. Subsequent
+%% elements progress left-to-right through the remaining texels in the lowest row of the
+%% texture image, and then in successively higher rows of the texture image. The final element
+%% corresponds to the upper right corner of the texture image.
+%%
+%% `Format' determines the composition of each element in `Data' . It can assume
+%% one of these symbolic values:
+%%
+%% `?GL_RED': Each element is a single red component. The GL converts it to floating
+%% point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for
+%% alpha. Each component is then multiplied by the signed scale factor `?GL_c_SCALE',
+%% added to the signed bias `?GL_c_BIAS', and clamped to the range [0,1].
+%%
+%% `?GL_RG': Each element is a red and green pair. The GL converts each to floating
+%% point and assembles it into an RGBA element by attaching 0 for blue, and 1 for alpha.
+%% Each component is then multiplied by the signed scale factor `?GL_c_SCALE', added
+%% to the signed bias `?GL_c_BIAS', and clamped to the range [0,1].
+%%
+%% `?GL_RGB'
+%%
+%% `?GL_BGR': Each element is an RGB triple. The GL converts it to floating point and
+%% assembles it into an RGBA element by attaching 1 for alpha. Each component is then multiplied
+%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS',
+%% and clamped to the range [0,1].
+%%
+%% `?GL_RGBA'
+%%
+%% `?GL_BGRA': Each element contains all four components. Each component is multiplied
+%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS',
+%% and clamped to the range [0,1].
+%%
+%% If an application wants to store the texture at a certain resolution or in a certain
+%% format, it can request the resolution and format with `InternalFormat' . The GL will
+%% choose an internal representation that closely approximates that requested by `InternalFormat'
+%% , but it may not match exactly. (The representations specified by `?GL_RED', `?GL_RG'
+%% , `?GL_RGB', and `?GL_RGBA' must match exactly.)
+%%
+%% `InternalFormat' may be one of the base internal formats shown in Table 1, below
+%%
+%% `InternalFormat' may also be one of the sized internal formats shown in Table 2,
+%% below
+%%
+%% Finally, `InternalFormat' may also be one of the generic or compressed compressed
+%% texture formats shown in Table 3 below
+%%
+%% If the `InternalFormat' parameter is one of the generic compressed formats, `?GL_COMPRESSED_RED'
+%% , `?GL_COMPRESSED_RG', `?GL_COMPRESSED_RGB', or `?GL_COMPRESSED_RGBA',
+%% the GL will replace the internal format with the symbolic constant for a specific internal
+%% format and compress the texture before storage. If no corresponding internal format is
+%% available, or the GL can not compress that image for any reason, the internal format is
+%% instead replaced with a corresponding base internal format.
+%%
+%% If the `InternalFormat' parameter is `?GL_SRGB', `?GL_SRGB8', `?GL_SRGB_ALPHA'
+%% , or `?GL_SRGB8_ALPHA8', the texture is treated as if the red, green, blue, or
+%% luminance components are encoded in the sRGB color space. Any alpha component is left
+%% unchanged. The conversion from the sRGB encoded component c s to a linear component
+%% c l is:
+%%
+%% c l={ c s/12.92if c s&amp;le; 0.04045( c s+0.055/1.055) 2.4if c s&gt; 0.04045
+%%
+%% Assume c s is the sRGB component in the range [0,1].
+%%
+%% Use the `?GL_PROXY_TEXTURE_3D' target to try out a resolution and format. The implementation
+%% will update and recompute its best match for the requested storage resolution and format.
+%% To then query this state, call {@link gl:getTexLevelParameterfv/3} . If the texture cannot
+%% be accommodated, texture state is set to 0.
+%%
+%% A one-component texture image uses only the red component of the RGBA color extracted
+%% from `Data' . A two-component image uses the R and A values. A three-component image
+%% uses the R, G, and B values. A four-component image uses all of the RGBA components.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage3D.xml">external</a> documentation.
+-spec texImage3D(Target, Level, InternalFormat, Width, Height, Depth, Border, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+texImage3D(Target,Level,InternalFormat,Width,Height,Depth,Border,Format,Type,Pixels) when is_integer(Pixels) ->
+ cast(5319, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
+texImage3D(Target,Level,InternalFormat,Width,Height,Depth,Border,Format,Type,Pixels) ->
send_bin(Pixels),
- cast(5320, <<Target:?GLenum,Level:?GLint,Internalformat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum>>).
+ cast(5320, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Zoffset::integer(),Width::integer(),Height::integer(),Depth::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage3D.xml">external</a> documentation.
--spec texSubImage3D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
+%% @doc glTexSubImage
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage.xml">external</a> documentation.
+-spec texSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, Width, Height, Depth, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5321, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Zoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Type,Pixels) ->
send_bin(Pixels),
cast(5322, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Zoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Zoffset::integer(),X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage3D.xml">external</a> documentation.
--spec copyTexSubImage3D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc Copy a three-dimensional texture subimage
+%%
+%% ``gl:copyTexSubImage3D'' replaces a rectangular portion of a three-dimensional texture
+%% image with pixels from the current `?GL_READ_BUFFER' (rather than from main memory,
+%% as is the case for {@link gl:texSubImage1D/7} ).
+%%
+%% The screen-aligned pixel rectangle with lower left corner at ( `X' , `Y' ) and
+%% with width `Width' and height `Height' replaces the portion of the texture array
+%% with x indices `Xoffset' through xoffset+width-1, inclusive, and y indices `Yoffset'
+%% through yoffset+height-1, inclusive, at z index `Zoffset' and at the mipmap level
+%% specified by `Level' .
+%%
+%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been
+%% called, but the process stops just before final conversion. At this point, all pixel component
+%% values are clamped to the range [0 1] and then converted to the texture's internal format
+%% for storage in the texel array.
+%%
+%% The destination rectangle in the texture array may not include any texels outside the
+%% texture array as it was originally specified. It is not an error to specify a subtexture
+%% with zero width or height, but such a specification has no effect.
+%%
+%% If any of the pixels within the specified rectangle of the current `?GL_READ_BUFFER'
+%% are outside the read window associated with the current rendering context, then the values
+%% obtained for those pixels are undefined.
+%%
+%% No change is made to the `internalformat', `width', `height', `depth',
+%% or `border' parameters of the specified texture array or to texel values outside
+%% the specified subregion.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage3D.xml">external</a> documentation.
+-spec copyTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, X, Y, Width, Height) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
copyTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,X,Y,Width,Height) ->
cast(5323, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Zoffset:?GLint,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
-%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Format::enum(),Type::enum(),Table::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorTable.xml">external</a> documentation.
--spec colorTable(enum(),enum(),integer(),enum(),enum(),offset()|mem()) -> ok.
+%% @doc Define a color lookup table
+%%
+%% ``gl:colorTable'' may be used in two ways: to test the actual size and color resolution
+%% of a lookup table given a particular set of parameters, or to load the contents of a color
+%% lookup table. Use the targets `?GL_PROXY_*' for the first case and the other targets
+%% for the second case.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a color table is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% If `Target' is `?GL_COLOR_TABLE', `?GL_POST_CONVOLUTION_COLOR_TABLE', or `?GL_POST_COLOR_MATRIX_COLOR_TABLE'
+%% , ``gl:colorTable'' builds a color lookup table from an array of pixels. The pixel array
+%% specified by `Width' , `Format' , `Type' , and `Data' is extracted from
+%% memory and processed just as if {@link gl:drawPixels/5} were called, but processing stops
+%% after the final expansion to RGBA is completed.
+%%
+%% The four scale parameters and the four bias parameters that are defined for the table
+%% are then used to scale and bias the R, G, B, and A components of each pixel. (Use ``gl:colorTableParameter''
+%% to set these scale and bias parameters.)
+%%
+%% Next, the R, G, B, and A values are clamped to the range [0 1]. Each pixel is then converted
+%% to the internal format specified by `Internalformat' . This conversion simply maps
+%% the component values of the pixel (R, G, B, and A) to the values included in the internal
+%% format (red, green, blue, alpha, luminance, and intensity). The mapping is as follows:
+%%
+%% <table><tbody><tr><td>` Internal Format '</td><td>` Red '</td><td>` Green '</td>
+%% <td>` Blue '</td><td>` Alpha '</td><td>` Luminance '</td><td>` Intensity '
+%% </td></tr></tbody><tbody><tr><td>`?GL_ALPHA'</td><td></td><td></td><td></td><td> A </td>
+%% <td></td><td></td></tr><tr><td>`?GL_LUMINANCE'</td><td></td><td></td><td></td><td></td>
+%% <td> R </td><td></td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td><td></td><td></td><td></td>
+%% <td> A </td><td> R </td><td></td></tr><tr><td>`?GL_INTENSITY'</td><td></td><td></td><td>
+%% </td><td></td><td></td><td> R </td></tr><tr><td>`?GL_RGB'</td><td> R </td><td> G </td>
+%% <td> B </td><td></td><td></td><td></td></tr><tr><td>`?GL_RGBA'</td><td> R </td><td>
+%% G </td><td> B </td><td> A </td><td></td><td></td></tr></tbody></table>
+%%
+%% Finally, the red, green, blue, alpha, luminance, and/or intensity components of the resulting
+%% pixels are stored in the color table. They form a one-dimensional table with indices in
+%% the range [0 width-1].
+%%
+%% If `Target' is `?GL_PROXY_*', ``gl:colorTable'' recomputes and stores the
+%% values of the proxy color table's state variables `?GL_COLOR_TABLE_FORMAT', `?GL_COLOR_TABLE_WIDTH'
+%% , `?GL_COLOR_TABLE_RED_SIZE', `?GL_COLOR_TABLE_GREEN_SIZE', `?GL_COLOR_TABLE_BLUE_SIZE'
+%% , `?GL_COLOR_TABLE_ALPHA_SIZE', `?GL_COLOR_TABLE_LUMINANCE_SIZE', and `?GL_COLOR_TABLE_INTENSITY_SIZE'
+%% . There is no effect on the image or state of any actual color table. If the specified
+%% color table is too large to be supported, then all the proxy state variables listed above
+%% are set to zero. Otherwise, the color table could be supported by ``gl:colorTable''
+%% using the corresponding non-proxy target, and the proxy state variables are set as if
+%% that target were being defined.
+%%
+%% The proxy state variables can be retrieved by calling {@link gl:getColorTableParameterfv/2}
+%% with a target of `?GL_PROXY_*'. This allows the application to decide if a particular
+%% ``gl:colorTable'' command would succeed, and to determine what the resulting color table
+%% attributes would be.
+%%
+%% If a color table is enabled, and its width is non-zero, then its contents are used to
+%% replace a subset of the components of each RGBA pixel group, based on the internal format
+%% of the table.
+%%
+%% Each pixel group has color components (R, G, B, A) that are in the range [0.0 1.0]. The color
+%% components are rescaled to the size of the color lookup table to form an index. Then a
+%% subset of the components based on the internal format of the table are replaced by the
+%% table entry selected by that index. If the color components and contents of the table
+%% are represented as follows:
+%%
+%% <table><tbody><tr><td>` Representation '</td><td>` Meaning '</td></tr></tbody><tbody>
+%% <tr><td>r</td><td> Table index computed from R</td></tr><tr><td>g</td><td> Table index
+%% computed from G</td></tr><tr><td>b</td><td> Table index computed from B</td></tr><tr><td>a
+%% </td><td> Table index computed from A</td></tr><tr><td>L[i]</td><td> Luminance value at
+%% table index i</td></tr><tr><td>I[i]</td><td> Intensity value at table index i</td></tr><tr>
+%% <td>R[i]</td><td> Red value at table index i</td></tr><tr><td>G[i]</td><td> Green value
+%% at table index i</td></tr><tr><td>B[i]</td><td> Blue value at table index i</td></tr><tr><td>
+%% A[i]</td><td> Alpha value at table index i</td></tr></tbody></table>
+%%
+%% then the result of color table lookup is as follows:
+%%
+%% <table><tbody><tr><td></td><td>` Resulting Texture Components '</td></tr><tr><td>` Table Internal Format '
+%% </td><td>` R '</td><td>` G '</td><td>` B '</td><td>` A '</td></tr></tbody>
+%% <tbody><tr><td>`?GL_ALPHA'</td><td>R</td><td>G</td><td>B</td><td>A[a]</td></tr><tr><td>
+%% `?GL_LUMINANCE'</td><td>L[r]</td><td>L[g]</td><td>L[b]</td><td>At</td></tr><tr><td>`?GL_LUMINANCE_ALPHA'
+%% </td><td>L[r]</td><td>L[g]</td><td>L[b]</td><td>A[a]</td></tr><tr><td>`?GL_INTENSITY'</td>
+%% <td>I[r]</td><td>I[g]</td><td>I[b]</td><td>I[a]</td></tr><tr><td>`?GL_RGB'</td><td>R[r]
+%% </td><td>G[g]</td><td>B[b]</td><td>A</td></tr><tr><td>`?GL_RGBA'</td><td>R[r]</td><td>
+%% G[g]</td><td>B[b]</td><td>A[a]</td></tr></tbody></table>
+%%
+%% When `?GL_COLOR_TABLE' is enabled, the colors resulting from the pixel map operation
+%% (if it is enabled) are mapped by the color lookup table before being passed to the convolution
+%% operation. The colors resulting from the convolution operation are modified by the post
+%% convolution color lookup table when `?GL_POST_CONVOLUTION_COLOR_TABLE' is enabled.
+%% These modified colors are then sent to the color matrix operation. Finally, if `?GL_POST_COLOR_MATRIX_COLOR_TABLE'
+%% is enabled, the colors resulting from the color matrix operation are mapped by the post
+%% color matrix color lookup table before being used by the histogram operation.
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorTable.xml">external</a> documentation.
+-spec colorTable(Target, Internalformat, Width, Format, Type, Table) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Format :: enum(),Type :: enum(),Table :: offset()|mem().
colorTable(Target,Internalformat,Width,Format,Type,Table) when is_integer(Table) ->
cast(5324, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Format:?GLenum,Type:?GLenum,Table:?GLuint>>);
colorTable(Target,Internalformat,Width,Format,Type,Table) ->
send_bin(Table),
cast(5325, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorTableParameter.xml">external</a> documentation.
--spec colorTableParameterfv(enum(),enum(),{float(),float(),float(),float()}) -> ok.
+%% @doc Set color lookup table parameters
+%%
+%% ``gl:colorTableParameter'' is used to specify the scale factors and bias terms applied
+%% to color components when they are loaded into a color table. `Target' indicates which
+%% color table the scale and bias terms apply to; it must be set to `?GL_COLOR_TABLE', `?GL_POST_CONVOLUTION_COLOR_TABLE'
+%% , or `?GL_POST_COLOR_MATRIX_COLOR_TABLE'.
+%%
+%% `Pname' must be `?GL_COLOR_TABLE_SCALE' to set the scale factors. In this case,
+%% `Params' points to an array of four values, which are the scale factors for red,
+%% green, blue, and alpha, in that order.
+%%
+%% `Pname' must be `?GL_COLOR_TABLE_BIAS' to set the bias terms. In this case, `Params'
+%% points to an array of four values, which are the bias terms for red, green, blue, and
+%% alpha, in that order.
+%%
+%% The color tables themselves are specified by calling {@link gl:colorTable/6} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorTableParameter.xml">external</a> documentation.
+-spec colorTableParameterfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float(),float(),float(),float()}.
colorTableParameterfv(Target,Pname,{P1,P2,P3,P4}) ->
cast(5326, <<Target:?GLenum,Pname:?GLenum,P1:?GLfloat,P2:?GLfloat,P3:?GLfloat,P4:?GLfloat>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorTableParameter.xml">external</a> documentation.
--spec colorTableParameteriv(enum(),enum(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link colorTableParameterfv/3}
+-spec colorTableParameteriv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer(),integer(),integer(),integer()}.
colorTableParameteriv(Target,Pname,{P1,P2,P3,P4}) ->
cast(5327, <<Target:?GLenum,Pname:?GLenum,P1:?GLint,P2:?GLint,P3:?GLint,P4:?GLint>>).
-%% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyColorTable.xml">external</a> documentation.
--spec copyColorTable(enum(),enum(),integer(),integer(),integer()) -> ok.
+%% @doc Copy pixels into a color table
+%%
+%% ``gl:copyColorTable'' loads a color table with pixels from the current `?GL_READ_BUFFER'
+%% (rather than from main memory, as is the case for {@link gl:colorTable/6} ).
+%%
+%% The screen-aligned pixel rectangle with lower-left corner at ( `X' , `Y' ) having
+%% width `Width' and height 1 is loaded into the color table. If any pixels within this
+%% region are outside the window that is associated with the GL context, the values obtained
+%% for those pixels are undefined.
+%%
+%% The pixels in the rectangle are processed just as if {@link gl:readPixels/7} were called,
+%% with `Internalformat' set to RGBA, but processing stops after the final conversion
+%% to RGBA.
+%%
+%% The four scale parameters and the four bias parameters that are defined for the table
+%% are then used to scale and bias the R, G, B, and A components of each pixel. The scale
+%% and bias parameters are set by calling {@link gl:colorTableParameterfv/3} .
+%%
+%% Next, the R, G, B, and A values are clamped to the range [0 1]. Each pixel is then converted
+%% to the internal format specified by `Internalformat' . This conversion simply maps
+%% the component values of the pixel (R, G, B, and A) to the values included in the internal
+%% format (red, green, blue, alpha, luminance, and intensity). The mapping is as follows:
+%%
+%% <table><tbody><tr><td>` Internal Format '</td><td>` Red '</td><td>` Green '</td>
+%% <td>` Blue '</td><td>` Alpha '</td><td>` Luminance '</td><td>` Intensity '
+%% </td></tr></tbody><tbody><tr><td>`?GL_ALPHA'</td><td></td><td></td><td></td><td> A </td>
+%% <td></td><td></td></tr><tr><td>`?GL_LUMINANCE'</td><td></td><td></td><td></td><td></td>
+%% <td> R </td><td></td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td><td></td><td></td><td></td>
+%% <td> A </td><td> R </td><td></td></tr><tr><td>`?GL_INTENSITY'</td><td></td><td></td><td>
+%% </td><td></td><td></td><td> R </td></tr><tr><td>`?GL_RGB'</td><td> R </td><td> G </td>
+%% <td> B </td><td></td><td></td><td></td></tr><tr><td>`?GL_RGBA'</td><td> R </td><td>
+%% G </td><td> B </td><td> A </td><td></td><td></td></tr></tbody></table>
+%%
+%% Finally, the red, green, blue, alpha, luminance, and/or intensity components of the resulting
+%% pixels are stored in the color table. They form a one-dimensional table with indices in
+%% the range [0 width-1].
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyColorTable.xml">external</a> documentation.
+-spec copyColorTable(Target, Internalformat, X, Y, Width) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer().
copyColorTable(Target,Internalformat,X,Y,Width) ->
cast(5328, <<Target:?GLenum,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei>>).
-%% @spec (Target::enum(),Format::enum(),Type::enum(),Table::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetColorTable.xml">external</a> documentation.
--spec getColorTable(enum(),enum(),enum(),mem()) -> ok.
+%% @doc Retrieve contents of a color lookup table
+%%
+%% ``gl:getColorTable'' returns in `Table' the contents of the color table specified
+%% by `Target' . No pixel transfer operations are performed, but pixel storage modes
+%% that are applicable to {@link gl:readPixels/7} are performed.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a histogram table is requested, `Table' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% Color components that are requested in the specified `Format' , but which are not
+%% included in the internal format of the color lookup table, are returned as zero. The assignments
+%% of internal color components to the components requested by `Format' are <table><tbody>
+%% <tr><td>` Internal Component '</td><td>` Resulting Component '</td></tr></tbody>
+%% <tbody><tr><td> Red </td><td> Red </td></tr><tr><td> Green </td><td> Green </td></tr><tr><td>
+%% Blue </td><td> Blue </td></tr><tr><td> Alpha </td><td> Alpha </td></tr><tr><td> Luminance
+%% </td><td> Red </td></tr><tr><td> Intensity </td><td> Red </td></tr></tbody></table>
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetColorTable.xml">external</a> documentation.
+-spec getColorTable(Target, Format, Type, Table) -> ok when Target :: enum(),Format :: enum(),Type :: enum(),Table :: mem().
getColorTable(Target,Format,Type,Table) ->
send_bin(Table),
call(5329, <<Target:?GLenum,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetColorTableParameter.xml">external</a> documentation.
--spec getColorTableParameterfv(enum(),enum()) -> {float(),float(),float(),float()}.
+%% @doc Get color lookup table parameters
+%%
+%% Returns parameters specific to color table `Target' .
+%%
+%% When `Pname' is set to `?GL_COLOR_TABLE_SCALE' or `?GL_COLOR_TABLE_BIAS',
+%% ``gl:getColorTableParameter'' returns the color table scale or bias parameters for the
+%% table specified by `Target' . For these queries, `Target' must be set to `?GL_COLOR_TABLE'
+%% , `?GL_POST_CONVOLUTION_COLOR_TABLE', or `?GL_POST_COLOR_MATRIX_COLOR_TABLE'
+%% and `Params' points to an array of four elements, which receive the scale or bias
+%% factors for red, green, blue, and alpha, in that order.
+%%
+%% ``gl:getColorTableParameter'' can also be used to retrieve the format and size parameters
+%% for a color table. For these queries, set `Target' to either the color table target
+%% or the proxy color table target. The format and size parameters are set by {@link gl:colorTable/6}
+%% .
+%%
+%% The following table lists the format and size parameters that may be queried. For each
+%% symbolic constant listed below for `Pname' , `Params' must point to an array
+%% of the given length and receive the values indicated.
+%%
+%% <table><tbody><tr><td>` Parameter '</td><td>` N '</td><td>` Meaning '</td></tr>
+%% </tbody><tbody><tr><td>`?GL_COLOR_TABLE_FORMAT'</td><td> 1 </td><td> Internal format
+%% (e.g., `?GL_RGBA') </td></tr><tr><td>`?GL_COLOR_TABLE_WIDTH'</td><td> 1 </td><td>
+%% Number of elements in table </td></tr><tr><td>`?GL_COLOR_TABLE_RED_SIZE'</td><td>
+%% 1 </td><td> Size of red component, in bits </td></tr><tr><td>`?GL_COLOR_TABLE_GREEN_SIZE'
+%% </td><td> 1 </td><td> Size of green component </td></tr><tr><td>`?GL_COLOR_TABLE_BLUE_SIZE'
+%% </td><td> 1 </td><td> Size of blue component </td></tr><tr><td>`?GL_COLOR_TABLE_ALPHA_SIZE'
+%% </td><td> 1 </td><td> Size of alpha component </td></tr><tr><td>`?GL_COLOR_TABLE_LUMINANCE_SIZE'
+%% </td><td> 1 </td><td> Size of luminance component </td></tr><tr><td>`?GL_COLOR_TABLE_INTENSITY_SIZE'
+%% </td><td> 1 </td><td> Size of intensity component </td></tr></tbody></table>
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetColorTableParameter.xml">external</a> documentation.
+-spec getColorTableParameterfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum().
getColorTableParameterfv(Target,Pname) ->
call(5330, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetColorTableParameter.xml">external</a> documentation.
--spec getColorTableParameteriv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
+%% @doc
+%% See {@link getColorTableParameterfv/2}
+-spec getColorTableParameteriv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum().
getColorTableParameteriv(Target,Pname) ->
call(5331, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Start::integer(),Count::integer(),Format::enum(),Type::enum(),Data::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorSubTable.xml">external</a> documentation.
--spec colorSubTable(enum(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
+%% @doc Respecify a portion of a color table
+%%
+%% ``gl:colorSubTable'' is used to respecify a contiguous portion of a color table previously
+%% defined using {@link gl:colorTable/6} . The pixels referenced by `Data' replace the
+%% portion of the existing table from indices `Start' to start+count-1, inclusive.
+%% This region may not include any entries outside the range of the color table as it was
+%% originally specified. It is not an error to specify a subtexture with width of 0, but
+%% such a specification has no effect.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a portion of a color table is respecified, `Data'
+%% is treated as a byte offset into the buffer object's data store.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorSubTable.xml">external</a> documentation.
+-spec colorSubTable(Target, Start, Count, Format, Type, Data) -> ok when Target :: enum(),Start :: integer(),Count :: integer(),Format :: enum(),Type :: enum(),Data :: offset()|mem().
colorSubTable(Target,Start,Count,Format,Type,Data) when is_integer(Data) ->
cast(5332, <<Target:?GLenum,Start:?GLsizei,Count:?GLsizei,Format:?GLenum,Type:?GLenum,Data:?GLuint>>);
colorSubTable(Target,Start,Count,Format,Type,Data) ->
send_bin(Data),
cast(5333, <<Target:?GLenum,Start:?GLsizei,Count:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Start::integer(),X::integer(),Y::integer(),Width::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyColorSubTable.xml">external</a> documentation.
--spec copyColorSubTable(enum(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc Respecify a portion of a color table
+%%
+%% ``gl:copyColorSubTable'' is used to respecify a contiguous portion of a color table
+%% previously defined using {@link gl:colorTable/6} . The pixels copied from the framebuffer
+%% replace the portion of the existing table from indices `Start' to start+x-1, inclusive.
+%% This region may not include any entries outside the range of the color table, as was originally
+%% specified. It is not an error to specify a subtexture with width of 0, but such a specification
+%% has no effect.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyColorSubTable.xml">external</a> documentation.
+-spec copyColorSubTable(Target, Start, X, Y, Width) -> ok when Target :: enum(),Start :: integer(),X :: integer(),Y :: integer(),Width :: integer().
copyColorSubTable(Target,Start,X,Y,Width) ->
cast(5334, <<Target:?GLenum,Start:?GLsizei,X:?GLint,Y:?GLint,Width:?GLsizei>>).
-%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Format::enum(),Type::enum(),Image::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionFilter1D.xml">external</a> documentation.
--spec convolutionFilter1D(enum(),enum(),integer(),enum(),enum(),offset()|mem()) -> ok.
+%% @doc Define a one-dimensional convolution filter
+%%
+%% ``gl:convolutionFilter1D'' builds a one-dimensional convolution filter kernel from an
+%% array of pixels.
+%%
+%% The pixel array specified by `Width' , `Format' , `Type' , and `Data'
+%% is extracted from memory and processed just as if {@link gl:drawPixels/5} were called,
+%% but processing stops after the final expansion to RGBA is completed.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a convolution filter is specified, `Data' is
+%% treated as a byte offset into the buffer object's data store.
+%%
+%% The R, G, B, and A components of each pixel are next scaled by the four 1D `?GL_CONVOLUTION_FILTER_SCALE'
+%% parameters and biased by the four 1D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The
+%% scale and bias parameters are set by {@link gl:convolutionParameterf/3} using the `?GL_CONVOLUTION_1D'
+%% target and the names `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS'
+%% . The parameters themselves are vectors of four values that are applied to red, green,
+%% blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at
+%% any time during this process.
+%%
+%% Each pixel is then converted to the internal format specified by `Internalformat' .
+%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the
+%% values included in the internal format (red, green, blue, alpha, luminance, and intensity).
+%% The mapping is as follows:
+%%
+%% <table><tbody><tr><td>` Internal Format '</td><td>` Red '</td><td>` Green '</td>
+%% <td>` Blue '</td><td>` Alpha '</td><td>` Luminance '</td><td>` Intensity '
+%% </td></tr></tbody><tbody><tr><td>`?GL_ALPHA'</td><td></td><td></td><td></td><td> A </td>
+%% <td></td><td></td></tr><tr><td>`?GL_LUMINANCE'</td><td></td><td></td><td></td><td></td>
+%% <td> R </td><td></td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td><td></td><td></td><td></td>
+%% <td> A </td><td> R </td><td></td></tr><tr><td>`?GL_INTENSITY'</td><td></td><td></td><td>
+%% </td><td></td><td></td><td> R </td></tr><tr><td>`?GL_RGB'</td><td> R </td><td> G </td>
+%% <td> B </td><td></td><td></td><td></td></tr><tr><td>`?GL_RGBA'</td><td> R </td><td>
+%% G </td><td> B </td><td> A </td><td></td><td></td></tr></tbody></table>
+%%
+%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting
+%% pixels are stored in floating-point rather than integer format. They form a one-dimensional
+%% filter kernel image indexed with coordinate `i' such that `i' starts at 0 and
+%% increases from left to right. Kernel location `i' is derived from the `i'th
+%% pixel, counting from 0.
+%%
+%% Note that after a convolution is performed, the resulting color components are also scaled
+%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
+%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the
+%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are
+%% set by {@link gl:pixelTransferf/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionFilter1D.xml">external</a> documentation.
+-spec convolutionFilter1D(Target, Internalformat, Width, Format, Type, Image) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Format :: enum(),Type :: enum(),Image :: offset()|mem().
convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) when is_integer(Image) ->
cast(5335, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Format:?GLenum,Type:?GLenum,Image:?GLuint>>);
convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) ->
send_bin(Image),
cast(5336, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Image::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionFilter2D.xml">external</a> documentation.
--spec convolutionFilter2D(enum(),enum(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok.
+%% @doc Define a two-dimensional convolution filter
+%%
+%% ``gl:convolutionFilter2D'' builds a two-dimensional convolution filter kernel from an
+%% array of pixels.
+%%
+%% The pixel array specified by `Width' , `Height' , `Format' , `Type' ,
+%% and `Data' is extracted from memory and processed just as if {@link gl:drawPixels/5}
+%% were called, but processing stops after the final expansion to RGBA is completed.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a convolution filter is specified, `Data' is
+%% treated as a byte offset into the buffer object's data store.
+%%
+%% The R, G, B, and A components of each pixel are next scaled by the four 2D `?GL_CONVOLUTION_FILTER_SCALE'
+%% parameters and biased by the four 2D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The
+%% scale and bias parameters are set by {@link gl:convolutionParameterf/3} using the `?GL_CONVOLUTION_2D'
+%% target and the names `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS'
+%% . The parameters themselves are vectors of four values that are applied to red, green,
+%% blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at
+%% any time during this process.
+%%
+%% Each pixel is then converted to the internal format specified by `Internalformat' .
+%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the
+%% values included in the internal format (red, green, blue, alpha, luminance, and intensity).
+%% The mapping is as follows:
+%%
+%% <table><tbody><tr><td>` Internal Format '</td><td>` Red '</td><td>` Green '</td>
+%% <td>` Blue '</td><td>` Alpha '</td><td>` Luminance '</td><td>` Intensity '
+%% </td></tr></tbody><tbody><tr><td>`?GL_ALPHA'</td><td></td><td></td><td></td><td> A </td>
+%% <td></td><td></td></tr><tr><td>`?GL_LUMINANCE'</td><td></td><td></td><td></td><td></td>
+%% <td> R </td><td></td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td><td></td><td></td><td></td>
+%% <td> A </td><td> R </td><td></td></tr><tr><td>`?GL_INTENSITY'</td><td></td><td></td><td>
+%% </td><td></td><td></td><td> R </td></tr><tr><td>`?GL_RGB'</td><td> R </td><td> G </td>
+%% <td> B </td><td></td><td></td><td></td></tr><tr><td>`?GL_RGBA'</td><td> R </td><td>
+%% G </td><td> B </td><td> A </td><td></td><td></td></tr></tbody></table>
+%%
+%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting
+%% pixels are stored in floating-point rather than integer format. They form a two-dimensional
+%% filter kernel image indexed with coordinates `i' and `j' such that `i'
+%% starts at zero and increases from left to right, and `j' starts at zero and increases
+%% from bottom to top. Kernel location `i,j' is derived from the `N'th pixel, where
+%% `N' is `i'+`j'* `Width' .
+%%
+%% Note that after a convolution is performed, the resulting color components are also scaled
+%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
+%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the
+%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are
+%% set by {@link gl:pixelTransferf/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionFilter2D.xml">external</a> documentation.
+-spec convolutionFilter2D(Target, Internalformat, Width, Height, Format, Type, Image) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Image :: offset()|mem().
convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) when is_integer(Image) ->
cast(5337, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Image:?GLuint>>);
convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) ->
send_bin(Image),
cast(5338, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionParameter.xml">external</a> documentation.
--spec convolutionParameterf(enum(),enum(),{float()}) -> ok.
+%% @doc Set convolution parameters
+%%
+%% ``gl:convolutionParameter'' sets the value of a convolution parameter.
+%%
+%% `Target' selects the convolution filter to be affected: `?GL_CONVOLUTION_1D', `?GL_CONVOLUTION_2D'
+%% , or `?GL_SEPARABLE_2D' for the 1D, 2D, or separable 2D filter, respectively.
+%%
+%% `Pname' selects the parameter to be changed. `?GL_CONVOLUTION_FILTER_SCALE'
+%% and `?GL_CONVOLUTION_FILTER_BIAS' affect the definition of the convolution filter
+%% kernel; see {@link gl:convolutionFilter1D/6} , {@link gl:convolutionFilter2D/7} , and {@link gl:separableFilter2D/8}
+%% for details. In these cases, `Params' v is an array of four values to be applied
+%% to red, green, blue, and alpha values, respectively. The initial value for `?GL_CONVOLUTION_FILTER_SCALE'
+%% is (1, 1, 1, 1), and the initial value for `?GL_CONVOLUTION_FILTER_BIAS' is (0,
+%% 0, 0, 0).
+%%
+%% A `Pname' value of `?GL_CONVOLUTION_BORDER_MODE' controls the convolution border
+%% mode. The accepted modes are:
+%%
+%% `?GL_REDUCE': The image resulting from convolution is smaller than the source image.
+%% If the filter width is Wf and height is Hf, and the source image width is Ws and
+%% height is Hs, then the convolved image width will be Ws-Wf+1 and height will be Hs-Hf
+%% +1. (If this reduction would generate an image with zero or negative width and/or height,
+%% the output is simply null, with no error generated.) The coordinates of the image resulting
+%% from convolution are zero through Ws-Wf in width and zero through Hs-Hf in height.
+%%
+%% `?GL_CONSTANT_BORDER': The image resulting from convolution is the same size as
+%% the source image, and processed as if the source image were surrounded by pixels with
+%% their color specified by the `?GL_CONVOLUTION_BORDER_COLOR'.
+%%
+%% `?GL_REPLICATE_BORDER': The image resulting from convolution is the same size as
+%% the source image, and processed as if the outermost pixel on the border of the source
+%% image were replicated.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionParameter.xml">external</a> documentation.
+-spec convolutionParameterf(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float()}.
convolutionParameterf(Target,Pname,Params) ->
cast(5339, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Target,Pname,{Params}) -> ok
%% @equiv convolutionParameterf(Target,Pname,Params)
--spec convolutionParameterfv(enum(),enum(),{{float()}}) -> ok.
+-spec convolutionParameterfv(Target :: enum(),Pname :: enum(),Params) -> ok when Params :: {Params :: {float()}}.
convolutionParameterfv(Target,Pname,{Params}) -> convolutionParameterf(Target,Pname,Params).
-%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionParameter.xml">external</a> documentation.
--spec convolutionParameteri(enum(),enum(),{integer()}) -> ok.
+%% @doc
+%% See {@link convolutionParameterf/3}
+-spec convolutionParameteri(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}.
convolutionParameteri(Target,Pname,Params) ->
cast(5340, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Target,Pname,{Params}) -> ok
%% @equiv convolutionParameteri(Target,Pname,Params)
--spec convolutionParameteriv(enum(),enum(),{{integer()}}) -> ok.
+-spec convolutionParameteriv(Target :: enum(),Pname :: enum(),Params) -> ok when Params :: {Params :: {integer()}}.
convolutionParameteriv(Target,Pname,{Params}) -> convolutionParameteri(Target,Pname,Params).
-%% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyConvolutionFilter1D.xml">external</a> documentation.
--spec copyConvolutionFilter1D(enum(),enum(),integer(),integer(),integer()) -> ok.
+%% @doc Copy pixels into a one-dimensional convolution filter
+%%
+%% ``gl:copyConvolutionFilter1D'' defines a one-dimensional convolution filter kernel with
+%% pixels from the current `?GL_READ_BUFFER' (rather than from main memory, as is the
+%% case for {@link gl:convolutionFilter1D/6} ).
+%%
+%% The screen-aligned pixel rectangle with lower-left corner at ( `X' , `Y' ), width
+%% `Width' and height 1 is used to define the convolution filter. If any pixels within
+%% this region are outside the window that is associated with the GL context, the values
+%% obtained for those pixels are undefined.
+%%
+%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been
+%% called with `format' set to RGBA, but the process stops just before final conversion.
+%% The R, G, B, and A components of each pixel are next scaled by the four 1D `?GL_CONVOLUTION_FILTER_SCALE'
+%% parameters and biased by the four 1D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The
+%% scale and bias parameters are set by {@link gl:convolutionParameterf/3} using the `?GL_CONVOLUTION_1D'
+%% target and the names `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS'
+%% . The parameters themselves are vectors of four values that are applied to red, green,
+%% blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at
+%% any time during this process.
+%%
+%% Each pixel is then converted to the internal format specified by `Internalformat' .
+%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the
+%% values included in the internal format (red, green, blue, alpha, luminance, and intensity).
+%% The mapping is as follows:
+%%
+%% <table><tbody><tr><td>` Internal Format '</td><td>` Red '</td><td>` Green '</td>
+%% <td>` Blue '</td><td>` Alpha '</td><td>` Luminance '</td><td>` Intensity '
+%% </td></tr></tbody><tbody><tr><td>`?GL_ALPHA'</td><td></td><td></td><td></td><td> A </td>
+%% <td></td><td></td></tr><tr><td>`?GL_LUMINANCE'</td><td></td><td></td><td></td><td></td>
+%% <td> R </td><td></td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td><td></td><td></td><td></td>
+%% <td> A </td><td> R </td><td></td></tr><tr><td>`?GL_INTENSITY'</td><td></td><td></td><td>
+%% </td><td></td><td></td><td> R </td></tr><tr><td>`?GL_RGB'</td><td> R </td><td> G </td>
+%% <td> B </td><td></td><td></td><td></td></tr><tr><td>`?GL_RGBA'</td><td> R </td><td>
+%% G </td><td> B </td><td> A </td><td></td><td></td></tr></tbody></table>
+%%
+%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting
+%% pixels are stored in floating-point rather than integer format.
+%%
+%% Pixel ordering is such that lower x screen coordinates correspond to lower `i' filter
+%% image coordinates.
+%%
+%% Note that after a convolution is performed, the resulting color components are also scaled
+%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
+%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the
+%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are
+%% set by {@link gl:pixelTransferf/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyConvolutionFilter1D.xml">external</a> documentation.
+-spec copyConvolutionFilter1D(Target, Internalformat, X, Y, Width) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer().
copyConvolutionFilter1D(Target,Internalformat,X,Y,Width) ->
cast(5341, <<Target:?GLenum,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei>>).
-%% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyConvolutionFilter2D.xml">external</a> documentation.
--spec copyConvolutionFilter2D(enum(),enum(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc Copy pixels into a two-dimensional convolution filter
+%%
+%% ``gl:copyConvolutionFilter2D'' defines a two-dimensional convolution filter kernel with
+%% pixels from the current `?GL_READ_BUFFER' (rather than from main memory, as is the
+%% case for {@link gl:convolutionFilter2D/7} ).
+%%
+%% The screen-aligned pixel rectangle with lower-left corner at ( `X' , `Y' ), width
+%% `Width' and height `Height' is used to define the convolution filter. If any
+%% pixels within this region are outside the window that is associated with the GL context,
+%% the values obtained for those pixels are undefined.
+%%
+%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been
+%% called with `format' set to RGBA, but the process stops just before final conversion.
+%% The R, G, B, and A components of each pixel are next scaled by the four 2D `?GL_CONVOLUTION_FILTER_SCALE'
+%% parameters and biased by the four 2D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The
+%% scale and bias parameters are set by {@link gl:convolutionParameterf/3} using the `?GL_CONVOLUTION_2D'
+%% target and the names `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS'
+%% . The parameters themselves are vectors of four values that are applied to red, green,
+%% blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at
+%% any time during this process.
+%%
+%% Each pixel is then converted to the internal format specified by `Internalformat' .
+%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the
+%% values included in the internal format (red, green, blue, alpha, luminance, and intensity).
+%% The mapping is as follows:
+%%
+%% <table><tbody><tr><td>` Internal Format '</td><td>` Red '</td><td>` Green '</td>
+%% <td>` Blue '</td><td>` Alpha '</td><td>` Luminance '</td><td>` Intensity '
+%% </td></tr></tbody><tbody><tr><td>`?GL_ALPHA'</td><td></td><td></td><td></td><td> A </td>
+%% <td></td><td></td></tr><tr><td>`?GL_LUMINANCE'</td><td></td><td></td><td></td><td></td>
+%% <td> R </td><td></td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td><td></td><td></td><td></td>
+%% <td> A </td><td> R </td><td></td></tr><tr><td>`?GL_INTENSITY'</td><td></td><td></td><td>
+%% </td><td></td><td></td><td> R </td></tr><tr><td>`?GL_RGB'</td><td> R </td><td> G </td>
+%% <td> B </td><td></td><td></td><td></td></tr><tr><td>`?GL_RGBA'</td><td> R </td><td>
+%% G </td><td> B </td><td> A </td><td></td><td></td></tr></tbody></table>
+%%
+%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting
+%% pixels are stored in floating-point rather than integer format.
+%%
+%% Pixel ordering is such that lower x screen coordinates correspond to lower `i' filter
+%% image coordinates, and lower y screen coordinates correspond to lower `j' filter
+%% image coordinates.
+%%
+%% Note that after a convolution is performed, the resulting color components are also scaled
+%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
+%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the
+%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are
+%% set by {@link gl:pixelTransferf/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyConvolutionFilter2D.xml">external</a> documentation.
+-spec copyConvolutionFilter2D(Target, Internalformat, X, Y, Width, Height) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
copyConvolutionFilter2D(Target,Internalformat,X,Y,Width,Height) ->
cast(5342, <<Target:?GLenum,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
-%% @spec (Target::enum(),Format::enum(),Type::enum(),Image::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetConvolutionFilter.xml">external</a> documentation.
--spec getConvolutionFilter(enum(),enum(),enum(),mem()) -> ok.
+%% @doc Get current 1D or 2D convolution filter kernel
+%%
+%% ``gl:getConvolutionFilter'' returns the current 1D or 2D convolution filter kernel as
+%% an image. The one- or two-dimensional image is placed in `Image' according to the
+%% specifications in `Format' and `Type' . No pixel transfer operations are performed
+%% on this image, but the relevant pixel storage modes are applied.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a convolution filter is requested, `Image' is
+%% treated as a byte offset into the buffer object's data store.
+%%
+%% Color components that are present in `Format' but not included in the internal format
+%% of the filter are returned as zero. The assignments of internal color components to the
+%% components of `Format' are as follows. <table><tbody><tr><td>` Internal Component '
+%% </td><td>` Resulting Component '</td></tr></tbody><tbody><tr><td> Red </td><td> Red </td>
+%% </tr><tr><td> Green </td><td> Green </td></tr><tr><td> Blue </td><td> Blue </td></tr><tr><td>
+%% Alpha </td><td> Alpha </td></tr><tr><td> Luminance </td><td> Red </td></tr><tr><td> Intensity
+%% </td><td> Red </td></tr></tbody></table>
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetConvolutionFilter.xml">external</a> documentation.
+-spec getConvolutionFilter(Target, Format, Type, Image) -> ok when Target :: enum(),Format :: enum(),Type :: enum(),Image :: mem().
getConvolutionFilter(Target,Format,Type,Image) ->
send_bin(Image),
call(5343, <<Target:?GLenum,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetConvolutionParameter.xml">external</a> documentation.
--spec getConvolutionParameterfv(enum(),enum()) -> {float(),float(),float(),float()}.
+%% @doc Get convolution parameters
+%%
+%% ``gl:getConvolutionParameter'' retrieves convolution parameters. `Target' determines
+%% which convolution filter is queried. `Pname' determines which parameter is returned:
+%%
+%%
+%% `?GL_CONVOLUTION_BORDER_MODE': The convolution border mode. See {@link gl:convolutionParameterf/3}
+%% for a list of border modes.
+%%
+%% `?GL_CONVOLUTION_BORDER_COLOR': The current convolution border color. `Params'
+%% must be a pointer to an array of four elements, which will receive the red, green, blue,
+%% and alpha border colors.
+%%
+%% `?GL_CONVOLUTION_FILTER_SCALE': The current filter scale factors. `Params'
+%% must be a pointer to an array of four elements, which will receive the red, green, blue,
+%% and alpha filter scale factors in that order.
+%%
+%% `?GL_CONVOLUTION_FILTER_BIAS': The current filter bias factors. `Params' must
+%% be a pointer to an array of four elements, which will receive the red, green, blue, and
+%% alpha filter bias terms in that order.
+%%
+%% `?GL_CONVOLUTION_FORMAT': The current internal format. See {@link gl:convolutionFilter1D/6}
+%% , {@link gl:convolutionFilter2D/7} , and {@link gl:separableFilter2D/8} for lists of allowable
+%% formats.
+%%
+%% `?GL_CONVOLUTION_WIDTH': The current filter image width.
+%%
+%% `?GL_CONVOLUTION_HEIGHT': The current filter image height.
+%%
+%% `?GL_MAX_CONVOLUTION_WIDTH': The maximum acceptable filter image width.
+%%
+%% `?GL_MAX_CONVOLUTION_HEIGHT': The maximum acceptable filter image height.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetConvolutionParameter.xml">external</a> documentation.
+-spec getConvolutionParameterfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum().
getConvolutionParameterfv(Target,Pname) ->
call(5344, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetConvolutionParameter.xml">external</a> documentation.
--spec getConvolutionParameteriv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
+%% @doc
+%% See {@link getConvolutionParameterfv/2}
+-spec getConvolutionParameteriv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum().
getConvolutionParameteriv(Target,Pname) ->
call(5345, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Row::offset()|mem(),Column::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSeparableFilter2D.xml">external</a> documentation.
--spec separableFilter2D(enum(),enum(),integer(),integer(),enum(),enum(),offset()|mem(),offset()|mem()) -> ok.
+%% @doc Define a separable two-dimensional convolution filter
+%%
+%% ``gl:separableFilter2D'' builds a two-dimensional separable convolution filter kernel
+%% from two arrays of pixels.
+%%
+%% The pixel arrays specified by ( `Width' , `Format' , `Type' , `Row' )
+%% and ( `Height' , `Format' , `Type' , `Column' ) are processed just as if
+%% they had been passed to {@link gl:drawPixels/5} , but processing stops after the final expansion
+%% to RGBA is completed.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a convolution filter is specified, `Row' and `Column'
+%% are treated as byte offsets into the buffer object's data store.
+%%
+%% Next, the R, G, B, and A components of all pixels in both arrays are scaled by the four
+%% separable 2D `?GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four separable
+%% 2D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters are set
+%% by {@link gl:convolutionParameterf/3} using the `?GL_SEPARABLE_2D' target and the names
+%% `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS'. The parameters
+%% themselves are vectors of four values that are applied to red, green, blue, and alpha,
+%% in that order.) The R, G, B, and A values are not clamped to [0,1] at any time during
+%% this process.
+%%
+%% Each pixel is then converted to the internal format specified by `Internalformat' .
+%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the
+%% values included in the internal format (red, green, blue, alpha, luminance, and intensity).
+%% The mapping is as follows: <table><tbody><tr><td>` Internal Format '</td><td>` Red '
+%% </td><td>` Green '</td><td>` Blue '</td><td>` Alpha '</td><td>` Luminance '
+%% </td><td>` Intensity '</td></tr></tbody><tbody><tr><td>`?GL_LUMINANCE'</td><td></td>
+%% <td></td><td></td><td></td><td> R </td><td></td></tr><tr><td>`?GL_LUMINANCE_ALPHA'</td>
+%% <td></td><td></td><td></td><td> A </td><td> R </td><td></td></tr><tr><td>`?GL_INTENSITY'
+%% </td><td></td><td></td><td></td><td></td><td></td><td> R </td></tr><tr><td>`?GL_RGB'</td>
+%% <td> R </td><td> G </td><td> B </td><td></td><td></td><td></td></tr><tr><td>`?GL_RGBA'
+%% </td><td> R </td><td> G </td><td> B </td><td> A </td><td></td><td></td></tr></tbody></table>
+%%
+%%
+%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting
+%% pixels are stored in floating-point rather than integer format. They form two one-dimensional
+%% filter kernel images. The row image is indexed by coordinate `i' starting at zero
+%% and increasing from left to right. Each location in the row image is derived from element
+%% `i' of `Row' . The column image is indexed by coordinate `j' starting at
+%% zero and increasing from bottom to top. Each location in the column image is derived from
+%% element `j' of `Column' .
+%%
+%% Note that after a convolution is performed, the resulting color components are also scaled
+%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
+%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the
+%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are
+%% set by {@link gl:pixelTransferf/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSeparableFilter2D.xml">external</a> documentation.
+-spec separableFilter2D(Target, Internalformat, Width, Height, Format, Type, Row, Column) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Row :: offset()|mem(),Column :: offset()|mem().
separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) when is_integer(Row), is_integer(Column) ->
cast(5346, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Row:?GLuint,Column:?GLuint>>);
separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) ->
@@ -2522,3497 +8778,7990 @@ separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) ->
send_bin(Column),
cast(5347, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Reset::0|1,Format::enum(),Type::enum(),Values::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetHistogram.xml">external</a> documentation.
--spec getHistogram(enum(),0|1,enum(),enum(),mem()) -> ok.
+%% @doc Get histogram table
+%%
+%% ``gl:getHistogram'' returns the current histogram table as a one-dimensional image with
+%% the same width as the histogram. No pixel transfer operations are performed on this image,
+%% but pixel storage modes that are applicable to 1D images are honored.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a histogram table is requested, `Values' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% Color components that are requested in the specified `Format' , but which are not
+%% included in the internal format of the histogram, are returned as zero. The assignments
+%% of internal color components to the components requested by `Format' are: <table><tbody>
+%% <tr><td>` Internal Component '</td><td>` Resulting Component '</td></tr></tbody>
+%% <tbody><tr><td> Red </td><td> Red </td></tr><tr><td> Green </td><td> Green </td></tr><tr><td>
+%% Blue </td><td> Blue </td></tr><tr><td> Alpha </td><td> Alpha </td></tr><tr><td> Luminance
+%% </td><td> Red </td></tr></tbody></table>
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetHistogram.xml">external</a> documentation.
+-spec getHistogram(Target, Reset, Format, Type, Values) -> ok when Target :: enum(),Reset :: 0|1,Format :: enum(),Type :: enum(),Values :: mem().
getHistogram(Target,Reset,Format,Type,Values) ->
send_bin(Values),
call(5348, <<Target:?GLenum,Reset:?GLboolean,0:24,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetHistogramParameter.xml">external</a> documentation.
--spec getHistogramParameterfv(enum(),enum()) -> {float()}.
+%% @doc Get histogram parameters
+%%
+%% ``gl:getHistogramParameter'' is used to query parameter values for the current histogram
+%% or for a proxy. The histogram state information may be queried by calling ``gl:getHistogramParameter''
+%% with a `Target' of `?GL_HISTOGRAM' (to obtain information for the current histogram
+%% table) or `?GL_PROXY_HISTOGRAM' (to obtain information from the most recent proxy
+%% request) and one of the following values for the `Pname' argument:
+%%
+%% <table><tbody><tr><td>` Parameter '</td><td>` Description '</td></tr></tbody><tbody>
+%% <tr><td>`?GL_HISTOGRAM_WIDTH'</td><td> Histogram table width </td></tr><tr><td>`?GL_HISTOGRAM_FORMAT'
+%% </td><td> Internal format </td></tr><tr><td>`?GL_HISTOGRAM_RED_SIZE'</td><td> Red
+%% component counter size, in bits </td></tr><tr><td>`?GL_HISTOGRAM_GREEN_SIZE'</td><td>
+%% Green component counter size, in bits </td></tr><tr><td>`?GL_HISTOGRAM_BLUE_SIZE'</td>
+%% <td> Blue component counter size, in bits </td></tr><tr><td>`?GL_HISTOGRAM_ALPHA_SIZE'
+%% </td><td> Alpha component counter size, in bits </td></tr><tr><td>`?GL_HISTOGRAM_LUMINANCE_SIZE'
+%% </td><td> Luminance component counter size, in bits </td></tr><tr><td>`?GL_HISTOGRAM_SINK'
+%% </td><td> Value of the `sink' parameter </td></tr></tbody></table>
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetHistogramParameter.xml">external</a> documentation.
+-spec getHistogramParameterfv(Target, Pname) -> {float()} when Target :: enum(),Pname :: enum().
getHistogramParameterfv(Target,Pname) ->
call(5349, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetHistogramParameter.xml">external</a> documentation.
--spec getHistogramParameteriv(enum(),enum()) -> {integer()}.
+%% @doc
+%% See {@link getHistogramParameterfv/2}
+-spec getHistogramParameteriv(Target, Pname) -> {integer()} when Target :: enum(),Pname :: enum().
getHistogramParameteriv(Target,Pname) ->
call(5350, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Reset::0|1,Format::enum(),Type::enum(),Values::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMinmax.xml">external</a> documentation.
--spec getMinmax(enum(),0|1,enum(),enum(),mem()) -> ok.
-getMinmax(Target,Reset,Format,Type,Values) ->
+%% @doc Get minimum and maximum pixel values
+%%
+%% ``gl:getMinmax'' returns the accumulated minimum and maximum pixel values (computed
+%% on a per-component basis) in a one-dimensional image of width 2. The first set of return
+%% values are the minima, and the second set of return values are the maxima. The format
+%% of the return values is determined by `Format' , and their type is determined by `Types'
+%% .
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while minimum and maximum pixel values are requested, `Values'
+%% is treated as a byte offset into the buffer object's data store.
+%%
+%% No pixel transfer operations are performed on the return values, but pixel storage modes
+%% that are applicable to one-dimensional images are performed. Color components that are
+%% requested in the specified `Format' , but that are not included in the internal format
+%% of the minmax table, are returned as zero. The assignment of internal color components
+%% to the components requested by `Format' are as follows:
+%%
+%% <table><tbody><tr><td>` Internal Component '</td><td>` Resulting Component '</td>
+%% </tr></tbody><tbody><tr><td> Red </td><td> Red </td></tr><tr><td> Green </td><td> Green </td>
+%% </tr><tr><td> Blue </td><td> Blue </td></tr><tr><td> Alpha </td><td> Alpha </td></tr><tr><td>
+%% Luminance </td><td> Red </td></tr></tbody></table>
+%%
+%% If `Reset' is `?GL_TRUE', the minmax table entries corresponding to the return
+%% values are reset to their initial values. Minimum and maximum values that are not returned
+%% are not modified, even if `Reset' is `?GL_TRUE'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMinmax.xml">external</a> documentation.
+-spec getMinmax(Target, Reset, Format, Types, Values) -> ok when Target :: enum(),Reset :: 0|1,Format :: enum(),Types :: enum(),Values :: mem().
+getMinmax(Target,Reset,Format,Types,Values) ->
send_bin(Values),
- call(5351, <<Target:?GLenum,Reset:?GLboolean,0:24,Format:?GLenum,Type:?GLenum>>).
+ call(5351, <<Target:?GLenum,Reset:?GLboolean,0:24,Format:?GLenum,Types:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMinmaxParameter.xml">external</a> documentation.
--spec getMinmaxParameterfv(enum(),enum()) -> {float()}.
+%% @doc Get minmax parameters
+%%
+%% ``gl:getMinmaxParameter'' retrieves parameters for the current minmax table by setting `Pname'
+%% to one of the following values:
+%%
+%% <table><tbody><tr><td>` Parameter '</td><td>` Description '</td></tr></tbody><tbody>
+%% <tr><td>`?GL_MINMAX_FORMAT'</td><td> Internal format of minmax table </td></tr><tr><td>
+%% `?GL_MINMAX_SINK'</td><td> Value of the `sink' parameter </td></tr></tbody></table>
+%%
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMinmaxParameter.xml">external</a> documentation.
+-spec getMinmaxParameterfv(Target, Pname) -> {float()} when Target :: enum(),Pname :: enum().
getMinmaxParameterfv(Target,Pname) ->
call(5352, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMinmaxParameter.xml">external</a> documentation.
--spec getMinmaxParameteriv(enum(),enum()) -> {integer()}.
+%% @doc
+%% See {@link getMinmaxParameterfv/2}
+-spec getMinmaxParameteriv(Target, Pname) -> {integer()} when Target :: enum(),Pname :: enum().
getMinmaxParameteriv(Target,Pname) ->
call(5353, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Width::integer(),Internalformat::enum(),Sink::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glHistogram.xml">external</a> documentation.
--spec histogram(enum(),integer(),enum(),0|1) -> ok.
+%% @doc Define histogram table
+%%
+%% When `?GL_HISTOGRAM' is enabled, RGBA color components are converted to histogram
+%% table indices by clamping to the range [0,1], multiplying by the width of the histogram
+%% table, and rounding to the nearest integer. The table entries selected by the RGBA indices
+%% are then incremented. (If the internal format of the histogram table includes luminance,
+%% then the index derived from the R color component determines the luminance table entry
+%% to be incremented.) If a histogram table entry is incremented beyond its maximum value,
+%% then its value becomes undefined. (This is not an error.)
+%%
+%% Histogramming is performed only for RGBA pixels (though these may be specified originally
+%% as color indices and converted to RGBA by index table lookup). Histogramming is enabled
+%% with {@link gl:enable/1} and disabled with {@link gl:enable/1} .
+%%
+%% When `Target' is `?GL_HISTOGRAM', ``gl:histogram'' redefines the current
+%% histogram table to have `Width' entries of the format specified by `Internalformat'
+%% . The entries are indexed 0 through width-1, and all entries are initialized to zero.
+%% The values in the previous histogram table, if any, are lost. If `Sink' is `?GL_TRUE'
+%% , then pixels are discarded after histogramming; no further processing of the pixels takes
+%% place, and no drawing, texture loading, or pixel readback will result.
+%%
+%% When `Target' is `?GL_PROXY_HISTOGRAM', ``gl:histogram'' computes all state
+%% information as if the histogram table were to be redefined, but does not actually define
+%% the new table. If the requested histogram table is too large to be supported, then the
+%% state information will be set to zero. This provides a way to determine if a histogram
+%% table with the given parameters can be supported.
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glHistogram.xml">external</a> documentation.
+-spec histogram(Target, Width, Internalformat, Sink) -> ok when Target :: enum(),Width :: integer(),Internalformat :: enum(),Sink :: 0|1.
histogram(Target,Width,Internalformat,Sink) ->
cast(5354, <<Target:?GLenum,Width:?GLsizei,Internalformat:?GLenum,Sink:?GLboolean>>).
-%% @spec (Target::enum(),Internalformat::enum(),Sink::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMinmax.xml">external</a> documentation.
--spec minmax(enum(),enum(),0|1) -> ok.
+%% @doc Define minmax table
+%%
+%% When `?GL_MINMAX' is enabled, the RGBA components of incoming pixels are compared
+%% to the minimum and maximum values for each component, which are stored in the two-element
+%% minmax table. (The first element stores the minima, and the second element stores the
+%% maxima.) If a pixel component is greater than the corresponding component in the maximum
+%% element, then the maximum element is updated with the pixel component value. If a pixel
+%% component is less than the corresponding component in the minimum element, then the minimum
+%% element is updated with the pixel component value. (In both cases, if the internal format
+%% of the minmax table includes luminance, then the R color component of incoming pixels
+%% is used for comparison.) The contents of the minmax table may be retrieved at a later
+%% time by calling {@link gl:getMinmax/5} . The minmax operation is enabled or disabled by
+%% calling {@link gl:enable/1} or {@link gl:enable/1} , respectively, with an argument of `?GL_MINMAX'
+%% .
+%%
+%% ``gl:minmax'' redefines the current minmax table to have entries of the format specified
+%% by `Internalformat' . The maximum element is initialized with the smallest possible
+%% component values, and the minimum element is initialized with the largest possible component
+%% values. The values in the previous minmax table, if any, are lost. If `Sink' is `?GL_TRUE'
+%% , then pixels are discarded after minmax; no further processing of the pixels takes place,
+%% and no drawing, texture loading, or pixel readback will result.
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMinmax.xml">external</a> documentation.
+-spec minmax(Target, Internalformat, Sink) -> ok when Target :: enum(),Internalformat :: enum(),Sink :: 0|1.
minmax(Target,Internalformat,Sink) ->
cast(5355, <<Target:?GLenum,Internalformat:?GLenum,Sink:?GLboolean>>).
-%% @spec (Target::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResetHistogram.xml">external</a> documentation.
--spec resetHistogram(enum()) -> ok.
+%% @doc Reset histogram table entries to zero
+%%
+%% ``gl:resetHistogram'' resets all the elements of the current histogram table to zero.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResetHistogram.xml">external</a> documentation.
+-spec resetHistogram(Target) -> ok when Target :: enum().
resetHistogram(Target) ->
cast(5356, <<Target:?GLenum>>).
-%% @spec (Target::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResetMinmax.xml">external</a> documentation.
--spec resetMinmax(enum()) -> ok.
+%% @doc Reset minmax table entries to initial values
+%%
+%% ``gl:resetMinmax'' resets the elements of the current minmax table to their initial
+%% values: the ``maximum'' element receives the minimum possible component values, and the
+%% ``minimum'' element receives the maximum possible component values.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResetMinmax.xml">external</a> documentation.
+-spec resetMinmax(Target) -> ok when Target :: enum().
resetMinmax(Target) ->
cast(5357, <<Target:?GLenum>>).
-%% @spec (Texture::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glActiveTexture.xml">external</a> documentation.
--spec activeTexture(enum()) -> ok.
+%% @doc Select active texture unit
+%%
+%% ``gl:activeTexture'' selects which texture unit subsequent texture state calls will
+%% affect. The number of texture units an implementation supports is implementation dependent,
+%% but must be at least 80.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glActiveTexture.xml">external</a> documentation.
+-spec activeTexture(Texture) -> ok when Texture :: enum().
activeTexture(Texture) ->
cast(5358, <<Texture:?GLenum>>).
-%% @spec (Value::clamp(),Invert::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSampleCoverage.xml">external</a> documentation.
--spec sampleCoverage(clamp(),0|1) -> ok.
+%% @doc Specify multisample coverage parameters
+%%
+%% Multisampling samples a pixel multiple times at various implementation-dependent subpixel
+%% locations to generate antialiasing effects. Multisampling transparently antialiases points,
+%% lines, polygons, and images if it is enabled.
+%%
+%% `Value' is used in constructing a temporary mask used in determining which samples
+%% will be used in resolving the final fragment color. This mask is bitwise-anded with the
+%% coverage mask generated from the multisampling computation. If the `Invert' flag
+%% is set, the temporary mask is inverted (all bits flipped) and then the bitwise-and is
+%% computed.
+%%
+%% If an implementation does not have any multisample buffers available, or multisampling
+%% is disabled, rasterization occurs with only a single sample computing a pixel's final
+%% RGB color.
+%%
+%% Provided an implementation supports multisample buffers, and multisampling is enabled,
+%% then a pixel's final color is generated by combining several samples per pixel. Each sample
+%% contains color, depth, and stencil information, allowing those operations to be performed
+%% on each sample.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSampleCoverage.xml">external</a> documentation.
+-spec sampleCoverage(Value, Invert) -> ok when Value :: clamp(),Invert :: 0|1.
sampleCoverage(Value,Invert) ->
cast(5359, <<Value:?GLclampf,Invert:?GLboolean>>).
-%% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Height::integer(),Depth::integer(),Border::integer(),ImageSize::integer(),Data::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage3D.xml">external</a> documentation.
--spec compressedTexImage3D(enum(),integer(),enum(),integer(),integer(),integer(),integer(),integer(),offset()|mem()) -> ok.
+%% @doc Specify a three-dimensional texture image in a compressed format
+%%
+%% Texturing allows elements of an image array to be read by shaders.
+%%
+%% ``gl:compressedTexImage3D'' loads a previously defined, and retrieved, compressed three-dimensional
+%% texture image if `Target' is `?GL_TEXTURE_3D' (see {@link gl:texImage3D/10} ).
+%%
+%% If `Target' is `?GL_TEXTURE_2D_ARRAY', `Data' is treated as an array of
+%% compressed 2D textures.
+%%
+%% If `Target' is `?GL_PROXY_TEXTURE_3D' or `?GL_PROXY_TEXTURE_2D_ARRAY',
+%% no data is read from `Data' , but all of the texture image state is recalculated,
+%% checked for consistency, and checked against the implementation's capabilities. If the
+%% implementation cannot handle a texture of the requested texture size, it sets all of the
+%% image state to 0, but does not generate an error (see {@link gl:getError/0} ). To query
+%% for an entire mipmap array, use an image array level greater than or equal to 1.
+%%
+%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC')
+%% or an extension-specified compressed-texture format. When a texture is loaded with {@link gl:texImage2D/9}
+%% using a generic compressed texture format (e.g., `?GL_COMPRESSED_RGB'), the GL selects
+%% from one of its extensions supporting compressed textures. In order to load the compressed
+%% texture image using ``gl:compressedTexImage3D'', query the compressed texture image's
+%% size and format using {@link gl:getTexLevelParameterfv/3} .
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% If the compressed data are arranged into fixed-size blocks of texels, the pixel storage
+%% modes can be used to select a sub-rectangle from a larger containing rectangle. These
+%% pixel storage modes operate in the same way as they do for {@link gl:texImage1D/8} . In
+%% the following description, denote by b s, b w, b h, and b d, the values of pixel storage
+%% modes `?GL_UNPACK_COMPRESSED_BLOCK_SIZE', `?GL_UNPACK_COMPRESSED_BLOCK_WIDTH', `?GL_UNPACK_COMPRESSED_BLOCK_HEIGHT'
+%% , and `?GL_UNPACK_COMPRESSED_BLOCK_DEPTH', respectively. b s is the compressed block
+%% size in bytes; b w, b h, and b d are the compressed block width, height, and depth
+%% in pixels.
+%%
+%% By default the pixel storage modes `?GL_UNPACK_ROW_LENGTH', `?GL_UNPACK_SKIP_ROWS'
+%% , `?GL_UNPACK_SKIP_PIXELS', `?GL_UNPACK_IMAGE_HEIGHT' and `?GL_UNPACK_SKIP_IMAGES'
+%% are ignored for compressed images. To enable `?GL_UNPACK_SKIP_PIXELS' and `?GL_UNPACK_ROW_LENGTH'
+%% , b s and b w must both be non-zero. To also enable `?GL_UNPACK_SKIP_ROWS' and `?GL_UNPACK_IMAGE_HEIGHT'
+%% , b h must be non-zero. To also enable `?GL_UNPACK_SKIP_IMAGES', b d must be non-zero.
+%% All parameters must be consistent with the compressed format to produce the desired results.
+%%
+%%
+%% When selecting a sub-rectangle from a compressed image: the value of `?GL_UNPACK_SKIP_PIXELS'
+%% must be a multiple of b w;the value of `?GL_UNPACK_SKIP_ROWS' must be a multiple
+%% of b w;the value of `?GL_UNPACK_SKIP_IMAGES' must be a multiple of b w.
+%%
+%% `ImageSize' must be equal to:
+%%
+%% b s*|width b/w|*|height b/h|*|depth b/d|
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage3D.xml">external</a> documentation.
+-spec compressedTexImage3D(Target, Level, Internalformat, Width, Height, Depth, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Depth :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,ImageSize,Data) when is_integer(Data) ->
cast(5360, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Border:?GLint,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,ImageSize,Data) ->
send_bin(Data),
cast(5361, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Border:?GLint,ImageSize:?GLsizei>>).
-%% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Height::integer(),Border::integer(),ImageSize::integer(),Data::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage2D.xml">external</a> documentation.
--spec compressedTexImage2D(enum(),integer(),enum(),integer(),integer(),integer(),integer(),offset()|mem()) -> ok.
+%% @doc Specify a two-dimensional texture image in a compressed format
+%%
+%% Texturing allows elements of an image array to be read by shaders.
+%%
+%% ``gl:compressedTexImage2D'' loads a previously defined, and retrieved, compressed two-dimensional
+%% texture image if `Target' is `?GL_TEXTURE_2D', or one of the cube map faces
+%% such as `?GL_TEXTURE_CUBE_MAP_POSITIVE_X'. (see {@link gl:texImage2D/9} ).
+%%
+%% If `Target' is `?GL_TEXTURE_1D_ARRAY', `Data' is treated as an array of
+%% compressed 1D textures.
+%%
+%% If `Target' is `?GL_PROXY_TEXTURE_2D', `?GL_PROXY_TEXTURE_1D_ARRAY' or `?GL_PROXY_CUBE_MAP'
+%% , no data is read from `Data' , but all of the texture image state is recalculated,
+%% checked for consistency, and checked against the implementation's capabilities. If the
+%% implementation cannot handle a texture of the requested texture size, it sets all of the
+%% image state to 0, but does not generate an error (see {@link gl:getError/0} ). To query
+%% for an entire mipmap array, use an image array level greater than or equal to 1.
+%%
+%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC')
+%% or an extension-specified compressed-texture format. When a texture is loaded with {@link gl:texImage2D/9}
+%% using a generic compressed texture format (e.g., `?GL_COMPRESSED_RGB'), the GL selects
+%% from one of its extensions supporting compressed textures. In order to load the compressed
+%% texture image using ``gl:compressedTexImage2D'', query the compressed texture image's
+%% size and format using {@link gl:getTexLevelParameterfv/3} .
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% If the compressed data are arranged into fixed-size blocks of texels, the pixel storage
+%% modes can be used to select a sub-rectangle from a larger containing rectangle. These
+%% pixel storage modes operate in the same way as they do for {@link gl:texImage2D/9} . In
+%% the following description, denote by b s, b w, b h, and b d, the values of pixel storage
+%% modes `?GL_UNPACK_COMPRESSED_BLOCK_SIZE', `?GL_UNPACK_COMPRESSED_BLOCK_WIDTH', `?GL_UNPACK_COMPRESSED_BLOCK_HEIGHT'
+%% , and `?GL_UNPACK_COMPRESSED_BLOCK_DEPTH', respectively. b s is the compressed block
+%% size in bytes; b w, b h, and b d are the compressed block width, height, and depth
+%% in pixels.
+%%
+%% By default the pixel storage modes `?GL_UNPACK_ROW_LENGTH', `?GL_UNPACK_SKIP_ROWS'
+%% , `?GL_UNPACK_SKIP_PIXELS', `?GL_UNPACK_IMAGE_HEIGHT' and `?GL_UNPACK_SKIP_IMAGES'
+%% are ignored for compressed images. To enable `?GL_UNPACK_SKIP_PIXELS' and `?GL_UNPACK_ROW_LENGTH'
+%% , b s and b w must both be non-zero. To also enable `?GL_UNPACK_SKIP_ROWS' and `?GL_UNPACK_IMAGE_HEIGHT'
+%% , b h must be non-zero. To also enable `?GL_UNPACK_SKIP_IMAGES', b d must be non-zero.
+%% All parameters must be consistent with the compressed format to produce the desired results.
+%%
+%%
+%% When selecting a sub-rectangle from a compressed image: the value of `?GL_UNPACK_SKIP_PIXELS'
+%% must be a multiple of b w;the value of `?GL_UNPACK_SKIP_ROWS' must be a multiple
+%% of b w.
+%%
+%% `ImageSize' must be equal to:
+%%
+%% b s*|width b/w|*|height b/h|
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage2D.xml">external</a> documentation.
+-spec compressedTexImage2D(Target, Level, Internalformat, Width, Height, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,Data) when is_integer(Data) ->
cast(5362, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Border:?GLint,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,Data) ->
send_bin(Data),
cast(5363, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Border:?GLint,ImageSize:?GLsizei>>).
-%% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Border::integer(),ImageSize::integer(),Data::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage1D.xml">external</a> documentation.
--spec compressedTexImage1D(enum(),integer(),enum(),integer(),integer(),integer(),offset()|mem()) -> ok.
+%% @doc Specify a one-dimensional texture image in a compressed format
+%%
+%% Texturing allows elements of an image array to be read by shaders.
+%%
+%% ``gl:compressedTexImage1D'' loads a previously defined, and retrieved, compressed one-dimensional
+%% texture image if `Target' is `?GL_TEXTURE_1D' (see {@link gl:texImage1D/8} ).
+%%
+%% If `Target' is `?GL_PROXY_TEXTURE_1D', no data is read from `Data' , but
+%% all of the texture image state is recalculated, checked for consistency, and checked against
+%% the implementation's capabilities. If the implementation cannot handle a texture of the
+%% requested texture size, it sets all of the image state to 0, but does not generate an
+%% error (see {@link gl:getError/0} ). To query for an entire mipmap array, use an image array
+%% level greater than or equal to 1.
+%%
+%% `Internalformat' must be an extension-specified compressed-texture format. When a
+%% texture is loaded with {@link gl:texImage1D/8} using a generic compressed texture format
+%% (e.g., `?GL_COMPRESSED_RGB') the GL selects from one of its extensions supporting
+%% compressed textures. In order to load the compressed texture image using ``gl:compressedTexImage1D''
+%% , query the compressed texture image's size and format using {@link gl:getTexLevelParameterfv/3}
+%% .
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% If the compressed data are arranged into fixed-size blocks of texels, the pixel storage
+%% modes can be used to select a sub-rectangle from a larger containing rectangle. These
+%% pixel storage modes operate in the same way as they do for {@link gl:texImage1D/8} . In
+%% the following description, denote by b s, b w, b h, and b d, the values of pixel storage
+%% modes `?GL_UNPACK_COMPRESSED_BLOCK_SIZE', `?GL_UNPACK_COMPRESSED_BLOCK_WIDTH', `?GL_UNPACK_COMPRESSED_BLOCK_HEIGHT'
+%% , and `?GL_UNPACK_COMPRESSED_BLOCK_DEPTH', respectively. b s is the compressed block
+%% size in bytes; b w, b h, and b d are the compressed block width, height, and depth
+%% in pixels.
+%%
+%% By default the pixel storage modes `?GL_UNPACK_ROW_LENGTH', `?GL_UNPACK_SKIP_ROWS'
+%% , `?GL_UNPACK_SKIP_PIXELS', `?GL_UNPACK_IMAGE_HEIGHT' and `?GL_UNPACK_SKIP_IMAGES'
+%% are ignored for compressed images. To enable `?GL_UNPACK_SKIP_PIXELS' and `?GL_UNPACK_ROW_LENGTH'
+%% , b s and b w must both be non-zero. To also enable `?GL_UNPACK_SKIP_ROWS' and `?GL_UNPACK_IMAGE_HEIGHT'
+%% , b h must be non-zero. To also enable `?GL_UNPACK_SKIP_IMAGES', b d must be non-zero.
+%% All parameters must be consistent with the compressed format to produce the desired results.
+%%
+%%
+%% When selecting a sub-rectangle from a compressed image: the value of `?GL_UNPACK_SKIP_PIXELS'
+%% must be a multiple of b w;
+%%
+%% `ImageSize' must be equal to:
+%%
+%% b s*|width b/w|
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage1D.xml">external</a> documentation.
+-spec compressedTexImage1D(Target, Level, Internalformat, Width, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) when is_integer(Data) ->
cast(5364, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Border:?GLint,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) ->
send_bin(Data),
cast(5365, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Border:?GLint,ImageSize:?GLsizei>>).
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Zoffset::integer(),Width::integer(),Height::integer(),Depth::integer(),Format::enum(),ImageSize::integer(),Data::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage3D.xml">external</a> documentation.
--spec compressedTexSubImage3D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),enum(),integer(),offset()|mem()) -> ok.
+%% @doc Specify a three-dimensional texture subimage in a compressed format
+%%
+%% Texturing allows elements of an image array to be read by shaders.
+%%
+%% ``gl:compressedTexSubImage3D'' redefines a contiguous subregion of an existing three-dimensional
+%% texture image. The texels referenced by `Data' replace the portion of the existing
+%% texture array with x indices `Xoffset' and xoffset+width-1, and the y indices `Yoffset'
+%% and yoffset+height-1, and the z indices `Zoffset' and zoffset+depth-1, inclusive.
+%% This region may not include any texels outside the range of the texture array as it was
+%% originally specified. It is not an error to specify a subtexture with width of 0, but
+%% such a specification has no effect.
+%%
+%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC')
+%% or an extension-specified compressed-texture format. The `Format' of the compressed
+%% texture image is selected by the GL implementation that compressed it (see {@link gl:texImage3D/10}
+%% ) and should be queried at the time the texture was compressed with {@link gl:getTexLevelParameterfv/3}
+%% .
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage3D.xml">external</a> documentation.
+-spec compressedTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, Width, Height, Depth, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,ImageSize,Data) when is_integer(Data) ->
cast(5366, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Zoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Format:?GLenum,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,ImageSize,Data) ->
send_bin(Data),
cast(5367, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Zoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Format:?GLenum,ImageSize:?GLsizei>>).
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Width::integer(),Height::integer(),Format::enum(),ImageSize::integer(),Data::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage2D.xml">external</a> documentation.
--spec compressedTexSubImage2D(enum(),integer(),integer(),integer(),integer(),integer(),enum(),integer(),offset()|mem()) -> ok.
+%% @doc Specify a two-dimensional texture subimage in a compressed format
+%%
+%% Texturing allows elements of an image array to be read by shaders.
+%%
+%% ``gl:compressedTexSubImage2D'' redefines a contiguous subregion of an existing two-dimensional
+%% texture image. The texels referenced by `Data' replace the portion of the existing
+%% texture array with x indices `Xoffset' and xoffset+width-1, and the y indices `Yoffset'
+%% and yoffset+height-1, inclusive. This region may not include any texels outside the
+%% range of the texture array as it was originally specified. It is not an error to specify
+%% a subtexture with width of 0, but such a specification has no effect.
+%%
+%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC')
+%% or an extension-specified compressed-texture format. The `Format' of the compressed
+%% texture image is selected by the GL implementation that compressed it (see {@link gl:texImage2D/9}
+%% ) and should be queried at the time the texture was compressed with {@link gl:getTexLevelParameterfv/3}
+%% .
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage2D.xml">external</a> documentation.
+-spec compressedTexSubImage2D(Target, Level, Xoffset, Yoffset, Width, Height, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSize,Data) when is_integer(Data) ->
cast(5368, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSize,Data) ->
send_bin(Data),
cast(5369, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,ImageSize:?GLsizei>>).
-%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Width::integer(),Format::enum(),ImageSize::integer(),Data::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage1D.xml">external</a> documentation.
--spec compressedTexSubImage1D(enum(),integer(),integer(),integer(),enum(),integer(),offset()|mem()) -> ok.
+%% @doc Specify a one-dimensional texture subimage in a compressed format
+%%
+%% Texturing allows elements of an image array to be read by shaders.
+%%
+%% ``gl:compressedTexSubImage1D'' redefines a contiguous subregion of an existing one-dimensional
+%% texture image. The texels referenced by `Data' replace the portion of the existing
+%% texture array with x indices `Xoffset' and xoffset+width-1, inclusive. This region
+%% may not include any texels outside the range of the texture array as it was originally
+%% specified. It is not an error to specify a subtexture with width of 0, but such a specification
+%% has no effect.
+%%
+%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC')
+%% or an extension-specified compressed-texture format. The `Format' of the compressed
+%% texture image is selected by the GL implementation that compressed it (see {@link gl:texImage1D/8}
+%% ), and should be queried at the time the texture was compressed with {@link gl:getTexLevelParameterfv/3}
+%% .
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage1D.xml">external</a> documentation.
+-spec compressedTexSubImage1D(Target, Level, Xoffset, Width, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Width :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) when is_integer(Data) ->
cast(5370, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Width:?GLsizei,Format:?GLenum,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) ->
send_bin(Data),
cast(5371, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Width:?GLsizei,Format:?GLenum,ImageSize:?GLsizei>>).
-%% @spec (Target::enum(),Level::integer(),Img::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetCompressedTexImage.xml">external</a> documentation.
--spec getCompressedTexImage(enum(),integer(),mem()) -> ok.
-getCompressedTexImage(Target,Level,Img) ->
+%% @doc Return a compressed texture image
+%%
+%% ``gl:getCompressedTexImage'' returns the compressed texture image associated with `Target'
+%% and `Lod' into `Img' . `Img' should be an array of `?GL_TEXTURE_COMPRESSED_IMAGE_SIZE'
+%% bytes. `Target' specifies whether the desired texture image was one specified by {@link gl:texImage1D/8}
+%% (`?GL_TEXTURE_1D'), {@link gl:texImage2D/9} (`?GL_TEXTURE_2D' or any of `?GL_TEXTURE_CUBE_MAP_*'
+%% ), or {@link gl:texImage3D/10} (`?GL_TEXTURE_3D'). `Lod' specifies the level-of-detail
+%% number of the desired image.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target
+%% (see {@link gl:bindBuffer/2} ) while a texture image is requested, `Img' is treated
+%% as a byte offset into the buffer object's data store.
+%%
+%% To minimize errors, first verify that the texture is compressed by calling {@link gl:getTexLevelParameterfv/3}
+%% with argument `?GL_TEXTURE_COMPRESSED'. If the texture is compressed, then determine
+%% the amount of memory required to store the compressed texture by calling {@link gl:getTexLevelParameterfv/3}
+%% with argument `?GL_TEXTURE_COMPRESSED_IMAGE_SIZE'. Finally, retrieve the internal
+%% format of the texture by calling {@link gl:getTexLevelParameterfv/3} with argument `?GL_TEXTURE_INTERNAL_FORMAT'
+%% . To store the texture for later use, associate the internal format and size with the
+%% retrieved texture image. These data can be used by the respective texture or subtexture
+%% loading routine used for loading `Target' textures.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetCompressedTexImage.xml">external</a> documentation.
+-spec getCompressedTexImage(Target, Lod, Img) -> ok when Target :: enum(),Lod :: integer(),Img :: mem().
+getCompressedTexImage(Target,Lod,Img) ->
send_bin(Img),
- call(5372, <<Target:?GLenum,Level:?GLint>>).
+ call(5372, <<Target:?GLenum,Lod:?GLint>>).
-%% @spec (Texture::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClientActiveTexture.xml">external</a> documentation.
--spec clientActiveTexture(enum()) -> ok.
+%% @doc Select active texture unit
+%%
+%% ``gl:clientActiveTexture'' selects the vertex array client state parameters to be modified
+%% by {@link gl:texCoordPointer/4} , and enabled or disabled with {@link gl:enableClientState/1}
+%% or {@link gl:enableClientState/1} , respectively, when called with a parameter of `?GL_TEXTURE_COORD_ARRAY'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClientActiveTexture.xml">external</a> documentation.
+-spec clientActiveTexture(Texture) -> ok when Texture :: enum().
clientActiveTexture(Texture) ->
cast(5373, <<Texture:?GLenum>>).
-%% @spec (Target::enum(),S::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord1d(enum(),float()) -> ok.
+%% @doc Set the current texture coordinates
+%%
+%% ``gl:multiTexCoord'' specifies texture coordinates in one, two, three, or four dimensions.
+%% ``gl:multiTexCoord1'' sets the current texture coordinates to (s 0 0 1); a call to ``gl:multiTexCoord2''
+%% sets them to (s t 0 1). Similarly, ``gl:multiTexCoord3'' specifies the texture coordinates as (s
+%% t r 1),
+%% and ``gl:multiTexCoord4'' defines all four components explicitly as (s t r q).
+%%
+%% The current texture coordinates are part of the data that is associated with each vertex
+%% and with the current raster position. Initially, the values for (s t r q) are (0 0 0 1).
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
+-spec multiTexCoord1d(Target, S) -> ok when Target :: enum(),S :: float().
multiTexCoord1d(Target,S) ->
cast(5374, <<Target:?GLenum,0:32,S:?GLdouble>>).
-%% @spec (Target,{S}) -> ok
%% @equiv multiTexCoord1d(Target,S)
--spec multiTexCoord1dv(enum(),{float()}) -> ok.
+-spec multiTexCoord1dv(Target :: enum(),V) -> ok when V :: {S :: float()}.
multiTexCoord1dv(Target,{S}) -> multiTexCoord1d(Target,S).
-%% @spec (Target::enum(),S::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord1f(enum(),float()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord1f(Target, S) -> ok when Target :: enum(),S :: float().
multiTexCoord1f(Target,S) ->
cast(5375, <<Target:?GLenum,S:?GLfloat>>).
-%% @spec (Target,{S}) -> ok
%% @equiv multiTexCoord1f(Target,S)
--spec multiTexCoord1fv(enum(),{float()}) -> ok.
+-spec multiTexCoord1fv(Target :: enum(),V) -> ok when V :: {S :: float()}.
multiTexCoord1fv(Target,{S}) -> multiTexCoord1f(Target,S).
-%% @spec (Target::enum(),S::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord1i(enum(),integer()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord1i(Target, S) -> ok when Target :: enum(),S :: integer().
multiTexCoord1i(Target,S) ->
cast(5376, <<Target:?GLenum,S:?GLint>>).
-%% @spec (Target,{S}) -> ok
%% @equiv multiTexCoord1i(Target,S)
--spec multiTexCoord1iv(enum(),{integer()}) -> ok.
+-spec multiTexCoord1iv(Target :: enum(),V) -> ok when V :: {S :: integer()}.
multiTexCoord1iv(Target,{S}) -> multiTexCoord1i(Target,S).
-%% @spec (Target::enum(),S::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord1s(enum(),integer()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord1s(Target, S) -> ok when Target :: enum(),S :: integer().
multiTexCoord1s(Target,S) ->
cast(5377, <<Target:?GLenum,S:?GLshort>>).
-%% @spec (Target,{S}) -> ok
%% @equiv multiTexCoord1s(Target,S)
--spec multiTexCoord1sv(enum(),{integer()}) -> ok.
+-spec multiTexCoord1sv(Target :: enum(),V) -> ok when V :: {S :: integer()}.
multiTexCoord1sv(Target,{S}) -> multiTexCoord1s(Target,S).
-%% @spec (Target::enum(),S::float(),T::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord2d(enum(),float(),float()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord2d(Target, S, T) -> ok when Target :: enum(),S :: float(),T :: float().
multiTexCoord2d(Target,S,T) ->
cast(5378, <<Target:?GLenum,0:32,S:?GLdouble,T:?GLdouble>>).
-%% @spec (Target,{S,T}) -> ok
%% @equiv multiTexCoord2d(Target,S,T)
--spec multiTexCoord2dv(enum(),{float(),float()}) -> ok.
+-spec multiTexCoord2dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float()}.
multiTexCoord2dv(Target,{S,T}) -> multiTexCoord2d(Target,S,T).
-%% @spec (Target::enum(),S::float(),T::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord2f(enum(),float(),float()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord2f(Target, S, T) -> ok when Target :: enum(),S :: float(),T :: float().
multiTexCoord2f(Target,S,T) ->
cast(5379, <<Target:?GLenum,S:?GLfloat,T:?GLfloat>>).
-%% @spec (Target,{S,T}) -> ok
%% @equiv multiTexCoord2f(Target,S,T)
--spec multiTexCoord2fv(enum(),{float(),float()}) -> ok.
+-spec multiTexCoord2fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float()}.
multiTexCoord2fv(Target,{S,T}) -> multiTexCoord2f(Target,S,T).
-%% @spec (Target::enum(),S::integer(),T::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord2i(enum(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord2i(Target, S, T) -> ok when Target :: enum(),S :: integer(),T :: integer().
multiTexCoord2i(Target,S,T) ->
cast(5380, <<Target:?GLenum,S:?GLint,T:?GLint>>).
-%% @spec (Target,{S,T}) -> ok
%% @equiv multiTexCoord2i(Target,S,T)
--spec multiTexCoord2iv(enum(),{integer(),integer()}) -> ok.
+-spec multiTexCoord2iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer()}.
multiTexCoord2iv(Target,{S,T}) -> multiTexCoord2i(Target,S,T).
-%% @spec (Target::enum(),S::integer(),T::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord2s(enum(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord2s(Target, S, T) -> ok when Target :: enum(),S :: integer(),T :: integer().
multiTexCoord2s(Target,S,T) ->
cast(5381, <<Target:?GLenum,S:?GLshort,T:?GLshort>>).
-%% @spec (Target,{S,T}) -> ok
%% @equiv multiTexCoord2s(Target,S,T)
--spec multiTexCoord2sv(enum(),{integer(),integer()}) -> ok.
+-spec multiTexCoord2sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer()}.
multiTexCoord2sv(Target,{S,T}) -> multiTexCoord2s(Target,S,T).
-%% @spec (Target::enum(),S::float(),T::float(),R::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord3d(enum(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord3d(Target, S, T, R) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float().
multiTexCoord3d(Target,S,T,R) ->
cast(5382, <<Target:?GLenum,0:32,S:?GLdouble,T:?GLdouble,R:?GLdouble>>).
-%% @spec (Target,{S,T,R}) -> ok
%% @equiv multiTexCoord3d(Target,S,T,R)
--spec multiTexCoord3dv(enum(),{float(),float(),float()}) -> ok.
+-spec multiTexCoord3dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float()}.
multiTexCoord3dv(Target,{S,T,R}) -> multiTexCoord3d(Target,S,T,R).
-%% @spec (Target::enum(),S::float(),T::float(),R::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord3f(enum(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord3f(Target, S, T, R) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float().
multiTexCoord3f(Target,S,T,R) ->
cast(5383, <<Target:?GLenum,S:?GLfloat,T:?GLfloat,R:?GLfloat>>).
-%% @spec (Target,{S,T,R}) -> ok
%% @equiv multiTexCoord3f(Target,S,T,R)
--spec multiTexCoord3fv(enum(),{float(),float(),float()}) -> ok.
+-spec multiTexCoord3fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float()}.
multiTexCoord3fv(Target,{S,T,R}) -> multiTexCoord3f(Target,S,T,R).
-%% @spec (Target::enum(),S::integer(),T::integer(),R::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord3i(enum(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord3i(Target, S, T, R) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer().
multiTexCoord3i(Target,S,T,R) ->
cast(5384, <<Target:?GLenum,S:?GLint,T:?GLint,R:?GLint>>).
-%% @spec (Target,{S,T,R}) -> ok
%% @equiv multiTexCoord3i(Target,S,T,R)
--spec multiTexCoord3iv(enum(),{integer(),integer(),integer()}) -> ok.
+-spec multiTexCoord3iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}.
multiTexCoord3iv(Target,{S,T,R}) -> multiTexCoord3i(Target,S,T,R).
-%% @spec (Target::enum(),S::integer(),T::integer(),R::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord3s(enum(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord3s(Target, S, T, R) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer().
multiTexCoord3s(Target,S,T,R) ->
cast(5385, <<Target:?GLenum,S:?GLshort,T:?GLshort,R:?GLshort>>).
-%% @spec (Target,{S,T,R}) -> ok
%% @equiv multiTexCoord3s(Target,S,T,R)
--spec multiTexCoord3sv(enum(),{integer(),integer(),integer()}) -> ok.
+-spec multiTexCoord3sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}.
multiTexCoord3sv(Target,{S,T,R}) -> multiTexCoord3s(Target,S,T,R).
-%% @spec (Target::enum(),S::float(),T::float(),R::float(),Q::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord4d(enum(),float(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord4d(Target, S, T, R, Q) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float(),Q :: float().
multiTexCoord4d(Target,S,T,R,Q) ->
cast(5386, <<Target:?GLenum,0:32,S:?GLdouble,T:?GLdouble,R:?GLdouble,Q:?GLdouble>>).
-%% @spec (Target,{S,T,R,Q}) -> ok
%% @equiv multiTexCoord4d(Target,S,T,R,Q)
--spec multiTexCoord4dv(enum(),{float(),float(),float(),float()}) -> ok.
+-spec multiTexCoord4dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
multiTexCoord4dv(Target,{S,T,R,Q}) -> multiTexCoord4d(Target,S,T,R,Q).
-%% @spec (Target::enum(),S::float(),T::float(),R::float(),Q::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord4f(enum(),float(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord4f(Target, S, T, R, Q) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float(),Q :: float().
multiTexCoord4f(Target,S,T,R,Q) ->
cast(5387, <<Target:?GLenum,S:?GLfloat,T:?GLfloat,R:?GLfloat,Q:?GLfloat>>).
-%% @spec (Target,{S,T,R,Q}) -> ok
%% @equiv multiTexCoord4f(Target,S,T,R,Q)
--spec multiTexCoord4fv(enum(),{float(),float(),float(),float()}) -> ok.
+-spec multiTexCoord4fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
multiTexCoord4fv(Target,{S,T,R,Q}) -> multiTexCoord4f(Target,S,T,R,Q).
-%% @spec (Target::enum(),S::integer(),T::integer(),R::integer(),Q::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord4i(enum(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord4i(Target, S, T, R, Q) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer(),Q :: integer().
multiTexCoord4i(Target,S,T,R,Q) ->
cast(5388, <<Target:?GLenum,S:?GLint,T:?GLint,R:?GLint,Q:?GLint>>).
-%% @spec (Target,{S,T,R,Q}) -> ok
%% @equiv multiTexCoord4i(Target,S,T,R,Q)
--spec multiTexCoord4iv(enum(),{integer(),integer(),integer(),integer()}) -> ok.
+-spec multiTexCoord4iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
multiTexCoord4iv(Target,{S,T,R,Q}) -> multiTexCoord4i(Target,S,T,R,Q).
-%% @spec (Target::enum(),S::integer(),T::integer(),R::integer(),Q::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord4s(enum(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link multiTexCoord1d/2}
+-spec multiTexCoord4s(Target, S, T, R, Q) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer(),Q :: integer().
multiTexCoord4s(Target,S,T,R,Q) ->
cast(5389, <<Target:?GLenum,S:?GLshort,T:?GLshort,R:?GLshort,Q:?GLshort>>).
-%% @spec (Target,{S,T,R,Q}) -> ok
%% @equiv multiTexCoord4s(Target,S,T,R,Q)
--spec multiTexCoord4sv(enum(),{integer(),integer(),integer(),integer()}) -> ok.
+-spec multiTexCoord4sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
multiTexCoord4sv(Target,{S,T,R,Q}) -> multiTexCoord4s(Target,S,T,R,Q).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrix.xml">external</a> documentation.
--spec loadTransposeMatrixf({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
+%% @doc Replace the current matrix with the specified row-major ordered matrix
+%%
+%% ``gl:loadTransposeMatrix'' replaces the current matrix with the one whose elements are
+%% specified by `M' . The current matrix is the projection matrix, modelview matrix,
+%% or texture matrix, depending on the current matrix mode (see {@link gl:matrixMode/1} ).
+%%
+%% The current matrix, M, defines a transformation of coordinates. For instance, assume
+%% M refers to the modelview matrix. If v=(v[0] v[1] v[2] v[3]) is the set of object coordinates of a vertex,
+%% and `M' points to an array of 16 single- or double-precision floating-point values
+%% m={m[0] m[1] ... m[15]}, then the modelview transformation M(v) does the following:
+%%
+%% M(v)=(m[0] m[1] m[2] m[3] m[4] m[5] m[6] m[7] m[8] m[9] m[10] m[11] m[12] m[13] m[14] m[15])*(v[0] v[1] v[2] v[3])
+%%
+%% Projection and texture transformations are similarly defined.
+%%
+%% Calling ``gl:loadTransposeMatrix'' with matrix M is identical in operation to {@link gl:loadMatrixd/1}
+%% with M T, where T represents the transpose.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrix.xml">external</a> documentation.
+-spec loadTransposeMatrixf(M) -> ok when M :: matrix().
loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5390, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5390, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,0:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,0:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,0:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,1:?GLfloat>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrix.xml">external</a> documentation.
--spec loadTransposeMatrixd({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
+%% @doc
+%% See {@link loadTransposeMatrixf/1}
+-spec loadTransposeMatrixd(M) -> ok when M :: matrix().
loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5391, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5391, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrix.xml">external</a> documentation.
--spec multTransposeMatrixf({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
+%% @doc Multiply the current matrix with the specified row-major ordered matrix
+%%
+%% ``gl:multTransposeMatrix'' multiplies the current matrix with the one specified using `M'
+%% , and replaces the current matrix with the product.
+%%
+%% The current matrix is determined by the current matrix mode (see {@link gl:matrixMode/1} ).
+%% It is either the projection matrix, modelview matrix, or the texture matrix.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrix.xml">external</a> documentation.
+-spec multTransposeMatrixf(M) -> ok when M :: matrix().
multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5392, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5392, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,0:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,0:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,0:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,1:?GLfloat>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrix.xml">external</a> documentation.
--spec multTransposeMatrixd({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
+%% @doc
+%% See {@link multTransposeMatrixf/1}
+-spec multTransposeMatrixd(M) -> ok when M :: matrix().
multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5393, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5393, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble>>).
-%% @spec (SfactorRGB::enum(),DfactorRGB::enum(),SfactorAlpha::enum(),DfactorAlpha::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFuncSeparate.xml">external</a> documentation.
--spec blendFuncSeparate(enum(),enum(),enum(),enum()) -> ok.
+%% @doc Specify pixel arithmetic for RGB and alpha components separately
+%%
+%% Pixels can be drawn using a function that blends the incoming (source) RGBA values with
+%% the RGBA values that are already in the frame buffer (the destination values). Blending
+%% is initially disabled. Use {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_BLEND'
+%% to enable and disable blending.
+%%
+%% ``gl:blendFuncSeparate'' defines the operation of blending for all draw buffers when
+%% it is enabled. ``gl:blendFuncSeparatei'' defines the operation of blending for a single
+%% draw buffer specified by `Buf' when enabled for that draw buffer. `SrcRGB' specifies
+%% which method is used to scale the source RGB-color components. `DstRGB' specifies
+%% which method is used to scale the destination RGB-color components. Likewise, `SrcAlpha'
+%% specifies which method is used to scale the source alpha color component, and `DstAlpha'
+%% specifies which method is used to scale the destination alpha component. The possible
+%% methods are described in the following table. Each method defines four scale factors,
+%% one each for red, green, blue, and alpha.
+%%
+%% In the table and in subsequent equations, first source, second source and destination
+%% color components are referred to as (R s0 G s0 B s0 A s0), (R s1 G s1 B s1 A s1), and (R d G d B d A d), respectively. The color specified by {@link gl:blendColor/4}
+%% is referred to as (R c G c B c A c). They are understood to have integer values between 0 and (k R k G k B
+%% k A), where
+%%
+%% k c= 2(m c)-1
+%%
+%% and (m R m G m B m A) is the number of red, green, blue, and alpha bitplanes.
+%%
+%% Source and destination scale factors are referred to as (s R s G s B s A) and (d R d G d B d A). All scale factors have
+%% range [0 1].
+%%
+%% <table><tbody><tr><td>` Parameter '</td><td>` RGB Factor '</td><td>` Alpha Factor '
+%% </td></tr></tbody><tbody><tr><td>`?GL_ZERO'</td><td>(0 0 0)</td><td> 0</td></tr><tr><td>`?GL_ONE'
+%% </td><td>(1 1 1)</td><td> 1</td></tr><tr><td>`?GL_SRC_COLOR'</td><td>(R s0 k/R G s0 k/G B s0
+%% k/B)</td><td> A s0 k/A</td>
+%% </tr><tr><td>`?GL_ONE_MINUS_SRC_COLOR'</td><td>(1 1 1 1)-(R s0 k/R G s0 k/G B s0 k/B)</td><td> 1-A s0 k/A</td></tr><tr><td>
+%% `?GL_DST_COLOR'</td><td>(R d k/R G d k/G B d k/B)</td><td> A d k/A</td></tr><tr><td>`?GL_ONE_MINUS_DST_COLOR'
+%% </td><td>(1 1 1)-(R d k/R G d k/G B d k/B)</td><td> 1-A d k/A</td></tr><tr><td>`?GL_SRC_ALPHA'</td><td>(A s0 k/A A s0
+%% k/A A s0 k/A)</td><td> A
+%% s0 k/A</td></tr><tr><td>`?GL_ONE_MINUS_SRC_ALPHA'</td><td>(1 1 1)-(A s0 k/A A s0 k/A A s0 k/A
+%% )</td><td> 1-A s0 k/A</td></tr>
+%% <tr><td>`?GL_DST_ALPHA'</td><td>(A d k/A A d k/A A d k/A)</td><td> A d k/A</td></tr><tr><td>`?GL_ONE_MINUS_DST_ALPHA'
+%% </td><td>(1 1 1)-(A d k/A A d k/A A d k/A)</td><td> 1-A d k/A</td></tr><tr><td>`?GL_CONSTANT_COLOR'</td><td>(R c G c
+%% B c)</td><td>
+%% A c</td></tr><tr><td>`?GL_ONE_MINUS_CONSTANT_COLOR'</td><td>(1 1 1)-(R c G c B c)</td><td> 1-A c</td></tr>
+%% <tr><td>`?GL_CONSTANT_ALPHA'</td><td>(A c A c A c)</td><td> A c</td></tr><tr><td>`?GL_ONE_MINUS_CONSTANT_ALPHA'
+%% </td><td>(1 1 1)-(A c A c A c)</td><td> 1-A c</td></tr><tr><td>`?GL_SRC_ALPHA_SATURATE'</td><td>(i i i)</td><td>
+%% 1</td></tr><tr><td>`?GL_SRC1_COLOR'</td><td>(R s1 k/R G s1 k/G B s1 k/B)</td><td> A s1 k/A</td></tr><tr><td>`?GL_ONE_MINUS_SRC_COLOR'
+%% </td><td>(1 1 1 1)-(R s1 k/R G s1 k/G B s1 k/B)</td><td> 1-A s1 k/A</td></tr><tr><td>`?GL_SRC1_ALPHA'</td><td>(A s1 k/A A
+%% s1 k/A A s1 k/A)</td><td> A
+%% s1 k/A</td></tr><tr><td>`?GL_ONE_MINUS_SRC_ALPHA'</td><td>(1 1 1)-(A s1 k/A A s1 k/A A s1 k/A
+%% )</td><td> 1-A s1 k/A</td></tr>
+%% </tbody></table>
+%%
+%% In the table,
+%%
+%% i= min(A s 1-(A d))
+%%
+%% To determine the blended RGBA values of a pixel, the system uses the following equations:
+%%
+%%
+%% R d= min(k R R s s R+R d d R) G d= min(k G G s s G+G d d G) B d= min(k B B s s B+B d d B) A d= min(k A A s s A+A d d A)
+%%
+%% Despite the apparent precision of the above equations, blending arithmetic is not exactly
+%% specified, because blending operates with imprecise integer color values. However, a blend
+%% factor that should be equal to 1 is guaranteed not to modify its multiplicand, and a blend
+%% factor equal to 0 reduces its multiplicand to 0. For example, when `SrcRGB' is `?GL_SRC_ALPHA'
+%% , `DstRGB' is `?GL_ONE_MINUS_SRC_ALPHA', and A s is equal to k A, the equations
+%% reduce to simple replacement:
+%%
+%% R d= R s G d= G s B d= B s A d= A s
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFuncSeparate.xml">external</a> documentation.
+-spec blendFuncSeparate(SfactorRGB, DfactorRGB, SfactorAlpha, DfactorAlpha) -> ok when SfactorRGB :: enum(),DfactorRGB :: enum(),SfactorAlpha :: enum(),DfactorAlpha :: enum().
blendFuncSeparate(SfactorRGB,DfactorRGB,SfactorAlpha,DfactorAlpha) ->
cast(5394, <<SfactorRGB:?GLenum,DfactorRGB:?GLenum,SfactorAlpha:?GLenum,DfactorAlpha:?GLenum>>).
-%% @spec (Mode::enum(),First::[integer()],Count::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiDrawArrays.xml">external</a> documentation.
--spec multiDrawArrays(enum(),[integer()],[integer()]) -> ok.
+%% @doc Render multiple sets of primitives from array data
+%%
+%% ``gl:multiDrawArrays'' specifies multiple sets of geometric primitives with very few
+%% subroutine calls. Instead of calling a GL procedure to pass each individual vertex, normal,
+%% texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices,
+%% normals, and colors and use them to construct a sequence of primitives with a single call
+%% to ``gl:multiDrawArrays''.
+%%
+%% ``gl:multiDrawArrays'' behaves identically to {@link gl:drawArrays/3} except that `Primcount'
+%% separate ranges of elements are specified instead.
+%%
+%% When ``gl:multiDrawArrays'' is called, it uses `Count' sequential elements from
+%% each enabled array to construct a sequence of geometric primitives, beginning with element
+%% `First' . `Mode' specifies what kind of primitives are constructed, and how the
+%% array elements construct those primitives.
+%%
+%% Vertex attributes that are modified by ``gl:multiDrawArrays'' have an unspecified value
+%% after ``gl:multiDrawArrays'' returns. Attributes that aren't modified remain well defined.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiDrawArrays.xml">external</a> documentation.
+-spec multiDrawArrays(Mode, First, Count) -> ok when Mode :: enum(),First :: [integer()],Count :: [integer()].
multiDrawArrays(Mode,First,Count) ->
cast(5395, <<Mode:?GLenum,(length(First)):?GLuint,
(<< <<C:?GLint>> || C <- First>>)/binary,0:(((length(First)) rem 2)*32),(length(Count)):?GLuint,
(<< <<C:?GLsizei>> || C <- Count>>)/binary,0:(((1+length(Count)) rem 2)*32)>>).
-%% @spec (Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointParameter.xml">external</a> documentation.
--spec pointParameterf(enum(),float()) -> ok.
+%% @doc Specify point parameters
+%%
+%% The following values are accepted for `Pname' :
+%%
+%% `?GL_POINT_FADE_THRESHOLD_SIZE': `Params' is a single floating-point value that
+%% specifies the threshold value to which point sizes are clamped if they exceed the specified
+%% value. The default value is 1.0.
+%%
+%% `?GL_POINT_SPRITE_COORD_ORIGIN': `Params' is a single enum specifying the point
+%% sprite texture coordinate origin, either `?GL_LOWER_LEFT' or `?GL_UPPER_LEFT'.
+%% The default value is `?GL_UPPER_LEFT'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointParameter.xml">external</a> documentation.
+-spec pointParameterf(Pname, Param) -> ok when Pname :: enum(),Param :: float().
pointParameterf(Pname,Param) ->
cast(5396, <<Pname:?GLenum,Param:?GLfloat>>).
-%% @spec (Pname::enum(),Params::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointParameter.xml">external</a> documentation.
--spec pointParameterfv(enum(),{float()}) -> ok.
+%% @doc
+%% See {@link pointParameterf/2}
+-spec pointParameterfv(Pname, Params) -> ok when Pname :: enum(),Params :: {float()}.
pointParameterfv(Pname,Params) ->
cast(5397, <<Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
-%% @spec (Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointParameter.xml">external</a> documentation.
--spec pointParameteri(enum(),integer()) -> ok.
+%% @doc
+%% See {@link pointParameterf/2}
+-spec pointParameteri(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
pointParameteri(Pname,Param) ->
cast(5398, <<Pname:?GLenum,Param:?GLint>>).
-%% @spec (Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointParameter.xml">external</a> documentation.
--spec pointParameteriv(enum(),{integer()}) -> ok.
+%% @doc
+%% See {@link pointParameterf/2}
+-spec pointParameteriv(Pname, Params) -> ok when Pname :: enum(),Params :: {integer()}.
pointParameteriv(Pname,Params) ->
cast(5399, <<Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
-%% @spec (Coord::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFogCoord.xml">external</a> documentation.
--spec fogCoordf(float()) -> ok.
+%% @doc Set the current fog coordinates
+%%
+%% ``gl:fogCoord'' specifies the fog coordinate that is associated with each vertex and
+%% the current raster position. The value specified is interpolated and used in computing
+%% the fog color (see {@link gl:fogf/2} ).
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFogCoord.xml">external</a> documentation.
+-spec fogCoordf(Coord) -> ok when Coord :: float().
fogCoordf(Coord) ->
cast(5400, <<Coord:?GLfloat>>).
-%% @spec ({Coord}) -> ok
%% @equiv fogCoordf(Coord)
--spec fogCoordfv({float()}) -> ok.
+-spec fogCoordfv(Coord) -> ok when Coord :: {Coord :: float()}.
fogCoordfv({Coord}) -> fogCoordf(Coord).
-%% @spec (Coord::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFogCoord.xml">external</a> documentation.
--spec fogCoordd(float()) -> ok.
+%% @doc
+%% See {@link fogCoordf/1}
+-spec fogCoordd(Coord) -> ok when Coord :: float().
fogCoordd(Coord) ->
cast(5401, <<Coord:?GLdouble>>).
-%% @spec ({Coord}) -> ok
%% @equiv fogCoordd(Coord)
--spec fogCoorddv({float()}) -> ok.
+-spec fogCoorddv(Coord) -> ok when Coord :: {Coord :: float()}.
fogCoorddv({Coord}) -> fogCoordd(Coord).
-%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFogCoordPointer.xml">external</a> documentation.
--spec fogCoordPointer(enum(),integer(),offset()|mem()) -> ok.
+%% @doc Define an array of fog coordinates
+%%
+%% ``gl:fogCoordPointer'' specifies the location and data format of an array of fog coordinates
+%% to use when rendering. `Type' specifies the data type of each fog coordinate, and `Stride'
+%% specifies the byte stride from one fog coordinate to the next, allowing vertices and
+%% attributes to be packed into a single array or stored in separate arrays.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2}
+%% ) while a fog coordinate array is specified, `Pointer' is treated as a byte offset
+%% into the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING'
+%% ) is saved as fog coordinate vertex array client-side state (`?GL_FOG_COORD_ARRAY_BUFFER_BINDING'
+%% ).
+%%
+%% When a fog coordinate array is specified, `Type' , `Stride' , and `Pointer'
+%% are saved as client-side state, in addition to the current vertex array buffer object
+%% binding.
+%%
+%% To enable and disable the fog coordinate array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1}
+%% with the argument `?GL_FOG_COORD_ARRAY'. If enabled, the fog coordinate array is
+%% used when {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements'
+%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFogCoordPointer.xml">external</a> documentation.
+-spec fogCoordPointer(Type, Stride, Pointer) -> ok when Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
fogCoordPointer(Type,Stride,Pointer) when is_integer(Pointer) ->
cast(5402, <<Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
fogCoordPointer(Type,Stride,Pointer) ->
send_bin(Pointer),
cast(5403, <<Type:?GLenum,Stride:?GLsizei>>).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3b(integer(),integer(),integer()) -> ok.
+%% @doc Set the current secondary color
+%%
+%% The GL stores both a primary four-valued RGBA color and a secondary four-valued RGBA
+%% color (where alpha is always set to 0.0) that is associated with every vertex.
+%%
+%% The secondary color is interpolated and applied to each fragment during rasterization
+%% when `?GL_COLOR_SUM' is enabled. When lighting is enabled, and `?GL_SEPARATE_SPECULAR_COLOR'
+%% is specified, the value of the secondary color is assigned the value computed from the
+%% specular term of the lighting computation. Both the primary and secondary current colors
+%% are applied to each fragment, regardless of the state of `?GL_COLOR_SUM', under such
+%% conditions. When `?GL_SEPARATE_SPECULAR_COLOR' is specified, the value returned from
+%% querying the current secondary color is undefined.
+%%
+%% ``gl:secondaryColor3b'', ``gl:secondaryColor3s'', and ``gl:secondaryColor3i'' take
+%% three signed byte, short, or long integers as arguments. When `v' is appended to
+%% the name, the color commands can take a pointer to an array of such values.
+%%
+%% Color values are stored in floating-point format, with unspecified mantissa and exponent
+%% sizes. Unsigned integer color components, when specified, are linearly mapped to floating-point
+%% values such that the largest representable value maps to 1.0 (full intensity), and 0 maps
+%% to 0.0 (zero intensity). Signed integer color components, when specified, are linearly
+%% mapped to floating-point values such that the most positive representable value maps to
+%% 1.0, and the most negative representable value maps to -1.0. (Note that this mapping
+%% does not convert 0 precisely to 0.0). Floating-point values are mapped directly.
+%%
+%% Neither floating-point nor signed integer values are clamped to the range [0 1] before the
+%% current color is updated. However, color components are clamped to this range before they
+%% are interpolated or written into a color buffer.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
+-spec secondaryColor3b(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3b(Red,Green,Blue) ->
cast(5404, <<Red:?GLbyte,Green:?GLbyte,Blue:?GLbyte>>).
-%% @spec ({Red,Green,Blue}) -> ok
%% @equiv secondaryColor3b(Red,Green,Blue)
--spec secondaryColor3bv({integer(),integer(),integer()}) -> ok.
+-spec secondaryColor3bv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3bv({Red,Green,Blue}) -> secondaryColor3b(Red,Green,Blue).
-%% @spec (Red::float(),Green::float(),Blue::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3d(float(),float(),float()) -> ok.
+%% @doc
+%% See {@link secondaryColor3b/3}
+-spec secondaryColor3d(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float().
secondaryColor3d(Red,Green,Blue) ->
cast(5405, <<Red:?GLdouble,Green:?GLdouble,Blue:?GLdouble>>).
-%% @spec ({Red,Green,Blue}) -> ok
%% @equiv secondaryColor3d(Red,Green,Blue)
--spec secondaryColor3dv({float(),float(),float()}) -> ok.
+-spec secondaryColor3dv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}.
secondaryColor3dv({Red,Green,Blue}) -> secondaryColor3d(Red,Green,Blue).
-%% @spec (Red::float(),Green::float(),Blue::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3f(float(),float(),float()) -> ok.
+%% @doc
+%% See {@link secondaryColor3b/3}
+-spec secondaryColor3f(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float().
secondaryColor3f(Red,Green,Blue) ->
cast(5406, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat>>).
-%% @spec ({Red,Green,Blue}) -> ok
%% @equiv secondaryColor3f(Red,Green,Blue)
--spec secondaryColor3fv({float(),float(),float()}) -> ok.
+-spec secondaryColor3fv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}.
secondaryColor3fv({Red,Green,Blue}) -> secondaryColor3f(Red,Green,Blue).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3i(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link secondaryColor3b/3}
+-spec secondaryColor3i(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3i(Red,Green,Blue) ->
cast(5407, <<Red:?GLint,Green:?GLint,Blue:?GLint>>).
-%% @spec ({Red,Green,Blue}) -> ok
%% @equiv secondaryColor3i(Red,Green,Blue)
--spec secondaryColor3iv({integer(),integer(),integer()}) -> ok.
+-spec secondaryColor3iv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3iv({Red,Green,Blue}) -> secondaryColor3i(Red,Green,Blue).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3s(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link secondaryColor3b/3}
+-spec secondaryColor3s(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3s(Red,Green,Blue) ->
cast(5408, <<Red:?GLshort,Green:?GLshort,Blue:?GLshort>>).
-%% @spec ({Red,Green,Blue}) -> ok
%% @equiv secondaryColor3s(Red,Green,Blue)
--spec secondaryColor3sv({integer(),integer(),integer()}) -> ok.
+-spec secondaryColor3sv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3sv({Red,Green,Blue}) -> secondaryColor3s(Red,Green,Blue).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3ub(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link secondaryColor3b/3}
+-spec secondaryColor3ub(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3ub(Red,Green,Blue) ->
cast(5409, <<Red:?GLubyte,Green:?GLubyte,Blue:?GLubyte>>).
-%% @spec ({Red,Green,Blue}) -> ok
%% @equiv secondaryColor3ub(Red,Green,Blue)
--spec secondaryColor3ubv({integer(),integer(),integer()}) -> ok.
+-spec secondaryColor3ubv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3ubv({Red,Green,Blue}) -> secondaryColor3ub(Red,Green,Blue).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3ui(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link secondaryColor3b/3}
+-spec secondaryColor3ui(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3ui(Red,Green,Blue) ->
cast(5410, <<Red:?GLuint,Green:?GLuint,Blue:?GLuint>>).
-%% @spec ({Red,Green,Blue}) -> ok
%% @equiv secondaryColor3ui(Red,Green,Blue)
--spec secondaryColor3uiv({integer(),integer(),integer()}) -> ok.
+-spec secondaryColor3uiv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3uiv({Red,Green,Blue}) -> secondaryColor3ui(Red,Green,Blue).
-%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3us(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link secondaryColor3b/3}
+-spec secondaryColor3us(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3us(Red,Green,Blue) ->
cast(5411, <<Red:?GLushort,Green:?GLushort,Blue:?GLushort>>).
-%% @spec ({Red,Green,Blue}) -> ok
%% @equiv secondaryColor3us(Red,Green,Blue)
--spec secondaryColor3usv({integer(),integer(),integer()}) -> ok.
+-spec secondaryColor3usv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3usv({Red,Green,Blue}) -> secondaryColor3us(Red,Green,Blue).
-%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColorPointer.xml">external</a> documentation.
--spec secondaryColorPointer(integer(),enum(),integer(),offset()|mem()) -> ok.
+%% @doc Define an array of secondary colors
+%%
+%% ``gl:secondaryColorPointer'' specifies the location and data format of an array of color
+%% components to use when rendering. `Size' specifies the number of components per color,
+%% and must be 3. `Type' specifies the data type of each color component, and `Stride'
+%% specifies the byte stride from one color to the next, allowing vertices and attributes
+%% to be packed into a single array or stored in separate arrays.
+%%
+%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2}
+%% ) while a secondary color array is specified, `Pointer' is treated as a byte offset
+%% into the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING'
+%% ) is saved as secondary color vertex array client-side state (`?GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING'
+%% ).
+%%
+%% When a secondary color array is specified, `Size' , `Type' , `Stride' , and `Pointer'
+%% are saved as client-side state, in addition to the current vertex array buffer object
+%% binding.
+%%
+%% To enable and disable the secondary color array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1}
+%% with the argument `?GL_SECONDARY_COLOR_ARRAY'. If enabled, the secondary color array
+%% is used when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} ,
+%% {@link gl:drawElements/4} , see `glMultiDrawElements', or {@link gl:drawRangeElements/6}
+%% is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColorPointer.xml">external</a> documentation.
+-spec secondaryColorPointer(Size, Type, Stride, Pointer) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
secondaryColorPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) ->
cast(5412, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
secondaryColorPointer(Size,Type,Stride,Pointer) ->
send_bin(Pointer),
cast(5413, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
-%% @spec (X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos2d(float(),float()) -> ok.
+%% @doc Specify the raster position in window coordinates for pixel operations
+%%
+%% The GL maintains a 3D position in window coordinates. This position, called the raster
+%% position, is used to position pixel and bitmap write operations. It is maintained with
+%% subpixel accuracy. See {@link gl:bitmap/7} , {@link gl:drawPixels/5} , and {@link gl:copyPixels/5}
+%% .
+%%
+%% ``gl:windowPos2'' specifies the x and y coordinates, while z is implicitly set
+%% to 0. ``gl:windowPos3'' specifies all three coordinates. The w coordinate of the current
+%% raster position is always set to 1.0.
+%%
+%% ``gl:windowPos'' directly updates the x and y coordinates of the current raster
+%% position with the values specified. That is, the values are neither transformed by the
+%% current modelview and projection matrices, nor by the viewport-to-window transform. The
+%% z coordinate of the current raster position is updated in the following manner:
+%%
+%% z={n f(n+z*(f-n)) if z&lt;= 0 if z&gt;= 1(otherwise))
+%%
+%% where n is `?GL_DEPTH_RANGE''s near value, and f is `?GL_DEPTH_RANGE''s
+%% far value. See {@link gl:depthRange/2} .
+%%
+%% The specified coordinates are not clip-tested, causing the raster position to always
+%% be valid.
+%%
+%% The current raster position also includes some associated color data and texture coordinates.
+%% If lighting is enabled, then `?GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `?GL_CURRENT_RASTER_INDEX'
+%% (in color index mode) is set to the color produced by the lighting calculation (see {@link gl:lightf/3}
+%% , {@link gl:lightModelf/2} , and {@link gl:shadeModel/1} ). If lighting is disabled, current
+%% color (in RGBA mode, state variable `?GL_CURRENT_COLOR') or color index (in color
+%% index mode, state variable `?GL_CURRENT_INDEX') is used to update the current raster
+%% color. `?GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
+%%
+%% Likewise, `?GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of `?GL_CURRENT_TEXTURE_COORDS'
+%% , based on the texture matrix and the texture generation functions (see {@link gl:texGend/3} ).
+%% The `?GL_CURRENT_RASTER_DISTANCE' is set to the `?GL_CURRENT_FOG_COORD'.
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
+-spec windowPos2d(X, Y) -> ok when X :: float(),Y :: float().
windowPos2d(X,Y) ->
cast(5414, <<X:?GLdouble,Y:?GLdouble>>).
-%% @spec ({X,Y}) -> ok
%% @equiv windowPos2d(X,Y)
--spec windowPos2dv({float(),float()}) -> ok.
+-spec windowPos2dv(V) -> ok when V :: {X :: float(),Y :: float()}.
windowPos2dv({X,Y}) -> windowPos2d(X,Y).
-%% @spec (X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos2f(float(),float()) -> ok.
+%% @doc
+%% See {@link windowPos2d/2}
+-spec windowPos2f(X, Y) -> ok when X :: float(),Y :: float().
windowPos2f(X,Y) ->
cast(5415, <<X:?GLfloat,Y:?GLfloat>>).
-%% @spec ({X,Y}) -> ok
%% @equiv windowPos2f(X,Y)
--spec windowPos2fv({float(),float()}) -> ok.
+-spec windowPos2fv(V) -> ok when V :: {X :: float(),Y :: float()}.
windowPos2fv({X,Y}) -> windowPos2f(X,Y).
-%% @spec (X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos2i(integer(),integer()) -> ok.
+%% @doc
+%% See {@link windowPos2d/2}
+-spec windowPos2i(X, Y) -> ok when X :: integer(),Y :: integer().
windowPos2i(X,Y) ->
cast(5416, <<X:?GLint,Y:?GLint>>).
-%% @spec ({X,Y}) -> ok
%% @equiv windowPos2i(X,Y)
--spec windowPos2iv({integer(),integer()}) -> ok.
+-spec windowPos2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
windowPos2iv({X,Y}) -> windowPos2i(X,Y).
-%% @spec (X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos2s(integer(),integer()) -> ok.
+%% @doc
+%% See {@link windowPos2d/2}
+-spec windowPos2s(X, Y) -> ok when X :: integer(),Y :: integer().
windowPos2s(X,Y) ->
cast(5417, <<X:?GLshort,Y:?GLshort>>).
-%% @spec ({X,Y}) -> ok
%% @equiv windowPos2s(X,Y)
--spec windowPos2sv({integer(),integer()}) -> ok.
+-spec windowPos2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
windowPos2sv({X,Y}) -> windowPos2s(X,Y).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos3d(float(),float(),float()) -> ok.
+%% @doc
+%% See {@link windowPos2d/2}
+-spec windowPos3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
windowPos3d(X,Y,Z) ->
cast(5418, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec ({X,Y,Z}) -> ok
%% @equiv windowPos3d(X,Y,Z)
--spec windowPos3dv({float(),float(),float()}) -> ok.
+-spec windowPos3dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
windowPos3dv({X,Y,Z}) -> windowPos3d(X,Y,Z).
-%% @spec (X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos3f(float(),float(),float()) -> ok.
+%% @doc
+%% See {@link windowPos2d/2}
+-spec windowPos3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
windowPos3f(X,Y,Z) ->
cast(5419, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
-%% @spec ({X,Y,Z}) -> ok
%% @equiv windowPos3f(X,Y,Z)
--spec windowPos3fv({float(),float(),float()}) -> ok.
+-spec windowPos3fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
windowPos3fv({X,Y,Z}) -> windowPos3f(X,Y,Z).
-%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos3i(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link windowPos2d/2}
+-spec windowPos3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
windowPos3i(X,Y,Z) ->
cast(5420, <<X:?GLint,Y:?GLint,Z:?GLint>>).
-%% @spec ({X,Y,Z}) -> ok
%% @equiv windowPos3i(X,Y,Z)
--spec windowPos3iv({integer(),integer(),integer()}) -> ok.
+-spec windowPos3iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
windowPos3iv({X,Y,Z}) -> windowPos3i(X,Y,Z).
-%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos3s(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link windowPos2d/2}
+-spec windowPos3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
windowPos3s(X,Y,Z) ->
cast(5421, <<X:?GLshort,Y:?GLshort,Z:?GLshort>>).
-%% @spec ({X,Y,Z}) -> ok
%% @equiv windowPos3s(X,Y,Z)
--spec windowPos3sv({integer(),integer(),integer()}) -> ok.
+-spec windowPos3sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
windowPos3sv({X,Y,Z}) -> windowPos3s(X,Y,Z).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenQueries.xml">external</a> documentation.
--spec genQueries(integer()) -> [integer()].
+%% @doc Generate query object names
+%%
+%% ``gl:genQueries'' returns `N' query object names in `Ids' . There is no guarantee
+%% that the names form a contiguous set of integers; however, it is guaranteed that none
+%% of the returned names was in use immediately before the call to ``gl:genQueries''.
+%%
+%% Query object names returned by a call to ``gl:genQueries'' are not returned by subsequent
+%% calls, unless they are first deleted with {@link gl:deleteQueries/1} .
+%%
+%% No query objects are associated with the returned query object names until they are first
+%% used by calling {@link gl:beginQuery/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenQueries.xml">external</a> documentation.
+-spec genQueries(N) -> [integer()] when N :: integer().
genQueries(N) ->
call(5422, <<N:?GLsizei>>).
-%% @spec (Ids::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteQueries.xml">external</a> documentation.
--spec deleteQueries([integer()]) -> ok.
+%% @doc Delete named query objects
+%%
+%% ``gl:deleteQueries'' deletes `N' query objects named by the elements of the array `Ids'
+%% . After a query object is deleted, it has no contents, and its name is free for reuse
+%% (for example by {@link gl:genQueries/1} ).
+%%
+%% ``gl:deleteQueries'' silently ignores 0's and names that do not correspond to existing
+%% query objects.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteQueries.xml">external</a> documentation.
+-spec deleteQueries(Ids) -> ok when Ids :: [integer()].
deleteQueries(Ids) ->
cast(5423, <<(length(Ids)):?GLuint,
(<< <<C:?GLuint>> || C <- Ids>>)/binary,0:(((1+length(Ids)) rem 2)*32)>>).
-%% @spec (Id::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsQuery.xml">external</a> documentation.
--spec isQuery(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a query object
+%%
+%% ``gl:isQuery'' returns `?GL_TRUE' if `Id' is currently the name of a query
+%% object. If `Id' is zero, or is a non-zero value that is not currently the name of
+%% a query object, or if an error occurs, ``gl:isQuery'' returns `?GL_FALSE'.
+%%
+%% A name returned by {@link gl:genQueries/1} , but not yet associated with a query object
+%% by calling {@link gl:beginQuery/2} , is not the name of a query object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsQuery.xml">external</a> documentation.
+-spec isQuery(Id) -> 0|1 when Id :: integer().
isQuery(Id) ->
call(5424, <<Id:?GLuint>>).
-%% @spec (Target::enum(),Id::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginQuery.xml">external</a> documentation.
--spec beginQuery(enum(),integer()) -> ok.
+%% @doc Delimit the boundaries of a query object
+%%
+%% ``gl:beginQuery'' and {@link gl:beginQuery/2} delimit the boundaries of a query object. `Query'
+%% must be a name previously returned from a call to {@link gl:genQueries/1} . If a query
+%% object with name `Id' does not yet exist it is created with the type determined by `Target'
+%% . `Target' must be one of `?GL_SAMPLES_PASSED', `?GL_ANY_SAMPLES_PASSED', `?GL_PRIMITIVES_GENERATED'
+%% , `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN', or `?GL_TIME_ELAPSED'. The behavior
+%% of the query object depends on its type and is as follows.
+%%
+%% If `Target' is `?GL_SAMPLES_PASSED', `Id' must be an unused name, or the
+%% name of an existing occlusion query object. When ``gl:beginQuery'' is executed, the
+%% query object's samples-passed counter is reset to 0. Subsequent rendering will increment
+%% the counter for every sample that passes the depth test. If the value of `?GL_SAMPLE_BUFFERS'
+%% is 0, then the samples-passed count is incremented by 1 for each fragment. If the value
+%% of `?GL_SAMPLE_BUFFERS' is 1, then the samples-passed count is incremented by the
+%% number of samples whose coverage bit is set. However, implementations, at their discression
+%% may instead increase the samples-passed count by the value of `?GL_SAMPLES' if any
+%% sample in the fragment is covered. When ``gl:endQuery'' is executed, the samples-passed
+%% counter is assigned to the query object's result value. This value can be queried by calling
+%% {@link gl:getQueryObjectiv/2} with `Pname' `?GL_QUERY_RESULT'.
+%%
+%% If `Target' is `?GL_ANY_SAMPLES_PASSED', `Id' must be an unused name,
+%% or the name of an existing boolean occlusion query object. When ``gl:beginQuery'' is
+%% executed, the query object's samples-passed flag is reset to `?GL_FALSE'. Subsequent
+%% rendering causes the flag to be set to `?GL_TRUE' if any sample passes the depth
+%% test. When ``gl:endQuery'' is executed, the samples-passed flag is assigned to the query
+%% object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2}
+%% with `Pname' `?GL_QUERY_RESULT'.
+%%
+%% If `Target' is `?GL_PRIMITIVES_GENERATED', `Id' must be an unused name,
+%% or the name of an existing primitive query object previously bound to the `?GL_PRIMITIVES_GENERATED'
+%% query binding. When ``gl:beginQuery'' is executed, the query object's primitives-generated
+%% counter is reset to 0. Subsequent rendering will increment the counter once for every
+%% vertex that is emitted from the geometry shader, or from the vertex shader if no geometry
+%% shader is present. When ``gl:endQuery'' is executed, the primitives-generated counter
+%% is assigned to the query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2}
+%% with `Pname' `?GL_QUERY_RESULT'.
+%%
+%% If `Target' is `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN', `Id' must
+%% be an unused name, or the name of an existing primitive query object previously bound
+%% to the `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN' query binding. When ``gl:beginQuery''
+%% is executed, the query object's primitives-written counter is reset to 0. Subsequent
+%% rendering will increment the counter once for every vertex that is written into the bound
+%% transform feedback buffer(s). If transform feedback mode is not activated between the
+%% call to ``gl:beginQuery'' and ``gl:endQuery'', the counter will not be incremented.
+%% When ``gl:endQuery'' is executed, the primitives-written counter is assigned to the
+%% query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2}
+%% with `Pname' `?GL_QUERY_RESULT'.
+%%
+%% If `Target' is `?GL_TIME_ELAPSED', `Id' must be an unused name, or the
+%% name of an existing timer query object previously bound to the `?GL_TIME_ELAPSED'
+%% query binding. When ``gl:beginQuery'' is executed, the query object's time counter is
+%% reset to 0. When ``gl:endQuery'' is executed, the elapsed server time that has passed
+%% since the call to ``gl:beginQuery'' is written into the query object's time counter.
+%% This value can be queried by calling {@link gl:getQueryObjectiv/2} with `Pname' `?GL_QUERY_RESULT'
+%% .
+%%
+%% Querying the `?GL_QUERY_RESULT' implicitly flushes the GL pipeline until the rendering
+%% delimited by the query object has completed and the result is available. `?GL_QUERY_RESULT_AVAILABLE'
+%% can be queried to determine if the result is immediately available or if the rendering
+%% is not yet complete.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginQuery.xml">external</a> documentation.
+-spec beginQuery(Target, Id) -> ok when Target :: enum(),Id :: integer().
beginQuery(Target,Id) ->
cast(5425, <<Target:?GLenum,Id:?GLuint>>).
-%% @spec (Target::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEndQuery.xml">external</a> documentation.
--spec endQuery(enum()) -> ok.
+%% @doc
+%% See {@link beginQuery/2}
+-spec endQuery(Target) -> ok when Target :: enum().
endQuery(Target) ->
cast(5426, <<Target:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQuery.xml">external</a> documentation.
--spec getQueryiv(enum(),enum()) -> integer().
+%% @doc glGetQuery
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQuery.xml">external</a> documentation.
+-spec getQueryiv(Target, Pname) -> integer() when Target :: enum(),Pname :: enum().
getQueryiv(Target,Pname) ->
call(5427, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Id::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryObject.xml">external</a> documentation.
--spec getQueryObjectiv(integer(),enum()) -> integer().
+%% @doc Return parameters of a query object
+%%
+%% ``gl:getQueryObject'' returns in `Params' a selected parameter of the query object
+%% specified by `Id' .
+%%
+%% `Pname' names a specific query object parameter. `Pname' can be as follows:
+%%
+%% `?GL_QUERY_RESULT': `Params' returns the value of the query object's passed
+%% samples counter. The initial value is 0.
+%%
+%% `?GL_QUERY_RESULT_AVAILABLE': `Params' returns whether the passed samples counter
+%% is immediately available. If a delay would occur waiting for the query result, `?GL_FALSE'
+%% is returned. Otherwise, `?GL_TRUE' is returned, which also indicates that the results
+%% of all previous queries are available as well.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryObject.xml">external</a> documentation.
+-spec getQueryObjectiv(Id, Pname) -> integer() when Id :: integer(),Pname :: enum().
getQueryObjectiv(Id,Pname) ->
call(5428, <<Id:?GLuint,Pname:?GLenum>>).
-%% @spec (Id::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryObject.xml">external</a> documentation.
--spec getQueryObjectuiv(integer(),enum()) -> integer().
+%% @doc
+%% See {@link getQueryObjectiv/2}
+-spec getQueryObjectuiv(Id, Pname) -> integer() when Id :: integer(),Pname :: enum().
getQueryObjectuiv(Id,Pname) ->
call(5429, <<Id:?GLuint,Pname:?GLenum>>).
-%% @spec (Target::enum(),Buffer::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBuffer.xml">external</a> documentation.
--spec bindBuffer(enum(),integer()) -> ok.
+%% @doc Bind a named buffer object
+%%
+%% ``gl:bindBuffer'' binds a buffer object to the specified buffer binding point. Calling ``gl:bindBuffer''
+%% with `Target' set to one of the accepted symbolic constants and `Buffer' set
+%% to the name of a buffer object binds that buffer object name to the target. If no buffer
+%% object with name `Buffer' exists, one is created with that name. When a buffer object
+%% is bound to a target, the previous binding for that target is automatically broken.
+%%
+%% Buffer object names are unsigned integers. The value zero is reserved, but there is no
+%% default buffer object for each buffer object target. Instead, `Buffer' set to zero
+%% effectively unbinds any buffer object previously bound, and restores client memory usage
+%% for that buffer object target (if supported for that target). Buffer object names and
+%% the corresponding buffer object contents are local to the shared object space of the current
+%% GL rendering context; two rendering contexts share buffer object names only if they explicitly
+%% enable sharing between contexts through the appropriate GL windows interfaces functions.
+%%
+%% {@link gl:genBuffers/1} must be used to generate a set of unused buffer object names.
+%%
+%% The state of a buffer object immediately after it is first bound is an unmapped zero-sized
+%% memory buffer with `?GL_READ_WRITE' access and `?GL_STATIC_DRAW' usage.
+%%
+%% While a non-zero buffer object name is bound, GL operations on the target to which it
+%% is bound affect the bound buffer object, and queries of the target to which it is bound
+%% return state from the bound buffer object. While buffer object name zero is bound, as
+%% in the initial state, attempts to modify or query state on the target to which it is bound
+%% generates an `?GL_INVALID_OPERATION' error.
+%%
+%% When a non-zero buffer object is bound to the `?GL_ARRAY_BUFFER' target, the vertex
+%% array pointer parameter is interpreted as an offset within the buffer object measured
+%% in basic machine units.
+%%
+%% When a non-zero buffer object is bound to the `?GL_DRAW_INDIRECT_BUFFER' target,
+%% parameters for draws issued through {@link gl:drawArraysIndirect/2} and {@link gl:drawElementsIndirect/3}
+%% are sourced from that buffer object.
+%%
+%% While a non-zero buffer object is bound to the `?GL_ELEMENT_ARRAY_BUFFER' target,
+%% the indices parameter of {@link gl:drawElements/4} , {@link gl:drawElementsInstanced/5} , {@link gl:drawElementsBaseVertex/5}
+%% , {@link gl:drawRangeElements/6} , {@link gl:drawRangeElementsBaseVertex/7} , see `glMultiDrawElements'
+%% , or see `glMultiDrawElementsBaseVertex' is interpreted as an offset within the
+%% buffer object measured in basic machine units.
+%%
+%% While a non-zero buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target,
+%% the following commands are affected: {@link gl:getCompressedTexImage/3} , {@link gl:getTexImage/5}
+%% , and {@link gl:readPixels/7} . The pointer parameter is interpreted as an offset within
+%% the buffer object measured in basic machine units.
+%%
+%% While a non-zero buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target,
+%% the following commands are affected: {@link gl:compressedTexImage1D/7} , {@link gl:compressedTexImage2D/8}
+%% , {@link gl:compressedTexImage3D/9} , {@link gl:compressedTexSubImage1D/7} , {@link gl:compressedTexSubImage2D/9}
+%% , {@link gl:compressedTexSubImage3D/11} , {@link gl:texImage1D/8} , {@link gl:texImage2D/9} , {@link gl:texImage3D/10}
+%% , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7} , and {@link gl:texSubImage1D/7} .
+%% The pointer parameter is interpreted as an offset within the buffer object measured in
+%% basic machine units.
+%%
+%% The buffer targets `?GL_COPY_READ_BUFFER' and `?GL_COPY_WRITE_BUFFER' are provided
+%% to allow {@link gl:copyBufferSubData/5} to be used without disturbing the state of other
+%% bindings. However, {@link gl:copyBufferSubData/5} may be used with any pair of buffer binding
+%% points.
+%%
+%% The `?GL_TRANSFORM_FEEDBACK_BUFFER' buffer binding point may be passed to ``gl:bindBuffer''
+%% , but will not directly affect transform feedback state. Instead, the indexed `?GL_TRANSFORM_FEEDBACK_BUFFER'
+%% bindings must be used through a call to {@link gl:bindBufferBase/3} or {@link gl:bindBufferRange/5}
+%% . This will affect the generic `?GL_TRANSFORM_FEEDABCK_BUFFER' binding.
+%%
+%% Likewise, the `?GL_UNIFORM_BUFFER' and `?GL_ATOMIC_COUNTER_BUFFER' buffer binding
+%% points may be used, but do not directly affect uniform buffer or atomic counter buffer
+%% state, respectively. {@link gl:bindBufferBase/3} or {@link gl:bindBufferRange/5} must be
+%% used to bind a buffer to an indexed uniform buffer or atomic counter buffer binding point.
+%%
+%%
+%% A buffer object binding created with ``gl:bindBuffer'' remains active until a different
+%% buffer object name is bound to the same target, or until the bound buffer object is deleted
+%% with {@link gl:deleteBuffers/1} .
+%%
+%% Once created, a named buffer object may be re-bound to any target as often as needed.
+%% However, the GL implementation may make choices about how to optimize the storage of a
+%% buffer object based on its initial binding target.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBuffer.xml">external</a> documentation.
+-spec bindBuffer(Target, Buffer) -> ok when Target :: enum(),Buffer :: integer().
bindBuffer(Target,Buffer) ->
cast(5430, <<Target:?GLenum,Buffer:?GLuint>>).
-%% @spec (Buffers::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteBuffers.xml">external</a> documentation.
--spec deleteBuffers([integer()]) -> ok.
+%% @doc Delete named buffer objects
+%%
+%% ``gl:deleteBuffers'' deletes `N' buffer objects named by the elements of the array
+%% `Buffers' . After a buffer object is deleted, it has no contents, and its name is
+%% free for reuse (for example by {@link gl:genBuffers/1} ). If a buffer object that is currently
+%% bound is deleted, the binding reverts to 0 (the absence of any buffer object).
+%%
+%% ``gl:deleteBuffers'' silently ignores 0's and names that do not correspond to existing
+%% buffer objects.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteBuffers.xml">external</a> documentation.
+-spec deleteBuffers(Buffers) -> ok when Buffers :: [integer()].
deleteBuffers(Buffers) ->
cast(5431, <<(length(Buffers)):?GLuint,
(<< <<C:?GLuint>> || C <- Buffers>>)/binary,0:(((1+length(Buffers)) rem 2)*32)>>).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenBuffers.xml">external</a> documentation.
--spec genBuffers(integer()) -> [integer()].
+%% @doc Generate buffer object names
+%%
+%% ``gl:genBuffers'' returns `N' buffer object names in `Buffers' . There is no
+%% guarantee that the names form a contiguous set of integers; however, it is guaranteed
+%% that none of the returned names was in use immediately before the call to ``gl:genBuffers''
+%% .
+%%
+%% Buffer object names returned by a call to ``gl:genBuffers'' are not returned by subsequent
+%% calls, unless they are first deleted with {@link gl:deleteBuffers/1} .
+%%
+%% No buffer objects are associated with the returned buffer object names until they are
+%% first bound by calling {@link gl:bindBuffer/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenBuffers.xml">external</a> documentation.
+-spec genBuffers(N) -> [integer()] when N :: integer().
genBuffers(N) ->
call(5432, <<N:?GLsizei>>).
-%% @spec (Buffer::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsBuffer.xml">external</a> documentation.
--spec isBuffer(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a buffer object
+%%
+%% ``gl:isBuffer'' returns `?GL_TRUE' if `Buffer' is currently the name of a
+%% buffer object. If `Buffer' is zero, or is a non-zero value that is not currently
+%% the name of a buffer object, or if an error occurs, ``gl:isBuffer'' returns `?GL_FALSE'
+%% .
+%%
+%% A name returned by {@link gl:genBuffers/1} , but not yet associated with a buffer object
+%% by calling {@link gl:bindBuffer/2} , is not the name of a buffer object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsBuffer.xml">external</a> documentation.
+-spec isBuffer(Buffer) -> 0|1 when Buffer :: integer().
isBuffer(Buffer) ->
call(5433, <<Buffer:?GLuint>>).
-%% @spec (Target::enum(),Size::integer(),Data::offset()|mem(),Usage::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBufferData.xml">external</a> documentation.
--spec bufferData(enum(),integer(),offset()|mem(),enum()) -> ok.
+%% @doc Creates and initializes a buffer object's data store
+%%
+%% ``gl:bufferData'' creates a new data store for the buffer object currently bound to `Target'
+%% . Any pre-existing data store is deleted. The new data store is created with the specified
+%% `Size' in bytes and `Usage' . If `Data' is not `?NULL', the data store
+%% is initialized with data from this pointer. In its initial state, the new data store
+%% is not mapped, it has a `?NULL' mapped pointer, and its mapped access is `?GL_READ_WRITE'
+%% .
+%%
+%% `Usage' is a hint to the GL implementation as to how a buffer object's data store
+%% will be accessed. This enables the GL implementation to make more intelligent decisions
+%% that may significantly impact buffer object performance. It does not, however, constrain
+%% the actual usage of the data store. `Usage' can be broken down into two parts: first,
+%% the frequency of access (modification and usage), and second, the nature of that access.
+%% The frequency of access may be one of these:
+%%
+%% STREAM: The data store contents will be modified once and used at most a few times.
+%%
+%% STATIC: The data store contents will be modified once and used many times.
+%%
+%% DYNAMIC: The data store contents will be modified repeatedly and used many times.
+%%
+%% The nature of access may be one of these:
+%%
+%% DRAW: The data store contents are modified by the application, and used as the source
+%% for GL drawing and image specification commands.
+%%
+%% READ: The data store contents are modified by reading data from the GL, and used to return
+%% that data when queried by the application.
+%%
+%% COPY: The data store contents are modified by reading data from the GL, and used as the
+%% source for GL drawing and image specification commands.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBufferData.xml">external</a> documentation.
+-spec bufferData(Target, Size, Data, Usage) -> ok when Target :: enum(),Size :: integer(),Data :: offset()|mem(),Usage :: enum().
bufferData(Target,Size,Data,Usage) when is_integer(Data) ->
cast(5434, <<Target:?GLenum,0:32,Size:?GLsizeiptr,Data:?GLuint,Usage:?GLenum>>);
bufferData(Target,Size,Data,Usage) ->
send_bin(Data),
cast(5435, <<Target:?GLenum,0:32,Size:?GLsizeiptr,Usage:?GLenum>>).
-%% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBufferSubData.xml">external</a> documentation.
--spec bufferSubData(enum(),integer(),integer(),offset()|mem()) -> ok.
+%% @doc Updates a subset of a buffer object's data store
+%%
+%% ``gl:bufferSubData'' redefines some or all of the data store for the buffer object currently
+%% bound to `Target' . Data starting at byte offset `Offset' and extending for `Size'
+%% bytes is copied to the data store from the memory pointed to by `Data' . An error
+%% is thrown if `Offset' and `Size' together define a range beyond the bounds of
+%% the buffer object's data store.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBufferSubData.xml">external</a> documentation.
+-spec bufferSubData(Target, Offset, Size, Data) -> ok when Target :: enum(),Offset :: integer(),Size :: integer(),Data :: offset()|mem().
bufferSubData(Target,Offset,Size,Data) when is_integer(Data) ->
cast(5436, <<Target:?GLenum,0:32,Offset:?GLintptr,Size:?GLsizeiptr,Data:?GLuint>>);
bufferSubData(Target,Offset,Size,Data) ->
send_bin(Data),
cast(5437, <<Target:?GLenum,0:32,Offset:?GLintptr,Size:?GLsizeiptr>>).
-%% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferSubData.xml">external</a> documentation.
--spec getBufferSubData(enum(),integer(),integer(),mem()) -> ok.
+%% @doc Returns a subset of a buffer object's data store
+%%
+%% ``gl:getBufferSubData'' returns some or all of the data from the buffer object currently
+%% bound to `Target' . Data starting at byte offset `Offset' and extending for `Size'
+%% bytes is copied from the data store to the memory pointed to by `Data' . An error
+%% is thrown if the buffer object is currently mapped, or if `Offset' and `Size'
+%% together define a range beyond the bounds of the buffer object's data store.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferSubData.xml">external</a> documentation.
+-spec getBufferSubData(Target, Offset, Size, Data) -> ok when Target :: enum(),Offset :: integer(),Size :: integer(),Data :: mem().
getBufferSubData(Target,Offset,Size,Data) ->
send_bin(Data),
call(5438, <<Target:?GLenum,0:32,Offset:?GLintptr,Size:?GLsizeiptr>>).
-%% @spec (Target::enum(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferParameteriv.xml">external</a> documentation.
--spec getBufferParameteriv(enum(),enum()) -> integer().
+%% @doc Return parameters of a buffer object
+%%
+%% ``gl:getBufferParameteriv'' returns in `Data' a selected parameter of the buffer
+%% object specified by `Target' .
+%%
+%% `Value' names a specific buffer object parameter, as follows:
+%%
+%% `?GL_BUFFER_ACCESS': `Params' returns the access policy set while mapping the
+%% buffer object. The initial value is `?GL_READ_WRITE'.
+%%
+%% `?GL_BUFFER_MAPPED': `Params' returns a flag indicating whether the buffer object
+%% is currently mapped. The initial value is `?GL_FALSE'.
+%%
+%% `?GL_BUFFER_SIZE': `Params' returns the size of the buffer object, measured
+%% in bytes. The initial value is 0.
+%%
+%% `?GL_BUFFER_USAGE': `Params' returns the buffer object's usage pattern. The
+%% initial value is `?GL_STATIC_DRAW'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferParameteriv.xml">external</a> documentation.
+-spec getBufferParameteriv(Target, Pname) -> integer() when Target :: enum(),Pname :: enum().
getBufferParameteriv(Target,Pname) ->
call(5439, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (ModeRGB::enum(),ModeAlpha::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquationSeparate.xml">external</a> documentation.
--spec blendEquationSeparate(enum(),enum()) -> ok.
+%% @doc Set the RGB blend equation and the alpha blend equation separately
+%%
+%% The blend equations determines how a new pixel (the ''source'' color) is combined with
+%% a pixel already in the framebuffer (the ''destination'' color). These functions specifie
+%% one blend equation for the RGB-color components and one blend equation for the alpha
+%% component. ``gl:blendEquationSeparatei'' specifies the blend equations for a single
+%% draw buffer whereas ``gl:blendEquationSeparate'' sets the blend equations for all draw
+%% buffers.
+%%
+%% The blend equations use the source and destination blend factors specified by either {@link gl:blendFunc/2}
+%% or {@link gl:blendFuncSeparate/4} . See {@link gl:blendFunc/2} or {@link gl:blendFuncSeparate/4}
+%% for a description of the various blend factors.
+%%
+%% In the equations that follow, source and destination color components are referred to
+%% as (R s G s B s A s) and (R d G d B d A d), respectively. The result color is referred to as (R r G r B r A r). The source and destination
+%% blend factors are denoted (s R s G s B s A) and (d R d G d B d A), respectively. For these equations all color components
+%% are understood to have values in the range [0 1]. <table><tbody><tr><td>` Mode '</td><td>
+%% ` RGB Components '</td><td>` Alpha Component '</td></tr></tbody><tbody><tr><td>`?GL_FUNC_ADD'
+%% </td><td> Rr= R s s R+R d d R Gr= G s s G+G d d G Br= B s s B+B d d B</td><td> Ar=
+%% A s s A+A d d A</td></tr><tr><td>`?GL_FUNC_SUBTRACT'</td><td> Rr= R s s R-R d d
+%% R Gr= G s s G-G d d G Br= B s s B-B d d B</td><td> Ar= A s s A-A d d A</td></tr><tr>
+%% <td>`?GL_FUNC_REVERSE_SUBTRACT'</td><td> Rr= R d d R-R s s R Gr= G d d G-G s s G
+%% Br= B d d B-B s s B</td><td> Ar= A d d A-A s s A</td></tr><tr><td>`?GL_MIN'</td><td>
+%% Rr= min(R s R d) Gr= min(G s G d) Br= min(B s B d)</td><td> Ar= min(A s A d)</td></tr><tr><td>`?GL_MAX'</td><td> Rr=
+%% max(R s R d) Gr= max(G s G d) Br= max(B s B d)</td><td> Ar= max(A s A d)</td></tr></tbody></table>
+%%
+%% The results of these equations are clamped to the range [0 1].
+%%
+%% The `?GL_MIN' and `?GL_MAX' equations are useful for applications that analyze
+%% image data (image thresholding against a constant color, for example). The `?GL_FUNC_ADD'
+%% equation is useful for antialiasing and transparency, among other things.
+%%
+%% Initially, both the RGB blend equation and the alpha blend equation are set to `?GL_FUNC_ADD'
+%% .
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquationSeparate.xml">external</a> documentation.
+-spec blendEquationSeparate(ModeRGB, ModeAlpha) -> ok when ModeRGB :: enum(),ModeAlpha :: enum().
blendEquationSeparate(ModeRGB,ModeAlpha) ->
cast(5440, <<ModeRGB:?GLenum,ModeAlpha:?GLenum>>).
-%% @spec (Bufs::[enum()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffers.xml">external</a> documentation.
--spec drawBuffers([enum()]) -> ok.
+%% @doc Specifies a list of color buffers to be drawn into
+%%
+%% ``gl:drawBuffers'' defines an array of buffers into which outputs from the fragment
+%% shader data will be written. If a fragment shader writes a value to one or more user defined
+%% output variables, then the value of each variable will be written into the buffer specified
+%% at a location within `Bufs' corresponding to the location assigned to that user defined
+%% output. The draw buffer used for user defined outputs assigned to locations greater than
+%% or equal to `N' is implicitly set to `?GL_NONE' and any data written to such
+%% an output is discarded.
+%%
+%% The symbolic constants contained in `Bufs' may be any of the following:
+%%
+%% `?GL_NONE': The fragment shader output value is not written into any color buffer.
+%%
+%% `?GL_FRONT_LEFT': The fragment shader output value is written into the front left
+%% color buffer.
+%%
+%% `?GL_FRONT_RIGHT': The fragment shader output value is written into the front right
+%% color buffer.
+%%
+%% `?GL_BACK_LEFT': The fragment shader output value is written into the back left color
+%% buffer.
+%%
+%% `?GL_BACK_RIGHT': The fragment shader output value is written into the back right
+%% color buffer.
+%%
+%% `?GL_COLOR_ATTACHMENT'`n': The fragment shader output value is written into
+%% the `n'th color attachment of the current framebuffer. `n' may range from 0
+%% to the value of `?GL_MAX_COLOR_ATTACHMENTS'.
+%%
+%% Except for `?GL_NONE', the preceding symbolic constants may not appear more than
+%% once in `Bufs' . The maximum number of draw buffers supported is implementation dependent
+%% and can be queried by calling {@link gl:getBooleanv/1} with the argument `?GL_MAX_DRAW_BUFFERS'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffers.xml">external</a> documentation.
+-spec drawBuffers(Bufs) -> ok when Bufs :: [enum()].
drawBuffers(Bufs) ->
cast(5441, <<(length(Bufs)):?GLuint,
(<< <<C:?GLenum>> || C <- Bufs>>)/binary,0:(((1+length(Bufs)) rem 2)*32)>>).
-%% @spec (Face::enum(),Sfail::enum(),Dpfail::enum(),Dppass::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilOpSeparate.xml">external</a> documentation.
--spec stencilOpSeparate(enum(),enum(),enum(),enum()) -> ok.
+%% @doc Set front and/or back stencil test actions
+%%
+%% Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis.
+%% You draw into the stencil planes using GL drawing primitives, then render geometry and
+%% images, using the stencil planes to mask out portions of the screen. Stenciling is typically
+%% used in multipass rendering algorithms to achieve special effects, such as decals, outlining,
+%% and constructive solid geometry rendering.
+%%
+%% The stencil test conditionally eliminates a pixel based on the outcome of a comparison
+%% between the value in the stencil buffer and a reference value. To enable and disable the
+%% test, call {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_STENCIL_TEST'
+%% ; to control it, call {@link gl:stencilFunc/3} or {@link gl:stencilFuncSeparate/4} .
+%%
+%% There can be two separate sets of `Sfail' , `Dpfail' , and `Dppass' parameters;
+%% one affects back-facing polygons, and the other affects front-facing polygons as well
+%% as other non-polygon primitives. {@link gl:stencilOp/3} sets both front and back stencil
+%% state to the same values, as if {@link gl:stencilOpSeparate/4} were called with `Face'
+%% set to `?GL_FRONT_AND_BACK'.
+%%
+%% ``gl:stencilOpSeparate'' takes three arguments that indicate what happens to the stored
+%% stencil value while stenciling is enabled. If the stencil test fails, no change is made
+%% to the pixel's color or depth buffers, and `Sfail' specifies what happens to the
+%% stencil buffer contents. The following eight actions are possible.
+%%
+%% `?GL_KEEP': Keeps the current value.
+%%
+%% `?GL_ZERO': Sets the stencil buffer value to 0.
+%%
+%% `?GL_REPLACE': Sets the stencil buffer value to `ref', as specified by {@link gl:stencilFunc/3}
+%% .
+%%
+%% `?GL_INCR': Increments the current stencil buffer value. Clamps to the maximum representable
+%% unsigned value.
+%%
+%% `?GL_INCR_WRAP': Increments the current stencil buffer value. Wraps stencil buffer
+%% value to zero when incrementing the maximum representable unsigned value.
+%%
+%% `?GL_DECR': Decrements the current stencil buffer value. Clamps to 0.
+%%
+%% `?GL_DECR_WRAP': Decrements the current stencil buffer value. Wraps stencil buffer
+%% value to the maximum representable unsigned value when decrementing a stencil buffer value
+%% of zero.
+%%
+%% `?GL_INVERT': Bitwise inverts the current stencil buffer value.
+%%
+%% Stencil buffer values are treated as unsigned integers. When incremented and decremented,
+%% values are clamped to 0 and 2 n-1, where n is the value returned by querying `?GL_STENCIL_BITS'
+%% .
+%%
+%% The other two arguments to ``gl:stencilOpSeparate'' specify stencil buffer actions
+%% that depend on whether subsequent depth buffer tests succeed ( `Dppass' ) or fail ( `Dpfail'
+%% ) (see {@link gl:depthFunc/1} ). The actions are specified using the same eight symbolic
+%% constants as `Sfail' . Note that `Dpfail' is ignored when there is no depth buffer,
+%% or when the depth buffer is not enabled. In these cases, `Sfail' and `Dppass'
+%% specify stencil action when the stencil test fails and passes, respectively.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilOpSeparate.xml">external</a> documentation.
+-spec stencilOpSeparate(Face, Sfail, Dpfail, Dppass) -> ok when Face :: enum(),Sfail :: enum(),Dpfail :: enum(),Dppass :: enum().
stencilOpSeparate(Face,Sfail,Dpfail,Dppass) ->
cast(5442, <<Face:?GLenum,Sfail:?GLenum,Dpfail:?GLenum,Dppass:?GLenum>>).
-%% @spec (Face::enum(),Func::enum(),Ref::integer(),Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilFuncSeparate.xml">external</a> documentation.
--spec stencilFuncSeparate(enum(),enum(),integer(),integer()) -> ok.
+%% @doc Set front and/or back function and reference value for stencil testing
+%%
+%% Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis.
+%% You draw into the stencil planes using GL drawing primitives, then render geometry and
+%% images, using the stencil planes to mask out portions of the screen. Stenciling is typically
+%% used in multipass rendering algorithms to achieve special effects, such as decals, outlining,
+%% and constructive solid geometry rendering.
+%%
+%% The stencil test conditionally eliminates a pixel based on the outcome of a comparison
+%% between the reference value and the value in the stencil buffer. To enable and disable
+%% the test, call {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_STENCIL_TEST'
+%% . To specify actions based on the outcome of the stencil test, call {@link gl:stencilOp/3}
+%% or {@link gl:stencilOpSeparate/4} .
+%%
+%% There can be two separate sets of `Func' , `Ref' , and `Mask' parameters;
+%% one affects back-facing polygons, and the other affects front-facing polygons as well
+%% as other non-polygon primitives. {@link gl:stencilFunc/3} sets both front and back stencil
+%% state to the same values, as if {@link gl:stencilFuncSeparate/4} were called with `Face'
+%% set to `?GL_FRONT_AND_BACK'.
+%%
+%% `Func' is a symbolic constant that determines the stencil comparison function. It
+%% accepts one of eight values, shown in the following list. `Ref' is an integer reference
+%% value that is used in the stencil comparison. It is clamped to the range [0 2 n-1], where n
+%% is the number of bitplanes in the stencil buffer. `Mask' is bitwise ANDed with both
+%% the reference value and the stored stencil value, with the ANDed values participating
+%% in the comparison.
+%%
+%% If `stencil' represents the value stored in the corresponding stencil buffer location,
+%% the following list shows the effect of each comparison function that can be specified by `Func'
+%% . Only if the comparison succeeds is the pixel passed through to the next stage in the
+%% rasterization process (see {@link gl:stencilOp/3} ). All tests treat `stencil' values
+%% as unsigned integers in the range [0 2 n-1], where n is the number of bitplanes in the stencil
+%% buffer.
+%%
+%% The following values are accepted by `Func' :
+%%
+%% `?GL_NEVER': Always fails.
+%%
+%% `?GL_LESS': Passes if ( `Ref' &amp; `Mask' ) &lt; ( `stencil' &amp; `Mask'
+%% ).
+%%
+%% `?GL_LEQUAL': Passes if ( `Ref' &amp; `Mask' ) &lt;= ( `stencil'
+%% &amp; `Mask' ).
+%%
+%% `?GL_GREATER': Passes if ( `Ref' &amp; `Mask' ) &gt; ( `stencil'
+%% &amp; `Mask' ).
+%%
+%% `?GL_GEQUAL': Passes if ( `Ref' &amp; `Mask' ) &gt;= ( `stencil'
+%% &amp; `Mask' ).
+%%
+%% `?GL_EQUAL': Passes if ( `Ref' &amp; `Mask' ) = ( `stencil' &amp; `Mask'
+%% ).
+%%
+%% `?GL_NOTEQUAL': Passes if ( `Ref' &amp; `Mask' ) != ( `stencil' &amp;
+%% `Mask' ).
+%%
+%% `?GL_ALWAYS': Always passes.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilFuncSeparate.xml">external</a> documentation.
+-spec stencilFuncSeparate(Face, Func, Ref, Mask) -> ok when Face :: enum(),Func :: enum(),Ref :: integer(),Mask :: integer().
stencilFuncSeparate(Face,Func,Ref,Mask) ->
cast(5443, <<Face:?GLenum,Func:?GLenum,Ref:?GLint,Mask:?GLuint>>).
-%% @spec (Face::enum(),Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilMaskSeparate.xml">external</a> documentation.
--spec stencilMaskSeparate(enum(),integer()) -> ok.
+%% @doc Control the front and/or back writing of individual bits in the stencil planes
+%%
+%% ``gl:stencilMaskSeparate'' controls the writing of individual bits in the stencil planes.
+%% The least significant n bits of `Mask' , where n is the number of bits in the
+%% stencil buffer, specify a mask. Where a 1 appears in the mask, it's possible to write
+%% to the corresponding bit in the stencil buffer. Where a 0 appears, the corresponding bit
+%% is write-protected. Initially, all bits are enabled for writing.
+%%
+%% There can be two separate `Mask' writemasks; one affects back-facing polygons, and
+%% the other affects front-facing polygons as well as other non-polygon primitives. {@link gl:stencilMask/1}
+%% sets both front and back stencil writemasks to the same values, as if {@link gl:stencilMaskSeparate/2}
+%% were called with `Face' set to `?GL_FRONT_AND_BACK'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilMaskSeparate.xml">external</a> documentation.
+-spec stencilMaskSeparate(Face, Mask) -> ok when Face :: enum(),Mask :: integer().
stencilMaskSeparate(Face,Mask) ->
cast(5444, <<Face:?GLenum,Mask:?GLuint>>).
-%% @spec (Program::integer(),Shader::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAttachShader.xml">external</a> documentation.
--spec attachShader(integer(),integer()) -> ok.
+%% @doc Attaches a shader object to a program object
+%%
+%% In order to create a complete shader program, there must be a way to specify the list
+%% of things that will be linked together. Program objects provide this mechanism. Shaders
+%% that are to be linked together in a program object must first be attached to that program
+%% object. ``gl:attachShader'' attaches the shader object specified by `Shader' to
+%% the program object specified by `Program' . This indicates that `Shader' will
+%% be included in link operations that will be performed on `Program' .
+%%
+%% All operations that can be performed on a shader object are valid whether or not the
+%% shader object is attached to a program object. It is permissible to attach a shader object
+%% to a program object before source code has been loaded into the shader object or before
+%% the shader object has been compiled. It is permissible to attach multiple shader objects
+%% of the same type because each may contain a portion of the complete shader. It is also
+%% permissible to attach a shader object to more than one program object. If a shader object
+%% is deleted while it is attached to a program object, it will be flagged for deletion,
+%% and deletion will not occur until {@link gl:detachShader/2} is called to detach it from
+%% all program objects to which it is attached.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAttachShader.xml">external</a> documentation.
+-spec attachShader(Program, Shader) -> ok when Program :: integer(),Shader :: integer().
attachShader(Program,Shader) ->
cast(5445, <<Program:?GLuint,Shader:?GLuint>>).
-%% @spec (Program::integer(),Index::integer(),Name::string()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindAttribLocation.xml">external</a> documentation.
--spec bindAttribLocation(integer(),integer(),string()) -> ok.
+%% @doc Associates a generic vertex attribute index with a named attribute variable
+%%
+%% ``gl:bindAttribLocation'' is used to associate a user-defined attribute variable in
+%% the program object specified by `Program' with a generic vertex attribute index.
+%% The name of the user-defined attribute variable is passed as a null terminated string in `Name'
+%% . The generic vertex attribute index to be bound to this variable is specified by `Index'
+%% . When `Program' is made part of current state, values provided via the generic vertex
+%% attribute `Index' will modify the value of the user-defined attribute variable specified
+%% by `Name' .
+%%
+%% If `Name' refers to a matrix attribute variable, `Index' refers to the first
+%% column of the matrix. Other matrix columns are then automatically bound to locations `Index+1'
+%% for a matrix of type `mat2'; `Index+1' and `Index+2' for a matrix of type
+%% `mat3'; and `Index+1' , `Index+2' , and `Index+3' for a matrix of type `mat4'
+%% .
+%%
+%% This command makes it possible for vertex shaders to use descriptive names for attribute
+%% variables rather than generic variables that are numbered from 0 to `?GL_MAX_VERTEX_ATTRIBS'
+%% -1. The values sent to each generic attribute index are part of current state. If a different
+%% program object is made current by calling {@link gl:useProgram/1} , the generic vertex attributes
+%% are tracked in such a way that the same values will be observed by attributes in the new
+%% program object that are also bound to `Index' .
+%%
+%% Attribute variable name-to-generic attribute index bindings for a program object can be
+%% explicitly assigned at any time by calling ``gl:bindAttribLocation''. Attribute bindings
+%% do not go into effect until {@link gl:linkProgram/1} is called. After a program object
+%% has been linked successfully, the index values for generic attributes remain fixed (and
+%% their values can be queried) until the next link command occurs.
+%%
+%% Any attribute binding that occurs after the program object has been linked will not take
+%% effect until the next time the program object is linked.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindAttribLocation.xml">external</a> documentation.
+-spec bindAttribLocation(Program, Index, Name) -> ok when Program :: integer(),Index :: integer(),Name :: string().
bindAttribLocation(Program,Index,Name) ->
cast(5446, <<Program:?GLuint,Index:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
-%% @spec (Shader::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShader.xml">external</a> documentation.
--spec compileShader(integer()) -> ok.
+%% @doc Compiles a shader object
+%%
+%% ``gl:compileShader'' compiles the source code strings that have been stored in the shader
+%% object specified by `Shader' .
+%%
+%% The compilation status will be stored as part of the shader object's state. This value
+%% will be set to `?GL_TRUE' if the shader was compiled without errors and is ready
+%% for use, and `?GL_FALSE' otherwise. It can be queried by calling {@link gl:getShaderiv/2}
+%% with arguments `Shader' and `?GL_COMPILE_STATUS'.
+%%
+%% Compilation of a shader can fail for a number of reasons as specified by the OpenGL Shading
+%% Language Specification. Whether or not the compilation was successful, information about
+%% the compilation can be obtained from the shader object's information log by calling {@link gl:getShaderInfoLog/2}
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShader.xml">external</a> documentation.
+-spec compileShader(Shader) -> ok when Shader :: integer().
compileShader(Shader) ->
cast(5447, <<Shader:?GLuint>>).
-%% @spec () -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateProgram.xml">external</a> documentation.
+%% @doc Creates a program object
+%%
+%% ``gl:createProgram'' creates an empty program object and returns a non-zero value by
+%% which it can be referenced. A program object is an object to which shader objects can
+%% be attached. This provides a mechanism to specify the shader objects that will be linked
+%% to create a program. It also provides a means for checking the compatibility of the
+%% shaders that will be used to create a program (for instance, checking the compatibility
+%% between a vertex shader and a fragment shader). When no longer needed as part of a program
+%% object, shader objects can be detached.
+%%
+%% One or more executables are created in a program object by successfully attaching shader
+%% objects to it with {@link gl:attachShader/2} , successfully compiling the shader objects
+%% with {@link gl:compileShader/1} , and successfully linking the program object with {@link gl:linkProgram/1}
+%% . These executables are made part of current state when {@link gl:useProgram/1} is called.
+%% Program objects can be deleted by calling {@link gl:deleteProgram/1} . The memory associated
+%% with the program object will be deleted when it is no longer part of current rendering
+%% state for any context.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateProgram.xml">external</a> documentation.
-spec createProgram() -> integer().
createProgram() ->
call(5448, <<>>).
-%% @spec (Type::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateShader.xml">external</a> documentation.
--spec createShader(enum()) -> integer().
+%% @doc Creates a shader object
+%%
+%% ``gl:createShader'' creates an empty shader object and returns a non-zero value by
+%% which it can be referenced. A shader object is used to maintain the source code strings
+%% that define a shader. `ShaderType' indicates the type of shader to be created. Five
+%% types of shader are supported. A shader of type `?GL_VERTEX_SHADER' is a shader
+%% that is intended to run on the programmable vertex processor. A shader of type `?GL_TESS_CONTROL_SHADER'
+%% is a shader that is intended to run on the programmable tessellation processor in the
+%% control stage. A shader of type `?GL_TESS_EVALUATION_SHADER' is a shader that is
+%% intended to run on the programmable tessellation processor in the evaluation stage. A
+%% shader of type `?GL_GEOMETRY_SHADER' is a shader that is intended to run on the
+%% programmable geometry processor. A shader of type `?GL_FRAGMENT_SHADER' is a shader
+%% that is intended to run on the programmable fragment processor.
+%%
+%% When created, a shader object's `?GL_SHADER_TYPE' parameter is set to either `?GL_VERTEX_SHADER'
+%% , `?GL_TESS_CONTROL_SHADER', `?GL_TESS_EVALUATION_SHADER', `?GL_GEOMETRY_SHADER'
+%% or `?GL_FRAGMENT_SHADER', depending on the value of `ShaderType' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateShader.xml">external</a> documentation.
+-spec createShader(Type) -> integer() when Type :: enum().
createShader(Type) ->
call(5449, <<Type:?GLenum>>).
-%% @spec (Program::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgram.xml">external</a> documentation.
--spec deleteProgram(integer()) -> ok.
+%% @doc Deletes a program object
+%%
+%% ``gl:deleteProgram'' frees the memory and invalidates the name associated with the program
+%% object specified by `Program.' This command effectively undoes the effects of a call
+%% to {@link gl:createProgram/0} .
+%%
+%% If a program object is in use as part of current rendering state, it will be flagged for
+%% deletion, but it will not be deleted until it is no longer part of current state for any
+%% rendering context. If a program object to be deleted has shader objects attached to it,
+%% those shader objects will be automatically detached but not deleted unless they have already
+%% been flagged for deletion by a previous call to {@link gl:deleteShader/1} . A value of 0
+%% for `Program' will be silently ignored.
+%%
+%% To determine whether a program object has been flagged for deletion, call {@link gl:getProgramiv/2}
+%% with arguments `Program' and `?GL_DELETE_STATUS'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgram.xml">external</a> documentation.
+-spec deleteProgram(Program) -> ok when Program :: integer().
deleteProgram(Program) ->
cast(5450, <<Program:?GLuint>>).
-%% @spec (Shader::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteShader.xml">external</a> documentation.
--spec deleteShader(integer()) -> ok.
+%% @doc Deletes a shader object
+%%
+%% ``gl:deleteShader'' frees the memory and invalidates the name associated with the shader
+%% object specified by `Shader' . This command effectively undoes the effects of a call
+%% to {@link gl:createShader/1} .
+%%
+%% If a shader object to be deleted is attached to a program object, it will be flagged for
+%% deletion, but it will not be deleted until it is no longer attached to any program object,
+%% for any rendering context (i.e., it must be detached from wherever it was attached before
+%% it will be deleted). A value of 0 for `Shader' will be silently ignored.
+%%
+%% To determine whether an object has been flagged for deletion, call {@link gl:getShaderiv/2}
+%% with arguments `Shader' and `?GL_DELETE_STATUS'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteShader.xml">external</a> documentation.
+-spec deleteShader(Shader) -> ok when Shader :: integer().
deleteShader(Shader) ->
cast(5451, <<Shader:?GLuint>>).
-%% @spec (Program::integer(),Shader::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDetachShader.xml">external</a> documentation.
--spec detachShader(integer(),integer()) -> ok.
+%% @doc Detaches a shader object from a program object to which it is attached
+%%
+%% ``gl:detachShader'' detaches the shader object specified by `Shader' from the program
+%% object specified by `Program' . This command can be used to undo the effect of the
+%% command {@link gl:attachShader/2} .
+%%
+%% If `Shader' has already been flagged for deletion by a call to {@link gl:deleteShader/1}
+%% and it is not attached to any other program object, it will be deleted after it has been
+%% detached.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDetachShader.xml">external</a> documentation.
+-spec detachShader(Program, Shader) -> ok when Program :: integer(),Shader :: integer().
detachShader(Program,Shader) ->
cast(5452, <<Program:?GLuint,Shader:?GLuint>>).
-%% @spec (Index::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDisableVertexAttribArray.xml">external</a> documentation.
--spec disableVertexAttribArray(integer()) -> ok.
+%% @doc Enable or disable a generic vertex attribute array
+%%
+%% ``gl:enableVertexAttribArray'' enables the generic vertex attribute array specified by `Index'
+%% . ``gl:disableVertexAttribArray'' disables the generic vertex attribute array specified
+%% by `Index' . By default, all client-side capabilities are disabled, including all
+%% generic vertex attribute arrays. If enabled, the values in the generic vertex attribute
+%% array will be accessed and used for rendering when calls are made to vertex array commands
+%% such as {@link gl:drawArrays/3} , {@link gl:drawElements/4} , {@link gl:drawRangeElements/6} , see `glMultiDrawElements'
+%% , or {@link gl:multiDrawArrays/3} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnableVertexAttribArray.xml">external</a> documentation.
+-spec disableVertexAttribArray(Index) -> ok when Index :: integer().
disableVertexAttribArray(Index) ->
cast(5453, <<Index:?GLuint>>).
-%% @spec (Index::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnableVertexAttribArray.xml">external</a> documentation.
--spec enableVertexAttribArray(integer()) -> ok.
+%% @doc
+%% See {@link disableVertexAttribArray/1}
+-spec enableVertexAttribArray(Index) -> ok when Index :: integer().
enableVertexAttribArray(Index) ->
cast(5454, <<Index:?GLuint>>).
-%% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveAttrib.xml">external</a> documentation.
--spec getActiveAttrib(integer(),integer(),integer()) -> {integer(),enum(),string()}.
+%% @doc Returns information about an active attribute variable for the specified program object
+%%
+%% ``gl:getActiveAttrib'' returns information about an active attribute variable in the
+%% program object specified by `Program' . The number of active attributes can be obtained
+%% by calling {@link gl:getProgramiv/2} with the value `?GL_ACTIVE_ATTRIBUTES'. A value
+%% of 0 for `Index' selects the first active attribute variable. Permissible values
+%% for `Index' range from 0 to the number of active attribute variables minus 1.
+%%
+%% A vertex shader may use either built-in attribute variables, user-defined attribute variables,
+%% or both. Built-in attribute variables have a prefix of "gl_" and reference conventional
+%% OpenGL vertex attribtes (e.g., `Gl_Vertex' , `Gl_Normal' , etc., see the OpenGL
+%% Shading Language specification for a complete list.) User-defined attribute variables
+%% have arbitrary names and obtain their values through numbered generic vertex attributes.
+%% An attribute variable (either built-in or user-defined) is considered active if it is
+%% determined during the link operation that it may be accessed during program execution.
+%% Therefore, `Program' should have previously been the target of a call to {@link gl:linkProgram/1}
+%% , but it is not necessary for it to have been linked successfully.
+%%
+%% The size of the character buffer required to store the longest attribute variable name
+%% in `Program' can be obtained by calling {@link gl:getProgramiv/2} with the value `?GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'
+%% . This value should be used to allocate a buffer of sufficient size to store the returned
+%% attribute name. The size of this character buffer is passed in `BufSize' , and a pointer
+%% to this character buffer is passed in `Name' .
+%%
+%% ``gl:getActiveAttrib'' returns the name of the attribute variable indicated by `Index'
+%% , storing it in the character buffer specified by `Name' . The string returned will
+%% be null terminated. The actual number of characters written into this buffer is returned
+%% in `Length' , and this count does not include the null termination character. If the
+%% length of the returned string is not required, a value of `?NULL' can be passed in
+%% the `Length' argument.
+%%
+%% The `Type' argument specifies a pointer to a variable into which the attribute variable's
+%% data type will be written. The symbolic constants `?GL_FLOAT', `?GL_FLOAT_VEC2',
+%% `?GL_FLOAT_VEC3', `?GL_FLOAT_VEC4', `?GL_FLOAT_MAT2', `?GL_FLOAT_MAT3',
+%% `?GL_FLOAT_MAT4', `?GL_FLOAT_MAT2x3', `?GL_FLOAT_MAT2x4', `?GL_FLOAT_MAT3x2'
+%% , `?GL_FLOAT_MAT3x4', `?GL_FLOAT_MAT4x2', `?GL_FLOAT_MAT4x3', `?GL_INT'
+%% , `?GL_INT_VEC2', `?GL_INT_VEC3', `?GL_INT_VEC4', `?GL_UNSIGNED_INT_VEC'
+%% , `?GL_UNSIGNED_INT_VEC2', `?GL_UNSIGNED_INT_VEC3', `?GL_UNSIGNED_INT_VEC4',
+%% `?DOUBLE', `?DOUBLE_VEC2', `?DOUBLE_VEC3', `?DOUBLE_VEC4', `?DOUBLE_MAT2'
+%% , `?DOUBLE_MAT3', `?DOUBLE_MAT4', `?DOUBLE_MAT2x3', `?DOUBLE_MAT2x4',
+%% `?DOUBLE_MAT3x2', `?DOUBLE_MAT3x4', `?DOUBLE_MAT4x2', or `?DOUBLE_MAT4x3'
+%% may be returned. The `Size' argument will return the size of the attribute, in units
+%% of the type returned in `Type' .
+%%
+%% The list of active attribute variables may include both built-in attribute variables (which
+%% begin with the prefix "gl_") as well as user-defined attribute variable names.
+%%
+%% This function will return as much information as it can about the specified active attribute
+%% variable. If no information is available, `Length' will be 0, and `Name' will
+%% be an empty string. This situation could occur if this function is called after a link
+%% operation that failed. If an error occurs, the return values `Length' , `Size' , `Type'
+%% , and `Name' will be unmodified.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveAttrib.xml">external</a> documentation.
+-spec getActiveAttrib(Program, Index, BufSize) -> {Size :: integer(),Type :: enum(),Name :: string()} when Program :: integer(),Index :: integer(),BufSize :: integer().
getActiveAttrib(Program,Index,BufSize) ->
call(5455, <<Program:?GLuint,Index:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniform.xml">external</a> documentation.
--spec getActiveUniform(integer(),integer(),integer()) -> {integer(),enum(),string()}.
+%% @doc Returns information about an active uniform variable for the specified program object
+%%
+%% ``gl:getActiveUniform'' returns information about an active uniform variable in the
+%% program object specified by `Program' . The number of active uniform variables can
+%% be obtained by calling {@link gl:getProgramiv/2} with the value `?GL_ACTIVE_UNIFORMS'.
+%% A value of 0 for `Index' selects the first active uniform variable. Permissible values
+%% for `Index' range from 0 to the number of active uniform variables minus 1.
+%%
+%% Shaders may use either built-in uniform variables, user-defined uniform variables, or
+%% both. Built-in uniform variables have a prefix of "gl_" and reference existing OpenGL
+%% state or values derived from such state (e.g., `Gl_DepthRangeParameters' , see the
+%% OpenGL Shading Language specification for a complete list.) User-defined uniform variables
+%% have arbitrary names and obtain their values from the application through calls to {@link gl:uniform1f/2}
+%% . A uniform variable (either built-in or user-defined) is considered active if it is determined
+%% during the link operation that it may be accessed during program execution. Therefore, `Program'
+%% should have previously been the target of a call to {@link gl:linkProgram/1} , but it is
+%% not necessary for it to have been linked successfully.
+%%
+%% The size of the character buffer required to store the longest uniform variable name in `Program'
+%% can be obtained by calling {@link gl:getProgramiv/2} with the value `?GL_ACTIVE_UNIFORM_MAX_LENGTH'
+%% . This value should be used to allocate a buffer of sufficient size to store the returned
+%% uniform variable name. The size of this character buffer is passed in `BufSize' ,
+%% and a pointer to this character buffer is passed in `Name.'
+%%
+%% ``gl:getActiveUniform'' returns the name of the uniform variable indicated by `Index'
+%% , storing it in the character buffer specified by `Name' . The string returned will
+%% be null terminated. The actual number of characters written into this buffer is returned
+%% in `Length' , and this count does not include the null termination character. If the
+%% length of the returned string is not required, a value of `?NULL' can be passed in
+%% the `Length' argument.
+%%
+%% The `Type' argument will return a pointer to the uniform variable's data type. The
+%% symbolic constants returned for uniform types are shown in the table below. <table><tbody>
+%% <tr><td>` Returned Symbolic Contant '</td><td>` Shader Uniform Type '</td></tr></tbody>
+%% <tbody><tr><td>`?GL_FLOAT'</td><td>`?float'</td></tr><tr><td>`?GL_FLOAT_VEC2'
+%% </td><td>`?vec2'</td></tr><tr><td>`?GL_FLOAT_VEC3'</td><td>`?vec3'</td></tr>
+%% <tr><td>`?GL_FLOAT_VEC4'</td><td>`?vec4'</td></tr><tr><td>`?GL_DOUBLE'</td>
+%% <td>`?double'</td></tr><tr><td>`?GL_DOUBLE_VEC2'</td><td>`?dvec2'</td></tr>
+%% <tr><td>`?GL_DOUBLE_VEC3'</td><td>`?dvec3'</td></tr><tr><td>`?GL_DOUBLE_VEC4'
+%% </td><td>`?dvec4'</td></tr><tr><td>`?GL_INT'</td><td>`?int'</td></tr><tr><td>
+%% `?GL_INT_VEC2'</td><td>`?ivec2'</td></tr><tr><td>`?GL_INT_VEC3'</td><td>`?ivec3'
+%% </td></tr><tr><td>`?GL_INT_VEC4'</td><td>`?ivec4'</td></tr><tr><td>`?GL_UNSIGNED_INT'
+%% </td><td>`?unsigned int'</td></tr><tr><td>`?GL_UNSIGNED_INT_VEC2'</td><td>`?uvec2'
+%% </td></tr><tr><td>`?GL_UNSIGNED_INT_VEC3'</td><td>`?uvec3'</td></tr><tr><td>`?GL_UNSIGNED_INT_VEC4'
+%% </td><td>`?uvec4'</td></tr><tr><td>`?GL_BOOL'</td><td>`?bool'</td></tr><tr>
+%% <td>`?GL_BOOL_VEC2'</td><td>`?bvec2'</td></tr><tr><td>`?GL_BOOL_VEC3'</td><td>
+%% `?bvec3'</td></tr><tr><td>`?GL_BOOL_VEC4'</td><td>`?bvec4'</td></tr><tr><td>
+%% `?GL_FLOAT_MAT2'</td><td>`?mat2'</td></tr><tr><td>`?GL_FLOAT_MAT3'</td><td>
+%% `?mat3'</td></tr><tr><td>`?GL_FLOAT_MAT4'</td><td>`?mat4'</td></tr><tr><td>
+%% `?GL_FLOAT_MAT2x3'</td><td>`?mat2x3'</td></tr><tr><td>`?GL_FLOAT_MAT2x4'</td>
+%% <td>`?mat2x4'</td></tr><tr><td>`?GL_FLOAT_MAT3x2'</td><td>`?mat3x2'</td></tr>
+%% <tr><td>`?GL_FLOAT_MAT3x4'</td><td>`?mat3x4'</td></tr><tr><td>`?GL_FLOAT_MAT4x2'
+%% </td><td>`?mat4x2'</td></tr><tr><td>`?GL_FLOAT_MAT4x3'</td><td>`?mat4x3'</td>
+%% </tr><tr><td>`?GL_DOUBLE_MAT2'</td><td>`?dmat2'</td></tr><tr><td>`?GL_DOUBLE_MAT3'
+%% </td><td>`?dmat3'</td></tr><tr><td>`?GL_DOUBLE_MAT4'</td><td>`?dmat4'</td></tr>
+%% <tr><td>`?GL_DOUBLE_MAT2x3'</td><td>`?dmat2x3'</td></tr><tr><td>`?GL_DOUBLE_MAT2x4'
+%% </td><td>`?dmat2x4'</td></tr><tr><td>`?GL_DOUBLE_MAT3x2'</td><td>`?dmat3x2'</td>
+%% </tr><tr><td>`?GL_DOUBLE_MAT3x4'</td><td>`?dmat3x4'</td></tr><tr><td>`?GL_DOUBLE_MAT4x2'
+%% </td><td>`?dmat4x2'</td></tr><tr><td>`?GL_DOUBLE_MAT4x3'</td><td>`?dmat4x3'</td>
+%% </tr><tr><td>`?GL_SAMPLER_1D'</td><td>`?sampler1D'</td></tr><tr><td>`?GL_SAMPLER_2D'
+%% </td><td>`?sampler2D'</td></tr><tr><td>`?GL_SAMPLER_3D'</td><td>`?sampler3D'
+%% </td></tr><tr><td>`?GL_SAMPLER_CUBE'</td><td>`?samplerCube'</td></tr><tr><td>`?GL_SAMPLER_1D_SHADOW'
+%% </td><td>`?sampler1DShadow'</td></tr><tr><td>`?GL_SAMPLER_2D_SHADOW'</td><td>`?sampler2DShadow'
+%% </td></tr><tr><td>`?GL_SAMPLER_1D_ARRAY'</td><td>`?sampler1DArray'</td></tr><tr>
+%% <td>`?GL_SAMPLER_2D_ARRAY'</td><td>`?sampler2DArray'</td></tr><tr><td>`?GL_SAMPLER_1D_ARRAY_SHADOW'
+%% </td><td>`?sampler1DArrayShadow'</td></tr><tr><td>`?GL_SAMPLER_2D_ARRAY_SHADOW'</td>
+%% <td>`?sampler2DArrayShadow'</td></tr><tr><td>`?GL_SAMPLER_2D_MULTISAMPLE'</td><td>
+%% `?sampler2DMS'</td></tr><tr><td>`?GL_SAMPLER_2D_MULTISAMPLE_ARRAY'</td><td>`?sampler2DMSArray'
+%% </td></tr><tr><td>`?GL_SAMPLER_CUBE_SHADOW'</td><td>`?samplerCubeShadow'</td></tr>
+%% <tr><td>`?GL_SAMPLER_BUFFER'</td><td>`?samplerBuffer'</td></tr><tr><td>`?GL_SAMPLER_2D_RECT'
+%% </td><td>`?sampler2DRect'</td></tr><tr><td>`?GL_SAMPLER_2D_RECT_SHADOW'</td><td>
+%% `?sampler2DRectShadow'</td></tr><tr><td>`?GL_INT_SAMPLER_1D'</td><td>`?isampler1D'
+%% </td></tr><tr><td>`?GL_INT_SAMPLER_2D'</td><td>`?isampler2D'</td></tr><tr><td>`?GL_INT_SAMPLER_3D'
+%% </td><td>`?isampler3D'</td></tr><tr><td>`?GL_INT_SAMPLER_CUBE'</td><td>`?isamplerCube'
+%% </td></tr><tr><td>`?GL_INT_SAMPLER_1D_ARRAY'</td><td>`?isampler1DArray'</td></tr>
+%% <tr><td>`?GL_INT_SAMPLER_2D_ARRAY'</td><td>`?isampler2DArray'</td></tr><tr><td>`?GL_INT_SAMPLER_2D_MULTISAMPLE'
+%% </td><td>`?isampler2DMS'</td></tr><tr><td>`?GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY'</td>
+%% <td>`?isampler2DMSArray'</td></tr><tr><td>`?GL_INT_SAMPLER_BUFFER'</td><td>`?isamplerBuffer'
+%% </td></tr><tr><td>`?GL_INT_SAMPLER_2D_RECT'</td><td>`?isampler2DRect'</td></tr><tr>
+%% <td>`?GL_UNSIGNED_INT_SAMPLER_1D'</td><td>`?usampler1D'</td></tr><tr><td>`?GL_UNSIGNED_INT_SAMPLER_2D'
+%% </td><td>`?usampler2D'</td></tr><tr><td>`?GL_UNSIGNED_INT_SAMPLER_3D'</td><td>`?usampler3D'
+%% </td></tr><tr><td>`?GL_UNSIGNED_INT_SAMPLER_CUBE'</td><td>`?usamplerCube'</td></tr>
+%% <tr><td>`?GL_UNSIGNED_INT_SAMPLER_1D_ARRAY'</td><td>`?usampler2DArray'</td></tr>
+%% <tr><td>`?GL_UNSIGNED_INT_SAMPLER_2D_ARRAY'</td><td>`?usampler2DArray'</td></tr>
+%% <tr><td>`?GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE'</td><td>`?usampler2DMS'</td></tr>
+%% <tr><td>`?GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY'</td><td>`?usampler2DMSArray'
+%% </td></tr><tr><td>`?GL_UNSIGNED_INT_SAMPLER_BUFFER'</td><td>`?usamplerBuffer'</td>
+%% </tr><tr><td>`?GL_UNSIGNED_INT_SAMPLER_2D_RECT'</td><td>`?usampler2DRect'</td></tr>
+%% <tr><td>`?GL_IMAGE_1D'</td><td>`?image1D'</td></tr><tr><td>`?GL_IMAGE_2D'</td>
+%% <td>`?image2D'</td></tr><tr><td>`?GL_IMAGE_3D'</td><td>`?image3D'</td></tr>
+%% <tr><td>`?GL_IMAGE_2D_RECT'</td><td>`?image2DRect'</td></tr><tr><td>`?GL_IMAGE_CUBE'
+%% </td><td>`?imageCube'</td></tr><tr><td>`?GL_IMAGE_BUFFER'</td><td>`?imageBuffer'
+%% </td></tr><tr><td>`?GL_IMAGE_1D_ARRAY'</td><td>`?image1DArray'</td></tr><tr><td>
+%% `?GL_IMAGE_2D_ARRAY'</td><td>`?image2DArray'</td></tr><tr><td>`?GL_IMAGE_2D_MULTISAMPLE'
+%% </td><td>`?image2DMS'</td></tr><tr><td>`?GL_IMAGE_2D_MULTISAMPLE_ARRAY'</td><td>
+%% `?image2DMSArray'</td></tr><tr><td>`?GL_INT_IMAGE_1D'</td><td>`?iimage1D'</td>
+%% </tr><tr><td>`?GL_INT_IMAGE_2D'</td><td>`?iimage2D'</td></tr><tr><td>`?GL_INT_IMAGE_3D'
+%% </td><td>`?iimage3D'</td></tr><tr><td>`?GL_INT_IMAGE_2D_RECT'</td><td>`?iimage2DRect'
+%% </td></tr><tr><td>`?GL_INT_IMAGE_CUBE'</td><td>`?iimageCube'</td></tr><tr><td>`?GL_INT_IMAGE_BUFFER'
+%% </td><td>`?iimageBuffer'</td></tr><tr><td>`?GL_INT_IMAGE_1D_ARRAY'</td><td>`?iimage1DArray'
+%% </td></tr><tr><td>`?GL_INT_IMAGE_2D_ARRAY'</td><td>`?iimage2DArray'</td></tr><tr>
+%% <td>`?GL_INT_IMAGE_2D_MULTISAMPLE'</td><td>`?iimage2DMS'</td></tr><tr><td>`?GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY'
+%% </td><td>`?iimage2DMSArray'</td></tr><tr><td>`?GL_UNSIGNED_INT_IMAGE_1D'</td><td>
+%% `?uimage1D'</td></tr><tr><td>`?GL_UNSIGNED_INT_IMAGE_2D'</td><td>`?uimage2D'
+%% </td></tr><tr><td>`?GL_UNSIGNED_INT_IMAGE_3D'</td><td>`?uimage3D'</td></tr><tr><td>
+%% `?GL_UNSIGNED_INT_IMAGE_2D_RECT'</td><td>`?uimage2DRect'</td></tr><tr><td>`?GL_UNSIGNED_INT_IMAGE_CUBE'
+%% </td><td>`?uimageCube'</td></tr><tr><td>`?GL_UNSIGNED_INT_IMAGE_BUFFER'</td><td>
+%% `?uimageBuffer'</td></tr><tr><td>`?GL_UNSIGNED_INT_IMAGE_1D_ARRAY'</td><td>`?uimage1DArray'
+%% </td></tr><tr><td>`?GL_UNSIGNED_INT_IMAGE_2D_ARRAY'</td><td>`?uimage2DArray'</td>
+%% </tr><tr><td>`?GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE'</td><td>`?uimage2DMS'</td></tr>
+%% <tr><td>`?GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY'</td><td>`?uimage2DMSArray'</td>
+%% </tr><tr><td>`?GL_UNSIGNED_INT_ATOMIC_COUNTER'</td><td>`?atomic_uint'</td></tr></tbody>
+%% </table>
+%%
+%% If one or more elements of an array are active, the name of the array is returned in `Name'
+%% , the type is returned in `Type' , and the `Size' parameter returns the highest
+%% array element index used, plus one, as determined by the compiler and/or linker. Only
+%% one active uniform variable will be reported for a uniform array.
+%%
+%% Uniform variables that are declared as structures or arrays of structures will not be
+%% returned directly by this function. Instead, each of these uniform variables will be reduced
+%% to its fundamental components containing the "." and "[]" operators such that each of
+%% the names is valid as an argument to {@link gl:getUniformLocation/2} . Each of these reduced
+%% uniform variables is counted as one active uniform variable and is assigned an index.
+%% A valid name cannot be a structure, an array of structures, or a subcomponent of a vector
+%% or matrix.
+%%
+%% The size of the uniform variable will be returned in `Size' . Uniform variables other
+%% than arrays will have a size of 1. Structures and arrays of structures will be reduced
+%% as described earlier, such that each of the names returned will be a data type in the
+%% earlier list. If this reduction results in an array, the size returned will be as described
+%% for uniform arrays; otherwise, the size returned will be 1.
+%%
+%% The list of active uniform variables may include both built-in uniform variables (which
+%% begin with the prefix "gl_") as well as user-defined uniform variable names.
+%%
+%% This function will return as much information as it can about the specified active uniform
+%% variable. If no information is available, `Length' will be 0, and `Name' will
+%% be an empty string. This situation could occur if this function is called after a link
+%% operation that failed. If an error occurs, the return values `Length' , `Size' , `Type'
+%% , and `Name' will be unmodified.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniform.xml">external</a> documentation.
+-spec getActiveUniform(Program, Index, BufSize) -> {Size :: integer(),Type :: enum(),Name :: string()} when Program :: integer(),Index :: integer(),BufSize :: integer().
getActiveUniform(Program,Index,BufSize) ->
call(5456, <<Program:?GLuint,Index:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Program::integer(),MaxCount::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetAttachedShaders.xml">external</a> documentation.
--spec getAttachedShaders(integer(),integer()) -> [integer()].
+%% @doc Returns the handles of the shader objects attached to a program object
+%%
+%% ``gl:getAttachedShaders'' returns the names of the shader objects attached to `Program'
+%% . The names of shader objects that are attached to `Program' will be returned in `Shaders.'
+%% The actual number of shader names written into `Shaders' is returned in `Count.'
+%% If no shader objects are attached to `Program' , `Count' is set to 0. The maximum
+%% number of shader names that may be returned in `Shaders' is specified by `MaxCount'
+%% .
+%%
+%% If the number of names actually returned is not required (for instance, if it has just
+%% been obtained by calling {@link gl:getProgramiv/2} ), a value of `?NULL' may be passed
+%% for count. If no shader objects are attached to `Program' , a value of 0 will be returned
+%% in `Count' . The actual number of attached shaders can be obtained by calling {@link gl:getProgramiv/2}
+%% with the value `?GL_ATTACHED_SHADERS'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetAttachedShaders.xml">external</a> documentation.
+-spec getAttachedShaders(Program, MaxCount) -> [integer()] when Program :: integer(),MaxCount :: integer().
getAttachedShaders(Program,MaxCount) ->
call(5457, <<Program:?GLuint,MaxCount:?GLsizei>>).
-%% @spec (Program::integer(),Name::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetAttribLocation.xml">external</a> documentation.
--spec getAttribLocation(integer(),string()) -> integer().
+%% @doc Returns the location of an attribute variable
+%%
+%% ``gl:getAttribLocation'' queries the previously linked program object specified by `Program'
+%% for the attribute variable specified by `Name' and returns the index of the generic
+%% vertex attribute that is bound to that attribute variable. If `Name' is a matrix
+%% attribute variable, the index of the first column of the matrix is returned. If the named
+%% attribute variable is not an active attribute in the specified program object or if `Name'
+%% starts with the reserved prefix "gl_", a value of -1 is returned.
+%%
+%% The association between an attribute variable name and a generic attribute index can be
+%% specified at any time by calling {@link gl:bindAttribLocation/3} . Attribute bindings do
+%% not go into effect until {@link gl:linkProgram/1} is called. After a program object has
+%% been linked successfully, the index values for attribute variables remain fixed until
+%% the next link command occurs. The attribute values can only be queried after a link if
+%% the link was successful. ``gl:getAttribLocation'' returns the binding that actually
+%% went into effect the last time {@link gl:linkProgram/1} was called for the specified program
+%% object. Attribute bindings that have been specified since the last link operation are
+%% not returned by ``gl:getAttribLocation''.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetAttribLocation.xml">external</a> documentation.
+-spec getAttribLocation(Program, Name) -> integer() when Program :: integer(),Name :: string().
getAttribLocation(Program,Name) ->
call(5458, <<Program:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8)>>).
-%% @spec (Program::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgram.xml">external</a> documentation.
--spec getProgramiv(integer(),enum()) -> integer().
+%% @doc Returns a parameter from a program object
+%%
+%% ``gl:getProgram'' returns in `Params' the value of a parameter for a specific program
+%% object. The following parameters are defined:
+%%
+%% `?GL_DELETE_STATUS': `Params' returns `?GL_TRUE' if `Program' is currently
+%% flagged for deletion, and `?GL_FALSE' otherwise.
+%%
+%% `?GL_LINK_STATUS': `Params' returns `?GL_TRUE' if the last link operation
+%% on `Program' was successful, and `?GL_FALSE' otherwise.
+%%
+%% `?GL_VALIDATE_STATUS': `Params' returns `?GL_TRUE' or if the last validation
+%% operation on `Program' was successful, and `?GL_FALSE' otherwise.
+%%
+%% `?GL_INFO_LOG_LENGTH': `Params' returns the number of characters in the information
+%% log for `Program' including the null termination character (i.e., the size of the
+%% character buffer required to store the information log). If `Program' has no information
+%% log, a value of 0 is returned.
+%%
+%% `?GL_ATTACHED_SHADERS': `Params' returns the number of shader objects attached
+%% to `Program' .
+%%
+%% `?GL_ACTIVE_ATOMIC_COUNTER_BUFFERS': `Params' returns the number of active attribute
+%% atomic counter buffers used by `Program' .
+%%
+%% `?GL_ACTIVE_ATTRIBUTES': `Params' returns the number of active attribute variables
+%% for `Program' .
+%%
+%% `?GL_ACTIVE_ATTRIBUTE_MAX_LENGTH': `Params' returns the length of the longest
+%% active attribute name for `Program' , including the null termination character (i.e.,
+%% the size of the character buffer required to store the longest attribute name). If no
+%% active attributes exist, 0 is returned.
+%%
+%% `?GL_ACTIVE_UNIFORMS': `Params' returns the number of active uniform variables
+%% for `Program' .
+%%
+%% `?GL_ACTIVE_UNIFORM_MAX_LENGTH': `Params' returns the length of the longest
+%% active uniform variable name for `Program' , including the null termination character
+%% (i.e., the size of the character buffer required to store the longest uniform variable
+%% name). If no active uniform variables exist, 0 is returned.
+%%
+%% `?GL_PROGRAM_BINARY_LENGTH': `Params' returns the length of the program binary,
+%% in bytes that will be returned by a call to {@link gl:getProgramBinary/2} . When a progam's
+%% `?GL_LINK_STATUS' is `?GL_FALSE', its program binary length is zero.
+%%
+%% `?GL_TRANSFORM_FEEDBACK_BUFFER_MODE': `Params' returns a symbolic constant indicating
+%% the buffer mode used when transform feedback is active. This may be `?GL_SEPARATE_ATTRIBS'
+%% or `?GL_INTERLEAVED_ATTRIBS'.
+%%
+%% `?GL_TRANSFORM_FEEDBACK_VARYINGS': `Params' returns the number of varying variables
+%% to capture in transform feedback mode for the program.
+%%
+%% `?GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH': `Params' returns the length of
+%% the longest variable name to be used for transform feedback, including the null-terminator.
+%%
+%%
+%% `?GL_GEOMETRY_VERTICES_OUT': `Params' returns the maximum number of vertices
+%% that the geometry shader in `Program' will output.
+%%
+%% `?GL_GEOMETRY_INPUT_TYPE': `Params' returns a symbolic constant indicating the
+%% primitive type accepted as input to the geometry shader contained in `Program' .
+%%
+%% `?GL_GEOMETRY_OUTPUT_TYPE': `Params' returns a symbolic constant indicating
+%% the primitive type that will be output by the geometry shader contained in `Program' .
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgram.xml">external</a> documentation.
+-spec getProgramiv(Program, Pname) -> integer() when Program :: integer(),Pname :: enum().
getProgramiv(Program,Pname) ->
call(5459, <<Program:?GLuint,Pname:?GLenum>>).
-%% @spec (Program::integer(),BufSize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramInfoLog.xml">external</a> documentation.
--spec getProgramInfoLog(integer(),integer()) -> string().
+%% @doc Returns the information log for a program object
+%%
+%% ``gl:getProgramInfoLog'' returns the information log for the specified program object.
+%% The information log for a program object is modified when the program object is linked
+%% or validated. The string that is returned will be null terminated.
+%%
+%% ``gl:getProgramInfoLog'' returns in `InfoLog' as much of the information log as
+%% it can, up to a maximum of `MaxLength' characters. The number of characters actually
+%% returned, excluding the null termination character, is specified by `Length' . If
+%% the length of the returned string is not required, a value of `?NULL' can be passed
+%% in the `Length' argument. The size of the buffer required to store the returned
+%% information log can be obtained by calling {@link gl:getProgramiv/2} with the value `?GL_INFO_LOG_LENGTH'
+%% .
+%%
+%% The information log for a program object is either an empty string, or a string containing
+%% information about the last link operation, or a string containing information about the
+%% last validation operation. It may contain diagnostic messages, warning messages, and
+%% other information. When a program object is created, its information log will be a string
+%% of length 0.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramInfoLog.xml">external</a> documentation.
+-spec getProgramInfoLog(Program, BufSize) -> string() when Program :: integer(),BufSize :: integer().
getProgramInfoLog(Program,BufSize) ->
call(5460, <<Program:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Shader::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShader.xml">external</a> documentation.
--spec getShaderiv(integer(),enum()) -> integer().
+%% @doc Returns a parameter from a shader object
+%%
+%% ``gl:getShader'' returns in `Params' the value of a parameter for a specific
+%% shader object. The following parameters are defined:
+%%
+%% `?GL_SHADER_TYPE': `Params' returns `?GL_VERTEX_SHADER' if `Shader'
+%% is a vertex shader object, `?GL_GEOMETRY_SHADER' if `Shader' is a geometry
+%% shader object, and `?GL_FRAGMENT_SHADER' if `Shader' is a fragment shader
+%% object.
+%%
+%% `?GL_DELETE_STATUS': `Params' returns `?GL_TRUE' if `Shader' is
+%% currently flagged for deletion, and `?GL_FALSE' otherwise.
+%%
+%% `?GL_COMPILE_STATUS': `Params' returns `?GL_TRUE' if the last compile
+%% operation on `Shader' was successful, and `?GL_FALSE' otherwise.
+%%
+%% `?GL_INFO_LOG_LENGTH': `Params' returns the number of characters in the information
+%% log for `Shader' including the null termination character (i.e., the size of
+%% the character buffer required to store the information log). If `Shader' has
+%% no information log, a value of 0 is returned.
+%%
+%% `?GL_SHADER_SOURCE_LENGTH': `Params' returns the length of the concatenation
+%% of the source strings that make up the shader source for the `Shader' , including
+%% the null termination character. (i.e., the size of the character buffer required to
+%% store the shader source). If no source code exists, 0 is returned.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShader.xml">external</a> documentation.
+-spec getShaderiv(Shader, Pname) -> integer() when Shader :: integer(),Pname :: enum().
getShaderiv(Shader,Pname) ->
call(5461, <<Shader:?GLuint,Pname:?GLenum>>).
-%% @spec (Shader::integer(),BufSize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderInfoLog.xml">external</a> documentation.
--spec getShaderInfoLog(integer(),integer()) -> string().
+%% @doc Returns the information log for a shader object
+%%
+%% ``gl:getShaderInfoLog'' returns the information log for the specified shader object.
+%% The information log for a shader object is modified when the shader is compiled. The
+%% string that is returned will be null terminated.
+%%
+%% ``gl:getShaderInfoLog'' returns in `InfoLog' as much of the information log as
+%% it can, up to a maximum of `MaxLength' characters. The number of characters actually
+%% returned, excluding the null termination character, is specified by `Length' . If
+%% the length of the returned string is not required, a value of `?NULL' can be passed
+%% in the `Length' argument. The size of the buffer required to store the returned
+%% information log can be obtained by calling {@link gl:getShaderiv/2} with the value `?GL_INFO_LOG_LENGTH'
+%% .
+%%
+%% The information log for a shader object is a string that may contain diagnostic messages,
+%% warning messages, and other information about the last compile operation. When a shader
+%% object is created, its information log will be a string of length 0.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderInfoLog.xml">external</a> documentation.
+-spec getShaderInfoLog(Shader, BufSize) -> string() when Shader :: integer(),BufSize :: integer().
getShaderInfoLog(Shader,BufSize) ->
call(5462, <<Shader:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Shader::integer(),BufSize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderSource.xml">external</a> documentation.
--spec getShaderSource(integer(),integer()) -> string().
+%% @doc Returns the source code string from a shader object
+%%
+%% ``gl:getShaderSource'' returns the concatenation of the source code strings from the
+%% shader object specified by `Shader' . The source code strings for a shader object
+%% are the result of a previous call to {@link gl:shaderSource/2} . The string returned by
+%% the function will be null terminated.
+%%
+%% ``gl:getShaderSource'' returns in `Source' as much of the source code string as
+%% it can, up to a maximum of `BufSize' characters. The number of characters actually
+%% returned, excluding the null termination character, is specified by `Length' . If
+%% the length of the returned string is not required, a value of `?NULL' can be passed
+%% in the `Length' argument. The size of the buffer required to store the returned source
+%% code string can be obtained by calling {@link gl:getShaderiv/2} with the value `?GL_SHADER_SOURCE_LENGTH'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderSource.xml">external</a> documentation.
+-spec getShaderSource(Shader, BufSize) -> string() when Shader :: integer(),BufSize :: integer().
getShaderSource(Shader,BufSize) ->
call(5463, <<Shader:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Program::integer(),Name::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformLocation.xml">external</a> documentation.
--spec getUniformLocation(integer(),string()) -> integer().
+%% @doc Returns the location of a uniform variable
+%%
+%% ``gl:getUniformLocation '' returns an integer that represents the location of a specific
+%% uniform variable within a program object. `Name' must be a null terminated string
+%% that contains no white space. `Name' must be an active uniform variable name in `Program'
+%% that is not a structure, an array of structures, or a subcomponent of a vector or a matrix.
+%% This function returns -1 if `Name' does not correspond to an active uniform variable
+%% in `Program' , if `Name' starts with the reserved prefix "gl_", or if `Name'
+%% is associated with an atomic counter or a named uniform block.
+%%
+%% Uniform variables that are structures or arrays of structures may be queried by calling ``gl:getUniformLocation''
+%% for each field within the structure. The array element operator "[]" and the structure
+%% field operator "." may be used in `Name' in order to select elements within an array
+%% or fields within a structure. The result of using these operators is not allowed to be
+%% another structure, an array of structures, or a subcomponent of a vector or a matrix.
+%% Except if the last part of `Name' indicates a uniform variable array, the location
+%% of the first element of an array can be retrieved by using the name of the array, or by
+%% using the name appended by "[0]".
+%%
+%% The actual locations assigned to uniform variables are not known until the program object
+%% is linked successfully. After linking has occurred, the command ``gl:getUniformLocation''
+%% can be used to obtain the location of a uniform variable. This location value can then
+%% be passed to {@link gl:uniform1f/2} to set the value of the uniform variable or to {@link gl:getUniformfv/2}
+%% in order to query the current value of the uniform variable. After a program object has
+%% been linked successfully, the index values for uniform variables remain fixed until the
+%% next link command occurs. Uniform variable locations and values can only be queried after
+%% a link if the link was successful.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformLocation.xml">external</a> documentation.
+-spec getUniformLocation(Program, Name) -> integer() when Program :: integer(),Name :: string().
getUniformLocation(Program,Name) ->
call(5464, <<Program:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8)>>).
-%% @spec (Program::integer(),Location::integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniform.xml">external</a> documentation.
--spec getUniformfv(integer(),integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}.
+%% @doc Returns the value of a uniform variable
+%%
+%% ``gl:getUniform'' returns in `Params' the value(s) of the specified uniform variable.
+%% The type of the uniform variable specified by `Location' determines the number of
+%% values returned. If the uniform variable is defined in the shader as a boolean, int, or
+%% float, a single value will be returned. If it is defined as a vec2, ivec2, or bvec2, two
+%% values will be returned. If it is defined as a vec3, ivec3, or bvec3, three values will
+%% be returned, and so on. To query values stored in uniform variables declared as arrays,
+%% call ``gl:getUniform'' for each element of the array. To query values stored in uniform
+%% variables declared as structures, call ``gl:getUniform'' for each field in the structure.
+%% The values for uniform variables declared as a matrix will be returned in column major
+%% order.
+%%
+%% The locations assigned to uniform variables are not known until the program object is
+%% linked. After linking has occurred, the command {@link gl:getUniformLocation/2} can be
+%% used to obtain the location of a uniform variable. This location value can then be passed
+%% to ``gl:getUniform'' in order to query the current value of the uniform variable. After
+%% a program object has been linked successfully, the index values for uniform variables
+%% remain fixed until the next link command occurs. The uniform variable values can only
+%% be queried after a link if the link was successful.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniform.xml">external</a> documentation.
+-spec getUniformfv(Program, Location) -> matrix() when Program :: integer(),Location :: integer().
getUniformfv(Program,Location) ->
call(5465, <<Program:?GLuint,Location:?GLint>>).
-%% @spec (Program::integer(),Location::integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniform.xml">external</a> documentation.
--spec getUniformiv(integer(),integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}.
+%% @doc
+%% See {@link getUniformfv/2}
+-spec getUniformiv(Program, Location) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} when Program :: integer(),Location :: integer().
getUniformiv(Program,Location) ->
call(5466, <<Program:?GLuint,Location:?GLint>>).
-%% @spec (Index::integer(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttrib.xml">external</a> documentation.
--spec getVertexAttribdv(integer(),enum()) -> {float(),float(),float(),float()}.
+%% @doc Return a generic vertex attribute parameter
+%%
+%% ``gl:getVertexAttrib'' returns in `Params' the value of a generic vertex attribute
+%% parameter. The generic vertex attribute to be queried is specified by `Index' , and
+%% the parameter to be queried is specified by `Pname' .
+%%
+%% The accepted parameter names are as follows:
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING': `Params' returns a single value, the
+%% name of the buffer object currently bound to the binding point corresponding to generic
+%% vertex attribute array `Index' . If no buffer object is bound, 0 is returned. The
+%% initial value is 0.
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_ENABLED': `Params' returns a single value that is non-zero
+%% (true) if the vertex attribute array for `Index' is enabled and 0 (false) if it is
+%% disabled. The initial value is `?GL_FALSE'.
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_SIZE': `Params' returns a single value, the size of
+%% the vertex attribute array for `Index' . The size is the number of values for each
+%% element of the vertex attribute array, and it will be 1, 2, 3, or 4. The initial value
+%% is 4.
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_STRIDE': `Params' returns a single value, the array
+%% stride for (number of bytes between successive elements in) the vertex attribute array
+%% for `Index' . A value of 0 indicates that the array elements are stored sequentially
+%% in memory. The initial value is 0.
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_TYPE': `Params' returns a single value, a symbolic
+%% constant indicating the array type for the vertex attribute array for `Index' . Possible
+%% values are `?GL_BYTE', `?GL_UNSIGNED_BYTE', `?GL_SHORT', `?GL_UNSIGNED_SHORT'
+%% , `?GL_INT', `?GL_UNSIGNED_INT', `?GL_FLOAT', and `?GL_DOUBLE'. The
+%% initial value is `?GL_FLOAT'.
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_NORMALIZED': `Params' returns a single value that is
+%% non-zero (true) if fixed-point data types for the vertex attribute array indicated by `Index'
+%% are normalized when they are converted to floating point, and 0 (false) otherwise. The
+%% initial value is `?GL_FALSE'.
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_INTEGER': `Params' returns a single value that is non-zero
+%% (true) if fixed-point data types for the vertex attribute array indicated by `Index'
+%% have integer data types, and 0 (false) otherwise. The initial value is 0 (`?GL_FALSE').
+%%
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_DIVISOR': `Params' returns a single value that is the
+%% frequency divisor used for instanced rendering. See {@link gl:vertexAttribDivisor/2} . The
+%% initial value is 0.
+%%
+%% `?GL_CURRENT_VERTEX_ATTRIB': `Params' returns four values that represent the
+%% current value for the generic vertex attribute specified by index. Generic vertex attribute
+%% 0 is unique in that it has no current state, so an error will be generated if `Index'
+%% is 0. The initial value for all other generic vertex attributes is (0,0,0,1).
+%%
+%% ``gl:getVertexAttribdv'' and ``gl:getVertexAttribfv'' return the current attribute
+%% values as four single-precision floating-point values; ``gl:getVertexAttribiv'' reads
+%% them as floating-point values and converts them to four integer values; ``gl:getVertexAttribIiv''
+%% and ``gl:getVertexAttribIuiv'' read and return them as signed or unsigned integer values,
+%% respectively; ``gl:getVertexAttribLdv'' reads and returns them as four double-precision
+%% floating-point values.
+%%
+%% All of the parameters except `?GL_CURRENT_VERTEX_ATTRIB' represent state stored in
+%% the currently bound vertex array object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttrib.xml">external</a> documentation.
+-spec getVertexAttribdv(Index, Pname) -> {float(),float(),float(),float()} when Index :: integer(),Pname :: enum().
getVertexAttribdv(Index,Pname) ->
call(5467, <<Index:?GLuint,Pname:?GLenum>>).
-%% @spec (Index::integer(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttrib.xml">external</a> documentation.
--spec getVertexAttribfv(integer(),enum()) -> {float(),float(),float(),float()}.
+%% @doc
+%% See {@link getVertexAttribdv/2}
+-spec getVertexAttribfv(Index, Pname) -> {float(),float(),float(),float()} when Index :: integer(),Pname :: enum().
getVertexAttribfv(Index,Pname) ->
call(5468, <<Index:?GLuint,Pname:?GLenum>>).
-%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttrib.xml">external</a> documentation.
--spec getVertexAttribiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}.
+%% @doc
+%% See {@link getVertexAttribdv/2}
+-spec getVertexAttribiv(Index, Pname) -> {integer(),integer(),integer(),integer()} when Index :: integer(),Pname :: enum().
getVertexAttribiv(Index,Pname) ->
call(5469, <<Index:?GLuint,Pname:?GLenum>>).
-%% @spec (Program::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsProgram.xml">external</a> documentation.
--spec isProgram(integer()) -> 0|1.
+%% @doc Determines if a name corresponds to a program object
+%%
+%% ``gl:isProgram'' returns `?GL_TRUE' if `Program' is the name of a program
+%% object previously created with {@link gl:createProgram/0} and not yet deleted with {@link gl:deleteProgram/1}
+%% . If `Program' is zero or a non-zero value that is not the name of a program object,
+%% or if an error occurs, ``gl:isProgram'' returns `?GL_FALSE'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsProgram.xml">external</a> documentation.
+-spec isProgram(Program) -> 0|1 when Program :: integer().
isProgram(Program) ->
call(5470, <<Program:?GLuint>>).
-%% @spec (Shader::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsShader.xml">external</a> documentation.
--spec isShader(integer()) -> 0|1.
+%% @doc Determines if a name corresponds to a shader object
+%%
+%% ``gl:isShader'' returns `?GL_TRUE' if `Shader' is the name of a shader object
+%% previously created with {@link gl:createShader/1} and not yet deleted with {@link gl:deleteShader/1}
+%% . If `Shader' is zero or a non-zero value that is not the name of a shader object,
+%% or if an error occurs, ``gl:isShader '' returns `?GL_FALSE'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsShader.xml">external</a> documentation.
+-spec isShader(Shader) -> 0|1 when Shader :: integer().
isShader(Shader) ->
call(5471, <<Shader:?GLuint>>).
-%% @spec (Program::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLinkProgram.xml">external</a> documentation.
--spec linkProgram(integer()) -> ok.
+%% @doc Links a program object
+%%
+%% ``gl:linkProgram'' links the program object specified by `Program' . If any shader
+%% objects of type `?GL_VERTEX_SHADER' are attached to `Program' , they will be
+%% used to create an executable that will run on the programmable vertex processor. If any
+%% shader objects of type `?GL_GEOMETRY_SHADER' are attached to `Program' , they
+%% will be used to create an executable that will run on the programmable geometry processor.
+%% If any shader objects of type `?GL_FRAGMENT_SHADER' are attached to `Program' ,
+%% they will be used to create an executable that will run on the programmable fragment processor.
+%%
+%%
+%% The status of the link operation will be stored as part of the program object's state.
+%% This value will be set to `?GL_TRUE' if the program object was linked without errors
+%% and is ready for use, and `?GL_FALSE' otherwise. It can be queried by calling {@link gl:getProgramiv/2}
+%% with arguments `Program' and `?GL_LINK_STATUS'.
+%%
+%% As a result of a successful link operation, all active user-defined uniform variables
+%% belonging to `Program' will be initialized to 0, and each of the program object's
+%% active uniform variables will be assigned a location that can be queried by calling {@link gl:getUniformLocation/2}
+%% . Also, any active user-defined attribute variables that have not been bound to a generic
+%% vertex attribute index will be bound to one at this time.
+%%
+%% Linking of a program object can fail for a number of reasons as specified in the `OpenGL Shading Language Specification'
+%% . The following lists some of the conditions that will cause a link error.
+%%
+%% The number of active attribute variables supported by the implementation has been exceeded.
+%%
+%%
+%% The storage limit for uniform variables has been exceeded.
+%%
+%% The number of active uniform variables supported by the implementation has been exceeded.
+%%
+%% The `main' function is missing for the vertex, geometry or fragment shader.
+%%
+%% A varying variable actually used in the fragment shader is not declared in the same way
+%% (or is not declared at all) in the vertex shader, or geometry shader shader if present.
+%%
+%% A reference to a function or variable name is unresolved.
+%%
+%% A shared global is declared with two different types or two different initial values.
+%%
+%% One or more of the attached shader objects has not been successfully compiled.
+%%
+%% Binding a generic attribute matrix caused some rows of the matrix to fall outside the
+%% allowed maximum of `?GL_MAX_VERTEX_ATTRIBS'.
+%%
+%% Not enough contiguous vertex attribute slots could be found to bind attribute matrices.
+%%
+%% The program object contains objects to form a fragment shader but does not contain objects
+%% to form a vertex shader.
+%%
+%% The program object contains objects to form a geometry shader but does not contain objects
+%% to form a vertex shader.
+%%
+%% The program object contains objects to form a geometry shader and the input primitive
+%% type, output primitive type, or maximum output vertex count is not specified in any compiled
+%% geometry shader object.
+%%
+%% The program object contains objects to form a geometry shader and the input primitive
+%% type, output primitive type, or maximum output vertex count is specified differently in
+%% multiple geometry shader objects.
+%%
+%% The number of active outputs in the fragment shader is greater than the value of `?GL_MAX_DRAW_BUFFERS'
+%% .
+%%
+%% The program has an active output assigned to a location greater than or equal to the value
+%% of `?GL_MAX_DUAL_SOURCE_DRAW_BUFFERS' and has an active output assigned an index
+%% greater than or equal to one.
+%%
+%% More than one varying out variable is bound to the same number and index.
+%%
+%% The explicit binding assigments do not leave enough space for the linker to automatically
+%% assign a location for a varying out array, which requires multiple contiguous locations.
+%%
+%% The `Count' specified by {@link gl:transformFeedbackVaryings/3} is non-zero, but the
+%% program object has no vertex or geometry shader.
+%%
+%% Any variable name specified to {@link gl:transformFeedbackVaryings/3} in the `Varyings'
+%% array is not declared as an output in the vertex shader (or the geometry shader, if active).
+%%
+%%
+%% Any two entries in the `Varyings' array given {@link gl:transformFeedbackVaryings/3}
+%% specify the same varying variable.
+%%
+%% The total number of components to capture in any transform feedback varying variable is
+%% greater than the constant `?GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS' and the
+%% buffer mode is `?SEPARATE_ATTRIBS'.
+%%
+%% When a program object has been successfully linked, the program object can be made part
+%% of current state by calling {@link gl:useProgram/1} . Whether or not the link operation
+%% was successful, the program object's information log will be overwritten. The information
+%% log can be retrieved by calling {@link gl:getProgramInfoLog/2} .
+%%
+%% ``gl:linkProgram'' will also install the generated executables as part of the current
+%% rendering state if the link operation was successful and the specified program object
+%% is already currently in use as a result of a previous call to {@link gl:useProgram/1} .
+%% If the program object currently in use is relinked unsuccessfully, its link status will
+%% be set to `?GL_FALSE' , but the executables and associated state will remain part
+%% of the current state until a subsequent call to ``gl:useProgram'' removes it from use.
+%% After it is removed from use, it cannot be made part of current state until it has been
+%% successfully relinked.
+%%
+%% If `Program' contains shader objects of type `?GL_VERTEX_SHADER', and optionally
+%% of type `?GL_GEOMETRY_SHADER', but does not contain shader objects of type `?GL_FRAGMENT_SHADER'
+%% , the vertex shader executable will be installed on the programmable vertex processor,
+%% the geometry shader executable, if present, will be installed on the programmable geometry
+%% processor, but no executable will be installed on the fragment processor. The results
+%% of rasterizing primitives with such a program will be undefined.
+%%
+%% The program object's information log is updated and the program is generated at the time
+%% of the link operation. After the link operation, applications are free to modify attached
+%% shader objects, compile attached shader objects, detach shader objects, delete shader
+%% objects, and attach additional shader objects. None of these operations affects the information
+%% log or the program that is part of the program object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLinkProgram.xml">external</a> documentation.
+-spec linkProgram(Program) -> ok when Program :: integer().
linkProgram(Program) ->
cast(5472, <<Program:?GLuint>>).
-%% @spec (Shader::integer(),String::[string()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderSource.xml">external</a> documentation.
--spec shaderSource(integer(),[string()]) -> ok.
+%% @doc Replaces the source code in a shader object
+%%
+%% ``gl:shaderSource'' sets the source code in `Shader' to the source code in the
+%% array of strings specified by `String' . Any source code previously stored in the
+%% shader object is completely replaced. The number of strings in the array is specified
+%% by `Count' . If `Length' is `?NULL', each string is assumed to be null
+%% terminated. If `Length' is a value other than `?NULL', it points to an array
+%% containing a string length for each of the corresponding elements of `String' .
+%% Each element in the `Length' array may contain the length of the corresponding
+%% string (the null character is not counted as part of the string length) or a value less
+%% than 0 to indicate that the string is null terminated. The source code strings are not
+%% scanned or parsed at this time; they are simply copied into the specified shader object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderSource.xml">external</a> documentation.
+-spec shaderSource(Shader, String) -> ok when Shader :: integer(),String :: [string()].
shaderSource(Shader,String) ->
StringTemp = list_to_binary([[Str|[0]] || Str <- String ]),
cast(5473, <<Shader:?GLuint,(length(String)):?GLuint,(size(StringTemp)):?GLuint,(StringTemp)/binary,0:((8-((size(StringTemp)+0) rem 8)) rem 8)>>).
-%% @spec (Program::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgram.xml">external</a> documentation.
--spec useProgram(integer()) -> ok.
+%% @doc Installs a program object as part of current rendering state
+%%
+%% ``gl:useProgram'' installs the program object specified by `Program' as part of
+%% current rendering state. One or more executables are created in a program object by
+%% successfully attaching shader objects to it with {@link gl:attachShader/2} , successfully
+%% compiling the shader objects with {@link gl:compileShader/1} , and successfully linking
+%% the program object with {@link gl:linkProgram/1} .
+%%
+%% A program object will contain an executable that will run on the vertex processor if
+%% it contains one or more shader objects of type `?GL_VERTEX_SHADER' that have been
+%% successfully compiled and linked. A program object will contain an executable that will
+%% run on the geometry processor if it contains one or more shader objects of type `?GL_GEOMETRY_SHADER'
+%% that have been successfully compiled and linked. Similarly, a program object will contain
+%% an executable that will run on the fragment processor if it contains one or more shader
+%% objects of type `?GL_FRAGMENT_SHADER' that have been successfully compiled and
+%% linked.
+%%
+%% While a program object is in use, applications are free to modify attached shader objects,
+%% compile attached shader objects, attach additional shader objects, and detach or delete
+%% shader objects. None of these operations will affect the executables that are part of
+%% the current state. However, relinking the program object that is currently in use will
+%% install the program object as part of the current rendering state if the link operation
+%% was successful (see {@link gl:linkProgram/1} ). If the program object currently in use
+%% is relinked unsuccessfully, its link status will be set to `?GL_FALSE', but the
+%% executables and associated state will remain part of the current state until a subsequent
+%% call to ``gl:useProgram'' removes it from use. After it is removed from use, it cannot
+%% be made part of current state until it has been successfully relinked.
+%%
+%% If `Program' is zero, then the current rendering state refers to an `invalid'
+%% program object and the results of shader execution are undefined. However, this is not
+%% an error.
+%%
+%% If `Program' does not contain shader objects of type `?GL_FRAGMENT_SHADER',
+%% an executable will be installed on the vertex, and possibly geometry processors, but
+%% the results of fragment shader execution will be undefined.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgram.xml">external</a> documentation.
+-spec useProgram(Program) -> ok when Program :: integer().
useProgram(Program) ->
cast(5474, <<Program:?GLuint>>).
-%% @spec (Location::integer(),V0::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1f(integer(),float()) -> ok.
+%% @doc Specify the value of a uniform variable for the current program object
+%%
+%% ``gl:uniform'' modifies the value of a uniform variable or a uniform variable array.
+%% The location of the uniform variable to be modified is specified by `Location' , which
+%% should be a value returned by {@link gl:getUniformLocation/2} . ``gl:uniform'' operates
+%% on the program object that was made part of current state by calling {@link gl:useProgram/1}
+%% .
+%%
+%% The commands ``gl:uniform{1|2|3|4}{f|i|ui}'' are used to change the value of the uniform
+%% variable specified by `Location' using the values passed as arguments. The number
+%% specified in the command should match the number of components in the data type of the
+%% specified uniform variable (e.g., `1' for float, int, unsigned int, bool; `2'
+%% for vec2, ivec2, uvec2, bvec2, etc.). The suffix `f' indicates that floating-point
+%% values are being passed; the suffix `i' indicates that integer values are being passed;
+%% the suffix `ui' indicates that unsigned integer values are being passed, and this
+%% type should also match the data type of the specified uniform variable. The `i' variants
+%% of this function should be used to provide values for uniform variables defined as int, ivec2
+%% , ivec3, ivec4, or arrays of these. The `ui' variants of this function should be
+%% used to provide values for uniform variables defined as unsigned int, uvec2, uvec3, uvec4,
+%% or arrays of these. The `f' variants should be used to provide values for uniform
+%% variables of type float, vec2, vec3, vec4, or arrays of these. Either the `i', `ui'
+%% or `f' variants may be used to provide values for uniform variables of type bool, bvec2
+%% , bvec3, bvec4, or arrays of these. The uniform variable will be set to false if the input
+%% value is 0 or 0.0f, and it will be set to true otherwise.
+%%
+%% All active uniform variables defined in a program object are initialized to 0 when the
+%% program object is linked successfully. They retain the values assigned to them by a call
+%% to ``gl:uniform '' until the next successful link operation occurs on the program object,
+%% when they are once again initialized to 0.
+%%
+%% The commands ``gl:uniform{1|2|3|4}{f|i|ui}v'' can be used to modify a single uniform
+%% variable or a uniform variable array. These commands pass a count and a pointer to the
+%% values to be loaded into a uniform variable or a uniform variable array. A count of 1
+%% should be used if modifying the value of a single uniform variable, and a count of 1 or
+%% greater can be used to modify an entire array or part of an array. When loading `n'
+%% elements starting at an arbitrary position `m' in a uniform variable array, elements
+%% `m' + `n' - 1 in the array will be replaced with the new values. If `M' + `N'
+%% - 1 is larger than the size of the uniform variable array, values for all array elements
+%% beyond the end of the array will be ignored. The number specified in the name of the command
+%% indicates the number of components for each element in `Value' , and it should match
+%% the number of components in the data type of the specified uniform variable (e.g., `1'
+%% for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The data type specified
+%% in the name of the command must match the data type for the specified uniform variable
+%% as described previously for ``gl:uniform{1|2|3|4}{f|i|ui}''.
+%%
+%% For uniform variable arrays, each element of the array is considered to be of the type
+%% indicated in the name of the command (e.g., ``gl:uniform3f'' or ``gl:uniform3fv''
+%% can be used to load a uniform variable array of type vec3). The number of elements of
+%% the uniform variable array to be modified is specified by `Count'
+%%
+%% The commands ``gl:uniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv'' are used to modify
+%% a matrix or an array of matrices. The numbers in the command name are interpreted as the
+%% dimensionality of the matrix. The number `2' indicates a 2 � 2 matrix (i.e., 4 values),
+%% the number `3' indicates a 3 � 3 matrix (i.e., 9 values), and the number `4'
+%% indicates a 4 � 4 matrix (i.e., 16 values). Non-square matrix dimensionality is explicit,
+%% with the first number representing the number of columns and the second number representing
+%% the number of rows. For example, `2x4' indicates a 2 � 4 matrix with 2 columns and
+%% 4 rows (i.e., 8 values). If `Transpose' is `?GL_FALSE', each matrix is assumed
+%% to be supplied in column major order. If `Transpose' is `?GL_TRUE', each matrix
+%% is assumed to be supplied in row major order. The `Count' argument indicates the
+%% number of matrices to be passed. A count of 1 should be used if modifying the value of
+%% a single matrix, and a count greater than 1 can be used to modify an array of matrices.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
+-spec uniform1f(Location, V0) -> ok when Location :: integer(),V0 :: float().
uniform1f(Location,V0) ->
cast(5475, <<Location:?GLint,V0:?GLfloat>>).
-%% @spec (Location::integer(),V0::float(),V1::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform2f(integer(),float(),float()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform2f(Location, V0, V1) -> ok when Location :: integer(),V0 :: float(),V1 :: float().
uniform2f(Location,V0,V1) ->
cast(5476, <<Location:?GLint,V0:?GLfloat,V1:?GLfloat>>).
-%% @spec (Location::integer(),V0::float(),V1::float(),V2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform3f(integer(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform3f(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
uniform3f(Location,V0,V1,V2) ->
cast(5477, <<Location:?GLint,V0:?GLfloat,V1:?GLfloat,V2:?GLfloat>>).
-%% @spec (Location::integer(),V0::float(),V1::float(),V2::float(),V3::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform4f(integer(),float(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform4f(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
uniform4f(Location,V0,V1,V2,V3) ->
cast(5478, <<Location:?GLint,V0:?GLfloat,V1:?GLfloat,V2:?GLfloat,V3:?GLfloat>>).
-%% @spec (Location::integer(),V0::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1i(integer(),integer()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform1i(Location, V0) -> ok when Location :: integer(),V0 :: integer().
uniform1i(Location,V0) ->
cast(5479, <<Location:?GLint,V0:?GLint>>).
-%% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform2i(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform2i(Location, V0, V1) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer().
uniform2i(Location,V0,V1) ->
cast(5480, <<Location:?GLint,V0:?GLint,V1:?GLint>>).
-%% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform3i(integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform3i(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
uniform3i(Location,V0,V1,V2) ->
cast(5481, <<Location:?GLint,V0:?GLint,V1:?GLint,V2:?GLint>>).
-%% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform4i(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform4i(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
uniform4i(Location,V0,V1,V2,V3) ->
cast(5482, <<Location:?GLint,V0:?GLint,V1:?GLint,V2:?GLint,V3:?GLint>>).
-%% @spec (Location::integer(),Value::[float()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1fv(integer(),[float()]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform1fv(Location, Value) -> ok when Location :: integer(),Value :: [float()].
uniform1fv(Location,Value) ->
cast(5483, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLfloat>> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>).
-%% @spec (Location::integer(),Value::[{float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform2fv(integer(),[{float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform2fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float()}].
uniform2fv(Location,Value) ->
cast(5484, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat>> || {V1,V2} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform3fv(integer(),[{float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform3fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float()}].
uniform3fv(Location,Value) ->
cast(5485, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat>> || {V1,V2,V3} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform4fv(integer(),[{float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform4fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float(),float()}].
uniform4fv(Location,Value) ->
cast(5486, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1iv(integer(),[integer()]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform1iv(Location, Value) -> ok when Location :: integer(),Value :: [integer()].
uniform1iv(Location,Value) ->
cast(5487, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLint>> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>).
-%% @spec (Location::integer(),Value::[{integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform2iv(integer(),[{integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform2iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer()}].
uniform2iv(Location,Value) ->
cast(5488, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint>> || {V1,V2} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform3iv(integer(),[{integer(),integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform3iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer()}].
uniform3iv(Location,Value) ->
cast(5489, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint>> || {V1,V2,V3} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform4iv(integer(),[{integer(),integer(),integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform4iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
uniform4iv(Location,Value) ->
cast(5490, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix.xml">external</a> documentation.
--spec uniformMatrix2fv(integer(),0|1,[{float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
uniformMatrix2fv(Location,Transpose,Value) ->
cast(5491, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix.xml">external</a> documentation.
--spec uniformMatrix3fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix3fv(Location,Transpose,Value) ->
cast(5492, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix.xml">external</a> documentation.
--spec uniformMatrix4fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4fv(Location,Transpose,Value) ->
cast(5493, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat,V13:?GLfloat,V14:?GLfloat,V15:?GLfloat,V16:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>).
-%% @spec (Program::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgram.xml">external</a> documentation.
--spec validateProgram(integer()) -> ok.
+%% @doc Validates a program object
+%%
+%% ``gl:validateProgram'' checks to see whether the executables contained in `Program'
+%% can execute given the current OpenGL state. The information generated by the validation
+%% process will be stored in `Program' 's information log. The validation information
+%% may consist of an empty string, or it may be a string containing information about how
+%% the current program object interacts with the rest of current OpenGL state. This provides
+%% a way for OpenGL implementers to convey more information about why the current program
+%% is inefficient, suboptimal, failing to execute, and so on.
+%%
+%% The status of the validation operation will be stored as part of the program object's
+%% state. This value will be set to `?GL_TRUE' if the validation succeeded, and `?GL_FALSE'
+%% otherwise. It can be queried by calling {@link gl:getProgramiv/2} with arguments `Program'
+%% and `?GL_VALIDATE_STATUS'. If validation is successful, `Program' is guaranteed
+%% to execute given the current state. Otherwise, `Program' is guaranteed to not execute.
+%%
+%%
+%% This function is typically useful only during application development. The informational
+%% string stored in the information log is completely implementation dependent; therefore,
+%% an application should not expect different OpenGL implementations to produce identical
+%% information strings.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgram.xml">external</a> documentation.
+-spec validateProgram(Program) -> ok when Program :: integer().
validateProgram(Program) ->
cast(5494, <<Program:?GLuint>>).
-%% @spec (Index::integer(),X::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib1d(integer(),float()) -> ok.
+%% @doc Specifies the value of a generic vertex attribute
+%%
+%% The ``gl:vertexAttrib'' family of entry points allows an application to pass generic
+%% vertex attributes in numbered locations.
+%%
+%% Generic attributes are defined as four-component values that are organized into an array.
+%% The first entry of this array is numbered 0, and the size of the array is specified by
+%% the implementation-dependent constant `?GL_MAX_VERTEX_ATTRIBS'. Individual elements
+%% of this array can be modified with a ``gl:vertexAttrib'' call that specifies the index
+%% of the element to be modified and a value for that element.
+%%
+%% These commands can be used to specify one, two, three, or all four components of the generic
+%% vertex attribute specified by `Index' . A `1' in the name of the command indicates
+%% that only one value is passed, and it will be used to modify the first component of the
+%% generic vertex attribute. The second and third components will be set to 0, and the fourth
+%% component will be set to 1. Similarly, a `2' in the name of the command indicates
+%% that values are provided for the first two components, the third component will be set
+%% to 0, and the fourth component will be set to 1. A `3' in the name of the command
+%% indicates that values are provided for the first three components and the fourth component
+%% will be set to 1, whereas a `4' in the name indicates that values are provided for
+%% all four components.
+%%
+%% The letters `s', `f', `i', `d', `ub', `us', and `ui'
+%% indicate whether the arguments are of type short, float, int, double, unsigned byte, unsigned
+%% short, or unsigned int. When `v' is appended to the name, the commands can take a
+%% pointer to an array of such values.
+%%
+%% Additional capitalized letters can indicate further alterations to the default behavior
+%% of the glVertexAttrib function:
+%%
+%% The commands containing `N' indicate that the arguments will be passed as fixed-point
+%% values that are scaled to a normalized range according to the component conversion rules
+%% defined by the OpenGL specification. Signed values are understood to represent fixed-point
+%% values in the range [-1,1], and unsigned values are understood to represent fixed-point
+%% values in the range [0,1].
+%%
+%% The commands containing `I' indicate that the arguments are extended to full signed
+%% or unsigned integers.
+%%
+%% The commands containing `P' indicate that the arguments are stored as packed components
+%% within a larger natural type.
+%%
+%% The commands containing `L' indicate that the arguments are full 64-bit quantities
+%% and should be passed directly to shader inputs declared as 64-bit double precision types.
+%%
+%%
+%% OpenGL Shading Language attribute variables are allowed to be of type mat2, mat3, or mat4.
+%% Attributes of these types may be loaded using the ``gl:vertexAttrib'' entry points.
+%% Matrices must be loaded into successive generic attribute slots in column major order,
+%% with one column of the matrix in each generic attribute slot.
+%%
+%% A user-defined attribute variable declared in a vertex shader can be bound to a generic
+%% attribute index by calling {@link gl:bindAttribLocation/3} . This allows an application
+%% to use more descriptive variable names in a vertex shader. A subsequent change to the
+%% specified generic vertex attribute will be immediately reflected as a change to the corresponding
+%% attribute variable in the vertex shader.
+%%
+%% The binding between a generic vertex attribute index and a user-defined attribute variable
+%% in a vertex shader is part of the state of a program object, but the current value of
+%% the generic vertex attribute is not. The value of each generic vertex attribute is part
+%% of current state, just like standard vertex attributes, and it is maintained even if a
+%% different program object is used.
+%%
+%% An application may freely modify generic vertex attributes that are not bound to a named
+%% vertex shader attribute variable. These values are simply maintained as part of current
+%% state and will not be accessed by the vertex shader. If a generic vertex attribute bound
+%% to an attribute variable in a vertex shader is not updated while the vertex shader is
+%% executing, the vertex shader will repeatedly use the current value for the generic vertex
+%% attribute.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
+-spec vertexAttrib1d(Index, X) -> ok when Index :: integer(),X :: float().
vertexAttrib1d(Index,X) ->
cast(5495, <<Index:?GLuint,0:32,X:?GLdouble>>).
-%% @spec (Index,{X}) -> ok
%% @equiv vertexAttrib1d(Index,X)
--spec vertexAttrib1dv(integer(),{float()}) -> ok.
+-spec vertexAttrib1dv(Index :: integer(),V) -> ok when V :: {X :: float()}.
vertexAttrib1dv(Index,{X}) -> vertexAttrib1d(Index,X).
-%% @spec (Index::integer(),X::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib1f(integer(),float()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib1f(Index, X) -> ok when Index :: integer(),X :: float().
vertexAttrib1f(Index,X) ->
cast(5496, <<Index:?GLuint,X:?GLfloat>>).
-%% @spec (Index,{X}) -> ok
%% @equiv vertexAttrib1f(Index,X)
--spec vertexAttrib1fv(integer(),{float()}) -> ok.
+-spec vertexAttrib1fv(Index :: integer(),V) -> ok when V :: {X :: float()}.
vertexAttrib1fv(Index,{X}) -> vertexAttrib1f(Index,X).
-%% @spec (Index::integer(),X::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib1s(integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib1s(Index, X) -> ok when Index :: integer(),X :: integer().
vertexAttrib1s(Index,X) ->
cast(5497, <<Index:?GLuint,X:?GLshort>>).
-%% @spec (Index,{X}) -> ok
%% @equiv vertexAttrib1s(Index,X)
--spec vertexAttrib1sv(integer(),{integer()}) -> ok.
+-spec vertexAttrib1sv(Index :: integer(),V) -> ok when V :: {X :: integer()}.
vertexAttrib1sv(Index,{X}) -> vertexAttrib1s(Index,X).
-%% @spec (Index::integer(),X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib2d(integer(),float(),float()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib2d(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float().
vertexAttrib2d(Index,X,Y) ->
cast(5498, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble>>).
-%% @spec (Index,{X,Y}) -> ok
%% @equiv vertexAttrib2d(Index,X,Y)
--spec vertexAttrib2dv(integer(),{float(),float()}) -> ok.
+-spec vertexAttrib2dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}.
vertexAttrib2dv(Index,{X,Y}) -> vertexAttrib2d(Index,X,Y).
-%% @spec (Index::integer(),X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib2f(integer(),float(),float()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib2f(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float().
vertexAttrib2f(Index,X,Y) ->
cast(5499, <<Index:?GLuint,X:?GLfloat,Y:?GLfloat>>).
-%% @spec (Index,{X,Y}) -> ok
%% @equiv vertexAttrib2f(Index,X,Y)
--spec vertexAttrib2fv(integer(),{float(),float()}) -> ok.
+-spec vertexAttrib2fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}.
vertexAttrib2fv(Index,{X,Y}) -> vertexAttrib2f(Index,X,Y).
-%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib2s(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib2s(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer().
vertexAttrib2s(Index,X,Y) ->
cast(5500, <<Index:?GLuint,X:?GLshort,Y:?GLshort>>).
-%% @spec (Index,{X,Y}) -> ok
%% @equiv vertexAttrib2s(Index,X,Y)
--spec vertexAttrib2sv(integer(),{integer(),integer()}) -> ok.
+-spec vertexAttrib2sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}.
vertexAttrib2sv(Index,{X,Y}) -> vertexAttrib2s(Index,X,Y).
-%% @spec (Index::integer(),X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib3d(integer(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib3d(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float().
vertexAttrib3d(Index,X,Y,Z) ->
cast(5501, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec (Index,{X,Y,Z}) -> ok
%% @equiv vertexAttrib3d(Index,X,Y,Z)
--spec vertexAttrib3dv(integer(),{float(),float(),float()}) -> ok.
+-spec vertexAttrib3dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
vertexAttrib3dv(Index,{X,Y,Z}) -> vertexAttrib3d(Index,X,Y,Z).
-%% @spec (Index::integer(),X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib3f(integer(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib3f(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float().
vertexAttrib3f(Index,X,Y,Z) ->
cast(5502, <<Index:?GLuint,X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
-%% @spec (Index,{X,Y,Z}) -> ok
%% @equiv vertexAttrib3f(Index,X,Y,Z)
--spec vertexAttrib3fv(integer(),{float(),float(),float()}) -> ok.
+-spec vertexAttrib3fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
vertexAttrib3fv(Index,{X,Y,Z}) -> vertexAttrib3f(Index,X,Y,Z).
-%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib3s(integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib3s(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
vertexAttrib3s(Index,X,Y,Z) ->
cast(5503, <<Index:?GLuint,X:?GLshort,Y:?GLshort,Z:?GLshort>>).
-%% @spec (Index,{X,Y,Z}) -> ok
%% @equiv vertexAttrib3s(Index,X,Y,Z)
--spec vertexAttrib3sv(integer(),{integer(),integer(),integer()}) -> ok.
+-spec vertexAttrib3sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertexAttrib3sv(Index,{X,Y,Z}) -> vertexAttrib3s(Index,X,Y,Z).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4Nbv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4Nbv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Nbv(Index,{V1,V2,V3,V4}) ->
cast(5504, <<Index:?GLuint,V1:?GLbyte,V2:?GLbyte,V3:?GLbyte,V4:?GLbyte>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4Niv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4Niv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Niv(Index,{V1,V2,V3,V4}) ->
cast(5505, <<Index:?GLuint,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4Nsv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4Nsv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Nsv(Index,{V1,V2,V3,V4}) ->
cast(5506, <<Index:?GLuint,V1:?GLshort,V2:?GLshort,V3:?GLshort,V4:?GLshort>>).
-%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4Nub(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4Nub(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertexAttrib4Nub(Index,X,Y,Z,W) ->
cast(5507, <<Index:?GLuint,X:?GLubyte,Y:?GLubyte,Z:?GLubyte,W:?GLubyte>>).
-%% @spec (Index,{X,Y,Z,W}) -> ok
%% @equiv vertexAttrib4Nub(Index,X,Y,Z,W)
--spec vertexAttrib4Nubv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+-spec vertexAttrib4Nubv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertexAttrib4Nubv(Index,{X,Y,Z,W}) -> vertexAttrib4Nub(Index,X,Y,Z,W).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4Nuiv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4Nuiv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Nuiv(Index,{V1,V2,V3,V4}) ->
cast(5508, <<Index:?GLuint,V1:?GLuint,V2:?GLuint,V3:?GLuint,V4:?GLuint>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4Nusv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4Nusv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Nusv(Index,{V1,V2,V3,V4}) ->
cast(5509, <<Index:?GLuint,V1:?GLushort,V2:?GLushort,V3:?GLushort,V4:?GLushort>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4bv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4bv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4bv(Index,{V1,V2,V3,V4}) ->
cast(5510, <<Index:?GLuint,V1:?GLbyte,V2:?GLbyte,V3:?GLbyte,V4:?GLbyte>>).
-%% @spec (Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4d(integer(),float(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4d(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
vertexAttrib4d(Index,X,Y,Z,W) ->
cast(5511, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
-%% @spec (Index,{X,Y,Z,W}) -> ok
%% @equiv vertexAttrib4d(Index,X,Y,Z,W)
--spec vertexAttrib4dv(integer(),{float(),float(),float(),float()}) -> ok.
+-spec vertexAttrib4dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertexAttrib4dv(Index,{X,Y,Z,W}) -> vertexAttrib4d(Index,X,Y,Z,W).
-%% @spec (Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4f(integer(),float(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4f(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
vertexAttrib4f(Index,X,Y,Z,W) ->
cast(5512, <<Index:?GLuint,X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
-%% @spec (Index,{X,Y,Z,W}) -> ok
%% @equiv vertexAttrib4f(Index,X,Y,Z,W)
--spec vertexAttrib4fv(integer(),{float(),float(),float(),float()}) -> ok.
+-spec vertexAttrib4fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertexAttrib4fv(Index,{X,Y,Z,W}) -> vertexAttrib4f(Index,X,Y,Z,W).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4iv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4iv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4iv(Index,{V1,V2,V3,V4}) ->
cast(5513, <<Index:?GLuint,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
-%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4s(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4s(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertexAttrib4s(Index,X,Y,Z,W) ->
cast(5514, <<Index:?GLuint,X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
-%% @spec (Index,{X,Y,Z,W}) -> ok
%% @equiv vertexAttrib4s(Index,X,Y,Z,W)
--spec vertexAttrib4sv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+-spec vertexAttrib4sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertexAttrib4sv(Index,{X,Y,Z,W}) -> vertexAttrib4s(Index,X,Y,Z,W).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4ubv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4ubv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4ubv(Index,{V1,V2,V3,V4}) ->
cast(5515, <<Index:?GLuint,V1:?GLubyte,V2:?GLubyte,V3:?GLubyte,V4:?GLubyte>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4uiv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4uiv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4uiv(Index,{V1,V2,V3,V4}) ->
cast(5516, <<Index:?GLuint,V1:?GLuint,V2:?GLuint,V3:?GLuint,V4:?GLuint>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib4usv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttrib4usv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4usv(Index,{V1,V2,V3,V4}) ->
cast(5517, <<Index:?GLuint,V1:?GLushort,V2:?GLushort,V3:?GLushort,V4:?GLushort>>).
-%% @spec (Index::integer(),Size::integer(),Type::enum(),Normalized::0|1,Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml">external</a> documentation.
--spec vertexAttribPointer(integer(),integer(),enum(),0|1,integer(),offset()|mem()) -> ok.
+%% @doc Define an array of generic vertex attribute data
+%%
+%% ``gl:vertexAttribPointer'', ``gl:vertexAttribIPointer'' and ``gl:vertexAttribLPointer''
+%% specify the location and data format of the array of generic vertex attributes at index `Index'
+%% to use when rendering. `Size' specifies the number of components per attribute and
+%% must be 1, 2, 3, 4, or `?GL_BGRA'. `Type' specifies the data type of each component,
+%% and `Stride' specifies the byte stride from one attribute to the next, allowing vertices
+%% and attributes to be packed into a single array or stored in separate arrays.
+%%
+%% For ``gl:vertexAttribPointer'', if `Normalized' is set to `?GL_TRUE', it
+%% indicates that values stored in an integer format are to be mapped to the range [-1,1]
+%% (for signed values) or [0,1] (for unsigned values) when they are accessed and converted
+%% to floating point. Otherwise, values will be converted to floats directly without normalization.
+%%
+%%
+%% For ``gl:vertexAttribIPointer'', only the integer types `?GL_BYTE', `?GL_UNSIGNED_BYTE'
+%% , `?GL_SHORT', `?GL_UNSIGNED_SHORT', `?GL_INT', `?GL_UNSIGNED_INT'
+%% are accepted. Values are always left as integer values.
+%%
+%% ``gl:vertexAttribLPointer'' specifies state for a generic vertex attribute array associated
+%% with a shader attribute variable declared with 64-bit double precision components. `Type'
+%% must be `?GL_DOUBLE'. `Index' , `Size' , and `Stride' behave as described
+%% for ``gl:vertexAttribPointer'' and ``gl:vertexAttribIPointer''.
+%%
+%% If `Pointer' is not NULL, a non-zero named buffer object must be bound to the `?GL_ARRAY_BUFFER'
+%% target (see {@link gl:bindBuffer/2} ), otherwise an error is generated. `Pointer'
+%% is treated as a byte offset into the buffer object's data store. The buffer object binding
+%% (`?GL_ARRAY_BUFFER_BINDING') is saved as generic vertex attribute array state (`?GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING'
+%% ) for index `Index' .
+%%
+%% When a generic vertex attribute array is specified, `Size' , `Type' , `Normalized'
+%% , `Stride' , and `Pointer' are saved as vertex array state, in addition to the
+%% current vertex array buffer object binding.
+%%
+%% To enable and disable a generic vertex attribute array, call {@link gl:disableVertexAttribArray/1}
+%% and {@link gl:disableVertexAttribArray/1} with `Index' . If enabled, the generic vertex
+%% attribute array is used when {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4}
+%% , see `glMultiDrawElements', or {@link gl:drawRangeElements/6} is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml">external</a> documentation.
+-spec vertexAttribPointer(Index, Size, Type, Normalized, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Normalized :: 0|1,Stride :: integer(),Pointer :: offset()|mem().
vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) when is_integer(Pointer) ->
cast(5518, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Normalized:?GLboolean,0:24,Stride:?GLsizei,Pointer:?GLuint>>);
vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) ->
send_bin(Pointer),
cast(5519, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Normalized:?GLboolean,0:24,Stride:?GLsizei>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix2x.xml">external</a> documentation.
--spec uniformMatrix2x3fv(integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix2x3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
uniformMatrix2x3fv(Location,Transpose,Value) ->
cast(5520, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix3x.xml">external</a> documentation.
--spec uniformMatrix3x2fv(integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix3x2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
uniformMatrix3x2fv(Location,Transpose,Value) ->
cast(5521, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix2x.xml">external</a> documentation.
--spec uniformMatrix2x4fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix2x4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix2x4fv(Location,Transpose,Value) ->
cast(5522, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix4x.xml">external</a> documentation.
--spec uniformMatrix4x2fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix4x2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4x2fv(Location,Transpose,Value) ->
cast(5523, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix3x.xml">external</a> documentation.
--spec uniformMatrix3x4fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix3x4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix3x4fv(Location,Transpose,Value) ->
cast(5524, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix4x.xml">external</a> documentation.
--spec uniformMatrix4x3fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix4x3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4x3fv(Location,Transpose,Value) ->
cast(5525, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
-%% @spec (Index::integer(),R::0|1,G::0|1,B::0|1,A::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMaski.xml">external</a> documentation.
--spec colorMaski(integer(),0|1,0|1,0|1,0|1) -> ok.
+%% @doc glColorMaski
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMaski.xml">external</a> documentation.
+-spec colorMaski(Index, R, G, B, A) -> ok when Index :: integer(),R :: 0|1,G :: 0|1,B :: 0|1,A :: 0|1.
colorMaski(Index,R,G,B,A) ->
cast(5526, <<Index:?GLuint,R:?GLboolean,G:?GLboolean,B:?GLboolean,A:?GLboolean>>).
-%% @spec (Target::enum(),Index::integer()) -> [0|1]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBooleani_v.xml">external</a> documentation.
--spec getBooleani_v(enum(),integer()) -> [0|1].
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getBooleani_v(Target, Index) -> [0|1] when Target :: enum(),Index :: integer().
getBooleani_v(Target,Index) ->
call(5527, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetIntegeri_v.xml">external</a> documentation.
--spec getIntegeri_v(enum(),integer()) -> [integer()].
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getIntegeri_v(Target, Index) -> [integer()] when Target :: enum(),Index :: integer().
getIntegeri_v(Target,Index) ->
call(5528, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml">external</a> documentation.
--spec enablei(enum(),integer()) -> ok.
+%% @doc
+%% See {@link enable/1}
+-spec enablei(Target, Index) -> ok when Target :: enum(),Index :: integer().
enablei(Target,Index) ->
cast(5529, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDisable.xml">external</a> documentation.
--spec disablei(enum(),integer()) -> ok.
+%% @doc glEnablei
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnablei.xml">external</a> documentation.
+-spec disablei(Target, Index) -> ok when Target :: enum(),Index :: integer().
disablei(Target,Index) ->
cast(5530, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsEnabledi.xml">external</a> documentation.
--spec isEnabledi(enum(),integer()) -> 0|1.
+%% @doc glIsEnabledi
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsEnabledi.xml">external</a> documentation.
+-spec isEnabledi(Target, Index) -> 0|1 when Target :: enum(),Index :: integer().
isEnabledi(Target,Index) ->
call(5531, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (PrimitiveMode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginTransformFeedback.xml">external</a> documentation.
--spec beginTransformFeedback(enum()) -> ok.
+%% @doc Start transform feedback operation
+%%
+%% Transform feedback mode captures the values of varying variables written by the vertex
+%% shader (or, if active, the geometry shader). Transform feedback is said to be active after
+%% a call to ``gl:beginTransformFeedback'' until a subsequent call to {@link gl:beginTransformFeedback/1}
+%% . Transform feedback commands must be paired.
+%%
+%% If no geometry shader is present, while transform feedback is active the `Mode'
+%% parameter to {@link gl:drawArrays/3} must match those specified in the following table: <table>
+%% <tbody><tr><td>` Transform Feedback ' `PrimitiveMode' </td><td>` Allowed Render Primitive '
+%% `Modes' </td></tr></tbody><tbody><tr><td>`?GL_POINTS'</td><td>`?GL_POINTS'</td>
+%% </tr><tr><td>`?GL_LINES'</td><td>`?GL_LINES', `?GL_LINE_LOOP', `?GL_LINE_STRIP'
+%% , `?GL_LINES_ADJACENCY', `?GL_LINE_STRIP_ADJACENCY'</td></tr><tr><td>`?GL_TRIANGLES'
+%% </td><td>`?GL_TRIANGLES', `?GL_TRIANGLE_STRIP', `?GL_TRIANGLE_FAN', `?GL_TRIANGLES_ADJACENCY'
+%% , `?GL_TRIANGLE_STRIP_ADJACENCY'</td></tr></tbody></table>
+%%
+%% If a geometry shader is present, the output primitive type from the geometry shader must
+%% match those provided in the following table: <table><tbody><tr><td>` Transform Feedback '
+%% `PrimitiveMode' </td><td>` Allowed Geometry Shader Output Primitive Type '</td></tr>
+%% </tbody><tbody><tr><td>`?GL_POINTS'</td><td>`?points'</td></tr><tr><td>`?GL_LINES'
+%% </td><td>`?line_strip'</td></tr><tr><td>`?GL_TRIANGLES'</td><td>`?triangle_strip'
+%% </td></tr></tbody></table>
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginTransformFeedback.xml">external</a> documentation.
+-spec beginTransformFeedback(PrimitiveMode) -> ok when PrimitiveMode :: enum().
beginTransformFeedback(PrimitiveMode) ->
cast(5532, <<PrimitiveMode:?GLenum>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEndTransformFeedback.xml">external</a> documentation.
+%% @doc
+%% See {@link beginTransformFeedback/1}
-spec endTransformFeedback() -> ok.
endTransformFeedback() ->
cast(5533, <<>>).
-%% @spec (Target::enum(),Index::integer(),Buffer::integer(),Offset::integer(),Size::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBufferRange.xml">external</a> documentation.
--spec bindBufferRange(enum(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc Bind a range within a buffer object to an indexed buffer target
+%%
+%% ``gl:bindBufferRange'' binds a range the buffer object `Buffer' represented by `Offset'
+%% and `Size' to the binding point at index `Index' of the array of targets specified
+%% by `Target' . Each `Target' represents an indexed array of buffer binding points,
+%% as well as a single general binding point that can be used by other buffer manipulation
+%% functions such as {@link gl:bindBuffer/2} or see `glMapBuffer'. In addition to binding
+%% a range of `Buffer' to the indexed buffer binding target, ``gl:bindBufferBase''
+%% also binds the range to the generic buffer binding point specified by `Target' .
+%%
+%% `Offset' specifies the offset in basic machine units into the buffer object `Buffer'
+%% and `Size' specifies the amount of data that can be read from the buffer object
+%% while used as an indexed target.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBufferRange.xml">external</a> documentation.
+-spec bindBufferRange(Target, Index, Buffer, Offset, Size) -> ok when Target :: enum(),Index :: integer(),Buffer :: integer(),Offset :: integer(),Size :: integer().
bindBufferRange(Target,Index,Buffer,Offset,Size) ->
cast(5534, <<Target:?GLenum,Index:?GLuint,Buffer:?GLuint,0:32,Offset:?GLintptr,Size:?GLsizeiptr>>).
-%% @spec (Target::enum(),Index::integer(),Buffer::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBufferBase.xml">external</a> documentation.
--spec bindBufferBase(enum(),integer(),integer()) -> ok.
+%% @doc Bind a buffer object to an indexed buffer target
+%%
+%% ``gl:bindBufferBase'' binds the buffer object `Buffer' to the binding point at
+%% index `Index' of the array of targets specified by `Target' . Each `Target'
+%% represents an indexed array of buffer binding points, as well as a single general binding
+%% point that can be used by other buffer manipulation functions such as {@link gl:bindBuffer/2}
+%% or see `glMapBuffer'. In addition to binding `Buffer' to the indexed buffer
+%% binding target, ``gl:bindBufferBase'' also binds `Buffer' to the generic buffer
+%% binding point specified by `Target' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBufferBase.xml">external</a> documentation.
+-spec bindBufferBase(Target, Index, Buffer) -> ok when Target :: enum(),Index :: integer(),Buffer :: integer().
bindBufferBase(Target,Index,Buffer) ->
cast(5535, <<Target:?GLenum,Index:?GLuint,Buffer:?GLuint>>).
-%% @spec (Program::integer(),Varyings::[string()],BufferMode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTransformFeedbackVaryings.xml">external</a> documentation.
--spec transformFeedbackVaryings(integer(),[string()],enum()) -> ok.
+%% @doc Specify values to record in transform feedback buffers
+%%
+%% The names of the vertex or geometry shader outputs to be recorded in transform feedback
+%% mode are specified using ``gl:transformFeedbackVaryings''. When a geometry shader is
+%% active, transform feedback records the values of selected geometry shader output variables
+%% from the emitted vertices. Otherwise, the values of the selected vertex shader outputs
+%% are recorded.
+%%
+%% The state set by ``gl:tranformFeedbackVaryings'' is stored and takes effect next time {@link gl:linkProgram/1}
+%% is called on `Program' . When {@link gl:linkProgram/1} is called, `Program' is
+%% linked so that the values of the specified varying variables for the vertices of each
+%% primitive generated by the GL are written to a single buffer object if `BufferMode'
+%% is `?GL_INTERLEAVED_ATTRIBS' or multiple buffer objects if `BufferMode' is `?GL_SEPARATE_ATTRIBS'
+%% .
+%%
+%% In addition to the errors generated by ``gl:transformFeedbackVaryings'', the program `Program'
+%% will fail to link if:
+%%
+%% The count specified by ``gl:transformFeedbackVaryings'' is non-zero, but the program
+%% object has no vertex or geometry shader.
+%%
+%% Any variable name specified in the `Varyings' array is not declared as an output
+%% in the vertex shader (or the geometry shader, if active).
+%%
+%% Any two entries in the `Varyings' array specify the same varying variable.
+%%
+%% The total number of components to capture in any varying variable in `Varyings'
+%% is greater than the constant `?GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS' and
+%% the buffer mode is `?GL_SEPARATE_ATTRIBS'.
+%%
+%% The total number of components to capture is greater than the constant `?GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS'
+%% and the buffer mode is `?GL_INTERLEAVED_ATTRIBS'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTransformFeedbackVaryings.xml">external</a> documentation.
+-spec transformFeedbackVaryings(Program, Varyings, BufferMode) -> ok when Program :: integer(),Varyings :: [string()],BufferMode :: enum().
transformFeedbackVaryings(Program,Varyings,BufferMode) ->
VaryingsTemp = list_to_binary([[Str|[0]] || Str <- Varyings ]),
cast(5536, <<Program:?GLuint,(length(Varyings)):?GLuint,(size(VaryingsTemp)):?GLuint,(VaryingsTemp)/binary,0:((8-((size(VaryingsTemp)+0) rem 8)) rem 8),BufferMode:?GLenum>>).
-%% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTransformFeedbackVarying.xml">external</a> documentation.
--spec getTransformFeedbackVarying(integer(),integer(),integer()) -> {integer(),enum(),string()}.
+%% @doc Retrieve information about varying variables selected for transform feedback
+%%
+%% Information about the set of varying variables in a linked program that will be captured
+%% during transform feedback may be retrieved by calling ``gl:getTransformFeedbackVarying''.
+%% ``gl:getTransformFeedbackVarying'' provides information about the varying variable selected
+%% by `Index' . An `Index' of 0 selects the first varying variable specified in
+%% the `Varyings' array passed to {@link gl:transformFeedbackVaryings/3} , and an `Index'
+%% of `?GL_TRANSFORM_FEEDBACK_VARYINGS-1' selects the last such variable.
+%%
+%% The name of the selected varying is returned as a null-terminated string in `Name' .
+%% The actual number of characters written into `Name' , excluding the null terminator,
+%% is returned in `Length' . If `Length' is NULL, no length is returned. The maximum
+%% number of characters that may be written into `Name' , including the null terminator,
+%% is specified by `BufSize' .
+%%
+%% The length of the longest varying name in program is given by `?GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH'
+%% , which can be queried with {@link gl:getProgramiv/2} .
+%%
+%% For the selected varying variable, its type is returned into `Type' . The size of
+%% the varying is returned into `Size' . The value in `Size' is in units of the
+%% type returned in `Type' . The type returned can be any of the scalar, vector, or matrix
+%% attribute types returned by {@link gl:getActiveAttrib/3} . If an error occurred, the return
+%% parameters `Length' , `Size' , `Type' and `Name' will be unmodified.
+%% This command will return as much information about the varying variables as possible.
+%% If no information is available, `Length' will be set to zero and `Name' will
+%% be an empty string. This situation could arise if ``gl:getTransformFeedbackVarying''
+%% is called after a failed link.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTransformFeedbackVarying.xml">external</a> documentation.
+-spec getTransformFeedbackVarying(Program, Index, BufSize) -> {Size :: integer(),Type :: enum(),Name :: string()} when Program :: integer(),Index :: integer(),BufSize :: integer().
getTransformFeedbackVarying(Program,Index,BufSize) ->
call(5537, <<Program:?GLuint,Index:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Target::enum(),Clamp::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClampColor.xml">external</a> documentation.
--spec clampColor(enum(),enum()) -> ok.
+%% @doc specify whether data read via
+%%
+%% {@link gl:readPixels/7} should be clamped
+%%
+%% ``gl:clampColor'' controls color clamping that is performed during {@link gl:readPixels/7}
+%% . `Target' must be `?GL_CLAMP_READ_COLOR'. If `Clamp' is `?GL_TRUE',
+%% read color clamping is enabled; if `Clamp' is `?GL_FALSE', read color clamping
+%% is disabled. If `Clamp' is `?GL_FIXED_ONLY', read color clamping is enabled
+%% only if the selected read buffer has fixed point components and disabled otherwise.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClampColor.xml">external</a> documentation.
+-spec clampColor(Target, Clamp) -> ok when Target :: enum(),Clamp :: enum().
clampColor(Target,Clamp) ->
cast(5538, <<Target:?GLenum,Clamp:?GLenum>>).
-%% @spec (Id::integer(),Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginConditionalRender.xml">external</a> documentation.
--spec beginConditionalRender(integer(),enum()) -> ok.
+%% @doc Start conditional rendering
+%%
+%% Conditional rendering is started using ``gl:beginConditionalRender'' and ended using ``gl:endConditionalRender''
+%% . During conditional rendering, all vertex array commands, as well as {@link gl:clear/1}
+%% and {@link gl:clearBufferiv/3} have no effect if the (`?GL_SAMPLES_PASSED') result of
+%% the query object `Id' is zero, or if the (`?GL_ANY_SAMPLES_PASSED') result is `?GL_FALSE'
+%% . The results of commands setting the current vertex state, such as {@link gl:vertexAttrib1d/2}
+%% are undefined. If the (`?GL_SAMPLES_PASSED') result is non-zero or if the (`?GL_ANY_SAMPLES_PASSED'
+%% ) result is `?GL_TRUE', such commands are not discarded. The `Id' parameter to ``gl:beginConditionalRender''
+%% must be the name of a query object previously returned from a call to {@link gl:genQueries/1}
+%% . `Mode' specifies how the results of the query object are to be interpreted. If `Mode'
+%% is `?GL_QUERY_WAIT', the GL waits for the results of the query to be available and
+%% then uses the results to determine if subsequent rendering commands are discarded. If `Mode'
+%% is `?GL_QUERY_NO_WAIT', the GL may choose to unconditionally execute the subsequent
+%% rendering commands without waiting for the query to complete.
+%%
+%% If `Mode' is `?GL_QUERY_BY_REGION_WAIT', the GL will also wait for occlusion
+%% query results and discard rendering commands if the result of the occlusion query is zero.
+%% If the query result is non-zero, subsequent rendering commands are executed, but the GL
+%% may discard the results of the commands for any region of the framebuffer that did not
+%% contribute to the sample count in the specified occlusion query. Any such discarding is
+%% done in an implementation-dependent manner, but the rendering command results may not
+%% be discarded for any samples that contributed to the occlusion query sample count. If `Mode'
+%% is `?GL_QUERY_BY_REGION_NO_WAIT', the GL operates as in `?GL_QUERY_BY_REGION_WAIT'
+%% , but may choose to unconditionally execute the subsequent rendering commands without
+%% waiting for the query to complete.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginConditionalRender.xml">external</a> documentation.
+-spec beginConditionalRender(Id, Mode) -> ok when Id :: integer(),Mode :: enum().
beginConditionalRender(Id,Mode) ->
cast(5539, <<Id:?GLuint,Mode:?GLenum>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEndConditionalRender.xml">external</a> documentation.
+%% @doc
+%% See {@link beginConditionalRender/2}
-spec endConditionalRender() -> ok.
endConditionalRender() ->
cast(5540, <<>>).
-%% @spec (Index::integer(),Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribIPointer.xml">external</a> documentation.
--spec vertexAttribIPointer(integer(),integer(),enum(),integer(),offset()|mem()) -> ok.
+%% @doc glVertexAttribIPointer
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribIPointer.xml">external</a> documentation.
+-spec vertexAttribIPointer(Index, Size, Type, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
vertexAttribIPointer(Index,Size,Type,Stride,Pointer) when is_integer(Pointer) ->
cast(5541, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
vertexAttribIPointer(Index,Size,Type,Stride,Pointer) ->
send_bin(Pointer),
cast(5542, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
-%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttribI.xml">external</a> documentation.
--spec getVertexAttribIiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}.
+%% @doc
+%% See {@link getVertexAttribdv/2}
+-spec getVertexAttribIiv(Index, Pname) -> {integer(),integer(),integer(),integer()} when Index :: integer(),Pname :: enum().
getVertexAttribIiv(Index,Pname) ->
call(5543, <<Index:?GLuint,Pname:?GLenum>>).
-%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttribI.xml">external</a> documentation.
--spec getVertexAttribIuiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}.
+%% @doc glGetVertexAttribI
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttribI.xml">external</a> documentation.
+-spec getVertexAttribIuiv(Index, Pname) -> {integer(),integer(),integer(),integer()} when Index :: integer(),Pname :: enum().
getVertexAttribIuiv(Index,Pname) ->
call(5544, <<Index:?GLuint,Pname:?GLenum>>).
-%% @spec (Index::integer(),X::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI1i(integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI1i(Index, X) -> ok when Index :: integer(),X :: integer().
vertexAttribI1i(Index,X) ->
cast(5545, <<Index:?GLuint,X:?GLint>>).
-%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI2i(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI2i(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer().
vertexAttribI2i(Index,X,Y) ->
cast(5546, <<Index:?GLuint,X:?GLint,Y:?GLint>>).
-%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI3i(integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI3i(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
vertexAttribI3i(Index,X,Y,Z) ->
cast(5547, <<Index:?GLuint,X:?GLint,Y:?GLint,Z:?GLint>>).
-%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI4i(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI4i(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertexAttribI4i(Index,X,Y,Z,W) ->
cast(5548, <<Index:?GLuint,X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
-%% @spec (Index::integer(),X::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI1ui(integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI1ui(Index, X) -> ok when Index :: integer(),X :: integer().
vertexAttribI1ui(Index,X) ->
cast(5549, <<Index:?GLuint,X:?GLuint>>).
-%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI2ui(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI2ui(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer().
vertexAttribI2ui(Index,X,Y) ->
cast(5550, <<Index:?GLuint,X:?GLuint,Y:?GLuint>>).
-%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI3ui(integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI3ui(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
vertexAttribI3ui(Index,X,Y,Z) ->
cast(5551, <<Index:?GLuint,X:?GLuint,Y:?GLuint,Z:?GLuint>>).
-%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI4ui(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI4ui(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertexAttribI4ui(Index,X,Y,Z,W) ->
cast(5552, <<Index:?GLuint,X:?GLuint,Y:?GLuint,Z:?GLuint,W:?GLuint>>).
-%% @spec (Index,{X}) -> ok
%% @equiv vertexAttribI1i(Index,X)
--spec vertexAttribI1iv(integer(),{integer()}) -> ok.
+-spec vertexAttribI1iv(Index :: integer(),V) -> ok when V :: {X :: integer()}.
vertexAttribI1iv(Index,{X}) -> vertexAttribI1i(Index,X).
-%% @spec (Index,{X,Y}) -> ok
%% @equiv vertexAttribI2i(Index,X,Y)
--spec vertexAttribI2iv(integer(),{integer(),integer()}) -> ok.
+-spec vertexAttribI2iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}.
vertexAttribI2iv(Index,{X,Y}) -> vertexAttribI2i(Index,X,Y).
-%% @spec (Index,{X,Y,Z}) -> ok
%% @equiv vertexAttribI3i(Index,X,Y,Z)
--spec vertexAttribI3iv(integer(),{integer(),integer(),integer()}) -> ok.
+-spec vertexAttribI3iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertexAttribI3iv(Index,{X,Y,Z}) -> vertexAttribI3i(Index,X,Y,Z).
-%% @spec (Index,{X,Y,Z,W}) -> ok
%% @equiv vertexAttribI4i(Index,X,Y,Z,W)
--spec vertexAttribI4iv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+-spec vertexAttribI4iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertexAttribI4iv(Index,{X,Y,Z,W}) -> vertexAttribI4i(Index,X,Y,Z,W).
-%% @spec (Index,{X}) -> ok
%% @equiv vertexAttribI1ui(Index,X)
--spec vertexAttribI1uiv(integer(),{integer()}) -> ok.
+-spec vertexAttribI1uiv(Index :: integer(),V) -> ok when V :: {X :: integer()}.
vertexAttribI1uiv(Index,{X}) -> vertexAttribI1ui(Index,X).
-%% @spec (Index,{X,Y}) -> ok
%% @equiv vertexAttribI2ui(Index,X,Y)
--spec vertexAttribI2uiv(integer(),{integer(),integer()}) -> ok.
+-spec vertexAttribI2uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}.
vertexAttribI2uiv(Index,{X,Y}) -> vertexAttribI2ui(Index,X,Y).
-%% @spec (Index,{X,Y,Z}) -> ok
%% @equiv vertexAttribI3ui(Index,X,Y,Z)
--spec vertexAttribI3uiv(integer(),{integer(),integer(),integer()}) -> ok.
+-spec vertexAttribI3uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertexAttribI3uiv(Index,{X,Y,Z}) -> vertexAttribI3ui(Index,X,Y,Z).
-%% @spec (Index,{X,Y,Z,W}) -> ok
%% @equiv vertexAttribI4ui(Index,X,Y,Z,W)
--spec vertexAttribI4uiv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+-spec vertexAttribI4uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertexAttribI4uiv(Index,{X,Y,Z,W}) -> vertexAttribI4ui(Index,X,Y,Z,W).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI4bv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI4bv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttribI4bv(Index,{V1,V2,V3,V4}) ->
cast(5553, <<Index:?GLuint,V1:?GLbyte,V2:?GLbyte,V3:?GLbyte,V4:?GLbyte>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI4sv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI4sv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttribI4sv(Index,{V1,V2,V3,V4}) ->
cast(5554, <<Index:?GLuint,V1:?GLshort,V2:?GLshort,V3:?GLshort,V4:?GLshort>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI4ubv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI4ubv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttribI4ubv(Index,{V1,V2,V3,V4}) ->
cast(5555, <<Index:?GLuint,V1:?GLubyte,V2:?GLubyte,V3:?GLubyte,V4:?GLubyte>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribI.xml">external</a> documentation.
--spec vertexAttribI4usv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc
+%% See {@link vertexAttrib1d/2}
+-spec vertexAttribI4usv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttribI4usv(Index,{V1,V2,V3,V4}) ->
cast(5556, <<Index:?GLuint,V1:?GLushort,V2:?GLushort,V3:?GLushort,V4:?GLushort>>).
-%% @spec (Program::integer(),Location::integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniform.xml">external</a> documentation.
--spec getUniformuiv(integer(),integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}.
+%% @doc
+%% See {@link getUniformfv/2}
+-spec getUniformuiv(Program, Location) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} when Program :: integer(),Location :: integer().
getUniformuiv(Program,Location) ->
call(5557, <<Program:?GLuint,Location:?GLint>>).
-%% @spec (Program::integer(),Color::integer(),Name::string()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFragDataLocation.xml">external</a> documentation.
--spec bindFragDataLocation(integer(),integer(),string()) -> ok.
+%% @doc Bind a user-defined varying out variable to a fragment shader color number
+%%
+%% ``gl:bindFragDataLocation'' explicitly specifies the binding of the user-defined varying
+%% out variable `Name' to fragment shader color number `ColorNumber' for program `Program'
+%% . If `Name' was bound previously, its assigned binding is replaced with `ColorNumber'
+%% . `Name' must be a null-terminated string. `ColorNumber' must be less than `?GL_MAX_DRAW_BUFFERS'
+%% .
+%%
+%% The bindings specified by ``gl:bindFragDataLocation'' have no effect until `Program'
+%% is next linked. Bindings may be specified at any time after `Program' has been created.
+%% Specifically, they may be specified before shader objects are attached to the program.
+%% Therefore, any name may be specified in `Name' , including a name that is never used
+%% as a varying out variable in any fragment shader object. Names beginning with `?gl_'
+%% are reserved by the GL.
+%%
+%% In addition to the errors generated by ``gl:bindFragDataLocation'', the program `Program'
+%% will fail to link if:
+%%
+%% The number of active outputs is greater than the value `?GL_MAX_DRAW_BUFFERS'.
+%%
+%% More than one varying out variable is bound to the same color number.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFragDataLocation.xml">external</a> documentation.
+-spec bindFragDataLocation(Program, Color, Name) -> ok when Program :: integer(),Color :: integer(),Name :: string().
bindFragDataLocation(Program,Color,Name) ->
cast(5558, <<Program:?GLuint,Color:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
-%% @spec (Program::integer(),Name::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetFragDataLocation.xml">external</a> documentation.
--spec getFragDataLocation(integer(),string()) -> integer().
+%% @doc Query the bindings of color numbers to user-defined varying out variables
+%%
+%% ``gl:getFragDataLocation'' retrieves the assigned color number binding for the user-defined
+%% varying out variable `Name' for program `Program' . `Program' must have
+%% previously been linked. `Name' must be a null-terminated string. If `Name' is
+%% not the name of an active user-defined varying out fragment shader variable within `Program'
+%% , -1 will be returned.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetFragDataLocation.xml">external</a> documentation.
+-spec getFragDataLocation(Program, Name) -> integer() when Program :: integer(),Name :: string().
getFragDataLocation(Program,Name) ->
call(5559, <<Program:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8)>>).
-%% @spec (Location::integer(),V0::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1ui(integer(),integer()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform1ui(Location, V0) -> ok when Location :: integer(),V0 :: integer().
uniform1ui(Location,V0) ->
cast(5560, <<Location:?GLint,V0:?GLuint>>).
-%% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform2ui(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform2ui(Location, V0, V1) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer().
uniform2ui(Location,V0,V1) ->
cast(5561, <<Location:?GLint,V0:?GLuint,V1:?GLuint>>).
-%% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform3ui(integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform3ui(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
uniform3ui(Location,V0,V1,V2) ->
cast(5562, <<Location:?GLint,V0:?GLuint,V1:?GLuint,V2:?GLuint>>).
-%% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform4ui(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform4ui(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
uniform4ui(Location,V0,V1,V2,V3) ->
cast(5563, <<Location:?GLint,V0:?GLuint,V1:?GLuint,V2:?GLuint,V3:?GLuint>>).
-%% @spec (Location::integer(),Value::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1uiv(integer(),[integer()]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform1uiv(Location, Value) -> ok when Location :: integer(),Value :: [integer()].
uniform1uiv(Location,Value) ->
cast(5564, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLuint>> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>).
-%% @spec (Location::integer(),Value::[{integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform2uiv(integer(),[{integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform2uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer()}].
uniform2uiv(Location,Value) ->
cast(5565, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint>> || {V1,V2} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform3uiv(integer(),[{integer(),integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform3uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer()}].
uniform3uiv(Location,Value) ->
cast(5566, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint,V3:?GLuint>> || {V1,V2,V3} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform4uiv(integer(),[{integer(),integer(),integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform4uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
uniform4uiv(Location,Value) ->
cast(5567, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint,V3:?GLuint,V4:?GLuint>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameterI.xml">external</a> documentation.
--spec texParameterIiv(enum(),enum(),{integer()}) -> ok.
+%% @doc
+%% See {@link texParameterf/3}
+-spec texParameterIiv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}.
texParameterIiv(Target,Pname,Params) ->
cast(5568, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameterI.xml">external</a> documentation.
--spec texParameterIuiv(enum(),enum(),{integer()}) -> ok.
+%% @doc glTexParameterI
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameterI.xml">external</a> documentation.
+-spec texParameterIuiv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}.
texParameterIuiv(Target,Pname,Params) ->
cast(5569, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLuint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
-%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameterI.xml">external</a> documentation.
--spec getTexParameterIiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
+%% @doc
+%% See {@link getTexParameterfv/2}
+-spec getTexParameterIiv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum().
getTexParameterIiv(Target,Pname) ->
call(5570, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameterI.xml">external</a> documentation.
--spec getTexParameterIuiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}.
+%% @doc glGetTexParameterI
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameterI.xml">external</a> documentation.
+-spec getTexParameterIuiv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum().
getTexParameterIuiv(Target,Pname) ->
call(5571, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearBuffer.xml">external</a> documentation.
--spec clearBufferiv(enum(),integer(),{integer()}) -> ok.
+%% @doc Clear individual buffers of the currently bound draw framebuffer
+%%
+%% ``gl:clearBuffer*'' clears the specified buffer to the specified value(s). If `Buffer'
+%% is `?GL_COLOR', a particular draw buffer `?GL_DRAWBUFFER' `I' is specified
+%% by passing `I' as `DrawBuffer' . In this case, `Value' points to a four-element
+%% vector specifying the R, G, B and A color to clear that draw buffer to. If `Buffer'
+%% is one of `?GL_FRONT', `?GL_BACK', `?GL_LEFT', `?GL_RIGHT', or `?GL_FRONT_AND_BACK'
+%% , identifying multiple buffers, each selected buffer is cleared to the same value. Clamping
+%% and conversion for fixed-point color buffers are performed in the same fashion as {@link gl:clearColor/4}
+%% .
+%%
+%% If `Buffer' is `?GL_DEPTH', `DrawBuffer' must be zero, and `Value'
+%% points to a single value to clear the depth buffer to. Only ``gl:clearBufferfv'' should
+%% be used to clear depth buffers. Clamping and conversion for fixed-point depth buffers
+%% are performed in the same fashion as {@link gl:clearDepth/1} .
+%%
+%% If `Buffer' is `?GL_STENCIL', `DrawBuffer' must be zero, and `Value'
+%% points to a single value to clear the stencil buffer to. Only ``gl:clearBufferiv'' should
+%% be used to clear stencil buffers. Masing and type conversion are performed in the same
+%% fashion as {@link gl:clearStencil/1} .
+%%
+%% ``gl:clearBufferfi'' may be used to clear the depth and stencil buffers. `Buffer'
+%% must be `?GL_DEPTH_STENCIL' and `DrawBuffer' must be zero. `Depth' and `Stencil'
+%% are the depth and stencil values, respectively.
+%%
+%% The result of ``gl:clearBuffer'' is undefined if no conversion between the type of `Value'
+%% and the buffer being cleared is defined. However, this is not an error.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearBuffer.xml">external</a> documentation.
+-spec clearBufferiv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: {integer()}.
clearBufferiv(Buffer,Drawbuffer,Value) ->
cast(5572, <<Buffer:?GLenum,Drawbuffer:?GLint,(size(Value)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>).
-%% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearBuffer.xml">external</a> documentation.
--spec clearBufferuiv(enum(),integer(),{integer()}) -> ok.
+%% @doc
+%% See {@link clearBufferiv/3}
+-spec clearBufferuiv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: {integer()}.
clearBufferuiv(Buffer,Drawbuffer,Value) ->
cast(5573, <<Buffer:?GLenum,Drawbuffer:?GLint,(size(Value)):?GLuint,
(<< <<C:?GLuint>> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>).
-%% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearBuffer.xml">external</a> documentation.
--spec clearBufferfv(enum(),integer(),{float()}) -> ok.
+%% @doc
+%% See {@link clearBufferiv/3}
+-spec clearBufferfv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: {float()}.
clearBufferfv(Buffer,Drawbuffer,Value) ->
cast(5574, <<Buffer:?GLenum,Drawbuffer:?GLint,(size(Value)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>).
-%% @spec (Buffer::enum(),Drawbuffer::integer(),Depth::float(),Stencil::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearBufferfi.xml">external</a> documentation.
--spec clearBufferfi(enum(),integer(),float(),integer()) -> ok.
+%% @doc glClearBufferfi
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearBufferfi.xml">external</a> documentation.
+-spec clearBufferfi(Buffer, Drawbuffer, Depth, Stencil) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Depth :: float(),Stencil :: integer().
clearBufferfi(Buffer,Drawbuffer,Depth,Stencil) ->
cast(5575, <<Buffer:?GLenum,Drawbuffer:?GLint,Depth:?GLfloat,Stencil:?GLint>>).
-%% @spec (Name::enum(),Index::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetString.xml">external</a> documentation.
--spec getStringi(enum(),integer()) -> string().
+%% @doc
+%% See {@link getString/1}
+-spec getStringi(Name, Index) -> string() when Name :: enum(),Index :: integer().
getStringi(Name,Index) ->
call(5576, <<Name:?GLenum,Index:?GLuint>>).
-%% @spec (Mode::enum(),First::integer(),Count::integer(),Primcount::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArraysInstance.xml">external</a> documentation.
--spec drawArraysInstanced(enum(),integer(),integer(),integer()) -> ok.
+%% @doc glDrawArraysInstance
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArraysInstance.xml">external</a> documentation.
+-spec drawArraysInstanced(Mode, First, Count, Primcount) -> ok when Mode :: enum(),First :: integer(),Count :: integer(),Primcount :: integer().
drawArraysInstanced(Mode,First,Count,Primcount) ->
cast(5577, <<Mode:?GLenum,First:?GLint,Count:?GLsizei,Primcount:?GLsizei>>).
-%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|mem(),Primcount::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstance.xml">external</a> documentation.
--spec drawElementsInstanced(enum(),integer(),enum(),offset()|mem(),integer()) -> ok.
+%% @doc glDrawElementsInstance
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstance.xml">external</a> documentation.
+-spec drawElementsInstanced(Mode, Count, Type, Indices, Primcount) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer().
drawElementsInstanced(Mode,Count,Type,Indices,Primcount) when is_integer(Indices) ->
cast(5578, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Primcount:?GLsizei>>);
drawElementsInstanced(Mode,Count,Type,Indices,Primcount) ->
send_bin(Indices),
cast(5579, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Primcount:?GLsizei>>).
-%% @spec (Target::enum(),Internalformat::enum(),Buffer::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexBuffer.xml">external</a> documentation.
--spec texBuffer(enum(),enum(),integer()) -> ok.
+%% @doc Attach the storage for a buffer object to the active buffer texture
+%%
+%% ``gl:texBuffer'' attaches the storage for the buffer object named `Buffer' to the
+%% active buffer texture, and specifies the internal format for the texel array found in
+%% the attached buffer object. If `Buffer' is zero, any buffer object attached to the
+%% buffer texture is detached and no new buffer object is attached. If `Buffer' is non-zero,
+%% it must be the name of an existing buffer object. `Target' must be `?GL_TEXTURE_BUFFER'
+%% . `Internalformat' specifies the storage format, and must be one of the following
+%% sized internal formats: <table><tbody><tr><td></td><td></td><td></td><td></td><td>` Component '
+%% </td></tr></tbody><tbody><tr><td>`Sized Internal Format'</td><td>`Base Type'</td>
+%% <td>`Components'</td><td>`Norm'</td><td>0</td><td>1</td><td>2</td><td>3</td></tr>
+%% <tr><td>`?GL_R8'</td><td>ubyte</td><td>1</td><td>YES</td><td>R</td><td>0</td><td>0</td>
+%% <td>1</td></tr><tr><td>`?GL_R16'</td><td>ushort</td><td>1</td><td>YES</td><td>R</td><td>
+%% 0</td><td>0</td><td>1</td></tr><tr><td>`?GL_R16F'</td><td>half</td><td>1</td><td>NO</td>
+%% <td>R</td><td>0</td><td>0</td><td>1</td></tr><tr><td>`?GL_R32F'</td><td>float</td><td>
+%% 1</td><td>NO</td><td>R</td><td>0</td><td>0</td><td>1</td></tr><tr><td>`?GL_R8I'</td><td>
+%% byte</td><td>1</td><td>NO</td><td>R</td><td>0</td><td>0</td><td>1</td></tr><tr><td>`?GL_R16I'
+%% </td><td>short</td><td>1</td><td>NO</td><td>R</td><td>0</td><td>0</td><td>1</td></tr><tr><td>
+%% `?GL_R32I'</td><td>int</td><td>1</td><td>NO</td><td>R</td><td>0</td><td>0</td><td>1</td>
+%% </tr><tr><td>`?GL_R8UI'</td><td>ubyte</td><td>1</td><td>NO</td><td>R</td><td>0</td><td>
+%% 0</td><td>1</td></tr><tr><td>`?GL_R16UI'</td><td>ushort</td><td>1</td><td>NO</td><td>
+%% R</td><td>0</td><td>0</td><td>1</td></tr><tr><td>`?GL_R32UI'</td><td>uint</td><td>1</td>
+%% <td>NO</td><td>R</td><td>0</td><td>0</td><td>1</td></tr><tr><td>`?GL_RG8'</td><td>ubyte
+%% </td><td>2</td><td>YES</td><td>R</td><td>G</td><td>0</td><td>1</td></tr><tr><td>`?GL_RG16'
+%% </td><td>ushort</td><td>2</td><td>YES</td><td>R</td><td>G</td><td>0</td><td>1</td></tr><tr>
+%% <td>`?GL_RG16F'</td><td>half</td><td>2</td><td>NO</td><td>R</td><td>G</td><td>0</td><td>
+%% 1</td></tr><tr><td>`?GL_RG32F'</td><td>float</td><td>2</td><td>NO</td><td>R</td><td>G
+%% </td><td>0</td><td>1</td></tr><tr><td>`?GL_RG8I'</td><td>byte</td><td>2</td><td>NO</td>
+%% <td>R</td><td>G</td><td>0</td><td>1</td></tr><tr><td>`?GL_RG16I'</td><td>short</td><td>
+%% 2</td><td>NO</td><td>R</td><td>G</td><td>0</td><td>1</td></tr><tr><td>`?GL_RG32I'</td>
+%% <td>int</td><td>2</td><td>NO</td><td>R</td><td>G</td><td>0</td><td>1</td></tr><tr><td>`?GL_RG8UI'
+%% </td><td>ubyte</td><td>2</td><td>NO</td><td>R</td><td>G</td><td>0</td><td>1</td></tr><tr><td>
+%% `?GL_RG16UI'</td><td>ushort</td><td>2</td><td>NO</td><td>R</td><td>G</td><td>0</td><td>
+%% 1</td></tr><tr><td>`?GL_RG32UI'</td><td>uint</td><td>2</td><td>NO</td><td>R</td><td>G
+%% </td><td>0</td><td>1</td></tr><tr><td>`?GL_RGB32F'</td><td>float</td><td>3</td><td>NO
+%% </td><td>R</td><td>G</td><td>B</td><td>1</td></tr><tr><td>`?GL_RGB32I'</td><td>int</td>
+%% <td>3</td><td>NO</td><td>R</td><td>G</td><td>B</td><td>1</td></tr><tr><td>`?GL_RGB32UI'
+%% </td><td>uint</td><td>3</td><td>NO</td><td>R</td><td>G</td><td>B</td><td>1</td></tr><tr><td>
+%% `?GL_RGBA8'</td><td>uint</td><td>4</td><td>YES</td><td>R</td><td>G</td><td>B</td><td>
+%% A</td></tr><tr><td>`?GL_RGBA16'</td><td>short</td><td>4</td><td>YES</td><td>R</td><td>
+%% G</td><td>B</td><td>A</td></tr><tr><td>`?GL_RGBA16F'</td><td>half</td><td>4</td><td>NO
+%% </td><td>R</td><td>G</td><td>B</td><td>A</td></tr><tr><td>`?GL_RGBA32F'</td><td>float
+%% </td><td>4</td><td>NO</td><td>R</td><td>G</td><td>B</td><td>A</td></tr><tr><td>`?GL_RGBA8I'
+%% </td><td>byte</td><td>4</td><td>NO</td><td>R</td><td>G</td><td>B</td><td>A</td></tr><tr><td>
+%% `?GL_RGBA16I'</td><td>short</td><td>4</td><td>NO</td><td>R</td><td>G</td><td>B</td><td>
+%% A</td></tr><tr><td>`?GL_RGBA32I'</td><td>int</td><td>4</td><td>NO</td><td>R</td><td>G
+%% </td><td>B</td><td>A</td></tr><tr><td>`?GL_RGBA8UI'</td><td>ubyte</td><td>4</td><td>NO
+%% </td><td>R</td><td>G</td><td>B</td><td>A</td></tr><tr><td>`?GL_RGBA16UI'</td><td>ushort
+%% </td><td>4</td><td>NO</td><td>R</td><td>G</td><td>B</td><td>A</td></tr><tr><td>`?GL_RGBA32UI'
+%% </td><td>uint</td><td>4</td><td>NO</td><td>R</td><td>G</td><td>B</td><td>A</td></tr></tbody>
+%% </table>
+%%
+%% When a buffer object is attached to a buffer texture, the buffer object's data store
+%% is taken as the texture's texel array. The number of texels in the buffer texture's texel
+%% array is given by buffer_size components� sizeof( base_type/)
+%%
+%% where `buffer_size' is the size of the buffer object, in basic machine units and
+%% components and base type are the element count and base data type for elements, as specified
+%% in the table above. The number of texels in the texel array is then clamped to the implementation-dependent
+%% limit `?GL_MAX_TEXTURE_BUFFER_SIZE'. When a buffer texture is accessed in a shader,
+%% the results of a texel fetch are undefined if the specified texel coordinate is negative,
+%% or greater than or equal to the clamped number of texels in the texel array.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexBuffer.xml">external</a> documentation.
+-spec texBuffer(Target, Internalformat, Buffer) -> ok when Target :: enum(),Internalformat :: enum(),Buffer :: integer().
texBuffer(Target,Internalformat,Buffer) ->
cast(5580, <<Target:?GLenum,Internalformat:?GLenum,Buffer:?GLuint>>).
-%% @spec (Index::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPrimitiveRestartIndex.xml">external</a> documentation.
--spec primitiveRestartIndex(integer()) -> ok.
+%% @doc Specify the primitive restart index
+%%
+%% ``gl:primitiveRestartIndex'' specifies a vertex array element that is treated specially
+%% when primitive restarting is enabled. This is known as the primitive restart index.
+%%
+%% When one of the `Draw*' commands transfers a set of generic attribute array elements
+%% to the GL, if the index within the vertex arrays corresponding to that set is equal to
+%% the primitive restart index, then the GL does not process those elements as a vertex.
+%% Instead, it is as if the drawing command ended with the immediately preceding transfer,
+%% and another drawing command is immediately started with the same parameters, but only
+%% transferring the immediately following element through the end of the originally specified
+%% elements.
+%%
+%% When either {@link gl:drawElementsBaseVertex/5} , {@link gl:drawElementsInstancedBaseVertex/6}
+%% or see `glMultiDrawElementsBaseVertex' is used, the primitive restart comparison
+%% occurs before the basevertex offset is added to the array index.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPrimitiveRestartIndex.xml">external</a> documentation.
+-spec primitiveRestartIndex(Index) -> ok when Index :: integer().
primitiveRestartIndex(Index) ->
cast(5581, <<Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetInteger64i_v.xml">external</a> documentation.
--spec getInteger64i_v(enum(),integer()) -> [integer()].
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getInteger64i_v(Target, Index) -> [integer()] when Target :: enum(),Index :: integer().
getInteger64i_v(Target,Index) ->
call(5582, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Pname::enum()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferParameteri64v.xml">external</a> documentation.
--spec getBufferParameteri64v(enum(),enum()) -> [integer()].
+%% @doc glGetBufferParameteri64v
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferParameteri64v.xml">external</a> documentation.
+-spec getBufferParameteri64v(Target, Pname) -> [integer()] when Target :: enum(),Pname :: enum().
getBufferParameteri64v(Target,Pname) ->
call(5583, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferTexture.xml">external</a> documentation.
--spec framebufferTexture(enum(),enum(),integer(),integer()) -> ok.
+%% @doc Attach a level of a texture object as a logical buffer to the currently bound framebuffer object
+%%
+%% ``gl:framebufferTexture'', ``gl:framebufferTexture1D'', ``gl:framebufferTexture2D'',
+%% and ``gl:framebufferTexture'' attach a selected mipmap level or image of a texture object
+%% as one of the logical buffers of the framebuffer object currently bound to `Target' .
+%% `Target' must be `?GL_DRAW_FRAMEBUFFER', `?GL_READ_FRAMEBUFFER', or `?GL_FRAMEBUFFER'
+%% . `?GL_FRAMEBUFFER' is equivalent to `?GL_DRAW_FRAMEBUFFER'.
+%%
+%% `Attachment' specifies the logical attachment of the framebuffer and must be `?GL_COLOR_ATTACHMENT'
+%% `i', `?GL_DEPTH_ATTACHMENT', `?GL_STENCIL_ATTACHMENT' or `?GL_DEPTH_STENCIL_ATTACHMMENT'
+%% . `i' in `?GL_COLOR_ATTACHMENT'`i' may range from zero to the value of `?GL_MAX_COLOR_ATTACHMENTS'
+%% - 1. Attaching a level of a texture to `?GL_DEPTH_STENCIL_ATTACHMENT' is equivalent
+%% to attaching that level to both the `?GL_DEPTH_ATTACHMENT'`and' the `?GL_STENCIL_ATTACHMENT'
+%% attachment points simultaneously.
+%%
+%% `Textarget' specifies what type of texture is named by `Texture' , and for cube
+%% map textures, specifies the face that is to be attached. If `Texture' is not zero,
+%% it must be the name of an existing texture with type `Textarget' , unless it is a
+%% cube map texture, in which case `Textarget' must be `?GL_TEXTURE_CUBE_MAP_POSITIVE_X'
+%% `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y'
+%% , `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
+%%
+%% If `Texture' is non-zero, the specified `Level' of the texture object named `Texture'
+%% is attached to the framebfufer attachment point named by `Attachment' . For ``gl:framebufferTexture1D''
+%% , ``gl:framebufferTexture2D'', and ``gl:framebufferTexture3D'', `Texture' must
+%% be zero or the name of an existing texture with a target of `Textarget' , or `Texture'
+%% must be the name of an existing cube-map texture and `Textarget' must be one of `?GL_TEXTURE_CUBE_MAP_POSITIVE_X'
+%% , `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X'
+%% , `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', or `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
+%%
+%% If `Textarget' is `?GL_TEXTURE_RECTANGLE', `?GL_TEXTURE_2D_MULTISAMPLE',
+%% or `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY', then `Level' must be zero. If `Textarget'
+%% is `?GL_TEXTURE_3D', then level must be greater than or equal to zero and less than
+%% or equal to log2 of the value of `?GL_MAX_3D_TEXTURE_SIZE'. If `Textarget' is
+%% one of `?GL_TEXTURE_CUBE_MAP_POSITIVE_X', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z'
+%% , `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', or `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'
+%% , then `Level' must be greater than or equal to zero and less than or equal to log2
+%% of the value of `?GL_MAX_CUBE_MAP_TEXTURE_SIZE'. For all other values of `Textarget'
+%% , `Level' must be greater than or equal to zero and no larger than log2 of the value
+%% of `?GL_MAX_TEXTURE_SIZE'.
+%%
+%% `Layer' specifies the layer of a 2-dimensional image within a 3-dimensional texture.
+%%
+%%
+%% For ``gl:framebufferTexture1D'', if `Texture' is not zero, then `Textarget'
+%% must be `?GL_TEXTURE_1D'. For ``gl:framebufferTexture2D'', if `Texture' is
+%% not zero, `Textarget' must be one of `?GL_TEXTURE_2D', `?GL_TEXTURE_RECTANGLE'
+%% , `?GL_TEXTURE_CUBE_MAP_POSITIVE_X', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z'
+%% , `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'
+%% , or `?GL_TEXTURE_2D_MULTISAMPLE'. For ``gl:framebufferTexture3D'', if `Texture'
+%% is not zero, then `Textarget' must be `?GL_TEXTURE_3D'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferTexture.xml">external</a> documentation.
+-spec framebufferTexture(Target, Attachment, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer().
framebufferTexture(Target,Attachment,Texture,Level) ->
cast(5584, <<Target:?GLenum,Attachment:?GLenum,Texture:?GLuint,Level:?GLint>>).
-%% @spec (Index::integer(),Divisor::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribDivisor.xml">external</a> documentation.
--spec vertexAttribDivisor(integer(),integer()) -> ok.
+%% @doc Modify the rate at which generic vertex attributes advance during instanced rendering
+%%
+%% ``gl:vertexAttribDivisor'' modifies the rate at which generic vertex attributes advance
+%% when rendering multiple instances of primitives in a single draw call. If `Divisor'
+%% is zero, the attribute at slot `Index' advances once per vertex. If `Divisor'
+%% is non-zero, the attribute advances once per `Divisor' instances of the set(s) of
+%% vertices being rendered. An attribute is referred to as instanced if its `?GL_VERTEX_ATTRIB_ARRAY_DIVISOR'
+%% value is non-zero.
+%%
+%% `Index' must be less than the value of `?GL_MAX_VERTEX_ATTRIBUTES'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribDivisor.xml">external</a> documentation.
+-spec vertexAttribDivisor(Index, Divisor) -> ok when Index :: integer(),Divisor :: integer().
vertexAttribDivisor(Index,Divisor) ->
cast(5585, <<Index:?GLuint,Divisor:?GLuint>>).
-%% @spec (Value::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMinSampleShading.xml">external</a> documentation.
--spec minSampleShading(clamp()) -> ok.
+%% @doc Specifies minimum rate at which sample shaing takes place
+%%
+%% ``gl:minSampleShading'' specifies the rate at which samples are shaded within a covered
+%% pixel. Sample-rate shading is enabled by calling {@link gl:enable/1} with the parameter `?GL_SAMPLE_SHADING'
+%% . If `?GL_MULTISAMPLE' or `?GL_SAMPLE_SHADING' is disabled, sample shading has
+%% no effect. Otherwise, an implementation must provide at least as many unique color values
+%% for each covered fragment as specified by `Value' times `Samples' where `Samples'
+%% is the value of `?GL_SAMPLES' for the current framebuffer. At least 1 sample for
+%% each covered fragment is generated.
+%%
+%% A `Value' of 1.0 indicates that each sample in the framebuffer should be indpendently
+%% shaded. A `Value' of 0.0 effectively allows the GL to ignore sample rate shading.
+%% Any value between 0.0 and 1.0 allows the GL to shade only a subset of the total samples
+%% within each covered fragment. Which samples are shaded and the algorithm used to select
+%% that subset of the fragment's samples is implementation dependent.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMinSampleShading.xml">external</a> documentation.
+-spec minSampleShading(Value) -> ok when Value :: clamp().
minSampleShading(Value) ->
cast(5586, <<Value:?GLclampf>>).
-%% @spec (Buf::integer(),Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquation.xml">external</a> documentation.
--spec blendEquationi(integer(),enum()) -> ok.
+%% @doc
+%% See {@link blendEquation/1}
+-spec blendEquationi(Buf, Mode) -> ok when Buf :: integer(),Mode :: enum().
blendEquationi(Buf,Mode) ->
cast(5587, <<Buf:?GLuint,Mode:?GLenum>>).
-%% @spec (Buf::integer(),ModeRGB::enum(),ModeAlpha::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquationSeparate.xml">external</a> documentation.
--spec blendEquationSeparatei(integer(),enum(),enum()) -> ok.
+%% @doc
+%% See {@link blendEquationSeparate/2}
+-spec blendEquationSeparatei(Buf, ModeRGB, ModeAlpha) -> ok when Buf :: integer(),ModeRGB :: enum(),ModeAlpha :: enum().
blendEquationSeparatei(Buf,ModeRGB,ModeAlpha) ->
cast(5588, <<Buf:?GLuint,ModeRGB:?GLenum,ModeAlpha:?GLenum>>).
-%% @spec (Buf::integer(),Src::enum(),Dst::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunci.xml">external</a> documentation.
--spec blendFunci(integer(),enum(),enum()) -> ok.
+%% @doc glBlendFunci
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunci.xml">external</a> documentation.
+-spec blendFunci(Buf, Src, Dst) -> ok when Buf :: integer(),Src :: enum(),Dst :: enum().
blendFunci(Buf,Src,Dst) ->
cast(5589, <<Buf:?GLuint,Src:?GLenum,Dst:?GLenum>>).
-%% @spec (Buf::integer(),SrcRGB::enum(),DstRGB::enum(),SrcAlpha::enum(),DstAlpha::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFuncSeparate.xml">external</a> documentation.
--spec blendFuncSeparatei(integer(),enum(),enum(),enum(),enum()) -> ok.
+%% @doc
+%% See {@link blendFuncSeparate/4}
+-spec blendFuncSeparatei(Buf, SrcRGB, DstRGB, SrcAlpha, DstAlpha) -> ok when Buf :: integer(),SrcRGB :: enum(),DstRGB :: enum(),SrcAlpha :: enum(),DstAlpha :: enum().
blendFuncSeparatei(Buf,SrcRGB,DstRGB,SrcAlpha,DstAlpha) ->
cast(5590, <<Buf:?GLuint,SrcRGB:?GLenum,DstRGB:?GLenum,SrcAlpha:?GLenum,DstAlpha:?GLenum>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrixARB.xml">external</a> documentation.
--spec loadTransposeMatrixfARB({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
+%% @doc glLoadTransposeMatrixARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrixARB.xml">external</a> documentation.
+-spec loadTransposeMatrixfARB(M) -> ok when M :: matrix().
loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5591, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5591, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,0:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,0:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,0:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,1:?GLfloat>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrixARB.xml">external</a> documentation.
--spec loadTransposeMatrixdARB({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
+%% @doc glLoadTransposeMatrixARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrixARB.xml">external</a> documentation.
+-spec loadTransposeMatrixdARB(M) -> ok when M :: matrix().
loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5592, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5592, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrixARB.xml">external</a> documentation.
--spec multTransposeMatrixfARB({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
+%% @doc glMultTransposeMatrixARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrixARB.xml">external</a> documentation.
+-spec multTransposeMatrixfARB(M) -> ok when M :: matrix().
multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5593, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5593, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,0:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,0:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,0:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,1:?GLfloat>>).
-%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrixARB.xml">external</a> documentation.
--spec multTransposeMatrixdARB({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok.
+%% @doc glMultTransposeMatrixARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrixARB.xml">external</a> documentation.
+-spec multTransposeMatrixdARB(M) -> ok when M :: matrix().
multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5594, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5594, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble>>).
-%% @spec (Weights::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightbvARB([integer()]) -> ok.
+%% @doc glWeightARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
+-spec weightbvARB(Weights) -> ok when Weights :: [integer()].
weightbvARB(Weights) ->
cast(5595, <<(length(Weights)):?GLuint,
(<< <<C:?GLbyte>> || C <- Weights>>)/binary,0:((8-((length(Weights)+ 4) rem 8)) rem 8)>>).
-%% @spec (Weights::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightsvARB([integer()]) -> ok.
+%% @doc glWeightARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
+-spec weightsvARB(Weights) -> ok when Weights :: [integer()].
weightsvARB(Weights) ->
cast(5596, <<(length(Weights)):?GLuint,
(<< <<C:?GLshort>> || C <- Weights>>)/binary,0:((8-((length(Weights)*2+ 4) rem 8)) rem 8)>>).
-%% @spec (Weights::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightivARB([integer()]) -> ok.
+%% @doc glWeightARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
+-spec weightivARB(Weights) -> ok when Weights :: [integer()].
weightivARB(Weights) ->
cast(5597, <<(length(Weights)):?GLuint,
(<< <<C:?GLint>> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>).
-%% @spec (Weights::[float()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightfvARB([float()]) -> ok.
+%% @doc glWeightARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
+-spec weightfvARB(Weights) -> ok when Weights :: [float()].
weightfvARB(Weights) ->
cast(5598, <<(length(Weights)):?GLuint,
(<< <<C:?GLfloat>> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>).
-%% @spec (Weights::[float()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightdvARB([float()]) -> ok.
+%% @doc glWeightARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
+-spec weightdvARB(Weights) -> ok when Weights :: [float()].
weightdvARB(Weights) ->
cast(5599, <<(length(Weights)):?GLuint,0:32,
(<< <<C:?GLdouble>> || C <- Weights>>)/binary>>).
-%% @spec (Weights::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightubvARB([integer()]) -> ok.
+%% @doc glWeightARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
+-spec weightubvARB(Weights) -> ok when Weights :: [integer()].
weightubvARB(Weights) ->
cast(5600, <<(length(Weights)):?GLuint,
(<< <<C:?GLubyte>> || C <- Weights>>)/binary,0:((8-((length(Weights)+ 4) rem 8)) rem 8)>>).
-%% @spec (Weights::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightusvARB([integer()]) -> ok.
+%% @doc glWeightARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
+-spec weightusvARB(Weights) -> ok when Weights :: [integer()].
weightusvARB(Weights) ->
cast(5601, <<(length(Weights)):?GLuint,
(<< <<C:?GLushort>> || C <- Weights>>)/binary,0:((8-((length(Weights)*2+ 4) rem 8)) rem 8)>>).
-%% @spec (Weights::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightuivARB([integer()]) -> ok.
+%% @doc glWeightARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
+-spec weightuivARB(Weights) -> ok when Weights :: [integer()].
weightuivARB(Weights) ->
cast(5602, <<(length(Weights)):?GLuint,
(<< <<C:?GLuint>> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>).
-%% @spec (Count::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexBlenARB.xml">external</a> documentation.
--spec vertexBlendARB(integer()) -> ok.
+%% @doc glVertexBlenARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexBlenARB.xml">external</a> documentation.
+-spec vertexBlendARB(Count) -> ok when Count :: integer().
vertexBlendARB(Count) ->
cast(5603, <<Count:?GLint>>).
-%% @spec (Index::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCurrentPaletteMatrixARB.xml">external</a> documentation.
--spec currentPaletteMatrixARB(integer()) -> ok.
+%% @doc glCurrentPaletteMatrixARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCurrentPaletteMatrixARB.xml">external</a> documentation.
+-spec currentPaletteMatrixARB(Index) -> ok when Index :: integer().
currentPaletteMatrixARB(Index) ->
cast(5604, <<Index:?GLint>>).
-%% @spec (Indices::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
--spec matrixIndexubvARB([integer()]) -> ok.
+%% @doc glMatrixIndexARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
+-spec matrixIndexubvARB(Indices) -> ok when Indices :: [integer()].
matrixIndexubvARB(Indices) ->
cast(5605, <<(length(Indices)):?GLuint,
(<< <<C:?GLubyte>> || C <- Indices>>)/binary,0:((8-((length(Indices)+ 4) rem 8)) rem 8)>>).
-%% @spec (Indices::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
--spec matrixIndexusvARB([integer()]) -> ok.
+%% @doc glMatrixIndexARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
+-spec matrixIndexusvARB(Indices) -> ok when Indices :: [integer()].
matrixIndexusvARB(Indices) ->
cast(5606, <<(length(Indices)):?GLuint,
(<< <<C:?GLushort>> || C <- Indices>>)/binary,0:((8-((length(Indices)*2+ 4) rem 8)) rem 8)>>).
-%% @spec (Indices::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
--spec matrixIndexuivARB([integer()]) -> ok.
+%% @doc glMatrixIndexARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
+-spec matrixIndexuivARB(Indices) -> ok when Indices :: [integer()].
matrixIndexuivARB(Indices) ->
cast(5607, <<(length(Indices)):?GLuint,
(<< <<C:?GLuint>> || C <- Indices>>)/binary,0:(((1+length(Indices)) rem 2)*32)>>).
-%% @spec (Target::enum(),Format::enum(),String::string()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramStringARB.xml">external</a> documentation.
--spec programStringARB(enum(),enum(),string()) -> ok.
+%% @doc glProgramStringARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramStringARB.xml">external</a> documentation.
+-spec programStringARB(Target, Format, String) -> ok when Target :: enum(),Format :: enum(),String :: string().
programStringARB(Target,Format,String) ->
cast(5608, <<Target:?GLenum,Format:?GLenum,(list_to_binary([String|[0]]))/binary,0:((8-((length(String)+ 1) rem 8)) rem 8)>>).
-%% @spec (Target::enum(),Program::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindProgramARB.xml">external</a> documentation.
--spec bindProgramARB(enum(),integer()) -> ok.
+%% @doc glBindProgramARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindProgramARB.xml">external</a> documentation.
+-spec bindProgramARB(Target, Program) -> ok when Target :: enum(),Program :: integer().
bindProgramARB(Target,Program) ->
cast(5609, <<Target:?GLenum,Program:?GLuint>>).
-%% @spec (Programs::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgramsARB.xml">external</a> documentation.
--spec deleteProgramsARB([integer()]) -> ok.
+%% @doc glDeleteProgramsARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgramsARB.xml">external</a> documentation.
+-spec deleteProgramsARB(Programs) -> ok when Programs :: [integer()].
deleteProgramsARB(Programs) ->
cast(5610, <<(length(Programs)):?GLuint,
(<< <<C:?GLuint>> || C <- Programs>>)/binary,0:(((1+length(Programs)) rem 2)*32)>>).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenProgramsARB.xml">external</a> documentation.
--spec genProgramsARB(integer()) -> [integer()].
+%% @doc glGenProgramsARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenProgramsARB.xml">external</a> documentation.
+-spec genProgramsARB(N) -> [integer()] when N :: integer().
genProgramsARB(N) ->
call(5611, <<N:?GLsizei>>).
-%% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
--spec programEnvParameter4dARB(enum(),integer(),float(),float(),float(),float()) -> ok.
+%% @doc glProgramEnvParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
+-spec programEnvParameter4dARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
programEnvParameter4dARB(Target,Index,X,Y,Z,W) ->
cast(5612, <<Target:?GLenum,Index:?GLuint,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
-%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
--spec programEnvParameter4dvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok.
+%% @doc glProgramEnvParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
+-spec programEnvParameter4dvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
programEnvParameter4dvARB(Target,Index,{P1,P2,P3,P4}) ->
cast(5613, <<Target:?GLenum,Index:?GLuint,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble>>).
-%% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
--spec programEnvParameter4fARB(enum(),integer(),float(),float(),float(),float()) -> ok.
+%% @doc glProgramEnvParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
+-spec programEnvParameter4fARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
programEnvParameter4fARB(Target,Index,X,Y,Z,W) ->
cast(5614, <<Target:?GLenum,Index:?GLuint,X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
-%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
--spec programEnvParameter4fvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok.
+%% @doc glProgramEnvParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
+-spec programEnvParameter4fvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
programEnvParameter4fvARB(Target,Index,{P1,P2,P3,P4}) ->
cast(5615, <<Target:?GLenum,Index:?GLuint,P1:?GLfloat,P2:?GLfloat,P3:?GLfloat,P4:?GLfloat>>).
-%% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
--spec programLocalParameter4dARB(enum(),integer(),float(),float(),float(),float()) -> ok.
+%% @doc glProgramLocalParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
+-spec programLocalParameter4dARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
programLocalParameter4dARB(Target,Index,X,Y,Z,W) ->
cast(5616, <<Target:?GLenum,Index:?GLuint,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
-%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
--spec programLocalParameter4dvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok.
+%% @doc glProgramLocalParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
+-spec programLocalParameter4dvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
programLocalParameter4dvARB(Target,Index,{P1,P2,P3,P4}) ->
cast(5617, <<Target:?GLenum,Index:?GLuint,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble>>).
-%% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
--spec programLocalParameter4fARB(enum(),integer(),float(),float(),float(),float()) -> ok.
+%% @doc glProgramLocalParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
+-spec programLocalParameter4fARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
programLocalParameter4fARB(Target,Index,X,Y,Z,W) ->
cast(5618, <<Target:?GLenum,Index:?GLuint,X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
-%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
--spec programLocalParameter4fvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok.
+%% @doc glProgramLocalParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
+-spec programLocalParameter4fvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
programLocalParameter4fvARB(Target,Index,{P1,P2,P3,P4}) ->
cast(5619, <<Target:?GLenum,Index:?GLuint,P1:?GLfloat,P2:?GLfloat,P3:?GLfloat,P4:?GLfloat>>).
-%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramEnvParameterARB.xml">external</a> documentation.
--spec getProgramEnvParameterdvARB(enum(),integer()) -> {float(),float(),float(),float()}.
+%% @doc glGetProgramEnvParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramEnvParameterARB.xml">external</a> documentation.
+-spec getProgramEnvParameterdvARB(Target, Index) -> {float(),float(),float(),float()} when Target :: enum(),Index :: integer().
getProgramEnvParameterdvARB(Target,Index) ->
call(5620, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramEnvParameterARB.xml">external</a> documentation.
--spec getProgramEnvParameterfvARB(enum(),integer()) -> {float(),float(),float(),float()}.
+%% @doc glGetProgramEnvParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramEnvParameterARB.xml">external</a> documentation.
+-spec getProgramEnvParameterfvARB(Target, Index) -> {float(),float(),float(),float()} when Target :: enum(),Index :: integer().
getProgramEnvParameterfvARB(Target,Index) ->
call(5621, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramLocalParameterARB.xml">external</a> documentation.
--spec getProgramLocalParameterdvARB(enum(),integer()) -> {float(),float(),float(),float()}.
+%% @doc glGetProgramLocalParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramLocalParameterARB.xml">external</a> documentation.
+-spec getProgramLocalParameterdvARB(Target, Index) -> {float(),float(),float(),float()} when Target :: enum(),Index :: integer().
getProgramLocalParameterdvARB(Target,Index) ->
call(5622, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramLocalParameterARB.xml">external</a> documentation.
--spec getProgramLocalParameterfvARB(enum(),integer()) -> {float(),float(),float(),float()}.
+%% @doc glGetProgramLocalParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramLocalParameterARB.xml">external</a> documentation.
+-spec getProgramLocalParameterfvARB(Target, Index) -> {float(),float(),float(),float()} when Target :: enum(),Index :: integer().
getProgramLocalParameterfvARB(Target,Index) ->
call(5623, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Pname::enum(),String::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramStringARB.xml">external</a> documentation.
--spec getProgramStringARB(enum(),enum(),mem()) -> ok.
+%% @doc glGetProgramStringARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramStringARB.xml">external</a> documentation.
+-spec getProgramStringARB(Target, Pname, String) -> ok when Target :: enum(),Pname :: enum(),String :: mem().
getProgramStringARB(Target,Pname,String) ->
send_bin(String),
call(5624, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum(),Pname::enum()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferParameterARB.xml">external</a> documentation.
--spec getBufferParameterivARB(enum(),enum()) -> [integer()].
+%% @doc glGetBufferParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferParameterARB.xml">external</a> documentation.
+-spec getBufferParameterivARB(Target, Pname) -> [integer()] when Target :: enum(),Pname :: enum().
getBufferParameterivARB(Target,Pname) ->
call(5625, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Obj::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteObjectARB.xml">external</a> documentation.
--spec deleteObjectARB(integer()) -> ok.
+%% @doc glDeleteObjectARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteObjectARB.xml">external</a> documentation.
+-spec deleteObjectARB(Obj) -> ok when Obj :: integer().
deleteObjectARB(Obj) ->
cast(5626, <<Obj:?GLhandleARB>>).
-%% @spec (Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetHandleARB.xml">external</a> documentation.
--spec getHandleARB(enum()) -> integer().
+%% @doc glGetHandleARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetHandleARB.xml">external</a> documentation.
+-spec getHandleARB(Pname) -> integer() when Pname :: enum().
getHandleARB(Pname) ->
call(5627, <<Pname:?GLenum>>).
-%% @spec (ContainerObj::integer(),AttachedObj::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDetachObjectARB.xml">external</a> documentation.
--spec detachObjectARB(integer(),integer()) -> ok.
+%% @doc glDetachObjectARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDetachObjectARB.xml">external</a> documentation.
+-spec detachObjectARB(ContainerObj, AttachedObj) -> ok when ContainerObj :: integer(),AttachedObj :: integer().
detachObjectARB(ContainerObj,AttachedObj) ->
cast(5628, <<ContainerObj:?GLhandleARB,AttachedObj:?GLhandleARB>>).
-%% @spec (ShaderType::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateShaderObjectARB.xml">external</a> documentation.
--spec createShaderObjectARB(enum()) -> integer().
+%% @doc glCreateShaderObjectARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateShaderObjectARB.xml">external</a> documentation.
+-spec createShaderObjectARB(ShaderType) -> integer() when ShaderType :: enum().
createShaderObjectARB(ShaderType) ->
call(5629, <<ShaderType:?GLenum>>).
-%% @spec (ShaderObj::integer(),String::[string()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderSourceARB.xml">external</a> documentation.
--spec shaderSourceARB(integer(),[string()]) -> ok.
+%% @doc glShaderSourceARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderSourceARB.xml">external</a> documentation.
+-spec shaderSourceARB(ShaderObj, String) -> ok when ShaderObj :: integer(),String :: [string()].
shaderSourceARB(ShaderObj,String) ->
StringTemp = list_to_binary([[Str|[0]] || Str <- String ]),
cast(5630, <<ShaderObj:?GLhandleARB,(length(String)):?GLuint,(size(StringTemp)):?GLuint,(StringTemp)/binary,0:((8-((size(StringTemp)+4) rem 8)) rem 8)>>).
-%% @spec (ShaderObj::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShaderARB.xml">external</a> documentation.
--spec compileShaderARB(integer()) -> ok.
+%% @doc glCompileShaderARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShaderARB.xml">external</a> documentation.
+-spec compileShaderARB(ShaderObj) -> ok when ShaderObj :: integer().
compileShaderARB(ShaderObj) ->
cast(5631, <<ShaderObj:?GLhandleARB>>).
-%% @spec () -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateProgramObjectARB.xml">external</a> documentation.
+%% @doc glCreateProgramObjectARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateProgramObjectARB.xml">external</a> documentation.
-spec createProgramObjectARB() -> integer().
createProgramObjectARB() ->
call(5632, <<>>).
-%% @spec (ContainerObj::integer(),Obj::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAttachObjectARB.xml">external</a> documentation.
--spec attachObjectARB(integer(),integer()) -> ok.
+%% @doc glAttachObjectARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAttachObjectARB.xml">external</a> documentation.
+-spec attachObjectARB(ContainerObj, Obj) -> ok when ContainerObj :: integer(),Obj :: integer().
attachObjectARB(ContainerObj,Obj) ->
cast(5633, <<ContainerObj:?GLhandleARB,Obj:?GLhandleARB>>).
-%% @spec (ProgramObj::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLinkProgramARB.xml">external</a> documentation.
--spec linkProgramARB(integer()) -> ok.
+%% @doc glLinkProgramARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLinkProgramARB.xml">external</a> documentation.
+-spec linkProgramARB(ProgramObj) -> ok when ProgramObj :: integer().
linkProgramARB(ProgramObj) ->
cast(5634, <<ProgramObj:?GLhandleARB>>).
-%% @spec (ProgramObj::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgramObjectARB.xml">external</a> documentation.
--spec useProgramObjectARB(integer()) -> ok.
+%% @doc glUseProgramObjectARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgramObjectARB.xml">external</a> documentation.
+-spec useProgramObjectARB(ProgramObj) -> ok when ProgramObj :: integer().
useProgramObjectARB(ProgramObj) ->
cast(5635, <<ProgramObj:?GLhandleARB>>).
-%% @spec (ProgramObj::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgramARB.xml">external</a> documentation.
--spec validateProgramARB(integer()) -> ok.
+%% @doc glValidateProgramARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgramARB.xml">external</a> documentation.
+-spec validateProgramARB(ProgramObj) -> ok when ProgramObj :: integer().
validateProgramARB(ProgramObj) ->
cast(5636, <<ProgramObj:?GLhandleARB>>).
-%% @spec (Obj::integer(),Pname::enum()) -> float()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetObjectParameterARB.xml">external</a> documentation.
--spec getObjectParameterfvARB(integer(),enum()) -> float().
+%% @doc glGetObjectParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetObjectParameterARB.xml">external</a> documentation.
+-spec getObjectParameterfvARB(Obj, Pname) -> float() when Obj :: integer(),Pname :: enum().
getObjectParameterfvARB(Obj,Pname) ->
call(5637, <<Obj:?GLhandleARB,Pname:?GLenum>>).
-%% @spec (Obj::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetObjectParameterARB.xml">external</a> documentation.
--spec getObjectParameterivARB(integer(),enum()) -> integer().
+%% @doc glGetObjectParameterARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetObjectParameterARB.xml">external</a> documentation.
+-spec getObjectParameterivARB(Obj, Pname) -> integer() when Obj :: integer(),Pname :: enum().
getObjectParameterivARB(Obj,Pname) ->
call(5638, <<Obj:?GLhandleARB,Pname:?GLenum>>).
-%% @spec (Obj::integer(),MaxLength::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetInfoLogARB.xml">external</a> documentation.
--spec getInfoLogARB(integer(),integer()) -> string().
+%% @doc glGetInfoLogARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetInfoLogARB.xml">external</a> documentation.
+-spec getInfoLogARB(Obj, MaxLength) -> string() when Obj :: integer(),MaxLength :: integer().
getInfoLogARB(Obj,MaxLength) ->
call(5639, <<Obj:?GLhandleARB,MaxLength:?GLsizei>>).
-%% @spec (ContainerObj::integer(),MaxCount::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetAttachedObjectsARB.xml">external</a> documentation.
--spec getAttachedObjectsARB(integer(),integer()) -> [integer()].
+%% @doc glGetAttachedObjectsARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetAttachedObjectsARB.xml">external</a> documentation.
+-spec getAttachedObjectsARB(ContainerObj, MaxCount) -> [integer()] when ContainerObj :: integer(),MaxCount :: integer().
getAttachedObjectsARB(ContainerObj,MaxCount) ->
call(5640, <<ContainerObj:?GLhandleARB,MaxCount:?GLsizei>>).
-%% @spec (ProgramObj::integer(),Name::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformLocationARB.xml">external</a> documentation.
--spec getUniformLocationARB(integer(),string()) -> integer().
+%% @doc glGetUniformLocationARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformLocationARB.xml">external</a> documentation.
+-spec getUniformLocationARB(ProgramObj, Name) -> integer() when ProgramObj :: integer(),Name :: string().
getUniformLocationARB(ProgramObj,Name) ->
call(5641, <<ProgramObj:?GLhandleARB,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
-%% @spec (ProgramObj::integer(),Index::integer(),MaxLength::integer()) -> {Size::integer(),Type::enum(),Name::string()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformARB.xml">external</a> documentation.
--spec getActiveUniformARB(integer(),integer(),integer()) -> {integer(),enum(),string()}.
+%% @doc glGetActiveUniformARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformARB.xml">external</a> documentation.
+-spec getActiveUniformARB(ProgramObj, Index, MaxLength) -> {Size :: integer(),Type :: enum(),Name :: string()} when ProgramObj :: integer(),Index :: integer(),MaxLength :: integer().
getActiveUniformARB(ProgramObj,Index,MaxLength) ->
call(5642, <<ProgramObj:?GLhandleARB,Index:?GLuint,MaxLength:?GLsizei>>).
-%% @spec (ProgramObj::integer(),Location::integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformARB.xml">external</a> documentation.
--spec getUniformfvARB(integer(),integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}.
+%% @doc glGetUniformARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformARB.xml">external</a> documentation.
+-spec getUniformfvARB(ProgramObj, Location) -> matrix() when ProgramObj :: integer(),Location :: integer().
getUniformfvARB(ProgramObj,Location) ->
call(5643, <<ProgramObj:?GLhandleARB,Location:?GLint>>).
-%% @spec (ProgramObj::integer(),Location::integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformARB.xml">external</a> documentation.
--spec getUniformivARB(integer(),integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}.
+%% @doc glGetUniformARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformARB.xml">external</a> documentation.
+-spec getUniformivARB(ProgramObj, Location) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} when ProgramObj :: integer(),Location :: integer().
getUniformivARB(ProgramObj,Location) ->
call(5644, <<ProgramObj:?GLhandleARB,Location:?GLint>>).
-%% @spec (Obj::integer(),MaxLength::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderSourceARB.xml">external</a> documentation.
--spec getShaderSourceARB(integer(),integer()) -> string().
+%% @doc glGetShaderSourceARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderSourceARB.xml">external</a> documentation.
+-spec getShaderSourceARB(Obj, MaxLength) -> string() when Obj :: integer(),MaxLength :: integer().
getShaderSourceARB(Obj,MaxLength) ->
call(5645, <<Obj:?GLhandleARB,MaxLength:?GLsizei>>).
-%% @spec (ProgramObj::integer(),Index::integer(),Name::string()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindAttribLocationARB.xml">external</a> documentation.
--spec bindAttribLocationARB(integer(),integer(),string()) -> ok.
+%% @doc glBindAttribLocationARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindAttribLocationARB.xml">external</a> documentation.
+-spec bindAttribLocationARB(ProgramObj, Index, Name) -> ok when ProgramObj :: integer(),Index :: integer(),Name :: string().
bindAttribLocationARB(ProgramObj,Index,Name) ->
cast(5646, <<ProgramObj:?GLhandleARB,Index:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8)>>).
-%% @spec (ProgramObj::integer(),Index::integer(),MaxLength::integer()) -> {Size::integer(),Type::enum(),Name::string()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveAttribARB.xml">external</a> documentation.
--spec getActiveAttribARB(integer(),integer(),integer()) -> {integer(),enum(),string()}.
+%% @doc glGetActiveAttribARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveAttribARB.xml">external</a> documentation.
+-spec getActiveAttribARB(ProgramObj, Index, MaxLength) -> {Size :: integer(),Type :: enum(),Name :: string()} when ProgramObj :: integer(),Index :: integer(),MaxLength :: integer().
getActiveAttribARB(ProgramObj,Index,MaxLength) ->
call(5647, <<ProgramObj:?GLhandleARB,Index:?GLuint,MaxLength:?GLsizei>>).
-%% @spec (ProgramObj::integer(),Name::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetAttribLocationARB.xml">external</a> documentation.
--spec getAttribLocationARB(integer(),string()) -> integer().
+%% @doc glGetAttribLocationARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetAttribLocationARB.xml">external</a> documentation.
+-spec getAttribLocationARB(ProgramObj, Name) -> integer() when ProgramObj :: integer(),Name :: string().
getAttribLocationARB(ProgramObj,Name) ->
call(5648, <<ProgramObj:?GLhandleARB,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
-%% @spec (Renderbuffer::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsRenderbuffer.xml">external</a> documentation.
--spec isRenderbuffer(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a renderbuffer object
+%%
+%% ``gl:isRenderbuffer'' returns `?GL_TRUE' if `Renderbuffer' is currently the
+%% name of a renderbuffer object. If `Renderbuffer' is zero, or if `Renderbuffer'
+%% is not the name of a renderbuffer object, or if an error occurs, ``gl:isRenderbuffer''
+%% returns `?GL_FALSE'. If `Renderbuffer' is a name returned by {@link gl:genRenderbuffers/1}
+%% , by that has not yet been bound through a call to {@link gl:bindRenderbuffer/2} or {@link gl:framebufferRenderbuffer/4}
+%% , then the name is not a renderbuffer object and ``gl:isRenderbuffer'' returns `?GL_FALSE'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsRenderbuffer.xml">external</a> documentation.
+-spec isRenderbuffer(Renderbuffer) -> 0|1 when Renderbuffer :: integer().
isRenderbuffer(Renderbuffer) ->
call(5649, <<Renderbuffer:?GLuint>>).
-%% @spec (Target::enum(),Renderbuffer::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindRenderbuffer.xml">external</a> documentation.
--spec bindRenderbuffer(enum(),integer()) -> ok.
+%% @doc Bind a renderbuffer to a renderbuffer target
+%%
+%% ``gl:bindRenderbuffer'' binds the renderbuffer object with name `Renderbuffer'
+%% to the renderbuffer target specified by `Target' . `Target' must be `?GL_RENDERBUFFER'
+%% . `Renderbuffer' is the name of a renderbuffer object previously returned from a
+%% call to {@link gl:genRenderbuffers/1} , or zero to break the existing binding of a renderbuffer
+%% object to `Target' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindRenderbuffer.xml">external</a> documentation.
+-spec bindRenderbuffer(Target, Renderbuffer) -> ok when Target :: enum(),Renderbuffer :: integer().
bindRenderbuffer(Target,Renderbuffer) ->
cast(5650, <<Target:?GLenum,Renderbuffer:?GLuint>>).
-%% @spec (Renderbuffers::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteRenderbuffers.xml">external</a> documentation.
--spec deleteRenderbuffers([integer()]) -> ok.
+%% @doc Delete renderbuffer objects
+%%
+%% ``gl:deleteRenderbuffers'' deletes the `N' renderbuffer objects whose names are
+%% stored in the array addressed by `Renderbuffers' . The name zero is reserved by the
+%% GL and is silently ignored, should it occur in `Renderbuffers' , as are other unused
+%% names. Once a renderbuffer object is deleted, its name is again unused and it has no contents.
+%% If a renderbuffer that is currently bound to the target `?GL_RENDERBUFFER' is deleted,
+%% it is as though {@link gl:bindRenderbuffer/2} had been executed with a `Target' of `?GL_RENDERBUFFER'
+%% and a `Name' of zero.
+%%
+%% If a renderbuffer object is attached to one or more attachment points in the currently
+%% bound framebuffer, then it as if {@link gl:framebufferRenderbuffer/4} had been called,
+%% with a `Renderbuffer' of zero for each attachment point to which this image was attached
+%% in the currently bound framebuffer. In other words, this renderbuffer object is first
+%% detached from all attachment ponits in the currently bound framebuffer. Note that the
+%% renderbuffer image is specifically `not' detached from any non-bound framebuffers.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteRenderbuffers.xml">external</a> documentation.
+-spec deleteRenderbuffers(Renderbuffers) -> ok when Renderbuffers :: [integer()].
deleteRenderbuffers(Renderbuffers) ->
cast(5651, <<(length(Renderbuffers)):?GLuint,
(<< <<C:?GLuint>> || C <- Renderbuffers>>)/binary,0:(((1+length(Renderbuffers)) rem 2)*32)>>).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenRenderbuffers.xml">external</a> documentation.
--spec genRenderbuffers(integer()) -> [integer()].
+%% @doc Generate renderbuffer object names
+%%
+%% ``gl:genRenderbuffers'' returns `N' renderbuffer object names in `Renderbuffers'
+%% . There is no guarantee that the names form a contiguous set of integers; however, it
+%% is guaranteed that none of the returned names was in use immediately before the call to ``gl:genRenderbuffers''
+%% .
+%%
+%% Renderbuffer object names returned by a call to ``gl:genRenderbuffers'' are not returned
+%% by subsequent calls, unless they are first deleted with {@link gl:deleteRenderbuffers/1} .
+%%
+%% The names returned in `Renderbuffers' are marked as used, for the purposes of ``gl:genRenderbuffers''
+%% only, but they acquire state and type only when they are first bound.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenRenderbuffers.xml">external</a> documentation.
+-spec genRenderbuffers(N) -> [integer()] when N :: integer().
genRenderbuffers(N) ->
call(5652, <<N:?GLsizei>>).
-%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRenderbufferStorage.xml">external</a> documentation.
--spec renderbufferStorage(enum(),enum(),integer(),integer()) -> ok.
+%% @doc Establish data storage, format and dimensions of a renderbuffer object's image
+%%
+%% ``gl:renderbufferStorage'' is equivalent to calling {@link gl:renderbufferStorageMultisample/5}
+%% with the `Samples' set to zero.
+%%
+%% The target of the operation, specified by `Target' must be `?GL_RENDERBUFFER'.
+%% `Internalformat' specifies the internal format to be used for the renderbuffer object's
+%% storage and must be a color-renderable, depth-renderable, or stencil-renderable format. `Width'
+%% and `Height' are the dimensions, in pixels, of the renderbuffer. Both `Width'
+%% and `Height' must be less than or equal to the value of `?GL_MAX_RENDERBUFFER_SIZE'
+%% .
+%%
+%% Upon success, ``gl:renderbufferStorage'' deletes any existing data store for the renderbuffer
+%% image and the contents of the data store after calling ``gl:renderbufferStorage'' are
+%% undefined.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRenderbufferStorage.xml">external</a> documentation.
+-spec renderbufferStorage(Target, Internalformat, Width, Height) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer().
renderbufferStorage(Target,Internalformat,Width,Height) ->
cast(5653, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei>>).
-%% @spec (Target::enum(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetRenderbufferParameter.xml">external</a> documentation.
--spec getRenderbufferParameteriv(enum(),enum()) -> integer().
+%% @doc Retrieve information about a bound renderbuffer object
+%%
+%% ``gl:getRenderbufferParameteriv'' retrieves information about a bound renderbuffer object.
+%% `Target' specifies the target of the query operation and must be `?GL_RENDERBUFFER'
+%% . `Pname' specifies the parameter whose value to query and must be one of `?GL_RENDERBUFFER_WIDTH'
+%% , `?GL_RENDERBUFFER_HEIGHT', `?GL_RENDERBUFFER_INTERNAL_FORMAT', `?GL_RENDERBUFFER_RED_SIZE'
+%% , `?GL_RENDERBUFFER_GREEN_SIZE', `?GL_RENDERBUFFER_BLUE_SIZE', `?GL_RENDERBUFFER_ALPHA_SIZE'
+%% , `?GL_RENDERBUFFER_DEPTH_SIZE', `?GL_RENDERBUFFER_DEPTH_SIZE', `?GL_RENDERBUFFER_STENCIL_SIZE'
+%% , or `?GL_RENDERBUFFER_SAMPLES'.
+%%
+%% Upon a successful return from ``gl:getRenderbufferParameteriv'', if `Pname' is `?GL_RENDERBUFFER_WIDTH'
+%% , `?GL_RENDERBUFFER_HEIGHT', `?GL_RENDERBUFFER_INTERNAL_FORMAT', or `?GL_RENDERBUFFER_SAMPLES'
+%% , then `Params' will contain the width in pixels, the height in pixels, the internal
+%% format, or the number of samples, respectively, of the image of the renderbuffer currently
+%% bound to `Target' .
+%%
+%% If `Pname' is `?GL_RENDERBUFFER_RED_SIZE', `?GL_RENDERBUFFER_GREEN_SIZE',
+%% `?GL_RENDERBUFFER_BLUE_SIZE', `?GL_RENDERBUFFER_ALPHA_SIZE', `?GL_RENDERBUFFER_DEPTH_SIZE'
+%% , or `?GL_RENDERBUFFER_STENCIL_SIZE', then `Params' will contain the actual
+%% resolutions (not the resolutions specified when the image array was defined) for the red,
+%% green, blue, alpha depth, or stencil components, respectively, of the image of the renderbuffer
+%% currently bound to `Target' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetRenderbufferParameter.xml">external</a> documentation.
+-spec getRenderbufferParameteriv(Target, Pname) -> integer() when Target :: enum(),Pname :: enum().
getRenderbufferParameteriv(Target,Pname) ->
call(5654, <<Target:?GLenum,Pname:?GLenum>>).
-%% @spec (Framebuffer::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsFramebuffer.xml">external</a> documentation.
--spec isFramebuffer(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a framebuffer object
+%%
+%% ``gl:isFramebuffer'' returns `?GL_TRUE' if `Framebuffer' is currently the
+%% name of a framebuffer object. If `Framebuffer' is zero, or if `?framebuffer'
+%% is not the name of a framebuffer object, or if an error occurs, ``gl:isFramebuffer''
+%% returns `?GL_FALSE'. If `Framebuffer' is a name returned by {@link gl:genFramebuffers/1}
+%% , by that has not yet been bound through a call to {@link gl:bindFramebuffer/2} , then the
+%% name is not a framebuffer object and ``gl:isFramebuffer'' returns `?GL_FALSE'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsFramebuffer.xml">external</a> documentation.
+-spec isFramebuffer(Framebuffer) -> 0|1 when Framebuffer :: integer().
isFramebuffer(Framebuffer) ->
call(5655, <<Framebuffer:?GLuint>>).
-%% @spec (Target::enum(),Framebuffer::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFramebuffer.xml">external</a> documentation.
--spec bindFramebuffer(enum(),integer()) -> ok.
+%% @doc Bind a framebuffer to a framebuffer target
+%%
+%% ``gl:bindFramebuffer'' binds the framebuffer object with name `Framebuffer' to
+%% the framebuffer target specified by `Target' . `Target' must be either `?GL_DRAW_FRAMEBUFFER'
+%% , `?GL_READ_FRAMEBUFFER' or `?GL_FRAMEBUFFER'. If a framebuffer object is bound
+%% to `?GL_DRAW_FRAMEBUFFER' or `?GL_READ_FRAMEBUFFER', it becomes the target for
+%% rendering or readback operations, respectively, until it is deleted or another framebuffer
+%% is bound to the corresponding bind point. Calling ``gl:bindFramebuffer'' with `Target'
+%% set to `?GL_FRAMEBUFFER' binds `Framebuffer' to both the read and draw framebuffer
+%% targets. `Framebuffer' is the name of a framebuffer object previously returned from
+%% a call to {@link gl:genFramebuffers/1} , or zero to break the existing binding of a framebuffer
+%% object to `Target' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFramebuffer.xml">external</a> documentation.
+-spec bindFramebuffer(Target, Framebuffer) -> ok when Target :: enum(),Framebuffer :: integer().
bindFramebuffer(Target,Framebuffer) ->
cast(5656, <<Target:?GLenum,Framebuffer:?GLuint>>).
-%% @spec (Framebuffers::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteFramebuffers.xml">external</a> documentation.
--spec deleteFramebuffers([integer()]) -> ok.
+%% @doc Delete framebuffer objects
+%%
+%% ``gl:deleteFramebuffers'' deletes the `N' framebuffer objects whose names are stored
+%% in the array addressed by `Framebuffers' . The name zero is reserved by the GL and
+%% is silently ignored, should it occur in `Framebuffers' , as are other unused names.
+%% Once a framebuffer object is deleted, its name is again unused and it has no attachments.
+%% If a framebuffer that is currently bound to one or more of the targets `?GL_DRAW_FRAMEBUFFER'
+%% or `?GL_READ_FRAMEBUFFER' is deleted, it is as though {@link gl:bindFramebuffer/2}
+%% had been executed with the corresponding `Target' and `Framebuffer' zero.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteFramebuffers.xml">external</a> documentation.
+-spec deleteFramebuffers(Framebuffers) -> ok when Framebuffers :: [integer()].
deleteFramebuffers(Framebuffers) ->
cast(5657, <<(length(Framebuffers)):?GLuint,
(<< <<C:?GLuint>> || C <- Framebuffers>>)/binary,0:(((1+length(Framebuffers)) rem 2)*32)>>).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenFramebuffers.xml">external</a> documentation.
--spec genFramebuffers(integer()) -> [integer()].
+%% @doc Generate framebuffer object names
+%%
+%% ``gl:genFramebuffers'' returns `N' framebuffer object names in `Ids' . There
+%% is no guarantee that the names form a contiguous set of integers; however, it is guaranteed
+%% that none of the returned names was in use immediately before the call to ``gl:genFramebuffers''
+%% .
+%%
+%% Framebuffer object names returned by a call to ``gl:genFramebuffers'' are not returned
+%% by subsequent calls, unless they are first deleted with {@link gl:deleteFramebuffers/1} .
+%%
+%% The names returned in `Ids' are marked as used, for the purposes of ``gl:genFramebuffers''
+%% only, but they acquire state and type only when they are first bound.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenFramebuffers.xml">external</a> documentation.
+-spec genFramebuffers(N) -> [integer()] when N :: integer().
genFramebuffers(N) ->
call(5658, <<N:?GLsizei>>).
-%% @spec (Target::enum()) -> enum()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCheckFramebufferStatus.xml">external</a> documentation.
--spec checkFramebufferStatus(enum()) -> enum().
+%% @doc Check the completeness status of a framebuffer
+%%
+%% ``gl:checkFramebufferStatus'' queries the completeness status of the framebuffer object
+%% currently bound to `Target' . `Target' must be `?GL_DRAW_FRAMEBUFFER', `?GL_READ_FRAMEBUFFER'
+%% or `?GL_FRAMEBUFFER'. `?GL_FRAMEBUFFER' is equivalent to `?GL_DRAW_FRAMEBUFFER'
+%% .
+%%
+%% The return value is `?GL_FRAMEBUFFER_COMPLETE' if the framebuffer bound to `Target'
+%% is complete. Otherwise, the return value is determined as follows:
+%%
+%% `?GL_FRAMEBUFFER_UNDEFINED' is returned if `Target' is the default framebuffer,
+%% but the default framebuffer does not exist.
+%%
+%% `?GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT' is returned if any of the framebuffer attachment
+%% points are framebuffer incomplete.
+%%
+%% `?GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT' is returned if the framebuffer does
+%% not have at least one image attached to it.
+%%
+%% `?GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER' is returned if the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE'
+%% is `?GL_NONE' for any color attachment point(s) named by `?GL_DRAWBUFFERi'.
+%%
+%% `?GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER' is returned if `?GL_READ_BUFFER' is
+%% not `?GL_NONE' and the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is `?GL_NONE'
+%% for the color attachment point named by `?GL_READ_BUFFER'.
+%%
+%% `?GL_FRAMEBUFFER_UNSUPPORTED' is returned if the combination of internal formats
+%% of the attached images violates an implementation-dependent set of restrictions.
+%%
+%% `?GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE' is returned if the value of `?GL_RENDERBUFFER_SAMPLES'
+%% is not the same for all attached renderbuffers; if the value of `?GL_TEXTURE_SAMPLES'
+%% is the not same for all attached textures; or, if the attached images are a mix of renderbuffers
+%% and textures, the value of `?GL_RENDERBUFFER_SAMPLES' does not match the value of `?GL_TEXTURE_SAMPLES'
+%% .
+%%
+%% `?GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE' is also returned if the value of `?GL_TEXTURE_FIXED_SAMPLE_LOCATIONS'
+%% is not the same for all attached textures; or, if the attached images are a mix of renderbuffers
+%% and textures, the value of `?GL_TEXTURE_FIXED_SAMPLE_LOCATIONS' is not `?GL_TRUE'
+%% for all attached textures.
+%%
+%% `?GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS' is returned if any framebuffer attachment
+%% is layered, and any populated attachment is not layered, or if all populated color attachments
+%% are not from textures of the same target.
+%%
+%% Additionally, if an error occurs, zero is returned.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCheckFramebufferStatus.xml">external</a> documentation.
+-spec checkFramebufferStatus(Target) -> enum() when Target :: enum().
checkFramebufferStatus(Target) ->
call(5659, <<Target:?GLenum>>).
-%% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferTexture1D.xml">external</a> documentation.
--spec framebufferTexture1D(enum(),enum(),enum(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link framebufferTexture/4}
+-spec framebufferTexture1D(Target, Attachment, Textarget, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer().
framebufferTexture1D(Target,Attachment,Textarget,Texture,Level) ->
cast(5660, <<Target:?GLenum,Attachment:?GLenum,Textarget:?GLenum,Texture:?GLuint,Level:?GLint>>).
-%% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferTexture2D.xml">external</a> documentation.
--spec framebufferTexture2D(enum(),enum(),enum(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link framebufferTexture/4}
+-spec framebufferTexture2D(Target, Attachment, Textarget, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer().
framebufferTexture2D(Target,Attachment,Textarget,Texture,Level) ->
cast(5661, <<Target:?GLenum,Attachment:?GLenum,Textarget:?GLenum,Texture:?GLuint,Level:?GLint>>).
-%% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer(),Zoffset::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferTexture3D.xml">external</a> documentation.
--spec framebufferTexture3D(enum(),enum(),enum(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link framebufferTexture/4}
+-spec framebufferTexture3D(Target, Attachment, Textarget, Texture, Level, Zoffset) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer(),Zoffset :: integer().
framebufferTexture3D(Target,Attachment,Textarget,Texture,Level,Zoffset) ->
cast(5662, <<Target:?GLenum,Attachment:?GLenum,Textarget:?GLenum,Texture:?GLuint,Level:?GLint,Zoffset:?GLint>>).
-%% @spec (Target::enum(),Attachment::enum(),Renderbuffertarget::enum(),Renderbuffer::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferRenderbuffer.xml">external</a> documentation.
--spec framebufferRenderbuffer(enum(),enum(),enum(),integer()) -> ok.
+%% @doc Attach a renderbuffer as a logical buffer to the currently bound framebuffer object
+%%
+%% ``gl:framebufferRenderbuffer'' attaches a renderbuffer as one of the logical buffers
+%% of the currently bound framebuffer object. `Renderbuffer' is the name of the renderbuffer
+%% object to attach and must be either zero, or the name of an existing renderbuffer object
+%% of type `Renderbuffertarget' . If `Renderbuffer' is not zero and if ``gl:framebufferRenderbuffer''
+%% is successful, then the renderbuffer name `Renderbuffer' will be used as the logical
+%% buffer identified by `Attachment' of the framebuffer currently bound to `Target' .
+%%
+%%
+%% The value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' for the specified attachment
+%% point is set to `?GL_RENDERBUFFER' and the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME'
+%% is set to `Renderbuffer' . All other state values of the attachment point specified
+%% by `Attachment' are set to their default values. No change is made to the state of
+%% the renderbuuffer object and any previous attachment to the `Attachment' logical
+%% buffer of the framebuffer `Target' is broken.
+%%
+%% Calling ``gl:framebufferRenderbuffer'' with the renderbuffer name zero will detach
+%% the image, if any, identified by `Attachment' , in the framebuffer currently bound
+%% to `Target' . All state values of the attachment point specified by attachment in
+%% the object bound to target are set to their default values.
+%%
+%% Setting `Attachment' to the value `?GL_DEPTH_STENCIL_ATTACHMENT' is a special
+%% case causing both the depth and stencil attachments of the framebuffer object to be set
+%% to `Renderbuffer' , which should have the base internal format `?GL_DEPTH_STENCIL'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferRenderbuffer.xml">external</a> documentation.
+-spec framebufferRenderbuffer(Target, Attachment, Renderbuffertarget, Renderbuffer) -> ok when Target :: enum(),Attachment :: enum(),Renderbuffertarget :: enum(),Renderbuffer :: integer().
framebufferRenderbuffer(Target,Attachment,Renderbuffertarget,Renderbuffer) ->
cast(5663, <<Target:?GLenum,Attachment:?GLenum,Renderbuffertarget:?GLenum,Renderbuffer:?GLuint>>).
-%% @spec (Target::enum(),Attachment::enum(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetFramebufferAttachmentParameter.xml">external</a> documentation.
--spec getFramebufferAttachmentParameteriv(enum(),enum(),enum()) -> integer().
+%% @doc Retrieve information about attachments of a bound framebuffer object
+%%
+%% ``gl:getFramebufferAttachmentParameter'' returns information about attachments of a
+%% bound framebuffer object. `Target' specifies the framebuffer binding point and must
+%% be `?GL_DRAW_FRAMEBUFFER', `?GL_READ_FRAMEBUFFER' or `?GL_FRAMEBUFFER'. `?GL_FRAMEBUFFER'
+%% is equivalent to `?GL_DRAW_FRAMEBUFFER'.
+%%
+%% If the default framebuffer is bound to `Target' then `Attachment' must be one
+%% of `?GL_FRONT_LEFT', `?GL_FRONT_RIGHT', `?GL_BACK_LEFT', or `?GL_BACK_RIGHT'
+%% , identifying a color buffer, `?GL_DEPTH', identifying the depth buffer, or `?GL_STENCIL'
+%% , identifying the stencil buffer.
+%%
+%% If a framebuffer object is bound, then `Attachment' must be one of `?GL_COLOR_ATTACHMENT'
+%% `i', `?GL_DEPTH_ATTACHMENT', `?GL_STENCIL_ATTACHMENT', or `?GL_DEPTH_STENCIL_ATTACHMENT'
+%% . `i' in `?GL_COLOR_ATTACHMENT'`i' must be in the range zero to the value
+%% of `?GL_MAX_COLOR_ATTACHMENTS' - 1.
+%%
+%% If `Attachment' is `?GL_DEPTH_STENCIL_ATTACHMENT' and different objects are
+%% bound to the depth and stencil attachment points of `Target' the query will fail.
+%% If the same object is bound to both attachment points, information about that object will
+%% be returned.
+%%
+%% Upon successful return from ``gl:getFramebufferAttachmentParameteriv'', if `Pname'
+%% is `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE', then `Params' will contain one of `?GL_NONE'
+%% , `?GL_FRAMEBUFFER_DEFAULT', `?GL_TEXTURE', or `?GL_RENDERBUFFER', identifying
+%% the type of object which contains the attached image. Other values accepted for `Pname'
+%% depend on the type of object, as described below.
+%%
+%% If the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is `?GL_NONE', no
+%% framebuffer is bound to `Target' . In this case querying `Pname' `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME'
+%% will return zero, and all other queries will generate an error.
+%%
+%% If the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is not `?GL_NONE',
+%% these queries apply to all other framebuffer types:
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE', `?GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE'
+%% , `?GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE', `?GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE'
+%% , `?GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE', or `?GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE'
+%% , then `Params' will contain the number of bits in the corresponding red, green,
+%% blue, alpha, depth, or stencil component of the specified attachment. Zero is returned
+%% if the requested component is not present in `Attachment' .
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE', `Params' will
+%% contain the format of components of the specified attachment, one of `?GL_FLOAT', `GL_INT'
+%% , `GL_UNSIGNED_INT' , `GL_SIGNED_NORMALIZED' , or `GL_UNSIGNED_NORMALIZED'
+%% for floating-point, signed integer, unsigned integer, signed normalized fixed-point, or
+%% unsigned normalized fixed-point components respectively. Only color buffers may have integer
+%% components.
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING', `Param' will
+%% contain the encoding of components of the specified attachment, one of `?GL_LINEAR'
+%% or `?GL_SRGB' for linear or sRGB-encoded components, respectively. Only color buffer
+%% components may be sRGB-encoded; such components are treated as described in sections 4.1.7
+%% and 4.1.8. For the default framebuffer, color encoding is determined by the implementation.
+%% For framebuffer objects, components are sRGB-encoded if the internal format of a color
+%% attachment is one of the color-renderable SRGB formats.
+%%
+%% If the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is `?GL_RENDERBUFFER',
+%% then:
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME', `Params' will
+%% contain the name of the renderbuffer object which contains the attached image.
+%%
+%% If the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is `?GL_TEXTURE',
+%% then:
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME', then `Params'
+%% will contain the name of the texture object which contains the attached image.
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL', then `Params'
+%% will contain the mipmap level of the texture object which contains the attached image.
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE' and the texture
+%% object named `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME' is a cube map texture, then `Params'
+%% will contain the cube map face of the cubemap texture object which contains the attached
+%% image. Otherwise `Params' will contain the value zero.
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER' and the texture object
+%% named `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME' is a layer of a three-dimensional
+%% texture or a one-or two-dimensional array texture, then `Params' will contain the
+%% number of the texture layer which contains the attached image. Otherwise `Params'
+%% will contain the value zero.
+%%
+%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_LAYERED', then `Params' will
+%% contain `?GL_TRUE' if an entire level of a three-dimesional texture, cube map texture,
+%% or one-or two-dimensional array texture is attached. Otherwise, `Params' will contain
+%% `?GL_FALSE'.
+%%
+%% Any combinations of framebuffer type and `Pname' not described above will generate
+%% an error.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetFramebufferAttachmentParameter.xml">external</a> documentation.
+-spec getFramebufferAttachmentParameteriv(Target, Attachment, Pname) -> integer() when Target :: enum(),Attachment :: enum(),Pname :: enum().
getFramebufferAttachmentParameteriv(Target,Attachment,Pname) ->
call(5664, <<Target:?GLenum,Attachment:?GLenum,Pname:?GLenum>>).
-%% @spec (Target::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenerateMipmap.xml">external</a> documentation.
--spec generateMipmap(enum()) -> ok.
+%% @doc Generate mipmaps for a specified texture target
+%%
+%% ``gl:generateMipmap'' generates mipmaps for the texture attached to `Target' of
+%% the active texture unit. For cube map textures, a `?GL_INVALID_OPERATION' error is
+%% generated if the texture attached to `Target' is not cube complete.
+%%
+%% Mipmap generation replaces texel array levels level base+1 through q with arrays derived
+%% from the level base array, regardless of their previous contents. All other mimap arrays,
+%% including the level base array, are left unchanged by this computation.
+%%
+%% The internal formats of the derived mipmap arrays all match those of the level base
+%% array. The contents of the derived arrays are computed by repeated, filtered reduction
+%% of the level base array. For one- and two-dimensional texture arrays, each layer is filtered
+%% independently.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenerateMipmap.xml">external</a> documentation.
+-spec generateMipmap(Target) -> ok when Target :: enum().
generateMipmap(Target) ->
cast(5665, <<Target:?GLenum>>).
-%% @spec (SrcX0::integer(),SrcY0::integer(),SrcX1::integer(),SrcY1::integer(),DstX0::integer(),DstY0::integer(),DstX1::integer(),DstY1::integer(),Mask::integer(),Filter::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlitFramebuffer.xml">external</a> documentation.
--spec blitFramebuffer(integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),enum()) -> ok.
+%% @doc Copy a block of pixels from the read framebuffer to the draw framebuffer
+%%
+%% ``gl:blitFramebuffer'' transfers a rectangle of pixel values from one region of the
+%% read framebuffer to another region in the draw framebuffer. `Mask' is the bitwise
+%% OR of a number of values indicating which buffers are to be copied. The values are `?GL_COLOR_BUFFER_BIT'
+%% , `?GL_DEPTH_BUFFER_BIT', and `?GL_STENCIL_BUFFER_BIT'. The pixels corresponding
+%% to these buffers are copied from the source rectangle bounded by the locations ( `SrcX0'
+%% ; `SrcY0' ) and ( `SrcX1' ; `SrcY1' ) to the destination rectangle bounded
+%% by the locations ( `DstX0' ; `DstY0' ) and ( `DstX1' ; `DstY1' ). The lower
+%% bounds of the rectangle are inclusive, while the upper bounds are exclusive.
+%%
+%% The actual region taken from the read framebuffer is limited to the intersection of the
+%% source buffers being transferred, which may include the color buffer selected by the read
+%% buffer, the depth buffer, and/or the stencil buffer depending on mask. The actual region
+%% written to the draw framebuffer is limited to the intersection of the destination buffers
+%% being written, which may include multiple draw buffers, the depth buffer, and/or the stencil
+%% buffer depending on mask. Whether or not the source or destination regions are altered
+%% due to these limits, the scaling and offset applied to pixels being transferred is performed
+%% as though no such limits were present.
+%%
+%% If the sizes of the source and destination rectangles are not equal, `Filter' specifies
+%% the interpolation method that will be applied to resize the source image , and must be `?GL_NEAREST'
+%% or `?GL_LINEAR'. `?GL_LINEAR' is only a valid interpolation method for the
+%% color buffer. If `Filter' is not `?GL_NEAREST' and `Mask' includes `?GL_DEPTH_BUFFER_BIT'
+%% or `?GL_STENCIL_BUFFER_BIT', no data is transferred and a `?GL_INVALID_OPERATION'
+%% error is generated.
+%%
+%% If `Filter' is `?GL_LINEAR' and the source rectangle would require sampling
+%% outside the bounds of the source framebuffer, values are read as if the `?GL_CLAMP_TO_EDGE'
+%% texture wrapping mode were applied.
+%%
+%% When the color buffer is transferred, values are taken from the read buffer of the read
+%% framebuffer and written to each of the draw buffers of the draw framebuffer.
+%%
+%% If the source and destination rectangles overlap or are the same, and the read and draw
+%% buffers are the same, the result of the operation is undefined.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlitFramebuffer.xml">external</a> documentation.
+-spec blitFramebuffer(SrcX0, SrcY0, SrcX1, SrcY1, DstX0, DstY0, DstX1, DstY1, Mask, Filter) -> ok when SrcX0 :: integer(),SrcY0 :: integer(),SrcX1 :: integer(),SrcY1 :: integer(),DstX0 :: integer(),DstY0 :: integer(),DstX1 :: integer(),DstY1 :: integer(),Mask :: integer(),Filter :: enum().
blitFramebuffer(SrcX0,SrcY0,SrcX1,SrcY1,DstX0,DstY0,DstX1,DstY1,Mask,Filter) ->
cast(5666, <<SrcX0:?GLint,SrcY0:?GLint,SrcX1:?GLint,SrcY1:?GLint,DstX0:?GLint,DstY0:?GLint,DstX1:?GLint,DstY1:?GLint,Mask:?GLbitfield,Filter:?GLenum>>).
-%% @spec (Target::enum(),Samples::integer(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRenderbufferStorageMultisample.xml">external</a> documentation.
--spec renderbufferStorageMultisample(enum(),integer(),enum(),integer(),integer()) -> ok.
+%% @doc Establish data storage, format, dimensions and sample count of a renderbuffer object's image
+%%
+%% ``gl:renderbufferStorageMultisample'' establishes the data storage, format, dimensions
+%% and number of samples of a renderbuffer object's image.
+%%
+%% The target of the operation, specified by `Target' must be `?GL_RENDERBUFFER'.
+%% `Internalformat' specifies the internal format to be used for the renderbuffer object's
+%% storage and must be a color-renderable, depth-renderable, or stencil-renderable format. `Width'
+%% and `Height' are the dimensions, in pixels, of the renderbuffer. Both `Width'
+%% and `Height' must be less than or equal to the value of `?GL_MAX_RENDERBUFFER_SIZE'
+%% . `Samples' specifies the number of samples to be used for the renderbuffer object's
+%% image, and must be less than or equal to the value of `?GL_MAX_SAMPLES'. If `Internalformat'
+%% is a signed or unsigned integer format then `Samples' must be less than or equal
+%% to the value of `?GL_MAX_INTEGER_SAMPLES'.
+%%
+%% Upon success, ``gl:renderbufferStorageMultisample'' deletes any existing data store
+%% for the renderbuffer image and the contents of the data store after calling ``gl:renderbufferStorageMultisample''
+%% are undefined.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRenderbufferStorageMultisample.xml">external</a> documentation.
+-spec renderbufferStorageMultisample(Target, Samples, Internalformat, Width, Height) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer().
renderbufferStorageMultisample(Target,Samples,Internalformat,Width,Height) ->
cast(5667, <<Target:?GLenum,Samples:?GLsizei,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei>>).
-%% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer(),Layer::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferTextureLayer.xml">external</a> documentation.
--spec framebufferTextureLayer(enum(),enum(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link framebufferTexture/4}
+-spec framebufferTextureLayer(Target, Attachment, Texture, Level, Layer) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(),Layer :: integer().
framebufferTextureLayer(Target,Attachment,Texture,Level,Layer) ->
cast(5668, <<Target:?GLenum,Attachment:?GLenum,Texture:?GLuint,Level:?GLint,Layer:?GLint>>).
-%% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer(),Face::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferTextureFaceARB.xml">external</a> documentation.
--spec framebufferTextureFaceARB(enum(),enum(),integer(),integer(),enum()) -> ok.
+%% @doc
+%% See {@link framebufferTexture/4}
+-spec framebufferTextureFaceARB(Target, Attachment, Texture, Level, Face) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(),Face :: enum().
framebufferTextureFaceARB(Target,Attachment,Texture,Level,Face) ->
cast(5669, <<Target:?GLenum,Attachment:?GLenum,Texture:?GLuint,Level:?GLint,Face:?GLenum>>).
-%% @spec (Target::enum(),Offset::integer(),Length::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFlushMappedBufferRange.xml">external</a> documentation.
--spec flushMappedBufferRange(enum(),integer(),integer()) -> ok.
+%% @doc Indicate modifications to a range of a mapped buffer
+%%
+%% ``gl:flushMappedBufferRange'' indicates that modifications have been made to a range
+%% of a mapped buffer. The buffer must previously have been mapped with the `?GL_MAP_FLUSH_EXPLICIT'
+%% flag. `Offset' and `Length' indicate the modified subrange of the mapping,
+%% in basic units. The specified subrange to flush is relative to the start of the currently
+%% mapped range of the buffer. ``gl:flushMappedBufferRange'' may be called multiple times
+%% to indicate distinct subranges of the mapping which require flushing.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFlushMappedBufferRange.xml">external</a> documentation.
+-spec flushMappedBufferRange(Target, Offset, Length) -> ok when Target :: enum(),Offset :: integer(),Length :: integer().
flushMappedBufferRange(Target,Offset,Length) ->
cast(5670, <<Target:?GLenum,0:32,Offset:?GLintptr,Length:?GLsizeiptr>>).
-%% @spec (Array::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindVertexArray.xml">external</a> documentation.
--spec bindVertexArray(integer()) -> ok.
+%% @doc Bind a vertex array object
+%%
+%% ``gl:bindVertexArray'' binds the vertex array object with name `Array' . `Array'
+%% is the name of a vertex array object previously returned from a call to {@link gl:genVertexArrays/1}
+%% , or zero to break the existing vertex array object binding.
+%%
+%% If no vertex array object with name `Array' exists, one is created when `Array'
+%% is first bound. If the bind is successful no change is made to the state of the vertex
+%% array object, and any previous vertex array object binding is broken.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindVertexArray.xml">external</a> documentation.
+-spec bindVertexArray(Array) -> ok when Array :: integer().
bindVertexArray(Array) ->
cast(5671, <<Array:?GLuint>>).
-%% @spec (Arrays::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteVertexArrays.xml">external</a> documentation.
--spec deleteVertexArrays([integer()]) -> ok.
+%% @doc Delete vertex array objects
+%%
+%% ``gl:deleteVertexArrays'' deletes `N' vertex array objects whose names are stored
+%% in the array addressed by `Arrays' . Once a vertex array object is deleted it has
+%% no contents and its name is again unused. If a vertex array object that is currently bound
+%% is deleted, the binding for that object reverts to zero and the default vertex array becomes
+%% current. Unused names in `Arrays' are silently ignored, as is the value zero.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteVertexArrays.xml">external</a> documentation.
+-spec deleteVertexArrays(Arrays) -> ok when Arrays :: [integer()].
deleteVertexArrays(Arrays) ->
cast(5672, <<(length(Arrays)):?GLuint,
(<< <<C:?GLuint>> || C <- Arrays>>)/binary,0:(((1+length(Arrays)) rem 2)*32)>>).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenVertexArrays.xml">external</a> documentation.
--spec genVertexArrays(integer()) -> [integer()].
+%% @doc Generate vertex array object names
+%%
+%% ``gl:genVertexArrays'' returns `N' vertex array object names in `Arrays' .
+%% There is no guarantee that the names form a contiguous set of integers; however, it is
+%% guaranteed that none of the returned names was in use immediately before the call to ``gl:genVertexArrays''
+%% .
+%%
+%% Vertex array object names returned by a call to ``gl:genVertexArrays'' are not returned
+%% by subsequent calls, unless they are first deleted with {@link gl:deleteVertexArrays/1} .
+%%
+%% The names returned in `Arrays' are marked as used, for the purposes of ``gl:genVertexArrays''
+%% only, but they acquire state and type only when they are first bound.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenVertexArrays.xml">external</a> documentation.
+-spec genVertexArrays(N) -> [integer()] when N :: integer().
genVertexArrays(N) ->
call(5673, <<N:?GLsizei>>).
-%% @spec (Array::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsVertexArray.xml">external</a> documentation.
--spec isVertexArray(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a vertex array object
+%%
+%% ``gl:isVertexArray'' returns `?GL_TRUE' if `Array' is currently the name of
+%% a renderbuffer object. If `Renderbuffer' is zero, or if `Array' is not the name
+%% of a renderbuffer object, or if an error occurs, ``gl:isVertexArray'' returns `?GL_FALSE'
+%% . If `Array' is a name returned by {@link gl:genVertexArrays/1} , by that has not yet
+%% been bound through a call to {@link gl:bindVertexArray/1} , then the name is not a vertex
+%% array object and ``gl:isVertexArray'' returns `?GL_FALSE'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsVertexArray.xml">external</a> documentation.
+-spec isVertexArray(Array) -> 0|1 when Array :: integer().
isVertexArray(Array) ->
call(5674, <<Array:?GLuint>>).
-%% @spec (Program::integer(),UniformNames::[string()]) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformIndices.xml">external</a> documentation.
--spec getUniformIndices(integer(),[string()]) -> [integer()].
+%% @doc Retrieve the index of a named uniform block
+%%
+%% ``gl:getUniformIndices'' retrieves the indices of a number of uniforms within `Program'
+%% .
+%%
+%% `Program' must be the name of a program object for which the command {@link gl:linkProgram/1}
+%% must have been called in the past, although it is not required that {@link gl:linkProgram/1}
+%% must have succeeded. The link could have failed because the number of active uniforms
+%% exceeded the limit.
+%%
+%% `UniformCount' indicates both the number of elements in the array of names `UniformNames'
+%% and the number of indices that may be written to `UniformIndices' .
+%%
+%% `UniformNames' contains a list of `UniformCount' name strings identifying the
+%% uniform names to be queried for indices. For each name string in `UniformNames' ,
+%% the index assigned to the active uniform of that name will be written to the corresponding
+%% element of `UniformIndices' . If a string in `UniformNames' is not the name of
+%% an active uniform, the special value `?GL_INVALID_INDEX' will be written to the corresponding
+%% element of `UniformIndices' .
+%%
+%% If an error occurs, nothing is written to `UniformIndices' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformIndices.xml">external</a> documentation.
+-spec getUniformIndices(Program, UniformNames) -> [integer()] when Program :: integer(),UniformNames :: [string()].
getUniformIndices(Program,UniformNames) ->
UniformNamesTemp = list_to_binary([[Str|[0]] || Str <- UniformNames ]),
call(5675, <<Program:?GLuint,(length(UniformNames)):?GLuint,(size(UniformNamesTemp)):?GLuint,(UniformNamesTemp)/binary,0:((8-((size(UniformNamesTemp)+0) rem 8)) rem 8)>>).
-%% @spec (Program::integer(),UniformIndices::[integer()],Pname::enum()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniforms.xml">external</a> documentation.
--spec getActiveUniformsiv(integer(),[integer()],enum()) -> [integer()].
+%% @doc glGetActiveUniforms
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniforms.xml">external</a> documentation.
+-spec getActiveUniformsiv(Program, UniformIndices, Pname) -> [integer()] when Program :: integer(),UniformIndices :: [integer()],Pname :: enum().
getActiveUniformsiv(Program,UniformIndices,Pname) ->
call(5676, <<Program:?GLuint,(length(UniformIndices)):?GLuint,
(<< <<C:?GLuint>> || C <- UniformIndices>>)/binary,0:(((length(UniformIndices)) rem 2)*32),Pname:?GLenum>>).
-%% @spec (Program::integer(),UniformIndex::integer(),BufSize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformName.xml">external</a> documentation.
--spec getActiveUniformName(integer(),integer(),integer()) -> string().
+%% @doc Query the name of an active uniform
+%%
+%% ``gl:getActiveUniformName'' returns the name of the active uniform at `UniformIndex'
+%% within `Program' . If `UniformName' is not NULL, up to `BufSize' characters
+%% (including a nul-terminator) will be written into the array whose address is specified
+%% by `UniformName' . If `Length' is not NULL, the number of characters that were
+%% (or would have been) written into `UniformName' (not including the nul-terminator)
+%% will be placed in the variable whose address is specified in `Length' . If `Length'
+%% is NULL, no length is returned. The length of the longest uniform name in `Program'
+%% is given by the value of `?GL_ACTIVE_UNIFORM_MAX_LENGTH', which can be queried with {@link gl:getProgramiv/2}
+%% .
+%%
+%% If ``gl:getActiveUniformName'' is not successful, nothing is written to `Length'
+%% or `UniformName' .
+%%
+%% `Program' must be the name of a program for which the command {@link gl:linkProgram/1}
+%% has been issued in the past. It is not necessary for `Program' to have been linked
+%% successfully. The link could have failed because the number of active uniforms exceeded
+%% the limit.
+%%
+%% `UniformIndex' must be an active uniform index of the program `Program' , in
+%% the range zero to `?GL_ACTIVE_UNIFORMS' - 1. The value of `?GL_ACTIVE_UNIFORMS'
+%% can be queried with {@link gl:getProgramiv/2} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformName.xml">external</a> documentation.
+-spec getActiveUniformName(Program, UniformIndex, BufSize) -> string() when Program :: integer(),UniformIndex :: integer(),BufSize :: integer().
getActiveUniformName(Program,UniformIndex,BufSize) ->
call(5677, <<Program:?GLuint,UniformIndex:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Program::integer(),UniformBlockName::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformBlockIndex.xml">external</a> documentation.
--spec getUniformBlockIndex(integer(),string()) -> integer().
+%% @doc Retrieve the index of a named uniform block
+%%
+%% ``gl:getUniformBlockIndex'' retrieves the index of a uniform block within `Program' .
+%%
+%%
+%% `Program' must be the name of a program object for which the command {@link gl:linkProgram/1}
+%% must have been called in the past, although it is not required that {@link gl:linkProgram/1}
+%% must have succeeded. The link could have failed because the number of active uniforms
+%% exceeded the limit.
+%%
+%% `UniformBlockName' must contain a nul-terminated string specifying the name of the
+%% uniform block.
+%%
+%% ``gl:getUniformBlockIndex'' returns the uniform block index for the uniform block named
+%% `UniformBlockName' of `Program' . If `UniformBlockName' does not identify
+%% an active uniform block of `Program' , ``gl:getUniformBlockIndex'' returns the special
+%% identifier, `?GL_INVALID_INDEX'. Indices of the active uniform blocks of a program
+%% are assigned in consecutive order, beginning with zero.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformBlockIndex.xml">external</a> documentation.
+-spec getUniformBlockIndex(Program, UniformBlockName) -> integer() when Program :: integer(),UniformBlockName :: string().
getUniformBlockIndex(Program,UniformBlockName) ->
call(5678, <<Program:?GLuint,(list_to_binary([UniformBlockName|[0]]))/binary,0:((8-((length(UniformBlockName)+ 5) rem 8)) rem 8)>>).
-%% @spec (Program::integer(),UniformBlockIndex::integer(),Pname::enum(),Params::mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformBlock.xml">external</a> documentation.
--spec getActiveUniformBlockiv(integer(),integer(),enum(),mem()) -> ok.
+%% @doc Query information about an active uniform block
+%%
+%% ``gl:getActiveUniformBlockiv'' retrieves information about an active uniform block within
+%% `Program' .
+%%
+%% `Program' must be the name of a program object for which the command {@link gl:linkProgram/1}
+%% must have been called in the past, although it is not required that {@link gl:linkProgram/1}
+%% must have succeeded. The link could have failed because the number of active uniforms
+%% exceeded the limit.
+%%
+%% `UniformBlockIndex' is an active uniform block index of `Program' , and must
+%% be less than the value of `?GL_ACTIVE_UNIFORM_BLOCKS'.
+%%
+%% Upon success, the uniform block parameter(s) specified by `Pname' are returned in `Params'
+%% . If an error occurs, nothing will be written to `Params' .
+%%
+%% If `Pname' is `?GL_UNIFORM_BLOCK_BINDING', then the index of the uniform buffer
+%% binding point last selected by the uniform block specified by `UniformBlockIndex'
+%% for `Program' is returned. If no uniform block has been previously specified, zero
+%% is returned.
+%%
+%% If `Pname' is `?GL_UNIFORM_BLOCK_DATA_SIZE', then the implementation-dependent
+%% minimum total buffer object size, in basic machine units, required to hold all active
+%% uniforms in the uniform block identified by `UniformBlockIndex' is returned. It is
+%% neither guaranteed nor expected that a given implementation will arrange uniform values
+%% as tightly packed in a buffer object. The exception to this is the `std140 uniform block layout'
+%% , which guarantees specific packing behavior and does not require the application to query
+%% for offsets and strides. In this case the minimum size may still be queried, even though
+%% it is determined in advance based only on the uniform block declaration.
+%%
+%% If `Pname' is `?GL_UNIFORM_BLOCK_NAME_LENGTH', then the total length (including
+%% the nul terminator) of the name of the uniform block identified by `UniformBlockIndex'
+%% is returned.
+%%
+%% If `Pname' is `?GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS', then the number of active
+%% uniforms in the uniform block identified by `UniformBlockIndex' is returned.
+%%
+%% If `Pname' is `?GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES', then a list of the
+%% active uniform indices for the uniform block identified by `UniformBlockIndex' is
+%% returned. The number of elements that will be written to `Params' is the value of `?GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS'
+%% for `UniformBlockIndex' .
+%%
+%% If `Pname' is `?GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER', `?GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER'
+%% , or `?GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER', then a boolean value indicating
+%% whether the uniform block identified by `UniformBlockIndex' is referenced by the
+%% vertex, geometry, or fragment programming stages of program, respectively, is returned.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformBlock.xml">external</a> documentation.
+-spec getActiveUniformBlockiv(Program, UniformBlockIndex, Pname, Params) -> ok when Program :: integer(),UniformBlockIndex :: integer(),Pname :: enum(),Params :: mem().
getActiveUniformBlockiv(Program,UniformBlockIndex,Pname,Params) ->
send_bin(Params),
call(5679, <<Program:?GLuint,UniformBlockIndex:?GLuint,Pname:?GLenum>>).
-%% @spec (Program::integer(),UniformBlockIndex::integer(),BufSize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformBlockName.xml">external</a> documentation.
--spec getActiveUniformBlockName(integer(),integer(),integer()) -> string().
+%% @doc Retrieve the name of an active uniform block
+%%
+%% ``gl:getActiveUniformBlockName'' retrieves the name of the active uniform block at `UniformBlockIndex'
+%% within `Program' .
+%%
+%% `Program' must be the name of a program object for which the command {@link gl:linkProgram/1}
+%% must have been called in the past, although it is not required that {@link gl:linkProgram/1}
+%% must have succeeded. The link could have failed because the number of active uniforms
+%% exceeded the limit.
+%%
+%% `UniformBlockIndex' is an active uniform block index of `Program' , and must
+%% be less than the value of `?GL_ACTIVE_UNIFORM_BLOCKS'.
+%%
+%% Upon success, the name of the uniform block identified by `UnifomBlockIndex' is
+%% returned into `UniformBlockName' . The name is nul-terminated. The actual number of
+%% characters written into `UniformBlockName' , excluding the nul terminator, is returned
+%% in `Length' . If `Length' is NULL, no length is returned.
+%%
+%% `BufSize' contains the maximum number of characters (including the nul terminator)
+%% that will be written into `UniformBlockName' .
+%%
+%% If an error occurs, nothing will be written to `UniformBlockName' or `Length' .
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformBlockName.xml">external</a> documentation.
+-spec getActiveUniformBlockName(Program, UniformBlockIndex, BufSize) -> string() when Program :: integer(),UniformBlockIndex :: integer(),BufSize :: integer().
getActiveUniformBlockName(Program,UniformBlockIndex,BufSize) ->
call(5680, <<Program:?GLuint,UniformBlockIndex:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Program::integer(),UniformBlockIndex::integer(),UniformBlockBinding::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformBlockBinding.xml">external</a> documentation.
--spec uniformBlockBinding(integer(),integer(),integer()) -> ok.
+%% @doc Assign a binding point to an active uniform block
+%%
+%% Binding points for active uniform blocks are assigned using ``gl:uniformBlockBinding''.
+%% Each of a program's active uniform blocks has a corresponding uniform buffer binding point.
+%% `Program' is the name of a program object for which the command {@link gl:linkProgram/1}
+%% has been issued in the past.
+%%
+%% If successful, ``gl:uniformBlockBinding'' specifies that `Program' will use the
+%% data store of the buffer object bound to the binding point `UniformBlockBinding'
+%% to extract the values of the uniforms in the uniform block identified by `UniformBlockIndex'
+%% .
+%%
+%% When a program object is linked or re-linked, the uniform buffer object binding point
+%% assigned to each of its active uniform blocks is reset to zero.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformBlockBinding.xml">external</a> documentation.
+-spec uniformBlockBinding(Program, UniformBlockIndex, UniformBlockBinding) -> ok when Program :: integer(),UniformBlockIndex :: integer(),UniformBlockBinding :: integer().
uniformBlockBinding(Program,UniformBlockIndex,UniformBlockBinding) ->
cast(5681, <<Program:?GLuint,UniformBlockIndex:?GLuint,UniformBlockBinding:?GLuint>>).
-%% @spec (ReadTarget::enum(),WriteTarget::enum(),ReadOffset::integer(),WriteOffset::integer(),Size::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyBufferSubData.xml">external</a> documentation.
--spec copyBufferSubData(enum(),enum(),integer(),integer(),integer()) -> ok.
+%% @doc Copy part of the data store of a buffer object to the data store of another buffer object
+%%
+%% ``gl:copyBufferSubData'' copies part of the data store attached to `Readtarget'
+%% to the data store attached to `Writetarget' . The number of basic machine units indicated
+%% by `Size' is copied from the source, at offset `Readoffset' to the destination
+%% at `Writeoffset' , also in basic machine units.
+%%
+%% `Readtarget' and `Writetarget' must be `?GL_ARRAY_BUFFER', `?GL_COPY_READ_BUFFER'
+%% , `?GL_COPY_WRITE_BUFFER', `?GL_ELEMENT_ARRAY_BUFFER', `?GL_PIXEL_PACK_BUFFER'
+%% , `?GL_PIXEL_UNPACK_BUFFER', `?GL_TEXTURE_BUFFER', `?GL_TRANSFORM_FEEDBACK_BUFFER'
+%% or `?GL_UNIFORM_BUFFER'. Any of these targets may be used, although the targets `?GL_COPY_READ_BUFFER'
+%% and `?GL_COPY_WRITE_BUFFER' are provided specifically to allow copies between buffers
+%% without disturbing other GL state.
+%%
+%% `Readoffset' , `Writeoffset' and `Size' must all be greater than or equal
+%% to zero. Furthermore, `Readoffset' + `Size' must not exceeed the size of the
+%% buffer object bound to `Readtarget' , and `Readoffset' + `Size' must not
+%% exceeed the size of the buffer bound to `Writetarget' . If the same buffer object
+%% is bound to both `Readtarget' and `Writetarget' , then the ranges specified by `Readoffset'
+%% , `Writeoffset' and `Size' must not overlap.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyBufferSubData.xml">external</a> documentation.
+-spec copyBufferSubData(ReadTarget, WriteTarget, ReadOffset, WriteOffset, Size) -> ok when ReadTarget :: enum(),WriteTarget :: enum(),ReadOffset :: integer(),WriteOffset :: integer(),Size :: integer().
copyBufferSubData(ReadTarget,WriteTarget,ReadOffset,WriteOffset,Size) ->
cast(5682, <<ReadTarget:?GLenum,WriteTarget:?GLenum,ReadOffset:?GLintptr,WriteOffset:?GLintptr,Size:?GLsizeiptr>>).
-%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|mem(),Basevertex::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsBaseVertex.xml">external</a> documentation.
--spec drawElementsBaseVertex(enum(),integer(),enum(),offset()|mem(),integer()) -> ok.
+%% @doc Render primitives from array data with a per-element offset
+%%
+%% ``gl:drawElementsBaseVertex'' behaves identically to {@link gl:drawElements/4} except
+%% that the `i'th element transferred by the corresponding draw call will be taken from
+%% element `Indices' [i] + `Basevertex' of each enabled array. If the resulting
+%% value is larger than the maximum value representable by `Type' , it is as if the calculation
+%% were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions). The
+%% operation is undefined if the sum would be negative.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsBaseVertex.xml">external</a> documentation.
+-spec drawElementsBaseVertex(Mode, Count, Type, Indices, Basevertex) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Basevertex :: integer().
drawElementsBaseVertex(Mode,Count,Type,Indices,Basevertex) when is_integer(Indices) ->
cast(5683, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Basevertex:?GLint>>);
drawElementsBaseVertex(Mode,Count,Type,Indices,Basevertex) ->
send_bin(Indices),
cast(5684, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Basevertex:?GLint>>).
-%% @spec (Mode::enum(),Start::integer(),End::integer(),Count::integer(),Type::enum(),Indices::offset()|mem(),Basevertex::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawRangeElementsBaseVertex.xml">external</a> documentation.
--spec drawRangeElementsBaseVertex(enum(),integer(),integer(),integer(),enum(),offset()|mem(),integer()) -> ok.
+%% @doc Render primitives from array data with a per-element offset
+%%
+%% ``gl:drawRangeElementsBaseVertex'' is a restricted form of {@link gl:drawElementsBaseVertex/5}
+%% . `Mode' , `Start' , `End' , `Count' and `Basevertex' match the
+%% corresponding arguments to {@link gl:drawElementsBaseVertex/5} , with the additional constraint
+%% that all values in the array `Indices' must lie between `Start' and `End' ,
+%% inclusive, prior to adding `Basevertex' . Index values lying outside the range [ `Start'
+%% , `End' ] are treated in the same way as {@link gl:drawElementsBaseVertex/5} . The `i'
+%% th element transferred by the corresponding draw call will be taken from element `Indices'
+%% [i] + `Basevertex' of each enabled array. If the resulting value is larger than the
+%% maximum value representable by `Type' , it is as if the calculation were upconverted
+%% to 32-bit unsigned integers (with wrapping on overflow conditions). The operation is undefined
+%% if the sum would be negative.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawRangeElementsBaseVertex.xml">external</a> documentation.
+-spec drawRangeElementsBaseVertex(Mode, Start, End, Count, Type, Indices, Basevertex) -> ok when Mode :: enum(),Start :: integer(),End :: integer(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Basevertex :: integer().
drawRangeElementsBaseVertex(Mode,Start,End,Count,Type,Indices,Basevertex) when is_integer(Indices) ->
cast(5685, <<Mode:?GLenum,Start:?GLuint,End:?GLuint,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Basevertex:?GLint>>);
drawRangeElementsBaseVertex(Mode,Start,End,Count,Type,Indices,Basevertex) ->
send_bin(Indices),
cast(5686, <<Mode:?GLenum,Start:?GLuint,End:?GLuint,Count:?GLsizei,Type:?GLenum,Basevertex:?GLint>>).
-%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|mem(),Primcount::integer(),Basevertex::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstancedBaseVertex.xml">external</a> documentation.
--spec drawElementsInstancedBaseVertex(enum(),integer(),enum(),offset()|mem(),integer(),integer()) -> ok.
+%% @doc Render multiple instances of a set of primitives from array data with a per-element offset
+%%
+%% ``gl:drawElementsInstancedBaseVertex'' behaves identically to {@link gl:drawElementsInstanced/5}
+%% except that the `i'th element transferred by the corresponding draw call will be
+%% taken from element `Indices' [i] + `Basevertex' of each enabled array. If the
+%% resulting value is larger than the maximum value representable by `Type' , it is as
+%% if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow
+%% conditions). The operation is undefined if the sum would be negative.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstancedBaseVertex.xml">external</a> documentation.
+-spec drawElementsInstancedBaseVertex(Mode, Count, Type, Indices, Primcount, Basevertex) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Basevertex :: integer().
drawElementsInstancedBaseVertex(Mode,Count,Type,Indices,Primcount,Basevertex) when is_integer(Indices) ->
cast(5687, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Primcount:?GLsizei,Basevertex:?GLint>>);
drawElementsInstancedBaseVertex(Mode,Count,Type,Indices,Primcount,Basevertex) ->
send_bin(Indices),
cast(5688, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Primcount:?GLsizei,Basevertex:?GLint>>).
-%% @spec (Mode::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProvokingVertex.xml">external</a> documentation.
--spec provokingVertex(enum()) -> ok.
+%% @doc Specifiy the vertex to be used as the source of data for flat shaded varyings
+%%
+%% `Flatshading' a vertex shader varying output means to assign all vetices of the primitive
+%% the same value for that output. The vertex from which these values is derived is known
+%% as the `provoking vertex' and ``gl:provokingVertex'' specifies which vertex is
+%% to be used as the source of data for flat shaded varyings.
+%%
+%% `ProvokeMode' must be either `?GL_FIRST_VERTEX_CONVENTION' or `?GL_LAST_VERTEX_CONVENTION'
+%% , and controls the selection of the vertex whose values are assigned to flatshaded varying
+%% outputs. The interpretation of these values for the supported primitive types is: <table><tbody>
+%% <tr><td>` Primitive Type of Polygon '`i'</td><td>` First Vertex Convention '
+%% </td><td>` Last Vertex Convention '</td></tr><tr><td> point </td><td>`i'</td><td>
+%% `i'</td></tr><tr><td> independent line </td><td> 2`i' - 1 </td><td> 2`i'</td>
+%% </tr><tr><td> line loop </td><td>`i'</td><td>
+%%
+%% `i' + 1, if `i' &lt; `n'
+%%
+%% 1, if `i' = `n'</td></tr><tr><td> line strip </td><td>`i'</td><td>`i'
+%% + 1 </td></tr><tr><td> independent triangle </td><td> 3`i' - 2 </td><td> 3`i'</td>
+%% </tr><tr><td> triangle strip </td><td>`i'</td><td>`i' + 2 </td></tr><tr><td>
+%% triangle fan </td><td>`i' + 1 </td><td>`i' + 2 </td></tr><tr><td> line adjacency
+%% </td><td> 4`i' - 2 </td><td> 4`i' - 1 </td></tr><tr><td> line strip adjacency </td>
+%% <td>`i' + 1 </td><td>`i' + 2 </td></tr><tr><td> triangle adjacency </td><td> 6`i'
+%% - 5 </td><td> 6`i' - 1 </td></tr><tr><td> triangle strip adjacency </td><td> 2`i'
+%% - 1 </td><td> 2`i' + 3 </td></tr></tbody></table>
+%%
+%% If a vertex or geometry shader is active, user-defined varying outputs may be flatshaded
+%% by using the flat qualifier when declaring the output.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProvokingVertex.xml">external</a> documentation.
+-spec provokingVertex(Mode) -> ok when Mode :: enum().
provokingVertex(Mode) ->
cast(5689, <<Mode:?GLenum>>).
-%% @spec (Condition::enum(),Flags::integer()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFenceSync.xml">external</a> documentation.
--spec fenceSync(enum(),integer()) -> integer().
+%% @doc Create a new sync object and insert it into the GL command stream
+%%
+%% ``gl:fenceSync'' creates a new fence sync object, inserts a fence command into the GL
+%% command stream and associates it with that sync object, and returns a non-zero name corresponding
+%% to the sync object.
+%%
+%% When the specified `Condition' of the sync object is satisfied by the fence command,
+%% the sync object is signaled by the GL, causing any {@link gl:waitSync/3} , {@link gl:clientWaitSync/3}
+%% commands blocking in `Sync' to `unblock'. No other state is affected by ``gl:fenceSync''
+%% or by the execution of the associated fence command.
+%%
+%% `Condition' must be `?GL_SYNC_GPU_COMMANDS_COMPLETE'. This condition is satisfied
+%% by completion of the fence command corresponding to the sync object and all preceding
+%% commands in the same command stream. The sync object will not be signaled until all effects
+%% from these commands on GL client and server state and the framebuffer are fully realized.
+%% Note that completion of the fence command occurs once the state of the corresponding sync
+%% object has been changed, but commands waiting on that sync object may not be unblocked
+%% until after the fence command completes.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFenceSync.xml">external</a> documentation.
+-spec fenceSync(Condition, Flags) -> integer() when Condition :: enum(),Flags :: integer().
fenceSync(Condition,Flags) ->
call(5690, <<Condition:?GLenum,Flags:?GLbitfield>>).
-%% @spec (Sync::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsSync.xml">external</a> documentation.
--spec isSync(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a sync object
+%%
+%% ``gl:isSync'' returns `?GL_TRUE' if `Sync' is currently the name of a sync
+%% object. If `Sync' is not the name of a sync object, or if an error occurs, ``gl:isSync''
+%% returns `?GL_FALSE'. Note that zero is not the name of a sync object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsSync.xml">external</a> documentation.
+-spec isSync(Sync) -> 0|1 when Sync :: integer().
isSync(Sync) ->
call(5691, <<Sync:?GLsync>>).
-%% @spec (Sync::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteSync.xml">external</a> documentation.
--spec deleteSync(integer()) -> ok.
+%% @doc Delete a sync object
+%%
+%% ``gl:deleteSync'' deletes the sync object specified by `Sync' . If the fence command
+%% corresponding to the specified sync object has completed, or if no {@link gl:waitSync/3}
+%% or {@link gl:clientWaitSync/3} commands are blocking on `Sync' , the object is deleted
+%% immediately. Otherwise, `Sync' is flagged for deletion and will be deleted when it
+%% is no longer associated with any fence command and is no longer blocking any {@link gl:waitSync/3}
+%% or {@link gl:clientWaitSync/3} command. In either case, after ``gl:deleteSync'' returns,
+%% the name `Sync' is invalid and can no longer be used to refer to the sync object.
+%%
+%% ``gl:deleteSync'' will silently ignore a `Sync' value of zero.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteSync.xml">external</a> documentation.
+-spec deleteSync(Sync) -> ok when Sync :: integer().
deleteSync(Sync) ->
cast(5692, <<Sync:?GLsync>>).
-%% @spec (Sync::integer(),Flags::integer(),Timeout::integer()) -> enum()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClientWaitSync.xml">external</a> documentation.
--spec clientWaitSync(integer(),integer(),integer()) -> enum().
+%% @doc Block and wait for a sync object to become signaled
+%%
+%% ``gl:clientWaitSync'' causes the client to block and wait for the sync object specified
+%% by `Sync' to become signaled. If `Sync' is signaled when ``gl:clientWaitSync''
+%% is called, ``gl:clientWaitSync'' returns immediately, otherwise it will block and wait
+%% for up to `Timeout' nanoseconds for `Sync' to become signaled.
+%%
+%% The return value is one of four status values:
+%%
+%% `?GL_ALREADY_SIGNALED' indicates that `Sync' was signaled at the time that ``gl:clientWaitSync''
+%% was called.
+%%
+%% `?GL_TIMEOUT_EXPIRED' indicates that at least `Timeout' nanoseconds passed and `Sync'
+%% did not become signaled.
+%%
+%% `?GL_CONDITION_SATISFIED' indicates that `Sync' was signaled before the timeout
+%% expired.
+%%
+%% `?GL_WAIT_FAILED' indicates that an error occurred. Additionally, an OpenGL error
+%% will be generated.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClientWaitSync.xml">external</a> documentation.
+-spec clientWaitSync(Sync, Flags, Timeout) -> enum() when Sync :: integer(),Flags :: integer(),Timeout :: integer().
clientWaitSync(Sync,Flags,Timeout) ->
call(5693, <<Sync:?GLsync,Flags:?GLbitfield,0:32,Timeout:?GLuint64>>).
-%% @spec (Sync::integer(),Flags::integer(),Timeout::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWaitSync.xml">external</a> documentation.
--spec waitSync(integer(),integer(),integer()) -> ok.
+%% @doc Instruct the GL server to block until the specified sync object becomes signaled
+%%
+%% ``gl:waitSync'' causes the GL server to block and wait until `Sync' becomes signaled.
+%% `Sync' is the name of an existing sync object upon which to wait. `Flags' and `Timeout'
+%% are currently not used and must be set to zero and the special value `?GL_TIMEOUT_IGNORED'
+%% , respectively
+%%
+%% `Flags' and `Timeout' are placeholders for anticipated future extensions of
+%% sync object capabilities. They must have these reserved values in order that existing
+%% code calling ``gl:waitSync'' operate properly in the presence of such extensions.. ``gl:waitSync''
+%% will always wait no longer than an implementation-dependent timeout. The duration of
+%% this timeout in nanoseconds may be queried by calling {@link gl:getBooleanv/1} with the parameter `?GL_MAX_SERVER_WAIT_TIMEOUT'
+%% . There is currently no way to determine whether ``gl:waitSync'' unblocked because the
+%% timeout expired or because the sync object being waited on was signaled.
+%%
+%% If an error occurs, ``gl:waitSync'' does not cause the GL server to block.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWaitSync.xml">external</a> documentation.
+-spec waitSync(Sync, Flags, Timeout) -> ok when Sync :: integer(),Flags :: integer(),Timeout :: integer().
waitSync(Sync,Flags,Timeout) ->
cast(5694, <<Sync:?GLsync,Flags:?GLbitfield,0:32,Timeout:?GLuint64>>).
-%% @spec (Pname::enum()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetInteger64v.xml">external</a> documentation.
--spec getInteger64v(enum()) -> [integer()].
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getInteger64v(Pname) -> [integer()] when Pname :: enum().
getInteger64v(Pname) ->
call(5695, <<Pname:?GLenum>>).
-%% @spec (Sync::integer(),Pname::enum(),BufSize::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSync.xml">external</a> documentation.
--spec getSynciv(integer(),enum(),integer()) -> [integer()].
+%% @doc Query the properties of a sync object
+%%
+%% ``gl:getSynciv'' retrieves properties of a sync object. `Sync' specifies the name
+%% of the sync object whose properties to retrieve.
+%%
+%% On success, ``gl:getSynciv'' replaces up to `BufSize' integers in `Values'
+%% with the corresponding property values of the object being queried. The actual number
+%% of integers replaced is returned in the variable whose address is specified in `Length'
+%% . If `Length' is NULL, no length is returned.
+%%
+%% If `Pname' is `?GL_OBJECT_TYPE', a single value representing the specific type
+%% of the sync object is placed in `Values' . The only type supported is `?GL_SYNC_FENCE'
+%% .
+%%
+%% If `Pname' is `?GL_SYNC_STATUS', a single value representing the status of
+%% the sync object (`?GL_SIGNALED' or `?GL_UNSIGNALED') is placed in `Values' .
+%%
+%%
+%% If `Pname' is `?GL_SYNC_CONDITION', a single value representing the condition
+%% of the sync object is placed in `Values' . The only condition supported is `?GL_SYNC_GPU_COMMANDS_COMPLETE'
+%% .
+%%
+%% If `Pname' is `?GL_SYNC_FLAGS', a single value representing the flags with
+%% which the sync object was created is placed in `Values' . No flags are currently supported
+%%
+%%
+%% `Flags' is expected to be used in future extensions to the sync objects..
+%%
+%% If an error occurs, nothing will be written to `Values' or `Length' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSync.xml">external</a> documentation.
+-spec getSynciv(Sync, Pname, BufSize) -> [integer()] when Sync :: integer(),Pname :: enum(),BufSize :: integer().
getSynciv(Sync,Pname,BufSize) ->
call(5696, <<Sync:?GLsync,Pname:?GLenum,BufSize:?GLsizei>>).
-%% @spec (Target::enum(),Samples::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Fixedsamplelocations::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2DMultisample.xml">external</a> documentation.
--spec texImage2DMultisample(enum(),integer(),integer(),integer(),integer(),0|1) -> ok.
+%% @doc Establish the data storage, format, dimensions, and number of samples of a multisample texture's image
+%%
+%% ``gl:texImage2DMultisample'' establishes the data storage, format, dimensions and number
+%% of samples of a multisample texture's image.
+%%
+%% `Target' must be `?GL_TEXTURE_2D_MULTISAMPLE' or `?GL_PROXY_TEXTURE_2D_MULTISAMPLE'
+%% . `Width' and `Height' are the dimensions in texels of the texture, and must
+%% be in the range zero to `?GL_MAX_TEXTURE_SIZE' - 1. `Samples' specifies the
+%% number of samples in the image and must be in the range zero to `?GL_MAX_SAMPLES'
+%% - 1.
+%%
+%% `Internalformat' must be a color-renderable, depth-renderable, or stencil-renderable
+%% format.
+%%
+%% If `Fixedsamplelocations' is `?GL_TRUE', the image will use identical sample
+%% locations and the same number of samples for all texels in the image, and the sample locations
+%% will not depend on the internal format or size of the image.
+%%
+%% When a multisample texture is accessed in a shader, the access takes one vector of integers
+%% describing which texel to fetch and an integer corresponding to the sample numbers describing
+%% which sample within the texel to fetch. No standard sampling instructions are allowed
+%% on the multisample texture targets.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2DMultisample.xml">external</a> documentation.
+-spec texImage2DMultisample(Target, Samples, Internalformat, Width, Height, Fixedsamplelocations) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: integer(),Width :: integer(),Height :: integer(),Fixedsamplelocations :: 0|1.
texImage2DMultisample(Target,Samples,Internalformat,Width,Height,Fixedsamplelocations) ->
cast(5697, <<Target:?GLenum,Samples:?GLsizei,Internalformat:?GLint,Width:?GLsizei,Height:?GLsizei,Fixedsamplelocations:?GLboolean>>).
-%% @spec (Target::enum(),Samples::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Depth::integer(),Fixedsamplelocations::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage3DMultisample.xml">external</a> documentation.
--spec texImage3DMultisample(enum(),integer(),integer(),integer(),integer(),integer(),0|1) -> ok.
+%% @doc Establish the data storage, format, dimensions, and number of samples of a multisample texture's image
+%%
+%% ``gl:texImage3DMultisample'' establishes the data storage, format, dimensions and number
+%% of samples of a multisample texture's image.
+%%
+%% `Target' must be `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY' or `?GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY'
+%% . `Width' and `Height' are the dimensions in texels of the texture, and must
+%% be in the range zero to `?GL_MAX_TEXTURE_SIZE' - 1. `Depth' is the number of
+%% array slices in the array texture's image. `Samples' specifies the number of samples
+%% in the image and must be in the range zero to `?GL_MAX_SAMPLES' - 1.
+%%
+%% `Internalformat' must be a color-renderable, depth-renderable, or stencil-renderable
+%% format.
+%%
+%% If `Fixedsamplelocations' is `?GL_TRUE', the image will use identical sample
+%% locations and the same number of samples for all texels in the image, and the sample locations
+%% will not depend on the internal format or size of the image.
+%%
+%% When a multisample texture is accessed in a shader, the access takes one vector of integers
+%% describing which texel to fetch and an integer corresponding to the sample numbers describing
+%% which sample within the texel to fetch. No standard sampling instructions are allowed
+%% on the multisample texture targets.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage3DMultisample.xml">external</a> documentation.
+-spec texImage3DMultisample(Target, Samples, Internalformat, Width, Height, Depth, Fixedsamplelocations) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Fixedsamplelocations :: 0|1.
texImage3DMultisample(Target,Samples,Internalformat,Width,Height,Depth,Fixedsamplelocations) ->
cast(5698, <<Target:?GLenum,Samples:?GLsizei,Internalformat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Fixedsamplelocations:?GLboolean>>).
-%% @spec (Pname::enum(),Index::integer()) -> {float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMultisample.xml">external</a> documentation.
--spec getMultisamplefv(enum(),integer()) -> {float(),float()}.
+%% @doc Retrieve the location of a sample
+%%
+%% ``gl:getMultisamplefv'' queries the location of a given sample. `Pname' specifies
+%% the sample parameter to retrieve and must be `?GL_SAMPLE_POSITION'. `Index'
+%% corresponds to the sample for which the location should be returned. The sample location
+%% is returned as two floating-point values in `Val[0]' and `Val[1]' , each between
+%% 0 and 1, corresponding to the `X' and `Y' locations respectively in the GL pixel
+%% space of that sample. (0.5, 0.5) this corresponds to the pixel center. `Index' must
+%% be between zero and the value of `?GL_SAMPLES' - 1.
+%%
+%% If the multisample mode does not have fixed sample locations, the returned values may
+%% only reflect the locations of samples within some pixels.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMultisample.xml">external</a> documentation.
+-spec getMultisamplefv(Pname, Index) -> {float(),float()} when Pname :: enum(),Index :: integer().
getMultisamplefv(Pname,Index) ->
call(5699, <<Pname:?GLenum,Index:?GLuint>>).
-%% @spec (Index::integer(),Mask::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSampleMaski.xml">external</a> documentation.
--spec sampleMaski(integer(),integer()) -> ok.
+%% @doc Set the value of a sub-word of the sample mask
+%%
+%% ``gl:sampleMaski'' sets one 32-bit sub-word of the multi-word sample mask, `?GL_SAMPLE_MASK_VALUE'
+%% .
+%%
+%% `MaskIndex' specifies which 32-bit sub-word of the sample mask to update, and `Mask'
+%% specifies the new value to use for that sub-word. `MaskIndex' must be less than
+%% the value of `?GL_MAX_SAMPLE_MASK_WORDS'. Bit `B' of mask word `M' corresponds
+%% to sample 32 x `M' + `B'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSampleMaski.xml">external</a> documentation.
+-spec sampleMaski(Index, Mask) -> ok when Index :: integer(),Mask :: integer().
sampleMaski(Index,Mask) ->
cast(5700, <<Index:?GLuint,Mask:?GLbitfield>>).
-%% @spec (Type::enum(),Name::string(),String::string()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNamedStringARB.xml">external</a> documentation.
--spec namedStringARB(enum(),string(),string()) -> ok.
+%% @doc glNamedStringARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNamedStringARB.xml">external</a> documentation.
+-spec namedStringARB(Type, Name, String) -> ok when Type :: enum(),Name :: string(),String :: string().
namedStringARB(Type,Name,String) ->
cast(5701, <<Type:?GLenum,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8),(list_to_binary([String|[0]]))/binary,0:((8-((length(String)+ 1) rem 8)) rem 8)>>).
-%% @spec (Name::string()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteNamedStringARB.xml">external</a> documentation.
--spec deleteNamedStringARB(string()) -> ok.
+%% @doc glDeleteNamedStringARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteNamedStringARB.xml">external</a> documentation.
+-spec deleteNamedStringARB(Name) -> ok when Name :: string().
deleteNamedStringARB(Name) ->
cast(5702, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
-%% @spec (Shader::integer(),Path::[string()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShaderIncludeARB.xml">external</a> documentation.
--spec compileShaderIncludeARB(integer(),[string()]) -> ok.
+%% @doc glCompileShaderIncludeARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShaderIncludeARB.xml">external</a> documentation.
+-spec compileShaderIncludeARB(Shader, Path) -> ok when Shader :: integer(),Path :: [string()].
compileShaderIncludeARB(Shader,Path) ->
PathTemp = list_to_binary([[Str|[0]] || Str <- Path ]),
cast(5703, <<Shader:?GLuint,(length(Path)):?GLuint,(size(PathTemp)):?GLuint,(PathTemp)/binary,0:((8-((size(PathTemp)+0) rem 8)) rem 8)>>).
-%% @spec (Name::string()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsNamedStringARB.xml">external</a> documentation.
--spec isNamedStringARB(string()) -> 0|1.
+%% @doc glIsNamedStringARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsNamedStringARB.xml">external</a> documentation.
+-spec isNamedStringARB(Name) -> 0|1 when Name :: string().
isNamedStringARB(Name) ->
call(5704, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
-%% @spec (Name::string(),BufSize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetNamedStringARB.xml">external</a> documentation.
--spec getNamedStringARB(string(),integer()) -> string().
+%% @doc glGetNamedStringARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetNamedStringARB.xml">external</a> documentation.
+-spec getNamedStringARB(Name, BufSize) -> string() when Name :: string(),BufSize :: integer().
getNamedStringARB(Name,BufSize) ->
call(5705, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8),BufSize:?GLsizei>>).
-%% @spec (Name::string(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetNamedStringARB.xml">external</a> documentation.
--spec getNamedStringivARB(string(),enum()) -> integer().
+%% @doc glGetNamedStringARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetNamedStringARB.xml">external</a> documentation.
+-spec getNamedStringivARB(Name, Pname) -> integer() when Name :: string(),Pname :: enum().
getNamedStringivARB(Name,Pname) ->
call(5706, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8),Pname:?GLenum>>).
-%% @spec (Program::integer(),ColorNumber::integer(),Index::integer(),Name::string()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFragDataLocationIndexe.xml">external</a> documentation.
--spec bindFragDataLocationIndexed(integer(),integer(),integer(),string()) -> ok.
+%% @doc glBindFragDataLocationIndexe
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFragDataLocationIndexe.xml">external</a> documentation.
+-spec bindFragDataLocationIndexed(Program, ColorNumber, Index, Name) -> ok when Program :: integer(),ColorNumber :: integer(),Index :: integer(),Name :: string().
bindFragDataLocationIndexed(Program,ColorNumber,Index,Name) ->
cast(5707, <<Program:?GLuint,ColorNumber:?GLuint,Index:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8)>>).
-%% @spec (Program::integer(),Name::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetFragDataIndex.xml">external</a> documentation.
--spec getFragDataIndex(integer(),string()) -> integer().
+%% @doc Query the bindings of color indices to user-defined varying out variables
+%%
+%% ``gl:getFragDataIndex'' returns the index of the fragment color to which the variable `Name'
+%% was bound when the program object `Program' was last linked. If `Name' is not
+%% a varying out variable of `Program' , or if an error occurs, -1 will be returned.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetFragDataIndex.xml">external</a> documentation.
+-spec getFragDataIndex(Program, Name) -> integer() when Program :: integer(),Name :: string().
getFragDataIndex(Program,Name) ->
call(5708, <<Program:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8)>>).
-%% @spec (Count::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenSamplers.xml">external</a> documentation.
--spec genSamplers(integer()) -> [integer()].
+%% @doc Generate sampler object names
+%%
+%% ``gl:genSamplers'' returns `N' sampler object names in `Samplers' . There is
+%% no guarantee that the names form a contiguous set of integers; however, it is guaranteed
+%% that none of the returned names was in use immediately before the call to ``gl:genSamplers''
+%% .
+%%
+%% Sampler object names returned by a call to ``gl:genSamplers'' are not returned by subsequent
+%% calls, unless they are first deleted with {@link gl:deleteSamplers/1} .
+%%
+%% The names returned in `Samplers' are marked as used, for the purposes of ``gl:genSamplers''
+%% only, but they acquire state and type only when they are first bound.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenSamplers.xml">external</a> documentation.
+-spec genSamplers(Count) -> [integer()] when Count :: integer().
genSamplers(Count) ->
call(5709, <<Count:?GLsizei>>).
-%% @spec (Samplers::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteSamplers.xml">external</a> documentation.
--spec deleteSamplers([integer()]) -> ok.
+%% @doc Delete named sampler objects
+%%
+%% ``gl:deleteSamplers'' deletes `N' sampler objects named by the elements of the
+%% array `Ids' . After a sampler object is deleted, its name is again unused. If a sampler
+%% object that is currently bound to a sampler unit is deleted, it is as though {@link gl:bindSampler/2}
+%% is called with unit set to the unit the sampler is bound to and sampler zero. Unused
+%% names in samplers are silently ignored, as is the reserved name zero.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteSamplers.xml">external</a> documentation.
+-spec deleteSamplers(Samplers) -> ok when Samplers :: [integer()].
deleteSamplers(Samplers) ->
cast(5710, <<(length(Samplers)):?GLuint,
(<< <<C:?GLuint>> || C <- Samplers>>)/binary,0:(((1+length(Samplers)) rem 2)*32)>>).
-%% @spec (Sampler::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsSampler.xml">external</a> documentation.
--spec isSampler(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a sampler object
+%%
+%% ``gl:isSampler'' returns `?GL_TRUE' if `Id' is currently the name of a sampler
+%% object. If `Id' is zero, or is a non-zero value that is not currently the name of
+%% a sampler object, or if an error occurs, ``gl:isSampler'' returns `?GL_FALSE'.
+%%
+%% A name returned by {@link gl:genSamplers/1} , is the name of a sampler object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsSampler.xml">external</a> documentation.
+-spec isSampler(Sampler) -> 0|1 when Sampler :: integer().
isSampler(Sampler) ->
call(5711, <<Sampler:?GLuint>>).
-%% @spec (Unit::integer(),Sampler::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindSampler.xml">external</a> documentation.
--spec bindSampler(integer(),integer()) -> ok.
+%% @doc Bind a named sampler to a texturing target
+%%
+%% ``gl:bindSampler'' binds `Sampler' to the texture unit at index `Unit' . `Sampler'
+%% must be zero or the name of a sampler object previously returned from a call to {@link gl:genSamplers/1}
+%% . `Unit' must be less than the value of `?GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS'.
+%%
+%%
+%% When a sampler object is bound to a texture unit, its state supersedes that of the texture
+%% object bound to that texture unit. If the sampler name zero is bound to a texture unit,
+%% the currently bound texture's sampler state becomes active. A single sampler object may
+%% be bound to multiple texture units simultaneously.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindSampler.xml">external</a> documentation.
+-spec bindSampler(Unit, Sampler) -> ok when Unit :: integer(),Sampler :: integer().
bindSampler(Unit,Sampler) ->
cast(5712, <<Unit:?GLuint,Sampler:?GLuint>>).
-%% @spec (Sampler::integer(),Pname::enum(),Param::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameter.xml">external</a> documentation.
--spec samplerParameteri(integer(),enum(),integer()) -> ok.
+%% @doc Set sampler parameters
+%%
+%% ``gl:samplerParameter'' assigns the value or values in `Params' to the sampler
+%% parameter specified as `Pname' . `Sampler' specifies the sampler object to be
+%% modified, and must be the name of a sampler object previously returned from a call to {@link gl:genSamplers/1}
+%% . The following symbols are accepted in `Pname' :
+%%
+%% `?GL_TEXTURE_MIN_FILTER': The texture minifying function is used whenever the pixel
+%% being textured maps to an area greater than one texture element. There are six defined
+%% minifying functions. Two of them use the nearest one or nearest four texture elements
+%% to compute the texture value. The other four use mipmaps.
+%%
+%% A mipmap is an ordered set of arrays representing the same image at progressively lower
+%% resolutions. If the texture has dimensions 2 n*2 m, there are max(n m)+1 mipmaps. The first
+%% mipmap is the original texture, with dimensions 2 n*2 m. Each subsequent mipmap has
+%% dimensions 2(k-1)*2(l-1), where 2 k*2 l are the dimensions of the previous mipmap, until either
+%% k= 0 or l= 0. At that point, subsequent mipmaps have dimension 1*2(l-1) or 2(k-1)*1 until
+%% the final mipmap, which has dimension 1*1. To define the mipmaps, call {@link gl:texImage1D/8}
+%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} , {@link gl:copyTexImage1D/7} , or {@link gl:copyTexImage2D/8}
+%% with the `level' argument indicating the order of the mipmaps. Level 0 is the original
+%% texture; level max(n m) is the final 1*1 mipmap.
+%%
+%% `Params' supplies a function for minifying the texture as one of the following:
+%%
+%% `?GL_NEAREST': Returns the value of the texture element that is nearest (in Manhattan
+%% distance) to the center of the pixel being textured.
+%%
+%% `?GL_LINEAR': Returns the weighted average of the four texture elements that are
+%% closest to the center of the pixel being textured. These can include border texture elements,
+%% depending on the values of `?GL_TEXTURE_WRAP_S' and `?GL_TEXTURE_WRAP_T', and
+%% on the exact mapping.
+%%
+%% `?GL_NEAREST_MIPMAP_NEAREST': Chooses the mipmap that most closely matches the size
+%% of the pixel being textured and uses the `?GL_NEAREST' criterion (the texture element
+%% nearest to the center of the pixel) to produce a texture value.
+%%
+%% `?GL_LINEAR_MIPMAP_NEAREST': Chooses the mipmap that most closely matches the size
+%% of the pixel being textured and uses the `?GL_LINEAR' criterion (a weighted average
+%% of the four texture elements that are closest to the center of the pixel) to produce a
+%% texture value.
+%%
+%% `?GL_NEAREST_MIPMAP_LINEAR': Chooses the two mipmaps that most closely match the
+%% size of the pixel being textured and uses the `?GL_NEAREST' criterion (the texture
+%% element nearest to the center of the pixel) to produce a texture value from each mipmap.
+%% The final texture value is a weighted average of those two values.
+%%
+%% `?GL_LINEAR_MIPMAP_LINEAR': Chooses the two mipmaps that most closely match the
+%% size of the pixel being textured and uses the `?GL_LINEAR' criterion (a weighted
+%% average of the four texture elements that are closest to the center of the pixel) to produce
+%% a texture value from each mipmap. The final texture value is a weighted average of those
+%% two values.
+%%
+%% As more texture elements are sampled in the minification process, fewer aliasing artifacts
+%% will be apparent. While the `?GL_NEAREST' and `?GL_LINEAR' minification functions
+%% can be faster than the other four, they sample only one or four texture elements to determine
+%% the texture value of the pixel being rendered and can produce moire patterns or ragged
+%% transitions. The initial value of `?GL_TEXTURE_MIN_FILTER' is `?GL_NEAREST_MIPMAP_LINEAR'
+%% .
+%%
+%% `?GL_TEXTURE_MAG_FILTER': The texture magnification function is used when the pixel
+%% being textured maps to an area less than or equal to one texture element. It sets the
+%% texture magnification function to either `?GL_NEAREST' or `?GL_LINEAR' (see
+%% below). `?GL_NEAREST' is generally faster than `?GL_LINEAR', but it can produce
+%% textured images with sharper edges because the transition between texture elements is
+%% not as smooth. The initial value of `?GL_TEXTURE_MAG_FILTER' is `?GL_LINEAR'.
+%%
+%% `?GL_NEAREST': Returns the value of the texture element that is nearest (in Manhattan
+%% distance) to the center of the pixel being textured.
+%%
+%% `?GL_LINEAR': Returns the weighted average of the four texture elements that are
+%% closest to the center of the pixel being textured. These can include border texture elements,
+%% depending on the values of `?GL_TEXTURE_WRAP_S' and `?GL_TEXTURE_WRAP_T', and
+%% on the exact mapping.
+%%
+%%
+%%
+%% `?GL_TEXTURE_MIN_LOD': Sets the minimum level-of-detail parameter. This floating-point
+%% value limits the selection of highest resolution mipmap (lowest mipmap level). The initial
+%% value is -1000.
+%%
+%%
+%%
+%% `?GL_TEXTURE_MAX_LOD': Sets the maximum level-of-detail parameter. This floating-point
+%% value limits the selection of the lowest resolution mipmap (highest mipmap level). The
+%% initial value is 1000.
+%%
+%%
+%%
+%% `?GL_TEXTURE_WRAP_S': Sets the wrap parameter for texture coordinate s to either `?GL_CLAMP_TO_EDGE'
+%% , `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. `?GL_CLAMP_TO_BORDER' causes
+%% the s coordinate to be clamped to the range [(-1 2/N) 1+(1 2/N)], where N is the size of the texture in
+%% the direction of clamping.`?GL_CLAMP_TO_EDGE' causes s coordinates to be clamped
+%% to the range [(1 2/N) 1-(1 2/N)], where N is the size of the texture in the direction of clamping. `?GL_REPEAT'
+%% causes the integer part of the s coordinate to be ignored; the GL uses only the fractional
+%% part, thereby creating a repeating pattern. `?GL_MIRRORED_REPEAT' causes the s
+%% coordinate to be set to the fractional part of the texture coordinate if the integer part
+%% of s is even; if the integer part of s is odd, then the s texture coordinate is
+%% set to 1-frac(s), where frac(s) represents the fractional part of s. Initially, `?GL_TEXTURE_WRAP_S'
+%% is set to `?GL_REPEAT'.
+%%
+%%
+%%
+%% `?GL_TEXTURE_WRAP_T': Sets the wrap parameter for texture coordinate t to either `?GL_CLAMP_TO_EDGE'
+%% , `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. See the discussion under `?GL_TEXTURE_WRAP_S'
+%% . Initially, `?GL_TEXTURE_WRAP_T' is set to `?GL_REPEAT'.
+%%
+%% `?GL_TEXTURE_WRAP_R': Sets the wrap parameter for texture coordinate r to either `?GL_CLAMP_TO_EDGE'
+%% , `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. See the discussion under `?GL_TEXTURE_WRAP_S'
+%% . Initially, `?GL_TEXTURE_WRAP_R' is set to `?GL_REPEAT'.
+%%
+%% `?GL_TEXTURE_BORDER_COLOR': The data in `Params' specifies four values that
+%% define the border values that should be used for border texels. If a texel is sampled
+%% from the border of the texture, the values of `?GL_TEXTURE_BORDER_COLOR' are interpreted
+%% as an RGBA color to match the texture's internal format and substituted for the non-existent
+%% texel data. If the texture contains depth components, the first component of `?GL_TEXTURE_BORDER_COLOR'
+%% is interpreted as a depth value. The initial value is (0.0, 0.0, 0.0, 0.0).
+%%
+%% `?GL_TEXTURE_COMPARE_MODE': Specifies the texture comparison mode for currently
+%% bound textures. That is, a texture whose internal format is `?GL_DEPTH_COMPONENT_*';
+%% see {@link gl:texImage2D/9} ) Permissible values are:
+%%
+%% `?GL_COMPARE_REF_TO_TEXTURE': Specifies that the interpolated and clamped r texture
+%% coordinate should be compared to the value in the currently bound texture. See the discussion
+%% of `?GL_TEXTURE_COMPARE_FUNC' for details of how the comparison is evaluated. The
+%% result of the comparison is assigned to the red channel.
+%%
+%% `?GL_NONE': Specifies that the red channel should be assigned the appropriate value
+%% from the currently bound texture.
+%%
+%% `?GL_TEXTURE_COMPARE_FUNC': Specifies the comparison operator used when `?GL_TEXTURE_COMPARE_MODE'
+%% is set to `?GL_COMPARE_REF_TO_TEXTURE'. Permissible values are: <table><tbody><tr><td>
+%% ` Texture Comparison Function '</td><td>` Computed result '</td></tr></tbody><tbody>
+%% <tr><td>`?GL_LEQUAL'</td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&lt;=(D t) r&gt;(D t))</td></tr><tr><td>`?GL_GEQUAL'</td><td>
+%% result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&gt;=(D t) r&lt;(D t))</td></tr><tr><td>`?GL_LESS'</td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&lt;
+%% (D t) r&gt;=(D t))</td></tr><tr><td>`?GL_GREATER'
+%% </td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&gt;(D t) r&lt;=(D t))</td></tr><tr><td>`?GL_EQUAL'</td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp;
+%% r=(D t) r&amp;ne;(D t))</td></tr><tr><td>`?GL_NOTEQUAL'
+%% </td><td> result={1.0 0.0 &amp;nbsp;&amp;nbsp; r&amp;ne;(D t) r=(D t))</td></tr><tr><td>`?GL_ALWAYS'</td><td> result= 1.0</td></tr><tr><td>
+%% `?GL_NEVER'</td><td> result= 0.0</td></tr></tbody></table> where r is the current
+%% interpolated texture coordinate, and D t is the texture value sampled from the currently
+%% bound texture. result is assigned to R t.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameter.xml">external</a> documentation.
+-spec samplerParameteri(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: integer().
samplerParameteri(Sampler,Pname,Param) ->
cast(5713, <<Sampler:?GLuint,Pname:?GLenum,Param:?GLint>>).
-%% @spec (Sampler::integer(),Pname::enum(),Param::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameter.xml">external</a> documentation.
--spec samplerParameteriv(integer(),enum(),[integer()]) -> ok.
+%% @doc
+%% See {@link samplerParameteri/3}
+-spec samplerParameteriv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
samplerParameteriv(Sampler,Pname,Param) ->
cast(5714, <<Sampler:?GLuint,Pname:?GLenum,(length(Param)):?GLuint,
(<< <<C:?GLint>> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>).
-%% @spec (Sampler::integer(),Pname::enum(),Param::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameter.xml">external</a> documentation.
--spec samplerParameterf(integer(),enum(),float()) -> ok.
+%% @doc
+%% See {@link samplerParameteri/3}
+-spec samplerParameterf(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: float().
samplerParameterf(Sampler,Pname,Param) ->
cast(5715, <<Sampler:?GLuint,Pname:?GLenum,Param:?GLfloat>>).
-%% @spec (Sampler::integer(),Pname::enum(),Param::[float()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameter.xml">external</a> documentation.
--spec samplerParameterfv(integer(),enum(),[float()]) -> ok.
+%% @doc
+%% See {@link samplerParameteri/3}
+-spec samplerParameterfv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [float()].
samplerParameterfv(Sampler,Pname,Param) ->
cast(5716, <<Sampler:?GLuint,Pname:?GLenum,(length(Param)):?GLuint,
(<< <<C:?GLfloat>> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>).
-%% @spec (Sampler::integer(),Pname::enum(),Param::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameterI.xml">external</a> documentation.
--spec samplerParameterIiv(integer(),enum(),[integer()]) -> ok.
+%% @doc
+%% See {@link samplerParameteri/3}
+-spec samplerParameterIiv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
samplerParameterIiv(Sampler,Pname,Param) ->
cast(5717, <<Sampler:?GLuint,Pname:?GLenum,(length(Param)):?GLuint,
(<< <<C:?GLint>> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>).
-%% @spec (Sampler::integer(),Pname::enum(),Param::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameterI.xml">external</a> documentation.
--spec samplerParameterIuiv(integer(),enum(),[integer()]) -> ok.
+%% @doc glSamplerParameterI
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameterI.xml">external</a> documentation.
+-spec samplerParameterIuiv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
samplerParameterIuiv(Sampler,Pname,Param) ->
cast(5718, <<Sampler:?GLuint,Pname:?GLenum,(length(Param)):?GLuint,
(<< <<C:?GLuint>> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>).
-%% @spec (Sampler::integer(),Pname::enum()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSamplerParameter.xml">external</a> documentation.
--spec getSamplerParameteriv(integer(),enum()) -> [integer()].
+%% @doc Return sampler parameter values
+%%
+%% ``gl:getSamplerParameter'' returns in `Params' the value or values of the sampler
+%% parameter specified as `Pname' . `Sampler' defines the target sampler, and must
+%% be the name of an existing sampler object, returned from a previous call to {@link gl:genSamplers/1}
+%% . `Pname' accepts the same symbols as {@link gl:samplerParameteri/3} , with the same
+%% interpretations:
+%%
+%% `?GL_TEXTURE_MAG_FILTER': Returns the single-valued texture magnification filter,
+%% a symbolic constant. The initial value is `?GL_LINEAR'.
+%%
+%% `?GL_TEXTURE_MIN_FILTER': Returns the single-valued texture minification filter,
+%% a symbolic constant. The initial value is `?GL_NEAREST_MIPMAP_LINEAR'.
+%%
+%% `?GL_TEXTURE_MIN_LOD': Returns the single-valued texture minimum level-of-detail
+%% value. The initial value is -1000.
+%%
+%% `?GL_TEXTURE_MAX_LOD': Returns the single-valued texture maximum level-of-detail
+%% value. The initial value is 1000.
+%%
+%% `?GL_TEXTURE_WRAP_S': Returns the single-valued wrapping function for texture coordinate
+%% s, a symbolic constant. The initial value is `?GL_REPEAT'.
+%%
+%% `?GL_TEXTURE_WRAP_T': Returns the single-valued wrapping function for texture coordinate
+%% t, a symbolic constant. The initial value is `?GL_REPEAT'.
+%%
+%% `?GL_TEXTURE_WRAP_R': Returns the single-valued wrapping function for texture coordinate
+%% r, a symbolic constant. The initial value is `?GL_REPEAT'.
+%%
+%% `?GL_TEXTURE_BORDER_COLOR': Returns four integer or floating-point numbers that
+%% comprise the RGBA color of the texture border. Floating-point values are returned in the
+%% range [0 1]. Integer values are returned as a linear mapping of the internal floating-point
+%% representation such that 1.0 maps to the most positive representable integer and -1.0
+%% maps to the most negative representable integer. The initial value is (0, 0, 0, 0).
+%%
+%% `?GL_TEXTURE_COMPARE_MODE': Returns a single-valued texture comparison mode, a symbolic
+%% constant. The initial value is `?GL_NONE'. See {@link gl:samplerParameteri/3} .
+%%
+%% `?GL_TEXTURE_COMPARE_FUNC': Returns a single-valued texture comparison function,
+%% a symbolic constant. The initial value is `?GL_LEQUAL'. See {@link gl:samplerParameteri/3}
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSamplerParameter.xml">external</a> documentation.
+-spec getSamplerParameteriv(Sampler, Pname) -> [integer()] when Sampler :: integer(),Pname :: enum().
getSamplerParameteriv(Sampler,Pname) ->
call(5719, <<Sampler:?GLuint,Pname:?GLenum>>).
-%% @spec (Sampler::integer(),Pname::enum()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSamplerParameterI.xml">external</a> documentation.
--spec getSamplerParameterIiv(integer(),enum()) -> [integer()].
+%% @doc
+%% See {@link getSamplerParameteriv/2}
+-spec getSamplerParameterIiv(Sampler, Pname) -> [integer()] when Sampler :: integer(),Pname :: enum().
getSamplerParameterIiv(Sampler,Pname) ->
call(5720, <<Sampler:?GLuint,Pname:?GLenum>>).
-%% @spec (Sampler::integer(),Pname::enum()) -> [float()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSamplerParameter.xml">external</a> documentation.
--spec getSamplerParameterfv(integer(),enum()) -> [float()].
+%% @doc
+%% See {@link getSamplerParameteriv/2}
+-spec getSamplerParameterfv(Sampler, Pname) -> [float()] when Sampler :: integer(),Pname :: enum().
getSamplerParameterfv(Sampler,Pname) ->
call(5721, <<Sampler:?GLuint,Pname:?GLenum>>).
-%% @spec (Sampler::integer(),Pname::enum()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSamplerParameterI.xml">external</a> documentation.
--spec getSamplerParameterIuiv(integer(),enum()) -> [integer()].
+%% @doc glGetSamplerParameterI
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSamplerParameterI.xml">external</a> documentation.
+-spec getSamplerParameterIuiv(Sampler, Pname) -> [integer()] when Sampler :: integer(),Pname :: enum().
getSamplerParameterIuiv(Sampler,Pname) ->
call(5722, <<Sampler:?GLuint,Pname:?GLenum>>).
-%% @spec (Id::integer(),Target::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glQueryCounter.xml">external</a> documentation.
--spec queryCounter(integer(),enum()) -> ok.
+%% @doc Record the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed.
+%%
+%% ``gl:queryCounter'' causes the GL to record the current time into the query object named
+%% `Id' . `Target' must be `?GL_TIMESTAMP'. The time is recorded after all
+%% previous commands on the GL client and server state and the framebuffer have been fully
+%% realized. When the time is recorded, the query result for that object is marked available.
+%% ``gl:queryCounter'' timer queries can be used within a {@link gl:beginQuery/2} / {@link gl:beginQuery/2}
+%% block where the target is `?GL_TIME_ELAPSED' and it does not affect the result of
+%% that query object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glQueryCounter.xml">external</a> documentation.
+-spec queryCounter(Id, Target) -> ok when Id :: integer(),Target :: enum().
queryCounter(Id,Target) ->
cast(5723, <<Id:?GLuint,Target:?GLenum>>).
-%% @spec (Id::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryObjecti64v.xml">external</a> documentation.
--spec getQueryObjecti64v(integer(),enum()) -> integer().
+%% @doc glGetQueryObjecti64v
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryObjecti64v.xml">external</a> documentation.
+-spec getQueryObjecti64v(Id, Pname) -> integer() when Id :: integer(),Pname :: enum().
getQueryObjecti64v(Id,Pname) ->
call(5724, <<Id:?GLuint,Pname:?GLenum>>).
-%% @spec (Id::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryObjectui64v.xml">external</a> documentation.
--spec getQueryObjectui64v(integer(),enum()) -> integer().
+%% @doc glGetQueryObjectui64v
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryObjectui64v.xml">external</a> documentation.
+-spec getQueryObjectui64v(Id, Pname) -> integer() when Id :: integer(),Pname :: enum().
getQueryObjectui64v(Id,Pname) ->
call(5725, <<Id:?GLuint,Pname:?GLenum>>).
-%% @spec (Mode::enum(),Indirect::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArraysIndirect.xml">external</a> documentation.
--spec drawArraysIndirect(enum(),offset()|mem()) -> ok.
+%% @doc Render primitives from array data, taking parameters from memory
+%%
+%% ``gl:drawArraysIndirect'' specifies multiple geometric primitives with very few subroutine
+%% calls. ``gl:drawArraysIndirect'' behaves similarly to {@link gl:drawArraysInstancedBaseInstance/5}
+%% , execept that the parameters to {@link gl:drawArraysInstancedBaseInstance/5} are stored
+%% in memory at the address given by `Indirect' .
+%%
+%% The parameters addressed by `Indirect' are packed into a structure that takes the
+%% form (in C): typedef struct { uint count; uint primCount; uint first; uint baseInstance;
+%% } DrawArraysIndirectCommand; const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand
+%% *)indirect; glDrawArraysInstancedBaseInstance(mode, cmd-&gt;first, cmd-&gt;count, cmd-&gt;primCount,
+%% cmd-&gt;baseInstance);
+%%
+%% If a buffer is bound to the `?GL_DRAW_INDIRECT_BUFFER' binding at the time of a
+%% call to ``gl:drawArraysIndirect'', `Indirect' is interpreted as an offset, in basic
+%% machine units, into that buffer and the parameter data is read from the buffer rather
+%% than from client memory.
+%%
+%% In contrast to {@link gl:drawArraysInstancedBaseInstance/5} , the first member of the parameter
+%% structure is unsigned, and out-of-range indices do not generate an error.
+%%
+%% Vertex attributes that are modified by ``gl:drawArraysIndirect'' have an unspecified
+%% value after ``gl:drawArraysIndirect'' returns. Attributes that aren't modified remain
+%% well defined.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArraysIndirect.xml">external</a> documentation.
+-spec drawArraysIndirect(Mode, Indirect) -> ok when Mode :: enum(),Indirect :: offset()|mem().
drawArraysIndirect(Mode,Indirect) when is_integer(Indirect) ->
cast(5726, <<Mode:?GLenum,Indirect:?GLuint>>);
drawArraysIndirect(Mode,Indirect) ->
send_bin(Indirect),
cast(5727, <<Mode:?GLenum>>).
-%% @spec (Mode::enum(),Type::enum(),Indirect::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsIndirect.xml">external</a> documentation.
--spec drawElementsIndirect(enum(),enum(),offset()|mem()) -> ok.
+%% @doc Render indexed primitives from array data, taking parameters from memory
+%%
+%% ``gl:drawElementsIndirect'' specifies multiple indexed geometric primitives with very
+%% few subroutine calls. ``gl:drawElementsIndirect'' behaves similarly to {@link gl:drawElementsInstancedBaseVertexBaseInstance/7}
+%% , execpt that the parameters to {@link gl:drawElementsInstancedBaseVertexBaseInstance/7}
+%% are stored in memory at the address given by `Indirect' .
+%%
+%% The parameters addressed by `Indirect' are packed into a structure that takes the
+%% form (in C): typedef struct { uint count; uint primCount; uint firstIndex; uint baseVertex;
+%% uint baseInstance; } DrawElementsIndirectCommand;
+%%
+%% ``gl:drawElementsIndirect'' is equivalent to: void glDrawElementsIndirect(GLenum mode,
+%% GLenum type, const void * indirect) { const DrawElementsIndirectCommand *cmd = (const
+%% DrawElementsIndirectCommand *)indirect; glDrawElementsInstancedBaseVertexBaseInstance(mode,
+%% cmd-&gt;count, type, cmd-&gt;firstIndex + size-of-type, cmd-&gt;primCount, cmd-&gt;baseVertex,
+%% cmd-&gt;baseInstance); }
+%%
+%% If a buffer is bound to the `?GL_DRAW_INDIRECT_BUFFER' binding at the time of a
+%% call to ``gl:drawElementsIndirect'', `Indirect' is interpreted as an offset, in
+%% basic machine units, into that buffer and the parameter data is read from the buffer rather
+%% than from client memory.
+%%
+%% Note that indices stored in client memory are not supported. If no buffer is bound to
+%% the `?GL_ELEMENT_ARRAY_BUFFER' binding, an error will be generated.
+%%
+%% The results of the operation are undefined if the reservedMustBeZero member of the parameter
+%% structure is non-zero. However, no error is generated in this case.
+%%
+%% Vertex attributes that are modified by ``gl:drawElementsIndirect'' have an unspecified
+%% value after ``gl:drawElementsIndirect'' returns. Attributes that aren't modified remain
+%% well defined.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsIndirect.xml">external</a> documentation.
+-spec drawElementsIndirect(Mode, Type, Indirect) -> ok when Mode :: enum(),Type :: enum(),Indirect :: offset()|mem().
drawElementsIndirect(Mode,Type,Indirect) when is_integer(Indirect) ->
cast(5728, <<Mode:?GLenum,Type:?GLenum,Indirect:?GLuint>>);
drawElementsIndirect(Mode,Type,Indirect) ->
send_bin(Indirect),
cast(5729, <<Mode:?GLenum,Type:?GLenum>>).
-%% @spec (Location::integer(),X::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1d(integer(),float()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform1d(Location, X) -> ok when Location :: integer(),X :: float().
uniform1d(Location,X) ->
cast(5730, <<Location:?GLint,0:32,X:?GLdouble>>).
-%% @spec (Location::integer(),X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform2d(integer(),float(),float()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform2d(Location, X, Y) -> ok when Location :: integer(),X :: float(),Y :: float().
uniform2d(Location,X,Y) ->
cast(5731, <<Location:?GLint,0:32,X:?GLdouble,Y:?GLdouble>>).
-%% @spec (Location::integer(),X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform3d(integer(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform3d(Location, X, Y, Z) -> ok when Location :: integer(),X :: float(),Y :: float(),Z :: float().
uniform3d(Location,X,Y,Z) ->
cast(5732, <<Location:?GLint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec (Location::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform4d(integer(),float(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform4d(Location, X, Y, Z, W) -> ok when Location :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
uniform4d(Location,X,Y,Z,W) ->
cast(5733, <<Location:?GLint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
-%% @spec (Location::integer(),Value::[float()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1dv(integer(),[float()]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform1dv(Location, Value) -> ok when Location :: integer(),Value :: [float()].
uniform1dv(Location,Value) ->
cast(5734, <<Location:?GLint,0:32,(length(Value)):?GLuint,0:32,
(<< <<C:?GLdouble>> || C <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform2dv(integer(),[{float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform2dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float()}].
uniform2dv(Location,Value) ->
cast(5735, <<Location:?GLint,0:32,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble>> || {V1,V2} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform3dv(integer(),[{float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform3dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float()}].
uniform3dv(Location,Value) ->
cast(5736, <<Location:?GLint,0:32,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble>> || {V1,V2,V3} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform4dv(integer(),[{float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniform4dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float(),float()}].
uniform4dv(Location,Value) ->
cast(5737, <<Location:?GLint,0:32,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix.xml">external</a> documentation.
--spec uniformMatrix2dv(integer(),0|1,[{float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
uniformMatrix2dv(Location,Transpose,Value) ->
cast(5738, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix.xml">external</a> documentation.
--spec uniformMatrix3dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix3dv(Location,Transpose,Value) ->
cast(5739, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix.xml">external</a> documentation.
--spec uniformMatrix4dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4dv(Location,Transpose,Value) ->
cast(5740, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble,V13:?GLdouble,V14:?GLdouble,V15:?GLdouble,V16:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix2x.xml">external</a> documentation.
--spec uniformMatrix2x3dv(integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix2x3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
uniformMatrix2x3dv(Location,Transpose,Value) ->
cast(5741, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix2x.xml">external</a> documentation.
--spec uniformMatrix2x4dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix2x4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix2x4dv(Location,Transpose,Value) ->
cast(5742, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix3x.xml">external</a> documentation.
--spec uniformMatrix3x2dv(integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix3x2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
uniformMatrix3x2dv(Location,Transpose,Value) ->
cast(5743, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix3x.xml">external</a> documentation.
--spec uniformMatrix3x4dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix3x4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix3x4dv(Location,Transpose,Value) ->
cast(5744, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix4x.xml">external</a> documentation.
--spec uniformMatrix4x2dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix4x2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4x2dv(Location,Transpose,Value) ->
cast(5745, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
-%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformMatrix4x.xml">external</a> documentation.
--spec uniformMatrix4x3dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link uniform1f/2}
+-spec uniformMatrix4x3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4x3dv(Location,Transpose,Value) ->
cast(5746, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniform.xml">external</a> documentation.
--spec getUniformdv(integer(),integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}.
+%% @doc
+%% See {@link getUniformfv/2}
+-spec getUniformdv(Program, Location) -> matrix() when Program :: integer(),Location :: integer().
getUniformdv(Program,Location) ->
call(5747, <<Program:?GLuint,Location:?GLint>>).
-%% @spec (Program::integer(),Shadertype::enum(),Name::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSubroutineUniformLocation.xml">external</a> documentation.
--spec getSubroutineUniformLocation(integer(),enum(),string()) -> integer().
+%% @doc Retrieve the location of a subroutine uniform of a given shader stage within a program
+%%
+%% ``gl:getSubroutineUniformLocation'' returns the location of the subroutine uniform variable
+%% `Name' in the shader stage of type `Shadertype' attached to `Program' ,
+%% with behavior otherwise identical to {@link gl:getUniformLocation/2} .
+%%
+%% If `Name' is not the name of a subroutine uniform in the shader stage, -1 is returned,
+%% but no error is generated. If `Name' is the name of a subroutine uniform in the shader
+%% stage, a value between zero and the value of `?GL_ACTIVE_SUBROUTINE_LOCATIONS' minus
+%% one will be returned. Subroutine locations are assigned using consecutive integers in
+%% the range from zero to the value of `?GL_ACTIVE_SUBROUTINE_LOCATIONS' minus one for
+%% the shader stage. For active subroutine uniforms declared as arrays, the declared array
+%% elements are assigned consecutive locations.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSubroutineUniformLocation.xml">external</a> documentation.
+-spec getSubroutineUniformLocation(Program, Shadertype, Name) -> integer() when Program :: integer(),Shadertype :: enum(),Name :: string().
getSubroutineUniformLocation(Program,Shadertype,Name) ->
call(5748, <<Program:?GLuint,Shadertype:?GLenum,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
-%% @spec (Program::integer(),Shadertype::enum(),Name::string()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSubroutineIndex.xml">external</a> documentation.
--spec getSubroutineIndex(integer(),enum(),string()) -> integer().
+%% @doc Retrieve the index of a subroutine uniform of a given shader stage within a program
+%%
+%% ``gl:getSubroutineIndex'' returns the index of a subroutine uniform within a shader
+%% stage attached to a program object. `Program' contains the name of the program to
+%% which the shader is attached. `Shadertype' specifies the stage from which to query
+%% shader subroutine index. `Name' contains the null-terminated name of the subroutine
+%% uniform whose name to query.
+%%
+%% If `Name' is not the name of a subroutine uniform in the shader stage, `?GL_INVALID_INDEX'
+%% is returned, but no error is generated. If `Name' is the name of a subroutine uniform
+%% in the shader stage, a value between zero and the value of `?GL_ACTIVE_SUBROUTINES'
+%% minus one will be returned. Subroutine indices are assigned using consecutive integers
+%% in the range from zero to the value of `?GL_ACTIVE_SUBROUTINES' minus one for the
+%% shader stage.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetSubroutineIndex.xml">external</a> documentation.
+-spec getSubroutineIndex(Program, Shadertype, Name) -> integer() when Program :: integer(),Shadertype :: enum(),Name :: string().
getSubroutineIndex(Program,Shadertype,Name) ->
call(5749, <<Program:?GLuint,Shadertype:?GLenum,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
-%% @spec (Program::integer(),Shadertype::enum(),Index::integer(),Bufsize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveSubroutineUniformName.xml">external</a> documentation.
--spec getActiveSubroutineUniformName(integer(),enum(),integer(),integer()) -> string().
+%% @doc Query the name of an active shader subroutine uniform
+%%
+%% ``gl:getActiveSubroutineUniformName'' retrieves the name of an active shader subroutine
+%% uniform. `Program' contains the name of the program containing the uniform. `Shadertype'
+%% specifies the stage for which which the uniform location, given by `Index' , is valid.
+%% `Index' must be between zero and the value of `?GL_ACTIVE_SUBROUTINE_UNIFORMS'
+%% minus one for the shader stage.
+%%
+%% The uniform name is returned as a null-terminated string in `Name' . The actual number
+%% of characters written into `Name' , excluding the null terminator is returned in `Length'
+%% . If `Length' is `?NULL', no length is returned. The maximum number of characters
+%% that may be written into `Name' , including the null terminator, is specified by `Bufsize'
+%% . The length of the longest subroutine uniform name in `Program' and `Shadertype'
+%% is given by the value of `?GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH', which can be
+%% queried with {@link gl:getProgramStageiv/3} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveSubroutineUniformName.xml">external</a> documentation.
+-spec getActiveSubroutineUniformName(Program, Shadertype, Index, Bufsize) -> string() when Program :: integer(),Shadertype :: enum(),Index :: integer(),Bufsize :: integer().
getActiveSubroutineUniformName(Program,Shadertype,Index,Bufsize) ->
call(5750, <<Program:?GLuint,Shadertype:?GLenum,Index:?GLuint,Bufsize:?GLsizei>>).
-%% @spec (Program::integer(),Shadertype::enum(),Index::integer(),Bufsize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveSubroutineName.xml">external</a> documentation.
--spec getActiveSubroutineName(integer(),enum(),integer(),integer()) -> string().
+%% @doc Query the name of an active shader subroutine
+%%
+%% ``gl:getActiveSubroutineName'' queries the name of an active shader subroutine uniform
+%% from the program object given in `Program' . `Index' specifies the index of the
+%% shader subroutine uniform within the shader stage given by `Stage' , and must between
+%% zero and the value of `?GL_ACTIVE_SUBROUTINES' minus one for the shader stage.
+%%
+%% The name of the selected subroutine is returned as a null-terminated string in `Name'
+%% . The actual number of characters written into `Name' , not including the null-terminator,
+%% is is returned in `Length' . If `Length' is `?NULL', no length is returned.
+%% The maximum number of characters that may be written into `Name' , including the null-terminator,
+%% is given in `Bufsize' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveSubroutineName.xml">external</a> documentation.
+-spec getActiveSubroutineName(Program, Shadertype, Index, Bufsize) -> string() when Program :: integer(),Shadertype :: enum(),Index :: integer(),Bufsize :: integer().
getActiveSubroutineName(Program,Shadertype,Index,Bufsize) ->
call(5751, <<Program:?GLuint,Shadertype:?GLenum,Index:?GLuint,Bufsize:?GLsizei>>).
-%% @spec (Shadertype::enum(),Indices::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformSubroutines.xml">external</a> documentation.
--spec uniformSubroutinesuiv(enum(),[integer()]) -> ok.
+%% @doc Load active subroutine uniforms
+%%
+%% ``gl:uniformSubroutines'' loads all active subroutine uniforms for shader stage `Shadertype'
+%% of the current program with subroutine indices from `Indices' , storing `Indices[i]'
+%% into the uniform at location `I' . `Count' must be equal to the value of `?GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS'
+%% for the program currently in use at shader stage `Shadertype' . Furthermore, all
+%% values in `Indices' must be less than the value of `?GL_ACTIVE_SUBROUTINES'
+%% for the shader stage.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformSubroutines.xml">external</a> documentation.
+-spec uniformSubroutinesuiv(Shadertype, Indices) -> ok when Shadertype :: enum(),Indices :: [integer()].
uniformSubroutinesuiv(Shadertype,Indices) ->
cast(5752, <<Shadertype:?GLenum,(length(Indices)):?GLuint,
(<< <<C:?GLuint>> || C <- Indices>>)/binary,0:(((length(Indices)) rem 2)*32)>>).
-%% @spec (Shadertype::enum(),Location::integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformSubroutine.xml">external</a> documentation.
--spec getUniformSubroutineuiv(enum(),integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}.
+%% @doc Retrieve the value of a subroutine uniform of a given shader stage of the current program
+%%
+%% ``gl:getUniformSubroutine'' retrieves the value of the subroutine uniform at location `Location'
+%% for shader stage `Shadertype' of the current program. `Location' must be less
+%% than the value of `?GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS' for the shader currently
+%% in use at shader stage `Shadertype' . The value of the subroutine uniform is returned
+%% in `Values' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformSubroutine.xml">external</a> documentation.
+-spec getUniformSubroutineuiv(Shadertype, Location) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} when Shadertype :: enum(),Location :: integer().
getUniformSubroutineuiv(Shadertype,Location) ->
call(5753, <<Shadertype:?GLenum,Location:?GLint>>).
-%% @spec (Program::integer(),Shadertype::enum(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramStage.xml">external</a> documentation.
--spec getProgramStageiv(integer(),enum(),enum()) -> integer().
+%% @doc Retrieve properties of a program object corresponding to a specified shader stage
+%%
+%% ``gl:getProgramStage'' queries a parameter of a shader stage attached to a program object.
+%% `Program' contains the name of the program to which the shader is attached. `Shadertype'
+%% specifies the stage from which to query the parameter. `Pname' specifies which parameter
+%% should be queried. The value or values of the parameter to be queried is returned in the
+%% variable whose address is given in `Values' .
+%%
+%% If `Pname' is `?GL_ACTIVE_SUBROUTINE_UNIFORMS', the number of active subroutine
+%% variables in the stage is returned in `Values' .
+%%
+%% If `Pname' is `?GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS', the number of active
+%% subroutine variable locations in the stage is returned in `Values' .
+%%
+%% If `Pname' is `?GL_ACTIVE_SUBROUTINES', the number of active subroutines in
+%% the stage is returned in `Values' .
+%%
+%% If `Pname' is `?GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH', the length of the
+%% longest subroutine uniform for the stage is returned in `Values' .
+%%
+%% If `Pname' is `?GL_ACTIVE_SUBROUTINE_MAX_LENGTH', the length of the longest
+%% subroutine name for the stage is returned in `Values' . The returned name length includes
+%% space for the null-terminator.
+%%
+%% If there is no shader present of type `Shadertype' , the returned value will be consistent
+%% with a shader containing no subroutines or subroutine uniforms.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramStage.xml">external</a> documentation.
+-spec getProgramStageiv(Program, Shadertype, Pname) -> integer() when Program :: integer(),Shadertype :: enum(),Pname :: enum().
getProgramStageiv(Program,Shadertype,Pname) ->
call(5754, <<Program:?GLuint,Shadertype:?GLenum,Pname:?GLenum>>).
-%% @spec (Pname::enum(),Value::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPatchParameter.xml">external</a> documentation.
--spec patchParameteri(enum(),integer()) -> ok.
+%% @doc Specifies the parameters for patch primitives
+%%
+%% ``gl:patchParameter'' specifies the parameters that will be used for patch primitives. `Pname'
+%% specifies the parameter to modify and must be either `?GL_PATCH_VERTICES', `?GL_PATCH_DEFAULT_OUTER_LEVEL'
+%% or `?GL_PATCH_DEFAULT_INNER_LEVEL'. For ``gl:patchParameteri'', `Value' specifies
+%% the new value for the parameter specified by `Pname' . For ``gl:patchParameterfv'',
+%% `Values' specifies the address of an array containing the new values for the parameter
+%% specified by `Pname' .
+%%
+%% When `Pname' is `?GL_PATCH_VERTICES', `Value' specifies the number of
+%% vertices that will be used to make up a single patch primitive. Patch primitives are consumed
+%% by the tessellation control shader (if present) and subsequently used for tessellation.
+%% When primitives are specified using {@link gl:drawArrays/3} or a similar function, each
+%% patch will be made from `Parameter' control points, each represented by a vertex
+%% taken from the enabeld vertex arrays. `Parameter' must be greater than zero, and
+%% less than or equal to the value of `?GL_MAX_PATCH_VERTICES'.
+%%
+%% When `Pname' is `?GL_PATCH_DEFAULT_OUTER_LEVEL' or `?GL_PATCH_DEFAULT_INNER_LEVEL'
+%% , `Values' contains the address of an array contiaining the default outer or inner
+%% tessellation levels, respectively, to be used when no tessellation control shader is present.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPatchParameter.xml">external</a> documentation.
+-spec patchParameteri(Pname, Value) -> ok when Pname :: enum(),Value :: integer().
patchParameteri(Pname,Value) ->
cast(5755, <<Pname:?GLenum,Value:?GLint>>).
-%% @spec (Pname::enum(),Values::[float()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPatchParameter.xml">external</a> documentation.
--spec patchParameterfv(enum(),[float()]) -> ok.
+%% @doc
+%% See {@link patchParameteri/2}
+-spec patchParameterfv(Pname, Values) -> ok when Pname :: enum(),Values :: [float()].
patchParameterfv(Pname,Values) ->
cast(5756, <<Pname:?GLenum,(length(Values)):?GLuint,
(<< <<C:?GLfloat>> || C <- Values>>)/binary,0:(((length(Values)) rem 2)*32)>>).
-%% @spec (Target::enum(),Id::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindTransformFeedback.xml">external</a> documentation.
--spec bindTransformFeedback(enum(),integer()) -> ok.
+%% @doc Bind a transform feedback object
+%%
+%% ``gl:bindTransformFeedback'' binds the transform feedback object with name `Id'
+%% to the current GL state. `Id' must be a name previously returned from a call to {@link gl:genTransformFeedbacks/1}
+%% . If `Id' has not previously been bound, a new transform feedback object with name `Id'
+%% and initialized with with the default transform state vector is created.
+%%
+%% In the initial state, a default transform feedback object is bound and treated as a transform
+%% feedback object with a name of zero. If the name zero is subsequently bound, the default
+%% transform feedback object is again bound to the GL state.
+%%
+%% While a transform feedback buffer object is bound, GL operations on the target to which
+%% it is bound affect the bound transform feedback object, and queries of the target to which
+%% a transform feedback object is bound return state from the bound object. When buffer objects
+%% are bound for transform feedback, they are attached to the currently bound transform feedback
+%% object. Buffer objects are used for trans- form feedback only if they are attached to
+%% the currently bound transform feedback object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindTransformFeedback.xml">external</a> documentation.
+-spec bindTransformFeedback(Target, Id) -> ok when Target :: enum(),Id :: integer().
bindTransformFeedback(Target,Id) ->
cast(5757, <<Target:?GLenum,Id:?GLuint>>).
-%% @spec (Ids::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteTransformFeedbacks.xml">external</a> documentation.
--spec deleteTransformFeedbacks([integer()]) -> ok.
+%% @doc Delete transform feedback objects
+%%
+%% ``gl:deleteTransformFeedbacks'' deletes the `N' transform feedback objects whose
+%% names are stored in the array `Ids' . Unused names in `Ids' are ignored, as is
+%% the name zero. After a transform feedback object is deleted, its name is again unused
+%% and it has no contents. If an active transform feedback object is deleted, its name immediately
+%% becomes unused, but the underlying object is not deleted until it is no longer active.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteTransformFeedbacks.xml">external</a> documentation.
+-spec deleteTransformFeedbacks(Ids) -> ok when Ids :: [integer()].
deleteTransformFeedbacks(Ids) ->
cast(5758, <<(length(Ids)):?GLuint,
(<< <<C:?GLuint>> || C <- Ids>>)/binary,0:(((1+length(Ids)) rem 2)*32)>>).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenTransformFeedbacks.xml">external</a> documentation.
--spec genTransformFeedbacks(integer()) -> [integer()].
+%% @doc Reserve transform feedback object names
+%%
+%% ``gl:genTransformFeedbacks'' returns `N' previously unused transform feedback object
+%% names in `Ids' . These names are marked as used, for the purposes of ``gl:genTransformFeedbacks''
+%% only, but they acquire transform feedback state only when they are first bound.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenTransformFeedbacks.xml">external</a> documentation.
+-spec genTransformFeedbacks(N) -> [integer()] when N :: integer().
genTransformFeedbacks(N) ->
call(5759, <<N:?GLsizei>>).
-%% @spec (Id::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsTransformFeedback.xml">external</a> documentation.
--spec isTransformFeedback(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a transform feedback object
+%%
+%% ``gl:isTransformFeedback'' returns `?GL_TRUE' if `Id' is currently the name
+%% of a transform feedback object. If `Id' is zero, or if `?id' is not the name
+%% of a transform feedback object, or if an error occurs, ``gl:isTransformFeedback'' returns
+%% `?GL_FALSE'. If `Id' is a name returned by {@link gl:genTransformFeedbacks/1} ,
+%% but that has not yet been bound through a call to {@link gl:bindTransformFeedback/2} , then
+%% the name is not a transform feedback object and ``gl:isTransformFeedback'' returns `?GL_FALSE'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsTransformFeedback.xml">external</a> documentation.
+-spec isTransformFeedback(Id) -> 0|1 when Id :: integer().
isTransformFeedback(Id) ->
call(5760, <<Id:?GLuint>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPauseTransformFeedback.xml">external</a> documentation.
+%% @doc Pause transform feedback operations
+%%
+%% ``gl:pauseTransformFeedback'' pauses transform feedback operations on the currently
+%% active transform feedback object. When transform feedback operations are paused, transform
+%% feedback is still considered active and changing most transform feedback state related
+%% to the object results in an error. However, a new transform feedback object may be bound
+%% while transform feedback is paused.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPauseTransformFeedback.xml">external</a> documentation.
-spec pauseTransformFeedback() -> ok.
pauseTransformFeedback() ->
cast(5761, <<>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResumeTransformFeedback.xml">external</a> documentation.
+%% @doc Resume transform feedback operations
+%%
+%% ``gl:resumeTransformFeedback'' resumes transform feedback operations on the currently
+%% active transform feedback object. When transform feedback operations are paused, transform
+%% feedback is still considered active and changing most transform feedback state related
+%% to the object results in an error. However, a new transform feedback object may be bound
+%% while transform feedback is paused.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResumeTransformFeedback.xml">external</a> documentation.
-spec resumeTransformFeedback() -> ok.
resumeTransformFeedback() ->
cast(5762, <<>>).
-%% @spec (Mode::enum(),Id::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedback.xml">external</a> documentation.
--spec drawTransformFeedback(enum(),integer()) -> ok.
+%% @doc Render primitives using a count derived from a transform feedback object
+%%
+%% ``gl:drawTransformFeedback'' draws primitives of a type specified by `Mode' using
+%% a count retrieved from the transform feedback specified by `Id' . Calling ``gl:drawTransformFeedback''
+%% is equivalent to calling {@link gl:drawArrays/3} with `Mode' as specified, `First'
+%% set to zero, and `Count' set to the number of vertices captured on vertex stream
+%% zero the last time transform feedback was active on the transform feedback object named
+%% by `Id' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedback.xml">external</a> documentation.
+-spec drawTransformFeedback(Mode, Id) -> ok when Mode :: enum(),Id :: integer().
drawTransformFeedback(Mode,Id) ->
cast(5763, <<Mode:?GLenum,Id:?GLuint>>).
-%% @spec (Mode::enum(),Id::integer(),Stream::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedbackStream.xml">external</a> documentation.
--spec drawTransformFeedbackStream(enum(),integer(),integer()) -> ok.
+%% @doc Render primitives using a count derived from a specifed stream of a transform feedback object
+%%
+%% ``gl:drawTransformFeedbackStream'' draws primitives of a type specified by `Mode'
+%% using a count retrieved from the transform feedback stream specified by `Stream'
+%% of the transform feedback object specified by `Id' . Calling ``gl:drawTransformFeedbackStream''
+%% is equivalent to calling {@link gl:drawArrays/3} with `Mode' as specified, `First'
+%% set to zero, and `Count' set to the number of vertices captured on vertex stream `Stream'
+%% the last time transform feedback was active on the transform feedback object named by `Id'
+%% .
+%%
+%% Calling {@link gl:drawTransformFeedback/2} is equivalent to calling ``gl:drawTransformFeedbackStream''
+%% with `Stream' set to zero.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedbackStream.xml">external</a> documentation.
+-spec drawTransformFeedbackStream(Mode, Id, Stream) -> ok when Mode :: enum(),Id :: integer(),Stream :: integer().
drawTransformFeedbackStream(Mode,Id,Stream) ->
cast(5764, <<Mode:?GLenum,Id:?GLuint,Stream:?GLuint>>).
-%% @spec (Target::enum(),Index::integer(),Id::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginQueryIndexe.xml">external</a> documentation.
--spec beginQueryIndexed(enum(),integer(),integer()) -> ok.
+%% @doc glBeginQueryIndexe
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginQueryIndexe.xml">external</a> documentation.
+-spec beginQueryIndexed(Target, Index, Id) -> ok when Target :: enum(),Index :: integer(),Id :: integer().
beginQueryIndexed(Target,Index,Id) ->
cast(5765, <<Target:?GLenum,Index:?GLuint,Id:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEndQueryIndexe.xml">external</a> documentation.
--spec endQueryIndexed(enum(),integer()) -> ok.
+%% @doc Delimit the boundaries of a query object on an indexed target
+%%
+%% ``gl:beginQueryIndexed'' and {@link gl:endQueryIndexed/2} delimit the boundaries of a
+%% query object. `Query' must be a name previously returned from a call to {@link gl:genQueries/1}
+%% . If a query object with name `Id' does not yet exist it is created with the type
+%% determined by `Target' . `Target' must be one of `?GL_SAMPLES_PASSED', `?GL_ANY_SAMPLES_PASSED'
+%% , `?GL_PRIMITIVES_GENERATED', `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN', or `?GL_TIME_ELAPSED'
+%% . The behavior of the query object depends on its type and is as follows.
+%%
+%% `Index' specifies the index of the query target and must be between a `Target' -specific
+%% maximum.
+%%
+%% If `Target' is `?GL_SAMPLES_PASSED', `Id' must be an unused name, or the
+%% name of an existing occlusion query object. When ``gl:beginQueryIndexed'' is executed,
+%% the query object's samples-passed counter is reset to 0. Subsequent rendering will increment
+%% the counter for every sample that passes the depth test. If the value of `?GL_SAMPLE_BUFFERS'
+%% is 0, then the samples-passed count is incremented by 1 for each fragment. If the value
+%% of `?GL_SAMPLE_BUFFERS' is 1, then the samples-passed count is incremented by the
+%% number of samples whose coverage bit is set. However, implementations, at their discression
+%% may instead increase the samples-passed count by the value of `?GL_SAMPLES' if any
+%% sample in the fragment is covered. When ``gl:endQueryIndexed'' is executed, the samples-passed
+%% counter is assigned to the query object's result value. This value can be queried by calling
+%% {@link gl:getQueryObjectiv/2} with `Pname' `?GL_QUERY_RESULT'. When `Target'
+%% is `?GL_SAMPLES_PASSED', `Index' must be zero.
+%%
+%% If `Target' is `?GL_ANY_SAMPLES_PASSED', `Id' must be an unused name,
+%% or the name of an existing boolean occlusion query object. When ``gl:beginQueryIndexed''
+%% is executed, the query object's samples-passed flag is reset to `?GL_FALSE'. Subsequent
+%% rendering causes the flag to be set to `?GL_TRUE' if any sample passes the depth
+%% test. When ``gl:endQueryIndexed'' is executed, the samples-passed flag is assigned to
+%% the query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2}
+%% with `Pname' `?GL_QUERY_RESULT'. When `Target' is `?GL_ANY_SAMPLES_PASSED'
+%% , `Index' must be zero.
+%%
+%% If `Target' is `?GL_PRIMITIVES_GENERATED', `Id' must be an unused name,
+%% or the name of an existing primitive query object previously bound to the `?GL_PRIMITIVES_GENERATED'
+%% query binding. When ``gl:beginQueryIndexed'' is executed, the query object's primitives-generated
+%% counter is reset to 0. Subsequent rendering will increment the counter once for every
+%% vertex that is emitted from the geometry shader to the stream given by `Index' , or
+%% from the vertex shader if `Index' is zero and no geometry shader is present. When ``gl:endQueryIndexed''
+%% is executed, the primitives-generated counter for stream `Index' is assigned to
+%% the query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2}
+%% with `Pname' `?GL_QUERY_RESULT'. When `Target' is `?GL_PRIMITIVES_GENERATED'
+%% , `Index' must be less than the value of `?GL_MAX_VERTEX_STREAMS'.
+%%
+%% If `Target' is `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN', `Id' must
+%% be an unused name, or the name of an existing primitive query object previously bound
+%% to the `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN' query binding. When ``gl:beginQueryIndexed''
+%% is executed, the query object's primitives-written counter for the stream specified by `Index'
+%% is reset to 0. Subsequent rendering will increment the counter once for every vertex
+%% that is written into the bound transform feedback buffer(s) for stream `Index' . If
+%% transform feedback mode is not activated between the call to ``gl:beginQueryIndexed''
+%% and ``gl:endQueryIndexed'', the counter will not be incremented. When ``gl:endQueryIndexed''
+%% is executed, the primitives-written counter for stream `Index' is assigned to the
+%% query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2}
+%% with `Pname' `?GL_QUERY_RESULT'. When `Target' is `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN'
+%% , `Index' must be less than the value of `?GL_MAX_VERTEX_STREAMS'.
+%%
+%% If `Target' is `?GL_TIME_ELAPSED', `Id' must be an unused name, or the
+%% name of an existing timer query object previously bound to the `?GL_TIME_ELAPSED'
+%% query binding. When ``gl:beginQueryIndexed'' is executed, the query object's time counter
+%% is reset to 0. When ``gl:endQueryIndexed'' is executed, the elapsed server time that
+%% has passed since the call to ``gl:beginQueryIndexed'' is written into the query object's
+%% time counter. This value can be queried by calling {@link gl:getQueryObjectiv/2} with `Pname'
+%% `?GL_QUERY_RESULT'. When `Target' is `?GL_TIME_ELAPSED', `Index' must
+%% be zero.
+%%
+%% Querying the `?GL_QUERY_RESULT' implicitly flushes the GL pipeline until the rendering
+%% delimited by the query object has completed and the result is available. `?GL_QUERY_RESULT_AVAILABLE'
+%% can be queried to determine if the result is immediately available or if the rendering
+%% is not yet complete.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginQueryIndexed.xml">external</a> documentation.
+-spec endQueryIndexed(Target, Index) -> ok when Target :: enum(),Index :: integer().
endQueryIndexed(Target,Index) ->
cast(5766, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryIndexed.xml">external</a> documentation.
--spec getQueryIndexediv(enum(),integer(),enum()) -> integer().
+%% @doc Return parameters of an indexed query object target
+%%
+%% ``gl:getQueryIndexediv'' returns in `Params' a selected parameter of the indexed
+%% query object target specified by `Target' and `Index' . `Index' specifies
+%% the index of the query object target and must be between zero and a target-specific maxiumum.
+%%
+%%
+%% `Pname' names a specific query object target parameter. When `Pname' is `?GL_CURRENT_QUERY'
+%% , the name of the currently active query for the specified `Index' of `Target' ,
+%% or zero if no query is active, will be placed in `Params' . If `Pname' is `?GL_QUERY_COUNTER_BITS'
+%% , the implementation-dependent number of bits used to hold the result of queries for `Target'
+%% is returned in `Params' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetQueryIndexed.xml">external</a> documentation.
+-spec getQueryIndexediv(Target, Index, Pname) -> integer() when Target :: enum(),Index :: integer(),Pname :: enum().
getQueryIndexediv(Target,Index,Pname) ->
call(5767, <<Target:?GLenum,Index:?GLuint,Pname:?GLenum>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReleaseShaderCompiler.xml">external</a> documentation.
+%% @doc Release resources consumed by the implementation's shader compiler
+%%
+%% ``gl:releaseShaderCompiler'' provides a hint to the implementation that it may free
+%% internal resources associated with its shader compiler. {@link gl:compileShader/1} may
+%% subsequently be called and the implementation may at that time reallocate resources previously
+%% freed by the call to ``gl:releaseShaderCompiler''.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReleaseShaderCompiler.xml">external</a> documentation.
-spec releaseShaderCompiler() -> ok.
releaseShaderCompiler() ->
cast(5768, <<>>).
-%% @spec (Shaders::[integer()],Binaryformat::enum(),Binary::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderBinary.xml">external</a> documentation.
--spec shaderBinary([integer()],enum(),binary()) -> ok.
+%% @doc Load pre-compiled shader binaries
+%%
+%% ``gl:shaderBinary'' loads pre-compiled shader binary code into the `Count' shader
+%% objects whose handles are given in `Shaders' . `Binary' points to `Length'
+%% bytes of binary shader code stored in client memory. `BinaryFormat' specifies the
+%% format of the pre-compiled code.
+%%
+%% The binary image contained in `Binary' will be decoded according to the extension
+%% specification defining the specified `BinaryFormat' token. OpenGL does not define
+%% any specific binary formats, but it does provide a mechanism to obtain token vaues for
+%% such formats provided by such extensions.
+%%
+%% Depending on the types of the shader objects in `Shaders' , ``gl:shaderBinary''
+%% will individually load binary vertex or fragment shaders, or load an executable binary
+%% that contains an optimized pair of vertex and fragment shaders stored in the same binary.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderBinary.xml">external</a> documentation.
+-spec shaderBinary(Shaders, Binaryformat, Binary) -> ok when Shaders :: [integer()],Binaryformat :: enum(),Binary :: binary().
shaderBinary(Shaders,Binaryformat,Binary) ->
send_bin(Binary),
cast(5769, <<(length(Shaders)):?GLuint,
(<< <<C:?GLuint>> || C <- Shaders>>)/binary,0:(((1+length(Shaders)) rem 2)*32),Binaryformat:?GLenum>>).
-%% @spec (Shadertype::enum(),Precisiontype::enum()) -> {Range::{integer(),integer()},Precision::integer()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderPrecisionFormat.xml">external</a> documentation.
--spec getShaderPrecisionFormat(enum(),enum()) -> {{integer(),integer()},integer()}.
+%% @doc Retrieve the range and precision for numeric formats supported by the shader compiler
+%%
+%% ``gl:getShaderPrecisionFormat'' retrieves the numeric range and precision for the implementation's
+%% representation of quantities in different numeric formats in specified shader type. `ShaderType'
+%% specifies the type of shader for which the numeric precision and range is to be retrieved
+%% and must be one of `?GL_VERTEX_SHADER' or `?GL_FRAGMENT_SHADER'. `PrecisionType'
+%% specifies the numeric format to query and must be one of `?GL_LOW_FLOAT', `?GL_MEDIUM_FLOAT'
+%% `?GL_HIGH_FLOAT', `?GL_LOW_INT', `?GL_MEDIUM_INT', or `?GL_HIGH_INT'.
+%%
+%%
+%% `Range' points to an array of two integers into which the format's numeric range
+%% will be returned. If min and max are the smallest values representable in the format,
+%% then the values returned are defined to be: `Range' [0] = floor(log2(|min|)) and `Range'
+%% [1] = floor(log2(|max|)).
+%%
+%% `Precision' specifies the address of an integer into which will be written the log2
+%% value of the number of bits of precision of the format. If the smallest representable
+%% value greater than 1 is 1 + `eps', then the integer addressed by `Precision'
+%% will contain floor(-log2(eps)).
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderPrecisionFormat.xml">external</a> documentation.
+-spec getShaderPrecisionFormat(Shadertype, Precisiontype) -> {Range :: {integer(),integer()},Precision :: integer()} when Shadertype :: enum(),Precisiontype :: enum().
getShaderPrecisionFormat(Shadertype,Precisiontype) ->
call(5770, <<Shadertype:?GLenum,Precisiontype:?GLenum>>).
-%% @spec (N::clamp(),F::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRange.xml">external</a> documentation.
--spec depthRangef(clamp(),clamp()) -> ok.
+%% @doc
+%% See {@link depthRange/2}
+-spec depthRangef(N, F) -> ok when N :: clamp(),F :: clamp().
depthRangef(N,F) ->
cast(5771, <<N:?GLclampf,F:?GLclampf>>).
-%% @spec (D::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearDepthf.xml">external</a> documentation.
--spec clearDepthf(clamp()) -> ok.
+%% @doc glClearDepthf
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearDepthf.xml">external</a> documentation.
+-spec clearDepthf(D) -> ok when D :: clamp().
clearDepthf(D) ->
cast(5772, <<D:?GLclampf>>).
-%% @spec (Program::integer(),BufSize::integer()) -> {BinaryFormat::enum(),Binary::binary()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramBinary.xml">external</a> documentation.
--spec getProgramBinary(integer(),integer()) -> {enum(),binary()}.
+%% @doc Return a binary representation of a program object's compiled and linked executable source
+%%
+%% ``gl:getProgramBinary'' returns a binary representation of the compiled and linked executable
+%% for `Program' into the array of bytes whose address is specified in `Binary' .
+%% The maximum number of bytes that may be written into `Binary' is specified by `BufSize'
+%% . If the program binary is greater in size than `BufSize' bytes, then an error is
+%% generated, otherwise the actual number of bytes written into `Binary' is returned
+%% in the variable whose address is given by `Length' . If `Length' is `?NULL',
+%% then no length is returned.
+%%
+%% The format of the program binary written into `Binary' is returned in the variable
+%% whose address is given by `BinaryFormat' , and may be implementation dependent. The
+%% binary produced by the GL may subsequently be returned to the GL by calling {@link gl:programBinary/3}
+%% , with `BinaryFormat' and `Length' set to the values returned by ``gl:getProgramBinary''
+%% , and passing the returned binary data in the `Binary' parameter.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramBinary.xml">external</a> documentation.
+-spec getProgramBinary(Program, BufSize) -> {BinaryFormat :: enum(),Binary :: binary()} when Program :: integer(),BufSize :: integer().
getProgramBinary(Program,BufSize) ->
call(5773, <<Program:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Program::integer(),BinaryFormat::enum(),Binary::binary()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramBinary.xml">external</a> documentation.
--spec programBinary(integer(),enum(),binary()) -> ok.
+%% @doc Load a program object with a program binary
+%%
+%% ``gl:programBinary'' loads a program object with a program binary previously returned
+%% from {@link gl:getProgramBinary/2} . `BinaryFormat' and `Binary' must be those
+%% returned by a previous call to {@link gl:getProgramBinary/2} , and `Length' must be
+%% the length returned by {@link gl:getProgramBinary/2} , or by {@link gl:getProgramiv/2} when
+%% called with `Pname' set to `?GL_PROGRAM_BINARY_LENGTH'. If these conditions
+%% are not met, loading the program binary will fail and `Program' 's `?GL_LINK_STATUS'
+%% will be set to `?GL_FALSE'.
+%%
+%% A program object's program binary is replaced by calls to {@link gl:linkProgram/1} or ``gl:programBinary''
+%% . When linking success or failure is concerned, ``gl:programBinary'' can be considered
+%% to perform an implicit linking operation. {@link gl:linkProgram/1} and ``gl:programBinary''
+%% both set the program object's `?GL_LINK_STATUS' to `?GL_TRUE' or `?GL_FALSE'
+%% .
+%%
+%% A successful call to ``gl:programBinary'' will reset all uniform variables to their
+%% initial values. The initial value is either the value of the variable's initializer as
+%% specified in the original shader source, or zero if no initializer was present. Additionally,
+%% all vertex shader input and fragment shader output assignments that were in effect when
+%% the program was linked before saving are restored with ``gl:programBinary'' is called.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramBinary.xml">external</a> documentation.
+-spec programBinary(Program, BinaryFormat, Binary) -> ok when Program :: integer(),BinaryFormat :: enum(),Binary :: binary().
programBinary(Program,BinaryFormat,Binary) ->
send_bin(Binary),
cast(5774, <<Program:?GLuint,BinaryFormat:?GLenum>>).
-%% @spec (Program::integer(),Pname::enum(),Value::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramParameter.xml">external</a> documentation.
--spec programParameteri(integer(),enum(),integer()) -> ok.
+%% @doc Specify a parameter for a program object
+%%
+%% ``gl:programParameter'' specifies a new value for the parameter nameed by `Pname'
+%% for the program object `Program' .
+%%
+%% If `Pname' is `?GL_PROGRAM_BINARY_RETRIEVABLE_HINT', `Value' should be `?GL_FALSE'
+%% or `?GL_TRUE' to indicate to the implementation the intention of the application
+%% to retrieve the program's binary representation with {@link gl:getProgramBinary/2} . The
+%% implementation may use this information to store information that may be useful for a
+%% future query of the program's binary. It is recommended to set `?GL_PROGRAM_BINARY_RETRIEVABLE_HINT'
+%% for the program to `?GL_TRUE' before calling {@link gl:linkProgram/1} , and using
+%% the program at run-time if the binary is to be retrieved later.
+%%
+%% If `Pname' is `?GL_PROGRAM_SEPARABLE', `Value' must be `?GL_TRUE'
+%% or `?GL_FALSE' and indicates whether `Program' can be bound to individual pipeline
+%% stages via {@link gl:useProgramStages/3} . A program's `?GL_PROGRAM_SEPARABLE' parameter
+%% must be set to `?GL_TRUE'`before' {@link gl:linkProgram/1} is called in order
+%% for it to be usable with a program pipeline object. The initial state of `?GL_PROGRAM_SEPARABLE'
+%% is `?GL_FALSE'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramParameter.xml">external</a> documentation.
+-spec programParameteri(Program, Pname, Value) -> ok when Program :: integer(),Pname :: enum(),Value :: integer().
programParameteri(Program,Pname,Value) ->
cast(5775, <<Program:?GLuint,Pname:?GLenum,Value:?GLint>>).
-%% @spec (Pipeline::integer(),Stages::integer(),Program::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgramStages.xml">external</a> documentation.
--spec useProgramStages(integer(),integer(),integer()) -> ok.
+%% @doc Bind stages of a program object to a program pipeline
+%%
+%% ``gl:useProgramStages'' binds executables from a program object associated with a specified
+%% set of shader stages to the program pipeline object given by `Pipeline' . `Pipeline'
+%% specifies the program pipeline object to which to bind the executables. `Stages'
+%% contains a logical combination of bits indicating the shader stages to use within `Program'
+%% with the program pipeline object `Pipeline' . `Stages' must be a logical combination
+%% of `?GL_VERTEX_SHADER_BIT', `?GL_TESS_CONTROL_SHADER_BIT', `?GL_TESS_EVALUATION_SHADER_BIT'
+%% , `?GL_GEOMETRY_SHADER_BIT', and `?GL_FRAGMENT_SHADER_BIT'. Additionally, the
+%% special value `?GL_ALL_SHADER_BITS' may be specified to indicate that all executables
+%% contained in `Program' should be installed in `Pipeline' .
+%%
+%% If `Program' refers to a program object with a valid shader attached for an indicated
+%% shader stage, ``gl:useProgramStages'' installs the executable code for that stage in
+%% the indicated program pipeline object `Pipeline' . If `Program' is zero, or refers
+%% to a program object with no valid shader executable for a given stage, it is as if the
+%% pipeline object has no programmable stage configured for the indicated shader stages. If `Stages'
+%% contains bits other than those listed above, and is not equal to `?GL_ALL_SHADER_BITS'
+%% , an error is generated.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgramStages.xml">external</a> documentation.
+-spec useProgramStages(Pipeline, Stages, Program) -> ok when Pipeline :: integer(),Stages :: integer(),Program :: integer().
useProgramStages(Pipeline,Stages,Program) ->
cast(5776, <<Pipeline:?GLuint,Stages:?GLbitfield,Program:?GLuint>>).
-%% @spec (Pipeline::integer(),Program::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glActiveShaderProgram.xml">external</a> documentation.
--spec activeShaderProgram(integer(),integer()) -> ok.
+%% @doc Set the active program object for a program pipeline object
+%%
+%% ``gl:activeShaderProgram'' sets the linked program named by `Program' to be the
+%% active program for the program pipeline object `Pipeline' . The active program in
+%% the active program pipeline object is the target of calls to {@link gl:uniform1f/2} when
+%% no program has been made current through a call to {@link gl:useProgram/1} .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glActiveShaderProgram.xml">external</a> documentation.
+-spec activeShaderProgram(Pipeline, Program) -> ok when Pipeline :: integer(),Program :: integer().
activeShaderProgram(Pipeline,Program) ->
cast(5777, <<Pipeline:?GLuint,Program:?GLuint>>).
-%% @spec (Type::enum(),Strings::[string()]) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateShaderProgramv.xml">external</a> documentation.
--spec createShaderProgramv(enum(),[string()]) -> integer().
+%% @doc glCreateShaderProgramv
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCreateShaderProgramv.xml">external</a> documentation.
+-spec createShaderProgramv(Type, Strings) -> integer() when Type :: enum(),Strings :: [string()].
createShaderProgramv(Type,Strings) ->
StringsTemp = list_to_binary([[Str|[0]] || Str <- Strings ]),
call(5778, <<Type:?GLenum,(length(Strings)):?GLuint,(size(StringsTemp)):?GLuint,(StringsTemp)/binary,0:((8-((size(StringsTemp)+0) rem 8)) rem 8)>>).
-%% @spec (Pipeline::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindProgramPipeline.xml">external</a> documentation.
--spec bindProgramPipeline(integer()) -> ok.
+%% @doc Bind a program pipeline to the current context
+%%
+%% ``gl:bindProgramPipeline'' binds a program pipeline object to the current context. `Pipeline'
+%% must be a name previously returned from a call to {@link gl:genProgramPipelines/1} . If
+%% no program pipeline exists with name `Pipeline' then a new pipeline object is created
+%% with that name and initialized to the default state vector.
+%%
+%% When a program pipeline object is bound using ``gl:bindProgramPipeline'', any previous
+%% binding is broken and is replaced with a binding to the specified pipeline object. If `Pipeline'
+%% is zero, the previous binding is broken and is not replaced, leaving no pipeline object
+%% bound. If no current program object has been established by {@link gl:useProgram/1} , the
+%% program objects used for each stage and for uniform updates are taken from the bound program
+%% pipeline object, if any. If there is a current program object established by {@link gl:useProgram/1}
+%% , the bound program pipeline object has no effect on rendering or uniform updates. When
+%% a bound program pipeline object is used for rendering, individual shader executables are
+%% taken from its program objects.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindProgramPipeline.xml">external</a> documentation.
+-spec bindProgramPipeline(Pipeline) -> ok when Pipeline :: integer().
bindProgramPipeline(Pipeline) ->
cast(5779, <<Pipeline:?GLuint>>).
-%% @spec (Pipelines::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgramPipelines.xml">external</a> documentation.
--spec deleteProgramPipelines([integer()]) -> ok.
+%% @doc Delete program pipeline objects
+%%
+%% ``gl:deleteProgramPipelines'' deletes the `N' program pipeline objects whose names
+%% are stored in the array `Pipelines' . Unused names in `Pipelines' are ignored,
+%% as is the name zero. After a program pipeline object is deleted, its name is again unused
+%% and it has no contents. If program pipeline object that is currently bound is deleted,
+%% the binding for that object reverts to zero and no program pipeline object becomes current.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgramPipelines.xml">external</a> documentation.
+-spec deleteProgramPipelines(Pipelines) -> ok when Pipelines :: [integer()].
deleteProgramPipelines(Pipelines) ->
cast(5780, <<(length(Pipelines)):?GLuint,
(<< <<C:?GLuint>> || C <- Pipelines>>)/binary,0:(((1+length(Pipelines)) rem 2)*32)>>).
-%% @spec (N::integer()) -> [integer()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenProgramPipelines.xml">external</a> documentation.
--spec genProgramPipelines(integer()) -> [integer()].
+%% @doc Reserve program pipeline object names
+%%
+%% ``gl:genProgramPipelines'' returns `N' previously unused program pipeline object
+%% names in `Pipelines' . These names are marked as used, for the purposes of ``gl:genProgramPipelines''
+%% only, but they acquire program pipeline state only when they are first bound.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenProgramPipelines.xml">external</a> documentation.
+-spec genProgramPipelines(N) -> [integer()] when N :: integer().
genProgramPipelines(N) ->
call(5781, <<N:?GLsizei>>).
-%% @spec (Pipeline::integer()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsProgramPipeline.xml">external</a> documentation.
--spec isProgramPipeline(integer()) -> 0|1.
+%% @doc Determine if a name corresponds to a program pipeline object
+%%
+%% ``gl:isProgramPipeline'' returns `?GL_TRUE' if `Pipeline' is currently the
+%% name of a program pipeline object. If `Pipeline' is zero, or if `?pipeline'
+%% is not the name of a program pipeline object, or if an error occurs, ``gl:isProgramPipeline''
+%% returns `?GL_FALSE'. If `Pipeline' is a name returned by {@link gl:genProgramPipelines/1}
+%% , but that has not yet been bound through a call to {@link gl:bindProgramPipeline/1} , then
+%% the name is not a program pipeline object and ``gl:isProgramPipeline'' returns `?GL_FALSE'
+%% .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIsProgramPipeline.xml">external</a> documentation.
+-spec isProgramPipeline(Pipeline) -> 0|1 when Pipeline :: integer().
isProgramPipeline(Pipeline) ->
call(5782, <<Pipeline:?GLuint>>).
-%% @spec (Pipeline::integer(),Pname::enum()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramPipeline.xml">external</a> documentation.
--spec getProgramPipelineiv(integer(),enum()) -> integer().
+%% @doc Retrieve properties of a program pipeline object
+%%
+%% ``gl:getProgramPipelineiv'' retrieves the value of a property of the program pipeline
+%% object `Pipeline' . `Pname' specifies the name of the parameter whose value to
+%% retrieve. The value of the parameter is written to the variable whose address is given
+%% by `Params' .
+%%
+%% If `Pname' is `?GL_ACTIVE_PROGRAM', the name of the active program object of
+%% the program pipeline object is returned in `Params' .
+%%
+%% If `Pname' is `?GL_VERTEX_SHADER', the name of the current program object for
+%% the vertex shader type of the program pipeline object is returned in `Params' .
+%%
+%% If `Pname' is `?GL_TESS_CONTROL_SHADER', the name of the current program object
+%% for the tessellation control shader type of the program pipeline object is returned in `Params'
+%% .
+%%
+%% If `Pname' is `?GL_TESS_EVALUATION_SHADER', the name of the current program
+%% object for the tessellation evaluation shader type of the program pipeline object is returned
+%% in `Params' .
+%%
+%% If `Pname' is `?GL_GEOMETRY_SHADER', the name of the current program object
+%% for the geometry shader type of the program pipeline object is returned in `Params' .
+%%
+%%
+%% If `Pname' is `?GL_FRAGMENT_SHADER', the name of the current program object
+%% for the fragment shader type of the program pipeline object is returned in `Params' .
+%%
+%%
+%% If `Pname' is `?GL_INFO_LOG_LENGTH', the length of the info log, including
+%% the null terminator, is returned in `Params' . If there is no info log, zero is returned.
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramPipeline.xml">external</a> documentation.
+-spec getProgramPipelineiv(Pipeline, Pname) -> integer() when Pipeline :: integer(),Pname :: enum().
getProgramPipelineiv(Pipeline,Pname) ->
call(5783, <<Pipeline:?GLuint,Pname:?GLenum>>).
-%% @spec (Program::integer(),Location::integer(),V0::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1i(integer(),integer(),integer()) -> ok.
+%% @doc Specify the value of a uniform variable for a specified program object
+%%
+%% ``gl:programUniform'' modifies the value of a uniform variable or a uniform variable
+%% array. The location of the uniform variable to be modified is specified by `Location' ,
+%% which should be a value returned by {@link gl:getUniformLocation/2} . ``gl:programUniform''
+%% operates on the program object specified by `Program' .
+%%
+%% The commands ``gl:programUniform{1|2|3|4}{f|i|ui}'' are used to change the value of
+%% the uniform variable specified by `Location' using the values passed as arguments.
+%% The number specified in the command should match the number of components in the data
+%% type of the specified uniform variable (e.g., `1' for float, int, unsigned int, bool;
+%% `2' for vec2, ivec2, uvec2, bvec2, etc.). The suffix `f' indicates that floating-point
+%% values are being passed; the suffix `i' indicates that integer values are being passed;
+%% the suffix `ui' indicates that unsigned integer values are being passed, and this
+%% type should also match the data type of the specified uniform variable. The `i' variants
+%% of this function should be used to provide values for uniform variables defined as int, ivec2
+%% , ivec3, ivec4, or arrays of these. The `ui' variants of this function should be
+%% used to provide values for uniform variables defined as unsigned int, uvec2, uvec3, uvec4,
+%% or arrays of these. The `f' variants should be used to provide values for uniform
+%% variables of type float, vec2, vec3, vec4, or arrays of these. Either the `i', `ui'
+%% or `f' variants may be used to provide values for uniform variables of type bool, bvec2
+%% , bvec3, bvec4, or arrays of these. The uniform variable will be set to false if the input
+%% value is 0 or 0.0f, and it will be set to true otherwise.
+%%
+%% All active uniform variables defined in a program object are initialized to 0 when the
+%% program object is linked successfully. They retain the values assigned to them by a call
+%% to ``gl:programUniform'' until the next successful link operation occurs on the program
+%% object, when they are once again initialized to 0.
+%%
+%% The commands ``gl:programUniform{1|2|3|4}{f|i|ui}v'' can be used to modify a single
+%% uniform variable or a uniform variable array. These commands pass a count and a pointer
+%% to the values to be loaded into a uniform variable or a uniform variable array. A count
+%% of 1 should be used if modifying the value of a single uniform variable, and a count of
+%% 1 or greater can be used to modify an entire array or part of an array. When loading `n'
+%% elements starting at an arbitrary position `m' in a uniform variable array, elements
+%% `m' + `n' - 1 in the array will be replaced with the new values. If `M' + `N'
+%% - 1 is larger than the size of the uniform variable array, values for all array elements
+%% beyond the end of the array will be ignored. The number specified in the name of the command
+%% indicates the number of components for each element in `Value' , and it should match
+%% the number of components in the data type of the specified uniform variable (e.g., `1'
+%% for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The data type specified
+%% in the name of the command must match the data type for the specified uniform variable
+%% as described previously for ``gl:programUniform{1|2|3|4}{f|i|ui}''.
+%%
+%% For uniform variable arrays, each element of the array is considered to be of the type
+%% indicated in the name of the command (e.g., ``gl:programUniform3f'' or ``gl:programUniform3fv''
+%% can be used to load a uniform variable array of type vec3). The number of elements of
+%% the uniform variable array to be modified is specified by `Count'
+%%
+%% The commands ``gl:programUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv'' are used
+%% to modify a matrix or an array of matrices. The numbers in the command name are interpreted
+%% as the dimensionality of the matrix. The number `2' indicates a 2 � 2 matrix (i.e.,
+%% 4 values), the number `3' indicates a 3 � 3 matrix (i.e., 9 values), and the number `4'
+%% indicates a 4 � 4 matrix (i.e., 16 values). Non-square matrix dimensionality is explicit,
+%% with the first number representing the number of columns and the second number representing
+%% the number of rows. For example, `2x4' indicates a 2 � 4 matrix with 2 columns and
+%% 4 rows (i.e., 8 values). If `Transpose' is `?GL_FALSE', each matrix is assumed
+%% to be supplied in column major order. If `Transpose' is `?GL_TRUE', each matrix
+%% is assumed to be supplied in row major order. The `Count' argument indicates the
+%% number of matrices to be passed. A count of 1 should be used if modifying the value of
+%% a single matrix, and a count greater than 1 can be used to modify an array of matrices.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
+-spec programUniform1i(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: integer().
programUniform1i(Program,Location,V0) ->
cast(5784, <<Program:?GLuint,Location:?GLint,V0:?GLint>>).
-%% @spec (Program::integer(),Location::integer(),Value::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1iv(integer(),integer(),[integer()]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform1iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [integer()].
programUniform1iv(Program,Location,Value) ->
cast(5785, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLint>> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>).
-%% @spec (Program::integer(),Location::integer(),V0::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1f(integer(),integer(),float()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform1f(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: float().
programUniform1f(Program,Location,V0) ->
cast(5786, <<Program:?GLuint,Location:?GLint,V0:?GLfloat>>).
-%% @spec (Program::integer(),Location::integer(),Value::[float()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1fv(integer(),integer(),[float()]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform1fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [float()].
programUniform1fv(Program,Location,Value) ->
cast(5787, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLfloat>> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>).
-%% @spec (Program::integer(),Location::integer(),V0::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1d(integer(),integer(),float()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform1d(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: float().
programUniform1d(Program,Location,V0) ->
cast(5788, <<Program:?GLuint,Location:?GLint,V0:?GLdouble>>).
-%% @spec (Program::integer(),Location::integer(),Value::[float()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1dv(integer(),integer(),[float()]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform1dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [float()].
programUniform1dv(Program,Location,Value) ->
cast(5789, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,0:32,
(<< <<C:?GLdouble>> || C <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1ui(integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform1ui(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: integer().
programUniform1ui(Program,Location,V0) ->
cast(5790, <<Program:?GLuint,Location:?GLint,V0:?GLuint>>).
-%% @spec (Program::integer(),Location::integer(),Value::[integer()]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1uiv(integer(),integer(),[integer()]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform1uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [integer()].
programUniform1uiv(Program,Location,Value) ->
cast(5791, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLuint>> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>).
-%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform2i(integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform2i(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer().
programUniform2i(Program,Location,V0,V1) ->
cast(5792, <<Program:?GLuint,Location:?GLint,V0:?GLint,V1:?GLint>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform2iv(integer(),integer(),[{integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform2iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer()}].
programUniform2iv(Program,Location,Value) ->
cast(5793, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint>> || {V1,V2} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform2f(integer(),integer(),float(),float()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform2f(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float().
programUniform2f(Program,Location,V0,V1) ->
cast(5794, <<Program:?GLuint,Location:?GLint,V0:?GLfloat,V1:?GLfloat>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform2fv(integer(),integer(),[{float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform2fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float()}].
programUniform2fv(Program,Location,Value) ->
cast(5795, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat>> || {V1,V2} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform2d(integer(),integer(),float(),float()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform2d(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float().
programUniform2d(Program,Location,V0,V1) ->
cast(5796, <<Program:?GLuint,Location:?GLint,V0:?GLdouble,V1:?GLdouble>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform2dv(integer(),integer(),[{float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform2dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float()}].
programUniform2dv(Program,Location,Value) ->
cast(5797, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble>> || {V1,V2} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform2ui(integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform2ui(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer().
programUniform2ui(Program,Location,V0,V1) ->
cast(5798, <<Program:?GLuint,Location:?GLint,V0:?GLuint,V1:?GLuint>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform2uiv(integer(),integer(),[{integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform2uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer()}].
programUniform2uiv(Program,Location,Value) ->
cast(5799, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint>> || {V1,V2} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform3i(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform3i(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
programUniform3i(Program,Location,V0,V1,V2) ->
cast(5800, <<Program:?GLuint,Location:?GLint,V0:?GLint,V1:?GLint,V2:?GLint>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform3iv(integer(),integer(),[{integer(),integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform3iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer()}].
programUniform3iv(Program,Location,Value) ->
cast(5801, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint>> || {V1,V2,V3} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float(),V2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform3f(integer(),integer(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform3f(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
programUniform3f(Program,Location,V0,V1,V2) ->
cast(5802, <<Program:?GLuint,Location:?GLint,V0:?GLfloat,V1:?GLfloat,V2:?GLfloat>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform3fv(integer(),integer(),[{float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform3fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float()}].
programUniform3fv(Program,Location,Value) ->
cast(5803, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat>> || {V1,V2,V3} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float(),V2::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform3d(integer(),integer(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform3d(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
programUniform3d(Program,Location,V0,V1,V2) ->
cast(5804, <<Program:?GLuint,Location:?GLint,V0:?GLdouble,V1:?GLdouble,V2:?GLdouble>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform3dv(integer(),integer(),[{float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform3dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float()}].
programUniform3dv(Program,Location,Value) ->
cast(5805, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble>> || {V1,V2,V3} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform3ui(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform3ui(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
programUniform3ui(Program,Location,V0,V1,V2) ->
cast(5806, <<Program:?GLuint,Location:?GLint,V0:?GLuint,V1:?GLuint,V2:?GLuint>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform3uiv(integer(),integer(),[{integer(),integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform3uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer()}].
programUniform3uiv(Program,Location,Value) ->
cast(5807, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint,V3:?GLuint>> || {V1,V2,V3} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform4i(integer(),integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform4i(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
programUniform4i(Program,Location,V0,V1,V2,V3) ->
cast(5808, <<Program:?GLuint,Location:?GLint,V0:?GLint,V1:?GLint,V2:?GLint,V3:?GLint>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform4iv(integer(),integer(),[{integer(),integer(),integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform4iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
programUniform4iv(Program,Location,Value) ->
cast(5809, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float(),V2::float(),V3::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform4f(integer(),integer(),float(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform4f(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
programUniform4f(Program,Location,V0,V1,V2,V3) ->
cast(5810, <<Program:?GLuint,Location:?GLint,V0:?GLfloat,V1:?GLfloat,V2:?GLfloat,V3:?GLfloat>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform4fv(integer(),integer(),[{float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform4fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float(),float()}].
programUniform4fv(Program,Location,Value) ->
cast(5811, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float(),V2::float(),V3::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform4d(integer(),integer(),float(),float(),float(),float()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform4d(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
programUniform4d(Program,Location,V0,V1,V2,V3) ->
cast(5812, <<Program:?GLuint,Location:?GLint,V0:?GLdouble,V1:?GLdouble,V2:?GLdouble,V3:?GLdouble>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform4dv(integer(),integer(),[{float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform4dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float(),float()}].
programUniform4dv(Program,Location,Value) ->
cast(5813, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform4ui(integer(),integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform4ui(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
programUniform4ui(Program,Location,V0,V1,V2,V3) ->
cast(5814, <<Program:?GLuint,Location:?GLint,V0:?GLuint,V1:?GLuint,V2:?GLuint,V3:?GLuint>>).
-%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform4uiv(integer(),integer(),[{integer(),integer(),integer(),integer()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniform4uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
programUniform4uiv(Program,Location,Value) ->
cast(5815, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint,V3:?GLuint,V4:?GLuint>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix.xml">external</a> documentation.
--spec programUniformMatrix2fv(integer(),integer(),0|1,[{float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
programUniformMatrix2fv(Program,Location,Transpose,Value) ->
cast(5816, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix.xml">external</a> documentation.
--spec programUniformMatrix3fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix3fv(Program,Location,Transpose,Value) ->
cast(5817, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix.xml">external</a> documentation.
--spec programUniformMatrix4fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4fv(Program,Location,Transpose,Value) ->
cast(5818, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat,V13:?GLfloat,V14:?GLfloat,V15:?GLfloat,V16:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix.xml">external</a> documentation.
--spec programUniformMatrix2dv(integer(),integer(),0|1,[{float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
programUniformMatrix2dv(Program,Location,Transpose,Value) ->
cast(5819, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix.xml">external</a> documentation.
--spec programUniformMatrix3dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix3dv(Program,Location,Transpose,Value) ->
cast(5820, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix.xml">external</a> documentation.
--spec programUniformMatrix4dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4dv(Program,Location,Transpose,Value) ->
cast(5821, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble,V13:?GLdouble,V14:?GLdouble,V15:?GLdouble,V16:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix2x.xml">external</a> documentation.
--spec programUniformMatrix2x3fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix2x3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
programUniformMatrix2x3fv(Program,Location,Transpose,Value) ->
cast(5822, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix3x.xml">external</a> documentation.
--spec programUniformMatrix3x2fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix3x2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
programUniformMatrix3x2fv(Program,Location,Transpose,Value) ->
cast(5823, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix2x.xml">external</a> documentation.
--spec programUniformMatrix2x4fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix2x4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix2x4fv(Program,Location,Transpose,Value) ->
cast(5824, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix4x.xml">external</a> documentation.
--spec programUniformMatrix4x2fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix4x2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4x2fv(Program,Location,Transpose,Value) ->
cast(5825, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix3x.xml">external</a> documentation.
--spec programUniformMatrix3x4fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix3x4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix3x4fv(Program,Location,Transpose,Value) ->
cast(5826, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix4x.xml">external</a> documentation.
--spec programUniformMatrix4x3fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix4x3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4x3fv(Program,Location,Transpose,Value) ->
cast(5827, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix2x.xml">external</a> documentation.
--spec programUniformMatrix2x3dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix2x3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
programUniformMatrix2x3dv(Program,Location,Transpose,Value) ->
cast(5828, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix3x.xml">external</a> documentation.
--spec programUniformMatrix3x2dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix3x2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
programUniformMatrix3x2dv(Program,Location,Transpose,Value) ->
cast(5829, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix2x.xml">external</a> documentation.
--spec programUniformMatrix2x4dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix2x4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix2x4dv(Program,Location,Transpose,Value) ->
cast(5830, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix4x.xml">external</a> documentation.
--spec programUniformMatrix4x2dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix4x2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4x2dv(Program,Location,Transpose,Value) ->
cast(5831, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix3x.xml">external</a> documentation.
--spec programUniformMatrix3x4dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix3x4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix3x4dv(Program,Location,Transpose,Value) ->
cast(5832, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
-%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniformMatrix4x.xml">external</a> documentation.
--spec programUniformMatrix4x3dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok.
+%% @doc
+%% See {@link programUniform1i/3}
+-spec programUniformMatrix4x3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4x3dv(Program,Location,Transpose,Value) ->
cast(5833, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
-%% @spec (Pipeline::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgramPipeline.xml">external</a> documentation.
--spec validateProgramPipeline(integer()) -> ok.
+%% @doc Validate a program pipeline object against current GL state
+%%
+%% ``gl:validateProgramPipeline'' instructs the implementation to validate the shader executables
+%% contained in `Pipeline' against the current GL state. The implementation may use
+%% this as an opportunity to perform any internal shader modifications that may be required
+%% to ensure correct operation of the installed shaders given the current GL state.
+%%
+%% After a program pipeline has been validated, its validation status is set to `?GL_TRUE'
+%% . The validation status of a program pipeline object may be queried by calling {@link gl:getProgramPipelineiv/2}
+%% with parameter `?GL_VALIDATE_STATUS'.
+%%
+%% If `Pipeline' is a name previously returned from a call to {@link gl:genProgramPipelines/1}
+%% but that has not yet been bound by a call to {@link gl:bindProgramPipeline/1} , a new program
+%% pipeline object is created with name `Pipeline' and the default state vector.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgramPipeline.xml">external</a> documentation.
+-spec validateProgramPipeline(Pipeline) -> ok when Pipeline :: integer().
validateProgramPipeline(Pipeline) ->
cast(5834, <<Pipeline:?GLuint>>).
-%% @spec (Pipeline::integer(),BufSize::integer()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramPipelineInfoLog.xml">external</a> documentation.
--spec getProgramPipelineInfoLog(integer(),integer()) -> string().
+%% @doc Retrieve the info log string from a program pipeline object
+%%
+%% ``gl:getProgramPipelineInfoLog'' retrieves the info log for the program pipeline object
+%% `Pipeline' . The info log, including its null terminator, is written into the array
+%% of characters whose address is given by `InfoLog' . The maximum number of characters
+%% that may be written into `InfoLog' is given by `BufSize' , and the actual number
+%% of characters written into `InfoLog' is returned in the integer whose address is
+%% given by `Length' . If `Length' is `?NULL', no length is returned.
+%%
+%% The actual length of the info log for the program pipeline may be determined by calling {@link gl:getProgramPipelineiv/2}
+%% with `Pname' set to `?GL_INFO_LOG_LENGTH'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramPipelineInfoLog.xml">external</a> documentation.
+-spec getProgramPipelineInfoLog(Pipeline, BufSize) -> string() when Pipeline :: integer(),BufSize :: integer().
getProgramPipelineInfoLog(Pipeline,BufSize) ->
call(5835, <<Pipeline:?GLuint,BufSize:?GLsizei>>).
-%% @spec (Index::integer(),X::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
--spec vertexAttribL1d(integer(),float()) -> ok.
+%% @doc glVertexAttribL
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
+-spec vertexAttribL1d(Index, X) -> ok when Index :: integer(),X :: float().
vertexAttribL1d(Index,X) ->
cast(5836, <<Index:?GLuint,0:32,X:?GLdouble>>).
-%% @spec (Index::integer(),X::float(),Y::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
--spec vertexAttribL2d(integer(),float(),float()) -> ok.
+%% @doc glVertexAttribL
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
+-spec vertexAttribL2d(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float().
vertexAttribL2d(Index,X,Y) ->
cast(5837, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble>>).
-%% @spec (Index::integer(),X::float(),Y::float(),Z::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
--spec vertexAttribL3d(integer(),float(),float(),float()) -> ok.
+%% @doc glVertexAttribL
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
+-spec vertexAttribL3d(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float().
vertexAttribL3d(Index,X,Y,Z) ->
cast(5838, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
-%% @spec (Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
--spec vertexAttribL4d(integer(),float(),float(),float(),float()) -> ok.
+%% @doc glVertexAttribL
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
+-spec vertexAttribL4d(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
vertexAttribL4d(Index,X,Y,Z,W) ->
cast(5839, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
-%% @spec (Index,{X}) -> ok
%% @equiv vertexAttribL1d(Index,X)
--spec vertexAttribL1dv(integer(),{float()}) -> ok.
+-spec vertexAttribL1dv(Index :: integer(),V) -> ok when V :: {X :: float()}.
vertexAttribL1dv(Index,{X}) -> vertexAttribL1d(Index,X).
-%% @spec (Index,{X,Y}) -> ok
%% @equiv vertexAttribL2d(Index,X,Y)
--spec vertexAttribL2dv(integer(),{float(),float()}) -> ok.
+-spec vertexAttribL2dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}.
vertexAttribL2dv(Index,{X,Y}) -> vertexAttribL2d(Index,X,Y).
-%% @spec (Index,{X,Y,Z}) -> ok
%% @equiv vertexAttribL3d(Index,X,Y,Z)
--spec vertexAttribL3dv(integer(),{float(),float(),float()}) -> ok.
+-spec vertexAttribL3dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
vertexAttribL3dv(Index,{X,Y,Z}) -> vertexAttribL3d(Index,X,Y,Z).
-%% @spec (Index,{X,Y,Z,W}) -> ok
%% @equiv vertexAttribL4d(Index,X,Y,Z,W)
--spec vertexAttribL4dv(integer(),{float(),float(),float(),float()}) -> ok.
+-spec vertexAttribL4dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertexAttribL4dv(Index,{X,Y,Z,W}) -> vertexAttribL4d(Index,X,Y,Z,W).
-%% @spec (Index::integer(),Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribLPointer.xml">external</a> documentation.
--spec vertexAttribLPointer(integer(),integer(),enum(),integer(),offset()|mem()) -> ok.
+%% @doc glVertexAttribLPointer
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribLPointer.xml">external</a> documentation.
+-spec vertexAttribLPointer(Index, Size, Type, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
vertexAttribLPointer(Index,Size,Type,Stride,Pointer) when is_integer(Pointer) ->
cast(5840, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
vertexAttribLPointer(Index,Size,Type,Stride,Pointer) ->
send_bin(Pointer),
cast(5841, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Stride:?GLsizei>>).
-%% @spec (Index::integer(),Pname::enum()) -> {float(),float(),float(),float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttribL.xml">external</a> documentation.
--spec getVertexAttribLdv(integer(),enum()) -> {float(),float(),float(),float()}.
+%% @doc glGetVertexAttribL
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetVertexAttribL.xml">external</a> documentation.
+-spec getVertexAttribLdv(Index, Pname) -> {float(),float(),float(),float()} when Index :: integer(),Pname :: enum().
getVertexAttribLdv(Index,Pname) ->
call(5842, <<Index:?GLuint,Pname:?GLenum>>).
-%% @spec (First::integer(),V::[{float(),float(),float(),float()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewportArrayv.xml">external</a> documentation.
--spec viewportArrayv(integer(),[{float(),float(),float(),float()}]) -> ok.
+%% @doc glViewportArrayv
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewportArrayv.xml">external</a> documentation.
+-spec viewportArrayv(First, V) -> ok when First :: integer(),V :: [{float(),float(),float(),float()}].
viewportArrayv(First,V) ->
cast(5843, <<First:?GLuint,(length(V)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- V>>)/binary>>).
-%% @spec (Index::integer(),X::float(),Y::float(),W::float(),H::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewportIndexed.xml">external</a> documentation.
--spec viewportIndexedf(integer(),float(),float(),float(),float()) -> ok.
+%% @doc Set a specified viewport
+%%
+%% ``gl:viewportIndexedf'' and ``gl:viewportIndexedfv'' specify the parameters for a
+%% single viewport. `Index' specifies the index of the viewport to modify. `Index'
+%% must be less than the value of `?GL_MAX_VIEWPORTS'. For ``gl:viewportIndexedf'', `X'
+%% , `Y' , `W' , and `H' specify the left, bottom, width and height of the viewport
+%% in pixels, respectively. For ``gl:viewportIndexedfv'', `V' contains the address
+%% of an array of floating point values specifying the left ( x), bottom ( y), width ( w),
+%% and height ( h) of each viewport, in that order. x and y give the location of the viewport's
+%% lower left corner, and w and h give the width and height of the viewport, respectively.
+%% The viewport specifies the affine transformation of x and y from normalized device
+%% coordinates to window coordinates. Let (x nd y nd) be normalized device coordinates. Then the window
+%% coordinates (x w y w) are computed as follows:
+%%
+%% x w=(x nd+1) (width/2)+x
+%%
+%% y w=(y nd+1) (height/2)+y
+%%
+%% The location of the viewport's bottom left corner, given by ( x, y) is clamped to be
+%% within the implementaiton-dependent viewport bounds range. The viewport bounds range [
+%% min, max] can be determined by calling {@link gl:getBooleanv/1} with argument `?GL_VIEWPORT_BOUNDS_RANGE'
+%% . Viewport width and height are silently clamped to a range that depends on the implementation.
+%% To query this range, call {@link gl:getBooleanv/1} with argument `?GL_MAX_VIEWPORT_DIMS'.
+%%
+%% The precision with which the GL interprets the floating point viewport bounds is implementation-dependent
+%% and may be determined by querying the impementation-defined constant `?GL_VIEWPORT_SUBPIXEL_BITS'
+%% .
+%%
+%% Calling ``gl:viewportIndexedfv'' is equivalent to calling see `glViewportArray'
+%% with `First' set to `Index' , `Count' set to 1 and `V' passsed directly.
+%% ``gl:viewportIndexedf'' is equivalent to: void glViewportIndexedf(GLuint index, GLfloat
+%% x, GLfloat y, GLfloat w, GLfloat h) { const float v[4] = { x, y, w, h }; glViewportArrayv(index,
+%% 1, v); }
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewportIndexed.xml">external</a> documentation.
+-spec viewportIndexedf(Index, X, Y, W, H) -> ok when Index :: integer(),X :: float(),Y :: float(),W :: float(),H :: float().
viewportIndexedf(Index,X,Y,W,H) ->
cast(5844, <<Index:?GLuint,X:?GLfloat,Y:?GLfloat,W:?GLfloat,H:?GLfloat>>).
-%% @spec (Index::integer(),V::{float(),float(),float(),float()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewportIndexed.xml">external</a> documentation.
--spec viewportIndexedfv(integer(),{float(),float(),float(),float()}) -> ok.
+%% @doc
+%% See {@link viewportIndexedf/5}
+-spec viewportIndexedfv(Index, V) -> ok when Index :: integer(),V :: {float(),float(),float(),float()}.
viewportIndexedfv(Index,{V1,V2,V3,V4}) ->
cast(5845, <<Index:?GLuint,V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>>).
-%% @spec (First::integer(),V::[{integer(),integer(),integer(),integer()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorArrayv.xml">external</a> documentation.
--spec scissorArrayv(integer(),[{integer(),integer(),integer(),integer()}]) -> ok.
+%% @doc glScissorArrayv
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorArrayv.xml">external</a> documentation.
+-spec scissorArrayv(First, V) -> ok when First :: integer(),V :: [{integer(),integer(),integer(),integer()}].
scissorArrayv(First,V) ->
cast(5846, <<First:?GLuint,(length(V)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>> || {V1,V2,V3,V4} <- V>>)/binary>>).
-%% @spec (Index::integer(),Left::integer(),Bottom::integer(),Width::integer(),Height::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorIndexe.xml">external</a> documentation.
--spec scissorIndexed(integer(),integer(),integer(),integer(),integer()) -> ok.
+%% @doc glScissorIndexe
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorIndexe.xml">external</a> documentation.
+-spec scissorIndexed(Index, Left, Bottom, Width, Height) -> ok when Index :: integer(),Left :: integer(),Bottom :: integer(),Width :: integer(),Height :: integer().
scissorIndexed(Index,Left,Bottom,Width,Height) ->
cast(5847, <<Index:?GLuint,Left:?GLint,Bottom:?GLint,Width:?GLsizei,Height:?GLsizei>>).
-%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorIndexe.xml">external</a> documentation.
--spec scissorIndexedv(integer(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc glScissorIndexe
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorIndexe.xml">external</a> documentation.
+-spec scissorIndexedv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
scissorIndexedv(Index,{V1,V2,V3,V4}) ->
cast(5848, <<Index:?GLuint,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
-%% @spec (First::integer(),V::[{clamp(),clamp()}]) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRangeArrayv.xml">external</a> documentation.
--spec depthRangeArrayv(integer(),[{clamp(),clamp()}]) -> ok.
+%% @doc glDepthRangeArrayv
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRangeArrayv.xml">external</a> documentation.
+-spec depthRangeArrayv(First, V) -> ok when First :: integer(),V :: [{clamp(),clamp()}].
depthRangeArrayv(First,V) ->
cast(5849, <<First:?GLuint,0:32,(length(V)):?GLuint,0:32,
(<< <<V1:?GLclampd,V2:?GLclampd>> || {V1,V2} <- V>>)/binary>>).
-%% @spec (Index::integer(),N::clamp(),F::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRangeIndexe.xml">external</a> documentation.
--spec depthRangeIndexed(integer(),clamp(),clamp()) -> ok.
+%% @doc glDepthRangeIndexe
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRangeIndexe.xml">external</a> documentation.
+-spec depthRangeIndexed(Index, N, F) -> ok when Index :: integer(),N :: clamp(),F :: clamp().
depthRangeIndexed(Index,N,F) ->
cast(5850, <<Index:?GLuint,0:32,N:?GLclampd,F:?GLclampd>>).
-%% @spec (Target::enum(),Index::integer()) -> [float()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetFloati_v.xml">external</a> documentation.
--spec getFloati_v(enum(),integer()) -> [float()].
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getFloati_v(Target, Index) -> [float()] when Target :: enum(),Index :: integer().
getFloati_v(Target,Index) ->
call(5851, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Target::enum(),Index::integer()) -> [float()]
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetDoublei_v.xml">external</a> documentation.
--spec getDoublei_v(enum(),integer()) -> [float()].
+%% @doc
+%% See {@link getBooleanv/1}
+-spec getDoublei_v(Target, Index) -> [float()] when Target :: enum(),Index :: integer().
getDoublei_v(Target,Index) ->
call(5852, <<Target:?GLenum,Index:?GLuint>>).
-%% @spec (Source::enum(),Type::enum(),Severity::enum(),Ids::[integer()],Enabled::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDebugMessageControlARB.xml">external</a> documentation.
--spec debugMessageControlARB(enum(),enum(),enum(),[integer()],0|1) -> ok.
+%% @doc glDebugMessageControlARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDebugMessageControlARB.xml">external</a> documentation.
+-spec debugMessageControlARB(Source, Type, Severity, Ids, Enabled) -> ok when Source :: enum(),Type :: enum(),Severity :: enum(),Ids :: [integer()],Enabled :: 0|1.
debugMessageControlARB(Source,Type,Severity,Ids,Enabled) ->
cast(5853, <<Source:?GLenum,Type:?GLenum,Severity:?GLenum,(length(Ids)):?GLuint,
(<< <<C:?GLuint>> || C <- Ids>>)/binary,0:(((length(Ids)) rem 2)*32),Enabled:?GLboolean>>).
-%% @spec (Source::enum(),Type::enum(),Id::integer(),Severity::enum(),Buf::string()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDebugMessageInsertARB.xml">external</a> documentation.
--spec debugMessageInsertARB(enum(),enum(),integer(),enum(),string()) -> ok.
+%% @doc glDebugMessageInsertARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDebugMessageInsertARB.xml">external</a> documentation.
+-spec debugMessageInsertARB(Source, Type, Id, Severity, Buf) -> ok when Source :: enum(),Type :: enum(),Id :: integer(),Severity :: enum(),Buf :: string().
debugMessageInsertARB(Source,Type,Id,Severity,Buf) ->
cast(5854, <<Source:?GLenum,Type:?GLenum,Id:?GLuint,Severity:?GLenum,(list_to_binary([Buf|[0]]))/binary,0:((8-((length(Buf)+ 1) rem 8)) rem 8)>>).
-%% @spec (Count::integer(),Bufsize::integer()) -> {integer(),Sources::[enum()],Types::[enum()],Ids::[integer()],Severities::[enum()],MessageLog::[string()]}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetDebugMessageLogARB.xml">external</a> documentation.
--spec getDebugMessageLogARB(integer(),integer()) -> {integer(),[enum()],[enum()],[integer()],[enum()],[string()]}.
+%% @doc glGetDebugMessageLogARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetDebugMessageLogARB.xml">external</a> documentation.
+-spec getDebugMessageLogARB(Count, Bufsize) -> {integer(),Sources :: [enum()],Types :: [enum()],Ids :: [integer()],Severities :: [enum()],MessageLog :: [string()]} when Count :: integer(),Bufsize :: integer().
getDebugMessageLogARB(Count,Bufsize) ->
call(5855, <<Count:?GLuint,Bufsize:?GLsizei>>).
-%% @spec () -> enum()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetGraphicsResetStatusARB.xml">external</a> documentation.
+%% @doc glGetGraphicsResetStatusARB
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetGraphicsResetStatusARB.xml">external</a> documentation.
-spec getGraphicsResetStatusARB() -> enum().
getGraphicsResetStatusARB() ->
call(5856, <<>>).
-%% @spec () -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResizeBuffersMESA.xml">external</a> documentation.
--spec resizeBuffersMESA() -> ok.
-resizeBuffersMESA() ->
- cast(5857, <<>>).
-
-%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos4dMESA.xml">external</a> documentation.
--spec windowPos4dMESA(float(),float(),float(),float()) -> ok.
-windowPos4dMESA(X,Y,Z,W) ->
- cast(5858, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
-
-%% @spec ({X,Y,Z,W}) -> ok
-%% @equiv windowPos4dMESA(X,Y,Z,W)
--spec windowPos4dvMESA({float(),float(),float(),float()}) -> ok.
-windowPos4dvMESA({X,Y,Z,W}) -> windowPos4dMESA(X,Y,Z,W).
-
-%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos4fMESA.xml">external</a> documentation.
--spec windowPos4fMESA(float(),float(),float(),float()) -> ok.
-windowPos4fMESA(X,Y,Z,W) ->
- cast(5859, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
-
-%% @spec ({X,Y,Z,W}) -> ok
-%% @equiv windowPos4fMESA(X,Y,Z,W)
--spec windowPos4fvMESA({float(),float(),float(),float()}) -> ok.
-windowPos4fvMESA({X,Y,Z,W}) -> windowPos4fMESA(X,Y,Z,W).
-
-%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos4iMESA.xml">external</a> documentation.
--spec windowPos4iMESA(integer(),integer(),integer(),integer()) -> ok.
-windowPos4iMESA(X,Y,Z,W) ->
- cast(5860, <<X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
-
-%% @spec ({X,Y,Z,W}) -> ok
-%% @equiv windowPos4iMESA(X,Y,Z,W)
--spec windowPos4ivMESA({integer(),integer(),integer(),integer()}) -> ok.
-windowPos4ivMESA({X,Y,Z,W}) -> windowPos4iMESA(X,Y,Z,W).
-
-%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos4sMESA.xml">external</a> documentation.
--spec windowPos4sMESA(integer(),integer(),integer(),integer()) -> ok.
-windowPos4sMESA(X,Y,Z,W) ->
- cast(5861, <<X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
-
-%% @spec ({X,Y,Z,W}) -> ok
-%% @equiv windowPos4sMESA(X,Y,Z,W)
--spec windowPos4svMESA({integer(),integer(),integer(),integer()}) -> ok.
-windowPos4svMESA({X,Y,Z,W}) -> windowPos4sMESA(X,Y,Z,W).
-
-%% @spec (Zmin::clamp(),Zmax::clamp()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthBoundsEXT.xml">external</a> documentation.
--spec depthBoundsEXT(clamp(),clamp()) -> ok.
+%% @doc Draw multiple instances of a range of elements with offset applied to instanced attributes
+%%
+%% ``gl:drawArraysInstancedBaseInstance'' behaves identically to {@link gl:drawArrays/3}
+%% except that `Primcount' instances of the range of elements are executed and the value
+%% of the internal counter `InstanceID' advances for each iteration. `InstanceID'
+%% is an internal 32-bit integer counter that may be read by a vertex shader as `?gl_InstanceID'
+%% .
+%%
+%% ``gl:drawArraysInstancedBaseInstance'' has the same effect as: if ( mode or count is
+%% invalid ) generate appropriate error else { for (int i = 0; i &lt; primcount ; i++) {
+%% instanceID = i; glDrawArrays(mode, first, count); } instanceID = 0; }
+%%
+%% Specific vertex attributes may be classified as `instanced' through the use of {@link gl:vertexAttribDivisor/2}
+%% . Instanced vertex attributes supply per-instance vertex data to the vertex shader. The
+%% index of the vertex fetched from the enabled instanced vertex attribute arrays is calculated
+%% as: |gl_ InstanceID/divisor|&amp;plus; baseInstance. Note that `Baseinstance' does not affect the shader-visible
+%% value of `?gl_InstanceID'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArraysInstancedBaseInstance.xml">external</a> documentation.
+-spec drawArraysInstancedBaseInstance(Mode, First, Count, Primcount, Baseinstance) -> ok when Mode :: enum(),First :: integer(),Count :: integer(),Primcount :: integer(),Baseinstance :: integer().
+drawArraysInstancedBaseInstance(Mode,First,Count,Primcount,Baseinstance) ->
+ cast(5857, <<Mode:?GLenum,First:?GLint,Count:?GLsizei,Primcount:?GLsizei,Baseinstance:?GLuint>>).
+
+%% @doc Draw multiple instances of a set of elements with offset applied to instanced attributes
+%%
+%% ``gl:drawElementsInstancedBaseInstance'' behaves identically to {@link gl:drawElements/4}
+%% except that `Primcount' instances of the set of elements are executed and the value
+%% of the internal counter `InstanceID' advances for each iteration. `InstanceID'
+%% is an internal 32-bit integer counter that may be read by a vertex shader as `?gl_InstanceID'
+%% .
+%%
+%% ``gl:drawElementsInstancedBaseInstance'' has the same effect as: if (mode, count, or
+%% type is invalid ) generate appropriate error else { for (int i = 0; i &lt; primcount ;
+%% i++) { instanceID = i; glDrawElements(mode, count, type, indices); } instanceID = 0; }
+%%
+%% Specific vertex attributes may be classified as `instanced' through the use of {@link gl:vertexAttribDivisor/2}
+%% . Instanced vertex attributes supply per-instance vertex data to the vertex shader. The
+%% index of the vertex fetched from the enabled instanced vertex attribute arrays is calculated
+%% as |gl_ InstanceID/divisor|&amp;plus; baseInstance. Note that `Baseinstance' does not affect the shader-visible
+%% value of `?gl_InstanceID'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstancedBaseInstance.xml">external</a> documentation.
+-spec drawElementsInstancedBaseInstance(Mode, Count, Type, Indices, Primcount, Baseinstance) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Baseinstance :: integer().
+drawElementsInstancedBaseInstance(Mode,Count,Type,Indices,Primcount,Baseinstance) when is_integer(Indices) ->
+ cast(5858, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Primcount:?GLsizei,Baseinstance:?GLuint>>);
+drawElementsInstancedBaseInstance(Mode,Count,Type,Indices,Primcount,Baseinstance) ->
+ send_bin(Indices),
+ cast(5859, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Primcount:?GLsizei,Baseinstance:?GLuint>>).
+
+%% @doc Render multiple instances of a set of primitives from array data with a per-element offset
+%%
+%% ``gl:drawElementsInstancedBaseVertexBaseInstance'' behaves identically to {@link gl:drawElementsInstanced/5}
+%% except that the `i'th element transferred by the corresponding draw call will be
+%% taken from element `Indices' [i] + `Basevertex' of each enabled array. If the
+%% resulting value is larger than the maximum value representable by `Type' , it is as
+%% if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow
+%% conditions). The operation is undefined if the sum would be negative. The `Basevertex'
+%% has no effect on the shader-visible value of `?gl_VertexID'.
+%%
+%% Specific vertex attributes may be classified as `instanced' through the use of {@link gl:vertexAttribDivisor/2}
+%% . Instanced vertex attributes supply per-instance vertex data to the vertex shader. The
+%% index of the vertex fetched from the enabled instanced vertex attribute arrays is calculated
+%% as |gl_ InstanceID/divisor|&amp;plus; baseInstance. Note that `Baseinstance' does not affect the shader-visible
+%% value of `?gl_InstanceID'.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstancedBaseVertexBaseInstance.xml">external</a> documentation.
+-spec drawElementsInstancedBaseVertexBaseInstance(Mode, Count, Type, Indices, Primcount, Basevertex, Baseinstance) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Basevertex :: integer(),Baseinstance :: integer().
+drawElementsInstancedBaseVertexBaseInstance(Mode,Count,Type,Indices,Primcount,Basevertex,Baseinstance) when is_integer(Indices) ->
+ cast(5860, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Primcount:?GLsizei,Basevertex:?GLint,Baseinstance:?GLuint>>);
+drawElementsInstancedBaseVertexBaseInstance(Mode,Count,Type,Indices,Primcount,Basevertex,Baseinstance) ->
+ send_bin(Indices),
+ cast(5861, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Primcount:?GLsizei,Basevertex:?GLint,Baseinstance:?GLuint>>).
+
+%% @doc glDrawTransformFeedbackInstance
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedbackInstance.xml">external</a> documentation.
+-spec drawTransformFeedbackInstanced(Mode, Id, Primcount) -> ok when Mode :: enum(),Id :: integer(),Primcount :: integer().
+drawTransformFeedbackInstanced(Mode,Id,Primcount) ->
+ cast(5862, <<Mode:?GLenum,Id:?GLuint,Primcount:?GLsizei>>).
+
+%% @doc glDrawTransformFeedbackStreamInstance
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedbackStreamInstance.xml">external</a> documentation.
+-spec drawTransformFeedbackStreamInstanced(Mode, Id, Stream, Primcount) -> ok when Mode :: enum(),Id :: integer(),Stream :: integer(),Primcount :: integer().
+drawTransformFeedbackStreamInstanced(Mode,Id,Stream,Primcount) ->
+ cast(5863, <<Mode:?GLenum,Id:?GLuint,Stream:?GLuint,Primcount:?GLsizei>>).
+
+%% @doc glGetInternalformat
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetInternalformat.xml">external</a> documentation.
+-spec getInternalformativ(Target, Internalformat, Pname, BufSize) -> [integer()] when Target :: enum(),Internalformat :: enum(),Pname :: enum(),BufSize :: integer().
+getInternalformativ(Target,Internalformat,Pname,BufSize) ->
+ call(5864, <<Target:?GLenum,Internalformat:?GLenum,Pname:?GLenum,BufSize:?GLsizei>>).
+
+%% @doc Bind a level of a texture to an image unit
+%%
+%% ``gl:bindImageTexture'' binds a single level of a texture to an image unit for the purpose
+%% of reading and writing it from shaders. `Unit' specifies the zero-based index of
+%% the image unit to which to bind the texture level. `Texture' specifies the name of
+%% an existing texture object to bind to the image unit. If `Texture' is zero, then
+%% any existing binding to the image unit is broken. `Level' specifies the level of
+%% the texture to bind to the image unit.
+%%
+%% If `Texture' is the name of a one-, two-, or three-dimensional array texture, a
+%% cube map or cube map array texture, or a two-dimensional multisample array texture, then
+%% it is possible to bind either the entire array, or only a single layer of the array to
+%% the image unit. In such cases, if `Layered' is `?GL_TRUE', the entire array
+%% is attached to the image unit and `Layer' is ignored. However, if `Layered' is `?GL_FALSE'
+%% then `Layer' specifies the layer of the array to attach to the image unit.
+%%
+%% `Access' specifies the access types to be performed by shaders and may be set to `?GL_READ_ONLY'
+%% , `?GL_WRITE_ONLY', or `?GL_READ_WRITE' to indicate read-only, write-only or
+%% read-write access, respectively. Violation of the access type specified in `Access'
+%% (for example, if a shader writes to an image bound with `Access' set to `?GL_READ_ONLY'
+%% ) will lead to undefined results, possibly including program termination.
+%%
+%% `Format' specifies the format that is to be used when performing formatted stores
+%% into the image from shaders. `Format' must be compatible with the texture's internal
+%% format and must be one of the formats listed in the following table.
+%%
+%% <table><tbody><tr><td>` Image Unit Format '</td><td>` Format Qualifier '</td></tr>
+%% </tbody><tbody><tr><td>`?GL_RGBA32F'</td><td>rgba32f</td></tr><tr><td>`?GL_RGBA16F'
+%% </td><td>rgba16f</td></tr><tr><td>`?GL_RG32F'</td><td>rg32f</td></tr><tr><td>`?GL_RG16F'
+%% </td><td>rg16f</td></tr><tr><td>`?GL_R11F_G11F_B10F'</td><td>r11f_g11f_b10f</td></tr>
+%% <tr><td>`?GL_R32F'</td><td>r32f</td></tr><tr><td>`?GL_R16F'</td><td>r16f</td></tr>
+%% <tr><td>`?GL_RGBA32UI'</td><td>rgba32ui</td></tr><tr><td>`?GL_RGBA16UI'</td><td>
+%% rgba16ui</td></tr><tr><td>`?GL_RGB10_A2UI'</td><td>rgb10_a2ui</td></tr><tr><td>`?GL_RGBA8UI'
+%% </td><td>rgba8ui</td></tr><tr><td>`?GL_RG32UI'</td><td>rg32ui</td></tr><tr><td>`?GL_RG16UI'
+%% </td><td>rg16ui</td></tr><tr><td>`?GL_RG8UI'</td><td>rg8ui</td></tr><tr><td>`?GL_R32UI'
+%% </td><td>r32ui</td></tr><tr><td>`?GL_R16UI'</td><td>r16ui</td></tr><tr><td>`?GL_R8UI'
+%% </td><td>r8ui</td></tr><tr><td>`?GL_RGBA32I'</td><td>rgba32i</td></tr><tr><td>`?GL_RGBA16I'
+%% </td><td>rgba16i</td></tr><tr><td>`?GL_RGBA8I'</td><td>rgba8i</td></tr><tr><td>`?GL_RG32I'
+%% </td><td>rg32i</td></tr><tr><td>`?GL_RG16I'</td><td>rg16i</td></tr><tr><td>`?GL_RG8I'
+%% </td><td>rg8i</td></tr><tr><td>`?GL_R32I'</td><td>r32i</td></tr><tr><td>`?GL_R16I'
+%% </td><td>r16i</td></tr><tr><td>`?GL_R8I'</td><td>r8i</td></tr><tr><td>`?GL_RGBA16'
+%% </td><td>rgba16</td></tr><tr><td>`?GL_RGB10_A2'</td><td>rgb10_a2</td></tr><tr><td>`?GL_RGBA8'
+%% </td><td>rgba8</td></tr><tr><td>`?GL_RG16'</td><td>rg16</td></tr><tr><td>`?GL_RG8'
+%% </td><td>rg8</td></tr><tr><td>`?GL_R16'</td><td>r16</td></tr><tr><td>`?GL_R8'</td>
+%% <td>r8</td></tr><tr><td>`?GL_RGBA16_SNORM'</td><td>rgba16_snorm</td></tr><tr><td>`?GL_RGBA8_SNORM'
+%% </td><td>rgba8_snorm</td></tr><tr><td>`?GL_RG16_SNORM'</td><td>rg16_snorm</td></tr><tr>
+%% <td>`?GL_RG8_SNORM'</td><td>rg8_snorm</td></tr><tr><td>`?GL_R16_SNORM'</td><td>r16_snorm
+%% </td></tr><tr><td>`?GL_R8_SNORM'</td><td>r8_snorm</td></tr></tbody></table>
+%%
+%% When a texture is bound to an image unit, the `Format' parameter for the image unit
+%% need not exactly match the texture internal format as long as the formats are considered
+%% compatible as defined in the OpenGL Specification. The matching criterion used for a given
+%% texture may be determined by calling {@link gl:getTexParameterfv/2} with `Value' set
+%% to `?GL_IMAGE_FORMAT_COMPATIBILITY_TYPE', with return values of `?GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE'
+%% and `?GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS', specifying matches by size and class,
+%% respectively.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindImageTexture.xml">external</a> documentation.
+-spec bindImageTexture(Unit, Texture, Level, Layered, Layer, Access, Format) -> ok when Unit :: integer(),Texture :: integer(),Level :: integer(),Layered :: 0|1,Layer :: integer(),Access :: enum(),Format :: enum().
+bindImageTexture(Unit,Texture,Level,Layered,Layer,Access,Format) ->
+ cast(5865, <<Unit:?GLuint,Texture:?GLuint,Level:?GLint,Layered:?GLboolean,0:24,Layer:?GLint,Access:?GLenum,Format:?GLenum>>).
+
+%% @doc Defines a barrier ordering memory transactions
+%%
+%% ``gl:memoryBarrier'' defines a barrier ordering the memory transactions issued prior
+%% to the command relative to those issued after the barrier. For the purposes of this ordering,
+%% memory transactions performed by shaders are considered to be issued by the rendering
+%% command that triggered the execution of the shader. `Barriers' is a bitfield indicating
+%% the set of operations that are synchronized with shader stores; the bits used in `Barriers'
+%% are as follows:
+%%
+%%
+%%
+%% `?GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT': If set, vertex data sourced from buffer objects
+%% after the barrier will reflect data written by shaders prior to the barrier. The set of
+%% buffer objects affected by this bit is derived from the buffer object bindings used for
+%% generic vertex attributes derived from the `?GL_VERTEX_ATTRIB_ARRAY_BUFFER' bindings.
+%%
+%%
+%% `?GL_ELEMENT_ARRAY_BARRIER_BIT': If set, vertex array indices sourced from buffer
+%% objects after the barrier will reflect data written by shaders prior to the barrier. The
+%% buffer objects affected by this bit are derived from the `?GL_ELEMENT_ARRAY_BUFFER'
+%% binding.
+%%
+%% `?GL_UNIFORM_BARRIER_BIT': Shader uniforms sourced from buffer objects after the
+%% barrier will reflect data written by shaders prior to the barrier.
+%%
+%% `?GL_TEXTURE_FETCH_BARRIER_BIT': Texture fetches from shaders, including fetches
+%% from buffer object memory via buffer textures, after the barrier will reflect data written
+%% by shaders prior to the barrier.
+%%
+%% `?GL_SHADER_IMAGE_ACCESS_BARRIER_BIT': Memory accesses using shader image load,
+%% store, and atomic built-in functions issued after the barrier will reflect data written
+%% by shaders prior to the barrier. Additionally, image stores and atomics issued after the
+%% barrier will not execute until all memory accesses (e.g., loads, stores, texture fetches,
+%% vertex fetches) initiated prior to the barrier complete.
+%%
+%% `?GL_COMMAND_BARRIER_BIT': Command data sourced from buffer objects by Draw*Indirect
+%% commands after the barrier will reflect data written by shaders prior to the barrier.
+%% The buffer objects affected by this bit are derived from the `?GL_DRAW_INDIRECT_BUFFER'
+%% binding.
+%%
+%% `?GL_PIXEL_BUFFER_BARRIER_BIT': Reads and writes of buffer objects via the `?GL_PIXEL_PACK_BUFFER'
+%% and `?GL_PIXEL_UNPACK_BUFFER' bindings (via {@link gl:readPixels/7} , {@link gl:texSubImage1D/7}
+%% , etc.) after the barrier will reflect data written by shaders prior to the barrier. Additionally,
+%% buffer object writes issued after the barrier will wait on the completion of all shader
+%% writes initiated prior to the barrier.
+%%
+%% `?GL_TEXTURE_UPDATE_BARRIER_BIT': Writes to a texture via ``gl:tex(Sub)Image*'', ``gl:copyTex(Sub)Image*''
+%% , ``gl:compressedTex(Sub)Image*'', and reads via {@link gl:getTexImage/5} after the barrier
+%% will reflect data written by shaders prior to the barrier. Additionally, texture writes
+%% from these commands issued after the barrier will not execute until all shader writes
+%% initiated prior to the barrier complete.
+%%
+%% `?GL_BUFFER_UPDATE_BARRIER_BIT': Reads or writes via {@link gl:bufferSubData/4} , {@link gl:copyBufferSubData/5}
+%% , or {@link gl:getBufferSubData/4} , or to buffer object memory mapped by see `glMapBuffer'
+%% or see `glMapBufferRange' after the barrier will reflect data written by shaders
+%% prior to the barrier. Additionally, writes via these commands issued after the barrier
+%% will wait on the completion of any shader writes to the same memory initiated prior to
+%% the barrier.
+%%
+%% `?GL_FRAMEBUFFER_BARRIER_BIT': Reads and writes via framebuffer object attachments
+%% after the barrier will reflect data written by shaders prior to the barrier. Additionally,
+%% framebuffer writes issued after the barrier will wait on the completion of all shader
+%% writes issued prior to the barrier.
+%%
+%% `?GL_TRANSFORM_FEEDBACK_BARRIER_BIT': Writes via transform feedback bindings after
+%% the barrier will reflect data written by shaders prior to the barrier. Additionally, transform
+%% feedback writes issued after the barrier will wait on the completion of all shader writes
+%% issued prior to the barrier.
+%%
+%% `?GL_ATOMIC_COUNTER_BARRIER_BIT': Accesses to atomic counters after the barrier
+%% will reflect writes prior to the barrier.
+%%
+%% If `Barriers' is `?GL_ALL_BARRIER_BITS', shader memory accesses will be synchronized
+%% relative to all the operations described above.
+%%
+%% Implementations may cache buffer object and texture image memory that could be written
+%% by shaders in multiple caches; for example, there may be separate caches for texture,
+%% vertex fetching, and one or more caches for shader memory accesses. Implementations are
+%% not required to keep these caches coherent with shader memory writes. Stores issued by
+%% one invocation may not be immediately observable by other pipeline stages or other shader
+%% invocations because the value stored may remain in a cache local to the processor executing
+%% the store, or because data overwritten by the store is still in a cache elsewhere in the
+%% system. When ``gl:memoryBarrier'' is called, the GL flushes and/or invalidates any caches
+%% relevant to the operations specified by the `Barriers' parameter to ensure consistent
+%% ordering of operations across the barrier.
+%%
+%% To allow for independent shader invocations to communicate by reads and writes to a common
+%% memory address, image variables in the OpenGL Shading Language may be declared as "coherent".
+%% Buffer object or texture image memory accessed through such variables may be cached only
+%% if caches are automatically updated due to stores issued by any other shader invocation.
+%% If the same address is accessed using both coherent and non-coherent variables, the accesses
+%% using variables declared as coherent will observe the results stored using coherent variables
+%% in other invocations. Using variables declared as "coherent" guarantees only that the
+%% results of stores will be immediately visible to shader invocations using similarly-declared
+%% variables; calling ``gl:memoryBarrier'' is required to ensure that the stores are visible
+%% to other operations.
+%%
+%% The following guidelines may be helpful in choosing when to use coherent memory accesses
+%% and when to use barriers.
+%%
+%% Data that are read-only or constant may be accessed without using coherent variables or
+%% calling MemoryBarrier(). Updates to the read-only data via API calls such as BufferSubData
+%% will invalidate shader caches implicitly as required.
+%%
+%% Data that are shared between shader invocations at a fine granularity (e.g., written by
+%% one invocation, consumed by another invocation) should use coherent variables to read
+%% and write the shared data.
+%%
+%% Data written by one shader invocation and consumed by other shader invocations launched
+%% as a result of its execution ("dependent invocations") should use coherent variables in
+%% the producing shader invocation and call memoryBarrier() after the last write. The consuming
+%% shader invocation should also use coherent variables.
+%%
+%% Data written to image variables in one rendering pass and read by the shader in a later
+%% pass need not use coherent variables or memoryBarrier(). Calling MemoryBarrier() with
+%% the SHADER_IMAGE_ACCESS_BARRIER_BIT set in `Barriers' between passes is necessary.
+%%
+%% Data written by the shader in one rendering pass and read by another mechanism (e.g.,
+%% vertex or index buffer pulling) in a later pass need not use coherent variables or memoryBarrier().
+%% Calling ``gl:memoryBarrier'' with the appropriate bits set in `Barriers' between
+%% passes is necessary.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMemoryBarrier.xml">external</a> documentation.
+-spec memoryBarrier(Barriers) -> ok when Barriers :: integer().
+memoryBarrier(Barriers) ->
+ cast(5866, <<Barriers:?GLbitfield>>).
+
+%% @doc Simultaneously specify storage for all levels of a one-dimensional texture
+%%
+%% ``gl:texStorage1D'' specifies the storage requirements for all levels of a one-dimensional
+%% texture simultaneously. Once a texture is specified with this command, the format and
+%% dimensions of all levels become immutable unless it is a proxy texture. The contents of
+%% the image may still be modified, however, its storage requirements may not change. Such
+%% a texture is referred to as an `immutable-format' texture.
+%%
+%% Calling ``gl:texStorage1D'' is equivalent, assuming no errors are generated, to executing
+%% the following pseudo-code: for (i = 0; i &lt; levels; i++) { glTexImage1D(target, i,
+%% internalformat, width, 0, format, type, NULL); width = max(1, (width / 2)); }
+%%
+%% Since no texture data is actually provided, the values used in the pseudo-code for `Format'
+%% and `Type' are irrelevant and may be considered to be any values that are legal
+%% for the chosen `Internalformat' enumerant. `Internalformat' must be one of the
+%% sized internal formats given in Table 1 below, one of the sized depth-component formats `?GL_DEPTH_COMPONENT32F'
+%% , `?GL_DEPTH_COMPONENT24', or `?GL_DEPTH_COMPONENT16', or one of the combined
+%% depth-stencil formats, `?GL_DEPTH32F_STENCIL8', or `?GL_DEPTH24_STENCIL8'. Upon
+%% success, the value of `?GL_TEXTURE_IMMUTABLE_FORMAT' becomes `?GL_TRUE'. The
+%% value of `?GL_TEXTURE_IMMUTABLE_FORMAT' may be discovered by calling {@link gl:getTexParameterfv/2}
+%% with `Pname' set to `?GL_TEXTURE_IMMUTABLE_FORMAT'. No further changes to the
+%% dimensions or format of the texture object may be made. Using any command that might alter
+%% the dimensions or format of the texture object (such as {@link gl:texImage1D/8} or another
+%% call to ``gl:texStorage1D'') will result in the generation of a `?GL_INVALID_OPERATION'
+%% error, even if it would not, in fact, alter the dimensions or format of the object.
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexStorage1D.xml">external</a> documentation.
+-spec texStorage1D(Target, Levels, Internalformat, Width) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer().
+texStorage1D(Target,Levels,Internalformat,Width) ->
+ cast(5867, <<Target:?GLenum,Levels:?GLsizei,Internalformat:?GLenum,Width:?GLsizei>>).
+
+%% @doc Simultaneously specify storage for all levels of a two-dimensional or one-dimensional array texture
+%%
+%% ``gl:texStorage2D'' specifies the storage requirements for all levels of a two-dimensional
+%% texture or one-dimensional texture array simultaneously. Once a texture is specified with
+%% this command, the format and dimensions of all levels become immutable unless it is a
+%% proxy texture. The contents of the image may still be modified, however, its storage requirements
+%% may not change. Such a texture is referred to as an `immutable-format' texture.
+%%
+%% The behavior of ``gl:texStorage2D'' depends on the `Target' parameter. When `Target'
+%% is `?GL_TEXTURE_2D', `?GL_PROXY_TEXTURE_2D', `?GL_TEXTURE_RECTANGLE', `?GL_PROXY_TEXTURE_RECTANGLE'
+%% or `?GL_PROXY_TEXTURE_CUBE_MAP', calling ``gl:texStorage2D'' is equivalent, assuming
+%% no errors are generated, to executing the following pseudo-code: for (i = 0; i &lt; levels;
+%% i++) { glTexImage2D(target, i, internalformat, width, height, 0, format, type, NULL);
+%% width = max(1, (width / 2)); height = max(1, (height / 2)); }
+%%
+%% When `Target' is `?GL_TEXTURE_CUBE_MAP', ``gl:texStorage2D'' is equivalent
+%% to: for (i = 0; i &lt; levels; i++) { for (face in (+X, -X, +Y, -Y, +Z, -Z)) { glTexImage2D(face,
+%% i, internalformat, width, height, 0, format, type, NULL); } width = max(1, (width / 2));
+%% height = max(1, (height / 2)); }
+%%
+%% When `Target' is `?GL_TEXTURE_1D' or `?GL_TEXTURE_1D_ARRAY', ``gl:texStorage2D''
+%% is equivalent to: for (i = 0; i &lt; levels; i++) { glTexImage2D(target, i, internalformat,
+%% width, height, 0, format, type, NULL); width = max(1, (width / 2)); }
+%%
+%% Since no texture data is actually provided, the values used in the pseudo-code for `Format'
+%% and `Type' are irrelevant and may be considered to be any values that are legal
+%% for the chosen `Internalformat' enumerant. `Internalformat' must be one of the
+%% sized internal formats given in Table 1 below, one of the sized depth-component formats `?GL_DEPTH_COMPONENT32F'
+%% , `?GL_DEPTH_COMPONENT24', or `?GL_DEPTH_COMPONENT16', or one of the combined
+%% depth-stencil formats, `?GL_DEPTH32F_STENCIL8', or `?GL_DEPTH24_STENCIL8'. Upon
+%% success, the value of `?GL_TEXTURE_IMMUTABLE_FORMAT' becomes `?GL_TRUE'. The
+%% value of `?GL_TEXTURE_IMMUTABLE_FORMAT' may be discovered by calling {@link gl:getTexParameterfv/2}
+%% with `Pname' set to `?GL_TEXTURE_IMMUTABLE_FORMAT'. No further changes to the
+%% dimensions or format of the texture object may be made. Using any command that might alter
+%% the dimensions or format of the texture object (such as {@link gl:texImage2D/9} or another
+%% call to ``gl:texStorage2D'') will result in the generation of a `?GL_INVALID_OPERATION'
+%% error, even if it would not, in fact, alter the dimensions or format of the object.
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexStorage2D.xml">external</a> documentation.
+-spec texStorage2D(Target, Levels, Internalformat, Width, Height) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer().
+texStorage2D(Target,Levels,Internalformat,Width,Height) ->
+ cast(5868, <<Target:?GLenum,Levels:?GLsizei,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei>>).
+
+%% @doc Simultaneously specify storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture
+%%
+%% ``gl:texStorage3D'' specifies the storage requirements for all levels of a three-dimensional,
+%% two-dimensional array or cube-map array texture simultaneously. Once a texture is specified
+%% with this command, the format and dimensions of all levels become immutable unless it
+%% is a proxy texture. The contents of the image may still be modified, however, its storage
+%% requirements may not change. Such a texture is referred to as an `immutable-format'
+%% texture.
+%%
+%% The behavior of ``gl:texStorage3D'' depends on the `Target' parameter. When `Target'
+%% is `?GL_TEXTURE_3D', or `?GL_PROXY_TEXTURE_3D', calling ``gl:texStorage3D''
+%% is equivalent, assuming no errors are generated, to executing the following pseudo-code:
+%% for (i = 0; i &lt; levels; i++) { glTexImage3D(target, i, internalformat, width, height,
+%% depth, 0, format, type, NULL); width = max(1, (width / 2)); height = max(1, (height /
+%% 2)); depth = max(1, (depth / 2)); }
+%%
+%% When `Target' is `?GL_TEXTURE_2D_ARRAY', `?GL_PROXY_TEXTURE_2D_ARRAY', `?GL_TEXTURE_CUBE_MAP_ARRAY'
+%% , or `?GL_PROXY_TEXTURE_CUBE_MAP_ARRAY', ``gl:texStorage3D'' is equivalent to:
+%% for (i = 0; i &lt; levels; i++) { glTexImage3D(target, i, internalformat, width, height,
+%% depth, 0, format, type, NULL); width = max(1, (width / 2)); height = max(1, (height /
+%% 2)); }
+%%
+%% Since no texture data is actually provided, the values used in the pseudo-code for `Format'
+%% and `Type' are irrelevant and may be considered to be any values that are legal
+%% for the chosen `Internalformat' enumerant. `Internalformat' must be one of the
+%% sized internal formats given in Table 1 below, one of the sized depth-component formats `?GL_DEPTH_COMPONENT32F'
+%% , `?GL_DEPTH_COMPONENT24', or `?GL_DEPTH_COMPONENT16', or one of the combined
+%% depth-stencil formats, `?GL_DEPTH32F_STENCIL8', or `?GL_DEPTH24_STENCIL8'. Upon
+%% success, the value of `?GL_TEXTURE_IMMUTABLE_FORMAT' becomes `?GL_TRUE'. The
+%% value of `?GL_TEXTURE_IMMUTABLE_FORMAT' may be discovered by calling {@link gl:getTexParameterfv/2}
+%% with `Pname' set to `?GL_TEXTURE_IMMUTABLE_FORMAT'. No further changes to the
+%% dimensions or format of the texture object may be made. Using any command that might alter
+%% the dimensions or format of the texture object (such as {@link gl:texImage3D/10} or another
+%% call to ``gl:texStorage3D'') will result in the generation of a `?GL_INVALID_OPERATION'
+%% error, even if it would not, in fact, alter the dimensions or format of the object.
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexStorage3D.xml">external</a> documentation.
+-spec texStorage3D(Target, Levels, Internalformat, Width, Height, Depth) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Depth :: integer().
+texStorage3D(Target,Levels,Internalformat,Width,Height,Depth) ->
+ cast(5869, <<Target:?GLenum,Levels:?GLsizei,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei>>).
+
+%% @doc glDepthBoundsEXT
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthBoundsEXT.xml">external</a> documentation.
+-spec depthBoundsEXT(Zmin, Zmax) -> ok when Zmin :: clamp(),Zmax :: clamp().
depthBoundsEXT(Zmin,Zmax) ->
- cast(5862, <<Zmin:?GLclampd,Zmax:?GLclampd>>).
+ cast(5870, <<Zmin:?GLclampd,Zmax:?GLclampd>>).
-%% @spec (StencilTagBits::integer(),StencilClearTag::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilClearTagEXT.xml">external</a> documentation.
--spec stencilClearTagEXT(integer(),integer()) -> ok.
+%% @doc glStencilClearTagEXT
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilClearTagEXT.xml">external</a> documentation.
+-spec stencilClearTagEXT(StencilTagBits, StencilClearTag) -> ok when StencilTagBits :: integer(),StencilClearTag :: integer().
stencilClearTagEXT(StencilTagBits,StencilClearTag) ->
- cast(5863, <<StencilTagBits:?GLsizei,StencilClearTag:?GLuint>>).
+ cast(5871, <<StencilTagBits:?GLsizei,StencilClearTag:?GLuint>>).
diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl
index c16f0cf125..2c82c9792f 100644
--- a/lib/wx/src/gen/glu.erl
+++ b/lib/wx/src/gen/glu.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,11 +25,6 @@
%%
%% Booleans are represented by integers 0 and 1.
-%% @type mem(). memory block
-%% @type enum(). An integer defined in gl.hrl
-%% @type offset(). An integer which is an offset in an array
-%% @type clamp(). A float clamped between 0.0 - 1.0
-
-module(glu).
-compile(inline).
-define(GLenum,32/native-unsigned).
@@ -53,8 +48,13 @@
-define(GLsync,64/native-unsigned).
-define(GLuint64,64/native-unsigned).
-define(GLint64,64/native-signed).
--type enum() :: non_neg_integer().
--type mem() :: binary() | tuple().
+-type vertex() :: {float(), float(), float()}.
+-type enum() :: non_neg_integer(). %% See wx/include/gl.hrl or glu.hrl
+-type matrix() :: {float(),float(),float(),float(),
+ float(),float(),float(),float(),
+ float(),float(),float(),float(),
+ float(),float(),float(),float()}.
+-type mem() :: binary() | tuple(). %% Memory block
-export([tesselate/2,build1DMipmapLevels/9,build1DMipmaps/6,build2DMipmapLevels/10,
build2DMipmaps/7,build3DMipmapLevels/11,build3DMipmaps/8,checkExtension/2,
@@ -66,193 +66,676 @@
-import(gl, [call/2,cast/2,send_bin/1]).
%% API
-%% @spec (Vec3, [Vec3]) -> {Triangles, VertexPos}
-%% Vec3 = {float(),float(),float()}
-%% Triangles = [VertexIndex::integer()]
-%% VertexPos = binary()
%% @doc General purpose polygon triangulation.
%% The first argument is the normal and the second a list of
%% vertex positions. Returned is a list of indecies of the vertices
%% and a binary (64bit native float) containing an array of
%% vertex positions, it starts with the vertices in Vs and
%% may contain newly created vertices in the end.
+-spec tesselate(Normal, [Vs]) -> {Triangles, VertexPos}
+ when Normal :: vertex(), Vs :: vertex(),
+ Triangles :: [integer()], VertexPos :: binary().
tesselate({Nx,Ny,Nz}, Vs) ->
call(5000, <<(length(Vs)):32/native,0:32,
Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble,
(<< <<Vx:?GLdouble,Vy:?GLdouble,Vz:?GLdouble >>
|| {Vx,Vy,Vz} <- Vs>>)/binary >>).
-%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Format::enum(),Type::enum(),Level::integer(),Base::integer(),Max::integer(),Data::binary()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild1DMipmapLevels.xml">external</a> documentation.
--spec build1DMipmapLevels(enum(),integer(),integer(),enum(),enum(),integer(),integer(),integer(),binary()) -> integer().
+%% @doc Builds a subset of one-dimensional mipmap levels
+%%
+%% ``glu:build1DMipmapLevels'' builds a subset of prefiltered one-dimensional texture maps
+%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture
+%% mapped primitives.
+%%
+%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
+%% ).
+%%
+%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data'
+%% in half until size 1*1 is reached. At each level, each texel in the halved mipmap
+%% level is an average of the corresponding two texels in the larger mipmap level. {@link gl:texImage1D/8}
+%% is called to load these mipmap levels from `Base' to `Max' . If `Max' is
+%% larger than the highest mipmap level for the texture of the specified size, then a GLU
+%% error code is returned (see {@link glu:errorString/1} ) and nothing is loaded.
+%%
+%% For example, if `Level' is 2 and `Width' is 16, the following levels are possible:
+%% 16*1, 8*1, 4*1, 2*1, 1*1. These correspond to levels 2 through 6 respectively.
+%% If `Base' is 3 and `Max' is 5, then only mipmap levels 8*1, 4*1 and 2*1
+%% are loaded. However, if `Max' is 7, then an error is returned and nothing is loaded
+%% since `Max' is larger than the highest mipmap level which is, in this case, 6.
+%%
+%% The highest mipmap level can be derived from the formula log 2(width*2 level).
+%%
+%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
+%% for `Type' parameter. See the {@link gl:drawPixels/5} reference page for a description
+%% of the acceptable values for `Level' parameter.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild1DMipmapLevels.xml">external</a> documentation.
+-spec build1DMipmapLevels(Target, InternalFormat, Width, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary().
build1DMipmapLevels(Target,InternalFormat,Width,Format,Type,Level,Base,Max,Data) ->
send_bin(Data),
call(5010, <<Target:?GLenum,InternalFormat:?GLint,Width:?GLsizei,Format:?GLenum,Type:?GLenum,Level:?GLint,Base:?GLint,Max:?GLint>>).
-%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Format::enum(),Type::enum(),Data::binary()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild1DMipmaps.xml">external</a> documentation.
--spec build1DMipmaps(enum(),integer(),integer(),enum(),enum(),binary()) -> integer().
+%% @doc Builds a one-dimensional mipmap
+%%
+%% ``glu:build1DMipmaps'' builds a series of prefiltered one-dimensional texture maps of
+%% decreasing resolutions called a mipmap. This is used for the antialiasing of texture mapped
+%% primitives.
+%%
+%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
+%% ).
+%%
+%% Initially, the `Width' of `Data' is checked to see if it is a power of 2. If
+%% not, a copy of `Data' is scaled up or down to the nearest power of 2. (If `Width'
+%% is exactly between powers of 2, then the copy of `Data' will scale upwards.) This
+%% copy will be used for subsequent mipmapping operations described below. For example, if `Width'
+%% is 57, then a copy of `Data' will scale up to 64 before mipmapping takes place.
+%%
+%% Then, proxy textures (see {@link gl:texImage1D/8} ) are used to determine if the implementation
+%% can fit the requested texture. If not, `Width' is continually halved until it fits.
+%%
+%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half
+%% until size 1*1 is reached. At each level, each texel in the halved mipmap level is an
+%% average of the corresponding two texels in the larger mipmap level.
+%%
+%% {@link gl:texImage1D/8} is called to load each of these mipmap levels. Level 0 is a copy
+%% of `Data' . The highest level is (log 2)(width). For example, if `Width' is 64 and the implementation
+%% can store a texture of this size, the following mipmap levels are built: 64*1, 32*1,
+%% 16*1, 8*1, 4*1, 2*1, and 1*1. These correspond to levels 0 through 6, respectively.
+%%
+%%
+%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
+%% for the `Type' parameter. See the {@link gl:drawPixels/5} reference page for a description
+%% of the acceptable values for the `Data' parameter.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild1DMipmaps.xml">external</a> documentation.
+-spec build1DMipmaps(Target, InternalFormat, Width, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Data :: binary().
build1DMipmaps(Target,InternalFormat,Width,Format,Type,Data) ->
send_bin(Data),
call(5011, <<Target:?GLenum,InternalFormat:?GLint,Width:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Level::integer(),Base::integer(),Max::integer(),Data::binary()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild2DMipmapLevels.xml">external</a> documentation.
--spec build2DMipmapLevels(enum(),integer(),integer(),integer(),enum(),enum(),integer(),integer(),integer(),binary()) -> integer().
+%% @doc Builds a subset of two-dimensional mipmap levels
+%%
+%% ``glu:build2DMipmapLevels'' builds a subset of prefiltered two-dimensional texture maps
+%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture
+%% mapped primitives.
+%%
+%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
+%% ).
+%%
+%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data'
+%% in half along both dimensions until size 1*1 is reached. At each level, each texel
+%% in the halved mipmap level is an average of the corresponding four texels in the larger
+%% mipmap level. (In the case of rectangular images, the decimation will ultimately reach
+%% an N*1 or 1*N configuration. Here, two texels are averaged instead.) {@link gl:texImage2D/9}
+%% is called to load these mipmap levels from `Base' to `Max' . If `Max' is
+%% larger than the highest mipmap level for the texture of the specified size, then a GLU
+%% error code is returned (see {@link glu:errorString/1} ) and nothing is loaded.
+%%
+%% For example, if `Level' is 2 and `Width' is 16 and `Height' is 8, the
+%% following levels are possible: 16*8, 8*4, 4*2, 2*1, 1*1. These correspond to
+%% levels 2 through 6 respectively. If `Base' is 3 and `Max' is 5, then only mipmap
+%% levels 8*4, 4*2, and 2*1 are loaded. However, if `Max' is 7, then an error is
+%% returned and nothing is loaded since `Max' is larger than the highest mipmap level
+%% which is, in this case, 6.
+%%
+%% The highest mipmap level can be derived from the formula log 2(max(width height)*2 level).
+%%
+%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
+%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description
+%% of the acceptable values for `Type' parameter.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild2DMipmapLevels.xml">external</a> documentation.
+-spec build2DMipmapLevels(Target, InternalFormat, Width, Height, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary().
build2DMipmapLevels(Target,InternalFormat,Width,Height,Format,Type,Level,Base,Max,Data) ->
send_bin(Data),
call(5012, <<Target:?GLenum,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Level:?GLint,Base:?GLint,Max:?GLint>>).
-%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Data::binary()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild2DMipmaps.xml">external</a> documentation.
--spec build2DMipmaps(enum(),integer(),integer(),integer(),enum(),enum(),binary()) -> integer().
+%% @doc Builds a two-dimensional mipmap
+%%
+%% ``glu:build2DMipmaps'' builds a series of prefiltered two-dimensional texture maps of
+%% decreasing resolutions called a mipmap. This is used for the antialiasing of texture-mapped
+%% primitives.
+%%
+%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
+%% ).
+%%
+%% Initially, the `Width' and `Height' of `Data' are checked to see if they
+%% are a power of 2. If not, a copy of `Data' (not `Data' ), is scaled up or down
+%% to the nearest power of 2. This copy will be used for subsequent mipmapping operations
+%% described below. (If `Width' or `Height' is exactly between powers of 2, then
+%% the copy of `Data' will scale upwards.) For example, if `Width' is 57 and `Height'
+%% is 23, then a copy of `Data' will scale up to 64 in `Width' and down to 16
+%% in depth, before mipmapping takes place.
+%%
+%% Then, proxy textures (see {@link gl:texImage2D/9} ) are used to determine if the implementation
+%% can fit the requested texture. If not, both dimensions are continually halved until it
+%% fits. (If the OpenGL version is (&lt;= 1.0, both maximum texture dimensions are clamped
+%% to the value returned by {@link gl:getBooleanv/1} with the argument `?GLU_MAX_TEXTURE_SIZE'
+%% .)
+%%
+%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half
+%% along both dimensions until size 1*1 is reached. At each level, each texel in the halved
+%% mipmap level is an average of the corresponding four texels in the larger mipmap level.
+%% (In the case of rectangular images, the decimation will ultimately reach an N*1 or 1*N
+%% configuration. Here, two texels are averaged instead.)
+%%
+%% {@link gl:texImage2D/9} is called to load each of these mipmap levels. Level 0 is a copy
+%% of `Data' . The highest level is (log 2)(max(width height)). For example, if `Width' is 64 and `Height'
+%% is 16 and the implementation can store a texture of this size, the following mipmap levels
+%% are built: 64*16, 32*8, 16*4, 8*2, 4*1, 2*1, and 1*1 These correspond to
+%% levels 0 through 6, respectively.
+%%
+%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
+%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description
+%% of the acceptable values for `Type' parameter.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild2DMipmaps.xml">external</a> documentation.
+-spec build2DMipmaps(Target, InternalFormat, Width, Height, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Data :: binary().
build2DMipmaps(Target,InternalFormat,Width,Height,Format,Type,Data) ->
send_bin(Data),
call(5013, <<Target:?GLenum,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Height::integer(),Depth::integer(),Format::enum(),Type::enum(),Level::integer(),Base::integer(),Max::integer(),Data::binary()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild3DMipmapLevels.xml">external</a> documentation.
--spec build3DMipmapLevels(enum(),integer(),integer(),integer(),integer(),enum(),enum(),integer(),integer(),integer(),binary()) -> integer().
+%% @doc Builds a subset of three-dimensional mipmap levels
+%%
+%% ``glu:build3DMipmapLevels'' builds a subset of prefiltered three-dimensional texture
+%% maps of decreasing resolutions called a mipmap. This is used for the antialiasing of texture
+%% mapped primitives.
+%%
+%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
+%% ).
+%%
+%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data'
+%% in half along both dimensions until size 1*1*1 is reached. At each level, each texel
+%% in the halved mipmap level is an average of the corresponding eight texels in the larger
+%% mipmap level. (If exactly one of the dimensions is 1, four texels are averaged. If exactly
+%% two of the dimensions are 1, two texels are averaged.) {@link gl:texImage3D/10} is called
+%% to load these mipmap levels from `Base' to `Max' . If `Max' is larger than
+%% the highest mipmap level for the texture of the specified size, then a GLU error code
+%% is returned (see {@link glu:errorString/1} ) and nothing is loaded.
+%%
+%% For example, if `Level' is 2 and `Width' is 16, `Height' is 8 and `Depth'
+%% is 4, the following levels are possible: 16*8*4, 8*4*2, 4*2*1, 2*1*1, 1*1*1.
+%% These correspond to levels 2 through 6 respectively. If `Base' is 3 and `Max'
+%% is 5, then only mipmap levels 8*4*2, 4*2*1, and 2*1*1 are loaded. However, if `Max'
+%% is 7, then an error is returned and nothing is loaded, since `Max' is larger than
+%% the highest mipmap level which is, in this case, 6.
+%%
+%% The highest mipmap level can be derived from the formula log 2(max(width height depth)*2 level).
+%%
+%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
+%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description
+%% of the acceptable values for `Type' parameter.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild3DMipmapLevels.xml">external</a> documentation.
+-spec build3DMipmapLevels(Target, InternalFormat, Width, Height, Depth, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary().
build3DMipmapLevels(Target,InternalFormat,Width,Height,Depth,Format,Type,Level,Base,Max,Data) ->
send_bin(Data),
call(5014, <<Target:?GLenum,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Format:?GLenum,Type:?GLenum,Level:?GLint,Base:?GLint,Max:?GLint>>).
-%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Height::integer(),Depth::integer(),Format::enum(),Type::enum(),Data::binary()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild3DMipmaps.xml">external</a> documentation.
--spec build3DMipmaps(enum(),integer(),integer(),integer(),integer(),enum(),enum(),binary()) -> integer().
+%% @doc Builds a three-dimensional mipmap
+%%
+%% ``glu:build3DMipmaps'' builds a series of prefiltered three-dimensional texture maps
+%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture-mapped
+%% primitives.
+%%
+%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
+%% ).
+%%
+%% Initially, the `Width' , `Height' and `Depth' of `Data' are checked
+%% to see if they are a power of 2. If not, a copy of `Data' is made and scaled up or
+%% down to the nearest power of 2. (If `Width' , `Height' , or `Depth' is exactly
+%% between powers of 2, then the copy of `Data' will scale upwards.) This copy will
+%% be used for subsequent mipmapping operations described below. For example, if `Width'
+%% is 57, `Height' is 23, and `Depth' is 24, then a copy of `Data' will scale
+%% up to 64 in width, down to 16 in height, and up to 32 in depth before mipmapping takes
+%% place.
+%%
+%% Then, proxy textures (see {@link gl:texImage3D/10} ) are used to determine if the implementation
+%% can fit the requested texture. If not, all three dimensions are continually halved until
+%% it fits.
+%%
+%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half
+%% along all three dimensions until size 1*1*1 is reached. At each level, each texel in
+%% the halved mipmap level is an average of the corresponding eight texels in the larger
+%% mipmap level. (If exactly one of the dimensions is 1, four texels are averaged. If exactly
+%% two of the dimensions are 1, two texels are averaged.)
+%%
+%% {@link gl:texImage3D/10} is called to load each of these mipmap levels. Level 0 is a copy
+%% of `Data' . The highest level is (log 2)(max(width height depth)). For example, if `Width' is 64, `Height'
+%% is 16, and `Depth' is 32, and the implementation can store a texture of this size,
+%% the following mipmap levels are built: 64*16*32, 32*8*16, 16*4*8, 8*2*4, 4*1*2,
+%% 2*1*1, and 1*1*1. These correspond to levels 0 through 6, respectively.
+%%
+%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
+%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description
+%% of the acceptable values for `Type' parameter.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild3DMipmaps.xml">external</a> documentation.
+-spec build3DMipmaps(Target, InternalFormat, Width, Height, Depth, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Data :: binary().
build3DMipmaps(Target,InternalFormat,Width,Height,Depth,Format,Type,Data) ->
send_bin(Data),
call(5015, <<Target:?GLenum,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Format:?GLenum,Type:?GLenum>>).
-%% @spec (ExtName::string(),ExtString::string()) -> 0|1
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluCheckExtension.xml">external</a> documentation.
--spec checkExtension(string(),string()) -> 0|1.
+%% @doc Determines if an extension name is supported
+%%
+%% ``glu:checkExtension'' returns `?GLU_TRUE' if `ExtName' is supported otherwise
+%% `?GLU_FALSE' is returned.
+%%
+%% This is used to check for the presence for OpenGL, GLU, or GLX extension names by passing
+%% the extension strings returned by {@link gl:getString/1} , {@link glu:getString/1} , see `glXGetClientString'
+%% , see `glXQueryExtensionsString', or see `glXQueryServerString', respectively,
+%% as `ExtString' .
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluCheckExtension.xml">external</a> documentation.
+-spec checkExtension(ExtName, ExtString) -> 0|1 when ExtName :: string(),ExtString :: string().
checkExtension(ExtName,ExtString) ->
call(5016, <<(list_to_binary([ExtName|[0]]))/binary,0:((8-((length(ExtName)+ 1) rem 8)) rem 8),(list_to_binary([ExtString|[0]]))/binary,0:((8-((length(ExtString)+ 1) rem 8)) rem 8)>>).
-%% @spec (Quad::integer(),Base::float(),Top::float(),Height::float(),Slices::integer(),Stacks::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluCylinder.xml">external</a> documentation.
--spec cylinder(integer(),float(),float(),float(),integer(),integer()) -> ok.
+%% @doc Draw a cylinder
+%%
+%% ``glu:cylinder'' draws a cylinder oriented along the `z' axis. The base of the
+%% cylinder is placed at `z' = 0 and the top at z= height. Like a sphere, a cylinder
+%% is subdivided around the `z' axis into slices and along the `z' axis into stacks.
+%%
+%%
+%% Note that if `Top' is set to 0.0, this routine generates a cone.
+%%
+%% If the orientation is set to `?GLU_OUTSIDE' (with {@link glu:quadricOrientation/2} ),
+%% then any generated normals point away from the `z' axis. Otherwise, they point toward
+%% the `z' axis.
+%%
+%% If texturing is turned on (with {@link glu:quadricTexture/2} ), then texture coordinates
+%% are generated so that `t' ranges linearly from 0.0 at `z' = 0 to 1.0 at `z'
+%% = `Height' , and `s' ranges from 0.0 at the +`y' axis, to 0.25 at the +`x'
+%% axis, to 0.5 at the -`y' axis, to 0.75 at the -`x' axis, and back to 1.0
+%% at the +`y' axis.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluCylinder.xml">external</a> documentation.
+-spec cylinder(Quad, Base, Top, Height, Slices, Stacks) -> ok when Quad :: integer(),Base :: float(),Top :: float(),Height :: float(),Slices :: integer(),Stacks :: integer().
cylinder(Quad,Base,Top,Height,Slices,Stacks) ->
cast(5017, <<Quad:?GLUquadric,Base:?GLdouble,Top:?GLdouble,Height:?GLdouble,Slices:?GLint,Stacks:?GLint>>).
-%% @spec (Quad::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluDeleteQuadric.xml">external</a> documentation.
--spec deleteQuadric(integer()) -> ok.
+%% @doc Destroy a quadrics object
+%%
+%% ``glu:deleteQuadric'' destroys the quadrics object (created with {@link glu:newQuadric/0} )
+%% and frees any memory it uses. Once ``glu:deleteQuadric'' has been called, `Quad'
+%% cannot be used again.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluDeleteQuadric.xml">external</a> documentation.
+-spec deleteQuadric(Quad) -> ok when Quad :: integer().
deleteQuadric(Quad) ->
cast(5018, <<Quad:?GLUquadric>>).
-%% @spec (Quad::integer(),Inner::float(),Outer::float(),Slices::integer(),Loops::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluDisk.xml">external</a> documentation.
--spec disk(integer(),float(),float(),integer(),integer()) -> ok.
+%% @doc Draw a disk
+%%
+%% ``glu:disk'' renders a disk on the `z' = 0 plane. The disk has a radius of `Outer'
+%% and contains a concentric circular hole with a radius of `Inner' . If `Inner'
+%% is 0, then no hole is generated. The disk is subdivided around the `z' axis into
+%% slices (like pizza slices) and also about the `z' axis into rings (as specified by `Slices'
+%% and `Loops' , respectively).
+%%
+%% With respect to orientation, the +`z' side of the disk is considered to be ``outside''
+%% (see {@link glu:quadricOrientation/2} ). This means that if the orientation is set to `?GLU_OUTSIDE'
+%% , then any normals generated point along the +`z' axis. Otherwise, they point along
+%% the -`z' axis.
+%%
+%% If texturing has been turned on (with {@link glu:quadricTexture/2} ), texture coordinates
+%% are generated linearly such that where r= outer, the value at (`r', 0, 0) is (1,
+%% 0.5), at (0, `r', 0) it is (0.5, 1), at (-`r', 0, 0) it is (0, 0.5), and at
+%% (0, -`r', 0) it is (0.5, 0).
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluDisk.xml">external</a> documentation.
+-spec disk(Quad, Inner, Outer, Slices, Loops) -> ok when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer().
disk(Quad,Inner,Outer,Slices,Loops) ->
cast(5019, <<Quad:?GLUquadric,Inner:?GLdouble,Outer:?GLdouble,Slices:?GLint,Loops:?GLint>>).
-%% @spec (Error::enum()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluErrorString.xml">external</a> documentation.
--spec errorString(enum()) -> string().
+%% @doc Produce an error string from a GL or GLU error code
+%%
+%% ``glu:errorString'' produces an error string from a GL or GLU error code. The string
+%% is in ISO Latin 1 format. For example, ``glu:errorString''(`?GLU_OUT_OF_MEMORY')
+%% returns the string `out of memory'.
+%%
+%% The standard GLU error codes are `?GLU_INVALID_ENUM', `?GLU_INVALID_VALUE',
+%% and `?GLU_OUT_OF_MEMORY'. Certain other GLU functions can return specialized error
+%% codes through callbacks. See the {@link gl:getError/0} reference page for the list of
+%% GL error codes.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluErrorString.xml">external</a> documentation.
+-spec errorString(Error) -> string() when Error :: enum().
errorString(Error) ->
call(5020, <<Error:?GLenum>>).
-%% @spec (Name::enum()) -> string()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluGetString.xml">external</a> documentation.
--spec getString(enum()) -> string().
+%% @doc Return a string describing the GLU version or GLU extensions
+%%
+%% ``glu:getString'' returns a pointer to a static string describing the GLU version or
+%% the GLU extensions that are supported.
+%%
+%% The version number is one of the following forms:
+%%
+%% `major_number.minor_number'`major_number.minor_number.release_number'.
+%%
+%% The version string is of the following form:
+%%
+%% `version number&lt;space&gt;vendor-specific information'
+%%
+%% Vendor-specific information is optional. Its format and contents depend on the implementation.
+%%
+%%
+%% The standard GLU contains a basic set of features and capabilities. If a company or group
+%% of companies wish to support other features, these may be included as extensions to the
+%% GLU. If `Name' is `?GLU_EXTENSIONS', then ``glu:getString'' returns a space-separated
+%% list of names of supported GLU extensions. (Extension names never contain spaces.)
+%%
+%% All strings are null-terminated.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluGetString.xml">external</a> documentation.
+-spec getString(Name) -> string() when Name :: enum().
getString(Name) ->
call(5021, <<Name:?GLenum>>).
-%% @spec (EyeX::float(),EyeY::float(),EyeZ::float(),CenterX::float(),CenterY::float(),CenterZ::float(),UpX::float(),UpY::float(),UpZ::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluLookAt.xml">external</a> documentation.
--spec lookAt(float(),float(),float(),float(),float(),float(),float(),float(),float()) -> ok.
+%% @doc Define a viewing transformation
+%%
+%% ``glu:lookAt'' creates a viewing matrix derived from an eye point, a reference point
+%% indicating the center of the scene, and an `UP' vector.
+%%
+%% The matrix maps the reference point to the negative `z' axis and the eye point to
+%% the origin. When a typical projection matrix is used, the center of the scene therefore
+%% maps to the center of the viewport. Similarly, the direction described by the `UP'
+%% vector projected onto the viewing plane is mapped to the positive `y' axis so that
+%% it points upward in the viewport. The `UP' vector must not be parallel to the line
+%% of sight from the eye point to the reference point.
+%%
+%% Let
+%%
+%% F=(centerX-eyeX centerY-eyeY centerZ-eyeZ)
+%%
+%% Let `UP' be the vector (upX upY upZ).
+%%
+%% Then normalize as follows: f= F/(||F||)
+%%
+%% UP"= UP/(||UP||)
+%%
+%% Finally, let s= f*UP", and u= s*f.
+%%
+%% M is then constructed as follows: M=(s[0] s[1] s[2] 0 u[0] u[1] u[2] 0-f[0]-f[1]-f[2] 0 0 0 0 1)
+%%
+%% and ``glu:lookAt'' is equivalent to glMultMatrixf(M); glTranslated(-eyex, -eyey,
+%% -eyez);
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluLookAt.xml">external</a> documentation.
+-spec lookAt(EyeX, EyeY, EyeZ, CenterX, CenterY, CenterZ, UpX, UpY, UpZ) -> ok when EyeX :: float(),EyeY :: float(),EyeZ :: float(),CenterX :: float(),CenterY :: float(),CenterZ :: float(),UpX :: float(),UpY :: float(),UpZ :: float().
lookAt(EyeX,EyeY,EyeZ,CenterX,CenterY,CenterZ,UpX,UpY,UpZ) ->
cast(5022, <<EyeX:?GLdouble,EyeY:?GLdouble,EyeZ:?GLdouble,CenterX:?GLdouble,CenterY:?GLdouble,CenterZ:?GLdouble,UpX:?GLdouble,UpY:?GLdouble,UpZ:?GLdouble>>).
-%% @spec () -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluNewQuadric.xml">external</a> documentation.
+%% @doc Create a quadrics object
+%%
+%% ``glu:newQuadric'' creates and returns a pointer to a new quadrics object. This object
+%% must be referred to when calling quadrics rendering and control functions. A return value
+%% of 0 means that there is not enough memory to allocate the object.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluNewQuadric.xml">external</a> documentation.
-spec newQuadric() -> integer().
newQuadric() ->
call(5023, <<>>).
-%% @spec (Left::float(),Right::float(),Bottom::float(),Top::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluOrtho2D.xml">external</a> documentation.
--spec ortho2D(float(),float(),float(),float()) -> ok.
+%% @doc Define a 2D orthographic projection matrix
+%%
+%% ``glu:ortho2D'' sets up a two-dimensional orthographic viewing region. This is equivalent
+%% to calling {@link gl:ortho/6} with near= -1 and far= 1.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluOrtho2D.xml">external</a> documentation.
+-spec ortho2D(Left, Right, Bottom, Top) -> ok when Left :: float(),Right :: float(),Bottom :: float(),Top :: float().
ortho2D(Left,Right,Bottom,Top) ->
cast(5024, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble>>).
-%% @spec (Quad::integer(),Inner::float(),Outer::float(),Slices::integer(),Loops::integer(),Start::float(),Sweep::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPartialDisk.xml">external</a> documentation.
--spec partialDisk(integer(),float(),float(),integer(),integer(),float(),float()) -> ok.
+%% @doc Draw an arc of a disk
+%%
+%% ``glu:partialDisk'' renders a partial disk on the z= 0 plane. A partial disk is similar
+%% to a full disk, except that only the subset of the disk from `Start' through `Start'
+%% + `Sweep' is included (where 0 degrees is along the +f2yf axis, 90 degrees along
+%% the +`x' axis, 180 degrees along the -`y' axis, and 270 degrees along the -`x'
+%% axis).
+%%
+%% The partial disk has a radius of `Outer' and contains a concentric circular hole
+%% with a radius of `Inner' . If `Inner' is 0, then no hole is generated. The partial
+%% disk is subdivided around the `z' axis into slices (like pizza slices) and also about
+%% the `z' axis into rings (as specified by `Slices' and `Loops' , respectively).
+%%
+%%
+%% With respect to orientation, the +`z' side of the partial disk is considered to
+%% be outside (see {@link glu:quadricOrientation/2} ). This means that if the orientation
+%% is set to `?GLU_OUTSIDE', then any normals generated point along the +`z' axis.
+%% Otherwise, they point along the -`z' axis.
+%%
+%% If texturing is turned on (with {@link glu:quadricTexture/2} ), texture coordinates are
+%% generated linearly such that where r= outer, the value at (`r', 0, 0) is (1.0,
+%% 0.5), at (0, `r', 0) it is (0.5, 1.0), at (-`r', 0, 0) it is (0.0, 0.5), and
+%% at (0, -`r', 0) it is (0.5, 0.0).
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPartialDisk.xml">external</a> documentation.
+-spec partialDisk(Quad, Inner, Outer, Slices, Loops, Start, Sweep) -> ok when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer(),Start :: float(),Sweep :: float().
partialDisk(Quad,Inner,Outer,Slices,Loops,Start,Sweep) ->
cast(5025, <<Quad:?GLUquadric,Inner:?GLdouble,Outer:?GLdouble,Slices:?GLint,Loops:?GLint,Start:?GLdouble,Sweep:?GLdouble>>).
-%% @spec (Fovy::float(),Aspect::float(),ZNear::float(),ZFar::float()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml">external</a> documentation.
--spec perspective(float(),float(),float(),float()) -> ok.
+%% @doc Set up a perspective projection matrix
+%%
+%% ``glu:perspective'' specifies a viewing frustum into the world coordinate system. In
+%% general, the aspect ratio in ``glu:perspective'' should match the aspect ratio of the
+%% associated viewport. For example, aspect= 2.0 means the viewer's angle of view is twice
+%% as wide in `x' as it is in `y'. If the viewport is twice as wide as it is tall,
+%% it displays the image without distortion.
+%%
+%% The matrix generated by ``glu:perspective'' is multipled by the current matrix, just
+%% as if {@link gl:multMatrixd/1} were called with the generated matrix. To load the perspective
+%% matrix onto the current matrix stack instead, precede the call to ``glu:perspective''
+%% with a call to {@link gl:loadIdentity/0} .
+%%
+%% Given `f' defined as follows:
+%%
+%% f= cotangent(fovy/2) The generated matrix is
+%%
+%% (f/aspect 0 0 0 0 f 0 0 0 0(zFar+zNear)/(zNear-zFar)(2*zFar*zNear)/(zNear-zFar) 0 0 -1 0)
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml">external</a> documentation.
+-spec perspective(Fovy, Aspect, ZNear, ZFar) -> ok when Fovy :: float(),Aspect :: float(),ZNear :: float(),ZFar :: float().
perspective(Fovy,Aspect,ZNear,ZFar) ->
cast(5026, <<Fovy:?GLdouble,Aspect:?GLdouble,ZNear:?GLdouble,ZFar:?GLdouble>>).
-%% @spec (X::float(),Y::float(),DelX::float(),DelY::float(),Viewport::{integer(),integer(),integer(),integer()}) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPickMatrix.xml">external</a> documentation.
--spec pickMatrix(float(),float(),float(),float(),{integer(),integer(),integer(),integer()}) -> ok.
+%% @doc Define a picking region
+%%
+%% ``glu:pickMatrix'' creates a projection matrix that can be used to restrict drawing
+%% to a small region of the viewport. This is typically useful to determine what objects
+%% are being drawn near the cursor. Use ``glu:pickMatrix'' to restrict drawing to a small
+%% region around the cursor. Then, enter selection mode (with {@link gl:renderMode/1} ) and
+%% rerender the scene. All primitives that would have been drawn near the cursor are identified
+%% and stored in the selection buffer.
+%%
+%% The matrix created by ``glu:pickMatrix'' is multiplied by the current matrix just as
+%% if {@link gl:multMatrixd/1} is called with the generated matrix. To effectively use the
+%% generated pick matrix for picking, first call {@link gl:loadIdentity/0} to load an identity
+%% matrix onto the perspective matrix stack. Then call ``glu:pickMatrix'', and, finally,
+%% call a command (such as {@link glu:perspective/4} ) to multiply the perspective matrix by
+%% the pick matrix.
+%%
+%% When using ``glu:pickMatrix'' to pick NURBS, be careful to turn off the NURBS property
+%% `?GLU_AUTO_LOAD_MATRIX'. If `?GLU_AUTO_LOAD_MATRIX' is not turned off, then
+%% any NURBS surface rendered is subdivided differently with the pick matrix than the way
+%% it was subdivided without the pick matrix.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPickMatrix.xml">external</a> documentation.
+-spec pickMatrix(X, Y, DelX, DelY, Viewport) -> ok when X :: float(),Y :: float(),DelX :: float(),DelY :: float(),Viewport :: {integer(),integer(),integer(),integer()}.
pickMatrix(X,Y,DelX,DelY,{V1,V2,V3,V4}) ->
cast(5027, <<X:?GLdouble,Y:?GLdouble,DelX:?GLdouble,DelY:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
-%% @spec (ObjX::float(),ObjY::float(),ObjZ::float(),Model::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},Proj::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},View::{integer(),integer(),integer(),integer()}) -> {integer(),WinX::float(),WinY::float(),WinZ::float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluProject.xml">external</a> documentation.
--spec project(float(),float(),float(),{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{integer(),integer(),integer(),integer()}) -> {integer(),float(),float(),float()}.
+%% @doc Map object coordinates to window coordinates
+%%
+%% ``glu:project'' transforms the specified object coordinates into window coordinates
+%% using `Model' , `Proj' , and `View' . The result is stored in `WinX' , `WinY'
+%% , and `WinZ' . A return value of `?GLU_TRUE' indicates success, a return value
+%% of `?GLU_FALSE' indicates failure.
+%%
+%% To compute the coordinates, let v=(objX objY objZ 1.0) represented as a matrix with 4 rows and 1 column.
+%% Then ``glu:project'' computes v" as follows:
+%%
+%% v"= P*M*v
+%%
+%% where P is the current projection matrix `Proj' and M is the current modelview
+%% matrix `Model' (both represented as 4*4 matrices in column-major order).
+%%
+%% The window coordinates are then computed as follows:
+%%
+%% winX= view(0)+view(2)*(v"(0)+1)/2
+%%
+%% winY= view(1)+view(3)*(v"(1)+1)/2
+%%
+%% winZ=(v"(2)+1)/2
+%%
+%%
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluProject.xml">external</a> documentation.
+-spec project(ObjX, ObjY, ObjZ, Model, Proj, View) -> {integer(),WinX :: float(),WinY :: float(),WinZ :: float()} when ObjX :: float(),ObjY :: float(),ObjZ :: float(),Model :: matrix(),Proj :: matrix(),View :: {integer(),integer(),integer(),integer()}.
project(ObjX,ObjY,ObjZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16},{V1,V2,V3,V4}) ->
call(5028, <<ObjX:?GLdouble,ObjY:?GLdouble,ObjZ:?GLdouble,M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble,P5:?GLdouble,P6:?GLdouble,P7:?GLdouble,P8:?GLdouble,P9:?GLdouble,P10:?GLdouble,P11:?GLdouble,P12:?GLdouble,P13:?GLdouble,P14:?GLdouble,P15:?GLdouble,P16:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>);
project(ObjX,ObjY,ObjZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12},{V1,V2,V3,V4}) ->
call(5028, <<ObjX:?GLdouble,ObjY:?GLdouble,ObjZ:?GLdouble,M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,0:?GLdouble,P4:?GLdouble,P5:?GLdouble,P6:?GLdouble,0:?GLdouble,P7:?GLdouble,P8:?GLdouble,P9:?GLdouble,0:?GLdouble,P10:?GLdouble,P11:?GLdouble,P12:?GLdouble,1:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
-%% @spec (Quad::integer(),Draw::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricDrawStyle.xml">external</a> documentation.
--spec quadricDrawStyle(integer(),enum()) -> ok.
+%% @doc Specify the draw style desired for quadrics
+%%
+%% ``glu:quadricDrawStyle'' specifies the draw style for quadrics rendered with `Quad' .
+%% The legal values are as follows:
+%%
+%% `?GLU_FILL': Quadrics are rendered with polygon primitives. The polygons are drawn
+%% in a counterclockwise fashion with respect to their normals (as defined with {@link glu:quadricOrientation/2}
+%% ).
+%%
+%% `?GLU_LINE': Quadrics are rendered as a set of lines.
+%%
+%% `?GLU_SILHOUETTE': Quadrics are rendered as a set of lines, except that edges separating
+%% coplanar faces will not be drawn.
+%%
+%% `?GLU_POINT': Quadrics are rendered as a set of points.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricDrawStyle.xml">external</a> documentation.
+-spec quadricDrawStyle(Quad, Draw) -> ok when Quad :: integer(),Draw :: enum().
quadricDrawStyle(Quad,Draw) ->
cast(5029, <<Quad:?GLUquadric,Draw:?GLenum>>).
-%% @spec (Quad::integer(),Normal::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricNormals.xml">external</a> documentation.
--spec quadricNormals(integer(),enum()) -> ok.
+%% @doc Specify what kind of normals are desired for quadrics
+%%
+%% ``glu:quadricNormals'' specifies what kind of normals are desired for quadrics rendered
+%% with `Quad' . The legal values are as follows:
+%%
+%% `?GLU_NONE': No normals are generated.
+%%
+%% `?GLU_FLAT': One normal is generated for every facet of a quadric.
+%%
+%% `?GLU_SMOOTH': One normal is generated for every vertex of a quadric. This is the
+%% initial value.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricNormals.xml">external</a> documentation.
+-spec quadricNormals(Quad, Normal) -> ok when Quad :: integer(),Normal :: enum().
quadricNormals(Quad,Normal) ->
cast(5030, <<Quad:?GLUquadric,Normal:?GLenum>>).
-%% @spec (Quad::integer(),Orientation::enum()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricOrientation.xml">external</a> documentation.
--spec quadricOrientation(integer(),enum()) -> ok.
+%% @doc Specify inside/outside orientation for quadrics
+%%
+%% ``glu:quadricOrientation'' specifies what kind of orientation is desired for quadrics
+%% rendered with `Quad' . The `Orientation' values are as follows:
+%%
+%% `?GLU_OUTSIDE': Quadrics are drawn with normals pointing outward (the initial value).
+%%
+%%
+%% `?GLU_INSIDE': Quadrics are drawn with normals pointing inward.
+%%
+%% Note that the interpretation of `outward' and `inward' depends on the quadric
+%% being drawn.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricOrientation.xml">external</a> documentation.
+-spec quadricOrientation(Quad, Orientation) -> ok when Quad :: integer(),Orientation :: enum().
quadricOrientation(Quad,Orientation) ->
cast(5031, <<Quad:?GLUquadric,Orientation:?GLenum>>).
-%% @spec (Quad::integer(),Texture::0|1) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricTexture.xml">external</a> documentation.
--spec quadricTexture(integer(),0|1) -> ok.
+%% @doc Specify if texturing is desired for quadrics
+%%
+%% ``glu:quadricTexture'' specifies if texture coordinates should be generated for quadrics
+%% rendered with `Quad' . If the value of `Texture' is `?GLU_TRUE', then texture
+%% coordinates are generated, and if `Texture' is `?GLU_FALSE', they are not.
+%% The initial value is `?GLU_FALSE'.
+%%
+%% The manner in which texture coordinates are generated depends upon the specific quadric
+%% rendered.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricTexture.xml">external</a> documentation.
+-spec quadricTexture(Quad, Texture) -> ok when Quad :: integer(),Texture :: 0|1.
quadricTexture(Quad,Texture) ->
cast(5032, <<Quad:?GLUquadric,Texture:?GLboolean>>).
-%% @spec (Format::enum(),WIn::integer(),HIn::integer(),TypeIn::enum(),DataIn::binary(),WOut::integer(),HOut::integer(),TypeOut::enum(),DataOut::mem()) -> integer()
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluScaleImage.xml">external</a> documentation.
--spec scaleImage(enum(),integer(),integer(),enum(),binary(),integer(),integer(),enum(),mem()) -> integer().
+%% @doc Scale an image to an arbitrary size
+%%
+%% ``glu:scaleImage'' scales a pixel image using the appropriate pixel store modes to
+%% unpack data from the source image and pack data into the destination image.
+%%
+%% When shrinking an image, ``glu:scaleImage'' uses a box filter to sample the source
+%% image and create pixels for the destination image. When magnifying an image, the pixels
+%% from the source image are linearly interpolated to create the destination image.
+%%
+%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
+%% ).
+%%
+%% See the {@link gl:readPixels/7} reference page for a description of the acceptable values
+%% for the `Format' , `TypeIn' , and `TypeOut' parameters.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluScaleImage.xml">external</a> documentation.
+-spec scaleImage(Format, WIn, HIn, TypeIn, DataIn, WOut, HOut, TypeOut, DataOut) -> integer() when Format :: enum(),WIn :: integer(),HIn :: integer(),TypeIn :: enum(),DataIn :: binary(),WOut :: integer(),HOut :: integer(),TypeOut :: enum(),DataOut :: mem().
scaleImage(Format,WIn,HIn,TypeIn,DataIn,WOut,HOut,TypeOut,DataOut) ->
send_bin(DataIn),
send_bin(DataOut),
call(5033, <<Format:?GLenum,WIn:?GLsizei,HIn:?GLsizei,TypeIn:?GLenum,WOut:?GLsizei,HOut:?GLsizei,TypeOut:?GLenum>>).
-%% @spec (Quad::integer(),Radius::float(),Slices::integer(),Stacks::integer()) -> ok
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluSphere.xml">external</a> documentation.
--spec sphere(integer(),float(),integer(),integer()) -> ok.
+%% @doc Draw a sphere
+%%
+%% ``glu:sphere'' draws a sphere of the given radius centered around the origin. The sphere
+%% is subdivided around the `z' axis into slices and along the `z' axis into
+%% stacks (similar to lines of longitude and latitude).
+%%
+%% If the orientation is set to `?GLU_OUTSIDE' (with {@link glu:quadricOrientation/2} ),
+%% then any normals generated point away from the center of the sphere. Otherwise, they
+%% point toward the center of the sphere.
+%%
+%% If texturing is turned on (with {@link glu:quadricTexture/2} ), then texture coordinates
+%% are generated so that `t' ranges from 0.0 at z=-radius to 1.0 at z= radius (`t'
+%% increases linearly along longitudinal lines), and `s' ranges from 0.0 at the +`y'
+%% axis, to 0.25 at the +`x' axis, to 0.5 at the -`y' axis, to 0.75 at the -`x'
+%% axis, and back to 1.0 at the +`y' axis.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluSphere.xml">external</a> documentation.
+-spec sphere(Quad, Radius, Slices, Stacks) -> ok when Quad :: integer(),Radius :: float(),Slices :: integer(),Stacks :: integer().
sphere(Quad,Radius,Slices,Stacks) ->
cast(5034, <<Quad:?GLUquadric,Radius:?GLdouble,Slices:?GLint,Stacks:?GLint>>).
-%% @spec (WinX::float(),WinY::float(),WinZ::float(),Model::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},Proj::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},View::{integer(),integer(),integer(),integer()}) -> {integer(),ObjX::float(),ObjY::float(),ObjZ::float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluUnProject.xml">external</a> documentation.
--spec unProject(float(),float(),float(),{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{integer(),integer(),integer(),integer()}) -> {integer(),float(),float(),float()}.
+%% @doc Map window coordinates to object coordinates
+%%
+%% ``glu:unProject'' maps the specified window coordinates into object coordinates using `Model'
+%% , `Proj' , and `View' . The result is stored in `ObjX' , `ObjY' , and `ObjZ'
+%% . A return value of `?GLU_TRUE' indicates success; a return value of `?GLU_FALSE'
+%% indicates failure.
+%%
+%% To compute the coordinates (objX objY objZ), ``glu:unProject'' multiplies the normalized device coordinates
+%% by the inverse of `Model' * `Proj' as follows:
+%%
+%% (objX objY objZ W)= INV(P M) ((2(winX-view[0]))/(view[2])-1(2(winY-view[1]))/(view[3])-1 2(winZ)-1 1) INV denotes matrix inversion. W is an unused variable, included for consistent
+%% matrix notation.
+%%
+%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluUnProject.xml">external</a> documentation.
+-spec unProject(WinX, WinY, WinZ, Model, Proj, View) -> {integer(),ObjX :: float(),ObjY :: float(),ObjZ :: float()} when WinX :: float(),WinY :: float(),WinZ :: float(),Model :: matrix(),Proj :: matrix(),View :: {integer(),integer(),integer(),integer()}.
unProject(WinX,WinY,WinZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16},{V1,V2,V3,V4}) ->
call(5035, <<WinX:?GLdouble,WinY:?GLdouble,WinZ:?GLdouble,M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble,P5:?GLdouble,P6:?GLdouble,P7:?GLdouble,P8:?GLdouble,P9:?GLdouble,P10:?GLdouble,P11:?GLdouble,P12:?GLdouble,P13:?GLdouble,P14:?GLdouble,P15:?GLdouble,P16:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>);
unProject(WinX,WinY,WinZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12},{V1,V2,V3,V4}) ->
call(5035, <<WinX:?GLdouble,WinY:?GLdouble,WinZ:?GLdouble,M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,0:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,0:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,0:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,1:?GLdouble,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,0:?GLdouble,P4:?GLdouble,P5:?GLdouble,P6:?GLdouble,0:?GLdouble,P7:?GLdouble,P8:?GLdouble,P9:?GLdouble,0:?GLdouble,P10:?GLdouble,P11:?GLdouble,P12:?GLdouble,1:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
-%% @spec (WinX::float(),WinY::float(),WinZ::float(),ClipW::float(),Model::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},Proj::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},View::{integer(),integer(),integer(),integer()},NearVal::float(),FarVal::float()) -> {integer(),ObjX::float(),ObjY::float(),ObjZ::float(),ObjW::float()}
-%% @doc See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluUnProject.xml">external</a> documentation.
--spec unProject4(float(),float(),float(),float(),{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{integer(),integer(),integer(),integer()},float(),float()) -> {integer(),float(),float(),float(),float()}.
+%% @doc
+%% See {@link unProject/6}
+-spec unProject4(WinX, WinY, WinZ, ClipW, Model, Proj, View, NearVal, FarVal) -> {integer(),ObjX :: float(),ObjY :: float(),ObjZ :: float(),ObjW :: float()} when WinX :: float(),WinY :: float(),WinZ :: float(),ClipW :: float(),Model :: matrix(),Proj :: matrix(),View :: {integer(),integer(),integer(),integer()},NearVal :: float(),FarVal :: float().
unProject4(WinX,WinY,WinZ,ClipW,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16},{V1,V2,V3,V4},NearVal,FarVal) ->
call(5036, <<WinX:?GLdouble,WinY:?GLdouble,WinZ:?GLdouble,ClipW:?GLdouble,M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble,P5:?GLdouble,P6:?GLdouble,P7:?GLdouble,P8:?GLdouble,P9:?GLdouble,P10:?GLdouble,P11:?GLdouble,P12:?GLdouble,P13:?GLdouble,P14:?GLdouble,P15:?GLdouble,P16:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint,NearVal:?GLdouble,FarVal:?GLdouble>>);
unProject4(WinX,WinY,WinZ,ClipW,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12},{V1,V2,V3,V4},NearVal,FarVal) ->
diff --git a/lib/wx/src/gen/wxAcceleratorEntry.erl b/lib/wx/src/gen/wxAcceleratorEntry.erl
index d76299b300..3cf50a2348 100644
--- a/lib/wx/src/gen/wxAcceleratorEntry.erl
+++ b/lib/wx/src/gen/wxAcceleratorEntry.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,24 +29,29 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxAcceleratorEntry/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxAcceleratorEntry()
+-type wxAcceleratorEntry() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxAcceleratorEntry().
+
new() ->
new([]).
-%% @spec (X::term()|wxAcceleratorEntry()) -> wxAcceleratorEntry()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxacceleratorentry.html#wxacceleratorentrywxacceleratorentry">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new([Option]) -> wxAcceleratorEntry() </c>
-%%<br /> Option = {flags, integer()} | {keyCode, integer()} | {cmd, integer()} | {item, wxMenuItem:wxMenuItem()}
-%% </p>
-%% <p><c>
-%% new(Entry::wxAcceleratorEntry()) -> wxAcceleratorEntry() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(Entry) -> wxAcceleratorEntry() when<br />
+%% Entry::wxAcceleratorEntry().<br />
+%%
+-spec new([Option]) -> wxAcceleratorEntry() when
+ Option :: {flags, integer()}
+ | {keyCode, integer()}
+ | {cmd, integer()}
+ | {item, wxMenuItem:wxMenuItem()};
+ (Entry) -> wxAcceleratorEntry() when
+ Entry::wxAcceleratorEntry().
new(Options)
when is_list(Options) ->
MOpts = fun({flags, Flags}, Acc) -> [<<1:32/?UI,Flags:32/?UI>>|Acc];
@@ -62,36 +67,42 @@ new(#wx_ref{type=EntryT,ref=EntryRef}) ->
wxe_util:construct(?wxAcceleratorEntry_new_1_1,
<<EntryRef:32/?UI>>).
-%% @spec (This::wxAcceleratorEntry()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxacceleratorentry.html#wxacceleratorentrygetcommand">external documentation</a>.
+-spec getCommand(This) -> integer() when
+ This::wxAcceleratorEntry().
getCommand(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAcceleratorEntry),
wxe_util:call(?wxAcceleratorEntry_GetCommand,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAcceleratorEntry()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxacceleratorentry.html#wxacceleratorentrygetflags">external documentation</a>.
+-spec getFlags(This) -> integer() when
+ This::wxAcceleratorEntry().
getFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAcceleratorEntry),
wxe_util:call(?wxAcceleratorEntry_GetFlags,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAcceleratorEntry()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxacceleratorentry.html#wxacceleratorentrygetkeycode">external documentation</a>.
+-spec getKeyCode(This) -> integer() when
+ This::wxAcceleratorEntry().
getKeyCode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAcceleratorEntry),
wxe_util:call(?wxAcceleratorEntry_GetKeyCode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAcceleratorEntry(), Flags::integer(), KeyCode::integer(), Cmd::integer()) -> ok
%% @equiv set(This,Flags,KeyCode,Cmd, [])
+-spec set(This, Flags, KeyCode, Cmd) -> ok when
+ This::wxAcceleratorEntry(), Flags::integer(), KeyCode::integer(), Cmd::integer().
+
set(This,Flags,KeyCode,Cmd)
when is_record(This, wx_ref),is_integer(Flags),is_integer(KeyCode),is_integer(Cmd) ->
set(This,Flags,KeyCode,Cmd, []).
-%% @spec (This::wxAcceleratorEntry(), Flags::integer(), KeyCode::integer(), Cmd::integer(), [Option]) -> ok
-%% Option = {item, wxMenuItem:wxMenuItem()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxacceleratorentry.html#wxacceleratorentryset">external documentation</a>.
+-spec set(This, Flags, KeyCode, Cmd, [Option]) -> ok when
+ This::wxAcceleratorEntry(), Flags::integer(), KeyCode::integer(), Cmd::integer(),
+ Option :: {item, wxMenuItem:wxMenuItem()}.
set(#wx_ref{type=ThisT,ref=ThisRef},Flags,KeyCode,Cmd, Options)
when is_integer(Flags),is_integer(KeyCode),is_integer(Cmd),is_list(Options) ->
?CLASS(ThisT,wxAcceleratorEntry),
@@ -101,8 +112,8 @@ set(#wx_ref{type=ThisT,ref=ThisRef},Flags,KeyCode,Cmd, Options)
wxe_util:cast(?wxAcceleratorEntry_Set,
<<ThisRef:32/?UI,Flags:32/?UI,KeyCode:32/?UI,Cmd:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxAcceleratorEntry()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxAcceleratorEntry()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAcceleratorEntry),
wxe_util:destroy(?wxAcceleratorEntry_destroy,Obj),
diff --git a/lib/wx/src/gen/wxAcceleratorTable.erl b/lib/wx/src/gen/wxAcceleratorTable.erl
index 5d070294e2..1b58cf3826 100644
--- a/lib/wx/src/gen/wxAcceleratorTable.erl
+++ b/lib/wx/src/gen/wxAcceleratorTable.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,17 +29,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxAcceleratorTable/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxAcceleratorTable()
+-type wxAcceleratorTable() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxacceleratortable.html#wxacceleratortablewxacceleratortable">external documentation</a>.
+-spec new() -> wxAcceleratorTable().
new() ->
wxe_util:construct(?wxAcceleratorTable_new_0,
<<>>).
-%% @spec (N::integer(), Entries::[wxAcceleratorEntry:wxAcceleratorEntry()]) -> wxAcceleratorTable()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxacceleratortable.html#wxacceleratortablewxacceleratortable">external documentation</a>.
+-spec new(N, Entries) -> wxAcceleratorTable() when
+ N::integer(), Entries::[wxAcceleratorEntry:wxAcceleratorEntry()].
new(N,Entries)
when is_integer(N),is_list(Entries) ->
[?CLASS(EntriesT,wxAcceleratorEntry) || #wx_ref{type=EntriesT} <- Entries],
@@ -47,15 +50,16 @@ new(N,Entries)
<<N:32/?UI,(length(Entries)):32/?UI,
(<< <<(C#wx_ref.ref):32/?UI>> || C <- Entries>>)/binary, 0:(((0+length(Entries)) rem 2)*32)>>).
-%% @spec (This::wxAcceleratorTable()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxacceleratortable.html#wxacceleratortableok">external documentation</a>.
+-spec ok(This) -> boolean() when
+ This::wxAcceleratorTable().
ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAcceleratorTable),
wxe_util:call(?wxAcceleratorTable_Ok,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAcceleratorTable()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxAcceleratorTable()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAcceleratorTable),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxArtProvider.erl b/lib/wx/src/gen/wxArtProvider.erl
index 1955bd2e29..1515c46f9f 100644
--- a/lib/wx/src/gen/wxArtProvider.erl
+++ b/lib/wx/src/gen/wxArtProvider.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,18 +29,24 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxArtProvider/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Id::string()) -> wxBitmap:wxBitmap()
+-type wxArtProvider() :: wx:wx_object().
%% @equiv getBitmap(Id, [])
+-spec getBitmap(Id) -> wxBitmap:wxBitmap() when
+ Id::unicode:chardata().
+
getBitmap(Id)
when is_list(Id) ->
getBitmap(Id, []).
-%% @spec (Id::string(), [Option]) -> wxBitmap:wxBitmap()
-%% Option = {client, string()} | {size, {W::integer(), H::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxartprovider.html#wxartprovidergetbitmap">external documentation</a>.
+-spec getBitmap(Id, [Option]) -> wxBitmap:wxBitmap() when
+ Id::unicode:chardata(),
+ Option :: {client, unicode:chardata()}
+ | {size, {W::integer(), H::integer()}}.
getBitmap(Id, Options)
when is_list(Id),is_list(Options) ->
Id_UC = unicode:characters_to_binary([Id,0]),
@@ -51,15 +57,19 @@ getBitmap(Id, Options)
wxe_util:call(?wxArtProvider_GetBitmap,
<<(byte_size(Id_UC)):32/?UI,(Id_UC)/binary, 0:(((8- ((4+byte_size(Id_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (Id::string()) -> wxIcon:wxIcon()
%% @equiv getIcon(Id, [])
+-spec getIcon(Id) -> wxIcon:wxIcon() when
+ Id::unicode:chardata().
+
getIcon(Id)
when is_list(Id) ->
getIcon(Id, []).
-%% @spec (Id::string(), [Option]) -> wxIcon:wxIcon()
-%% Option = {client, string()} | {size, {W::integer(), H::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxartprovider.html#wxartprovidergeticon">external documentation</a>.
+-spec getIcon(Id, [Option]) -> wxIcon:wxIcon() when
+ Id::unicode:chardata(),
+ Option :: {client, unicode:chardata()}
+ | {size, {W::integer(), H::integer()}}.
getIcon(Id, Options)
when is_list(Id),is_list(Options) ->
Id_UC = unicode:characters_to_binary([Id,0]),
diff --git a/lib/wx/src/gen/wxAuiDockArt.erl b/lib/wx/src/gen/wxAuiDockArt.erl
index f2be643dd9..d3cf1ebd0d 100644
--- a/lib/wx/src/gen/wxAuiDockArt.erl
+++ b/lib/wx/src/gen/wxAuiDockArt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,8 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxAuiDockArt/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxAuiDockArt() :: wx:wx_object().
diff --git a/lib/wx/src/gen/wxAuiManager.erl b/lib/wx/src/gen/wxAuiManager.erl
index 893867cec1..71e851f706 100644
--- a/lib/wx/src/gen/wxAuiManager.erl
+++ b/lib/wx/src/gen/wxAuiManager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,18 +37,22 @@
%% inherited exports
-export([connect/2,connect/3,disconnect/1,disconnect/2,disconnect/3,parent_class/1]).
+-export_type([wxAuiManager/0]).
%% @hidden
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxAuiManager()
+-type wxAuiManager() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxAuiManager().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxAuiManager()
-%% Option = {managed_wnd, wxWindow:wxWindow()} | {flags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagerwxauimanager">external documentation</a>.
+-spec new([Option]) -> wxAuiManager() when
+ Option :: {managed_wnd, wxWindow:wxWindow()}
+ | {flags, integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({managed_wnd, #wx_ref{type=Managed_wndT,ref=Managed_wndRef}}, Acc) -> ?CLASS(Managed_wndT,wxWindow),[<<1:32/?UI,Managed_wndRef:32/?UI>>|Acc];
@@ -58,22 +62,25 @@ new(Options)
wxe_util:construct(?wxAuiManager_new,
<<BinOpt/binary>>).
-%% @spec (This::wxAuiManager(), Window::wxWindow:wxWindow()) -> bool()
%% @equiv addPane(This,Window, [])
+-spec addPane(This, Window) -> boolean() when
+ This::wxAuiManager(), Window::wxWindow:wxWindow().
+
addPane(This,Window)
when is_record(This, wx_ref),is_record(Window, wx_ref) ->
addPane(This,Window, []).
-%% @spec (This::wxAuiManager(),Window::wxWindow:wxWindow(),X::term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanageraddpane">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% addPane(This::wxAuiManager(), Window::wxWindow:wxWindow(), [Option]) -> bool() </c>
-%%<br /> Option = {direction, integer()} | {caption, string()}
-%% </p>
-%% <p><c>
-%% addPane(This::wxAuiManager(), Window::wxWindow:wxWindow(), Pane_info::wxAuiPaneInfo:wxAuiPaneInfo()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% addPane(This, Window, Pane_info) -> boolean() when<br />
+%% This::wxAuiManager(), Window::wxWindow:wxWindow(), Pane_info::wxAuiPaneInfo:wxAuiPaneInfo().<br />
+%%
+-spec addPane(This, Window, [Option]) -> boolean() when
+ This::wxAuiManager(), Window::wxWindow:wxWindow(),
+ Option :: {direction, integer()}
+ | {caption, unicode:chardata()};
+ (This, Window, Pane_info) -> boolean() when
+ This::wxAuiManager(), Window::wxWindow:wxWindow(), Pane_info::wxAuiPaneInfo:wxAuiPaneInfo().
addPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiManager),
@@ -91,8 +98,9 @@ addPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_
wxe_util:call(?wxAuiManager_AddPane_2_1,
<<ThisRef:32/?UI,WindowRef:32/?UI,Pane_infoRef:32/?UI>>).
-%% @spec (This::wxAuiManager(), Window::wxWindow:wxWindow(), Pane_info::wxAuiPaneInfo:wxAuiPaneInfo(), Drop_pos::{X::integer(), Y::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanageraddpane">external documentation</a>.
+-spec addPane(This, Window, Pane_info, Drop_pos) -> boolean() when
+ This::wxAuiManager(), Window::wxWindow:wxWindow(), Pane_info::wxAuiPaneInfo:wxAuiPaneInfo(), Drop_pos::{X::integer(), Y::integer()}.
addPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=Pane_infoT,ref=Pane_infoRef},{Drop_posX,Drop_posY})
when is_integer(Drop_posX),is_integer(Drop_posY) ->
?CLASS(ThisT,wxAuiManager),
@@ -101,65 +109,72 @@ addPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_
wxe_util:call(?wxAuiManager_AddPane_3,
<<ThisRef:32/?UI,WindowRef:32/?UI,Pane_infoRef:32/?UI,Drop_posX:32/?UI,Drop_posY:32/?UI>>).
-%% @spec (This::wxAuiManager(), Window::wxWindow:wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagerdetachpane">external documentation</a>.
+-spec detachPane(This, Window) -> boolean() when
+ This::wxAuiManager(), Window::wxWindow:wxWindow().
detachPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxAuiManager),
?CLASS(WindowT,wxWindow),
wxe_util:call(?wxAuiManager_DetachPane,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> wxAuiPaneInfoArray:wxAuiPaneInfoArray()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagergetallpanes">external documentation</a>.
+-spec getAllPanes(This) -> wx:wx_object() when
+ This::wxAuiManager().
getAllPanes(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:call(?wxAuiManager_GetAllPanes,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> wxAuiDockArt:wxAuiDockArt()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagergetartprovider">external documentation</a>.
+-spec getArtProvider(This) -> wxAuiDockArt:wxAuiDockArt() when
+ This::wxAuiManager().
getArtProvider(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:call(?wxAuiManager_GetArtProvider,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> {Width_pct::float(), Height_pct::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagergetdocksizeconstraint">external documentation</a>.
+-spec getDockSizeConstraint(This) -> {Width_pct::number(), Height_pct::number()} when
+ This::wxAuiManager().
getDockSizeConstraint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:call(?wxAuiManager_GetDockSizeConstraint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagergetflags">external documentation</a>.
+-spec getFlags(This) -> integer() when
+ This::wxAuiManager().
getFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:call(?wxAuiManager_GetFlags,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagergetmanagedwindow">external documentation</a>.
+-spec getManagedWindow(This) -> wxWindow:wxWindow() when
+ This::wxAuiManager().
getManagedWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:call(?wxAuiManager_GetManagedWindow,
<<ThisRef:32/?UI>>).
-%% @spec (Window::wxWindow:wxWindow()) -> wxAuiManager()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagergetmanager">external documentation</a>.
+-spec getManager(Window) -> wxAuiManager() when
+ Window::wxWindow:wxWindow().
getManager(#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(WindowT,wxWindow),
wxe_util:call(?wxAuiManager_GetManager,
<<WindowRef:32/?UI>>).
-%% @spec (This::wxAuiManager(),X::string()|term()) -> wxAuiPaneInfo:wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagergetpane">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% getPane(This::wxAuiManager(), Name::string()) -> wxAuiPaneInfo:wxAuiPaneInfo() </c>
-%% </p>
-%% <p><c>
-%% getPane(This::wxAuiManager(), Window::wxWindow:wxWindow()) -> wxAuiPaneInfo:wxAuiPaneInfo() </c>
-%% </p>
+%% <br /> Also:<br />
+%% getPane(This, Window) -> wxAuiPaneInfo:wxAuiPaneInfo() when<br />
+%% This::wxAuiManager(), Window::wxWindow:wxWindow().<br />
+%%
+-spec getPane(This, Name) -> wxAuiPaneInfo:wxAuiPaneInfo() when
+ This::wxAuiManager(), Name::unicode:chardata();
+ (This, Window) -> wxAuiPaneInfo:wxAuiPaneInfo() when
+ This::wxAuiManager(), Window::wxWindow:wxWindow().
getPane(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxAuiManager),
@@ -172,22 +187,26 @@ getPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
wxe_util:call(?wxAuiManager_GetPane_1_1,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagerhidehint">external documentation</a>.
+-spec hideHint(This) -> ok when
+ This::wxAuiManager().
hideHint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:cast(?wxAuiManager_HideHint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManager(), Window::wxWindow:wxWindow(), Insert_location::wxAuiPaneInfo:wxAuiPaneInfo()) -> bool()
%% @equiv insertPane(This,Window,Insert_location, [])
+-spec insertPane(This, Window, Insert_location) -> boolean() when
+ This::wxAuiManager(), Window::wxWindow:wxWindow(), Insert_location::wxAuiPaneInfo:wxAuiPaneInfo().
+
insertPane(This,Window,Insert_location)
when is_record(This, wx_ref),is_record(Window, wx_ref),is_record(Insert_location, wx_ref) ->
insertPane(This,Window,Insert_location, []).
-%% @spec (This::wxAuiManager(), Window::wxWindow:wxWindow(), Insert_location::wxAuiPaneInfo:wxAuiPaneInfo(), [Option]) -> bool()
-%% Option = {insert_level, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagerinsertpane">external documentation</a>.
+-spec insertPane(This, Window, Insert_location, [Option]) -> boolean() when
+ This::wxAuiManager(), Window::wxWindow:wxWindow(), Insert_location::wxAuiPaneInfo:wxAuiPaneInfo(),
+ Option :: {insert_level, integer()}.
insertPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=Insert_locationT,ref=Insert_locationRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiManager),
@@ -199,8 +218,9 @@ insertPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#
wxe_util:call(?wxAuiManager_InsertPane,
<<ThisRef:32/?UI,WindowRef:32/?UI,Insert_locationRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiManager(), Pane_part::string(), Pane::wxAuiPaneInfo:wxAuiPaneInfo()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagerloadpaneinfo">external documentation</a>.
+-spec loadPaneInfo(This, Pane_part, Pane) -> ok when
+ This::wxAuiManager(), Pane_part::unicode:chardata(), Pane::wxAuiPaneInfo:wxAuiPaneInfo().
loadPaneInfo(#wx_ref{type=ThisT,ref=ThisRef},Pane_part,#wx_ref{type=PaneT,ref=PaneRef})
when is_list(Pane_part) ->
?CLASS(ThisT,wxAuiManager),
@@ -209,15 +229,18 @@ loadPaneInfo(#wx_ref{type=ThisT,ref=ThisRef},Pane_part,#wx_ref{type=PaneT,ref=Pa
wxe_util:cast(?wxAuiManager_LoadPaneInfo,
<<ThisRef:32/?UI,(byte_size(Pane_part_UC)):32/?UI,(Pane_part_UC)/binary, 0:(((8- ((0+byte_size(Pane_part_UC)) band 16#7)) band 16#7))/unit:8,PaneRef:32/?UI>>).
-%% @spec (This::wxAuiManager(), Perspective::string()) -> bool()
%% @equiv loadPerspective(This,Perspective, [])
+-spec loadPerspective(This, Perspective) -> boolean() when
+ This::wxAuiManager(), Perspective::unicode:chardata().
+
loadPerspective(This,Perspective)
when is_record(This, wx_ref),is_list(Perspective) ->
loadPerspective(This,Perspective, []).
-%% @spec (This::wxAuiManager(), Perspective::string(), [Option]) -> bool()
-%% Option = {update, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagerloadperspective">external documentation</a>.
+-spec loadPerspective(This, Perspective, [Option]) -> boolean() when
+ This::wxAuiManager(), Perspective::unicode:chardata(),
+ Option :: {update, boolean()}.
loadPerspective(#wx_ref{type=ThisT,ref=ThisRef},Perspective, Options)
when is_list(Perspective),is_list(Options) ->
?CLASS(ThisT,wxAuiManager),
@@ -228,77 +251,86 @@ loadPerspective(#wx_ref{type=ThisT,ref=ThisRef},Perspective, Options)
wxe_util:call(?wxAuiManager_LoadPerspective,
<<ThisRef:32/?UI,(byte_size(Perspective_UC)):32/?UI,(Perspective_UC)/binary, 0:(((8- ((0+byte_size(Perspective_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxAuiManager(), Pane::wxAuiPaneInfo:wxAuiPaneInfo()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagersavepaneinfo">external documentation</a>.
+-spec savePaneInfo(This, Pane) -> unicode:charlist() when
+ This::wxAuiManager(), Pane::wxAuiPaneInfo:wxAuiPaneInfo().
savePaneInfo(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaneT,ref=PaneRef}) ->
?CLASS(ThisT,wxAuiManager),
?CLASS(PaneT,wxAuiPaneInfo),
wxe_util:call(?wxAuiManager_SavePaneInfo,
<<ThisRef:32/?UI,PaneRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagersaveperspective">external documentation</a>.
+-spec savePerspective(This) -> unicode:charlist() when
+ This::wxAuiManager().
savePerspective(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:call(?wxAuiManager_SavePerspective,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManager(), Art_provider::wxAuiDockArt:wxAuiDockArt()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagersetartprovider">external documentation</a>.
+-spec setArtProvider(This, Art_provider) -> ok when
+ This::wxAuiManager(), Art_provider::wxAuiDockArt:wxAuiDockArt().
setArtProvider(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Art_providerT,ref=Art_providerRef}) ->
?CLASS(ThisT,wxAuiManager),
?CLASS(Art_providerT,wxAuiDockArt),
wxe_util:cast(?wxAuiManager_SetArtProvider,
<<ThisRef:32/?UI,Art_providerRef:32/?UI>>).
-%% @spec (This::wxAuiManager(), Width_pct::float(), Height_pct::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagersetdocksizeconstraint">external documentation</a>.
+-spec setDockSizeConstraint(This, Width_pct, Height_pct) -> ok when
+ This::wxAuiManager(), Width_pct::number(), Height_pct::number().
setDockSizeConstraint(#wx_ref{type=ThisT,ref=ThisRef},Width_pct,Height_pct)
- when is_float(Width_pct),is_float(Height_pct) ->
+ when is_number(Width_pct),is_number(Height_pct) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:cast(?wxAuiManager_SetDockSizeConstraint,
<<ThisRef:32/?UI,0:32,Width_pct:64/?F,Height_pct:64/?F>>).
-%% @spec (This::wxAuiManager(), Flags::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagersetflags">external documentation</a>.
+-spec setFlags(This, Flags) -> ok when
+ This::wxAuiManager(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:cast(?wxAuiManager_SetFlags,
<<ThisRef:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxAuiManager(), Managed_wnd::wxWindow:wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagersetmanagedwindow">external documentation</a>.
+-spec setManagedWindow(This, Managed_wnd) -> ok when
+ This::wxAuiManager(), Managed_wnd::wxWindow:wxWindow().
setManagedWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Managed_wndT,ref=Managed_wndRef}) ->
?CLASS(ThisT,wxAuiManager),
?CLASS(Managed_wndT,wxWindow),
wxe_util:cast(?wxAuiManager_SetManagedWindow,
<<ThisRef:32/?UI,Managed_wndRef:32/?UI>>).
-%% @spec (This::wxAuiManager(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagershowhint">external documentation</a>.
+-spec showHint(This, Rect) -> ok when
+ This::wxAuiManager(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
showHint(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:cast(?wxAuiManager_ShowHint,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanageruninit">external documentation</a>.
+-spec unInit(This) -> ok when
+ This::wxAuiManager().
unInit(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:cast(?wxAuiManager_UnInit,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanager.html#wxauimanagerupdate">external documentation</a>.
+-spec update(This) -> ok when
+ This::wxAuiManager().
update(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
wxe_util:cast(?wxAuiManager_Update,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManager()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxAuiManager()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAuiManager),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxAuiManagerEvent.erl b/lib/wx/src/gen/wxAuiManagerEvent.erl
index b5e45f1860..feb3931696 100644
--- a/lib/wx/src/gen/wxAuiManagerEvent.erl
+++ b/lib/wx/src/gen/wxAuiManagerEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,79 +38,92 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxAuiManagerEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxAuiManagerEvent(), Mgr::wxAuiManager:wxAuiManager()) -> ok
+-type wxAuiManagerEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventsetmanager">external documentation</a>.
+-spec setManager(This, Mgr) -> ok when
+ This::wxAuiManagerEvent(), Mgr::wxAuiManager:wxAuiManager().
setManager(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MgrT,ref=MgrRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
?CLASS(MgrT,wxAuiManager),
wxe_util:cast(?wxAuiManagerEvent_SetManager,
<<ThisRef:32/?UI,MgrRef:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent()) -> wxAuiManager:wxAuiManager()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventgetmanager">external documentation</a>.
+-spec getManager(This) -> wxAuiManager:wxAuiManager() when
+ This::wxAuiManagerEvent().
getManager(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
wxe_util:call(?wxAuiManagerEvent_GetManager,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent(), P::wxAuiPaneInfo:wxAuiPaneInfo()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventsetpane">external documentation</a>.
+-spec setPane(This, P) -> ok when
+ This::wxAuiManagerEvent(), P::wxAuiPaneInfo:wxAuiPaneInfo().
setPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PT,ref=PRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
?CLASS(PT,wxAuiPaneInfo),
wxe_util:cast(?wxAuiManagerEvent_SetPane,
<<ThisRef:32/?UI,PRef:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent()) -> wxAuiPaneInfo:wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventgetpane">external documentation</a>.
+-spec getPane(This) -> wxAuiPaneInfo:wxAuiPaneInfo() when
+ This::wxAuiManagerEvent().
getPane(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
wxe_util:call(?wxAuiManagerEvent_GetPane,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent(), B::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventsetbutton">external documentation</a>.
+-spec setButton(This, B) -> ok when
+ This::wxAuiManagerEvent(), B::integer().
setButton(#wx_ref{type=ThisT,ref=ThisRef},B)
when is_integer(B) ->
?CLASS(ThisT,wxAuiManagerEvent),
wxe_util:cast(?wxAuiManagerEvent_SetButton,
<<ThisRef:32/?UI,B:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventgetbutton">external documentation</a>.
+-spec getButton(This) -> integer() when
+ This::wxAuiManagerEvent().
getButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
wxe_util:call(?wxAuiManagerEvent_GetButton,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent(), Pdc::wxDC:wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventsetdc">external documentation</a>.
+-spec setDC(This, Pdc) -> ok when
+ This::wxAuiManagerEvent(), Pdc::wxDC:wxDC().
setDC(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PdcT,ref=PdcRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
?CLASS(PdcT,wxDC),
wxe_util:cast(?wxAuiManagerEvent_SetDC,
<<ThisRef:32/?UI,PdcRef:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent()) -> wxDC:wxDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventgetdc">external documentation</a>.
+-spec getDC(This) -> wxDC:wxDC() when
+ This::wxAuiManagerEvent().
getDC(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
wxe_util:call(?wxAuiManagerEvent_GetDC,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent()) -> ok
%% @equiv veto(This, [])
+-spec veto(This) -> ok when
+ This::wxAuiManagerEvent().
+
veto(This)
when is_record(This, wx_ref) ->
veto(This, []).
-%% @spec (This::wxAuiManagerEvent(), [Option]) -> ok
-%% Option = {veto, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventveto">external documentation</a>.
+-spec veto(This, [Option]) -> ok when
+ This::wxAuiManagerEvent(),
+ Option :: {veto, boolean()}.
veto(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiManagerEvent),
@@ -120,23 +133,26 @@ veto(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxAuiManagerEvent_Veto,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiManagerEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventgetveto">external documentation</a>.
+-spec getVeto(This) -> boolean() when
+ This::wxAuiManagerEvent().
getVeto(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
wxe_util:call(?wxAuiManagerEvent_GetVeto,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiManagerEvent(), Can_veto::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventsetcanveto">external documentation</a>.
+-spec setCanVeto(This, Can_veto) -> ok when
+ This::wxAuiManagerEvent(), Can_veto::boolean().
setCanVeto(#wx_ref{type=ThisT,ref=ThisRef},Can_veto)
when is_boolean(Can_veto) ->
?CLASS(ThisT,wxAuiManagerEvent),
wxe_util:cast(?wxAuiManagerEvent_SetCanVeto,
<<ThisRef:32/?UI,(wxe_util:from_bool(Can_veto)):32/?UI>>).
-%% @spec (This::wxAuiManagerEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauimanagerevent.html#wxauimanagereventcanveto">external documentation</a>.
+-spec canVeto(This) -> boolean() when
+ This::wxAuiManagerEvent().
canVeto(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
wxe_util:call(?wxAuiManagerEvent_CanVeto,
diff --git a/lib/wx/src/gen/wxAuiNotebook.erl b/lib/wx/src/gen/wxAuiNotebook.erl
index 5862bb26c7..afb599738f 100644
--- a/lib/wx/src/gen/wxAuiNotebook.erl
+++ b/lib/wx/src/gen/wxAuiNotebook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -73,27 +73,35 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxAuiNotebook/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxAuiNotebook()
+-type wxAuiNotebook() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookwxauinotebook">external documentation</a>.
+-spec new() -> wxAuiNotebook().
new() ->
wxe_util:construct(?wxAuiNotebook_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxAuiNotebook()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxAuiNotebook() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxAuiNotebook()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookwxauinotebook">external documentation</a>.
+-spec new(Parent, [Option]) -> wxAuiNotebook() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -106,15 +114,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxAuiNotebook_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiNotebook(), Page::wxWindow:wxWindow(), Caption::string()) -> bool()
%% @equiv addPage(This,Page,Caption, [])
+-spec addPage(This, Page, Caption) -> boolean() when
+ This::wxAuiNotebook(), Page::wxWindow:wxWindow(), Caption::unicode:chardata().
+
addPage(This,Page,Caption)
when is_record(This, wx_ref),is_record(Page, wx_ref),is_list(Caption) ->
addPage(This,Page,Caption, []).
-%% @spec (This::wxAuiNotebook(), Page::wxWindow:wxWindow(), Caption::string(), [Option]) -> bool()
-%% Option = {select, bool()} | {bitmap, wxBitmap:wxBitmap()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookaddpage">external documentation</a>.
+-spec addPage(This, Page, Caption, [Option]) -> boolean() when
+ This::wxAuiNotebook(), Page::wxWindow:wxWindow(), Caption::unicode:chardata(),
+ Option :: {select, boolean()}
+ | {bitmap, wxBitmap:wxBitmap()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Caption, Options)
when is_list(Caption),is_list(Options) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -127,15 +139,21 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Caption,
wxe_util:call(?wxAuiNotebook_AddPage,
<<ThisRef:32/?UI,PageRef:32/?UI,(byte_size(Caption_UC)):32/?UI,(Caption_UC)/binary, 0:(((8- ((4+byte_size(Caption_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxAuiNotebook(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxAuiNotebook(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxAuiNotebook(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxAuiNotebook(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -149,76 +167,88 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxAuiNotebook_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxAuiNotebook(), Page::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookdeletepage">external documentation</a>.
+-spec deletePage(This, Page) -> boolean() when
+ This::wxAuiNotebook(), Page::integer().
deletePage(#wx_ref{type=ThisT,ref=ThisRef},Page)
when is_integer(Page) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_DeletePage,
<<ThisRef:32/?UI,Page:32/?UI>>).
-%% @spec (This::wxAuiNotebook()) -> wxAuiTabArt:wxAuiTabArt()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookgetartprovider">external documentation</a>.
+-spec getArtProvider(This) -> wxAuiTabArt:wxAuiTabArt() when
+ This::wxAuiNotebook().
getArtProvider(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_GetArtProvider,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Page_idx::integer()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookgetpage">external documentation</a>.
+-spec getPage(This, Page_idx) -> wxWindow:wxWindow() when
+ This::wxAuiNotebook(), Page_idx::integer().
getPage(#wx_ref{type=ThisT,ref=ThisRef},Page_idx)
when is_integer(Page_idx) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_GetPage,
<<ThisRef:32/?UI,Page_idx:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Page_idx::integer()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookgetpagebitmap">external documentation</a>.
+-spec getPageBitmap(This, Page_idx) -> wxBitmap:wxBitmap() when
+ This::wxAuiNotebook(), Page_idx::integer().
getPageBitmap(#wx_ref{type=ThisT,ref=ThisRef},Page_idx)
when is_integer(Page_idx) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_GetPageBitmap,
<<ThisRef:32/?UI,Page_idx:32/?UI>>).
-%% @spec (This::wxAuiNotebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookgetpagecount">external documentation</a>.
+-spec getPageCount(This) -> integer() when
+ This::wxAuiNotebook().
getPageCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_GetPageCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Page_wnd::wxWindow:wxWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookgetpageindex">external documentation</a>.
+-spec getPageIndex(This, Page_wnd) -> integer() when
+ This::wxAuiNotebook(), Page_wnd::wxWindow:wxWindow().
getPageIndex(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Page_wndT,ref=Page_wndRef}) ->
?CLASS(ThisT,wxAuiNotebook),
?CLASS(Page_wndT,wxWindow),
wxe_util:call(?wxAuiNotebook_GetPageIndex,
<<ThisRef:32/?UI,Page_wndRef:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Page_idx::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookgetpagetext">external documentation</a>.
+-spec getPageText(This, Page_idx) -> unicode:charlist() when
+ This::wxAuiNotebook(), Page_idx::integer().
getPageText(#wx_ref{type=ThisT,ref=ThisRef},Page_idx)
when is_integer(Page_idx) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_GetPageText,
<<ThisRef:32/?UI,Page_idx:32/?UI>>).
-%% @spec (This::wxAuiNotebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxAuiNotebook().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Page_idx::integer(), Page::wxWindow:wxWindow(), Caption::string()) -> bool()
%% @equiv insertPage(This,Page_idx,Page,Caption, [])
+-spec insertPage(This, Page_idx, Page, Caption) -> boolean() when
+ This::wxAuiNotebook(), Page_idx::integer(), Page::wxWindow:wxWindow(), Caption::unicode:chardata().
+
insertPage(This,Page_idx,Page,Caption)
when is_record(This, wx_ref),is_integer(Page_idx),is_record(Page, wx_ref),is_list(Caption) ->
insertPage(This,Page_idx,Page,Caption, []).
-%% @spec (This::wxAuiNotebook(), Page_idx::integer(), Page::wxWindow:wxWindow(), Caption::string(), [Option]) -> bool()
-%% Option = {select, bool()} | {bitmap, wxBitmap:wxBitmap()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookinsertpage">external documentation</a>.
+-spec insertPage(This, Page_idx, Page, Caption, [Option]) -> boolean() when
+ This::wxAuiNotebook(), Page_idx::integer(), Page::wxWindow:wxWindow(), Caption::unicode:chardata(),
+ Option :: {select, boolean()}
+ | {bitmap, wxBitmap:wxBitmap()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},Page_idx,#wx_ref{type=PageT,ref=PageRef},Caption, Options)
when is_integer(Page_idx),is_list(Caption),is_list(Options) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -231,32 +261,36 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},Page_idx,#wx_ref{type=PageT,ref=PageR
wxe_util:call(?wxAuiNotebook_InsertPage,
<<ThisRef:32/?UI,Page_idx:32/?UI,PageRef:32/?UI,(byte_size(Caption_UC)):32/?UI,(Caption_UC)/binary, 0:(((8- ((0+byte_size(Caption_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxAuiNotebook(), Page::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebookremovepage">external documentation</a>.
+-spec removePage(This, Page) -> boolean() when
+ This::wxAuiNotebook(), Page::integer().
removePage(#wx_ref{type=ThisT,ref=ThisRef},Page)
when is_integer(Page) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_RemovePage,
<<ThisRef:32/?UI,Page:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Art::wxAuiTabArt:wxAuiTabArt()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebooksetartprovider">external documentation</a>.
+-spec setArtProvider(This, Art) -> ok when
+ This::wxAuiNotebook(), Art::wxAuiTabArt:wxAuiTabArt().
setArtProvider(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ArtT,ref=ArtRef}) ->
?CLASS(ThisT,wxAuiNotebook),
?CLASS(ArtT,wxAuiTabArt),
wxe_util:cast(?wxAuiNotebook_SetArtProvider,
<<ThisRef:32/?UI,ArtRef:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Font::wxFont:wxFont()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebooksetfont">external documentation</a>.
+-spec setFont(This, Font) -> boolean() when
+ This::wxAuiNotebook(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxAuiNotebook),
?CLASS(FontT,wxFont),
wxe_util:call(?wxAuiNotebook_SetFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Page::integer(), Bitmap::wxBitmap:wxBitmap()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebooksetpagebitmap">external documentation</a>.
+-spec setPageBitmap(This, Page, Bitmap) -> boolean() when
+ This::wxAuiNotebook(), Page::integer(), Bitmap::wxBitmap:wxBitmap().
setPageBitmap(#wx_ref{type=ThisT,ref=ThisRef},Page,#wx_ref{type=BitmapT,ref=BitmapRef})
when is_integer(Page) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -264,8 +298,9 @@ setPageBitmap(#wx_ref{type=ThisT,ref=ThisRef},Page,#wx_ref{type=BitmapT,ref=Bitm
wxe_util:call(?wxAuiNotebook_SetPageBitmap,
<<ThisRef:32/?UI,Page:32/?UI,BitmapRef:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Page::integer(), Text::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebooksetpagetext">external documentation</a>.
+-spec setPageText(This, Page, Text) -> boolean() when
+ This::wxAuiNotebook(), Page::integer(), Text::unicode:chardata().
setPageText(#wx_ref{type=ThisT,ref=ThisRef},Page,Text)
when is_integer(Page),is_list(Text) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -273,32 +308,35 @@ setPageText(#wx_ref{type=ThisT,ref=ThisRef},Page,Text)
wxe_util:call(?wxAuiNotebook_SetPageText,
<<ThisRef:32/?UI,Page:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxAuiNotebook(), New_page::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebooksetselection">external documentation</a>.
+-spec setSelection(This, New_page) -> integer() when
+ This::wxAuiNotebook(), New_page::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},New_page)
when is_integer(New_page) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:call(?wxAuiNotebook_SetSelection,
<<ThisRef:32/?UI,New_page:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebooksettabctrlheight">external documentation</a>.
+-spec setTabCtrlHeight(This, Height) -> ok when
+ This::wxAuiNotebook(), Height::integer().
setTabCtrlHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
when is_integer(Height) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:cast(?wxAuiNotebook_SetTabCtrlHeight,
<<ThisRef:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxAuiNotebook(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebook.html#wxauinotebooksetuniformbitmapsize">external documentation</a>.
+-spec setUniformBitmapSize(This, Size) -> ok when
+ This::wxAuiNotebook(), Size::{W::integer(), H::integer()}.
setUniformBitmapSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxAuiNotebook),
wxe_util:cast(?wxAuiNotebook_SetUniformBitmapSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxAuiNotebook()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxAuiNotebook()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAuiNotebook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxAuiNotebookEvent.erl b/lib/wx/src/gen/wxAuiNotebookEvent.erl
index 09a2abf214..6a86464369 100644
--- a/lib/wx/src/gen/wxAuiNotebookEvent.erl
+++ b/lib/wx/src/gen/wxAuiNotebookEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,52 +42,60 @@
isSelection/1,parent_class/1,resumePropagation/2,setInt/2,setString/2,
shouldPropagate/1,skip/1,skip/2,stopPropagation/1,veto/1]).
+-export_type([wxAuiNotebookEvent/0]).
%% @hidden
parent_class(wxNotifyEvent) -> true;
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxAuiNotebookEvent(), S::integer()) -> ok
+-type wxAuiNotebookEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebookevent.html#wxauinotebookeventsetselection">external documentation</a>.
+-spec setSelection(This, S) -> ok when
+ This::wxAuiNotebookEvent(), S::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_integer(S) ->
?CLASS(ThisT,wxAuiNotebookEvent),
wxe_util:cast(?wxAuiNotebookEvent_SetSelection,
<<ThisRef:32/?UI,S:32/?UI>>).
-%% @spec (This::wxAuiNotebookEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebookevent.html#wxauinotebookeventgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxAuiNotebookEvent().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiNotebookEvent),
wxe_util:call(?wxAuiNotebookEvent_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiNotebookEvent(), S::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebookevent.html#wxauinotebookeventsetoldselection">external documentation</a>.
+-spec setOldSelection(This, S) -> ok when
+ This::wxAuiNotebookEvent(), S::integer().
setOldSelection(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_integer(S) ->
?CLASS(ThisT,wxAuiNotebookEvent),
wxe_util:cast(?wxAuiNotebookEvent_SetOldSelection,
<<ThisRef:32/?UI,S:32/?UI>>).
-%% @spec (This::wxAuiNotebookEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebookevent.html#wxauinotebookeventgetoldselection">external documentation</a>.
+-spec getOldSelection(This) -> integer() when
+ This::wxAuiNotebookEvent().
getOldSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiNotebookEvent),
wxe_util:call(?wxAuiNotebookEvent_GetOldSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiNotebookEvent(), S::wxAuiNotebook:wxAuiNotebook()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebookevent.html#wxauinotebookeventsetdragsource">external documentation</a>.
+-spec setDragSource(This, S) -> ok when
+ This::wxAuiNotebookEvent(), S::wxAuiNotebook:wxAuiNotebook().
setDragSource(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ST,ref=SRef}) ->
?CLASS(ThisT,wxAuiNotebookEvent),
?CLASS(ST,wxAuiNotebook),
wxe_util:cast(?wxAuiNotebookEvent_SetDragSource,
<<ThisRef:32/?UI,SRef:32/?UI>>).
-%% @spec (This::wxAuiNotebookEvent()) -> wxAuiNotebook:wxAuiNotebook()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauinotebookevent.html#wxauinotebookeventgetdragsource">external documentation</a>.
+-spec getDragSource(This) -> wxAuiNotebook:wxAuiNotebook() when
+ This::wxAuiNotebookEvent().
getDragSource(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiNotebookEvent),
wxe_util:call(?wxAuiNotebookEvent_GetDragSource,
diff --git a/lib/wx/src/gen/wxAuiPaneInfo.erl b/lib/wx/src/gen/wxAuiPaneInfo.erl
index b15f91c675..d59a8e8676 100644
--- a/lib/wx/src/gen/wxAuiPaneInfo.erl
+++ b/lib/wx/src/gen/wxAuiPaneInfo.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -44,54 +44,63 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxAuiPaneInfo/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxAuiPaneInfo()
+-type wxAuiPaneInfo() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfowxauipaneinfo">external documentation</a>.
+-spec new() -> wxAuiPaneInfo().
new() ->
wxe_util:construct(?wxAuiPaneInfo_new_0,
<<>>).
-%% @spec (C::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfowxauipaneinfo">external documentation</a>.
+-spec new(C) -> wxAuiPaneInfo() when
+ C::wxAuiPaneInfo().
new(#wx_ref{type=CT,ref=CRef}) ->
?CLASS(CT,wxAuiPaneInfo),
wxe_util:construct(?wxAuiPaneInfo_new_1,
<<CRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), Size::{W::integer(), H::integer()}) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfobestsize">external documentation</a>.
+-spec bestSize(This, Size) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Size::{W::integer(), H::integer()}.
bestSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_BestSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), X::integer(), Y::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfobestsize">external documentation</a>.
+-spec bestSize(This, X, Y) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), X::integer(), Y::integer().
bestSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_BestSize_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfobottom">external documentation</a>.
+-spec bottom(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
bottom(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Bottom,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv bottomDockable(This, [])
+-spec bottomDockable(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
bottomDockable(This)
when is_record(This, wx_ref) ->
bottomDockable(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {b, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfobottomdockable">external documentation</a>.
+-spec bottomDockable(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {b, boolean()}.
bottomDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -101,8 +110,9 @@ bottomDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_BottomDockable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), C::string()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfocaption">external documentation</a>.
+-spec caption(This, C) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), C::unicode:chardata().
caption(#wx_ref{type=ThisT,ref=ThisRef},C)
when is_list(C) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -110,15 +120,18 @@ caption(#wx_ref{type=ThisT,ref=ThisRef},C)
wxe_util:call(?wxAuiPaneInfo_Caption,
<<ThisRef:32/?UI,(byte_size(C_UC)):32/?UI,(C_UC)/binary, 0:(((8- ((0+byte_size(C_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv captionVisible(This, [])
+-spec captionVisible(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
captionVisible(This)
when is_record(This, wx_ref) ->
captionVisible(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {visible, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfocaptionvisible">external documentation</a>.
+-spec captionVisible(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {visible, boolean()}.
captionVisible(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -128,29 +141,34 @@ captionVisible(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_CaptionVisible,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfocentre">external documentation</a>.
+-spec centre(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
centre(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Centre,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfocentrepane">external documentation</a>.
+-spec centrePane(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
centrePane(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_CentrePane,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv closeButton(This, [])
+-spec closeButton(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
closeButton(This)
when is_record(This, wx_ref) ->
closeButton(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {visible, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoclosebutton">external documentation</a>.
+-spec closeButton(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {visible, boolean()}.
closeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -160,22 +178,26 @@ closeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_CloseButton,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfodefaultpane">external documentation</a>.
+-spec defaultPane(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
defaultPane(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_DefaultPane,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv destroyOnClose(This, [])
+-spec destroyOnClose(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
destroyOnClose(This)
when is_record(This, wx_ref) ->
destroyOnClose(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {b, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfodestroyonclose">external documentation</a>.
+-spec destroyOnClose(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {b, boolean()}.
destroyOnClose(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -185,30 +207,35 @@ destroyOnClose(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_DestroyOnClose,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), Direction::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfodirection">external documentation</a>.
+-spec direction(This, Direction) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Direction::integer().
direction(#wx_ref{type=ThisT,ref=ThisRef},Direction)
when is_integer(Direction) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Direction,
<<ThisRef:32/?UI,Direction:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfodock">external documentation</a>.
+-spec dock(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
dock(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Dock,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv dockable(This, [])
+-spec dockable(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
dockable(This)
when is_record(This, wx_ref) ->
dockable(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {b, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfodockable">external documentation</a>.
+-spec dockable(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {b, boolean()}.
dockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -218,29 +245,34 @@ dockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_Dockable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfofixed">external documentation</a>.
+-spec fixed(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
fixed(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Fixed,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfofloat">external documentation</a>.
+-spec float(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
float(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Float,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv floatable(This, [])
+-spec floatable(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
floatable(This)
when is_record(This, wx_ref) ->
floatable(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {b, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfofloatable">external documentation</a>.
+-spec floatable(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {b, boolean()}.
floatable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -250,47 +282,54 @@ floatable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_Floatable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), Pos::{X::integer(), Y::integer()}) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfofloatingposition">external documentation</a>.
+-spec floatingPosition(This, Pos) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Pos::{X::integer(), Y::integer()}.
floatingPosition(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_FloatingPosition_1,
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), X::integer(), Y::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfofloatingposition">external documentation</a>.
+-spec floatingPosition(This, X, Y) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), X::integer(), Y::integer().
floatingPosition(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_FloatingPosition_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), Size::{W::integer(), H::integer()}) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfofloatingsize">external documentation</a>.
+-spec floatingSize(This, Size) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Size::{W::integer(), H::integer()}.
floatingSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_FloatingSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), X::integer(), Y::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfofloatingsize">external documentation</a>.
+-spec floatingSize(This, X, Y) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), X::integer(), Y::integer().
floatingSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_FloatingSize_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv gripper(This, [])
+-spec gripper(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
gripper(This)
when is_record(This, wx_ref) ->
gripper(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {visible, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfogripper">external documentation</a>.
+-spec gripper(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {visible, boolean()}.
gripper(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -300,15 +339,18 @@ gripper(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_Gripper,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv gripperTop(This, [])
+-spec gripperTop(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
gripperTop(This)
when is_record(This, wx_ref) ->
gripperTop(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {attop, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfogrippertop">external documentation</a>.
+-spec gripperTop(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {attop, boolean()}.
gripperTop(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -318,192 +360,220 @@ gripperTop(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_GripperTop,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohasborder">external documentation</a>.
+-spec hasBorder(This) -> boolean() when
+ This::wxAuiPaneInfo().
hasBorder(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasBorder,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohascaption">external documentation</a>.
+-spec hasCaption(This) -> boolean() when
+ This::wxAuiPaneInfo().
hasCaption(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasCaption,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohasclosebutton">external documentation</a>.
+-spec hasCloseButton(This) -> boolean() when
+ This::wxAuiPaneInfo().
hasCloseButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasCloseButton,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), Flag::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohasflag">external documentation</a>.
+-spec hasFlag(This, Flag) -> boolean() when
+ This::wxAuiPaneInfo(), Flag::integer().
hasFlag(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_integer(Flag) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasFlag,
<<ThisRef:32/?UI,Flag:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohasgripper">external documentation</a>.
+-spec hasGripper(This) -> boolean() when
+ This::wxAuiPaneInfo().
hasGripper(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasGripper,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohasgrippertop">external documentation</a>.
+-spec hasGripperTop(This) -> boolean() when
+ This::wxAuiPaneInfo().
hasGripperTop(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasGripperTop,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohasmaximizebutton">external documentation</a>.
+-spec hasMaximizeButton(This) -> boolean() when
+ This::wxAuiPaneInfo().
hasMaximizeButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasMaximizeButton,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohasminimizebutton">external documentation</a>.
+-spec hasMinimizeButton(This) -> boolean() when
+ This::wxAuiPaneInfo().
hasMinimizeButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasMinimizeButton,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohaspinbutton">external documentation</a>.
+-spec hasPinButton(This) -> boolean() when
+ This::wxAuiPaneInfo().
hasPinButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_HasPinButton,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfohide">external documentation</a>.
+-spec hide(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
hide(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Hide,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisbottomdockable">external documentation</a>.
+-spec isBottomDockable(This) -> boolean() when
+ This::wxAuiPaneInfo().
isBottomDockable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsBottomDockable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisdocked">external documentation</a>.
+-spec isDocked(This) -> boolean() when
+ This::wxAuiPaneInfo().
isDocked(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsDocked,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisfixed">external documentation</a>.
+-spec isFixed(This) -> boolean() when
+ This::wxAuiPaneInfo().
isFixed(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsFixed,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisfloatable">external documentation</a>.
+-spec isFloatable(This) -> boolean() when
+ This::wxAuiPaneInfo().
isFloatable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsFloatable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisfloating">external documentation</a>.
+-spec isFloating(This) -> boolean() when
+ This::wxAuiPaneInfo().
isFloating(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsFloating,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisleftdockable">external documentation</a>.
+-spec isLeftDockable(This) -> boolean() when
+ This::wxAuiPaneInfo().
isLeftDockable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsLeftDockable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoismovable">external documentation</a>.
+-spec isMovable(This) -> boolean() when
+ This::wxAuiPaneInfo().
isMovable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsMovable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxAuiPaneInfo().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisresizable">external documentation</a>.
+-spec isResizable(This) -> boolean() when
+ This::wxAuiPaneInfo().
isResizable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsResizable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisrightdockable">external documentation</a>.
+-spec isRightDockable(This) -> boolean() when
+ This::wxAuiPaneInfo().
isRightDockable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsRightDockable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoisshown">external documentation</a>.
+-spec isShown(This) -> boolean() when
+ This::wxAuiPaneInfo().
isShown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsShown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoistoolbar">external documentation</a>.
+-spec isToolbar(This) -> boolean() when
+ This::wxAuiPaneInfo().
isToolbar(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsToolbar,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoistopdockable">external documentation</a>.
+-spec isTopDockable(This) -> boolean() when
+ This::wxAuiPaneInfo().
isTopDockable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_IsTopDockable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), Layer::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfolayer">external documentation</a>.
+-spec layer(This, Layer) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Layer::integer().
layer(#wx_ref{type=ThisT,ref=ThisRef},Layer)
when is_integer(Layer) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Layer,
<<ThisRef:32/?UI,Layer:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoleft">external documentation</a>.
+-spec left(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
left(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Left,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv leftDockable(This, [])
+-spec leftDockable(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
leftDockable(This)
when is_record(This, wx_ref) ->
leftDockable(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {b, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoleftdockable">external documentation</a>.
+-spec leftDockable(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {b, boolean()}.
leftDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -513,31 +583,36 @@ leftDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_LeftDockable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), Size::{W::integer(), H::integer()}) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfomaxsize">external documentation</a>.
+-spec maxSize(This, Size) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Size::{W::integer(), H::integer()}.
maxSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_MaxSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), X::integer(), Y::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfomaxsize">external documentation</a>.
+-spec maxSize(This, X, Y) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), X::integer(), Y::integer().
maxSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_MaxSize_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv maximizeButton(This, [])
+-spec maximizeButton(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
maximizeButton(This)
when is_record(This, wx_ref) ->
maximizeButton(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {visible, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfomaximizebutton">external documentation</a>.
+-spec maximizeButton(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {visible, boolean()}.
maximizeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -547,31 +622,36 @@ maximizeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_MaximizeButton,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), Size::{W::integer(), H::integer()}) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfominsize">external documentation</a>.
+-spec minSize(This, Size) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Size::{W::integer(), H::integer()}.
minSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_MinSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), X::integer(), Y::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfominsize">external documentation</a>.
+-spec minSize(This, X, Y) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), X::integer(), Y::integer().
minSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_MinSize_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv minimizeButton(This, [])
+-spec minimizeButton(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
minimizeButton(This)
when is_record(This, wx_ref) ->
minimizeButton(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {visible, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfominimizebutton">external documentation</a>.
+-spec minimizeButton(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {visible, boolean()}.
minimizeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -581,15 +661,18 @@ minimizeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_MinimizeButton,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv movable(This, [])
+-spec movable(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
movable(This)
when is_record(This, wx_ref) ->
movable(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {b, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfomovable">external documentation</a>.
+-spec movable(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {b, boolean()}.
movable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -599,8 +682,9 @@ movable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_Movable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), N::string()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoname">external documentation</a>.
+-spec name(This, N) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), N::unicode:chardata().
name(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_list(N) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -608,15 +692,18 @@ name(#wx_ref{type=ThisT,ref=ThisRef},N)
wxe_util:call(?wxAuiPaneInfo_Name,
<<ThisRef:32/?UI,(byte_size(N_UC)):32/?UI,(N_UC)/binary, 0:(((8- ((0+byte_size(N_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv paneBorder(This, [])
+-spec paneBorder(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
paneBorder(This)
when is_record(This, wx_ref) ->
paneBorder(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {visible, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfopaneborder">external documentation</a>.
+-spec paneBorder(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {visible, boolean()}.
paneBorder(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -626,15 +713,18 @@ paneBorder(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_PaneBorder,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv pinButton(This, [])
+-spec pinButton(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
pinButton(This)
when is_record(This, wx_ref) ->
pinButton(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {visible, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfopinbutton">external documentation</a>.
+-spec pinButton(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {visible, boolean()}.
pinButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -644,23 +734,27 @@ pinButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_PinButton,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), Pos::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoposition">external documentation</a>.
+-spec position(This, Pos) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Pos::integer().
position(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Position,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv resizable(This, [])
+-spec resizable(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
resizable(This)
when is_record(This, wx_ref) ->
resizable(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {resizable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinforesizable">external documentation</a>.
+-spec resizable(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {resizable, boolean()}.
resizable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -670,22 +764,26 @@ resizable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_Resizable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinforight">external documentation</a>.
+-spec right(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
right(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Right,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv rightDockable(This, [])
+-spec rightDockable(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
rightDockable(This)
when is_record(This, wx_ref) ->
rightDockable(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {b, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinforightdockable">external documentation</a>.
+-spec rightDockable(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {b, boolean()}.
rightDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -695,39 +793,45 @@ rightDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_RightDockable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), Row::integer()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinforow">external documentation</a>.
+-spec row(This, Row) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Row::integer().
row(#wx_ref{type=ThisT,ref=ThisRef},Row)
when is_integer(Row) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Row,
<<ThisRef:32/?UI,Row:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), Source::wxAuiPaneInfo()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfosafeset">external documentation</a>.
+-spec safeSet(This, Source) -> ok when
+ This::wxAuiPaneInfo(), Source::wxAuiPaneInfo().
safeSet(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SourceT,ref=SourceRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
?CLASS(SourceT,wxAuiPaneInfo),
wxe_util:cast(?wxAuiPaneInfo_SafeSet,
<<ThisRef:32/?UI,SourceRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo(), Flag::integer(), Option_state::bool()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfosetflag">external documentation</a>.
+-spec setFlag(This, Flag, Option_state) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), Flag::integer(), Option_state::boolean().
setFlag(#wx_ref{type=ThisT,ref=ThisRef},Flag,Option_state)
when is_integer(Flag),is_boolean(Option_state) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_SetFlag,
<<ThisRef:32/?UI,Flag:32/?UI,(wxe_util:from_bool(Option_state)):32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv show(This, [])
+-spec show(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
show(This)
when is_record(This, wx_ref) ->
show(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {show, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfoshow">external documentation</a>.
+-spec show(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {show, boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -737,29 +841,34 @@ show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_Show,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfotoolbarpane">external documentation</a>.
+-spec toolbarPane(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
toolbarPane(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_ToolbarPane,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfotop">external documentation</a>.
+-spec top(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
top(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
wxe_util:call(?wxAuiPaneInfo_Top,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> wxAuiPaneInfo()
%% @equiv topDockable(This, [])
+-spec topDockable(This) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo().
+
topDockable(This)
when is_record(This, wx_ref) ->
topDockable(This, []).
-%% @spec (This::wxAuiPaneInfo(), [Option]) -> wxAuiPaneInfo()
-%% Option = {b, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfotopdockable">external documentation</a>.
+-spec topDockable(This, [Option]) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(),
+ Option :: {b, boolean()}.
topDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -769,16 +878,17 @@ topDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxAuiPaneInfo_TopDockable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxAuiPaneInfo(), W::wxWindow:wxWindow()) -> wxAuiPaneInfo()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxauipaneinfo.html#wxauipaneinfowindow">external documentation</a>.
+-spec window(This, W) -> wxAuiPaneInfo() when
+ This::wxAuiPaneInfo(), W::wxWindow:wxWindow().
window(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WT,ref=WRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
?CLASS(WT,wxWindow),
wxe_util:call(?wxAuiPaneInfo_Window,
<<ThisRef:32/?UI,WRef:32/?UI>>).
-%% @spec (This::wxAuiPaneInfo()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxAuiPaneInfo()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAuiPaneInfo),
wxe_util:destroy(?wxAuiPaneInfo_destruct,Obj),
diff --git a/lib/wx/src/gen/wxAuiTabArt.erl b/lib/wx/src/gen/wxAuiTabArt.erl
index 725bac9664..a65c6dc8cf 100644
--- a/lib/wx/src/gen/wxAuiTabArt.erl
+++ b/lib/wx/src/gen/wxAuiTabArt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,8 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxAuiTabArt/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxAuiTabArt() :: wx:wx_object().
diff --git a/lib/wx/src/gen/wxBitmap.erl b/lib/wx/src/gen/wxBitmap.erl
index bd2f83c6eb..8816e27cdd 100644
--- a/lib/wx/src/gen/wxBitmap.erl
+++ b/lib/wx/src/gen/wxBitmap.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,22 +32,27 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxBitmap/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxBitmap()
+-type wxBitmap() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapwxbitmap">external documentation</a>.
+-spec new() -> wxBitmap().
new() ->
wxe_util:construct(?wxBitmap_new_0,
<<>>).
-%% @spec (X::string()|term()) -> wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapwxbitmap">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Filename::string()) -> new(Filename, []) </c></p>
-%% <p><c>
-%% new(Image::wxImage:wxImage()) -> new(Image, []) </c></p>
+%% <br /> Also:<br />
+%% new(Image) -> wxBitmap() when<br />
+%% Image::wxImage:wxImage().<br />
+%%
+%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+-spec new(Filename) -> wxBitmap() when
+ Filename::unicode:chardata();
+ (Image) -> wxBitmap() when
+ Image::wxImage:wxImage().
new(Filename)
when is_list(Filename) ->
@@ -57,21 +62,24 @@ new(Image)
when is_record(Image, wx_ref) ->
new(Image, []).
-%% @spec (X::integer()|string()|term(),X::integer()|term()) -> wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapwxbitmap">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Width::integer(), Height::integer()) -> new(Width,Height, []) </c></p>
-%% <p><c>
-%% new(Filename::string(), [Option]) -> wxBitmap() </c>
-%%<br /> Option = {type, WxBitmapType}
-%%<br /> WxBitmapType = integer()
-%%<br /> WxBitmapType is one of ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
-%% </p>
-%% <p><c>
-%% new(Image::wxImage:wxImage(), [Option]) -> wxBitmap() </c>
-%%<br /> Option = {depth, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Filename, [Option]) -> wxBitmap() when<br />
+%% Filename::unicode:chardata(),<br />
+%% Option :: {type, wx:wx_enum()};<br />
+%% (Image, [Option]) -> wxBitmap() when<br />
+%% Image::wxImage:wxImage(),<br />
+%% Option :: {depth, integer()}.<br />
+%%
+%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+-spec new(Width, Height) -> wxBitmap() when
+ Width::integer(), Height::integer();
+ (Filename, [Option]) -> wxBitmap() when
+ Filename::unicode:chardata(),
+ Option :: {type, wx:wx_enum()};
+ (Image, [Option]) -> wxBitmap() when
+ Image::wxImage:wxImage(),
+ Option :: {depth, integer()}.
new(Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -93,15 +101,17 @@ new(#wx_ref{type=ImageT,ref=ImageRef}, Options)
wxe_util:construct(?wxBitmap_new_2_1,
<<ImageRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (X::binary()|integer(),X::integer(),X::integer()|term()) -> wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapwxbitmap">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Bits::binary(), Width::integer(), Height::integer()) -> new(Bits,Width,Height, []) </c></p>
-%% <p><c>
-%% new(Width::integer(), Height::integer(), [Option]) -> wxBitmap() </c>
-%%<br /> Option = {depth, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Width, Height, [Option]) -> wxBitmap() when<br />
+%% Width::integer(), Height::integer(),<br />
+%% Option :: {depth, integer()}.<br />
+%%
+-spec new(Bits, Width, Height) -> wxBitmap() when
+ Bits::binary(), Width::integer(), Height::integer();
+ (Width, Height, [Option]) -> wxBitmap() when
+ Width::integer(), Height::integer(),
+ Option :: {depth, integer()}.
new(Bits,Width,Height)
when is_binary(Bits),is_integer(Width),is_integer(Height) ->
@@ -114,9 +124,10 @@ new(Width,Height, Options)
wxe_util:construct(?wxBitmap_new_3,
<<Width:32/?UI,Height:32/?UI, BinOpt/binary>>).
-%% @spec (Bits::binary(), Width::integer(), Height::integer(), [Option]) -> wxBitmap()
-%% Option = {depth, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapwxbitmap">external documentation</a>.
+-spec new(Bits, Width, Height, [Option]) -> wxBitmap() when
+ Bits::binary(), Width::integer(), Height::integer(),
+ Option :: {depth, integer()}.
new(Bits,Width,Height, Options)
when is_binary(Bits),is_integer(Width),is_integer(Height),is_list(Options) ->
wxe_util:send_bin(Bits),
@@ -126,30 +137,35 @@ new(Bits,Width,Height, Options)
wxe_util:construct(?wxBitmap_new_4,
<<Width:32/?UI,Height:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxBitmap()) -> wxImage:wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapconverttoimage">external documentation</a>.
+-spec convertToImage(This) -> wxImage:wxImage() when
+ This::wxBitmap().
convertToImage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmap),
wxe_util:call(?wxBitmap_ConvertToImage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmap(), Icon::wxIcon:wxIcon()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapcopyfromicon">external documentation</a>.
+-spec copyFromIcon(This, Icon) -> boolean() when
+ This::wxBitmap(), Icon::wxIcon:wxIcon().
copyFromIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
?CLASS(ThisT,wxBitmap),
?CLASS(IconT,wxIcon),
wxe_util:call(?wxBitmap_CopyFromIcon,
<<ThisRef:32/?UI,IconRef:32/?UI>>).
-%% @spec (This::wxBitmap(), Width::integer(), Height::integer()) -> bool()
%% @equiv create(This,Width,Height, [])
+-spec create(This, Width, Height) -> boolean() when
+ This::wxBitmap(), Width::integer(), Height::integer().
+
create(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
create(This,Width,Height, []).
-%% @spec (This::wxBitmap(), Width::integer(), Height::integer(), [Option]) -> bool()
-%% Option = {depth, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapcreate">external documentation</a>.
+-spec create(This, Width, Height, [Option]) -> boolean() when
+ This::wxBitmap(), Width::integer(), Height::integer(),
+ Option :: {depth, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxBitmap),
@@ -159,60 +175,68 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
wxe_util:call(?wxBitmap_Create,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxBitmap()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapgetdepth">external documentation</a>.
+-spec getDepth(This) -> integer() when
+ This::wxBitmap().
getDepth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmap),
wxe_util:call(?wxBitmap_GetDepth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmap()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapgetheight">external documentation</a>.
+-spec getHeight(This) -> integer() when
+ This::wxBitmap().
getHeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmap),
wxe_util:call(?wxBitmap_GetHeight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmap()) -> wxPalette:wxPalette()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapgetpalette">external documentation</a>.
+-spec getPalette(This) -> wxPalette:wxPalette() when
+ This::wxBitmap().
getPalette(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmap),
wxe_util:call(?wxBitmap_GetPalette,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmap()) -> wxMask:wxMask()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapgetmask">external documentation</a>.
+-spec getMask(This) -> wxMask:wxMask() when
+ This::wxBitmap().
getMask(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmap),
wxe_util:call(?wxBitmap_GetMask,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmap()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapgetwidth">external documentation</a>.
+-spec getWidth(This) -> integer() when
+ This::wxBitmap().
getWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmap),
wxe_util:call(?wxBitmap_GetWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmap(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapgetsubbitmap">external documentation</a>.
+-spec getSubBitmap(This, Rect) -> wxBitmap() when
+ This::wxBitmap(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
getSubBitmap(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
?CLASS(ThisT,wxBitmap),
wxe_util:call(?wxBitmap_GetSubBitmap,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxBitmap(), Name::string()) -> bool()
%% @equiv loadFile(This,Name, [])
+-spec loadFile(This, Name) -> boolean() when
+ This::wxBitmap(), Name::unicode:chardata().
+
loadFile(This,Name)
when is_record(This, wx_ref),is_list(Name) ->
loadFile(This,Name, []).
-%% @spec (This::wxBitmap(), Name::string(), [Option]) -> bool()
-%% Option = {type, WxBitmapType}
-%% WxBitmapType = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmaploadfile">external documentation</a>.
-%%<br /> WxBitmapType is one of ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+-spec loadFile(This, Name, [Option]) -> boolean() when
+ This::wxBitmap(), Name::unicode:chardata(),
+ Option :: {type, wx:wx_enum()}.
loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name, Options)
when is_list(Name),is_list(Options) ->
?CLASS(ThisT,wxBitmap),
@@ -223,24 +247,27 @@ loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name, Options)
wxe_util:call(?wxBitmap_LoadFile,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxBitmap()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapok">external documentation</a>.
+-spec ok(This) -> boolean() when
+ This::wxBitmap().
ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmap),
wxe_util:call(?wxBitmap_Ok,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmap(), Name::string(), Type::WxBitmapType) -> bool()
%% @equiv saveFile(This,Name,Type, [])
+-spec saveFile(This, Name, Type) -> boolean() when
+ This::wxBitmap(), Name::unicode:chardata(), Type::wx:wx_enum().
+
saveFile(This,Name,Type)
when is_record(This, wx_ref),is_list(Name),is_integer(Type) ->
saveFile(This,Name,Type, []).
-%% @spec (This::wxBitmap(), Name::string(), Type::WxBitmapType, [Option]) -> bool()
-%% Option = {palette, wxPalette:wxPalette()}
-%% WxBitmapType = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapsavefile">external documentation</a>.
-%%<br /> WxBitmapType is one of ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+-spec saveFile(This, Name, Type, [Option]) -> boolean() when
+ This::wxBitmap(), Name::unicode:chardata(), Type::wx:wx_enum(),
+ Option :: {palette, wxPalette:wxPalette()}.
saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Type, Options)
when is_list(Name),is_integer(Type),is_list(Options) ->
?CLASS(ThisT,wxBitmap),
@@ -251,48 +278,53 @@ saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Type, Options)
wxe_util:call(?wxBitmap_SaveFile,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxBitmap(), Depth::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapsetdepth">external documentation</a>.
+-spec setDepth(This, Depth) -> ok when
+ This::wxBitmap(), Depth::integer().
setDepth(#wx_ref{type=ThisT,ref=ThisRef},Depth)
when is_integer(Depth) ->
?CLASS(ThisT,wxBitmap),
wxe_util:cast(?wxBitmap_SetDepth,
<<ThisRef:32/?UI,Depth:32/?UI>>).
-%% @spec (This::wxBitmap(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapsetheight">external documentation</a>.
+-spec setHeight(This, Height) -> ok when
+ This::wxBitmap(), Height::integer().
setHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
when is_integer(Height) ->
?CLASS(ThisT,wxBitmap),
wxe_util:cast(?wxBitmap_SetHeight,
<<ThisRef:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxBitmap(), Mask::wxMask:wxMask()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapsetmask">external documentation</a>.
+-spec setMask(This, Mask) -> ok when
+ This::wxBitmap(), Mask::wxMask:wxMask().
setMask(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MaskT,ref=MaskRef}) ->
?CLASS(ThisT,wxBitmap),
?CLASS(MaskT,wxMask),
wxe_util:cast(?wxBitmap_SetMask,
<<ThisRef:32/?UI,MaskRef:32/?UI>>).
-%% @spec (This::wxBitmap(), Palette::wxPalette:wxPalette()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapsetpalette">external documentation</a>.
+-spec setPalette(This, Palette) -> ok when
+ This::wxBitmap(), Palette::wxPalette:wxPalette().
setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}) ->
?CLASS(ThisT,wxBitmap),
?CLASS(PaletteT,wxPalette),
wxe_util:cast(?wxBitmap_SetPalette,
<<ThisRef:32/?UI,PaletteRef:32/?UI>>).
-%% @spec (This::wxBitmap(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmap.html#wxbitmapsetwidth">external documentation</a>.
+-spec setWidth(This, Width) -> ok when
+ This::wxBitmap(), Width::integer().
setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxBitmap),
wxe_util:cast(?wxBitmap_SetWidth,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxBitmap()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxBitmap()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBitmap),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBitmapButton.erl b/lib/wx/src/gen/wxBitmapButton.erl
index d2353466e7..ddddbbc1dd 100644
--- a/lib/wx/src/gen/wxBitmapButton.erl
+++ b/lib/wx/src/gen/wxBitmapButton.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,6 +72,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxBitmapButton/0]).
%% @hidden
parent_class(wxButton) -> true;
parent_class(wxControl) -> true;
@@ -79,21 +80,28 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxBitmapButton()
+-type wxBitmapButton() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttonwxbitmapbutton">external documentation</a>.
+-spec new() -> wxBitmapButton().
new() ->
wxe_util:construct(?wxBitmapButton_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap()) -> wxBitmapButton()
%% @equiv new(Parent,Id,Bitmap, [])
+-spec new(Parent, Id, Bitmap) -> wxBitmapButton() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap().
+
new(Parent,Id,Bitmap)
when is_record(Parent, wx_ref),is_integer(Id),is_record(Bitmap, wx_ref) ->
new(Parent,Id,Bitmap, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap(), [Option]) -> wxBitmapButton()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttonwxbitmapbutton">external documentation</a>.
+-spec new(Parent, Id, Bitmap, [Option]) -> wxBitmapButton() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -107,15 +115,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=BitmapT,ref=BitmapRef},
wxe_util:construct(?wxBitmapButton_new_4,
<<ParentRef:32/?UI,Id:32/?UI,BitmapRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxBitmapButton(), Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap()) -> bool()
%% @equiv create(This,Parent,Id,Bitmap, [])
+-spec create(This, Parent, Id, Bitmap) -> boolean() when
+ This::wxBitmapButton(), Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap().
+
create(This,Parent,Id,Bitmap)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_record(Bitmap, wx_ref) ->
create(This,Parent,Id,Bitmap, []).
-%% @spec (This::wxBitmapButton(), Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttoncreate">external documentation</a>.
+-spec create(This, Parent, Id, Bitmap, [Option]) -> boolean() when
+ This::wxBitmapButton(), Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxBitmapButton),
@@ -130,68 +144,76 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#w
wxe_util:call(?wxBitmapButton_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,BitmapRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxBitmapButton()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttongetbitmapdisabled">external documentation</a>.
+-spec getBitmapDisabled(This) -> wxBitmap:wxBitmap() when
+ This::wxBitmapButton().
getBitmapDisabled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmapButton),
wxe_util:call(?wxBitmapButton_GetBitmapDisabled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmapButton()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttongetbitmapfocus">external documentation</a>.
+-spec getBitmapFocus(This) -> wxBitmap:wxBitmap() when
+ This::wxBitmapButton().
getBitmapFocus(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmapButton),
wxe_util:call(?wxBitmapButton_GetBitmapFocus,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmapButton()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttongetbitmaplabel">external documentation</a>.
+-spec getBitmapLabel(This) -> wxBitmap:wxBitmap() when
+ This::wxBitmapButton().
getBitmapLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmapButton),
wxe_util:call(?wxBitmapButton_GetBitmapLabel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmapButton()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttongetbitmapselected">external documentation</a>.
+-spec getBitmapSelected(This) -> wxBitmap:wxBitmap() when
+ This::wxBitmapButton().
getBitmapSelected(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmapButton),
wxe_util:call(?wxBitmapButton_GetBitmapSelected,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmapButton(), Disabled::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttonsetbitmapdisabled">external documentation</a>.
+-spec setBitmapDisabled(This, Disabled) -> ok when
+ This::wxBitmapButton(), Disabled::wxBitmap:wxBitmap().
setBitmapDisabled(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DisabledT,ref=DisabledRef}) ->
?CLASS(ThisT,wxBitmapButton),
?CLASS(DisabledT,wxBitmap),
wxe_util:cast(?wxBitmapButton_SetBitmapDisabled,
<<ThisRef:32/?UI,DisabledRef:32/?UI>>).
-%% @spec (This::wxBitmapButton(), Focus::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttonsetbitmapfocus">external documentation</a>.
+-spec setBitmapFocus(This, Focus) -> ok when
+ This::wxBitmapButton(), Focus::wxBitmap:wxBitmap().
setBitmapFocus(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FocusT,ref=FocusRef}) ->
?CLASS(ThisT,wxBitmapButton),
?CLASS(FocusT,wxBitmap),
wxe_util:cast(?wxBitmapButton_SetBitmapFocus,
<<ThisRef:32/?UI,FocusRef:32/?UI>>).
-%% @spec (This::wxBitmapButton(), Bitmap::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttonsetbitmaplabel">external documentation</a>.
+-spec setBitmapLabel(This, Bitmap) -> ok when
+ This::wxBitmapButton(), Bitmap::wxBitmap:wxBitmap().
setBitmapLabel(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxBitmapButton),
?CLASS(BitmapT,wxBitmap),
wxe_util:cast(?wxBitmapButton_SetBitmapLabel,
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
-%% @spec (This::wxBitmapButton(), Sel::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapbutton.html#wxbitmapbuttonsetbitmapselected">external documentation</a>.
+-spec setBitmapSelected(This, Sel) -> ok when
+ This::wxBitmapButton(), Sel::wxBitmap:wxBitmap().
setBitmapSelected(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SelT,ref=SelRef}) ->
?CLASS(ThisT,wxBitmapButton),
?CLASS(SelT,wxBitmap),
wxe_util:cast(?wxBitmapButton_SetBitmapSelected,
<<ThisRef:32/?UI,SelRef:32/?UI>>).
-%% @spec (This::wxBitmapButton()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxBitmapButton()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBitmapButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBitmapDataObject.erl b/lib/wx/src/gen/wxBitmapDataObject.erl
index b5207072e3..8f9701d3c2 100644
--- a/lib/wx/src/gen/wxBitmapDataObject.erl
+++ b/lib/wx/src/gen/wxBitmapDataObject.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,25 +32,27 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxBitmapDataObject/0]).
%% @hidden
parent_class(wxDataObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxBitmapDataObject()
+-type wxBitmapDataObject() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxBitmapDataObject().
+
new() ->
new([]).
-%% @spec (X::term()) -> wxBitmapDataObject()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapdataobject.html#wxbitmapdataobjectwxbitmapdataobject">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new([Option]) -> wxBitmapDataObject() </c>
-%%<br /> Option = {bitmap, wxBitmap:wxBitmap()}
-%% </p>
-%% <p><c>
-%% new(Bitmap::wxBitmap:wxBitmap()) -> wxBitmapDataObject() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(Bitmap) -> wxBitmapDataObject() when<br />
+%% Bitmap::wxBitmap:wxBitmap().<br />
+%%
+-spec new([Option]) -> wxBitmapDataObject() when
+ Option :: {bitmap, wxBitmap:wxBitmap()};
+ (Bitmap) -> wxBitmapDataObject() when
+ Bitmap::wxBitmap:wxBitmap().
new(Options)
when is_list(Options) ->
MOpts = fun({bitmap, #wx_ref{type=BitmapT,ref=BitmapRef}}, Acc) -> ?CLASS(BitmapT,wxBitmap),[<<1:32/?UI,BitmapRef:32/?UI>>|Acc];
@@ -63,23 +65,25 @@ new(#wx_ref{type=BitmapT,ref=BitmapRef}) ->
wxe_util:construct(?wxBitmapDataObject_new_1_1,
<<BitmapRef:32/?UI>>).
-%% @spec (This::wxBitmapDataObject()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapdataobject.html#wxbitmapdataobjectgetbitmap">external documentation</a>.
+-spec getBitmap(This) -> wxBitmap:wxBitmap() when
+ This::wxBitmapDataObject().
getBitmap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBitmapDataObject),
wxe_util:call(?wxBitmapDataObject_GetBitmap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBitmapDataObject(), Bitmap::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbitmapdataobject.html#wxbitmapdataobjectsetbitmap">external documentation</a>.
+-spec setBitmap(This, Bitmap) -> ok when
+ This::wxBitmapDataObject(), Bitmap::wxBitmap:wxBitmap().
setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxBitmapDataObject),
?CLASS(BitmapT,wxBitmap),
wxe_util:cast(?wxBitmapDataObject_SetBitmap,
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
-%% @spec (This::wxBitmapDataObject()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxBitmapDataObject()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBitmapDataObject),
wxe_util:destroy(?wxBitmapDataObject_destroy,Obj),
diff --git a/lib/wx/src/gen/wxBoxSizer.erl b/lib/wx/src/gen/wxBoxSizer.erl
index e6287945a9..fcf6b5fd65 100644
--- a/lib/wx/src/gen/wxBoxSizer.erl
+++ b/lib/wx/src/gen/wxBoxSizer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,26 +40,30 @@
setMinSize/2,setMinSize/3,setSizeHints/2,setVirtualSizeHints/2,show/2,
show/3]).
+-export_type([wxBoxSizer/0]).
%% @hidden
parent_class(wxSizer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Orient::integer()) -> wxBoxSizer()
+-type wxBoxSizer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxboxsizer.html#wxboxsizerwxboxsizer">external documentation</a>.
+-spec new(Orient) -> wxBoxSizer() when
+ Orient::integer().
new(Orient)
when is_integer(Orient) ->
wxe_util:construct(?wxBoxSizer_new,
<<Orient:32/?UI>>).
-%% @spec (This::wxBoxSizer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxboxsizer.html#wxboxsizergetorientation">external documentation</a>.
+-spec getOrientation(This) -> integer() when
+ This::wxBoxSizer().
getOrientation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBoxSizer),
wxe_util:call(?wxBoxSizer_GetOrientation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBoxSizer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxBoxSizer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBoxSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBrush.erl b/lib/wx/src/gen/wxBrush.erl
index e42edd62e3..40aa62297e 100644
--- a/lib/wx/src/gen/wxBrush.erl
+++ b/lib/wx/src/gen/wxBrush.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,23 +30,26 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxBrush/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxBrush()
+-type wxBrush() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushwxbrush">external documentation</a>.
+-spec new() -> wxBrush().
new() ->
wxe_util:construct(?wxBrush_new_0,
<<>>).
-%% @spec (X::term()) -> wxBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushwxbrush">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Colour::wx:colour()) -> new(Colour, []) </c></p>
-%% <p><c>
-%% new(StippleBitmap::wxBitmap:wxBitmap()) -> wxBrush() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(StippleBitmap) -> wxBrush() when<br />
+%% StippleBitmap::wxBitmap:wxBitmap().<br />
+%%
+-spec new(Colour) -> wxBrush() when
+ Colour::wx:wx_colour();
+ (StippleBitmap) -> wxBrush() when
+ StippleBitmap::wxBitmap:wxBitmap().
new(Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -56,9 +59,10 @@ new(#wx_ref{type=StippleBitmapT,ref=StippleBitmapRef}) ->
wxe_util:construct(?wxBrush_new_1,
<<StippleBitmapRef:32/?UI>>).
-%% @spec (Colour::wx:colour(), [Option]) -> wxBrush()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushwxbrush">external documentation</a>.
+-spec new(Colour, [Option]) -> wxBrush() when
+ Colour::wx:wx_colour(),
+ Option :: {style, integer()}.
new(Colour, Options)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4,is_list(Options) ->
MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc];
@@ -67,75 +71,84 @@ new(Colour, Options)
wxe_util:construct(?wxBrush_new_2,
<<(wxe_util:colour_bin(Colour)):16/binary, BinOpt/binary>>).
-%% @spec (This::wxBrush()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushgetcolour">external documentation</a>.
+-spec getColour(This) -> wx:wx_colour4() when
+ This::wxBrush().
getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBrush),
wxe_util:call(?wxBrush_GetColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBrush()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushgetstipple">external documentation</a>.
+-spec getStipple(This) -> wxBitmap:wxBitmap() when
+ This::wxBrush().
getStipple(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBrush),
wxe_util:call(?wxBrush_GetStipple,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBrush()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushgetstyle">external documentation</a>.
+-spec getStyle(This) -> integer() when
+ This::wxBrush().
getStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBrush),
wxe_util:call(?wxBrush_GetStyle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBrush()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushishatch">external documentation</a>.
+-spec isHatch(This) -> boolean() when
+ This::wxBrush().
isHatch(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBrush),
wxe_util:call(?wxBrush_IsHatch,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBrush()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxBrush().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxBrush),
wxe_util:call(?wxBrush_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxBrush(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushsetcolour">external documentation</a>.
+-spec setColour(This, Col) -> ok when
+ This::wxBrush(), Col::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxBrush),
wxe_util:cast(?wxBrush_SetColour_1,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxBrush(), R::integer(), G::integer(), B::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushsetcolour">external documentation</a>.
+-spec setColour(This, R, G, B) -> ok when
+ This::wxBrush(), R::integer(), G::integer(), B::integer().
setColour(#wx_ref{type=ThisT,ref=ThisRef},R,G,B)
when is_integer(R),is_integer(G),is_integer(B) ->
?CLASS(ThisT,wxBrush),
wxe_util:cast(?wxBrush_SetColour_3,
<<ThisRef:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
-%% @spec (This::wxBrush(), Stipple::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushsetstipple">external documentation</a>.
+-spec setStipple(This, Stipple) -> ok when
+ This::wxBrush(), Stipple::wxBitmap:wxBitmap().
setStipple(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StippleT,ref=StippleRef}) ->
?CLASS(ThisT,wxBrush),
?CLASS(StippleT,wxBitmap),
wxe_util:cast(?wxBrush_SetStipple,
<<ThisRef:32/?UI,StippleRef:32/?UI>>).
-%% @spec (This::wxBrush(), Style::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbrush.html#wxbrushsetstyle">external documentation</a>.
+-spec setStyle(This, Style) -> ok when
+ This::wxBrush(), Style::integer().
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
?CLASS(ThisT,wxBrush),
wxe_util:cast(?wxBrush_SetStyle,
<<ThisRef:32/?UI,Style:32/?UI>>).
-%% @spec (This::wxBrush()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxBrush()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBrush),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBufferedDC.erl b/lib/wx/src/gen/wxBufferedDC.erl
index 9096f95612..fd8955f4ed 100644
--- a/lib/wx/src/gen/wxBufferedDC.erl
+++ b/lib/wx/src/gen/wxBufferedDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,10 +39,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -53,32 +53,40 @@
setMapMode/2,setPalette/2,setPen/2,setTextBackground/2,setTextForeground/2,
setUserScale/3,startDoc/2,startPage/1]).
+-export_type([wxBufferedDC/0]).
%% @hidden
parent_class(wxMemoryDC) -> true;
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxBufferedDC()
+-type wxBufferedDC() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbuffereddc.html#wxbuffereddcwxbuffereddc">external documentation</a>.
+-spec new() -> wxBufferedDC().
new() ->
wxe_util:construct(?wxBufferedDC_new_0,
<<>>).
-%% @spec (Dc::wxDC:wxDC()) -> wxBufferedDC()
%% @equiv new(Dc, [])
+-spec new(Dc) -> wxBufferedDC() when
+ Dc::wxDC:wxDC().
+
new(Dc)
when is_record(Dc, wx_ref) ->
new(Dc, []).
-%% @spec (Dc::wxDC:wxDC(),X::term()) -> wxBufferedDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbuffereddc.html#wxbuffereddcwxbuffereddc">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()}) -> new(Dc,Area, []) </c></p>
-%% <p><c>
-%% new(Dc::wxDC:wxDC(), [Option]) -> wxBufferedDC() </c>
-%%<br /> Option = {buffer, wxBitmap:wxBitmap()} | {style, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Dc, [Option]) -> wxBufferedDC() when<br />
+%% Dc::wxDC:wxDC(),<br />
+%% Option :: {buffer, wxBitmap:wxBitmap()}<br />
+%% | {style, integer()}.<br />
+%%
+-spec new(Dc, Area) -> wxBufferedDC() when
+ Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()};
+ (Dc, [Option]) -> wxBufferedDC() when
+ Dc::wxDC:wxDC(),
+ Option :: {buffer, wxBitmap:wxBitmap()}
+ | {style, integer()}.
new(Dc,Area={AreaW,AreaH})
when is_record(Dc, wx_ref),is_integer(AreaW),is_integer(AreaH) ->
@@ -93,9 +101,10 @@ new(#wx_ref{type=DcT,ref=DcRef}, Options)
wxe_util:construct(?wxBufferedDC_new_2,
<<DcRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()}, [Option]) -> wxBufferedDC()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbuffereddc.html#wxbuffereddcwxbuffereddc">external documentation</a>.
+-spec new(Dc, Area, [Option]) -> wxBufferedDC() when
+ Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()},
+ Option :: {style, integer()}.
new(#wx_ref{type=DcT,ref=DcRef},{AreaW,AreaH}, Options)
when is_integer(AreaW),is_integer(AreaH),is_list(Options) ->
?CLASS(DcT,wxDC),
@@ -105,21 +114,27 @@ new(#wx_ref{type=DcT,ref=DcRef},{AreaW,AreaH}, Options)
wxe_util:construct(?wxBufferedDC_new_3,
<<DcRef:32/?UI,AreaW:32/?UI,AreaH:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxBufferedDC(), Dc::wxDC:wxDC()) -> ok
%% @equiv init(This,Dc, [])
+-spec init(This, Dc) -> ok when
+ This::wxBufferedDC(), Dc::wxDC:wxDC().
+
init(This,Dc)
when is_record(This, wx_ref),is_record(Dc, wx_ref) ->
init(This,Dc, []).
-%% @spec (This::wxBufferedDC(),Dc::wxDC:wxDC(),X::term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbuffereddc.html#wxbuffereddcinit">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% init(This::wxBufferedDC(), Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()}) -> init(This,Dc,Area, []) </c></p>
-%% <p><c>
-%% init(This::wxBufferedDC(), Dc::wxDC:wxDC(), [Option]) -> ok </c>
-%%<br /> Option = {buffer, wxBitmap:wxBitmap()} | {style, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% init(This, Dc, [Option]) -> ok when<br />
+%% This::wxBufferedDC(), Dc::wxDC:wxDC(),<br />
+%% Option :: {buffer, wxBitmap:wxBitmap()}<br />
+%% | {style, integer()}.<br />
+%%
+-spec init(This, Dc, Area) -> ok when
+ This::wxBufferedDC(), Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()};
+ (This, Dc, [Option]) -> ok when
+ This::wxBufferedDC(), Dc::wxDC:wxDC(),
+ Option :: {buffer, wxBitmap:wxBitmap()}
+ | {style, integer()}.
init(This,Dc,Area={AreaW,AreaH})
when is_record(This, wx_ref),is_record(Dc, wx_ref),is_integer(AreaW),is_integer(AreaH) ->
@@ -135,9 +150,10 @@ init(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}, Options)
wxe_util:cast(?wxBufferedDC_Init_2,
<<ThisRef:32/?UI,DcRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxBufferedDC(), Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()}, [Option]) -> ok
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbuffereddc.html#wxbuffereddcinit">external documentation</a>.
+-spec init(This, Dc, Area, [Option]) -> ok when
+ This::wxBufferedDC(), Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()},
+ Option :: {style, integer()}.
init(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef},{AreaW,AreaH}, Options)
when is_integer(AreaW),is_integer(AreaH),is_list(Options) ->
?CLASS(ThisT,wxBufferedDC),
@@ -148,8 +164,8 @@ init(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef},{AreaW,AreaH},
wxe_util:cast(?wxBufferedDC_Init_3,
<<ThisRef:32/?UI,DcRef:32/?UI,AreaW:32/?UI,AreaH:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxBufferedDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxBufferedDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBufferedDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -241,11 +257,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -259,7 +275,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxBufferedPaintDC.erl b/lib/wx/src/gen/wxBufferedPaintDC.erl
index 2712394dd8..bff61ca678 100644
--- a/lib/wx/src/gen/wxBufferedPaintDC.erl
+++ b/lib/wx/src/gen/wxBufferedPaintDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,10 +40,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
init/2,init/3,init/4,isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,
@@ -55,27 +55,33 @@
setPen/2,setTextBackground/2,setTextForeground/2,setUserScale/3,startDoc/2,
startPage/1]).
+-export_type([wxBufferedPaintDC/0]).
%% @hidden
parent_class(wxBufferedDC) -> true;
parent_class(wxMemoryDC) -> true;
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Window::wxWindow:wxWindow()) -> wxBufferedPaintDC()
+-type wxBufferedPaintDC() :: wx:wx_object().
%% @equiv new(Window, [])
+-spec new(Window) -> wxBufferedPaintDC() when
+ Window::wxWindow:wxWindow().
+
new(Window)
when is_record(Window, wx_ref) ->
new(Window, []).
-%% @spec (Window::wxWindow:wxWindow(),X::term()) -> wxBufferedPaintDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbufferedpaintdc.html#wxbufferedpaintdcwxbufferedpaintdc">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Window::wxWindow:wxWindow(), Buffer::wxBitmap:wxBitmap()) -> new(Window,Buffer, []) </c></p>
-%% <p><c>
-%% new(Window::wxWindow:wxWindow(), [Option]) -> wxBufferedPaintDC() </c>
-%%<br /> Option = {style, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Window, [Option]) -> wxBufferedPaintDC() when<br />
+%% Window::wxWindow:wxWindow(),<br />
+%% Option :: {style, integer()}.<br />
+%%
+-spec new(Window, Buffer) -> wxBufferedPaintDC() when
+ Window::wxWindow:wxWindow(), Buffer::wxBitmap:wxBitmap();
+ (Window, [Option]) -> wxBufferedPaintDC() when
+ Window::wxWindow:wxWindow(),
+ Option :: {style, integer()}.
new(Window,Buffer)
when is_record(Window, wx_ref),is_record(Buffer, wx_ref) ->
@@ -89,9 +95,10 @@ new(#wx_ref{type=WindowT,ref=WindowRef}, Options)
wxe_util:construct(?wxBufferedPaintDC_new_2,
<<WindowRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (Window::wxWindow:wxWindow(), Buffer::wxBitmap:wxBitmap(), [Option]) -> wxBufferedPaintDC()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbufferedpaintdc.html#wxbufferedpaintdcwxbufferedpaintdc">external documentation</a>.
+-spec new(Window, Buffer, [Option]) -> wxBufferedPaintDC() when
+ Window::wxWindow:wxWindow(), Buffer::wxBitmap:wxBitmap(),
+ Option :: {style, integer()}.
new(#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=BufferT,ref=BufferRef}, Options)
when is_list(Options) ->
?CLASS(WindowT,wxWindow),
@@ -102,8 +109,8 @@ new(#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=BufferT,ref=BufferRef}, Opt
wxe_util:construct(?wxBufferedPaintDC_new_3,
<<WindowRef:32/?UI,BufferRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxBufferedPaintDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxBufferedPaintDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBufferedPaintDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -202,11 +209,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -220,7 +227,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxButton.erl b/lib/wx/src/gen/wxButton.erl
index a75c45c5a3..a27e5d91c2 100644
--- a/lib/wx/src/gen/wxButton.erl
+++ b/lib/wx/src/gen/wxButton.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,27 +70,36 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxButton/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxButton()
+-type wxButton() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbutton.html#wxbuttonwxbutton">external documentation</a>.
+-spec new() -> wxButton().
new() ->
wxe_util:construct(?wxButton_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxButton()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxButton() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxButton()
-%% Option = {label, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbutton.html#wxbuttonwxbutton">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxButton() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {label, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -104,15 +113,22 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxButton_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {label, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbutton.html#wxbuttoncreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {label, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxButton),
@@ -127,21 +143,23 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxButton_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec () -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbutton.html#wxbuttongetdefaultsize">external documentation</a>.
+-spec getDefaultSize() -> {W::integer(), H::integer()}.
getDefaultSize() ->
wxe_util:call(?wxButton_GetDefaultSize,
<<>>).
-%% @spec (This::wxButton()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbutton.html#wxbuttonsetdefault">external documentation</a>.
+-spec setDefault(This) -> ok when
+ This::wxButton().
setDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxButton),
wxe_util:cast(?wxButton_SetDefault,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxButton(), Label::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxbutton.html#wxbuttonsetlabel">external documentation</a>.
+-spec setLabel(This, Label) -> ok when
+ This::wxButton(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
when is_list(Label) ->
?CLASS(ThisT,wxButton),
@@ -149,8 +167,8 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
wxe_util:cast(?wxButton_SetLabel,
<<ThisRef:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxButton()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxButton()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCalendarCtrl.erl b/lib/wx/src/gen/wxCalendarCtrl.erl
index 1bb4ecb1fa..01d171800b 100644
--- a/lib/wx/src/gen/wxCalendarCtrl.erl
+++ b/lib/wx/src/gen/wxCalendarCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,27 +74,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxCalendarCtrl/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxCalendarCtrl()
+-type wxCalendarCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlwxcalendarctrl">external documentation</a>.
+-spec new() -> wxCalendarCtrl().
new() ->
wxe_util:construct(?wxCalendarCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxCalendarCtrl()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxCalendarCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxCalendarCtrl()
-%% Option = {date, wx:datetime()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlwxcalendarctrl">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxCalendarCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {date, wx:wx_datetime()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -107,15 +115,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxCalendarCtrl_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxCalendarCtrl(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxCalendarCtrl(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxCalendarCtrl(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {date, wx:datetime()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxCalendarCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {date, wx:wx_datetime()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -129,30 +143,35 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxCalendarCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxCalendarCtrl(), Date::wx:datetime()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlsetdate">external documentation</a>.
+-spec setDate(This, Date) -> boolean() when
+ This::wxCalendarCtrl(), Date::wx:wx_datetime().
setDate(#wx_ref{type=ThisT,ref=ThisRef},Date)
when tuple_size(Date) =:= 2 ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_SetDate,
<<ThisRef:32/?UI,(wxe_util:datetime_bin(Date)):24/binary>>).
-%% @spec (This::wxCalendarCtrl()) -> wx:datetime()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlgetdate">external documentation</a>.
+-spec getDate(This) -> wx:wx_datetime() when
+ This::wxCalendarCtrl().
getDate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_GetDate,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarCtrl()) -> ok
%% @equiv enableYearChange(This, [])
+-spec enableYearChange(This) -> ok when
+ This::wxCalendarCtrl().
+
enableYearChange(This)
when is_record(This, wx_ref) ->
enableYearChange(This, []).
-%% @spec (This::wxCalendarCtrl(), [Option]) -> ok
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlenableyearchange">external documentation</a>.
+-spec enableYearChange(This, [Option]) -> ok when
+ This::wxCalendarCtrl(),
+ Option :: {enable, boolean()}.
enableYearChange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -162,15 +181,18 @@ enableYearChange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxCalendarCtrl_EnableYearChange,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxCalendarCtrl()) -> ok
%% @equiv enableMonthChange(This, [])
+-spec enableMonthChange(This) -> ok when
+ This::wxCalendarCtrl().
+
enableMonthChange(This)
when is_record(This, wx_ref) ->
enableMonthChange(This, []).
-%% @spec (This::wxCalendarCtrl(), [Option]) -> ok
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlenablemonthchange">external documentation</a>.
+-spec enableMonthChange(This, [Option]) -> ok when
+ This::wxCalendarCtrl(),
+ Option :: {enable, boolean()}.
enableMonthChange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -180,15 +202,18 @@ enableMonthChange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxCalendarCtrl_EnableMonthChange,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxCalendarCtrl()) -> ok
%% @equiv enableHolidayDisplay(This, [])
+-spec enableHolidayDisplay(This) -> ok when
+ This::wxCalendarCtrl().
+
enableHolidayDisplay(This)
when is_record(This, wx_ref) ->
enableHolidayDisplay(This, []).
-%% @spec (This::wxCalendarCtrl(), [Option]) -> ok
-%% Option = {display, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlenableholidaydisplay">external documentation</a>.
+-spec enableHolidayDisplay(This, [Option]) -> ok when
+ This::wxCalendarCtrl(),
+ Option :: {display, boolean()}.
enableHolidayDisplay(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -198,82 +223,93 @@ enableHolidayDisplay(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxCalendarCtrl_EnableHolidayDisplay,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxCalendarCtrl(), ColFg::wx:colour(), ColBg::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlsetheadercolours">external documentation</a>.
+-spec setHeaderColours(This, ColFg, ColBg) -> ok when
+ This::wxCalendarCtrl(), ColFg::wx:wx_colour(), ColBg::wx:wx_colour().
setHeaderColours(#wx_ref{type=ThisT,ref=ThisRef},ColFg,ColBg)
when tuple_size(ColFg) =:= 3; tuple_size(ColFg) =:= 4,tuple_size(ColBg) =:= 3; tuple_size(ColBg) =:= 4 ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:cast(?wxCalendarCtrl_SetHeaderColours,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColFg)):16/binary,(wxe_util:colour_bin(ColBg)):16/binary>>).
-%% @spec (This::wxCalendarCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlgetheadercolourfg">external documentation</a>.
+-spec getHeaderColourFg(This) -> wx:wx_colour4() when
+ This::wxCalendarCtrl().
getHeaderColourFg(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_GetHeaderColourFg,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlgetheadercolourbg">external documentation</a>.
+-spec getHeaderColourBg(This) -> wx:wx_colour4() when
+ This::wxCalendarCtrl().
getHeaderColourBg(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_GetHeaderColourBg,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarCtrl(), ColFg::wx:colour(), ColBg::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlsethighlightcolours">external documentation</a>.
+-spec setHighlightColours(This, ColFg, ColBg) -> ok when
+ This::wxCalendarCtrl(), ColFg::wx:wx_colour(), ColBg::wx:wx_colour().
setHighlightColours(#wx_ref{type=ThisT,ref=ThisRef},ColFg,ColBg)
when tuple_size(ColFg) =:= 3; tuple_size(ColFg) =:= 4,tuple_size(ColBg) =:= 3; tuple_size(ColBg) =:= 4 ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:cast(?wxCalendarCtrl_SetHighlightColours,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColFg)):16/binary,(wxe_util:colour_bin(ColBg)):16/binary>>).
-%% @spec (This::wxCalendarCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlgethighlightcolourfg">external documentation</a>.
+-spec getHighlightColourFg(This) -> wx:wx_colour4() when
+ This::wxCalendarCtrl().
getHighlightColourFg(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_GetHighlightColourFg,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlgethighlightcolourbg">external documentation</a>.
+-spec getHighlightColourBg(This) -> wx:wx_colour4() when
+ This::wxCalendarCtrl().
getHighlightColourBg(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_GetHighlightColourBg,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarCtrl(), ColFg::wx:colour(), ColBg::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlsetholidaycolours">external documentation</a>.
+-spec setHolidayColours(This, ColFg, ColBg) -> ok when
+ This::wxCalendarCtrl(), ColFg::wx:wx_colour(), ColBg::wx:wx_colour().
setHolidayColours(#wx_ref{type=ThisT,ref=ThisRef},ColFg,ColBg)
when tuple_size(ColFg) =:= 3; tuple_size(ColFg) =:= 4,tuple_size(ColBg) =:= 3; tuple_size(ColBg) =:= 4 ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:cast(?wxCalendarCtrl_SetHolidayColours,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColFg)):16/binary,(wxe_util:colour_bin(ColBg)):16/binary>>).
-%% @spec (This::wxCalendarCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlgetholidaycolourfg">external documentation</a>.
+-spec getHolidayColourFg(This) -> wx:wx_colour4() when
+ This::wxCalendarCtrl().
getHolidayColourFg(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_GetHolidayColourFg,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlgetholidaycolourbg">external documentation</a>.
+-spec getHolidayColourBg(This) -> wx:wx_colour4() when
+ This::wxCalendarCtrl().
getHolidayColourBg(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_GetHolidayColourBg,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarCtrl(), Day::integer()) -> wxCalendarDateAttr:wxCalendarDateAttr()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlgetattr">external documentation</a>.
+-spec getAttr(This, Day) -> wxCalendarDateAttr:wxCalendarDateAttr() when
+ This::wxCalendarCtrl(), Day::integer().
getAttr(#wx_ref{type=ThisT,ref=ThisRef},Day)
when is_integer(Day) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_GetAttr,
<<ThisRef:32/?UI,Day:32/?UI>>).
-%% @spec (This::wxCalendarCtrl(), Day::integer(), Attr::wxCalendarDateAttr:wxCalendarDateAttr()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlsetattr">external documentation</a>.
+-spec setAttr(This, Day, Attr) -> ok when
+ This::wxCalendarCtrl(), Day::integer(), Attr::wxCalendarDateAttr:wxCalendarDateAttr().
setAttr(#wx_ref{type=ThisT,ref=ThisRef},Day,#wx_ref{type=AttrT,ref=AttrRef})
when is_integer(Day) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -281,36 +317,38 @@ setAttr(#wx_ref{type=ThisT,ref=ThisRef},Day,#wx_ref{type=AttrT,ref=AttrRef})
wxe_util:cast(?wxCalendarCtrl_SetAttr,
<<ThisRef:32/?UI,Day:32/?UI,AttrRef:32/?UI>>).
-%% @spec (This::wxCalendarCtrl(), Day::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlsetholiday">external documentation</a>.
+-spec setHoliday(This, Day) -> ok when
+ This::wxCalendarCtrl(), Day::integer().
setHoliday(#wx_ref{type=ThisT,ref=ThisRef},Day)
when is_integer(Day) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:cast(?wxCalendarCtrl_SetHoliday,
<<ThisRef:32/?UI,Day:32/?UI>>).
-%% @spec (This::wxCalendarCtrl(), Day::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlresetattr">external documentation</a>.
+-spec resetAttr(This, Day) -> ok when
+ This::wxCalendarCtrl(), Day::integer().
resetAttr(#wx_ref{type=ThisT,ref=ThisRef},Day)
when is_integer(Day) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:cast(?wxCalendarCtrl_ResetAttr,
<<ThisRef:32/?UI,Day:32/?UI>>).
-%% @spec (This::wxCalendarCtrl(), Pos::{X::integer(), Y::integer()}) -> {WxCalendarHitTestResult, Date::wx:datetime(), Wd::WeekDay}
-%% WxCalendarHitTestResult = integer()
-%% WeekDay = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarctrl.html#wxcalendarctrlhittest">external documentation</a>.
-%%<br /> WxCalendarHitTestResult is one of ?wxCAL_HITTEST_NOWHERE | ?wxCAL_HITTEST_HEADER | ?wxCAL_HITTEST_DAY | ?wxCAL_HITTEST_INCMONTH | ?wxCAL_HITTEST_DECMONTH | ?wxCAL_HITTEST_SURROUNDING_WEEK
-%%<br /> WeekDay is one of ?wxDateTime_Sun | ?wxDateTime_Mon | ?wxDateTime_Tue | ?wxDateTime_Wed | ?wxDateTime_Thu | ?wxDateTime_Fri | ?wxDateTime_Sat | ?wxDateTime_Inv_WeekDay
+%%<br /> Wd = ?wxDateTime_Sun | ?wxDateTime_Mon | ?wxDateTime_Tue | ?wxDateTime_Wed | ?wxDateTime_Thu | ?wxDateTime_Fri | ?wxDateTime_Sat | ?wxDateTime_Inv_WeekDay
+%%<br /> Res = ?wxCAL_HITTEST_NOWHERE | ?wxCAL_HITTEST_HEADER | ?wxCAL_HITTEST_DAY | ?wxCAL_HITTEST_INCMONTH | ?wxCAL_HITTEST_DECMONTH | ?wxCAL_HITTEST_SURROUNDING_WEEK
+-spec hitTest(This, Pos) -> Result when
+ Result ::{Res ::wx:wx_enum(), Date::wx:wx_datetime(), Wd::wx:wx_enum()},
+ This::wxCalendarCtrl(), Pos::{X::integer(), Y::integer()}.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
?CLASS(ThisT,wxCalendarCtrl),
wxe_util:call(?wxCalendarCtrl_HitTest,
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
-%% @spec (This::wxCalendarCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxCalendarCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCalendarCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCalendarDateAttr.erl b/lib/wx/src/gen/wxCalendarDateAttr.erl
index aea8abbe54..a1891df18b 100644
--- a/lib/wx/src/gen/wxCalendarDateAttr.erl
+++ b/lib/wx/src/gen/wxCalendarDateAttr.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,22 +32,27 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxCalendarDateAttr/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxCalendarDateAttr()
+-type wxCalendarDateAttr() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrwxcalendardateattr">external documentation</a>.
+-spec new() -> wxCalendarDateAttr().
new() ->
wxe_util:construct(?wxCalendarDateAttr_new_0,
<<>>).
-%% @spec (X::WxCalendarDateBorder|term()) -> wxCalendarDateAttr()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrwxcalendardateattr">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Border::WxCalendarDateBorder) -> new(Border, []) </c></p>
-%% <p><c>
-%% new(ColText::wx:colour()) -> new(ColText, []) </c></p>
+%% <br /> Also:<br />
+%% new(ColText) -> wxCalendarDateAttr() when<br />
+%% ColText::wx:wx_colour().<br />
+%%
+%%<br /> Border = ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
+-spec new(Border) -> wxCalendarDateAttr() when
+ Border::wx:wx_enum();
+ (ColText) -> wxCalendarDateAttr() when
+ ColText::wx:wx_colour().
new(Border)
when is_integer(Border) ->
@@ -57,21 +62,25 @@ new(ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
new(ColText, []).
-%% @spec (X::WxCalendarDateBorder|term(),[Option]) -> wxCalendarDateAttr()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrwxcalendardateattr">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Border::WxCalendarDateBorder, [Option]) -> wxCalendarDateAttr() </c>
-%%<br /> Option = {colBorder, wx:colour()}
-%%<br /> WxCalendarDateBorder = integer()
-%%<br /> WxCalendarDateBorder is one of ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
-%% </p>
-%% <p><c>
-%% new(ColText::wx:colour(), [Option]) -> wxCalendarDateAttr() </c>
-%%<br /> Option = {colBack, wx:colour()} | {colBorder, wx:colour()} | {font, wxFont:wxFont()} | {border, WxCalendarDateBorder}
-%%<br /> WxCalendarDateBorder = integer()
-%%<br /> WxCalendarDateBorder is one of ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
-%% </p>
+%% <br /> Also:<br />
+%% new(ColText, [Option]) -> wxCalendarDateAttr() when<br />
+%% ColText::wx:wx_colour(),<br />
+%% Option :: {colBack, wx:wx_colour()}<br />
+%% | {colBorder, wx:wx_colour()}<br />
+%% | {font, wxFont:wxFont()}<br />
+%% | {border, wx:wx_enum()}.<br />
+%%
+%%<br /> Border = ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
+-spec new(Border, [Option]) -> wxCalendarDateAttr() when
+ Border::wx:wx_enum(),
+ Option :: {colBorder, wx:wx_colour()};
+ (ColText, [Option]) -> wxCalendarDateAttr() when
+ ColText::wx:wx_colour(),
+ Option :: {colBack, wx:wx_colour()}
+ | {colBorder, wx:wx_colour()}
+ | {font, wxFont:wxFont()}
+ | {border, wx:wx_enum()}.
new(Border, Options)
when is_integer(Border),is_list(Options) ->
MOpts = fun({colBorder, ColBorder}, Acc) -> [<<1:32/?UI,(wxe_util:colour_bin(ColBorder)):16/binary,0:32>>|Acc];
@@ -90,137 +99,152 @@ new(ColText, Options)
wxe_util:construct(?wxCalendarDateAttr_new_2_1,
<<(wxe_util:colour_bin(ColText)):16/binary, BinOpt/binary>>).
-%% @spec (This::wxCalendarDateAttr(), ColText::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrsettextcolour">external documentation</a>.
+-spec setTextColour(This, ColText) -> ok when
+ This::wxCalendarDateAttr(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:cast(?wxCalendarDateAttr_SetTextColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
-%% @spec (This::wxCalendarDateAttr(), ColBack::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrsetbackgroundcolour">external documentation</a>.
+-spec setBackgroundColour(This, ColBack) -> ok when
+ This::wxCalendarDateAttr(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:cast(?wxCalendarDateAttr_SetBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
-%% @spec (This::wxCalendarDateAttr(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrsetbordercolour">external documentation</a>.
+-spec setBorderColour(This, Col) -> ok when
+ This::wxCalendarDateAttr(), Col::wx:wx_colour().
setBorderColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:cast(?wxCalendarDateAttr_SetBorderColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxCalendarDateAttr(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrsetfont">external documentation</a>.
+-spec setFont(This, Font) -> ok when
+ This::wxCalendarDateAttr(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxCalendarDateAttr_SetFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr(), Border::WxCalendarDateBorder) -> ok
-%% WxCalendarDateBorder = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrsetborder">external documentation</a>.
-%%<br /> WxCalendarDateBorder is one of ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
+%%<br /> Border = ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
+-spec setBorder(This, Border) -> ok when
+ This::wxCalendarDateAttr(), Border::wx:wx_enum().
setBorder(#wx_ref{type=ThisT,ref=ThisRef},Border)
when is_integer(Border) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:cast(?wxCalendarDateAttr_SetBorder,
<<ThisRef:32/?UI,Border:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr(), Holiday::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrsetholiday">external documentation</a>.
+-spec setHoliday(This, Holiday) -> ok when
+ This::wxCalendarDateAttr(), Holiday::boolean().
setHoliday(#wx_ref{type=ThisT,ref=ThisRef},Holiday)
when is_boolean(Holiday) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:cast(?wxCalendarDateAttr_SetHoliday,
<<ThisRef:32/?UI,(wxe_util:from_bool(Holiday)):32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrhastextcolour">external documentation</a>.
+-spec hasTextColour(This) -> boolean() when
+ This::wxCalendarDateAttr().
hasTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_HasTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrhasbackgroundcolour">external documentation</a>.
+-spec hasBackgroundColour(This) -> boolean() when
+ This::wxCalendarDateAttr().
hasBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_HasBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrhasbordercolour">external documentation</a>.
+-spec hasBorderColour(This) -> boolean() when
+ This::wxCalendarDateAttr().
hasBorderColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_HasBorderColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrhasfont">external documentation</a>.
+-spec hasFont(This) -> boolean() when
+ This::wxCalendarDateAttr().
hasFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_HasFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrhasborder">external documentation</a>.
+-spec hasBorder(This) -> boolean() when
+ This::wxCalendarDateAttr().
hasBorder(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_HasBorder,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrisholiday">external documentation</a>.
+-spec isHoliday(This) -> boolean() when
+ This::wxCalendarDateAttr().
isHoliday(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_IsHoliday,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrgettextcolour">external documentation</a>.
+-spec getTextColour(This) -> wx:wx_colour4() when
+ This::wxCalendarDateAttr().
getTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_GetTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrgetbackgroundcolour">external documentation</a>.
+-spec getBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxCalendarDateAttr().
getBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_GetBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrgetbordercolour">external documentation</a>.
+-spec getBorderColour(This) -> wx:wx_colour4() when
+ This::wxCalendarDateAttr().
getBorderColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_GetBorderColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrgetfont">external documentation</a>.
+-spec getFont(This) -> wxFont:wxFont() when
+ This::wxCalendarDateAttr().
getFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_GetFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> WxCalendarDateBorder
-%% WxCalendarDateBorder = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendardateattr.html#wxcalendardateattrgetborder">external documentation</a>.
-%%<br /> WxCalendarDateBorder is one of ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
+%%<br /> Res = ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
+-spec getBorder(This) -> wx:wx_enum() when
+ This::wxCalendarDateAttr().
getBorder(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
wxe_util:call(?wxCalendarDateAttr_GetBorder,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCalendarDateAttr()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxCalendarDateAttr()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCalendarDateAttr),
wxe_util:destroy(?wxCalendarDateAttr_destroy,Obj),
diff --git a/lib/wx/src/gen/wxCalendarEvent.erl b/lib/wx/src/gen/wxCalendarEvent.erl
index 40723711af..c062a7fa0d 100644
--- a/lib/wx/src/gen/wxCalendarEvent.erl
+++ b/lib/wx/src/gen/wxCalendarEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,16 +41,18 @@
isSelection/1,parent_class/1,resumePropagation/2,setInt/2,setString/2,
shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxCalendarEvent/0]).
%% @hidden
parent_class(wxDateEvent) -> true;
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxCalendarEvent()) -> WeekDay
-%% WeekDay = integer()
+-type wxCalendarEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcalendarevent.html#wxcalendareventgetweekday">external documentation</a>.
-%%<br /> WeekDay is one of ?wxDateTime_Sun | ?wxDateTime_Mon | ?wxDateTime_Tue | ?wxDateTime_Wed | ?wxDateTime_Thu | ?wxDateTime_Fri | ?wxDateTime_Sat | ?wxDateTime_Inv_WeekDay
+%%<br /> Res = ?wxDateTime_Sun | ?wxDateTime_Mon | ?wxDateTime_Tue | ?wxDateTime_Wed | ?wxDateTime_Thu | ?wxDateTime_Fri | ?wxDateTime_Sat | ?wxDateTime_Inv_WeekDay
+-spec getWeekDay(This) -> wx:wx_enum() when
+ This::wxCalendarEvent().
getWeekDay(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCalendarEvent),
wxe_util:call(?wxCalendarEvent_GetWeekDay,
diff --git a/lib/wx/src/gen/wxCaret.erl b/lib/wx/src/gen/wxCaret.erl
index cbd868f388..57db5906f3 100644
--- a/lib/wx/src/gen/wxCaret.erl
+++ b/lib/wx/src/gen/wxCaret.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,27 +31,32 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxCaret/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Window::wxWindow:wxWindow(), Size::{W::integer(), H::integer()}) -> wxCaret()
+-type wxCaret() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretwxcaret">external documentation</a>.
+-spec new(Window, Size) -> wxCaret() when
+ Window::wxWindow:wxWindow(), Size::{W::integer(), H::integer()}.
new(#wx_ref{type=WindowT,ref=WindowRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(WindowT,wxWindow),
wxe_util:construct(?wxCaret_new_2,
<<WindowRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (Window::wxWindow:wxWindow(), Width::integer(), Height::integer()) -> wxCaret()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretwxcaret">external documentation</a>.
+-spec new(Window, Width, Height) -> wxCaret() when
+ Window::wxWindow:wxWindow(), Width::integer(), Height::integer().
new(#wx_ref{type=WindowT,ref=WindowRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(WindowT,wxWindow),
wxe_util:construct(?wxCaret_new_3,
<<WindowRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxCaret(), Window::wxWindow:wxWindow(), Size::{W::integer(), H::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretcreate">external documentation</a>.
+-spec create(This, Window, Size) -> boolean() when
+ This::wxCaret(), Window::wxWindow:wxWindow(), Size::{W::integer(), H::integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxCaret),
@@ -59,8 +64,9 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},{Size
wxe_util:call(?wxCaret_Create_2,
<<ThisRef:32/?UI,WindowRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxCaret(), Window::wxWindow:wxWindow(), Width::integer(), Height::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretcreate">external documentation</a>.
+-spec create(This, Window, Width, Height) -> boolean() when
+ This::wxCaret(), Window::wxWindow:wxWindow(), Width::integer(), Height::integer().
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxCaret),
@@ -68,102 +74,116 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},Width
wxe_util:call(?wxCaret_Create_3,
<<ThisRef:32/?UI,WindowRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec () -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretgetblinktime">external documentation</a>.
+-spec getBlinkTime() -> integer().
getBlinkTime() ->
wxe_util:call(?wxCaret_GetBlinkTime,
<<>>).
-%% @spec (This::wxCaret()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxCaret().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCaret),
wxe_util:call(?wxCaret_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCaret()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretgetsize">external documentation</a>.
+-spec getSize(This) -> {W::integer(), H::integer()} when
+ This::wxCaret().
getSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCaret),
wxe_util:call(?wxCaret_GetSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCaret()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretgetwindow">external documentation</a>.
+-spec getWindow(This) -> wxWindow:wxWindow() when
+ This::wxCaret().
getWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCaret),
wxe_util:call(?wxCaret_GetWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCaret()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcarethide">external documentation</a>.
+-spec hide(This) -> ok when
+ This::wxCaret().
hide(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCaret),
wxe_util:cast(?wxCaret_Hide,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCaret()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxCaret().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCaret),
wxe_util:call(?wxCaret_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCaret()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretisvisible">external documentation</a>.
+-spec isVisible(This) -> boolean() when
+ This::wxCaret().
isVisible(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCaret),
wxe_util:call(?wxCaret_IsVisible,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCaret(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretmove">external documentation</a>.
+-spec move(This, Pt) -> ok when
+ This::wxCaret(), Pt::{X::integer(), Y::integer()}.
move(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxCaret),
wxe_util:cast(?wxCaret_Move_1,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxCaret(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretmove">external documentation</a>.
+-spec move(This, X, Y) -> ok when
+ This::wxCaret(), X::integer(), Y::integer().
move(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxCaret),
wxe_util:cast(?wxCaret_Move_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (Milliseconds::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretsetblinktime">external documentation</a>.
+-spec setBlinkTime(Milliseconds) -> ok when
+ Milliseconds::integer().
setBlinkTime(Milliseconds)
when is_integer(Milliseconds) ->
wxe_util:cast(?wxCaret_SetBlinkTime,
<<Milliseconds:32/?UI>>).
-%% @spec (This::wxCaret(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretsetsize">external documentation</a>.
+-spec setSize(This, Size) -> ok when
+ This::wxCaret(), Size::{W::integer(), H::integer()}.
setSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxCaret),
wxe_util:cast(?wxCaret_SetSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxCaret(), Width::integer(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretsetsize">external documentation</a>.
+-spec setSize(This, Width, Height) -> ok when
+ This::wxCaret(), Width::integer(), Height::integer().
setSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxCaret),
wxe_util:cast(?wxCaret_SetSize_2,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxCaret()) -> ok
%% @equiv show(This, [])
+-spec show(This) -> ok when
+ This::wxCaret().
+
show(This)
when is_record(This, wx_ref) ->
show(This, []).
-%% @spec (This::wxCaret(), [Option]) -> ok
-%% Option = {show, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcaret.html#wxcaretshow">external documentation</a>.
+-spec show(This, [Option]) -> ok when
+ This::wxCaret(),
+ Option :: {show, boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCaret),
@@ -173,8 +193,8 @@ show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxCaret_Show,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxCaret()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxCaret()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCaret),
wxe_util:destroy(?wxCaret_destruct,Obj),
diff --git a/lib/wx/src/gen/wxCheckBox.erl b/lib/wx/src/gen/wxCheckBox.erl
index 19f01645c1..6e30f14207 100644
--- a/lib/wx/src/gen/wxCheckBox.erl
+++ b/lib/wx/src/gen/wxCheckBox.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,27 +71,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxCheckBox/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxCheckBox()
+-type wxCheckBox() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxwxcheckbox">external documentation</a>.
+-spec new() -> wxCheckBox().
new() ->
wxe_util:construct(?wxCheckBox_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> wxCheckBox()
%% @equiv new(Parent,Id,Label, [])
+-spec new(Parent, Id, Label) -> wxCheckBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
new(Parent,Id,Label)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
new(Parent,Id,Label, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> wxCheckBox()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxwxcheckbox">external documentation</a>.
+-spec new(Parent, Id, Label, [Option]) -> wxCheckBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -105,15 +113,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
wxe_util:construct(?wxCheckBox_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxCheckBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> bool()
%% @equiv create(This,Parent,Id,Label, [])
+-spec create(This, Parent, Id, Label) -> boolean() when
+ This::wxCheckBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
create(This,Parent,Id,Label)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
create(This,Parent,Id,Label, []).
-%% @spec (This::wxCheckBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxcreate">external documentation</a>.
+-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
+ This::wxCheckBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxCheckBox),
@@ -128,63 +142,68 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,La
wxe_util:call(?wxCheckBox_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxCheckBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxgetvalue">external documentation</a>.
+-spec getValue(This) -> boolean() when
+ This::wxCheckBox().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCheckBox),
wxe_util:call(?wxCheckBox_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCheckBox()) -> WxCheckBoxState
-%% WxCheckBoxState = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxget3statevalue">external documentation</a>.
-%%<br /> WxCheckBoxState is one of ?wxCHK_UNCHECKED | ?wxCHK_CHECKED | ?wxCHK_UNDETERMINED
+%%<br /> Res = ?wxCHK_UNCHECKED | ?wxCHK_CHECKED | ?wxCHK_UNDETERMINED
+-spec get3StateValue(This) -> wx:wx_enum() when
+ This::wxCheckBox().
get3StateValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCheckBox),
wxe_util:call(?wxCheckBox_Get3StateValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCheckBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxis3rdstateallowedforuser">external documentation</a>.
+-spec is3rdStateAllowedForUser(This) -> boolean() when
+ This::wxCheckBox().
is3rdStateAllowedForUser(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCheckBox),
wxe_util:call(?wxCheckBox_Is3rdStateAllowedForUser,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCheckBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxis3state">external documentation</a>.
+-spec is3State(This) -> boolean() when
+ This::wxCheckBox().
is3State(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCheckBox),
wxe_util:call(?wxCheckBox_Is3State,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCheckBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxischecked">external documentation</a>.
+-spec isChecked(This) -> boolean() when
+ This::wxCheckBox().
isChecked(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCheckBox),
wxe_util:call(?wxCheckBox_IsChecked,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCheckBox(), State::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxsetvalue">external documentation</a>.
+-spec setValue(This, State) -> ok when
+ This::wxCheckBox(), State::boolean().
setValue(#wx_ref{type=ThisT,ref=ThisRef},State)
when is_boolean(State) ->
?CLASS(ThisT,wxCheckBox),
wxe_util:cast(?wxCheckBox_SetValue,
<<ThisRef:32/?UI,(wxe_util:from_bool(State)):32/?UI>>).
-%% @spec (This::wxCheckBox(), State::WxCheckBoxState) -> ok
-%% WxCheckBoxState = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html#wxcheckboxset3statevalue">external documentation</a>.
-%%<br /> WxCheckBoxState is one of ?wxCHK_UNCHECKED | ?wxCHK_CHECKED | ?wxCHK_UNDETERMINED
+%%<br /> State = ?wxCHK_UNCHECKED | ?wxCHK_CHECKED | ?wxCHK_UNDETERMINED
+-spec set3StateValue(This, State) -> ok when
+ This::wxCheckBox(), State::wx:wx_enum().
set3StateValue(#wx_ref{type=ThisT,ref=ThisRef},State)
when is_integer(State) ->
?CLASS(ThisT,wxCheckBox),
wxe_util:cast(?wxCheckBox_Set3StateValue,
<<ThisRef:32/?UI,State:32/?UI>>).
-%% @spec (This::wxCheckBox()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxCheckBox()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCheckBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCheckListBox.erl b/lib/wx/src/gen/wxCheckListBox.erl
index a1a07e1eec..083a9e32f4 100644
--- a/lib/wx/src/gen/wxCheckListBox.erl
+++ b/lib/wx/src/gen/wxCheckListBox.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -75,6 +75,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxCheckListBox/0]).
%% @hidden
parent_class(wxListBox) -> true;
parent_class(wxControlWithItems) -> true;
@@ -83,21 +84,29 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxCheckListBox()
+-type wxCheckListBox() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchecklistbox.html#wxchecklistboxwxchecklistbox">external documentation</a>.
+-spec new() -> wxCheckListBox().
new() ->
wxe_util:construct(?wxCheckListBox_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxCheckListBox()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxCheckListBox() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxCheckListBox()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {choices, [[string()]]} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchecklistbox.html#wxchecklistboxwxchecklistbox">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxCheckListBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {choices, [[unicode:chardata()]]}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -111,15 +120,18 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxCheckListBox_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxCheckListBox(), Index::integer()) -> ok
%% @equiv check(This,Index, [])
+-spec check(This, Index) -> ok when
+ This::wxCheckListBox(), Index::integer().
+
check(This,Index)
when is_record(This, wx_ref),is_integer(Index) ->
check(This,Index, []).
-%% @spec (This::wxCheckListBox(), Index::integer(), [Option]) -> ok
-%% Option = {check, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchecklistbox.html#wxchecklistboxcheck">external documentation</a>.
+-spec check(This, Index, [Option]) -> ok when
+ This::wxCheckListBox(), Index::integer(),
+ Option :: {check, boolean()}.
check(#wx_ref{type=ThisT,ref=ThisRef},Index, Options)
when is_integer(Index),is_list(Options) ->
?CLASS(ThisT,wxCheckListBox),
@@ -129,16 +141,17 @@ check(#wx_ref{type=ThisT,ref=ThisRef},Index, Options)
wxe_util:cast(?wxCheckListBox_Check,
<<ThisRef:32/?UI,Index:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxCheckListBox(), Index::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchecklistbox.html#wxchecklistboxischecked">external documentation</a>.
+-spec isChecked(This, Index) -> boolean() when
+ This::wxCheckListBox(), Index::integer().
isChecked(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxCheckListBox),
wxe_util:call(?wxCheckListBox_IsChecked,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxCheckListBox()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxCheckListBox()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCheckListBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxChildFocusEvent.erl b/lib/wx/src/gen/wxChildFocusEvent.erl
index a20071cbf5..642db88c06 100644
--- a/lib/wx/src/gen/wxChildFocusEvent.erl
+++ b/lib/wx/src/gen/wxChildFocusEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,13 +40,16 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxChildFocusEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxChildFocusEvent()) -> wxWindow:wxWindow()
+-type wxChildFocusEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchildfocusevent.html#wxchildfocuseventgetwindow">external documentation</a>.
+-spec getWindow(This) -> wxWindow:wxWindow() when
+ This::wxChildFocusEvent().
getWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxChildFocusEvent),
wxe_util:call(?wxChildFocusEvent_GetWindow,
diff --git a/lib/wx/src/gen/wxChoice.erl b/lib/wx/src/gen/wxChoice.erl
index fa967d8487..2a2b2688fe 100644
--- a/lib/wx/src/gen/wxChoice.erl
+++ b/lib/wx/src/gen/wxChoice.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,6 +74,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxChoice/0]).
%% @hidden
parent_class(wxControlWithItems) -> true;
parent_class(wxControl) -> true;
@@ -81,21 +82,29 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxChoice()
+-type wxChoice() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoice.html#wxchoicewxchoice">external documentation</a>.
+-spec new() -> wxChoice().
new() ->
wxe_util:construct(?wxChoice_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxChoice()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxChoice() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxChoice()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {choices, [[string()]]} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoice.html#wxchoicewxchoice">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxChoice() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {choices, [[unicode:chardata()]]}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -109,15 +118,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxChoice_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxChoice(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]]) -> bool()
%% @equiv create(This,Parent,Id,Pos,Size,Choices, [])
+-spec create(This, Parent, Id, Pos, Size, Choices) -> boolean() when
+ This::wxChoice(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]].
+
create(This,Parent,Id,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices) ->
create(This,Parent,Id,Pos,Size,Choices, []).
-%% @spec (This::wxChoice(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]], [Option]) -> bool()
-%% Option = {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoice.html#wxchoicecreate">external documentation</a>.
+-spec create(This, Parent, Id, Pos, Size, Choices, [Option]) -> boolean() when
+ This::wxChoice(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]],
+ Option :: {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ThisT,wxChoice),
@@ -131,30 +144,35 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,{P
wxe_util:call(?wxChoice_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxChoice(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoice.html#wxchoicedelete">external documentation</a>.
+-spec delete(This, N) -> ok when
+ This::wxChoice(), N::integer().
delete(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxChoice),
wxe_util:cast(?wxChoice_Delete,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxChoice()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoice.html#wxchoicegetcolumns">external documentation</a>.
+-spec getColumns(This) -> integer() when
+ This::wxChoice().
getColumns(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxChoice),
wxe_util:call(?wxChoice_GetColumns,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxChoice()) -> ok
%% @equiv setColumns(This, [])
+-spec setColumns(This) -> ok when
+ This::wxChoice().
+
setColumns(This)
when is_record(This, wx_ref) ->
setColumns(This, []).
-%% @spec (This::wxChoice(), [Option]) -> ok
-%% Option = {n, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoice.html#wxchoicesetcolumns">external documentation</a>.
+-spec setColumns(This, [Option]) -> ok when
+ This::wxChoice(),
+ Option :: {n, integer()}.
setColumns(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxChoice),
@@ -164,8 +182,8 @@ setColumns(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxChoice_SetColumns,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxChoice()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxChoice()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxChoice),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxChoicebook.erl b/lib/wx/src/gen/wxChoicebook.erl
index f37457f0ed..921e1e2882 100644
--- a/lib/wx/src/gen/wxChoicebook.erl
+++ b/lib/wx/src/gen/wxChoicebook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,27 +74,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxChoicebook/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxChoicebook()
+-type wxChoicebook() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookwxchoicebook">external documentation</a>.
+-spec new() -> wxChoicebook().
new() ->
wxe_util:construct(?wxChoicebook_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxChoicebook()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxChoicebook() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxChoicebook()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookwxchoicebook">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxChoicebook() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -106,15 +113,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxChoicebook_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxChoicebook(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv addPage(This,Page,Text, [])
+-spec addPage(This, Page, Text) -> boolean() when
+ This::wxChoicebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
addPage(This,Page,Text)
when is_record(This, wx_ref),is_record(Page, wx_ref),is_list(Text) ->
addPage(This,Page,Text, []).
-%% @spec (This::wxChoicebook(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookaddpage">external documentation</a>.
+-spec addPage(This, Page, Text, [Option]) -> boolean() when
+ This::wxChoicebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxChoicebook),
@@ -127,15 +138,18 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
wxe_util:call(?wxChoicebook_AddPage,
<<ThisRef:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxChoicebook()) -> ok
%% @equiv advanceSelection(This, [])
+-spec advanceSelection(This) -> ok when
+ This::wxChoicebook().
+
advanceSelection(This)
when is_record(This, wx_ref) ->
advanceSelection(This, []).
-%% @spec (This::wxChoicebook(), [Option]) -> ok
-%% Option = {forward, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookadvanceselection">external documentation</a>.
+-spec advanceSelection(This, [Option]) -> ok when
+ This::wxChoicebook(),
+ Option :: {forward, boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxChoicebook),
@@ -145,23 +159,29 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxChoicebook_AdvanceSelection,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxChoicebook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookassignimagelist">external documentation</a>.
+-spec assignImageList(This, ImageList) -> ok when
+ This::wxChoicebook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxChoicebook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxChoicebook_AssignImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxChoicebook(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxChoicebook(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxChoicebook(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxChoicebook(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxChoicebook),
@@ -174,98 +194,114 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxChoicebook_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxChoicebook()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookdeleteallpages">external documentation</a>.
+-spec deleteAllPages(This) -> boolean() when
+ This::wxChoicebook().
deleteAllPages(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_DeleteAllPages,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookdeletepage">external documentation</a>.
+-spec deletePage(This, N) -> boolean() when
+ This::wxChoicebook(), N::integer().
deletePage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_DeletePage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookremovepage">external documentation</a>.
+-spec removePage(This, N) -> boolean() when
+ This::wxChoicebook(), N::integer().
removePage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_RemovePage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxChoicebook()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookgetcurrentpage">external documentation</a>.
+-spec getCurrentPage(This) -> wxWindow:wxWindow() when
+ This::wxChoicebook().
getCurrentPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_GetCurrentPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxChoicebook()) -> wxImageList:wxImageList()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookgetimagelist">external documentation</a>.
+-spec getImageList(This) -> wxImageList:wxImageList() when
+ This::wxChoicebook().
getImageList(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_GetImageList,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookgetpage">external documentation</a>.
+-spec getPage(This, N) -> wxWindow:wxWindow() when
+ This::wxChoicebook(), N::integer().
getPage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_GetPage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxChoicebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookgetpagecount">external documentation</a>.
+-spec getPageCount(This) -> integer() when
+ This::wxChoicebook().
getPageCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_GetPageCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookgetpageimage">external documentation</a>.
+-spec getPageImage(This, N) -> integer() when
+ This::wxChoicebook(), N::integer().
getPageImage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_GetPageImage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookgetpagetext">external documentation</a>.
+-spec getPageText(This, N) -> unicode:charlist() when
+ This::wxChoicebook(), N::integer().
getPageText(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_GetPageText,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxChoicebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxChoicebook().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxChoicebook(), Pt::{X::integer(), Y::integer()}) -> {integer(), Flags::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookhittest">external documentation</a>.
+-spec hitTest(This, Pt) -> Result when
+ Result ::{Res ::integer(), Flags::integer()},
+ This::wxChoicebook(), Pt::{X::integer(), Y::integer()}.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_HitTest,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv insertPage(This,N,Page,Text, [])
+-spec insertPage(This, N, Page, Text) -> boolean() when
+ This::wxChoicebook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
insertPage(This,N,Page,Text)
when is_record(This, wx_ref),is_integer(N),is_record(Page, wx_ref),is_list(Text) ->
insertPage(This,N,Page,Text, []).
-%% @spec (This::wxChoicebook(), N::integer(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookinsertpage">external documentation</a>.
+-spec insertPage(This, N, Page, Text, [Option]) -> boolean() when
+ This::wxChoicebook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(N),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxChoicebook),
@@ -278,32 +314,36 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Tex
wxe_util:call(?wxChoicebook_InsertPage,
<<ThisRef:32/?UI,N:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxChoicebook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebooksetimagelist">external documentation</a>.
+-spec setImageList(This, ImageList) -> ok when
+ This::wxChoicebook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxChoicebook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxChoicebook_SetImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxChoicebook(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebooksetpagesize">external documentation</a>.
+-spec setPageSize(This, Size) -> ok when
+ This::wxChoicebook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:cast(?wxChoicebook_SetPageSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer(), ImageId::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebooksetpageimage">external documentation</a>.
+-spec setPageImage(This, N, ImageId) -> boolean() when
+ This::wxChoicebook(), N::integer(), ImageId::integer().
setPageImage(#wx_ref{type=ThisT,ref=ThisRef},N,ImageId)
when is_integer(N),is_integer(ImageId) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_SetPageImage,
<<ThisRef:32/?UI,N:32/?UI,ImageId:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer(), StrText::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebooksetpagetext">external documentation</a>.
+-spec setPageText(This, N, StrText) -> boolean() when
+ This::wxChoicebook(), N::integer(), StrText::unicode:chardata().
setPageText(#wx_ref{type=ThisT,ref=ThisRef},N,StrText)
when is_integer(N),is_list(StrText) ->
?CLASS(ThisT,wxChoicebook),
@@ -311,24 +351,26 @@ setPageText(#wx_ref{type=ThisT,ref=ThisRef},N,StrText)
wxe_util:call(?wxChoicebook_SetPageText,
<<ThisRef:32/?UI,N:32/?UI,(byte_size(StrText_UC)):32/?UI,(StrText_UC)/binary, 0:(((8- ((4+byte_size(StrText_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxChoicebook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebooksetselection">external documentation</a>.
+-spec setSelection(This, N) -> integer() when
+ This::wxChoicebook(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_SetSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxChoicebook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxchoicebook.html#wxchoicebookchangeselection">external documentation</a>.
+-spec changeSelection(This, N) -> integer() when
+ This::wxChoicebook(), N::integer().
changeSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxChoicebook),
wxe_util:call(?wxChoicebook_ChangeSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxChoicebook()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxChoicebook()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxChoicebook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxClientDC.erl b/lib/wx/src/gen/wxClientDC.erl
index c966fb50cc..7dfebe4068 100644
--- a/lib/wx/src/gen/wxClientDC.erl
+++ b/lib/wx/src/gen/wxClientDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,10 +39,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -53,26 +53,29 @@
setPen/2,setTextBackground/2,setTextForeground/2,setUserScale/3,startDoc/2,
startPage/1]).
+-export_type([wxClientDC/0]).
%% @hidden
parent_class(wxWindowDC) -> true;
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxClientDC()
+-type wxClientDC() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclientdc.html#wxclientdcwxclientdc">external documentation</a>.
+-spec new() -> wxClientDC().
new() ->
wxe_util:construct(?wxClientDC_new_0,
<<>>).
-%% @spec (Win::wxWindow:wxWindow()) -> wxClientDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclientdc.html#wxclientdcwxclientdc">external documentation</a>.
+-spec new(Win) -> wxClientDC() when
+ Win::wxWindow:wxWindow().
new(#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(WinT,wxWindow),
wxe_util:construct(?wxClientDC_new_1,
<<WinRef:32/?UI>>).
-%% @spec (This::wxClientDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxClientDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxClientDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -160,11 +163,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -178,7 +181,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxClipboard.erl b/lib/wx/src/gen/wxClipboard.erl
index 7ae27b3133..8f1d59f603 100644
--- a/lib/wx/src/gen/wxClipboard.erl
+++ b/lib/wx/src/gen/wxClipboard.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,83 +30,96 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxClipboard/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxClipboard()
+-type wxClipboard() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardwxclipboard">external documentation</a>.
+-spec new() -> wxClipboard().
new() ->
wxe_util:construct(?wxClipboard_new,
<<>>).
-%% @spec (This::wxClipboard(), Data::wxDataObject:wxDataObject()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardadddata">external documentation</a>.
+-spec addData(This, Data) -> boolean() when
+ This::wxClipboard(), Data::wxDataObject:wxDataObject().
addData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(ThisT,wxClipboard),
?CLASS(DataT,wxDataObject),
wxe_util:call(?wxClipboard_AddData,
<<ThisRef:32/?UI,DataRef:32/?UI>>).
-%% @spec (This::wxClipboard()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardclear">external documentation</a>.
+-spec clear(This) -> ok when
+ This::wxClipboard().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxClipboard),
wxe_util:cast(?wxClipboard_Clear,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxClipboard()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardclose">external documentation</a>.
+-spec close(This) -> ok when
+ This::wxClipboard().
close(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxClipboard),
wxe_util:cast(?wxClipboard_Close,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxClipboard()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardflush">external documentation</a>.
+-spec flush(This) -> boolean() when
+ This::wxClipboard().
flush(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxClipboard),
wxe_util:call(?wxClipboard_Flush,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxClipboard(), Data::wxDataObject:wxDataObject()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardgetdata">external documentation</a>.
+-spec getData(This, Data) -> boolean() when
+ This::wxClipboard(), Data::wxDataObject:wxDataObject().
getData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(ThisT,wxClipboard),
?CLASS(DataT,wxDataObject),
wxe_util:call(?wxClipboard_GetData,
<<ThisRef:32/?UI,DataRef:32/?UI>>).
-%% @spec (This::wxClipboard()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardisopened">external documentation</a>.
+-spec isOpened(This) -> boolean() when
+ This::wxClipboard().
isOpened(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxClipboard),
wxe_util:call(?wxClipboard_IsOpened,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxClipboard()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardopen">external documentation</a>.
+-spec open(This) -> boolean() when
+ This::wxClipboard().
open(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxClipboard),
wxe_util:call(?wxClipboard_Open,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxClipboard(), Data::wxDataObject:wxDataObject()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardsetdata">external documentation</a>.
+-spec setData(This, Data) -> boolean() when
+ This::wxClipboard(), Data::wxDataObject:wxDataObject().
setData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(ThisT,wxClipboard),
?CLASS(DataT,wxDataObject),
wxe_util:call(?wxClipboard_SetData,
<<ThisRef:32/?UI,DataRef:32/?UI>>).
-%% @spec (This::wxClipboard()) -> ok
%% @equiv usePrimarySelection(This, [])
+-spec usePrimarySelection(This) -> ok when
+ This::wxClipboard().
+
usePrimarySelection(This)
when is_record(This, wx_ref) ->
usePrimarySelection(This, []).
-%% @spec (This::wxClipboard(), [Option]) -> ok
-%% Option = {primary, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboarduseprimaryselection">external documentation</a>.
+-spec usePrimarySelection(This, [Option]) -> ok when
+ This::wxClipboard(),
+ Option :: {primary, boolean()}.
usePrimarySelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxClipboard),
@@ -116,22 +129,23 @@ usePrimarySelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxClipboard_UsePrimarySelection,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxClipboard(), Format::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardissupported">external documentation</a>.
+-spec isSupported(This, Format) -> boolean() when
+ This::wxClipboard(), Format::integer().
isSupported(#wx_ref{type=ThisT,ref=ThisRef},Format)
when is_integer(Format) ->
?CLASS(ThisT,wxClipboard),
wxe_util:call(?wxClipboard_IsSupported,
<<ThisRef:32/?UI,Format:32/?UI>>).
-%% @spec () -> wxClipboard()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxclipboard.html#wxclipboardget">external documentation</a>.
+-spec get() -> wxClipboard().
get() ->
wxe_util:call(?wxClipboard_Get,
<<>>).
-%% @spec (This::wxClipboard()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxClipboard()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxClipboard),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCloseEvent.erl b/lib/wx/src/gen/wxCloseEvent.erl
index 706d7701de..4a682c906e 100644
--- a/lib/wx/src/gen/wxCloseEvent.erl
+++ b/lib/wx/src/gen/wxCloseEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,49 +37,58 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxCloseEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxCloseEvent()) -> bool()
+-type wxCloseEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcloseevent.html#wxcloseeventcanveto">external documentation</a>.
+-spec canVeto(This) -> boolean() when
+ This::wxCloseEvent().
canVeto(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCloseEvent),
wxe_util:call(?wxCloseEvent_CanVeto,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCloseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcloseevent.html#wxcloseeventgetloggingoff">external documentation</a>.
+-spec getLoggingOff(This) -> boolean() when
+ This::wxCloseEvent().
getLoggingOff(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCloseEvent),
wxe_util:call(?wxCloseEvent_GetLoggingOff,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCloseEvent(), CanVeto::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcloseevent.html#wxcloseeventsetcanveto">external documentation</a>.
+-spec setCanVeto(This, CanVeto) -> ok when
+ This::wxCloseEvent(), CanVeto::boolean().
setCanVeto(#wx_ref{type=ThisT,ref=ThisRef},CanVeto)
when is_boolean(CanVeto) ->
?CLASS(ThisT,wxCloseEvent),
wxe_util:cast(?wxCloseEvent_SetCanVeto,
<<ThisRef:32/?UI,(wxe_util:from_bool(CanVeto)):32/?UI>>).
-%% @spec (This::wxCloseEvent(), LogOff::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcloseevent.html#wxcloseeventsetloggingoff">external documentation</a>.
+-spec setLoggingOff(This, LogOff) -> ok when
+ This::wxCloseEvent(), LogOff::boolean().
setLoggingOff(#wx_ref{type=ThisT,ref=ThisRef},LogOff)
when is_boolean(LogOff) ->
?CLASS(ThisT,wxCloseEvent),
wxe_util:cast(?wxCloseEvent_SetLoggingOff,
<<ThisRef:32/?UI,(wxe_util:from_bool(LogOff)):32/?UI>>).
-%% @spec (This::wxCloseEvent()) -> ok
%% @equiv veto(This, [])
+-spec veto(This) -> ok when
+ This::wxCloseEvent().
+
veto(This)
when is_record(This, wx_ref) ->
veto(This, []).
-%% @spec (This::wxCloseEvent(), [Option]) -> ok
-%% Option = {veto, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcloseevent.html#wxcloseeventveto">external documentation</a>.
+-spec veto(This, [Option]) -> ok when
+ This::wxCloseEvent(),
+ Option :: {veto, boolean()}.
veto(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCloseEvent),
diff --git a/lib/wx/src/gen/wxColourData.erl b/lib/wx/src/gen/wxColourData.erl
index dc77ea043c..289d423cb6 100644
--- a/lib/wx/src/gen/wxColourData.erl
+++ b/lib/wx/src/gen/wxColourData.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,70 +30,79 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxColourData/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxColourData()
+-type wxColourData() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdata.html#wxcolourdatawxcolourdata">external documentation</a>.
+-spec new() -> wxColourData().
new() ->
wxe_util:construct(?wxColourData_new_0,
<<>>).
-%% @spec (Data::wxColourData()) -> wxColourData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdata.html#wxcolourdatawxcolourdata">external documentation</a>.
+-spec new(Data) -> wxColourData() when
+ Data::wxColourData().
new(#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(DataT,wxColourData),
wxe_util:construct(?wxColourData_new_1,
<<DataRef:32/?UI>>).
-%% @spec (This::wxColourData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdata.html#wxcolourdatagetchoosefull">external documentation</a>.
+-spec getChooseFull(This) -> boolean() when
+ This::wxColourData().
getChooseFull(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxColourData),
wxe_util:call(?wxColourData_GetChooseFull,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxColourData()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdata.html#wxcolourdatagetcolour">external documentation</a>.
+-spec getColour(This) -> wx:wx_colour4() when
+ This::wxColourData().
getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxColourData),
wxe_util:call(?wxColourData_GetColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxColourData(), I::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdata.html#wxcolourdatagetcustomcolour">external documentation</a>.
+-spec getCustomColour(This, I) -> wx:wx_colour4() when
+ This::wxColourData(), I::integer().
getCustomColour(#wx_ref{type=ThisT,ref=ThisRef},I)
when is_integer(I) ->
?CLASS(ThisT,wxColourData),
wxe_util:call(?wxColourData_GetCustomColour,
<<ThisRef:32/?UI,I:32/?UI>>).
-%% @spec (This::wxColourData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdata.html#wxcolourdatasetchoosefull">external documentation</a>.
+-spec setChooseFull(This, Flag) -> ok when
+ This::wxColourData(), Flag::boolean().
setChooseFull(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxColourData),
wxe_util:cast(?wxColourData_SetChooseFull,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxColourData(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdata.html#wxcolourdatasetcolour">external documentation</a>.
+-spec setColour(This, Colour) -> ok when
+ This::wxColourData(), Colour::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxColourData),
wxe_util:cast(?wxColourData_SetColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxColourData(), I::integer(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdata.html#wxcolourdatasetcustomcolour">external documentation</a>.
+-spec setCustomColour(This, I, Colour) -> ok when
+ This::wxColourData(), I::integer(), Colour::wx:wx_colour().
setCustomColour(#wx_ref{type=ThisT,ref=ThisRef},I,Colour)
when is_integer(I),tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxColourData),
wxe_util:cast(?wxColourData_SetCustomColour,
<<ThisRef:32/?UI,I:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxColourData()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxColourData()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxColourData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxColourDialog.erl b/lib/wx/src/gen/wxColourDialog.erl
index f5677d00ff..8040112426 100644
--- a/lib/wx/src/gen/wxColourDialog.erl
+++ b/lib/wx/src/gen/wxColourDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxColourDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,21 +85,25 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxColourDialog()
+-type wxColourDialog() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdialog.html#wxcolourdialogwxcolourdialog">external documentation</a>.
+-spec new() -> wxColourDialog().
new() ->
wxe_util:construct(?wxColourDialog_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxColourDialog()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxColourDialog() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxColourDialog()
-%% Option = {data, wxColourData:wxColourData()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdialog.html#wxcolourdialogwxcolourdialog">external documentation</a>.
+-spec new(Parent, [Option]) -> wxColourDialog() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {data, wxColourData:wxColourData()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -108,15 +113,18 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxColourDialog_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxColourDialog(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxColourDialog(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxColourDialog(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {data, wxColourData:wxColourData()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdialog.html#wxcolourdialogcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxColourDialog(), Parent::wxWindow:wxWindow(),
+ Option :: {data, wxColourData:wxColourData()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxColourDialog),
@@ -127,15 +135,16 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxColourDialog_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxColourDialog()) -> wxColourData:wxColourData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourdialog.html#wxcolourdialoggetcolourdata">external documentation</a>.
+-spec getColourData(This) -> wxColourData:wxColourData() when
+ This::wxColourDialog().
getColourData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxColourDialog),
wxe_util:call(?wxColourDialog_GetColourData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxColourDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxColourDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxColourDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxColourPickerCtrl.erl b/lib/wx/src/gen/wxColourPickerCtrl.erl
index 60776925b9..1ba771695f 100644
--- a/lib/wx/src/gen/wxColourPickerCtrl.erl
+++ b/lib/wx/src/gen/wxColourPickerCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,6 +74,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxColourPickerCtrl/0]).
%% @hidden
parent_class(wxPickerBase) -> true;
parent_class(wxControl) -> true;
@@ -81,21 +82,29 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxColourPickerCtrl()
+-type wxColourPickerCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourpickerctrl.html#wxcolourpickerctrlwxcolourpickerctrl">external documentation</a>.
+-spec new() -> wxColourPickerCtrl().
new() ->
wxe_util:construct(?wxColourPickerCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxColourPickerCtrl()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxColourPickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxColourPickerCtrl()
-%% Option = {col, wx:colour()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourpickerctrl.html#wxcolourpickerctrlwxcolourpickerctrl">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxColourPickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {col, wx:wx_colour()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -109,15 +118,22 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxColourPickerCtrl_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxColourPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxColourPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxColourPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {col, wx:colour()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourpickerctrl.html#wxcolourpickerctrlcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxColourPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {col, wx:wx_colour()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxColourPickerCtrl),
@@ -132,22 +148,23 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxColourPickerCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxColourPickerCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourpickerctrl.html#wxcolourpickerctrlgetcolour">external documentation</a>.
+-spec getColour(This) -> wx:wx_colour4() when
+ This::wxColourPickerCtrl().
getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxColourPickerCtrl),
wxe_util:call(?wxColourPickerCtrl_GetColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxColourPickerCtrl(),X::string()|term()) -> bool()|ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourpickerctrl.html#wxcolourpickerctrlsetcolour">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setColour(This::wxColourPickerCtrl(), Text::string()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% setColour(This::wxColourPickerCtrl(), Col::wx:colour()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setColour(This, Col) -> ok when<br />
+%% This::wxColourPickerCtrl(), Col::wx:wx_colour().<br />
+%%
+-spec setColour(This, Text) -> boolean() when
+ This::wxColourPickerCtrl(), Text::unicode:chardata();
+ (This, Col) -> ok when
+ This::wxColourPickerCtrl(), Col::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxColourPickerCtrl),
@@ -160,8 +177,8 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
wxe_util:cast(?wxColourPickerCtrl_SetColour_1_1,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxColourPickerCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxColourPickerCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxColourPickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxColourPickerEvent.erl b/lib/wx/src/gen/wxColourPickerEvent.erl
index 9ba431b841..71a3fd3e5b 100644
--- a/lib/wx/src/gen/wxColourPickerEvent.erl
+++ b/lib/wx/src/gen/wxColourPickerEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,13 +40,16 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxColourPickerEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxColourPickerEvent()) -> wx:colour()
+-type wxColourPickerEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcolourpickerevent.html#wxcolourpickereventgetcolour">external documentation</a>.
+-spec getColour(This) -> wx:wx_colour4() when
+ This::wxColourPickerEvent().
getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxColourPickerEvent),
wxe_util:call(?wxColourPickerEvent_GetColour,
diff --git a/lib/wx/src/gen/wxComboBox.erl b/lib/wx/src/gen/wxComboBox.erl
index f743df4e93..c67ff82bbc 100644
--- a/lib/wx/src/gen/wxComboBox.erl
+++ b/lib/wx/src/gen/wxComboBox.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -76,6 +76,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxComboBox/0]).
%% @hidden
parent_class(wxControlWithItems) -> true;
parent_class(wxControl) -> true;
@@ -83,21 +84,30 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxComboBox()
+-type wxComboBox() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxwxcombobox">external documentation</a>.
+-spec new() -> wxComboBox().
new() ->
wxe_util:construct(?wxComboBox_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxComboBox()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxComboBox() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxComboBox()
-%% Option = {value, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {choices, [[string()]]} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxwxcombobox">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxComboBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {value, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {choices, [[unicode:chardata()]]}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -112,15 +122,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxComboBox_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]]) -> bool()
%% @equiv create(This,Parent,Id,Value,Pos,Size,Choices, [])
+-spec create(This, Parent, Id, Value, Pos, Size, Choices) -> boolean() when
+ This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]].
+
create(This,Parent,Id,Value,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Value),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices) ->
create(This,Parent,Id,Value,Pos,Size,Choices, []).
-%% @spec (This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]], [Option]) -> bool()
-%% Option = {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxcreate">external documentation</a>.
+-spec create(This, Parent, Id, Value, Pos, Size, Choices, [Option]) -> boolean() when
+ This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]],
+ Option :: {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Value,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_list(Value),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ThisT,wxComboBox),
@@ -135,92 +149,105 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Va
wxe_util:call(?wxComboBox_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((0+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((4 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxComboBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxcancopy">external documentation</a>.
+-spec canCopy(This) -> boolean() when
+ This::wxComboBox().
canCopy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:call(?wxComboBox_CanCopy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxcancut">external documentation</a>.
+-spec canCut(This) -> boolean() when
+ This::wxComboBox().
canCut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:call(?wxComboBox_CanCut,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxcanpaste">external documentation</a>.
+-spec canPaste(This) -> boolean() when
+ This::wxComboBox().
canPaste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:call(?wxComboBox_CanPaste,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxcanredo">external documentation</a>.
+-spec canRedo(This) -> boolean() when
+ This::wxComboBox().
canRedo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:call(?wxComboBox_CanRedo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxcanundo">external documentation</a>.
+-spec canUndo(This) -> boolean() when
+ This::wxComboBox().
canUndo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:call(?wxComboBox_CanUndo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxcopy">external documentation</a>.
+-spec copy(This) -> ok when
+ This::wxComboBox().
copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_Copy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxcut">external documentation</a>.
+-spec cut(This) -> ok when
+ This::wxComboBox().
cut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_Cut,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxgetinsertionpoint">external documentation</a>.
+-spec getInsertionPoint(This) -> integer() when
+ This::wxComboBox().
getInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:call(?wxComboBox_GetInsertionPoint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxgetlastposition">external documentation</a>.
+-spec getLastPosition(This) -> integer() when
+ This::wxComboBox().
getLastPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:call(?wxComboBox_GetLastPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxgetvalue">external documentation</a>.
+-spec getValue(This) -> unicode:charlist() when
+ This::wxComboBox().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:call(?wxComboBox_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxpaste">external documentation</a>.
+-spec paste(This) -> ok when
+ This::wxComboBox().
paste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_Paste,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxredo">external documentation</a>.
+-spec redo(This) -> ok when
+ This::wxComboBox().
redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_Redo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox(), From::integer(), To::integer(), Value::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxreplace">external documentation</a>.
+-spec replace(This, From, To, Value) -> ok when
+ This::wxComboBox(), From::integer(), To::integer(), Value::unicode:chardata().
replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value)
when is_integer(From),is_integer(To),is_list(Value) ->
?CLASS(ThisT,wxComboBox),
@@ -228,47 +255,53 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value)
wxe_util:cast(?wxComboBox_Replace,
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((0+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxComboBox(), From::integer(), To::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxremove">external documentation</a>.
+-spec remove(This, From, To) -> ok when
+ This::wxComboBox(), From::integer(), To::integer().
remove(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_Remove,
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
-%% @spec (This::wxComboBox(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxsetinsertionpoint">external documentation</a>.
+-spec setInsertionPoint(This, Pos) -> ok when
+ This::wxComboBox(), Pos::integer().
setInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_SetInsertionPoint,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxComboBox()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxsetinsertionpointend">external documentation</a>.
+-spec setInsertionPointEnd(This) -> ok when
+ This::wxComboBox().
setInsertionPointEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_SetInsertionPointEnd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxsetselection">external documentation</a>.
+-spec setSelection(This, N) -> ok when
+ This::wxComboBox(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_SetSelection_1,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxComboBox(), From::integer(), To::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxsetselection">external documentation</a>.
+-spec setSelection(This, From, To) -> ok when
+ This::wxComboBox(), From::integer(), To::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_SetSelection_2,
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
-%% @spec (This::wxComboBox(), Value::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxsetvalue">external documentation</a>.
+-spec setValue(This, Value) -> ok when
+ This::wxComboBox(), Value::unicode:chardata().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_list(Value) ->
?CLASS(ThisT,wxComboBox),
@@ -276,15 +309,16 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
wxe_util:cast(?wxComboBox_SetValue,
<<ThisRef:32/?UI,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((0+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxComboBox()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcombobox.html#wxcomboboxundo">external documentation</a>.
+-spec undo(This) -> ok when
+ This::wxComboBox().
undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
wxe_util:cast(?wxComboBox_Undo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxComboBox()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxComboBox()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxComboBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCommandEvent.erl b/lib/wx/src/gen/wxCommandEvent.erl
index 57fb9cecda..a7567163cf 100644
--- a/lib/wx/src/gen/wxCommandEvent.erl
+++ b/lib/wx/src/gen/wxCommandEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,69 +38,80 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxCommandEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxCommandEvent()) -> term()
+-type wxCommandEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventgetclientobject">external documentation</a>.
+-spec getClientData(This) -> term() when
+ This::wxCommandEvent().
getClientData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCommandEvent),
wxe_util:call(?wxCommandEvent_getClientData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCommandEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventgetextralong">external documentation</a>.
+-spec getExtraLong(This) -> integer() when
+ This::wxCommandEvent().
getExtraLong(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCommandEvent),
wxe_util:call(?wxCommandEvent_GetExtraLong,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCommandEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventgetint">external documentation</a>.
+-spec getInt(This) -> integer() when
+ This::wxCommandEvent().
getInt(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCommandEvent),
wxe_util:call(?wxCommandEvent_GetInt,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCommandEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxCommandEvent().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCommandEvent),
wxe_util:call(?wxCommandEvent_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCommandEvent()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventgetstring">external documentation</a>.
+-spec getString(This) -> unicode:charlist() when
+ This::wxCommandEvent().
getString(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCommandEvent),
wxe_util:call(?wxCommandEvent_GetString,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCommandEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventischecked">external documentation</a>.
+-spec isChecked(This) -> boolean() when
+ This::wxCommandEvent().
isChecked(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCommandEvent),
wxe_util:call(?wxCommandEvent_IsChecked,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCommandEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventisselection">external documentation</a>.
+-spec isSelection(This) -> boolean() when
+ This::wxCommandEvent().
isSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCommandEvent),
wxe_util:call(?wxCommandEvent_IsSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCommandEvent(), I::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventsetint">external documentation</a>.
+-spec setInt(This, I) -> ok when
+ This::wxCommandEvent(), I::integer().
setInt(#wx_ref{type=ThisT,ref=ThisRef},I)
when is_integer(I) ->
?CLASS(ThisT,wxCommandEvent),
wxe_util:cast(?wxCommandEvent_SetInt,
<<ThisRef:32/?UI,I:32/?UI>>).
-%% @spec (This::wxCommandEvent(), S::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventsetstring">external documentation</a>.
+-spec setString(This, S) -> ok when
+ This::wxCommandEvent(), S::unicode:chardata().
setString(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_list(S) ->
?CLASS(ThisT,wxCommandEvent),
diff --git a/lib/wx/src/gen/wxContextMenuEvent.erl b/lib/wx/src/gen/wxContextMenuEvent.erl
index 0050b97b89..9312803e33 100644
--- a/lib/wx/src/gen/wxContextMenuEvent.erl
+++ b/lib/wx/src/gen/wxContextMenuEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,20 +40,24 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxContextMenuEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxContextMenuEvent()) -> {X::integer(), Y::integer()}
+-type wxContextMenuEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontextmenuevent.html#wxcontextmenueventgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxContextMenuEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxContextMenuEvent),
wxe_util:call(?wxContextMenuEvent_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxContextMenuEvent(), Pos::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontextmenuevent.html#wxcontextmenueventsetposition">external documentation</a>.
+-spec setPosition(This, Pos) -> ok when
+ This::wxContextMenuEvent(), Pos::{X::integer(), Y::integer()}.
setPosition(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
?CLASS(ThisT,wxContextMenuEvent),
diff --git a/lib/wx/src/gen/wxControl.erl b/lib/wx/src/gen/wxControl.erl
index e3f602e65a..f840d0c6bc 100644
--- a/lib/wx/src/gen/wxControl.erl
+++ b/lib/wx/src/gen/wxControl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -68,20 +68,24 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxControl/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxControl()) -> string()
+-type wxControl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrol.html#wxcontrolgetlabel">external documentation</a>.
+-spec getLabel(This) -> unicode:charlist() when
+ This::wxControl().
getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxControl),
wxe_util:call(?wxControl_GetLabel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxControl(), Label::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrol.html#wxcontrolsetlabel">external documentation</a>.
+-spec setLabel(This, Label) -> ok when
+ This::wxControl(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
when is_list(Label) ->
?CLASS(ThisT,wxControl),
diff --git a/lib/wx/src/gen/wxControlWithItems.erl b/lib/wx/src/gen/wxControlWithItems.erl
index 0838b75bad..1e2f89dbf0 100644
--- a/lib/wx/src/gen/wxControlWithItems.erl
+++ b/lib/wx/src/gen/wxControlWithItems.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,14 +72,17 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxControlWithItems/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxControlWithItems(), Item::string()) -> integer()
+-type wxControlWithItems() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsappend">external documentation</a>.
+-spec append(This, Item) -> integer() when
+ This::wxControlWithItems(), Item::unicode:chardata().
append(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_list(Item) ->
?CLASS(ThisT,wxControlWithItems),
@@ -87,8 +90,9 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Item)
wxe_util:call(?wxControlWithItems_Append_1,
<<ThisRef:32/?UI,(byte_size(Item_UC)):32/?UI,(Item_UC)/binary, 0:(((8- ((0+byte_size(Item_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxControlWithItems(), Item::string(), ClientData::term()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsappend">external documentation</a>.
+-spec append(This, Item, ClientData) -> integer() when
+ This::wxControlWithItems(), Item::unicode:chardata(), ClientData::term().
append(#wx_ref{type=ThisT,ref=ThisRef},Item,ClientData)
when is_list(Item) ->
?CLASS(ThisT,wxControlWithItems),
@@ -97,8 +101,9 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Item,ClientData)
wxe_util:call(?wxControlWithItems_Append_2,
<<ThisRef:32/?UI,(byte_size(Item_UC)):32/?UI,(Item_UC)/binary, 0:(((8- ((0+byte_size(Item_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxControlWithItems(), Strings::[[string()]]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsappend">external documentation</a>.
+-spec appendStrings(This, Strings) -> ok when
+ This::wxControlWithItems(), Strings::[[unicode:chardata()]].
appendStrings(#wx_ref{type=ThisT,ref=ThisRef},Strings)
when is_list(Strings) ->
?CLASS(ThisT,wxControlWithItems),
@@ -107,30 +112,35 @@ appendStrings(#wx_ref{type=ThisT,ref=ThisRef},Strings)
wxe_util:cast(?wxControlWithItems_appendStrings_1,
<<ThisRef:32/?UI,(length(Strings_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Strings_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Strings_UCA])) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxControlWithItems()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsclear">external documentation</a>.
+-spec clear(This) -> ok when
+ This::wxControlWithItems().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:cast(?wxControlWithItems_Clear,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxControlWithItems(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsdelete">external documentation</a>.
+-spec delete(This, N) -> ok when
+ This::wxControlWithItems(), N::integer().
delete(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:cast(?wxControlWithItems_Delete,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxControlWithItems(), S::string()) -> integer()
%% @equiv findString(This,S, [])
+-spec findString(This, S) -> integer() when
+ This::wxControlWithItems(), S::unicode:chardata().
+
findString(This,S)
when is_record(This, wx_ref),is_list(S) ->
findString(This,S, []).
-%% @spec (This::wxControlWithItems(), S::string(), [Option]) -> integer()
-%% Option = {bCase, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsfindstring">external documentation</a>.
+-spec findString(This, S, [Option]) -> integer() when
+ This::wxControlWithItems(), S::unicode:chardata(),
+ Option :: {bCase, boolean()}.
findString(#wx_ref{type=ThisT,ref=ThisRef},S, Options)
when is_list(S),is_list(Options) ->
?CLASS(ThisT,wxControlWithItems),
@@ -141,16 +151,18 @@ findString(#wx_ref{type=ThisT,ref=ThisRef},S, Options)
wxe_util:call(?wxControlWithItems_FindString,
<<ThisRef:32/?UI,(byte_size(S_UC)):32/?UI,(S_UC)/binary, 0:(((8- ((0+byte_size(S_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxControlWithItems(), N::integer()) -> term()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsgetclientobject">external documentation</a>.
+-spec getClientData(This, N) -> term() when
+ This::wxControlWithItems(), N::integer().
getClientData(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:call(?wxControlWithItems_getClientData,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxControlWithItems(), N::integer(), ClientData::term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemssetclientobject">external documentation</a>.
+-spec setClientData(This, N, ClientData) -> ok when
+ This::wxControlWithItems(), N::integer(), ClientData::term().
setClientData(#wx_ref{type=ThisT,ref=ThisRef},N,ClientData)
when is_integer(N) ->
?CLASS(ThisT,wxControlWithItems),
@@ -158,37 +170,42 @@ setClientData(#wx_ref{type=ThisT,ref=ThisRef},N,ClientData)
wxe_util:cast(?wxControlWithItems_setClientData,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxControlWithItems()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsgetcount">external documentation</a>.
+-spec getCount(This) -> integer() when
+ This::wxControlWithItems().
getCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:call(?wxControlWithItems_GetCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxControlWithItems()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxControlWithItems().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:call(?wxControlWithItems_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxControlWithItems(), N::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsgetstring">external documentation</a>.
+-spec getString(This, N) -> unicode:charlist() when
+ This::wxControlWithItems(), N::integer().
getString(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:call(?wxControlWithItems_GetString,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxControlWithItems()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsgetstringselection">external documentation</a>.
+-spec getStringSelection(This) -> unicode:charlist() when
+ This::wxControlWithItems().
getStringSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:call(?wxControlWithItems_GetStringSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxControlWithItems(), Item::string(), Pos::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsinsert">external documentation</a>.
+-spec insert(This, Item, Pos) -> integer() when
+ This::wxControlWithItems(), Item::unicode:chardata(), Pos::integer().
insert(#wx_ref{type=ThisT,ref=ThisRef},Item,Pos)
when is_list(Item),is_integer(Pos) ->
?CLASS(ThisT,wxControlWithItems),
@@ -196,8 +213,9 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Item,Pos)
wxe_util:call(?wxControlWithItems_Insert_2,
<<ThisRef:32/?UI,(byte_size(Item_UC)):32/?UI,(Item_UC)/binary, 0:(((8- ((0+byte_size(Item_UC)) band 16#7)) band 16#7))/unit:8,Pos:32/?UI>>).
-%% @spec (This::wxControlWithItems(), Item::string(), Pos::integer(), ClientData::term()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsinsert">external documentation</a>.
+-spec insert(This, Item, Pos, ClientData) -> integer() when
+ This::wxControlWithItems(), Item::unicode:chardata(), Pos::integer(), ClientData::term().
insert(#wx_ref{type=ThisT,ref=ThisRef},Item,Pos,ClientData)
when is_list(Item),is_integer(Pos) ->
?CLASS(ThisT,wxControlWithItems),
@@ -206,31 +224,35 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Item,Pos,ClientData)
wxe_util:call(?wxControlWithItems_Insert_3,
<<ThisRef:32/?UI,(byte_size(Item_UC)):32/?UI,(Item_UC)/binary, 0:(((8- ((0+byte_size(Item_UC)) band 16#7)) band 16#7))/unit:8,Pos:32/?UI>>).
-%% @spec (This::wxControlWithItems()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsisempty">external documentation</a>.
+-spec isEmpty(This) -> boolean() when
+ This::wxControlWithItems().
isEmpty(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:call(?wxControlWithItems_IsEmpty,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxControlWithItems(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsselect">external documentation</a>.
+-spec select(This, N) -> ok when
+ This::wxControlWithItems(), N::integer().
select(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:cast(?wxControlWithItems_Select,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxControlWithItems(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemssetselection">external documentation</a>.
+-spec setSelection(This, N) -> ok when
+ This::wxControlWithItems(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxControlWithItems),
wxe_util:cast(?wxControlWithItems_SetSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxControlWithItems(), N::integer(), S::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemssetstring">external documentation</a>.
+-spec setString(This, N, S) -> ok when
+ This::wxControlWithItems(), N::integer(), S::unicode:chardata().
setString(#wx_ref{type=ThisT,ref=ThisRef},N,S)
when is_integer(N),is_list(S) ->
?CLASS(ThisT,wxControlWithItems),
@@ -238,8 +260,9 @@ setString(#wx_ref{type=ThisT,ref=ThisRef},N,S)
wxe_util:cast(?wxControlWithItems_SetString,
<<ThisRef:32/?UI,N:32/?UI,(byte_size(S_UC)):32/?UI,(S_UC)/binary, 0:(((8- ((4+byte_size(S_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxControlWithItems(), S::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemssetstringselection">external documentation</a>.
+-spec setStringSelection(This, S) -> boolean() when
+ This::wxControlWithItems(), S::unicode:chardata().
setStringSelection(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_list(S) ->
?CLASS(ThisT,wxControlWithItems),
diff --git a/lib/wx/src/gen/wxCursor.erl b/lib/wx/src/gen/wxCursor.erl
index beb731fee3..b9e3a8e3f7 100644
--- a/lib/wx/src/gen/wxCursor.erl
+++ b/lib/wx/src/gen/wxCursor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,25 +34,27 @@
getSubBitmap/2,getWidth/1,loadFile/2,loadFile/3,parent_class/1,saveFile/3,
saveFile/4,setDepth/2,setHeight/2,setMask/2,setPalette/2,setWidth/2]).
+-export_type([wxCursor/0]).
%% @hidden
parent_class(wxBitmap) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxCursor()
+-type wxCursor() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcursor.html#wxcursorwxcursor">external documentation</a>.
+-spec new() -> wxCursor().
new() ->
wxe_util:construct(?wxCursor_new_0,
<<>>).
-%% @spec (X::integer()|term()) -> wxCursor()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcursor.html#wxcursorwxcursor">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(CursorId::integer()) -> wxCursor() </c>
-%% </p>
-%% <p><c>
-%% new(Image::wxImage:wxImage()) -> wxCursor() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(Image) -> wxCursor() when<br />
+%% Image::wxImage:wxImage().<br />
+%%
+-spec new(CursorId) -> wxCursor() when
+ CursorId::integer();
+ (Image) -> wxCursor() when
+ Image::wxImage:wxImage().
new(CursorId)
when is_integer(CursorId) ->
wxe_util:construct(?wxCursor_new_1_0,
@@ -62,15 +64,19 @@ new(#wx_ref{type=ImageT,ref=ImageRef}) ->
wxe_util:construct(?wxCursor_new_1_1,
<<ImageRef:32/?UI>>).
-%% @spec (Bits::binary(), Width::integer(), Height::integer()) -> wxCursor()
%% @equiv new(Bits,Width,Height, [])
+-spec new(Bits, Width, Height) -> wxCursor() when
+ Bits::binary(), Width::integer(), Height::integer().
+
new(Bits,Width,Height)
when is_binary(Bits),is_integer(Width),is_integer(Height) ->
new(Bits,Width,Height, []).
-%% @spec (Bits::binary(), Width::integer(), Height::integer(), [Option]) -> wxCursor()
-%% Option = {hotSpotX, integer()} | {hotSpotY, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcursor.html#wxcursorwxcursor">external documentation</a>.
+-spec new(Bits, Width, Height, [Option]) -> wxCursor() when
+ Bits::binary(), Width::integer(), Height::integer(),
+ Option :: {hotSpotX, integer()}
+ | {hotSpotY, integer()}.
new(Bits,Width,Height, Options)
when is_binary(Bits),is_integer(Width),is_integer(Height),is_list(Options) ->
wxe_util:send_bin(Bits),
@@ -81,15 +87,16 @@ new(Bits,Width,Height, Options)
wxe_util:construct(?wxCursor_new_4,
<<Width:32/?UI,Height:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxCursor()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxcursor.html#wxcursorok">external documentation</a>.
+-spec ok(This) -> boolean() when
+ This::wxCursor().
ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCursor),
wxe_util:call(?wxCursor_Ok,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxCursor()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxCursor()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCursor),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDC.erl b/lib/wx/src/gen/wxDC.erl
index ba498c651a..9f57978849 100644
--- a/lib/wx/src/gen/wxDC.erl
+++ b/lib/wx/src/gen/wxDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,10 +32,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -49,18 +49,25 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxDC/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxDC(), DestPt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Source::wxDC(), SrcPt::{X::integer(), Y::integer()}) -> bool()
+-type wxDC() :: wx:wx_object().
%% @equiv blit(This,DestPt,Sz,Source,SrcPt, [])
+-spec blit(This, DestPt, Sz, Source, SrcPt) -> boolean() when
+ This::wxDC(), DestPt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Source::wxDC(), SrcPt::{X::integer(), Y::integer()}.
+
blit(This,DestPt={DestPtX,DestPtY},Sz={SzW,SzH},Source,SrcPt={SrcPtX,SrcPtY})
when is_record(This, wx_ref),is_integer(DestPtX),is_integer(DestPtY),is_integer(SzW),is_integer(SzH),is_record(Source, wx_ref),is_integer(SrcPtX),is_integer(SrcPtY) ->
blit(This,DestPt,Sz,Source,SrcPt, []).
-%% @spec (This::wxDC(), DestPt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Source::wxDC(), SrcPt::{X::integer(), Y::integer()}, [Option]) -> bool()
-%% Option = {rop, integer()} | {useMask, bool()} | {srcPtMask, {X::integer(), Y::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcblit">external documentation</a>.
+-spec blit(This, DestPt, Sz, Source, SrcPt, [Option]) -> boolean() when
+ This::wxDC(), DestPt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Source::wxDC(), SrcPt::{X::integer(), Y::integer()},
+ Option :: {rop, integer()}
+ | {useMask, boolean()}
+ | {srcPtMask, {X::integer(), Y::integer()}}.
blit(#wx_ref{type=ThisT,ref=ThisRef},{DestPtX,DestPtY},{SzW,SzH},#wx_ref{type=SourceT,ref=SourceRef},{SrcPtX,SrcPtY}, Options)
when is_integer(DestPtX),is_integer(DestPtY),is_integer(SzW),is_integer(SzH),is_integer(SrcPtX),is_integer(SrcPtY),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -73,92 +80,105 @@ blit(#wx_ref{type=ThisT,ref=ThisRef},{DestPtX,DestPtY},{SzW,SzH},#wx_ref{type=So
wxe_util:call(?wxDC_Blit,
<<ThisRef:32/?UI,DestPtX:32/?UI,DestPtY:32/?UI,SzW:32/?UI,SzH:32/?UI,SourceRef:32/?UI,SrcPtX:32/?UI,SrcPtY:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxDC(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdccalcboundingbox">external documentation</a>.
+-spec calcBoundingBox(This, X, Y) -> ok when
+ This::wxDC(), X::integer(), Y::integer().
calcBoundingBox(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_CalcBoundingBox,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcclear">external documentation</a>.
+-spec clear(This) -> ok when
+ This::wxDC().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_Clear,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdccomputescaleandorigin">external documentation</a>.
+-spec computeScaleAndOrigin(This) -> ok when
+ This::wxDC().
computeScaleAndOrigin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_ComputeScaleAndOrigin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdccrosshair">external documentation</a>.
+-spec crossHair(This, Pt) -> ok when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}.
crossHair(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_CrossHair,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdestroyclippingregion">external documentation</a>.
+-spec destroyClippingRegion(This) -> ok when
+ This::wxDC().
destroyClippingRegion(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DestroyClippingRegion,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), X::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdevicetologicalx">external documentation</a>.
+-spec deviceToLogicalX(This, X) -> integer() when
+ This::wxDC(), X::integer().
deviceToLogicalX(#wx_ref{type=ThisT,ref=ThisRef},X)
when is_integer(X) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_DeviceToLogicalX,
<<ThisRef:32/?UI,X:32/?UI>>).
-%% @spec (This::wxDC(), X::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdevicetologicalxrel">external documentation</a>.
+-spec deviceToLogicalXRel(This, X) -> integer() when
+ This::wxDC(), X::integer().
deviceToLogicalXRel(#wx_ref{type=ThisT,ref=ThisRef},X)
when is_integer(X) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_DeviceToLogicalXRel,
<<ThisRef:32/?UI,X:32/?UI>>).
-%% @spec (This::wxDC(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdevicetologicaly">external documentation</a>.
+-spec deviceToLogicalY(This, Y) -> integer() when
+ This::wxDC(), Y::integer().
deviceToLogicalY(#wx_ref{type=ThisT,ref=ThisRef},Y)
when is_integer(Y) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_DeviceToLogicalY,
<<ThisRef:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxDC(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdevicetologicalyrel">external documentation</a>.
+-spec deviceToLogicalYRel(This, Y) -> integer() when
+ This::wxDC(), Y::integer().
deviceToLogicalYRel(#wx_ref{type=ThisT,ref=ThisRef},Y)
when is_integer(Y) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_DeviceToLogicalYRel,
<<ThisRef:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxDC(), Pt1::{X::integer(), Y::integer()}, Pt2::{X::integer(), Y::integer()}, Centre::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawarc">external documentation</a>.
+-spec drawArc(This, Pt1, Pt2, Centre) -> ok when
+ This::wxDC(), Pt1::{X::integer(), Y::integer()}, Pt2::{X::integer(), Y::integer()}, Centre::{X::integer(), Y::integer()}.
drawArc(#wx_ref{type=ThisT,ref=ThisRef},{Pt1X,Pt1Y},{Pt2X,Pt2Y},{CentreX,CentreY})
when is_integer(Pt1X),is_integer(Pt1Y),is_integer(Pt2X),is_integer(Pt2Y),is_integer(CentreX),is_integer(CentreY) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawArc,
<<ThisRef:32/?UI,Pt1X:32/?UI,Pt1Y:32/?UI,Pt2X:32/?UI,Pt2Y:32/?UI,CentreX:32/?UI,CentreY:32/?UI>>).
-%% @spec (This::wxDC(), Bmp::wxBitmap:wxBitmap(), Pt::{X::integer(), Y::integer()}) -> ok
%% @equiv drawBitmap(This,Bmp,Pt, [])
+-spec drawBitmap(This, Bmp, Pt) -> ok when
+ This::wxDC(), Bmp::wxBitmap:wxBitmap(), Pt::{X::integer(), Y::integer()}.
+
drawBitmap(This,Bmp,Pt={PtX,PtY})
when is_record(This, wx_ref),is_record(Bmp, wx_ref),is_integer(PtX),is_integer(PtY) ->
drawBitmap(This,Bmp,Pt, []).
-%% @spec (This::wxDC(), Bmp::wxBitmap:wxBitmap(), Pt::{X::integer(), Y::integer()}, [Option]) -> ok
-%% Option = {useMask, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawbitmap">external documentation</a>.
+-spec drawBitmap(This, Bmp, Pt, [Option]) -> ok when
+ This::wxDC(), Bmp::wxBitmap:wxBitmap(), Pt::{X::integer(), Y::integer()},
+ Option :: {useMask, boolean()}.
drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},{PtX,PtY}, Options)
when is_integer(PtX),is_integer(PtY),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -169,48 +189,54 @@ drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},{PtX,Pt
wxe_util:cast(?wxDC_DrawBitmap,
<<ThisRef:32/?UI,BmpRef:32/?UI,PtX:32/?UI,PtY:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawcheckmark">external documentation</a>.
+-spec drawCheckMark(This, Rect) -> ok when
+ This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
drawCheckMark(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawCheckMark,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Radius::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawcircle">external documentation</a>.
+-spec drawCircle(This, Pt, Radius) -> ok when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}, Radius::integer().
drawCircle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},Radius)
when is_integer(PtX),is_integer(PtY),is_integer(Radius) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawCircle,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,Radius:32/?UI>>).
-%% @spec (This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawellipse">external documentation</a>.
+-spec drawEllipse(This, Rect) -> ok when
+ This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawEllipse_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawellipse">external documentation</a>.
+-spec drawEllipse(This, Pt, Sz) -> ok when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}.
drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawEllipse_2,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Sa::float(), Ea::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawellipticarc">external documentation</a>.
+-spec drawEllipticArc(This, Pt, Sz, Sa, Ea) -> ok when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Sa::number(), Ea::number().
drawEllipticArc(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH},Sa,Ea)
- when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH),is_float(Sa),is_float(Ea) ->
+ when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH),is_number(Sa),is_number(Ea) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawEllipticArc,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI,0:32,Sa:64/?F,Ea:64/?F>>).
-%% @spec (This::wxDC(), Icon::wxIcon:wxIcon(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawicon">external documentation</a>.
+-spec drawIcon(This, Icon, Pt) -> ok when
+ This::wxDC(), Icon::wxIcon:wxIcon(), Pt::{X::integer(), Y::integer()}.
drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxDC),
@@ -218,15 +244,19 @@ drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},{PtX,Pt
wxe_util:cast(?wxDC_DrawIcon,
<<ThisRef:32/?UI,IconRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxDC(), Text::string(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok
%% @equiv drawLabel(This,Text,Rect, [])
+-spec drawLabel(This, Text, Rect) -> ok when
+ This::wxDC(), Text::unicode:chardata(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
+
drawLabel(This,Text,Rect={RectX,RectY,RectW,RectH})
when is_record(This, wx_ref),is_list(Text),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
drawLabel(This,Text,Rect, []).
-%% @spec (This::wxDC(), Text::string(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, [Option]) -> ok
-%% Option = {alignment, integer()} | {indexAccel, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawlabel">external documentation</a>.
+-spec drawLabel(This, Text, Rect, [Option]) -> ok when
+ This::wxDC(), Text::unicode:chardata(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},
+ Option :: {alignment, integer()}
+ | {indexAccel, integer()}.
drawLabel(#wx_ref{type=ThisT,ref=ThisRef},Text,{RectX,RectY,RectW,RectH}, Options)
when is_list(Text),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -238,23 +268,28 @@ drawLabel(#wx_ref{type=ThisT,ref=ThisRef},Text,{RectX,RectY,RectW,RectH}, Option
wxe_util:cast(?wxDC_DrawLabel,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxDC(), Pt1::{X::integer(), Y::integer()}, Pt2::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawline">external documentation</a>.
+-spec drawLine(This, Pt1, Pt2) -> ok when
+ This::wxDC(), Pt1::{X::integer(), Y::integer()}, Pt2::{X::integer(), Y::integer()}.
drawLine(#wx_ref{type=ThisT,ref=ThisRef},{Pt1X,Pt1Y},{Pt2X,Pt2Y})
when is_integer(Pt1X),is_integer(Pt1Y),is_integer(Pt2X),is_integer(Pt2Y) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawLine,
<<ThisRef:32/?UI,Pt1X:32/?UI,Pt1Y:32/?UI,Pt2X:32/?UI,Pt2Y:32/?UI>>).
-%% @spec (This::wxDC(), Points::[{X::integer(), Y::integer()}]) -> ok
%% @equiv drawLines(This,Points, [])
+-spec drawLines(This, Points) -> ok when
+ This::wxDC(), Points::[{X::integer(), Y::integer()}].
+
drawLines(This,Points)
when is_record(This, wx_ref),is_list(Points) ->
drawLines(This,Points, []).
-%% @spec (This::wxDC(), Points::[{X::integer(), Y::integer()}], [Option]) -> ok
-%% Option = {xoffset, integer()} | {yoffset, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawlines">external documentation</a>.
+-spec drawLines(This, Points, [Option]) -> ok when
+ This::wxDC(), Points::[{X::integer(), Y::integer()}],
+ Option :: {xoffset, integer()}
+ | {yoffset, integer()}.
drawLines(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
when is_list(Points),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -266,15 +301,20 @@ drawLines(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
<<ThisRef:32/?UI,(length(Points)):32/?UI,
(<< <<X:32/?I,Y:32/?I>> || {X,Y} <- Points>>)/binary, BinOpt/binary>>).
-%% @spec (This::wxDC(), Points::[{X::integer(), Y::integer()}]) -> ok
%% @equiv drawPolygon(This,Points, [])
+-spec drawPolygon(This, Points) -> ok when
+ This::wxDC(), Points::[{X::integer(), Y::integer()}].
+
drawPolygon(This,Points)
when is_record(This, wx_ref),is_list(Points) ->
drawPolygon(This,Points, []).
-%% @spec (This::wxDC(), Points::[{X::integer(), Y::integer()}], [Option]) -> ok
-%% Option = {xoffset, integer()} | {yoffset, integer()} | {fillStyle, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawpolygon">external documentation</a>.
+-spec drawPolygon(This, Points, [Option]) -> ok when
+ This::wxDC(), Points::[{X::integer(), Y::integer()}],
+ Option :: {xoffset, integer()}
+ | {yoffset, integer()}
+ | {fillStyle, integer()}.
drawPolygon(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
when is_list(Points),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -287,57 +327,64 @@ drawPolygon(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
<<ThisRef:32/?UI,(length(Points)):32/?UI,
(<< <<X:32/?I,Y:32/?I>> || {X,Y} <- Points>>)/binary, BinOpt/binary>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawpoint">external documentation</a>.
+-spec drawPoint(This, Pt) -> ok when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}.
drawPoint(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawPoint,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawrectangle">external documentation</a>.
+-spec drawRectangle(This, Rect) -> ok when
+ This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawRectangle_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawrectangle">external documentation</a>.
+-spec drawRectangle(This, Pt, Sz) -> ok when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}.
drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawRectangle_2,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
-%% @spec (This::wxDC(), Text::string(), Pt::{X::integer(), Y::integer()}, Angle::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawrotatedtext">external documentation</a>.
+-spec drawRotatedText(This, Text, Pt, Angle) -> ok when
+ This::wxDC(), Text::unicode:chardata(), Pt::{X::integer(), Y::integer()}, Angle::number().
drawRotatedText(#wx_ref{type=ThisT,ref=ThisRef},Text,{PtX,PtY},Angle)
- when is_list(Text),is_integer(PtX),is_integer(PtY),is_float(Angle) ->
+ when is_list(Text),is_integer(PtX),is_integer(PtY),is_number(Angle) ->
?CLASS(ThisT,wxDC),
Text_UC = unicode:characters_to_binary([Text,0]),
wxe_util:cast(?wxDC_DrawRotatedText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,PtX:32/?UI,PtY:32/?UI,Angle:64/?F>>).
-%% @spec (This::wxDC(), R::{X::integer(), Y::integer(), W::integer(), H::integer()}, Radius::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawroundedrectangle">external documentation</a>.
+-spec drawRoundedRectangle(This, R, Radius) -> ok when
+ This::wxDC(), R::{X::integer(), Y::integer(), W::integer(), H::integer()}, Radius::number().
drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},{RX,RY,RW,RH},Radius)
- when is_integer(RX),is_integer(RY),is_integer(RW),is_integer(RH),is_float(Radius) ->
+ when is_integer(RX),is_integer(RY),is_integer(RW),is_integer(RH),is_number(Radius) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawRoundedRectangle_2,
<<ThisRef:32/?UI,RX:32/?UI,RY:32/?UI,RW:32/?UI,RH:32/?UI,0:32,Radius:64/?F>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Radius::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawroundedrectangle">external documentation</a>.
+-spec drawRoundedRectangle(This, Pt, Sz, Radius) -> ok when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Radius::number().
drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH},Radius)
- when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH),is_float(Radius) ->
+ when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH),is_number(Radius) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_DrawRoundedRectangle_3,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI,0:32,Radius:64/?F>>).
-%% @spec (This::wxDC(), Text::string(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcdrawtext">external documentation</a>.
+-spec drawText(This, Text, Pt) -> ok when
+ This::wxDC(), Text::unicode:chardata(), Pt::{X::integer(), Y::integer()}.
drawText(#wx_ref{type=ThisT,ref=ThisRef},Text,{PtX,PtY})
when is_list(Text),is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxDC),
@@ -345,29 +392,34 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Text,{PtX,PtY})
wxe_util:cast(?wxDC_DrawText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcenddoc">external documentation</a>.
+-spec endDoc(This) -> ok when
+ This::wxDC().
endDoc(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_EndDoc,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcendpage">external documentation</a>.
+-spec endPage(This) -> ok when
+ This::wxDC().
endPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_EndPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Col::wx:colour()) -> bool()
%% @equiv floodFill(This,Pt,Col, [])
+-spec floodFill(This, Pt, Col) -> boolean() when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}, Col::wx:wx_colour().
+
floodFill(This,Pt={PtX,PtY},Col)
when is_record(This, wx_ref),is_integer(PtX),is_integer(PtY),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
floodFill(This,Pt,Col, []).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Col::wx:colour(), [Option]) -> bool()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcfloodfill">external documentation</a>.
+-spec floodFill(This, Pt, Col, [Option]) -> boolean() when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}, Col::wx:wx_colour(),
+ Option :: {style, integer()}.
floodFill(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},Col, Options)
when is_integer(PtX),is_integer(PtY),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4,is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -377,81 +429,91 @@ floodFill(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},Col, Options)
wxe_util:call(?wxDC_FloodFill,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,(wxe_util:colour_bin(Col)):16/binary, 0:32,BinOpt/binary>>).
-%% @spec (This::wxDC()) -> wxBrush:wxBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetbackground">external documentation</a>.
+-spec getBackground(This) -> wxBrush:wxBrush() when
+ This::wxDC().
getBackground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetBackground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetbackgroundmode">external documentation</a>.
+-spec getBackgroundMode(This) -> integer() when
+ This::wxDC().
getBackgroundMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetBackgroundMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> wxBrush:wxBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetbrush">external documentation</a>.
+-spec getBrush(This) -> wxBrush:wxBrush() when
+ This::wxDC().
getBrush(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetBrush,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetcharheight">external documentation</a>.
+-spec getCharHeight(This) -> integer() when
+ This::wxDC().
getCharHeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetCharHeight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetcharwidth">external documentation</a>.
+-spec getCharWidth(This) -> integer() when
+ This::wxDC().
getCharWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetCharWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetclippingbox">external documentation</a>.
-getClippingBox(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
- when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
+-spec getClippingBox(This) -> Result when
+ Result ::{X::integer(), Y::integer(), W::integer(), H::integer()},
+ This::wxDC().
+getClippingBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
- wxe_util:cast(?wxDC_GetClippingBox,
- <<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
+ wxe_util:call(?wxDC_GetClippingBox,
+ <<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetfont">external documentation</a>.
+-spec getFont(This) -> wxFont:wxFont() when
+ This::wxDC().
getFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> WxLayoutDirection
-%% WxLayoutDirection = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetlayoutdirection">external documentation</a>.
-%%<br /> WxLayoutDirection is one of ?wxLayout_Default | ?wxLayout_LeftToRight | ?wxLayout_RightToLeft
+%%<br /> Res = ?wxLayout_Default | ?wxLayout_LeftToRight | ?wxLayout_RightToLeft
+-spec getLayoutDirection(This) -> wx:wx_enum() when
+ This::wxDC().
getLayoutDirection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetLayoutDirection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetlogicalfunction">external documentation</a>.
+-spec getLogicalFunction(This) -> integer() when
+ This::wxDC().
getLogicalFunction(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetLogicalFunction,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetmapmode">external documentation</a>.
+-spec getMapMode(This) -> integer() when
+ This::wxDC().
getMapMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetMapMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), String::string()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetmultilinetextextent">external documentation</a>.
+-spec getMultiLineTextExtent(This, String) -> {W::integer(), H::integer()} when
+ This::wxDC(), String::unicode:chardata().
getMultiLineTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String)
when is_list(String) ->
?CLASS(ThisT,wxDC),
@@ -459,9 +521,10 @@ getMultiLineTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String)
wxe_util:call(?wxDC_GetMultiLineTextExtent_1,
<<ThisRef:32/?UI,(byte_size(String_UC)):32/?UI,(String_UC)/binary, 0:(((8- ((0+byte_size(String_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxDC(), String::string(), [Option]) -> {Width::integer(), Height::integer(), HeightLine::integer()}
-%% Option = {font, wxFont:wxFont()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetmultilinetextextent">external documentation</a>.
+-spec getMultiLineTextExtent(This, String, [Option]) -> {Width::integer(), Height::integer(), HeightLine::integer()} when
+ This::wxDC(), String::unicode:chardata(),
+ Option :: {font, wxFont:wxFont()}.
getMultiLineTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
when is_list(String),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -472,61 +535,70 @@ getMultiLineTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
wxe_util:call(?wxDC_GetMultiLineTextExtent_4,
<<ThisRef:32/?UI,(byte_size(String_UC)):32/?UI,(String_UC)/binary, 0:(((8- ((0+byte_size(String_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxDC(), Text::string(), Widths::[integer()]) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetpartialtextextents">external documentation</a>.
-getPartialTextExtents(#wx_ref{type=ThisT,ref=ThisRef},Text,Widths)
- when is_list(Text),is_list(Widths) ->
+-spec getPartialTextExtents(This, Text) -> Result when
+ Result ::{Res ::boolean(), Widths::[integer()]},
+ This::wxDC(), Text::unicode:chardata().
+getPartialTextExtents(#wx_ref{type=ThisT,ref=ThisRef},Text)
+ when is_list(Text) ->
?CLASS(ThisT,wxDC),
Text_UC = unicode:characters_to_binary([Text,0]),
wxe_util:call(?wxDC_GetPartialTextExtents,
- <<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,(length(Widths)):32/?UI,
- (<< <<C:32/?I>> || C <- Widths>>)/binary, 0:(((1+length(Widths)) rem 2)*32)>>).
+ <<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxDC()) -> wxPen:wxPen()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetpen">external documentation</a>.
+-spec getPen(This) -> wxPen:wxPen() when
+ This::wxDC().
getPen(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetPen,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Col::wx:colour()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetpixel">external documentation</a>.
-getPixel(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},Col)
- when is_integer(PtX),is_integer(PtY),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
+-spec getPixel(This, Pt) -> Result when
+ Result ::{Res ::boolean(), Col::wx:wx_colour4()},
+ This::wxDC(), Pt::{X::integer(), Y::integer()}.
+getPixel(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
+ when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetPixel,
- <<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
+ <<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxDC()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetppi">external documentation</a>.
+-spec getPPI(This) -> {W::integer(), H::integer()} when
+ This::wxDC().
getPPI(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetPPI,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetsize">external documentation</a>.
+-spec getSize(This) -> {W::integer(), H::integer()} when
+ This::wxDC().
getSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetsizemm">external documentation</a>.
+-spec getSizeMM(This) -> {W::integer(), H::integer()} when
+ This::wxDC().
getSizeMM(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetSizeMM,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgettextbackground">external documentation</a>.
+-spec getTextBackground(This) -> wx:wx_colour4() when
+ This::wxDC().
getTextBackground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetTextBackground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), String::string()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgettextextent">external documentation</a>.
+-spec getTextExtent(This, String) -> {W::integer(), H::integer()} when
+ This::wxDC(), String::unicode:chardata().
getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String)
when is_list(String) ->
?CLASS(ThisT,wxDC),
@@ -534,9 +606,11 @@ getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String)
wxe_util:call(?wxDC_GetTextExtent_1,
<<ThisRef:32/?UI,(byte_size(String_UC)):32/?UI,(String_UC)/binary, 0:(((8- ((0+byte_size(String_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxDC(), String::string(), [Option]) -> {X::integer(), Y::integer(), Descent::integer(), ExternalLeading::integer()}
-%% Option = {theFont, wxFont:wxFont()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgettextextent">external documentation</a>.
+-spec getTextExtent(This, String, [Option]) -> Result when
+ Result :: {X::integer(), Y::integer(), Descent::integer(), ExternalLeading::integer()},
+ This::wxDC(), String::unicode:chardata(),
+ Option :: {theFont, wxFont:wxFont()}.
getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
when is_list(String),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -547,47 +621,53 @@ getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
wxe_util:call(?wxDC_GetTextExtent_4,
<<ThisRef:32/?UI,(byte_size(String_UC)):32/?UI,(String_UC)/binary, 0:(((8- ((0+byte_size(String_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxDC()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgettextforeground">external documentation</a>.
+-spec getTextForeground(This) -> wx:wx_colour4() when
+ This::wxDC().
getTextForeground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetTextForeground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> {X::float(), Y::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgetuserscale">external documentation</a>.
+-spec getUserScale(This) -> {X::number(), Y::number()} when
+ This::wxDC().
getUserScale(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_GetUserScale,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:colour(), DestColour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgradientfillconcentric">external documentation</a>.
+-spec gradientFillConcentric(This, Rect, InitialColour, DestColour) -> ok when
+ This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:wx_colour(), DestColour::wx:wx_colour().
gradientFillConcentric(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},InitialColour,DestColour)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),tuple_size(InitialColour) =:= 3; tuple_size(InitialColour) =:= 4,tuple_size(DestColour) =:= 3; tuple_size(DestColour) =:= 4 ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_GradientFillConcentric_3,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI,(wxe_util:colour_bin(InitialColour)):16/binary,(wxe_util:colour_bin(DestColour)):16/binary>>).
-%% @spec (This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:colour(), DestColour::wx:colour(), CircleCenter::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgradientfillconcentric">external documentation</a>.
+-spec gradientFillConcentric(This, Rect, InitialColour, DestColour, CircleCenter) -> ok when
+ This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:wx_colour(), DestColour::wx:wx_colour(), CircleCenter::{X::integer(), Y::integer()}.
gradientFillConcentric(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},InitialColour,DestColour,{CircleCenterX,CircleCenterY})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),tuple_size(InitialColour) =:= 3; tuple_size(InitialColour) =:= 4,tuple_size(DestColour) =:= 3; tuple_size(DestColour) =:= 4,is_integer(CircleCenterX),is_integer(CircleCenterY) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_GradientFillConcentric_4,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI,(wxe_util:colour_bin(InitialColour)):16/binary,(wxe_util:colour_bin(DestColour)):16/binary,CircleCenterX:32/?UI,CircleCenterY:32/?UI>>).
-%% @spec (This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:colour(), DestColour::wx:colour()) -> ok
%% @equiv gradientFillLinear(This,Rect,InitialColour,DestColour, [])
+-spec gradientFillLinear(This, Rect, InitialColour, DestColour) -> ok when
+ This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:wx_colour(), DestColour::wx:wx_colour().
+
gradientFillLinear(This,Rect={RectX,RectY,RectW,RectH},InitialColour,DestColour)
when is_record(This, wx_ref),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),tuple_size(InitialColour) =:= 3; tuple_size(InitialColour) =:= 4,tuple_size(DestColour) =:= 3; tuple_size(DestColour) =:= 4 ->
gradientFillLinear(This,Rect,InitialColour,DestColour, []).
-%% @spec (This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:colour(), DestColour::wx:colour(), [Option]) -> ok
-%% Option = {nDirection, WxDirection}
-%% WxDirection = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcgradientfilllinear">external documentation</a>.
-%%<br /> WxDirection is one of ?wxLEFT | ?wxRIGHT | ?wxUP | ?wxDOWN | ?wxTOP | ?wxBOTTOM | ?wxNORTH | ?wxSOUTH | ?wxWEST | ?wxEAST | ?wxALL
+%%<br /> NDirection = ?wxLEFT | ?wxRIGHT | ?wxUP | ?wxDOWN | ?wxTOP | ?wxBOTTOM | ?wxNORTH | ?wxSOUTH | ?wxWEST | ?wxEAST | ?wxALL
+-spec gradientFillLinear(This, Rect, InitialColour, DestColour, [Option]) -> ok when
+ This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:wx_colour(), DestColour::wx:wx_colour(),
+ Option :: {nDirection, wx:wx_enum()}.
gradientFillLinear(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},InitialColour,DestColour, Options)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),tuple_size(InitialColour) =:= 3; tuple_size(InitialColour) =:= 4,tuple_size(DestColour) =:= 3; tuple_size(DestColour) =:= 4,is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -597,121 +677,135 @@ gradientFillLinear(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},Ini
wxe_util:cast(?wxDC_GradientFillLinear,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI,(wxe_util:colour_bin(InitialColour)):16/binary,(wxe_util:colour_bin(DestColour)):16/binary, 0:32,BinOpt/binary>>).
-%% @spec (This::wxDC(), X::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdclogicaltodevicex">external documentation</a>.
+-spec logicalToDeviceX(This, X) -> integer() when
+ This::wxDC(), X::integer().
logicalToDeviceX(#wx_ref{type=ThisT,ref=ThisRef},X)
when is_integer(X) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_LogicalToDeviceX,
<<ThisRef:32/?UI,X:32/?UI>>).
-%% @spec (This::wxDC(), X::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdclogicaltodevicexrel">external documentation</a>.
+-spec logicalToDeviceXRel(This, X) -> integer() when
+ This::wxDC(), X::integer().
logicalToDeviceXRel(#wx_ref{type=ThisT,ref=ThisRef},X)
when is_integer(X) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_LogicalToDeviceXRel,
<<ThisRef:32/?UI,X:32/?UI>>).
-%% @spec (This::wxDC(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdclogicaltodevicey">external documentation</a>.
+-spec logicalToDeviceY(This, Y) -> integer() when
+ This::wxDC(), Y::integer().
logicalToDeviceY(#wx_ref{type=ThisT,ref=ThisRef},Y)
when is_integer(Y) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_LogicalToDeviceY,
<<ThisRef:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxDC(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdclogicaltodeviceyrel">external documentation</a>.
+-spec logicalToDeviceYRel(This, Y) -> integer() when
+ This::wxDC(), Y::integer().
logicalToDeviceYRel(#wx_ref{type=ThisT,ref=ThisRef},Y)
when is_integer(Y) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_LogicalToDeviceYRel,
<<ThisRef:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcmaxx">external documentation</a>.
+-spec maxX(This) -> integer() when
+ This::wxDC().
maxX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_MaxX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcmaxy">external documentation</a>.
+-spec maxY(This) -> integer() when
+ This::wxDC().
maxY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_MaxY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcminx">external documentation</a>.
+-spec minX(This) -> integer() when
+ This::wxDC().
minX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_MinX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcminy">external documentation</a>.
+-spec minY(This) -> integer() when
+ This::wxDC().
minY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_MinY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxDC().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:call(?wxDC_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcresetboundingbox">external documentation</a>.
+-spec resetBoundingBox(This) -> ok when
+ This::wxDC().
resetBoundingBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_ResetBoundingBox,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDC(), XLeftRight::bool(), YBottomUp::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetaxisorientation">external documentation</a>.
+-spec setAxisOrientation(This, XLeftRight, YBottomUp) -> ok when
+ This::wxDC(), XLeftRight::boolean(), YBottomUp::boolean().
setAxisOrientation(#wx_ref{type=ThisT,ref=ThisRef},XLeftRight,YBottomUp)
when is_boolean(XLeftRight),is_boolean(YBottomUp) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetAxisOrientation,
<<ThisRef:32/?UI,(wxe_util:from_bool(XLeftRight)):32/?UI,(wxe_util:from_bool(YBottomUp)):32/?UI>>).
-%% @spec (This::wxDC(), Brush::wxBrush:wxBrush()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetbackground">external documentation</a>.
+-spec setBackground(This, Brush) -> ok when
+ This::wxDC(), Brush::wxBrush:wxBrush().
setBackground(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxDC),
?CLASS(BrushT,wxBrush),
wxe_util:cast(?wxDC_SetBackground,
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
-%% @spec (This::wxDC(), Mode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetbackgroundmode">external documentation</a>.
+-spec setBackgroundMode(This, Mode) -> ok when
+ This::wxDC(), Mode::integer().
setBackgroundMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetBackgroundMode,
<<ThisRef:32/?UI,Mode:32/?UI>>).
-%% @spec (This::wxDC(), Brush::wxBrush:wxBrush()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetbrush">external documentation</a>.
+-spec setBrush(This, Brush) -> ok when
+ This::wxDC(), Brush::wxBrush:wxBrush().
setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxDC),
?CLASS(BrushT,wxBrush),
wxe_util:cast(?wxDC_SetBrush,
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
-%% @spec (This::wxDC(),X::term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetclippingregion">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setClippingRegion(This::wxDC(), Region::wxRegion:wxRegion()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setClippingRegion(This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setClippingRegion(This, Rect) -> ok when<br />
+%% This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+-spec setClippingRegion(This, Region) -> ok when
+ This::wxDC(), Region::wxRegion:wxRegion();
+ (This, Rect) -> ok when
+ This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
setClippingRegion(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxDC),
?CLASS(RegionT,wxRegion),
@@ -723,98 +817,109 @@ setClippingRegion(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
wxe_util:cast(?wxDC_SetClippingRegion_1_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetclippingregion">external documentation</a>.
+-spec setClippingRegion(This, Pt, Sz) -> ok when
+ This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}.
setClippingRegion(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetClippingRegion_2,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
-%% @spec (This::wxDC(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetdeviceorigin">external documentation</a>.
+-spec setDeviceOrigin(This, X, Y) -> ok when
+ This::wxDC(), X::integer(), Y::integer().
setDeviceOrigin(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetDeviceOrigin,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxDC(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetfont">external documentation</a>.
+-spec setFont(This, Font) -> ok when
+ This::wxDC(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxDC),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxDC_SetFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxDC(), Dir::WxLayoutDirection) -> ok
-%% WxLayoutDirection = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetlayoutdirection">external documentation</a>.
-%%<br /> WxLayoutDirection is one of ?wxLayout_Default | ?wxLayout_LeftToRight | ?wxLayout_RightToLeft
+%%<br /> Dir = ?wxLayout_Default | ?wxLayout_LeftToRight | ?wxLayout_RightToLeft
+-spec setLayoutDirection(This, Dir) -> ok when
+ This::wxDC(), Dir::wx:wx_enum().
setLayoutDirection(#wx_ref{type=ThisT,ref=ThisRef},Dir)
when is_integer(Dir) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetLayoutDirection,
<<ThisRef:32/?UI,Dir:32/?UI>>).
-%% @spec (This::wxDC(), Function::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetlogicalfunction">external documentation</a>.
+-spec setLogicalFunction(This, Function) -> ok when
+ This::wxDC(), Function::integer().
setLogicalFunction(#wx_ref{type=ThisT,ref=ThisRef},Function)
when is_integer(Function) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetLogicalFunction,
<<ThisRef:32/?UI,Function:32/?UI>>).
-%% @spec (This::wxDC(), Mode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetmapmode">external documentation</a>.
+-spec setMapMode(This, Mode) -> ok when
+ This::wxDC(), Mode::integer().
setMapMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetMapMode,
<<ThisRef:32/?UI,Mode:32/?UI>>).
-%% @spec (This::wxDC(), Palette::wxPalette:wxPalette()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetpalette">external documentation</a>.
+-spec setPalette(This, Palette) -> ok when
+ This::wxDC(), Palette::wxPalette:wxPalette().
setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}) ->
?CLASS(ThisT,wxDC),
?CLASS(PaletteT,wxPalette),
wxe_util:cast(?wxDC_SetPalette,
<<ThisRef:32/?UI,PaletteRef:32/?UI>>).
-%% @spec (This::wxDC(), Pen::wxPen:wxPen()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetpen">external documentation</a>.
+-spec setPen(This, Pen) -> ok when
+ This::wxDC(), Pen::wxPen:wxPen().
setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
?CLASS(ThisT,wxDC),
?CLASS(PenT,wxPen),
wxe_util:cast(?wxDC_SetPen,
<<ThisRef:32/?UI,PenRef:32/?UI>>).
-%% @spec (This::wxDC(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsettextbackground">external documentation</a>.
+-spec setTextBackground(This, Colour) -> ok when
+ This::wxDC(), Colour::wx:wx_colour().
setTextBackground(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetTextBackground,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxDC(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsettextforeground">external documentation</a>.
+-spec setTextForeground(This, Colour) -> ok when
+ This::wxDC(), Colour::wx:wx_colour().
setTextForeground(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetTextForeground,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxDC(), X::float(), Y::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcsetuserscale">external documentation</a>.
+-spec setUserScale(This, X, Y) -> ok when
+ This::wxDC(), X::number(), Y::number().
setUserScale(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
- when is_float(X),is_float(Y) ->
+ when is_number(X),is_number(Y) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_SetUserScale,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F>>).
-%% @spec (This::wxDC(), Message::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcstartdoc">external documentation</a>.
+-spec startDoc(This, Message) -> boolean() when
+ This::wxDC(), Message::unicode:chardata().
startDoc(#wx_ref{type=ThisT,ref=ThisRef},Message)
when is_list(Message) ->
?CLASS(ThisT,wxDC),
@@ -822,8 +927,9 @@ startDoc(#wx_ref{type=ThisT,ref=ThisRef},Message)
wxe_util:call(?wxDC_StartDoc,
<<ThisRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdc.html#wxdcstartpage">external documentation</a>.
+-spec startPage(This) -> ok when
+ This::wxDC().
startPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
wxe_util:cast(?wxDC_StartPage,
diff --git a/lib/wx/src/gen/wxDataObject.erl b/lib/wx/src/gen/wxDataObject.erl
index bad6d96fb5..65b388aa48 100644
--- a/lib/wx/src/gen/wxDataObject.erl
+++ b/lib/wx/src/gen/wxDataObject.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,8 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxDataObject/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxDataObject() :: wx:wx_object().
diff --git a/lib/wx/src/gen/wxDateEvent.erl b/lib/wx/src/gen/wxDateEvent.erl
index b4b010e122..417322097f 100644
--- a/lib/wx/src/gen/wxDateEvent.erl
+++ b/lib/wx/src/gen/wxDateEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,13 +40,16 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxDateEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxDateEvent()) -> wx:datetime()
+-type wxDateEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdateevent.html#wxdateeventgetdate">external documentation</a>.
+-spec getDate(This) -> wx:wx_datetime() when
+ This::wxDateEvent().
getDate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDateEvent),
wxe_util:call(?wxDateEvent_GetDate,
diff --git a/lib/wx/src/gen/wxDatePickerCtrl.erl b/lib/wx/src/gen/wxDatePickerCtrl.erl
index 8a1700e9cd..6ffc2ca3f5 100644
--- a/lib/wx/src/gen/wxDatePickerCtrl.erl
+++ b/lib/wx/src/gen/wxDatePickerCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,6 +74,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxDatePickerCtrl/0]).
%% @hidden
parent_class(wxPickerBase) -> true;
parent_class(wxControl) -> true;
@@ -81,21 +82,29 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxDatePickerCtrl()
+-type wxDatePickerCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdatepickerctrl.html#wxdatepickerctrlwxdatepickerctrl">external documentation</a>.
+-spec new() -> wxDatePickerCtrl().
new() ->
wxe_util:construct(?wxDatePickerCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxDatePickerCtrl()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxDatePickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxDatePickerCtrl()
-%% Option = {date, wx:datetime()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdatepickerctrl.html#wxdatepickerctrlwxdatepickerctrl">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxDatePickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {date, wx:wx_datetime()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -109,39 +118,43 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxDatePickerCtrl_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxDatePickerCtrl(), Dt1::wx:datetime(), Dt2::wx:datetime()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdatepickerctrl.html#wxdatepickerctrlgetrange">external documentation</a>.
+-spec getRange(This, Dt1, Dt2) -> boolean() when
+ This::wxDatePickerCtrl(), Dt1::wx:wx_datetime(), Dt2::wx:wx_datetime().
getRange(#wx_ref{type=ThisT,ref=ThisRef},Dt1,Dt2)
when tuple_size(Dt1) =:= 2,tuple_size(Dt2) =:= 2 ->
?CLASS(ThisT,wxDatePickerCtrl),
wxe_util:call(?wxDatePickerCtrl_GetRange,
<<ThisRef:32/?UI,(wxe_util:datetime_bin(Dt1)):24/binary,(wxe_util:datetime_bin(Dt2)):24/binary>>).
-%% @spec (This::wxDatePickerCtrl()) -> wx:datetime()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdatepickerctrl.html#wxdatepickerctrlgetvalue">external documentation</a>.
+-spec getValue(This) -> wx:wx_datetime() when
+ This::wxDatePickerCtrl().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDatePickerCtrl),
wxe_util:call(?wxDatePickerCtrl_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDatePickerCtrl(), Dt1::wx:datetime(), Dt2::wx:datetime()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdatepickerctrl.html#wxdatepickerctrlsetrange">external documentation</a>.
+-spec setRange(This, Dt1, Dt2) -> ok when
+ This::wxDatePickerCtrl(), Dt1::wx:wx_datetime(), Dt2::wx:wx_datetime().
setRange(#wx_ref{type=ThisT,ref=ThisRef},Dt1,Dt2)
when tuple_size(Dt1) =:= 2,tuple_size(Dt2) =:= 2 ->
?CLASS(ThisT,wxDatePickerCtrl),
wxe_util:cast(?wxDatePickerCtrl_SetRange,
<<ThisRef:32/?UI,(wxe_util:datetime_bin(Dt1)):24/binary,(wxe_util:datetime_bin(Dt2)):24/binary>>).
-%% @spec (This::wxDatePickerCtrl(), Date::wx:datetime()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdatepickerctrl.html#wxdatepickerctrlsetvalue">external documentation</a>.
+-spec setValue(This, Date) -> ok when
+ This::wxDatePickerCtrl(), Date::wx:wx_datetime().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Date)
when tuple_size(Date) =:= 2 ->
?CLASS(ThisT,wxDatePickerCtrl),
wxe_util:cast(?wxDatePickerCtrl_SetValue,
<<ThisRef:32/?UI,(wxe_util:datetime_bin(Date)):24/binary>>).
-%% @spec (This::wxDatePickerCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxDatePickerCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDatePickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDialog.erl b/lib/wx/src/gen/wxDialog.erl
index 514a62813e..55861b75d1 100644
--- a/lib/wx/src/gen/wxDialog.erl
+++ b/lib/wx/src/gen/wxDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -76,27 +76,34 @@
thaw/1,transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxDialog/0]).
%% @hidden
parent_class(wxTopLevelWindow) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxDialog()
+-type wxDialog() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogwxdialog">external documentation</a>.
+-spec new() -> wxDialog().
new() ->
wxe_util:construct(?wxDialog_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string()) -> wxDialog()
%% @equiv new(Parent,Id,Title, [])
+-spec new(Parent, Id, Title) -> wxDialog() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata().
+
new(Parent,Id,Title)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
new(Parent,Id,Title, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), [Option]) -> wxDialog()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogwxdialog">external documentation</a>.
+-spec new(Parent, Id, Title, [Option]) -> wxDialog() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -109,15 +116,20 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
wxe_util:construct(?wxDialog_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxDialog(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string()) -> bool()
%% @equiv create(This,Parent,Id,Title, [])
+-spec create(This, Parent, Id, Title) -> boolean() when
+ This::wxDialog(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata().
+
create(This,Parent,Id,Title)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
create(This,Parent,Id,Title, []).
-%% @spec (This::wxDialog(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogcreate">external documentation</a>.
+-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
+ This::wxDialog(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxDialog),
@@ -131,76 +143,87 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ti
wxe_util:call(?wxDialog_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxDialog(), Flags::integer()) -> wxSizer:wxSizer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogcreatebuttonsizer">external documentation</a>.
+-spec createButtonSizer(This, Flags) -> wxSizer:wxSizer() when
+ This::wxDialog(), Flags::integer().
createButtonSizer(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
?CLASS(ThisT,wxDialog),
wxe_util:call(?wxDialog_CreateButtonSizer,
<<ThisRef:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxDialog(), Flags::integer()) -> wxStdDialogButtonSizer:wxStdDialogButtonSizer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogcreatestddialogbuttonsizer">external documentation</a>.
+-spec createStdDialogButtonSizer(This, Flags) -> wxStdDialogButtonSizer:wxStdDialogButtonSizer() when
+ This::wxDialog(), Flags::integer().
createStdDialogButtonSizer(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
?CLASS(ThisT,wxDialog),
wxe_util:call(?wxDialog_CreateStdDialogButtonSizer,
<<ThisRef:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxDialog(), RetCode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogendmodal">external documentation</a>.
+-spec endModal(This, RetCode) -> ok when
+ This::wxDialog(), RetCode::integer().
endModal(#wx_ref{type=ThisT,ref=ThisRef},RetCode)
when is_integer(RetCode) ->
?CLASS(ThisT,wxDialog),
wxe_util:cast(?wxDialog_EndModal,
<<ThisRef:32/?UI,RetCode:32/?UI>>).
-%% @spec (This::wxDialog()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialoggetaffirmativeid">external documentation</a>.
+-spec getAffirmativeId(This) -> integer() when
+ This::wxDialog().
getAffirmativeId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDialog),
wxe_util:call(?wxDialog_GetAffirmativeId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDialog()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialoggetreturncode">external documentation</a>.
+-spec getReturnCode(This) -> integer() when
+ This::wxDialog().
getReturnCode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDialog),
wxe_util:call(?wxDialog_GetReturnCode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDialog()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogismodal">external documentation</a>.
+-spec isModal(This) -> boolean() when
+ This::wxDialog().
isModal(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDialog),
wxe_util:call(?wxDialog_IsModal,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDialog(), AffirmativeId::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogsetaffirmativeid">external documentation</a>.
+-spec setAffirmativeId(This, AffirmativeId) -> ok when
+ This::wxDialog(), AffirmativeId::integer().
setAffirmativeId(#wx_ref{type=ThisT,ref=ThisRef},AffirmativeId)
when is_integer(AffirmativeId) ->
?CLASS(ThisT,wxDialog),
wxe_util:cast(?wxDialog_SetAffirmativeId,
<<ThisRef:32/?UI,AffirmativeId:32/?UI>>).
-%% @spec (This::wxDialog(), ReturnCode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogsetreturncode">external documentation</a>.
+-spec setReturnCode(This, ReturnCode) -> ok when
+ This::wxDialog(), ReturnCode::integer().
setReturnCode(#wx_ref{type=ThisT,ref=ThisRef},ReturnCode)
when is_integer(ReturnCode) ->
?CLASS(ThisT,wxDialog),
wxe_util:cast(?wxDialog_SetReturnCode,
<<ThisRef:32/?UI,ReturnCode:32/?UI>>).
-%% @spec (This::wxDialog()) -> bool()
%% @equiv show(This, [])
+-spec show(This) -> boolean() when
+ This::wxDialog().
+
show(This)
when is_record(This, wx_ref) ->
show(This, []).
-%% @spec (This::wxDialog(), [Option]) -> bool()
-%% Option = {show, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogshow">external documentation</a>.
+-spec show(This, [Option]) -> boolean() when
+ This::wxDialog(),
+ Option :: {show, boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxDialog),
@@ -210,15 +233,16 @@ show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxDialog_Show,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxDialog()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html#wxdialogshowmodal">external documentation</a>.
+-spec showModal(This) -> integer() when
+ This::wxDialog().
showModal(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDialog),
wxe_util:call(?wxDialog_ShowModal,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDirDialog.erl b/lib/wx/src/gen/wxDirDialog.erl
index 28db3daf1d..d7dc735937 100644
--- a/lib/wx/src/gen/wxDirDialog.erl
+++ b/lib/wx/src/gen/wxDirDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxDirDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,15 +85,23 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxDirDialog()
+-type wxDirDialog() :: wx:wx_object().
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxDirDialog() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxDirDialog()
-%% Option = {title, string()} | {defaultPath, string()} | {style, integer()} | {pos, {X::integer(), Y::integer()}} | {sz, {W::integer(), H::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirdialog.html#wxdirdialogwxdirdialog">external documentation</a>.
+-spec new(Parent, [Option]) -> wxDirDialog() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {title, unicode:chardata()}
+ | {defaultPath, unicode:chardata()}
+ | {style, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {sz, {W::integer(), H::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -106,22 +115,25 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxDirDialog_new,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxDirDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirdialog.html#wxdirdialoggetpath">external documentation</a>.
+-spec getPath(This) -> unicode:charlist() when
+ This::wxDirDialog().
getPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDirDialog),
wxe_util:call(?wxDirDialog_GetPath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDirDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirdialog.html#wxdirdialoggetmessage">external documentation</a>.
+-spec getMessage(This) -> unicode:charlist() when
+ This::wxDirDialog().
getMessage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDirDialog),
wxe_util:call(?wxDirDialog_GetMessage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDirDialog(), Message::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirdialog.html#wxdirdialogsetmessage">external documentation</a>.
+-spec setMessage(This, Message) -> ok when
+ This::wxDirDialog(), Message::unicode:chardata().
setMessage(#wx_ref{type=ThisT,ref=ThisRef},Message)
when is_list(Message) ->
?CLASS(ThisT,wxDirDialog),
@@ -129,8 +141,9 @@ setMessage(#wx_ref{type=ThisT,ref=ThisRef},Message)
wxe_util:cast(?wxDirDialog_SetMessage,
<<ThisRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxDirDialog(), Path::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirdialog.html#wxdirdialogsetpath">external documentation</a>.
+-spec setPath(This, Path) -> ok when
+ This::wxDirDialog(), Path::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
?CLASS(ThisT,wxDirDialog),
@@ -138,8 +151,8 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
wxe_util:cast(?wxDirDialog_SetPath,
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxDirDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxDirDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDirDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDirPickerCtrl.erl b/lib/wx/src/gen/wxDirPickerCtrl.erl
index 2b24bc4bb0..bbc169ae03 100644
--- a/lib/wx/src/gen/wxDirPickerCtrl.erl
+++ b/lib/wx/src/gen/wxDirPickerCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,6 +74,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxDirPickerCtrl/0]).
%% @hidden
parent_class(wxPickerBase) -> true;
parent_class(wxControl) -> true;
@@ -81,21 +82,30 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxDirPickerCtrl()
+-type wxDirPickerCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirpickerctrl.html#wxdirpickerctrlwxdirpickerctrl">external documentation</a>.
+-spec new() -> wxDirPickerCtrl().
new() ->
wxe_util:construct(?wxDirPickerCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxDirPickerCtrl()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxDirPickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxDirPickerCtrl()
-%% Option = {path, string()} | {message, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirpickerctrl.html#wxdirpickerctrlwxdirpickerctrl">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxDirPickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {path, unicode:chardata()}
+ | {message, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -110,15 +120,23 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxDirPickerCtrl_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxDirPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxDirPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxDirPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {path, string()} | {message, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirpickerctrl.html#wxdirpickerctrlcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxDirPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {path, unicode:chardata()}
+ | {message, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxDirPickerCtrl),
@@ -134,15 +152,17 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxDirPickerCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxDirPickerCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirpickerctrl.html#wxdirpickerctrlgetpath">external documentation</a>.
+-spec getPath(This) -> unicode:charlist() when
+ This::wxDirPickerCtrl().
getPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDirPickerCtrl),
wxe_util:call(?wxDirPickerCtrl_GetPath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxDirPickerCtrl(), Str::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxdirpickerctrl.html#wxdirpickerctrlsetpath">external documentation</a>.
+-spec setPath(This, Str) -> ok when
+ This::wxDirPickerCtrl(), Str::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
?CLASS(ThisT,wxDirPickerCtrl),
@@ -150,8 +170,8 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Str)
wxe_util:cast(?wxDirPickerCtrl_SetPath,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxDirPickerCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxDirPickerCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDirPickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDisplayChangedEvent.erl b/lib/wx/src/gen/wxDisplayChangedEvent.erl
index c86ef62462..0c0612564b 100644
--- a/lib/wx/src/gen/wxDisplayChangedEvent.erl
+++ b/lib/wx/src/gen/wxDisplayChangedEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,10 +37,12 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxDisplayChangedEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxDisplayChangedEvent() :: wx:wx_object().
%% From wxEvent
%% @hidden
stopPropagation(This) -> wxEvent:stopPropagation(This).
diff --git a/lib/wx/src/gen/wxEraseEvent.erl b/lib/wx/src/gen/wxEraseEvent.erl
index 77139b6790..03ce8862dc 100644
--- a/lib/wx/src/gen/wxEraseEvent.erl
+++ b/lib/wx/src/gen/wxEraseEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,12 +37,15 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxEraseEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxEraseEvent()) -> wxDC:wxDC()
+-type wxEraseEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxeraseevent.html#wxeraseeventgetdc">external documentation</a>.
+-spec getDC(This) -> wxDC:wxDC() when
+ This::wxEraseEvent().
getDC(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxEraseEvent),
wxe_util:call(?wxEraseEvent_GetDC,
diff --git a/lib/wx/src/gen/wxEvent.erl b/lib/wx/src/gen/wxEvent.erl
index 403fd89f1f..1b2147a326 100644
--- a/lib/wx/src/gen/wxEvent.erl
+++ b/lib/wx/src/gen/wxEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,61 +30,72 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxEvent/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxEvent()) -> integer()
+-type wxEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevent.html#wxeventgetid">external documentation</a>.
+-spec getId(This) -> integer() when
+ This::wxEvent().
getId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxEvent),
wxe_util:call(?wxEvent_GetId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevent.html#wxeventgetskipped">external documentation</a>.
+-spec getSkipped(This) -> boolean() when
+ This::wxEvent().
getSkipped(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxEvent),
wxe_util:call(?wxEvent_GetSkipped,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevent.html#wxeventgettimestamp">external documentation</a>.
+-spec getTimestamp(This) -> integer() when
+ This::wxEvent().
getTimestamp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxEvent),
wxe_util:call(?wxEvent_GetTimestamp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevent.html#wxeventiscommandevent">external documentation</a>.
+-spec isCommandEvent(This) -> boolean() when
+ This::wxEvent().
isCommandEvent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxEvent),
wxe_util:call(?wxEvent_IsCommandEvent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxEvent(), PropagationLevel::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevent.html#wxeventresumepropagation">external documentation</a>.
+-spec resumePropagation(This, PropagationLevel) -> ok when
+ This::wxEvent(), PropagationLevel::integer().
resumePropagation(#wx_ref{type=ThisT,ref=ThisRef},PropagationLevel)
when is_integer(PropagationLevel) ->
?CLASS(ThisT,wxEvent),
wxe_util:cast(?wxEvent_ResumePropagation,
<<ThisRef:32/?UI,PropagationLevel:32/?UI>>).
-%% @spec (This::wxEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevent.html#wxeventshouldpropagate">external documentation</a>.
+-spec shouldPropagate(This) -> boolean() when
+ This::wxEvent().
shouldPropagate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxEvent),
wxe_util:call(?wxEvent_ShouldPropagate,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxEvent()) -> ok
%% @equiv skip(This, [])
+-spec skip(This) -> ok when
+ This::wxEvent().
+
skip(This)
when is_record(This, wx_ref) ->
skip(This, []).
-%% @spec (This::wxEvent(), [Option]) -> ok
-%% Option = {skip, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevent.html#wxeventskip">external documentation</a>.
+-spec skip(This, [Option]) -> ok when
+ This::wxEvent(),
+ Option :: {skip, boolean()}.
skip(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxEvent),
@@ -94,8 +105,9 @@ skip(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxEvent_Skip,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevent.html#wxeventstoppropagation">external documentation</a>.
+-spec stopPropagation(This) -> integer() when
+ This::wxEvent().
stopPropagation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxEvent),
wxe_util:call(?wxEvent_StopPropagation,
diff --git a/lib/wx/src/gen/wxEvtHandler.erl b/lib/wx/src/gen/wxEvtHandler.erl
index 820c2b7a58..cf4a72da5a 100644
--- a/lib/wx/src/gen/wxEvtHandler.erl
+++ b/lib/wx/src/gen/wxEvtHandler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,10 +37,7 @@
%% <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevthandler.html">
%% The orginal documentation</a>.
%%
-%% @headerfile "../../include/wx.hrl"
%%
-%%@type wxEvtHandler(). An object reference
-
-module(wxEvtHandler).
-include("wxe.hrl").
-include("../include/wx.hrl").
@@ -53,17 +50,16 @@
new_evt_listener/0, destroy_evt_listener/1,
get_callback/1, replace_fun_with_id/2]).
--record(evh, {et=null,id=?wxID_ANY,lastId=?wxID_ANY,skip=undefined,userdata=[],cb=0}).
-
+-export_type([wxEvtHandler/0, wx/0, event/0]).
+-type wxEvtHandler() :: wx:wx_object().
+-record(evh, {et=null,id=?wxID_ANY,lastId=?wxID_ANY,skip=undefined,userdata=[],cb=0}).
-%% @spec (This::wxEvtHandler(), EventType::wxEventType()) -> ok
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
-
+-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
connect(This, EventType) ->
connect(This, EventType, []).
-%% @spec (This::wxEvtHandler(), EventType::wxEventType(), [Options]) -> ok
%% @doc This function subscribes the to events of EventType,
%% in the range id, lastId. The events will be received as messages
%% if no callback is supplied.
@@ -82,6 +78,9 @@ connect(This, EventType) ->
%% to process the event. Default not specfied i.e. a message will
%% be delivered to the process calling this function.
%% {userData, term()} An erlang term that will be sent with the event. Default: [].
+-spec connect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> ok when
+ Option :: {id, integer()} | {lastId, integer()} | {skip, boolean()} |
+ {callback, function()} | {userData, term()}.
connect(This=#wx_ref{type=ThisT}, EventType, Options) ->
EvH = parse_opts(Options, #evh{et=EventType}),
?CLASS(ThisT,wxEvtHandler),
@@ -118,26 +117,27 @@ parse_opts([], Opts = #evh{id=Id,lastId=Lid,skip=Skip, cb=CB}) ->
Opts
end.
-%% @spec (This::wxEvtHandler()) -> true | false
+
%% @doc Equivalent to {@link disconnect/3. disconnect(This, null, [])}
%% Can also have an optional callback Fun() as an additional last argument.
-
+-spec disconnect(This::wxEvtHandler()) -> boolean().
disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}) ->
?CLASS(ThisT,wxEvtHandler),
disconnect(This, null, []).
-%% @spec (This::wxEvtHandler(), EventType::wxEventType()) -> true | false
%% @doc Equivalent to {@link disconnect/3. disconnect(This, EventType, [])}
+-spec disconnect(This::wxEvtHandler(), EventType::wxEventType()) -> boolean().
disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType) when is_atom(EventType) ->
?CLASS(ThisT,wxEvtHandler),
disconnect(This, EventType, []).
-%% @spec (This::wxEvtHandler(), EventType::wxEventType(), Opts) -> true | false
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxevthandler.html#wxevthandlerdisconnect">external documentation</a>
%% This function unsubscribes the process or callback fun from the event handler.
%% EventType may be the atom 'null' to match any eventtype.
%% Notice that the options skip and userdata is not used to match the eventhandler.
-disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
+-spec disconnect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> boolean() when
+ Option :: {id, integer()} | {lastId, integer()} | {callback, function()}.
+disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
?CLASS(ThisT,wxEvtHandler),
EvH = parse_opts(Opts, #evh{et=EventType}),
case wxe_util:disconnect_cb(This, EvH) of
diff --git a/lib/wx/src/gen/wxFileDataObject.erl b/lib/wx/src/gen/wxFileDataObject.erl
index 2fcfbd5374..bcb30a5ece 100644
--- a/lib/wx/src/gen/wxFileDataObject.erl
+++ b/lib/wx/src/gen/wxFileDataObject.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,18 +32,21 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxFileDataObject/0]).
%% @hidden
parent_class(wxDataObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFileDataObject()
+-type wxFileDataObject() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledataobject.html#wxfiledataobjectwxfiledataobject">external documentation</a>.
+-spec new() -> wxFileDataObject().
new() ->
wxe_util:construct(?wxFileDataObject_new,
<<>>).
-%% @spec (This::wxFileDataObject(), Filename::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledataobject.html#wxfiledataobjectaddfile">external documentation</a>.
+-spec addFile(This, Filename) -> ok when
+ This::wxFileDataObject(), Filename::unicode:chardata().
addFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
when is_list(Filename) ->
?CLASS(ThisT,wxFileDataObject),
@@ -51,15 +54,16 @@ addFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
wxe_util:cast(?wxFileDataObject_AddFile,
<<ThisRef:32/?UI,(byte_size(Filename_UC)):32/?UI,(Filename_UC)/binary, 0:(((8- ((0+byte_size(Filename_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFileDataObject()) -> [[string()]]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledataobject.html#wxfiledataobjectgetfilenames">external documentation</a>.
+-spec getFilenames(This) -> [[unicode:charlist()]] when
+ This::wxFileDataObject().
getFilenames(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDataObject),
wxe_util:call(?wxFileDataObject_GetFilenames,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDataObject()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFileDataObject()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFileDataObject),
wxe_util:destroy(?wxFileDataObject_destroy,Obj),
diff --git a/lib/wx/src/gen/wxFileDialog.erl b/lib/wx/src/gen/wxFileDialog.erl
index c6779927e9..3d65c92758 100644
--- a/lib/wx/src/gen/wxFileDialog.erl
+++ b/lib/wx/src/gen/wxFileDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -79,6 +79,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxFileDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -86,15 +87,25 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxFileDialog()
+-type wxFileDialog() :: wx:wx_object().
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxFileDialog() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxFileDialog()
-%% Option = {message, string()} | {defaultDir, string()} | {defaultFile, string()} | {wildCard, string()} | {style, integer()} | {pos, {X::integer(), Y::integer()}} | {sz, {W::integer(), H::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialogwxfiledialog">external documentation</a>.
+-spec new(Parent, [Option]) -> wxFileDialog() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {message, unicode:chardata()}
+ | {defaultDir, unicode:chardata()}
+ | {defaultFile, unicode:chardata()}
+ | {wildCard, unicode:chardata()}
+ | {style, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {sz, {W::integer(), H::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -110,64 +121,73 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxFileDialog_new,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxFileDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetdirectory">external documentation</a>.
+-spec getDirectory(This) -> unicode:charlist() when
+ This::wxFileDialog().
getDirectory(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:call(?wxFileDialog_GetDirectory,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetfilename">external documentation</a>.
+-spec getFilename(This) -> unicode:charlist() when
+ This::wxFileDialog().
getFilename(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:call(?wxFileDialog_GetFilename,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDialog()) -> [[string()]]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetfilenames">external documentation</a>.
+-spec getFilenames(This) -> [[unicode:charlist()]] when
+ This::wxFileDialog().
getFilenames(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:call(?wxFileDialog_GetFilenames,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDialog()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetfilterindex">external documentation</a>.
+-spec getFilterIndex(This) -> integer() when
+ This::wxFileDialog().
getFilterIndex(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:call(?wxFileDialog_GetFilterIndex,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetmessage">external documentation</a>.
+-spec getMessage(This) -> unicode:charlist() when
+ This::wxFileDialog().
getMessage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:call(?wxFileDialog_GetMessage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetpath">external documentation</a>.
+-spec getPath(This) -> unicode:charlist() when
+ This::wxFileDialog().
getPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:call(?wxFileDialog_GetPath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDialog()) -> [[string()]]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetpaths">external documentation</a>.
+-spec getPaths(This) -> [[unicode:charlist()]] when
+ This::wxFileDialog().
getPaths(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:call(?wxFileDialog_GetPaths,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetwildcard">external documentation</a>.
+-spec getWildcard(This) -> unicode:charlist() when
+ This::wxFileDialog().
getWildcard(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:call(?wxFileDialog_GetWildcard,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFileDialog(), Dir::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialogsetdirectory">external documentation</a>.
+-spec setDirectory(This, Dir) -> ok when
+ This::wxFileDialog(), Dir::unicode:chardata().
setDirectory(#wx_ref{type=ThisT,ref=ThisRef},Dir)
when is_list(Dir) ->
?CLASS(ThisT,wxFileDialog),
@@ -175,8 +195,9 @@ setDirectory(#wx_ref{type=ThisT,ref=ThisRef},Dir)
wxe_util:cast(?wxFileDialog_SetDirectory,
<<ThisRef:32/?UI,(byte_size(Dir_UC)):32/?UI,(Dir_UC)/binary, 0:(((8- ((0+byte_size(Dir_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFileDialog(), Name::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialogsetfilename">external documentation</a>.
+-spec setFilename(This, Name) -> ok when
+ This::wxFileDialog(), Name::unicode:chardata().
setFilename(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxFileDialog),
@@ -184,16 +205,18 @@ setFilename(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:cast(?wxFileDialog_SetFilename,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFileDialog(), FilterIndex::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialogsetfilterindex">external documentation</a>.
+-spec setFilterIndex(This, FilterIndex) -> ok when
+ This::wxFileDialog(), FilterIndex::integer().
setFilterIndex(#wx_ref{type=ThisT,ref=ThisRef},FilterIndex)
when is_integer(FilterIndex) ->
?CLASS(ThisT,wxFileDialog),
wxe_util:cast(?wxFileDialog_SetFilterIndex,
<<ThisRef:32/?UI,FilterIndex:32/?UI>>).
-%% @spec (This::wxFileDialog(), Message::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialogsetmessage">external documentation</a>.
+-spec setMessage(This, Message) -> ok when
+ This::wxFileDialog(), Message::unicode:chardata().
setMessage(#wx_ref{type=ThisT,ref=ThisRef},Message)
when is_list(Message) ->
?CLASS(ThisT,wxFileDialog),
@@ -201,8 +224,9 @@ setMessage(#wx_ref{type=ThisT,ref=ThisRef},Message)
wxe_util:cast(?wxFileDialog_SetMessage,
<<ThisRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFileDialog(), Path::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialogsetpath">external documentation</a>.
+-spec setPath(This, Path) -> ok when
+ This::wxFileDialog(), Path::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
?CLASS(ThisT,wxFileDialog),
@@ -210,8 +234,9 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
wxe_util:cast(?wxFileDialog_SetPath,
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFileDialog(), WildCard::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialogsetwildcard">external documentation</a>.
+-spec setWildcard(This, WildCard) -> ok when
+ This::wxFileDialog(), WildCard::unicode:chardata().
setWildcard(#wx_ref{type=ThisT,ref=ThisRef},WildCard)
when is_list(WildCard) ->
?CLASS(ThisT,wxFileDialog),
@@ -219,8 +244,8 @@ setWildcard(#wx_ref{type=ThisT,ref=ThisRef},WildCard)
wxe_util:cast(?wxFileDialog_SetWildcard,
<<ThisRef:32/?UI,(byte_size(WildCard_UC)):32/?UI,(WildCard_UC)/binary, 0:(((8- ((0+byte_size(WildCard_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFileDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFileDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFileDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFileDirPickerEvent.erl b/lib/wx/src/gen/wxFileDirPickerEvent.erl
index cc4880b88c..77b10a91ed 100644
--- a/lib/wx/src/gen/wxFileDirPickerEvent.erl
+++ b/lib/wx/src/gen/wxFileDirPickerEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,13 +40,16 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxFileDirPickerEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxFileDirPickerEvent()) -> string()
+-type wxFileDirPickerEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledirpickerevent.html#wxfiledirpickereventgetpath">external documentation</a>.
+-spec getPath(This) -> unicode:charlist() when
+ This::wxFileDirPickerEvent().
getPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFileDirPickerEvent),
wxe_util:call(?wxFileDirPickerEvent_GetPath,
diff --git a/lib/wx/src/gen/wxFilePickerCtrl.erl b/lib/wx/src/gen/wxFilePickerCtrl.erl
index 93bfa72380..d19c8c00cb 100644
--- a/lib/wx/src/gen/wxFilePickerCtrl.erl
+++ b/lib/wx/src/gen/wxFilePickerCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,6 +74,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxFilePickerCtrl/0]).
%% @hidden
parent_class(wxPickerBase) -> true;
parent_class(wxControl) -> true;
@@ -81,21 +82,31 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFilePickerCtrl()
+-type wxFilePickerCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfilepickerctrl.html#wxfilepickerctrlwxfilepickerctrl">external documentation</a>.
+-spec new() -> wxFilePickerCtrl().
new() ->
wxe_util:construct(?wxFilePickerCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxFilePickerCtrl()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxFilePickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxFilePickerCtrl()
-%% Option = {path, string()} | {message, string()} | {wildcard, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfilepickerctrl.html#wxfilepickerctrlwxfilepickerctrl">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxFilePickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {path, unicode:chardata()}
+ | {message, unicode:chardata()}
+ | {wildcard, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -111,15 +122,24 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxFilePickerCtrl_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxFilePickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxFilePickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxFilePickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {path, string()} | {message, string()} | {wildcard, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfilepickerctrl.html#wxfilepickerctrlcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxFilePickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {path, unicode:chardata()}
+ | {message, unicode:chardata()}
+ | {wildcard, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxFilePickerCtrl),
@@ -136,15 +156,17 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxFilePickerCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxFilePickerCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfilepickerctrl.html#wxfilepickerctrlgetpath">external documentation</a>.
+-spec getPath(This) -> unicode:charlist() when
+ This::wxFilePickerCtrl().
getPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFilePickerCtrl),
wxe_util:call(?wxFilePickerCtrl_GetPath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFilePickerCtrl(), Str::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfilepickerctrl.html#wxfilepickerctrlsetpath">external documentation</a>.
+-spec setPath(This, Str) -> ok when
+ This::wxFilePickerCtrl(), Str::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
?CLASS(ThisT,wxFilePickerCtrl),
@@ -152,8 +174,8 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Str)
wxe_util:cast(?wxFilePickerCtrl_SetPath,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFilePickerCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFilePickerCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFilePickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFindReplaceData.erl b/lib/wx/src/gen/wxFindReplaceData.erl
index 52eafa8398..8dc6036da6 100644
--- a/lib/wx/src/gen/wxFindReplaceData.erl
+++ b/lib/wx/src/gen/wxFindReplaceData.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,53 +30,61 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxFindReplaceData/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFindReplaceData()
+-type wxFindReplaceData() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedata.html#wxfindreplacedatawxfindreplacedata">external documentation</a>.
+-spec new() -> wxFindReplaceData().
new() ->
wxe_util:construct(?wxFindReplaceData_new_0,
<<>>).
-%% @spec (Flags::integer()) -> wxFindReplaceData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedata.html#wxfindreplacedatawxfindreplacedata">external documentation</a>.
+-spec new(Flags) -> wxFindReplaceData() when
+ Flags::integer().
new(Flags)
when is_integer(Flags) ->
wxe_util:construct(?wxFindReplaceData_new_1,
<<Flags:32/?UI>>).
-%% @spec (This::wxFindReplaceData()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedata.html#wxfindreplacedatagetfindstring">external documentation</a>.
+-spec getFindString(This) -> unicode:charlist() when
+ This::wxFindReplaceData().
getFindString(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFindReplaceData),
wxe_util:call(?wxFindReplaceData_GetFindString,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFindReplaceData()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedata.html#wxfindreplacedatagetreplacestring">external documentation</a>.
+-spec getReplaceString(This) -> unicode:charlist() when
+ This::wxFindReplaceData().
getReplaceString(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFindReplaceData),
wxe_util:call(?wxFindReplaceData_GetReplaceString,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFindReplaceData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedata.html#wxfindreplacedatagetflags">external documentation</a>.
+-spec getFlags(This) -> integer() when
+ This::wxFindReplaceData().
getFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFindReplaceData),
wxe_util:call(?wxFindReplaceData_GetFlags,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFindReplaceData(), Flags::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedata.html#wxfindreplacedatasetflags">external documentation</a>.
+-spec setFlags(This, Flags) -> ok when
+ This::wxFindReplaceData(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
?CLASS(ThisT,wxFindReplaceData),
wxe_util:cast(?wxFindReplaceData_SetFlags,
<<ThisRef:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxFindReplaceData(), Str::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedata.html#wxfindreplacedatasetfindstring">external documentation</a>.
+-spec setFindString(This, Str) -> ok when
+ This::wxFindReplaceData(), Str::unicode:chardata().
setFindString(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
?CLASS(ThisT,wxFindReplaceData),
@@ -84,8 +92,9 @@ setFindString(#wx_ref{type=ThisT,ref=ThisRef},Str)
wxe_util:cast(?wxFindReplaceData_SetFindString,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFindReplaceData(), Str::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedata.html#wxfindreplacedatasetreplacestring">external documentation</a>.
+-spec setReplaceString(This, Str) -> ok when
+ This::wxFindReplaceData(), Str::unicode:chardata().
setReplaceString(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
?CLASS(ThisT,wxFindReplaceData),
@@ -93,8 +102,8 @@ setReplaceString(#wx_ref{type=ThisT,ref=ThisRef},Str)
wxe_util:cast(?wxFindReplaceData_SetReplaceString,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFindReplaceData()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFindReplaceData()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFindReplaceData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFindReplaceDialog.erl b/lib/wx/src/gen/wxFindReplaceDialog.erl
index b37fd41831..6db9b3ed53 100644
--- a/lib/wx/src/gen/wxFindReplaceDialog.erl
+++ b/lib/wx/src/gen/wxFindReplaceDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxFindReplaceDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,21 +85,25 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFindReplaceDialog()
+-type wxFindReplaceDialog() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedialog.html#wxfindreplacedialogwxfindreplacedialog">external documentation</a>.
+-spec new() -> wxFindReplaceDialog().
new() ->
wxe_util:construct(?wxFindReplaceDialog_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::string()) -> wxFindReplaceDialog()
%% @equiv new(Parent,Data,Title, [])
+-spec new(Parent, Data, Title) -> wxFindReplaceDialog() when
+ Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata().
+
new(Parent,Data,Title)
when is_record(Parent, wx_ref),is_record(Data, wx_ref),is_list(Title) ->
new(Parent,Data,Title, []).
-%% @spec (Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::string(), [Option]) -> wxFindReplaceDialog()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedialog.html#wxfindreplacedialogwxfindreplacedialog">external documentation</a>.
+-spec new(Parent, Data, Title, [Option]) -> wxFindReplaceDialog() when
+ Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata(),
+ Option :: {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef},Title, Options)
when is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -110,15 +115,18 @@ new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef},Title, O
wxe_util:construct(?wxFindReplaceDialog_new_4,
<<ParentRef:32/?UI,DataRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxFindReplaceDialog(), Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::string()) -> bool()
%% @equiv create(This,Parent,Data,Title, [])
+-spec create(This, Parent, Data, Title) -> boolean() when
+ This::wxFindReplaceDialog(), Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata().
+
create(This,Parent,Data,Title)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_record(Data, wx_ref),is_list(Title) ->
create(This,Parent,Data,Title, []).
-%% @spec (This::wxFindReplaceDialog(), Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::string(), [Option]) -> bool()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedialog.html#wxfindreplacedialogcreate">external documentation</a>.
+-spec create(This, Parent, Data, Title, [Option]) -> boolean() when
+ This::wxFindReplaceDialog(), Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata(),
+ Option :: {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef},Title, Options)
when is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxFindReplaceDialog),
@@ -131,15 +139,16 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_r
wxe_util:call(?wxFindReplaceDialog_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,DataRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxFindReplaceDialog()) -> wxFindReplaceData:wxFindReplaceData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfindreplacedialog.html#wxfindreplacedialoggetdata">external documentation</a>.
+-spec getData(This) -> wxFindReplaceData:wxFindReplaceData() when
+ This::wxFindReplaceDialog().
getData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFindReplaceDialog),
wxe_util:call(?wxFindReplaceDialog_GetData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFindReplaceDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFindReplaceDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFindReplaceDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFlexGridSizer.erl b/lib/wx/src/gen/wxFlexGridSizer.erl
index 910cc78894..91dcf6a2e7 100644
--- a/lib/wx/src/gen/wxFlexGridSizer.erl
+++ b/lib/wx/src/gen/wxFlexGridSizer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -45,20 +45,26 @@
setMinSize/2,setMinSize/3,setRows/2,setSizeHints/2,setVGap/2,setVirtualSizeHints/2,
show/2,show/3]).
+-export_type([wxFlexGridSizer/0]).
%% @hidden
parent_class(wxGridSizer) -> true;
parent_class(wxSizer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Cols::integer()) -> wxFlexGridSizer()
+-type wxFlexGridSizer() :: wx:wx_object().
%% @equiv new(Cols, [])
+-spec new(Cols) -> wxFlexGridSizer() when
+ Cols::integer().
+
new(Cols)
when is_integer(Cols) ->
new(Cols, []).
-%% @spec (Cols::integer(), [Option]) -> wxFlexGridSizer()
-%% Option = {vgap, integer()} | {hgap, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizerwxflexgridsizer">external documentation</a>.
+-spec new(Cols, [Option]) -> wxFlexGridSizer() when
+ Cols::integer(),
+ Option :: {vgap, integer()}
+ | {hgap, integer()}.
new(Cols, Options)
when is_integer(Cols),is_list(Options) ->
MOpts = fun({vgap, Vgap}, Acc) -> [<<1:32/?UI,Vgap:32/?UI>>|Acc];
@@ -68,22 +74,26 @@ new(Cols, Options)
wxe_util:construct(?wxFlexGridSizer_new_2,
<<Cols:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (Rows::integer(), Cols::integer(), Vgap::integer(), Hgap::integer()) -> wxFlexGridSizer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizerwxflexgridsizer">external documentation</a>.
+-spec new(Rows, Cols, Vgap, Hgap) -> wxFlexGridSizer() when
+ Rows::integer(), Cols::integer(), Vgap::integer(), Hgap::integer().
new(Rows,Cols,Vgap,Hgap)
when is_integer(Rows),is_integer(Cols),is_integer(Vgap),is_integer(Hgap) ->
wxe_util:construct(?wxFlexGridSizer_new_4,
<<Rows:32/?UI,Cols:32/?UI,Vgap:32/?UI,Hgap:32/?UI>>).
-%% @spec (This::wxFlexGridSizer(), Idx::integer()) -> ok
%% @equiv addGrowableCol(This,Idx, [])
+-spec addGrowableCol(This, Idx) -> ok when
+ This::wxFlexGridSizer(), Idx::integer().
+
addGrowableCol(This,Idx)
when is_record(This, wx_ref),is_integer(Idx) ->
addGrowableCol(This,Idx, []).
-%% @spec (This::wxFlexGridSizer(), Idx::integer(), [Option]) -> ok
-%% Option = {proportion, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizeraddgrowablecol">external documentation</a>.
+-spec addGrowableCol(This, Idx, [Option]) -> ok when
+ This::wxFlexGridSizer(), Idx::integer(),
+ Option :: {proportion, integer()}.
addGrowableCol(#wx_ref{type=ThisT,ref=ThisRef},Idx, Options)
when is_integer(Idx),is_list(Options) ->
?CLASS(ThisT,wxFlexGridSizer),
@@ -93,15 +103,18 @@ addGrowableCol(#wx_ref{type=ThisT,ref=ThisRef},Idx, Options)
wxe_util:cast(?wxFlexGridSizer_AddGrowableCol,
<<ThisRef:32/?UI,Idx:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxFlexGridSizer(), Idx::integer()) -> ok
%% @equiv addGrowableRow(This,Idx, [])
+-spec addGrowableRow(This, Idx) -> ok when
+ This::wxFlexGridSizer(), Idx::integer().
+
addGrowableRow(This,Idx)
when is_record(This, wx_ref),is_integer(Idx) ->
addGrowableRow(This,Idx, []).
-%% @spec (This::wxFlexGridSizer(), Idx::integer(), [Option]) -> ok
-%% Option = {proportion, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizeraddgrowablerow">external documentation</a>.
+-spec addGrowableRow(This, Idx, [Option]) -> ok when
+ This::wxFlexGridSizer(), Idx::integer(),
+ Option :: {proportion, integer()}.
addGrowableRow(#wx_ref{type=ThisT,ref=ThisRef},Idx, Options)
when is_integer(Idx),is_list(Options) ->
?CLASS(ThisT,wxFlexGridSizer),
@@ -111,58 +124,62 @@ addGrowableRow(#wx_ref{type=ThisT,ref=ThisRef},Idx, Options)
wxe_util:cast(?wxFlexGridSizer_AddGrowableRow,
<<ThisRef:32/?UI,Idx:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxFlexGridSizer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizergetflexibledirection">external documentation</a>.
+-spec getFlexibleDirection(This) -> integer() when
+ This::wxFlexGridSizer().
getFlexibleDirection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFlexGridSizer),
wxe_util:call(?wxFlexGridSizer_GetFlexibleDirection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFlexGridSizer()) -> WxFlexSizerGrowMode
-%% WxFlexSizerGrowMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizergetnonflexiblegrowmode">external documentation</a>.
-%%<br /> WxFlexSizerGrowMode is one of ?wxFLEX_GROWMODE_NONE | ?wxFLEX_GROWMODE_SPECIFIED | ?wxFLEX_GROWMODE_ALL
+%%<br /> Res = ?wxFLEX_GROWMODE_NONE | ?wxFLEX_GROWMODE_SPECIFIED | ?wxFLEX_GROWMODE_ALL
+-spec getNonFlexibleGrowMode(This) -> wx:wx_enum() when
+ This::wxFlexGridSizer().
getNonFlexibleGrowMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFlexGridSizer),
wxe_util:call(?wxFlexGridSizer_GetNonFlexibleGrowMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFlexGridSizer(), Idx::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizerremovegrowablecol">external documentation</a>.
+-spec removeGrowableCol(This, Idx) -> ok when
+ This::wxFlexGridSizer(), Idx::integer().
removeGrowableCol(#wx_ref{type=ThisT,ref=ThisRef},Idx)
when is_integer(Idx) ->
?CLASS(ThisT,wxFlexGridSizer),
wxe_util:cast(?wxFlexGridSizer_RemoveGrowableCol,
<<ThisRef:32/?UI,Idx:32/?UI>>).
-%% @spec (This::wxFlexGridSizer(), Idx::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizerremovegrowablerow">external documentation</a>.
+-spec removeGrowableRow(This, Idx) -> ok when
+ This::wxFlexGridSizer(), Idx::integer().
removeGrowableRow(#wx_ref{type=ThisT,ref=ThisRef},Idx)
when is_integer(Idx) ->
?CLASS(ThisT,wxFlexGridSizer),
wxe_util:cast(?wxFlexGridSizer_RemoveGrowableRow,
<<ThisRef:32/?UI,Idx:32/?UI>>).
-%% @spec (This::wxFlexGridSizer(), Direction::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizersetflexibledirection">external documentation</a>.
+-spec setFlexibleDirection(This, Direction) -> ok when
+ This::wxFlexGridSizer(), Direction::integer().
setFlexibleDirection(#wx_ref{type=ThisT,ref=ThisRef},Direction)
when is_integer(Direction) ->
?CLASS(ThisT,wxFlexGridSizer),
wxe_util:cast(?wxFlexGridSizer_SetFlexibleDirection,
<<ThisRef:32/?UI,Direction:32/?UI>>).
-%% @spec (This::wxFlexGridSizer(), Mode::WxFlexSizerGrowMode) -> ok
-%% WxFlexSizerGrowMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxflexgridsizer.html#wxflexgridsizersetnonflexiblegrowmode">external documentation</a>.
-%%<br /> WxFlexSizerGrowMode is one of ?wxFLEX_GROWMODE_NONE | ?wxFLEX_GROWMODE_SPECIFIED | ?wxFLEX_GROWMODE_ALL
+%%<br /> Mode = ?wxFLEX_GROWMODE_NONE | ?wxFLEX_GROWMODE_SPECIFIED | ?wxFLEX_GROWMODE_ALL
+-spec setNonFlexibleGrowMode(This, Mode) -> ok when
+ This::wxFlexGridSizer(), Mode::wx:wx_enum().
setNonFlexibleGrowMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
?CLASS(ThisT,wxFlexGridSizer),
wxe_util:cast(?wxFlexGridSizer_SetNonFlexibleGrowMode,
<<ThisRef:32/?UI,Mode:32/?UI>>).
-%% @spec (This::wxFlexGridSizer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFlexGridSizer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFlexGridSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFocusEvent.erl b/lib/wx/src/gen/wxFocusEvent.erl
index 46f2e2a3df..d6478c1142 100644
--- a/lib/wx/src/gen/wxFocusEvent.erl
+++ b/lib/wx/src/gen/wxFocusEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,12 +37,15 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxFocusEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxFocusEvent()) -> wxWindow:wxWindow()
+-type wxFocusEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfocusevent.html#wxfocuseventgetwindow">external documentation</a>.
+-spec getWindow(This) -> wxWindow:wxWindow() when
+ This::wxFocusEvent().
getWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFocusEvent),
wxe_util:call(?wxFocusEvent_GetWindow,
diff --git a/lib/wx/src/gen/wxFont.erl b/lib/wx/src/gen/wxFont.erl
index 4afc53cfa8..a168e15180 100644
--- a/lib/wx/src/gen/wxFont.erl
+++ b/lib/wx/src/gen/wxFont.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,38 +33,43 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxFont/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFont()
+-type wxFont() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontwxfont">external documentation</a>.
+-spec new() -> wxFont().
new() ->
wxe_util:construct(?wxFont_new_0,
<<>>).
-%% @spec (Fontname::string()) -> wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontwxfont">external documentation</a>.
+-spec new(Fontname) -> wxFont() when
+ Fontname::unicode:chardata().
new(Fontname)
when is_list(Fontname) ->
Fontname_UC = unicode:characters_to_binary([Fontname,0]),
wxe_util:construct(?wxFont_new_1,
<<(byte_size(Fontname_UC)):32/?UI,(Fontname_UC)/binary, 0:(((8- ((4+byte_size(Fontname_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (Size::integer(), Family::WxFontFamily, Style::WxFontStyle, Weight::integer()) -> wxFont()
%% @equiv new(Size,Family,Style,Weight, [])
+-spec new(Size, Family, Style, Weight) -> wxFont() when
+ Size::integer(), Family::wx:wx_enum(), Style::wx:wx_enum(), Weight::integer().
+
new(Size,Family,Style,Weight)
when is_integer(Size),is_integer(Family),is_integer(Style),is_integer(Weight) ->
new(Size,Family,Style,Weight, []).
-%% @spec (Size::integer(), Family::WxFontFamily, Style::WxFontStyle, Weight::integer(), [Option]) -> wxFont()
-%% Option = {underlined, bool()} | {face, string()} | {encoding, WxFontEncoding}
-%% WxFontFamily = integer()
-%% WxFontStyle = integer()
-%% WxFontEncoding = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontwxfont">external documentation</a>.
-%%<br /> WxFontFamily is one of ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
-%%<br /> WxFontStyle is one of ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
-%%<br /> WxFontEncoding is one of ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+%%<br /> Encoding = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+%%<br /> Family = ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
+%%<br /> Style = ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
+-spec new(Size, Family, Style, Weight, [Option]) -> wxFont() when
+ Size::integer(), Family::wx:wx_enum(), Style::wx:wx_enum(), Weight::integer(),
+ Option :: {underlined, boolean()}
+ | {face, unicode:chardata()}
+ | {encoding, wx:wx_enum()}.
new(Size,Family,Style,Weight, Options)
when is_integer(Size),is_integer(Family),is_integer(Style),is_integer(Weight),is_list(Options) ->
MOpts = fun({underlined, Underlined}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Underlined)):32/?UI>>|Acc];
@@ -75,99 +80,107 @@ new(Size,Family,Style,Weight, Options)
wxe_util:construct(?wxFont_new_5,
<<Size:32/?UI,Family:32/?UI,Style:32/?UI,Weight:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxFont()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontisfixedwidth">external documentation</a>.
+-spec isFixedWidth(This) -> boolean() when
+ This::wxFont().
isFixedWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_IsFixedWidth,
<<ThisRef:32/?UI>>).
-%% @spec () -> WxFontEncoding
-%% WxFontEncoding = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetdefaultencoding">external documentation</a>.
-%%<br /> WxFontEncoding is one of ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+%%<br /> Res = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+-spec getDefaultEncoding() -> wx:wx_enum().
getDefaultEncoding() ->
wxe_util:call(?wxFont_GetDefaultEncoding,
<<>>).
-%% @spec (This::wxFont()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetfacename">external documentation</a>.
+-spec getFaceName(This) -> unicode:charlist() when
+ This::wxFont().
getFaceName(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_GetFaceName,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFont()) -> WxFontFamily
-%% WxFontFamily = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetfamily">external documentation</a>.
-%%<br /> WxFontFamily is one of ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
+%%<br /> Res = ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
+-spec getFamily(This) -> wx:wx_enum() when
+ This::wxFont().
getFamily(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_GetFamily,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFont()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetnativefontinfodesc">external documentation</a>.
+-spec getNativeFontInfoDesc(This) -> unicode:charlist() when
+ This::wxFont().
getNativeFontInfoDesc(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_GetNativeFontInfoDesc,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFont()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetnativefontinfouserdesc">external documentation</a>.
+-spec getNativeFontInfoUserDesc(This) -> unicode:charlist() when
+ This::wxFont().
getNativeFontInfoUserDesc(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_GetNativeFontInfoUserDesc,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFont()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetpointsize">external documentation</a>.
+-spec getPointSize(This) -> integer() when
+ This::wxFont().
getPointSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_GetPointSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFont()) -> WxFontStyle
-%% WxFontStyle = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetstyle">external documentation</a>.
-%%<br /> WxFontStyle is one of ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
+%%<br /> Res = ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
+-spec getStyle(This) -> wx:wx_enum() when
+ This::wxFont().
getStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_GetStyle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFont()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetunderlined">external documentation</a>.
+-spec getUnderlined(This) -> boolean() when
+ This::wxFont().
getUnderlined(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_GetUnderlined,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFont()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetweight">external documentation</a>.
+-spec getWeight(This) -> integer() when
+ This::wxFont().
getWeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_GetWeight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFont()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontok">external documentation</a>.
+-spec ok(This) -> boolean() when
+ This::wxFont().
ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFont),
wxe_util:call(?wxFont_Ok,
<<ThisRef:32/?UI>>).
-%% @spec (Encoding::WxFontEncoding) -> ok
-%% WxFontEncoding = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetdefaultencoding">external documentation</a>.
-%%<br /> WxFontEncoding is one of ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+%%<br /> Encoding = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+-spec setDefaultEncoding(Encoding) -> ok when
+ Encoding::wx:wx_enum().
setDefaultEncoding(Encoding)
when is_integer(Encoding) ->
wxe_util:cast(?wxFont_SetDefaultEncoding,
<<Encoding:32/?UI>>).
-%% @spec (This::wxFont(), FaceName::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetfacename">external documentation</a>.
+-spec setFaceName(This, FaceName) -> boolean() when
+ This::wxFont(), FaceName::unicode:chardata().
setFaceName(#wx_ref{type=ThisT,ref=ThisRef},FaceName)
when is_list(FaceName) ->
?CLASS(ThisT,wxFont),
@@ -175,52 +188,55 @@ setFaceName(#wx_ref{type=ThisT,ref=ThisRef},FaceName)
wxe_util:call(?wxFont_SetFaceName,
<<ThisRef:32/?UI,(byte_size(FaceName_UC)):32/?UI,(FaceName_UC)/binary, 0:(((8- ((0+byte_size(FaceName_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxFont(), Family::WxFontFamily) -> ok
-%% WxFontFamily = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetfamily">external documentation</a>.
-%%<br /> WxFontFamily is one of ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
+%%<br /> Family = ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
+-spec setFamily(This, Family) -> ok when
+ This::wxFont(), Family::wx:wx_enum().
setFamily(#wx_ref{type=ThisT,ref=ThisRef},Family)
when is_integer(Family) ->
?CLASS(ThisT,wxFont),
wxe_util:cast(?wxFont_SetFamily,
<<ThisRef:32/?UI,Family:32/?UI>>).
-%% @spec (This::wxFont(), PointSize::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetpointsize">external documentation</a>.
+-spec setPointSize(This, PointSize) -> ok when
+ This::wxFont(), PointSize::integer().
setPointSize(#wx_ref{type=ThisT,ref=ThisRef},PointSize)
when is_integer(PointSize) ->
?CLASS(ThisT,wxFont),
wxe_util:cast(?wxFont_SetPointSize,
<<ThisRef:32/?UI,PointSize:32/?UI>>).
-%% @spec (This::wxFont(), Style::WxFontStyle) -> ok
-%% WxFontStyle = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetstyle">external documentation</a>.
-%%<br /> WxFontStyle is one of ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
+%%<br /> Style = ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
+-spec setStyle(This, Style) -> ok when
+ This::wxFont(), Style::wx:wx_enum().
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
?CLASS(ThisT,wxFont),
wxe_util:cast(?wxFont_SetStyle,
<<ThisRef:32/?UI,Style:32/?UI>>).
-%% @spec (This::wxFont(), Underlined::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetunderlined">external documentation</a>.
+-spec setUnderlined(This, Underlined) -> ok when
+ This::wxFont(), Underlined::boolean().
setUnderlined(#wx_ref{type=ThisT,ref=ThisRef},Underlined)
when is_boolean(Underlined) ->
?CLASS(ThisT,wxFont),
wxe_util:cast(?wxFont_SetUnderlined,
<<ThisRef:32/?UI,(wxe_util:from_bool(Underlined)):32/?UI>>).
-%% @spec (This::wxFont(), Weight::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetweight">external documentation</a>.
+-spec setWeight(This, Weight) -> ok when
+ This::wxFont(), Weight::integer().
setWeight(#wx_ref{type=ThisT,ref=ThisRef},Weight)
when is_integer(Weight) ->
?CLASS(ThisT,wxFont),
wxe_util:cast(?wxFont_SetWeight,
<<ThisRef:32/?UI,Weight:32/?UI>>).
-%% @spec (This::wxFont()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFont()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFont),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFontData.erl b/lib/wx/src/gen/wxFontData.erl
index 33015b7ca9..978d27b391 100644
--- a/lib/wx/src/gen/wxFontData.erl
+++ b/lib/wx/src/gen/wxFontData.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,122 +31,138 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxFontData/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFontData()
+-type wxFontData() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatawxfontdata">external documentation</a>.
+-spec new() -> wxFontData().
new() ->
wxe_util:construct(?wxFontData_new_0,
<<>>).
-%% @spec (Data::wxFontData()) -> wxFontData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatawxfontdata">external documentation</a>.
+-spec new(Data) -> wxFontData() when
+ Data::wxFontData().
new(#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(DataT,wxFontData),
wxe_util:construct(?wxFontData_new_1,
<<DataRef:32/?UI>>).
-%% @spec (This::wxFontData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdataenableeffects">external documentation</a>.
+-spec enableEffects(This, Flag) -> ok when
+ This::wxFontData(), Flag::boolean().
enableEffects(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxFontData),
wxe_util:cast(?wxFontData_EnableEffects,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxFontData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatagetallowsymbols">external documentation</a>.
+-spec getAllowSymbols(This) -> boolean() when
+ This::wxFontData().
getAllowSymbols(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontData),
wxe_util:call(?wxFontData_GetAllowSymbols,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontData()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatagetcolour">external documentation</a>.
+-spec getColour(This) -> wx:wx_colour4() when
+ This::wxFontData().
getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontData),
wxe_util:call(?wxFontData_GetColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontData()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatagetchosenfont">external documentation</a>.
+-spec getChosenFont(This) -> wxFont:wxFont() when
+ This::wxFontData().
getChosenFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontData),
wxe_util:call(?wxFontData_GetChosenFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatagetenableeffects">external documentation</a>.
+-spec getEnableEffects(This) -> boolean() when
+ This::wxFontData().
getEnableEffects(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontData),
wxe_util:call(?wxFontData_GetEnableEffects,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontData()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatagetinitialfont">external documentation</a>.
+-spec getInitialFont(This) -> wxFont:wxFont() when
+ This::wxFontData().
getInitialFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontData),
wxe_util:call(?wxFontData_GetInitialFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatagetshowhelp">external documentation</a>.
+-spec getShowHelp(This) -> boolean() when
+ This::wxFontData().
getShowHelp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontData),
wxe_util:call(?wxFontData_GetShowHelp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatasetallowsymbols">external documentation</a>.
+-spec setAllowSymbols(This, Flag) -> ok when
+ This::wxFontData(), Flag::boolean().
setAllowSymbols(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxFontData),
wxe_util:cast(?wxFontData_SetAllowSymbols,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxFontData(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatasetchosenfont">external documentation</a>.
+-spec setChosenFont(This, Font) -> ok when
+ This::wxFontData(), Font::wxFont:wxFont().
setChosenFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxFontData),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxFontData_SetChosenFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxFontData(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatasetcolour">external documentation</a>.
+-spec setColour(This, Colour) -> ok when
+ This::wxFontData(), Colour::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxFontData),
wxe_util:cast(?wxFontData_SetColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxFontData(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatasetinitialfont">external documentation</a>.
+-spec setInitialFont(This, Font) -> ok when
+ This::wxFontData(), Font::wxFont:wxFont().
setInitialFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxFontData),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxFontData_SetInitialFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxFontData(), MinRange::integer(), MaxRange::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatasetrange">external documentation</a>.
+-spec setRange(This, MinRange, MaxRange) -> ok when
+ This::wxFontData(), MinRange::integer(), MaxRange::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},MinRange,MaxRange)
when is_integer(MinRange),is_integer(MaxRange) ->
?CLASS(ThisT,wxFontData),
wxe_util:cast(?wxFontData_SetRange,
<<ThisRef:32/?UI,MinRange:32/?UI,MaxRange:32/?UI>>).
-%% @spec (This::wxFontData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdata.html#wxfontdatasetshowhelp">external documentation</a>.
+-spec setShowHelp(This, Flag) -> ok when
+ This::wxFontData(), Flag::boolean().
setShowHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxFontData),
wxe_util:cast(?wxFontData_SetShowHelp,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxFontData()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFontData()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFontData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFontDialog.erl b/lib/wx/src/gen/wxFontDialog.erl
index 357bfe532d..6cc210a4aa 100644
--- a/lib/wx/src/gen/wxFontDialog.erl
+++ b/lib/wx/src/gen/wxFontDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxFontDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,22 +85,25 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFontDialog()
+-type wxFontDialog() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdialog.html#wxfontdialogwxfontdialog">external documentation</a>.
+-spec new() -> wxFontDialog().
new() ->
wxe_util:construct(?wxFontDialog_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Data::wxFontData:wxFontData()) -> wxFontDialog()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdialog.html#wxfontdialogwxfontdialog">external documentation</a>.
+-spec new(Parent, Data) -> wxFontDialog() when
+ Parent::wxWindow:wxWindow(), Data::wxFontData:wxFontData().
new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(ParentT,wxWindow),
?CLASS(DataT,wxFontData),
wxe_util:construct(?wxFontDialog_new_2,
<<ParentRef:32/?UI,DataRef:32/?UI>>).
-%% @spec (This::wxFontDialog(), Parent::wxWindow:wxWindow(), Data::wxFontData:wxFontData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdialog.html#wxfontdialogcreate">external documentation</a>.
+-spec create(This, Parent, Data) -> boolean() when
+ This::wxFontDialog(), Parent::wxWindow:wxWindow(), Data::wxFontData:wxFontData().
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(ThisT,wxFontDialog),
?CLASS(ParentT,wxWindow),
@@ -107,15 +111,16 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_r
wxe_util:call(?wxFontDialog_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,DataRef:32/?UI>>).
-%% @spec (This::wxFontDialog()) -> wxFontData:wxFontData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontdialog.html#wxfontdialoggetfontdata">external documentation</a>.
+-spec getFontData(This) -> wxFontData:wxFontData() when
+ This::wxFontDialog().
getFontData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontDialog),
wxe_util:call(?wxFontDialog_GetFontData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFontDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFontDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFontPickerCtrl.erl b/lib/wx/src/gen/wxFontPickerCtrl.erl
index 3050011b60..46c0dbab4d 100644
--- a/lib/wx/src/gen/wxFontPickerCtrl.erl
+++ b/lib/wx/src/gen/wxFontPickerCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -75,6 +75,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxFontPickerCtrl/0]).
%% @hidden
parent_class(wxPickerBase) -> true;
parent_class(wxControl) -> true;
@@ -82,21 +83,29 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFontPickerCtrl()
+-type wxFontPickerCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontpickerctrl.html#wxfontpickerctrlwxfontpickerctrl">external documentation</a>.
+-spec new() -> wxFontPickerCtrl().
new() ->
wxe_util:construct(?wxFontPickerCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxFontPickerCtrl()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxFontPickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxFontPickerCtrl()
-%% Option = {initial, wxFont:wxFont()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontpickerctrl.html#wxfontpickerctrlwxfontpickerctrl">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxFontPickerCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {initial, wxFont:wxFont()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -110,15 +119,22 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxFontPickerCtrl_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxFontPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxFontPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxFontPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {initial, wxFont:wxFont()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontpickerctrl.html#wxfontpickerctrlcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxFontPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {initial, wxFont:wxFont()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxFontPickerCtrl),
@@ -133,38 +149,42 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxFontPickerCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxFontPickerCtrl()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontpickerctrl.html#wxfontpickerctrlgetselectedfont">external documentation</a>.
+-spec getSelectedFont(This) -> wxFont:wxFont() when
+ This::wxFontPickerCtrl().
getSelectedFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontPickerCtrl),
wxe_util:call(?wxFontPickerCtrl_GetSelectedFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontPickerCtrl(), F::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontpickerctrl.html#wxfontpickerctrlsetselectedfont">external documentation</a>.
+-spec setSelectedFont(This, F) -> ok when
+ This::wxFontPickerCtrl(), F::wxFont:wxFont().
setSelectedFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FT,ref=FRef}) ->
?CLASS(ThisT,wxFontPickerCtrl),
?CLASS(FT,wxFont),
wxe_util:cast(?wxFontPickerCtrl_SetSelectedFont,
<<ThisRef:32/?UI,FRef:32/?UI>>).
-%% @spec (This::wxFontPickerCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontpickerctrl.html#wxfontpickerctrlgetmaxpointsize">external documentation</a>.
+-spec getMaxPointSize(This) -> integer() when
+ This::wxFontPickerCtrl().
getMaxPointSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontPickerCtrl),
wxe_util:call(?wxFontPickerCtrl_GetMaxPointSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFontPickerCtrl(), Max::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontpickerctrl.html#wxfontpickerctrlsetmaxpointsize">external documentation</a>.
+-spec setMaxPointSize(This, Max) -> ok when
+ This::wxFontPickerCtrl(), Max::integer().
setMaxPointSize(#wx_ref{type=ThisT,ref=ThisRef},Max)
when is_integer(Max) ->
?CLASS(ThisT,wxFontPickerCtrl),
wxe_util:cast(?wxFontPickerCtrl_SetMaxPointSize,
<<ThisRef:32/?UI,Max:32/?UI>>).
-%% @spec (This::wxFontPickerCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFontPickerCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFontPickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFontPickerEvent.erl b/lib/wx/src/gen/wxFontPickerEvent.erl
index 6eb456767f..2dc3606409 100644
--- a/lib/wx/src/gen/wxFontPickerEvent.erl
+++ b/lib/wx/src/gen/wxFontPickerEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,13 +40,16 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxFontPickerEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxFontPickerEvent()) -> wxFont:wxFont()
+-type wxFontPickerEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfontpickerevent.html#wxfontpickereventgetfont">external documentation</a>.
+-spec getFont(This) -> wxFont:wxFont() when
+ This::wxFontPickerEvent().
getFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFontPickerEvent),
wxe_util:call(?wxFontPickerEvent_GetFont,
diff --git a/lib/wx/src/gen/wxFrame.erl b/lib/wx/src/gen/wxFrame.erl
index 7e25bc8762..61f46f7a07 100644
--- a/lib/wx/src/gen/wxFrame.erl
+++ b/lib/wx/src/gen/wxFrame.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -78,27 +78,34 @@
showFullScreen/3,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxFrame/0]).
%% @hidden
parent_class(wxTopLevelWindow) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxFrame()
+-type wxFrame() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframewxframe">external documentation</a>.
+-spec new() -> wxFrame().
new() ->
wxe_util:construct(?wxFrame_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string()) -> wxFrame()
%% @equiv new(Parent,Id,Title, [])
+-spec new(Parent, Id, Title) -> wxFrame() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata().
+
new(Parent,Id,Title)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
new(Parent,Id,Title, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), [Option]) -> wxFrame()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframewxframe">external documentation</a>.
+-spec new(Parent, Id, Title, [Option]) -> wxFrame() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -111,15 +118,20 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
wxe_util:construct(?wxFrame_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string()) -> bool()
%% @equiv create(This,Parent,Id,Title, [])
+-spec create(This, Parent, Id, Title) -> boolean() when
+ This::wxFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata().
+
create(This,Parent,Id,Title)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
create(This,Parent,Id,Title, []).
-%% @spec (This::wxFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframecreate">external documentation</a>.
+-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
+ This::wxFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxFrame),
@@ -133,15 +145,20 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ti
wxe_util:call(?wxFrame_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxFrame()) -> wxStatusBar:wxStatusBar()
%% @equiv createStatusBar(This, [])
+-spec createStatusBar(This) -> wxStatusBar:wxStatusBar() when
+ This::wxFrame().
+
createStatusBar(This)
when is_record(This, wx_ref) ->
createStatusBar(This, []).
-%% @spec (This::wxFrame(), [Option]) -> wxStatusBar:wxStatusBar()
-%% Option = {number, integer()} | {style, integer()} | {id, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframecreatestatusbar">external documentation</a>.
+-spec createStatusBar(This, [Option]) -> wxStatusBar:wxStatusBar() when
+ This::wxFrame(),
+ Option :: {number, integer()}
+ | {style, integer()}
+ | {id, integer()}.
createStatusBar(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxFrame),
@@ -153,15 +170,19 @@ createStatusBar(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxFrame_CreateStatusBar,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxFrame()) -> wxToolBar:wxToolBar()
%% @equiv createToolBar(This, [])
+-spec createToolBar(This) -> wxToolBar:wxToolBar() when
+ This::wxFrame().
+
createToolBar(This)
when is_record(This, wx_ref) ->
createToolBar(This, []).
-%% @spec (This::wxFrame(), [Option]) -> wxToolBar:wxToolBar()
-%% Option = {style, integer()} | {id, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframecreatetoolbar">external documentation</a>.
+-spec createToolBar(This, [Option]) -> wxToolBar:wxToolBar() when
+ This::wxFrame(),
+ Option :: {style, integer()}
+ | {id, integer()}.
createToolBar(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxFrame),
@@ -172,89 +193,102 @@ createToolBar(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxFrame_CreateToolBar,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxFrame()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframegetclientareaorigin">external documentation</a>.
+-spec getClientAreaOrigin(This) -> {X::integer(), Y::integer()} when
+ This::wxFrame().
getClientAreaOrigin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFrame),
wxe_util:call(?wxFrame_GetClientAreaOrigin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFrame()) -> wxMenuBar:wxMenuBar()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframegetmenubar">external documentation</a>.
+-spec getMenuBar(This) -> wxMenuBar:wxMenuBar() when
+ This::wxFrame().
getMenuBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFrame),
wxe_util:call(?wxFrame_GetMenuBar,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFrame()) -> wxStatusBar:wxStatusBar()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframegetstatusbar">external documentation</a>.
+-spec getStatusBar(This) -> wxStatusBar:wxStatusBar() when
+ This::wxFrame().
getStatusBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFrame),
wxe_util:call(?wxFrame_GetStatusBar,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFrame()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframegetstatusbarpane">external documentation</a>.
+-spec getStatusBarPane(This) -> integer() when
+ This::wxFrame().
getStatusBarPane(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFrame),
wxe_util:call(?wxFrame_GetStatusBarPane,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFrame()) -> wxToolBar:wxToolBar()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframegettoolbar">external documentation</a>.
+-spec getToolBar(This) -> wxToolBar:wxToolBar() when
+ This::wxFrame().
getToolBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFrame),
wxe_util:call(?wxFrame_GetToolBar,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFrame(), Winid::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframeprocesscommand">external documentation</a>.
+-spec processCommand(This, Winid) -> boolean() when
+ This::wxFrame(), Winid::integer().
processCommand(#wx_ref{type=ThisT,ref=ThisRef},Winid)
when is_integer(Winid) ->
?CLASS(ThisT,wxFrame),
wxe_util:call(?wxFrame_ProcessCommand,
<<ThisRef:32/?UI,Winid:32/?UI>>).
-%% @spec (This::wxFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframesendsizeevent">external documentation</a>.
+-spec sendSizeEvent(This) -> ok when
+ This::wxFrame().
sendSizeEvent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFrame),
wxe_util:cast(?wxFrame_SendSizeEvent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxFrame(), Menubar::wxMenuBar:wxMenuBar()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframesetmenubar">external documentation</a>.
+-spec setMenuBar(This, Menubar) -> ok when
+ This::wxFrame(), Menubar::wxMenuBar:wxMenuBar().
setMenuBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenubarT,ref=MenubarRef}) ->
?CLASS(ThisT,wxFrame),
?CLASS(MenubarT,wxMenuBar),
wxe_util:cast(?wxFrame_SetMenuBar,
<<ThisRef:32/?UI,MenubarRef:32/?UI>>).
-%% @spec (This::wxFrame(), Statbar::wxStatusBar:wxStatusBar()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframesetstatusbar">external documentation</a>.
+-spec setStatusBar(This, Statbar) -> ok when
+ This::wxFrame(), Statbar::wxStatusBar:wxStatusBar().
setStatusBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StatbarT,ref=StatbarRef}) ->
?CLASS(ThisT,wxFrame),
?CLASS(StatbarT,wxStatusBar),
wxe_util:cast(?wxFrame_SetStatusBar,
<<ThisRef:32/?UI,StatbarRef:32/?UI>>).
-%% @spec (This::wxFrame(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframesetstatusbarpane">external documentation</a>.
+-spec setStatusBarPane(This, N) -> ok when
+ This::wxFrame(), N::integer().
setStatusBarPane(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxFrame),
wxe_util:cast(?wxFrame_SetStatusBarPane,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxFrame(), Text::string()) -> ok
%% @equiv setStatusText(This,Text, [])
+-spec setStatusText(This, Text) -> ok when
+ This::wxFrame(), Text::unicode:chardata().
+
setStatusText(This,Text)
when is_record(This, wx_ref),is_list(Text) ->
setStatusText(This,Text, []).
-%% @spec (This::wxFrame(), Text::string(), [Option]) -> ok
-%% Option = {number, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframesetstatustext">external documentation</a>.
+-spec setStatusText(This, Text, [Option]) -> ok when
+ This::wxFrame(), Text::unicode:chardata(),
+ Option :: {number, integer()}.
setStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxFrame),
@@ -265,8 +299,9 @@ setStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
wxe_util:cast(?wxFrame_SetStatusText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxFrame(), Widths_field::[integer()]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframesetstatuswidths">external documentation</a>.
+-spec setStatusWidths(This, Widths_field) -> ok when
+ This::wxFrame(), Widths_field::[integer()].
setStatusWidths(#wx_ref{type=ThisT,ref=ThisRef},Widths_field)
when is_list(Widths_field) ->
?CLASS(ThisT,wxFrame),
@@ -274,16 +309,17 @@ setStatusWidths(#wx_ref{type=ThisT,ref=ThisRef},Widths_field)
<<ThisRef:32/?UI,(length(Widths_field)):32/?UI,
(<< <<C:32/?I>> || C <- Widths_field>>)/binary, 0:(((0+length(Widths_field)) rem 2)*32)>>).
-%% @spec (This::wxFrame(), Toolbar::wxToolBar:wxToolBar()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxframe.html#wxframesettoolbar">external documentation</a>.
+-spec setToolBar(This, Toolbar) -> ok when
+ This::wxFrame(), Toolbar::wxToolBar:wxToolBar().
setToolBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ToolbarT,ref=ToolbarRef}) ->
?CLASS(ThisT,wxFrame),
?CLASS(ToolbarT,wxToolBar),
wxe_util:cast(?wxFrame_SetToolBar,
<<ThisRef:32/?UI,ToolbarRef:32/?UI>>).
-%% @spec (This::wxFrame()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxFrame()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGBSizerItem.erl b/lib/wx/src/gen/wxGBSizerItem.erl
index 90dd98fdf2..1860e5f808 100644
--- a/lib/wx/src/gen/wxGBSizerItem.erl
+++ b/lib/wx/src/gen/wxGBSizerItem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,10 +37,12 @@
setMinSize/2,setMinSize/3,setProportion/2,setRatio/2,setRatio/3,setSizer/2,
setSpacer/2,setSpacer/3,setWindow/2,show/2]).
+-export_type([wxGBSizerItem/0]).
%% @hidden
parent_class(wxSizerItem) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxGBSizerItem() :: wx:wx_object().
%% From wxSizerItem
%% @hidden
show(This,Show) -> wxSizerItem:show(This,Show).
diff --git a/lib/wx/src/gen/wxGLCanvas.erl b/lib/wx/src/gen/wxGLCanvas.erl
index a30d8cefd9..46168374af 100644
--- a/lib/wx/src/gen/wxGLCanvas.erl
+++ b/lib/wx/src/gen/wxGLCanvas.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -68,26 +68,44 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxGLCanvas/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxGLCanvas()
+-type wxGLCanvas() :: wx:wx_object().
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxGLCanvas() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(),X::term()) -> wxGLCanvas()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxglcanvas.html#wxglcanvaswxglcanvas">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Parent::wxWindow:wxWindow(), Shared::wxGLContext:wxGLContext() | wxGLCanvas()) -> new(Parent,Shared, []) </c></p>
-%% <p><c>
-%% new(Parent::wxWindow:wxWindow(), [Option]) -> wxGLCanvas() </c>
-%%<br /> Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {name, string()} | {attribList, [integer()]} | {palette, wxPalette:wxPalette()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Parent, [Option]) -> wxGLCanvas() when<br />
+%% Parent::wxWindow:wxWindow(),<br />
+%% Option :: {id, integer()}<br />
+%% | {pos, {X::integer(), Y::integer()}}<br />
+%% | {size, {W::integer(), H::integer()}}<br />
+%% | {style, integer()}<br />
+%% | {name, unicode:chardata()}<br />
+%% | {attribList, [integer()]}<br />
+%% | {palette, wxPalette:wxPalette()}.<br />
+%%
+-spec new(Parent, Shared) -> wxGLCanvas() when
+ Parent::wxWindow:wxWindow(), Shared::wx:wx_object() | wxGLCanvas();
+ (Parent, [Option]) -> wxGLCanvas() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {name, unicode:chardata()}
+ | {attribList, [integer()]}
+ | {palette, wxPalette:wxPalette()}.
new(Parent,Shared)
when is_record(Parent, wx_ref),is_record(Shared, wx_ref) ->
@@ -108,9 +126,16 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxGLCanvas_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (Parent::wxWindow:wxWindow(), Shared::wxGLContext:wxGLContext() | wxGLCanvas(), [Option]) -> wxGLCanvas()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {name, string()} | {attribList, [integer()]} | {palette, wxPalette:wxPalette()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxglcanvas.html#wxglcanvaswxglcanvas">external documentation</a>.
+-spec new(Parent, Shared, [Option]) -> wxGLCanvas() when
+ Parent::wxWindow:wxWindow(), Shared::wx:wx_object() | wxGLCanvas(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {name, unicode:chardata()}
+ | {attribList, [integer()]}
+ | {palette, wxPalette:wxPalette()}.
new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=SharedT,ref=SharedRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -133,15 +158,17 @@ new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=SharedT,ref=SharedRef}, Opt
wxe_util:construct(SharedOP,
<<ParentRef:32/?UI,SharedRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGLCanvas()) -> wxGLContext:wxGLContext()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxglcanvas.html#wxglcanvasgetcontext">external documentation</a>.
+-spec getContext(This) -> wx:wx_object() when
+ This::wxGLCanvas().
getContext(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGLCanvas),
wxe_util:call(?wxGLCanvas_GetContext,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGLCanvas()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxglcanvas.html#wxglcanvassetcurrent">external documentation</a>.
+-spec setCurrent(This) -> ok when
+ This::wxGLCanvas().
setCurrent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGLCanvas),
_Result = wxe_util:cast(?wxGLCanvas_SetCurrent,
@@ -149,15 +176,16 @@ setCurrent(#wx_ref{type=ThisT,ref=ThisRef}) ->
{ok, _} = wxe_master:init_opengl(),
_Result.
-%% @spec (This::wxGLCanvas()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxglcanvas.html#wxglcanvasswapbuffers">external documentation</a>.
+-spec swapBuffers(This) -> ok when
+ This::wxGLCanvas().
swapBuffers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGLCanvas),
wxe_util:cast(?wxGLCanvas_SwapBuffers,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGLCanvas()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGLCanvas()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGLCanvas),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGauge.erl b/lib/wx/src/gen/wxGauge.erl
index 484fd36936..7f892355c7 100644
--- a/lib/wx/src/gen/wxGauge.erl
+++ b/lib/wx/src/gen/wxGauge.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,27 +71,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxGauge/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGauge()
+-type wxGauge() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugewxgauge">external documentation</a>.
+-spec new() -> wxGauge().
new() ->
wxe_util:construct(?wxGauge_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Range::integer()) -> wxGauge()
%% @equiv new(Parent,Id,Range, [])
+-spec new(Parent, Id, Range) -> wxGauge() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Range::integer().
+
new(Parent,Id,Range)
when is_record(Parent, wx_ref),is_integer(Id),is_integer(Range) ->
new(Parent,Id,Range, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Range::integer(), [Option]) -> wxGauge()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugewxgauge">external documentation</a>.
+-spec new(Parent, Id, Range, [Option]) -> wxGauge() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Range::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Range, Options)
when is_integer(Id),is_integer(Range),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -104,15 +112,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Range, Options)
wxe_util:construct(?wxGauge_new_4,
<<ParentRef:32/?UI,Id:32/?UI,Range:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGauge(), Parent::wxWindow:wxWindow(), Id::integer(), Range::integer()) -> bool()
%% @equiv create(This,Parent,Id,Range, [])
+-spec create(This, Parent, Id, Range) -> boolean() when
+ This::wxGauge(), Parent::wxWindow:wxWindow(), Id::integer(), Range::integer().
+
create(This,Parent,Id,Range)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_integer(Range) ->
create(This,Parent,Id,Range, []).
-%% @spec (This::wxGauge(), Parent::wxWindow:wxWindow(), Id::integer(), Range::integer(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugecreate">external documentation</a>.
+-spec create(This, Parent, Id, Range, [Option]) -> boolean() when
+ This::wxGauge(), Parent::wxWindow:wxWindow(), Id::integer(), Range::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Range, Options)
when is_integer(Id),is_integer(Range),is_list(Options) ->
?CLASS(ThisT,wxGauge),
@@ -126,82 +140,92 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ra
wxe_util:call(?wxGauge_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,Range:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGauge()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugegetbezelface">external documentation</a>.
+-spec getBezelFace(This) -> integer() when
+ This::wxGauge().
getBezelFace(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGauge),
wxe_util:call(?wxGauge_GetBezelFace,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGauge()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugegetrange">external documentation</a>.
+-spec getRange(This) -> integer() when
+ This::wxGauge().
getRange(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGauge),
wxe_util:call(?wxGauge_GetRange,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGauge()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugegetshadowwidth">external documentation</a>.
+-spec getShadowWidth(This) -> integer() when
+ This::wxGauge().
getShadowWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGauge),
wxe_util:call(?wxGauge_GetShadowWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGauge()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugegetvalue">external documentation</a>.
+-spec getValue(This) -> integer() when
+ This::wxGauge().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGauge),
wxe_util:call(?wxGauge_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGauge()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugeisvertical">external documentation</a>.
+-spec isVertical(This) -> boolean() when
+ This::wxGauge().
isVertical(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGauge),
wxe_util:call(?wxGauge_IsVertical,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGauge(), W::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugesetbezelface">external documentation</a>.
+-spec setBezelFace(This, W) -> ok when
+ This::wxGauge(), W::integer().
setBezelFace(#wx_ref{type=ThisT,ref=ThisRef},W)
when is_integer(W) ->
?CLASS(ThisT,wxGauge),
wxe_util:cast(?wxGauge_SetBezelFace,
<<ThisRef:32/?UI,W:32/?UI>>).
-%% @spec (This::wxGauge(), R::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugesetrange">external documentation</a>.
+-spec setRange(This, R) -> ok when
+ This::wxGauge(), R::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},R)
when is_integer(R) ->
?CLASS(ThisT,wxGauge),
wxe_util:cast(?wxGauge_SetRange,
<<ThisRef:32/?UI,R:32/?UI>>).
-%% @spec (This::wxGauge(), W::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugesetshadowwidth">external documentation</a>.
+-spec setShadowWidth(This, W) -> ok when
+ This::wxGauge(), W::integer().
setShadowWidth(#wx_ref{type=ThisT,ref=ThisRef},W)
when is_integer(W) ->
?CLASS(ThisT,wxGauge),
wxe_util:cast(?wxGauge_SetShadowWidth,
<<ThisRef:32/?UI,W:32/?UI>>).
-%% @spec (This::wxGauge(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugesetvalue">external documentation</a>.
+-spec setValue(This, Pos) -> ok when
+ This::wxGauge(), Pos::integer().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxGauge),
wxe_util:cast(?wxGauge_SetValue,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxGauge()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgauge.html#wxgaugepulse">external documentation</a>.
+-spec pulse(This) -> ok when
+ This::wxGauge().
pulse(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGauge),
wxe_util:cast(?wxGauge_Pulse,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGauge()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGauge()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGauge),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGenericDirCtrl.erl b/lib/wx/src/gen/wxGenericDirCtrl.erl
index 626a454d2a..cb917e8fd1 100644
--- a/lib/wx/src/gen/wxGenericDirCtrl.erl
+++ b/lib/wx/src/gen/wxGenericDirCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,27 +72,38 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxGenericDirCtrl/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGenericDirCtrl()
+-type wxGenericDirCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlwxgenericdirctrl">external documentation</a>.
+-spec new() -> wxGenericDirCtrl().
new() ->
wxe_util:construct(?wxGenericDirCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxGenericDirCtrl()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxGenericDirCtrl() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxGenericDirCtrl()
-%% Option = {id, integer()} | {dir, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {filter, string()} | {defaultFilter, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlwxgenericdirctrl">external documentation</a>.
+-spec new(Parent, [Option]) -> wxGenericDirCtrl() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {dir, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {filter, unicode:chardata()}
+ | {defaultFilter, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -108,15 +119,24 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxGenericDirCtrl_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGenericDirCtrl(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxGenericDirCtrl(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxGenericDirCtrl(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {dir, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {filter, string()} | {defaultFilter, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxGenericDirCtrl(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {dir, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {filter, unicode:chardata()}
+ | {defaultFilter, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -133,22 +153,25 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxGenericDirCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGenericDirCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlinit">external documentation</a>.
+-spec init(This) -> ok when
+ This::wxGenericDirCtrl().
init(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:cast(?wxGenericDirCtrl_Init,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlcollapsetree">external documentation</a>.
+-spec collapseTree(This) -> ok when
+ This::wxGenericDirCtrl().
collapseTree(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:cast(?wxGenericDirCtrl_CollapseTree,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl(), Path::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlexpandpath">external documentation</a>.
+-spec expandPath(This, Path) -> boolean() when
+ This::wxGenericDirCtrl(), Path::unicode:chardata().
expandPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -156,64 +179,73 @@ expandPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
wxe_util:call(?wxGenericDirCtrl_ExpandPath,
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGenericDirCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlgetdefaultpath">external documentation</a>.
+-spec getDefaultPath(This) -> unicode:charlist() when
+ This::wxGenericDirCtrl().
getDefaultPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:call(?wxGenericDirCtrl_GetDefaultPath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlgetpath">external documentation</a>.
+-spec getPath(This) -> unicode:charlist() when
+ This::wxGenericDirCtrl().
getPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:call(?wxGenericDirCtrl_GetPath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlgetfilepath">external documentation</a>.
+-spec getFilePath(This) -> unicode:charlist() when
+ This::wxGenericDirCtrl().
getFilePath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:call(?wxGenericDirCtrl_GetFilePath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlgetfilter">external documentation</a>.
+-spec getFilter(This) -> unicode:charlist() when
+ This::wxGenericDirCtrl().
getFilter(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:call(?wxGenericDirCtrl_GetFilter,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlgetfilterindex">external documentation</a>.
+-spec getFilterIndex(This) -> integer() when
+ This::wxGenericDirCtrl().
getFilterIndex(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:call(?wxGenericDirCtrl_GetFilterIndex,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlgetrootid">external documentation</a>.
+-spec getRootId(This) -> integer() when
+ This::wxGenericDirCtrl().
getRootId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:call(?wxGenericDirCtrl_GetRootId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> wxTreeCtrl:wxTreeCtrl()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlgettreectrl">external documentation</a>.
+-spec getTreeCtrl(This) -> wxTreeCtrl:wxTreeCtrl() when
+ This::wxGenericDirCtrl().
getTreeCtrl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:call(?wxGenericDirCtrl_GetTreeCtrl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlrecreatetree">external documentation</a>.
+-spec reCreateTree(This) -> ok when
+ This::wxGenericDirCtrl().
reCreateTree(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:cast(?wxGenericDirCtrl_ReCreateTree,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl(), Path::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlsetdefaultpath">external documentation</a>.
+-spec setDefaultPath(This, Path) -> ok when
+ This::wxGenericDirCtrl(), Path::unicode:chardata().
setDefaultPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -221,8 +253,9 @@ setDefaultPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
wxe_util:cast(?wxGenericDirCtrl_SetDefaultPath,
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGenericDirCtrl(), Filter::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlsetfilter">external documentation</a>.
+-spec setFilter(This, Filter) -> ok when
+ This::wxGenericDirCtrl(), Filter::unicode:chardata().
setFilter(#wx_ref{type=ThisT,ref=ThisRef},Filter)
when is_list(Filter) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -230,16 +263,18 @@ setFilter(#wx_ref{type=ThisT,ref=ThisRef},Filter)
wxe_util:cast(?wxGenericDirCtrl_SetFilter,
<<ThisRef:32/?UI,(byte_size(Filter_UC)):32/?UI,(Filter_UC)/binary, 0:(((8- ((0+byte_size(Filter_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGenericDirCtrl(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlsetfilterindex">external documentation</a>.
+-spec setFilterIndex(This, N) -> ok when
+ This::wxGenericDirCtrl(), N::integer().
setFilterIndex(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxGenericDirCtrl),
wxe_util:cast(?wxGenericDirCtrl_SetFilterIndex,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxGenericDirCtrl(), Path::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgenericdirctrl.html#wxgenericdirctrlsetpath">external documentation</a>.
+-spec setPath(This, Path) -> ok when
+ This::wxGenericDirCtrl(), Path::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -247,8 +282,8 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
wxe_util:cast(?wxGenericDirCtrl_SetPath,
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGenericDirCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGenericDirCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGenericDirCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGraphicsBrush.erl b/lib/wx/src/gen/wxGraphicsBrush.erl
index e1ad01567d..bbc0c4b1a0 100644
--- a/lib/wx/src/gen/wxGraphicsBrush.erl
+++ b/lib/wx/src/gen/wxGraphicsBrush.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,10 +32,12 @@
%% inherited exports
-export([getRenderer/1,isNull/1,parent_class/1]).
+-export_type([wxGraphicsBrush/0]).
%% @hidden
parent_class(wxGraphicsObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxGraphicsBrush() :: wx:wx_object().
%% From wxGraphicsObject
%% @hidden
isNull(This) -> wxGraphicsObject:isNull(This).
diff --git a/lib/wx/src/gen/wxGraphicsContext.erl b/lib/wx/src/gen/wxGraphicsContext.erl
index 05c56dd4b2..1dfa0dd405 100644
--- a/lib/wx/src/gen/wxGraphicsContext.erl
+++ b/lib/wx/src/gen/wxGraphicsContext.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,29 +29,31 @@
-include("wxe.hrl").
-export([clip/2,clip/5,concatTransform/2,create/0,create/1,createBrush/2,createFont/2,
createFont/3,createLinearGradientBrush/7,createMatrix/1,createMatrix/2,
- createPath/1,createPen/2,createRadialGradientBrush/8,drawBitmap/6,
- drawEllipse/5,drawIcon/6,drawLines/3,drawLines/4,drawPath/2,drawPath/3,
+ createPath/1,createPen/2,createRadialGradientBrush/8,destroy/1,drawBitmap/6,
+ drawEllipse/5,drawIcon/6,drawLines/2,drawLines/3,drawPath/2,drawPath/3,
drawRectangle/5,drawRoundedRectangle/6,drawText/4,drawText/5,drawText/6,
- fillPath/2,fillPath/3,getNativeContext/1,getPartialTextExtents/3,
- getTextExtent/2,getTransform/1,resetClip/1,rotate/2,scale/3,setBrush/2,
- setFont/2,setFont/3,setPen/2,setTransform/2,strokeLine/5,strokeLines/3,
- strokeLines/4,strokePath/2,translate/3]).
+ fillPath/2,fillPath/3,getPartialTextExtents/2,getTextExtent/2,getTransform/1,
+ resetClip/1,rotate/2,scale/3,setBrush/2,setFont/2,setFont/3,setPen/2,
+ setTransform/2,strokeLine/5,strokeLines/2,strokePath/2,translate/3]).
%% inherited exports
-export([getRenderer/1,isNull/1,parent_class/1]).
+-export_type([wxGraphicsContext/0]).
%% @hidden
parent_class(wxGraphicsObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGraphicsContext()
+-type wxGraphicsContext() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreate">external documentation</a>.
+-spec create() -> wxGraphicsContext().
create() ->
wxe_util:call(?wxGraphicsContext_Create_0,
<<>>).
-%% @spec (Dc::wxWindowDC:wxWindowDC() | wxWindow:wxWindow()) -> wxGraphicsContext()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreate">external documentation</a>.
+-spec create(Dc) -> wxGraphicsContext() when
+ Dc::wxWindowDC:wxWindowDC() | wxWindow:wxWindow().
create(#wx_ref{type=DcT,ref=DcRef}) ->
DcOP = case ?CLASS_T(DcT,wxWindowDC) of
true ->
@@ -62,47 +64,54 @@ create(#wx_ref{type=DcT,ref=DcRef}) ->
wxe_util:call(DcOP,
<<DcRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Pen::wxPen:wxPen()) -> wxGraphicsPen:wxGraphicsPen()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatepen">external documentation</a>.
+-spec createPen(This, Pen) -> wxGraphicsPen:wxGraphicsPen() when
+ This::wxGraphicsContext(), Pen::wxPen:wxPen().
createPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(PenT,wxPen),
wxe_util:call(?wxGraphicsContext_CreatePen,
<<ThisRef:32/?UI,PenRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Brush::wxBrush:wxBrush()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatebrush">external documentation</a>.
+-spec createBrush(This, Brush) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsContext(), Brush::wxBrush:wxBrush().
createBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(BrushT,wxBrush),
wxe_util:call(?wxGraphicsContext_CreateBrush,
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Xo::float(), Yo::float(), Xc::float(), Yc::float(), Radius::float(), OColor::wx:colour(), CColor::wx:colour()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreateradialgradientbrush">external documentation</a>.
+-spec createRadialGradientBrush(This, Xo, Yo, Xc, Yc, Radius, OColor, CColor) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsContext(), Xo::number(), Yo::number(), Xc::number(), Yc::number(), Radius::number(), OColor::wx:wx_colour(), CColor::wx:wx_colour().
createRadialGradientBrush(#wx_ref{type=ThisT,ref=ThisRef},Xo,Yo,Xc,Yc,Radius,OColor,CColor)
- when is_float(Xo),is_float(Yo),is_float(Xc),is_float(Yc),is_float(Radius),tuple_size(OColor) =:= 3; tuple_size(OColor) =:= 4,tuple_size(CColor) =:= 3; tuple_size(CColor) =:= 4 ->
+ when is_number(Xo),is_number(Yo),is_number(Xc),is_number(Yc),is_number(Radius),tuple_size(OColor) =:= 3; tuple_size(OColor) =:= 4,tuple_size(CColor) =:= 3; tuple_size(CColor) =:= 4 ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:call(?wxGraphicsContext_CreateRadialGradientBrush,
<<ThisRef:32/?UI,0:32,Xo:64/?F,Yo:64/?F,Xc:64/?F,Yc:64/?F,Radius:64/?F,(wxe_util:colour_bin(OColor)):16/binary,(wxe_util:colour_bin(CColor)):16/binary>>).
-%% @spec (This::wxGraphicsContext(), X1::float(), Y1::float(), X2::float(), Y2::float(), C1::wx:colour(), C2::wx:colour()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatelineargradientbrush">external documentation</a>.
+-spec createLinearGradientBrush(This, X1, Y1, X2, Y2, C1, C2) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsContext(), X1::number(), Y1::number(), X2::number(), Y2::number(), C1::wx:wx_colour(), C2::wx:wx_colour().
createLinearGradientBrush(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2,C1,C2)
- when is_float(X1),is_float(Y1),is_float(X2),is_float(Y2),tuple_size(C1) =:= 3; tuple_size(C1) =:= 4,tuple_size(C2) =:= 3; tuple_size(C2) =:= 4 ->
+ when is_number(X1),is_number(Y1),is_number(X2),is_number(Y2),tuple_size(C1) =:= 3; tuple_size(C1) =:= 4,tuple_size(C2) =:= 3; tuple_size(C2) =:= 4 ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:call(?wxGraphicsContext_CreateLinearGradientBrush,
<<ThisRef:32/?UI,0:32,X1:64/?F,Y1:64/?F,X2:64/?F,Y2:64/?F,(wxe_util:colour_bin(C1)):16/binary,(wxe_util:colour_bin(C2)):16/binary>>).
-%% @spec (This::wxGraphicsContext(), Font::wxFont:wxFont()) -> wxGraphicsFont:wxGraphicsFont()
%% @equiv createFont(This,Font, [])
+-spec createFont(This, Font) -> wxGraphicsFont:wxGraphicsFont() when
+ This::wxGraphicsContext(), Font::wxFont:wxFont().
+
createFont(This,Font)
when is_record(This, wx_ref),is_record(Font, wx_ref) ->
createFont(This,Font, []).
-%% @spec (This::wxGraphicsContext(), Font::wxFont:wxFont(), [Option]) -> wxGraphicsFont:wxGraphicsFont()
-%% Option = {col, wx:colour()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatefont">external documentation</a>.
+-spec createFont(This, Font, [Option]) -> wxGraphicsFont:wxGraphicsFont() when
+ This::wxGraphicsContext(), Font::wxFont:wxFont(),
+ Option :: {col, wx:wx_colour()}.
createFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -113,15 +122,23 @@ createFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Opti
wxe_util:call(?wxGraphicsContext_CreateFont,
<<ThisRef:32/?UI,FontRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext()) -> wxGraphicsMatrix:wxGraphicsMatrix()
%% @equiv createMatrix(This, [])
+-spec createMatrix(This) -> wxGraphicsMatrix:wxGraphicsMatrix() when
+ This::wxGraphicsContext().
+
createMatrix(This)
when is_record(This, wx_ref) ->
createMatrix(This, []).
-%% @spec (This::wxGraphicsContext(), [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix()
-%% Option = {a, float()} | {b, float()} | {c, float()} | {d, float()} | {tx, float()} | {ty, float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatematrix">external documentation</a>.
+-spec createMatrix(This, [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix() when
+ This::wxGraphicsContext(),
+ Option :: {a, number()}
+ | {b, number()}
+ | {c, number()}
+ | {d, number()}
+ | {tx, number()}
+ | {ty, number()}.
createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -136,89 +153,103 @@ createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGraphicsContext_CreateMatrix,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext()) -> wxGraphicsPath:wxGraphicsPath()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatepath">external documentation</a>.
+-spec createPath(This) -> wxGraphicsPath:wxGraphicsPath() when
+ This::wxGraphicsContext().
createPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:call(?wxGraphicsContext_CreatePath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Region::wxRegion:wxRegion()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextclip">external documentation</a>.
+-spec clip(This, Region) -> ok when
+ This::wxGraphicsContext(), Region::wxRegion:wxRegion().
clip(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(RegionT,wxRegion),
wxe_util:cast(?wxGraphicsContext_Clip_1,
<<ThisRef:32/?UI,RegionRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextclip">external documentation</a>.
+-spec clip(This, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
clip(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Clip_4,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextresetclip">external documentation</a>.
+-spec resetClip(This) -> ok when
+ This::wxGraphicsContext().
resetClip(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_ResetClip,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Bmp::wxBitmap:wxBitmap(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawbitmap">external documentation</a>.
+-spec drawBitmap(This, Bmp, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), Bmp::wxBitmap:wxBitmap(), X::number(), Y::number(), W::number(), H::number().
drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(BmpT,wxBitmap),
wxe_util:cast(?wxGraphicsContext_DrawBitmap,
<<ThisRef:32/?UI,BmpRef:32/?UI,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawellipse">external documentation</a>.
+-spec drawEllipse(This, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_DrawEllipse,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext(), Icon::wxIcon:wxIcon(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawicon">external documentation</a>.
+-spec drawIcon(This, Icon, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), Icon::wxIcon:wxIcon(), X::number(), Y::number(), W::number(), H::number().
drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(IconT,wxIcon),
wxe_util:cast(?wxGraphicsContext_DrawIcon,
<<ThisRef:32/?UI,IconRef:32/?UI,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}) -> ok
-%% @equiv drawLines(This,N,Points, [])
-drawLines(This,N,Points={PointsX,PointsY})
- when is_record(This, wx_ref),is_integer(N),is_number(PointsX),is_number(PointsY) ->
- drawLines(This,N,Points, []).
+%% @equiv drawLines(This,Points, [])
+-spec drawLines(This, Points) -> ok when
+ This::wxGraphicsContext(), Points::[{X::float(), Y::float()}].
+
+drawLines(This,Points)
+ when is_record(This, wx_ref),is_list(Points) ->
+ drawLines(This,Points, []).
-%% @spec (This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}, [Option]) -> ok
-%% Option = {fillStyle, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawlines">external documentation</a>.
-drawLines(#wx_ref{type=ThisT,ref=ThisRef},N,{PointsX,PointsY}, Options)
- when is_integer(N),is_number(PointsX),is_number(PointsY),is_list(Options) ->
+-spec drawLines(This, Points, [Option]) -> ok when
+ This::wxGraphicsContext(), Points::[{X::float(), Y::float()}],
+ Option :: {fillStyle, integer()}.
+drawLines(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
+ when is_list(Points),is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
MOpts = fun({fillStyle, FillStyle}, Acc) -> [<<1:32/?UI,FillStyle:32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:cast(?wxGraphicsContext_DrawLines,
- <<ThisRef:32/?UI,N:32/?UI,PointsX:64/float,PointsY:64/float, BinOpt/binary>>).
+ <<ThisRef:32/?UI,(length(Points)):32/?UI,
+ (<< <<X:64/?F,Y:64/?F>> || {X,Y} <- Points>>)/binary, BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath()) -> ok
%% @equiv drawPath(This,Path, [])
+-spec drawPath(This, Path) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
+
drawPath(This,Path)
when is_record(This, wx_ref),is_record(Path, wx_ref) ->
drawPath(This,Path, []).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(), [Option]) -> ok
-%% Option = {fillStyle, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawpath">external documentation</a>.
+-spec drawPath(This, Path, [Option]) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(),
+ Option :: {fillStyle, integer()}.
drawPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -229,73 +260,80 @@ drawPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Option
wxe_util:cast(?wxGraphicsContext_DrawPath,
<<ThisRef:32/?UI,PathRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawrectangle">external documentation</a>.
+-spec drawRectangle(This, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_DrawRectangle,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float(), Radius::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawroundedrectangle">external documentation</a>.
+-spec drawRoundedRectangle(This, X, Y, W, H, Radius) -> ok when
+ This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number(), Radius::number().
drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H,Radius)
- when is_float(X),is_float(Y),is_float(W),is_float(H),is_float(Radius) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H),is_number(Radius) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_DrawRoundedRectangle,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F,Radius:64/?F>>).
-%% @spec (This::wxGraphicsContext(), Str::string(), X::float(), Y::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
+-spec drawText(This, Str, X, Y) -> ok when
+ This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y)
- when is_list(Str),is_float(X),is_float(Y) ->
+ when is_list(Str),is_number(X),is_number(Y) ->
?CLASS(ThisT,wxGraphicsContext),
Str_UC = unicode:characters_to_binary([Str,0]),
wxe_util:cast(?wxGraphicsContext_DrawText_3,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F>>).
-%% @spec (This::wxGraphicsContext(),Str::string(),X::float(),Y::float(),X::float()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% drawText(This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), Angle::float()) -> ok </c>
-%% </p>
-%% <p><c>
-%% drawText(This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% drawText(This, Str, X, Y, BackgroundBrush) -> ok when<br />
+%% This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().<br />
+%%
+-spec drawText(This, Str, X, Y, Angle) -> ok when
+ This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), Angle::number();
+ (This, Str, X, Y, BackgroundBrush) -> ok when
+ This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,Angle)
- when is_list(Str),is_float(X),is_float(Y),is_float(Angle) ->
+ when is_list(Str),is_number(X),is_number(Y),is_number(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
Str_UC = unicode:characters_to_binary([Str,0]),
wxe_util:cast(?wxGraphicsContext_DrawText_4_0,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F,Angle:64/?F>>);
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,#wx_ref{type=BackgroundBrushT,ref=BackgroundBrushRef})
- when is_list(Str),is_float(X),is_float(Y) ->
+ when is_list(Str),is_number(X),is_number(Y) ->
?CLASS(ThisT,wxGraphicsContext),
Str_UC = unicode:characters_to_binary([Str,0]),
?CLASS(BackgroundBrushT,wxGraphicsBrush),
wxe_util:cast(?wxGraphicsContext_DrawText_4_1,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F,BackgroundBrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), Angle::float(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
+-spec drawText(This, Str, X, Y, Angle, BackgroundBrush) -> ok when
+ This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), Angle::number(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,Angle,#wx_ref{type=BackgroundBrushT,ref=BackgroundBrushRef})
- when is_list(Str),is_float(X),is_float(Y),is_float(Angle) ->
+ when is_list(Str),is_number(X),is_number(Y),is_number(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
Str_UC = unicode:characters_to_binary([Str,0]),
?CLASS(BackgroundBrushT,wxGraphicsBrush),
wxe_util:cast(?wxGraphicsContext_DrawText_5,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F,Angle:64/?F,BackgroundBrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath()) -> ok
%% @equiv fillPath(This,Path, [])
+-spec fillPath(This, Path) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
+
fillPath(This,Path)
when is_record(This, wx_ref),is_record(Path, wx_ref) ->
fillPath(This,Path, []).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(), [Option]) -> ok
-%% Option = {fillStyle, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextfillpath">external documentation</a>.
+-spec fillPath(This, Path, [Option]) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(),
+ Option :: {fillStyle, integer()}.
fillPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -306,33 +344,29 @@ fillPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Option
wxe_util:cast(?wxGraphicsContext_FillPath,
<<ThisRef:32/?UI,PathRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextstrokepath">external documentation</a>.
+-spec strokePath(This, Path) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
strokePath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(PathT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsContext_StrokePath,
<<ThisRef:32/?UI,PathRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext()) -> ok
-%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextgetnativecontext">external documentation</a>.
-getNativeContext(#wx_ref{type=ThisT,ref=ThisRef}) ->
- ?CLASS(ThisT,wxGraphicsContext),
- wxe_util:cast(?wxGraphicsContext_GetNativeContext,
- <<ThisRef:32/?UI>>).
-
-%% @spec (This::wxGraphicsContext(), Text::string(), Widths::[float()]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextgetpartialtextextents">external documentation</a>.
-getPartialTextExtents(#wx_ref{type=ThisT,ref=ThisRef},Text,Widths)
- when is_list(Text),is_list(Widths) ->
+-spec getPartialTextExtents(This, Text) -> [number()] when
+ This::wxGraphicsContext(), Text::unicode:chardata().
+getPartialTextExtents(#wx_ref{type=ThisT,ref=ThisRef},Text)
+ when is_list(Text) ->
?CLASS(ThisT,wxGraphicsContext),
Text_UC = unicode:characters_to_binary([Text,0]),
- wxe_util:cast(?wxGraphicsContext_GetPartialTextExtents,
- <<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,(length(Widths)):32/?UI,
-0:32, (<< <<C:64/float>> || C <- Widths>>)/binary>>).
+ wxe_util:call(?wxGraphicsContext_GetPartialTextExtents,
+ <<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGraphicsContext(), Text::string()) -> {Width::float(), Height::float(), Descent::float(), ExternalLeading::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextgettextextent">external documentation</a>.
+-spec getTextExtent(This, Text) -> Result when
+ Result ::{Width::number(), Height::number(), Descent::number(), ExternalLeading::number()},
+ This::wxGraphicsContext(), Text::unicode:chardata().
getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -340,55 +374,62 @@ getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:call(?wxGraphicsContext_GetTextExtent,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGraphicsContext(), Angle::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextrotate">external documentation</a>.
+-spec rotate(This, Angle) -> ok when
+ This::wxGraphicsContext(), Angle::number().
rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle)
- when is_float(Angle) ->
+ when is_number(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Rotate,
<<ThisRef:32/?UI,0:32,Angle:64/?F>>).
-%% @spec (This::wxGraphicsContext(), XScale::float(), YScale::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextscale">external documentation</a>.
+-spec scale(This, XScale, YScale) -> ok when
+ This::wxGraphicsContext(), XScale::number(), YScale::number().
scale(#wx_ref{type=ThisT,ref=ThisRef},XScale,YScale)
- when is_float(XScale),is_float(YScale) ->
+ when is_number(XScale),is_number(YScale) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Scale,
<<ThisRef:32/?UI,0:32,XScale:64/?F,YScale:64/?F>>).
-%% @spec (This::wxGraphicsContext(), Dx::float(), Dy::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontexttranslate">external documentation</a>.
+-spec translate(This, Dx, Dy) -> ok when
+ This::wxGraphicsContext(), Dx::number(), Dy::number().
translate(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy)
- when is_float(Dx),is_float(Dy) ->
+ when is_number(Dx),is_number(Dy) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Translate,
<<ThisRef:32/?UI,0:32,Dx:64/?F,Dy:64/?F>>).
-%% @spec (This::wxGraphicsContext()) -> wxGraphicsMatrix:wxGraphicsMatrix()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextgettransform">external documentation</a>.
+-spec getTransform(This) -> wxGraphicsMatrix:wxGraphicsMatrix() when
+ This::wxGraphicsContext().
getTransform(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:call(?wxGraphicsContext_GetTransform,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsettransform">external documentation</a>.
+-spec setTransform(This, Matrix) -> ok when
+ This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix().
setTransform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(MatrixT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsContext_SetTransform,
<<ThisRef:32/?UI,MatrixRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextconcattransform">external documentation</a>.
+-spec concatTransform(This, Matrix) -> ok when
+ This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix().
concatTransform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(MatrixT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsContext_ConcatTransform,
<<ThisRef:32/?UI,MatrixRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Brush::wxGraphicsBrush:wxGraphicsBrush() | wxBrush:wxBrush()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsetbrush">external documentation</a>.
+-spec setBrush(This, Brush) -> ok when
+ This::wxGraphicsContext(), Brush::wxGraphicsBrush:wxGraphicsBrush() | wxBrush:wxBrush().
setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxGraphicsContext),
BrushOP = case ?CLASS_T(BrushT,wxGraphicsBrush) of
@@ -400,16 +441,18 @@ setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
wxe_util:cast(BrushOP,
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Font::wxGraphicsFont:wxGraphicsFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsetfont">external documentation</a>.
+-spec setFont(This, Font) -> ok when
+ This::wxGraphicsContext(), Font::wxGraphicsFont:wxGraphicsFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(FontT,wxGraphicsFont),
wxe_util:cast(?wxGraphicsContext_SetFont_1,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Font::wxFont:wxFont(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsetfont">external documentation</a>.
+-spec setFont(This, Font, Colour) -> ok when
+ This::wxGraphicsContext(), Font::wxFont:wxFont(), Colour::wx:wx_colour().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxGraphicsContext),
@@ -417,8 +460,9 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef},Colour)
wxe_util:cast(?wxGraphicsContext_SetFont_2,
<<ThisRef:32/?UI,FontRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxGraphicsContext(), Pen::wxPen:wxPen() | wxGraphicsPen:wxGraphicsPen()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsetpen">external documentation</a>.
+-spec setPen(This, Pen) -> ok when
+ This::wxGraphicsContext(), Pen::wxPen:wxPen() | wxGraphicsPen:wxGraphicsPen().
setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
?CLASS(ThisT,wxGraphicsContext),
PenOP = case ?CLASS_T(PenT,wxPen) of
@@ -430,30 +474,31 @@ setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
wxe_util:cast(PenOP,
<<ThisRef:32/?UI,PenRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), X1::float(), Y1::float(), X2::float(), Y2::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextstrokeline">external documentation</a>.
+-spec strokeLine(This, X1, Y1, X2, Y2) -> ok when
+ This::wxGraphicsContext(), X1::number(), Y1::number(), X2::number(), Y2::number().
strokeLine(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2)
- when is_float(X1),is_float(Y1),is_float(X2),is_float(Y2) ->
+ when is_number(X1),is_number(Y1),is_number(X2),is_number(Y2) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_StrokeLine,
<<ThisRef:32/?UI,0:32,X1:64/?F,Y1:64/?F,X2:64/?F,Y2:64/?F>>).
-%% @spec (This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}) -> ok
-%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextstrokelines">external documentation</a>.
-strokeLines(#wx_ref{type=ThisT,ref=ThisRef},N,{PointsX,PointsY})
- when is_integer(N),is_number(PointsX),is_number(PointsY) ->
- ?CLASS(ThisT,wxGraphicsContext),
- wxe_util:cast(?wxGraphicsContext_StrokeLines_2,
- <<ThisRef:32/?UI,N:32/?UI,PointsX:64/float,PointsY:64/float>>).
-
-%% @spec (This::wxGraphicsContext(), N::integer(), BeginPoints::{X::float(), Y::float()}, EndPoints::{X::float(), Y::float()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextstrokelines">external documentation</a>.
-strokeLines(#wx_ref{type=ThisT,ref=ThisRef},N,{BeginPointsX,BeginPointsY},{EndPointsX,EndPointsY})
- when is_integer(N),is_number(BeginPointsX),is_number(BeginPointsY),is_number(EndPointsX),is_number(EndPointsY) ->
- ?CLASS(ThisT,wxGraphicsContext),
- wxe_util:cast(?wxGraphicsContext_StrokeLines_3,
- <<ThisRef:32/?UI,N:32/?UI,BeginPointsX:64/float,BeginPointsY:64/float,EndPointsX:64/float,EndPointsY:64/float>>).
-
+-spec strokeLines(This, Points) -> ok when
+ This::wxGraphicsContext(), Points::[{X::float(), Y::float()}].
+strokeLines(#wx_ref{type=ThisT,ref=ThisRef},Points)
+ when is_list(Points) ->
+ ?CLASS(ThisT,wxGraphicsContext),
+ wxe_util:cast(?wxGraphicsContext_StrokeLines,
+ <<ThisRef:32/?UI,(length(Points)):32/?UI,
+ (<< <<X:64/?F,Y:64/?F>> || {X,Y} <- Points>>)/binary>>).
+
+%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGraphicsContext()) -> ok.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxGraphicsContext),
+ wxe_util:destroy(?DESTROY_OBJECT,Obj),
+ ok.
%% From wxGraphicsObject
%% @hidden
isNull(This) -> wxGraphicsObject:isNull(This).
diff --git a/lib/wx/src/gen/wxGraphicsFont.erl b/lib/wx/src/gen/wxGraphicsFont.erl
index 19b2172176..03220599fb 100644
--- a/lib/wx/src/gen/wxGraphicsFont.erl
+++ b/lib/wx/src/gen/wxGraphicsFont.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,10 +32,12 @@
%% inherited exports
-export([getRenderer/1,isNull/1,parent_class/1]).
+-export_type([wxGraphicsFont/0]).
%% @hidden
parent_class(wxGraphicsObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxGraphicsFont() :: wx:wx_object().
%% From wxGraphicsObject
%% @hidden
isNull(This) -> wxGraphicsObject:isNull(This).
diff --git a/lib/wx/src/gen/wxGraphicsMatrix.erl b/lib/wx/src/gen/wxGraphicsMatrix.erl
index 635a2027b3..36c33069ad 100644
--- a/lib/wx/src/gen/wxGraphicsMatrix.erl
+++ b/lib/wx/src/gen/wxGraphicsMatrix.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,93 +27,105 @@
-module(wxGraphicsMatrix).
-include("wxe.hrl").
--export([concat/2,get/1,getNativeMatrix/1,invert/1,isEqual/2,isIdentity/1,rotate/2,
- scale/3,set/1,set/2,transformDistance/1,transformPoint/1,translate/3]).
+-export([concat/2,get/1,invert/1,isEqual/2,isIdentity/1,rotate/2,scale/3,set/1,
+ set/2,transformDistance/1,transformPoint/1,translate/3]).
%% inherited exports
-export([getRenderer/1,isNull/1,parent_class/1]).
+-export_type([wxGraphicsMatrix/0]).
%% @hidden
parent_class(wxGraphicsObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxGraphicsMatrix(), T::wxGraphicsMatrix()) -> ok
+-type wxGraphicsMatrix() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixconcat">external documentation</a>.
+-spec concat(This, T) -> ok when
+ This::wxGraphicsMatrix(), T::wxGraphicsMatrix().
concat(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=TT,ref=TRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
?CLASS(TT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsMatrix_Concat,
<<ThisRef:32/?UI,TRef:32/?UI>>).
-%% @spec (This::wxGraphicsMatrix()) -> {A::float(), B::float(), C::float(), D::float(), Tx::float(), Ty::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixget">external documentation</a>.
+-spec get(This) -> Result when
+ Result ::{A::number(), B::number(), C::number(), D::number(), Tx::number(), Ty::number()},
+ This::wxGraphicsMatrix().
get(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
wxe_util:call(?wxGraphicsMatrix_Get,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsMatrix()) -> ok
-%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixgetnativematrix">external documentation</a>.
-getNativeMatrix(#wx_ref{type=ThisT,ref=ThisRef}) ->
- ?CLASS(ThisT,wxGraphicsMatrix),
- wxe_util:cast(?wxGraphicsMatrix_GetNativeMatrix,
- <<ThisRef:32/?UI>>).
-
-%% @spec (This::wxGraphicsMatrix()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixinvert">external documentation</a>.
+-spec invert(This) -> ok when
+ This::wxGraphicsMatrix().
invert(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsMatrix_Invert,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsMatrix(), T::wxGraphicsMatrix()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixisequal">external documentation</a>.
+-spec isEqual(This, T) -> boolean() when
+ This::wxGraphicsMatrix(), T::wxGraphicsMatrix().
isEqual(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=TT,ref=TRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
?CLASS(TT,wxGraphicsMatrix),
wxe_util:call(?wxGraphicsMatrix_IsEqual,
<<ThisRef:32/?UI,TRef:32/?UI>>).
-%% @spec (This::wxGraphicsMatrix()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixisidentity">external documentation</a>.
+-spec isIdentity(This) -> boolean() when
+ This::wxGraphicsMatrix().
isIdentity(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
wxe_util:call(?wxGraphicsMatrix_IsIdentity,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsMatrix(), Angle::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixrotate">external documentation</a>.
+-spec rotate(This, Angle) -> ok when
+ This::wxGraphicsMatrix(), Angle::number().
rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle)
- when is_float(Angle) ->
+ when is_number(Angle) ->
?CLASS(ThisT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsMatrix_Rotate,
<<ThisRef:32/?UI,0:32,Angle:64/?F>>).
-%% @spec (This::wxGraphicsMatrix(), XScale::float(), YScale::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixscale">external documentation</a>.
+-spec scale(This, XScale, YScale) -> ok when
+ This::wxGraphicsMatrix(), XScale::number(), YScale::number().
scale(#wx_ref{type=ThisT,ref=ThisRef},XScale,YScale)
- when is_float(XScale),is_float(YScale) ->
+ when is_number(XScale),is_number(YScale) ->
?CLASS(ThisT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsMatrix_Scale,
<<ThisRef:32/?UI,0:32,XScale:64/?F,YScale:64/?F>>).
-%% @spec (This::wxGraphicsMatrix(), Dx::float(), Dy::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixtranslate">external documentation</a>.
+-spec translate(This, Dx, Dy) -> ok when
+ This::wxGraphicsMatrix(), Dx::number(), Dy::number().
translate(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy)
- when is_float(Dx),is_float(Dy) ->
+ when is_number(Dx),is_number(Dy) ->
?CLASS(ThisT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsMatrix_Translate,
<<ThisRef:32/?UI,0:32,Dx:64/?F,Dy:64/?F>>).
-%% @spec (This::wxGraphicsMatrix()) -> ok
%% @equiv set(This, [])
+-spec set(This) -> ok when
+ This::wxGraphicsMatrix().
+
set(This)
when is_record(This, wx_ref) ->
set(This, []).
-%% @spec (This::wxGraphicsMatrix(), [Option]) -> ok
-%% Option = {a, float()} | {b, float()} | {c, float()} | {d, float()} | {tx, float()} | {ty, float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixset">external documentation</a>.
+-spec set(This, [Option]) -> ok when
+ This::wxGraphicsMatrix(),
+ Option :: {a, number()}
+ | {b, number()}
+ | {c, number()}
+ | {d, number()}
+ | {tx, number()}
+ | {ty, number()}.
set(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsMatrix),
@@ -128,15 +140,17 @@ set(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGraphicsMatrix_Set,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGraphicsMatrix()) -> {X::float(), Y::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixtransformpoint">external documentation</a>.
+-spec transformPoint(This) -> {X::number(), Y::number()} when
+ This::wxGraphicsMatrix().
transformPoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
wxe_util:call(?wxGraphicsMatrix_TransformPoint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsMatrix()) -> {Dx::float(), Dy::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsmatrix.html#wxgraphicsmatrixtransformdistance">external documentation</a>.
+-spec transformDistance(This) -> {Dx::number(), Dy::number()} when
+ This::wxGraphicsMatrix().
transformDistance(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
wxe_util:call(?wxGraphicsMatrix_TransformDistance,
diff --git a/lib/wx/src/gen/wxGraphicsObject.erl b/lib/wx/src/gen/wxGraphicsObject.erl
index 7e63285b7a..857a398e1f 100644
--- a/lib/wx/src/gen/wxGraphicsObject.erl
+++ b/lib/wx/src/gen/wxGraphicsObject.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,25 +24,35 @@
-module(wxGraphicsObject).
-include("wxe.hrl").
--export([getRenderer/1,isNull/1]).
+-export([destroy/1,getRenderer/1,isNull/1]).
%% inherited exports
-export([parent_class/1]).
+-export_type([wxGraphicsObject/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxGraphicsObject()) -> wxGraphicsRenderer:wxGraphicsRenderer()
+-type wxGraphicsObject() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsobject.html#wxgraphicsobjectgetrenderer">external documentation</a>.
+-spec getRenderer(This) -> wxGraphicsRenderer:wxGraphicsRenderer() when
+ This::wxGraphicsObject().
getRenderer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsObject),
wxe_util:call(?wxGraphicsObject_GetRenderer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsObject()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsobject.html#wxgraphicsobjectisnull">external documentation</a>.
+-spec isNull(This) -> boolean() when
+ This::wxGraphicsObject().
isNull(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsObject),
wxe_util:call(?wxGraphicsObject_IsNull,
<<ThisRef:32/?UI>>).
+%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGraphicsObject()) -> ok.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxGraphicsObject),
+ wxe_util:destroy(?DESTROY_OBJECT,Obj),
+ ok.
diff --git a/lib/wx/src/gen/wxGraphicsPath.erl b/lib/wx/src/gen/wxGraphicsPath.erl
index e41496c641..56b853899a 100644
--- a/lib/wx/src/gen/wxGraphicsPath.erl
+++ b/lib/wx/src/gen/wxGraphicsPath.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,155 +36,177 @@
%% inherited exports
-export([getRenderer/1,isNull/1,parent_class/1]).
+-export_type([wxGraphicsPath/0]).
%% @hidden
parent_class(wxGraphicsObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxGraphicsPath(), P::{X::float(), Y::float()}) -> ok
+-type wxGraphicsPath() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathmovetopoint">external documentation</a>.
+-spec moveToPoint(This, P) -> ok when
+ This::wxGraphicsPath(), P::{X::float(), Y::float()}.
moveToPoint(#wx_ref{type=ThisT,ref=ThisRef},{PX,PY})
when is_number(PX),is_number(PY) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_MoveToPoint_1,
- <<ThisRef:32/?UI,0:32,PX:64/float,PY:64/float>>).
+ <<ThisRef:32/?UI,0:32,PX:64/?F,PY:64/?F>>).
-%% @spec (This::wxGraphicsPath(), X::float(), Y::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathmovetopoint">external documentation</a>.
+-spec moveToPoint(This, X, Y) -> ok when
+ This::wxGraphicsPath(), X::number(), Y::number().
moveToPoint(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
- when is_float(X),is_float(Y) ->
+ when is_number(X),is_number(Y) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_MoveToPoint_2,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F>>).
-%% @spec (This::wxGraphicsPath(), C::{X::float(), Y::float()}, R::float(), StartAngle::float(), EndAngle::float(), Clockwise::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddarc">external documentation</a>.
+-spec addArc(This, C, R, StartAngle, EndAngle, Clockwise) -> ok when
+ This::wxGraphicsPath(), C::{X::float(), Y::float()}, R::number(), StartAngle::number(), EndAngle::number(), Clockwise::boolean().
addArc(#wx_ref{type=ThisT,ref=ThisRef},{CX,CY},R,StartAngle,EndAngle,Clockwise)
- when is_number(CX),is_number(CY),is_float(R),is_float(StartAngle),is_float(EndAngle),is_boolean(Clockwise) ->
+ when is_number(CX),is_number(CY),is_number(R),is_number(StartAngle),is_number(EndAngle),is_boolean(Clockwise) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddArc_5,
- <<ThisRef:32/?UI,0:32,CX:64/float,CY:64/float,R:64/?F,StartAngle:64/?F,EndAngle:64/?F,(wxe_util:from_bool(Clockwise)):32/?UI>>).
+ <<ThisRef:32/?UI,0:32,CX:64/?F,CY:64/?F,R:64/?F,StartAngle:64/?F,EndAngle:64/?F,(wxe_util:from_bool(Clockwise)):32/?UI>>).
-%% @spec (This::wxGraphicsPath(), X::float(), Y::float(), R::float(), StartAngle::float(), EndAngle::float(), Clockwise::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddarc">external documentation</a>.
+-spec addArc(This, X, Y, R, StartAngle, EndAngle, Clockwise) -> ok when
+ This::wxGraphicsPath(), X::number(), Y::number(), R::number(), StartAngle::number(), EndAngle::number(), Clockwise::boolean().
addArc(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R,StartAngle,EndAngle,Clockwise)
- when is_float(X),is_float(Y),is_float(R),is_float(StartAngle),is_float(EndAngle),is_boolean(Clockwise) ->
+ when is_number(X),is_number(Y),is_number(R),is_number(StartAngle),is_number(EndAngle),is_boolean(Clockwise) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddArc_6,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,R:64/?F,StartAngle:64/?F,EndAngle:64/?F,(wxe_util:from_bool(Clockwise)):32/?UI>>).
-%% @spec (This::wxGraphicsPath(), X1::float(), Y1::float(), X2::float(), Y2::float(), R::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddarctopoint">external documentation</a>.
+-spec addArcToPoint(This, X1, Y1, X2, Y2, R) -> ok when
+ This::wxGraphicsPath(), X1::number(), Y1::number(), X2::number(), Y2::number(), R::number().
addArcToPoint(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2,R)
- when is_float(X1),is_float(Y1),is_float(X2),is_float(Y2),is_float(R) ->
+ when is_number(X1),is_number(Y1),is_number(X2),is_number(Y2),is_number(R) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddArcToPoint,
<<ThisRef:32/?UI,0:32,X1:64/?F,Y1:64/?F,X2:64/?F,Y2:64/?F,R:64/?F>>).
-%% @spec (This::wxGraphicsPath(), X::float(), Y::float(), R::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddcircle">external documentation</a>.
+-spec addCircle(This, X, Y, R) -> ok when
+ This::wxGraphicsPath(), X::number(), Y::number(), R::number().
addCircle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R)
- when is_float(X),is_float(Y),is_float(R) ->
+ when is_number(X),is_number(Y),is_number(R) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddCircle,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,R:64/?F>>).
-%% @spec (This::wxGraphicsPath(), C1::{X::float(), Y::float()}, C2::{X::float(), Y::float()}, E::{X::float(), Y::float()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddcurvetopoint">external documentation</a>.
+-spec addCurveToPoint(This, C1, C2, E) -> ok when
+ This::wxGraphicsPath(), C1::{X::float(), Y::float()}, C2::{X::float(), Y::float()}, E::{X::float(), Y::float()}.
addCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},{C1X,C1Y},{C2X,C2Y},{EX,EY})
when is_number(C1X),is_number(C1Y),is_number(C2X),is_number(C2Y),is_number(EX),is_number(EY) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddCurveToPoint_3,
- <<ThisRef:32/?UI,0:32,C1X:64/float,C1Y:64/float,C2X:64/float,C2Y:64/float,EX:64/float,EY:64/float>>).
+ <<ThisRef:32/?UI,0:32,C1X:64/?F,C1Y:64/?F,C2X:64/?F,C2Y:64/?F,EX:64/?F,EY:64/?F>>).
-%% @spec (This::wxGraphicsPath(), Cx1::float(), Cy1::float(), Cx2::float(), Cy2::float(), X::float(), Y::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddcurvetopoint">external documentation</a>.
+-spec addCurveToPoint(This, Cx1, Cy1, Cx2, Cy2, X, Y) -> ok when
+ This::wxGraphicsPath(), Cx1::number(), Cy1::number(), Cx2::number(), Cy2::number(), X::number(), Y::number().
addCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},Cx1,Cy1,Cx2,Cy2,X,Y)
- when is_float(Cx1),is_float(Cy1),is_float(Cx2),is_float(Cy2),is_float(X),is_float(Y) ->
+ when is_number(Cx1),is_number(Cy1),is_number(Cx2),is_number(Cy2),is_number(X),is_number(Y) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddCurveToPoint_6,
<<ThisRef:32/?UI,0:32,Cx1:64/?F,Cy1:64/?F,Cx2:64/?F,Cy2:64/?F,X:64/?F,Y:64/?F>>).
-%% @spec (This::wxGraphicsPath(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddellipse">external documentation</a>.
+-spec addEllipse(This, X, Y, W, H) -> ok when
+ This::wxGraphicsPath(), X::number(), Y::number(), W::number(), H::number().
addEllipse(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddEllipse,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsPath(), P::{X::float(), Y::float()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddlinetopoint">external documentation</a>.
+-spec addLineToPoint(This, P) -> ok when
+ This::wxGraphicsPath(), P::{X::float(), Y::float()}.
addLineToPoint(#wx_ref{type=ThisT,ref=ThisRef},{PX,PY})
when is_number(PX),is_number(PY) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddLineToPoint_1,
- <<ThisRef:32/?UI,0:32,PX:64/float,PY:64/float>>).
+ <<ThisRef:32/?UI,0:32,PX:64/?F,PY:64/?F>>).
-%% @spec (This::wxGraphicsPath(), X::float(), Y::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddlinetopoint">external documentation</a>.
+-spec addLineToPoint(This, X, Y) -> ok when
+ This::wxGraphicsPath(), X::number(), Y::number().
addLineToPoint(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
- when is_float(X),is_float(Y) ->
+ when is_number(X),is_number(Y) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddLineToPoint_2,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F>>).
-%% @spec (This::wxGraphicsPath(), Path::wxGraphicsPath()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddpath">external documentation</a>.
+-spec addPath(This, Path) -> ok when
+ This::wxGraphicsPath(), Path::wxGraphicsPath().
addPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}) ->
?CLASS(ThisT,wxGraphicsPath),
?CLASS(PathT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddPath,
<<ThisRef:32/?UI,PathRef:32/?UI>>).
-%% @spec (This::wxGraphicsPath(), Cx::float(), Cy::float(), X::float(), Y::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddquadcurvetopoint">external documentation</a>.
+-spec addQuadCurveToPoint(This, Cx, Cy, X, Y) -> ok when
+ This::wxGraphicsPath(), Cx::number(), Cy::number(), X::number(), Y::number().
addQuadCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},Cx,Cy,X,Y)
- when is_float(Cx),is_float(Cy),is_float(X),is_float(Y) ->
+ when is_number(Cx),is_number(Cy),is_number(X),is_number(Y) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddQuadCurveToPoint,
<<ThisRef:32/?UI,0:32,Cx:64/?F,Cy:64/?F,X:64/?F,Y:64/?F>>).
-%% @spec (This::wxGraphicsPath(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddrectangle">external documentation</a>.
+-spec addRectangle(This, X, Y, W, H) -> ok when
+ This::wxGraphicsPath(), X::number(), Y::number(), W::number(), H::number().
addRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddRectangle,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsPath(), X::float(), Y::float(), W::float(), H::float(), Radius::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathaddroundedrectangle">external documentation</a>.
+-spec addRoundedRectangle(This, X, Y, W, H, Radius) -> ok when
+ This::wxGraphicsPath(), X::number(), Y::number(), W::number(), H::number(), Radius::number().
addRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H,Radius)
- when is_float(X),is_float(Y),is_float(W),is_float(H),is_float(Radius) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H),is_number(Radius) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_AddRoundedRectangle,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F,Radius:64/?F>>).
-%% @spec (This::wxGraphicsPath()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathclosesubpath">external documentation</a>.
+-spec closeSubpath(This) -> ok when
+ This::wxGraphicsPath().
closeSubpath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsPath_CloseSubpath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsPath(), C::{X::float(), Y::float()}) -> bool()
%% @equiv contains(This,C, [])
+-spec contains(This, C) -> boolean() when
+ This::wxGraphicsPath(), C::{X::float(), Y::float()}.
+
contains(This,C={CX,CY})
when is_record(This, wx_ref),is_number(CX),is_number(CY) ->
contains(This,C, []).
-%% @spec (This::wxGraphicsPath(),X::float()|term(),X::float()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathcontains">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% contains(This::wxGraphicsPath(), X::float(), Y::float()) -> contains(This,X,Y, []) </c></p>
-%% <p><c>
-%% contains(This::wxGraphicsPath(), C::{X::float(), Y::float()}, [Option]) -> bool() </c>
-%%<br /> Option = {fillStyle, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% contains(This, C, [Option]) -> boolean() when<br />
+%% This::wxGraphicsPath(), C::{X::float(), Y::float()},<br />
+%% Option :: {fillStyle, integer()}.<br />
+%%
+-spec contains(This, X, Y) -> boolean() when
+ This::wxGraphicsPath(), X::number(), Y::number();
+ (This, C, [Option]) -> boolean() when
+ This::wxGraphicsPath(), C::{X::float(), Y::float()},
+ Option :: {fillStyle, integer()}.
contains(This,X,Y)
- when is_record(This, wx_ref),is_float(X),is_float(Y) ->
+ when is_record(This, wx_ref),is_number(X),is_number(Y) ->
contains(This,X,Y, []);
contains(#wx_ref{type=ThisT,ref=ThisRef},{CX,CY}, Options)
when is_number(CX),is_number(CY),is_list(Options) ->
@@ -193,13 +215,14 @@ contains(#wx_ref{type=ThisT,ref=ThisRef},{CX,CY}, Options)
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:call(?wxGraphicsPath_Contains_2,
- <<ThisRef:32/?UI,0:32,CX:64/float,CY:64/float, BinOpt/binary>>).
+ <<ThisRef:32/?UI,0:32,CX:64/?F,CY:64/?F, BinOpt/binary>>).
-%% @spec (This::wxGraphicsPath(), X::float(), Y::float(), [Option]) -> bool()
-%% Option = {fillStyle, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathcontains">external documentation</a>.
+-spec contains(This, X, Y, [Option]) -> boolean() when
+ This::wxGraphicsPath(), X::number(), Y::number(),
+ Option :: {fillStyle, integer()}.
contains(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
- when is_float(X),is_float(Y),is_list(Options) ->
+ when is_number(X),is_number(Y),is_list(Options) ->
?CLASS(ThisT,wxGraphicsPath),
MOpts = fun({fillStyle, FillStyle}, Acc) -> [<<1:32/?UI,FillStyle:32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
@@ -207,22 +230,25 @@ contains(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
wxe_util:call(?wxGraphicsPath_Contains_3,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F, BinOpt/binary>>).
-%% @spec (This::wxGraphicsPath()) -> {X::float(), Y::float(), W::float(), H::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathgetbox">external documentation</a>.
+-spec getBox(This) -> {X::float(), Y::float(), W::float(), H::float()} when
+ This::wxGraphicsPath().
getBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:call(?wxGraphicsPath_GetBox,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsPath()) -> {X::float(), Y::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathgetcurrentpoint">external documentation</a>.
+-spec getCurrentPoint(This) -> {X::float(), Y::float()} when
+ This::wxGraphicsPath().
getCurrentPoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsPath),
wxe_util:call(?wxGraphicsPath_GetCurrentPoint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsPath(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicspath.html#wxgraphicspathtransform">external documentation</a>.
+-spec transform(This, Matrix) -> ok when
+ This::wxGraphicsPath(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix().
transform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}) ->
?CLASS(ThisT,wxGraphicsPath),
?CLASS(MatrixT,wxGraphicsMatrix),
diff --git a/lib/wx/src/gen/wxGraphicsPen.erl b/lib/wx/src/gen/wxGraphicsPen.erl
index 395b05f8af..76a59e6e2c 100644
--- a/lib/wx/src/gen/wxGraphicsPen.erl
+++ b/lib/wx/src/gen/wxGraphicsPen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,10 +32,12 @@
%% inherited exports
-export([getRenderer/1,isNull/1,parent_class/1]).
+-export_type([wxGraphicsPen/0]).
%% @hidden
parent_class(wxGraphicsObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxGraphicsPen() :: wx:wx_object().
%% From wxGraphicsObject
%% @hidden
isNull(This) -> wxGraphicsObject:isNull(This).
diff --git a/lib/wx/src/gen/wxGraphicsRenderer.erl b/lib/wx/src/gen/wxGraphicsRenderer.erl
index ed53ebf468..21082bde23 100644
--- a/lib/wx/src/gen/wxGraphicsRenderer.erl
+++ b/lib/wx/src/gen/wxGraphicsRenderer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,17 +31,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxGraphicsRenderer/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGraphicsRenderer()
+-type wxGraphicsRenderer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderergetdefaultrenderer">external documentation</a>.
+-spec getDefaultRenderer() -> wxGraphicsRenderer().
getDefaultRenderer() ->
wxe_util:call(?wxGraphicsRenderer_GetDefaultRenderer,
<<>>).
-%% @spec (This::wxGraphicsRenderer(), Dc::wxWindowDC:wxWindowDC() | wxWindow:wxWindow()) -> wxGraphicsContext:wxGraphicsContext()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatecontext">external documentation</a>.
+-spec createContext(This, Dc) -> wxGraphicsContext:wxGraphicsContext() when
+ This::wxGraphicsRenderer(), Dc::wxWindowDC:wxWindowDC() | wxWindow:wxWindow().
createContext(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
?CLASS(ThisT,wxGraphicsRenderer),
DcOP = case ?CLASS_T(DcT,wxWindowDC) of
@@ -53,47 +56,54 @@ createContext(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
wxe_util:call(DcOP,
<<ThisRef:32/?UI,DcRef:32/?UI>>).
-%% @spec (This::wxGraphicsRenderer(), Pen::wxPen:wxPen()) -> wxGraphicsPen:wxGraphicsPen()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatepen">external documentation</a>.
+-spec createPen(This, Pen) -> wxGraphicsPen:wxGraphicsPen() when
+ This::wxGraphicsRenderer(), Pen::wxPen:wxPen().
createPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
?CLASS(ThisT,wxGraphicsRenderer),
?CLASS(PenT,wxPen),
wxe_util:call(?wxGraphicsRenderer_CreatePen,
<<ThisRef:32/?UI,PenRef:32/?UI>>).
-%% @spec (This::wxGraphicsRenderer(), Brush::wxBrush:wxBrush()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatebrush">external documentation</a>.
+-spec createBrush(This, Brush) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsRenderer(), Brush::wxBrush:wxBrush().
createBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxGraphicsRenderer),
?CLASS(BrushT,wxBrush),
wxe_util:call(?wxGraphicsRenderer_CreateBrush,
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsRenderer(), X1::float(), Y1::float(), X2::float(), Y2::float(), C1::wx:colour(), C2::wx:colour()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatelineargradientbrush">external documentation</a>.
+-spec createLinearGradientBrush(This, X1, Y1, X2, Y2, C1, C2) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsRenderer(), X1::number(), Y1::number(), X2::number(), Y2::number(), C1::wx:wx_colour(), C2::wx:wx_colour().
createLinearGradientBrush(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2,C1,C2)
- when is_float(X1),is_float(Y1),is_float(X2),is_float(Y2),tuple_size(C1) =:= 3; tuple_size(C1) =:= 4,tuple_size(C2) =:= 3; tuple_size(C2) =:= 4 ->
+ when is_number(X1),is_number(Y1),is_number(X2),is_number(Y2),tuple_size(C1) =:= 3; tuple_size(C1) =:= 4,tuple_size(C2) =:= 3; tuple_size(C2) =:= 4 ->
?CLASS(ThisT,wxGraphicsRenderer),
wxe_util:call(?wxGraphicsRenderer_CreateLinearGradientBrush,
<<ThisRef:32/?UI,0:32,X1:64/?F,Y1:64/?F,X2:64/?F,Y2:64/?F,(wxe_util:colour_bin(C1)):16/binary,(wxe_util:colour_bin(C2)):16/binary>>).
-%% @spec (This::wxGraphicsRenderer(), Xo::float(), Yo::float(), Xc::float(), Yc::float(), Radius::float(), OColor::wx:colour(), CColor::wx:colour()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreateradialgradientbrush">external documentation</a>.
+-spec createRadialGradientBrush(This, Xo, Yo, Xc, Yc, Radius, OColor, CColor) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsRenderer(), Xo::number(), Yo::number(), Xc::number(), Yc::number(), Radius::number(), OColor::wx:wx_colour(), CColor::wx:wx_colour().
createRadialGradientBrush(#wx_ref{type=ThisT,ref=ThisRef},Xo,Yo,Xc,Yc,Radius,OColor,CColor)
- when is_float(Xo),is_float(Yo),is_float(Xc),is_float(Yc),is_float(Radius),tuple_size(OColor) =:= 3; tuple_size(OColor) =:= 4,tuple_size(CColor) =:= 3; tuple_size(CColor) =:= 4 ->
+ when is_number(Xo),is_number(Yo),is_number(Xc),is_number(Yc),is_number(Radius),tuple_size(OColor) =:= 3; tuple_size(OColor) =:= 4,tuple_size(CColor) =:= 3; tuple_size(CColor) =:= 4 ->
?CLASS(ThisT,wxGraphicsRenderer),
wxe_util:call(?wxGraphicsRenderer_CreateRadialGradientBrush,
<<ThisRef:32/?UI,0:32,Xo:64/?F,Yo:64/?F,Xc:64/?F,Yc:64/?F,Radius:64/?F,(wxe_util:colour_bin(OColor)):16/binary,(wxe_util:colour_bin(CColor)):16/binary>>).
-%% @spec (This::wxGraphicsRenderer(), Font::wxFont:wxFont()) -> wxGraphicsFont:wxGraphicsFont()
%% @equiv createFont(This,Font, [])
+-spec createFont(This, Font) -> wxGraphicsFont:wxGraphicsFont() when
+ This::wxGraphicsRenderer(), Font::wxFont:wxFont().
+
createFont(This,Font)
when is_record(This, wx_ref),is_record(Font, wx_ref) ->
createFont(This,Font, []).
-%% @spec (This::wxGraphicsRenderer(), Font::wxFont:wxFont(), [Option]) -> wxGraphicsFont:wxGraphicsFont()
-%% Option = {col, wx:colour()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatefont">external documentation</a>.
+-spec createFont(This, Font, [Option]) -> wxGraphicsFont:wxGraphicsFont() when
+ This::wxGraphicsRenderer(), Font::wxFont:wxFont(),
+ Option :: {col, wx:wx_colour()}.
createFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsRenderer),
@@ -104,15 +114,23 @@ createFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Opti
wxe_util:call(?wxGraphicsRenderer_CreateFont,
<<ThisRef:32/?UI,FontRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGraphicsRenderer()) -> wxGraphicsMatrix:wxGraphicsMatrix()
%% @equiv createMatrix(This, [])
+-spec createMatrix(This) -> wxGraphicsMatrix:wxGraphicsMatrix() when
+ This::wxGraphicsRenderer().
+
createMatrix(This)
when is_record(This, wx_ref) ->
createMatrix(This, []).
-%% @spec (This::wxGraphicsRenderer(), [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix()
-%% Option = {a, float()} | {b, float()} | {c, float()} | {d, float()} | {tx, float()} | {ty, float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatematrix">external documentation</a>.
+-spec createMatrix(This, [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix() when
+ This::wxGraphicsRenderer(),
+ Option :: {a, number()}
+ | {b, number()}
+ | {c, number()}
+ | {d, number()}
+ | {tx, number()}
+ | {ty, number()}.
createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsRenderer),
@@ -127,8 +145,9 @@ createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGraphicsRenderer_CreateMatrix,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGraphicsRenderer()) -> wxGraphicsPath:wxGraphicsPath()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatepath">external documentation</a>.
+-spec createPath(This) -> wxGraphicsPath:wxGraphicsPath() when
+ This::wxGraphicsRenderer().
createPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsRenderer),
wxe_util:call(?wxGraphicsRenderer_CreatePath,
diff --git a/lib/wx/src/gen/wxGrid.erl b/lib/wx/src/gen/wxGrid.erl
index 531fed05c1..2f4b45b1bc 100644
--- a/lib/wx/src/gen/wxGrid.erl
+++ b/lib/wx/src/gen/wxGrid.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -125,6 +125,7 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxGrid/0]).
%% @hidden
parent_class(wxScrolledWindow) -> true;
parent_class(wxPanel) -> true;
@@ -132,27 +133,36 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGrid()
+-type wxGrid() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridwxgrid">external documentation</a>.
+-spec new() -> wxGrid().
new() ->
wxe_util:construct(?wxGrid_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxGrid()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxGrid() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(),X::integer(),X::integer()|term()) -> wxGrid()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridwxgrid">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Parent::wxWindow:wxWindow(), X::integer(), Y::integer()) -> new(Parent,X,Y, []) </c></p>
-%% <p><c>
-%% new(Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxGrid() </c>
-%%<br /> Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Parent, Id, [Option]) -> wxGrid() when<br />
+%% Parent::wxWindow:wxWindow(), Id::integer(),<br />
+%% Option :: {pos, {X::integer(), Y::integer()}}<br />
+%% | {size, {W::integer(), H::integer()}}<br />
+%% | {style, integer()}.<br />
+%%
+-spec new(Parent, X, Y) -> wxGrid() when
+ Parent::wxWindow:wxWindow(), X::integer(), Y::integer();
+ (Parent, Id, [Option]) -> wxGrid() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(Parent,X,Y)
when is_record(Parent, wx_ref),is_integer(X),is_integer(Y) ->
@@ -168,9 +178,12 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxGrid_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (Parent::wxWindow:wxWindow(), X::integer(), Y::integer(), [Option]) -> wxGrid()
-%% Option = {w, integer()} | {h, integer()} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridwxgrid">external documentation</a>.
+-spec new(Parent, X, Y, [Option]) -> wxGrid() when
+ Parent::wxWindow:wxWindow(), X::integer(), Y::integer(),
+ Option :: {w, integer()}
+ | {h, integer()}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},X,Y, Options)
when is_integer(X),is_integer(Y),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -182,15 +195,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},X,Y, Options)
wxe_util:construct(?wxGrid_new_4,
<<ParentRef:32/?UI,X:32/?UI,Y:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> bool()
%% @equiv appendCols(This, [])
+-spec appendCols(This) -> boolean() when
+ This::wxGrid().
+
appendCols(This)
when is_record(This, wx_ref) ->
appendCols(This, []).
-%% @spec (This::wxGrid(), [Option]) -> bool()
-%% Option = {numCols, integer()} | {updateLabels, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridappendcols">external documentation</a>.
+-spec appendCols(This, [Option]) -> boolean() when
+ This::wxGrid(),
+ Option :: {numCols, integer()}
+ | {updateLabels, boolean()}.
appendCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -201,15 +218,19 @@ appendCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGrid_AppendCols,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> bool()
%% @equiv appendRows(This, [])
+-spec appendRows(This) -> boolean() when
+ This::wxGrid().
+
appendRows(This)
when is_record(This, wx_ref) ->
appendRows(This, []).
-%% @spec (This::wxGrid(), [Option]) -> bool()
-%% Option = {numRows, integer()} | {updateLabels, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridappendrows">external documentation</a>.
+-spec appendRows(This, [Option]) -> boolean() when
+ This::wxGrid(),
+ Option :: {numRows, integer()}
+ | {updateLabels, boolean()}.
appendRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -220,22 +241,26 @@ appendRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGrid_AppendRows,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridautosize">external documentation</a>.
+-spec autoSize(This) -> ok when
+ This::wxGrid().
autoSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_AutoSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Col::integer()) -> ok
%% @equiv autoSizeColumn(This,Col, [])
+-spec autoSizeColumn(This, Col) -> ok when
+ This::wxGrid(), Col::integer().
+
autoSizeColumn(This,Col)
when is_record(This, wx_ref),is_integer(Col) ->
autoSizeColumn(This,Col, []).
-%% @spec (This::wxGrid(), Col::integer(), [Option]) -> ok
-%% Option = {setAsMin, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridautosizecolumn">external documentation</a>.
+-spec autoSizeColumn(This, Col, [Option]) -> ok when
+ This::wxGrid(), Col::integer(),
+ Option :: {setAsMin, boolean()}.
autoSizeColumn(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
when is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -245,15 +270,18 @@ autoSizeColumn(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
wxe_util:cast(?wxGrid_AutoSizeColumn,
<<ThisRef:32/?UI,Col:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @equiv autoSizeColumns(This, [])
+-spec autoSizeColumns(This) -> ok when
+ This::wxGrid().
+
autoSizeColumns(This)
when is_record(This, wx_ref) ->
autoSizeColumns(This, []).
-%% @spec (This::wxGrid(), [Option]) -> ok
-%% Option = {setAsMin, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridautosizecolumns">external documentation</a>.
+-spec autoSizeColumns(This, [Option]) -> ok when
+ This::wxGrid(),
+ Option :: {setAsMin, boolean()}.
autoSizeColumns(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -263,15 +291,18 @@ autoSizeColumns(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGrid_AutoSizeColumns,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid(), Row::integer()) -> ok
%% @equiv autoSizeRow(This,Row, [])
+-spec autoSizeRow(This, Row) -> ok when
+ This::wxGrid(), Row::integer().
+
autoSizeRow(This,Row)
when is_record(This, wx_ref),is_integer(Row) ->
autoSizeRow(This,Row, []).
-%% @spec (This::wxGrid(), Row::integer(), [Option]) -> ok
-%% Option = {setAsMin, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridautosizerow">external documentation</a>.
+-spec autoSizeRow(This, Row, [Option]) -> ok when
+ This::wxGrid(), Row::integer(),
+ Option :: {setAsMin, boolean()}.
autoSizeRow(#wx_ref{type=ThisT,ref=ThisRef},Row, Options)
when is_integer(Row),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -281,15 +312,18 @@ autoSizeRow(#wx_ref{type=ThisT,ref=ThisRef},Row, Options)
wxe_util:cast(?wxGrid_AutoSizeRow,
<<ThisRef:32/?UI,Row:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @equiv autoSizeRows(This, [])
+-spec autoSizeRows(This) -> ok when
+ This::wxGrid().
+
autoSizeRows(This)
when is_record(This, wx_ref) ->
autoSizeRows(This, []).
-%% @spec (This::wxGrid(), [Option]) -> ok
-%% Option = {setAsMin, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridautosizerows">external documentation</a>.
+-spec autoSizeRows(This, [Option]) -> ok when
+ This::wxGrid(),
+ Option :: {setAsMin, boolean()}.
autoSizeRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -299,90 +333,102 @@ autoSizeRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGrid_AutoSizeRows,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridbeginbatch">external documentation</a>.
+-spec beginBatch(This) -> ok when
+ This::wxGrid().
beginBatch(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_BeginBatch,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), TopLeft::{R::integer(), C::integer()}, BottomRight::{R::integer(), C::integer()}) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridblocktodevicerect">external documentation</a>.
+-spec blockToDeviceRect(This, TopLeft, BottomRight) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxGrid(), TopLeft::{R::integer(), C::integer()}, BottomRight::{R::integer(), C::integer()}.
blockToDeviceRect(#wx_ref{type=ThisT,ref=ThisRef},{TopLeftR,TopLeftC},{BottomRightR,BottomRightC})
when is_integer(TopLeftR),is_integer(TopLeftC),is_integer(BottomRightR),is_integer(BottomRightC) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_BlockToDeviceRect,
<<ThisRef:32/?UI,TopLeftR:32/?UI,TopLeftC:32/?UI,BottomRightR:32/?UI,BottomRightC:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridcandragcolsize">external documentation</a>.
+-spec canDragColSize(This) -> boolean() when
+ This::wxGrid().
canDragColSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_CanDragColSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridcandragrowsize">external documentation</a>.
+-spec canDragRowSize(This) -> boolean() when
+ This::wxGrid().
canDragRowSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_CanDragRowSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridcandraggridsize">external documentation</a>.
+-spec canDragGridSize(This) -> boolean() when
+ This::wxGrid().
canDragGridSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_CanDragGridSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridcanenablecellcontrol">external documentation</a>.
+-spec canEnableCellControl(This) -> boolean() when
+ This::wxGrid().
canEnableCellControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_CanEnableCellControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Coords::{R::integer(), C::integer()}) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridcelltorect">external documentation</a>.
+-spec cellToRect(This, Coords) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxGrid(), Coords::{R::integer(), C::integer()}.
cellToRect(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC})
when is_integer(CoordsR),is_integer(CoordsC) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_CellToRect_1,
<<ThisRef:32/?UI,CoordsR:32/?UI,CoordsC:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridcelltorect">external documentation</a>.
+-spec cellToRect(This, Row, Col) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxGrid(), Row::integer(), Col::integer().
cellToRect(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_CellToRect_2,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridcleargrid">external documentation</a>.
+-spec clearGrid(This) -> ok when
+ This::wxGrid().
clearGrid(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_ClearGrid,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridclearselection">external documentation</a>.
+-spec clearSelection(This) -> ok when
+ This::wxGrid().
clearSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_ClearSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), NumRows::integer(), NumCols::integer()) -> bool()
%% @equiv createGrid(This,NumRows,NumCols, [])
+-spec createGrid(This, NumRows, NumCols) -> boolean() when
+ This::wxGrid(), NumRows::integer(), NumCols::integer().
+
createGrid(This,NumRows,NumCols)
when is_record(This, wx_ref),is_integer(NumRows),is_integer(NumCols) ->
createGrid(This,NumRows,NumCols, []).
-%% @spec (This::wxGrid(), NumRows::integer(), NumCols::integer(), [Option]) -> bool()
-%% Option = {selmode, WxGridSelectionModes}
-%% WxGridSelectionModes = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridcreategrid">external documentation</a>.
-%%<br /> WxGridSelectionModes is one of ?wxGrid_wxGridSelectCells | ?wxGrid_wxGridSelectRows | ?wxGrid_wxGridSelectColumns
+%%<br /> Selmode = ?wxGrid_wxGridSelectCells | ?wxGrid_wxGridSelectRows | ?wxGrid_wxGridSelectColumns
+-spec createGrid(This, NumRows, NumCols, [Option]) -> boolean() when
+ This::wxGrid(), NumRows::integer(), NumCols::integer(),
+ Option :: {selmode, wx:wx_enum()}.
createGrid(#wx_ref{type=ThisT,ref=ThisRef},NumRows,NumCols, Options)
when is_integer(NumRows),is_integer(NumCols),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -392,15 +438,20 @@ createGrid(#wx_ref{type=ThisT,ref=ThisRef},NumRows,NumCols, Options)
wxe_util:call(?wxGrid_CreateGrid,
<<ThisRef:32/?UI,NumRows:32/?UI,NumCols:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> bool()
%% @equiv deleteCols(This, [])
+-spec deleteCols(This) -> boolean() when
+ This::wxGrid().
+
deleteCols(This)
when is_record(This, wx_ref) ->
deleteCols(This, []).
-%% @spec (This::wxGrid(), [Option]) -> bool()
-%% Option = {pos, integer()} | {numCols, integer()} | {updateLabels, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgriddeletecols">external documentation</a>.
+-spec deleteCols(This, [Option]) -> boolean() when
+ This::wxGrid(),
+ Option :: {pos, integer()}
+ | {numCols, integer()}
+ | {updateLabels, boolean()}.
deleteCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -412,15 +463,20 @@ deleteCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGrid_DeleteCols,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> bool()
%% @equiv deleteRows(This, [])
+-spec deleteRows(This) -> boolean() when
+ This::wxGrid().
+
deleteRows(This)
when is_record(This, wx_ref) ->
deleteRows(This, []).
-%% @spec (This::wxGrid(), [Option]) -> bool()
-%% Option = {pos, integer()} | {numRows, integer()} | {updateLabels, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgriddeleterows">external documentation</a>.
+-spec deleteRows(This, [Option]) -> boolean() when
+ This::wxGrid(),
+ Option :: {pos, integer()}
+ | {numRows, integer()}
+ | {updateLabels, boolean()}.
deleteRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -432,43 +488,50 @@ deleteRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGrid_DeleteRows,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgriddisablecelleditcontrol">external documentation</a>.
+-spec disableCellEditControl(This) -> ok when
+ This::wxGrid().
disableCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_DisableCellEditControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgriddisabledragcolsize">external documentation</a>.
+-spec disableDragColSize(This) -> ok when
+ This::wxGrid().
disableDragColSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_DisableDragColSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgriddisabledraggridsize">external documentation</a>.
+-spec disableDragGridSize(This) -> ok when
+ This::wxGrid().
disableDragGridSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_DisableDragGridSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgriddisabledragrowsize">external documentation</a>.
+-spec disableDragRowSize(This) -> ok when
+ This::wxGrid().
disableDragRowSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_DisableDragRowSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @equiv enableCellEditControl(This, [])
+-spec enableCellEditControl(This) -> ok when
+ This::wxGrid().
+
enableCellEditControl(This)
when is_record(This, wx_ref) ->
enableCellEditControl(This, []).
-%% @spec (This::wxGrid(), [Option]) -> ok
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridenablecelleditcontrol">external documentation</a>.
+-spec enableCellEditControl(This, [Option]) -> ok when
+ This::wxGrid(),
+ Option :: {enable, boolean()}.
enableCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -478,15 +541,18 @@ enableCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGrid_EnableCellEditControl,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @equiv enableDragColSize(This, [])
+-spec enableDragColSize(This) -> ok when
+ This::wxGrid().
+
enableDragColSize(This)
when is_record(This, wx_ref) ->
enableDragColSize(This, []).
-%% @spec (This::wxGrid(), [Option]) -> ok
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridenabledragcolsize">external documentation</a>.
+-spec enableDragColSize(This, [Option]) -> ok when
+ This::wxGrid(),
+ Option :: {enable, boolean()}.
enableDragColSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -496,15 +562,18 @@ enableDragColSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGrid_EnableDragColSize,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @equiv enableDragGridSize(This, [])
+-spec enableDragGridSize(This) -> ok when
+ This::wxGrid().
+
enableDragGridSize(This)
when is_record(This, wx_ref) ->
enableDragGridSize(This, []).
-%% @spec (This::wxGrid(), [Option]) -> ok
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridenabledraggridsize">external documentation</a>.
+-spec enableDragGridSize(This, [Option]) -> ok when
+ This::wxGrid(),
+ Option :: {enable, boolean()}.
enableDragGridSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -514,15 +583,18 @@ enableDragGridSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGrid_EnableDragGridSize,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @equiv enableDragRowSize(This, [])
+-spec enableDragRowSize(This) -> ok when
+ This::wxGrid().
+
enableDragRowSize(This)
when is_record(This, wx_ref) ->
enableDragRowSize(This, []).
-%% @spec (This::wxGrid(), [Option]) -> ok
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridenabledragrowsize">external documentation</a>.
+-spec enableDragRowSize(This, [Option]) -> ok when
+ This::wxGrid(),
+ Option :: {enable, boolean()}.
enableDragRowSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -532,23 +604,27 @@ enableDragRowSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGrid_EnableDragRowSize,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid(), Edit::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridenableediting">external documentation</a>.
+-spec enableEditing(This, Edit) -> ok when
+ This::wxGrid(), Edit::boolean().
enableEditing(#wx_ref{type=ThisT,ref=ThisRef},Edit)
when is_boolean(Edit) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_EnableEditing,
<<ThisRef:32/?UI,(wxe_util:from_bool(Edit)):32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @equiv enableGridLines(This, [])
+-spec enableGridLines(This) -> ok when
+ This::wxGrid().
+
enableGridLines(This)
when is_record(This, wx_ref) ->
enableGridLines(This, []).
-%% @spec (This::wxGrid(), [Option]) -> ok
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridenablegridlines">external documentation</a>.
+-spec enableGridLines(This, [Option]) -> ok when
+ This::wxGrid(),
+ Option :: {enable, boolean()}.
enableGridLines(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -558,194 +634,220 @@ enableGridLines(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGrid_EnableGridLines,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridendbatch">external documentation</a>.
+-spec endBatch(This) -> ok when
+ This::wxGrid().
endBatch(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_EndBatch,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridfit">external documentation</a>.
+-spec fit(This) -> ok when
+ This::wxGrid().
fit(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_Fit,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridforcerefresh">external documentation</a>.
+-spec forceRefresh(This) -> ok when
+ This::wxGrid().
forceRefresh(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_ForceRefresh,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetbatchcount">external documentation</a>.
+-spec getBatchCount(This) -> integer() when
+ This::wxGrid().
getBatchCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetBatchCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> {Horiz::integer(), Vert::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcellalignment">external documentation</a>.
+-spec getCellAlignment(This, Row, Col) -> {Horiz::integer(), Vert::integer()} when
+ This::wxGrid(), Row::integer(), Col::integer().
getCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetCellAlignment,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcellbackgroundcolour">external documentation</a>.
+-spec getCellBackgroundColour(This, Row, Col) -> wx:wx_colour4() when
+ This::wxGrid(), Row::integer(), Col::integer().
getCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetCellBackgroundColour,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> wxGridCellEditor:wxGridCellEditor()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcelleditor">external documentation</a>.
+-spec getCellEditor(This, Row, Col) -> wxGridCellEditor:wxGridCellEditor() when
+ This::wxGrid(), Row::integer(), Col::integer().
getCellEditor(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetCellEditor,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcellfont">external documentation</a>.
+-spec getCellFont(This, Row, Col) -> wxFont:wxFont() when
+ This::wxGrid(), Row::integer(), Col::integer().
getCellFont(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetCellFont,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> wxGridCellRenderer:wxGridCellRenderer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcellrenderer">external documentation</a>.
+-spec getCellRenderer(This, Row, Col) -> wxGridCellRenderer:wxGridCellRenderer() when
+ This::wxGrid(), Row::integer(), Col::integer().
getCellRenderer(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetCellRenderer,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcelltextcolour">external documentation</a>.
+-spec getCellTextColour(This, Row, Col) -> wx:wx_colour4() when
+ This::wxGrid(), Row::integer(), Col::integer().
getCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetCellTextColour,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Coords::{R::integer(), C::integer()}) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcellvalue">external documentation</a>.
+-spec getCellValue(This, Coords) -> unicode:charlist() when
+ This::wxGrid(), Coords::{R::integer(), C::integer()}.
getCellValue(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC})
when is_integer(CoordsR),is_integer(CoordsC) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetCellValue_1,
<<ThisRef:32/?UI,CoordsR:32/?UI,CoordsC:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcellvalue">external documentation</a>.
+-spec getCellValue(This, Row, Col) -> unicode:charlist() when
+ This::wxGrid(), Row::integer(), Col::integer().
getCellValue(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetCellValue_2,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid()) -> {Horiz::integer(), Vert::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcollabelalignment">external documentation</a>.
+-spec getColLabelAlignment(This) -> {Horiz::integer(), Vert::integer()} when
+ This::wxGrid().
getColLabelAlignment(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetColLabelAlignment,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcollabelsize">external documentation</a>.
+-spec getColLabelSize(This) -> integer() when
+ This::wxGrid().
getColLabelSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetColLabelSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Col::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcollabelvalue">external documentation</a>.
+-spec getColLabelValue(This, Col) -> unicode:charlist() when
+ This::wxGrid(), Col::integer().
getColLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetColLabelValue,
<<ThisRef:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetcolminimalacceptablewidth">external documentation</a>.
+-spec getColMinimalAcceptableWidth(This) -> integer() when
+ This::wxGrid().
getColMinimalAcceptableWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetColMinimalAcceptableWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> {Horiz::integer(), Vert::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultcellalignment">external documentation</a>.
+-spec getDefaultCellAlignment(This) -> {Horiz::integer(), Vert::integer()} when
+ This::wxGrid().
getDefaultCellAlignment(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultCellAlignment,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultcellbackgroundcolour">external documentation</a>.
+-spec getDefaultCellBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxGrid().
getDefaultCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultCellBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultcellfont">external documentation</a>.
+-spec getDefaultCellFont(This) -> wxFont:wxFont() when
+ This::wxGrid().
getDefaultCellFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultCellFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultcelltextcolour">external documentation</a>.
+-spec getDefaultCellTextColour(This) -> wx:wx_colour4() when
+ This::wxGrid().
getDefaultCellTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultCellTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultcollabelsize">external documentation</a>.
+-spec getDefaultColLabelSize(This) -> integer() when
+ This::wxGrid().
getDefaultColLabelSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultColLabelSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultcolsize">external documentation</a>.
+-spec getDefaultColSize(This) -> integer() when
+ This::wxGrid().
getDefaultColSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultColSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wxGridCellEditor:wxGridCellEditor()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaulteditor">external documentation</a>.
+-spec getDefaultEditor(This) -> wxGridCellEditor:wxGridCellEditor() when
+ This::wxGrid().
getDefaultEditor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultEditor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), C::{R::integer(), C::integer()}) -> wxGridCellEditor:wxGridCellEditor()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaulteditorforcell">external documentation</a>.
+-spec getDefaultEditorForCell(This, C) -> wxGridCellEditor:wxGridCellEditor() when
+ This::wxGrid(), C::{R::integer(), C::integer()}.
getDefaultEditorForCell(#wx_ref{type=ThisT,ref=ThisRef},{CR,CC})
when is_integer(CR),is_integer(CC) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultEditorForCell_1,
<<ThisRef:32/?UI,CR:32/?UI,CC:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> wxGridCellEditor:wxGridCellEditor()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaulteditorforcell">external documentation</a>.
+-spec getDefaultEditorForCell(This, Row, Col) -> wxGridCellEditor:wxGridCellEditor() when
+ This::wxGrid(), Row::integer(), Col::integer().
getDefaultEditorForCell(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultEditorForCell_2,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), TypeName::string()) -> wxGridCellEditor:wxGridCellEditor()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaulteditorfortype">external documentation</a>.
+-spec getDefaultEditorForType(This, TypeName) -> wxGridCellEditor:wxGridCellEditor() when
+ This::wxGrid(), TypeName::unicode:chardata().
getDefaultEditorForType(#wx_ref{type=ThisT,ref=ThisRef},TypeName)
when is_list(TypeName) ->
?CLASS(ThisT,wxGrid),
@@ -753,23 +855,26 @@ getDefaultEditorForType(#wx_ref{type=ThisT,ref=ThisRef},TypeName)
wxe_util:call(?wxGrid_GetDefaultEditorForType,
<<ThisRef:32/?UI,(byte_size(TypeName_UC)):32/?UI,(TypeName_UC)/binary, 0:(((8- ((0+byte_size(TypeName_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGrid()) -> wxGridCellRenderer:wxGridCellRenderer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultrenderer">external documentation</a>.
+-spec getDefaultRenderer(This) -> wxGridCellRenderer:wxGridCellRenderer() when
+ This::wxGrid().
getDefaultRenderer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultRenderer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> wxGridCellRenderer:wxGridCellRenderer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultrendererforcell">external documentation</a>.
+-spec getDefaultRendererForCell(This, Row, Col) -> wxGridCellRenderer:wxGridCellRenderer() when
+ This::wxGrid(), Row::integer(), Col::integer().
getDefaultRendererForCell(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultRendererForCell,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), TypeName::string()) -> wxGridCellRenderer:wxGridCellRenderer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultrendererfortype">external documentation</a>.
+-spec getDefaultRendererForType(This, TypeName) -> wxGridCellRenderer:wxGridCellRenderer() when
+ This::wxGrid(), TypeName::unicode:chardata().
getDefaultRendererForType(#wx_ref{type=ThisT,ref=ThisRef},TypeName)
when is_list(TypeName) ->
?CLASS(ThisT,wxGrid),
@@ -777,242 +882,279 @@ getDefaultRendererForType(#wx_ref{type=ThisT,ref=ThisRef},TypeName)
wxe_util:call(?wxGrid_GetDefaultRendererForType,
<<ThisRef:32/?UI,(byte_size(TypeName_UC)):32/?UI,(TypeName_UC)/binary, 0:(((8- ((0+byte_size(TypeName_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultrowlabelsize">external documentation</a>.
+-spec getDefaultRowLabelSize(This) -> integer() when
+ This::wxGrid().
getDefaultRowLabelSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultRowLabelSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetdefaultrowsize">external documentation</a>.
+-spec getDefaultRowSize(This) -> integer() when
+ This::wxGrid().
getDefaultRowSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetDefaultRowSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetgridcursorcol">external documentation</a>.
+-spec getGridCursorCol(This) -> integer() when
+ This::wxGrid().
getGridCursorCol(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetGridCursorCol,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetgridcursorrow">external documentation</a>.
+-spec getGridCursorRow(This) -> integer() when
+ This::wxGrid().
getGridCursorRow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetGridCursorRow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetgridlinecolour">external documentation</a>.
+-spec getGridLineColour(This) -> wx:wx_colour4() when
+ This::wxGrid().
getGridLineColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetGridLineColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgridlinesenabled">external documentation</a>.
+-spec gridLinesEnabled(This) -> boolean() when
+ This::wxGrid().
gridLinesEnabled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GridLinesEnabled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetlabelbackgroundcolour">external documentation</a>.
+-spec getLabelBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxGrid().
getLabelBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetLabelBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetlabelfont">external documentation</a>.
+-spec getLabelFont(This) -> wxFont:wxFont() when
+ This::wxGrid().
getLabelFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetLabelFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetlabeltextcolour">external documentation</a>.
+-spec getLabelTextColour(This) -> wx:wx_colour4() when
+ This::wxGrid().
getLabelTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetLabelTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetnumbercols">external documentation</a>.
+-spec getNumberCols(This) -> integer() when
+ This::wxGrid().
getNumberCols(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetNumberCols,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetnumberrows">external documentation</a>.
+-spec getNumberRows(This) -> integer() when
+ This::wxGrid().
getNumberRows(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetNumberRows,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> wxGridCellAttr:wxGridCellAttr()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetorcreatecellattr">external documentation</a>.
+-spec getOrCreateCellAttr(This, Row, Col) -> wxGridCellAttr:wxGridCellAttr() when
+ This::wxGrid(), Row::integer(), Col::integer().
getOrCreateCellAttr(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetOrCreateCellAttr,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetrowminimalacceptableheight">external documentation</a>.
+-spec getRowMinimalAcceptableHeight(This) -> integer() when
+ This::wxGrid().
getRowMinimalAcceptableHeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetRowMinimalAcceptableHeight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> {Horiz::integer(), Vert::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetrowlabelalignment">external documentation</a>.
+-spec getRowLabelAlignment(This) -> {Horiz::integer(), Vert::integer()} when
+ This::wxGrid().
getRowLabelAlignment(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetRowLabelAlignment,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetrowlabelsize">external documentation</a>.
+-spec getRowLabelSize(This) -> integer() when
+ This::wxGrid().
getRowLabelSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetRowLabelSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetrowlabelvalue">external documentation</a>.
+-spec getRowLabelValue(This, Row) -> unicode:charlist() when
+ This::wxGrid(), Row::integer().
getRowLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Row)
when is_integer(Row) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetRowLabelValue,
<<ThisRef:32/?UI,Row:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetrowsize">external documentation</a>.
+-spec getRowSize(This, Row) -> integer() when
+ This::wxGrid(), Row::integer().
getRowSize(#wx_ref{type=ThisT,ref=ThisRef},Row)
when is_integer(Row) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetRowSize,
<<ThisRef:32/?UI,Row:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetscrolllinex">external documentation</a>.
+-spec getScrollLineX(This) -> integer() when
+ This::wxGrid().
getScrollLineX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetScrollLineX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetscrollliney">external documentation</a>.
+-spec getScrollLineY(This) -> integer() when
+ This::wxGrid().
getScrollLineY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetScrollLineY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> [{R::integer(), C::integer()}]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetselectedcells">external documentation</a>.
+-spec getSelectedCells(This) -> [{R::integer(), C::integer()}] when
+ This::wxGrid().
getSelectedCells(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetSelectedCells,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> [integer()]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetselectedcols">external documentation</a>.
+-spec getSelectedCols(This) -> [integer()] when
+ This::wxGrid().
getSelectedCols(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetSelectedCols,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> [integer()]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetselectedrows">external documentation</a>.
+-spec getSelectedRows(This) -> [integer()] when
+ This::wxGrid().
getSelectedRows(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetSelectedRows,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetselectionbackground">external documentation</a>.
+-spec getSelectionBackground(This) -> wx:wx_colour4() when
+ This::wxGrid().
getSelectionBackground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetSelectionBackground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> [{R::integer(), C::integer()}]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetselectionblocktopleft">external documentation</a>.
+-spec getSelectionBlockTopLeft(This) -> [{R::integer(), C::integer()}] when
+ This::wxGrid().
getSelectionBlockTopLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetSelectionBlockTopLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> [{R::integer(), C::integer()}]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetselectionblockbottomright">external documentation</a>.
+-spec getSelectionBlockBottomRight(This) -> [{R::integer(), C::integer()}] when
+ This::wxGrid().
getSelectionBlockBottomRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetSelectionBlockBottomRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetselectionforeground">external documentation</a>.
+-spec getSelectionForeground(This) -> wx:wx_colour4() when
+ This::wxGrid().
getSelectionForeground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetSelectionForeground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetviewwidth">external documentation</a>.
+-spec getViewWidth(This) -> integer() when
+ This::wxGrid().
getViewWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetViewWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetgridwindow">external documentation</a>.
+-spec getGridWindow(This) -> wxWindow:wxWindow() when
+ This::wxGrid().
getGridWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetGridWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetgridrowlabelwindow">external documentation</a>.
+-spec getGridRowLabelWindow(This) -> wxWindow:wxWindow() when
+ This::wxGrid().
getGridRowLabelWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetGridRowLabelWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetgridcollabelwindow">external documentation</a>.
+-spec getGridColLabelWindow(This) -> wxWindow:wxWindow() when
+ This::wxGrid().
getGridColLabelWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetGridColLabelWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridgetgridcornerlabelwindow">external documentation</a>.
+-spec getGridCornerLabelWindow(This) -> wxWindow:wxWindow() when
+ This::wxGrid().
getGridCornerLabelWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_GetGridCornerLabelWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridhidecelleditcontrol">external documentation</a>.
+-spec hideCellEditControl(This) -> ok when
+ This::wxGrid().
hideCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_HideCellEditControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @equiv insertCols(This, [])
+-spec insertCols(This) -> boolean() when
+ This::wxGrid().
+
insertCols(This)
when is_record(This, wx_ref) ->
insertCols(This, []).
-%% @spec (This::wxGrid(), [Option]) -> bool()
-%% Option = {pos, integer()} | {numCols, integer()} | {updateLabels, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridinsertcols">external documentation</a>.
+-spec insertCols(This, [Option]) -> boolean() when
+ This::wxGrid(),
+ Option :: {pos, integer()}
+ | {numCols, integer()}
+ | {updateLabels, boolean()}.
insertCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1024,15 +1166,20 @@ insertCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGrid_InsertCols,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> bool()
%% @equiv insertRows(This, [])
+-spec insertRows(This) -> boolean() when
+ This::wxGrid().
+
insertRows(This)
when is_record(This, wx_ref) ->
insertRows(This, []).
-%% @spec (This::wxGrid(), [Option]) -> bool()
-%% Option = {pos, integer()} | {numRows, integer()} | {updateLabels, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridinsertrows">external documentation</a>.
+-spec insertRows(This, [Option]) -> boolean() when
+ This::wxGrid(),
+ Option :: {pos, integer()}
+ | {numRows, integer()}
+ | {updateLabels, boolean()}.
insertRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1044,73 +1191,84 @@ insertRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGrid_InsertRows,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridiscelleditcontrolenabled">external documentation</a>.
+-spec isCellEditControlEnabled(This) -> boolean() when
+ This::wxGrid().
isCellEditControlEnabled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_IsCellEditControlEnabled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridiscurrentcellreadonly">external documentation</a>.
+-spec isCurrentCellReadOnly(This) -> boolean() when
+ This::wxGrid().
isCurrentCellReadOnly(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_IsCurrentCellReadOnly,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridiseditable">external documentation</a>.
+-spec isEditable(This) -> boolean() when
+ This::wxGrid().
isEditable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_IsEditable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Coords::{R::integer(), C::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridisinselection">external documentation</a>.
+-spec isInSelection(This, Coords) -> boolean() when
+ This::wxGrid(), Coords::{R::integer(), C::integer()}.
isInSelection(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC})
when is_integer(CoordsR),is_integer(CoordsC) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_IsInSelection_1,
<<ThisRef:32/?UI,CoordsR:32/?UI,CoordsC:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridisinselection">external documentation</a>.
+-spec isInSelection(This, Row, Col) -> boolean() when
+ This::wxGrid(), Row::integer(), Col::integer().
isInSelection(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_IsInSelection_2,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridisreadonly">external documentation</a>.
+-spec isReadOnly(This, Row, Col) -> boolean() when
+ This::wxGrid(), Row::integer(), Col::integer().
isReadOnly(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_IsReadOnly,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridisselection">external documentation</a>.
+-spec isSelection(This) -> boolean() when
+ This::wxGrid().
isSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_IsSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), Coords::{R::integer(), C::integer()}) -> bool()
%% @equiv isVisible(This,Coords, [])
+-spec isVisible(This, Coords) -> boolean() when
+ This::wxGrid(), Coords::{R::integer(), C::integer()}.
+
isVisible(This,Coords={CoordsR,CoordsC})
when is_record(This, wx_ref),is_integer(CoordsR),is_integer(CoordsC) ->
isVisible(This,Coords, []).
-%% @spec (This::wxGrid(),X::integer()|term(),X::integer()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridisvisible">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% isVisible(This::wxGrid(), Row::integer(), Col::integer()) -> isVisible(This,Row,Col, []) </c></p>
-%% <p><c>
-%% isVisible(This::wxGrid(), Coords::{R::integer(), C::integer()}, [Option]) -> bool() </c>
-%%<br /> Option = {wholeCellVisible, bool()}
-%% </p>
+%% <br /> Also:<br />
+%% isVisible(This, Coords, [Option]) -> boolean() when<br />
+%% This::wxGrid(), Coords::{R::integer(), C::integer()},<br />
+%% Option :: {wholeCellVisible, boolean()}.<br />
+%%
+-spec isVisible(This, Row, Col) -> boolean() when
+ This::wxGrid(), Row::integer(), Col::integer();
+ (This, Coords, [Option]) -> boolean() when
+ This::wxGrid(), Coords::{R::integer(), C::integer()},
+ Option :: {wholeCellVisible, boolean()}.
isVisible(This,Row,Col)
when is_record(This, wx_ref),is_integer(Row),is_integer(Col) ->
@@ -1124,9 +1282,10 @@ isVisible(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC}, Options)
wxe_util:call(?wxGrid_IsVisible_2,
<<ThisRef:32/?UI,CoordsR:32/?UI,CoordsC:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer(), [Option]) -> bool()
-%% Option = {wholeCellVisible, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridisvisible">external documentation</a>.
+-spec isVisible(This, Row, Col, [Option]) -> boolean() when
+ This::wxGrid(), Row::integer(), Col::integer(),
+ Option :: {wholeCellVisible, boolean()}.
isVisible(#wx_ref{type=ThisT,ref=ThisRef},Row,Col, Options)
when is_integer(Row),is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1136,102 +1295,115 @@ isVisible(#wx_ref{type=ThisT,ref=ThisRef},Row,Col, Options)
wxe_util:call(?wxGrid_IsVisible_3,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid(), Coords::{R::integer(), C::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmakecellvisible">external documentation</a>.
+-spec makeCellVisible(This, Coords) -> ok when
+ This::wxGrid(), Coords::{R::integer(), C::integer()}.
makeCellVisible(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC})
when is_integer(CoordsR),is_integer(CoordsC) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_MakeCellVisible_1,
<<ThisRef:32/?UI,CoordsR:32/?UI,CoordsC:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmakecellvisible">external documentation</a>.
+-spec makeCellVisible(This, Row, Col) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer().
makeCellVisible(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_MakeCellVisible_2,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), ExpandSelection::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovecursordown">external documentation</a>.
+-spec moveCursorDown(This, ExpandSelection) -> boolean() when
+ This::wxGrid(), ExpandSelection::boolean().
moveCursorDown(#wx_ref{type=ThisT,ref=ThisRef},ExpandSelection)
when is_boolean(ExpandSelection) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MoveCursorDown,
<<ThisRef:32/?UI,(wxe_util:from_bool(ExpandSelection)):32/?UI>>).
-%% @spec (This::wxGrid(), ExpandSelection::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovecursorleft">external documentation</a>.
+-spec moveCursorLeft(This, ExpandSelection) -> boolean() when
+ This::wxGrid(), ExpandSelection::boolean().
moveCursorLeft(#wx_ref{type=ThisT,ref=ThisRef},ExpandSelection)
when is_boolean(ExpandSelection) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MoveCursorLeft,
<<ThisRef:32/?UI,(wxe_util:from_bool(ExpandSelection)):32/?UI>>).
-%% @spec (This::wxGrid(), ExpandSelection::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovecursorright">external documentation</a>.
+-spec moveCursorRight(This, ExpandSelection) -> boolean() when
+ This::wxGrid(), ExpandSelection::boolean().
moveCursorRight(#wx_ref{type=ThisT,ref=ThisRef},ExpandSelection)
when is_boolean(ExpandSelection) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MoveCursorRight,
<<ThisRef:32/?UI,(wxe_util:from_bool(ExpandSelection)):32/?UI>>).
-%% @spec (This::wxGrid(), ExpandSelection::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovecursorup">external documentation</a>.
+-spec moveCursorUp(This, ExpandSelection) -> boolean() when
+ This::wxGrid(), ExpandSelection::boolean().
moveCursorUp(#wx_ref{type=ThisT,ref=ThisRef},ExpandSelection)
when is_boolean(ExpandSelection) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MoveCursorUp,
<<ThisRef:32/?UI,(wxe_util:from_bool(ExpandSelection)):32/?UI>>).
-%% @spec (This::wxGrid(), ExpandSelection::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovecursordownblock">external documentation</a>.
+-spec moveCursorDownBlock(This, ExpandSelection) -> boolean() when
+ This::wxGrid(), ExpandSelection::boolean().
moveCursorDownBlock(#wx_ref{type=ThisT,ref=ThisRef},ExpandSelection)
when is_boolean(ExpandSelection) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MoveCursorDownBlock,
<<ThisRef:32/?UI,(wxe_util:from_bool(ExpandSelection)):32/?UI>>).
-%% @spec (This::wxGrid(), ExpandSelection::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovecursorleftblock">external documentation</a>.
+-spec moveCursorLeftBlock(This, ExpandSelection) -> boolean() when
+ This::wxGrid(), ExpandSelection::boolean().
moveCursorLeftBlock(#wx_ref{type=ThisT,ref=ThisRef},ExpandSelection)
when is_boolean(ExpandSelection) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MoveCursorLeftBlock,
<<ThisRef:32/?UI,(wxe_util:from_bool(ExpandSelection)):32/?UI>>).
-%% @spec (This::wxGrid(), ExpandSelection::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovecursorrightblock">external documentation</a>.
+-spec moveCursorRightBlock(This, ExpandSelection) -> boolean() when
+ This::wxGrid(), ExpandSelection::boolean().
moveCursorRightBlock(#wx_ref{type=ThisT,ref=ThisRef},ExpandSelection)
when is_boolean(ExpandSelection) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MoveCursorRightBlock,
<<ThisRef:32/?UI,(wxe_util:from_bool(ExpandSelection)):32/?UI>>).
-%% @spec (This::wxGrid(), ExpandSelection::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovecursorupblock">external documentation</a>.
+-spec moveCursorUpBlock(This, ExpandSelection) -> boolean() when
+ This::wxGrid(), ExpandSelection::boolean().
moveCursorUpBlock(#wx_ref{type=ThisT,ref=ThisRef},ExpandSelection)
when is_boolean(ExpandSelection) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MoveCursorUpBlock,
<<ThisRef:32/?UI,(wxe_util:from_bool(ExpandSelection)):32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovepagedown">external documentation</a>.
+-spec movePageDown(This) -> boolean() when
+ This::wxGrid().
movePageDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MovePageDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridmovepageup">external documentation</a>.
+-spec movePageUp(This) -> boolean() when
+ This::wxGrid().
movePageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_MovePageUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), TypeName::string(), Renderer::wxGridCellRenderer:wxGridCellRenderer(), Editor::wxGridCellEditor:wxGridCellEditor()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridregisterdatatype">external documentation</a>.
+-spec registerDataType(This, TypeName, Renderer, Editor) -> ok when
+ This::wxGrid(), TypeName::unicode:chardata(), Renderer::wxGridCellRenderer:wxGridCellRenderer(), Editor::wxGridCellEditor:wxGridCellEditor().
registerDataType(#wx_ref{type=ThisT,ref=ThisRef},TypeName,#wx_ref{type=RendererT,ref=RendererRef},#wx_ref{type=EditorT,ref=EditorRef})
when is_list(TypeName) ->
?CLASS(ThisT,wxGrid),
@@ -1241,29 +1413,34 @@ registerDataType(#wx_ref{type=ThisT,ref=ThisRef},TypeName,#wx_ref{type=RendererT
wxe_util:cast(?wxGrid_RegisterDataType,
<<ThisRef:32/?UI,(byte_size(TypeName_UC)):32/?UI,(TypeName_UC)/binary, 0:(((8- ((0+byte_size(TypeName_UC)) band 16#7)) band 16#7))/unit:8,RendererRef:32/?UI,EditorRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsaveeditcontrolvalue">external documentation</a>.
+-spec saveEditControlValue(This) -> ok when
+ This::wxGrid().
saveEditControlValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SaveEditControlValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridselectall">external documentation</a>.
+-spec selectAll(This) -> ok when
+ This::wxGrid().
selectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SelectAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), TopLeft::{R::integer(), C::integer()}, BottomRight::{R::integer(), C::integer()}) -> ok
%% @equiv selectBlock(This,TopLeft,BottomRight, [])
+-spec selectBlock(This, TopLeft, BottomRight) -> ok when
+ This::wxGrid(), TopLeft::{R::integer(), C::integer()}, BottomRight::{R::integer(), C::integer()}.
+
selectBlock(This,TopLeft={TopLeftR,TopLeftC},BottomRight={BottomRightR,BottomRightC})
when is_record(This, wx_ref),is_integer(TopLeftR),is_integer(TopLeftC),is_integer(BottomRightR),is_integer(BottomRightC) ->
selectBlock(This,TopLeft,BottomRight, []).
-%% @spec (This::wxGrid(), TopLeft::{R::integer(), C::integer()}, BottomRight::{R::integer(), C::integer()}, [Option]) -> ok
-%% Option = {addToSelected, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridselectblock">external documentation</a>.
+-spec selectBlock(This, TopLeft, BottomRight, [Option]) -> ok when
+ This::wxGrid(), TopLeft::{R::integer(), C::integer()}, BottomRight::{R::integer(), C::integer()},
+ Option :: {addToSelected, boolean()}.
selectBlock(#wx_ref{type=ThisT,ref=ThisRef},{TopLeftR,TopLeftC},{BottomRightR,BottomRightC}, Options)
when is_integer(TopLeftR),is_integer(TopLeftC),is_integer(BottomRightR),is_integer(BottomRightC),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1273,15 +1450,18 @@ selectBlock(#wx_ref{type=ThisT,ref=ThisRef},{TopLeftR,TopLeftC},{BottomRightR,Bo
wxe_util:cast(?wxGrid_SelectBlock_3,
<<ThisRef:32/?UI,TopLeftR:32/?UI,TopLeftC:32/?UI,BottomRightR:32/?UI,BottomRightC:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid(), TopRow::integer(), LeftCol::integer(), BottomRow::integer(), RightCol::integer()) -> ok
%% @equiv selectBlock(This,TopRow,LeftCol,BottomRow,RightCol, [])
+-spec selectBlock(This, TopRow, LeftCol, BottomRow, RightCol) -> ok when
+ This::wxGrid(), TopRow::integer(), LeftCol::integer(), BottomRow::integer(), RightCol::integer().
+
selectBlock(This,TopRow,LeftCol,BottomRow,RightCol)
when is_record(This, wx_ref),is_integer(TopRow),is_integer(LeftCol),is_integer(BottomRow),is_integer(RightCol) ->
selectBlock(This,TopRow,LeftCol,BottomRow,RightCol, []).
-%% @spec (This::wxGrid(), TopRow::integer(), LeftCol::integer(), BottomRow::integer(), RightCol::integer(), [Option]) -> ok
-%% Option = {addToSelected, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridselectblock">external documentation</a>.
+-spec selectBlock(This, TopRow, LeftCol, BottomRow, RightCol, [Option]) -> ok when
+ This::wxGrid(), TopRow::integer(), LeftCol::integer(), BottomRow::integer(), RightCol::integer(),
+ Option :: {addToSelected, boolean()}.
selectBlock(#wx_ref{type=ThisT,ref=ThisRef},TopRow,LeftCol,BottomRow,RightCol, Options)
when is_integer(TopRow),is_integer(LeftCol),is_integer(BottomRow),is_integer(RightCol),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1291,15 +1471,18 @@ selectBlock(#wx_ref{type=ThisT,ref=ThisRef},TopRow,LeftCol,BottomRow,RightCol, O
wxe_util:cast(?wxGrid_SelectBlock_5,
<<ThisRef:32/?UI,TopRow:32/?UI,LeftCol:32/?UI,BottomRow:32/?UI,RightCol:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid(), Col::integer()) -> ok
%% @equiv selectCol(This,Col, [])
+-spec selectCol(This, Col) -> ok when
+ This::wxGrid(), Col::integer().
+
selectCol(This,Col)
when is_record(This, wx_ref),is_integer(Col) ->
selectCol(This,Col, []).
-%% @spec (This::wxGrid(), Col::integer(), [Option]) -> ok
-%% Option = {addToSelected, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridselectcol">external documentation</a>.
+-spec selectCol(This, Col, [Option]) -> ok when
+ This::wxGrid(), Col::integer(),
+ Option :: {addToSelected, boolean()}.
selectCol(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
when is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1309,15 +1492,18 @@ selectCol(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
wxe_util:cast(?wxGrid_SelectCol,
<<ThisRef:32/?UI,Col:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGrid(), Row::integer()) -> ok
%% @equiv selectRow(This,Row, [])
+-spec selectRow(This, Row) -> ok when
+ This::wxGrid(), Row::integer().
+
selectRow(This,Row)
when is_record(This, wx_ref),is_integer(Row) ->
selectRow(This,Row, []).
-%% @spec (This::wxGrid(), Row::integer(), [Option]) -> ok
-%% Option = {addToSelected, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridselectrow">external documentation</a>.
+-spec selectRow(This, Row, [Option]) -> ok when
+ This::wxGrid(), Row::integer(),
+ Option :: {addToSelected, boolean()}.
selectRow(#wx_ref{type=ThisT,ref=ThisRef},Row, Options)
when is_integer(Row),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1327,47 +1513,51 @@ selectRow(#wx_ref{type=ThisT,ref=ThisRef},Row, Options)
wxe_util:cast(?wxGrid_SelectRow,
<<ThisRef:32/?UI,Row:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGrid(), Align::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellalignment">external documentation</a>.
+-spec setCellAlignment(This, Align) -> ok when
+ This::wxGrid(), Align::integer().
setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align)
when is_integer(Align) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetCellAlignment_1,
<<ThisRef:32/?UI,Align:32/?UI>>).
-%% @spec (This::wxGrid(), Align::integer(), Row::integer(), Col::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellalignment">external documentation</a>.
+-spec setCellAlignment(This, Align, Row, Col) -> ok when
+ This::wxGrid(), Align::integer(), Row::integer(), Col::integer().
setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align,Row,Col)
when is_integer(Align),is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetCellAlignment_3,
<<ThisRef:32/?UI,Align:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer(), Horiz::integer(), Vert::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellalignment">external documentation</a>.
+-spec setCellAlignment(This, Row, Col, Horiz, Vert) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer(), Horiz::integer(), Vert::integer().
setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,Horiz,Vert)
when is_integer(Row),is_integer(Col),is_integer(Horiz),is_integer(Vert) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetCellAlignment_4,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,Horiz:32/?UI,Vert:32/?UI>>).
-%% @spec (This::wxGrid(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellbackgroundcolour">external documentation</a>.
+-spec setCellBackgroundColour(This, Col) -> ok when
+ This::wxGrid(), Col::wx:wx_colour().
setCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetCellBackgroundColour_1,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxGrid(),X::integer()|term(),X::integer(),X::term()|integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellbackgroundcolour">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setCellBackgroundColour(This::wxGrid(), Row::integer(), Col::integer(), Val::wx:colour()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setCellBackgroundColour(This::wxGrid(), Colour::wx:colour(), Row::integer(), Col::integer()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setCellBackgroundColour(This, Colour, Row, Col) -> ok when<br />
+%% This::wxGrid(), Colour::wx:wx_colour(), Row::integer(), Col::integer().<br />
+%%
+-spec setCellBackgroundColour(This, Row, Col, Val) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer(), Val::wx:wx_colour();
+ (This, Colour, Row, Col) -> ok when
+ This::wxGrid(), Colour::wx:wx_colour(), Row::integer(), Col::integer().
setCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,Val)
when is_integer(Row),is_integer(Col),tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
?CLASS(ThisT,wxGrid),
@@ -1379,8 +1569,9 @@ setCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour,Row,Col)
wxe_util:cast(?wxGrid_SetCellBackgroundColour_3_1,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer(), Editor::wxGridCellEditor:wxGridCellEditor()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcelleditor">external documentation</a>.
+-spec setCellEditor(This, Row, Col, Editor) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer(), Editor::wxGridCellEditor:wxGridCellEditor().
setCellEditor(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=EditorT,ref=EditorRef})
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
@@ -1388,8 +1579,9 @@ setCellEditor(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=EditorT,ref=E
wxe_util:cast(?wxGrid_SetCellEditor,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,EditorRef:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer(), Val::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellfont">external documentation</a>.
+-spec setCellFont(This, Row, Col, Val) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer(), Val::wxFont:wxFont().
setCellFont(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=ValT,ref=ValRef})
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
@@ -1397,8 +1589,9 @@ setCellFont(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=ValT,ref=ValRef
wxe_util:cast(?wxGrid_SetCellFont,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,ValRef:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer(), Renderer::wxGridCellRenderer:wxGridCellRenderer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellrenderer">external documentation</a>.
+-spec setCellRenderer(This, Row, Col, Renderer) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer(), Renderer::wxGridCellRenderer:wxGridCellRenderer().
setCellRenderer(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=RendererT,ref=RendererRef})
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
@@ -1406,23 +1599,24 @@ setCellRenderer(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=RendererT,r
wxe_util:cast(?wxGrid_SetCellRenderer,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,RendererRef:32/?UI>>).
-%% @spec (This::wxGrid(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcelltextcolour">external documentation</a>.
+-spec setCellTextColour(This, Col) -> ok when
+ This::wxGrid(), Col::wx:wx_colour().
setCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetCellTextColour_1,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxGrid(),X::integer()|term(),X::integer(),X::term()|integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcelltextcolour">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setCellTextColour(This::wxGrid(), Row::integer(), Col::integer(), Val::wx:colour()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setCellTextColour(This::wxGrid(), Val::wx:colour(), Row::integer(), Col::integer()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setCellTextColour(This, Val, Row, Col) -> ok when<br />
+%% This::wxGrid(), Val::wx:wx_colour(), Row::integer(), Col::integer().<br />
+%%
+-spec setCellTextColour(This, Row, Col, Val) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer(), Val::wx:wx_colour();
+ (This, Val, Row, Col) -> ok when
+ This::wxGrid(), Val::wx:wx_colour(), Row::integer(), Col::integer().
setCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,Val)
when is_integer(Row),is_integer(Col),tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
?CLASS(ThisT,wxGrid),
@@ -1434,8 +1628,9 @@ setCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Val,Row,Col)
wxe_util:cast(?wxGrid_SetCellTextColour_3_1,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Coords::{R::integer(), C::integer()}, S::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellvalue">external documentation</a>.
+-spec setCellValue(This, Coords, S) -> ok when
+ This::wxGrid(), Coords::{R::integer(), C::integer()}, S::unicode:chardata().
setCellValue(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC},S)
when is_integer(CoordsR),is_integer(CoordsC),is_list(S) ->
?CLASS(ThisT,wxGrid),
@@ -1443,15 +1638,15 @@ setCellValue(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC},S)
wxe_util:cast(?wxGrid_SetCellValue_2,
<<ThisRef:32/?UI,CoordsR:32/?UI,CoordsC:32/?UI,(byte_size(S_UC)):32/?UI,(S_UC)/binary, 0:(((8- ((0+byte_size(S_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGrid(),X::integer()|string(),X::integer(),X::string()|integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcellvalue">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setCellValue(This::wxGrid(), Row::integer(), Col::integer(), S::string()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setCellValue(This::wxGrid(), Val::string(), Row::integer(), Col::integer()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setCellValue(This, Val, Row, Col) -> ok when<br />
+%% This::wxGrid(), Val::unicode:chardata(), Row::integer(), Col::integer().<br />
+%%
+-spec setCellValue(This, Row, Col, S) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer(), S::unicode:chardata();
+ (This, Val, Row, Col) -> ok when
+ This::wxGrid(), Val::unicode:chardata(), Row::integer(), Col::integer().
setCellValue(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,S)
when is_integer(Row),is_integer(Col),is_list(S) ->
?CLASS(ThisT,wxGrid),
@@ -1465,8 +1660,9 @@ setCellValue(#wx_ref{type=ThisT,ref=ThisRef},Val,Row,Col)
wxe_util:cast(?wxGrid_SetCellValue_3_1,
<<ThisRef:32/?UI,(byte_size(Val_UC)):32/?UI,(Val_UC)/binary, 0:(((8- ((0+byte_size(Val_UC)) band 16#7)) band 16#7))/unit:8,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Col::integer(), Attr::wxGridCellAttr:wxGridCellAttr()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcolattr">external documentation</a>.
+-spec setColAttr(This, Col, Attr) -> ok when
+ This::wxGrid(), Col::integer(), Attr::wxGridCellAttr:wxGridCellAttr().
setColAttr(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=AttrT,ref=AttrRef})
when is_integer(Col) ->
?CLASS(ThisT,wxGrid),
@@ -1474,31 +1670,37 @@ setColAttr(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=AttrT,ref=AttrRef})
wxe_util:cast(?wxGrid_SetColAttr,
<<ThisRef:32/?UI,Col:32/?UI,AttrRef:32/?UI>>).
-%% @spec (This::wxGrid(), Col::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcolformatbool">external documentation</a>.
+-spec setColFormatBool(This, Col) -> ok when
+ This::wxGrid(), Col::integer().
setColFormatBool(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetColFormatBool,
<<ThisRef:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Col::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcolformatnumber">external documentation</a>.
+-spec setColFormatNumber(This, Col) -> ok when
+ This::wxGrid(), Col::integer().
setColFormatNumber(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetColFormatNumber,
<<ThisRef:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Col::integer()) -> ok
%% @equiv setColFormatFloat(This,Col, [])
+-spec setColFormatFloat(This, Col) -> ok when
+ This::wxGrid(), Col::integer().
+
setColFormatFloat(This,Col)
when is_record(This, wx_ref),is_integer(Col) ->
setColFormatFloat(This,Col, []).
-%% @spec (This::wxGrid(), Col::integer(), [Option]) -> ok
-%% Option = {width, integer()} | {precision, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcolformatfloat">external documentation</a>.
+-spec setColFormatFloat(This, Col, [Option]) -> ok when
+ This::wxGrid(), Col::integer(),
+ Option :: {width, integer()}
+ | {precision, integer()}.
setColFormatFloat(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
when is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1509,8 +1711,9 @@ setColFormatFloat(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
wxe_util:cast(?wxGrid_SetColFormatFloat,
<<ThisRef:32/?UI,Col:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGrid(), Col::integer(), TypeName::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcolformatcustom">external documentation</a>.
+-spec setColFormatCustom(This, Col, TypeName) -> ok when
+ This::wxGrid(), Col::integer(), TypeName::unicode:chardata().
setColFormatCustom(#wx_ref{type=ThisT,ref=ThisRef},Col,TypeName)
when is_integer(Col),is_list(TypeName) ->
?CLASS(ThisT,wxGrid),
@@ -1518,24 +1721,27 @@ setColFormatCustom(#wx_ref{type=ThisT,ref=ThisRef},Col,TypeName)
wxe_util:cast(?wxGrid_SetColFormatCustom,
<<ThisRef:32/?UI,Col:32/?UI,(byte_size(TypeName_UC)):32/?UI,(TypeName_UC)/binary, 0:(((8- ((4+byte_size(TypeName_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGrid(), Horiz::integer(), Vert::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcollabelalignment">external documentation</a>.
+-spec setColLabelAlignment(This, Horiz, Vert) -> ok when
+ This::wxGrid(), Horiz::integer(), Vert::integer().
setColLabelAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
when is_integer(Horiz),is_integer(Vert) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetColLabelAlignment,
<<ThisRef:32/?UI,Horiz:32/?UI,Vert:32/?UI>>).
-%% @spec (This::wxGrid(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcollabelsize">external documentation</a>.
+-spec setColLabelSize(This, Height) -> ok when
+ This::wxGrid(), Height::integer().
setColLabelSize(#wx_ref{type=ThisT,ref=ThisRef},Height)
when is_integer(Height) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetColLabelSize,
<<ThisRef:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxGrid(), Col::integer(), Val::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcollabelvalue">external documentation</a>.
+-spec setColLabelValue(This, Col, Val) -> ok when
+ This::wxGrid(), Col::integer(), Val::unicode:chardata().
setColLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Col,Val)
when is_integer(Col),is_list(Val) ->
?CLASS(ThisT,wxGrid),
@@ -1543,87 +1749,99 @@ setColLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Col,Val)
wxe_util:cast(?wxGrid_SetColLabelValue,
<<ThisRef:32/?UI,Col:32/?UI,(byte_size(Val_UC)):32/?UI,(Val_UC)/binary, 0:(((8- ((4+byte_size(Val_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGrid(), Col::integer(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcolminimalwidth">external documentation</a>.
+-spec setColMinimalWidth(This, Col, Width) -> ok when
+ This::wxGrid(), Col::integer(), Width::integer().
setColMinimalWidth(#wx_ref{type=ThisT,ref=ThisRef},Col,Width)
when is_integer(Col),is_integer(Width) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetColMinimalWidth,
<<ThisRef:32/?UI,Col:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxGrid(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcolminimalacceptablewidth">external documentation</a>.
+-spec setColMinimalAcceptableWidth(This, Width) -> ok when
+ This::wxGrid(), Width::integer().
setColMinimalAcceptableWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetColMinimalAcceptableWidth,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxGrid(), Col::integer(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetcolsize">external documentation</a>.
+-spec setColSize(This, Col, Width) -> ok when
+ This::wxGrid(), Col::integer(), Width::integer().
setColSize(#wx_ref{type=ThisT,ref=ThisRef},Col,Width)
when is_integer(Col),is_integer(Width) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetColSize,
<<ThisRef:32/?UI,Col:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxGrid(), Horiz::integer(), Vert::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetdefaultcellalignment">external documentation</a>.
+-spec setDefaultCellAlignment(This, Horiz, Vert) -> ok when
+ This::wxGrid(), Horiz::integer(), Vert::integer().
setDefaultCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
when is_integer(Horiz),is_integer(Vert) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetDefaultCellAlignment,
<<ThisRef:32/?UI,Horiz:32/?UI,Vert:32/?UI>>).
-%% @spec (This::wxGrid(), Val::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetdefaultcellbackgroundcolour">external documentation</a>.
+-spec setDefaultCellBackgroundColour(This, Val) -> ok when
+ This::wxGrid(), Val::wx:wx_colour().
setDefaultCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetDefaultCellBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
-%% @spec (This::wxGrid(), Val::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetdefaultcellfont">external documentation</a>.
+-spec setDefaultCellFont(This, Val) -> ok when
+ This::wxGrid(), Val::wxFont:wxFont().
setDefaultCellFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ValT,ref=ValRef}) ->
?CLASS(ThisT,wxGrid),
?CLASS(ValT,wxFont),
wxe_util:cast(?wxGrid_SetDefaultCellFont,
<<ThisRef:32/?UI,ValRef:32/?UI>>).
-%% @spec (This::wxGrid(), Val::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetdefaultcelltextcolour">external documentation</a>.
+-spec setDefaultCellTextColour(This, Val) -> ok when
+ This::wxGrid(), Val::wx:wx_colour().
setDefaultCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetDefaultCellTextColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
-%% @spec (This::wxGrid(), Editor::wxGridCellEditor:wxGridCellEditor()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetdefaulteditor">external documentation</a>.
+-spec setDefaultEditor(This, Editor) -> ok when
+ This::wxGrid(), Editor::wxGridCellEditor:wxGridCellEditor().
setDefaultEditor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EditorT,ref=EditorRef}) ->
?CLASS(ThisT,wxGrid),
?CLASS(EditorT,wxGridCellEditor),
wxe_util:cast(?wxGrid_SetDefaultEditor,
<<ThisRef:32/?UI,EditorRef:32/?UI>>).
-%% @spec (This::wxGrid(), Renderer::wxGridCellRenderer:wxGridCellRenderer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetdefaultrenderer">external documentation</a>.
+-spec setDefaultRenderer(This, Renderer) -> ok when
+ This::wxGrid(), Renderer::wxGridCellRenderer:wxGridCellRenderer().
setDefaultRenderer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RendererT,ref=RendererRef}) ->
?CLASS(ThisT,wxGrid),
?CLASS(RendererT,wxGridCellRenderer),
wxe_util:cast(?wxGrid_SetDefaultRenderer,
<<ThisRef:32/?UI,RendererRef:32/?UI>>).
-%% @spec (This::wxGrid(), Width::integer()) -> ok
%% @equiv setDefaultColSize(This,Width, [])
+-spec setDefaultColSize(This, Width) -> ok when
+ This::wxGrid(), Width::integer().
+
setDefaultColSize(This,Width)
when is_record(This, wx_ref),is_integer(Width) ->
setDefaultColSize(This,Width, []).
-%% @spec (This::wxGrid(), Width::integer(), [Option]) -> ok
-%% Option = {resizeExistingCols, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetdefaultcolsize">external documentation</a>.
+-spec setDefaultColSize(This, Width, [Option]) -> ok when
+ This::wxGrid(), Width::integer(),
+ Option :: {resizeExistingCols, boolean()}.
setDefaultColSize(#wx_ref{type=ThisT,ref=ThisRef},Width, Options)
when is_integer(Width),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1633,15 +1851,18 @@ setDefaultColSize(#wx_ref{type=ThisT,ref=ThisRef},Width, Options)
wxe_util:cast(?wxGrid_SetDefaultColSize,
<<ThisRef:32/?UI,Width:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGrid(), Height::integer()) -> ok
%% @equiv setDefaultRowSize(This,Height, [])
+-spec setDefaultRowSize(This, Height) -> ok when
+ This::wxGrid(), Height::integer().
+
setDefaultRowSize(This,Height)
when is_record(This, wx_ref),is_integer(Height) ->
setDefaultRowSize(This,Height, []).
-%% @spec (This::wxGrid(), Height::integer(), [Option]) -> ok
-%% Option = {resizeExistingRows, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetdefaultrowsize">external documentation</a>.
+-spec setDefaultRowSize(This, Height, [Option]) -> ok when
+ This::wxGrid(), Height::integer(),
+ Option :: {resizeExistingRows, boolean()}.
setDefaultRowSize(#wx_ref{type=ThisT,ref=ThisRef},Height, Options)
when is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1651,63 +1872,72 @@ setDefaultRowSize(#wx_ref{type=ThisT,ref=ThisRef},Height, Options)
wxe_util:cast(?wxGrid_SetDefaultRowSize,
<<ThisRef:32/?UI,Height:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetgridcursor">external documentation</a>.
+-spec setGridCursor(This, Row, Col) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer().
setGridCursor(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetGridCursor,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGrid(), Val::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetgridlinecolour">external documentation</a>.
+-spec setGridLineColour(This, Val) -> ok when
+ This::wxGrid(), Val::wx:wx_colour().
setGridLineColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetGridLineColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
-%% @spec (This::wxGrid(), Val::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetlabelbackgroundcolour">external documentation</a>.
+-spec setLabelBackgroundColour(This, Val) -> ok when
+ This::wxGrid(), Val::wx:wx_colour().
setLabelBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetLabelBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
-%% @spec (This::wxGrid(), Val::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetlabelfont">external documentation</a>.
+-spec setLabelFont(This, Val) -> ok when
+ This::wxGrid(), Val::wxFont:wxFont().
setLabelFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ValT,ref=ValRef}) ->
?CLASS(ThisT,wxGrid),
?CLASS(ValT,wxFont),
wxe_util:cast(?wxGrid_SetLabelFont,
<<ThisRef:32/?UI,ValRef:32/?UI>>).
-%% @spec (This::wxGrid(), Val::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetlabeltextcolour">external documentation</a>.
+-spec setLabelTextColour(This, Val) -> ok when
+ This::wxGrid(), Val::wx:wx_colour().
setLabelTextColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetLabelTextColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
-%% @spec (This::wxGrid(), ExtraWidth::integer(), ExtraHeight::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetmargins">external documentation</a>.
+-spec setMargins(This, ExtraWidth, ExtraHeight) -> ok when
+ This::wxGrid(), ExtraWidth::integer(), ExtraHeight::integer().
setMargins(#wx_ref{type=ThisT,ref=ThisRef},ExtraWidth,ExtraHeight)
when is_integer(ExtraWidth),is_integer(ExtraHeight) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetMargins,
<<ThisRef:32/?UI,ExtraWidth:32/?UI,ExtraHeight:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer()) -> ok
%% @equiv setReadOnly(This,Row,Col, [])
+-spec setReadOnly(This, Row, Col) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer().
+
setReadOnly(This,Row,Col)
when is_record(This, wx_ref),is_integer(Row),is_integer(Col) ->
setReadOnly(This,Row,Col, []).
-%% @spec (This::wxGrid(), Row::integer(), Col::integer(), [Option]) -> ok
-%% Option = {isReadOnly, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetreadonly">external documentation</a>.
+-spec setReadOnly(This, Row, Col, [Option]) -> ok when
+ This::wxGrid(), Row::integer(), Col::integer(),
+ Option :: {isReadOnly, boolean()}.
setReadOnly(#wx_ref{type=ThisT,ref=ThisRef},Row,Col, Options)
when is_integer(Row),is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1717,8 +1947,9 @@ setReadOnly(#wx_ref{type=ThisT,ref=ThisRef},Row,Col, Options)
wxe_util:cast(?wxGrid_SetReadOnly,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGrid(), Row::integer(), Attr::wxGridCellAttr:wxGridCellAttr()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetrowattr">external documentation</a>.
+-spec setRowAttr(This, Row, Attr) -> ok when
+ This::wxGrid(), Row::integer(), Attr::wxGridCellAttr:wxGridCellAttr().
setRowAttr(#wx_ref{type=ThisT,ref=ThisRef},Row,#wx_ref{type=AttrT,ref=AttrRef})
when is_integer(Row) ->
?CLASS(ThisT,wxGrid),
@@ -1726,24 +1957,27 @@ setRowAttr(#wx_ref{type=ThisT,ref=ThisRef},Row,#wx_ref{type=AttrT,ref=AttrRef})
wxe_util:cast(?wxGrid_SetRowAttr,
<<ThisRef:32/?UI,Row:32/?UI,AttrRef:32/?UI>>).
-%% @spec (This::wxGrid(), Horiz::integer(), Vert::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetrowlabelalignment">external documentation</a>.
+-spec setRowLabelAlignment(This, Horiz, Vert) -> ok when
+ This::wxGrid(), Horiz::integer(), Vert::integer().
setRowLabelAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
when is_integer(Horiz),is_integer(Vert) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetRowLabelAlignment,
<<ThisRef:32/?UI,Horiz:32/?UI,Vert:32/?UI>>).
-%% @spec (This::wxGrid(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetrowlabelsize">external documentation</a>.
+-spec setRowLabelSize(This, Width) -> ok when
+ This::wxGrid(), Width::integer().
setRowLabelSize(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetRowLabelSize,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Val::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetrowlabelvalue">external documentation</a>.
+-spec setRowLabelValue(This, Row, Val) -> ok when
+ This::wxGrid(), Row::integer(), Val::unicode:chardata().
setRowLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Row,Val)
when is_integer(Row),is_list(Val) ->
?CLASS(ThisT,wxGrid),
@@ -1751,88 +1985,99 @@ setRowLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Row,Val)
wxe_util:cast(?wxGrid_SetRowLabelValue,
<<ThisRef:32/?UI,Row:32/?UI,(byte_size(Val_UC)):32/?UI,(Val_UC)/binary, 0:(((8- ((4+byte_size(Val_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGrid(), Row::integer(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetrowminimalheight">external documentation</a>.
+-spec setRowMinimalHeight(This, Row, Width) -> ok when
+ This::wxGrid(), Row::integer(), Width::integer().
setRowMinimalHeight(#wx_ref{type=ThisT,ref=ThisRef},Row,Width)
when is_integer(Row),is_integer(Width) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetRowMinimalHeight,
<<ThisRef:32/?UI,Row:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxGrid(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetrowminimalacceptableheight">external documentation</a>.
+-spec setRowMinimalAcceptableHeight(This, Width) -> ok when
+ This::wxGrid(), Width::integer().
setRowMinimalAcceptableHeight(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetRowMinimalAcceptableHeight,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxGrid(), Row::integer(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetrowsize">external documentation</a>.
+-spec setRowSize(This, Row, Height) -> ok when
+ This::wxGrid(), Row::integer(), Height::integer().
setRowSize(#wx_ref{type=ThisT,ref=ThisRef},Row,Height)
when is_integer(Row),is_integer(Height) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetRowSize,
<<ThisRef:32/?UI,Row:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxGrid(), X::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetscrolllinex">external documentation</a>.
+-spec setScrollLineX(This, X) -> ok when
+ This::wxGrid(), X::integer().
setScrollLineX(#wx_ref{type=ThisT,ref=ThisRef},X)
when is_integer(X) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetScrollLineX,
<<ThisRef:32/?UI,X:32/?UI>>).
-%% @spec (This::wxGrid(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetscrollliney">external documentation</a>.
+-spec setScrollLineY(This, Y) -> ok when
+ This::wxGrid(), Y::integer().
setScrollLineY(#wx_ref{type=ThisT,ref=ThisRef},Y)
when is_integer(Y) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetScrollLineY,
<<ThisRef:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxGrid(), C::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetselectionbackground">external documentation</a>.
+-spec setSelectionBackground(This, C) -> ok when
+ This::wxGrid(), C::wx:wx_colour().
setSelectionBackground(#wx_ref{type=ThisT,ref=ThisRef},C)
when tuple_size(C) =:= 3; tuple_size(C) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetSelectionBackground,
<<ThisRef:32/?UI,(wxe_util:colour_bin(C)):16/binary>>).
-%% @spec (This::wxGrid(), C::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetselectionforeground">external documentation</a>.
+-spec setSelectionForeground(This, C) -> ok when
+ This::wxGrid(), C::wx:wx_colour().
setSelectionForeground(#wx_ref{type=ThisT,ref=ThisRef},C)
when tuple_size(C) =:= 3; tuple_size(C) =:= 4 ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetSelectionForeground,
<<ThisRef:32/?UI,(wxe_util:colour_bin(C)):16/binary>>).
-%% @spec (This::wxGrid(), Selmode::WxGridSelectionModes) -> ok
-%% WxGridSelectionModes = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridsetselectionmode">external documentation</a>.
-%%<br /> WxGridSelectionModes is one of ?wxGrid_wxGridSelectCells | ?wxGrid_wxGridSelectRows | ?wxGrid_wxGridSelectColumns
+%%<br /> Selmode = ?wxGrid_wxGridSelectCells | ?wxGrid_wxGridSelectRows | ?wxGrid_wxGridSelectColumns
+-spec setSelectionMode(This, Selmode) -> ok when
+ This::wxGrid(), Selmode::wx:wx_enum().
setSelectionMode(#wx_ref{type=ThisT,ref=ThisRef},Selmode)
when is_integer(Selmode) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_SetSelectionMode,
<<ThisRef:32/?UI,Selmode:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridshowcelleditcontrol">external documentation</a>.
+-spec showCellEditControl(This) -> ok when
+ This::wxGrid().
showCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
wxe_util:cast(?wxGrid_ShowCellEditControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGrid(), X::integer()) -> integer()
%% @equiv xToCol(This,X, [])
+-spec xToCol(This, X) -> integer() when
+ This::wxGrid(), X::integer().
+
xToCol(This,X)
when is_record(This, wx_ref),is_integer(X) ->
xToCol(This,X, []).
-%% @spec (This::wxGrid(), X::integer(), [Option]) -> integer()
-%% Option = {clipToMinMax, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridxtocol">external documentation</a>.
+-spec xToCol(This, X, [Option]) -> integer() when
+ This::wxGrid(), X::integer(),
+ Option :: {clipToMinMax, boolean()}.
xToCol(#wx_ref{type=ThisT,ref=ThisRef},X, Options)
when is_integer(X),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1842,32 +2087,35 @@ xToCol(#wx_ref{type=ThisT,ref=ThisRef},X, Options)
wxe_util:call(?wxGrid_XToCol,
<<ThisRef:32/?UI,X:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGrid(), X::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridxtoedgeofcol">external documentation</a>.
+-spec xToEdgeOfCol(This, X) -> integer() when
+ This::wxGrid(), X::integer().
xToEdgeOfCol(#wx_ref{type=ThisT,ref=ThisRef},X)
when is_integer(X) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_XToEdgeOfCol,
<<ThisRef:32/?UI,X:32/?UI>>).
-%% @spec (This::wxGrid(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridytoedgeofrow">external documentation</a>.
+-spec yToEdgeOfRow(This, Y) -> integer() when
+ This::wxGrid(), Y::integer().
yToEdgeOfRow(#wx_ref{type=ThisT,ref=ThisRef},Y)
when is_integer(Y) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_YToEdgeOfRow,
<<ThisRef:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxGrid(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgrid.html#wxgridytorow">external documentation</a>.
+-spec yToRow(This, Y) -> integer() when
+ This::wxGrid(), Y::integer().
yToRow(#wx_ref{type=ThisT,ref=ThisRef},Y)
when is_integer(Y) ->
?CLASS(ThisT,wxGrid),
wxe_util:call(?wxGrid_YToRow,
<<ThisRef:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxGrid()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGrid()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGrid),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGridBagSizer.erl b/lib/wx/src/gen/wxGridBagSizer.erl
index d2b8a2b045..e8a9ff6d76 100644
--- a/lib/wx/src/gen/wxGridBagSizer.erl
+++ b/lib/wx/src/gen/wxGridBagSizer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -48,20 +48,24 @@
setItemMinSize/4,setMinSize/2,setMinSize/3,setNonFlexibleGrowMode/2,
setRows/2,setSizeHints/2,setVGap/2,setVirtualSizeHints/2,show/2,show/3]).
+-export_type([wxGridBagSizer/0]).
%% @hidden
parent_class(wxFlexGridSizer) -> true;
parent_class(wxGridSizer) -> true;
parent_class(wxSizer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridBagSizer()
+-type wxGridBagSizer() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxGridBagSizer().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxGridBagSizer()
-%% Option = {vgap, integer()} | {hgap, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizerwxgridbagsizer">external documentation</a>.
+-spec new([Option]) -> wxGridBagSizer() when
+ Option :: {vgap, integer()}
+ | {hgap, integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({vgap, Vgap}, Acc) -> [<<1:32/?UI,Vgap:32/?UI>>|Acc];
@@ -71,8 +75,9 @@ new(Options)
wxe_util:construct(?wxGridBagSizer_new,
<<BinOpt/binary>>).
-%% @spec (This::wxGridBagSizer(), Item::wxSizerItem:wxSizerItem() | wxGBSizerItem:wxGBSizerItem()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizeradd">external documentation</a>.
+-spec add(This, Item) -> wxSizerItem:wxSizerItem() when
+ This::wxGridBagSizer(), Item::wxSizerItem:wxSizerItem() | wxGBSizerItem:wxGBSizerItem().
add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
?CLASS(ThisT,wxGridBagSizer),
ItemOP = case ?CLASS_T(ItemT,wxSizerItem) of
@@ -84,17 +89,27 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
wxe_util:call(ItemOP,
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxGridBagSizer(),X::integer()|term(),X::integer()|term()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizeradd">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% add(This::wxGridBagSizer(), Width::integer(), Height::integer()) -> add(This,Width,Height, []) </c></p>
-%% <p><c>
-%% add(This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()}) -> add(This,Window,Pos, []) </c></p>
-%% <p><c>
-%% add(This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), [Option]) -> wxSizerItem:wxSizerItem() </c>
-%%<br /> Option = {proportion, integer()} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
-%% </p>
+%% <br /> Also:<br />
+%% add(This, Window, Pos) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()};<br />
+%% (This, Window, [Option]) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(),<br />
+%% Option :: {proportion, integer()}<br />
+%% | {flag, integer()}<br />
+%% | {border, integer()}<br />
+%% | {userData, wx:wx_object()}.<br />
+%%
+-spec add(This, Width, Height) -> wxSizerItem:wxSizerItem() when
+ This::wxGridBagSizer(), Width::integer(), Height::integer();
+ (This, Window, Pos) -> wxSizerItem:wxSizerItem() when
+ This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()};
+ (This, Window, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(),
+ Option :: {proportion, integer()}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()}.
add(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
@@ -121,19 +136,35 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Options
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGridBagSizer(),X::integer()|term(),X::integer()|term(),X::term()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizeradd">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% add(This::wxGridBagSizer(), Width::integer(), Height::integer(), Pos::{R::integer(), C::integer()}) -> add(This,Width,Height,Pos, []) </c></p>
-%% <p><c>
-%% add(This::wxGridBagSizer(), Width::integer(), Height::integer(), [Option]) -> wxSizerItem:wxSizerItem() </c>
-%%<br /> Option = {proportion, integer()} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
-%% </p>
-%% <p><c>
-%% add(This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()}, [Option]) -> wxSizerItem:wxSizerItem() </c>
-%%<br /> Option = {span, {RS::integer(), CS::integer()}} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
-%% </p>
+%% <br /> Also:<br />
+%% add(This, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxGridBagSizer(), Width::integer(), Height::integer(),<br />
+%% Option :: {proportion, integer()}<br />
+%% | {flag, integer()}<br />
+%% | {border, integer()}<br />
+%% | {userData, wx:wx_object()};<br />
+%% (This, Window, Pos, [Option]) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()},<br />
+%% Option :: {span, {RS::integer(), CS::integer()}}<br />
+%% | {flag, integer()}<br />
+%% | {border, integer()}<br />
+%% | {userData, wx:wx_object()}.<br />
+%%
+-spec add(This, Width, Height, Pos) -> wxSizerItem:wxSizerItem() when
+ This::wxGridBagSizer(), Width::integer(), Height::integer(), Pos::{R::integer(), C::integer()};
+ (This, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxGridBagSizer(), Width::integer(), Height::integer(),
+ Option :: {proportion, integer()}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()};
+ (This, Window, Pos, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()},
+ Option :: {span, {RS::integer(), CS::integer()}}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()}.
add(This,Width,Height,Pos={PosR,PosC})
when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_integer(PosR),is_integer(PosC) ->
@@ -167,9 +198,13 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},{PosR,Po
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI,PosR:32/?UI,PosC:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGridBagSizer(), Width::integer(), Height::integer(), Pos::{R::integer(), C::integer()}, [Option]) -> wxSizerItem:wxSizerItem()
-%% Option = {span, {RS::integer(), CS::integer()}} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizeradd">external documentation</a>.
+-spec add(This, Width, Height, Pos, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxGridBagSizer(), Width::integer(), Height::integer(), Pos::{R::integer(), C::integer()},
+ Option :: {span, {RS::integer(), CS::integer()}}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()}.
add(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,{PosR,PosC}, Options)
when is_integer(Width),is_integer(Height),is_integer(PosR),is_integer(PosC),is_list(Options) ->
?CLASS(ThisT,wxGridBagSizer),
@@ -182,28 +217,33 @@ add(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,{PosR,PosC}, Options)
wxe_util:call(?wxGridBagSizer_Add_4,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI,PosR:32/?UI,PosC:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGridBagSizer()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizercalcmin">external documentation</a>.
+-spec calcMin(This) -> {W::integer(), H::integer()} when
+ This::wxGridBagSizer().
calcMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridBagSizer),
wxe_util:call(?wxGridBagSizer_CalcMin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridBagSizer(), Item::wxGBSizerItem:wxGBSizerItem()) -> bool()
%% @equiv checkForIntersection(This,Item, [])
+-spec checkForIntersection(This, Item) -> boolean() when
+ This::wxGridBagSizer(), Item::wxGBSizerItem:wxGBSizerItem().
+
checkForIntersection(This,Item)
when is_record(This, wx_ref),is_record(Item, wx_ref) ->
checkForIntersection(This,Item, []).
-%% @spec (This::wxGridBagSizer(),X::term(),X::term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizercheckforintersection">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% checkForIntersection(This::wxGridBagSizer(), Pos::{R::integer(), C::integer()}, Span::{RS::integer(), CS::integer()}) -> checkForIntersection(This,Pos,Span, []) </c></p>
-%% <p><c>
-%% checkForIntersection(This::wxGridBagSizer(), Item::wxGBSizerItem:wxGBSizerItem(), [Option]) -> bool() </c>
-%%<br /> Option = {excludeItem, wxGBSizerItem:wxGBSizerItem()}
-%% </p>
+%% <br /> Also:<br />
+%% checkForIntersection(This, Item, [Option]) -> boolean() when<br />
+%% This::wxGridBagSizer(), Item::wxGBSizerItem:wxGBSizerItem(),<br />
+%% Option :: {excludeItem, wxGBSizerItem:wxGBSizerItem()}.<br />
+%%
+-spec checkForIntersection(This, Pos, Span) -> boolean() when
+ This::wxGridBagSizer(), Pos::{R::integer(), C::integer()}, Span::{RS::integer(), CS::integer()};
+ (This, Item, [Option]) -> boolean() when
+ This::wxGridBagSizer(), Item::wxGBSizerItem:wxGBSizerItem(),
+ Option :: {excludeItem, wxGBSizerItem:wxGBSizerItem()}.
checkForIntersection(This,Pos={PosR,PosC},Span={SpanRS,SpanCS})
when is_record(This, wx_ref),is_integer(PosR),is_integer(PosC),is_integer(SpanRS),is_integer(SpanCS) ->
@@ -218,9 +258,10 @@ checkForIntersection(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=Item
wxe_util:call(?wxGridBagSizer_CheckForIntersection_2,
<<ThisRef:32/?UI,ItemRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGridBagSizer(), Pos::{R::integer(), C::integer()}, Span::{RS::integer(), CS::integer()}, [Option]) -> bool()
-%% Option = {excludeItem, wxGBSizerItem:wxGBSizerItem()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizercheckforintersection">external documentation</a>.
+-spec checkForIntersection(This, Pos, Span, [Option]) -> boolean() when
+ This::wxGridBagSizer(), Pos::{R::integer(), C::integer()}, Span::{RS::integer(), CS::integer()},
+ Option :: {excludeItem, wxGBSizerItem:wxGBSizerItem()}.
checkForIntersection(#wx_ref{type=ThisT,ref=ThisRef},{PosR,PosC},{SpanRS,SpanCS}, Options)
when is_integer(PosR),is_integer(PosC),is_integer(SpanRS),is_integer(SpanCS),is_list(Options) ->
?CLASS(ThisT,wxGridBagSizer),
@@ -230,8 +271,9 @@ checkForIntersection(#wx_ref{type=ThisT,ref=ThisRef},{PosR,PosC},{SpanRS,SpanCS}
wxe_util:call(?wxGridBagSizer_CheckForIntersection_3,
<<ThisRef:32/?UI,PosR:32/?UI,PosC:32/?UI,SpanRS:32/?UI,SpanCS:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer()) -> wxGBSizerItem:wxGBSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizerfinditem">external documentation</a>.
+-spec findItem(This, Window) -> wxGBSizerItem:wxGBSizerItem() when
+ This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer().
findItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxGridBagSizer),
WindowOP = case ?CLASS_T(WindowT,wxWindow) of
@@ -243,54 +285,59 @@ findItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxGridBagSizer(), Pt::{X::integer(), Y::integer()}) -> wxGBSizerItem:wxGBSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizerfinditematpoint">external documentation</a>.
+-spec findItemAtPoint(This, Pt) -> wxGBSizerItem:wxGBSizerItem() when
+ This::wxGridBagSizer(), Pt::{X::integer(), Y::integer()}.
findItemAtPoint(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxGridBagSizer),
wxe_util:call(?wxGridBagSizer_FindItemAtPoint,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxGridBagSizer(), Pos::{R::integer(), C::integer()}) -> wxGBSizerItem:wxGBSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizerfinditematposition">external documentation</a>.
+-spec findItemAtPosition(This, Pos) -> wxGBSizerItem:wxGBSizerItem() when
+ This::wxGridBagSizer(), Pos::{R::integer(), C::integer()}.
findItemAtPosition(#wx_ref{type=ThisT,ref=ThisRef},{PosR,PosC})
when is_integer(PosR),is_integer(PosC) ->
?CLASS(ThisT,wxGridBagSizer),
wxe_util:call(?wxGridBagSizer_FindItemAtPosition,
<<ThisRef:32/?UI,PosR:32/?UI,PosC:32/?UI>>).
-%% @spec (This::wxGridBagSizer(), UserData::wx:wx()) -> wxGBSizerItem:wxGBSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizerfinditemwithdata">external documentation</a>.
+-spec findItemWithData(This, UserData) -> wxGBSizerItem:wxGBSizerItem() when
+ This::wxGridBagSizer(), UserData::wx:wx_object().
findItemWithData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=UserDataT,ref=UserDataRef}) ->
?CLASS(ThisT,wxGridBagSizer),
?CLASS(UserDataT,wx),
wxe_util:call(?wxGridBagSizer_FindItemWithData,
<<ThisRef:32/?UI,UserDataRef:32/?UI>>).
-%% @spec (This::wxGridBagSizer(), Row::integer(), Col::integer()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizergetcellsize">external documentation</a>.
+-spec getCellSize(This, Row, Col) -> {W::integer(), H::integer()} when
+ This::wxGridBagSizer(), Row::integer(), Col::integer().
getCellSize(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGridBagSizer),
wxe_util:call(?wxGridBagSizer_GetCellSize,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGridBagSizer()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizergetemptycellsize">external documentation</a>.
+-spec getEmptyCellSize(This) -> {W::integer(), H::integer()} when
+ This::wxGridBagSizer().
getEmptyCellSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridBagSizer),
wxe_util:call(?wxGridBagSizer_GetEmptyCellSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridBagSizer(),X::integer()|term()) -> {R::integer(), C::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizergetitemposition">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% getItemPosition(This::wxGridBagSizer(), Index::integer()) -> {R::integer(), C::integer()} </c>
-%% </p>
-%% <p><c>
-%% getItemPosition(This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer()) -> {R::integer(), C::integer()} </c>
-%% </p>
+%% <br /> Also:<br />
+%% getItemPosition(This, Window) -> {R::integer(), C::integer()} when<br />
+%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer().<br />
+%%
+-spec getItemPosition(This, Index) -> {R::integer(), C::integer()} when
+ This::wxGridBagSizer(), Index::integer();
+ (This, Window) -> {R::integer(), C::integer()} when
+ This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer().
getItemPosition(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxGridBagSizer),
@@ -307,15 +354,15 @@ getItemPosition(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowR
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxGridBagSizer(),X::integer()|term()) -> {RS::integer(), CS::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizergetitemspan">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% getItemSpan(This::wxGridBagSizer(), Index::integer()) -> {RS::integer(), CS::integer()} </c>
-%% </p>
-%% <p><c>
-%% getItemSpan(This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer()) -> {RS::integer(), CS::integer()} </c>
-%% </p>
+%% <br /> Also:<br />
+%% getItemSpan(This, Window) -> {RS::integer(), CS::integer()} when<br />
+%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer().<br />
+%%
+-spec getItemSpan(This, Index) -> {RS::integer(), CS::integer()} when
+ This::wxGridBagSizer(), Index::integer();
+ (This, Window) -> {RS::integer(), CS::integer()} when
+ This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer().
getItemSpan(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxGridBagSizer),
@@ -332,23 +379,24 @@ getItemSpan(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef})
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxGridBagSizer(), Sz::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizersetemptycellsize">external documentation</a>.
+-spec setEmptyCellSize(This, Sz) -> ok when
+ This::wxGridBagSizer(), Sz::{W::integer(), H::integer()}.
setEmptyCellSize(#wx_ref{type=ThisT,ref=ThisRef},{SzW,SzH})
when is_integer(SzW),is_integer(SzH) ->
?CLASS(ThisT,wxGridBagSizer),
wxe_util:cast(?wxGridBagSizer_SetEmptyCellSize,
<<ThisRef:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
-%% @spec (This::wxGridBagSizer(),X::integer()|term(),Pos::{R::integer(), C::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizersetitemposition">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setItemPosition(This::wxGridBagSizer(), Index::integer(), Pos::{R::integer(), C::integer()}) -> bool() </c>
-%% </p>
-%% <p><c>
-%% setItemPosition(This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()}) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% setItemPosition(This, Window, Pos) -> boolean() when<br />
+%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()}.<br />
+%%
+-spec setItemPosition(This, Index, Pos) -> boolean() when
+ This::wxGridBagSizer(), Index::integer(), Pos::{R::integer(), C::integer()};
+ (This, Window, Pos) -> boolean() when
+ This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()}.
setItemPosition(#wx_ref{type=ThisT,ref=ThisRef},Index,{PosR,PosC})
when is_integer(Index),is_integer(PosR),is_integer(PosC) ->
?CLASS(ThisT,wxGridBagSizer),
@@ -366,15 +414,15 @@ setItemPosition(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowR
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI,PosR:32/?UI,PosC:32/?UI>>).
-%% @spec (This::wxGridBagSizer(),X::integer()|term(),Span::{RS::integer(), CS::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridbagsizer.html#wxgridbagsizersetitemspan">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setItemSpan(This::wxGridBagSizer(), Index::integer(), Span::{RS::integer(), CS::integer()}) -> bool() </c>
-%% </p>
-%% <p><c>
-%% setItemSpan(This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Span::{RS::integer(), CS::integer()}) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% setItemSpan(This, Window, Span) -> boolean() when<br />
+%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Span::{RS::integer(), CS::integer()}.<br />
+%%
+-spec setItemSpan(This, Index, Span) -> boolean() when
+ This::wxGridBagSizer(), Index::integer(), Span::{RS::integer(), CS::integer()};
+ (This, Window, Span) -> boolean() when
+ This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Span::{RS::integer(), CS::integer()}.
setItemSpan(#wx_ref{type=ThisT,ref=ThisRef},Index,{SpanRS,SpanCS})
when is_integer(Index),is_integer(SpanRS),is_integer(SpanCS) ->
?CLASS(ThisT,wxGridBagSizer),
@@ -392,8 +440,8 @@ setItemSpan(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI,SpanRS:32/?UI,SpanCS:32/?UI>>).
-%% @spec (This::wxGridBagSizer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridBagSizer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridBagSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGridCellAttr.erl b/lib/wx/src/gen/wxGridCellAttr.erl
index a9a0c1fb79..f03fd99d2a 100644
--- a/lib/wx/src/gen/wxGridCellAttr.erl
+++ b/lib/wx/src/gen/wxGridCellAttr.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,50 +33,59 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxGridCellAttr/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxGridCellAttr(), ColText::wx:colour()) -> ok
+-type wxGridCellAttr() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrsettextcolour">external documentation</a>.
+-spec setTextColour(This, ColText) -> ok when
+ This::wxGridCellAttr(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:cast(?wxGridCellAttr_SetTextColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
-%% @spec (This::wxGridCellAttr(), ColBack::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrsetbackgroundcolour">external documentation</a>.
+-spec setBackgroundColour(This, ColBack) -> ok when
+ This::wxGridCellAttr(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:cast(?wxGridCellAttr_SetBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
-%% @spec (This::wxGridCellAttr(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrsetfont">external documentation</a>.
+-spec setFont(This, Font) -> ok when
+ This::wxGridCellAttr(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxGridCellAttr),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxGridCellAttr_SetFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr(), HAlign::integer(), VAlign::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrsetalignment">external documentation</a>.
+-spec setAlignment(This, HAlign, VAlign) -> ok when
+ This::wxGridCellAttr(), HAlign::integer(), VAlign::integer().
setAlignment(#wx_ref{type=ThisT,ref=ThisRef},HAlign,VAlign)
when is_integer(HAlign),is_integer(VAlign) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:cast(?wxGridCellAttr_SetAlignment,
<<ThisRef:32/?UI,HAlign:32/?UI,VAlign:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> ok
%% @equiv setReadOnly(This, [])
+-spec setReadOnly(This) -> ok when
+ This::wxGridCellAttr().
+
setReadOnly(This)
when is_record(This, wx_ref) ->
setReadOnly(This, []).
-%% @spec (This::wxGridCellAttr(), [Option]) -> ok
-%% Option = {isReadOnly, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrsetreadonly">external documentation</a>.
+-spec setReadOnly(This, [Option]) -> ok when
+ This::wxGridCellAttr(),
+ Option :: {isReadOnly, boolean()}.
setReadOnly(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGridCellAttr),
@@ -86,94 +95,107 @@ setReadOnly(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxGridCellAttr_SetReadOnly,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGridCellAttr(), Renderer::wxGridCellRenderer:wxGridCellRenderer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrsetrenderer">external documentation</a>.
+-spec setRenderer(This, Renderer) -> ok when
+ This::wxGridCellAttr(), Renderer::wxGridCellRenderer:wxGridCellRenderer().
setRenderer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RendererT,ref=RendererRef}) ->
?CLASS(ThisT,wxGridCellAttr),
?CLASS(RendererT,wxGridCellRenderer),
wxe_util:cast(?wxGridCellAttr_SetRenderer,
<<ThisRef:32/?UI,RendererRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr(), Editor::wxGridCellEditor:wxGridCellEditor()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrseteditor">external documentation</a>.
+-spec setEditor(This, Editor) -> ok when
+ This::wxGridCellAttr(), Editor::wxGridCellEditor:wxGridCellEditor().
setEditor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EditorT,ref=EditorRef}) ->
?CLASS(ThisT,wxGridCellAttr),
?CLASS(EditorT,wxGridCellEditor),
wxe_util:cast(?wxGridCellAttr_SetEditor,
<<ThisRef:32/?UI,EditorRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrhastextcolour">external documentation</a>.
+-spec hasTextColour(This) -> boolean() when
+ This::wxGridCellAttr().
hasTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_HasTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrhasbackgroundcolour">external documentation</a>.
+-spec hasBackgroundColour(This) -> boolean() when
+ This::wxGridCellAttr().
hasBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_HasBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrhasfont">external documentation</a>.
+-spec hasFont(This) -> boolean() when
+ This::wxGridCellAttr().
hasFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_HasFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrhasalignment">external documentation</a>.
+-spec hasAlignment(This) -> boolean() when
+ This::wxGridCellAttr().
hasAlignment(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_HasAlignment,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrhasrenderer">external documentation</a>.
+-spec hasRenderer(This) -> boolean() when
+ This::wxGridCellAttr().
hasRenderer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_HasRenderer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrhaseditor">external documentation</a>.
+-spec hasEditor(This) -> boolean() when
+ This::wxGridCellAttr().
hasEditor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_HasEditor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrgettextcolour">external documentation</a>.
+-spec getTextColour(This) -> wx:wx_colour4() when
+ This::wxGridCellAttr().
getTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_GetTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrgetbackgroundcolour">external documentation</a>.
+-spec getBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxGridCellAttr().
getBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_GetBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrgetfont">external documentation</a>.
+-spec getFont(This) -> wxFont:wxFont() when
+ This::wxGridCellAttr().
getFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_GetFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> {HAlign::integer(), VAlign::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrgetalignment">external documentation</a>.
+-spec getAlignment(This) -> {HAlign::integer(), VAlign::integer()} when
+ This::wxGridCellAttr().
getAlignment(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_GetAlignment,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr(), Grid::wxGrid:wxGrid(), Row::integer(), Col::integer()) -> wxGridCellRenderer:wxGridCellRenderer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrgetrenderer">external documentation</a>.
+-spec getRenderer(This, Grid, Row, Col) -> wxGridCellRenderer:wxGridCellRenderer() when
+ This::wxGridCellAttr(), Grid::wxGrid:wxGrid(), Row::integer(), Col::integer().
getRenderer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=GridT,ref=GridRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGridCellAttr),
@@ -181,8 +203,9 @@ getRenderer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=GridT,ref=GridRef},Row,
wxe_util:call(?wxGridCellAttr_GetRenderer,
<<ThisRef:32/?UI,GridRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGridCellAttr(), Grid::wxGrid:wxGrid(), Row::integer(), Col::integer()) -> wxGridCellEditor:wxGridCellEditor()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrgeteditor">external documentation</a>.
+-spec getEditor(This, Grid, Row, Col) -> wxGridCellEditor:wxGridCellEditor() when
+ This::wxGridCellAttr(), Grid::wxGrid:wxGrid(), Row::integer(), Col::integer().
getEditor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=GridT,ref=GridRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGridCellAttr),
@@ -190,15 +213,17 @@ getEditor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=GridT,ref=GridRef},Row,Co
wxe_util:call(?wxGridCellAttr_GetEditor,
<<ThisRef:32/?UI,GridRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxGridCellAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrisreadonly">external documentation</a>.
+-spec isReadOnly(This) -> boolean() when
+ This::wxGridCellAttr().
isReadOnly(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellAttr),
wxe_util:call(?wxGridCellAttr_IsReadOnly,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellAttr(), DefAttr::wxGridCellAttr()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellattr.html#wxgridcellattrsetdefattr">external documentation</a>.
+-spec setDefAttr(This, DefAttr) -> ok when
+ This::wxGridCellAttr(), DefAttr::wxGridCellAttr().
setDefAttr(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DefAttrT,ref=DefAttrRef}) ->
?CLASS(ThisT,wxGridCellAttr),
?CLASS(DefAttrT,wxGridCellAttr),
diff --git a/lib/wx/src/gen/wxGridCellBoolEditor.erl b/lib/wx/src/gen/wxGridCellBoolEditor.erl
index a54cfe5eab..533554cd54 100644
--- a/lib/wx/src/gen/wxGridCellBoolEditor.erl
+++ b/lib/wx/src/gen/wxGridCellBoolEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,32 +33,37 @@
-export([beginEdit/4,endEdit/4,handleReturn/2,isCreated/1,paintBackground/3,
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
+-export_type([wxGridCellBoolEditor/0]).
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridCellBoolEditor()
+-type wxGridCellBoolEditor() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellbooleditor.html#wxgridcellbooleditorwxgridcellbooleditor">external documentation</a>.
+-spec new() -> wxGridCellBoolEditor().
new() ->
wxe_util:construct(?wxGridCellBoolEditor_new,
<<>>).
-%% @spec (Value::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellbooleditor.html#wxgridcellbooleditoristruevalue">external documentation</a>.
+-spec isTrueValue(Value) -> boolean() when
+ Value::unicode:chardata().
isTrueValue(Value)
when is_list(Value) ->
Value_UC = unicode:characters_to_binary([Value,0]),
wxe_util:call(?wxGridCellBoolEditor_IsTrueValue,
<<(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((4+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec () -> ok
%% @equiv useStringValues([])
+-spec useStringValues() -> ok.
+
useStringValues() ->
useStringValues([]).
-%% @spec ([Option]) -> ok
-%% Option = {valueTrue, string()} | {valueFalse, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellbooleditor.html#wxgridcellbooleditorusestringvalues">external documentation</a>.
+-spec useStringValues([Option]) -> ok when
+ Option :: {valueTrue, unicode:chardata()}
+ | {valueFalse, unicode:chardata()}.
useStringValues(Options)
when is_list(Options) ->
MOpts = fun({valueTrue, ValueTrue}, Acc) -> ValueTrue_UC = unicode:characters_to_binary([ValueTrue,0]),[<<1:32/?UI,(byte_size(ValueTrue_UC)):32/?UI,(ValueTrue_UC)/binary, 0:(((8- ((0+byte_size(ValueTrue_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
@@ -68,8 +73,8 @@ useStringValues(Options)
wxe_util:cast(?wxGridCellBoolEditor_UseStringValues,
<<BinOpt/binary>>).
-%% @spec (This::wxGridCellBoolEditor()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellBoolEditor()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellBoolEditor),
wxe_util:destroy(?wxGridCellBoolEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellBoolRenderer.erl b/lib/wx/src/gen/wxGridCellBoolRenderer.erl
index a98091f62c..834f00a623 100644
--- a/lib/wx/src/gen/wxGridCellBoolRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellBoolRenderer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,18 +32,20 @@
%% inherited exports
-export([draw/8,getBestSize/6,parent_class/1]).
+-export_type([wxGridCellBoolRenderer/0]).
%% @hidden
parent_class(wxGridCellRenderer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridCellBoolRenderer()
+-type wxGridCellBoolRenderer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellboolrenderer.html#wxgridcellboolrendererwxgridcellboolrenderer">external documentation</a>.
+-spec new() -> wxGridCellBoolRenderer().
new() ->
wxe_util:construct(?wxGridCellBoolRenderer_new,
<<>>).
-%% @spec (This::wxGridCellBoolRenderer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellBoolRenderer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellBoolRenderer),
wxe_util:destroy(?wxGridCellBoolRenderer_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellChoiceEditor.erl b/lib/wx/src/gen/wxGridCellChoiceEditor.erl
index 1adee550f8..6f7d7ceffb 100644
--- a/lib/wx/src/gen/wxGridCellChoiceEditor.erl
+++ b/lib/wx/src/gen/wxGridCellChoiceEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,19 +33,24 @@
-export([beginEdit/4,endEdit/4,handleReturn/2,isCreated/1,paintBackground/3,
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
+-export_type([wxGridCellChoiceEditor/0]).
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Choices::[[string()]]) -> wxGridCellChoiceEditor()
+-type wxGridCellChoiceEditor() :: wx:wx_object().
%% @equiv new(Choices, [])
+-spec new(Choices) -> wxGridCellChoiceEditor() when
+ Choices::[[unicode:chardata()]].
+
new(Choices)
when is_list(Choices) ->
new(Choices, []).
-%% @spec (Choices::[[string()]], [Option]) -> wxGridCellChoiceEditor()
-%% Option = {allowOthers, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellchoiceeditor.html#wxgridcellchoiceeditorwxgridcellchoiceeditor">external documentation</a>.
+-spec new(Choices, [Option]) -> wxGridCellChoiceEditor() when
+ Choices::[[unicode:chardata()]],
+ Option :: {allowOthers, boolean()}.
new(Choices, Options)
when is_list(Choices),is_list(Options) ->
Choices_UCA = [unicode:characters_to_binary([ChoicesTemp,0]) ||
@@ -56,8 +61,9 @@ new(Choices, Options)
wxe_util:construct(?wxGridCellChoiceEditor_new,
<<(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((4 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxGridCellChoiceEditor(), Params::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellchoiceeditor.html#wxgridcellchoiceeditorsetparameters">external documentation</a>.
+-spec setParameters(This, Params) -> ok when
+ This::wxGridCellChoiceEditor(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
?CLASS(ThisT,wxGridCellChoiceEditor),
@@ -65,8 +71,8 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
wxe_util:cast(?wxGridCellChoiceEditor_SetParameters,
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGridCellChoiceEditor()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellChoiceEditor()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellChoiceEditor),
wxe_util:destroy(?wxGridCellChoiceEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellEditor.erl b/lib/wx/src/gen/wxGridCellEditor.erl
index de1ebc5a4c..e84cdeb49a 100644
--- a/lib/wx/src/gen/wxGridCellEditor.erl
+++ b/lib/wx/src/gen/wxGridCellEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,11 +30,14 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxGridCellEditor/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxGridCellEditor(), Parent::wxWindow:wxWindow(), Id::integer(), EvtHandler::wxEvtHandler:wxEvtHandler()) -> ok
+-type wxGridCellEditor() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorcreate">external documentation</a>.
+-spec create(This, Parent, Id, EvtHandler) -> ok when
+ This::wxGridCellEditor(), Parent::wxWindow:wxWindow(), Id::integer(), EvtHandler::wxEvtHandler:wxEvtHandler().
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=EvtHandlerT,ref=EvtHandlerRef})
when is_integer(Id) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -43,30 +46,35 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#w
wxe_util:cast(?wxGridCellEditor_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,EvtHandlerRef:32/?UI>>).
-%% @spec (This::wxGridCellEditor()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditoriscreated">external documentation</a>.
+-spec isCreated(This) -> boolean() when
+ This::wxGridCellEditor().
isCreated(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellEditor),
wxe_util:call(?wxGridCellEditor_IsCreated,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellEditor(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorsetsize">external documentation</a>.
+-spec setSize(This, Rect) -> ok when
+ This::wxGridCellEditor(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
setSize(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
?CLASS(ThisT,wxGridCellEditor),
wxe_util:cast(?wxGridCellEditor_SetSize,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxGridCellEditor(), Show::bool()) -> ok
%% @equiv show(This,Show, [])
+-spec show(This, Show) -> ok when
+ This::wxGridCellEditor(), Show::boolean().
+
show(This,Show)
when is_record(This, wx_ref),is_boolean(Show) ->
show(This,Show, []).
-%% @spec (This::wxGridCellEditor(), Show::bool(), [Option]) -> ok
-%% Option = {attr, wxGridCellAttr:wxGridCellAttr()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorshow">external documentation</a>.
+-spec show(This, Show, [Option]) -> ok when
+ This::wxGridCellEditor(), Show::boolean(),
+ Option :: {attr, wxGridCellAttr:wxGridCellAttr()}.
show(#wx_ref{type=ThisT,ref=ThisRef},Show, Options)
when is_boolean(Show),is_list(Options) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -76,8 +84,9 @@ show(#wx_ref{type=ThisT,ref=ThisRef},Show, Options)
wxe_util:cast(?wxGridCellEditor_Show,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGridCellEditor(), RectCell::{X::integer(), Y::integer(), W::integer(), H::integer()}, Attr::wxGridCellAttr:wxGridCellAttr()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorpaintbackground">external documentation</a>.
+-spec paintBackground(This, RectCell, Attr) -> ok when
+ This::wxGridCellEditor(), RectCell::{X::integer(), Y::integer(), W::integer(), H::integer()}, Attr::wxGridCellAttr:wxGridCellAttr().
paintBackground(#wx_ref{type=ThisT,ref=ThisRef},{RectCellX,RectCellY,RectCellW,RectCellH},#wx_ref{type=AttrT,ref=AttrRef})
when is_integer(RectCellX),is_integer(RectCellY),is_integer(RectCellW),is_integer(RectCellH) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -85,8 +94,9 @@ paintBackground(#wx_ref{type=ThisT,ref=ThisRef},{RectCellX,RectCellY,RectCellW,R
wxe_util:cast(?wxGridCellEditor_PaintBackground,
<<ThisRef:32/?UI,RectCellX:32/?UI,RectCellY:32/?UI,RectCellW:32/?UI,RectCellH:32/?UI,AttrRef:32/?UI>>).
-%% @spec (This::wxGridCellEditor(), Row::integer(), Col::integer(), Grid::wxGrid:wxGrid()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorbeginedit">external documentation</a>.
+-spec beginEdit(This, Row, Col, Grid) -> ok when
+ This::wxGridCellEditor(), Row::integer(), Col::integer(), Grid::wxGrid:wxGrid().
beginEdit(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=GridT,ref=GridRef})
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -94,8 +104,9 @@ beginEdit(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=GridT,ref=GridRef
wxe_util:cast(?wxGridCellEditor_BeginEdit,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,GridRef:32/?UI>>).
-%% @spec (This::wxGridCellEditor(), Row::integer(), Col::integer(), Grid::wxGrid:wxGrid()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorendedit">external documentation</a>.
+-spec endEdit(This, Row, Col, Grid) -> boolean() when
+ This::wxGridCellEditor(), Row::integer(), Col::integer(), Grid::wxGrid:wxGrid().
endEdit(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=GridT,ref=GridRef})
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -103,30 +114,34 @@ endEdit(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=GridT,ref=GridRef})
wxe_util:call(?wxGridCellEditor_EndEdit,
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,GridRef:32/?UI>>).
-%% @spec (This::wxGridCellEditor()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorreset">external documentation</a>.
+-spec reset(This) -> ok when
+ This::wxGridCellEditor().
reset(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellEditor),
wxe_util:cast(?wxGridCellEditor_Reset,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellEditor(), Event::wxKeyEvent:wxKeyEvent()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorstartingkey">external documentation</a>.
+-spec startingKey(This, Event) -> ok when
+ This::wxGridCellEditor(), Event::wxKeyEvent:wxKeyEvent().
startingKey(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef}) ->
?CLASS(ThisT,wxGridCellEditor),
?CLASS(EventT,wxKeyEvent),
wxe_util:cast(?wxGridCellEditor_StartingKey,
<<ThisRef:32/?UI,EventRef:32/?UI>>).
-%% @spec (This::wxGridCellEditor()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorstartingclick">external documentation</a>.
+-spec startingClick(This) -> ok when
+ This::wxGridCellEditor().
startingClick(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellEditor),
wxe_util:cast(?wxGridCellEditor_StartingClick,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellEditor(), Event::wxKeyEvent:wxKeyEvent()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelleditor.html#wxgridcelleditorhandlereturn">external documentation</a>.
+-spec handleReturn(This, Event) -> ok when
+ This::wxGridCellEditor(), Event::wxKeyEvent:wxKeyEvent().
handleReturn(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef}) ->
?CLASS(ThisT,wxGridCellEditor),
?CLASS(EventT,wxKeyEvent),
diff --git a/lib/wx/src/gen/wxGridCellFloatEditor.erl b/lib/wx/src/gen/wxGridCellFloatEditor.erl
index 3caad74f0e..f6b7dce15e 100644
--- a/lib/wx/src/gen/wxGridCellFloatEditor.erl
+++ b/lib/wx/src/gen/wxGridCellFloatEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,18 +33,22 @@
-export([beginEdit/4,endEdit/4,handleReturn/2,isCreated/1,paintBackground/3,
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
+-export_type([wxGridCellFloatEditor/0]).
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridCellFloatEditor()
+-type wxGridCellFloatEditor() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxGridCellFloatEditor().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxGridCellFloatEditor()
-%% Option = {width, integer()} | {precision, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellfloateditor.html#wxgridcellfloateditorwxgridcellfloateditor">external documentation</a>.
+-spec new([Option]) -> wxGridCellFloatEditor() when
+ Option :: {width, integer()}
+ | {precision, integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({width, Width}, Acc) -> [<<1:32/?UI,Width:32/?UI>>|Acc];
@@ -54,8 +58,9 @@ new(Options)
wxe_util:construct(?wxGridCellFloatEditor_new,
<<BinOpt/binary>>).
-%% @spec (This::wxGridCellFloatEditor(), Params::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellfloateditor.html#wxgridcellfloateditorsetparameters">external documentation</a>.
+-spec setParameters(This, Params) -> ok when
+ This::wxGridCellFloatEditor(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
?CLASS(ThisT,wxGridCellFloatEditor),
@@ -63,8 +68,8 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
wxe_util:cast(?wxGridCellFloatEditor_SetParameters,
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGridCellFloatEditor()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellFloatEditor()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellFloatEditor),
wxe_util:destroy(?wxGridCellFloatEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellFloatRenderer.erl b/lib/wx/src/gen/wxGridCellFloatRenderer.erl
index 84ffd21b37..c090a60e74 100644
--- a/lib/wx/src/gen/wxGridCellFloatRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellFloatRenderer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,19 +34,23 @@
%% inherited exports
-export([draw/8,getBestSize/6,parent_class/1]).
+-export_type([wxGridCellFloatRenderer/0]).
%% @hidden
parent_class(wxGridCellStringRenderer) -> true;
parent_class(wxGridCellRenderer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridCellFloatRenderer()
+-type wxGridCellFloatRenderer() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxGridCellFloatRenderer().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxGridCellFloatRenderer()
-%% Option = {width, integer()} | {precision, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrendererwxgridcellfloatrenderer">external documentation</a>.
+-spec new([Option]) -> wxGridCellFloatRenderer() when
+ Option :: {width, integer()}
+ | {precision, integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({width, Width}, Acc) -> [<<1:32/?UI,Width:32/?UI>>|Acc];
@@ -56,22 +60,25 @@ new(Options)
wxe_util:construct(?wxGridCellFloatRenderer_new,
<<BinOpt/binary>>).
-%% @spec (This::wxGridCellFloatRenderer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrenderergetprecision">external documentation</a>.
+-spec getPrecision(This) -> integer() when
+ This::wxGridCellFloatRenderer().
getPrecision(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellFloatRenderer),
wxe_util:call(?wxGridCellFloatRenderer_GetPrecision,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellFloatRenderer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrenderergetwidth">external documentation</a>.
+-spec getWidth(This) -> integer() when
+ This::wxGridCellFloatRenderer().
getWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellFloatRenderer),
wxe_util:call(?wxGridCellFloatRenderer_GetWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellFloatRenderer(), Params::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrenderersetparameters">external documentation</a>.
+-spec setParameters(This, Params) -> ok when
+ This::wxGridCellFloatRenderer(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
?CLASS(ThisT,wxGridCellFloatRenderer),
@@ -79,24 +86,26 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
wxe_util:cast(?wxGridCellFloatRenderer_SetParameters,
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGridCellFloatRenderer(), Precision::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrenderersetprecision">external documentation</a>.
+-spec setPrecision(This, Precision) -> ok when
+ This::wxGridCellFloatRenderer(), Precision::integer().
setPrecision(#wx_ref{type=ThisT,ref=ThisRef},Precision)
when is_integer(Precision) ->
?CLASS(ThisT,wxGridCellFloatRenderer),
wxe_util:cast(?wxGridCellFloatRenderer_SetPrecision,
<<ThisRef:32/?UI,Precision:32/?UI>>).
-%% @spec (This::wxGridCellFloatRenderer(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrenderersetwidth">external documentation</a>.
+-spec setWidth(This, Width) -> ok when
+ This::wxGridCellFloatRenderer(), Width::integer().
setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxGridCellFloatRenderer),
wxe_util:cast(?wxGridCellFloatRenderer_SetWidth,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxGridCellFloatRenderer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellFloatRenderer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellFloatRenderer),
wxe_util:destroy(?wxGridCellFloatRenderer_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellNumberEditor.erl b/lib/wx/src/gen/wxGridCellNumberEditor.erl
index 4ebdbb14e9..68d5670367 100644
--- a/lib/wx/src/gen/wxGridCellNumberEditor.erl
+++ b/lib/wx/src/gen/wxGridCellNumberEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,19 +34,23 @@
-export([beginEdit/4,endEdit/4,handleReturn/2,isCreated/1,paintBackground/3,
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
+-export_type([wxGridCellNumberEditor/0]).
%% @hidden
parent_class(wxGridCellTextEditor) -> true;
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridCellNumberEditor()
+-type wxGridCellNumberEditor() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxGridCellNumberEditor().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxGridCellNumberEditor()
-%% Option = {min, integer()} | {max, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellnumbereditor.html#wxgridcellnumbereditorwxgridcellnumbereditor">external documentation</a>.
+-spec new([Option]) -> wxGridCellNumberEditor() when
+ Option :: {min, integer()}
+ | {max, integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({min, Min}, Acc) -> [<<1:32/?UI,Min:32/?UI>>|Acc];
@@ -56,15 +60,17 @@ new(Options)
wxe_util:construct(?wxGridCellNumberEditor_new,
<<BinOpt/binary>>).
-%% @spec (This::wxGridCellNumberEditor()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellnumbereditor.html#wxgridcellnumbereditorgetvalue">external documentation</a>.
+-spec getValue(This) -> unicode:charlist() when
+ This::wxGridCellNumberEditor().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellNumberEditor),
wxe_util:call(?wxGridCellNumberEditor_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridCellNumberEditor(), Params::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellnumbereditor.html#wxgridcellnumbereditorsetparameters">external documentation</a>.
+-spec setParameters(This, Params) -> ok when
+ This::wxGridCellNumberEditor(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
?CLASS(ThisT,wxGridCellNumberEditor),
@@ -72,8 +78,8 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
wxe_util:cast(?wxGridCellNumberEditor_SetParameters,
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGridCellNumberEditor()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellNumberEditor()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellNumberEditor),
wxe_util:destroy(?wxGridCellNumberEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellNumberRenderer.erl b/lib/wx/src/gen/wxGridCellNumberRenderer.erl
index 651057bb4b..b02b6d48c9 100644
--- a/lib/wx/src/gen/wxGridCellNumberRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellNumberRenderer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,19 +33,21 @@
%% inherited exports
-export([draw/8,getBestSize/6,parent_class/1]).
+-export_type([wxGridCellNumberRenderer/0]).
%% @hidden
parent_class(wxGridCellStringRenderer) -> true;
parent_class(wxGridCellRenderer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridCellNumberRenderer()
+-type wxGridCellNumberRenderer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellnumberrenderer.html#wxgridcellnumberrendererwxgridcellnumberrenderer">external documentation</a>.
+-spec new() -> wxGridCellNumberRenderer().
new() ->
wxe_util:construct(?wxGridCellNumberRenderer_new,
<<>>).
-%% @spec (This::wxGridCellNumberRenderer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellNumberRenderer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellNumberRenderer),
wxe_util:destroy(?wxGridCellNumberRenderer_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellRenderer.erl b/lib/wx/src/gen/wxGridCellRenderer.erl
index 765c116a48..42d376a347 100644
--- a/lib/wx/src/gen/wxGridCellRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellRenderer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,11 +29,14 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxGridCellRenderer/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxGridCellRenderer(), Grid::wxGrid:wxGrid(), Attr::wxGridCellAttr:wxGridCellAttr(), Dc::wxDC:wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, Row::integer(), Col::integer(), IsSelected::bool()) -> ok
+-type wxGridCellRenderer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellrenderer.html#wxgridcellrendererdraw">external documentation</a>.
+-spec draw(This, Grid, Attr, Dc, Rect, Row, Col, IsSelected) -> ok when
+ This::wxGridCellRenderer(), Grid::wxGrid:wxGrid(), Attr::wxGridCellAttr:wxGridCellAttr(), Dc::wxDC:wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, Row::integer(), Col::integer(), IsSelected::boolean().
draw(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=GridT,ref=GridRef},#wx_ref{type=AttrT,ref=AttrRef},#wx_ref{type=DcT,ref=DcRef},{RectX,RectY,RectW,RectH},Row,Col,IsSelected)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_integer(Row),is_integer(Col),is_boolean(IsSelected) ->
?CLASS(ThisT,wxGridCellRenderer),
@@ -43,8 +46,9 @@ draw(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=GridT,ref=GridRef},#wx_ref{typ
wxe_util:cast(?wxGridCellRenderer_Draw,
<<ThisRef:32/?UI,GridRef:32/?UI,AttrRef:32/?UI,DcRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI,Row:32/?UI,Col:32/?UI,(wxe_util:from_bool(IsSelected)):32/?UI>>).
-%% @spec (This::wxGridCellRenderer(), Grid::wxGrid:wxGrid(), Attr::wxGridCellAttr:wxGridCellAttr(), Dc::wxDC:wxDC(), Row::integer(), Col::integer()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellrenderer.html#wxgridcellrenderergetbestsize">external documentation</a>.
+-spec getBestSize(This, Grid, Attr, Dc, Row, Col) -> {W::integer(), H::integer()} when
+ This::wxGridCellRenderer(), Grid::wxGrid:wxGrid(), Attr::wxGridCellAttr:wxGridCellAttr(), Dc::wxDC:wxDC(), Row::integer(), Col::integer().
getBestSize(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=GridT,ref=GridRef},#wx_ref{type=AttrT,ref=AttrRef},#wx_ref{type=DcT,ref=DcRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
?CLASS(ThisT,wxGridCellRenderer),
diff --git a/lib/wx/src/gen/wxGridCellStringRenderer.erl b/lib/wx/src/gen/wxGridCellStringRenderer.erl
index 28a79e0453..78fdf558a2 100644
--- a/lib/wx/src/gen/wxGridCellStringRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellStringRenderer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,18 +32,20 @@
%% inherited exports
-export([draw/8,getBestSize/6,parent_class/1]).
+-export_type([wxGridCellStringRenderer/0]).
%% @hidden
parent_class(wxGridCellRenderer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridCellStringRenderer()
+-type wxGridCellStringRenderer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcellstringrenderer.html#wxgridcellstringrendererwxgridcellstringrenderer">external documentation</a>.
+-spec new() -> wxGridCellStringRenderer().
new() ->
wxe_util:construct(?wxGridCellStringRenderer_new,
<<>>).
-%% @spec (This::wxGridCellStringRenderer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellStringRenderer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellStringRenderer),
wxe_util:destroy(?wxGridCellStringRenderer_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellTextEditor.erl b/lib/wx/src/gen/wxGridCellTextEditor.erl
index d9ab1dc107..44a324d5ea 100644
--- a/lib/wx/src/gen/wxGridCellTextEditor.erl
+++ b/lib/wx/src/gen/wxGridCellTextEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,18 +33,21 @@
-export([beginEdit/4,endEdit/4,handleReturn/2,isCreated/1,paintBackground/3,
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
+-export_type([wxGridCellTextEditor/0]).
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGridCellTextEditor()
+-type wxGridCellTextEditor() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelltexteditor.html#wxgridcelltexteditorwxgridcelltexteditor">external documentation</a>.
+-spec new() -> wxGridCellTextEditor().
new() ->
wxe_util:construct(?wxGridCellTextEditor_new,
<<>>).
-%% @spec (This::wxGridCellTextEditor(), Params::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridcelltexteditor.html#wxgridcelltexteditorsetparameters">external documentation</a>.
+-spec setParameters(This, Params) -> ok when
+ This::wxGridCellTextEditor(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
?CLASS(ThisT,wxGridCellTextEditor),
@@ -52,8 +55,8 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
wxe_util:cast(?wxGridCellTextEditor_SetParameters,
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGridCellTextEditor()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridCellTextEditor()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellTextEditor),
wxe_util:destroy(?wxGridCellTextEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridEvent.erl b/lib/wx/src/gen/wxGridEvent.erl
index 123088afb5..59c2ad53b5 100644
--- a/lib/wx/src/gen/wxGridEvent.erl
+++ b/lib/wx/src/gen/wxGridEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,63 +42,73 @@
isSelection/1,parent_class/1,resumePropagation/2,setInt/2,setString/2,
shouldPropagate/1,skip/1,skip/2,stopPropagation/1,veto/1]).
+-export_type([wxGridEvent/0]).
%% @hidden
parent_class(wxNotifyEvent) -> true;
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxGridEvent()) -> bool()
+-type wxGridEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridevent.html#wxgrideventaltdown">external documentation</a>.
+-spec altDown(This) -> boolean() when
+ This::wxGridEvent().
altDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridEvent),
wxe_util:call(?wxGridEvent_AltDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridevent.html#wxgrideventcontroldown">external documentation</a>.
+-spec controlDown(This) -> boolean() when
+ This::wxGridEvent().
controlDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridEvent),
wxe_util:call(?wxGridEvent_ControlDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridevent.html#wxgrideventgetcol">external documentation</a>.
+-spec getCol(This) -> integer() when
+ This::wxGridEvent().
getCol(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridEvent),
wxe_util:call(?wxGridEvent_GetCol,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridEvent()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridevent.html#wxgrideventgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxGridEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridEvent),
wxe_util:call(?wxGridEvent_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridevent.html#wxgrideventgetrow">external documentation</a>.
+-spec getRow(This) -> integer() when
+ This::wxGridEvent().
getRow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridEvent),
wxe_util:call(?wxGridEvent_GetRow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridevent.html#wxgrideventmetadown">external documentation</a>.
+-spec metaDown(This) -> boolean() when
+ This::wxGridEvent().
metaDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridEvent),
wxe_util:call(?wxGridEvent_MetaDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridevent.html#wxgrideventselecting">external documentation</a>.
+-spec selecting(This) -> boolean() when
+ This::wxGridEvent().
selecting(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridEvent),
wxe_util:call(?wxGridEvent_Selecting,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridevent.html#wxgrideventshiftdown">external documentation</a>.
+-spec shiftDown(This) -> boolean() when
+ This::wxGridEvent().
shiftDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridEvent),
wxe_util:call(?wxGridEvent_ShiftDown,
diff --git a/lib/wx/src/gen/wxGridSizer.erl b/lib/wx/src/gen/wxGridSizer.erl
index fd8580c70d..10c905f041 100644
--- a/lib/wx/src/gen/wxGridSizer.erl
+++ b/lib/wx/src/gen/wxGridSizer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,19 +41,25 @@
setMinSize/2,setMinSize/3,setSizeHints/2,setVirtualSizeHints/2,show/2,
show/3]).
+-export_type([wxGridSizer/0]).
%% @hidden
parent_class(wxSizer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Cols::integer()) -> wxGridSizer()
+-type wxGridSizer() :: wx:wx_object().
%% @equiv new(Cols, [])
+-spec new(Cols) -> wxGridSizer() when
+ Cols::integer().
+
new(Cols)
when is_integer(Cols) ->
new(Cols, []).
-%% @spec (Cols::integer(), [Option]) -> wxGridSizer()
-%% Option = {vgap, integer()} | {hgap, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizerwxgridsizer">external documentation</a>.
+-spec new(Cols, [Option]) -> wxGridSizer() when
+ Cols::integer(),
+ Option :: {vgap, integer()}
+ | {hgap, integer()}.
new(Cols, Options)
when is_integer(Cols),is_list(Options) ->
MOpts = fun({vgap, Vgap}, Acc) -> [<<1:32/?UI,Vgap:32/?UI>>|Acc];
@@ -63,75 +69,84 @@ new(Cols, Options)
wxe_util:construct(?wxGridSizer_new_2,
<<Cols:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (Rows::integer(), Cols::integer(), Vgap::integer(), Hgap::integer()) -> wxGridSizer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizerwxgridsizer">external documentation</a>.
+-spec new(Rows, Cols, Vgap, Hgap) -> wxGridSizer() when
+ Rows::integer(), Cols::integer(), Vgap::integer(), Hgap::integer().
new(Rows,Cols,Vgap,Hgap)
when is_integer(Rows),is_integer(Cols),is_integer(Vgap),is_integer(Hgap) ->
wxe_util:construct(?wxGridSizer_new_4,
<<Rows:32/?UI,Cols:32/?UI,Vgap:32/?UI,Hgap:32/?UI>>).
-%% @spec (This::wxGridSizer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizergetcols">external documentation</a>.
+-spec getCols(This) -> integer() when
+ This::wxGridSizer().
getCols(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridSizer),
wxe_util:call(?wxGridSizer_GetCols,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridSizer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizergethgap">external documentation</a>.
+-spec getHGap(This) -> integer() when
+ This::wxGridSizer().
getHGap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridSizer),
wxe_util:call(?wxGridSizer_GetHGap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridSizer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizergetrows">external documentation</a>.
+-spec getRows(This) -> integer() when
+ This::wxGridSizer().
getRows(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridSizer),
wxe_util:call(?wxGridSizer_GetRows,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridSizer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizergetvgap">external documentation</a>.
+-spec getVGap(This) -> integer() when
+ This::wxGridSizer().
getVGap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridSizer),
wxe_util:call(?wxGridSizer_GetVGap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGridSizer(), Cols::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizersetcols">external documentation</a>.
+-spec setCols(This, Cols) -> ok when
+ This::wxGridSizer(), Cols::integer().
setCols(#wx_ref{type=ThisT,ref=ThisRef},Cols)
when is_integer(Cols) ->
?CLASS(ThisT,wxGridSizer),
wxe_util:cast(?wxGridSizer_SetCols,
<<ThisRef:32/?UI,Cols:32/?UI>>).
-%% @spec (This::wxGridSizer(), Gap::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizersethgap">external documentation</a>.
+-spec setHGap(This, Gap) -> ok when
+ This::wxGridSizer(), Gap::integer().
setHGap(#wx_ref{type=ThisT,ref=ThisRef},Gap)
when is_integer(Gap) ->
?CLASS(ThisT,wxGridSizer),
wxe_util:cast(?wxGridSizer_SetHGap,
<<ThisRef:32/?UI,Gap:32/?UI>>).
-%% @spec (This::wxGridSizer(), Rows::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizersetrows">external documentation</a>.
+-spec setRows(This, Rows) -> ok when
+ This::wxGridSizer(), Rows::integer().
setRows(#wx_ref{type=ThisT,ref=ThisRef},Rows)
when is_integer(Rows) ->
?CLASS(ThisT,wxGridSizer),
wxe_util:cast(?wxGridSizer_SetRows,
<<ThisRef:32/?UI,Rows:32/?UI>>).
-%% @spec (This::wxGridSizer(), Gap::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgridsizer.html#wxgridsizersetvgap">external documentation</a>.
+-spec setVGap(This, Gap) -> ok when
+ This::wxGridSizer(), Gap::integer().
setVGap(#wx_ref{type=ThisT,ref=ThisRef},Gap)
when is_integer(Gap) ->
?CLASS(ThisT,wxGridSizer),
wxe_util:cast(?wxGridSizer_SetVGap,
<<ThisRef:32/?UI,Gap:32/?UI>>).
-%% @spec (This::wxGridSizer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGridSizer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxHelpEvent.erl b/lib/wx/src/gen/wxHelpEvent.erl
index b80903c314..70da136be8 100644
--- a/lib/wx/src/gen/wxHelpEvent.erl
+++ b/lib/wx/src/gen/wxHelpEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,38 +37,42 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxHelpEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxHelpEvent()) -> Origin
-%% Origin = integer()
+-type wxHelpEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhelpevent.html#wxhelpeventgetorigin">external documentation</a>.
-%%<br /> Origin is one of ?wxHelpEvent_Origin_Unknown | ?wxHelpEvent_Origin_Keyboard | ?wxHelpEvent_Origin_HelpButton
+%%<br /> Res = ?wxHelpEvent_Origin_Unknown | ?wxHelpEvent_Origin_Keyboard | ?wxHelpEvent_Origin_HelpButton
+-spec getOrigin(This) -> wx:wx_enum() when
+ This::wxHelpEvent().
getOrigin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHelpEvent),
wxe_util:call(?wxHelpEvent_GetOrigin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHelpEvent()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhelpevent.html#wxhelpeventgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxHelpEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHelpEvent),
wxe_util:call(?wxHelpEvent_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHelpEvent(), Origin::Origin) -> ok
-%% Origin = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhelpevent.html#wxhelpeventsetorigin">external documentation</a>.
-%%<br /> Origin is one of ?wxHelpEvent_Origin_Unknown | ?wxHelpEvent_Origin_Keyboard | ?wxHelpEvent_Origin_HelpButton
+%%<br /> Origin = ?wxHelpEvent_Origin_Unknown | ?wxHelpEvent_Origin_Keyboard | ?wxHelpEvent_Origin_HelpButton
+-spec setOrigin(This, Origin) -> ok when
+ This::wxHelpEvent(), Origin::wx:wx_enum().
setOrigin(#wx_ref{type=ThisT,ref=ThisRef},Origin)
when is_integer(Origin) ->
?CLASS(ThisT,wxHelpEvent),
wxe_util:cast(?wxHelpEvent_SetOrigin,
<<ThisRef:32/?UI,Origin:32/?UI>>).
-%% @spec (This::wxHelpEvent(), Pos::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhelpevent.html#wxhelpeventsetposition">external documentation</a>.
+-spec setPosition(This, Pos) -> ok when
+ This::wxHelpEvent(), Pos::{X::integer(), Y::integer()}.
setPosition(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
?CLASS(ThisT,wxHelpEvent),
diff --git a/lib/wx/src/gen/wxHtmlEasyPrinting.erl b/lib/wx/src/gen/wxHtmlEasyPrinting.erl
index 15d673169a..2a5506053b 100644
--- a/lib/wx/src/gen/wxHtmlEasyPrinting.erl
+++ b/lib/wx/src/gen/wxHtmlEasyPrinting.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,17 +32,21 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxHtmlEasyPrinting/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxHtmlEasyPrinting()
+-type wxHtmlEasyPrinting() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxHtmlEasyPrinting().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxHtmlEasyPrinting()
-%% Option = {name, string()} | {parentWindow, wxWindow:wxWindow()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingwxhtmleasyprinting">external documentation</a>.
+-spec new([Option]) -> wxHtmlEasyPrinting() when
+ Option :: {name, unicode:chardata()}
+ | {parentWindow, wxWindow:wxWindow()}.
new(Options)
when is_list(Options) ->
MOpts = fun({name, Name}, Acc) -> Name_UC = unicode:characters_to_binary([Name,0]),[<<1:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
@@ -52,22 +56,25 @@ new(Options)
wxe_util:construct(?wxHtmlEasyPrinting_new,
<<BinOpt/binary>>).
-%% @spec (This::wxHtmlEasyPrinting()) -> wxPrintData:wxPrintData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintinggetprintdata">external documentation</a>.
+-spec getPrintData(This) -> wxPrintData:wxPrintData() when
+ This::wxHtmlEasyPrinting().
getPrintData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
wxe_util:call(?wxHtmlEasyPrinting_GetPrintData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlEasyPrinting()) -> wxPageSetupDialogData:wxPageSetupDialogData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintinggetpagesetupdata">external documentation</a>.
+-spec getPageSetupData(This) -> wxPageSetupDialogData:wxPageSetupDialogData() when
+ This::wxHtmlEasyPrinting().
getPageSetupData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
wxe_util:call(?wxHtmlEasyPrinting_GetPageSetupData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlEasyPrinting(), Htmlfile::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingpreviewfile">external documentation</a>.
+-spec previewFile(This, Htmlfile) -> boolean() when
+ This::wxHtmlEasyPrinting(), Htmlfile::unicode:chardata().
previewFile(#wx_ref{type=ThisT,ref=ThisRef},Htmlfile)
when is_list(Htmlfile) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -75,15 +82,18 @@ previewFile(#wx_ref{type=ThisT,ref=ThisRef},Htmlfile)
wxe_util:call(?wxHtmlEasyPrinting_PreviewFile,
<<ThisRef:32/?UI,(byte_size(Htmlfile_UC)):32/?UI,(Htmlfile_UC)/binary, 0:(((8- ((0+byte_size(Htmlfile_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxHtmlEasyPrinting(), Htmltext::string()) -> bool()
%% @equiv previewText(This,Htmltext, [])
+-spec previewText(This, Htmltext) -> boolean() when
+ This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata().
+
previewText(This,Htmltext)
when is_record(This, wx_ref),is_list(Htmltext) ->
previewText(This,Htmltext, []).
-%% @spec (This::wxHtmlEasyPrinting(), Htmltext::string(), [Option]) -> bool()
-%% Option = {basepath, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingpreviewtext">external documentation</a>.
+-spec previewText(This, Htmltext, [Option]) -> boolean() when
+ This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata(),
+ Option :: {basepath, unicode:chardata()}.
previewText(#wx_ref{type=ThisT,ref=ThisRef},Htmltext, Options)
when is_list(Htmltext),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -94,8 +104,9 @@ previewText(#wx_ref{type=ThisT,ref=ThisRef},Htmltext, Options)
wxe_util:call(?wxHtmlEasyPrinting_PreviewText,
<<ThisRef:32/?UI,(byte_size(Htmltext_UC)):32/?UI,(Htmltext_UC)/binary, 0:(((8- ((0+byte_size(Htmltext_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxHtmlEasyPrinting(), Htmlfile::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingprintfile">external documentation</a>.
+-spec printFile(This, Htmlfile) -> boolean() when
+ This::wxHtmlEasyPrinting(), Htmlfile::unicode:chardata().
printFile(#wx_ref{type=ThisT,ref=ThisRef},Htmlfile)
when is_list(Htmlfile) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -103,15 +114,18 @@ printFile(#wx_ref{type=ThisT,ref=ThisRef},Htmlfile)
wxe_util:call(?wxHtmlEasyPrinting_PrintFile,
<<ThisRef:32/?UI,(byte_size(Htmlfile_UC)):32/?UI,(Htmlfile_UC)/binary, 0:(((8- ((0+byte_size(Htmlfile_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxHtmlEasyPrinting(), Htmltext::string()) -> bool()
%% @equiv printText(This,Htmltext, [])
+-spec printText(This, Htmltext) -> boolean() when
+ This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata().
+
printText(This,Htmltext)
when is_record(This, wx_ref),is_list(Htmltext) ->
printText(This,Htmltext, []).
-%% @spec (This::wxHtmlEasyPrinting(), Htmltext::string(), [Option]) -> bool()
-%% Option = {basepath, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingprinttext">external documentation</a>.
+-spec printText(This, Htmltext, [Option]) -> boolean() when
+ This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata(),
+ Option :: {basepath, unicode:chardata()}.
printText(#wx_ref{type=ThisT,ref=ThisRef},Htmltext, Options)
when is_list(Htmltext),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -122,22 +136,26 @@ printText(#wx_ref{type=ThisT,ref=ThisRef},Htmltext, Options)
wxe_util:call(?wxHtmlEasyPrinting_PrintText,
<<ThisRef:32/?UI,(byte_size(Htmltext_UC)):32/?UI,(Htmltext_UC)/binary, 0:(((8- ((0+byte_size(Htmltext_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxHtmlEasyPrinting()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingpagesetup">external documentation</a>.
+-spec pageSetup(This) -> ok when
+ This::wxHtmlEasyPrinting().
pageSetup(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
wxe_util:cast(?wxHtmlEasyPrinting_PageSetup,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlEasyPrinting(), Normal_face::string(), Fixed_face::string()) -> ok
%% @equiv setFonts(This,Normal_face,Fixed_face, [])
+-spec setFonts(This, Normal_face, Fixed_face) -> ok when
+ This::wxHtmlEasyPrinting(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata().
+
setFonts(This,Normal_face,Fixed_face)
when is_record(This, wx_ref),is_list(Normal_face),is_list(Fixed_face) ->
setFonts(This,Normal_face,Fixed_face, []).
-%% @spec (This::wxHtmlEasyPrinting(), Normal_face::string(), Fixed_face::string(), [Option]) -> ok
-%% Option = {sizes, [integer()]}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetfonts">external documentation</a>.
+-spec setFonts(This, Normal_face, Fixed_face, [Option]) -> ok when
+ This::wxHtmlEasyPrinting(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata(),
+ Option :: {sizes, [integer()]}.
setFonts(#wx_ref{type=ThisT,ref=ThisRef},Normal_face,Fixed_face, Options)
when is_list(Normal_face),is_list(Fixed_face),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -150,15 +168,18 @@ setFonts(#wx_ref{type=ThisT,ref=ThisRef},Normal_face,Fixed_face, Options)
wxe_util:cast(?wxHtmlEasyPrinting_SetFonts,
<<ThisRef:32/?UI,(byte_size(Normal_face_UC)):32/?UI,(Normal_face_UC)/binary, 0:(((8- ((0+byte_size(Normal_face_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Fixed_face_UC)):32/?UI,(Fixed_face_UC)/binary, 0:(((8- ((4+byte_size(Fixed_face_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxHtmlEasyPrinting(), Header::string()) -> ok
%% @equiv setHeader(This,Header, [])
+-spec setHeader(This, Header) -> ok when
+ This::wxHtmlEasyPrinting(), Header::unicode:chardata().
+
setHeader(This,Header)
when is_record(This, wx_ref),is_list(Header) ->
setHeader(This,Header, []).
-%% @spec (This::wxHtmlEasyPrinting(), Header::string(), [Option]) -> ok
-%% Option = {pg, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetheader">external documentation</a>.
+-spec setHeader(This, Header, [Option]) -> ok when
+ This::wxHtmlEasyPrinting(), Header::unicode:chardata(),
+ Option :: {pg, integer()}.
setHeader(#wx_ref{type=ThisT,ref=ThisRef},Header, Options)
when is_list(Header),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -169,15 +190,18 @@ setHeader(#wx_ref{type=ThisT,ref=ThisRef},Header, Options)
wxe_util:cast(?wxHtmlEasyPrinting_SetHeader,
<<ThisRef:32/?UI,(byte_size(Header_UC)):32/?UI,(Header_UC)/binary, 0:(((8- ((0+byte_size(Header_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxHtmlEasyPrinting(), Footer::string()) -> ok
%% @equiv setFooter(This,Footer, [])
+-spec setFooter(This, Footer) -> ok when
+ This::wxHtmlEasyPrinting(), Footer::unicode:chardata().
+
setFooter(This,Footer)
when is_record(This, wx_ref),is_list(Footer) ->
setFooter(This,Footer, []).
-%% @spec (This::wxHtmlEasyPrinting(), Footer::string(), [Option]) -> ok
-%% Option = {pg, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetfooter">external documentation</a>.
+-spec setFooter(This, Footer, [Option]) -> ok when
+ This::wxHtmlEasyPrinting(), Footer::unicode:chardata(),
+ Option :: {pg, integer()}.
setFooter(#wx_ref{type=ThisT,ref=ThisRef},Footer, Options)
when is_list(Footer),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -188,8 +212,8 @@ setFooter(#wx_ref{type=ThisT,ref=ThisRef},Footer, Options)
wxe_util:cast(?wxHtmlEasyPrinting_SetFooter,
<<ThisRef:32/?UI,(byte_size(Footer_UC)):32/?UI,(Footer_UC)/binary, 0:(((8- ((0+byte_size(Footer_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxHtmlEasyPrinting()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxHtmlEasyPrinting()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxHtmlEasyPrinting),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxHtmlLinkEvent.erl b/lib/wx/src/gen/wxHtmlLinkEvent.erl
index 166493ccbc..94fe670f35 100644
--- a/lib/wx/src/gen/wxHtmlLinkEvent.erl
+++ b/lib/wx/src/gen/wxHtmlLinkEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,13 +40,16 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxHtmlLinkEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxHtmlLinkEvent()) -> wx:wxHtmlLinkInfo()
+-type wxHtmlLinkEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmllinkevent.html#wxhtmllinkeventgetlinkinfo">external documentation</a>.
+-spec getLinkInfo(This) -> wx:wx_wxHtmlLinkInfo() when
+ This::wxHtmlLinkEvent().
getLinkInfo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlLinkEvent),
wxe_util:call(?wxHtmlLinkEvent_GetLinkInfo,
diff --git a/lib/wx/src/gen/wxHtmlWindow.erl b/lib/wx/src/gen/wxHtmlWindow.erl
index 891e5481fb..4820f7d075 100644
--- a/lib/wx/src/gen/wxHtmlWindow.erl
+++ b/lib/wx/src/gen/wxHtmlWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -79,6 +79,7 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxHtmlWindow/0]).
%% @hidden
parent_class(wxScrolledWindow) -> true;
parent_class(wxPanel) -> true;
@@ -86,21 +87,28 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxHtmlWindow()
+-type wxHtmlWindow() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowwxhtmlwindow">external documentation</a>.
+-spec new() -> wxHtmlWindow().
new() ->
wxe_util:construct(?wxHtmlWindow_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxHtmlWindow()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxHtmlWindow() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxHtmlWindow()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowwxhtmlwindow">external documentation</a>.
+-spec new(Parent, [Option]) -> wxHtmlWindow() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -113,8 +121,9 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxHtmlWindow_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxHtmlWindow(), Source::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowappendtopage">external documentation</a>.
+-spec appendToPage(This, Source) -> boolean() when
+ This::wxHtmlWindow(), Source::unicode:chardata().
appendToPage(#wx_ref{type=ThisT,ref=ThisRef},Source)
when is_list(Source) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -122,71 +131,81 @@ appendToPage(#wx_ref{type=ThisT,ref=ThisRef},Source)
wxe_util:call(?wxHtmlWindow_AppendToPage,
<<ThisRef:32/?UI,(byte_size(Source_UC)):32/?UI,(Source_UC)/binary, 0:(((8- ((0+byte_size(Source_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxHtmlWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowgetopenedanchor">external documentation</a>.
+-spec getOpenedAnchor(This) -> unicode:charlist() when
+ This::wxHtmlWindow().
getOpenedAnchor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_GetOpenedAnchor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowgetopenedpage">external documentation</a>.
+-spec getOpenedPage(This) -> unicode:charlist() when
+ This::wxHtmlWindow().
getOpenedPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_GetOpenedPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowgetopenedpagetitle">external documentation</a>.
+-spec getOpenedPageTitle(This) -> unicode:charlist() when
+ This::wxHtmlWindow().
getOpenedPageTitle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_GetOpenedPageTitle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> wxFrame:wxFrame()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowgetrelatedframe">external documentation</a>.
+-spec getRelatedFrame(This) -> wxFrame:wxFrame() when
+ This::wxHtmlWindow().
getRelatedFrame(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_GetRelatedFrame,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowhistoryback">external documentation</a>.
+-spec historyBack(This) -> boolean() when
+ This::wxHtmlWindow().
historyBack(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_HistoryBack,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowhistorycanback">external documentation</a>.
+-spec historyCanBack(This) -> boolean() when
+ This::wxHtmlWindow().
historyCanBack(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_HistoryCanBack,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowhistorycanforward">external documentation</a>.
+-spec historyCanForward(This) -> boolean() when
+ This::wxHtmlWindow().
historyCanForward(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_HistoryCanForward,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowhistoryclear">external documentation</a>.
+-spec historyClear(This) -> ok when
+ This::wxHtmlWindow().
historyClear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:cast(?wxHtmlWindow_HistoryClear,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowhistoryforward">external documentation</a>.
+-spec historyForward(This) -> boolean() when
+ This::wxHtmlWindow().
historyForward(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_HistoryForward,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow(), Filename::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowloadfile">external documentation</a>.
+-spec loadFile(This, Filename) -> boolean() when
+ This::wxHtmlWindow(), Filename::unicode:chardata().
loadFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
when is_list(Filename) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -194,8 +213,9 @@ loadFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
wxe_util:call(?wxHtmlWindow_LoadFile,
<<ThisRef:32/?UI,(byte_size(Filename_UC)):32/?UI,(Filename_UC)/binary, 0:(((8- ((0+byte_size(Filename_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxHtmlWindow(), Location::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowloadpage">external documentation</a>.
+-spec loadPage(This, Location) -> boolean() when
+ This::wxHtmlWindow(), Location::unicode:chardata().
loadPage(#wx_ref{type=ThisT,ref=ThisRef},Location)
when is_list(Location) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -203,53 +223,61 @@ loadPage(#wx_ref{type=ThisT,ref=ThisRef},Location)
wxe_util:call(?wxHtmlWindow_LoadPage,
<<ThisRef:32/?UI,(byte_size(Location_UC)):32/?UI,(Location_UC)/binary, 0:(((8- ((0+byte_size(Location_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxHtmlWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowselectall">external documentation</a>.
+-spec selectAll(This) -> ok when
+ This::wxHtmlWindow().
selectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:cast(?wxHtmlWindow_SelectAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowselectiontotext">external documentation</a>.
+-spec selectionToText(This) -> unicode:charlist() when
+ This::wxHtmlWindow().
selectionToText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_SelectionToText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow(), Pos::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowselectline">external documentation</a>.
+-spec selectLine(This, Pos) -> ok when
+ This::wxHtmlWindow(), Pos::{X::integer(), Y::integer()}.
selectLine(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:cast(?wxHtmlWindow_SelectLine,
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
-%% @spec (This::wxHtmlWindow(), Pos::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowselectword">external documentation</a>.
+-spec selectWord(This, Pos) -> ok when
+ This::wxHtmlWindow(), Pos::{X::integer(), Y::integer()}.
selectWord(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:cast(?wxHtmlWindow_SelectWord,
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
-%% @spec (This::wxHtmlWindow(), B::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowsetborders">external documentation</a>.
+-spec setBorders(This, B) -> ok when
+ This::wxHtmlWindow(), B::integer().
setBorders(#wx_ref{type=ThisT,ref=ThisRef},B)
when is_integer(B) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:cast(?wxHtmlWindow_SetBorders,
<<ThisRef:32/?UI,B:32/?UI>>).
-%% @spec (This::wxHtmlWindow(), Normal_face::string(), Fixed_face::string()) -> ok
%% @equiv setFonts(This,Normal_face,Fixed_face, [])
+-spec setFonts(This, Normal_face, Fixed_face) -> ok when
+ This::wxHtmlWindow(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata().
+
setFonts(This,Normal_face,Fixed_face)
when is_record(This, wx_ref),is_list(Normal_face),is_list(Fixed_face) ->
setFonts(This,Normal_face,Fixed_face, []).
-%% @spec (This::wxHtmlWindow(), Normal_face::string(), Fixed_face::string(), [Option]) -> ok
-%% Option = {sizes, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowsetfonts">external documentation</a>.
+-spec setFonts(This, Normal_face, Fixed_face, [Option]) -> ok when
+ This::wxHtmlWindow(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata(),
+ Option :: {sizes, integer()}.
setFonts(#wx_ref{type=ThisT,ref=ThisRef},Normal_face,Fixed_face, Options)
when is_list(Normal_face),is_list(Fixed_face),is_list(Options) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -261,8 +289,9 @@ setFonts(#wx_ref{type=ThisT,ref=ThisRef},Normal_face,Fixed_face, Options)
wxe_util:cast(?wxHtmlWindow_SetFonts,
<<ThisRef:32/?UI,(byte_size(Normal_face_UC)):32/?UI,(Normal_face_UC)/binary, 0:(((8- ((0+byte_size(Normal_face_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Fixed_face_UC)):32/?UI,(Fixed_face_UC)/binary, 0:(((8- ((4+byte_size(Fixed_face_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxHtmlWindow(), Source::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowsetpage">external documentation</a>.
+-spec setPage(This, Source) -> boolean() when
+ This::wxHtmlWindow(), Source::unicode:chardata().
setPage(#wx_ref{type=ThisT,ref=ThisRef},Source)
when is_list(Source) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -270,8 +299,9 @@ setPage(#wx_ref{type=ThisT,ref=ThisRef},Source)
wxe_util:call(?wxHtmlWindow_SetPage,
<<ThisRef:32/?UI,(byte_size(Source_UC)):32/?UI,(Source_UC)/binary, 0:(((8- ((0+byte_size(Source_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxHtmlWindow(), Frame::wxFrame:wxFrame(), Format::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowsetrelatedframe">external documentation</a>.
+-spec setRelatedFrame(This, Frame, Format) -> ok when
+ This::wxHtmlWindow(), Frame::wxFrame:wxFrame(), Format::unicode:chardata().
setRelatedFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef},Format)
when is_list(Format) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -280,23 +310,25 @@ setRelatedFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef
wxe_util:cast(?wxHtmlWindow_SetRelatedFrame,
<<ThisRef:32/?UI,FrameRef:32/?UI,(byte_size(Format_UC)):32/?UI,(Format_UC)/binary, 0:(((8- ((4+byte_size(Format_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxHtmlWindow(), Bar::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowsetrelatedstatusbar">external documentation</a>.
+-spec setRelatedStatusBar(This, Bar) -> ok when
+ This::wxHtmlWindow(), Bar::integer().
setRelatedStatusBar(#wx_ref{type=ThisT,ref=ThisRef},Bar)
when is_integer(Bar) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:cast(?wxHtmlWindow_SetRelatedStatusBar,
<<ThisRef:32/?UI,Bar:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxhtmlwindow.html#wxhtmlwindowtotext">external documentation</a>.
+-spec toText(This) -> unicode:charlist() when
+ This::wxHtmlWindow().
toText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
wxe_util:call(?wxHtmlWindow_ToText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxHtmlWindow()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxHtmlWindow()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxHtmlWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxIcon.erl b/lib/wx/src/gen/wxIcon.erl
index 5b224c00b6..0f31278732 100644
--- a/lib/wx/src/gen/wxIcon.erl
+++ b/lib/wx/src/gen/wxIcon.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,24 +35,28 @@
saveFile/3,saveFile/4,setDepth/2,setHeight/2,setMask/2,setPalette/2,
setWidth/2]).
+-export_type([wxIcon/0]).
%% @hidden
parent_class(wxBitmap) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxIcon()
+-type wxIcon() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxicon.html#wxiconwxicon">external documentation</a>.
+-spec new() -> wxIcon().
new() ->
wxe_util:construct(?wxIcon_new_0,
<<>>).
-%% @spec (X::string()|term()) -> wxIcon()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxicon.html#wxiconwxicon">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Filename::string()) -> new(Filename, []) </c></p>
-%% <p><c>
-%% new(Loc::wx:wx()) -> wxIcon() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(Loc) -> wxIcon() when<br />
+%% Loc::wx:wx_object().<br />
+%%
+%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+-spec new(Filename) -> wxIcon() when
+ Filename::unicode:chardata();
+ (Loc) -> wxIcon() when
+ Loc::wx:wx_object().
new(Filename)
when is_list(Filename) ->
@@ -62,11 +66,13 @@ new(#wx_ref{type=LocT,ref=LocRef}) ->
wxe_util:construct(?wxIcon_new_1,
<<LocRef:32/?UI>>).
-%% @spec (Filename::string(), [Option]) -> wxIcon()
-%% Option = {type, WxBitmapType} | {desiredWidth, integer()} | {desiredHeight, integer()}
-%% WxBitmapType = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxicon.html#wxiconwxicon">external documentation</a>.
-%%<br /> WxBitmapType is one of ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
+-spec new(Filename, [Option]) -> wxIcon() when
+ Filename::unicode:chardata(),
+ Option :: {type, wx:wx_enum()}
+ | {desiredWidth, integer()}
+ | {desiredHeight, integer()}.
new(Filename, Options)
when is_list(Filename),is_list(Options) ->
Filename_UC = unicode:characters_to_binary([Filename,0]),
@@ -78,16 +84,17 @@ new(Filename, Options)
wxe_util:construct(?wxIcon_new_2,
<<(byte_size(Filename_UC)):32/?UI,(Filename_UC)/binary, 0:(((8- ((4+byte_size(Filename_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxIcon(), Bmp::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxicon.html#wxiconcopyfrombitmap">external documentation</a>.
+-spec copyFromBitmap(This, Bmp) -> ok when
+ This::wxIcon(), Bmp::wxBitmap:wxBitmap().
copyFromBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef}) ->
?CLASS(ThisT,wxIcon),
?CLASS(BmpT,wxBitmap),
wxe_util:cast(?wxIcon_CopyFromBitmap,
<<ThisRef:32/?UI,BmpRef:32/?UI>>).
-%% @spec (This::wxIcon()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxIcon()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxIcon),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxIconBundle.erl b/lib/wx/src/gen/wxIconBundle.erl
index 011b2dd1ac..5e8bb7cc74 100644
--- a/lib/wx/src/gen/wxIconBundle.erl
+++ b/lib/wx/src/gen/wxIconBundle.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,17 +29,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxIconBundle/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxIconBundle()
+-type wxIconBundle() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
+-spec new() -> wxIconBundle().
new() ->
wxe_util:construct(?wxIconBundle_new_0,
<<>>).
-%% @spec (Ic::wxIconBundle() | wxIcon:wxIcon()) -> wxIconBundle()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
+-spec new(Ic) -> wxIconBundle() when
+ Ic::wxIconBundle() | wxIcon:wxIcon().
new(#wx_ref{type=IcT,ref=IcRef}) ->
IcOP = case ?CLASS_T(IcT,wxIconBundle) of
true ->
@@ -50,24 +53,27 @@ new(#wx_ref{type=IcT,ref=IcRef}) ->
wxe_util:construct(IcOP,
<<IcRef:32/?UI>>).
-%% @spec (File::string(), Type::integer()) -> wxIconBundle()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
+-spec new(File, Type) -> wxIconBundle() when
+ File::unicode:chardata(), Type::integer().
new(File,Type)
when is_list(File),is_integer(Type) ->
File_UC = unicode:characters_to_binary([File,0]),
wxe_util:construct(?wxIconBundle_new_2,
<<(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((4+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI>>).
-%% @spec (This::wxIconBundle(), Icon::wxIcon:wxIcon()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundleaddicon">external documentation</a>.
+-spec addIcon(This, Icon) -> ok when
+ This::wxIconBundle(), Icon::wxIcon:wxIcon().
addIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
?CLASS(ThisT,wxIconBundle),
?CLASS(IconT,wxIcon),
wxe_util:cast(?wxIconBundle_AddIcon_1,
<<ThisRef:32/?UI,IconRef:32/?UI>>).
-%% @spec (This::wxIconBundle(), File::string(), Type::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundleaddicon">external documentation</a>.
+-spec addIcon(This, File, Type) -> ok when
+ This::wxIconBundle(), File::unicode:chardata(), Type::integer().
addIcon(#wx_ref{type=ThisT,ref=ThisRef},File,Type)
when is_list(File),is_integer(Type) ->
?CLASS(ThisT,wxIconBundle),
@@ -75,22 +81,24 @@ addIcon(#wx_ref{type=ThisT,ref=ThisRef},File,Type)
wxe_util:cast(?wxIconBundle_AddIcon_2,
<<ThisRef:32/?UI,(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((0+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI>>).
-%% @spec (This::wxIconBundle()) -> wxIcon:wxIcon()
%% @equiv getIcon(This, [])
+-spec getIcon(This) -> wxIcon:wxIcon() when
+ This::wxIconBundle().
+
getIcon(This)
when is_record(This, wx_ref) ->
getIcon(This, []).
-%% @spec (This::wxIconBundle(),X::term()) -> wxIcon:wxIcon()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlegeticon">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% getIcon(This::wxIconBundle(), [Option]) -> wxIcon:wxIcon() </c>
-%%<br /> Option = {size, integer()}
-%% </p>
-%% <p><c>
-%% getIcon(This::wxIconBundle(), Size::{W::integer(), H::integer()}) -> wxIcon:wxIcon() </c>
-%% </p>
+%% <br /> Also:<br />
+%% getIcon(This, Size) -> wxIcon:wxIcon() when<br />
+%% This::wxIconBundle(), Size::{W::integer(), H::integer()}.<br />
+%%
+-spec getIcon(This, [Option]) -> wxIcon:wxIcon() when
+ This::wxIconBundle(),
+ Option :: {size, integer()};
+ (This, Size) -> wxIcon:wxIcon() when
+ This::wxIconBundle(), Size::{W::integer(), H::integer()}.
getIcon(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxIconBundle),
@@ -105,8 +113,8 @@ getIcon(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
wxe_util:call(?wxIconBundle_GetIcon_1_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxIconBundle()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxIconBundle()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxIconBundle),
wxe_util:destroy(?wxIconBundle_destruct,Obj),
diff --git a/lib/wx/src/gen/wxIconizeEvent.erl b/lib/wx/src/gen/wxIconizeEvent.erl
index 647d8019a1..f428ebf70f 100644
--- a/lib/wx/src/gen/wxIconizeEvent.erl
+++ b/lib/wx/src/gen/wxIconizeEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,12 +37,15 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxIconizeEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxIconizeEvent()) -> bool()
+-type wxIconizeEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconizeevent.html#wxiconizeeventiconized">external documentation</a>.
+-spec iconized(This) -> boolean() when
+ This::wxIconizeEvent().
iconized(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxIconizeEvent),
wxe_util:call(?wxIconizeEvent_Iconized,
diff --git a/lib/wx/src/gen/wxIdleEvent.erl b/lib/wx/src/gen/wxIdleEvent.erl
index 87ed7e0cd2..4749026446 100644
--- a/lib/wx/src/gen/wxIdleEvent.erl
+++ b/lib/wx/src/gen/wxIdleEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,34 +37,39 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxIdleEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Win::wxWindow:wxWindow()) -> bool()
+-type wxIdleEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxidleevent.html#wxidleeventcansend">external documentation</a>.
+-spec canSend(Win) -> boolean() when
+ Win::wxWindow:wxWindow().
canSend(#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(WinT,wxWindow),
wxe_util:call(?wxIdleEvent_CanSend,
<<WinRef:32/?UI>>).
-%% @spec () -> WxIdleMode
-%% WxIdleMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxidleevent.html#wxidleeventgetmode">external documentation</a>.
-%%<br /> WxIdleMode is one of ?wxIDLE_PROCESS_ALL | ?wxIDLE_PROCESS_SPECIFIED
+%%<br /> Res = ?wxIDLE_PROCESS_ALL | ?wxIDLE_PROCESS_SPECIFIED
+-spec getMode() -> wx:wx_enum().
getMode() ->
wxe_util:call(?wxIdleEvent_GetMode,
<<>>).
-%% @spec (This::wxIdleEvent()) -> ok
%% @equiv requestMore(This, [])
+-spec requestMore(This) -> ok when
+ This::wxIdleEvent().
+
requestMore(This)
when is_record(This, wx_ref) ->
requestMore(This, []).
-%% @spec (This::wxIdleEvent(), [Option]) -> ok
-%% Option = {needMore, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxidleevent.html#wxidleeventrequestmore">external documentation</a>.
+-spec requestMore(This, [Option]) -> ok when
+ This::wxIdleEvent(),
+ Option :: {needMore, boolean()}.
requestMore(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxIdleEvent),
@@ -74,17 +79,18 @@ requestMore(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxIdleEvent_RequestMore,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxIdleEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxidleevent.html#wxidleeventmorerequested">external documentation</a>.
+-spec moreRequested(This) -> boolean() when
+ This::wxIdleEvent().
moreRequested(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxIdleEvent),
wxe_util:call(?wxIdleEvent_MoreRequested,
<<ThisRef:32/?UI>>).
-%% @spec (Mode::WxIdleMode) -> ok
-%% WxIdleMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxidleevent.html#wxidleeventsetmode">external documentation</a>.
-%%<br /> WxIdleMode is one of ?wxIDLE_PROCESS_ALL | ?wxIDLE_PROCESS_SPECIFIED
+%%<br /> Mode = ?wxIDLE_PROCESS_ALL | ?wxIDLE_PROCESS_SPECIFIED
+-spec setMode(Mode) -> ok when
+ Mode::wx:wx_enum().
setMode(Mode)
when is_integer(Mode) ->
wxe_util:cast(?wxIdleEvent_SetMode,
diff --git a/lib/wx/src/gen/wxImage.erl b/lib/wx/src/gen/wxImage.erl
index ea41a78a40..c21b5d4789 100644
--- a/lib/wx/src/gen/wxImage.erl
+++ b/lib/wx/src/gen/wxImage.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -47,30 +47,38 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxImage/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxImage()
+-type wxImage() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagewximage">external documentation</a>.
+-spec new() -> wxImage().
new() ->
wxe_util:construct(?wxImage_new_0,
<<>>).
-%% @spec (Name::string()) -> wxImage()
%% @equiv new(Name, [])
+-spec new(Name) -> wxImage() when
+ Name::unicode:chardata().
+
new(Name)
when is_list(Name) ->
new(Name, []).
-%% @spec (X::integer()|string(),X::integer()|term()) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagewximage">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Width::integer(), Height::integer()) -> new(Width,Height, []) </c></p>
-%% <p><c>
-%% new(Name::string(), [Option]) -> wxImage() </c>
-%%<br /> Option = {type, integer()} | {index, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Name, [Option]) -> wxImage() when<br />
+%% Name::unicode:chardata(),<br />
+%% Option :: {type, integer()}<br />
+%% | {index, integer()}.<br />
+%%
+-spec new(Width, Height) -> wxImage() when
+ Width::integer(), Height::integer();
+ (Name, [Option]) -> wxImage() when
+ Name::unicode:chardata(),
+ Option :: {type, integer()}
+ | {index, integer()}.
new(Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -85,19 +93,23 @@ new(Name, Options)
wxe_util:construct(?wxImage_new_2,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (X::integer()|string(),X::integer()|string(),X::binary()|term()) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagewximage">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Width::integer(), Height::integer(), Data::binary()) -> new(Width,Height,Data, []) </c></p>
-%% <p><c>
-%% new(Width::integer(), Height::integer(), [Option]) -> wxImage() </c>
-%%<br /> Option = {clear, bool()}
-%% </p>
-%% <p><c>
-%% new(Name::string(), Mimetype::string(), [Option]) -> wxImage() </c>
-%%<br /> Option = {index, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Width, Height, [Option]) -> wxImage() when<br />
+%% Width::integer(), Height::integer(),<br />
+%% Option :: {clear, boolean()};<br />
+%% (Name, Mimetype, [Option]) -> wxImage() when<br />
+%% Name::unicode:chardata(), Mimetype::unicode:chardata(),<br />
+%% Option :: {index, integer()}.<br />
+%%
+-spec new(Width, Height, Data) -> wxImage() when
+ Width::integer(), Height::integer(), Data::binary();
+ (Width, Height, [Option]) -> wxImage() when
+ Width::integer(), Height::integer(),
+ Option :: {clear, boolean()};
+ (Name, Mimetype, [Option]) -> wxImage() when
+ Name::unicode:chardata(), Mimetype::unicode:chardata(),
+ Option :: {index, integer()}.
new(Width,Height,Data)
when is_integer(Width),is_integer(Height),is_binary(Data) ->
@@ -119,15 +131,17 @@ new(Name,Mimetype, Options)
wxe_util:construct(?wxImage_new_3_1,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Mimetype_UC)):32/?UI,(Mimetype_UC)/binary, 0:(((8- ((4+byte_size(Mimetype_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (Width::integer(),Height::integer(),Data::binary(),X::binary()|term()) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagewximage">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Width::integer(), Height::integer(), Data::binary(), Alpha::binary()) -> new(Width,Height,Data,Alpha, []) </c></p>
-%% <p><c>
-%% new(Width::integer(), Height::integer(), Data::binary(), [Option]) -> wxImage() </c>
-%%<br /> Option = {static_data, bool()}
-%% </p>
+%% <br /> Also:<br />
+%% new(Width, Height, Data, [Option]) -> wxImage() when<br />
+%% Width::integer(), Height::integer(), Data::binary(),<br />
+%% Option :: {static_data, boolean()}.<br />
+%%
+-spec new(Width, Height, Data, Alpha) -> wxImage() when
+ Width::integer(), Height::integer(), Data::binary(), Alpha::binary();
+ (Width, Height, Data, [Option]) -> wxImage() when
+ Width::integer(), Height::integer(), Data::binary(),
+ Option :: {static_data, boolean()}.
new(Width,Height,Data,Alpha)
when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha) ->
@@ -141,9 +155,10 @@ new(Width,Height,Data, Options)
wxe_util:construct(?wxImage_new_4,
<<Width:32/?UI,Height:32/?UI, BinOpt/binary>>).
-%% @spec (Width::integer(), Height::integer(), Data::binary(), Alpha::binary(), [Option]) -> wxImage()
-%% Option = {static_data, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagewximage">external documentation</a>.
+-spec new(Width, Height, Data, Alpha, [Option]) -> wxImage() when
+ Width::integer(), Height::integer(), Data::binary(), Alpha::binary(),
+ Option :: {static_data, boolean()}.
new(Width,Height,Data,Alpha, Options)
when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha),is_list(Options) ->
wxe_util:send_bin(Data),
@@ -154,39 +169,45 @@ new(Width,Height,Data,Alpha, Options)
wxe_util:construct(?wxImage_new_5,
<<Width:32/?UI,Height:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxImage(), Radius::integer()) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageblur">external documentation</a>.
+-spec blur(This, Radius) -> wxImage() when
+ This::wxImage(), Radius::integer().
blur(#wx_ref{type=ThisT,ref=ThisRef},Radius)
when is_integer(Radius) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_Blur,
<<ThisRef:32/?UI,Radius:32/?UI>>).
-%% @spec (This::wxImage(), Radius::integer()) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageblurhorizontal">external documentation</a>.
+-spec blurHorizontal(This, Radius) -> wxImage() when
+ This::wxImage(), Radius::integer().
blurHorizontal(#wx_ref{type=ThisT,ref=ThisRef},Radius)
when is_integer(Radius) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_BlurHorizontal,
<<ThisRef:32/?UI,Radius:32/?UI>>).
-%% @spec (This::wxImage(), Radius::integer()) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageblurvertical">external documentation</a>.
+-spec blurVertical(This, Radius) -> wxImage() when
+ This::wxImage(), Radius::integer().
blurVertical(#wx_ref{type=ThisT,ref=ThisRef},Radius)
when is_integer(Radius) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_BlurVertical,
<<ThisRef:32/?UI,Radius:32/?UI>>).
-%% @spec (This::wxImage()) -> bool()
%% @equiv convertAlphaToMask(This, [])
+-spec convertAlphaToMask(This) -> boolean() when
+ This::wxImage().
+
convertAlphaToMask(This)
when is_record(This, wx_ref) ->
convertAlphaToMask(This, []).
-%% @spec (This::wxImage(), [Option]) -> bool()
-%% Option = {threshold, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageconvertalphatomask">external documentation</a>.
+-spec convertAlphaToMask(This, [Option]) -> boolean() when
+ This::wxImage(),
+ Option :: {threshold, integer()}.
convertAlphaToMask(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -196,15 +217,20 @@ convertAlphaToMask(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxImage_ConvertAlphaToMask,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage()) -> wxImage()
%% @equiv convertToGreyscale(This, [])
+-spec convertToGreyscale(This) -> wxImage() when
+ This::wxImage().
+
convertToGreyscale(This)
when is_record(This, wx_ref) ->
convertToGreyscale(This, []).
-%% @spec (This::wxImage(), [Option]) -> wxImage()
-%% Option = {lr, float()} | {lg, float()} | {lb, float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageconverttogreyscale">external documentation</a>.
+-spec convertToGreyscale(This, [Option]) -> wxImage() when
+ This::wxImage(),
+ Option :: {lr, number()}
+ | {lg, number()}
+ | {lb, number()}.
convertToGreyscale(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -216,36 +242,42 @@ convertToGreyscale(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxImage_ConvertToGreyscale,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), R::integer(), G::integer(), B::integer()) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageconverttomono">external documentation</a>.
+-spec convertToMono(This, R, G, B) -> wxImage() when
+ This::wxImage(), R::integer(), G::integer(), B::integer().
convertToMono(#wx_ref{type=ThisT,ref=ThisRef},R,G,B)
when is_integer(R),is_integer(G),is_integer(B) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_ConvertToMono,
<<ThisRef:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
-%% @spec (This::wxImage()) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagecopy">external documentation</a>.
+-spec copy(This) -> wxImage() when
+ This::wxImage().
copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_Copy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage(), Width::integer(), Height::integer()) -> bool()
%% @equiv create(This,Width,Height, [])
+-spec create(This, Width, Height) -> boolean() when
+ This::wxImage(), Width::integer(), Height::integer().
+
create(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
create(This,Width,Height, []).
-%% @spec (This::wxImage(),Width::integer(),Height::integer(),X::binary()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagecreate">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% create(This::wxImage(), Width::integer(), Height::integer(), Data::binary()) -> create(This,Width,Height,Data, []) </c></p>
-%% <p><c>
-%% create(This::wxImage(), Width::integer(), Height::integer(), [Option]) -> bool() </c>
-%%<br /> Option = {clear, bool()}
-%% </p>
+%% <br /> Also:<br />
+%% create(This, Width, Height, [Option]) -> boolean() when<br />
+%% This::wxImage(), Width::integer(), Height::integer(),<br />
+%% Option :: {clear, boolean()}.<br />
+%%
+-spec create(This, Width, Height, Data) -> boolean() when
+ This::wxImage(), Width::integer(), Height::integer(), Data::binary();
+ (This, Width, Height, [Option]) -> boolean() when
+ This::wxImage(), Width::integer(), Height::integer(),
+ Option :: {clear, boolean()}.
create(This,Width,Height,Data)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_binary(Data) ->
@@ -259,15 +291,17 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
wxe_util:call(?wxImage_Create_3,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(),Width::integer(),Height::integer(),Data::binary(),X::binary()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagecreate">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% create(This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary()) -> create(This,Width,Height,Data,Alpha, []) </c></p>
-%% <p><c>
-%% create(This::wxImage(), Width::integer(), Height::integer(), Data::binary(), [Option]) -> bool() </c>
-%%<br /> Option = {static_data, bool()}
-%% </p>
+%% <br /> Also:<br />
+%% create(This, Width, Height, Data, [Option]) -> boolean() when<br />
+%% This::wxImage(), Width::integer(), Height::integer(), Data::binary(),<br />
+%% Option :: {static_data, boolean()}.<br />
+%%
+-spec create(This, Width, Height, Data, Alpha) -> boolean() when
+ This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary();
+ (This, Width, Height, Data, [Option]) -> boolean() when
+ This::wxImage(), Width::integer(), Height::integer(), Data::binary(),
+ Option :: {static_data, boolean()}.
create(This,Width,Height,Data,Alpha)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha) ->
@@ -282,9 +316,10 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,Data, Options)
wxe_util:call(?wxImage_Create_4,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary(), [Option]) -> bool()
-%% Option = {static_data, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagecreate">external documentation</a>.
+-spec create(This, Width, Height, Data, Alpha, [Option]) -> boolean() when
+ This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary(),
+ Option :: {static_data, boolean()}.
create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,Data,Alpha, Options)
when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -296,22 +331,30 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,Data,Alpha, Options)
wxe_util:call(?wxImage_Create_5,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagedestroy">external documentation</a>.
+-spec 'Destroy'(This) -> ok when
+ This::wxImage().
'Destroy'(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:cast(?wxImage_Destroy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage()) -> {bool(), R::integer(), G::integer(), B::integer()}
%% @equiv findFirstUnusedColour(This, [])
+-spec findFirstUnusedColour(This) -> Result when
+ Result ::{Res ::boolean(), R::integer(), G::integer(), B::integer()},
+ This::wxImage().
+
findFirstUnusedColour(This)
when is_record(This, wx_ref) ->
findFirstUnusedColour(This, []).
-%% @spec (This::wxImage(), [Option]) -> {bool(), R::integer(), G::integer(), B::integer()}
-%% Option = {startR, integer()} | {startG, integer()} | {startB, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagefindfirstunusedcolour">external documentation</a>.
+-spec findFirstUnusedColour(This, [Option]) -> Result when
+ Result :: {Res ::boolean(), R::integer(), G::integer(), B::integer()},
+ This::wxImage(),
+ Option :: {startR, integer()}
+ | {startG, integer()}
+ | {startB, integer()}.
findFirstUnusedColour(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -323,59 +366,67 @@ findFirstUnusedColour(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxImage_FindFirstUnusedColour,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec () -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetimageextwildcard">external documentation</a>.
+-spec getImageExtWildcard() -> unicode:charlist().
getImageExtWildcard() ->
wxe_util:call(?wxImage_GetImageExtWildcard,
<<>>).
-%% @spec (This::wxImage()) -> binary()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetalpha">external documentation</a>.
+-spec getAlpha(This) -> binary() when
+ This::wxImage().
getAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetAlpha_0,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage(), X::integer(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetalpha">external documentation</a>.
+-spec getAlpha(This, X, Y) -> integer() when
+ This::wxImage(), X::integer(), Y::integer().
getAlpha(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetAlpha_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxImage(), X::integer(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetblue">external documentation</a>.
+-spec getBlue(This, X, Y) -> integer() when
+ This::wxImage(), X::integer(), Y::integer().
getBlue(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetBlue,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxImage()) -> binary()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetdata">external documentation</a>.
+-spec getData(This) -> binary() when
+ This::wxImage().
getData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage(), X::integer(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetgreen">external documentation</a>.
+-spec getGreen(This, X, Y) -> integer() when
+ This::wxImage(), X::integer(), Y::integer().
getGreen(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetGreen,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (Name::string()) -> integer()
%% @equiv getImageCount(Name, [])
+-spec getImageCount(Name) -> integer() when
+ Name::unicode:chardata().
+
getImageCount(Name)
when is_list(Name) ->
getImageCount(Name, []).
-%% @spec (Name::string(), [Option]) -> integer()
-%% Option = {type, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetimagecount">external documentation</a>.
+-spec getImageCount(Name, [Option]) -> integer() when
+ Name::unicode:chardata(),
+ Option :: {type, integer()}.
getImageCount(Name, Options)
when is_list(Name),is_list(Options) ->
Name_UC = unicode:characters_to_binary([Name,0]),
@@ -385,87 +436,100 @@ getImageCount(Name, Options)
wxe_util:call(?wxImage_GetImageCount,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxImage()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetheight">external documentation</a>.
+-spec getHeight(This) -> integer() when
+ This::wxImage().
getHeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetHeight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetmaskblue">external documentation</a>.
+-spec getMaskBlue(This) -> integer() when
+ This::wxImage().
getMaskBlue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetMaskBlue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetmaskgreen">external documentation</a>.
+-spec getMaskGreen(This) -> integer() when
+ This::wxImage().
getMaskGreen(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetMaskGreen,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetmaskred">external documentation</a>.
+-spec getMaskRed(This) -> integer() when
+ This::wxImage().
getMaskRed(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetMaskRed,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage()) -> {bool(), R::integer(), G::integer(), B::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetorfindmaskcolour">external documentation</a>.
+-spec getOrFindMaskColour(This) -> Result when
+ Result ::{Res ::boolean(), R::integer(), G::integer(), B::integer()},
+ This::wxImage().
getOrFindMaskColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetOrFindMaskColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage()) -> wxPalette:wxPalette()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetpalette">external documentation</a>.
+-spec getPalette(This) -> wxPalette:wxPalette() when
+ This::wxImage().
getPalette(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetPalette,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage(), X::integer(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetred">external documentation</a>.
+-spec getRed(This, X, Y) -> integer() when
+ This::wxImage(), X::integer(), Y::integer().
getRed(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetRed,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxImage(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> wxImage()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetsubimage">external documentation</a>.
+-spec getSubImage(This, Rect) -> wxImage() when
+ This::wxImage(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
getSubImage(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetSubImage,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxImage()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetwidth">external documentation</a>.
+-spec getWidth(This) -> integer() when
+ This::wxImage().
getWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_GetWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagehasalpha">external documentation</a>.
+-spec hasAlpha(This) -> boolean() when
+ This::wxImage().
hasAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_HasAlpha,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagehasmask">external documentation</a>.
+-spec hasMask(This) -> boolean() when
+ This::wxImage().
hasMask(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_HasMask,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImage(), Name::string()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetoption">external documentation</a>.
+-spec getOption(This, Name) -> unicode:charlist() when
+ This::wxImage(), Name::unicode:chardata().
getOption(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxImage),
@@ -473,8 +537,9 @@ getOption(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxImage_GetOption,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxImage(), Name::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagegetoptionint">external documentation</a>.
+-spec getOptionInt(This, Name) -> integer() when
+ This::wxImage(), Name::unicode:chardata().
getOptionInt(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxImage),
@@ -482,8 +547,9 @@ getOptionInt(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxImage_GetOptionInt,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxImage(), Name::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagehasoption">external documentation</a>.
+-spec hasOption(This, Name) -> boolean() when
+ This::wxImage(), Name::unicode:chardata().
hasOption(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxImage),
@@ -491,28 +557,32 @@ hasOption(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxImage_HasOption,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxImage()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageinitalpha">external documentation</a>.
+-spec initAlpha(This) -> ok when
+ This::wxImage().
initAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:cast(?wxImage_InitAlpha,
<<ThisRef:32/?UI>>).
-%% @spec () -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageinitstandardhandlers">external documentation</a>.
+-spec initStandardHandlers() -> ok.
initStandardHandlers() ->
wxe_util:cast(?wxImage_InitStandardHandlers,
<<>>).
-%% @spec (This::wxImage(), X::integer(), Y::integer()) -> bool()
%% @equiv isTransparent(This,X,Y, [])
+-spec isTransparent(This, X, Y) -> boolean() when
+ This::wxImage(), X::integer(), Y::integer().
+
isTransparent(This,X,Y)
when is_record(This, wx_ref),is_integer(X),is_integer(Y) ->
isTransparent(This,X,Y, []).
-%% @spec (This::wxImage(), X::integer(), Y::integer(), [Option]) -> bool()
-%% Option = {threshold, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageistransparent">external documentation</a>.
+-spec isTransparent(This, X, Y, [Option]) -> boolean() when
+ This::wxImage(), X::integer(), Y::integer(),
+ Option :: {threshold, integer()}.
isTransparent(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
when is_integer(X),is_integer(Y),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -522,15 +592,19 @@ isTransparent(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
wxe_util:call(?wxImage_IsTransparent,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), Name::string()) -> bool()
%% @equiv loadFile(This,Name, [])
+-spec loadFile(This, Name) -> boolean() when
+ This::wxImage(), Name::unicode:chardata().
+
loadFile(This,Name)
when is_record(This, wx_ref),is_list(Name) ->
loadFile(This,Name, []).
-%% @spec (This::wxImage(), Name::string(), [Option]) -> bool()
-%% Option = {type, integer()} | {index, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageloadfile">external documentation</a>.
+-spec loadFile(This, Name, [Option]) -> boolean() when
+ This::wxImage(), Name::unicode:chardata(),
+ Option :: {type, integer()}
+ | {index, integer()}.
loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name, Options)
when is_list(Name),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -542,9 +616,10 @@ loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name, Options)
wxe_util:call(?wxImage_LoadFile_2,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxImage(), Name::string(), Mimetype::string(), [Option]) -> bool()
-%% Option = {index, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageloadfile">external documentation</a>.
+-spec loadFile(This, Name, Mimetype, [Option]) -> boolean() when
+ This::wxImage(), Name::unicode:chardata(), Mimetype::unicode:chardata(),
+ Option :: {index, integer()}.
loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Mimetype, Options)
when is_list(Name),is_list(Mimetype),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -556,30 +631,35 @@ loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Mimetype, Options)
wxe_util:call(?wxImage_LoadFile_3,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Mimetype_UC)):32/?UI,(Mimetype_UC)/binary, 0:(((8- ((4+byte_size(Mimetype_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxImage()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageok">external documentation</a>.
+-spec ok(This) -> boolean() when
+ This::wxImage().
ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
wxe_util:call(?wxImage_Ok,
<<ThisRef:32/?UI>>).
-%% @spec (Name::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageremovehandler">external documentation</a>.
+-spec removeHandler(Name) -> boolean() when
+ Name::unicode:chardata().
removeHandler(Name)
when is_list(Name) ->
Name_UC = unicode:characters_to_binary([Name,0]),
wxe_util:call(?wxImage_RemoveHandler,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxImage()) -> wxImage()
%% @equiv mirror(This, [])
+-spec mirror(This) -> wxImage() when
+ This::wxImage().
+
mirror(This)
when is_record(This, wx_ref) ->
mirror(This, []).
-%% @spec (This::wxImage(), [Option]) -> wxImage()
-%% Option = {horizontally, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagemirror">external documentation</a>.
+-spec mirror(This, [Option]) -> wxImage() when
+ This::wxImage(),
+ Option :: {horizontally, boolean()}.
mirror(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -589,23 +669,27 @@ mirror(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxImage_Mirror,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), R1::integer(), G1::integer(), B1::integer(), R2::integer(), G2::integer(), B2::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagereplace">external documentation</a>.
+-spec replace(This, R1, G1, B1, R2, G2, B2) -> ok when
+ This::wxImage(), R1::integer(), G1::integer(), B1::integer(), R2::integer(), G2::integer(), B2::integer().
replace(#wx_ref{type=ThisT,ref=ThisRef},R1,G1,B1,R2,G2,B2)
when is_integer(R1),is_integer(G1),is_integer(B1),is_integer(R2),is_integer(G2),is_integer(B2) ->
?CLASS(ThisT,wxImage),
wxe_util:cast(?wxImage_Replace,
<<ThisRef:32/?UI,R1:32/?UI,G1:32/?UI,B1:32/?UI,R2:32/?UI,G2:32/?UI,B2:32/?UI>>).
-%% @spec (This::wxImage(), Width::integer(), Height::integer()) -> wxImage()
%% @equiv rescale(This,Width,Height, [])
+-spec rescale(This, Width, Height) -> wxImage() when
+ This::wxImage(), Width::integer(), Height::integer().
+
rescale(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
rescale(This,Width,Height, []).
-%% @spec (This::wxImage(), Width::integer(), Height::integer(), [Option]) -> wxImage()
-%% Option = {quality, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagerescale">external documentation</a>.
+-spec rescale(This, Width, Height, [Option]) -> wxImage() when
+ This::wxImage(), Width::integer(), Height::integer(),
+ Option :: {quality, integer()}.
rescale(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -615,15 +699,20 @@ rescale(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
wxe_util:call(?wxImage_Rescale,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()}) -> wxImage()
%% @equiv resize(This,Size,Pos, [])
+-spec resize(This, Size, Pos) -> wxImage() when
+ This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()}.
+
resize(This,Size={SizeW,SizeH},Pos={PosX,PosY})
when is_record(This, wx_ref),is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY) ->
resize(This,Size,Pos, []).
-%% @spec (This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()}, [Option]) -> wxImage()
-%% Option = {r, integer()} | {g, integer()} | {b, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximageresize">external documentation</a>.
+-spec resize(This, Size, Pos, [Option]) -> wxImage() when
+ This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()},
+ Option :: {r, integer()}
+ | {g, integer()}
+ | {b, integer()}.
resize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options)
when is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -635,17 +724,21 @@ resize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options)
wxe_util:call(?wxImage_Resize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI,PosX:32/?UI,PosY:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), Angle::float(), Centre_of_rotation::{X::integer(), Y::integer()}) -> wxImage()
%% @equiv rotate(This,Angle,Centre_of_rotation, [])
+-spec rotate(This, Angle, Centre_of_rotation) -> wxImage() when
+ This::wxImage(), Angle::number(), Centre_of_rotation::{X::integer(), Y::integer()}.
+
rotate(This,Angle,Centre_of_rotation={Centre_of_rotationX,Centre_of_rotationY})
- when is_record(This, wx_ref),is_float(Angle),is_integer(Centre_of_rotationX),is_integer(Centre_of_rotationY) ->
+ when is_record(This, wx_ref),is_number(Angle),is_integer(Centre_of_rotationX),is_integer(Centre_of_rotationY) ->
rotate(This,Angle,Centre_of_rotation, []).
-%% @spec (This::wxImage(), Angle::float(), Centre_of_rotation::{X::integer(), Y::integer()}, [Option]) -> wxImage()
-%% Option = {interpolating, bool()} | {offset_after_rotation, {X::integer(), Y::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagerotate">external documentation</a>.
+-spec rotate(This, Angle, Centre_of_rotation, [Option]) -> wxImage() when
+ This::wxImage(), Angle::number(), Centre_of_rotation::{X::integer(), Y::integer()},
+ Option :: {interpolating, boolean()}
+ | {offset_after_rotation, {X::integer(), Y::integer()}}.
rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle,{Centre_of_rotationX,Centre_of_rotationY}, Options)
- when is_float(Angle),is_integer(Centre_of_rotationX),is_integer(Centre_of_rotationY),is_list(Options) ->
+ when is_number(Angle),is_integer(Centre_of_rotationX),is_integer(Centre_of_rotationY),is_list(Options) ->
?CLASS(ThisT,wxImage),
MOpts = fun({interpolating, Interpolating}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Interpolating)):32/?UI>>|Acc];
({offset_after_rotation, {Offset_after_rotationX,Offset_after_rotationY}}, Acc) -> [<<2:32/?UI,Offset_after_rotationX:32/?UI,Offset_after_rotationY:32/?UI,0:32>>|Acc];
@@ -654,23 +747,27 @@ rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle,{Centre_of_rotationX,Centre_of_rota
wxe_util:call(?wxImage_Rotate,
<<ThisRef:32/?UI,0:32,Angle:64/?F,Centre_of_rotationX:32/?UI,Centre_of_rotationY:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxImage(), Angle::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagerotatehue">external documentation</a>.
+-spec rotateHue(This, Angle) -> ok when
+ This::wxImage(), Angle::number().
rotateHue(#wx_ref{type=ThisT,ref=ThisRef},Angle)
- when is_float(Angle) ->
+ when is_number(Angle) ->
?CLASS(ThisT,wxImage),
wxe_util:cast(?wxImage_RotateHue,
<<ThisRef:32/?UI,0:32,Angle:64/?F>>).
-%% @spec (This::wxImage()) -> wxImage()
%% @equiv rotate90(This, [])
+-spec rotate90(This) -> wxImage() when
+ This::wxImage().
+
rotate90(This)
when is_record(This, wx_ref) ->
rotate90(This, []).
-%% @spec (This::wxImage(), [Option]) -> wxImage()
-%% Option = {clockwise, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagerotate90">external documentation</a>.
+-spec rotate90(This, [Option]) -> wxImage() when
+ This::wxImage(),
+ Option :: {clockwise, boolean()}.
rotate90(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -680,8 +777,9 @@ rotate90(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxImage_Rotate90,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), Name::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesavefile">external documentation</a>.
+-spec saveFile(This, Name) -> boolean() when
+ This::wxImage(), Name::unicode:chardata().
saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxImage),
@@ -689,15 +787,15 @@ saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxImage_SaveFile_1,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxImage(),Name::string(),X::integer()|string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesavefile">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% saveFile(This::wxImage(), Name::string(), Type::integer()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% saveFile(This::wxImage(), Name::string(), Mimetype::string()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% saveFile(This, Name, Mimetype) -> boolean() when<br />
+%% This::wxImage(), Name::unicode:chardata(), Mimetype::unicode:chardata().<br />
+%%
+-spec saveFile(This, Name, Type) -> boolean() when
+ This::wxImage(), Name::unicode:chardata(), Type::integer();
+ (This, Name, Mimetype) -> boolean() when
+ This::wxImage(), Name::unicode:chardata(), Mimetype::unicode:chardata().
saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Type)
when is_list(Name),is_integer(Type) ->
?CLASS(ThisT,wxImage),
@@ -712,15 +810,18 @@ saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Mimetype)
wxe_util:call(?wxImage_SaveFile_2_1,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Mimetype_UC)):32/?UI,(Mimetype_UC)/binary, 0:(((8- ((4+byte_size(Mimetype_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxImage(), Width::integer(), Height::integer()) -> wxImage()
%% @equiv scale(This,Width,Height, [])
+-spec scale(This, Width, Height) -> wxImage() when
+ This::wxImage(), Width::integer(), Height::integer().
+
scale(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
scale(This,Width,Height, []).
-%% @spec (This::wxImage(), Width::integer(), Height::integer(), [Option]) -> wxImage()
-%% Option = {quality, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagescale">external documentation</a>.
+-spec scale(This, Width, Height, [Option]) -> wxImage() when
+ This::wxImage(), Width::integer(), Height::integer(),
+ Option :: {quality, integer()}.
scale(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -730,15 +831,20 @@ scale(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
wxe_util:call(?wxImage_Scale,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()}) -> wxImage()
%% @equiv size(This,Size,Pos, [])
+-spec size(This, Size, Pos) -> wxImage() when
+ This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()}.
+
size(This,Size={SizeW,SizeH},Pos={PosX,PosY})
when is_record(This, wx_ref),is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY) ->
size(This,Size,Pos, []).
-%% @spec (This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()}, [Option]) -> wxImage()
-%% Option = {r, integer()} | {g, integer()} | {b, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesize">external documentation</a>.
+-spec size(This, Size, Pos, [Option]) -> wxImage() when
+ This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()},
+ Option :: {r, integer()}
+ | {g, integer()}
+ | {b, integer()}.
size(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options)
when is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -750,15 +856,18 @@ size(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options)
wxe_util:call(?wxImage_Size,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI,PosX:32/?UI,PosY:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), Alpha::binary()) -> ok
%% @equiv setAlpha(This,Alpha, [])
+-spec setAlpha(This, Alpha) -> ok when
+ This::wxImage(), Alpha::binary().
+
setAlpha(This,Alpha)
when is_record(This, wx_ref),is_binary(Alpha) ->
setAlpha(This,Alpha, []).
-%% @spec (This::wxImage(), Alpha::binary(), [Option]) -> ok
-%% Option = {static_data, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetalpha">external documentation</a>.
+-spec setAlpha(This, Alpha, [Option]) -> ok when
+ This::wxImage(), Alpha::binary(),
+ Option :: {static_data, boolean()}.
setAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha, Options)
when is_binary(Alpha),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -769,23 +878,27 @@ setAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha, Options)
wxe_util:cast(?wxImage_SetAlpha_2,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), X::integer(), Y::integer(), Alpha::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetalpha">external documentation</a>.
+-spec setAlpha(This, X, Y, Alpha) -> ok when
+ This::wxImage(), X::integer(), Y::integer(), Alpha::integer().
setAlpha(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Alpha)
when is_integer(X),is_integer(Y),is_integer(Alpha) ->
?CLASS(ThisT,wxImage),
wxe_util:cast(?wxImage_SetAlpha_3,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,Alpha:32/?UI>>).
-%% @spec (This::wxImage(), Data::binary()) -> ok
%% @equiv setData(This,Data, [])
+-spec setData(This, Data) -> ok when
+ This::wxImage(), Data::binary().
+
setData(This,Data)
when is_record(This, wx_ref),is_binary(Data) ->
setData(This,Data, []).
-%% @spec (This::wxImage(), Data::binary(), [Option]) -> ok
-%% Option = {static_data, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetdata">external documentation</a>.
+-spec setData(This, Data, [Option]) -> ok when
+ This::wxImage(), Data::binary(),
+ Option :: {static_data, boolean()}.
setData(#wx_ref{type=ThisT,ref=ThisRef},Data, Options)
when is_binary(Data),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -796,15 +909,18 @@ setData(#wx_ref{type=ThisT,ref=ThisRef},Data, Options)
wxe_util:cast(?wxImage_SetData_2,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), Data::binary(), New_width::integer(), New_height::integer()) -> ok
%% @equiv setData(This,Data,New_width,New_height, [])
+-spec setData(This, Data, New_width, New_height) -> ok when
+ This::wxImage(), Data::binary(), New_width::integer(), New_height::integer().
+
setData(This,Data,New_width,New_height)
when is_record(This, wx_ref),is_binary(Data),is_integer(New_width),is_integer(New_height) ->
setData(This,Data,New_width,New_height, []).
-%% @spec (This::wxImage(), Data::binary(), New_width::integer(), New_height::integer(), [Option]) -> ok
-%% Option = {static_data, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetdata">external documentation</a>.
+-spec setData(This, Data, New_width, New_height, [Option]) -> ok when
+ This::wxImage(), Data::binary(), New_width::integer(), New_height::integer(),
+ Option :: {static_data, boolean()}.
setData(#wx_ref{type=ThisT,ref=ThisRef},Data,New_width,New_height, Options)
when is_binary(Data),is_integer(New_width),is_integer(New_height),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -815,15 +931,18 @@ setData(#wx_ref{type=ThisT,ref=ThisRef},Data,New_width,New_height, Options)
wxe_util:cast(?wxImage_SetData_4,
<<ThisRef:32/?UI,New_width:32/?UI,New_height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage()) -> ok
%% @equiv setMask(This, [])
+-spec setMask(This) -> ok when
+ This::wxImage().
+
setMask(This)
when is_record(This, wx_ref) ->
setMask(This, []).
-%% @spec (This::wxImage(), [Option]) -> ok
-%% Option = {mask, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetmask">external documentation</a>.
+-spec setMask(This, [Option]) -> ok when
+ This::wxImage(),
+ Option :: {mask, boolean()}.
setMask(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -833,16 +952,18 @@ setMask(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxImage_SetMask,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImage(), R::integer(), G::integer(), B::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetmaskcolour">external documentation</a>.
+-spec setMaskColour(This, R, G, B) -> ok when
+ This::wxImage(), R::integer(), G::integer(), B::integer().
setMaskColour(#wx_ref{type=ThisT,ref=ThisRef},R,G,B)
when is_integer(R),is_integer(G),is_integer(B) ->
?CLASS(ThisT,wxImage),
wxe_util:cast(?wxImage_SetMaskColour,
<<ThisRef:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
-%% @spec (This::wxImage(), Mask::wxImage(), Mr::integer(), Mg::integer(), Mb::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetmaskfromimage">external documentation</a>.
+-spec setMaskFromImage(This, Mask, Mr, Mg, Mb) -> boolean() when
+ This::wxImage(), Mask::wxImage(), Mr::integer(), Mg::integer(), Mb::integer().
setMaskFromImage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MaskT,ref=MaskRef},Mr,Mg,Mb)
when is_integer(Mr),is_integer(Mg),is_integer(Mb) ->
?CLASS(ThisT,wxImage),
@@ -850,15 +971,15 @@ setMaskFromImage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MaskT,ref=MaskRef}
wxe_util:call(?wxImage_SetMaskFromImage,
<<ThisRef:32/?UI,MaskRef:32/?UI,Mr:32/?UI,Mg:32/?UI,Mb:32/?UI>>).
-%% @spec (This::wxImage(),Name::string(),X::integer()|string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetoption">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setOption(This::wxImage(), Name::string(), Value::integer()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setOption(This::wxImage(), Name::string(), Value::string()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setOption(This, Name, Value) -> ok when<br />
+%% This::wxImage(), Name::unicode:chardata(), Value::unicode:chardata().<br />
+%%
+-spec setOption(This, Name, Value) -> ok when
+ This::wxImage(), Name::unicode:chardata(), Value::integer();
+ (This, Name, Value) -> ok when
+ This::wxImage(), Name::unicode:chardata(), Value::unicode:chardata().
setOption(#wx_ref{type=ThisT,ref=ThisRef},Name,Value)
when is_list(Name),is_integer(Value) ->
?CLASS(ThisT,wxImage),
@@ -873,32 +994,35 @@ setOption(#wx_ref{type=ThisT,ref=ThisRef},Name,Value)
wxe_util:cast(?wxImage_SetOption_2_1,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((4+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxImage(), Palette::wxPalette:wxPalette()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetpalette">external documentation</a>.
+-spec setPalette(This, Palette) -> ok when
+ This::wxImage(), Palette::wxPalette:wxPalette().
setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}) ->
?CLASS(ThisT,wxImage),
?CLASS(PaletteT,wxPalette),
wxe_util:cast(?wxImage_SetPalette,
<<ThisRef:32/?UI,PaletteRef:32/?UI>>).
-%% @spec (This::wxImage(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, R::integer(), G::integer(), B::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetrgb">external documentation</a>.
+-spec setRGB(This, Rect, R, G, B) -> ok when
+ This::wxImage(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, R::integer(), G::integer(), B::integer().
setRGB(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},R,G,B)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_integer(R),is_integer(G),is_integer(B) ->
?CLASS(ThisT,wxImage),
wxe_util:cast(?wxImage_SetRGB_4,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
-%% @spec (This::wxImage(), X::integer(), Y::integer(), R::integer(), G::integer(), B::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximage.html#wximagesetrgb">external documentation</a>.
+-spec setRGB(This, X, Y, R, G, B) -> ok when
+ This::wxImage(), X::integer(), Y::integer(), R::integer(), G::integer(), B::integer().
setRGB(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R,G,B)
when is_integer(X),is_integer(Y),is_integer(R),is_integer(G),is_integer(B) ->
?CLASS(ThisT,wxImage),
wxe_util:cast(?wxImage_SetRGB_5,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
-%% @spec (This::wxImage()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxImage()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxImage),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxImageList.erl b/lib/wx/src/gen/wxImageList.erl
index f805a234df..e9d936d129 100644
--- a/lib/wx/src/gen/wxImageList.erl
+++ b/lib/wx/src/gen/wxImageList.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,24 +31,30 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxImageList/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxImageList()
+-type wxImageList() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistwximagelist">external documentation</a>.
+-spec new() -> wxImageList().
new() ->
wxe_util:construct(?wxImageList_new_0,
<<>>).
-%% @spec (Width::integer(), Height::integer()) -> wxImageList()
%% @equiv new(Width,Height, [])
+-spec new(Width, Height) -> wxImageList() when
+ Width::integer(), Height::integer().
+
new(Width,Height)
when is_integer(Width),is_integer(Height) ->
new(Width,Height, []).
-%% @spec (Width::integer(), Height::integer(), [Option]) -> wxImageList()
-%% Option = {mask, bool()} | {initialCount, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistwximagelist">external documentation</a>.
+-spec new(Width, Height, [Option]) -> wxImageList() when
+ Width::integer(), Height::integer(),
+ Option :: {mask, boolean()}
+ | {initialCount, integer()}.
new(Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
MOpts = fun({mask, Mask}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Mask)):32/?UI>>|Acc];
@@ -58,23 +64,24 @@ new(Width,Height, Options)
wxe_util:construct(?wxImageList_new_3,
<<Width:32/?UI,Height:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxImageList(), Bitmap::wxBitmap:wxBitmap()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistadd">external documentation</a>.
+-spec add(This, Bitmap) -> integer() when
+ This::wxImageList(), Bitmap::wxBitmap:wxBitmap().
add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxImageList),
?CLASS(BitmapT,wxBitmap),
wxe_util:call(?wxImageList_Add_1,
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
-%% @spec (This::wxImageList(),Bitmap::wxBitmap:wxBitmap(),X::term()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistadd">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% add(This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap()) -> integer() </c>
-%% </p>
-%% <p><c>
-%% add(This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), MaskColour::wx:colour()) -> integer() </c>
-%% </p>
+%% <br /> Also:<br />
+%% add(This, Bitmap, MaskColour) -> integer() when<br />
+%% This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), MaskColour::wx:wx_colour().<br />
+%%
+-spec add(This, Bitmap, Mask) -> integer() when
+ This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap();
+ (This, Bitmap, MaskColour) -> integer() when
+ This::wxImageList(), Bitmap::wxBitmap:wxBitmap(), MaskColour::wx:wx_colour().
add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef},#wx_ref{type=MaskT,ref=MaskRef}) ->
?CLASS(ThisT,wxImageList),
?CLASS(BitmapT,wxBitmap),
@@ -88,15 +95,19 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef},MaskColo
wxe_util:call(?wxImageList_Add_2_1,
<<ThisRef:32/?UI,BitmapRef:32/?UI,(wxe_util:colour_bin(MaskColour)):16/binary>>).
-%% @spec (This::wxImageList(), Width::integer(), Height::integer()) -> bool()
%% @equiv create(This,Width,Height, [])
+-spec create(This, Width, Height) -> boolean() when
+ This::wxImageList(), Width::integer(), Height::integer().
+
create(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
create(This,Width,Height, []).
-%% @spec (This::wxImageList(), Width::integer(), Height::integer(), [Option]) -> bool()
-%% Option = {mask, bool()} | {initialCount, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistcreate">external documentation</a>.
+-spec create(This, Width, Height, [Option]) -> boolean() when
+ This::wxImageList(), Width::integer(), Height::integer(),
+ Option :: {mask, boolean()}
+ | {initialCount, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxImageList),
@@ -107,15 +118,19 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
wxe_util:call(?wxImageList_Create,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer()) -> bool()
%% @equiv draw(This,Index,Dc,X,Y, [])
+-spec draw(This, Index, Dc, X, Y) -> boolean() when
+ This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer().
+
draw(This,Index,Dc,X,Y)
when is_record(This, wx_ref),is_integer(Index),is_record(Dc, wx_ref),is_integer(X),is_integer(Y) ->
draw(This,Index,Dc,X,Y, []).
-%% @spec (This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer(), [Option]) -> bool()
-%% Option = {flags, integer()} | {solidBackground, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistdraw">external documentation</a>.
+-spec draw(This, Index, Dc, X, Y, [Option]) -> boolean() when
+ This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer(),
+ Option :: {flags, integer()}
+ | {solidBackground, boolean()}.
draw(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=DcT,ref=DcRef},X,Y, Options)
when is_integer(Index),is_integer(X),is_integer(Y),is_list(Options) ->
?CLASS(ThisT,wxImageList),
@@ -127,54 +142,62 @@ draw(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=DcT,ref=DcRef},X,Y, Opti
wxe_util:call(?wxImageList_Draw,
<<ThisRef:32/?UI,Index:32/?UI,DcRef:32/?UI,X:32/?UI,Y:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxImageList(), Index::integer()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistgetbitmap">external documentation</a>.
+-spec getBitmap(This, Index) -> wxBitmap:wxBitmap() when
+ This::wxImageList(), Index::integer().
getBitmap(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxImageList),
wxe_util:call(?wxImageList_GetBitmap,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxImageList(), Index::integer()) -> wxIcon:wxIcon()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistgeticon">external documentation</a>.
+-spec getIcon(This, Index) -> wxIcon:wxIcon() when
+ This::wxImageList(), Index::integer().
getIcon(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxImageList),
wxe_util:call(?wxImageList_GetIcon,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxImageList()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistgetimagecount">external documentation</a>.
+-spec getImageCount(This) -> integer() when
+ This::wxImageList().
getImageCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImageList),
wxe_util:call(?wxImageList_GetImageCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImageList(), Index::integer()) -> {bool(), Width::integer(), Height::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistgetsize">external documentation</a>.
+-spec getSize(This, Index) -> Result when
+ Result ::{Res ::boolean(), Width::integer(), Height::integer()},
+ This::wxImageList(), Index::integer().
getSize(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxImageList),
wxe_util:call(?wxImageList_GetSize,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxImageList(), Index::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistremove">external documentation</a>.
+-spec remove(This, Index) -> boolean() when
+ This::wxImageList(), Index::integer().
remove(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxImageList),
wxe_util:call(?wxImageList_Remove,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxImageList()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistremoveall">external documentation</a>.
+-spec removeAll(This) -> boolean() when
+ This::wxImageList().
removeAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImageList),
wxe_util:call(?wxImageList_RemoveAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxImageList(), Index::integer(), Bitmap::wxBitmap:wxBitmap()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistreplace">external documentation</a>.
+-spec replace(This, Index, Bitmap) -> boolean() when
+ This::wxImageList(), Index::integer(), Bitmap::wxBitmap:wxBitmap().
replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef})
when is_integer(Index) ->
?CLASS(ThisT,wxImageList),
@@ -182,8 +205,9 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef
wxe_util:call(?wxImageList_Replace_2,
<<ThisRef:32/?UI,Index:32/?UI,BitmapRef:32/?UI>>).
-%% @spec (This::wxImageList(), Index::integer(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wximagelist.html#wximagelistreplace">external documentation</a>.
+-spec replace(This, Index, Bitmap, Mask) -> boolean() when
+ This::wxImageList(), Index::integer(), Bitmap::wxBitmap:wxBitmap(), Mask::wxBitmap:wxBitmap().
replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef},#wx_ref{type=MaskT,ref=MaskRef})
when is_integer(Index) ->
?CLASS(ThisT,wxImageList),
@@ -192,8 +216,8 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef
wxe_util:call(?wxImageList_Replace_3,
<<ThisRef:32/?UI,Index:32/?UI,BitmapRef:32/?UI,MaskRef:32/?UI>>).
-%% @spec (This::wxImageList()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxImageList()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxImageList),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxJoystickEvent.erl b/lib/wx/src/gen/wxJoystickEvent.erl
index 2f149a50f8..979c36cd8c 100644
--- a/lib/wx/src/gen/wxJoystickEvent.erl
+++ b/lib/wx/src/gen/wxJoystickEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,19 +39,24 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxJoystickEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxJoystickEvent()) -> bool()
+-type wxJoystickEvent() :: wx:wx_object().
%% @equiv buttonDown(This, [])
+-spec buttonDown(This) -> boolean() when
+ This::wxJoystickEvent().
+
buttonDown(This)
when is_record(This, wx_ref) ->
buttonDown(This, []).
-%% @spec (This::wxJoystickEvent(), [Option]) -> bool()
-%% Option = {but, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventbuttondown">external documentation</a>.
+-spec buttonDown(This, [Option]) -> boolean() when
+ This::wxJoystickEvent(),
+ Option :: {but, integer()}.
buttonDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxJoystickEvent),
@@ -61,15 +66,18 @@ buttonDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxJoystickEvent_ButtonDown,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxJoystickEvent()) -> bool()
%% @equiv buttonIsDown(This, [])
+-spec buttonIsDown(This) -> boolean() when
+ This::wxJoystickEvent().
+
buttonIsDown(This)
when is_record(This, wx_ref) ->
buttonIsDown(This, []).
-%% @spec (This::wxJoystickEvent(), [Option]) -> bool()
-%% Option = {but, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventbuttonisdown">external documentation</a>.
+-spec buttonIsDown(This, [Option]) -> boolean() when
+ This::wxJoystickEvent(),
+ Option :: {but, integer()}.
buttonIsDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxJoystickEvent),
@@ -79,15 +87,18 @@ buttonIsDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxJoystickEvent_ButtonIsDown,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxJoystickEvent()) -> bool()
%% @equiv buttonUp(This, [])
+-spec buttonUp(This) -> boolean() when
+ This::wxJoystickEvent().
+
buttonUp(This)
when is_record(This, wx_ref) ->
buttonUp(This, []).
-%% @spec (This::wxJoystickEvent(), [Option]) -> bool()
-%% Option = {but, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventbuttonup">external documentation</a>.
+-spec buttonUp(This, [Option]) -> boolean() when
+ This::wxJoystickEvent(),
+ Option :: {but, integer()}.
buttonUp(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxJoystickEvent),
@@ -97,57 +108,65 @@ buttonUp(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxJoystickEvent_ButtonUp,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxJoystickEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventgetbuttonchange">external documentation</a>.
+-spec getButtonChange(This) -> integer() when
+ This::wxJoystickEvent().
getButtonChange(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxJoystickEvent),
wxe_util:call(?wxJoystickEvent_GetButtonChange,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxJoystickEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventgetbuttonstate">external documentation</a>.
+-spec getButtonState(This) -> integer() when
+ This::wxJoystickEvent().
getButtonState(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxJoystickEvent),
wxe_util:call(?wxJoystickEvent_GetButtonState,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxJoystickEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventgetjoystick">external documentation</a>.
+-spec getJoystick(This) -> integer() when
+ This::wxJoystickEvent().
getJoystick(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxJoystickEvent),
wxe_util:call(?wxJoystickEvent_GetJoystick,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxJoystickEvent()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxJoystickEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxJoystickEvent),
wxe_util:call(?wxJoystickEvent_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxJoystickEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventgetzposition">external documentation</a>.
+-spec getZPosition(This) -> integer() when
+ This::wxJoystickEvent().
getZPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxJoystickEvent),
wxe_util:call(?wxJoystickEvent_GetZPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxJoystickEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventisbutton">external documentation</a>.
+-spec isButton(This) -> boolean() when
+ This::wxJoystickEvent().
isButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxJoystickEvent),
wxe_util:call(?wxJoystickEvent_IsButton,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxJoystickEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventismove">external documentation</a>.
+-spec isMove(This) -> boolean() when
+ This::wxJoystickEvent().
isMove(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxJoystickEvent),
wxe_util:call(?wxJoystickEvent_IsMove,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxJoystickEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxjoystickevent.html#wxjoystickeventiszmove">external documentation</a>.
+-spec isZMove(This) -> boolean() when
+ This::wxJoystickEvent().
isZMove(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxJoystickEvent),
wxe_util:call(?wxJoystickEvent_IsZMove,
diff --git a/lib/wx/src/gen/wxKeyEvent.erl b/lib/wx/src/gen/wxKeyEvent.erl
index edda5ee0a6..107d4be685 100644
--- a/lib/wx/src/gen/wxKeyEvent.erl
+++ b/lib/wx/src/gen/wxKeyEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,103 +39,119 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxKeyEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxKeyEvent()) -> bool()
+-type wxKeyEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventaltdown">external documentation</a>.
+-spec altDown(This) -> boolean() when
+ This::wxKeyEvent().
altDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_AltDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventcmddown">external documentation</a>.
+-spec cmdDown(This) -> boolean() when
+ This::wxKeyEvent().
cmdDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_CmdDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventcontroldown">external documentation</a>.
+-spec controlDown(This) -> boolean() when
+ This::wxKeyEvent().
controlDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_ControlDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventgetkeycode">external documentation</a>.
+-spec getKeyCode(This) -> integer() when
+ This::wxKeyEvent().
getKeyCode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_GetKeyCode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventgetmodifiers">external documentation</a>.
+-spec getModifiers(This) -> integer() when
+ This::wxKeyEvent().
getModifiers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_GetModifiers,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxKeyEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventgetrawkeycode">external documentation</a>.
+-spec getRawKeyCode(This) -> integer() when
+ This::wxKeyEvent().
getRawKeyCode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_GetRawKeyCode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventgetrawkeyflags">external documentation</a>.
+-spec getRawKeyFlags(This) -> integer() when
+ This::wxKeyEvent().
getRawKeyFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_GetRawKeyFlags,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventgetunicodekey">external documentation</a>.
+-spec getUnicodeKey(This) -> integer() when
+ This::wxKeyEvent().
getUnicodeKey(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_GetUnicodeKey,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventgetx">external documentation</a>.
+-spec getX(This) -> integer() when
+ This::wxKeyEvent().
getX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_GetX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventgety">external documentation</a>.
+-spec getY(This) -> integer() when
+ This::wxKeyEvent().
getY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_GetY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventhasmodifiers">external documentation</a>.
+-spec hasModifiers(This) -> boolean() when
+ This::wxKeyEvent().
hasModifiers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_HasModifiers,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventmetadown">external documentation</a>.
+-spec metaDown(This) -> boolean() when
+ This::wxKeyEvent().
metaDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_MetaDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxKeyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxkeyevent.html#wxkeyeventshiftdown">external documentation</a>.
+-spec shiftDown(This) -> boolean() when
+ This::wxKeyEvent().
shiftDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxKeyEvent),
wxe_util:call(?wxKeyEvent_ShiftDown,
diff --git a/lib/wx/src/gen/wxLayoutAlgorithm.erl b/lib/wx/src/gen/wxLayoutAlgorithm.erl
index c17abeaed1..d0736e2379 100644
--- a/lib/wx/src/gen/wxLayoutAlgorithm.erl
+++ b/lib/wx/src/gen/wxLayoutAlgorithm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,24 +30,29 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxLayoutAlgorithm/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxLayoutAlgorithm()
+-type wxLayoutAlgorithm() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlayoutalgorithm.html#wxlayoutalgorithmwxlayoutalgorithm">external documentation</a>.
+-spec new() -> wxLayoutAlgorithm().
new() ->
wxe_util:construct(?wxLayoutAlgorithm_new,
<<>>).
-%% @spec (This::wxLayoutAlgorithm(), Frame::wxFrame:wxFrame()) -> bool()
%% @equiv layoutFrame(This,Frame, [])
+-spec layoutFrame(This, Frame) -> boolean() when
+ This::wxLayoutAlgorithm(), Frame::wxFrame:wxFrame().
+
layoutFrame(This,Frame)
when is_record(This, wx_ref),is_record(Frame, wx_ref) ->
layoutFrame(This,Frame, []).
-%% @spec (This::wxLayoutAlgorithm(), Frame::wxFrame:wxFrame(), [Option]) -> bool()
-%% Option = {mainWindow, wxWindow:wxWindow()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlayoutalgorithm.html#wxlayoutalgorithmlayoutframe">external documentation</a>.
+-spec layoutFrame(This, Frame, [Option]) -> boolean() when
+ This::wxLayoutAlgorithm(), Frame::wxFrame:wxFrame(),
+ Option :: {mainWindow, wxWindow:wxWindow()}.
layoutFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxLayoutAlgorithm),
@@ -58,15 +63,18 @@ layoutFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}, O
wxe_util:call(?wxLayoutAlgorithm_LayoutFrame,
<<ThisRef:32/?UI,FrameRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxLayoutAlgorithm(), Frame::wxMDIParentFrame:wxMDIParentFrame()) -> bool()
%% @equiv layoutMDIFrame(This,Frame, [])
+-spec layoutMDIFrame(This, Frame) -> boolean() when
+ This::wxLayoutAlgorithm(), Frame::wxMDIParentFrame:wxMDIParentFrame().
+
layoutMDIFrame(This,Frame)
when is_record(This, wx_ref),is_record(Frame, wx_ref) ->
layoutMDIFrame(This,Frame, []).
-%% @spec (This::wxLayoutAlgorithm(), Frame::wxMDIParentFrame:wxMDIParentFrame(), [Option]) -> bool()
-%% Option = {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlayoutalgorithm.html#wxlayoutalgorithmlayoutmdiframe">external documentation</a>.
+-spec layoutMDIFrame(This, Frame, [Option]) -> boolean() when
+ This::wxLayoutAlgorithm(), Frame::wxMDIParentFrame:wxMDIParentFrame(),
+ Option :: {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}.
layoutMDIFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxLayoutAlgorithm),
@@ -77,15 +85,18 @@ layoutMDIFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}
wxe_util:call(?wxLayoutAlgorithm_LayoutMDIFrame,
<<ThisRef:32/?UI,FrameRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxLayoutAlgorithm(), Frame::wxWindow:wxWindow()) -> bool()
%% @equiv layoutWindow(This,Frame, [])
+-spec layoutWindow(This, Frame) -> boolean() when
+ This::wxLayoutAlgorithm(), Frame::wxWindow:wxWindow().
+
layoutWindow(This,Frame)
when is_record(This, wx_ref),is_record(Frame, wx_ref) ->
layoutWindow(This,Frame, []).
-%% @spec (This::wxLayoutAlgorithm(), Frame::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {mainWindow, wxWindow:wxWindow()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlayoutalgorithm.html#wxlayoutalgorithmlayoutwindow">external documentation</a>.
+-spec layoutWindow(This, Frame, [Option]) -> boolean() when
+ This::wxLayoutAlgorithm(), Frame::wxWindow:wxWindow(),
+ Option :: {mainWindow, wxWindow:wxWindow()}.
layoutWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxLayoutAlgorithm),
@@ -96,8 +107,8 @@ layoutWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef},
wxe_util:call(?wxLayoutAlgorithm_LayoutWindow,
<<ThisRef:32/?UI,FrameRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxLayoutAlgorithm()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxLayoutAlgorithm()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxLayoutAlgorithm),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxListBox.erl b/lib/wx/src/gen/wxListBox.erl
index cc30bf95e4..3b41de9ffc 100644
--- a/lib/wx/src/gen/wxListBox.erl
+++ b/lib/wx/src/gen/wxListBox.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,6 +74,7 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxListBox/0]).
%% @hidden
parent_class(wxControlWithItems) -> true;
parent_class(wxControl) -> true;
@@ -81,21 +82,29 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxListBox()
+-type wxListBox() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxwxlistbox">external documentation</a>.
+-spec new() -> wxListBox().
new() ->
wxe_util:construct(?wxListBox_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxListBox()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxListBox() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxListBox()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {choices, [[string()]]} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxwxlistbox">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxListBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {choices, [[unicode:chardata()]]}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -109,15 +118,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxListBox_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxListBox(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]]) -> bool()
%% @equiv create(This,Parent,Id,Pos,Size,Choices, [])
+-spec create(This, Parent, Id, Pos, Size, Choices) -> boolean() when
+ This::wxListBox(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]].
+
create(This,Parent,Id,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices) ->
create(This,Parent,Id,Pos,Size,Choices, []).
-%% @spec (This::wxListBox(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]], [Option]) -> bool()
-%% Option = {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxcreate">external documentation</a>.
+-spec create(This, Parent, Id, Pos, Size, Choices, [Option]) -> boolean() when
+ This::wxListBox(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]],
+ Option :: {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ThisT,wxListBox),
@@ -131,23 +144,27 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,{P
wxe_util:call(?wxListBox_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxListBox(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxdeselect">external documentation</a>.
+-spec deselect(This, N) -> ok when
+ This::wxListBox(), N::integer().
deselect(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListBox),
wxe_util:cast(?wxListBox_Deselect,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListBox()) -> {integer(), ASelections::[integer()]}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxgetselections">external documentation</a>.
+-spec getSelections(This) -> Result when
+ Result ::{Res ::integer(), ASelections::[integer()]},
+ This::wxListBox().
getSelections(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListBox),
wxe_util:call(?wxListBox_GetSelections,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListBox(), Items::[[string()]], Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxinsertitems">external documentation</a>.
+-spec insertItems(This, Items, Pos) -> ok when
+ This::wxListBox(), Items::[[unicode:chardata()]], Pos::integer().
insertItems(#wx_ref{type=ThisT,ref=ThisRef},Items,Pos)
when is_list(Items),is_integer(Pos) ->
?CLASS(ThisT,wxListBox),
@@ -156,16 +173,18 @@ insertItems(#wx_ref{type=ThisT,ref=ThisRef},Items,Pos)
wxe_util:cast(?wxListBox_InsertItems,
<<ThisRef:32/?UI,(length(Items_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Items_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Items_UCA])) band 16#7)) band 16#7))/unit:8,Pos:32/?UI>>).
-%% @spec (This::wxListBox(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxisselected">external documentation</a>.
+-spec isSelected(This, N) -> boolean() when
+ This::wxListBox(), N::integer().
isSelected(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListBox),
wxe_util:call(?wxListBox_IsSelected,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListBox(), Items::[[string()]]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxset">external documentation</a>.
+-spec set(This, Items) -> ok when
+ This::wxListBox(), Items::[[unicode:chardata()]].
set(#wx_ref{type=ThisT,ref=ThisRef},Items)
when is_list(Items) ->
?CLASS(ThisT,wxListBox),
@@ -174,23 +193,24 @@ set(#wx_ref{type=ThisT,ref=ThisRef},Items)
wxe_util:cast(?wxListBox_Set,
<<ThisRef:32/?UI,(length(Items_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Items_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Items_UCA])) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxListBox(), Point::{X::integer(), Y::integer()}) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxhittest">external documentation</a>.
+-spec hitTest(This, Point) -> integer() when
+ This::wxListBox(), Point::{X::integer(), Y::integer()}.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY})
when is_integer(PointX),is_integer(PointY) ->
?CLASS(ThisT,wxListBox),
wxe_util:call(?wxListBox_HitTest,
<<ThisRef:32/?UI,PointX:32/?UI,PointY:32/?UI>>).
-%% @spec (This::wxListBox(),X::integer()|string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbox.html#wxlistboxsetfirstitem">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setFirstItem(This::wxListBox(), N::integer()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setFirstItem(This::wxListBox(), S::string()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setFirstItem(This, S) -> ok when<br />
+%% This::wxListBox(), S::unicode:chardata().<br />
+%%
+-spec setFirstItem(This, N) -> ok when
+ This::wxListBox(), N::integer();
+ (This, S) -> ok when
+ This::wxListBox(), S::unicode:chardata().
setFirstItem(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListBox),
@@ -203,8 +223,8 @@ setFirstItem(#wx_ref{type=ThisT,ref=ThisRef},S)
wxe_util:cast(?wxListBox_SetFirstItem_1_1,
<<ThisRef:32/?UI,(byte_size(S_UC)):32/?UI,(S_UC)/binary, 0:(((8- ((0+byte_size(S_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxListBox()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxListBox()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxListCtrl.erl b/lib/wx/src/gen/wxListCtrl.erl
index fa99897171..a6288fc02a 100644
--- a/lib/wx/src/gen/wxListCtrl.erl
+++ b/lib/wx/src/gen/wxListCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,10 +34,10 @@
deleteItem/2,destroy/1,editLabel/2,ensureVisible/2,findItem/3,findItem/4,
getColumn/3,getColumnCount/1,getColumnWidth/2,getCountPerPage/1,getEditControl/1,
getImageList/2,getItem/2,getItemBackgroundColour/2,getItemCount/1,
- getItemData/2,getItemFont/2,getItemPosition/3,getItemRect/3,getItemRect/4,
+ getItemData/2,getItemFont/2,getItemPosition/2,getItemRect/2,getItemRect/3,
getItemSpacing/1,getItemState/3,getItemText/2,getItemTextColour/2,
getNextItem/2,getNextItem/3,getSelectedItemCount/1,getTextColour/1,
- getTopItem/1,getViewRect/1,hitTest/2,insertColumn/3,insertColumn/4,
+ getTopItem/1,getViewRect/1,hitTest/3,insertColumn/3,insertColumn/4,
insertItem/2,insertItem/3,insertItem/4,refreshItem/2,refreshItems/3,
scrollList/3,setBackgroundColour/2,setColumn/3,setColumnWidth/3,setImageList/3,
setItem/2,setItem/4,setItem/5,setItemBackgroundColour/3,setItemColumnImage/4,
@@ -83,12 +83,14 @@
show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,update/1,
updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxListCtrl/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxListCtrl() :: wx:wx_object().
%% @spec () -> wxListCtrl()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlwxlistctrl">external documentation</a>.
@@ -141,15 +143,18 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:construct(?wxListCtrl_new_2, <<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxListCtrl()) -> bool()
%% @equiv arrange(This, [])
+-spec arrange(This) -> boolean() when
+ This::wxListCtrl().
+
arrange(This)
when is_record(This, wx_ref) ->
arrange(This, []).
-%% @spec (This::wxListCtrl(), [Option]) -> bool()
-%% Option = {flag, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlarrange">external documentation</a>.
+-spec arrange(This, [Option]) -> boolean() when
+ This::wxListCtrl(),
+ Option :: {flag, integer()}.
arrange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -159,8 +164,9 @@ arrange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxListCtrl_Arrange,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxListCtrl(), ImageList::wxImageList:wxImageList(), Which::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlassignimagelist">external documentation</a>.
+-spec assignImageList(This, ImageList, Which) -> ok when
+ This::wxListCtrl(), ImageList::wxImageList:wxImageList(), Which::integer().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef},Which)
when is_integer(Which) ->
?CLASS(ThisT,wxListCtrl),
@@ -168,8 +174,9 @@ assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=Imag
wxe_util:cast(?wxListCtrl_AssignImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI,Which:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlclearall">external documentation</a>.
+-spec clearAll(This) -> ok when
+ This::wxListCtrl().
clearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:cast(?wxListCtrl_ClearAll,
@@ -210,61 +217,68 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxListCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxListCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrldeleteallitems">external documentation</a>.
+-spec deleteAllItems(This) -> boolean() when
+ This::wxListCtrl().
deleteAllItems(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_DeleteAllItems,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Col::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrldeletecolumn">external documentation</a>.
+-spec deleteColumn(This, Col) -> boolean() when
+ This::wxListCtrl(), Col::integer().
deleteColumn(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_DeleteColumn,
<<ThisRef:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrldeleteitem">external documentation</a>.
+-spec deleteItem(This, Item) -> boolean() when
+ This::wxListCtrl(), Item::integer().
deleteItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_DeleteItem,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> wxTextCtrl:wxTextCtrl()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrleditlabel">external documentation</a>.
+-spec editLabel(This, Item) -> wxTextCtrl:wxTextCtrl() when
+ This::wxListCtrl(), Item::integer().
editLabel(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_EditLabel,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlensurevisible">external documentation</a>.
+-spec ensureVisible(This, Item) -> boolean() when
+ This::wxListCtrl(), Item::integer().
ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_EnsureVisible,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), Start::integer(), Str::string()) -> integer()
%% @equiv findItem(This,Start,Str, [])
+-spec findItem(This, Start, Str) -> integer() when
+ This::wxListCtrl(), Start::integer(), Str::unicode:chardata().
+
findItem(This,Start,Str)
when is_record(This, wx_ref),is_integer(Start),is_list(Str) ->
findItem(This,Start,Str, []).
-%% @spec (This::wxListCtrl(),Start::integer(),X::string()|term(),X::term()|integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlfinditem">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% findItem(This::wxListCtrl(), Start::integer(), Str::string(), [Option]) -> integer() </c>
-%%<br /> Option = {partial, bool()}
-%% </p>
-%% <p><c>
-%% findItem(This::wxListCtrl(), Start::integer(), Pt::{X::integer(), Y::integer()}, Direction::integer()) -> integer() </c>
-%% </p>
+%% <br /> Also:<br />
+%% findItem(This, Start, Pt, Direction) -> integer() when<br />
+%% This::wxListCtrl(), Start::integer(), Pt::{X::integer(), Y::integer()}, Direction::integer().<br />
+%%
+-spec findItem(This, Start, Str, [Option]) -> integer() when
+ This::wxListCtrl(), Start::integer(), Str::unicode:chardata(),
+ Option :: {partial, boolean()};
+ (This, Start, Pt, Direction) -> integer() when
+ This::wxListCtrl(), Start::integer(), Pt::{X::integer(), Y::integer()}, Direction::integer().
findItem(#wx_ref{type=ThisT,ref=ThisRef},Start,Str, Options)
when is_integer(Start),is_list(Str),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -280,8 +294,9 @@ findItem(#wx_ref{type=ThisT,ref=ThisRef},Start,{PtX,PtY},Direction)
wxe_util:call(?wxListCtrl_FindItem_3_1,
<<ThisRef:32/?UI,Start:32/?UI,PtX:32/?UI,PtY:32/?UI,Direction:32/?UI>>).
-%% @spec (This::wxListCtrl(), Col::integer(), Item::wxListItem:wxListItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetcolumn">external documentation</a>.
+-spec getColumn(This, Col, Item) -> boolean() when
+ This::wxListCtrl(), Col::integer(), Item::wxListItem:wxListItem().
getColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=ItemT,ref=ItemRef})
when is_integer(Col) ->
?CLASS(ThisT,wxListCtrl),
@@ -289,148 +304,173 @@ getColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=ItemT,ref=ItemRef})
wxe_util:call(?wxListCtrl_GetColumn,
<<ThisRef:32/?UI,Col:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetcolumncount">external documentation</a>.
+-spec getColumnCount(This) -> integer() when
+ This::wxListCtrl().
getColumnCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetColumnCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Col::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetcolumnwidth">external documentation</a>.
+-spec getColumnWidth(This, Col) -> integer() when
+ This::wxListCtrl(), Col::integer().
getColumnWidth(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetColumnWidth,
<<ThisRef:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetcountperpage">external documentation</a>.
+-spec getCountPerPage(This) -> integer() when
+ This::wxListCtrl().
getCountPerPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetCountPerPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> wxTextCtrl:wxTextCtrl()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgeteditcontrol">external documentation</a>.
+-spec getEditControl(This) -> wxTextCtrl:wxTextCtrl() when
+ This::wxListCtrl().
getEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetEditControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Which::integer()) -> wxImageList:wxImageList()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetimagelist">external documentation</a>.
+-spec getImageList(This, Which) -> wxImageList:wxImageList() when
+ This::wxListCtrl(), Which::integer().
getImageList(#wx_ref{type=ThisT,ref=ThisRef},Which)
when is_integer(Which) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetImageList,
<<ThisRef:32/?UI,Which:32/?UI>>).
-%% @spec (This::wxListCtrl(), Info::wxListItem:wxListItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitem">external documentation</a>.
+-spec getItem(This, Info) -> boolean() when
+ This::wxListCtrl(), Info::wxListItem:wxListItem().
getItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=InfoT,ref=InfoRef}) ->
?CLASS(ThisT,wxListCtrl),
?CLASS(InfoT,wxListItem),
wxe_util:call(?wxListCtrl_GetItem,
<<ThisRef:32/?UI,InfoRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitembackgroundcolour">external documentation</a>.
+-spec getItemBackgroundColour(This, Item) -> wx:wx_colour4() when
+ This::wxListCtrl(), Item::integer().
getItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemBackgroundColour,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemcount">external documentation</a>.
+-spec getItemCount(This) -> integer() when
+ This::wxListCtrl().
getItemCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemdata">external documentation</a>.
+-spec getItemData(This, Item) -> integer() when
+ This::wxListCtrl(), Item::integer().
getItemData(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemData,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemfont">external documentation</a>.
+-spec getItemFont(This, Item) -> wxFont:wxFont() when
+ This::wxListCtrl(), Item::integer().
getItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemFont,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Pos::{X::integer(), Y::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemposition">external documentation</a>.
-getItemPosition(#wx_ref{type=ThisT,ref=ThisRef},Item,{PosX,PosY})
- when is_integer(Item),is_integer(PosX),is_integer(PosY) ->
+-spec getItemPosition(This, Item) -> Result when
+ Result ::{Res ::boolean(), Pos::{X::integer(), Y::integer()}},
+ This::wxListCtrl(), Item::integer().
+getItemPosition(#wx_ref{type=ThisT,ref=ThisRef},Item)
+ when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemPosition,
- <<ThisRef:32/?UI,Item:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
+ <<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool()
-%% @equiv getItemRect(This,Item,Rect, [])
-getItemRect(This,Item,Rect={RectX,RectY,RectW,RectH})
- when is_record(This, wx_ref),is_integer(Item),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
- getItemRect(This,Item,Rect, []).
+%% @equiv getItemRect(This,Item, [])
+-spec getItemRect(This, Item) -> Result when
+ Result ::{Res ::boolean(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}},
+ This::wxListCtrl(), Item::integer().
+
+getItemRect(This,Item)
+ when is_record(This, wx_ref),is_integer(Item) ->
+ getItemRect(This,Item, []).
-%% @spec (This::wxListCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, [Option]) -> bool()
-%% Option = {code, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemrect">external documentation</a>.
-getItemRect(#wx_ref{type=ThisT,ref=ThisRef},Item,{RectX,RectY,RectW,RectH}, Options)
- when is_integer(Item),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) ->
+-spec getItemRect(This, Item, [Option]) -> Result when
+ Result :: {Res ::boolean(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}},
+ This::wxListCtrl(), Item::integer(),
+ Option :: {code, integer()}.
+getItemRect(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
+ when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
MOpts = fun({code, Code}, Acc) -> [<<1:32/?UI,Code:32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:call(?wxListCtrl_GetItemRect,
- <<ThisRef:32/?UI,Item:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, BinOpt/binary>>).
+ <<ThisRef:32/?UI,Item:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxListCtrl()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemspacing">external documentation</a>.
+-spec getItemSpacing(This) -> {W::integer(), H::integer()} when
+ This::wxListCtrl().
getItemSpacing(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemSpacing,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), StateMask::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemstate">external documentation</a>.
+-spec getItemState(This, Item, StateMask) -> integer() when
+ This::wxListCtrl(), Item::integer(), StateMask::integer().
getItemState(#wx_ref{type=ThisT,ref=ThisRef},Item,StateMask)
when is_integer(Item),is_integer(StateMask) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemState,
<<ThisRef:32/?UI,Item:32/?UI,StateMask:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemtext">external documentation</a>.
+-spec getItemText(This, Item) -> unicode:charlist() when
+ This::wxListCtrl(), Item::integer().
getItemText(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemText,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetitemtextcolour">external documentation</a>.
+-spec getItemTextColour(This, Item) -> wx:wx_colour4() when
+ This::wxListCtrl(), Item::integer().
getItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetItemTextColour,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> integer()
%% @equiv getNextItem(This,Item, [])
+-spec getNextItem(This, Item) -> integer() when
+ This::wxListCtrl(), Item::integer().
+
getNextItem(This,Item)
when is_record(This, wx_ref),is_integer(Item) ->
getNextItem(This,Item, []).
-%% @spec (This::wxListCtrl(), Item::integer(), [Option]) -> integer()
-%% Option = {geometry, integer()} | {state, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetnextitem">external documentation</a>.
+-spec getNextItem(This, Item, [Option]) -> integer() when
+ This::wxListCtrl(), Item::integer(),
+ Option :: {geometry, integer()}
+ | {state, integer()}.
getNextItem(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -441,50 +481,56 @@ getNextItem(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
wxe_util:call(?wxListCtrl_GetNextItem,
<<ThisRef:32/?UI,Item:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxListCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetselecteditemcount">external documentation</a>.
+-spec getSelectedItemCount(This) -> integer() when
+ This::wxListCtrl().
getSelectedItemCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetSelectedItemCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgettextcolour">external documentation</a>.
+-spec getTextColour(This) -> wx:wx_colour4() when
+ This::wxListCtrl().
getTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgettopitem">external documentation</a>.
+-spec getTopItem(This) -> integer() when
+ This::wxListCtrl().
getTopItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetTopItem,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlgetviewrect">external documentation</a>.
+-spec getViewRect(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxListCtrl().
getViewRect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_GetViewRect,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Point::{X::integer(), Y::integer()}) -> {integer(), Flags::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlhittest">external documentation</a>.
-hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY})
- when is_integer(PointX),is_integer(PointY) ->
+-spec hitTest(This, Point, Flags) -> integer() when
+ This::wxListCtrl(), Point::{X::integer(), Y::integer()}, Flags::integer().
+hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY},Flags)
+ when is_integer(PointX),is_integer(PointY),is_integer(Flags) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_HitTest,
- <<ThisRef:32/?UI,PointX:32/?UI,PointY:32/?UI>>).
+ <<ThisRef:32/?UI,PointX:32/?UI,PointY:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxListCtrl(),Col::integer(),X::string()|term()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlinsertcolumn">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% insertColumn(This::wxListCtrl(), Col::integer(), Heading::string()) -> insertColumn(This,Col,Heading, []) </c></p>
-%% <p><c>
-%% insertColumn(This::wxListCtrl(), Col::integer(), Info::wxListItem:wxListItem()) -> integer() </c>
-%% </p>
+%% <br /> Also:<br />
+%% insertColumn(This, Col, Info) -> integer() when<br />
+%% This::wxListCtrl(), Col::integer(), Info::wxListItem:wxListItem().<br />
+%%
+-spec insertColumn(This, Col, Heading) -> integer() when
+ This::wxListCtrl(), Col::integer(), Heading::unicode:chardata();
+ (This, Col, Info) -> integer() when
+ This::wxListCtrl(), Col::integer(), Info::wxListItem:wxListItem().
insertColumn(This,Col,Heading)
when is_record(This, wx_ref),is_integer(Col),is_list(Heading) ->
@@ -496,9 +542,11 @@ insertColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=InfoT,ref=InfoRef}
wxe_util:call(?wxListCtrl_InsertColumn_2,
<<ThisRef:32/?UI,Col:32/?UI,InfoRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Col::integer(), Heading::string(), [Option]) -> integer()
-%% Option = {format, integer()} | {width, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlinsertcolumn">external documentation</a>.
+-spec insertColumn(This, Col, Heading, [Option]) -> integer() when
+ This::wxListCtrl(), Col::integer(), Heading::unicode:chardata(),
+ Option :: {format, integer()}
+ | {width, integer()}.
insertColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,Heading, Options)
when is_integer(Col),is_list(Heading),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -510,23 +558,24 @@ insertColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,Heading, Options)
wxe_util:call(?wxListCtrl_InsertColumn_3,
<<ThisRef:32/?UI,Col:32/?UI,(byte_size(Heading_UC)):32/?UI,(Heading_UC)/binary, 0:(((8- ((4+byte_size(Heading_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxListCtrl(), Info::wxListItem:wxListItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlinsertitem">external documentation</a>.
+-spec insertItem(This, Info) -> integer() when
+ This::wxListCtrl(), Info::wxListItem:wxListItem().
insertItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=InfoT,ref=InfoRef}) ->
?CLASS(ThisT,wxListCtrl),
?CLASS(InfoT,wxListItem),
wxe_util:call(?wxListCtrl_InsertItem_1,
<<ThisRef:32/?UI,InfoRef:32/?UI>>).
-%% @spec (This::wxListCtrl(),Index::integer(),X::integer()|string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlinsertitem">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% insertItem(This::wxListCtrl(), Index::integer(), ImageIndex::integer()) -> integer() </c>
-%% </p>
-%% <p><c>
-%% insertItem(This::wxListCtrl(), Index::integer(), Label::string()) -> integer() </c>
-%% </p>
+%% <br /> Also:<br />
+%% insertItem(This, Index, Label) -> integer() when<br />
+%% This::wxListCtrl(), Index::integer(), Label::unicode:chardata().<br />
+%%
+-spec insertItem(This, Index, ImageIndex) -> integer() when
+ This::wxListCtrl(), Index::integer(), ImageIndex::integer();
+ (This, Index, Label) -> integer() when
+ This::wxListCtrl(), Index::integer(), Label::unicode:chardata().
insertItem(#wx_ref{type=ThisT,ref=ThisRef},Index,ImageIndex)
when is_integer(Index),is_integer(ImageIndex) ->
?CLASS(ThisT,wxListCtrl),
@@ -539,8 +588,9 @@ insertItem(#wx_ref{type=ThisT,ref=ThisRef},Index,Label)
wxe_util:call(?wxListCtrl_InsertItem_2_1,
<<ThisRef:32/?UI,Index:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxListCtrl(), Index::integer(), Label::string(), ImageIndex::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlinsertitem">external documentation</a>.
+-spec insertItem(This, Index, Label, ImageIndex) -> integer() when
+ This::wxListCtrl(), Index::integer(), Label::unicode:chardata(), ImageIndex::integer().
insertItem(#wx_ref{type=ThisT,ref=ThisRef},Index,Label,ImageIndex)
when is_integer(Index),is_list(Label),is_integer(ImageIndex) ->
?CLASS(ThisT,wxListCtrl),
@@ -548,40 +598,45 @@ insertItem(#wx_ref{type=ThisT,ref=ThisRef},Index,Label,ImageIndex)
wxe_util:call(?wxListCtrl_InsertItem_3,
<<ThisRef:32/?UI,Index:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8,ImageIndex:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlrefreshitem">external documentation</a>.
+-spec refreshItem(This, Item) -> ok when
+ This::wxListCtrl(), Item::integer().
refreshItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:cast(?wxListCtrl_RefreshItem,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListCtrl(), ItemFrom::integer(), ItemTo::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlrefreshitems">external documentation</a>.
+-spec refreshItems(This, ItemFrom, ItemTo) -> ok when
+ This::wxListCtrl(), ItemFrom::integer(), ItemTo::integer().
refreshItems(#wx_ref{type=ThisT,ref=ThisRef},ItemFrom,ItemTo)
when is_integer(ItemFrom),is_integer(ItemTo) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:cast(?wxListCtrl_RefreshItems,
<<ThisRef:32/?UI,ItemFrom:32/?UI,ItemTo:32/?UI>>).
-%% @spec (This::wxListCtrl(), Dx::integer(), Dy::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlscrolllist">external documentation</a>.
+-spec scrollList(This, Dx, Dy) -> boolean() when
+ This::wxListCtrl(), Dx::integer(), Dy::integer().
scrollList(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy)
when is_integer(Dx),is_integer(Dy) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_ScrollList,
<<ThisRef:32/?UI,Dx:32/?UI,Dy:32/?UI>>).
-%% @spec (This::wxListCtrl(), Colour::wx:colour()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetbackgroundcolour">external documentation</a>.
+-spec setBackgroundColour(This, Colour) -> boolean() when
+ This::wxListCtrl(), Colour::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_SetBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxListCtrl(), Col::integer(), Item::wxListItem:wxListItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetcolumn">external documentation</a>.
+-spec setColumn(This, Col, Item) -> boolean() when
+ This::wxListCtrl(), Col::integer(), Item::wxListItem:wxListItem().
setColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=ItemT,ref=ItemRef})
when is_integer(Col) ->
?CLASS(ThisT,wxListCtrl),
@@ -589,16 +644,18 @@ setColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=ItemT,ref=ItemRef})
wxe_util:call(?wxListCtrl_SetColumn,
<<ThisRef:32/?UI,Col:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Col::integer(), Width::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetcolumnwidth">external documentation</a>.
+-spec setColumnWidth(This, Col, Width) -> boolean() when
+ This::wxListCtrl(), Col::integer(), Width::integer().
setColumnWidth(#wx_ref{type=ThisT,ref=ThisRef},Col,Width)
when is_integer(Col),is_integer(Width) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_SetColumnWidth,
<<ThisRef:32/?UI,Col:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxListCtrl(), ImageList::wxImageList:wxImageList(), Which::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetimagelist">external documentation</a>.
+-spec setImageList(This, ImageList, Which) -> ok when
+ This::wxListCtrl(), ImageList::wxImageList:wxImageList(), Which::integer().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef},Which)
when is_integer(Which) ->
?CLASS(ThisT,wxListCtrl),
@@ -606,23 +663,27 @@ setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageLi
wxe_util:cast(?wxListCtrl_SetImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI,Which:32/?UI>>).
-%% @spec (This::wxListCtrl(), Info::wxListItem:wxListItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitem">external documentation</a>.
+-spec setItem(This, Info) -> boolean() when
+ This::wxListCtrl(), Info::wxListItem:wxListItem().
setItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=InfoT,ref=InfoRef}) ->
?CLASS(ThisT,wxListCtrl),
?CLASS(InfoT,wxListItem),
wxe_util:call(?wxListCtrl_SetItem_1,
<<ThisRef:32/?UI,InfoRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Index::integer(), Col::integer(), Label::string()) -> integer()
%% @equiv setItem(This,Index,Col,Label, [])
+-spec setItem(This, Index, Col, Label) -> integer() when
+ This::wxListCtrl(), Index::integer(), Col::integer(), Label::unicode:chardata().
+
setItem(This,Index,Col,Label)
when is_record(This, wx_ref),is_integer(Index),is_integer(Col),is_list(Label) ->
setItem(This,Index,Col,Label, []).
-%% @spec (This::wxListCtrl(), Index::integer(), Col::integer(), Label::string(), [Option]) -> integer()
-%% Option = {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitem">external documentation</a>.
+-spec setItem(This, Index, Col, Label, [Option]) -> integer() when
+ This::wxListCtrl(), Index::integer(), Col::integer(), Label::unicode:chardata(),
+ Option :: {imageId, integer()}.
setItem(#wx_ref{type=ThisT,ref=ThisRef},Index,Col,Label, Options)
when is_integer(Index),is_integer(Col),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -633,32 +694,36 @@ setItem(#wx_ref{type=ThisT,ref=ThisRef},Index,Col,Label, Options)
wxe_util:call(?wxListCtrl_SetItem_4,
<<ThisRef:32/?UI,Index:32/?UI,Col:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitembackgroundcolour">external documentation</a>.
+-spec setItemBackgroundColour(This, Item, Col) -> ok when
+ This::wxListCtrl(), Item::integer(), Col::wx:wx_colour().
setItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxListCtrl),
wxe_util:cast(?wxListCtrl_SetItemBackgroundColour,
<<ThisRef:32/?UI,Item:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxListCtrl(), Count::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemcount">external documentation</a>.
+-spec setItemCount(This, Count) -> ok when
+ This::wxListCtrl(), Count::integer().
setItemCount(#wx_ref{type=ThisT,ref=ThisRef},Count)
when is_integer(Count) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:cast(?wxListCtrl_SetItemCount,
<<ThisRef:32/?UI,Count:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Data::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemdata">external documentation</a>.
+-spec setItemData(This, Item, Data) -> boolean() when
+ This::wxListCtrl(), Item::integer(), Data::integer().
setItemData(#wx_ref{type=ThisT,ref=ThisRef},Item,Data)
when is_integer(Item),is_integer(Data) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_SetItemData,
<<ThisRef:32/?UI,Item:32/?UI,Data:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), F::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemfont">external documentation</a>.
+-spec setItemFont(This, Item, F) -> ok when
+ This::wxListCtrl(), Item::integer(), F::wxFont:wxFont().
setItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item,#wx_ref{type=FT,ref=FRef})
when is_integer(Item) ->
?CLASS(ThisT,wxListCtrl),
@@ -666,15 +731,18 @@ setItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item,#wx_ref{type=FT,ref=FRef})
wxe_util:cast(?wxListCtrl_SetItemFont,
<<ThisRef:32/?UI,Item:32/?UI,FRef:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Image::integer()) -> bool()
%% @equiv setItemImage(This,Item,Image, [])
+-spec setItemImage(This, Item, Image) -> boolean() when
+ This::wxListCtrl(), Item::integer(), Image::integer().
+
setItemImage(This,Item,Image)
when is_record(This, wx_ref),is_integer(Item),is_integer(Image) ->
setItemImage(This,Item,Image, []).
-%% @spec (This::wxListCtrl(), Item::integer(), Image::integer(), [Option]) -> bool()
-%% Option = {selImage, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemimage">external documentation</a>.
+-spec setItemImage(This, Item, Image, [Option]) -> boolean() when
+ This::wxListCtrl(), Item::integer(), Image::integer(),
+ Option :: {selImage, integer()}.
setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image, Options)
when is_integer(Item),is_integer(Image),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -684,32 +752,36 @@ setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image, Options)
wxe_util:call(?wxListCtrl_SetItemImage,
<<ThisRef:32/?UI,Item:32/?UI,Image:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Column::integer(), Image::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemcolumnimage">external documentation</a>.
+-spec setItemColumnImage(This, Item, Column, Image) -> boolean() when
+ This::wxListCtrl(), Item::integer(), Column::integer(), Image::integer().
setItemColumnImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Column,Image)
when is_integer(Item),is_integer(Column),is_integer(Image) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_SetItemColumnImage,
<<ThisRef:32/?UI,Item:32/?UI,Column:32/?UI,Image:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Pos::{X::integer(), Y::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemposition">external documentation</a>.
+-spec setItemPosition(This, Item, Pos) -> boolean() when
+ This::wxListCtrl(), Item::integer(), Pos::{X::integer(), Y::integer()}.
setItemPosition(#wx_ref{type=ThisT,ref=ThisRef},Item,{PosX,PosY})
when is_integer(Item),is_integer(PosX),is_integer(PosY) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_SetItemPosition,
<<ThisRef:32/?UI,Item:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), State::integer(), StateMask::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemstate">external documentation</a>.
+-spec setItemState(This, Item, State, StateMask) -> boolean() when
+ This::wxListCtrl(), Item::integer(), State::integer(), StateMask::integer().
setItemState(#wx_ref{type=ThisT,ref=ThisRef},Item,State,StateMask)
when is_integer(Item),is_integer(State),is_integer(StateMask) ->
?CLASS(ThisT,wxListCtrl),
wxe_util:call(?wxListCtrl_SetItemState,
<<ThisRef:32/?UI,Item:32/?UI,State:32/?UI,StateMask:32/?UI>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Str::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemtext">external documentation</a>.
+-spec setItemText(This, Item, Str) -> ok when
+ This::wxListCtrl(), Item::integer(), Str::unicode:chardata().
setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Str)
when is_integer(Item),is_list(Str) ->
?CLASS(ThisT,wxListCtrl),
@@ -717,23 +789,27 @@ setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Str)
wxe_util:cast(?wxListCtrl_SetItemText,
<<ThisRef:32/?UI,Item:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((4+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxListCtrl(), Item::integer(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetitemtextcolour">external documentation</a>.
+-spec setItemTextColour(This, Item, Col) -> ok when
+ This::wxListCtrl(), Item::integer(), Col::wx:wx_colour().
setItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxListCtrl),
wxe_util:cast(?wxListCtrl_SetItemTextColour,
<<ThisRef:32/?UI,Item:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxListCtrl(), Style::integer()) -> ok
%% @equiv setSingleStyle(This,Style, [])
+-spec setSingleStyle(This, Style) -> ok when
+ This::wxListCtrl(), Style::integer().
+
setSingleStyle(This,Style)
when is_record(This, wx_ref),is_integer(Style) ->
setSingleStyle(This,Style, []).
-%% @spec (This::wxListCtrl(), Style::integer(), [Option]) -> ok
-%% Option = {add, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetsinglestyle">external documentation</a>.
+-spec setSingleStyle(This, Style, [Option]) -> ok when
+ This::wxListCtrl(), Style::integer(),
+ Option :: {add, boolean()}.
setSingleStyle(#wx_ref{type=ThisT,ref=ThisRef},Style, Options)
when is_integer(Style),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -743,16 +819,18 @@ setSingleStyle(#wx_ref{type=ThisT,ref=ThisRef},Style, Options)
wxe_util:cast(?wxListCtrl_SetSingleStyle,
<<ThisRef:32/?UI,Style:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxListCtrl(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsettextcolour">external documentation</a>.
+-spec setTextColour(This, Col) -> ok when
+ This::wxListCtrl(), Col::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxListCtrl),
wxe_util:cast(?wxListCtrl_SetTextColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxListCtrl(), Style::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistctrl.html#wxlistctrlsetwindowstyleflag">external documentation</a>.
+-spec setWindowStyleFlag(This, Style) -> ok when
+ This::wxListCtrl(), Style::integer().
setWindowStyleFlag(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
?CLASS(ThisT,wxListCtrl),
@@ -777,8 +855,8 @@ sortItems(#wx_ref{type=ThisT,ref=ThisRef}, SortCallBack)
end,
SortId = wxe_util:get_cbId(Sort),
wxe_util:call(?wxListCtrl_SortItems, <<ThisRef:32/?UI,SortId:32/?UI>>).
-%% @spec (This::wxListCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxListCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxListEvent.erl b/lib/wx/src/gen/wxListEvent.erl
index f7d8658acc..9cbb816096 100644
--- a/lib/wx/src/gen/wxListEvent.erl
+++ b/lib/wx/src/gen/wxListEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,98 +42,113 @@
isSelection/1,parent_class/1,resumePropagation/2,setInt/2,setString/2,
shouldPropagate/1,skip/1,skip/2,stopPropagation/1,veto/1]).
+-export_type([wxListEvent/0]).
%% @hidden
parent_class(wxNotifyEvent) -> true;
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxListEvent()) -> integer()
+-type wxListEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetcachefrom">external documentation</a>.
+-spec getCacheFrom(This) -> integer() when
+ This::wxListEvent().
getCacheFrom(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetCacheFrom,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetcacheto">external documentation</a>.
+-spec getCacheTo(This) -> integer() when
+ This::wxListEvent().
getCacheTo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetCacheTo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetkeycode">external documentation</a>.
+-spec getKeyCode(This) -> integer() when
+ This::wxListEvent().
getKeyCode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetKeyCode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetindex">external documentation</a>.
+-spec getIndex(This) -> integer() when
+ This::wxListEvent().
getIndex(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetIndex,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetcolumn">external documentation</a>.
+-spec getColumn(This) -> integer() when
+ This::wxListEvent().
getColumn(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetColumn,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetpoint">external documentation</a>.
+-spec getPoint(This) -> {X::integer(), Y::integer()} when
+ This::wxListEvent().
getPoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetPoint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetlabel">external documentation</a>.
+-spec getLabel(This) -> unicode:charlist() when
+ This::wxListEvent().
getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetLabel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgettext">external documentation</a>.
+-spec getText(This) -> unicode:charlist() when
+ This::wxListEvent().
getText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetimage">external documentation</a>.
+-spec getImage(This) -> integer() when
+ This::wxListEvent().
getImage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetImage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetdata">external documentation</a>.
+-spec getData(This) -> integer() when
+ This::wxListEvent().
getData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetmask">external documentation</a>.
+-spec getMask(This) -> integer() when
+ This::wxListEvent().
getMask(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetMask,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> wxListItem:wxListItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventgetitem">external documentation</a>.
+-spec getItem(This) -> wxListItem:wxListItem() when
+ This::wxListEvent().
getItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_GetItem,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistevent.html#wxlisteventiseditcancelled">external documentation</a>.
+-spec isEditCancelled(This) -> boolean() when
+ This::wxListEvent().
isEditCancelled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListEvent),
wxe_util:call(?wxListEvent_IsEditCancelled,
diff --git a/lib/wx/src/gen/wxListItem.erl b/lib/wx/src/gen/wxListItem.erl
index 326f674b28..787d686135 100644
--- a/lib/wx/src/gen/wxListItem.erl
+++ b/lib/wx/src/gen/wxListItem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,184 +33,207 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxListItem/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxListItem()
+-type wxListItem() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemwxlistitem">external documentation</a>.
+-spec new() -> wxListItem().
new() ->
wxe_util:construct(?wxListItem_new_0,
<<>>).
-%% @spec (Item::wxListItem()) -> wxListItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemwxlistitem">external documentation</a>.
+-spec new(Item) -> wxListItem() when
+ Item::wxListItem().
new(#wx_ref{type=ItemT,ref=ItemRef}) ->
?CLASS(ItemT,wxListItem),
wxe_util:construct(?wxListItem_new_1,
<<ItemRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemclear">external documentation</a>.
+-spec clear(This) -> ok when
+ This::wxListItem().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_Clear,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> WxListColumnFormat
-%% WxListColumnFormat = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetalign">external documentation</a>.
-%%<br /> WxListColumnFormat is one of ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER
+%%<br /> Res = ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER
+-spec getAlign(This) -> wx:wx_enum() when
+ This::wxListItem().
getAlign(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetAlign,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetbackgroundcolour">external documentation</a>.
+-spec getBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxListItem().
getBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetcolumn">external documentation</a>.
+-spec getColumn(This) -> integer() when
+ This::wxListItem().
getColumn(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetColumn,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetfont">external documentation</a>.
+-spec getFont(This) -> wxFont:wxFont() when
+ This::wxListItem().
getFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetid">external documentation</a>.
+-spec getId(This) -> integer() when
+ This::wxListItem().
getId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetimage">external documentation</a>.
+-spec getImage(This) -> integer() when
+ This::wxListItem().
getImage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetImage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetmask">external documentation</a>.
+-spec getMask(This) -> integer() when
+ This::wxListItem().
getMask(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetMask,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetstate">external documentation</a>.
+-spec getState(This) -> integer() when
+ This::wxListItem().
getState(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetState,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgettext">external documentation</a>.
+-spec getText(This) -> unicode:charlist() when
+ This::wxListItem().
getText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgettextcolour">external documentation</a>.
+-spec getTextColour(This) -> wx:wx_colour4() when
+ This::wxListItem().
getTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemgetwidth">external documentation</a>.
+-spec getWidth(This) -> integer() when
+ This::wxListItem().
getWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
wxe_util:call(?wxListItem_GetWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItem(), Align::WxListColumnFormat) -> ok
-%% WxListColumnFormat = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetalign">external documentation</a>.
-%%<br /> WxListColumnFormat is one of ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER
+%%<br /> Align = ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER
+-spec setAlign(This, Align) -> ok when
+ This::wxListItem(), Align::wx:wx_enum().
setAlign(#wx_ref{type=ThisT,ref=ThisRef},Align)
when is_integer(Align) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetAlign,
<<ThisRef:32/?UI,Align:32/?UI>>).
-%% @spec (This::wxListItem(), ColBack::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetbackgroundcolour">external documentation</a>.
+-spec setBackgroundColour(This, ColBack) -> ok when
+ This::wxListItem(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
-%% @spec (This::wxListItem(), Col::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetcolumn">external documentation</a>.
+-spec setColumn(This, Col) -> ok when
+ This::wxListItem(), Col::integer().
setColumn(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetColumn,
<<ThisRef:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxListItem(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetfont">external documentation</a>.
+-spec setFont(This, Font) -> ok when
+ This::wxListItem(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxListItem),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxListItem_SetFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxListItem(), Id::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetid">external documentation</a>.
+-spec setId(This, Id) -> ok when
+ This::wxListItem(), Id::integer().
setId(#wx_ref{type=ThisT,ref=ThisRef},Id)
when is_integer(Id) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetId,
<<ThisRef:32/?UI,Id:32/?UI>>).
-%% @spec (This::wxListItem(), Image::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetimage">external documentation</a>.
+-spec setImage(This, Image) -> ok when
+ This::wxListItem(), Image::integer().
setImage(#wx_ref{type=ThisT,ref=ThisRef},Image)
when is_integer(Image) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetImage,
<<ThisRef:32/?UI,Image:32/?UI>>).
-%% @spec (This::wxListItem(), Mask::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetmask">external documentation</a>.
+-spec setMask(This, Mask) -> ok when
+ This::wxListItem(), Mask::integer().
setMask(#wx_ref{type=ThisT,ref=ThisRef},Mask)
when is_integer(Mask) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetMask,
<<ThisRef:32/?UI,Mask:32/?UI>>).
-%% @spec (This::wxListItem(), State::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetstate">external documentation</a>.
+-spec setState(This, State) -> ok when
+ This::wxListItem(), State::integer().
setState(#wx_ref{type=ThisT,ref=ThisRef},State)
when is_integer(State) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetState,
<<ThisRef:32/?UI,State:32/?UI>>).
-%% @spec (This::wxListItem(), StateMask::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetstatemask">external documentation</a>.
+-spec setStateMask(This, StateMask) -> ok when
+ This::wxListItem(), StateMask::integer().
setStateMask(#wx_ref{type=ThisT,ref=ThisRef},StateMask)
when is_integer(StateMask) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetStateMask,
<<ThisRef:32/?UI,StateMask:32/?UI>>).
-%% @spec (This::wxListItem(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsettext">external documentation</a>.
+-spec setText(This, Text) -> ok when
+ This::wxListItem(), Text::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxListItem),
@@ -218,24 +241,26 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxListItem_SetText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxListItem(), ColText::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsettextcolour">external documentation</a>.
+-spec setTextColour(This, ColText) -> ok when
+ This::wxListItem(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetTextColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
-%% @spec (This::wxListItem(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitem.html#wxlistitemsetwidth">external documentation</a>.
+-spec setWidth(This, Width) -> ok when
+ This::wxListItem(), Width::integer().
setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxListItem),
wxe_util:cast(?wxListItem_SetWidth,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxListItem()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxListItem()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListItem),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxListItemAttr.erl b/lib/wx/src/gen/wxListItemAttr.erl
index 1a43c71854..daf5ebe96a 100644
--- a/lib/wx/src/gen/wxListItemAttr.erl
+++ b/lib/wx/src/gen/wxListItemAttr.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,91 +31,103 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxListItemAttr/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxListItemAttr()
+-type wxListItemAttr() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrwxlistitemattr">external documentation</a>.
+-spec new() -> wxListItemAttr().
new() ->
wxe_util:construct(?wxListItemAttr_new_0,
<<>>).
-%% @spec (ColText::wx:colour(), ColBack::wx:colour(), Font::wxFont:wxFont()) -> wxListItemAttr()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrwxlistitemattr">external documentation</a>.
+-spec new(ColText, ColBack, Font) -> wxListItemAttr() when
+ ColText::wx:wx_colour(), ColBack::wx:wx_colour(), Font::wxFont:wxFont().
new(ColText,ColBack,#wx_ref{type=FontT,ref=FontRef})
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4,tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
?CLASS(FontT,wxFont),
wxe_util:construct(?wxListItemAttr_new_3,
<<(wxe_util:colour_bin(ColText)):16/binary,(wxe_util:colour_bin(ColBack)):16/binary,FontRef:32/?UI>>).
-%% @spec (This::wxListItemAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrgetbackgroundcolour">external documentation</a>.
+-spec getBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxListItemAttr().
getBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItemAttr),
wxe_util:call(?wxListItemAttr_GetBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItemAttr()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrgetfont">external documentation</a>.
+-spec getFont(This) -> wxFont:wxFont() when
+ This::wxListItemAttr().
getFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItemAttr),
wxe_util:call(?wxListItemAttr_GetFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItemAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrgettextcolour">external documentation</a>.
+-spec getTextColour(This) -> wx:wx_colour4() when
+ This::wxListItemAttr().
getTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItemAttr),
wxe_util:call(?wxListItemAttr_GetTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItemAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrhasbackgroundcolour">external documentation</a>.
+-spec hasBackgroundColour(This) -> boolean() when
+ This::wxListItemAttr().
hasBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItemAttr),
wxe_util:call(?wxListItemAttr_HasBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItemAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrhasfont">external documentation</a>.
+-spec hasFont(This) -> boolean() when
+ This::wxListItemAttr().
hasFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItemAttr),
wxe_util:call(?wxListItemAttr_HasFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItemAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrhastextcolour">external documentation</a>.
+-spec hasTextColour(This) -> boolean() when
+ This::wxListItemAttr().
hasTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItemAttr),
wxe_util:call(?wxListItemAttr_HasTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListItemAttr(), ColBack::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrsetbackgroundcolour">external documentation</a>.
+-spec setBackgroundColour(This, ColBack) -> ok when
+ This::wxListItemAttr(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
?CLASS(ThisT,wxListItemAttr),
wxe_util:cast(?wxListItemAttr_SetBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
-%% @spec (This::wxListItemAttr(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrsetfont">external documentation</a>.
+-spec setFont(This, Font) -> ok when
+ This::wxListItemAttr(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxListItemAttr),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxListItemAttr_SetFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxListItemAttr(), ColText::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistitemattr.html#wxlistitemattrsettextcolour">external documentation</a>.
+-spec setTextColour(This, ColText) -> ok when
+ This::wxListItemAttr(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
?CLASS(ThisT,wxListItemAttr),
wxe_util:cast(?wxListItemAttr_SetTextColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
-%% @spec (This::wxListItemAttr()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxListItemAttr()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListItemAttr),
wxe_util:destroy(?wxListItemAttr_destroy,Obj),
diff --git a/lib/wx/src/gen/wxListView.erl b/lib/wx/src/gen/wxListView.erl
index 95a233a562..87cc28cd15 100644
--- a/lib/wx/src/gen/wxListView.erl
+++ b/lib/wx/src/gen/wxListView.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,67 +70,78 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxListView/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxListView(), Col::integer()) -> ok
+-type wxListView() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistview.html#wxlistviewclearcolumnimage">external documentation</a>.
+-spec clearColumnImage(This, Col) -> ok when
+ This::wxListView(), Col::integer().
clearColumnImage(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
?CLASS(ThisT,wxListView),
wxe_util:cast(?wxListView_ClearColumnImage,
<<ThisRef:32/?UI,Col:32/?UI>>).
-%% @spec (This::wxListView(), Index::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistview.html#wxlistviewfocus">external documentation</a>.
+-spec focus(This, Index) -> ok when
+ This::wxListView(), Index::integer().
focus(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxListView),
wxe_util:cast(?wxListView_Focus,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxListView()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistview.html#wxlistviewgetfirstselected">external documentation</a>.
+-spec getFirstSelected(This) -> integer() when
+ This::wxListView().
getFirstSelected(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListView),
wxe_util:call(?wxListView_GetFirstSelected,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListView()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistview.html#wxlistviewgetfocuseditem">external documentation</a>.
+-spec getFocusedItem(This) -> integer() when
+ This::wxListView().
getFocusedItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListView),
wxe_util:call(?wxListView_GetFocusedItem,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListView(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistview.html#wxlistviewgetnextselected">external documentation</a>.
+-spec getNextSelected(This, Item) -> integer() when
+ This::wxListView(), Item::integer().
getNextSelected(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxListView),
wxe_util:call(?wxListView_GetNextSelected,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxListView(), Index::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistview.html#wxlistviewisselected">external documentation</a>.
+-spec isSelected(This, Index) -> boolean() when
+ This::wxListView(), Index::integer().
isSelected(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxListView),
wxe_util:call(?wxListView_IsSelected,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxListView(), N::integer()) -> ok
%% @equiv select(This,N, [])
+-spec select(This, N) -> ok when
+ This::wxListView(), N::integer().
+
select(This,N)
when is_record(This, wx_ref),is_integer(N) ->
select(This,N, []).
-%% @spec (This::wxListView(), N::integer(), [Option]) -> ok
-%% Option = {on, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistview.html#wxlistviewselect">external documentation</a>.
+-spec select(This, N, [Option]) -> ok when
+ This::wxListView(), N::integer(),
+ Option :: {on, boolean()}.
select(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
when is_integer(N),is_list(Options) ->
?CLASS(ThisT,wxListView),
@@ -140,8 +151,9 @@ select(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
wxe_util:cast(?wxListView_Select,
<<ThisRef:32/?UI,N:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxListView(), Col::integer(), Image::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistview.html#wxlistviewsetcolumnimage">external documentation</a>.
+-spec setColumnImage(This, Col, Image) -> ok when
+ This::wxListView(), Col::integer(), Image::integer().
setColumnImage(#wx_ref{type=ThisT,ref=ThisRef},Col,Image)
when is_integer(Col),is_integer(Image) ->
?CLASS(ThisT,wxListView),
diff --git a/lib/wx/src/gen/wxListbook.erl b/lib/wx/src/gen/wxListbook.erl
index c204dc87a1..0907d554f4 100644
--- a/lib/wx/src/gen/wxListbook.erl
+++ b/lib/wx/src/gen/wxListbook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,27 +74,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxListbook/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxListbook()
+-type wxListbook() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookwxlistbook">external documentation</a>.
+-spec new() -> wxListbook().
new() ->
wxe_util:construct(?wxListbook_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxListbook()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxListbook() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxListbook()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookwxlistbook">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxListbook() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -106,15 +113,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxListbook_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxListbook(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv addPage(This,Page,Text, [])
+-spec addPage(This, Page, Text) -> boolean() when
+ This::wxListbook(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
addPage(This,Page,Text)
when is_record(This, wx_ref),is_record(Page, wx_ref),is_list(Text) ->
addPage(This,Page,Text, []).
-%% @spec (This::wxListbook(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookaddpage">external documentation</a>.
+-spec addPage(This, Page, Text, [Option]) -> boolean() when
+ This::wxListbook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxListbook),
@@ -127,15 +138,18 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
wxe_util:call(?wxListbook_AddPage,
<<ThisRef:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxListbook()) -> ok
%% @equiv advanceSelection(This, [])
+-spec advanceSelection(This) -> ok when
+ This::wxListbook().
+
advanceSelection(This)
when is_record(This, wx_ref) ->
advanceSelection(This, []).
-%% @spec (This::wxListbook(), [Option]) -> ok
-%% Option = {forward, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookadvanceselection">external documentation</a>.
+-spec advanceSelection(This, [Option]) -> ok when
+ This::wxListbook(),
+ Option :: {forward, boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxListbook),
@@ -145,23 +159,29 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxListbook_AdvanceSelection,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxListbook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookassignimagelist">external documentation</a>.
+-spec assignImageList(This, ImageList) -> ok when
+ This::wxListbook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxListbook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxListbook_AssignImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxListbook(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxListbook(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxListbook(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxListbook(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxListbook),
@@ -174,98 +194,114 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxListbook_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxListbook()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookdeleteallpages">external documentation</a>.
+-spec deleteAllPages(This) -> boolean() when
+ This::wxListbook().
deleteAllPages(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_DeleteAllPages,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookdeletepage">external documentation</a>.
+-spec deletePage(This, N) -> boolean() when
+ This::wxListbook(), N::integer().
deletePage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_DeletePage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookremovepage">external documentation</a>.
+-spec removePage(This, N) -> boolean() when
+ This::wxListbook(), N::integer().
removePage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_RemovePage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListbook()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookgetcurrentpage">external documentation</a>.
+-spec getCurrentPage(This) -> wxWindow:wxWindow() when
+ This::wxListbook().
getCurrentPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_GetCurrentPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListbook()) -> wxImageList:wxImageList()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookgetimagelist">external documentation</a>.
+-spec getImageList(This) -> wxImageList:wxImageList() when
+ This::wxListbook().
getImageList(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_GetImageList,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookgetpage">external documentation</a>.
+-spec getPage(This, N) -> wxWindow:wxWindow() when
+ This::wxListbook(), N::integer().
getPage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_GetPage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListbook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookgetpagecount">external documentation</a>.
+-spec getPageCount(This) -> integer() when
+ This::wxListbook().
getPageCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_GetPageCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookgetpageimage">external documentation</a>.
+-spec getPageImage(This, N) -> integer() when
+ This::wxListbook(), N::integer().
getPageImage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_GetPageImage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookgetpagetext">external documentation</a>.
+-spec getPageText(This, N) -> unicode:charlist() when
+ This::wxListbook(), N::integer().
getPageText(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_GetPageText,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListbook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxListbook().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxListbook(), Pt::{X::integer(), Y::integer()}) -> {integer(), Flags::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookhittest">external documentation</a>.
+-spec hitTest(This, Pt) -> Result when
+ Result ::{Res ::integer(), Flags::integer()},
+ This::wxListbook(), Pt::{X::integer(), Y::integer()}.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_HitTest,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv insertPage(This,N,Page,Text, [])
+-spec insertPage(This, N, Page, Text) -> boolean() when
+ This::wxListbook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
insertPage(This,N,Page,Text)
when is_record(This, wx_ref),is_integer(N),is_record(Page, wx_ref),is_list(Text) ->
insertPage(This,N,Page,Text, []).
-%% @spec (This::wxListbook(), N::integer(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookinsertpage">external documentation</a>.
+-spec insertPage(This, N, Page, Text, [Option]) -> boolean() when
+ This::wxListbook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(N),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxListbook),
@@ -278,32 +314,36 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Tex
wxe_util:call(?wxListbook_InsertPage,
<<ThisRef:32/?UI,N:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxListbook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbooksetimagelist">external documentation</a>.
+-spec setImageList(This, ImageList) -> ok when
+ This::wxListbook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxListbook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxListbook_SetImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxListbook(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbooksetpagesize">external documentation</a>.
+-spec setPageSize(This, Size) -> ok when
+ This::wxListbook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxListbook),
wxe_util:cast(?wxListbook_SetPageSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer(), ImageId::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbooksetpageimage">external documentation</a>.
+-spec setPageImage(This, N, ImageId) -> boolean() when
+ This::wxListbook(), N::integer(), ImageId::integer().
setPageImage(#wx_ref{type=ThisT,ref=ThisRef},N,ImageId)
when is_integer(N),is_integer(ImageId) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_SetPageImage,
<<ThisRef:32/?UI,N:32/?UI,ImageId:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer(), StrText::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbooksetpagetext">external documentation</a>.
+-spec setPageText(This, N, StrText) -> boolean() when
+ This::wxListbook(), N::integer(), StrText::unicode:chardata().
setPageText(#wx_ref{type=ThisT,ref=ThisRef},N,StrText)
when is_integer(N),is_list(StrText) ->
?CLASS(ThisT,wxListbook),
@@ -311,24 +351,26 @@ setPageText(#wx_ref{type=ThisT,ref=ThisRef},N,StrText)
wxe_util:call(?wxListbook_SetPageText,
<<ThisRef:32/?UI,N:32/?UI,(byte_size(StrText_UC)):32/?UI,(StrText_UC)/binary, 0:(((8- ((4+byte_size(StrText_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxListbook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbooksetselection">external documentation</a>.
+-spec setSelection(This, N) -> integer() when
+ This::wxListbook(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_SetSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListbook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlistbook.html#wxlistbookchangeselection">external documentation</a>.
+-spec changeSelection(This, N) -> integer() when
+ This::wxListbook(), N::integer().
changeSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxListbook),
wxe_util:call(?wxListbook_ChangeSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxListbook()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxListbook()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListbook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxLogNull.erl b/lib/wx/src/gen/wxLogNull.erl
index 676fdf6d85..0ac4e8f9a3 100644
--- a/lib/wx/src/gen/wxLogNull.erl
+++ b/lib/wx/src/gen/wxLogNull.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,17 +29,19 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxLogNull/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxLogNull()
+-type wxLogNull() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxlognull.html#wxlognullwxlognull">external documentation</a>.
+-spec new() -> wxLogNull().
new() ->
wxe_util:construct(?wxLogNull_new,
<<>>).
-%% @spec (This::wxLogNull()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxLogNull()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxLogNull),
wxe_util:destroy(?wxLogNull_destroy,Obj),
diff --git a/lib/wx/src/gen/wxMDIChildFrame.erl b/lib/wx/src/gen/wxMDIChildFrame.erl
index d3e1edda55..861beba34f 100644
--- a/lib/wx/src/gen/wxMDIChildFrame.erl
+++ b/lib/wx/src/gen/wxMDIChildFrame.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -80,6 +80,7 @@
thaw/1,transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxMDIChildFrame/0]).
%% @hidden
parent_class(wxFrame) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -87,21 +88,27 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMDIChildFrame()
+-type wxMDIChildFrame() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdichildframe.html#wxmdichildframewxmdichildframe">external documentation</a>.
+-spec new() -> wxMDIChildFrame().
new() ->
wxe_util:construct(?wxMDIChildFrame_new_0,
<<>>).
-%% @spec (Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::string()) -> wxMDIChildFrame()
%% @equiv new(Parent,Id,Title, [])
+-spec new(Parent, Id, Title) -> wxMDIChildFrame() when
+ Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::unicode:chardata().
+
new(Parent,Id,Title)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
new(Parent,Id,Title, []).
-%% @spec (Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::string(), [Option]) -> wxMDIChildFrame()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdichildframe.html#wxmdichildframewxmdichildframe">external documentation</a>.
+-spec new(Parent, Id, Title, [Option]) -> wxMDIChildFrame() when
+ Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxMDIParentFrame),
@@ -114,22 +121,28 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
wxe_util:construct(?wxMDIChildFrame_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMDIChildFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdichildframe.html#wxmdichildframeactivate">external documentation</a>.
+-spec activate(This) -> ok when
+ This::wxMDIChildFrame().
activate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIChildFrame),
wxe_util:cast(?wxMDIChildFrame_Activate,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMDIChildFrame(), Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::string()) -> bool()
%% @equiv create(This,Parent,Id,Title, [])
+-spec create(This, Parent, Id, Title) -> boolean() when
+ This::wxMDIChildFrame(), Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::unicode:chardata().
+
create(This,Parent,Id,Title)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
create(This,Parent,Id,Title, []).
-%% @spec (This::wxMDIChildFrame(), Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdichildframe.html#wxmdichildframecreate">external documentation</a>.
+-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
+ This::wxMDIChildFrame(), Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxMDIChildFrame),
@@ -143,15 +156,18 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ti
wxe_util:call(?wxMDIChildFrame_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMDIChildFrame()) -> ok
%% @equiv maximize(This, [])
+-spec maximize(This) -> ok when
+ This::wxMDIChildFrame().
+
maximize(This)
when is_record(This, wx_ref) ->
maximize(This, []).
-%% @spec (This::wxMDIChildFrame(), [Option]) -> ok
-%% Option = {maximize, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdichildframe.html#wxmdichildframemaximize">external documentation</a>.
+-spec maximize(This, [Option]) -> ok when
+ This::wxMDIChildFrame(),
+ Option :: {maximize, boolean()}.
maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMDIChildFrame),
@@ -161,15 +177,16 @@ maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxMDIChildFrame_Maximize,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMDIChildFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdichildframe.html#wxmdichildframerestore">external documentation</a>.
+-spec restore(This) -> ok when
+ This::wxMDIChildFrame().
restore(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIChildFrame),
wxe_util:cast(?wxMDIChildFrame_Restore,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMDIChildFrame()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMDIChildFrame()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMDIChildFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMDIClientWindow.erl b/lib/wx/src/gen/wxMDIClientWindow.erl
index 79a11b4eb7..344dcdbbaf 100644
--- a/lib/wx/src/gen/wxMDIClientWindow.erl
+++ b/lib/wx/src/gen/wxMDIClientWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -68,26 +68,31 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxMDIClientWindow/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMDIClientWindow()
+-type wxMDIClientWindow() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiclientwindow.html#wxmdiclientwindowwxmdiclientwindow">external documentation</a>.
+-spec new() -> wxMDIClientWindow().
new() ->
wxe_util:construct(?wxMDIClientWindow_new_0,
<<>>).
-%% @spec (Parent::wxMDIParentFrame:wxMDIParentFrame()) -> wxMDIClientWindow()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxMDIClientWindow() when
+ Parent::wxMDIParentFrame:wxMDIParentFrame().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxMDIParentFrame:wxMDIParentFrame(), [Option]) -> wxMDIClientWindow()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiclientwindow.html#wxmdiclientwindowwxmdiclientwindow">external documentation</a>.
+-spec new(Parent, [Option]) -> wxMDIClientWindow() when
+ Parent::wxMDIParentFrame:wxMDIParentFrame(),
+ Option :: {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxMDIParentFrame),
@@ -97,15 +102,18 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxMDIClientWindow_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMDIClientWindow(), Parent::wxMDIParentFrame:wxMDIParentFrame()) -> bool()
%% @equiv createClient(This,Parent, [])
+-spec createClient(This, Parent) -> boolean() when
+ This::wxMDIClientWindow(), Parent::wxMDIParentFrame:wxMDIParentFrame().
+
createClient(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
createClient(This,Parent, []).
-%% @spec (This::wxMDIClientWindow(), Parent::wxMDIParentFrame:wxMDIParentFrame(), [Option]) -> bool()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiclientwindow.html#wxmdiclientwindowcreateclient">external documentation</a>.
+-spec createClient(This, Parent, [Option]) -> boolean() when
+ This::wxMDIClientWindow(), Parent::wxMDIParentFrame:wxMDIParentFrame(),
+ Option :: {style, integer()}.
createClient(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMDIClientWindow),
@@ -116,8 +124,8 @@ createClient(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}
wxe_util:call(?wxMDIClientWindow_CreateClient,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxMDIClientWindow()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMDIClientWindow()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMDIClientWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMDIParentFrame.erl b/lib/wx/src/gen/wxMDIParentFrame.erl
index 7f8a305876..1a7e7387b9 100644
--- a/lib/wx/src/gen/wxMDIParentFrame.erl
+++ b/lib/wx/src/gen/wxMDIParentFrame.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -82,6 +82,7 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxMDIParentFrame/0]).
%% @hidden
parent_class(wxFrame) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -89,21 +90,27 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMDIParentFrame()
+-type wxMDIParentFrame() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframewxmdiparentframe">external documentation</a>.
+-spec new() -> wxMDIParentFrame().
new() ->
wxe_util:construct(?wxMDIParentFrame_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string()) -> wxMDIParentFrame()
%% @equiv new(Parent,Id,Title, [])
+-spec new(Parent, Id, Title) -> wxMDIParentFrame() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata().
+
new(Parent,Id,Title)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
new(Parent,Id,Title, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), [Option]) -> wxMDIParentFrame()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframewxmdiparentframe">external documentation</a>.
+-spec new(Parent, Id, Title, [Option]) -> wxMDIParentFrame() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -116,43 +123,52 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
wxe_util:construct(?wxMDIParentFrame_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMDIParentFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframeactivatenext">external documentation</a>.
+-spec activateNext(This) -> ok when
+ This::wxMDIParentFrame().
activateNext(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
wxe_util:cast(?wxMDIParentFrame_ActivateNext,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMDIParentFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframeactivateprevious">external documentation</a>.
+-spec activatePrevious(This) -> ok when
+ This::wxMDIParentFrame().
activatePrevious(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
wxe_util:cast(?wxMDIParentFrame_ActivatePrevious,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMDIParentFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframearrangeicons">external documentation</a>.
+-spec arrangeIcons(This) -> ok when
+ This::wxMDIParentFrame().
arrangeIcons(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
wxe_util:cast(?wxMDIParentFrame_ArrangeIcons,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMDIParentFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframecascade">external documentation</a>.
+-spec cascade(This) -> ok when
+ This::wxMDIParentFrame().
cascade(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
wxe_util:cast(?wxMDIParentFrame_Cascade,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMDIParentFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string()) -> bool()
%% @equiv create(This,Parent,Id,Title, [])
+-spec create(This, Parent, Id, Title) -> boolean() when
+ This::wxMDIParentFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata().
+
create(This,Parent,Id,Title)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
create(This,Parent,Id,Title, []).
-%% @spec (This::wxMDIParentFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframecreate">external documentation</a>.
+-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
+ This::wxMDIParentFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxMDIParentFrame),
@@ -166,31 +182,35 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ti
wxe_util:call(?wxMDIParentFrame_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMDIParentFrame()) -> wxMDIChildFrame:wxMDIChildFrame()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframegetactivechild">external documentation</a>.
+-spec getActiveChild(This) -> wxMDIChildFrame:wxMDIChildFrame() when
+ This::wxMDIParentFrame().
getActiveChild(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
wxe_util:call(?wxMDIParentFrame_GetActiveChild,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMDIParentFrame()) -> wxMDIClientWindow:wxMDIClientWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframegetclientwindow">external documentation</a>.
+-spec getClientWindow(This) -> wxMDIClientWindow:wxMDIClientWindow() when
+ This::wxMDIParentFrame().
getClientWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
wxe_util:call(?wxMDIParentFrame_GetClientWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMDIParentFrame()) -> ok
%% @equiv tile(This, [])
+-spec tile(This) -> ok when
+ This::wxMDIParentFrame().
+
tile(This)
when is_record(This, wx_ref) ->
tile(This, []).
-%% @spec (This::wxMDIParentFrame(), [Option]) -> ok
-%% Option = {orient, WxOrientation}
-%% WxOrientation = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmdiparentframe.html#wxmdiparentframetile">external documentation</a>.
-%%<br /> WxOrientation is one of ?wxHORIZONTAL | ?wxVERTICAL | ?wxBOTH
+%%<br /> Orient = ?wxHORIZONTAL | ?wxVERTICAL | ?wxBOTH
+-spec tile(This, [Option]) -> ok when
+ This::wxMDIParentFrame(),
+ Option :: {orient, wx:wx_enum()}.
tile(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMDIParentFrame),
@@ -200,8 +220,8 @@ tile(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxMDIParentFrame_Tile,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMDIParentFrame()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMDIParentFrame()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMDIParentFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMask.erl b/lib/wx/src/gen/wxMask.erl
index 3b5d3340ea..296c7cbc83 100644
--- a/lib/wx/src/gen/wxMask.erl
+++ b/lib/wx/src/gen/wxMask.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,31 +29,34 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxMask/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMask()
+-type wxMask() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmask.html#wxmaskwxmask">external documentation</a>.
+-spec new() -> wxMask().
new() ->
wxe_util:construct(?wxMask_new_0,
<<>>).
-%% @spec (Bitmap::wxBitmap:wxBitmap()) -> wxMask()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmask.html#wxmaskwxmask">external documentation</a>.
+-spec new(Bitmap) -> wxMask() when
+ Bitmap::wxBitmap:wxBitmap().
new(#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(BitmapT,wxBitmap),
wxe_util:construct(?wxMask_new_1,
<<BitmapRef:32/?UI>>).
-%% @spec (Bitmap::wxBitmap:wxBitmap(),X::integer()|term()) -> wxMask()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmask.html#wxmaskwxmask">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Bitmap::wxBitmap:wxBitmap(), PaletteIndex::integer()) -> wxMask() </c>
-%% </p>
-%% <p><c>
-%% new(Bitmap::wxBitmap:wxBitmap(), Colour::wx:colour()) -> wxMask() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(Bitmap, Colour) -> wxMask() when<br />
+%% Bitmap::wxBitmap:wxBitmap(), Colour::wx:wx_colour().<br />
+%%
+-spec new(Bitmap, PaletteIndex) -> wxMask() when
+ Bitmap::wxBitmap:wxBitmap(), PaletteIndex::integer();
+ (Bitmap, Colour) -> wxMask() when
+ Bitmap::wxBitmap:wxBitmap(), Colour::wx:wx_colour().
new(#wx_ref{type=BitmapT,ref=BitmapRef},PaletteIndex)
when is_integer(PaletteIndex) ->
?CLASS(BitmapT,wxBitmap),
@@ -65,23 +68,24 @@ new(#wx_ref{type=BitmapT,ref=BitmapRef},Colour)
wxe_util:construct(?wxMask_new_2_1,
<<BitmapRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxMask(), Bitmap::wxBitmap:wxBitmap()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmask.html#wxmaskcreate">external documentation</a>.
+-spec create(This, Bitmap) -> boolean() when
+ This::wxMask(), Bitmap::wxBitmap:wxBitmap().
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxMask),
?CLASS(BitmapT,wxBitmap),
wxe_util:call(?wxMask_Create_1,
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
-%% @spec (This::wxMask(),Bitmap::wxBitmap:wxBitmap(),X::integer()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmask.html#wxmaskcreate">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% create(This::wxMask(), Bitmap::wxBitmap:wxBitmap(), PaletteIndex::integer()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% create(This::wxMask(), Bitmap::wxBitmap:wxBitmap(), Colour::wx:colour()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% create(This, Bitmap, Colour) -> boolean() when<br />
+%% This::wxMask(), Bitmap::wxBitmap:wxBitmap(), Colour::wx:wx_colour().<br />
+%%
+-spec create(This, Bitmap, PaletteIndex) -> boolean() when
+ This::wxMask(), Bitmap::wxBitmap:wxBitmap(), PaletteIndex::integer();
+ (This, Bitmap, Colour) -> boolean() when
+ This::wxMask(), Bitmap::wxBitmap:wxBitmap(), Colour::wx:wx_colour().
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef},PaletteIndex)
when is_integer(PaletteIndex) ->
?CLASS(ThisT,wxMask),
@@ -95,8 +99,8 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef},Colou
wxe_util:call(?wxMask_Create_2_1,
<<ThisRef:32/?UI,BitmapRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxMask()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMask()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMask),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMaximizeEvent.erl b/lib/wx/src/gen/wxMaximizeEvent.erl
index 6dd371908b..5f7b7e890d 100644
--- a/lib/wx/src/gen/wxMaximizeEvent.erl
+++ b/lib/wx/src/gen/wxMaximizeEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,10 +37,12 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxMaximizeEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxMaximizeEvent() :: wx:wx_object().
%% From wxEvent
%% @hidden
stopPropagation(This) -> wxEvent:stopPropagation(This).
diff --git a/lib/wx/src/gen/wxMemoryDC.erl b/lib/wx/src/gen/wxMemoryDC.erl
index d17ebba4b7..cac20094a0 100644
--- a/lib/wx/src/gen/wxMemoryDC.erl
+++ b/lib/wx/src/gen/wxMemoryDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,10 +38,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -52,18 +52,21 @@
setPen/2,setTextBackground/2,setTextForeground/2,setUserScale/3,startDoc/2,
startPage/1]).
+-export_type([wxMemoryDC/0]).
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMemoryDC()
+-type wxMemoryDC() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmemorydc.html#wxmemorydcwxmemorydc">external documentation</a>.
+-spec new() -> wxMemoryDC().
new() ->
wxe_util:construct(?wxMemoryDC_new_0,
<<>>).
-%% @spec (Dc::wxDC:wxDC() | wxBitmap:wxBitmap()) -> wxMemoryDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmemorydc.html#wxmemorydcwxmemorydc">external documentation</a>.
+-spec new(Dc) -> wxMemoryDC() when
+ Dc::wxDC:wxDC() | wxBitmap:wxBitmap().
new(#wx_ref{type=DcT,ref=DcRef}) ->
DcOP = case ?CLASS_T(DcT,wxDC) of
true ->
@@ -74,24 +77,26 @@ new(#wx_ref{type=DcT,ref=DcRef}) ->
wxe_util:construct(DcOP,
<<DcRef:32/?UI>>).
-%% @spec (This::wxMemoryDC(), Bmp::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmemorydc.html#wxmemorydcselectobject">external documentation</a>.
+-spec selectObject(This, Bmp) -> ok when
+ This::wxMemoryDC(), Bmp::wxBitmap:wxBitmap().
selectObject(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef}) ->
?CLASS(ThisT,wxMemoryDC),
?CLASS(BmpT,wxBitmap),
wxe_util:cast(?wxMemoryDC_SelectObject,
<<ThisRef:32/?UI,BmpRef:32/?UI>>).
-%% @spec (This::wxMemoryDC(), Bmp::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmemorydc.html#wxmemorydcselectobjectassource">external documentation</a>.
+-spec selectObjectAsSource(This, Bmp) -> ok when
+ This::wxMemoryDC(), Bmp::wxBitmap:wxBitmap().
selectObjectAsSource(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef}) ->
?CLASS(ThisT,wxMemoryDC),
?CLASS(BmpT,wxBitmap),
wxe_util:cast(?wxMemoryDC_SelectObjectAsSource,
<<ThisRef:32/?UI,BmpRef:32/?UI>>).
-%% @spec (This::wxMemoryDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMemoryDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMemoryDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -178,11 +183,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -196,7 +201,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxMenu.erl b/lib/wx/src/gen/wxMenu.erl
index 615a845d11..d91863de82 100644
--- a/lib/wx/src/gen/wxMenu.erl
+++ b/lib/wx/src/gen/wxMenu.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,18 +40,21 @@
%% inherited exports
-export([connect/2,connect/3,disconnect/1,disconnect/2,disconnect/3,parent_class/1]).
+-export_type([wxMenu/0]).
%% @hidden
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMenu()
+-type wxMenu() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxMenu().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxMenu()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuwxmenu">external documentation</a>.
+-spec new([Option]) -> wxMenu() when
+ Option :: {style, integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc];
@@ -60,9 +63,10 @@ new(Options)
wxe_util:construct(?wxMenu_new_1,
<<BinOpt/binary>>).
-%% @spec (Title::string(), [Option]) -> wxMenu()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuwxmenu">external documentation</a>.
+-spec new(Title, [Option]) -> wxMenu() when
+ Title::unicode:chardata(),
+ Option :: {style, integer()}.
new(Title, Options)
when is_list(Title),is_list(Options) ->
Title_UC = unicode:characters_to_binary([Title,0]),
@@ -72,31 +76,37 @@ new(Title, Options)
wxe_util:construct(?wxMenu_new_2,
<<(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuappend">external documentation</a>.
+-spec append(This, Item) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Item::wxMenuItem:wxMenuItem().
append(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
?CLASS(ThisT,wxMenu),
?CLASS(ItemT,wxMenuItem),
wxe_util:call(?wxMenu_Append_1,
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem()
%% @equiv append(This,Itemid,Text, [])
+-spec append(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata().
+
append(This,Itemid,Text)
when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) ->
append(This,Itemid,Text, []).
-%% @spec (This::wxMenu(),Itemid::integer(),Text::string(),X::wxMenu()|term()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuappend">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% append(This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu()) -> append(This,Itemid,Text,Submenu, []) </c></p>
-%% <p><c>
-%% append(This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem() </c>
-%%<br /> Option = {help, string()} | {kind, WxItemKind}
-%%<br /> WxItemKind = integer()
-%%<br /> WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-%% </p>
+%% <br /> Also:<br />
+%% append(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when<br />
+%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),<br />
+%% Option :: {help, unicode:chardata()}<br />
+%% | {kind, wx:wx_enum()}.<br />
+%%
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec append(This, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu();
+ (This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
+ Option :: {help, unicode:chardata()}
+ | {kind, wx:wx_enum()}.
append(This,Itemid,Text,Submenu)
when is_record(This, wx_ref),is_integer(Itemid),is_list(Text),is_record(Submenu, wx_ref) ->
@@ -112,16 +122,17 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
wxe_util:call(?wxMenu_Append_3,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMenu(),Itemid::integer(),Text::string(),X::string()|wxMenu(),X::bool()|term()) -> ok|wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuappend">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% append(This::wxMenu(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::bool()) -> ok </c>
-%% </p>
-%% <p><c>
-%% append(This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu(), [Option]) -> wxMenuItem:wxMenuItem() </c>
-%%<br /> Option = {help, string()}
-%% </p>
+%% <br /> Also:<br />
+%% append(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br />
+%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br />
+%% Option :: {help, unicode:chardata()}.<br />
+%%
+-spec append(This, Itemid, Text, Help, IsCheckable) -> ok when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean();
+ (This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
+ Option :: {help, unicode:chardata()}.
append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,Help,IsCheckable)
when is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) ->
?CLASS(ThisT,wxMenu),
@@ -140,15 +151,18 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,#wx_ref{type=SubmenuT,ref=Sub
wxe_util:call(?wxMenu_Append_4_1,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,SubmenuRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem()
%% @equiv appendCheckItem(This,Itemid,Text, [])
+-spec appendCheckItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata().
+
appendCheckItem(This,Itemid,Text)
when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) ->
appendCheckItem(This,Itemid,Text, []).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem()
-%% Option = {help, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuappendcheckitem">external documentation</a>.
+-spec appendCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
+ Option :: {help, unicode:chardata()}.
appendCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
when is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -159,15 +173,18 @@ appendCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
wxe_util:call(?wxMenu_AppendCheckItem,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem()
%% @equiv appendRadioItem(This,Itemid,Text, [])
+-spec appendRadioItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata().
+
appendRadioItem(This,Itemid,Text)
when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) ->
appendRadioItem(This,Itemid,Text, []).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem()
-%% Option = {help, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuappendradioitem">external documentation</a>.
+-spec appendRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
+ Option :: {help, unicode:chardata()}.
appendRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
when is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -178,37 +195,40 @@ appendRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
wxe_util:call(?wxMenu_AppendRadioItem,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMenu()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuappendseparator">external documentation</a>.
+-spec appendSeparator(This) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu().
appendSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_AppendSeparator,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenu()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenubreak">external documentation</a>.
+-spec break(This) -> ok when
+ This::wxMenu().
break(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenu),
wxe_util:cast(?wxMenu_Break,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Check::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenucheck">external documentation</a>.
+-spec check(This, Itemid, Check) -> ok when
+ This::wxMenu(), Itemid::integer(), Check::boolean().
check(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Check)
when is_integer(Itemid),is_boolean(Check) ->
?CLASS(ThisT,wxMenu),
wxe_util:cast(?wxMenu_Check,
<<ThisRef:32/?UI,Itemid:32/?UI,(wxe_util:from_bool(Check)):32/?UI>>).
-%% @spec (This::wxMenu(),X::integer()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenudelete">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% delete(This::wxMenu(), Itemid::integer()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% delete(This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% delete(This, Item) -> boolean() when<br />
+%% This::wxMenu(), Item::wxMenuItem:wxMenuItem().<br />
+%%
+-spec delete(This, Itemid) -> boolean() when
+ This::wxMenu(), Itemid::integer();
+ (This, Item) -> boolean() when
+ This::wxMenu(), Item::wxMenuItem:wxMenuItem().
delete(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenu),
@@ -220,15 +240,15 @@ delete(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
wxe_util:call(?wxMenu_Delete_1_1,
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxMenu(),X::integer()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenudestroy">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% 'Destroy'(This::wxMenu(), Itemid::integer()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% 'Destroy'(This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% 'Destroy'(This, Item) -> boolean() when<br />
+%% This::wxMenu(), Item::wxMenuItem:wxMenuItem().<br />
+%%
+-spec 'Destroy'(This, Itemid) -> boolean() when
+ This::wxMenu(), Itemid::integer();
+ (This, Item) -> boolean() when
+ This::wxMenu(), Item::wxMenuItem:wxMenuItem().
'Destroy'(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenu),
@@ -240,23 +260,24 @@ delete(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
wxe_util:call(?wxMenu_Destroy_1_1,
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Enable::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuenable">external documentation</a>.
+-spec enable(This, Itemid, Enable) -> ok when
+ This::wxMenu(), Itemid::integer(), Enable::boolean().
enable(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Enable)
when is_integer(Itemid),is_boolean(Enable) ->
?CLASS(ThisT,wxMenu),
wxe_util:cast(?wxMenu_Enable,
<<ThisRef:32/?UI,Itemid:32/?UI,(wxe_util:from_bool(Enable)):32/?UI>>).
-%% @spec (This::wxMenu(),X::integer()|string()) -> wxMenuItem:wxMenuItem()|integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenufinditem">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% findItem(This::wxMenu(), Itemid::integer()) -> wxMenuItem:wxMenuItem() </c>
-%% </p>
-%% <p><c>
-%% findItem(This::wxMenu(), Item::string()) -> integer() </c>
-%% </p>
+%% <br /> Also:<br />
+%% findItem(This, Item) -> integer() when<br />
+%% This::wxMenu(), Item::unicode:chardata().<br />
+%%
+-spec findItem(This, Itemid) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer();
+ (This, Item) -> integer() when
+ This::wxMenu(), Item::unicode:chardata().
findItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenu),
@@ -269,59 +290,67 @@ findItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
wxe_util:call(?wxMenu_FindItem_1,
<<ThisRef:32/?UI,(byte_size(Item_UC)):32/?UI,(Item_UC)/binary, 0:(((8- ((0+byte_size(Item_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenu(), Position::integer()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenufinditembyposition">external documentation</a>.
+-spec findItemByPosition(This, Position) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Position::integer().
findItemByPosition(#wx_ref{type=ThisT,ref=ThisRef},Position)
when is_integer(Position) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_FindItemByPosition,
<<ThisRef:32/?UI,Position:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenugethelpstring">external documentation</a>.
+-spec getHelpString(This, Itemid) -> unicode:charlist() when
+ This::wxMenu(), Itemid::integer().
getHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_GetHelpString,
<<ThisRef:32/?UI,Itemid:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenugetlabel">external documentation</a>.
+-spec getLabel(This, Itemid) -> unicode:charlist() when
+ This::wxMenu(), Itemid::integer().
getLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_GetLabel,
<<ThisRef:32/?UI,Itemid:32/?UI>>).
-%% @spec (This::wxMenu()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenugetmenuitemcount">external documentation</a>.
+-spec getMenuItemCount(This) -> integer() when
+ This::wxMenu().
getMenuItemCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_GetMenuItemCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenu()) -> [wxMenuItem:wxMenuItem()]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenugetmenuitems">external documentation</a>.
+-spec getMenuItems(This) -> [wxMenuItem:wxMenuItem()] when
+ This::wxMenu().
getMenuItems(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_GetMenuItems,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenu()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenugettitle">external documentation</a>.
+-spec getTitle(This) -> unicode:charlist() when
+ This::wxMenu().
getTitle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_GetTitle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenu(),Pos::integer(),X::integer()|term()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuinsert">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% insert(This::wxMenu(), Pos::integer(), Itemid::integer()) -> insert(This,Pos,Itemid, []) </c></p>
-%% <p><c>
-%% insert(This::wxMenu(), Pos::integer(), Item::wxMenuItem:wxMenuItem()) -> wxMenuItem:wxMenuItem() </c>
-%% </p>
+%% <br /> Also:<br />
+%% insert(This, Pos, Item) -> wxMenuItem:wxMenuItem() when<br />
+%% This::wxMenu(), Pos::integer(), Item::wxMenuItem:wxMenuItem().<br />
+%%
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec insert(This, Pos, Itemid) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Itemid::integer();
+ (This, Pos, Item) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Item::wxMenuItem:wxMenuItem().
insert(This,Pos,Itemid)
when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid) ->
@@ -333,11 +362,13 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ItemT,ref=ItemRef})
wxe_util:call(?wxMenu_Insert_2,
<<ThisRef:32/?UI,Pos:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), [Option]) -> wxMenuItem:wxMenuItem()
-%% Option = {text, string()} | {help, string()} | {kind, WxItemKind}
-%% WxItemKind = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuinsert">external documentation</a>.
-%%<br /> WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec insert(This, Pos, Itemid, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Itemid::integer(),
+ Option :: {text, unicode:chardata()}
+ | {help, unicode:chardata()}
+ | {kind, wx:wx_enum()}.
insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid, Options)
when is_integer(Pos),is_integer(Itemid),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -349,22 +380,25 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid, Options)
wxe_util:call(?wxMenu_Insert_3,
<<ThisRef:32/?UI,Pos:32/?UI,Itemid:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), Submenu::wxMenu()) -> wxMenuItem:wxMenuItem()
%% @equiv insert(This,Pos,Itemid,Text,Submenu, [])
+-spec insert(This, Pos, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu().
+
insert(This,Pos,Itemid,Text,Submenu)
when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),is_list(Text),is_record(Submenu, wx_ref) ->
insert(This,Pos,Itemid,Text,Submenu, []).
-%% @spec (This::wxMenu(),Pos::integer(),Itemid::integer(),Text::string(),X::string()|wxMenu(),X::bool()|term()) -> ok|wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuinsert">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% insert(This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::bool()) -> ok </c>
-%% </p>
-%% <p><c>
-%% insert(This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), Submenu::wxMenu(), [Option]) -> wxMenuItem:wxMenuItem() </c>
-%%<br /> Option = {help, string()}
-%% </p>
+%% <br /> Also:<br />
+%% insert(This, Pos, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br />
+%% This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br />
+%% Option :: {help, unicode:chardata()}.<br />
+%%
+-spec insert(This, Pos, Itemid, Text, Help, IsCheckable) -> ok when
+ This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean();
+ (This, Pos, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
+ Option :: {help, unicode:chardata()}.
insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text,Help,IsCheckable)
when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) ->
?CLASS(ThisT,wxMenu),
@@ -383,15 +417,18 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text,#wx_ref{type=SubmenuT,ref
wxe_util:call(?wxMenu_Insert_5_1,
<<ThisRef:32/?UI,Pos:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,SubmenuRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem()
%% @equiv insertCheckItem(This,Pos,Itemid,Text, [])
+-spec insertCheckItem(This, Pos, Itemid, Text) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata().
+
insertCheckItem(This,Pos,Itemid,Text)
when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),is_list(Text) ->
insertCheckItem(This,Pos,Itemid,Text, []).
-%% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem()
-%% Option = {help, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuinsertcheckitem">external documentation</a>.
+-spec insertCheckItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(),
+ Option :: {help, unicode:chardata()}.
insertCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options)
when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -402,15 +439,18 @@ insertCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options)
wxe_util:call(?wxMenu_InsertCheckItem,
<<ThisRef:32/?UI,Pos:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem()
%% @equiv insertRadioItem(This,Pos,Itemid,Text, [])
+-spec insertRadioItem(This, Pos, Itemid, Text) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata().
+
insertRadioItem(This,Pos,Itemid,Text)
when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),is_list(Text) ->
insertRadioItem(This,Pos,Itemid,Text, []).
-%% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem()
-%% Option = {help, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuinsertradioitem">external documentation</a>.
+-spec insertRadioItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(),
+ Option :: {help, unicode:chardata()}.
insertRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options)
when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -421,38 +461,43 @@ insertRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options)
wxe_util:call(?wxMenu_InsertRadioItem,
<<ThisRef:32/?UI,Pos:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMenu(), Pos::integer()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuinsertseparator">external documentation</a>.
+-spec insertSeparator(This, Pos) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Pos::integer().
insertSeparator(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_InsertSeparator,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuischecked">external documentation</a>.
+-spec isChecked(This, Itemid) -> boolean() when
+ This::wxMenu(), Itemid::integer().
isChecked(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_IsChecked,
<<ThisRef:32/?UI,Itemid:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuisenabled">external documentation</a>.
+-spec isEnabled(This, Itemid) -> boolean() when
+ This::wxMenu(), Itemid::integer().
isEnabled(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_IsEnabled,
<<ThisRef:32/?UI,Itemid:32/?UI>>).
-%% @spec (This::wxMenu(),X::integer()|term()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuprepend">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% prepend(This::wxMenu(), Itemid::integer()) -> prepend(This,Itemid, []) </c></p>
-%% <p><c>
-%% prepend(This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> wxMenuItem:wxMenuItem() </c>
-%% </p>
+%% <br /> Also:<br />
+%% prepend(This, Item) -> wxMenuItem:wxMenuItem() when<br />
+%% This::wxMenu(), Item::wxMenuItem:wxMenuItem().<br />
+%%
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec prepend(This, Itemid) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer();
+ (This, Item) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Item::wxMenuItem:wxMenuItem().
prepend(This,Itemid)
when is_record(This, wx_ref),is_integer(Itemid) ->
@@ -463,11 +508,13 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
wxe_util:call(?wxMenu_Prepend_1,
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer(), [Option]) -> wxMenuItem:wxMenuItem()
-%% Option = {text, string()} | {help, string()} | {kind, WxItemKind}
-%% WxItemKind = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuprepend">external documentation</a>.
-%%<br /> WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec prepend(This, Itemid, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(),
+ Option :: {text, unicode:chardata()}
+ | {help, unicode:chardata()}
+ | {kind, wx:wx_enum()}.
prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid, Options)
when is_integer(Itemid),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -479,22 +526,25 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid, Options)
wxe_util:call(?wxMenu_Prepend_2,
<<ThisRef:32/?UI,Itemid:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu()) -> wxMenuItem:wxMenuItem()
%% @equiv prepend(This,Itemid,Text,Submenu, [])
+-spec prepend(This, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu().
+
prepend(This,Itemid,Text,Submenu)
when is_record(This, wx_ref),is_integer(Itemid),is_list(Text),is_record(Submenu, wx_ref) ->
prepend(This,Itemid,Text,Submenu, []).
-%% @spec (This::wxMenu(),Itemid::integer(),Text::string(),X::string()|wxMenu(),X::bool()|term()) -> ok|wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuprepend">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% prepend(This::wxMenu(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::bool()) -> ok </c>
-%% </p>
-%% <p><c>
-%% prepend(This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu(), [Option]) -> wxMenuItem:wxMenuItem() </c>
-%%<br /> Option = {help, string()}
-%% </p>
+%% <br /> Also:<br />
+%% prepend(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br />
+%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br />
+%% Option :: {help, unicode:chardata()}.<br />
+%%
+-spec prepend(This, Itemid, Text, Help, IsCheckable) -> ok when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean();
+ (This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
+ Option :: {help, unicode:chardata()}.
prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,Help,IsCheckable)
when is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) ->
?CLASS(ThisT,wxMenu),
@@ -513,15 +563,18 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,#wx_ref{type=SubmenuT,ref=Su
wxe_util:call(?wxMenu_Prepend_4_1,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,SubmenuRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem()
%% @equiv prependCheckItem(This,Itemid,Text, [])
+-spec prependCheckItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata().
+
prependCheckItem(This,Itemid,Text)
when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) ->
prependCheckItem(This,Itemid,Text, []).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem()
-%% Option = {help, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuprependcheckitem">external documentation</a>.
+-spec prependCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
+ Option :: {help, unicode:chardata()}.
prependCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
when is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -532,15 +585,18 @@ prependCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
wxe_util:call(?wxMenu_PrependCheckItem,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem()
%% @equiv prependRadioItem(This,Itemid,Text, [])
+-spec prependRadioItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata().
+
prependRadioItem(This,Itemid,Text)
when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) ->
prependRadioItem(This,Itemid,Text, []).
-%% @spec (This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem()
-%% Option = {help, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuprependradioitem">external documentation</a>.
+-spec prependRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
+ Option :: {help, unicode:chardata()}.
prependRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
when is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -551,22 +607,23 @@ prependRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
wxe_util:call(?wxMenu_PrependRadioItem,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMenu()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuprependseparator">external documentation</a>.
+-spec prependSeparator(This) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu().
prependSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenu),
wxe_util:call(?wxMenu_PrependSeparator,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenu(),X::integer()|term()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenuremove">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% remove(This::wxMenu(), Itemid::integer()) -> wxMenuItem:wxMenuItem() </c>
-%% </p>
-%% <p><c>
-%% remove(This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> wxMenuItem:wxMenuItem() </c>
-%% </p>
+%% <br /> Also:<br />
+%% remove(This, Item) -> wxMenuItem:wxMenuItem() when<br />
+%% This::wxMenu(), Item::wxMenuItem:wxMenuItem().<br />
+%%
+-spec remove(This, Itemid) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Itemid::integer();
+ (This, Item) -> wxMenuItem:wxMenuItem() when
+ This::wxMenu(), Item::wxMenuItem:wxMenuItem().
remove(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenu),
@@ -578,8 +635,9 @@ remove(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
wxe_util:call(?wxMenu_Remove_1_1,
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxMenu(), Itemid::integer(), HelpString::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenusethelpstring">external documentation</a>.
+-spec setHelpString(This, Itemid, HelpString) -> ok when
+ This::wxMenu(), Itemid::integer(), HelpString::unicode:chardata().
setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString)
when is_integer(Itemid),is_list(HelpString) ->
?CLASS(ThisT,wxMenu),
@@ -587,8 +645,9 @@ setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString)
wxe_util:cast(?wxMenu_SetHelpString,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenu(), Itemid::integer(), Label::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenusetlabel">external documentation</a>.
+-spec setLabel(This, Itemid, Label) -> ok when
+ This::wxMenu(), Itemid::integer(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label)
when is_integer(Itemid),is_list(Label) ->
?CLASS(ThisT,wxMenu),
@@ -596,8 +655,9 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label)
wxe_util:cast(?wxMenu_SetLabel,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenu(), Title::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenu.html#wxmenusettitle">external documentation</a>.
+-spec setTitle(This, Title) -> ok when
+ This::wxMenu(), Title::unicode:chardata().
setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title)
when is_list(Title) ->
?CLASS(ThisT,wxMenu),
@@ -605,8 +665,8 @@ setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title)
wxe_util:cast(?wxMenu_SetTitle,
<<ThisRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenu()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMenu()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMenu),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMenuBar.erl b/lib/wx/src/gen/wxMenuBar.erl
index 4ed1b2cbe6..b0253292bd 100644
--- a/lib/wx/src/gen/wxMenuBar.erl
+++ b/lib/wx/src/gen/wxMenuBar.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,26 +72,30 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxMenuBar/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMenuBar()
+-type wxMenuBar() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarwxmenubar">external documentation</a>.
+-spec new() -> wxMenuBar().
new() ->
wxe_util:construct(?wxMenuBar_new_0,
<<>>).
-%% @spec (Style::integer()) -> wxMenuBar()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarwxmenubar">external documentation</a>.
+-spec new(Style) -> wxMenuBar() when
+ Style::integer().
new(Style)
when is_integer(Style) ->
wxe_util:construct(?wxMenuBar_new_1,
<<Style:32/?UI>>).
-%% @spec (This::wxMenuBar(), Menu::wxMenu:wxMenu(), Title::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarappend">external documentation</a>.
+-spec append(This, Menu, Title) -> boolean() when
+ This::wxMenuBar(), Menu::wxMenu:wxMenu(), Title::unicode:chardata().
append(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef},Title)
when is_list(Title) ->
?CLASS(ThisT,wxMenuBar),
@@ -100,23 +104,27 @@ append(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef},Title)
wxe_util:call(?wxMenuBar_Append,
<<ThisRef:32/?UI,MenuRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar(), Itemid::integer(), Check::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarcheck">external documentation</a>.
+-spec check(This, Itemid, Check) -> ok when
+ This::wxMenuBar(), Itemid::integer(), Check::boolean().
check(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Check)
when is_integer(Itemid),is_boolean(Check) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:cast(?wxMenuBar_Check,
<<ThisRef:32/?UI,Itemid:32/?UI,(wxe_util:from_bool(Check)):32/?UI>>).
-%% @spec (This::wxMenuBar()) -> bool()
%% @equiv enable(This, [])
+-spec enable(This) -> boolean() when
+ This::wxMenuBar().
+
enable(This)
when is_record(This, wx_ref) ->
enable(This, []).
-%% @spec (This::wxMenuBar(), [Option]) -> bool()
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarenable">external documentation</a>.
+-spec enable(This, [Option]) -> boolean() when
+ This::wxMenuBar(),
+ Option :: {enable, boolean()}.
enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMenuBar),
@@ -126,24 +134,27 @@ enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxMenuBar_Enable_1,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMenuBar(), Itemid::integer(), Enable::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarenable">external documentation</a>.
+-spec enable(This, Itemid, Enable) -> ok when
+ This::wxMenuBar(), Itemid::integer(), Enable::boolean().
enable(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Enable)
when is_integer(Itemid),is_boolean(Enable) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:cast(?wxMenuBar_Enable_2,
<<ThisRef:32/?UI,Itemid:32/?UI,(wxe_util:from_bool(Enable)):32/?UI>>).
-%% @spec (This::wxMenuBar(), Pos::integer(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarenabletop">external documentation</a>.
+-spec enableTop(This, Pos, Flag) -> ok when
+ This::wxMenuBar(), Pos::integer(), Flag::boolean().
enableTop(#wx_ref{type=ThisT,ref=ThisRef},Pos,Flag)
when is_integer(Pos),is_boolean(Flag) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:cast(?wxMenuBar_EnableTop,
<<ThisRef:32/?UI,Pos:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxMenuBar(), Title::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarfindmenu">external documentation</a>.
+-spec findMenu(This, Title) -> integer() when
+ This::wxMenuBar(), Title::unicode:chardata().
findMenu(#wx_ref{type=ThisT,ref=ThisRef},Title)
when is_list(Title) ->
?CLASS(ThisT,wxMenuBar),
@@ -151,8 +162,9 @@ findMenu(#wx_ref{type=ThisT,ref=ThisRef},Title)
wxe_util:call(?wxMenuBar_FindMenu,
<<ThisRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar(), MenuString::string(), ItemString::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarfindmenuitem">external documentation</a>.
+-spec findMenuItem(This, MenuString, ItemString) -> integer() when
+ This::wxMenuBar(), MenuString::unicode:chardata(), ItemString::unicode:chardata().
findMenuItem(#wx_ref{type=ThisT,ref=ThisRef},MenuString,ItemString)
when is_list(MenuString),is_list(ItemString) ->
?CLASS(ThisT,wxMenuBar),
@@ -161,62 +173,70 @@ findMenuItem(#wx_ref{type=ThisT,ref=ThisRef},MenuString,ItemString)
wxe_util:call(?wxMenuBar_FindMenuItem,
<<ThisRef:32/?UI,(byte_size(MenuString_UC)):32/?UI,(MenuString_UC)/binary, 0:(((8- ((0+byte_size(MenuString_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(ItemString_UC)):32/?UI,(ItemString_UC)/binary, 0:(((8- ((4+byte_size(ItemString_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar(), Id::integer()) -> wxMenuItem:wxMenuItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarfinditem">external documentation</a>.
+-spec findItem(This, Id) -> wxMenuItem:wxMenuItem() when
+ This::wxMenuBar(), Id::integer().
findItem(#wx_ref{type=ThisT,ref=ThisRef},Id)
when is_integer(Id) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_FindItem,
<<ThisRef:32/?UI,Id:32/?UI>>).
-%% @spec (This::wxMenuBar(), Itemid::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubargethelpstring">external documentation</a>.
+-spec getHelpString(This, Itemid) -> unicode:charlist() when
+ This::wxMenuBar(), Itemid::integer().
getHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_GetHelpString,
<<ThisRef:32/?UI,Itemid:32/?UI>>).
-%% @spec (This::wxMenuBar()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubargetlabel">external documentation</a>.
+-spec getLabel(This) -> unicode:charlist() when
+ This::wxMenuBar().
getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_GetLabel_0,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuBar(), Itemid::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubargetlabel">external documentation</a>.
+-spec getLabel(This, Itemid) -> unicode:charlist() when
+ This::wxMenuBar(), Itemid::integer().
getLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_GetLabel_1,
<<ThisRef:32/?UI,Itemid:32/?UI>>).
-%% @spec (This::wxMenuBar(), Pos::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubargetlabeltop">external documentation</a>.
+-spec getLabelTop(This, Pos) -> unicode:charlist() when
+ This::wxMenuBar(), Pos::integer().
getLabelTop(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_GetLabelTop,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxMenuBar(), Pos::integer()) -> wxMenu:wxMenu()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubargetmenu">external documentation</a>.
+-spec getMenu(This, Pos) -> wxMenu:wxMenu() when
+ This::wxMenuBar(), Pos::integer().
getMenu(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_GetMenu,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxMenuBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubargetmenucount">external documentation</a>.
+-spec getMenuCount(This) -> integer() when
+ This::wxMenuBar().
getMenuCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_GetMenuCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuBar(), Pos::integer(), Menu::wxMenu:wxMenu(), Title::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarinsert">external documentation</a>.
+-spec insert(This, Pos, Menu, Title) -> boolean() when
+ This::wxMenuBar(), Pos::integer(), Menu::wxMenu:wxMenu(), Title::unicode:chardata().
insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=MenuT,ref=MenuRef},Title)
when is_integer(Pos),is_list(Title) ->
?CLASS(ThisT,wxMenuBar),
@@ -225,39 +245,44 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=MenuT,ref=MenuRef},Title
wxe_util:call(?wxMenuBar_Insert,
<<ThisRef:32/?UI,Pos:32/?UI,MenuRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar(), Itemid::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarischecked">external documentation</a>.
+-spec isChecked(This, Itemid) -> boolean() when
+ This::wxMenuBar(), Itemid::integer().
isChecked(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_IsChecked,
<<ThisRef:32/?UI,Itemid:32/?UI>>).
-%% @spec (This::wxMenuBar()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarisenabled">external documentation</a>.
+-spec isEnabled(This) -> boolean() when
+ This::wxMenuBar().
isEnabled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_IsEnabled_0,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuBar(), Itemid::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarisenabled">external documentation</a>.
+-spec isEnabled(This, Itemid) -> boolean() when
+ This::wxMenuBar(), Itemid::integer().
isEnabled(#wx_ref{type=ThisT,ref=ThisRef},Itemid)
when is_integer(Itemid) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_IsEnabled_1,
<<ThisRef:32/?UI,Itemid:32/?UI>>).
-%% @spec (This::wxMenuBar(), Pos::integer()) -> wxMenu:wxMenu()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarremove">external documentation</a>.
+-spec remove(This, Pos) -> wxMenu:wxMenu() when
+ This::wxMenuBar(), Pos::integer().
remove(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxMenuBar),
wxe_util:call(?wxMenuBar_Remove,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxMenuBar(), Pos::integer(), Menu::wxMenu:wxMenu(), Title::string()) -> wxMenu:wxMenu()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarreplace">external documentation</a>.
+-spec replace(This, Pos, Menu, Title) -> wxMenu:wxMenu() when
+ This::wxMenuBar(), Pos::integer(), Menu::wxMenu:wxMenu(), Title::unicode:chardata().
replace(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=MenuT,ref=MenuRef},Title)
when is_integer(Pos),is_list(Title) ->
?CLASS(ThisT,wxMenuBar),
@@ -266,8 +291,9 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=MenuT,ref=MenuRef},Titl
wxe_util:call(?wxMenuBar_Replace,
<<ThisRef:32/?UI,Pos:32/?UI,MenuRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar(), Itemid::integer(), HelpString::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarsethelpstring">external documentation</a>.
+-spec setHelpString(This, Itemid, HelpString) -> ok when
+ This::wxMenuBar(), Itemid::integer(), HelpString::unicode:chardata().
setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString)
when is_integer(Itemid),is_list(HelpString) ->
?CLASS(ThisT,wxMenuBar),
@@ -275,8 +301,9 @@ setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString)
wxe_util:cast(?wxMenuBar_SetHelpString,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar(), S::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarsetlabel">external documentation</a>.
+-spec setLabel(This, S) -> ok when
+ This::wxMenuBar(), S::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_list(S) ->
?CLASS(ThisT,wxMenuBar),
@@ -284,8 +311,9 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},S)
wxe_util:cast(?wxMenuBar_SetLabel_1,
<<ThisRef:32/?UI,(byte_size(S_UC)):32/?UI,(S_UC)/binary, 0:(((8- ((0+byte_size(S_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar(), Itemid::integer(), Label::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarsetlabel">external documentation</a>.
+-spec setLabel(This, Itemid, Label) -> ok when
+ This::wxMenuBar(), Itemid::integer(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label)
when is_integer(Itemid),is_list(Label) ->
?CLASS(ThisT,wxMenuBar),
@@ -293,8 +321,9 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label)
wxe_util:cast(?wxMenuBar_SetLabel_2,
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar(), Pos::integer(), Label::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenubar.html#wxmenubarsetlabeltop">external documentation</a>.
+-spec setLabelTop(This, Pos, Label) -> ok when
+ This::wxMenuBar(), Pos::integer(), Label::unicode:chardata().
setLabelTop(#wx_ref{type=ThisT,ref=ThisRef},Pos,Label)
when is_integer(Pos),is_list(Label) ->
?CLASS(ThisT,wxMenuBar),
@@ -302,8 +331,8 @@ setLabelTop(#wx_ref{type=ThisT,ref=ThisRef},Pos,Label)
wxe_util:cast(?wxMenuBar_SetLabelTop,
<<ThisRef:32/?UI,Pos:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuBar()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMenuBar()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMenuBar),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMenuEvent.erl b/lib/wx/src/gen/wxMenuEvent.erl
index fe368e679a..84c4760aa6 100644
--- a/lib/wx/src/gen/wxMenuEvent.erl
+++ b/lib/wx/src/gen/wxMenuEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,26 +37,31 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxMenuEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxMenuEvent()) -> wxMenu:wxMenu()
+-type wxMenuEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuevent.html#wxmenueventgetmenu">external documentation</a>.
+-spec getMenu(This) -> wxMenu:wxMenu() when
+ This::wxMenuEvent().
getMenu(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuEvent),
wxe_util:call(?wxMenuEvent_GetMenu,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuevent.html#wxmenueventgetmenuid">external documentation</a>.
+-spec getMenuId(This) -> integer() when
+ This::wxMenuEvent().
getMenuId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuEvent),
wxe_util:call(?wxMenuEvent_GetMenuId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuevent.html#wxmenueventispopup">external documentation</a>.
+-spec isPopup(This) -> boolean() when
+ This::wxMenuEvent().
isPopup(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuEvent),
wxe_util:call(?wxMenuEvent_IsPopup,
diff --git a/lib/wx/src/gen/wxMenuItem.erl b/lib/wx/src/gen/wxMenuItem.erl
index e2bbe681c5..7ad71a2858 100644
--- a/lib/wx/src/gen/wxMenuItem.erl
+++ b/lib/wx/src/gen/wxMenuItem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,19 +32,26 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxMenuItem/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMenuItem()
+-type wxMenuItem() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxMenuItem().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxMenuItem()
-%% Option = {parentMenu, wxMenu:wxMenu()} | {id, integer()} | {text, string()} | {help, string()} | {kind, WxItemKind} | {subMenu, wxMenu:wxMenu()}
-%% WxItemKind = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemwxmenuitem">external documentation</a>.
-%%<br /> WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec new([Option]) -> wxMenuItem() when
+ Option :: {parentMenu, wxMenu:wxMenu()}
+ | {id, integer()}
+ | {text, unicode:chardata()}
+ | {help, unicode:chardata()}
+ | {kind, wx:wx_enum()}
+ | {subMenu, wxMenu:wxMenu()}.
new(Options)
when is_list(Options) ->
MOpts = fun({parentMenu, #wx_ref{type=ParentMenuT,ref=ParentMenuRef}}, Acc) -> ?CLASS(ParentMenuT,wxMenu),[<<1:32/?UI,ParentMenuRef:32/?UI>>|Acc];
@@ -58,15 +65,18 @@ new(Options)
wxe_util:construct(?wxMenuItem_new,
<<BinOpt/binary>>).
-%% @spec (This::wxMenuItem()) -> ok
%% @equiv check(This, [])
+-spec check(This) -> ok when
+ This::wxMenuItem().
+
check(This)
when is_record(This, wx_ref) ->
check(This, []).
-%% @spec (This::wxMenuItem(), [Option]) -> ok
-%% Option = {check, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemcheck">external documentation</a>.
+-spec check(This, [Option]) -> ok when
+ This::wxMenuItem(),
+ Option :: {check, boolean()}.
check(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMenuItem),
@@ -76,15 +86,18 @@ check(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxMenuItem_Check,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMenuItem()) -> ok
%% @equiv enable(This, [])
+-spec enable(This) -> ok when
+ This::wxMenuItem().
+
enable(This)
when is_record(This, wx_ref) ->
enable(This, []).
-%% @spec (This::wxMenuItem(), [Option]) -> ok
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemenable">external documentation</a>.
+-spec enable(This, [Option]) -> ok when
+ This::wxMenuItem(),
+ Option :: {enable, boolean()}.
enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMenuItem),
@@ -94,117 +107,132 @@ enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxMenuItem_Enable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMenuItem()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgetbitmap">external documentation</a>.
+-spec getBitmap(This) -> wxBitmap:wxBitmap() when
+ This::wxMenuItem().
getBitmap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_GetBitmap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgethelp">external documentation</a>.
+-spec getHelp(This) -> unicode:charlist() when
+ This::wxMenuItem().
getHelp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_GetHelp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgetid">external documentation</a>.
+-spec getId(This) -> integer() when
+ This::wxMenuItem().
getId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_GetId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> WxItemKind
-%% WxItemKind = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgetkind">external documentation</a>.
-%%<br /> WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+%%<br /> Res = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec getKind(This) -> wx:wx_enum() when
+ This::wxMenuItem().
getKind(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_GetKind,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgetlabel">external documentation</a>.
+-spec getLabel(This) -> unicode:charlist() when
+ This::wxMenuItem().
getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_GetLabel,
<<ThisRef:32/?UI>>).
-%% @spec (Text::string()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgetlabelfromtext">external documentation</a>.
+-spec getLabelFromText(Text) -> unicode:charlist() when
+ Text::unicode:chardata().
getLabelFromText(Text)
when is_list(Text) ->
Text_UC = unicode:characters_to_binary([Text,0]),
wxe_util:call(?wxMenuItem_GetLabelFromText,
<<(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuItem()) -> wxMenu:wxMenu()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgetmenu">external documentation</a>.
+-spec getMenu(This) -> wxMenu:wxMenu() when
+ This::wxMenuItem().
getMenu(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_GetMenu,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgettext">external documentation</a>.
+-spec getText(This) -> unicode:charlist() when
+ This::wxMenuItem().
getText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_GetText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> wxMenu:wxMenu()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemgetsubmenu">external documentation</a>.
+-spec getSubMenu(This) -> wxMenu:wxMenu() when
+ This::wxMenuItem().
getSubMenu(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_GetSubMenu,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemischeckable">external documentation</a>.
+-spec isCheckable(This) -> boolean() when
+ This::wxMenuItem().
isCheckable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_IsCheckable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemischecked">external documentation</a>.
+-spec isChecked(This) -> boolean() when
+ This::wxMenuItem().
isChecked(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_IsChecked,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemisenabled">external documentation</a>.
+-spec isEnabled(This) -> boolean() when
+ This::wxMenuItem().
isEnabled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_IsEnabled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemisseparator">external documentation</a>.
+-spec isSeparator(This) -> boolean() when
+ This::wxMenuItem().
isSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_IsSeparator,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemissubmenu">external documentation</a>.
+-spec isSubMenu(This) -> boolean() when
+ This::wxMenuItem().
isSubMenu(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenuItem),
wxe_util:call(?wxMenuItem_IsSubMenu,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMenuItem(), Bitmap::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemsetbitmap">external documentation</a>.
+-spec setBitmap(This, Bitmap) -> ok when
+ This::wxMenuItem(), Bitmap::wxBitmap:wxBitmap().
setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxMenuItem),
?CLASS(BitmapT,wxBitmap),
wxe_util:cast(?wxMenuItem_SetBitmap,
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
-%% @spec (This::wxMenuItem(), Str::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemsethelp">external documentation</a>.
+-spec setHelp(This, Str) -> ok when
+ This::wxMenuItem(), Str::unicode:chardata().
setHelp(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
?CLASS(ThisT,wxMenuItem),
@@ -212,24 +240,27 @@ setHelp(#wx_ref{type=ThisT,ref=ThisRef},Str)
wxe_util:cast(?wxMenuItem_SetHelp,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuItem(), Menu::wxMenu:wxMenu()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemsetmenu">external documentation</a>.
+-spec setMenu(This, Menu) -> ok when
+ This::wxMenuItem(), Menu::wxMenu:wxMenu().
setMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}) ->
?CLASS(ThisT,wxMenuItem),
?CLASS(MenuT,wxMenu),
wxe_util:cast(?wxMenuItem_SetMenu,
<<ThisRef:32/?UI,MenuRef:32/?UI>>).
-%% @spec (This::wxMenuItem(), Menu::wxMenu:wxMenu()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemsetsubmenu">external documentation</a>.
+-spec setSubMenu(This, Menu) -> ok when
+ This::wxMenuItem(), Menu::wxMenu:wxMenu().
setSubMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}) ->
?CLASS(ThisT,wxMenuItem),
?CLASS(MenuT,wxMenu),
wxe_util:cast(?wxMenuItem_SetSubMenu,
<<ThisRef:32/?UI,MenuRef:32/?UI>>).
-%% @spec (This::wxMenuItem(), Str::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmenuitem.html#wxmenuitemsettext">external documentation</a>.
+-spec setText(This, Str) -> ok when
+ This::wxMenuItem(), Str::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
?CLASS(ThisT,wxMenuItem),
@@ -237,8 +268,8 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Str)
wxe_util:cast(?wxMenuItem_SetText,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxMenuItem()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMenuItem()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMenuItem),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMessageDialog.erl b/lib/wx/src/gen/wxMessageDialog.erl
index d13bb7cb6e..83c3e67d01 100644
--- a/lib/wx/src/gen/wxMessageDialog.erl
+++ b/lib/wx/src/gen/wxMessageDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxMessageDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,15 +85,21 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string()) -> wxMessageDialog()
+-type wxMessageDialog() :: wx:wx_object().
%% @equiv new(Parent,Message, [])
+-spec new(Parent, Message) -> wxMessageDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata().
+
new(Parent,Message)
when is_record(Parent, wx_ref),is_list(Message) ->
new(Parent,Message, []).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string(), [Option]) -> wxMessageDialog()
-%% Option = {caption, string()} | {style, integer()} | {pos, {X::integer(), Y::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmessagedialog.html#wxmessagedialogwxmessagedialog">external documentation</a>.
+-spec new(Parent, Message, [Option]) -> wxMessageDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata(),
+ Option :: {caption, unicode:chardata()}
+ | {style, integer()}
+ | {pos, {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
when is_list(Message),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -105,8 +112,8 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
wxe_util:construct(?wxMessageDialog_new,
<<ParentRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMessageDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMessageDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMessageDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMiniFrame.erl b/lib/wx/src/gen/wxMiniFrame.erl
index 108ebcfb0e..3521c6458c 100644
--- a/lib/wx/src/gen/wxMiniFrame.erl
+++ b/lib/wx/src/gen/wxMiniFrame.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -80,6 +80,7 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxMiniFrame/0]).
%% @hidden
parent_class(wxFrame) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -87,21 +88,27 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMiniFrame()
+-type wxMiniFrame() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxminiframe.html#wxminiframewxminiframe">external documentation</a>.
+-spec new() -> wxMiniFrame().
new() ->
wxe_util:construct(?wxMiniFrame_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string()) -> wxMiniFrame()
%% @equiv new(Parent,Id,Title, [])
+-spec new(Parent, Id, Title) -> wxMiniFrame() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata().
+
new(Parent,Id,Title)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
new(Parent,Id,Title, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), [Option]) -> wxMiniFrame()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxminiframe.html#wxminiframewxminiframe">external documentation</a>.
+-spec new(Parent, Id, Title, [Option]) -> wxMiniFrame() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -114,15 +121,20 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
wxe_util:construct(?wxMiniFrame_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMiniFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string()) -> bool()
%% @equiv create(This,Parent,Id,Title, [])
+-spec create(This, Parent, Id, Title) -> boolean() when
+ This::wxMiniFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata().
+
create(This,Parent,Id,Title)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Title) ->
create(This,Parent,Id,Title, []).
-%% @spec (This::wxMiniFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxminiframe.html#wxminiframecreate">external documentation</a>.
+-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
+ This::wxMiniFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxMiniFrame),
@@ -136,8 +148,8 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ti
wxe_util:call(?wxMiniFrame_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMiniFrame()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMiniFrame()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMiniFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMirrorDC.erl b/lib/wx/src/gen/wxMirrorDC.erl
index c218bd7e72..1fdb90e4eb 100644
--- a/lib/wx/src/gen/wxMirrorDC.erl
+++ b/lib/wx/src/gen/wxMirrorDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,10 +38,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -52,20 +52,23 @@
setPen/2,setTextBackground/2,setTextForeground/2,setUserScale/3,startDoc/2,
startPage/1]).
+-export_type([wxMirrorDC/0]).
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Dc::wxDC:wxDC(), Mirror::bool()) -> wxMirrorDC()
+-type wxMirrorDC() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmirrordc.html#wxmirrordcwxmirrordc">external documentation</a>.
+-spec new(Dc, Mirror) -> wxMirrorDC() when
+ Dc::wxDC:wxDC(), Mirror::boolean().
new(#wx_ref{type=DcT,ref=DcRef},Mirror)
when is_boolean(Mirror) ->
?CLASS(DcT,wxDC),
wxe_util:construct(?wxMirrorDC_new,
<<DcRef:32/?UI,(wxe_util:from_bool(Mirror)):32/?UI>>).
-%% @spec (This::wxMirrorDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMirrorDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMirrorDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -152,11 +155,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -170,7 +173,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxMouseCaptureChangedEvent.erl b/lib/wx/src/gen/wxMouseCaptureChangedEvent.erl
index cb921bf2df..659582b611 100644
--- a/lib/wx/src/gen/wxMouseCaptureChangedEvent.erl
+++ b/lib/wx/src/gen/wxMouseCaptureChangedEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,12 +37,15 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxMouseCaptureChangedEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxMouseCaptureChangedEvent()) -> wxWindow:wxWindow()
+-type wxMouseCaptureChangedEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmousecapturechangedevent.html#wxmousecapturechangedeventgetcapturedwindow">external documentation</a>.
+-spec getCapturedWindow(This) -> wxWindow:wxWindow() when
+ This::wxMouseCaptureChangedEvent().
getCapturedWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseCaptureChangedEvent),
wxe_util:call(?wxMouseCaptureChangedEvent_GetCapturedWindow,
diff --git a/lib/wx/src/gen/wxMouseEvent.erl b/lib/wx/src/gen/wxMouseEvent.erl
index a91d2a2e99..97ea9e908f 100644
--- a/lib/wx/src/gen/wxMouseEvent.erl
+++ b/lib/wx/src/gen/wxMouseEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -43,34 +43,41 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxMouseEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxMouseEvent()) -> bool()
+-type wxMouseEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventaltdown">external documentation</a>.
+-spec altDown(This) -> boolean() when
+ This::wxMouseEvent().
altDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_AltDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent(), But::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventbutton">external documentation</a>.
+-spec button(This, But) -> boolean() when
+ This::wxMouseEvent(), But::integer().
button(#wx_ref{type=ThisT,ref=ThisRef},But)
when is_integer(But) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_Button,
<<ThisRef:32/?UI,But:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @equiv buttonDClick(This, [])
+-spec buttonDClick(This) -> boolean() when
+ This::wxMouseEvent().
+
buttonDClick(This)
when is_record(This, wx_ref) ->
buttonDClick(This, []).
-%% @spec (This::wxMouseEvent(), [Option]) -> bool()
-%% Option = {but, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventbuttondclick">external documentation</a>.
+-spec buttonDClick(This, [Option]) -> boolean() when
+ This::wxMouseEvent(),
+ Option :: {but, integer()}.
buttonDClick(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMouseEvent),
@@ -80,15 +87,18 @@ buttonDClick(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxMouseEvent_ButtonDClick,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @equiv buttonDown(This, [])
+-spec buttonDown(This) -> boolean() when
+ This::wxMouseEvent().
+
buttonDown(This)
when is_record(This, wx_ref) ->
buttonDown(This, []).
-%% @spec (This::wxMouseEvent(), [Option]) -> bool()
-%% Option = {but, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventbuttondown">external documentation</a>.
+-spec buttonDown(This, [Option]) -> boolean() when
+ This::wxMouseEvent(),
+ Option :: {but, integer()}.
buttonDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMouseEvent),
@@ -98,15 +108,18 @@ buttonDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxMouseEvent_ButtonDown,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @equiv buttonUp(This, [])
+-spec buttonUp(This) -> boolean() when
+ This::wxMouseEvent().
+
buttonUp(This)
when is_record(This, wx_ref) ->
buttonUp(This, []).
-%% @spec (This::wxMouseEvent(), [Option]) -> bool()
-%% Option = {but, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventbuttonup">external documentation</a>.
+-spec buttonUp(This, [Option]) -> boolean() when
+ This::wxMouseEvent(),
+ Option :: {but, integer()}.
buttonUp(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMouseEvent),
@@ -116,212 +129,242 @@ buttonUp(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxMouseEvent_ButtonUp,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventcmddown">external documentation</a>.
+-spec cmdDown(This) -> boolean() when
+ This::wxMouseEvent().
cmdDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_CmdDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventcontroldown">external documentation</a>.
+-spec controlDown(This) -> boolean() when
+ This::wxMouseEvent().
controlDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_ControlDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventdragging">external documentation</a>.
+-spec dragging(This) -> boolean() when
+ This::wxMouseEvent().
dragging(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_Dragging,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseevententering">external documentation</a>.
+-spec entering(This) -> boolean() when
+ This::wxMouseEvent().
entering(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_Entering,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventgetbutton">external documentation</a>.
+-spec getButton(This) -> integer() when
+ This::wxMouseEvent().
getButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_GetButton,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxMouseEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent(), Dc::wxDC:wxDC()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventgetlogicalposition">external documentation</a>.
+-spec getLogicalPosition(This, Dc) -> {X::integer(), Y::integer()} when
+ This::wxMouseEvent(), Dc::wxDC:wxDC().
getLogicalPosition(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
?CLASS(ThisT,wxMouseEvent),
?CLASS(DcT,wxDC),
wxe_util:call(?wxMouseEvent_GetLogicalPosition,
<<ThisRef:32/?UI,DcRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventgetlinesperaction">external documentation</a>.
+-spec getLinesPerAction(This) -> integer() when
+ This::wxMouseEvent().
getLinesPerAction(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_GetLinesPerAction,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventgetwheelrotation">external documentation</a>.
+-spec getWheelRotation(This) -> integer() when
+ This::wxMouseEvent().
getWheelRotation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_GetWheelRotation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventgetwheeldelta">external documentation</a>.
+-spec getWheelDelta(This) -> integer() when
+ This::wxMouseEvent().
getWheelDelta(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_GetWheelDelta,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventgetx">external documentation</a>.
+-spec getX(This) -> integer() when
+ This::wxMouseEvent().
getX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_GetX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventgety">external documentation</a>.
+-spec getY(This) -> integer() when
+ This::wxMouseEvent().
getY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_GetY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventisbutton">external documentation</a>.
+-spec isButton(This) -> boolean() when
+ This::wxMouseEvent().
isButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_IsButton,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventispagescroll">external documentation</a>.
+-spec isPageScroll(This) -> boolean() when
+ This::wxMouseEvent().
isPageScroll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_IsPageScroll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventleaving">external documentation</a>.
+-spec leaving(This) -> boolean() when
+ This::wxMouseEvent().
leaving(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_Leaving,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventleftdclick">external documentation</a>.
+-spec leftDClick(This) -> boolean() when
+ This::wxMouseEvent().
leftDClick(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_LeftDClick,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventleftdown">external documentation</a>.
+-spec leftDown(This) -> boolean() when
+ This::wxMouseEvent().
leftDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_LeftDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventleftisdown">external documentation</a>.
+-spec leftIsDown(This) -> boolean() when
+ This::wxMouseEvent().
leftIsDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_LeftIsDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventleftup">external documentation</a>.
+-spec leftUp(This) -> boolean() when
+ This::wxMouseEvent().
leftUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_LeftUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventmetadown">external documentation</a>.
+-spec metaDown(This) -> boolean() when
+ This::wxMouseEvent().
metaDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_MetaDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventmiddledclick">external documentation</a>.
+-spec middleDClick(This) -> boolean() when
+ This::wxMouseEvent().
middleDClick(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_MiddleDClick,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventmiddledown">external documentation</a>.
+-spec middleDown(This) -> boolean() when
+ This::wxMouseEvent().
middleDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_MiddleDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventmiddleisdown">external documentation</a>.
+-spec middleIsDown(This) -> boolean() when
+ This::wxMouseEvent().
middleIsDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_MiddleIsDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventmiddleup">external documentation</a>.
+-spec middleUp(This) -> boolean() when
+ This::wxMouseEvent().
middleUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_MiddleUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventmoving">external documentation</a>.
+-spec moving(This) -> boolean() when
+ This::wxMouseEvent().
moving(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_Moving,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventrightdclick">external documentation</a>.
+-spec rightDClick(This) -> boolean() when
+ This::wxMouseEvent().
rightDClick(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_RightDClick,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventrightdown">external documentation</a>.
+-spec rightDown(This) -> boolean() when
+ This::wxMouseEvent().
rightDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_RightDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventrightisdown">external documentation</a>.
+-spec rightIsDown(This) -> boolean() when
+ This::wxMouseEvent().
rightIsDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_RightIsDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventrightup">external documentation</a>.
+-spec rightUp(This) -> boolean() when
+ This::wxMouseEvent().
rightUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_RightUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMouseEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmouseevent.html#wxmouseeventshiftdown">external documentation</a>.
+-spec shiftDown(This) -> boolean() when
+ This::wxMouseEvent().
shiftDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMouseEvent),
wxe_util:call(?wxMouseEvent_ShiftDown,
diff --git a/lib/wx/src/gen/wxMoveEvent.erl b/lib/wx/src/gen/wxMoveEvent.erl
index 97cf803310..b2f2fa74df 100644
--- a/lib/wx/src/gen/wxMoveEvent.erl
+++ b/lib/wx/src/gen/wxMoveEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,12 +37,15 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxMoveEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxMoveEvent()) -> {X::integer(), Y::integer()}
+-type wxMoveEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmoveevent.html#wxmoveeventgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxMoveEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMoveEvent),
wxe_util:call(?wxMoveEvent_GetPosition,
diff --git a/lib/wx/src/gen/wxMultiChoiceDialog.erl b/lib/wx/src/gen/wxMultiChoiceDialog.erl
index 6fae0c4860..04cbb832ea 100644
--- a/lib/wx/src/gen/wxMultiChoiceDialog.erl
+++ b/lib/wx/src/gen/wxMultiChoiceDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxMultiChoiceDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,21 +85,26 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxMultiChoiceDialog()
+-type wxMultiChoiceDialog() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmultichoicedialog.html#wxmultichoicedialogwxmultichoicedialog">external documentation</a>.
+-spec new() -> wxMultiChoiceDialog().
new() ->
wxe_util:construct(?wxMultiChoiceDialog_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string(), Caption::string(), Choices::[[string()]]) -> wxMultiChoiceDialog()
%% @equiv new(Parent,Message,Caption,Choices, [])
+-spec new(Parent, Message, Caption, Choices) -> wxMultiChoiceDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata(), Caption::unicode:chardata(), Choices::[[unicode:chardata()]].
+
new(Parent,Message,Caption,Choices)
when is_record(Parent, wx_ref),is_list(Message),is_list(Caption),is_list(Choices) ->
new(Parent,Message,Caption,Choices, []).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string(), Caption::string(), Choices::[[string()]], [Option]) -> wxMultiChoiceDialog()
-%% Option = {style, integer()} | {pos, {X::integer(), Y::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmultichoicedialog.html#wxmultichoicedialogwxmultichoicedialog">external documentation</a>.
+-spec new(Parent, Message, Caption, Choices, [Option]) -> wxMultiChoiceDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata(), Caption::unicode:chardata(), Choices::[[unicode:chardata()]],
+ Option :: {style, integer()}
+ | {pos, {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options)
when is_list(Message),is_list(Caption),is_list(Choices),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -113,15 +119,17 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options)
wxe_util:construct(?wxMultiChoiceDialog_new_5,
<<ParentRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Caption_UC)):32/?UI,(Caption_UC)/binary, 0:(((8- ((4+byte_size(Caption_UC)) band 16#7)) band 16#7))/unit:8,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((4 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxMultiChoiceDialog()) -> [integer()]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmultichoicedialog.html#wxmultichoicedialoggetselections">external documentation</a>.
+-spec getSelections(This) -> [integer()] when
+ This::wxMultiChoiceDialog().
getSelections(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMultiChoiceDialog),
wxe_util:call(?wxMultiChoiceDialog_GetSelections,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxMultiChoiceDialog(), Selections::[integer()]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxmultichoicedialog.html#wxmultichoicedialogsetselections">external documentation</a>.
+-spec setSelections(This, Selections) -> ok when
+ This::wxMultiChoiceDialog(), Selections::[integer()].
setSelections(#wx_ref{type=ThisT,ref=ThisRef},Selections)
when is_list(Selections) ->
?CLASS(ThisT,wxMultiChoiceDialog),
@@ -129,8 +137,8 @@ setSelections(#wx_ref{type=ThisT,ref=ThisRef},Selections)
<<ThisRef:32/?UI,(length(Selections)):32/?UI,
(<< <<C:32/?I>> || C <- Selections>>)/binary, 0:(((0+length(Selections)) rem 2)*32)>>).
-%% @spec (This::wxMultiChoiceDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxMultiChoiceDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMultiChoiceDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxNavigationKeyEvent.erl b/lib/wx/src/gen/wxNavigationKeyEvent.erl
index 7cf7dff9aa..7559639fcd 100644
--- a/lib/wx/src/gen/wxNavigationKeyEvent.erl
+++ b/lib/wx/src/gen/wxNavigationKeyEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,64 +38,74 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxNavigationKeyEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxNavigationKeyEvent()) -> bool()
+-type wxNavigationKeyEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnavigationkeyevent.html#wxnavigationkeyeventgetdirection">external documentation</a>.
+-spec getDirection(This) -> boolean() when
+ This::wxNavigationKeyEvent().
getDirection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNavigationKeyEvent),
wxe_util:call(?wxNavigationKeyEvent_GetDirection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNavigationKeyEvent(), BForward::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnavigationkeyevent.html#wxnavigationkeyeventsetdirection">external documentation</a>.
+-spec setDirection(This, BForward) -> ok when
+ This::wxNavigationKeyEvent(), BForward::boolean().
setDirection(#wx_ref{type=ThisT,ref=ThisRef},BForward)
when is_boolean(BForward) ->
?CLASS(ThisT,wxNavigationKeyEvent),
wxe_util:cast(?wxNavigationKeyEvent_SetDirection,
<<ThisRef:32/?UI,(wxe_util:from_bool(BForward)):32/?UI>>).
-%% @spec (This::wxNavigationKeyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnavigationkeyevent.html#wxnavigationkeyeventiswindowchange">external documentation</a>.
+-spec isWindowChange(This) -> boolean() when
+ This::wxNavigationKeyEvent().
isWindowChange(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNavigationKeyEvent),
wxe_util:call(?wxNavigationKeyEvent_IsWindowChange,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNavigationKeyEvent(), BIs::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnavigationkeyevent.html#wxnavigationkeyeventsetwindowchange">external documentation</a>.
+-spec setWindowChange(This, BIs) -> ok when
+ This::wxNavigationKeyEvent(), BIs::boolean().
setWindowChange(#wx_ref{type=ThisT,ref=ThisRef},BIs)
when is_boolean(BIs) ->
?CLASS(ThisT,wxNavigationKeyEvent),
wxe_util:cast(?wxNavigationKeyEvent_SetWindowChange,
<<ThisRef:32/?UI,(wxe_util:from_bool(BIs)):32/?UI>>).
-%% @spec (This::wxNavigationKeyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnavigationkeyevent.html#wxnavigationkeyeventisfromtab">external documentation</a>.
+-spec isFromTab(This) -> boolean() when
+ This::wxNavigationKeyEvent().
isFromTab(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNavigationKeyEvent),
wxe_util:call(?wxNavigationKeyEvent_IsFromTab,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNavigationKeyEvent(), BIs::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnavigationkeyevent.html#wxnavigationkeyeventsetfromtab">external documentation</a>.
+-spec setFromTab(This, BIs) -> ok when
+ This::wxNavigationKeyEvent(), BIs::boolean().
setFromTab(#wx_ref{type=ThisT,ref=ThisRef},BIs)
when is_boolean(BIs) ->
?CLASS(ThisT,wxNavigationKeyEvent),
wxe_util:cast(?wxNavigationKeyEvent_SetFromTab,
<<ThisRef:32/?UI,(wxe_util:from_bool(BIs)):32/?UI>>).
-%% @spec (This::wxNavigationKeyEvent()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnavigationkeyevent.html#wxnavigationkeyeventgetcurrentfocus">external documentation</a>.
+-spec getCurrentFocus(This) -> wxWindow:wxWindow() when
+ This::wxNavigationKeyEvent().
getCurrentFocus(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNavigationKeyEvent),
wxe_util:call(?wxNavigationKeyEvent_GetCurrentFocus,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNavigationKeyEvent(), Win::wxWindow:wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnavigationkeyevent.html#wxnavigationkeyeventsetcurrentfocus">external documentation</a>.
+-spec setCurrentFocus(This, Win) -> ok when
+ This::wxNavigationKeyEvent(), Win::wxWindow:wxWindow().
setCurrentFocus(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(ThisT,wxNavigationKeyEvent),
?CLASS(WinT,wxWindow),
diff --git a/lib/wx/src/gen/wxNcPaintEvent.erl b/lib/wx/src/gen/wxNcPaintEvent.erl
index b45420a2fc..4dd292a0be 100644
--- a/lib/wx/src/gen/wxNcPaintEvent.erl
+++ b/lib/wx/src/gen/wxNcPaintEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,10 +37,12 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxNcPaintEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxNcPaintEvent() :: wx:wx_object().
%% From wxEvent
%% @hidden
stopPropagation(This) -> wxEvent:stopPropagation(This).
diff --git a/lib/wx/src/gen/wxNotebook.erl b/lib/wx/src/gen/wxNotebook.erl
index b918de5bb4..04ab62b047 100644
--- a/lib/wx/src/gen/wxNotebook.erl
+++ b/lib/wx/src/gen/wxNotebook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,27 +74,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxNotebook/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxNotebook()
+-type wxNotebook() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookwxnotebook">external documentation</a>.
+-spec new() -> wxNotebook().
new() ->
wxe_util:construct(?wxNotebook_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Winid::integer()) -> wxNotebook()
%% @equiv new(Parent,Winid, [])
+-spec new(Parent, Winid) -> wxNotebook() when
+ Parent::wxWindow:wxWindow(), Winid::integer().
+
new(Parent,Winid)
when is_record(Parent, wx_ref),is_integer(Winid) ->
new(Parent,Winid, []).
-%% @spec (Parent::wxWindow:wxWindow(), Winid::integer(), [Option]) -> wxNotebook()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookwxnotebook">external documentation</a>.
+-spec new(Parent, Winid, [Option]) -> wxNotebook() when
+ Parent::wxWindow:wxWindow(), Winid::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Winid, Options)
when is_integer(Winid),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -106,15 +113,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Winid, Options)
wxe_util:construct(?wxNotebook_new_3,
<<ParentRef:32/?UI,Winid:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxNotebook(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv addPage(This,Page,Text, [])
+-spec addPage(This, Page, Text) -> boolean() when
+ This::wxNotebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
addPage(This,Page,Text)
when is_record(This, wx_ref),is_record(Page, wx_ref),is_list(Text) ->
addPage(This,Page,Text, []).
-%% @spec (This::wxNotebook(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookaddpage">external documentation</a>.
+-spec addPage(This, Page, Text, [Option]) -> boolean() when
+ This::wxNotebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxNotebook),
@@ -127,15 +138,18 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
wxe_util:call(?wxNotebook_AddPage,
<<ThisRef:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxNotebook()) -> ok
%% @equiv advanceSelection(This, [])
+-spec advanceSelection(This) -> ok when
+ This::wxNotebook().
+
advanceSelection(This)
when is_record(This, wx_ref) ->
advanceSelection(This, []).
-%% @spec (This::wxNotebook(), [Option]) -> ok
-%% Option = {forward, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookadvanceselection">external documentation</a>.
+-spec advanceSelection(This, [Option]) -> ok when
+ This::wxNotebook(),
+ Option :: {forward, boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxNotebook),
@@ -145,23 +159,29 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxNotebook_AdvanceSelection,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxNotebook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookassignimagelist">external documentation</a>.
+-spec assignImageList(This, ImageList) -> ok when
+ This::wxNotebook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxNotebook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxNotebook_AssignImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxNotebook(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxNotebook(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxNotebook(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxNotebook(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxNotebook),
@@ -174,112 +194,130 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxNotebook_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxNotebook()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookdeleteallpages">external documentation</a>.
+-spec deleteAllPages(This) -> boolean() when
+ This::wxNotebook().
deleteAllPages(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_DeleteAllPages,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebook(), NPage::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookdeletepage">external documentation</a>.
+-spec deletePage(This, NPage) -> boolean() when
+ This::wxNotebook(), NPage::integer().
deletePage(#wx_ref{type=ThisT,ref=ThisRef},NPage)
when is_integer(NPage) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_DeletePage,
<<ThisRef:32/?UI,NPage:32/?UI>>).
-%% @spec (This::wxNotebook(), NPage::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookremovepage">external documentation</a>.
+-spec removePage(This, NPage) -> boolean() when
+ This::wxNotebook(), NPage::integer().
removePage(#wx_ref{type=ThisT,ref=ThisRef},NPage)
when is_integer(NPage) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_RemovePage,
<<ThisRef:32/?UI,NPage:32/?UI>>).
-%% @spec (This::wxNotebook()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetcurrentpage">external documentation</a>.
+-spec getCurrentPage(This) -> wxWindow:wxWindow() when
+ This::wxNotebook().
getCurrentPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetCurrentPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebook()) -> wxImageList:wxImageList()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetimagelist">external documentation</a>.
+-spec getImageList(This) -> wxImageList:wxImageList() when
+ This::wxNotebook().
getImageList(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetImageList,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebook(), N::integer()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetpage">external documentation</a>.
+-spec getPage(This, N) -> wxWindow:wxWindow() when
+ This::wxNotebook(), N::integer().
getPage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetPage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxNotebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetpagecount">external documentation</a>.
+-spec getPageCount(This) -> integer() when
+ This::wxNotebook().
getPageCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetPageCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebook(), NPage::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetpageimage">external documentation</a>.
+-spec getPageImage(This, NPage) -> integer() when
+ This::wxNotebook(), NPage::integer().
getPageImage(#wx_ref{type=ThisT,ref=ThisRef},NPage)
when is_integer(NPage) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetPageImage,
<<ThisRef:32/?UI,NPage:32/?UI>>).
-%% @spec (This::wxNotebook(), NPage::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetpagetext">external documentation</a>.
+-spec getPageText(This, NPage) -> unicode:charlist() when
+ This::wxNotebook(), NPage::integer().
getPageText(#wx_ref{type=ThisT,ref=ThisRef},NPage)
when is_integer(NPage) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetPageText,
<<ThisRef:32/?UI,NPage:32/?UI>>).
-%% @spec (This::wxNotebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetrowcount">external documentation</a>.
+-spec getRowCount(This) -> integer() when
+ This::wxNotebook().
getRowCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetRowCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxNotebook().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebook()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookgetthemebackgroundcolour">external documentation</a>.
+-spec getThemeBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxNotebook().
getThemeBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_GetThemeBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebook(), Pt::{X::integer(), Y::integer()}) -> {integer(), Flags::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookhittest">external documentation</a>.
+-spec hitTest(This, Pt) -> Result when
+ Result ::{Res ::integer(), Flags::integer()},
+ This::wxNotebook(), Pt::{X::integer(), Y::integer()}.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_HitTest,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxNotebook(), Position::integer(), Win::wxWindow:wxWindow(), StrText::string()) -> bool()
%% @equiv insertPage(This,Position,Win,StrText, [])
+-spec insertPage(This, Position, Win, StrText) -> boolean() when
+ This::wxNotebook(), Position::integer(), Win::wxWindow:wxWindow(), StrText::unicode:chardata().
+
insertPage(This,Position,Win,StrText)
when is_record(This, wx_ref),is_integer(Position),is_record(Win, wx_ref),is_list(StrText) ->
insertPage(This,Position,Win,StrText, []).
-%% @spec (This::wxNotebook(), Position::integer(), Win::wxWindow:wxWindow(), StrText::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookinsertpage">external documentation</a>.
+-spec insertPage(This, Position, Win, StrText, [Option]) -> boolean() when
+ This::wxNotebook(), Position::integer(), Win::wxWindow:wxWindow(), StrText::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},Position,#wx_ref{type=WinT,ref=WinRef},StrText, Options)
when is_integer(Position),is_list(StrText),is_list(Options) ->
?CLASS(ThisT,wxNotebook),
@@ -292,40 +330,45 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},Position,#wx_ref{type=WinT,ref=WinRef
wxe_util:call(?wxNotebook_InsertPage,
<<ThisRef:32/?UI,Position:32/?UI,WinRef:32/?UI,(byte_size(StrText_UC)):32/?UI,(StrText_UC)/binary, 0:(((8- ((0+byte_size(StrText_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxNotebook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebooksetimagelist">external documentation</a>.
+-spec setImageList(This, ImageList) -> ok when
+ This::wxNotebook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxNotebook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxNotebook_SetImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxNotebook(), Padding::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebooksetpadding">external documentation</a>.
+-spec setPadding(This, Padding) -> ok when
+ This::wxNotebook(), Padding::{W::integer(), H::integer()}.
setPadding(#wx_ref{type=ThisT,ref=ThisRef},{PaddingW,PaddingH})
when is_integer(PaddingW),is_integer(PaddingH) ->
?CLASS(ThisT,wxNotebook),
wxe_util:cast(?wxNotebook_SetPadding,
<<ThisRef:32/?UI,PaddingW:32/?UI,PaddingH:32/?UI>>).
-%% @spec (This::wxNotebook(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebooksetpagesize">external documentation</a>.
+-spec setPageSize(This, Size) -> ok when
+ This::wxNotebook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxNotebook),
wxe_util:cast(?wxNotebook_SetPageSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxNotebook(), NPage::integer(), NImage::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebooksetpageimage">external documentation</a>.
+-spec setPageImage(This, NPage, NImage) -> boolean() when
+ This::wxNotebook(), NPage::integer(), NImage::integer().
setPageImage(#wx_ref{type=ThisT,ref=ThisRef},NPage,NImage)
when is_integer(NPage),is_integer(NImage) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_SetPageImage,
<<ThisRef:32/?UI,NPage:32/?UI,NImage:32/?UI>>).
-%% @spec (This::wxNotebook(), NPage::integer(), StrText::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebooksetpagetext">external documentation</a>.
+-spec setPageText(This, NPage, StrText) -> boolean() when
+ This::wxNotebook(), NPage::integer(), StrText::unicode:chardata().
setPageText(#wx_ref{type=ThisT,ref=ThisRef},NPage,StrText)
when is_integer(NPage),is_list(StrText) ->
?CLASS(ThisT,wxNotebook),
@@ -333,24 +376,26 @@ setPageText(#wx_ref{type=ThisT,ref=ThisRef},NPage,StrText)
wxe_util:call(?wxNotebook_SetPageText,
<<ThisRef:32/?UI,NPage:32/?UI,(byte_size(StrText_UC)):32/?UI,(StrText_UC)/binary, 0:(((8- ((4+byte_size(StrText_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxNotebook(), NPage::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebooksetselection">external documentation</a>.
+-spec setSelection(This, NPage) -> integer() when
+ This::wxNotebook(), NPage::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},NPage)
when is_integer(NPage) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_SetSelection,
<<ThisRef:32/?UI,NPage:32/?UI>>).
-%% @spec (This::wxNotebook(), NPage::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebook.html#wxnotebookchangeselection">external documentation</a>.
+-spec changeSelection(This, NPage) -> integer() when
+ This::wxNotebook(), NPage::integer().
changeSelection(#wx_ref{type=ThisT,ref=ThisRef},NPage)
when is_integer(NPage) ->
?CLASS(ThisT,wxNotebook),
wxe_util:call(?wxNotebook_ChangeSelection,
<<ThisRef:32/?UI,NPage:32/?UI>>).
-%% @spec (This::wxNotebook()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxNotebook()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxNotebook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxNotebookEvent.erl b/lib/wx/src/gen/wxNotebookEvent.erl
index 6be826bdd2..72c0bb9cf4 100644
--- a/lib/wx/src/gen/wxNotebookEvent.erl
+++ b/lib/wx/src/gen/wxNotebookEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,36 +41,42 @@
isSelection/1,parent_class/1,resumePropagation/2,setInt/2,setString/2,
shouldPropagate/1,skip/1,skip/2,stopPropagation/1,veto/1]).
+-export_type([wxNotebookEvent/0]).
%% @hidden
parent_class(wxNotifyEvent) -> true;
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxNotebookEvent()) -> integer()
+-type wxNotebookEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebookevent.html#wxnotebookeventgetoldselection">external documentation</a>.
+-spec getOldSelection(This) -> integer() when
+ This::wxNotebookEvent().
getOldSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebookEvent),
wxe_util:call(?wxNotebookEvent_GetOldSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebookEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebookevent.html#wxnotebookeventgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxNotebookEvent().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotebookEvent),
wxe_util:call(?wxNotebookEvent_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotebookEvent(), NOldSel::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebookevent.html#wxnotebookeventsetoldselection">external documentation</a>.
+-spec setOldSelection(This, NOldSel) -> ok when
+ This::wxNotebookEvent(), NOldSel::integer().
setOldSelection(#wx_ref{type=ThisT,ref=ThisRef},NOldSel)
when is_integer(NOldSel) ->
?CLASS(ThisT,wxNotebookEvent),
wxe_util:cast(?wxNotebookEvent_SetOldSelection,
<<ThisRef:32/?UI,NOldSel:32/?UI>>).
-%% @spec (This::wxNotebookEvent(), NSel::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotebookevent.html#wxnotebookeventsetselection">external documentation</a>.
+-spec setSelection(This, NSel) -> ok when
+ This::wxNotebookEvent(), NSel::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},NSel)
when is_integer(NSel) ->
?CLASS(ThisT,wxNotebookEvent),
diff --git a/lib/wx/src/gen/wxNotifyEvent.erl b/lib/wx/src/gen/wxNotifyEvent.erl
index b2a6da16f0..7ba23469be 100644
--- a/lib/wx/src/gen/wxNotifyEvent.erl
+++ b/lib/wx/src/gen/wxNotifyEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,27 +36,32 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxNotifyEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxNotifyEvent()) -> ok
+-type wxNotifyEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotifyevent.html#wxnotifyeventallow">external documentation</a>.
+-spec allow(This) -> ok when
+ This::wxNotifyEvent().
allow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotifyEvent),
wxe_util:cast(?wxNotifyEvent_Allow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotifyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotifyevent.html#wxnotifyeventisallowed">external documentation</a>.
+-spec isAllowed(This) -> boolean() when
+ This::wxNotifyEvent().
isAllowed(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotifyEvent),
wxe_util:call(?wxNotifyEvent_IsAllowed,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxNotifyEvent()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxnotifyevent.html#wxnotifyeventveto">external documentation</a>.
+-spec veto(This) -> ok when
+ This::wxNotifyEvent().
veto(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotifyEvent),
wxe_util:cast(?wxNotifyEvent_Veto,
diff --git a/lib/wx/src/gen/wxPageSetupDialog.erl b/lib/wx/src/gen/wxPageSetupDialog.erl
index 2c11863a21..653ba5f015 100644
--- a/lib/wx/src/gen/wxPageSetupDialog.erl
+++ b/lib/wx/src/gen/wxPageSetupDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,18 +29,23 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPageSetupDialog/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxPageSetupDialog()
+-type wxPageSetupDialog() :: wx:wx_object().
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxPageSetupDialog() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxPageSetupDialog()
-%% Option = {data, wxPageSetupDialogData:wxPageSetupDialogData()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialog.html#wxpagesetupdialogwxpagesetupdialog">external documentation</a>.
+-spec new(Parent, [Option]) -> wxPageSetupDialog() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {data, wxPageSetupDialogData:wxPageSetupDialogData()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -50,22 +55,24 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxPageSetupDialog_new,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxPageSetupDialog()) -> wxPageSetupDialogData:wxPageSetupDialogData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialog.html#wxpagesetupdialoggetpagesetupdata">external documentation</a>.
+-spec getPageSetupData(This) -> wxPageSetupDialogData:wxPageSetupDialogData() when
+ This::wxPageSetupDialog().
getPageSetupData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialog),
wxe_util:call(?wxPageSetupDialog_GetPageSetupData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialog()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialog.html#wxpagesetupdialogshowmodal">external documentation</a>.
+-spec showModal(This) -> integer() when
+ This::wxPageSetupDialog().
showModal(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialog),
wxe_util:call(?wxPageSetupDialog_ShowModal,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPageSetupDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPageSetupDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPageSetupDialogData.erl b/lib/wx/src/gen/wxPageSetupDialogData.erl
index 00b4ca2a36..7c453a9872 100644
--- a/lib/wx/src/gen/wxPageSetupDialogData.erl
+++ b/lib/wx/src/gen/wxPageSetupDialogData.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,17 +36,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPageSetupDialogData/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPageSetupDialogData()
+-type wxPageSetupDialogData() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatawxpagesetupdialogdata">external documentation</a>.
+-spec new() -> wxPageSetupDialogData().
new() ->
wxe_util:construct(?wxPageSetupDialogData_new_0,
<<>>).
-%% @spec (PrintData::wxPrintData:wxPrintData() | wxPageSetupDialogData()) -> wxPageSetupDialogData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatawxpagesetupdialogdata">external documentation</a>.
+-spec new(PrintData) -> wxPageSetupDialogData() when
+ PrintData::wxPrintData:wxPrintData() | wxPageSetupDialogData().
new(#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
PrintDataOP = case ?CLASS_T(PrintDataT,wxPrintData) of
true ->
@@ -57,216 +60,243 @@ new(#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
wxe_util:construct(PrintDataOP,
<<PrintDataRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenablehelp">external documentation</a>.
+-spec enableHelp(This, Flag) -> ok when
+ This::wxPageSetupDialogData(), Flag::boolean().
enableHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_EnableHelp,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenablemargins">external documentation</a>.
+-spec enableMargins(This, Flag) -> ok when
+ This::wxPageSetupDialogData(), Flag::boolean().
enableMargins(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_EnableMargins,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenableorientation">external documentation</a>.
+-spec enableOrientation(This, Flag) -> ok when
+ This::wxPageSetupDialogData(), Flag::boolean().
enableOrientation(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_EnableOrientation,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenablepaper">external documentation</a>.
+-spec enablePaper(This, Flag) -> ok when
+ This::wxPageSetupDialogData(), Flag::boolean().
enablePaper(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_EnablePaper,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenableprinter">external documentation</a>.
+-spec enablePrinter(This, Flag) -> ok when
+ This::wxPageSetupDialogData(), Flag::boolean().
enablePrinter(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_EnablePrinter,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetdefaultminmargins">external documentation</a>.
+-spec getDefaultMinMargins(This) -> boolean() when
+ This::wxPageSetupDialogData().
getDefaultMinMargins(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetDefaultMinMargins,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetenablemargins">external documentation</a>.
+-spec getEnableMargins(This) -> boolean() when
+ This::wxPageSetupDialogData().
getEnableMargins(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetEnableMargins,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetenableorientation">external documentation</a>.
+-spec getEnableOrientation(This) -> boolean() when
+ This::wxPageSetupDialogData().
getEnableOrientation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetEnableOrientation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetenablepaper">external documentation</a>.
+-spec getEnablePaper(This) -> boolean() when
+ This::wxPageSetupDialogData().
getEnablePaper(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetEnablePaper,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetenableprinter">external documentation</a>.
+-spec getEnablePrinter(This) -> boolean() when
+ This::wxPageSetupDialogData().
getEnablePrinter(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetEnablePrinter,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetenablehelp">external documentation</a>.
+-spec getEnableHelp(This) -> boolean() when
+ This::wxPageSetupDialogData().
getEnableHelp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetEnableHelp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetdefaultinfo">external documentation</a>.
+-spec getDefaultInfo(This) -> boolean() when
+ This::wxPageSetupDialogData().
getDefaultInfo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetDefaultInfo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetmargintopleft">external documentation</a>.
+-spec getMarginTopLeft(This) -> {X::integer(), Y::integer()} when
+ This::wxPageSetupDialogData().
getMarginTopLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetMarginTopLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetmarginbottomright">external documentation</a>.
+-spec getMarginBottomRight(This) -> {X::integer(), Y::integer()} when
+ This::wxPageSetupDialogData().
getMarginBottomRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetMarginBottomRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetminmargintopleft">external documentation</a>.
+-spec getMinMarginTopLeft(This) -> {X::integer(), Y::integer()} when
+ This::wxPageSetupDialogData().
getMinMarginTopLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetMinMarginTopLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetminmarginbottomright">external documentation</a>.
+-spec getMinMarginBottomRight(This) -> {X::integer(), Y::integer()} when
+ This::wxPageSetupDialogData().
getMinMarginBottomRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetMinMarginBottomRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetpaperid">external documentation</a>.
+-spec getPaperId(This) -> integer() when
+ This::wxPageSetupDialogData().
getPaperId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetPaperId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetpapersize">external documentation</a>.
+-spec getPaperSize(This) -> {W::integer(), H::integer()} when
+ This::wxPageSetupDialogData().
getPaperSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetPaperSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> wxPrintData:wxPrintData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatagetprintdata">external documentation</a>.
+-spec getPrintData(This) -> wxPrintData:wxPrintData() when
+ This::wxPageSetupDialogData().
getPrintData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_GetPrintData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxPageSetupDialogData().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:call(?wxPageSetupDialogData_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetdefaultinfo">external documentation</a>.
+-spec setDefaultInfo(This, Flag) -> ok when
+ This::wxPageSetupDialogData(), Flag::boolean().
setDefaultInfo(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_SetDefaultInfo,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetdefaultminmargins">external documentation</a>.
+-spec setDefaultMinMargins(This, Flag) -> ok when
+ This::wxPageSetupDialogData(), Flag::boolean().
setDefaultMinMargins(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_SetDefaultMinMargins,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetmargintopleft">external documentation</a>.
+-spec setMarginTopLeft(This, Pt) -> ok when
+ This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}.
setMarginTopLeft(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_SetMarginTopLeft,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetmarginbottomright">external documentation</a>.
+-spec setMarginBottomRight(This, Pt) -> ok when
+ This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}.
setMarginBottomRight(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_SetMarginBottomRight,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetminmargintopleft">external documentation</a>.
+-spec setMinMarginTopLeft(This, Pt) -> ok when
+ This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}.
setMinMarginTopLeft(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_SetMinMarginTopLeft,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetminmarginbottomright">external documentation</a>.
+-spec setMinMarginBottomRight(This, Pt) -> ok when
+ This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}.
setMinMarginBottomRight(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_SetMinMarginBottomRight,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), Id::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetpaperid">external documentation</a>.
+-spec setPaperId(This, Id) -> ok when
+ This::wxPageSetupDialogData(), Id::integer().
setPaperId(#wx_ref{type=ThisT,ref=ThisRef},Id)
when is_integer(Id) ->
?CLASS(ThisT,wxPageSetupDialogData),
wxe_util:cast(?wxPageSetupDialogData_SetPaperId,
<<ThisRef:32/?UI,Id:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(),X::integer()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetpapersize">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setPaperSize(This::wxPageSetupDialogData(), Id::integer()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setPaperSize(This::wxPageSetupDialogData(), Sz::{W::integer(), H::integer()}) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setPaperSize(This, Sz) -> ok when<br />
+%% This::wxPageSetupDialogData(), Sz::{W::integer(), H::integer()}.<br />
+%%
+-spec setPaperSize(This, Id) -> ok when
+ This::wxPageSetupDialogData(), Id::integer();
+ (This, Sz) -> ok when
+ This::wxPageSetupDialogData(), Sz::{W::integer(), H::integer()}.
setPaperSize(#wx_ref{type=ThisT,ref=ThisRef},Id)
when is_integer(Id) ->
?CLASS(ThisT,wxPageSetupDialogData),
@@ -278,16 +308,17 @@ setPaperSize(#wx_ref{type=ThisT,ref=ThisRef},{SzW,SzH})
wxe_util:cast(?wxPageSetupDialogData_SetPaperSize_1_1,
<<ThisRef:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData(), PrintData::wxPrintData:wxPrintData()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetprintdata">external documentation</a>.
+-spec setPrintData(This, PrintData) -> ok when
+ This::wxPageSetupDialogData(), PrintData::wxPrintData:wxPrintData().
setPrintData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
?CLASS(PrintDataT,wxPrintData),
wxe_util:cast(?wxPageSetupDialogData_SetPrintData,
<<ThisRef:32/?UI,PrintDataRef:32/?UI>>).
-%% @spec (This::wxPageSetupDialogData()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPageSetupDialogData()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPageSetupDialogData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPaintDC.erl b/lib/wx/src/gen/wxPaintDC.erl
index 47d5947097..9e81bc31af 100644
--- a/lib/wx/src/gen/wxPaintDC.erl
+++ b/lib/wx/src/gen/wxPaintDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,10 +39,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -53,26 +53,29 @@
setPen/2,setTextBackground/2,setTextForeground/2,setUserScale/3,startDoc/2,
startPage/1]).
+-export_type([wxPaintDC/0]).
%% @hidden
parent_class(wxWindowDC) -> true;
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPaintDC()
+-type wxPaintDC() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpaintdc.html#wxpaintdcwxpaintdc">external documentation</a>.
+-spec new() -> wxPaintDC().
new() ->
wxe_util:construct(?wxPaintDC_new_0,
<<>>).
-%% @spec (Win::wxWindow:wxWindow()) -> wxPaintDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpaintdc.html#wxpaintdcwxpaintdc">external documentation</a>.
+-spec new(Win) -> wxPaintDC() when
+ Win::wxWindow:wxWindow().
new(#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(WinT,wxWindow),
wxe_util:construct(?wxPaintDC_new_1,
<<WinRef:32/?UI>>).
-%% @spec (This::wxPaintDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPaintDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPaintDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -160,11 +163,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -178,7 +181,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxPaintEvent.erl b/lib/wx/src/gen/wxPaintEvent.erl
index 2603e61623..a13db607a4 100644
--- a/lib/wx/src/gen/wxPaintEvent.erl
+++ b/lib/wx/src/gen/wxPaintEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,10 +37,12 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxPaintEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxPaintEvent() :: wx:wx_object().
%% From wxEvent
%% @hidden
stopPropagation(This) -> wxEvent:stopPropagation(This).
diff --git a/lib/wx/src/gen/wxPalette.erl b/lib/wx/src/gen/wxPalette.erl
index 3d8e811988..991f706acb 100644
--- a/lib/wx/src/gen/wxPalette.erl
+++ b/lib/wx/src/gen/wxPalette.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,17 +30,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPalette/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPalette()
+-type wxPalette() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalette.html#wxpalettewxpalette">external documentation</a>.
+-spec new() -> wxPalette().
new() ->
wxe_util:construct(?wxPalette_new_0,
<<>>).
-%% @spec (Red::binary(), Green::binary(), Blue::binary()) -> wxPalette()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalette.html#wxpalettewxpalette">external documentation</a>.
+-spec new(Red, Green, Blue) -> wxPalette() when
+ Red::binary(), Green::binary(), Blue::binary().
new(Red,Green,Blue)
when is_binary(Red),is_binary(Green),is_binary(Blue) ->
wxe_util:send_bin(Red),
@@ -49,8 +52,9 @@ new(Red,Green,Blue)
wxe_util:construct(?wxPalette_new_4,
<<>>).
-%% @spec (This::wxPalette(), Red::binary(), Green::binary(), Blue::binary()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalette.html#wxpalettecreate">external documentation</a>.
+-spec create(This, Red, Green, Blue) -> boolean() when
+ This::wxPalette(), Red::binary(), Green::binary(), Blue::binary().
create(#wx_ref{type=ThisT,ref=ThisRef},Red,Green,Blue)
when is_binary(Red),is_binary(Green),is_binary(Blue) ->
?CLASS(ThisT,wxPalette),
@@ -60,38 +64,43 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Red,Green,Blue)
wxe_util:call(?wxPalette_Create,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPalette()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalette.html#wxpalettegetcolourscount">external documentation</a>.
+-spec getColoursCount(This) -> integer() when
+ This::wxPalette().
getColoursCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPalette),
wxe_util:call(?wxPalette_GetColoursCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPalette(), Red::integer(), Green::integer(), Blue::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalette.html#wxpalettegetpixel">external documentation</a>.
+-spec getPixel(This, Red, Green, Blue) -> integer() when
+ This::wxPalette(), Red::integer(), Green::integer(), Blue::integer().
getPixel(#wx_ref{type=ThisT,ref=ThisRef},Red,Green,Blue)
when is_integer(Red),is_integer(Green),is_integer(Blue) ->
?CLASS(ThisT,wxPalette),
wxe_util:call(?wxPalette_GetPixel,
<<ThisRef:32/?UI,Red:32/?UI,Green:32/?UI,Blue:32/?UI>>).
-%% @spec (This::wxPalette(), Pixel::integer()) -> {bool(), Red::integer(), Green::integer(), Blue::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalette.html#wxpalettegetrgb">external documentation</a>.
+-spec getRGB(This, Pixel) -> Result when
+ Result ::{Res ::boolean(), Red::integer(), Green::integer(), Blue::integer()},
+ This::wxPalette(), Pixel::integer().
getRGB(#wx_ref{type=ThisT,ref=ThisRef},Pixel)
when is_integer(Pixel) ->
?CLASS(ThisT,wxPalette),
wxe_util:call(?wxPalette_GetRGB,
<<ThisRef:32/?UI,Pixel:32/?UI>>).
-%% @spec (This::wxPalette()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalette.html#wxpaletteisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxPalette().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPalette),
wxe_util:call(?wxPalette_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPalette()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPalette()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPalette),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPaletteChangedEvent.erl b/lib/wx/src/gen/wxPaletteChangedEvent.erl
index 1831bf1375..aa9ae68ec2 100644
--- a/lib/wx/src/gen/wxPaletteChangedEvent.erl
+++ b/lib/wx/src/gen/wxPaletteChangedEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,20 +37,24 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxPaletteChangedEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxPaletteChangedEvent(), Win::wxWindow:wxWindow()) -> ok
+-type wxPaletteChangedEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalettechangedevent.html#wxpalettechangedeventsetchangedwindow">external documentation</a>.
+-spec setChangedWindow(This, Win) -> ok when
+ This::wxPaletteChangedEvent(), Win::wxWindow:wxWindow().
setChangedWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(ThisT,wxPaletteChangedEvent),
?CLASS(WinT,wxWindow),
wxe_util:cast(?wxPaletteChangedEvent_SetChangedWindow,
<<ThisRef:32/?UI,WinRef:32/?UI>>).
-%% @spec (This::wxPaletteChangedEvent()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpalettechangedevent.html#wxpalettechangedeventgetchangedwindow">external documentation</a>.
+-spec getChangedWindow(This) -> wxWindow:wxWindow() when
+ This::wxPaletteChangedEvent().
getChangedWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPaletteChangedEvent),
wxe_util:call(?wxPaletteChangedEvent_GetChangedWindow,
diff --git a/lib/wx/src/gen/wxPanel.erl b/lib/wx/src/gen/wxPanel.erl
index 59fba03102..88c1b119a8 100644
--- a/lib/wx/src/gen/wxPanel.erl
+++ b/lib/wx/src/gen/wxPanel.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -68,26 +68,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxPanel/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPanel()
+-type wxPanel() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpanel.html#wxpanelwxpanel">external documentation</a>.
+-spec new() -> wxPanel().
new() ->
wxe_util:construct(?wxPanel_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxPanel()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxPanel() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxPanel()
-%% Option = {winid, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpanel.html#wxpanelwxpanel">external documentation</a>.
+-spec new(Parent, [Option]) -> wxPanel() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {winid, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -100,15 +108,18 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxPanel_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (Parent::wxWindow:wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer()) -> wxPanel()
%% @equiv new(Parent,X,Y,Width,Height, [])
+-spec new(Parent, X, Y, Width, Height) -> wxPanel() when
+ Parent::wxWindow:wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer().
+
new(Parent,X,Y,Width,Height)
when is_record(Parent, wx_ref),is_integer(X),is_integer(Y),is_integer(Width),is_integer(Height) ->
new(Parent,X,Y,Width,Height, []).
-%% @spec (Parent::wxWindow:wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer(), [Option]) -> wxPanel()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpanel.html#wxpanelwxpanel">external documentation</a>.
+-spec new(Parent, X, Y, Width, Height, [Option]) -> wxPanel() when
+ Parent::wxWindow:wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer(),
+ Option :: {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},X,Y,Width,Height, Options)
when is_integer(X),is_integer(Y),is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -118,15 +129,16 @@ new(#wx_ref{type=ParentT,ref=ParentRef},X,Y,Width,Height, Options)
wxe_util:construct(?wxPanel_new_6,
<<ParentRef:32/?UI,X:32/?UI,Y:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxPanel()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpanel.html#wxpanelinitdialog">external documentation</a>.
+-spec initDialog(This) -> ok when
+ This::wxPanel().
initDialog(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPanel),
wxe_util:cast(?wxPanel_InitDialog,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPanel()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPanel()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPanel),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPasswordEntryDialog.erl b/lib/wx/src/gen/wxPasswordEntryDialog.erl
index 07a0bcef56..d5a9f6150a 100644
--- a/lib/wx/src/gen/wxPasswordEntryDialog.erl
+++ b/lib/wx/src/gen/wxPasswordEntryDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -79,6 +79,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxPasswordEntryDialog/0]).
%% @hidden
parent_class(wxTextEntryDialog) -> true;
parent_class(wxDialog) -> true;
@@ -87,15 +88,22 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string()) -> wxPasswordEntryDialog()
+-type wxPasswordEntryDialog() :: wx:wx_object().
%% @equiv new(Parent,Message, [])
+-spec new(Parent, Message) -> wxPasswordEntryDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata().
+
new(Parent,Message)
when is_record(Parent, wx_ref),is_list(Message) ->
new(Parent,Message, []).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string(), [Option]) -> wxPasswordEntryDialog()
-%% Option = {caption, string()} | {value, string()} | {style, integer()} | {pos, {X::integer(), Y::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpasswordentrydialog.html#wxpasswordentrydialogwxpasswordentrydialog">external documentation</a>.
+-spec new(Parent, Message, [Option]) -> wxPasswordEntryDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata(),
+ Option :: {caption, unicode:chardata()}
+ | {value, unicode:chardata()}
+ | {style, integer()}
+ | {pos, {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
when is_list(Message),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -109,8 +117,8 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
wxe_util:construct(?wxPasswordEntryDialog_new,
<<ParentRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxPasswordEntryDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPasswordEntryDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPasswordEntryDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPen.erl b/lib/wx/src/gen/wxPen.erl
index ada95b0ee3..8b8aafddba 100644
--- a/lib/wx/src/gen/wxPen.erl
+++ b/lib/wx/src/gen/wxPen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,24 +31,30 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPen/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPen()
+-type wxPen() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpenwxpen">external documentation</a>.
+-spec new() -> wxPen().
new() ->
wxe_util:construct(?wxPen_new_0,
<<>>).
-%% @spec (Colour::wx:colour()) -> wxPen()
%% @equiv new(Colour, [])
+-spec new(Colour) -> wxPen() when
+ Colour::wx:wx_colour().
+
new(Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
new(Colour, []).
-%% @spec (Colour::wx:colour(), [Option]) -> wxPen()
-%% Option = {width, integer()} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpenwxpen">external documentation</a>.
+-spec new(Colour, [Option]) -> wxPen() when
+ Colour::wx:wx_colour(),
+ Option :: {width, integer()}
+ | {style, integer()}.
new(Colour, Options)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4,is_list(Options) ->
MOpts = fun({width, Width}, Acc) -> [<<1:32/?UI,Width:32/?UI>>|Acc];
@@ -58,98 +64,110 @@ new(Colour, Options)
wxe_util:construct(?wxPen_new_2,
<<(wxe_util:colour_bin(Colour)):16/binary, BinOpt/binary>>).
-%% @spec (This::wxPen()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpengetcap">external documentation</a>.
+-spec getCap(This) -> integer() when
+ This::wxPen().
getCap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPen),
wxe_util:call(?wxPen_GetCap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPen()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpengetcolour">external documentation</a>.
+-spec getColour(This) -> wx:wx_colour4() when
+ This::wxPen().
getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPen),
wxe_util:call(?wxPen_GetColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPen()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpengetjoin">external documentation</a>.
+-spec getJoin(This) -> integer() when
+ This::wxPen().
getJoin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPen),
wxe_util:call(?wxPen_GetJoin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPen()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpengetstyle">external documentation</a>.
+-spec getStyle(This) -> integer() when
+ This::wxPen().
getStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPen),
wxe_util:call(?wxPen_GetStyle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPen()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpengetwidth">external documentation</a>.
+-spec getWidth(This) -> integer() when
+ This::wxPen().
getWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPen),
wxe_util:call(?wxPen_GetWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPen()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpenisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxPen().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPen),
wxe_util:call(?wxPen_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPen(), CapStyle::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpensetcap">external documentation</a>.
+-spec setCap(This, CapStyle) -> ok when
+ This::wxPen(), CapStyle::integer().
setCap(#wx_ref{type=ThisT,ref=ThisRef},CapStyle)
when is_integer(CapStyle) ->
?CLASS(ThisT,wxPen),
wxe_util:cast(?wxPen_SetCap,
<<ThisRef:32/?UI,CapStyle:32/?UI>>).
-%% @spec (This::wxPen(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpensetcolour">external documentation</a>.
+-spec setColour(This, Colour) -> ok when
+ This::wxPen(), Colour::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxPen),
wxe_util:cast(?wxPen_SetColour_1,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxPen(), Red::integer(), Green::integer(), Blue::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpensetcolour">external documentation</a>.
+-spec setColour(This, Red, Green, Blue) -> ok when
+ This::wxPen(), Red::integer(), Green::integer(), Blue::integer().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Red,Green,Blue)
when is_integer(Red),is_integer(Green),is_integer(Blue) ->
?CLASS(ThisT,wxPen),
wxe_util:cast(?wxPen_SetColour_3,
<<ThisRef:32/?UI,Red:32/?UI,Green:32/?UI,Blue:32/?UI>>).
-%% @spec (This::wxPen(), JoinStyle::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpensetjoin">external documentation</a>.
+-spec setJoin(This, JoinStyle) -> ok when
+ This::wxPen(), JoinStyle::integer().
setJoin(#wx_ref{type=ThisT,ref=ThisRef},JoinStyle)
when is_integer(JoinStyle) ->
?CLASS(ThisT,wxPen),
wxe_util:cast(?wxPen_SetJoin,
<<ThisRef:32/?UI,JoinStyle:32/?UI>>).
-%% @spec (This::wxPen(), Style::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpensetstyle">external documentation</a>.
+-spec setStyle(This, Style) -> ok when
+ This::wxPen(), Style::integer().
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
?CLASS(ThisT,wxPen),
wxe_util:cast(?wxPen_SetStyle,
<<ThisRef:32/?UI,Style:32/?UI>>).
-%% @spec (This::wxPen(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpen.html#wxpensetwidth">external documentation</a>.
+-spec setWidth(This, Width) -> ok when
+ This::wxPen(), Width::integer().
setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxPen),
wxe_util:cast(?wxPen_SetWidth,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxPen()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPen()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPen),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPickerBase.erl b/lib/wx/src/gen/wxPickerBase.erl
index e60ab4f9d8..2253127d84 100644
--- a/lib/wx/src/gen/wxPickerBase.erl
+++ b/lib/wx/src/gen/wxPickerBase.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,87 +72,101 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxPickerBase/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxPickerBase(), Newmargin::integer()) -> ok
+-type wxPickerBase() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasesetinternalmargin">external documentation</a>.
+-spec setInternalMargin(This, Newmargin) -> ok when
+ This::wxPickerBase(), Newmargin::integer().
setInternalMargin(#wx_ref{type=ThisT,ref=ThisRef},Newmargin)
when is_integer(Newmargin) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:cast(?wxPickerBase_SetInternalMargin,
<<ThisRef:32/?UI,Newmargin:32/?UI>>).
-%% @spec (This::wxPickerBase()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasegetinternalmargin">external documentation</a>.
+-spec getInternalMargin(This) -> integer() when
+ This::wxPickerBase().
getInternalMargin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:call(?wxPickerBase_GetInternalMargin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPickerBase(), Prop::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasesettextctrlproportion">external documentation</a>.
+-spec setTextCtrlProportion(This, Prop) -> ok when
+ This::wxPickerBase(), Prop::integer().
setTextCtrlProportion(#wx_ref{type=ThisT,ref=ThisRef},Prop)
when is_integer(Prop) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:cast(?wxPickerBase_SetTextCtrlProportion,
<<ThisRef:32/?UI,Prop:32/?UI>>).
-%% @spec (This::wxPickerBase(), Prop::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasesetpickerctrlproportion">external documentation</a>.
+-spec setPickerCtrlProportion(This, Prop) -> ok when
+ This::wxPickerBase(), Prop::integer().
setPickerCtrlProportion(#wx_ref{type=ThisT,ref=ThisRef},Prop)
when is_integer(Prop) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:cast(?wxPickerBase_SetPickerCtrlProportion,
<<ThisRef:32/?UI,Prop:32/?UI>>).
-%% @spec (This::wxPickerBase()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasegettextctrlproportion">external documentation</a>.
+-spec getTextCtrlProportion(This) -> integer() when
+ This::wxPickerBase().
getTextCtrlProportion(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:call(?wxPickerBase_GetTextCtrlProportion,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPickerBase()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasegetpickerctrlproportion">external documentation</a>.
+-spec getPickerCtrlProportion(This) -> integer() when
+ This::wxPickerBase().
getPickerCtrlProportion(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:call(?wxPickerBase_GetPickerCtrlProportion,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPickerBase()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasehastextctrl">external documentation</a>.
+-spec hasTextCtrl(This) -> boolean() when
+ This::wxPickerBase().
hasTextCtrl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:call(?wxPickerBase_HasTextCtrl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPickerBase()) -> wxTextCtrl:wxTextCtrl()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasegettextctrl">external documentation</a>.
+-spec getTextCtrl(This) -> wxTextCtrl:wxTextCtrl() when
+ This::wxPickerBase().
getTextCtrl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:call(?wxPickerBase_GetTextCtrl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPickerBase()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbaseistextctrlgrowable">external documentation</a>.
+-spec isTextCtrlGrowable(This) -> boolean() when
+ This::wxPickerBase().
isTextCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:call(?wxPickerBase_IsTextCtrlGrowable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPickerBase()) -> ok
%% @equiv setPickerCtrlGrowable(This, [])
+-spec setPickerCtrlGrowable(This) -> ok when
+ This::wxPickerBase().
+
setPickerCtrlGrowable(This)
when is_record(This, wx_ref) ->
setPickerCtrlGrowable(This, []).
-%% @spec (This::wxPickerBase(), [Option]) -> ok
-%% Option = {grow, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasesetpickerctrlgrowable">external documentation</a>.
+-spec setPickerCtrlGrowable(This, [Option]) -> ok when
+ This::wxPickerBase(),
+ Option :: {grow, boolean()}.
setPickerCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxPickerBase),
@@ -162,15 +176,18 @@ setPickerCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxPickerBase_SetPickerCtrlGrowable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxPickerBase()) -> ok
%% @equiv setTextCtrlGrowable(This, [])
+-spec setTextCtrlGrowable(This) -> ok when
+ This::wxPickerBase().
+
setTextCtrlGrowable(This)
when is_record(This, wx_ref) ->
setTextCtrlGrowable(This, []).
-%% @spec (This::wxPickerBase(), [Option]) -> ok
-%% Option = {grow, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbasesettextctrlgrowable">external documentation</a>.
+-spec setTextCtrlGrowable(This, [Option]) -> ok when
+ This::wxPickerBase(),
+ Option :: {grow, boolean()}.
setTextCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxPickerBase),
@@ -180,8 +197,9 @@ setTextCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxPickerBase_SetTextCtrlGrowable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxPickerBase()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpickerbase.html#wxpickerbaseispickerctrlgrowable">external documentation</a>.
+-spec isPickerCtrlGrowable(This) -> boolean() when
+ This::wxPickerBase().
isPickerCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPickerBase),
wxe_util:call(?wxPickerBase_IsPickerCtrlGrowable,
diff --git a/lib/wx/src/gen/wxPostScriptDC.erl b/lib/wx/src/gen/wxPostScriptDC.erl
index df3edfade9..2eb25b6a8e 100644
--- a/lib/wx/src/gen/wxPostScriptDC.erl
+++ b/lib/wx/src/gen/wxPostScriptDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,10 +38,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -52,38 +52,42 @@
setPen/2,setTextBackground/2,setTextForeground/2,setUserScale/3,startDoc/2,
startPage/1]).
+-export_type([wxPostScriptDC/0]).
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPostScriptDC()
+-type wxPostScriptDC() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpostscriptdc.html#wxpostscriptdcwxpostscriptdc">external documentation</a>.
+-spec new() -> wxPostScriptDC().
new() ->
wxe_util:construct(?wxPostScriptDC_new_0,
<<>>).
-%% @spec (PrintData::wxPrintData:wxPrintData()) -> wxPostScriptDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpostscriptdc.html#wxpostscriptdcwxpostscriptdc">external documentation</a>.
+-spec new(PrintData) -> wxPostScriptDC() when
+ PrintData::wxPrintData:wxPrintData().
new(#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
?CLASS(PrintDataT,wxPrintData),
wxe_util:construct(?wxPostScriptDC_new_1,
<<PrintDataRef:32/?UI>>).
-%% @spec (Ppi::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpostscriptdc.html#wxpostscriptdcsetresolution">external documentation</a>.
+-spec setResolution(Ppi) -> ok when
+ Ppi::integer().
setResolution(Ppi)
when is_integer(Ppi) ->
wxe_util:cast(?wxPostScriptDC_SetResolution,
<<Ppi:32/?UI>>).
-%% @spec () -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpostscriptdc.html#wxpostscriptdcgetresolution">external documentation</a>.
+-spec getResolution() -> integer().
getResolution() ->
wxe_util:call(?wxPostScriptDC_GetResolution,
<<>>).
-%% @spec (This::wxPostScriptDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPostScriptDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPostScriptDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -170,11 +174,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -188,7 +192,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxPreviewCanvas.erl b/lib/wx/src/gen/wxPreviewCanvas.erl
index d33aeedb70..cc9f43e5e4 100644
--- a/lib/wx/src/gen/wxPreviewCanvas.erl
+++ b/lib/wx/src/gen/wxPreviewCanvas.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,6 +74,7 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxPreviewCanvas/0]).
%% @hidden
parent_class(wxScrolledWindow) -> true;
parent_class(wxPanel) -> true;
@@ -81,6 +82,7 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxPreviewCanvas() :: wx:wx_object().
%% From wxScrolledWindow
%% @hidden
setTargetWindow(This,Target) -> wxScrolledWindow:setTargetWindow(This,Target).
diff --git a/lib/wx/src/gen/wxPreviewControlBar.erl b/lib/wx/src/gen/wxPreviewControlBar.erl
index e85af625e2..dce3feb9ea 100644
--- a/lib/wx/src/gen/wxPreviewControlBar.erl
+++ b/lib/wx/src/gen/wxPreviewControlBar.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,21 +70,28 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxPreviewControlBar/0]).
%% @hidden
parent_class(wxPanel) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Preview::wxPrintPreview:wxPrintPreview(), Buttons::integer(), Parent::wxWindow:wxWindow()) -> wxPreviewControlBar()
+-type wxPreviewControlBar() :: wx:wx_object().
%% @equiv new(Preview,Buttons,Parent, [])
+-spec new(Preview, Buttons, Parent) -> wxPreviewControlBar() when
+ Preview::wxPrintPreview:wxPrintPreview(), Buttons::integer(), Parent::wxWindow:wxWindow().
+
new(Preview,Buttons,Parent)
when is_record(Preview, wx_ref),is_integer(Buttons),is_record(Parent, wx_ref) ->
new(Preview,Buttons,Parent, []).
-%% @spec (Preview::wxPrintPreview:wxPrintPreview(), Buttons::integer(), Parent::wxWindow:wxWindow(), [Option]) -> wxPreviewControlBar()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewcontrolbar.html#wxpreviewcontrolbarwxpreviewcontrolbar">external documentation</a>.
+-spec new(Preview, Buttons, Parent, [Option]) -> wxPreviewControlBar() when
+ Preview::wxPrintPreview:wxPrintPreview(), Buttons::integer(), Parent::wxWindow:wxWindow(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=PreviewT,ref=PreviewRef},Buttons,#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_integer(Buttons),is_list(Options) ->
?CLASS(PreviewT,wxPrintPreview),
@@ -97,37 +104,41 @@ new(#wx_ref{type=PreviewT,ref=PreviewRef},Buttons,#wx_ref{type=ParentT,ref=Paren
wxe_util:construct(?wxPreviewControlBar_new,
<<PreviewRef:32/?UI,Buttons:32/?UI,ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxPreviewControlBar()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewcontrolbar.html#wxpreviewcontrolbarcreatebuttons">external documentation</a>.
+-spec createButtons(This) -> ok when
+ This::wxPreviewControlBar().
createButtons(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewControlBar),
wxe_util:cast(?wxPreviewControlBar_CreateButtons,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPreviewControlBar()) -> wxPrintPreview:wxPrintPreview()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewcontrolbar.html#wxpreviewcontrolbargetprintpreview">external documentation</a>.
+-spec getPrintPreview(This) -> wxPrintPreview:wxPrintPreview() when
+ This::wxPreviewControlBar().
getPrintPreview(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewControlBar),
wxe_util:call(?wxPreviewControlBar_GetPrintPreview,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPreviewControlBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewcontrolbar.html#wxpreviewcontrolbargetzoomcontrol">external documentation</a>.
+-spec getZoomControl(This) -> integer() when
+ This::wxPreviewControlBar().
getZoomControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewControlBar),
wxe_util:call(?wxPreviewControlBar_GetZoomControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPreviewControlBar(), Zoom::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewcontrolbar.html#wxpreviewcontrolbarsetzoomcontrol">external documentation</a>.
+-spec setZoomControl(This, Zoom) -> ok when
+ This::wxPreviewControlBar(), Zoom::integer().
setZoomControl(#wx_ref{type=ThisT,ref=ThisRef},Zoom)
when is_integer(Zoom) ->
?CLASS(ThisT,wxPreviewControlBar),
wxe_util:cast(?wxPreviewControlBar_SetZoomControl,
<<ThisRef:32/?UI,Zoom:32/?UI>>).
-%% @spec (This::wxPreviewControlBar()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPreviewControlBar()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPreviewControlBar),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPreviewFrame.erl b/lib/wx/src/gen/wxPreviewFrame.erl
index da43f86030..41bb0bf2bb 100644
--- a/lib/wx/src/gen/wxPreviewFrame.erl
+++ b/lib/wx/src/gen/wxPreviewFrame.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -81,6 +81,7 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxPreviewFrame/0]).
%% @hidden
parent_class(wxFrame) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -88,15 +89,22 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Preview::wxPrintPreview:wxPrintPreview(), Parent::wxWindow:wxWindow()) -> wxPreviewFrame()
+-type wxPreviewFrame() :: wx:wx_object().
%% @equiv new(Preview,Parent, [])
+-spec new(Preview, Parent) -> wxPreviewFrame() when
+ Preview::wxPrintPreview:wxPrintPreview(), Parent::wxWindow:wxWindow().
+
new(Preview,Parent)
when is_record(Preview, wx_ref),is_record(Parent, wx_ref) ->
new(Preview,Parent, []).
-%% @spec (Preview::wxPrintPreview:wxPrintPreview(), Parent::wxWindow:wxWindow(), [Option]) -> wxPreviewFrame()
-%% Option = {title, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewframe.html#wxpreviewframewxpreviewframe">external documentation</a>.
+-spec new(Preview, Parent, [Option]) -> wxPreviewFrame() when
+ Preview::wxPrintPreview:wxPrintPreview(), Parent::wxWindow:wxWindow(),
+ Option :: {title, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=PreviewT,ref=PreviewRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(PreviewT,wxPrintPreview),
@@ -110,37 +118,41 @@ new(#wx_ref{type=PreviewT,ref=PreviewRef},#wx_ref{type=ParentT,ref=ParentRef}, O
wxe_util:construct(?wxPreviewFrame_new,
<<PreviewRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxPreviewFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewframe.html#wxpreviewframecreatecontrolbar">external documentation</a>.
+-spec createControlBar(This) -> ok when
+ This::wxPreviewFrame().
createControlBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewFrame),
wxe_util:cast(?wxPreviewFrame_CreateControlBar,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPreviewFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewframe.html#wxpreviewframecreatecanvas">external documentation</a>.
+-spec createCanvas(This) -> ok when
+ This::wxPreviewFrame().
createCanvas(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewFrame),
wxe_util:cast(?wxPreviewFrame_CreateCanvas,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPreviewFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewframe.html#wxpreviewframeinitialize">external documentation</a>.
+-spec initialize(This) -> ok when
+ This::wxPreviewFrame().
initialize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewFrame),
wxe_util:cast(?wxPreviewFrame_Initialize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPreviewFrame(), Event::wxCloseEvent:wxCloseEvent()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxpreviewframe.html#wxpreviewframeonclosewindow">external documentation</a>.
+-spec onCloseWindow(This, Event) -> ok when
+ This::wxPreviewFrame(), Event::wxCloseEvent:wxCloseEvent().
onCloseWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef}) ->
?CLASS(ThisT,wxPreviewFrame),
?CLASS(EventT,wxCloseEvent),
wxe_util:cast(?wxPreviewFrame_OnCloseWindow,
<<ThisRef:32/?UI,EventRef:32/?UI>>).
-%% @spec (This::wxPreviewFrame()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPreviewFrame()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPreviewFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintData.erl b/lib/wx/src/gen/wxPrintData.erl
index f3e8ad3612..2cb8dd3c5f 100644
--- a/lib/wx/src/gen/wxPrintData.erl
+++ b/lib/wx/src/gen/wxPrintData.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,158 +32,175 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPrintData/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPrintData()
+-type wxPrintData() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatawxprintdata">external documentation</a>.
+-spec new() -> wxPrintData().
new() ->
wxe_util:construct(?wxPrintData_new_0,
<<>>).
-%% @spec (PrintData::wxPrintData()) -> wxPrintData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatawxprintdata">external documentation</a>.
+-spec new(PrintData) -> wxPrintData() when
+ PrintData::wxPrintData().
new(#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
?CLASS(PrintDataT,wxPrintData),
wxe_util:construct(?wxPrintData_new_1,
<<PrintDataRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetcollate">external documentation</a>.
+-spec getCollate(This) -> boolean() when
+ This::wxPrintData().
getCollate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetCollate,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> WxPrintBin
-%% WxPrintBin = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetbin">external documentation</a>.
-%%<br /> WxPrintBin is one of ?wxPRINTBIN_DEFAULT | ?wxPRINTBIN_ONLYONE | ?wxPRINTBIN_LOWER | ?wxPRINTBIN_MIDDLE | ?wxPRINTBIN_MANUAL | ?wxPRINTBIN_ENVELOPE | ?wxPRINTBIN_ENVMANUAL | ?wxPRINTBIN_AUTO | ?wxPRINTBIN_TRACTOR | ?wxPRINTBIN_SMALLFMT | ?wxPRINTBIN_LARGEFMT | ?wxPRINTBIN_LARGECAPACITY | ?wxPRINTBIN_CASSETTE | ?wxPRINTBIN_FORMSOURCE | ?wxPRINTBIN_USER
+%%<br /> Res = ?wxPRINTBIN_DEFAULT | ?wxPRINTBIN_ONLYONE | ?wxPRINTBIN_LOWER | ?wxPRINTBIN_MIDDLE | ?wxPRINTBIN_MANUAL | ?wxPRINTBIN_ENVELOPE | ?wxPRINTBIN_ENVMANUAL | ?wxPRINTBIN_AUTO | ?wxPRINTBIN_TRACTOR | ?wxPRINTBIN_SMALLFMT | ?wxPRINTBIN_LARGEFMT | ?wxPRINTBIN_LARGECAPACITY | ?wxPRINTBIN_CASSETTE | ?wxPRINTBIN_FORMSOURCE | ?wxPRINTBIN_USER
+-spec getBin(This) -> wx:wx_enum() when
+ This::wxPrintData().
getBin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetBin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetcolour">external documentation</a>.
+-spec getColour(This) -> boolean() when
+ This::wxPrintData().
getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> WxDuplexMode
-%% WxDuplexMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetduplex">external documentation</a>.
-%%<br /> WxDuplexMode is one of ?wxDUPLEX_SIMPLEX | ?wxDUPLEX_HORIZONTAL | ?wxDUPLEX_VERTICAL
+%%<br /> Res = ?wxDUPLEX_SIMPLEX | ?wxDUPLEX_HORIZONTAL | ?wxDUPLEX_VERTICAL
+-spec getDuplex(This) -> wx:wx_enum() when
+ This::wxPrintData().
getDuplex(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetDuplex,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetnocopies">external documentation</a>.
+-spec getNoCopies(This) -> integer() when
+ This::wxPrintData().
getNoCopies(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetNoCopies,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetorientation">external documentation</a>.
+-spec getOrientation(This) -> integer() when
+ This::wxPrintData().
getOrientation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetOrientation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetpaperid">external documentation</a>.
+-spec getPaperId(This) -> integer() when
+ This::wxPrintData().
getPaperId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetPaperId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetprintername">external documentation</a>.
+-spec getPrinterName(This) -> unicode:charlist() when
+ This::wxPrintData().
getPrinterName(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetPrinterName,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatagetquality">external documentation</a>.
+-spec getQuality(This) -> integer() when
+ This::wxPrintData().
getQuality(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_GetQuality,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdataisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxPrintData().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintData),
wxe_util:call(?wxPrintData_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintData(), Bin::WxPrintBin) -> ok
-%% WxPrintBin = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetbin">external documentation</a>.
-%%<br /> WxPrintBin is one of ?wxPRINTBIN_DEFAULT | ?wxPRINTBIN_ONLYONE | ?wxPRINTBIN_LOWER | ?wxPRINTBIN_MIDDLE | ?wxPRINTBIN_MANUAL | ?wxPRINTBIN_ENVELOPE | ?wxPRINTBIN_ENVMANUAL | ?wxPRINTBIN_AUTO | ?wxPRINTBIN_TRACTOR | ?wxPRINTBIN_SMALLFMT | ?wxPRINTBIN_LARGEFMT | ?wxPRINTBIN_LARGECAPACITY | ?wxPRINTBIN_CASSETTE | ?wxPRINTBIN_FORMSOURCE | ?wxPRINTBIN_USER
+%%<br /> Bin = ?wxPRINTBIN_DEFAULT | ?wxPRINTBIN_ONLYONE | ?wxPRINTBIN_LOWER | ?wxPRINTBIN_MIDDLE | ?wxPRINTBIN_MANUAL | ?wxPRINTBIN_ENVELOPE | ?wxPRINTBIN_ENVMANUAL | ?wxPRINTBIN_AUTO | ?wxPRINTBIN_TRACTOR | ?wxPRINTBIN_SMALLFMT | ?wxPRINTBIN_LARGEFMT | ?wxPRINTBIN_LARGECAPACITY | ?wxPRINTBIN_CASSETTE | ?wxPRINTBIN_FORMSOURCE | ?wxPRINTBIN_USER
+-spec setBin(This, Bin) -> ok when
+ This::wxPrintData(), Bin::wx:wx_enum().
setBin(#wx_ref{type=ThisT,ref=ThisRef},Bin)
when is_integer(Bin) ->
?CLASS(ThisT,wxPrintData),
wxe_util:cast(?wxPrintData_SetBin,
<<ThisRef:32/?UI,Bin:32/?UI>>).
-%% @spec (This::wxPrintData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetcollate">external documentation</a>.
+-spec setCollate(This, Flag) -> ok when
+ This::wxPrintData(), Flag::boolean().
setCollate(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPrintData),
wxe_util:cast(?wxPrintData_SetCollate,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPrintData(), Colour::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetcolour">external documentation</a>.
+-spec setColour(This, Colour) -> ok when
+ This::wxPrintData(), Colour::boolean().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when is_boolean(Colour) ->
?CLASS(ThisT,wxPrintData),
wxe_util:cast(?wxPrintData_SetColour,
<<ThisRef:32/?UI,(wxe_util:from_bool(Colour)):32/?UI>>).
-%% @spec (This::wxPrintData(), Duplex::WxDuplexMode) -> ok
-%% WxDuplexMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetduplex">external documentation</a>.
-%%<br /> WxDuplexMode is one of ?wxDUPLEX_SIMPLEX | ?wxDUPLEX_HORIZONTAL | ?wxDUPLEX_VERTICAL
+%%<br /> Duplex = ?wxDUPLEX_SIMPLEX | ?wxDUPLEX_HORIZONTAL | ?wxDUPLEX_VERTICAL
+-spec setDuplex(This, Duplex) -> ok when
+ This::wxPrintData(), Duplex::wx:wx_enum().
setDuplex(#wx_ref{type=ThisT,ref=ThisRef},Duplex)
when is_integer(Duplex) ->
?CLASS(ThisT,wxPrintData),
wxe_util:cast(?wxPrintData_SetDuplex,
<<ThisRef:32/?UI,Duplex:32/?UI>>).
-%% @spec (This::wxPrintData(), V::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetnocopies">external documentation</a>.
+-spec setNoCopies(This, V) -> ok when
+ This::wxPrintData(), V::integer().
setNoCopies(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
?CLASS(ThisT,wxPrintData),
wxe_util:cast(?wxPrintData_SetNoCopies,
<<ThisRef:32/?UI,V:32/?UI>>).
-%% @spec (This::wxPrintData(), Orient::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetorientation">external documentation</a>.
+-spec setOrientation(This, Orient) -> ok when
+ This::wxPrintData(), Orient::integer().
setOrientation(#wx_ref{type=ThisT,ref=ThisRef},Orient)
when is_integer(Orient) ->
?CLASS(ThisT,wxPrintData),
wxe_util:cast(?wxPrintData_SetOrientation,
<<ThisRef:32/?UI,Orient:32/?UI>>).
-%% @spec (This::wxPrintData(), SizeId::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetpaperid">external documentation</a>.
+-spec setPaperId(This, SizeId) -> ok when
+ This::wxPrintData(), SizeId::integer().
setPaperId(#wx_ref{type=ThisT,ref=ThisRef},SizeId)
when is_integer(SizeId) ->
?CLASS(ThisT,wxPrintData),
wxe_util:cast(?wxPrintData_SetPaperId,
<<ThisRef:32/?UI,SizeId:32/?UI>>).
-%% @spec (This::wxPrintData(), Name::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetprintername">external documentation</a>.
+-spec setPrinterName(This, Name) -> ok when
+ This::wxPrintData(), Name::unicode:chardata().
setPrinterName(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxPrintData),
@@ -191,16 +208,17 @@ setPrinterName(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:cast(?wxPrintData_SetPrinterName,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxPrintData(), Quality::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdata.html#wxprintdatasetquality">external documentation</a>.
+-spec setQuality(This, Quality) -> ok when
+ This::wxPrintData(), Quality::integer().
setQuality(#wx_ref{type=ThisT,ref=ThisRef},Quality)
when is_integer(Quality) ->
?CLASS(ThisT,wxPrintData),
wxe_util:cast(?wxPrintData_SetQuality,
<<ThisRef:32/?UI,Quality:32/?UI>>).
-%% @spec (This::wxPrintData()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPrintData()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintDialog.erl b/lib/wx/src/gen/wxPrintDialog.erl
index a2f4bfa4eb..34c8310e12 100644
--- a/lib/wx/src/gen/wxPrintDialog.erl
+++ b/lib/wx/src/gen/wxPrintDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxPrintDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,22 +85,25 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxPrintDialog()
+-type wxPrintDialog() :: wx:wx_object().
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxPrintDialog() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(),X::term()) -> wxPrintDialog()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialog.html#wxprintdialogwxprintdialog">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Parent::wxWindow:wxWindow(), [Option]) -> wxPrintDialog() </c>
-%%<br /> Option = {data, wxPrintDialogData:wxPrintDialogData()}
-%% </p>
-%% <p><c>
-%% new(Parent::wxWindow:wxWindow(), Data::wxPrintData:wxPrintData()) -> wxPrintDialog() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(Parent, Data) -> wxPrintDialog() when<br />
+%% Parent::wxWindow:wxWindow(), Data::wxPrintData:wxPrintData().<br />
+%%
+-spec new(Parent, [Option]) -> wxPrintDialog() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {data, wxPrintDialogData:wxPrintDialogData()};
+ (Parent, Data) -> wxPrintDialog() when
+ Parent::wxWindow:wxWindow(), Data::wxPrintData:wxPrintData().
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -114,22 +118,24 @@ new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef}) ->
wxe_util:construct(?wxPrintDialog_new_2_1,
<<ParentRef:32/?UI,DataRef:32/?UI>>).
-%% @spec (This::wxPrintDialog()) -> wxPrintDialogData:wxPrintDialogData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialog.html#wxprintdialoggetprintdialogdata">external documentation</a>.
+-spec getPrintDialogData(This) -> wxPrintDialogData:wxPrintDialogData() when
+ This::wxPrintDialog().
getPrintDialogData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialog),
wxe_util:call(?wxPrintDialog_GetPrintDialogData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialog()) -> wxDC:wxDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialog.html#wxprintdialoggetprintdc">external documentation</a>.
+-spec getPrintDC(This) -> wxDC:wxDC() when
+ This::wxPrintDialog().
getPrintDC(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialog),
wxe_util:call(?wxPrintDialog_GetPrintDC,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPrintDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintDialogData.erl b/lib/wx/src/gen/wxPrintDialogData.erl
index a7e8d41f2e..3368349164 100644
--- a/lib/wx/src/gen/wxPrintDialogData.erl
+++ b/lib/wx/src/gen/wxPrintDialogData.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,17 +33,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPrintDialogData/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPrintDialogData()
+-type wxPrintDialogData() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatawxprintdialogdata">external documentation</a>.
+-spec new() -> wxPrintDialogData().
new() ->
wxe_util:construct(?wxPrintDialogData_new_0,
<<>>).
-%% @spec (DialogData::wxPrintDialogData() | wxPrintData:wxPrintData()) -> wxPrintDialogData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatawxprintdialogdata">external documentation</a>.
+-spec new(DialogData) -> wxPrintDialogData() when
+ DialogData::wxPrintDialogData() | wxPrintData:wxPrintData().
new(#wx_ref{type=DialogDataT,ref=DialogDataRef}) ->
DialogDataOP = case ?CLASS_T(DialogDataT,wxPrintDialogData) of
true ->
@@ -54,189 +57,213 @@ new(#wx_ref{type=DialogDataT,ref=DialogDataRef}) ->
wxe_util:construct(DialogDataOP,
<<DialogDataRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdataenablehelp">external documentation</a>.
+-spec enableHelp(This, Flag) -> ok when
+ This::wxPrintDialogData(), Flag::boolean().
enableHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_EnableHelp,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPrintDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdataenablepagenumbers">external documentation</a>.
+-spec enablePageNumbers(This, Flag) -> ok when
+ This::wxPrintDialogData(), Flag::boolean().
enablePageNumbers(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_EnablePageNumbers,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPrintDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdataenableprinttofile">external documentation</a>.
+-spec enablePrintToFile(This, Flag) -> ok when
+ This::wxPrintDialogData(), Flag::boolean().
enablePrintToFile(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_EnablePrintToFile,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPrintDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdataenableselection">external documentation</a>.
+-spec enableSelection(This, Flag) -> ok when
+ This::wxPrintDialogData(), Flag::boolean().
enableSelection(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_EnableSelection,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetallpages">external documentation</a>.
+-spec getAllPages(This) -> boolean() when
+ This::wxPrintDialogData().
getAllPages(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetAllPages,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetcollate">external documentation</a>.
+-spec getCollate(This) -> boolean() when
+ This::wxPrintDialogData().
getCollate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetCollate,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetfrompage">external documentation</a>.
+-spec getFromPage(This) -> integer() when
+ This::wxPrintDialogData().
getFromPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetFromPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetmaxpage">external documentation</a>.
+-spec getMaxPage(This) -> integer() when
+ This::wxPrintDialogData().
getMaxPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetMaxPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetminpage">external documentation</a>.
+-spec getMinPage(This) -> integer() when
+ This::wxPrintDialogData().
getMinPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetMinPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetnocopies">external documentation</a>.
+-spec getNoCopies(This) -> integer() when
+ This::wxPrintDialogData().
getNoCopies(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetNoCopies,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> wxPrintData:wxPrintData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetprintdata">external documentation</a>.
+-spec getPrintData(This) -> wxPrintData:wxPrintData() when
+ This::wxPrintDialogData().
getPrintData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetPrintData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetprinttofile">external documentation</a>.
+-spec getPrintToFile(This) -> boolean() when
+ This::wxPrintDialogData().
getPrintToFile(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetPrintToFile,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagetselection">external documentation</a>.
+-spec getSelection(This) -> boolean() when
+ This::wxPrintDialogData().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatagettopage">external documentation</a>.
+-spec getToPage(This) -> integer() when
+ This::wxPrintDialogData().
getToPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_GetToPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdataisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxPrintDialogData().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:call(?wxPrintDialogData_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasetcollate">external documentation</a>.
+-spec setCollate(This, Flag) -> ok when
+ This::wxPrintDialogData(), Flag::boolean().
setCollate(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_SetCollate,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPrintDialogData(), V::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasetfrompage">external documentation</a>.
+-spec setFromPage(This, V) -> ok when
+ This::wxPrintDialogData(), V::integer().
setFromPage(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_SetFromPage,
<<ThisRef:32/?UI,V:32/?UI>>).
-%% @spec (This::wxPrintDialogData(), V::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasetmaxpage">external documentation</a>.
+-spec setMaxPage(This, V) -> ok when
+ This::wxPrintDialogData(), V::integer().
setMaxPage(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_SetMaxPage,
<<ThisRef:32/?UI,V:32/?UI>>).
-%% @spec (This::wxPrintDialogData(), V::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasetminpage">external documentation</a>.
+-spec setMinPage(This, V) -> ok when
+ This::wxPrintDialogData(), V::integer().
setMinPage(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_SetMinPage,
<<ThisRef:32/?UI,V:32/?UI>>).
-%% @spec (This::wxPrintDialogData(), V::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasetnocopies">external documentation</a>.
+-spec setNoCopies(This, V) -> ok when
+ This::wxPrintDialogData(), V::integer().
setNoCopies(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_SetNoCopies,
<<ThisRef:32/?UI,V:32/?UI>>).
-%% @spec (This::wxPrintDialogData(), PrintData::wxPrintData:wxPrintData()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasetprintdata">external documentation</a>.
+-spec setPrintData(This, PrintData) -> ok when
+ This::wxPrintDialogData(), PrintData::wxPrintData:wxPrintData().
setPrintData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
?CLASS(ThisT,wxPrintDialogData),
?CLASS(PrintDataT,wxPrintData),
wxe_util:cast(?wxPrintDialogData_SetPrintData,
<<ThisRef:32/?UI,PrintDataRef:32/?UI>>).
-%% @spec (This::wxPrintDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasetprinttofile">external documentation</a>.
+-spec setPrintToFile(This, Flag) -> ok when
+ This::wxPrintDialogData(), Flag::boolean().
setPrintToFile(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_SetPrintToFile,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPrintDialogData(), Flag::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasetselection">external documentation</a>.
+-spec setSelection(This, Flag) -> ok when
+ This::wxPrintDialogData(), Flag::boolean().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_SetSelection,
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (This::wxPrintDialogData(), V::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintdialogdata.html#wxprintdialogdatasettopage">external documentation</a>.
+-spec setToPage(This, V) -> ok when
+ This::wxPrintDialogData(), V::integer().
setToPage(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
?CLASS(ThisT,wxPrintDialogData),
wxe_util:cast(?wxPrintDialogData_SetToPage,
<<ThisRef:32/?UI,V:32/?UI>>).
-%% @spec (This::wxPrintDialogData()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPrintDialogData()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintDialogData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintPreview.erl b/lib/wx/src/gen/wxPrintPreview.erl
index 6f9a0f653f..49ab506526 100644
--- a/lib/wx/src/gen/wxPrintPreview.erl
+++ b/lib/wx/src/gen/wxPrintPreview.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,18 +32,24 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPrintPreview/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Printout::wxPrintout:wxPrintout()) -> wxPrintPreview()
+-type wxPrintPreview() :: wx:wx_object().
%% @equiv new(Printout, [])
+-spec new(Printout) -> wxPrintPreview() when
+ Printout::wxPrintout:wxPrintout().
+
new(Printout)
when is_record(Printout, wx_ref) ->
new(Printout, []).
-%% @spec (Printout::wxPrintout:wxPrintout(), [Option]) -> wxPrintPreview()
-%% Option = {printoutForPrinting, wxPrintout:wxPrintout()} | {data, wxPrintDialogData:wxPrintDialogData()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewwxprintpreview">external documentation</a>.
+-spec new(Printout, [Option]) -> wxPrintPreview() when
+ Printout::wxPrintout:wxPrintout(),
+ Option :: {printoutForPrinting, wxPrintout:wxPrintout()}
+ | {data, wxPrintDialogData:wxPrintDialogData()}.
new(#wx_ref{type=PrintoutT,ref=PrintoutRef}, Options)
when is_list(Options) ->
?CLASS(PrintoutT,wxPrintout),
@@ -54,8 +60,9 @@ new(#wx_ref{type=PrintoutT,ref=PrintoutRef}, Options)
wxe_util:construct(?wxPrintPreview_new_2,
<<PrintoutRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (Printout::wxPrintout:wxPrintout(), PrintoutForPrinting::wxPrintout:wxPrintout(), Data::wxPrintData:wxPrintData()) -> wxPrintPreview()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewwxprintpreview">external documentation</a>.
+-spec new(Printout, PrintoutForPrinting, Data) -> wxPrintPreview() when
+ Printout::wxPrintout:wxPrintout(), PrintoutForPrinting::wxPrintout:wxPrintout(), Data::wxPrintData:wxPrintData().
new(#wx_ref{type=PrintoutT,ref=PrintoutRef},#wx_ref{type=PrintoutForPrintingT,ref=PrintoutForPrintingRef},#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(PrintoutT,wxPrintout),
?CLASS(PrintoutForPrintingT,wxPrintout),
@@ -63,64 +70,73 @@ new(#wx_ref{type=PrintoutT,ref=PrintoutRef},#wx_ref{type=PrintoutForPrintingT,re
wxe_util:construct(?wxPrintPreview_new_3,
<<PrintoutRef:32/?UI,PrintoutForPrintingRef:32/?UI,DataRef:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> wxPreviewCanvas:wxPreviewCanvas()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewgetcanvas">external documentation</a>.
+-spec getCanvas(This) -> wxPreviewCanvas:wxPreviewCanvas() when
+ This::wxPrintPreview().
getCanvas(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_GetCanvas,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewgetcurrentpage">external documentation</a>.
+-spec getCurrentPage(This) -> integer() when
+ This::wxPrintPreview().
getCurrentPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_GetCurrentPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> wxFrame:wxFrame()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewgetframe">external documentation</a>.
+-spec getFrame(This) -> wxFrame:wxFrame() when
+ This::wxPrintPreview().
getFrame(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_GetFrame,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewgetmaxpage">external documentation</a>.
+-spec getMaxPage(This) -> integer() when
+ This::wxPrintPreview().
getMaxPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_GetMaxPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewgetminpage">external documentation</a>.
+-spec getMinPage(This) -> integer() when
+ This::wxPrintPreview().
getMinPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_GetMinPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> wxPrintout:wxPrintout()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewgetprintout">external documentation</a>.
+-spec getPrintout(This) -> wxPrintout:wxPrintout() when
+ This::wxPrintPreview().
getPrintout(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_GetPrintout,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> wxPrintout:wxPrintout()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewgetprintoutforprinting">external documentation</a>.
+-spec getPrintoutForPrinting(This) -> wxPrintout:wxPrintout() when
+ This::wxPrintPreview().
getPrintoutForPrinting(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_GetPrintoutForPrinting,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxPrintPreview().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_IsOk,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintPreview(), Canvas::wxPreviewCanvas:wxPreviewCanvas(), Dc::wxDC:wxDC()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewpaintpage">external documentation</a>.
+-spec paintPage(This, Canvas, Dc) -> boolean() when
+ This::wxPrintPreview(), Canvas::wxPreviewCanvas:wxPreviewCanvas(), Dc::wxDC:wxDC().
paintPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CanvasT,ref=CanvasRef},#wx_ref{type=DcT,ref=DcRef}) ->
?CLASS(ThisT,wxPrintPreview),
?CLASS(CanvasT,wxPreviewCanvas),
@@ -128,64 +144,71 @@ paintPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CanvasT,ref=CanvasRef},#w
wxe_util:call(?wxPrintPreview_PaintPage,
<<ThisRef:32/?UI,CanvasRef:32/?UI,DcRef:32/?UI>>).
-%% @spec (This::wxPrintPreview(), Interactive::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewprint">external documentation</a>.
+-spec print(This, Interactive) -> boolean() when
+ This::wxPrintPreview(), Interactive::boolean().
print(#wx_ref{type=ThisT,ref=ThisRef},Interactive)
when is_boolean(Interactive) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_Print,
<<ThisRef:32/?UI,(wxe_util:from_bool(Interactive)):32/?UI>>).
-%% @spec (This::wxPrintPreview(), PageNum::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewrenderpage">external documentation</a>.
+-spec renderPage(This, PageNum) -> boolean() when
+ This::wxPrintPreview(), PageNum::integer().
renderPage(#wx_ref{type=ThisT,ref=ThisRef},PageNum)
when is_integer(PageNum) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_RenderPage,
<<ThisRef:32/?UI,PageNum:32/?UI>>).
-%% @spec (This::wxPrintPreview(), Canvas::wxPreviewCanvas:wxPreviewCanvas()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewsetcanvas">external documentation</a>.
+-spec setCanvas(This, Canvas) -> ok when
+ This::wxPrintPreview(), Canvas::wxPreviewCanvas:wxPreviewCanvas().
setCanvas(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CanvasT,ref=CanvasRef}) ->
?CLASS(ThisT,wxPrintPreview),
?CLASS(CanvasT,wxPreviewCanvas),
wxe_util:cast(?wxPrintPreview_SetCanvas,
<<ThisRef:32/?UI,CanvasRef:32/?UI>>).
-%% @spec (This::wxPrintPreview(), PageNum::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewsetcurrentpage">external documentation</a>.
+-spec setCurrentPage(This, PageNum) -> boolean() when
+ This::wxPrintPreview(), PageNum::integer().
setCurrentPage(#wx_ref{type=ThisT,ref=ThisRef},PageNum)
when is_integer(PageNum) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:call(?wxPrintPreview_SetCurrentPage,
<<ThisRef:32/?UI,PageNum:32/?UI>>).
-%% @spec (This::wxPrintPreview(), Frame::wxFrame:wxFrame()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewsetframe">external documentation</a>.
+-spec setFrame(This, Frame) -> ok when
+ This::wxPrintPreview(), Frame::wxFrame:wxFrame().
setFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}) ->
?CLASS(ThisT,wxPrintPreview),
?CLASS(FrameT,wxFrame),
wxe_util:cast(?wxPrintPreview_SetFrame,
<<ThisRef:32/?UI,FrameRef:32/?UI>>).
-%% @spec (This::wxPrintPreview(), Printout::wxPrintout:wxPrintout()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewsetprintout">external documentation</a>.
+-spec setPrintout(This, Printout) -> ok when
+ This::wxPrintPreview(), Printout::wxPrintout:wxPrintout().
setPrintout(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintoutT,ref=PrintoutRef}) ->
?CLASS(ThisT,wxPrintPreview),
?CLASS(PrintoutT,wxPrintout),
wxe_util:cast(?wxPrintPreview_SetPrintout,
<<ThisRef:32/?UI,PrintoutRef:32/?UI>>).
-%% @spec (This::wxPrintPreview(), Percent::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintpreview.html#wxprintpreviewsetzoom">external documentation</a>.
+-spec setZoom(This, Percent) -> ok when
+ This::wxPrintPreview(), Percent::integer().
setZoom(#wx_ref{type=ThisT,ref=ThisRef},Percent)
when is_integer(Percent) ->
?CLASS(ThisT,wxPrintPreview),
wxe_util:cast(?wxPrintPreview_SetZoom,
<<ThisRef:32/?UI,Percent:32/?UI>>).
-%% @spec (This::wxPrintPreview()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPrintPreview()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintPreview),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrinter.erl b/lib/wx/src/gen/wxPrinter.erl
index af9afe18af..031483da4d 100644
--- a/lib/wx/src/gen/wxPrinter.erl
+++ b/lib/wx/src/gen/wxPrinter.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,17 +30,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPrinter/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxPrinter()
+-type wxPrinter() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxPrinter().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxPrinter()
-%% Option = {data, wxPrintDialogData:wxPrintDialogData()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprinterwxprinter">external documentation</a>.
+-spec new([Option]) -> wxPrinter() when
+ Option :: {data, wxPrintDialogData:wxPrintDialogData()}.
new(Options)
when is_list(Options) ->
MOpts = fun({data, #wx_ref{type=DataT,ref=DataRef}}, Acc) -> ?CLASS(DataT,wxPrintDialogData),[<<1:32/?UI,DataRef:32/?UI>>|Acc];
@@ -49,8 +52,9 @@ new(Options)
wxe_util:construct(?wxPrinter_new,
<<BinOpt/binary>>).
-%% @spec (This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprintercreateabortwindow">external documentation</a>.
+-spec createAbortWindow(This, Parent, Printout) -> wxWindow:wxWindow() when
+ This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout().
createAbortWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=PrintoutT,ref=PrintoutRef}) ->
?CLASS(ThisT,wxPrinter),
?CLASS(ParentT,wxWindow),
@@ -58,37 +62,41 @@ createAbortWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=Paren
wxe_util:call(?wxPrinter_CreateAbortWindow,
<<ThisRef:32/?UI,ParentRef:32/?UI,PrintoutRef:32/?UI>>).
-%% @spec (This::wxPrinter()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprintergetabort">external documentation</a>.
+-spec getAbort(This) -> boolean() when
+ This::wxPrinter().
getAbort(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrinter),
wxe_util:call(?wxPrinter_GetAbort,
<<ThisRef:32/?UI>>).
-%% @spec () -> WxPrinterError
-%% WxPrinterError = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprintergetlasterror">external documentation</a>.
-%%<br /> WxPrinterError is one of ?wxPRINTER_NO_ERROR | ?wxPRINTER_CANCELLED | ?wxPRINTER_ERROR
+%%<br /> Res = ?wxPRINTER_NO_ERROR | ?wxPRINTER_CANCELLED | ?wxPRINTER_ERROR
+-spec getLastError() -> wx:wx_enum().
getLastError() ->
wxe_util:call(?wxPrinter_GetLastError,
<<>>).
-%% @spec (This::wxPrinter()) -> wxPrintDialogData:wxPrintDialogData()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprintergetprintdialogdata">external documentation</a>.
+-spec getPrintDialogData(This) -> wxPrintDialogData:wxPrintDialogData() when
+ This::wxPrinter().
getPrintDialogData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrinter),
wxe_util:call(?wxPrinter_GetPrintDialogData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout()) -> bool()
%% @equiv print(This,Parent,Printout, [])
+-spec print(This, Parent, Printout) -> boolean() when
+ This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout().
+
print(This,Parent,Printout)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_record(Printout, wx_ref) ->
print(This,Parent,Printout, []).
-%% @spec (This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout(), [Option]) -> bool()
-%% Option = {prompt, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprinterprint">external documentation</a>.
+-spec print(This, Parent, Printout, [Option]) -> boolean() when
+ This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout(),
+ Option :: {prompt, boolean()}.
print(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=PrintoutT,ref=PrintoutRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxPrinter),
@@ -100,16 +108,18 @@ print(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_re
wxe_util:call(?wxPrinter_Print,
<<ThisRef:32/?UI,ParentRef:32/?UI,PrintoutRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxPrinter(), Parent::wxWindow:wxWindow()) -> wxDC:wxDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprinterprintdialog">external documentation</a>.
+-spec printDialog(This, Parent) -> wxDC:wxDC() when
+ This::wxPrinter(), Parent::wxWindow:wxWindow().
printDialog(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}) ->
?CLASS(ThisT,wxPrinter),
?CLASS(ParentT,wxWindow),
wxe_util:call(?wxPrinter_PrintDialog,
<<ThisRef:32/?UI,ParentRef:32/?UI>>).
-%% @spec (This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout(), Message::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprinterreporterror">external documentation</a>.
+-spec reportError(This, Parent, Printout, Message) -> ok when
+ This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout(), Message::unicode:chardata().
reportError(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=PrintoutT,ref=PrintoutRef},Message)
when is_list(Message) ->
?CLASS(ThisT,wxPrinter),
@@ -119,16 +129,17 @@ reportError(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},
wxe_util:cast(?wxPrinter_ReportError,
<<ThisRef:32/?UI,ParentRef:32/?UI,PrintoutRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxPrinter(), Parent::wxWindow:wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprinter.html#wxprintersetup">external documentation</a>.
+-spec setup(This, Parent) -> boolean() when
+ This::wxPrinter(), Parent::wxWindow:wxWindow().
setup(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}) ->
?CLASS(ThisT,wxPrinter),
?CLASS(ParentT,wxWindow),
wxe_util:call(?wxPrinter_Setup,
<<ThisRef:32/?UI,ParentRef:32/?UI>>).
-%% @spec (This::wxPrinter()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPrinter()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrinter),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintout.erl b/lib/wx/src/gen/wxPrintout.erl
index a34c030275..ab96a09c09 100644
--- a/lib/wx/src/gen/wxPrintout.erl
+++ b/lib/wx/src/gen/wxPrintout.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,9 +34,11 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxPrintout/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxPrintout() :: wx:wx_object().
%% @spec (Title::string(), OnPrintPage::function()) -> wxPrintout:wxPrintout()
%% @doc @equiv new(Title, OnPrintPage, [])
@@ -118,80 +120,91 @@ new(Title, OnPrintPage, Opts) when is_list(Title), is_function(OnPrintPage), is_
OnPrintPageId:32/?UI,
BinOpt/binary>>).
-%% @spec (This::wxPrintout()) -> wxDC:wxDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetdc">external documentation</a>.
+-spec getDC(This) -> wxDC:wxDC() when
+ This::wxPrintout().
getDC(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetDC,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetpagesizemm">external documentation</a>.
+-spec getPageSizeMM(This) -> {W::integer(), H::integer()} when
+ This::wxPrintout().
getPageSizeMM(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetPageSizeMM,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetpagesizepixels">external documentation</a>.
+-spec getPageSizePixels(This) -> {W::integer(), H::integer()} when
+ This::wxPrintout().
getPageSizePixels(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetPageSizePixels,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetpaperrectpixels">external documentation</a>.
+-spec getPaperRectPixels(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxPrintout().
getPaperRectPixels(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetPaperRectPixels,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetppiprinter">external documentation</a>.
+-spec getPPIPrinter(This) -> {X::integer(), Y::integer()} when
+ This::wxPrintout().
getPPIPrinter(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetPPIPrinter,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetppiscreen">external documentation</a>.
+-spec getPPIScreen(This) -> {X::integer(), Y::integer()} when
+ This::wxPrintout().
getPPIScreen(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetPPIScreen,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgettitle">external documentation</a>.
+-spec getTitle(This) -> unicode:charlist() when
+ This::wxPrintout().
getTitle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetTitle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutispreview">external documentation</a>.
+-spec isPreview(This) -> boolean() when
+ This::wxPrintout().
isPreview(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_IsPreview,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout(), ImageSize::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutfitthissizetopaper">external documentation</a>.
+-spec fitThisSizeToPaper(This, ImageSize) -> ok when
+ This::wxPrintout(), ImageSize::{W::integer(), H::integer()}.
fitThisSizeToPaper(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH})
when is_integer(ImageSizeW),is_integer(ImageSizeH) ->
?CLASS(ThisT,wxPrintout),
wxe_util:cast(?wxPrintout_FitThisSizeToPaper,
<<ThisRef:32/?UI,ImageSizeW:32/?UI,ImageSizeH:32/?UI>>).
-%% @spec (This::wxPrintout(), ImageSize::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutfitthissizetopage">external documentation</a>.
+-spec fitThisSizeToPage(This, ImageSize) -> ok when
+ This::wxPrintout(), ImageSize::{W::integer(), H::integer()}.
fitThisSizeToPage(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH})
when is_integer(ImageSizeW),is_integer(ImageSizeH) ->
?CLASS(ThisT,wxPrintout),
wxe_util:cast(?wxPrintout_FitThisSizeToPage,
<<ThisRef:32/?UI,ImageSizeW:32/?UI,ImageSizeH:32/?UI>>).
-%% @spec (This::wxPrintout(), ImageSize::{W::integer(), H::integer()}, PageSetupData::wxPageSetupDialogData:wxPageSetupDialogData()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutfitthissizetopagemargins">external documentation</a>.
+-spec fitThisSizeToPageMargins(This, ImageSize, PageSetupData) -> ok when
+ This::wxPrintout(), ImageSize::{W::integer(), H::integer()}, PageSetupData::wxPageSetupDialogData:wxPageSetupDialogData().
fitThisSizeToPageMargins(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH},#wx_ref{type=PageSetupDataT,ref=PageSetupDataRef})
when is_integer(ImageSizeW),is_integer(ImageSizeH) ->
?CLASS(ThisT,wxPrintout),
@@ -199,75 +212,84 @@ fitThisSizeToPageMargins(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH}
wxe_util:cast(?wxPrintout_FitThisSizeToPageMargins,
<<ThisRef:32/?UI,ImageSizeW:32/?UI,ImageSizeH:32/?UI,PageSetupDataRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutmapscreensizetopaper">external documentation</a>.
+-spec mapScreenSizeToPaper(This) -> ok when
+ This::wxPrintout().
mapScreenSizeToPaper(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:cast(?wxPrintout_MapScreenSizeToPaper,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutmapscreensizetopage">external documentation</a>.
+-spec mapScreenSizeToPage(This) -> ok when
+ This::wxPrintout().
mapScreenSizeToPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:cast(?wxPrintout_MapScreenSizeToPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout(), PageSetupData::wxPageSetupDialogData:wxPageSetupDialogData()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutmapscreensizetopagemargins">external documentation</a>.
+-spec mapScreenSizeToPageMargins(This, PageSetupData) -> ok when
+ This::wxPrintout(), PageSetupData::wxPageSetupDialogData:wxPageSetupDialogData().
mapScreenSizeToPageMargins(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageSetupDataT,ref=PageSetupDataRef}) ->
?CLASS(ThisT,wxPrintout),
?CLASS(PageSetupDataT,wxPageSetupDialogData),
wxe_util:cast(?wxPrintout_MapScreenSizeToPageMargins,
<<ThisRef:32/?UI,PageSetupDataRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutmapscreensizetodevice">external documentation</a>.
+-spec mapScreenSizeToDevice(This) -> ok when
+ This::wxPrintout().
mapScreenSizeToDevice(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:cast(?wxPrintout_MapScreenSizeToDevice,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetlogicalpaperrect">external documentation</a>.
+-spec getLogicalPaperRect(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxPrintout().
getLogicalPaperRect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetLogicalPaperRect,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetlogicalpagerect">external documentation</a>.
+-spec getLogicalPageRect(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxPrintout().
getLogicalPageRect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
wxe_util:call(?wxPrintout_GetLogicalPageRect,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxPrintout(), PageSetupData::wxPageSetupDialogData:wxPageSetupDialogData()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutgetlogicalpagemarginsrect">external documentation</a>.
+-spec getLogicalPageMarginsRect(This, PageSetupData) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxPrintout(), PageSetupData::wxPageSetupDialogData:wxPageSetupDialogData().
getLogicalPageMarginsRect(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageSetupDataT,ref=PageSetupDataRef}) ->
?CLASS(ThisT,wxPrintout),
?CLASS(PageSetupDataT,wxPageSetupDialogData),
wxe_util:call(?wxPrintout_GetLogicalPageMarginsRect,
<<ThisRef:32/?UI,PageSetupDataRef:32/?UI>>).
-%% @spec (This::wxPrintout(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutsetlogicalorigin">external documentation</a>.
+-spec setLogicalOrigin(This, X, Y) -> ok when
+ This::wxPrintout(), X::integer(), Y::integer().
setLogicalOrigin(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxPrintout),
wxe_util:cast(?wxPrintout_SetLogicalOrigin,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxPrintout(), Xoff::integer(), Yoff::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprintout.html#wxprintoutoffsetlogicalorigin">external documentation</a>.
+-spec offsetLogicalOrigin(This, Xoff, Yoff) -> ok when
+ This::wxPrintout(), Xoff::integer(), Yoff::integer().
offsetLogicalOrigin(#wx_ref{type=ThisT,ref=ThisRef},Xoff,Yoff)
when is_integer(Xoff),is_integer(Yoff) ->
?CLASS(ThisT,wxPrintout),
wxe_util:cast(?wxPrintout_OffsetLogicalOrigin,
<<ThisRef:32/?UI,Xoff:32/?UI,Yoff:32/?UI>>).
-%% @spec (This::wxPrintout()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPrintout()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintout),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxProgressDialog.erl b/lib/wx/src/gen/wxProgressDialog.erl
index 69e73454b5..0f42c1d68f 100644
--- a/lib/wx/src/gen/wxProgressDialog.erl
+++ b/lib/wx/src/gen/wxProgressDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxProgressDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,15 +85,21 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Title::string(), Message::string()) -> wxProgressDialog()
+-type wxProgressDialog() :: wx:wx_object().
%% @equiv new(Title,Message, [])
+-spec new(Title, Message) -> wxProgressDialog() when
+ Title::unicode:chardata(), Message::unicode:chardata().
+
new(Title,Message)
when is_list(Title),is_list(Message) ->
new(Title,Message, []).
-%% @spec (Title::string(), Message::string(), [Option]) -> wxProgressDialog()
-%% Option = {maximum, integer()} | {parent, wxWindow:wxWindow()} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprogressdialog.html#wxprogressdialogwxprogressdialog">external documentation</a>.
+-spec new(Title, Message, [Option]) -> wxProgressDialog() when
+ Title::unicode:chardata(), Message::unicode:chardata(),
+ Option :: {maximum, integer()}
+ | {parent, wxWindow:wxWindow()}
+ | {style, integer()}.
new(Title,Message, Options)
when is_list(Title),is_list(Message),is_list(Options) ->
Title_UC = unicode:characters_to_binary([Title,0]),
@@ -105,29 +112,34 @@ new(Title,Message, Options)
wxe_util:construct(?wxProgressDialog_new,
<<(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((4+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxProgressDialog()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprogressdialog.html#wxprogressdialogresume">external documentation</a>.
+-spec resume(This) -> ok when
+ This::wxProgressDialog().
resume(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxProgressDialog),
wxe_util:cast(?wxProgressDialog_Resume,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxProgressDialog()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprogressdialog.html#wxprogressdialogupdate">external documentation</a>.
+-spec update(This) -> ok when
+ This::wxProgressDialog().
update(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxProgressDialog),
wxe_util:cast(?wxProgressDialog_Update_0,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxProgressDialog(), Value::integer()) -> bool()
%% @equiv update(This,Value, [])
+-spec update(This, Value) -> boolean() when
+ This::wxProgressDialog(), Value::integer().
+
update(This,Value)
when is_record(This, wx_ref),is_integer(Value) ->
update(This,Value, []).
-%% @spec (This::wxProgressDialog(), Value::integer(), [Option]) -> bool()
-%% Option = {newmsg, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxprogressdialog.html#wxprogressdialogupdate">external documentation</a>.
+-spec update(This, Value, [Option]) -> boolean() when
+ This::wxProgressDialog(), Value::integer(),
+ Option :: {newmsg, unicode:chardata()}.
update(#wx_ref{type=ThisT,ref=ThisRef},Value, Options)
when is_integer(Value),is_list(Options) ->
?CLASS(ThisT,wxProgressDialog),
@@ -137,8 +149,8 @@ update(#wx_ref{type=ThisT,ref=ThisRef},Value, Options)
wxe_util:call(?wxProgressDialog_Update_2,
<<ThisRef:32/?UI,Value:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxProgressDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxProgressDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxProgressDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxQueryNewPaletteEvent.erl b/lib/wx/src/gen/wxQueryNewPaletteEvent.erl
index 96c493e4a6..8123d62fe1 100644
--- a/lib/wx/src/gen/wxQueryNewPaletteEvent.erl
+++ b/lib/wx/src/gen/wxQueryNewPaletteEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,20 +37,24 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxQueryNewPaletteEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxQueryNewPaletteEvent(), Realized::bool()) -> ok
+-type wxQueryNewPaletteEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxquerynewpaletteevent.html#wxquerynewpaletteeventsetpaletterealized">external documentation</a>.
+-spec setPaletteRealized(This, Realized) -> ok when
+ This::wxQueryNewPaletteEvent(), Realized::boolean().
setPaletteRealized(#wx_ref{type=ThisT,ref=ThisRef},Realized)
when is_boolean(Realized) ->
?CLASS(ThisT,wxQueryNewPaletteEvent),
wxe_util:cast(?wxQueryNewPaletteEvent_SetPaletteRealized,
<<ThisRef:32/?UI,(wxe_util:from_bool(Realized)):32/?UI>>).
-%% @spec (This::wxQueryNewPaletteEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxquerynewpaletteevent.html#wxquerynewpaletteeventgetpaletterealized">external documentation</a>.
+-spec getPaletteRealized(This) -> boolean() when
+ This::wxQueryNewPaletteEvent().
getPaletteRealized(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxQueryNewPaletteEvent),
wxe_util:call(?wxQueryNewPaletteEvent_GetPaletteRealized,
diff --git a/lib/wx/src/gen/wxRadioBox.erl b/lib/wx/src/gen/wxRadioBox.erl
index 766a691108..7843fde488 100644
--- a/lib/wx/src/gen/wxRadioBox.erl
+++ b/lib/wx/src/gen/wxRadioBox.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,21 +72,28 @@
thaw/1,transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxRadioBox/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]]) -> wxRadioBox()
+-type wxRadioBox() :: wx:wx_object().
%% @equiv new(Parent,Id,Title,Pos,Size,Choices, [])
+-spec new(Parent, Id, Title, Pos, Size, Choices) -> wxRadioBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]].
+
new(Parent,Id,Title,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Title),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices) ->
new(Parent,Id,Title,Pos,Size,Choices, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]], [Option]) -> wxRadioBox()
-%% Option = {majorDim, integer()} | {style, integer()} | {val, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxwxradiobox">external documentation</a>.
+-spec new(Parent, Id, Title, Pos, Size, Choices, [Option]) -> wxRadioBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]],
+ Option :: {majorDim, integer()}
+ | {style, integer()}
+ | {val, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_list(Title),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -101,15 +108,20 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title,{PosX,PosY},{SizeW,SizeH},Choic
wxe_util:construct(?wxRadioBox_new,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((4 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxRadioBox(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]]) -> bool()
%% @equiv create(This,Parent,Id,Title,Pos,Size,Choices, [])
+-spec create(This, Parent, Id, Title, Pos, Size, Choices) -> boolean() when
+ This::wxRadioBox(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]].
+
create(This,Parent,Id,Title,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Title),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices) ->
create(This,Parent,Id,Title,Pos,Size,Choices, []).
-%% @spec (This::wxRadioBox(), Parent::wxWindow:wxWindow(), Id::integer(), Title::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]], [Option]) -> bool()
-%% Option = {majorDim, integer()} | {style, integer()} | {val, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxcreate">external documentation</a>.
+-spec create(This, Parent, Id, Title, Pos, Size, Choices, [Option]) -> boolean() when
+ This::wxRadioBox(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[unicode:chardata()]],
+ Option :: {majorDim, integer()}
+ | {style, integer()}
+ | {val, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_list(Title),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ThisT,wxRadioBox),
@@ -125,21 +137,25 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ti
wxe_util:call(?wxRadioBox_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((4 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxRadioBox()) -> bool()
%% @equiv enable(This, [])
+-spec enable(This) -> boolean() when
+ This::wxRadioBox().
+
enable(This)
when is_record(This, wx_ref) ->
enable(This, []).
-%% @spec (This::wxRadioBox(),X::integer()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxenable">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% enable(This::wxRadioBox(), N::integer()) -> enable(This,N, []) </c></p>
-%% <p><c>
-%% enable(This::wxRadioBox(), [Option]) -> bool() </c>
-%%<br /> Option = {enable, bool()}
-%% </p>
+%% <br /> Also:<br />
+%% enable(This, [Option]) -> boolean() when<br />
+%% This::wxRadioBox(),<br />
+%% Option :: {enable, boolean()}.<br />
+%%
+-spec enable(This, N) -> boolean() when
+ This::wxRadioBox(), N::integer();
+ (This, [Option]) -> boolean() when
+ This::wxRadioBox(),
+ Option :: {enable, boolean()}.
enable(This,N)
when is_record(This, wx_ref),is_integer(N) ->
@@ -153,9 +169,10 @@ enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxRadioBox_Enable_1,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxRadioBox(), N::integer(), [Option]) -> bool()
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxenable">external documentation</a>.
+-spec enable(This, N, [Option]) -> boolean() when
+ This::wxRadioBox(), N::integer(),
+ Option :: {enable, boolean()}.
enable(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
when is_integer(N),is_list(Options) ->
?CLASS(ThisT,wxRadioBox),
@@ -165,44 +182,51 @@ enable(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
wxe_util:call(?wxRadioBox_Enable_2,
<<ThisRef:32/?UI,N:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxRadioBox()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxRadioBox().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxRadioBox(), N::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxgetstring">external documentation</a>.
+-spec getString(This, N) -> unicode:charlist() when
+ This::wxRadioBox(), N::integer().
getString(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_GetString,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxRadioBox(), N::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxsetselection">external documentation</a>.
+-spec setSelection(This, N) -> ok when
+ This::wxRadioBox(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:cast(?wxRadioBox_SetSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxRadioBox()) -> bool()
%% @equiv show(This, [])
+-spec show(This) -> boolean() when
+ This::wxRadioBox().
+
show(This)
when is_record(This, wx_ref) ->
show(This, []).
-%% @spec (This::wxRadioBox(),X::integer()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxshow">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% show(This::wxRadioBox(), N::integer()) -> show(This,N, []) </c></p>
-%% <p><c>
-%% show(This::wxRadioBox(), [Option]) -> bool() </c>
-%%<br /> Option = {show, bool()}
-%% </p>
+%% <br /> Also:<br />
+%% show(This, [Option]) -> boolean() when<br />
+%% This::wxRadioBox(),<br />
+%% Option :: {show, boolean()}.<br />
+%%
+-spec show(This, N) -> boolean() when
+ This::wxRadioBox(), N::integer();
+ (This, [Option]) -> boolean() when
+ This::wxRadioBox(),
+ Option :: {show, boolean()}.
show(This,N)
when is_record(This, wx_ref),is_integer(N) ->
@@ -216,9 +240,10 @@ show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxRadioBox_Show_1,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxRadioBox(), N::integer(), [Option]) -> bool()
-%% Option = {show, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxshow">external documentation</a>.
+-spec show(This, N, [Option]) -> boolean() when
+ This::wxRadioBox(), N::integer(),
+ Option :: {show, boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
when is_integer(N),is_list(Options) ->
?CLASS(ThisT,wxRadioBox),
@@ -228,62 +253,70 @@ show(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
wxe_util:call(?wxRadioBox_Show_2,
<<ThisRef:32/?UI,N:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxRadioBox()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxgetcolumncount">external documentation</a>.
+-spec getColumnCount(This) -> integer() when
+ This::wxRadioBox().
getColumnCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_GetColumnCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxRadioBox(), N::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxgetitemhelptext">external documentation</a>.
+-spec getItemHelpText(This, N) -> unicode:charlist() when
+ This::wxRadioBox(), N::integer().
getItemHelpText(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_GetItemHelpText,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxRadioBox(), Item::integer()) -> wxToolTip:wxToolTip()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxgetitemtooltip">external documentation</a>.
+-spec getItemToolTip(This, Item) -> wxToolTip:wxToolTip() when
+ This::wxRadioBox(), Item::integer().
getItemToolTip(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_GetItemToolTip,
<<ThisRef:32/?UI,Item:32/?UI>>).
-%% @spec (This::wxRadioBox(), Pt::{X::integer(), Y::integer()}) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxgetitemfrompoint">external documentation</a>.
+-spec getItemFromPoint(This, Pt) -> integer() when
+ This::wxRadioBox(), Pt::{X::integer(), Y::integer()}.
getItemFromPoint(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_GetItemFromPoint,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxRadioBox()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxgetrowcount">external documentation</a>.
+-spec getRowCount(This) -> integer() when
+ This::wxRadioBox().
getRowCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_GetRowCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxRadioBox(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxisitemenabled">external documentation</a>.
+-spec isItemEnabled(This, N) -> boolean() when
+ This::wxRadioBox(), N::integer().
isItemEnabled(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_IsItemEnabled,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxRadioBox(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxisitemshown">external documentation</a>.
+-spec isItemShown(This, N) -> boolean() when
+ This::wxRadioBox(), N::integer().
isItemShown(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxRadioBox),
wxe_util:call(?wxRadioBox_IsItemShown,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxRadioBox(), N::integer(), HelpText::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxsetitemhelptext">external documentation</a>.
+-spec setItemHelpText(This, N, HelpText) -> ok when
+ This::wxRadioBox(), N::integer(), HelpText::unicode:chardata().
setItemHelpText(#wx_ref{type=ThisT,ref=ThisRef},N,HelpText)
when is_integer(N),is_list(HelpText) ->
?CLASS(ThisT,wxRadioBox),
@@ -291,8 +324,9 @@ setItemHelpText(#wx_ref{type=ThisT,ref=ThisRef},N,HelpText)
wxe_util:cast(?wxRadioBox_SetItemHelpText,
<<ThisRef:32/?UI,N:32/?UI,(byte_size(HelpText_UC)):32/?UI,(HelpText_UC)/binary, 0:(((8- ((4+byte_size(HelpText_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxRadioBox(), Item::integer(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobox.html#wxradioboxsetitemtooltip">external documentation</a>.
+-spec setItemToolTip(This, Item, Text) -> ok when
+ This::wxRadioBox(), Item::integer(), Text::unicode:chardata().
setItemToolTip(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
when is_integer(Item),is_list(Text) ->
?CLASS(ThisT,wxRadioBox),
@@ -300,8 +334,8 @@ setItemToolTip(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
wxe_util:cast(?wxRadioBox_SetItemToolTip,
<<ThisRef:32/?UI,Item:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxRadioBox()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxRadioBox()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxRadioBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxRadioButton.erl b/lib/wx/src/gen/wxRadioButton.erl
index c4665837b5..beb052b873 100644
--- a/lib/wx/src/gen/wxRadioButton.erl
+++ b/lib/wx/src/gen/wxRadioButton.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -69,27 +69,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxRadioButton/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxRadioButton()
+-type wxRadioButton() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobutton.html#wxradiobuttonwxradiobutton">external documentation</a>.
+-spec new() -> wxRadioButton().
new() ->
wxe_util:construct(?wxRadioButton_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> wxRadioButton()
%% @equiv new(Parent,Id,Label, [])
+-spec new(Parent, Id, Label) -> wxRadioButton() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
new(Parent,Id,Label)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
new(Parent,Id,Label, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> wxRadioButton()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobutton.html#wxradiobuttonwxradiobutton">external documentation</a>.
+-spec new(Parent, Id, Label, [Option]) -> wxRadioButton() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -103,15 +111,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
wxe_util:construct(?wxRadioButton_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxRadioButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> bool()
%% @equiv create(This,Parent,Id,Label, [])
+-spec create(This, Parent, Id, Label) -> boolean() when
+ This::wxRadioButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
create(This,Parent,Id,Label)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
create(This,Parent,Id,Label, []).
-%% @spec (This::wxRadioButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobutton.html#wxradiobuttoncreate">external documentation</a>.
+-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
+ This::wxRadioButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxRadioButton),
@@ -126,23 +140,25 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,La
wxe_util:call(?wxRadioButton_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxRadioButton()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobutton.html#wxradiobuttongetvalue">external documentation</a>.
+-spec getValue(This) -> boolean() when
+ This::wxRadioButton().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRadioButton),
wxe_util:call(?wxRadioButton_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxRadioButton(), Val::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxradiobutton.html#wxradiobuttonsetvalue">external documentation</a>.
+-spec setValue(This, Val) -> ok when
+ This::wxRadioButton(), Val::boolean().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Val)
when is_boolean(Val) ->
?CLASS(ThisT,wxRadioButton),
wxe_util:cast(?wxRadioButton_SetValue,
<<ThisRef:32/?UI,(wxe_util:from_bool(Val)):32/?UI>>).
-%% @spec (This::wxRadioButton()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxRadioButton()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxRadioButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxRegion.erl b/lib/wx/src/gen/wxRegion.erl
index 9107a4d6b1..3e23623741 100644
--- a/lib/wx/src/gen/wxRegion.erl
+++ b/lib/wx/src/gen/wxRegion.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,24 +32,26 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxRegion/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxRegion()
+-type wxRegion() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionwxregion">external documentation</a>.
+-spec new() -> wxRegion().
new() ->
wxe_util:construct(?wxRegion_new_0,
<<>>).
-%% @spec (X::term()) -> wxRegion()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionwxregion">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Bmp::wxBitmap:wxBitmap()) -> wxRegion() </c>
-%% </p>
-%% <p><c>
-%% new(Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> wxRegion() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(Rect) -> wxRegion() when<br />
+%% Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+-spec new(Bmp) -> wxRegion() when
+ Bmp::wxBitmap:wxBitmap();
+ (Rect) -> wxRegion() when
+ Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
new(#wx_ref{type=BmpT,ref=BmpRef}) ->
?CLASS(BmpT,wxBitmap),
wxe_util:construct(?wxRegion_new_1_0,
@@ -59,40 +61,40 @@ new({RectX,RectY,RectW,RectH})
wxe_util:construct(?wxRegion_new_1_1,
<<RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (TopLeft::{X::integer(), Y::integer()}, BottomRight::{X::integer(), Y::integer()}) -> wxRegion()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionwxregion">external documentation</a>.
+-spec new(TopLeft, BottomRight) -> wxRegion() when
+ TopLeft::{X::integer(), Y::integer()}, BottomRight::{X::integer(), Y::integer()}.
new({TopLeftX,TopLeftY},{BottomRightX,BottomRightY})
when is_integer(TopLeftX),is_integer(TopLeftY),is_integer(BottomRightX),is_integer(BottomRightY) ->
wxe_util:construct(?wxRegion_new_2,
<<TopLeftX:32/?UI,TopLeftY:32/?UI,BottomRightX:32/?UI,BottomRightY:32/?UI>>).
-%% @spec (X::integer(), Y::integer(), W::integer(), H::integer()) -> wxRegion()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionwxregion">external documentation</a>.
+-spec new(X, Y, W, H) -> wxRegion() when
+ X::integer(), Y::integer(), W::integer(), H::integer().
new(X,Y,W,H)
when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
wxe_util:construct(?wxRegion_new_4,
<<X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
-%% @spec (This::wxRegion()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionclear">external documentation</a>.
+-spec clear(This) -> ok when
+ This::wxRegion().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRegion),
wxe_util:cast(?wxRegion_Clear,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxRegion(),X::term()) -> WxRegionContain
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregioncontains">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% contains(This::wxRegion(), Pt::{X::integer(), Y::integer()}) -> WxRegionContain </c>
-%%<br /> WxRegionContain = integer()
-%%<br /> WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion
-%% </p>
-%% <p><c>
-%% contains(This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> WxRegionContain </c>
-%%<br /> WxRegionContain = integer()
-%%<br /> WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion
-%% </p>
+%% <br /> Also:<br />
+%% contains(This, Rect) -> wx:wx_enum() when<br />
+%% This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+%%<br /> Res = ?wxOutRegion | ?wxPartRegion | ?wxInRegion
+-spec contains(This, Pt) -> wx:wx_enum() when
+ This::wxRegion(), Pt::{X::integer(), Y::integer()};
+ (This, Rect) -> wx:wx_enum() when
+ This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
contains(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxRegion),
@@ -104,49 +106,51 @@ contains(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
wxe_util:call(?wxRegion_Contains_1_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxRegion(), X::integer(), Y::integer()) -> WxRegionContain
-%% WxRegionContain = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregioncontains">external documentation</a>.
-%%<br /> WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion
+%%<br /> Res = ?wxOutRegion | ?wxPartRegion | ?wxInRegion
+-spec contains(This, X, Y) -> wx:wx_enum() when
+ This::wxRegion(), X::integer(), Y::integer().
contains(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_Contains_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> WxRegionContain
-%% WxRegionContain = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregioncontains">external documentation</a>.
-%%<br /> WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion
+%%<br /> Res = ?wxOutRegion | ?wxPartRegion | ?wxInRegion
+-spec contains(This, X, Y, W, H) -> wx:wx_enum() when
+ This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer().
contains(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_Contains_4,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
-%% @spec (This::wxRegion()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionconverttobitmap">external documentation</a>.
+-spec convertToBitmap(This) -> wxBitmap:wxBitmap() when
+ This::wxRegion().
convertToBitmap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_ConvertToBitmap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxRegion()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregiongetbox">external documentation</a>.
+-spec getBox(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxRegion().
getBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_GetBox,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxRegion(),X::wxRegion()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionintersect">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% intersect(This::wxRegion(), Region::wxRegion()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% intersect(This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% intersect(This, Rect) -> boolean() when<br />
+%% This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+-spec intersect(This, Region) -> boolean() when
+ This::wxRegion(), Region::wxRegion();
+ (This, Rect) -> boolean() when
+ This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
intersect(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxRegion),
?CLASS(RegionT,wxRegion),
@@ -158,30 +162,32 @@ intersect(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
wxe_util:call(?wxRegion_Intersect_1_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionintersect">external documentation</a>.
+-spec intersect(This, X, Y, W, H) -> boolean() when
+ This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer().
intersect(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_Intersect_4,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
-%% @spec (This::wxRegion()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionisempty">external documentation</a>.
+-spec isEmpty(This) -> boolean() when
+ This::wxRegion().
isEmpty(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_IsEmpty,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxRegion(),X::wxRegion()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionsubtract">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% subtract(This::wxRegion(), Region::wxRegion()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% subtract(This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% subtract(This, Rect) -> boolean() when<br />
+%% This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+-spec subtract(This, Region) -> boolean() when
+ This::wxRegion(), Region::wxRegion();
+ (This, Rect) -> boolean() when
+ This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
subtract(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxRegion),
?CLASS(RegionT,wxRegion),
@@ -193,39 +199,42 @@ subtract(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
wxe_util:call(?wxRegion_Subtract_1_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionsubtract">external documentation</a>.
+-spec subtract(This, X, Y, W, H) -> boolean() when
+ This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer().
subtract(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_Subtract_4,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
-%% @spec (This::wxRegion(), Pt::{X::integer(), Y::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionoffset">external documentation</a>.
+-spec offset(This, Pt) -> boolean() when
+ This::wxRegion(), Pt::{X::integer(), Y::integer()}.
offset(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_Offset_1,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxRegion(), X::integer(), Y::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionoffset">external documentation</a>.
+-spec offset(This, X, Y) -> boolean() when
+ This::wxRegion(), X::integer(), Y::integer().
offset(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_Offset_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxRegion(),X::term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionunion">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% union(This::wxRegion(), Region::wxRegion() | wxBitmap:wxBitmap()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% union(This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% union(This, Rect) -> boolean() when<br />
+%% This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+-spec union(This, Region) -> boolean() when
+ This::wxRegion(), Region::wxRegion() | wxBitmap:wxBitmap();
+ (This, Rect) -> boolean() when
+ This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
union(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxRegion),
RegionOP = case ?CLASS_T(RegionT,wxRegion) of
@@ -242,15 +251,18 @@ union(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
wxe_util:call(?wxRegion_Union_1_2,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxRegion(), Bmp::wxBitmap:wxBitmap(), Transp::wx:colour()) -> bool()
%% @equiv union(This,Bmp,Transp, [])
+-spec union(This, Bmp, Transp) -> boolean() when
+ This::wxRegion(), Bmp::wxBitmap:wxBitmap(), Transp::wx:wx_colour().
+
union(This,Bmp,Transp)
when is_record(This, wx_ref),is_record(Bmp, wx_ref),tuple_size(Transp) =:= 3; tuple_size(Transp) =:= 4 ->
union(This,Bmp,Transp, []).
-%% @spec (This::wxRegion(), Bmp::wxBitmap:wxBitmap(), Transp::wx:colour(), [Option]) -> bool()
-%% Option = {tolerance, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionunion">external documentation</a>.
+-spec union(This, Bmp, Transp, [Option]) -> boolean() when
+ This::wxRegion(), Bmp::wxBitmap:wxBitmap(), Transp::wx:wx_colour(),
+ Option :: {tolerance, integer()}.
union(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},Transp, Options)
when tuple_size(Transp) =:= 3; tuple_size(Transp) =:= 4,is_list(Options) ->
?CLASS(ThisT,wxRegion),
@@ -261,23 +273,24 @@ union(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},Transp, Opti
wxe_util:call(?wxRegion_Union_3,
<<ThisRef:32/?UI,BmpRef:32/?UI,(wxe_util:colour_bin(Transp)):16/binary, BinOpt/binary>>).
-%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionunion">external documentation</a>.
+-spec union(This, X, Y, W, H) -> boolean() when
+ This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer().
union(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_Union_4,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
-%% @spec (This::wxRegion(),X::wxRegion()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionxor">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% 'Xor'(This::wxRegion(), Region::wxRegion()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% 'Xor'(This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% 'Xor'(This, Rect) -> boolean() when<br />
+%% This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+-spec 'Xor'(This, Region) -> boolean() when
+ This::wxRegion(), Region::wxRegion();
+ (This, Rect) -> boolean() when
+ This::wxRegion(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
'Xor'(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxRegion),
?CLASS(RegionT,wxRegion),
@@ -289,16 +302,17 @@ union(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
wxe_util:call(?wxRegion_Xor_1_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxregion.html#wxregionxor">external documentation</a>.
+-spec 'Xor'(This, X, Y, W, H) -> boolean() when
+ This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer().
'Xor'(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
?CLASS(ThisT,wxRegion),
wxe_util:call(?wxRegion_Xor_4,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
-%% @spec (This::wxRegion()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxRegion()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxRegion),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSashEvent.erl b/lib/wx/src/gen/wxSashEvent.erl
index f9c58a04b1..6ca4bf73ea 100644
--- a/lib/wx/src/gen/wxSashEvent.erl
+++ b/lib/wx/src/gen/wxSashEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,31 +40,34 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxSashEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxSashEvent()) -> WxSashEdgePosition
-%% WxSashEdgePosition = integer()
+-type wxSashEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashevent.html#wxsasheventgetedge">external documentation</a>.
-%%<br /> WxSashEdgePosition is one of ?wxSASH_TOP | ?wxSASH_RIGHT | ?wxSASH_BOTTOM | ?wxSASH_LEFT | ?wxSASH_NONE
+%%<br /> Res = ?wxSASH_TOP | ?wxSASH_RIGHT | ?wxSASH_BOTTOM | ?wxSASH_LEFT | ?wxSASH_NONE
+-spec getEdge(This) -> wx:wx_enum() when
+ This::wxSashEvent().
getEdge(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashEvent),
wxe_util:call(?wxSashEvent_GetEdge,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSashEvent()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashevent.html#wxsasheventgetdragrect">external documentation</a>.
+-spec getDragRect(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxSashEvent().
getDragRect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashEvent),
wxe_util:call(?wxSashEvent_GetDragRect,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSashEvent()) -> WxSashDragStatus
-%% WxSashDragStatus = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashevent.html#wxsasheventgetdragstatus">external documentation</a>.
-%%<br /> WxSashDragStatus is one of ?wxSASH_STATUS_OK | ?wxSASH_STATUS_OUT_OF_RANGE
+%%<br /> Res = ?wxSASH_STATUS_OK | ?wxSASH_STATUS_OUT_OF_RANGE
+-spec getDragStatus(This) -> wx:wx_enum() when
+ This::wxSashEvent().
getDragStatus(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashEvent),
wxe_util:call(?wxSashEvent_GetDragStatus,
diff --git a/lib/wx/src/gen/wxSashLayoutWindow.erl b/lib/wx/src/gen/wxSashLayoutWindow.erl
index eb8eb38011..f833f59479 100644
--- a/lib/wx/src/gen/wxSashLayoutWindow.erl
+++ b/lib/wx/src/gen/wxSashLayoutWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,27 +74,35 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxSashLayoutWindow/0]).
%% @hidden
parent_class(wxSashWindow) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSashLayoutWindow()
+-type wxSashLayoutWindow() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashlayoutwindow.html#wxsashlayoutwindowwxsashlayoutwindow">external documentation</a>.
+-spec new() -> wxSashLayoutWindow().
new() ->
wxe_util:construct(?wxSashLayoutWindow_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxSashLayoutWindow()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxSashLayoutWindow() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxSashLayoutWindow()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashlayoutwindow.html#wxsashlayoutwindowwxsashlayoutwindow">external documentation</a>.
+-spec new(Parent, [Option]) -> wxSashLayoutWindow() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -107,15 +115,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxSashLayoutWindow_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSashLayoutWindow(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxSashLayoutWindow(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxSashLayoutWindow(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashlayoutwindow.html#wxsashlayoutwindowcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxSashLayoutWindow(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSashLayoutWindow),
@@ -129,54 +143,55 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxSashLayoutWindow_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSashLayoutWindow()) -> WxLayoutAlignment
-%% WxLayoutAlignment = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashlayoutwindow.html#wxsashlayoutwindowgetalignment">external documentation</a>.
-%%<br /> WxLayoutAlignment is one of ?wxLAYOUT_NONE | ?wxLAYOUT_TOP | ?wxLAYOUT_LEFT | ?wxLAYOUT_RIGHT | ?wxLAYOUT_BOTTOM
+%%<br /> Res = ?wxLAYOUT_NONE | ?wxLAYOUT_TOP | ?wxLAYOUT_LEFT | ?wxLAYOUT_RIGHT | ?wxLAYOUT_BOTTOM
+-spec getAlignment(This) -> wx:wx_enum() when
+ This::wxSashLayoutWindow().
getAlignment(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashLayoutWindow),
wxe_util:call(?wxSashLayoutWindow_GetAlignment,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSashLayoutWindow()) -> WxLayoutOrientation
-%% WxLayoutOrientation = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashlayoutwindow.html#wxsashlayoutwindowgetorientation">external documentation</a>.
-%%<br /> WxLayoutOrientation is one of ?wxLAYOUT_HORIZONTAL | ?wxLAYOUT_VERTICAL
+%%<br /> Res = ?wxLAYOUT_HORIZONTAL | ?wxLAYOUT_VERTICAL
+-spec getOrientation(This) -> wx:wx_enum() when
+ This::wxSashLayoutWindow().
getOrientation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashLayoutWindow),
wxe_util:call(?wxSashLayoutWindow_GetOrientation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSashLayoutWindow(), Align::WxLayoutAlignment) -> ok
-%% WxLayoutAlignment = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashlayoutwindow.html#wxsashlayoutwindowsetalignment">external documentation</a>.
-%%<br /> WxLayoutAlignment is one of ?wxLAYOUT_NONE | ?wxLAYOUT_TOP | ?wxLAYOUT_LEFT | ?wxLAYOUT_RIGHT | ?wxLAYOUT_BOTTOM
+%%<br /> Align = ?wxLAYOUT_NONE | ?wxLAYOUT_TOP | ?wxLAYOUT_LEFT | ?wxLAYOUT_RIGHT | ?wxLAYOUT_BOTTOM
+-spec setAlignment(This, Align) -> ok when
+ This::wxSashLayoutWindow(), Align::wx:wx_enum().
setAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align)
when is_integer(Align) ->
?CLASS(ThisT,wxSashLayoutWindow),
wxe_util:cast(?wxSashLayoutWindow_SetAlignment,
<<ThisRef:32/?UI,Align:32/?UI>>).
-%% @spec (This::wxSashLayoutWindow(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashlayoutwindow.html#wxsashlayoutwindowsetdefaultsize">external documentation</a>.
+-spec setDefaultSize(This, Size) -> ok when
+ This::wxSashLayoutWindow(), Size::{W::integer(), H::integer()}.
setDefaultSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSashLayoutWindow),
wxe_util:cast(?wxSashLayoutWindow_SetDefaultSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxSashLayoutWindow(), Orient::WxLayoutOrientation) -> ok
-%% WxLayoutOrientation = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashlayoutwindow.html#wxsashlayoutwindowsetorientation">external documentation</a>.
-%%<br /> WxLayoutOrientation is one of ?wxLAYOUT_HORIZONTAL | ?wxLAYOUT_VERTICAL
+%%<br /> Orient = ?wxLAYOUT_HORIZONTAL | ?wxLAYOUT_VERTICAL
+-spec setOrientation(This, Orient) -> ok when
+ This::wxSashLayoutWindow(), Orient::wx:wx_enum().
setOrientation(#wx_ref{type=ThisT,ref=ThisRef},Orient)
when is_integer(Orient) ->
?CLASS(ThisT,wxSashLayoutWindow),
wxe_util:cast(?wxSashLayoutWindow_SetOrientation,
<<ThisRef:32/?UI,Orient:32/?UI>>).
-%% @spec (This::wxSashLayoutWindow()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSashLayoutWindow()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSashLayoutWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSashWindow.erl b/lib/wx/src/gen/wxSashWindow.erl
index 698cfb8fb6..7d85e05af8 100644
--- a/lib/wx/src/gen/wxSashWindow.erl
+++ b/lib/wx/src/gen/wxSashWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,26 +70,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxSashWindow/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSashWindow()
+-type wxSashWindow() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowwxsashwindow">external documentation</a>.
+-spec new() -> wxSashWindow().
new() ->
wxe_util:construct(?wxSashWindow_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxSashWindow()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxSashWindow() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxSashWindow()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowwxsashwindow">external documentation</a>.
+-spec new(Parent, [Option]) -> wxSashWindow() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -102,88 +110,96 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxSashWindow_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSashWindow(), Edge::WxSashEdgePosition) -> bool()
-%% WxSashEdgePosition = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowgetsashvisible">external documentation</a>.
-%%<br /> WxSashEdgePosition is one of ?wxSASH_TOP | ?wxSASH_RIGHT | ?wxSASH_BOTTOM | ?wxSASH_LEFT | ?wxSASH_NONE
+%%<br /> Edge = ?wxSASH_TOP | ?wxSASH_RIGHT | ?wxSASH_BOTTOM | ?wxSASH_LEFT | ?wxSASH_NONE
+-spec getSashVisible(This, Edge) -> boolean() when
+ This::wxSashWindow(), Edge::wx:wx_enum().
getSashVisible(#wx_ref{type=ThisT,ref=ThisRef},Edge)
when is_integer(Edge) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:call(?wxSashWindow_GetSashVisible,
<<ThisRef:32/?UI,Edge:32/?UI>>).
-%% @spec (This::wxSashWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowgetmaximumsizex">external documentation</a>.
+-spec getMaximumSizeX(This) -> integer() when
+ This::wxSashWindow().
getMaximumSizeX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:call(?wxSashWindow_GetMaximumSizeX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSashWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowgetmaximumsizey">external documentation</a>.
+-spec getMaximumSizeY(This) -> integer() when
+ This::wxSashWindow().
getMaximumSizeY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:call(?wxSashWindow_GetMaximumSizeY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSashWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowgetminimumsizex">external documentation</a>.
+-spec getMinimumSizeX(This) -> integer() when
+ This::wxSashWindow().
getMinimumSizeX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:call(?wxSashWindow_GetMinimumSizeX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSashWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowgetminimumsizey">external documentation</a>.
+-spec getMinimumSizeY(This) -> integer() when
+ This::wxSashWindow().
getMinimumSizeY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:call(?wxSashWindow_GetMinimumSizeY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSashWindow(), Max::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowsetmaximumsizex">external documentation</a>.
+-spec setMaximumSizeX(This, Max) -> ok when
+ This::wxSashWindow(), Max::integer().
setMaximumSizeX(#wx_ref{type=ThisT,ref=ThisRef},Max)
when is_integer(Max) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:cast(?wxSashWindow_SetMaximumSizeX,
<<ThisRef:32/?UI,Max:32/?UI>>).
-%% @spec (This::wxSashWindow(), Max::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowsetmaximumsizey">external documentation</a>.
+-spec setMaximumSizeY(This, Max) -> ok when
+ This::wxSashWindow(), Max::integer().
setMaximumSizeY(#wx_ref{type=ThisT,ref=ThisRef},Max)
when is_integer(Max) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:cast(?wxSashWindow_SetMaximumSizeY,
<<ThisRef:32/?UI,Max:32/?UI>>).
-%% @spec (This::wxSashWindow(), Min::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowsetminimumsizex">external documentation</a>.
+-spec setMinimumSizeX(This, Min) -> ok when
+ This::wxSashWindow(), Min::integer().
setMinimumSizeX(#wx_ref{type=ThisT,ref=ThisRef},Min)
when is_integer(Min) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:cast(?wxSashWindow_SetMinimumSizeX,
<<ThisRef:32/?UI,Min:32/?UI>>).
-%% @spec (This::wxSashWindow(), Min::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowsetminimumsizey">external documentation</a>.
+-spec setMinimumSizeY(This, Min) -> ok when
+ This::wxSashWindow(), Min::integer().
setMinimumSizeY(#wx_ref{type=ThisT,ref=ThisRef},Min)
when is_integer(Min) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:cast(?wxSashWindow_SetMinimumSizeY,
<<ThisRef:32/?UI,Min:32/?UI>>).
-%% @spec (This::wxSashWindow(), Edge::WxSashEdgePosition, Sash::bool()) -> ok
-%% WxSashEdgePosition = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsashwindow.html#wxsashwindowsetsashvisible">external documentation</a>.
-%%<br /> WxSashEdgePosition is one of ?wxSASH_TOP | ?wxSASH_RIGHT | ?wxSASH_BOTTOM | ?wxSASH_LEFT | ?wxSASH_NONE
+%%<br /> Edge = ?wxSASH_TOP | ?wxSASH_RIGHT | ?wxSASH_BOTTOM | ?wxSASH_LEFT | ?wxSASH_NONE
+-spec setSashVisible(This, Edge, Sash) -> ok when
+ This::wxSashWindow(), Edge::wx:wx_enum(), Sash::boolean().
setSashVisible(#wx_ref{type=ThisT,ref=ThisRef},Edge,Sash)
when is_integer(Edge),is_boolean(Sash) ->
?CLASS(ThisT,wxSashWindow),
wxe_util:cast(?wxSashWindow_SetSashVisible,
<<ThisRef:32/?UI,Edge:32/?UI,(wxe_util:from_bool(Sash)):32/?UI>>).
-%% @spec (This::wxSashWindow()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSashWindow()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSashWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxScreenDC.erl b/lib/wx/src/gen/wxScreenDC.erl
index 4d7466f4f1..f9ab60d389 100644
--- a/lib/wx/src/gen/wxScreenDC.erl
+++ b/lib/wx/src/gen/wxScreenDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,10 +38,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -52,18 +52,20 @@
setPen/2,setTextBackground/2,setTextForeground/2,setUserScale/3,startDoc/2,
startPage/1]).
+-export_type([wxScreenDC/0]).
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxScreenDC()
+-type wxScreenDC() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscreendc.html#wxscreendcwxscreendc">external documentation</a>.
+-spec new() -> wxScreenDC().
new() ->
wxe_util:construct(?wxScreenDC_new,
<<>>).
-%% @spec (This::wxScreenDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxScreenDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxScreenDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -150,11 +152,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -168,7 +170,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxScrollBar.erl b/lib/wx/src/gen/wxScrollBar.erl
index 5c7890009f..4370bd1635 100644
--- a/lib/wx/src/gen/wxScrollBar.erl
+++ b/lib/wx/src/gen/wxScrollBar.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,27 +70,35 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxScrollBar/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxScrollBar()
+-type wxScrollBar() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbarwxscrollbar">external documentation</a>.
+-spec new() -> wxScrollBar().
new() ->
wxe_util:construct(?wxScrollBar_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxScrollBar()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxScrollBar() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxScrollBar()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbarwxscrollbar">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxScrollBar() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -103,15 +111,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxScrollBar_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxScrollBar(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxScrollBar(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxScrollBar(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbarcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxScrollBar(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxScrollBar),
@@ -125,51 +139,59 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxScrollBar_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxScrollBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbargetrange">external documentation</a>.
+-spec getRange(This) -> integer() when
+ This::wxScrollBar().
getRange(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrollBar),
wxe_util:call(?wxScrollBar_GetRange,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxScrollBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbargetpagesize">external documentation</a>.
+-spec getPageSize(This) -> integer() when
+ This::wxScrollBar().
getPageSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrollBar),
wxe_util:call(?wxScrollBar_GetPageSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxScrollBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbargetthumbposition">external documentation</a>.
+-spec getThumbPosition(This) -> integer() when
+ This::wxScrollBar().
getThumbPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrollBar),
wxe_util:call(?wxScrollBar_GetThumbPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxScrollBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbargetthumbsize">external documentation</a>.
+-spec getThumbSize(This) -> integer() when
+ This::wxScrollBar().
getThumbSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrollBar),
wxe_util:call(?wxScrollBar_GetThumbSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxScrollBar(), ViewStart::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbarsetthumbposition">external documentation</a>.
+-spec setThumbPosition(This, ViewStart) -> ok when
+ This::wxScrollBar(), ViewStart::integer().
setThumbPosition(#wx_ref{type=ThisT,ref=ThisRef},ViewStart)
when is_integer(ViewStart) ->
?CLASS(ThisT,wxScrollBar),
wxe_util:cast(?wxScrollBar_SetThumbPosition,
<<ThisRef:32/?UI,ViewStart:32/?UI>>).
-%% @spec (This::wxScrollBar(), Position::integer(), ThumbSize::integer(), Range::integer(), PageSize::integer()) -> ok
%% @equiv setScrollbar(This,Position,ThumbSize,Range,PageSize, [])
+-spec setScrollbar(This, Position, ThumbSize, Range, PageSize) -> ok when
+ This::wxScrollBar(), Position::integer(), ThumbSize::integer(), Range::integer(), PageSize::integer().
+
setScrollbar(This,Position,ThumbSize,Range,PageSize)
when is_record(This, wx_ref),is_integer(Position),is_integer(ThumbSize),is_integer(Range),is_integer(PageSize) ->
setScrollbar(This,Position,ThumbSize,Range,PageSize, []).
-%% @spec (This::wxScrollBar(), Position::integer(), ThumbSize::integer(), Range::integer(), PageSize::integer(), [Option]) -> ok
-%% Option = {refresh, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollbar.html#wxscrollbarsetscrollbar">external documentation</a>.
+-spec setScrollbar(This, Position, ThumbSize, Range, PageSize, [Option]) -> ok when
+ This::wxScrollBar(), Position::integer(), ThumbSize::integer(), Range::integer(), PageSize::integer(),
+ Option :: {refresh, boolean()}.
setScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Position,ThumbSize,Range,PageSize, Options)
when is_integer(Position),is_integer(ThumbSize),is_integer(Range),is_integer(PageSize),is_list(Options) ->
?CLASS(ThisT,wxScrollBar),
@@ -179,8 +201,8 @@ setScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Position,ThumbSize,Range,PageSize,
wxe_util:cast(?wxScrollBar_SetScrollbar,
<<ThisRef:32/?UI,Position:32/?UI,ThumbSize:32/?UI,Range:32/?UI,PageSize:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxScrollBar()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxScrollBar()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxScrollBar),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxScrollEvent.erl b/lib/wx/src/gen/wxScrollEvent.erl
index 61b99fa360..6939859d92 100644
--- a/lib/wx/src/gen/wxScrollEvent.erl
+++ b/lib/wx/src/gen/wxScrollEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,20 +40,24 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxScrollEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxScrollEvent()) -> integer()
+-type wxScrollEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollevent.html#wxscrolleventgetorientation">external documentation</a>.
+-spec getOrientation(This) -> integer() when
+ This::wxScrollEvent().
getOrientation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrollEvent),
wxe_util:call(?wxScrollEvent_GetOrientation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxScrollEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollevent.html#wxscrolleventgetposition">external documentation</a>.
+-spec getPosition(This) -> integer() when
+ This::wxScrollEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrollEvent),
wxe_util:call(?wxScrollEvent_GetPosition,
diff --git a/lib/wx/src/gen/wxScrollWinEvent.erl b/lib/wx/src/gen/wxScrollWinEvent.erl
index 6b33b6b564..c899d37dff 100644
--- a/lib/wx/src/gen/wxScrollWinEvent.erl
+++ b/lib/wx/src/gen/wxScrollWinEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,19 +37,23 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxScrollWinEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxScrollWinEvent()) -> integer()
+-type wxScrollWinEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollwinevent.html#wxscrollwineventgetorientation">external documentation</a>.
+-spec getOrientation(This) -> integer() when
+ This::wxScrollWinEvent().
getOrientation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrollWinEvent),
wxe_util:call(?wxScrollWinEvent_GetOrientation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxScrollWinEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrollwinevent.html#wxscrollwineventgetposition">external documentation</a>.
+-spec getPosition(This) -> integer() when
+ This::wxScrollWinEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrollWinEvent),
wxe_util:call(?wxScrollWinEvent_GetPosition,
diff --git a/lib/wx/src/gen/wxScrolledWindow.erl b/lib/wx/src/gen/wxScrolledWindow.erl
index 0693a79760..9141487a8c 100644
--- a/lib/wx/src/gen/wxScrolledWindow.erl
+++ b/lib/wx/src/gen/wxScrolledWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,27 +72,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxScrolledWindow/0]).
%% @hidden
parent_class(wxPanel) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxScrolledWindow()
+-type wxScrolledWindow() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowwxscrolledwindow">external documentation</a>.
+-spec new() -> wxScrolledWindow().
new() ->
wxe_util:construct(?wxScrolledWindow_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxScrolledWindow()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxScrolledWindow() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxScrolledWindow()
-%% Option = {winid, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowwxscrolledwindow">external documentation</a>.
+-spec new(Parent, [Option]) -> wxScrolledWindow() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {winid, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -105,93 +113,108 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxScrolledWindow_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxScrolledWindow(), Pt::{X::integer(), Y::integer()}) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowcalcscrolledposition">external documentation</a>.
+-spec calcScrolledPosition(This, Pt) -> {X::integer(), Y::integer()} when
+ This::wxScrolledWindow(), Pt::{X::integer(), Y::integer()}.
calcScrolledPosition(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:call(?wxScrolledWindow_CalcScrolledPosition_1,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), X::integer(), Y::integer()) -> {Xx::integer(), Yy::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowcalcscrolledposition">external documentation</a>.
+-spec calcScrolledPosition(This, X, Y) -> {Xx::integer(), Yy::integer()} when
+ This::wxScrolledWindow(), X::integer(), Y::integer().
calcScrolledPosition(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:call(?wxScrolledWindow_CalcScrolledPosition_4,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), Pt::{X::integer(), Y::integer()}) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowcalcunscrolledposition">external documentation</a>.
+-spec calcUnscrolledPosition(This, Pt) -> {X::integer(), Y::integer()} when
+ This::wxScrolledWindow(), Pt::{X::integer(), Y::integer()}.
calcUnscrolledPosition(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:call(?wxScrolledWindow_CalcUnscrolledPosition_1,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), X::integer(), Y::integer()) -> {Xx::integer(), Yy::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowcalcunscrolledposition">external documentation</a>.
+-spec calcUnscrolledPosition(This, X, Y) -> {Xx::integer(), Yy::integer()} when
+ This::wxScrolledWindow(), X::integer(), Y::integer().
calcUnscrolledPosition(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:call(?wxScrolledWindow_CalcUnscrolledPosition_4,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), X_scrolling::bool(), Y_scrolling::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowenablescrolling">external documentation</a>.
+-spec enableScrolling(This, X_scrolling, Y_scrolling) -> ok when
+ This::wxScrolledWindow(), X_scrolling::boolean(), Y_scrolling::boolean().
enableScrolling(#wx_ref{type=ThisT,ref=ThisRef},X_scrolling,Y_scrolling)
when is_boolean(X_scrolling),is_boolean(Y_scrolling) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:cast(?wxScrolledWindow_EnableScrolling,
<<ThisRef:32/?UI,(wxe_util:from_bool(X_scrolling)):32/?UI,(wxe_util:from_bool(Y_scrolling)):32/?UI>>).
-%% @spec (This::wxScrolledWindow()) -> {PixelsPerUnitX::integer(), PixelsPerUnitY::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowgetscrollpixelsperunit">external documentation</a>.
+-spec getScrollPixelsPerUnit(This) -> {PixelsPerUnitX::integer(), PixelsPerUnitY::integer()} when
+ This::wxScrolledWindow().
getScrollPixelsPerUnit(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:call(?wxScrolledWindow_GetScrollPixelsPerUnit,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxScrolledWindow()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowgetviewstart">external documentation</a>.
+-spec getViewStart(This) -> {X::integer(), Y::integer()} when
+ This::wxScrolledWindow().
getViewStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:call(?wxScrolledWindow_GetViewStart,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), Dc::wxDC:wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowdopreparedc">external documentation</a>.
+-spec doPrepareDC(This, Dc) -> ok when
+ This::wxScrolledWindow(), Dc::wxDC:wxDC().
doPrepareDC(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
?CLASS(ThisT,wxScrolledWindow),
?CLASS(DcT,wxDC),
wxe_util:cast(?wxScrolledWindow_DoPrepareDC,
<<ThisRef:32/?UI,DcRef:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), Dc::wxDC:wxDC()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowpreparedc">external documentation</a>.
+-spec prepareDC(This, Dc) -> ok when
+ This::wxScrolledWindow(), Dc::wxDC:wxDC().
prepareDC(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
?CLASS(ThisT,wxScrolledWindow),
?CLASS(DcT,wxDC),
wxe_util:cast(?wxScrolledWindow_PrepareDC,
<<ThisRef:32/?UI,DcRef:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowscroll">external documentation</a>.
+-spec scroll(This, X, Y) -> ok when
+ This::wxScrolledWindow(), X::integer(), Y::integer().
scroll(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:cast(?wxScrolledWindow_Scroll,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), PixelsPerUnitX::integer(), PixelsPerUnitY::integer(), NoUnitsX::integer(), NoUnitsY::integer()) -> ok
%% @equiv setScrollbars(This,PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY, [])
+-spec setScrollbars(This, PixelsPerUnitX, PixelsPerUnitY, NoUnitsX, NoUnitsY) -> ok when
+ This::wxScrolledWindow(), PixelsPerUnitX::integer(), PixelsPerUnitY::integer(), NoUnitsX::integer(), NoUnitsY::integer().
+
setScrollbars(This,PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY)
when is_record(This, wx_ref),is_integer(PixelsPerUnitX),is_integer(PixelsPerUnitY),is_integer(NoUnitsX),is_integer(NoUnitsY) ->
setScrollbars(This,PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY, []).
-%% @spec (This::wxScrolledWindow(), PixelsPerUnitX::integer(), PixelsPerUnitY::integer(), NoUnitsX::integer(), NoUnitsY::integer(), [Option]) -> ok
-%% Option = {xPos, integer()} | {yPos, integer()} | {noRefresh, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowsetscrollbars">external documentation</a>.
+-spec setScrollbars(This, PixelsPerUnitX, PixelsPerUnitY, NoUnitsX, NoUnitsY, [Option]) -> ok when
+ This::wxScrolledWindow(), PixelsPerUnitX::integer(), PixelsPerUnitY::integer(), NoUnitsX::integer(), NoUnitsY::integer(),
+ Option :: {xPos, integer()}
+ | {yPos, integer()}
+ | {noRefresh, boolean()}.
setScrollbars(#wx_ref{type=ThisT,ref=ThisRef},PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY, Options)
when is_integer(PixelsPerUnitX),is_integer(PixelsPerUnitY),is_integer(NoUnitsX),is_integer(NoUnitsY),is_list(Options) ->
?CLASS(ThisT,wxScrolledWindow),
@@ -203,24 +226,26 @@ setScrollbars(#wx_ref{type=ThisT,ref=ThisRef},PixelsPerUnitX,PixelsPerUnitY,NoUn
wxe_util:cast(?wxScrolledWindow_SetScrollbars,
<<ThisRef:32/?UI,PixelsPerUnitX:32/?UI,PixelsPerUnitY:32/?UI,NoUnitsX:32/?UI,NoUnitsY:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxScrolledWindow(), Xstep::integer(), Ystep::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowsetscrollrate">external documentation</a>.
+-spec setScrollRate(This, Xstep, Ystep) -> ok when
+ This::wxScrolledWindow(), Xstep::integer(), Ystep::integer().
setScrollRate(#wx_ref{type=ThisT,ref=ThisRef},Xstep,Ystep)
when is_integer(Xstep),is_integer(Ystep) ->
?CLASS(ThisT,wxScrolledWindow),
wxe_util:cast(?wxScrolledWindow_SetScrollRate,
<<ThisRef:32/?UI,Xstep:32/?UI,Ystep:32/?UI>>).
-%% @spec (This::wxScrolledWindow(), Target::wxWindow:wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxscrolledwindow.html#wxscrolledwindowsettargetwindow">external documentation</a>.
+-spec setTargetWindow(This, Target) -> ok when
+ This::wxScrolledWindow(), Target::wxWindow:wxWindow().
setTargetWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=TargetT,ref=TargetRef}) ->
?CLASS(ThisT,wxScrolledWindow),
?CLASS(TargetT,wxWindow),
wxe_util:cast(?wxScrolledWindow_SetTargetWindow,
<<ThisRef:32/?UI,TargetRef:32/?UI>>).
-%% @spec (This::wxScrolledWindow()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxScrolledWindow()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxScrolledWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSetCursorEvent.erl b/lib/wx/src/gen/wxSetCursorEvent.erl
index 75a41eb6ad..23ff963001 100644
--- a/lib/wx/src/gen/wxSetCursorEvent.erl
+++ b/lib/wx/src/gen/wxSetCursorEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,40 +37,47 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxSetCursorEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxSetCursorEvent()) -> wxCursor:wxCursor()
+-type wxSetCursorEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsetcursorevent.html#wxsetcursoreventgetcursor">external documentation</a>.
+-spec getCursor(This) -> wxCursor:wxCursor() when
+ This::wxSetCursorEvent().
getCursor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSetCursorEvent),
wxe_util:call(?wxSetCursorEvent_GetCursor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSetCursorEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsetcursorevent.html#wxsetcursoreventgetx">external documentation</a>.
+-spec getX(This) -> integer() when
+ This::wxSetCursorEvent().
getX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSetCursorEvent),
wxe_util:call(?wxSetCursorEvent_GetX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSetCursorEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsetcursorevent.html#wxsetcursoreventgety">external documentation</a>.
+-spec getY(This) -> integer() when
+ This::wxSetCursorEvent().
getY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSetCursorEvent),
wxe_util:call(?wxSetCursorEvent_GetY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSetCursorEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsetcursorevent.html#wxsetcursoreventhascursor">external documentation</a>.
+-spec hasCursor(This) -> boolean() when
+ This::wxSetCursorEvent().
hasCursor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSetCursorEvent),
wxe_util:call(?wxSetCursorEvent_HasCursor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSetCursorEvent(), Cursor::wxCursor:wxCursor()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsetcursorevent.html#wxsetcursoreventsetcursor">external documentation</a>.
+-spec setCursor(This, Cursor) -> ok when
+ This::wxSetCursorEvent(), Cursor::wxCursor:wxCursor().
setCursor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CursorT,ref=CursorRef}) ->
?CLASS(ThisT,wxSetCursorEvent),
?CLASS(CursorT,wxCursor),
diff --git a/lib/wx/src/gen/wxShowEvent.erl b/lib/wx/src/gen/wxShowEvent.erl
index 7d5c8300d3..ffafa0978f 100644
--- a/lib/wx/src/gen/wxShowEvent.erl
+++ b/lib/wx/src/gen/wxShowEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,20 +37,24 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxShowEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxShowEvent(), Show::bool()) -> ok
+-type wxShowEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxshowevent.html#wxshoweventsetshow">external documentation</a>.
+-spec setShow(This, Show) -> ok when
+ This::wxShowEvent(), Show::boolean().
setShow(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
?CLASS(ThisT,wxShowEvent),
wxe_util:cast(?wxShowEvent_SetShow,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
-%% @spec (This::wxShowEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxshowevent.html#wxshoweventgetshow">external documentation</a>.
+-spec getShow(This) -> boolean() when
+ This::wxShowEvent().
getShow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxShowEvent),
wxe_util:call(?wxShowEvent_GetShow,
diff --git a/lib/wx/src/gen/wxSingleChoiceDialog.erl b/lib/wx/src/gen/wxSingleChoiceDialog.erl
index e2b835917e..6f96e283c8 100644
--- a/lib/wx/src/gen/wxSingleChoiceDialog.erl
+++ b/lib/wx/src/gen/wxSingleChoiceDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxSingleChoiceDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,21 +85,26 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSingleChoiceDialog()
+-type wxSingleChoiceDialog() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsinglechoicedialog.html#wxsinglechoicedialogwxsinglechoicedialog">external documentation</a>.
+-spec new() -> wxSingleChoiceDialog().
new() ->
wxe_util:construct(?wxSingleChoiceDialog_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string(), Caption::string(), Choices::[[string()]]) -> wxSingleChoiceDialog()
%% @equiv new(Parent,Message,Caption,Choices, [])
+-spec new(Parent, Message, Caption, Choices) -> wxSingleChoiceDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata(), Caption::unicode:chardata(), Choices::[[unicode:chardata()]].
+
new(Parent,Message,Caption,Choices)
when is_record(Parent, wx_ref),is_list(Message),is_list(Caption),is_list(Choices) ->
new(Parent,Message,Caption,Choices, []).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string(), Caption::string(), Choices::[[string()]], [Option]) -> wxSingleChoiceDialog()
-%% Option = {style, integer()} | {pos, {X::integer(), Y::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsinglechoicedialog.html#wxsinglechoicedialogwxsinglechoicedialog">external documentation</a>.
+-spec new(Parent, Message, Caption, Choices, [Option]) -> wxSingleChoiceDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata(), Caption::unicode:chardata(), Choices::[[unicode:chardata()]],
+ Option :: {style, integer()}
+ | {pos, {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options)
when is_list(Message),is_list(Caption),is_list(Choices),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -113,30 +119,33 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options)
wxe_util:construct(?wxSingleChoiceDialog_new_5,
<<ParentRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Caption_UC)):32/?UI,(Caption_UC)/binary, 0:(((8- ((4+byte_size(Caption_UC)) band 16#7)) band 16#7))/unit:8,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((4 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxSingleChoiceDialog()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsinglechoicedialog.html#wxsinglechoicedialoggetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxSingleChoiceDialog().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSingleChoiceDialog),
wxe_util:call(?wxSingleChoiceDialog_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSingleChoiceDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsinglechoicedialog.html#wxsinglechoicedialoggetstringselection">external documentation</a>.
+-spec getStringSelection(This) -> unicode:charlist() when
+ This::wxSingleChoiceDialog().
getStringSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSingleChoiceDialog),
wxe_util:call(?wxSingleChoiceDialog_GetStringSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSingleChoiceDialog(), Sel::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsinglechoicedialog.html#wxsinglechoicedialogsetselection">external documentation</a>.
+-spec setSelection(This, Sel) -> ok when
+ This::wxSingleChoiceDialog(), Sel::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},Sel)
when is_integer(Sel) ->
?CLASS(ThisT,wxSingleChoiceDialog),
wxe_util:cast(?wxSingleChoiceDialog_SetSelection,
<<ThisRef:32/?UI,Sel:32/?UI>>).
-%% @spec (This::wxSingleChoiceDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSingleChoiceDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSingleChoiceDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSizeEvent.erl b/lib/wx/src/gen/wxSizeEvent.erl
index 0898f4aed9..c51e48bc59 100644
--- a/lib/wx/src/gen/wxSizeEvent.erl
+++ b/lib/wx/src/gen/wxSizeEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,12 +37,15 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxSizeEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxSizeEvent()) -> {W::integer(), H::integer()}
+-type wxSizeEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeevent.html#wxsizeeventgetsize">external documentation</a>.
+-spec getSize(This) -> {W::integer(), H::integer()} when
+ This::wxSizeEvent().
getSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizeEvent),
wxe_util:call(?wxSizeEvent_GetSize,
diff --git a/lib/wx/src/gen/wxSizer.erl b/lib/wx/src/gen/wxSizer.erl
index 0f1a92f379..7edc01aa2a 100644
--- a/lib/wx/src/gen/wxSizer.erl
+++ b/lib/wx/src/gen/wxSizer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,27 +36,40 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxSizer/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer()) -> wxSizerItem:wxSizerItem()
+-type wxSizer() :: wx:wx_object().
%% @equiv add(This,Window, [])
+-spec add(This, Window) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer().
+
add(This,Window)
when is_record(This, wx_ref),is_record(Window, wx_ref) ->
add(This,Window, []).
-%% @spec (This::wxSizer(),X::integer()|term(),X::integer()|term()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizeradd">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% add(This::wxSizer(), Width::integer(), Height::integer()) -> add(This,Width,Height, []) </c></p>
-%% <p><c>
-%% add(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), [Option]) -> wxSizerItem:wxSizerItem() </c>
-%%<br /> Option = {proportion, integer()} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
-%% </p>
-%% <p><c>
-%% add(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags()) -> wxSizerItem:wxSizerItem() </c>
-%% </p>
+%% <br /> Also:<br />
+%% add(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),<br />
+%% Option :: {proportion, integer()}<br />
+%% | {flag, integer()}<br />
+%% | {border, integer()}<br />
+%% | {userData, wx:wx_object()};<br />
+%% (This, Window, Flags) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().<br />
+%%
+-spec add(This, Width, Height) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Width::integer(), Height::integer();
+ (This, Window, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
+ Option :: {proportion, integer()}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()};
+ (This, Window, Flags) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().
add(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
@@ -91,9 +104,13 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI,FlagsRef:32/?UI>>).
-%% @spec (This::wxSizer(), Width::integer(), Height::integer(), [Option]) -> wxSizerItem:wxSizerItem()
-%% Option = {proportion, integer()} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizeradd">external documentation</a>.
+-spec add(This, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Width::integer(), Height::integer(),
+ Option :: {proportion, integer()}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()}.
add(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -106,23 +123,27 @@ add(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
wxe_util:call(?wxSizer_Add_3,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSizer(), Size::integer()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizeraddspacer">external documentation</a>.
+-spec addSpacer(This, Size) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Size::integer().
addSpacer(#wx_ref{type=ThisT,ref=ThisRef},Size)
when is_integer(Size) ->
?CLASS(ThisT,wxSizer),
wxe_util:call(?wxSizer_AddSpacer,
<<ThisRef:32/?UI,Size:32/?UI>>).
-%% @spec (This::wxSizer()) -> wxSizerItem:wxSizerItem()
%% @equiv addStretchSpacer(This, [])
+-spec addStretchSpacer(This) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer().
+
addStretchSpacer(This)
when is_record(This, wx_ref) ->
addStretchSpacer(This, []).
-%% @spec (This::wxSizer(), [Option]) -> wxSizerItem:wxSizerItem()
-%% Option = {prop, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizeraddstretchspacer">external documentation</a>.
+-spec addStretchSpacer(This, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(),
+ Option :: {prop, integer()}.
addStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -132,22 +153,26 @@ addStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxSizer_AddStretchSpacer,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSizer()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizercalcmin">external documentation</a>.
+-spec calcMin(This) -> {W::integer(), H::integer()} when
+ This::wxSizer().
calcMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
wxe_util:call(?wxSizer_CalcMin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizer()) -> ok
%% @equiv clear(This, [])
+-spec clear(This) -> ok when
+ This::wxSizer().
+
clear(This)
when is_record(This, wx_ref) ->
clear(This, []).
-%% @spec (This::wxSizer(), [Option]) -> ok
-%% Option = {delete_windows, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerclear">external documentation</a>.
+-spec clear(This, [Option]) -> ok when
+ This::wxSizer(),
+ Option :: {delete_windows, boolean()}.
clear(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -157,15 +182,15 @@ clear(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxSizer_Clear,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSizer(),X::integer()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerdetach">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% detach(This::wxSizer(), Index::integer()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% detach(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% detach(This, Window) -> boolean() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer().<br />
+%%
+-spec detach(This, Index) -> boolean() when
+ This::wxSizer(), Index::integer();
+ (This, Window) -> boolean() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer().
detach(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxSizer),
@@ -182,37 +207,41 @@ detach(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxSizer(), Window::wxWindow:wxWindow()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerfit">external documentation</a>.
+-spec fit(This, Window) -> {W::integer(), H::integer()} when
+ This::wxSizer(), Window::wxWindow:wxWindow().
fit(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizer),
?CLASS(WindowT,wxWindow),
wxe_util:call(?wxSizer_Fit,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxSizer(), Window::wxWindow:wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerfitinside">external documentation</a>.
+-spec fitInside(This, Window) -> ok when
+ This::wxSizer(), Window::wxWindow:wxWindow().
fitInside(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizer),
?CLASS(WindowT,wxWindow),
wxe_util:cast(?wxSizer_FitInside,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxSizer()) -> [wxSizerItem:wxSizerItem()]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizergetchildren">external documentation</a>.
+-spec getChildren(This) -> [wxSizerItem:wxSizerItem()] when
+ This::wxSizer().
getChildren(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
wxe_util:call(?wxSizer_GetChildren,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizer(),X::term()|integer()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizergetitem">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% getItem(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer()) -> getItem(This,Window, []) </c></p>
-%% <p><c>
-%% getItem(This::wxSizer(), Index::integer()) -> wxSizerItem:wxSizerItem() </c>
-%% </p>
+%% <br /> Also:<br />
+%% getItem(This, Index) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxSizer(), Index::integer().<br />
+%%
+-spec getItem(This, Window) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer();
+ (This, Index) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer().
getItem(This,Window)
when is_record(This, wx_ref),is_record(Window, wx_ref) ->
@@ -223,9 +252,10 @@ getItem(#wx_ref{type=ThisT,ref=ThisRef},Index)
wxe_util:call(?wxSizer_GetItem_1,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), [Option]) -> wxSizerItem:wxSizerItem()
-%% Option = {recursive, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizergetitem">external documentation</a>.
+-spec getItem(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
+ Option :: {recursive, boolean()}.
getItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -241,35 +271,39 @@ getItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Opt
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSizer()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizergetsize">external documentation</a>.
+-spec getSize(This) -> {W::integer(), H::integer()} when
+ This::wxSizer().
getSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
wxe_util:call(?wxSizer_GetSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizer()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizergetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxSizer().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
wxe_util:call(?wxSizer_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizer()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizergetminsize">external documentation</a>.
+-spec getMinSize(This) -> {W::integer(), H::integer()} when
+ This::wxSizer().
getMinSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
wxe_util:call(?wxSizer_GetMinSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizer(),X::term()|integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerhide">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% hide(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer()) -> hide(This,Window, []) </c></p>
-%% <p><c>
-%% hide(This::wxSizer(), Index::integer()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% hide(This, Index) -> boolean() when<br />
+%% This::wxSizer(), Index::integer().<br />
+%%
+-spec hide(This, Window) -> boolean() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer();
+ (This, Index) -> boolean() when
+ This::wxSizer(), Index::integer().
hide(This,Window)
when is_record(This, wx_ref),is_record(Window, wx_ref) ->
@@ -280,9 +314,10 @@ hide(#wx_ref{type=ThisT,ref=ThisRef},Index)
wxe_util:call(?wxSizer_Hide_1,
<<ThisRef:32/?UI,Index:32/?UI>>).
-%% @spec (This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), [Option]) -> bool()
-%% Option = {recursive, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerhide">external documentation</a>.
+-spec hide(This, Window, [Option]) -> boolean() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
+ Option :: {recursive, boolean()}.
hide(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -298,8 +333,9 @@ hide(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Option
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSizer(), Index::integer(), Item::wxSizerItem:wxSizerItem()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerinsert">external documentation</a>.
+-spec insert(This, Index, Item) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer(), Item::wxSizerItem:wxSizerItem().
insert(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=ItemT,ref=ItemRef})
when is_integer(Index) ->
?CLASS(ThisT,wxSizer),
@@ -307,18 +343,27 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=ItemT,ref=ItemRef})
wxe_util:call(?wxSizer_Insert_2,
<<ThisRef:32/?UI,Index:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxSizer(),Index::integer(),X::integer()|term(),X::integer()|term()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerinsert">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% insert(This::wxSizer(), Index::integer(), Width::integer(), Height::integer()) -> insert(This,Index,Width,Height, []) </c></p>
-%% <p><c>
-%% insert(This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(), [Option]) -> wxSizerItem:wxSizerItem() </c>
-%%<br /> Option = {proportion, integer()} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
-%% </p>
-%% <p><c>
-%% insert(This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags()) -> wxSizerItem:wxSizerItem() </c>
-%% </p>
+%% <br /> Also:<br />
+%% insert(This, Index, Window, [Option]) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(),<br />
+%% Option :: {proportion, integer()}<br />
+%% | {flag, integer()}<br />
+%% | {border, integer()}<br />
+%% | {userData, wx:wx_object()};<br />
+%% (This, Index, Window, Flags) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().<br />
+%%
+-spec insert(This, Index, Width, Height) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer(), Width::integer(), Height::integer();
+ (This, Index, Window, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(),
+ Option :: {proportion, integer()}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()};
+ (This, Index, Window, Flags) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().
insert(This,Index,Width,Height)
when is_record(This, wx_ref),is_integer(Index),is_integer(Width),is_integer(Height) ->
@@ -354,9 +399,13 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=WindowT,ref=WindowRef}
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,Index:32/?UI,WindowRef:32/?UI,FlagsRef:32/?UI>>).
-%% @spec (This::wxSizer(), Index::integer(), Width::integer(), Height::integer(), [Option]) -> wxSizerItem:wxSizerItem()
-%% Option = {proportion, integer()} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerinsert">external documentation</a>.
+-spec insert(This, Index, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer(), Width::integer(), Height::integer(),
+ Option :: {proportion, integer()}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()}.
insert(#wx_ref{type=ThisT,ref=ThisRef},Index,Width,Height, Options)
when is_integer(Index),is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -369,23 +418,27 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Index,Width,Height, Options)
wxe_util:call(?wxSizer_Insert_4,
<<ThisRef:32/?UI,Index:32/?UI,Width:32/?UI,Height:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSizer(), Index::integer(), Size::integer()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerinsertspacer">external documentation</a>.
+-spec insertSpacer(This, Index, Size) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer(), Size::integer().
insertSpacer(#wx_ref{type=ThisT,ref=ThisRef},Index,Size)
when is_integer(Index),is_integer(Size) ->
?CLASS(ThisT,wxSizer),
wxe_util:call(?wxSizer_InsertSpacer,
<<ThisRef:32/?UI,Index:32/?UI,Size:32/?UI>>).
-%% @spec (This::wxSizer(), Index::integer()) -> wxSizerItem:wxSizerItem()
%% @equiv insertStretchSpacer(This,Index, [])
+-spec insertStretchSpacer(This, Index) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer().
+
insertStretchSpacer(This,Index)
when is_record(This, wx_ref),is_integer(Index) ->
insertStretchSpacer(This,Index, []).
-%% @spec (This::wxSizer(), Index::integer(), [Option]) -> wxSizerItem:wxSizerItem()
-%% Option = {prop, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerinsertstretchspacer">external documentation</a>.
+-spec insertStretchSpacer(This, Index, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Index::integer(),
+ Option :: {prop, integer()}.
insertStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef},Index, Options)
when is_integer(Index),is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -395,15 +448,15 @@ insertStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef},Index, Options)
wxe_util:call(?wxSizer_InsertStretchSpacer,
<<ThisRef:32/?UI,Index:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSizer(),X::integer()|term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerisshown">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% isShown(This::wxSizer(), Index::integer()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% isShown(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% isShown(This, Window) -> boolean() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer().<br />
+%%
+-spec isShown(This, Index) -> boolean() when
+ This::wxSizer(), Index::integer();
+ (This, Window) -> boolean() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer().
isShown(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxSizer),
@@ -420,33 +473,44 @@ isShown(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxSizer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerlayout">external documentation</a>.
+-spec layout(This) -> ok when
+ This::wxSizer().
layout(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
wxe_util:cast(?wxSizer_Layout,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizer(), Item::wxSizerItem:wxSizerItem()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerprepend">external documentation</a>.
+-spec prepend(This, Item) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Item::wxSizerItem:wxSizerItem().
prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
?CLASS(ThisT,wxSizer),
?CLASS(ItemT,wxSizerItem),
wxe_util:call(?wxSizer_Prepend_1,
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
-%% @spec (This::wxSizer(),X::integer()|term(),X::integer()|term()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerprepend">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% prepend(This::wxSizer(), Width::integer(), Height::integer()) -> prepend(This,Width,Height, []) </c></p>
-%% <p><c>
-%% prepend(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), [Option]) -> wxSizerItem:wxSizerItem() </c>
-%%<br /> Option = {proportion, integer()} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
-%% </p>
-%% <p><c>
-%% prepend(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags()) -> wxSizerItem:wxSizerItem() </c>
-%% </p>
+%% <br /> Also:<br />
+%% prepend(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),<br />
+%% Option :: {proportion, integer()}<br />
+%% | {flag, integer()}<br />
+%% | {border, integer()}<br />
+%% | {userData, wx:wx_object()};<br />
+%% (This, Window, Flags) -> wxSizerItem:wxSizerItem() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().<br />
+%%
+-spec prepend(This, Width, Height) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Width::integer(), Height::integer();
+ (This, Window, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
+ Option :: {proportion, integer()}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()};
+ (This, Window, Flags) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().
prepend(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
@@ -481,9 +545,13 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI,FlagsRef:32/?UI>>).
-%% @spec (This::wxSizer(), Width::integer(), Height::integer(), [Option]) -> wxSizerItem:wxSizerItem()
-%% Option = {proportion, integer()} | {flag, integer()} | {border, integer()} | {userData, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerprepend">external documentation</a>.
+-spec prepend(This, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Width::integer(), Height::integer(),
+ Option :: {proportion, integer()}
+ | {flag, integer()}
+ | {border, integer()}
+ | {userData, wx:wx_object()}.
prepend(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -496,23 +564,27 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
wxe_util:call(?wxSizer_Prepend_3,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSizer(), Size::integer()) -> wxSizerItem:wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerprependspacer">external documentation</a>.
+-spec prependSpacer(This, Size) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(), Size::integer().
prependSpacer(#wx_ref{type=ThisT,ref=ThisRef},Size)
when is_integer(Size) ->
?CLASS(ThisT,wxSizer),
wxe_util:call(?wxSizer_PrependSpacer,
<<ThisRef:32/?UI,Size:32/?UI>>).
-%% @spec (This::wxSizer()) -> wxSizerItem:wxSizerItem()
%% @equiv prependStretchSpacer(This, [])
+-spec prependStretchSpacer(This) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer().
+
prependStretchSpacer(This)
when is_record(This, wx_ref) ->
prependStretchSpacer(This, []).
-%% @spec (This::wxSizer(), [Option]) -> wxSizerItem:wxSizerItem()
-%% Option = {prop, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerprependstretchspacer">external documentation</a>.
+-spec prependStretchSpacer(This, [Option]) -> wxSizerItem:wxSizerItem() when
+ This::wxSizer(),
+ Option :: {prop, integer()}.
prependStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -522,22 +594,23 @@ prependStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxSizer_PrependStretchSpacer,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSizer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerrecalcsizes">external documentation</a>.
+-spec recalcSizes(This) -> ok when
+ This::wxSizer().
recalcSizes(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
wxe_util:cast(?wxSizer_RecalcSizes,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizer(),X::integer()|wxSizer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerremove">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% remove(This::wxSizer(), Index::integer()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% remove(This::wxSizer(), Sizer::wxSizer()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% remove(This, Sizer) -> boolean() when<br />
+%% This::wxSizer(), Sizer::wxSizer().<br />
+%%
+-spec remove(This, Index) -> boolean() when
+ This::wxSizer(), Index::integer();
+ (This, Sizer) -> boolean() when
+ This::wxSizer(), Sizer::wxSizer().
remove(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
?CLASS(ThisT,wxSizer),
@@ -549,14 +622,15 @@ remove(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}) ->
wxe_util:call(?wxSizer_Remove_1_1,
<<ThisRef:32/?UI,SizerRef:32/?UI>>).
-%% @spec (This::wxSizer(),X::term()|integer(),X::term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerreplace">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% replace(This::wxSizer(), Oldwin::wxWindow:wxWindow() | wxSizer(), Newwin::wxWindow:wxWindow() | wxSizer()) -> replace(This,Oldwin,Newwin, []) </c></p>
-%% <p><c>
-%% replace(This::wxSizer(), Index::integer(), Newitem::wxSizerItem:wxSizerItem()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% replace(This, Index, Newitem) -> boolean() when<br />
+%% This::wxSizer(), Index::integer(), Newitem::wxSizerItem:wxSizerItem().<br />
+%%
+-spec replace(This, Oldwin, Newwin) -> boolean() when
+ This::wxSizer(), Oldwin::wxWindow:wxWindow() | wxSizer(), Newwin::wxWindow:wxWindow() | wxSizer();
+ (This, Index, Newitem) -> boolean() when
+ This::wxSizer(), Index::integer(), Newitem::wxSizerItem:wxSizerItem().
replace(This,Oldwin,Newwin)
when is_record(This, wx_ref),is_record(Oldwin, wx_ref),is_record(Newwin, wx_ref) ->
@@ -568,9 +642,10 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=NewitemT,ref=NewitemR
wxe_util:call(?wxSizer_Replace_2,
<<ThisRef:32/?UI,Index:32/?UI,NewitemRef:32/?UI>>).
-%% @spec (This::wxSizer(), Oldwin::wxWindow:wxWindow() | wxSizer(), Newwin::wxWindow:wxWindow() | wxSizer(), [Option]) -> bool()
-%% Option = {recursive, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizerreplace">external documentation</a>.
+-spec replace(This, Oldwin, Newwin, [Option]) -> boolean() when
+ This::wxSizer(), Oldwin::wxWindow:wxWindow() | wxSizer(), Newwin::wxWindow:wxWindow() | wxSizer(),
+ Option :: {recursive, boolean()}.
replace(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=OldwinT,ref=OldwinRef},#wx_ref{type=NewwinT,ref=NewwinRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -588,39 +663,42 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=OldwinT,ref=OldwinRef},#wx_
wxe_util:call(OldwinOP,
<<ThisRef:32/?UI,OldwinRef:32/?UI,NewwinRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSizer(), X::integer(), Y::integer(), Width::integer(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizersetdimension">external documentation</a>.
+-spec setDimension(This, X, Y, Width, Height) -> ok when
+ This::wxSizer(), X::integer(), Y::integer(), Width::integer(), Height::integer().
setDimension(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Width,Height)
when is_integer(X),is_integer(Y),is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxSizer),
wxe_util:cast(?wxSizer_SetDimension,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxSizer(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizersetminsize">external documentation</a>.
+-spec setMinSize(This, Size) -> ok when
+ This::wxSizer(), Size::{W::integer(), H::integer()}.
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizer),
wxe_util:cast(?wxSizer_SetMinSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxSizer(), Width::integer(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizersetminsize">external documentation</a>.
+-spec setMinSize(This, Width, Height) -> ok when
+ This::wxSizer(), Width::integer(), Height::integer().
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxSizer),
wxe_util:cast(?wxSizer_SetMinSize_2,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxSizer(),X::integer()|term(),Size::{W::integer(), H::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizersetitemminsize">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setItemMinSize(This::wxSizer(), Index::integer(), Size::{W::integer(), H::integer()}) -> bool() </c>
-%% </p>
-%% <p><c>
-%% setItemMinSize(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Size::{W::integer(), H::integer()}) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% setItemMinSize(This, Window, Size) -> boolean() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Size::{W::integer(), H::integer()}.<br />
+%%
+-spec setItemMinSize(This, Index, Size) -> boolean() when
+ This::wxSizer(), Index::integer(), Size::{W::integer(), H::integer()};
+ (This, Window, Size) -> boolean() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Size::{W::integer(), H::integer()}.
setItemMinSize(#wx_ref{type=ThisT,ref=ThisRef},Index,{SizeW,SizeH})
when is_integer(Index),is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizer),
@@ -638,15 +716,15 @@ setItemMinSize(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRe
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxSizer(),X::integer()|term(),Width::integer(),Height::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizersetitemminsize">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setItemMinSize(This::wxSizer(), Index::integer(), Width::integer(), Height::integer()) -> bool() </c>
-%% </p>
-%% <p><c>
-%% setItemMinSize(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Width::integer(), Height::integer()) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% setItemMinSize(This, Window, Width, Height) -> boolean() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Width::integer(), Height::integer().<br />
+%%
+-spec setItemMinSize(This, Index, Width, Height) -> boolean() when
+ This::wxSizer(), Index::integer(), Width::integer(), Height::integer();
+ (This, Window, Width, Height) -> boolean() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Width::integer(), Height::integer().
setItemMinSize(#wx_ref{type=ThisT,ref=ThisRef},Index,Width,Height)
when is_integer(Index),is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxSizer),
@@ -664,32 +742,37 @@ setItemMinSize(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRe
wxe_util:call(WindowOP,
<<ThisRef:32/?UI,WindowRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxSizer(), Window::wxWindow:wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizersetsizehints">external documentation</a>.
+-spec setSizeHints(This, Window) -> ok when
+ This::wxSizer(), Window::wxWindow:wxWindow().
setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizer),
?CLASS(WindowT,wxWindow),
wxe_util:cast(?wxSizer_SetSizeHints,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxSizer(), Window::wxWindow:wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizersetvirtualsizehints">external documentation</a>.
+-spec setVirtualSizeHints(This, Window) -> ok when
+ This::wxSizer(), Window::wxWindow:wxWindow().
setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizer),
?CLASS(WindowT,wxWindow),
wxe_util:cast(?wxSizer_SetVirtualSizeHints,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxSizer(),X::integer()|term()|bool()) -> bool()|bool()|ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizershow">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% show(This::wxSizer(), Index::integer()) -> show(This,Index, []) </c></p>
-%% <p><c>
-%% show(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer()) -> show(This,Window, []) </c></p>
-%% <p><c>
-%% show(This::wxSizer(), Show::bool()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% show(This, Window) -> boolean() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer();<br />
+%% (This, Show) -> ok when<br />
+%% This::wxSizer(), Show::boolean().<br />
+%%
+-spec show(This, Index) -> boolean() when
+ This::wxSizer(), Index::integer();
+ (This, Window) -> boolean() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer();
+ (This, Show) -> ok when
+ This::wxSizer(), Show::boolean().
show(This,Index)
when is_record(This, wx_ref),is_integer(Index) ->
@@ -704,17 +787,20 @@ show(#wx_ref{type=ThisT,ref=ThisRef},Show)
wxe_util:cast(?wxSizer_Show_1,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
-%% @spec (This::wxSizer(),X::integer()|term(),[Option]) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizer.html#wxsizershow">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% show(This::wxSizer(), Index::integer(), [Option]) -> bool() </c>
-%%<br /> Option = {show, bool()}
-%% </p>
-%% <p><c>
-%% show(This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), [Option]) -> bool() </c>
-%%<br /> Option = {show, bool()} | {recursive, bool()}
-%% </p>
+%% <br /> Also:<br />
+%% show(This, Window, [Option]) -> boolean() when<br />
+%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),<br />
+%% Option :: {show, boolean()}<br />
+%% | {recursive, boolean()}.<br />
+%%
+-spec show(This, Index, [Option]) -> boolean() when
+ This::wxSizer(), Index::integer(),
+ Option :: {show, boolean()};
+ (This, Window, [Option]) -> boolean() when
+ This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
+ Option :: {show, boolean()}
+ | {recursive, boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef},Index, Options)
when is_integer(Index),is_list(Options) ->
?CLASS(ThisT,wxSizer),
diff --git a/lib/wx/src/gen/wxSizerFlags.erl b/lib/wx/src/gen/wxSizerFlags.erl
index 2a25fd2c1a..08d36d1a80 100644
--- a/lib/wx/src/gen/wxSizerFlags.erl
+++ b/lib/wx/src/gen/wxSizerFlags.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,17 +30,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxSizerFlags/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSizerFlags()
+-type wxSizerFlags() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxSizerFlags().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxSizerFlags()
-%% Option = {proportion, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagswxsizerflags">external documentation</a>.
+-spec new([Option]) -> wxSizerFlags() when
+ Option :: {proportion, integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({proportion, Proportion}, Acc) -> [<<1:32/?UI,Proportion:32/?UI>>|Acc];
@@ -49,23 +52,27 @@ new(Options)
wxe_util:construct(?wxSizerFlags_new,
<<BinOpt/binary>>).
-%% @spec (This::wxSizerFlags(), Alignment::integer()) -> wxSizerFlags()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagsalign">external documentation</a>.
+-spec align(This, Alignment) -> wxSizerFlags() when
+ This::wxSizerFlags(), Alignment::integer().
align(#wx_ref{type=ThisT,ref=ThisRef},Alignment)
when is_integer(Alignment) ->
?CLASS(ThisT,wxSizerFlags),
wxe_util:call(?wxSizerFlags_Align,
<<ThisRef:32/?UI,Alignment:32/?UI>>).
-%% @spec (This::wxSizerFlags()) -> wxSizerFlags()
%% @equiv border(This, [])
+-spec border(This) -> wxSizerFlags() when
+ This::wxSizerFlags().
+
border(This)
when is_record(This, wx_ref) ->
border(This, []).
-%% @spec (This::wxSizerFlags(), [Option]) -> wxSizerFlags()
-%% Option = {direction, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagsborder">external documentation</a>.
+-spec border(This, [Option]) -> wxSizerFlags() when
+ This::wxSizerFlags(),
+ Option :: {direction, integer()}.
border(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizerFlags),
@@ -75,59 +82,66 @@ border(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxSizerFlags_Border_1,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSizerFlags(), Direction::integer(), BorderInPixels::integer()) -> wxSizerFlags()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagsborder">external documentation</a>.
+-spec border(This, Direction, BorderInPixels) -> wxSizerFlags() when
+ This::wxSizerFlags(), Direction::integer(), BorderInPixels::integer().
border(#wx_ref{type=ThisT,ref=ThisRef},Direction,BorderInPixels)
when is_integer(Direction),is_integer(BorderInPixels) ->
?CLASS(ThisT,wxSizerFlags),
wxe_util:call(?wxSizerFlags_Border_2,
<<ThisRef:32/?UI,Direction:32/?UI,BorderInPixels:32/?UI>>).
-%% @spec (This::wxSizerFlags()) -> wxSizerFlags()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagscenter">external documentation</a>.
+-spec center(This) -> wxSizerFlags() when
+ This::wxSizerFlags().
center(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerFlags),
wxe_util:call(?wxSizerFlags_Center,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerFlags()) -> wxSizerFlags()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagscentre">external documentation</a>.
+-spec centre(This) -> wxSizerFlags() when
+ This::wxSizerFlags().
centre(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerFlags),
wxe_util:call(?wxSizerFlags_Centre,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerFlags()) -> wxSizerFlags()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagsexpand">external documentation</a>.
+-spec expand(This) -> wxSizerFlags() when
+ This::wxSizerFlags().
expand(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerFlags),
wxe_util:call(?wxSizerFlags_Expand,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerFlags()) -> wxSizerFlags()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagsleft">external documentation</a>.
+-spec left(This) -> wxSizerFlags() when
+ This::wxSizerFlags().
left(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerFlags),
wxe_util:call(?wxSizerFlags_Left,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerFlags(), Proportion::integer()) -> wxSizerFlags()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagsproportion">external documentation</a>.
+-spec proportion(This, Proportion) -> wxSizerFlags() when
+ This::wxSizerFlags(), Proportion::integer().
proportion(#wx_ref{type=ThisT,ref=ThisRef},Proportion)
when is_integer(Proportion) ->
?CLASS(ThisT,wxSizerFlags),
wxe_util:call(?wxSizerFlags_Proportion,
<<ThisRef:32/?UI,Proportion:32/?UI>>).
-%% @spec (This::wxSizerFlags()) -> wxSizerFlags()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizerflags.html#wxsizerflagsright">external documentation</a>.
+-spec right(This) -> wxSizerFlags() when
+ This::wxSizerFlags().
right(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerFlags),
wxe_util:call(?wxSizerFlags_Right,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerFlags()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSizerFlags()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSizerFlags),
wxe_util:destroy(?wxSizerFlags_destroy,Obj),
diff --git a/lib/wx/src/gen/wxSizerItem.erl b/lib/wx/src/gen/wxSizerItem.erl
index 41cb86eae2..62655864d1 100644
--- a/lib/wx/src/gen/wxSizerItem.erl
+++ b/lib/wx/src/gen/wxSizerItem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,17 +35,20 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxSizerItem/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSizerItem()
+-type wxSizerItem() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemwxsizeritem">external documentation</a>.
+-spec new() -> wxSizerItem().
new() ->
wxe_util:construct(?wxSizerItem_new_0,
<<>>).
-%% @spec (Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Flags::wxSizerFlags:wxSizerFlags()) -> wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemwxsizeritem">external documentation</a>.
+-spec new(Window, Flags) -> wxSizerItem() when
+ Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Flags::wxSizerFlags:wxSizerFlags().
new(#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=FlagsT,ref=FlagsRef}) ->
WindowOP = case ?CLASS_T(WindowT,wxWindow) of
true ->
@@ -58,16 +61,18 @@ new(#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=FlagsT,ref=FlagsRef}) ->
wxe_util:construct(WindowOP,
<<WindowRef:32/?UI,FlagsRef:32/?UI>>).
-%% @spec (Width::integer(), Height::integer(), Flags::wxSizerFlags:wxSizerFlags()) -> wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemwxsizeritem">external documentation</a>.
+-spec new(Width, Height, Flags) -> wxSizerItem() when
+ Width::integer(), Height::integer(), Flags::wxSizerFlags:wxSizerFlags().
new(Width,Height,#wx_ref{type=FlagsT,ref=FlagsRef})
when is_integer(Width),is_integer(Height) ->
?CLASS(FlagsT,wxSizerFlags),
wxe_util:construct(?wxSizerItem_new_3,
<<Width:32/?UI,Height:32/?UI,FlagsRef:32/?UI>>).
-%% @spec (Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Proportion::integer(), Flag::integer(), Border::integer(), UserData::wx:wx()) -> wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemwxsizeritem">external documentation</a>.
+-spec new(Window, Proportion, Flag, Border, UserData) -> wxSizerItem() when
+ Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Proportion::integer(), Flag::integer(), Border::integer(), UserData::wx:wx_object().
new(#wx_ref{type=WindowT,ref=WindowRef},Proportion,Flag,Border,#wx_ref{type=UserDataT,ref=UserDataRef})
when is_integer(Proportion),is_integer(Flag),is_integer(Border) ->
WindowOP = case ?CLASS_T(WindowT,wxWindow) of
@@ -81,214 +86,241 @@ new(#wx_ref{type=WindowT,ref=WindowRef},Proportion,Flag,Border,#wx_ref{type=User
wxe_util:construct(WindowOP,
<<WindowRef:32/?UI,Proportion:32/?UI,Flag:32/?UI,Border:32/?UI,UserDataRef:32/?UI>>).
-%% @spec (Width::integer(), Height::integer(), Proportion::integer(), Flag::integer(), Border::integer(), UserData::wx:wx()) -> wxSizerItem()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemwxsizeritem">external documentation</a>.
+-spec new(Width, Height, Proportion, Flag, Border, UserData) -> wxSizerItem() when
+ Width::integer(), Height::integer(), Proportion::integer(), Flag::integer(), Border::integer(), UserData::wx:wx_object().
new(Width,Height,Proportion,Flag,Border,#wx_ref{type=UserDataT,ref=UserDataRef})
when is_integer(Width),is_integer(Height),is_integer(Proportion),is_integer(Flag),is_integer(Border) ->
?CLASS(UserDataT,wx),
wxe_util:construct(?wxSizerItem_new_6,
<<Width:32/?UI,Height:32/?UI,Proportion:32/?UI,Flag:32/?UI,Border:32/?UI,UserDataRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemcalcmin">external documentation</a>.
+-spec calcMin(This) -> {W::integer(), H::integer()} when
+ This::wxSizerItem().
calcMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_CalcMin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemdeletewindows">external documentation</a>.
+-spec deleteWindows(This) -> ok when
+ This::wxSizerItem().
deleteWindows(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_DeleteWindows,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemdetachsizer">external documentation</a>.
+-spec detachSizer(This) -> ok when
+ This::wxSizerItem().
detachSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_DetachSizer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetborder">external documentation</a>.
+-spec getBorder(This) -> integer() when
+ This::wxSizerItem().
getBorder(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetBorder,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetflag">external documentation</a>.
+-spec getFlag(This) -> integer() when
+ This::wxSizerItem().
getFlag(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetFlag,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetminsize">external documentation</a>.
+-spec getMinSize(This) -> {W::integer(), H::integer()} when
+ This::wxSizerItem().
getMinSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetMinSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxSizerItem().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetproportion">external documentation</a>.
+-spec getProportion(This) -> integer() when
+ This::wxSizerItem().
getProportion(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetProportion,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> float()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetratio">external documentation</a>.
+-spec getRatio(This) -> number() when
+ This::wxSizerItem().
getRatio(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetRatio,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetrect">external documentation</a>.
+-spec getRect(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxSizerItem().
getRect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetRect,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetsize">external documentation</a>.
+-spec getSize(This) -> {W::integer(), H::integer()} when
+ This::wxSizerItem().
getSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> wxSizer:wxSizer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetsizer">external documentation</a>.
+-spec getSizer(This) -> wxSizer:wxSizer() when
+ This::wxSizerItem().
getSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetSizer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetspacer">external documentation</a>.
+-spec getSpacer(This) -> {W::integer(), H::integer()} when
+ This::wxSizerItem().
getSpacer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetSpacer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetuserdata">external documentation</a>.
+-spec getUserData(This) -> wx:wx_object() when
+ This::wxSizerItem().
getUserData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetUserData,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemgetwindow">external documentation</a>.
+-spec getWindow(This) -> wxWindow:wxWindow() when
+ This::wxSizerItem().
getWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemissizer">external documentation</a>.
+-spec isSizer(This) -> boolean() when
+ This::wxSizerItem().
isSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_IsSizer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemisshown">external documentation</a>.
+-spec isShown(This) -> boolean() when
+ This::wxSizerItem().
isShown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_IsShown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemisspacer">external documentation</a>.
+-spec isSpacer(This) -> boolean() when
+ This::wxSizerItem().
isSpacer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_IsSpacer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemiswindow">external documentation</a>.
+-spec isWindow(This) -> boolean() when
+ This::wxSizerItem().
isWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_IsWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSizerItem(), Border::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetborder">external documentation</a>.
+-spec setBorder(This, Border) -> ok when
+ This::wxSizerItem(), Border::integer().
setBorder(#wx_ref{type=ThisT,ref=ThisRef},Border)
when is_integer(Border) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetBorder,
<<ThisRef:32/?UI,Border:32/?UI>>).
-%% @spec (This::wxSizerItem(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetdimension">external documentation</a>.
+-spec setDimension(This, Pos, Size) -> ok when
+ This::wxSizerItem(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}.
setDimension(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY},{SizeW,SizeH})
when is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetDimension,
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxSizerItem(), Flag::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetflag">external documentation</a>.
+-spec setFlag(This, Flag) -> ok when
+ This::wxSizerItem(), Flag::integer().
setFlag(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_integer(Flag) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetFlag,
<<ThisRef:32/?UI,Flag:32/?UI>>).
-%% @spec (This::wxSizerItem(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetinitsize">external documentation</a>.
+-spec setInitSize(This, X, Y) -> ok when
+ This::wxSizerItem(), X::integer(), Y::integer().
setInitSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetInitSize,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxSizerItem(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetminsize">external documentation</a>.
+-spec setMinSize(This, Size) -> ok when
+ This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetMinSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxSizerItem(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetminsize">external documentation</a>.
+-spec setMinSize(This, X, Y) -> ok when
+ This::wxSizerItem(), X::integer(), Y::integer().
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetMinSize_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxSizerItem(), Proportion::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetproportion">external documentation</a>.
+-spec setProportion(This, Proportion) -> ok when
+ This::wxSizerItem(), Proportion::integer().
setProportion(#wx_ref{type=ThisT,ref=ThisRef},Proportion)
when is_integer(Proportion) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetProportion,
<<ThisRef:32/?UI,Proportion:32/?UI>>).
-%% @spec (This::wxSizerItem(),X::float()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetratio">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setRatio(This::wxSizerItem(), Ratio::float()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setRatio(This::wxSizerItem(), Size::{W::integer(), H::integer()}) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setRatio(This, Size) -> ok when<br />
+%% This::wxSizerItem(), Size::{W::integer(), H::integer()}.<br />
+%%
+-spec setRatio(This, Ratio) -> ok when
+ This::wxSizerItem(), Ratio::number();
+ (This, Size) -> ok when
+ This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setRatio(#wx_ref{type=ThisT,ref=ThisRef},Ratio)
- when is_float(Ratio) ->
+ when is_number(Ratio) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetRatio_1_0,
<<ThisRef:32/?UI,Ratio:32/?F>>);
@@ -298,56 +330,62 @@ setRatio(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
wxe_util:cast(?wxSizerItem_SetRatio_1_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxSizerItem(), Width::integer(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetratio">external documentation</a>.
+-spec setRatio(This, Width, Height) -> ok when
+ This::wxSizerItem(), Width::integer(), Height::integer().
setRatio(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetRatio_2,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxSizerItem(), Sizer::wxSizer:wxSizer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetsizer">external documentation</a>.
+-spec setSizer(This, Sizer) -> ok when
+ This::wxSizerItem(), Sizer::wxSizer:wxSizer().
setSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}) ->
?CLASS(ThisT,wxSizerItem),
?CLASS(SizerT,wxSizer),
wxe_util:cast(?wxSizerItem_SetSizer,
<<ThisRef:32/?UI,SizerRef:32/?UI>>).
-%% @spec (This::wxSizerItem(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetspacer">external documentation</a>.
+-spec setSpacer(This, Size) -> ok when
+ This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setSpacer(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetSpacer_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxSizerItem(), Width::integer(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetspacer">external documentation</a>.
+-spec setSpacer(This, Width, Height) -> ok when
+ This::wxSizerItem(), Width::integer(), Height::integer().
setSpacer(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetSpacer_2,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxSizerItem(), Window::wxWindow:wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemsetwindow">external documentation</a>.
+-spec setWindow(This, Window) -> ok when
+ This::wxSizerItem(), Window::wxWindow:wxWindow().
setWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizerItem),
?CLASS(WindowT,wxWindow),
wxe_util:cast(?wxSizerItem_SetWindow,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxSizerItem(), Show::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsizeritem.html#wxsizeritemshow">external documentation</a>.
+-spec show(This, Show) -> ok when
+ This::wxSizerItem(), Show::boolean().
show(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_Show,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
-%% @spec (This::wxSizerItem()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSizerItem()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSizerItem),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSlider.erl b/lib/wx/src/gen/wxSlider.erl
index c7a3d6f5c0..459e9b9c35 100644
--- a/lib/wx/src/gen/wxSlider.erl
+++ b/lib/wx/src/gen/wxSlider.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,27 +71,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxSlider/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSlider()
+-type wxSlider() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxsliderwxslider">external documentation</a>.
+-spec new() -> wxSlider().
new() ->
wxe_util:construct(?wxSlider_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer()) -> wxSlider()
%% @equiv new(Parent,Id,Value,MinValue,MaxValue, [])
+-spec new(Parent, Id, Value, MinValue, MaxValue) -> wxSlider() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer().
+
new(Parent,Id,Value,MinValue,MaxValue)
when is_record(Parent, wx_ref),is_integer(Id),is_integer(Value),is_integer(MinValue),is_integer(MaxValue) ->
new(Parent,Id,Value,MinValue,MaxValue, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer(), [Option]) -> wxSlider()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxsliderwxslider">external documentation</a>.
+-spec new(Parent, Id, Value, MinValue, MaxValue, [Option]) -> wxSlider() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Value,MinValue,MaxValue, Options)
when is_integer(Id),is_integer(Value),is_integer(MinValue),is_integer(MaxValue),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -104,15 +112,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Value,MinValue,MaxValue, Options)
wxe_util:construct(?wxSlider_new_6,
<<ParentRef:32/?UI,Id:32/?UI,Value:32/?UI,MinValue:32/?UI,MaxValue:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSlider(), Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer()) -> bool()
%% @equiv create(This,Parent,Id,Value,MinValue,MaxValue, [])
+-spec create(This, Parent, Id, Value, MinValue, MaxValue) -> boolean() when
+ This::wxSlider(), Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer().
+
create(This,Parent,Id,Value,MinValue,MaxValue)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_integer(Value),is_integer(MinValue),is_integer(MaxValue) ->
create(This,Parent,Id,Value,MinValue,MaxValue, []).
-%% @spec (This::wxSlider(), Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidercreate">external documentation</a>.
+-spec create(This, Parent, Id, Value, MinValue, MaxValue, [Option]) -> boolean() when
+ This::wxSlider(), Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Value,MinValue,MaxValue, Options)
when is_integer(Id),is_integer(Value),is_integer(MinValue),is_integer(MaxValue),is_list(Options) ->
?CLASS(ThisT,wxSlider),
@@ -126,90 +140,101 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Va
wxe_util:call(?wxSlider_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,Value:32/?UI,MinValue:32/?UI,MaxValue:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSlider()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidergetlinesize">external documentation</a>.
+-spec getLineSize(This) -> integer() when
+ This::wxSlider().
getLineSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSlider),
wxe_util:call(?wxSlider_GetLineSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSlider()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidergetmax">external documentation</a>.
+-spec getMax(This) -> integer() when
+ This::wxSlider().
getMax(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSlider),
wxe_util:call(?wxSlider_GetMax,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSlider()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidergetmin">external documentation</a>.
+-spec getMin(This) -> integer() when
+ This::wxSlider().
getMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSlider),
wxe_util:call(?wxSlider_GetMin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSlider()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidergetpagesize">external documentation</a>.
+-spec getPageSize(This) -> integer() when
+ This::wxSlider().
getPageSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSlider),
wxe_util:call(?wxSlider_GetPageSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSlider()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidergetthumblength">external documentation</a>.
+-spec getThumbLength(This) -> integer() when
+ This::wxSlider().
getThumbLength(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSlider),
wxe_util:call(?wxSlider_GetThumbLength,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSlider()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidergetvalue">external documentation</a>.
+-spec getValue(This) -> integer() when
+ This::wxSlider().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSlider),
wxe_util:call(?wxSlider_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSlider(), LineSize::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidersetlinesize">external documentation</a>.
+-spec setLineSize(This, LineSize) -> ok when
+ This::wxSlider(), LineSize::integer().
setLineSize(#wx_ref{type=ThisT,ref=ThisRef},LineSize)
when is_integer(LineSize) ->
?CLASS(ThisT,wxSlider),
wxe_util:cast(?wxSlider_SetLineSize,
<<ThisRef:32/?UI,LineSize:32/?UI>>).
-%% @spec (This::wxSlider(), PageSize::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidersetpagesize">external documentation</a>.
+-spec setPageSize(This, PageSize) -> ok when
+ This::wxSlider(), PageSize::integer().
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},PageSize)
when is_integer(PageSize) ->
?CLASS(ThisT,wxSlider),
wxe_util:cast(?wxSlider_SetPageSize,
<<ThisRef:32/?UI,PageSize:32/?UI>>).
-%% @spec (This::wxSlider(), MinValue::integer(), MaxValue::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidersetrange">external documentation</a>.
+-spec setRange(This, MinValue, MaxValue) -> ok when
+ This::wxSlider(), MinValue::integer(), MaxValue::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},MinValue,MaxValue)
when is_integer(MinValue),is_integer(MaxValue) ->
?CLASS(ThisT,wxSlider),
wxe_util:cast(?wxSlider_SetRange,
<<ThisRef:32/?UI,MinValue:32/?UI,MaxValue:32/?UI>>).
-%% @spec (This::wxSlider(), LenPixels::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidersetthumblength">external documentation</a>.
+-spec setThumbLength(This, LenPixels) -> ok when
+ This::wxSlider(), LenPixels::integer().
setThumbLength(#wx_ref{type=ThisT,ref=ThisRef},LenPixels)
when is_integer(LenPixels) ->
?CLASS(ThisT,wxSlider),
wxe_util:cast(?wxSlider_SetThumbLength,
<<ThisRef:32/?UI,LenPixels:32/?UI>>).
-%% @spec (This::wxSlider(), Value::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxslider.html#wxslidersetvalue">external documentation</a>.
+-spec setValue(This, Value) -> ok when
+ This::wxSlider(), Value::integer().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_integer(Value) ->
?CLASS(ThisT,wxSlider),
wxe_util:cast(?wxSlider_SetValue,
<<ThisRef:32/?UI,Value:32/?UI>>).
-%% @spec (This::wxSlider()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSlider()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSlider),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSpinButton.erl b/lib/wx/src/gen/wxSpinButton.erl
index e269dbe329..0f1dea75b6 100644
--- a/lib/wx/src/gen/wxSpinButton.erl
+++ b/lib/wx/src/gen/wxSpinButton.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,27 +70,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxSpinButton/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSpinButton()
+-type wxSpinButton() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinbutton.html#wxspinbuttonwxspinbutton">external documentation</a>.
+-spec new() -> wxSpinButton().
new() ->
wxe_util:construct(?wxSpinButton_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxSpinButton()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxSpinButton() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxSpinButton()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinbutton.html#wxspinbuttonwxspinbutton">external documentation</a>.
+-spec new(Parent, [Option]) -> wxSpinButton() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -103,15 +111,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxSpinButton_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSpinButton(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxSpinButton(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxSpinButton(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinbutton.html#wxspinbuttoncreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxSpinButton(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSpinButton),
@@ -125,45 +139,50 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxSpinButton_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSpinButton()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinbutton.html#wxspinbuttongetmax">external documentation</a>.
+-spec getMax(This) -> integer() when
+ This::wxSpinButton().
getMax(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSpinButton),
wxe_util:call(?wxSpinButton_GetMax,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSpinButton()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinbutton.html#wxspinbuttongetmin">external documentation</a>.
+-spec getMin(This) -> integer() when
+ This::wxSpinButton().
getMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSpinButton),
wxe_util:call(?wxSpinButton_GetMin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSpinButton()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinbutton.html#wxspinbuttongetvalue">external documentation</a>.
+-spec getValue(This) -> integer() when
+ This::wxSpinButton().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSpinButton),
wxe_util:call(?wxSpinButton_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSpinButton(), MinVal::integer(), MaxVal::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinbutton.html#wxspinbuttonsetrange">external documentation</a>.
+-spec setRange(This, MinVal, MaxVal) -> ok when
+ This::wxSpinButton(), MinVal::integer(), MaxVal::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},MinVal,MaxVal)
when is_integer(MinVal),is_integer(MaxVal) ->
?CLASS(ThisT,wxSpinButton),
wxe_util:cast(?wxSpinButton_SetRange,
<<ThisRef:32/?UI,MinVal:32/?UI,MaxVal:32/?UI>>).
-%% @spec (This::wxSpinButton(), Value::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinbutton.html#wxspinbuttonsetvalue">external documentation</a>.
+-spec setValue(This, Value) -> ok when
+ This::wxSpinButton(), Value::integer().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_integer(Value) ->
?CLASS(ThisT,wxSpinButton),
wxe_util:cast(?wxSpinButton_SetValue,
<<ThisRef:32/?UI,Value:32/?UI>>).
-%% @spec (This::wxSpinButton()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSpinButton()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSpinButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSpinCtrl.erl b/lib/wx/src/gen/wxSpinCtrl.erl
index c6e8ad2238..82e49da46d 100644
--- a/lib/wx/src/gen/wxSpinCtrl.erl
+++ b/lib/wx/src/gen/wxSpinCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,27 +70,39 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxSpinCtrl/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSpinCtrl()
+-type wxSpinCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlwxspinctrl">external documentation</a>.
+-spec new() -> wxSpinCtrl().
new() ->
wxe_util:construct(?wxSpinCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxSpinCtrl()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxSpinCtrl() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxSpinCtrl()
-%% Option = {id, integer()} | {value, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {min, integer()} | {max, integer()} | {initial, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlwxspinctrl">external documentation</a>.
+-spec new(Parent, [Option]) -> wxSpinCtrl() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {value, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {min, integer()}
+ | {max, integer()}
+ | {initial, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -107,15 +119,25 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxSpinCtrl_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSpinCtrl(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxSpinCtrl(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxSpinCtrl(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {value, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {min, integer()} | {max, integer()} | {initial, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxSpinCtrl(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {value, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {min, integer()}
+ | {max, integer()}
+ | {initial, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSpinCtrl),
@@ -133,15 +155,15 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxSpinCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSpinCtrl(),X::integer()|string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlsetvalue">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setValue(This::wxSpinCtrl(), Value::integer()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setValue(This::wxSpinCtrl(), Text::string()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setValue(This, Text) -> ok when<br />
+%% This::wxSpinCtrl(), Text::unicode:chardata().<br />
+%%
+-spec setValue(This, Value) -> ok when
+ This::wxSpinCtrl(), Value::integer();
+ (This, Text) -> ok when
+ This::wxSpinCtrl(), Text::unicode:chardata().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_integer(Value) ->
?CLASS(ThisT,wxSpinCtrl),
@@ -154,45 +176,50 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxSpinCtrl_SetValue_1_1,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxSpinCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlgetvalue">external documentation</a>.
+-spec getValue(This) -> integer() when
+ This::wxSpinCtrl().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSpinCtrl),
wxe_util:call(?wxSpinCtrl_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSpinCtrl(), MinVal::integer(), MaxVal::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlsetrange">external documentation</a>.
+-spec setRange(This, MinVal, MaxVal) -> ok when
+ This::wxSpinCtrl(), MinVal::integer(), MaxVal::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},MinVal,MaxVal)
when is_integer(MinVal),is_integer(MaxVal) ->
?CLASS(ThisT,wxSpinCtrl),
wxe_util:cast(?wxSpinCtrl_SetRange,
<<ThisRef:32/?UI,MinVal:32/?UI,MaxVal:32/?UI>>).
-%% @spec (This::wxSpinCtrl(), From::integer(), To::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlsetselection">external documentation</a>.
+-spec setSelection(This, From, To) -> ok when
+ This::wxSpinCtrl(), From::integer(), To::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
?CLASS(ThisT,wxSpinCtrl),
wxe_util:cast(?wxSpinCtrl_SetSelection,
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
-%% @spec (This::wxSpinCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlgetmin">external documentation</a>.
+-spec getMin(This) -> integer() when
+ This::wxSpinCtrl().
getMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSpinCtrl),
wxe_util:call(?wxSpinCtrl_GetMin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSpinCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinctrl.html#wxspinctrlgetmax">external documentation</a>.
+-spec getMax(This) -> integer() when
+ This::wxSpinCtrl().
getMax(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSpinCtrl),
wxe_util:call(?wxSpinCtrl_GetMax,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSpinCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSpinCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSpinCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSpinEvent.erl b/lib/wx/src/gen/wxSpinEvent.erl
index 82edc70983..ecbe557c7b 100644
--- a/lib/wx/src/gen/wxSpinEvent.erl
+++ b/lib/wx/src/gen/wxSpinEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,21 +41,25 @@
isSelection/1,parent_class/1,resumePropagation/2,setInt/2,setString/2,
shouldPropagate/1,skip/1,skip/2,stopPropagation/1,veto/1]).
+-export_type([wxSpinEvent/0]).
%% @hidden
parent_class(wxNotifyEvent) -> true;
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxSpinEvent()) -> integer()
+-type wxSpinEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinevent.html#wxspineventgetposition">external documentation</a>.
+-spec getPosition(This) -> integer() when
+ This::wxSpinEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSpinEvent),
wxe_util:call(?wxSpinEvent_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSpinEvent(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxspinevent.html#wxspineventsetposition">external documentation</a>.
+-spec setPosition(This, Pos) -> ok when
+ This::wxSpinEvent(), Pos::integer().
setPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxSpinEvent),
diff --git a/lib/wx/src/gen/wxSplashScreen.erl b/lib/wx/src/gen/wxSplashScreen.erl
index 79ef8e413a..2222f5e64e 100644
--- a/lib/wx/src/gen/wxSplashScreen.erl
+++ b/lib/wx/src/gen/wxSplashScreen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -80,6 +80,7 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxSplashScreen/0]).
%% @hidden
parent_class(wxFrame) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -87,21 +88,27 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSplashScreen()
+-type wxSplashScreen() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplashscreen.html#wxsplashscreenwxsplashscreen">external documentation</a>.
+-spec new() -> wxSplashScreen().
new() ->
wxe_util:construct(?wxSplashScreen_new_0,
<<>>).
-%% @spec (Bitmap::wxBitmap:wxBitmap(), SplashStyle::integer(), Milliseconds::integer(), Parent::wxWindow:wxWindow(), Id::integer()) -> wxSplashScreen()
%% @equiv new(Bitmap,SplashStyle,Milliseconds,Parent,Id, [])
+-spec new(Bitmap, SplashStyle, Milliseconds, Parent, Id) -> wxSplashScreen() when
+ Bitmap::wxBitmap:wxBitmap(), SplashStyle::integer(), Milliseconds::integer(), Parent::wxWindow:wxWindow(), Id::integer().
+
new(Bitmap,SplashStyle,Milliseconds,Parent,Id)
when is_record(Bitmap, wx_ref),is_integer(SplashStyle),is_integer(Milliseconds),is_record(Parent, wx_ref),is_integer(Id) ->
new(Bitmap,SplashStyle,Milliseconds,Parent,Id, []).
-%% @spec (Bitmap::wxBitmap:wxBitmap(), SplashStyle::integer(), Milliseconds::integer(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxSplashScreen()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplashscreen.html#wxsplashscreenwxsplashscreen">external documentation</a>.
+-spec new(Bitmap, SplashStyle, Milliseconds, Parent, Id, [Option]) -> wxSplashScreen() when
+ Bitmap::wxBitmap:wxBitmap(), SplashStyle::integer(), Milliseconds::integer(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=BitmapT,ref=BitmapRef},SplashStyle,Milliseconds,#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(SplashStyle),is_integer(Milliseconds),is_integer(Id),is_list(Options) ->
?CLASS(BitmapT,wxBitmap),
@@ -114,22 +121,24 @@ new(#wx_ref{type=BitmapT,ref=BitmapRef},SplashStyle,Milliseconds,#wx_ref{type=Pa
wxe_util:construct(?wxSplashScreen_new_6,
<<BitmapRef:32/?UI,SplashStyle:32/?UI,Milliseconds:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSplashScreen()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplashscreen.html#wxsplashscreengetsplashstyle">external documentation</a>.
+-spec getSplashStyle(This) -> integer() when
+ This::wxSplashScreen().
getSplashStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplashScreen),
wxe_util:call(?wxSplashScreen_GetSplashStyle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplashScreen()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplashscreen.html#wxsplashscreengettimeout">external documentation</a>.
+-spec getTimeout(This) -> integer() when
+ This::wxSplashScreen().
getTimeout(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplashScreen),
wxe_util:call(?wxSplashScreen_GetTimeout,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplashScreen()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSplashScreen()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSplashScreen),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSplitterEvent.erl b/lib/wx/src/gen/wxSplitterEvent.erl
index 512f858284..bba9b13abd 100644
--- a/lib/wx/src/gen/wxSplitterEvent.erl
+++ b/lib/wx/src/gen/wxSplitterEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,42 +41,49 @@
isSelection/1,parent_class/1,resumePropagation/2,setInt/2,setString/2,
shouldPropagate/1,skip/1,skip/2,stopPropagation/1,veto/1]).
+-export_type([wxSplitterEvent/0]).
%% @hidden
parent_class(wxNotifyEvent) -> true;
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxSplitterEvent()) -> integer()
+-type wxSplitterEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterevent.html#wxsplittereventgetsashposition">external documentation</a>.
+-spec getSashPosition(This) -> integer() when
+ This::wxSplitterEvent().
getSashPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterEvent),
wxe_util:call(?wxSplitterEvent_GetSashPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterevent.html#wxsplittereventgetx">external documentation</a>.
+-spec getX(This) -> integer() when
+ This::wxSplitterEvent().
getX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterEvent),
wxe_util:call(?wxSplitterEvent_GetX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterevent.html#wxsplittereventgety">external documentation</a>.
+-spec getY(This) -> integer() when
+ This::wxSplitterEvent().
getY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterEvent),
wxe_util:call(?wxSplitterEvent_GetY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterEvent()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterevent.html#wxsplittereventgetwindowbeingremoved">external documentation</a>.
+-spec getWindowBeingRemoved(This) -> wxWindow:wxWindow() when
+ This::wxSplitterEvent().
getWindowBeingRemoved(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterEvent),
wxe_util:call(?wxSplitterEvent_GetWindowBeingRemoved,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterEvent(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterevent.html#wxsplittereventsetsashposition">external documentation</a>.
+-spec setSashPosition(This, Pos) -> ok when
+ This::wxSplitterEvent(), Pos::integer().
setSashPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxSplitterEvent),
diff --git a/lib/wx/src/gen/wxSplitterWindow.erl b/lib/wx/src/gen/wxSplitterWindow.erl
index b17fed3151..231f93911f 100644
--- a/lib/wx/src/gen/wxSplitterWindow.erl
+++ b/lib/wx/src/gen/wxSplitterWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -73,26 +73,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxSplitterWindow/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxSplitterWindow()
+-type wxSplitterWindow() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowwxsplitterwindow">external documentation</a>.
+-spec new() -> wxSplitterWindow().
new() ->
wxe_util:construct(?wxSplitterWindow_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxSplitterWindow()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxSplitterWindow() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxSplitterWindow()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowwxsplitterwindow">external documentation</a>.
+-spec new(Parent, [Option]) -> wxSplitterWindow() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -105,15 +113,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxSplitterWindow_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSplitterWindow(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxSplitterWindow(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxSplitterWindow(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxSplitterWindow(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -127,67 +141,75 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxSplitterWindow_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSplitterWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowgetminimumpanesize">external documentation</a>.
+-spec getMinimumPaneSize(This) -> integer() when
+ This::wxSplitterWindow().
getMinimumPaneSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:call(?wxSplitterWindow_GetMinimumPaneSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow()) -> float()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowgetsashgravity">external documentation</a>.
+-spec getSashGravity(This) -> number() when
+ This::wxSplitterWindow().
getSashGravity(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:call(?wxSplitterWindow_GetSashGravity,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowgetsashposition">external documentation</a>.
+-spec getSashPosition(This) -> integer() when
+ This::wxSplitterWindow().
getSashPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:call(?wxSplitterWindow_GetSashPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow()) -> WxSplitMode
-%% WxSplitMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowgetsplitmode">external documentation</a>.
-%%<br /> WxSplitMode is one of ?wxSPLIT_HORIZONTAL | ?wxSPLIT_VERTICAL
+%%<br /> Res = ?wxSPLIT_HORIZONTAL | ?wxSPLIT_VERTICAL
+-spec getSplitMode(This) -> wx:wx_enum() when
+ This::wxSplitterWindow().
getSplitMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:call(?wxSplitterWindow_GetSplitMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowgetwindow1">external documentation</a>.
+-spec getWindow1(This) -> wxWindow:wxWindow() when
+ This::wxSplitterWindow().
getWindow1(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:call(?wxSplitterWindow_GetWindow1,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowgetwindow2">external documentation</a>.
+-spec getWindow2(This) -> wxWindow:wxWindow() when
+ This::wxSplitterWindow().
getWindow2(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:call(?wxSplitterWindow_GetWindow2,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow(), Window::wxWindow:wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowinitialize">external documentation</a>.
+-spec initialize(This, Window) -> ok when
+ This::wxSplitterWindow(), Window::wxWindow:wxWindow().
initialize(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSplitterWindow),
?CLASS(WindowT,wxWindow),
wxe_util:cast(?wxSplitterWindow_Initialize,
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowissplit">external documentation</a>.
+-spec isSplit(This) -> boolean() when
+ This::wxSplitterWindow().
isSplit(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:call(?wxSplitterWindow_IsSplit,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow(), WinOld::wxWindow:wxWindow(), WinNew::wxWindow:wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowreplacewindow">external documentation</a>.
+-spec replaceWindow(This, WinOld, WinNew) -> boolean() when
+ This::wxSplitterWindow(), WinOld::wxWindow:wxWindow(), WinNew::wxWindow:wxWindow().
replaceWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinOldT,ref=WinOldRef},#wx_ref{type=WinNewT,ref=WinNewRef}) ->
?CLASS(ThisT,wxSplitterWindow),
?CLASS(WinOldT,wxWindow),
@@ -195,23 +217,27 @@ replaceWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinOldT,ref=WinOldRef
wxe_util:call(?wxSplitterWindow_ReplaceWindow,
<<ThisRef:32/?UI,WinOldRef:32/?UI,WinNewRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow(), Gravity::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowsetsashgravity">external documentation</a>.
+-spec setSashGravity(This, Gravity) -> ok when
+ This::wxSplitterWindow(), Gravity::number().
setSashGravity(#wx_ref{type=ThisT,ref=ThisRef},Gravity)
- when is_float(Gravity) ->
+ when is_number(Gravity) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:cast(?wxSplitterWindow_SetSashGravity,
<<ThisRef:32/?UI,0:32,Gravity:64/?F>>).
-%% @spec (This::wxSplitterWindow(), Position::integer()) -> ok
%% @equiv setSashPosition(This,Position, [])
+-spec setSashPosition(This, Position) -> ok when
+ This::wxSplitterWindow(), Position::integer().
+
setSashPosition(This,Position)
when is_record(This, wx_ref),is_integer(Position) ->
setSashPosition(This,Position, []).
-%% @spec (This::wxSplitterWindow(), Position::integer(), [Option]) -> ok
-%% Option = {redraw, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowsetsashposition">external documentation</a>.
+-spec setSashPosition(This, Position, [Option]) -> ok when
+ This::wxSplitterWindow(), Position::integer(),
+ Option :: {redraw, boolean()}.
setSashPosition(#wx_ref{type=ThisT,ref=ThisRef},Position, Options)
when is_integer(Position),is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -221,39 +247,45 @@ setSashPosition(#wx_ref{type=ThisT,ref=ThisRef},Position, Options)
wxe_util:cast(?wxSplitterWindow_SetSashPosition,
<<ThisRef:32/?UI,Position:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxSplitterWindow(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowsetsashsize">external documentation</a>.
+-spec setSashSize(This, Width) -> ok when
+ This::wxSplitterWindow(), Width::integer().
setSashSize(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:cast(?wxSplitterWindow_SetSashSize,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxSplitterWindow(), Min::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowsetminimumpanesize">external documentation</a>.
+-spec setMinimumPaneSize(This, Min) -> ok when
+ This::wxSplitterWindow(), Min::integer().
setMinimumPaneSize(#wx_ref{type=ThisT,ref=ThisRef},Min)
when is_integer(Min) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:cast(?wxSplitterWindow_SetMinimumPaneSize,
<<ThisRef:32/?UI,Min:32/?UI>>).
-%% @spec (This::wxSplitterWindow(), Mode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowsetsplitmode">external documentation</a>.
+-spec setSplitMode(This, Mode) -> ok when
+ This::wxSplitterWindow(), Mode::integer().
setSplitMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:cast(?wxSplitterWindow_SetSplitMode,
<<ThisRef:32/?UI,Mode:32/?UI>>).
-%% @spec (This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow()) -> bool()
%% @equiv splitHorizontally(This,Window1,Window2, [])
+-spec splitHorizontally(This, Window1, Window2) -> boolean() when
+ This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow().
+
splitHorizontally(This,Window1,Window2)
when is_record(This, wx_ref),is_record(Window1, wx_ref),is_record(Window2, wx_ref) ->
splitHorizontally(This,Window1,Window2, []).
-%% @spec (This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {sashPosition, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowsplithorizontally">external documentation</a>.
+-spec splitHorizontally(This, Window1, Window2, [Option]) -> boolean() when
+ This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow(),
+ Option :: {sashPosition, integer()}.
splitHorizontally(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Window1T,ref=Window1Ref},#wx_ref{type=Window2T,ref=Window2Ref}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -265,15 +297,18 @@ splitHorizontally(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Window1T,ref=Wind
wxe_util:call(?wxSplitterWindow_SplitHorizontally,
<<ThisRef:32/?UI,Window1Ref:32/?UI,Window2Ref:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow()) -> bool()
%% @equiv splitVertically(This,Window1,Window2, [])
+-spec splitVertically(This, Window1, Window2) -> boolean() when
+ This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow().
+
splitVertically(This,Window1,Window2)
when is_record(This, wx_ref),is_record(Window1, wx_ref),is_record(Window2, wx_ref) ->
splitVertically(This,Window1,Window2, []).
-%% @spec (This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {sashPosition, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowsplitvertically">external documentation</a>.
+-spec splitVertically(This, Window1, Window2, [Option]) -> boolean() when
+ This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow(),
+ Option :: {sashPosition, integer()}.
splitVertically(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Window1T,ref=Window1Ref},#wx_ref{type=Window2T,ref=Window2Ref}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -285,15 +320,18 @@ splitVertically(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Window1T,ref=Window
wxe_util:call(?wxSplitterWindow_SplitVertically,
<<ThisRef:32/?UI,Window1Ref:32/?UI,Window2Ref:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSplitterWindow()) -> bool()
%% @equiv unsplit(This, [])
+-spec unsplit(This) -> boolean() when
+ This::wxSplitterWindow().
+
unsplit(This)
when is_record(This, wx_ref) ->
unsplit(This, []).
-%% @spec (This::wxSplitterWindow(), [Option]) -> bool()
-%% Option = {toRemove, wxWindow:wxWindow()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowunsplit">external documentation</a>.
+-spec unsplit(This, [Option]) -> boolean() when
+ This::wxSplitterWindow(),
+ Option :: {toRemove, wxWindow:wxWindow()}.
unsplit(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -303,15 +341,16 @@ unsplit(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxSplitterWindow_Unsplit,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxSplitterWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsplitterwindow.html#wxsplitterwindowupdatesize">external documentation</a>.
+-spec updateSize(This) -> ok when
+ This::wxSplitterWindow().
updateSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
wxe_util:cast(?wxSplitterWindow_UpdateSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxSplitterWindow()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxSplitterWindow()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSplitterWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticBitmap.erl b/lib/wx/src/gen/wxStaticBitmap.erl
index 31e39b3a6c..02272c8107 100644
--- a/lib/wx/src/gen/wxStaticBitmap.erl
+++ b/lib/wx/src/gen/wxStaticBitmap.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -69,27 +69,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxStaticBitmap/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxStaticBitmap()
+-type wxStaticBitmap() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticbitmap.html#wxstaticbitmapwxstaticbitmap">external documentation</a>.
+-spec new() -> wxStaticBitmap().
new() ->
wxe_util:construct(?wxStaticBitmap_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap()) -> wxStaticBitmap()
%% @equiv new(Parent,Id,Label, [])
+-spec new(Parent, Id, Label) -> wxStaticBitmap() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap().
+
new(Parent,Id,Label)
when is_record(Parent, wx_ref),is_integer(Id),is_record(Label, wx_ref) ->
new(Parent,Id,Label, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap(), [Option]) -> wxStaticBitmap()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticbitmap.html#wxstaticbitmapwxstaticbitmap">external documentation</a>.
+-spec new(Parent, Id, Label, [Option]) -> wxStaticBitmap() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=LabelT,ref=LabelRef}, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -102,15 +109,20 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=LabelT,ref=LabelRef}, Op
wxe_util:construct(?wxStaticBitmap_new_4,
<<ParentRef:32/?UI,Id:32/?UI,LabelRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxStaticBitmap(), Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap()) -> bool()
%% @equiv create(This,Parent,Id,Label, [])
+-spec create(This, Parent, Id, Label) -> boolean() when
+ This::wxStaticBitmap(), Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap().
+
create(This,Parent,Id,Label)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_record(Label, wx_ref) ->
create(This,Parent,Id,Label, []).
-%% @spec (This::wxStaticBitmap(), Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticbitmap.html#wxstaticbitmapcreate">external documentation</a>.
+-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
+ This::wxStaticBitmap(), Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=LabelT,ref=LabelRef}, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxStaticBitmap),
@@ -124,23 +136,25 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#w
wxe_util:call(?wxStaticBitmap_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,LabelRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxStaticBitmap()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticbitmap.html#wxstaticbitmapgetbitmap">external documentation</a>.
+-spec getBitmap(This) -> wxBitmap:wxBitmap() when
+ This::wxStaticBitmap().
getBitmap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStaticBitmap),
wxe_util:call(?wxStaticBitmap_GetBitmap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStaticBitmap(), Bitmap::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticbitmap.html#wxstaticbitmapsetbitmap">external documentation</a>.
+-spec setBitmap(This, Bitmap) -> ok when
+ This::wxStaticBitmap(), Bitmap::wxBitmap:wxBitmap().
setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxStaticBitmap),
?CLASS(BitmapT,wxBitmap),
wxe_util:cast(?wxStaticBitmap_SetBitmap,
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
-%% @spec (This::wxStaticBitmap()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxStaticBitmap()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticBitmap),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticBox.erl b/lib/wx/src/gen/wxStaticBox.erl
index ec83ff5fd9..e4e390610a 100644
--- a/lib/wx/src/gen/wxStaticBox.erl
+++ b/lib/wx/src/gen/wxStaticBox.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -69,27 +69,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxStaticBox/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxStaticBox()
+-type wxStaticBox() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticbox.html#wxstaticboxwxstaticbox">external documentation</a>.
+-spec new() -> wxStaticBox().
new() ->
wxe_util:construct(?wxStaticBox_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> wxStaticBox()
%% @equiv new(Parent,Id,Label, [])
+-spec new(Parent, Id, Label) -> wxStaticBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
new(Parent,Id,Label)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
new(Parent,Id,Label, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> wxStaticBox()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticbox.html#wxstaticboxwxstaticbox">external documentation</a>.
+-spec new(Parent, Id, Label, [Option]) -> wxStaticBox() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -102,15 +109,20 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
wxe_util:construct(?wxStaticBox_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxStaticBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> bool()
%% @equiv create(This,Parent,Id,Label, [])
+-spec create(This, Parent, Id, Label) -> boolean() when
+ This::wxStaticBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
create(This,Parent,Id,Label)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
create(This,Parent,Id,Label, []).
-%% @spec (This::wxStaticBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticbox.html#wxstaticboxcreate">external documentation</a>.
+-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
+ This::wxStaticBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxStaticBox),
@@ -124,8 +136,8 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,La
wxe_util:call(?wxStaticBox_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxStaticBox()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxStaticBox()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticBoxSizer.erl b/lib/wx/src/gen/wxStaticBoxSizer.erl
index 2cf9f64325..fc8afc1146 100644
--- a/lib/wx/src/gen/wxStaticBoxSizer.erl
+++ b/lib/wx/src/gen/wxStaticBoxSizer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,19 +41,22 @@
setItemMinSize/4,setMinSize/2,setMinSize/3,setSizeHints/2,setVirtualSizeHints/2,
show/2,show/3]).
+-export_type([wxStaticBoxSizer/0]).
%% @hidden
parent_class(wxBoxSizer) -> true;
parent_class(wxSizer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (X::integer()|term(),X::term()|integer()) -> wxStaticBoxSizer()
+-type wxStaticBoxSizer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticboxsizer.html#wxstaticboxsizerwxstaticboxsizer">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% new(Orient::integer(), Win::wxWindow:wxWindow()) -> new(Orient,Win, []) </c></p>
-%% <p><c>
-%% new(Box::wxStaticBox:wxStaticBox(), Orient::integer()) -> wxStaticBoxSizer() </c>
-%% </p>
+%% <br /> Also:<br />
+%% new(Box, Orient) -> wxStaticBoxSizer() when<br />
+%% Box::wxStaticBox:wxStaticBox(), Orient::integer().<br />
+%%
+-spec new(Orient, Win) -> wxStaticBoxSizer() when
+ Orient::integer(), Win::wxWindow:wxWindow();
+ (Box, Orient) -> wxStaticBoxSizer() when
+ Box::wxStaticBox:wxStaticBox(), Orient::integer().
new(Orient,Win)
when is_integer(Orient),is_record(Win, wx_ref) ->
@@ -64,9 +67,10 @@ new(#wx_ref{type=BoxT,ref=BoxRef},Orient)
wxe_util:construct(?wxStaticBoxSizer_new_2,
<<BoxRef:32/?UI,Orient:32/?UI>>).
-%% @spec (Orient::integer(), Win::wxWindow:wxWindow(), [Option]) -> wxStaticBoxSizer()
-%% Option = {label, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticboxsizer.html#wxstaticboxsizerwxstaticboxsizer">external documentation</a>.
+-spec new(Orient, Win, [Option]) -> wxStaticBoxSizer() when
+ Orient::integer(), Win::wxWindow:wxWindow(),
+ Option :: {label, unicode:chardata()}.
new(Orient,#wx_ref{type=WinT,ref=WinRef}, Options)
when is_integer(Orient),is_list(Options) ->
?CLASS(WinT,wxWindow),
@@ -76,15 +80,16 @@ new(Orient,#wx_ref{type=WinT,ref=WinRef}, Options)
wxe_util:construct(?wxStaticBoxSizer_new_3,
<<Orient:32/?UI,WinRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxStaticBoxSizer()) -> wxStaticBox:wxStaticBox()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticboxsizer.html#wxstaticboxsizergetstaticbox">external documentation</a>.
+-spec getStaticBox(This) -> wxStaticBox:wxStaticBox() when
+ This::wxStaticBoxSizer().
getStaticBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStaticBoxSizer),
wxe_util:call(?wxStaticBoxSizer_GetStaticBox,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStaticBoxSizer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxStaticBoxSizer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticBoxSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticLine.erl b/lib/wx/src/gen/wxStaticLine.erl
index a850065ba0..86a9975312 100644
--- a/lib/wx/src/gen/wxStaticLine.erl
+++ b/lib/wx/src/gen/wxStaticLine.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,27 +70,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxStaticLine/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxStaticLine()
+-type wxStaticLine() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticline.html#wxstaticlinewxstaticline">external documentation</a>.
+-spec new() -> wxStaticLine().
new() ->
wxe_util:construct(?wxStaticLine_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxStaticLine()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxStaticLine() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxStaticLine()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticline.html#wxstaticlinewxstaticline">external documentation</a>.
+-spec new(Parent, [Option]) -> wxStaticLine() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -103,15 +111,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxStaticLine_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxStaticLine(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxStaticLine(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxStaticLine(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticline.html#wxstaticlinecreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxStaticLine(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStaticLine),
@@ -125,21 +139,22 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxStaticLine_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxStaticLine()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticline.html#wxstaticlineisvertical">external documentation</a>.
+-spec isVertical(This) -> boolean() when
+ This::wxStaticLine().
isVertical(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStaticLine),
wxe_util:call(?wxStaticLine_IsVertical,
<<ThisRef:32/?UI>>).
-%% @spec () -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstaticline.html#wxstaticlinegetdefaultsize">external documentation</a>.
+-spec getDefaultSize() -> integer().
getDefaultSize() ->
wxe_util:call(?wxStaticLine_GetDefaultSize,
<<>>).
-%% @spec (This::wxStaticLine()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxStaticLine()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticLine),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticText.erl b/lib/wx/src/gen/wxStaticText.erl
index 301999d49a..de779f66fc 100644
--- a/lib/wx/src/gen/wxStaticText.erl
+++ b/lib/wx/src/gen/wxStaticText.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -69,27 +69,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxStaticText/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxStaticText()
+-type wxStaticText() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatictext.html#wxstatictextwxstatictext">external documentation</a>.
+-spec new() -> wxStaticText().
new() ->
wxe_util:construct(?wxStaticText_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> wxStaticText()
%% @equiv new(Parent,Id,Label, [])
+-spec new(Parent, Id, Label) -> wxStaticText() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
new(Parent,Id,Label)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
new(Parent,Id,Label, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> wxStaticText()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatictext.html#wxstatictextwxstatictext">external documentation</a>.
+-spec new(Parent, Id, Label, [Option]) -> wxStaticText() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -102,15 +109,20 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
wxe_util:construct(?wxStaticText_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxStaticText(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> bool()
%% @equiv create(This,Parent,Id,Label, [])
+-spec create(This, Parent, Id, Label) -> boolean() when
+ This::wxStaticText(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
create(This,Parent,Id,Label)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
create(This,Parent,Id,Label, []).
-%% @spec (This::wxStaticText(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatictext.html#wxstatictextcreate">external documentation</a>.
+-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
+ This::wxStaticText(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxStaticText),
@@ -124,15 +136,17 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,La
wxe_util:call(?wxStaticText_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxStaticText()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatictext.html#wxstatictextgetlabel">external documentation</a>.
+-spec getLabel(This) -> unicode:charlist() when
+ This::wxStaticText().
getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStaticText),
wxe_util:call(?wxStaticText_GetLabel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStaticText(), Label::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatictext.html#wxstatictextsetlabel">external documentation</a>.
+-spec setLabel(This, Label) -> ok when
+ This::wxStaticText(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
when is_list(Label) ->
?CLASS(ThisT,wxStaticText),
@@ -140,16 +154,17 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
wxe_util:cast(?wxStaticText_SetLabel,
<<ThisRef:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStaticText(), Width::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatictext.html#wxstatictextwrap">external documentation</a>.
+-spec wrap(This, Width) -> ok when
+ This::wxStaticText(), Width::integer().
wrap(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
?CLASS(ThisT,wxStaticText),
wxe_util:cast(?wxStaticText_Wrap,
<<ThisRef:32/?UI,Width:32/?UI>>).
-%% @spec (This::wxStaticText()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxStaticText()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticText),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStatusBar.erl b/lib/wx/src/gen/wxStatusBar.erl
index 6e77761f1d..31dab03b56 100644
--- a/lib/wx/src/gen/wxStatusBar.erl
+++ b/lib/wx/src/gen/wxStatusBar.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,26 +71,32 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxStatusBar/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxStatusBar()
+-type wxStatusBar() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarwxstatusbar">external documentation</a>.
+-spec new() -> wxStatusBar().
new() ->
wxe_util:construct(?wxStatusBar_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxStatusBar()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxStatusBar() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxStatusBar()
-%% Option = {winid, integer()} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarwxstatusbar">external documentation</a>.
+-spec new(Parent, [Option]) -> wxStatusBar() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {winid, integer()}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -101,15 +107,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxStatusBar_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxStatusBar(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxStatusBar(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxStatusBar(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {winid, integer()} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxStatusBar(), Parent::wxWindow:wxWindow(),
+ Option :: {winid, integer()}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -121,30 +131,35 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxStatusBar_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxStatusBar(), I::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbargetfieldrect">external documentation</a>.
+-spec getFieldRect(This, I, Rect) -> boolean() when
+ This::wxStatusBar(), I::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
getFieldRect(#wx_ref{type=ThisT,ref=ThisRef},I,{RectX,RectY,RectW,RectH})
when is_integer(I),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
?CLASS(ThisT,wxStatusBar),
wxe_util:call(?wxStatusBar_GetFieldRect,
<<ThisRef:32/?UI,I:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxStatusBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbargetfieldscount">external documentation</a>.
+-spec getFieldsCount(This) -> integer() when
+ This::wxStatusBar().
getFieldsCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStatusBar),
wxe_util:call(?wxStatusBar_GetFieldsCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStatusBar()) -> string()
%% @equiv getStatusText(This, [])
+-spec getStatusText(This) -> unicode:charlist() when
+ This::wxStatusBar().
+
getStatusText(This)
when is_record(This, wx_ref) ->
getStatusText(This, []).
-%% @spec (This::wxStatusBar(), [Option]) -> string()
-%% Option = {number, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbargetstatustext">external documentation</a>.
+-spec getStatusText(This, [Option]) -> unicode:charlist() when
+ This::wxStatusBar(),
+ Option :: {number, integer()}.
getStatusText(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -154,15 +169,18 @@ getStatusText(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxStatusBar_GetStatusText,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxStatusBar()) -> ok
%% @equiv popStatusText(This, [])
+-spec popStatusText(This) -> ok when
+ This::wxStatusBar().
+
popStatusText(This)
when is_record(This, wx_ref) ->
popStatusText(This, []).
-%% @spec (This::wxStatusBar(), [Option]) -> ok
-%% Option = {number, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarpopstatustext">external documentation</a>.
+-spec popStatusText(This, [Option]) -> ok when
+ This::wxStatusBar(),
+ Option :: {number, integer()}.
popStatusText(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -172,15 +190,18 @@ popStatusText(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxStatusBar_PopStatusText,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxStatusBar(), Text::string()) -> ok
%% @equiv pushStatusText(This,Text, [])
+-spec pushStatusText(This, Text) -> ok when
+ This::wxStatusBar(), Text::unicode:chardata().
+
pushStatusText(This,Text)
when is_record(This, wx_ref),is_list(Text) ->
pushStatusText(This,Text, []).
-%% @spec (This::wxStatusBar(), Text::string(), [Option]) -> ok
-%% Option = {number, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarpushstatustext">external documentation</a>.
+-spec pushStatusText(This, Text, [Option]) -> ok when
+ This::wxStatusBar(), Text::unicode:chardata(),
+ Option :: {number, integer()}.
pushStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -191,15 +212,18 @@ pushStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
wxe_util:cast(?wxStatusBar_PushStatusText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxStatusBar(), Number::integer()) -> ok
%% @equiv setFieldsCount(This,Number, [])
+-spec setFieldsCount(This, Number) -> ok when
+ This::wxStatusBar(), Number::integer().
+
setFieldsCount(This,Number)
when is_record(This, wx_ref),is_integer(Number) ->
setFieldsCount(This,Number, []).
-%% @spec (This::wxStatusBar(), Number::integer(), [Option]) -> ok
-%% Option = {widths, [integer()]}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarsetfieldscount">external documentation</a>.
+-spec setFieldsCount(This, Number, [Option]) -> ok when
+ This::wxStatusBar(), Number::integer(),
+ Option :: {widths, [integer()]}.
setFieldsCount(#wx_ref{type=ThisT,ref=ThisRef},Number, Options)
when is_integer(Number),is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -210,23 +234,27 @@ setFieldsCount(#wx_ref{type=ThisT,ref=ThisRef},Number, Options)
wxe_util:cast(?wxStatusBar_SetFieldsCount,
<<ThisRef:32/?UI,Number:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxStatusBar(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarsetminheight">external documentation</a>.
+-spec setMinHeight(This, Height) -> ok when
+ This::wxStatusBar(), Height::integer().
setMinHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
when is_integer(Height) ->
?CLASS(ThisT,wxStatusBar),
wxe_util:cast(?wxStatusBar_SetMinHeight,
<<ThisRef:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxStatusBar(), Text::string()) -> ok
%% @equiv setStatusText(This,Text, [])
+-spec setStatusText(This, Text) -> ok when
+ This::wxStatusBar(), Text::unicode:chardata().
+
setStatusText(This,Text)
when is_record(This, wx_ref),is_list(Text) ->
setStatusText(This,Text, []).
-%% @spec (This::wxStatusBar(), Text::string(), [Option]) -> ok
-%% Option = {number, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarsetstatustext">external documentation</a>.
+-spec setStatusText(This, Text, [Option]) -> ok when
+ This::wxStatusBar(), Text::unicode:chardata(),
+ Option :: {number, integer()}.
setStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -237,8 +265,9 @@ setStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
wxe_util:cast(?wxStatusBar_SetStatusText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxStatusBar(), Widths_field::[integer()]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarsetstatuswidths">external documentation</a>.
+-spec setStatusWidths(This, Widths_field) -> ok when
+ This::wxStatusBar(), Widths_field::[integer()].
setStatusWidths(#wx_ref{type=ThisT,ref=ThisRef},Widths_field)
when is_list(Widths_field) ->
?CLASS(ThisT,wxStatusBar),
@@ -246,8 +275,9 @@ setStatusWidths(#wx_ref{type=ThisT,ref=ThisRef},Widths_field)
<<ThisRef:32/?UI,(length(Widths_field)):32/?UI,
(<< <<C:32/?I>> || C <- Widths_field>>)/binary, 0:(((0+length(Widths_field)) rem 2)*32)>>).
-%% @spec (This::wxStatusBar(), Styles::[integer()]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstatusbar.html#wxstatusbarsetstatusstyles">external documentation</a>.
+-spec setStatusStyles(This, Styles) -> ok when
+ This::wxStatusBar(), Styles::[integer()].
setStatusStyles(#wx_ref{type=ThisT,ref=ThisRef},Styles)
when is_list(Styles) ->
?CLASS(ThisT,wxStatusBar),
@@ -255,8 +285,8 @@ setStatusStyles(#wx_ref{type=ThisT,ref=ThisRef},Styles)
<<ThisRef:32/?UI,(length(Styles)):32/?UI,
(<< <<C:32/?I>> || C <- Styles>>)/binary, 0:(((0+length(Styles)) rem 2)*32)>>).
-%% @spec (This::wxStatusBar()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxStatusBar()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStatusBar),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStdDialogButtonSizer.erl b/lib/wx/src/gen/wxStdDialogButtonSizer.erl
index 3d31907275..078763e7cb 100644
--- a/lib/wx/src/gen/wxStdDialogButtonSizer.erl
+++ b/lib/wx/src/gen/wxStdDialogButtonSizer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,58 +42,65 @@
setItemMinSize/4,setMinSize/2,setMinSize/3,setSizeHints/2,setVirtualSizeHints/2,
show/2,show/3]).
+-export_type([wxStdDialogButtonSizer/0]).
%% @hidden
parent_class(wxBoxSizer) -> true;
parent_class(wxSizer) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxStdDialogButtonSizer()
+-type wxStdDialogButtonSizer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizerwxstddialogbuttonsizer">external documentation</a>.
+-spec new() -> wxStdDialogButtonSizer().
new() ->
wxe_util:construct(?wxStdDialogButtonSizer_new,
<<>>).
-%% @spec (This::wxStdDialogButtonSizer(), Button::wxButton:wxButton()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizeraddbutton">external documentation</a>.
+-spec addButton(This, Button) -> ok when
+ This::wxStdDialogButtonSizer(), Button::wxButton:wxButton().
addButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
?CLASS(ButtonT,wxButton),
wxe_util:cast(?wxStdDialogButtonSizer_AddButton,
<<ThisRef:32/?UI,ButtonRef:32/?UI>>).
-%% @spec (This::wxStdDialogButtonSizer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizerrealize">external documentation</a>.
+-spec realize(This) -> ok when
+ This::wxStdDialogButtonSizer().
realize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
wxe_util:cast(?wxStdDialogButtonSizer_Realize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStdDialogButtonSizer(), Button::wxButton:wxButton()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizersetaffirmativebutton">external documentation</a>.
+-spec setAffirmativeButton(This, Button) -> ok when
+ This::wxStdDialogButtonSizer(), Button::wxButton:wxButton().
setAffirmativeButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
?CLASS(ButtonT,wxButton),
wxe_util:cast(?wxStdDialogButtonSizer_SetAffirmativeButton,
<<ThisRef:32/?UI,ButtonRef:32/?UI>>).
-%% @spec (This::wxStdDialogButtonSizer(), Button::wxButton:wxButton()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizersetcancelbutton">external documentation</a>.
+-spec setCancelButton(This, Button) -> ok when
+ This::wxStdDialogButtonSizer(), Button::wxButton:wxButton().
setCancelButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
?CLASS(ButtonT,wxButton),
wxe_util:cast(?wxStdDialogButtonSizer_SetCancelButton,
<<ThisRef:32/?UI,ButtonRef:32/?UI>>).
-%% @spec (This::wxStdDialogButtonSizer(), Button::wxButton:wxButton()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizersetnegativebutton">external documentation</a>.
+-spec setNegativeButton(This, Button) -> ok when
+ This::wxStdDialogButtonSizer(), Button::wxButton:wxButton().
setNegativeButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
?CLASS(ButtonT,wxButton),
wxe_util:cast(?wxStdDialogButtonSizer_SetNegativeButton,
<<ThisRef:32/?UI,ButtonRef:32/?UI>>).
-%% @spec (This::wxStdDialogButtonSizer()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxStdDialogButtonSizer()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStdDialogButtonSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStyledTextCtrl.erl b/lib/wx/src/gen/wxStyledTextCtrl.erl
index 61f0e5afef..f6dc2176b7 100644
--- a/lib/wx/src/gen/wxStyledTextCtrl.erl
+++ b/lib/wx/src/gen/wxStyledTextCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -99,14 +99,14 @@
setCaretForeground/2,setCaretLineBackAlpha/2,setCaretLineBackground/2,
setCaretLineVisible/2,setCaretPeriod/2,setCaretSticky/2,setCaretWidth/2,
setCharsDefault/1,setCodePage/2,setControlCharSymbol/2,setCurrentPos/2,
- setEOLMode/2,setEdgeColour/2,setEdgeColumn/2,setFoldExpanded/3,setFoldFlags/2,
- setFoldLevel/3,setFoldMarginColour/3,setFoldMarginHiColour/3,setHScrollBar/2,
- setHighlightGuide/2,setHotspotActiveBackground/3,setHotspotActiveForeground/3,
- setHotspotActiveUnderline/2,setHotspotSingleLine/2,setIndent/2,setIndentationGuides/2,
- setKeyWords/3,setLastKeydownProcessed/2,setLayoutCache/2,setLexer/2,
- setLexerLanguage/2,setLineIndentation/3,setLineState/3,setMarginLeft/2,
- setMarginMask/3,setMarginRight/2,setMarginSensitive/3,setMarginType/3,
- setMarginWidth/3,setMargins/3,setModEventMask/2,setMouseDownCaptures/2,
+ setEOLMode/2,setEdgeColour/2,setEdgeColumn/2,setEdgeMode/2,setFoldExpanded/3,
+ setFoldFlags/2,setFoldLevel/3,setFoldMarginColour/3,setFoldMarginHiColour/3,
+ setHScrollBar/2,setHighlightGuide/2,setHotspotActiveBackground/3,
+ setHotspotActiveForeground/3,setHotspotActiveUnderline/2,setHotspotSingleLine/2,
+ setIndent/2,setIndentationGuides/2,setKeyWords/3,setLastKeydownProcessed/2,
+ setLayoutCache/2,setLexer/2,setLexerLanguage/2,setLineIndentation/3,
+ setLineState/3,setMarginLeft/2,setMarginMask/3,setMarginRight/2,setMarginSensitive/3,
+ setMarginType/3,setMarginWidth/3,setMargins/3,setModEventMask/2,setMouseDownCaptures/2,
setMouseDwellTime/2,setPasteConvertEndings/2,setPrintColourMode/2,
setPrintMagnification/2,setProperty/3,setReadOnly/2,setSTCCursor/2,
setSTCFocus/2,setSavePoint/1,setScrollWidth/2,setSearchFlags/2,setSelAlpha/2,
@@ -171,27 +171,35 @@
transferDataToWindow/1,update/1,updateWindowUI/1,updateWindowUI/2,
validate/1,warpPointer/3]).
+-export_type([wxStyledTextCtrl/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxStyledTextCtrl()
+-type wxStyledTextCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwxstyledtextctrl">external documentation</a>.
+-spec new() -> wxStyledTextCtrl().
new() ->
wxe_util:construct(?wxStyledTextCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxStyledTextCtrl()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxStyledTextCtrl() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxStyledTextCtrl()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwxstyledtextctrl">external documentation</a>.
+-spec new(Parent, [Option]) -> wxStyledTextCtrl() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -204,15 +212,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxStyledTextCtrl_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxStyledTextCtrl(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxStyledTextCtrl(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxStyledTextCtrl(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -226,8 +240,9 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxStyledTextCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrladdtext">external documentation</a>.
+-spec addText(This, Text) -> ok when
+ This::wxStyledTextCtrl(), Text::unicode:chardata().
addText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -235,16 +250,18 @@ addText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxStyledTextCtrl_AddText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Data::wxMemoryBuffer:wxMemoryBuffer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrladdstyledtext">external documentation</a>.
+-spec addStyledText(This, Data) -> ok when
+ This::wxStyledTextCtrl(), Data::wx:wx_object().
addStyledText(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
?CLASS(DataT,wxMemoryBuffer),
wxe_util:cast(?wxStyledTextCtrl_AddStyledText,
<<ThisRef:32/?UI,DataRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlinserttext">external documentation</a>.
+-spec insertText(This, Pos, Text) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer(), Text::unicode:chardata().
insertText(#wx_ref{type=ThisT,ref=ThisRef},Pos,Text)
when is_integer(Pos),is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -252,279 +269,319 @@ insertText(#wx_ref{type=ThisT,ref=ThisRef},Pos,Text)
wxe_util:cast(?wxStyledTextCtrl_InsertText,
<<ThisRef:32/?UI,Pos:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlclearall">external documentation</a>.
+-spec clearAll(This) -> ok when
+ This::wxStyledTextCtrl().
clearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ClearAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcleardocumentstyle">external documentation</a>.
+-spec clearDocumentStyle(This) -> ok when
+ This::wxStyledTextCtrl().
clearDocumentStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ClearDocumentStyle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlength">external documentation</a>.
+-spec getLength(This) -> integer() when
+ This::wxStyledTextCtrl().
getLength(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLength,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcharat">external documentation</a>.
+-spec getCharAt(This, Pos) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer().
getCharAt(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCharAt,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcurrentpos">external documentation</a>.
+-spec getCurrentPos(This) -> integer() when
+ This::wxStyledTextCtrl().
getCurrentPos(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCurrentPos,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetanchor">external documentation</a>.
+-spec getAnchor(This) -> integer() when
+ This::wxStyledTextCtrl().
getAnchor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetAnchor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetstyleat">external documentation</a>.
+-spec getStyleAt(This, Pos) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer().
getStyleAt(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetStyleAt,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlredo">external documentation</a>.
+-spec redo(This) -> ok when
+ This::wxStyledTextCtrl().
redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Redo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), CollectUndo::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetundocollection">external documentation</a>.
+-spec setUndoCollection(This, CollectUndo) -> ok when
+ This::wxStyledTextCtrl(), CollectUndo::boolean().
setUndoCollection(#wx_ref{type=ThisT,ref=ThisRef},CollectUndo)
when is_boolean(CollectUndo) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetUndoCollection,
<<ThisRef:32/?UI,(wxe_util:from_bool(CollectUndo)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlselectall">external documentation</a>.
+-spec selectAll(This) -> ok when
+ This::wxStyledTextCtrl().
selectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SelectAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetsavepoint">external documentation</a>.
+-spec setSavePoint(This) -> ok when
+ This::wxStyledTextCtrl().
setSavePoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSavePoint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), StartPos::integer(), EndPos::integer()) -> wxMemoryBuffer:wxMemoryBuffer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetstyledtext">external documentation</a>.
+-spec getStyledText(This, StartPos, EndPos) -> wx:wx_object() when
+ This::wxStyledTextCtrl(), StartPos::integer(), EndPos::integer().
getStyledText(#wx_ref{type=ThisT,ref=ThisRef},StartPos,EndPos)
when is_integer(StartPos),is_integer(EndPos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetStyledText,
<<ThisRef:32/?UI,StartPos:32/?UI,EndPos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcanredo">external documentation</a>.
+-spec canRedo(This) -> boolean() when
+ This::wxStyledTextCtrl().
canRedo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_CanRedo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Handle::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerlinefromhandle">external documentation</a>.
+-spec markerLineFromHandle(This, Handle) -> integer() when
+ This::wxStyledTextCtrl(), Handle::integer().
markerLineFromHandle(#wx_ref{type=ThisT,ref=ThisRef},Handle)
when is_integer(Handle) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_MarkerLineFromHandle,
<<ThisRef:32/?UI,Handle:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Handle::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdeletehandle">external documentation</a>.
+-spec markerDeleteHandle(This, Handle) -> ok when
+ This::wxStyledTextCtrl(), Handle::integer().
markerDeleteHandle(#wx_ref{type=ThisT,ref=ThisRef},Handle)
when is_integer(Handle) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_MarkerDeleteHandle,
<<ThisRef:32/?UI,Handle:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetundocollection">external documentation</a>.
+-spec getUndoCollection(This) -> boolean() when
+ This::wxStyledTextCtrl().
getUndoCollection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetUndoCollection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetviewwhitespace">external documentation</a>.
+-spec getViewWhiteSpace(This) -> integer() when
+ This::wxStyledTextCtrl().
getViewWhiteSpace(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetViewWhiteSpace,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), ViewWS::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetviewwhitespace">external documentation</a>.
+-spec setViewWhiteSpace(This, ViewWS) -> ok when
+ This::wxStyledTextCtrl(), ViewWS::integer().
setViewWhiteSpace(#wx_ref{type=ThisT,ref=ThisRef},ViewWS)
when is_integer(ViewWS) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetViewWhiteSpace,
<<ThisRef:32/?UI,ViewWS:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pt::{X::integer(), Y::integer()}) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpositionfrompoint">external documentation</a>.
+-spec positionFromPoint(This, Pt) -> integer() when
+ This::wxStyledTextCtrl(), Pt::{X::integer(), Y::integer()}.
positionFromPoint(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_PositionFromPoint,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), X::integer(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpositionfrompointclose">external documentation</a>.
+-spec positionFromPointClose(This, X, Y) -> integer() when
+ This::wxStyledTextCtrl(), X::integer(), Y::integer().
positionFromPointClose(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_PositionFromPointClose,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgotoline">external documentation</a>.
+-spec gotoLine(This, Line) -> ok when
+ This::wxStyledTextCtrl(), Line::integer().
gotoLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_GotoLine,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgotopos">external documentation</a>.
+-spec gotoPos(This, Pos) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer().
gotoPos(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_GotoPos,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), PosAnchor::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetanchor">external documentation</a>.
+-spec setAnchor(This, PosAnchor) -> ok when
+ This::wxStyledTextCtrl(), PosAnchor::integer().
setAnchor(#wx_ref{type=ThisT,ref=ThisRef},PosAnchor)
when is_integer(PosAnchor) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetAnchor,
<<ThisRef:32/?UI,PosAnchor:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> {string(), LinePos::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcurline">external documentation</a>.
+-spec getCurLine(This) -> Result when
+ Result ::{Res ::unicode:charlist(), LinePos::integer()},
+ This::wxStyledTextCtrl().
getCurLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCurLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetendstyled">external documentation</a>.
+-spec getEndStyled(This) -> integer() when
+ This::wxStyledTextCtrl().
getEndStyled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetEndStyled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), EolMode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlconverteols">external documentation</a>.
+-spec convertEOLs(This, EolMode) -> ok when
+ This::wxStyledTextCtrl(), EolMode::integer().
convertEOLs(#wx_ref{type=ThisT,ref=ThisRef},EolMode)
when is_integer(EolMode) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ConvertEOLs,
<<ThisRef:32/?UI,EolMode:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgeteolmode">external documentation</a>.
+-spec getEOLMode(This) -> integer() when
+ This::wxStyledTextCtrl().
getEOLMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetEOLMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), EolMode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlseteolmode">external documentation</a>.
+-spec setEOLMode(This, EolMode) -> ok when
+ This::wxStyledTextCtrl(), EolMode::integer().
setEOLMode(#wx_ref{type=ThisT,ref=ThisRef},EolMode)
when is_integer(EolMode) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetEOLMode,
<<ThisRef:32/?UI,EolMode:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer(), Mask::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstartstyling">external documentation</a>.
+-spec startStyling(This, Pos, Mask) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer(), Mask::integer().
startStyling(#wx_ref{type=ThisT,ref=ThisRef},Pos,Mask)
when is_integer(Pos),is_integer(Mask) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StartStyling,
<<ThisRef:32/?UI,Pos:32/?UI,Mask:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Length::integer(), Style::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstyling">external documentation</a>.
+-spec setStyling(This, Length, Style) -> ok when
+ This::wxStyledTextCtrl(), Length::integer(), Style::integer().
setStyling(#wx_ref{type=ThisT,ref=ThisRef},Length,Style)
when is_integer(Length),is_integer(Style) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetStyling,
<<ThisRef:32/?UI,Length:32/?UI,Style:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetbuffereddraw">external documentation</a>.
+-spec getBufferedDraw(This) -> boolean() when
+ This::wxStyledTextCtrl().
getBufferedDraw(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetBufferedDraw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Buffered::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetbuffereddraw">external documentation</a>.
+-spec setBufferedDraw(This, Buffered) -> ok when
+ This::wxStyledTextCtrl(), Buffered::boolean().
setBufferedDraw(#wx_ref{type=ThisT,ref=ThisRef},Buffered)
when is_boolean(Buffered) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetBufferedDraw,
<<ThisRef:32/?UI,(wxe_util:from_bool(Buffered)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), TabWidth::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsettabwidth">external documentation</a>.
+-spec setTabWidth(This, TabWidth) -> ok when
+ This::wxStyledTextCtrl(), TabWidth::integer().
setTabWidth(#wx_ref{type=ThisT,ref=ThisRef},TabWidth)
when is_integer(TabWidth) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetTabWidth,
<<ThisRef:32/?UI,TabWidth:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettabwidth">external documentation</a>.
+-spec getTabWidth(This) -> integer() when
+ This::wxStyledTextCtrl().
getTabWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTabWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), CodePage::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcodepage">external documentation</a>.
+-spec setCodePage(This, CodePage) -> ok when
+ This::wxStyledTextCtrl(), CodePage::integer().
setCodePage(#wx_ref{type=ThisT,ref=ThisRef},CodePage)
when is_integer(CodePage) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCodePage,
<<ThisRef:32/?UI,CodePage:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), MarkerNumber::integer(), MarkerSymbol::integer()) -> ok
%% @equiv markerDefine(This,MarkerNumber,MarkerSymbol, [])
+-spec markerDefine(This, MarkerNumber, MarkerSymbol) -> ok when
+ This::wxStyledTextCtrl(), MarkerNumber::integer(), MarkerSymbol::integer().
+
markerDefine(This,MarkerNumber,MarkerSymbol)
when is_record(This, wx_ref),is_integer(MarkerNumber),is_integer(MarkerSymbol) ->
markerDefine(This,MarkerNumber,MarkerSymbol, []).
-%% @spec (This::wxStyledTextCtrl(), MarkerNumber::integer(), MarkerSymbol::integer(), [Option]) -> ok
-%% Option = {foreground, wx:colour()} | {background, wx:colour()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdefine">external documentation</a>.
+-spec markerDefine(This, MarkerNumber, MarkerSymbol, [Option]) -> ok when
+ This::wxStyledTextCtrl(), MarkerNumber::integer(), MarkerSymbol::integer(),
+ Option :: {foreground, wx:wx_colour()}
+ | {background, wx:wx_colour()}.
markerDefine(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,MarkerSymbol, Options)
when is_integer(MarkerNumber),is_integer(MarkerSymbol),is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -535,72 +592,81 @@ markerDefine(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,MarkerSymbol, Options)
wxe_util:cast(?wxStyledTextCtrl_MarkerDefine,
<<ThisRef:32/?UI,MarkerNumber:32/?UI,MarkerSymbol:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxStyledTextCtrl(), MarkerNumber::integer(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkersetforeground">external documentation</a>.
+-spec markerSetForeground(This, MarkerNumber, Fore) -> ok when
+ This::wxStyledTextCtrl(), MarkerNumber::integer(), Fore::wx:wx_colour().
markerSetForeground(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,Fore)
when is_integer(MarkerNumber),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_MarkerSetForeground,
<<ThisRef:32/?UI,MarkerNumber:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), MarkerNumber::integer(), Back::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkersetbackground">external documentation</a>.
+-spec markerSetBackground(This, MarkerNumber, Back) -> ok when
+ This::wxStyledTextCtrl(), MarkerNumber::integer(), Back::wx:wx_colour().
markerSetBackground(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,Back)
when is_integer(MarkerNumber),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_MarkerSetBackground,
<<ThisRef:32/?UI,MarkerNumber:32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), MarkerNumber::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkeradd">external documentation</a>.
+-spec markerAdd(This, Line, MarkerNumber) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer(), MarkerNumber::integer().
markerAdd(#wx_ref{type=ThisT,ref=ThisRef},Line,MarkerNumber)
when is_integer(Line),is_integer(MarkerNumber) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_MarkerAdd,
<<ThisRef:32/?UI,Line:32/?UI,MarkerNumber:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), MarkerNumber::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdelete">external documentation</a>.
+-spec markerDelete(This, Line, MarkerNumber) -> ok when
+ This::wxStyledTextCtrl(), Line::integer(), MarkerNumber::integer().
markerDelete(#wx_ref{type=ThisT,ref=ThisRef},Line,MarkerNumber)
when is_integer(Line),is_integer(MarkerNumber) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_MarkerDelete,
<<ThisRef:32/?UI,Line:32/?UI,MarkerNumber:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), MarkerNumber::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdeleteall">external documentation</a>.
+-spec markerDeleteAll(This, MarkerNumber) -> ok when
+ This::wxStyledTextCtrl(), MarkerNumber::integer().
markerDeleteAll(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber)
when is_integer(MarkerNumber) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_MarkerDeleteAll,
<<ThisRef:32/?UI,MarkerNumber:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerget">external documentation</a>.
+-spec markerGet(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
markerGet(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_MarkerGet,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), LineStart::integer(), MarkerMask::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkernext">external documentation</a>.
+-spec markerNext(This, LineStart, MarkerMask) -> integer() when
+ This::wxStyledTextCtrl(), LineStart::integer(), MarkerMask::integer().
markerNext(#wx_ref{type=ThisT,ref=ThisRef},LineStart,MarkerMask)
when is_integer(LineStart),is_integer(MarkerMask) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_MarkerNext,
<<ThisRef:32/?UI,LineStart:32/?UI,MarkerMask:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), LineStart::integer(), MarkerMask::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerprevious">external documentation</a>.
+-spec markerPrevious(This, LineStart, MarkerMask) -> integer() when
+ This::wxStyledTextCtrl(), LineStart::integer(), MarkerMask::integer().
markerPrevious(#wx_ref{type=ThisT,ref=ThisRef},LineStart,MarkerMask)
when is_integer(LineStart),is_integer(MarkerMask) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_MarkerPrevious,
<<ThisRef:32/?UI,LineStart:32/?UI,MarkerMask:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), MarkerNumber::integer(), Bmp::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdefinebitmap">external documentation</a>.
+-spec markerDefineBitmap(This, MarkerNumber, Bmp) -> ok when
+ This::wxStyledTextCtrl(), MarkerNumber::integer(), Bmp::wxBitmap:wxBitmap().
markerDefineBitmap(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,#wx_ref{type=BmpT,ref=BmpRef})
when is_integer(MarkerNumber) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -608,135 +674,152 @@ markerDefineBitmap(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,#wx_ref{type=Bmp
wxe_util:cast(?wxStyledTextCtrl_MarkerDefineBitmap,
<<ThisRef:32/?UI,MarkerNumber:32/?UI,BmpRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), Set::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkeraddset">external documentation</a>.
+-spec markerAddSet(This, Line, Set) -> ok when
+ This::wxStyledTextCtrl(), Line::integer(), Set::integer().
markerAddSet(#wx_ref{type=ThisT,ref=ThisRef},Line,Set)
when is_integer(Line),is_integer(Set) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_MarkerAddSet,
<<ThisRef:32/?UI,Line:32/?UI,Set:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), MarkerNumber::integer(), Alpha::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkersetalpha">external documentation</a>.
+-spec markerSetAlpha(This, MarkerNumber, Alpha) -> ok when
+ This::wxStyledTextCtrl(), MarkerNumber::integer(), Alpha::integer().
markerSetAlpha(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,Alpha)
when is_integer(MarkerNumber),is_integer(Alpha) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_MarkerSetAlpha,
<<ThisRef:32/?UI,MarkerNumber:32/?UI,Alpha:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Margin::integer(), MarginType::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmargintype">external documentation</a>.
+-spec setMarginType(This, Margin, MarginType) -> ok when
+ This::wxStyledTextCtrl(), Margin::integer(), MarginType::integer().
setMarginType(#wx_ref{type=ThisT,ref=ThisRef},Margin,MarginType)
when is_integer(Margin),is_integer(MarginType) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMarginType,
<<ThisRef:32/?UI,Margin:32/?UI,MarginType:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Margin::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmargintype">external documentation</a>.
+-spec getMarginType(This, Margin) -> integer() when
+ This::wxStyledTextCtrl(), Margin::integer().
getMarginType(#wx_ref{type=ThisT,ref=ThisRef},Margin)
when is_integer(Margin) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMarginType,
<<ThisRef:32/?UI,Margin:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Margin::integer(), PixelWidth::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginwidth">external documentation</a>.
+-spec setMarginWidth(This, Margin, PixelWidth) -> ok when
+ This::wxStyledTextCtrl(), Margin::integer(), PixelWidth::integer().
setMarginWidth(#wx_ref{type=ThisT,ref=ThisRef},Margin,PixelWidth)
when is_integer(Margin),is_integer(PixelWidth) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMarginWidth,
<<ThisRef:32/?UI,Margin:32/?UI,PixelWidth:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Margin::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmarginwidth">external documentation</a>.
+-spec getMarginWidth(This, Margin) -> integer() when
+ This::wxStyledTextCtrl(), Margin::integer().
getMarginWidth(#wx_ref{type=ThisT,ref=ThisRef},Margin)
when is_integer(Margin) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMarginWidth,
<<ThisRef:32/?UI,Margin:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Margin::integer(), Mask::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginmask">external documentation</a>.
+-spec setMarginMask(This, Margin, Mask) -> ok when
+ This::wxStyledTextCtrl(), Margin::integer(), Mask::integer().
setMarginMask(#wx_ref{type=ThisT,ref=ThisRef},Margin,Mask)
when is_integer(Margin),is_integer(Mask) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMarginMask,
<<ThisRef:32/?UI,Margin:32/?UI,Mask:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Margin::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmarginmask">external documentation</a>.
+-spec getMarginMask(This, Margin) -> integer() when
+ This::wxStyledTextCtrl(), Margin::integer().
getMarginMask(#wx_ref{type=ThisT,ref=ThisRef},Margin)
when is_integer(Margin) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMarginMask,
<<ThisRef:32/?UI,Margin:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Margin::integer(), Sensitive::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginsensitive">external documentation</a>.
+-spec setMarginSensitive(This, Margin, Sensitive) -> ok when
+ This::wxStyledTextCtrl(), Margin::integer(), Sensitive::boolean().
setMarginSensitive(#wx_ref{type=ThisT,ref=ThisRef},Margin,Sensitive)
when is_integer(Margin),is_boolean(Sensitive) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMarginSensitive,
<<ThisRef:32/?UI,Margin:32/?UI,(wxe_util:from_bool(Sensitive)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Margin::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmarginsensitive">external documentation</a>.
+-spec getMarginSensitive(This, Margin) -> boolean() when
+ This::wxStyledTextCtrl(), Margin::integer().
getMarginSensitive(#wx_ref{type=ThisT,ref=ThisRef},Margin)
when is_integer(Margin) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMarginSensitive,
<<ThisRef:32/?UI,Margin:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstyleclearall">external documentation</a>.
+-spec styleClearAll(This) -> ok when
+ This::wxStyledTextCtrl().
styleClearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleClearAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetforeground">external documentation</a>.
+-spec styleSetForeground(This, Style, Fore) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Fore::wx:wx_colour().
styleSetForeground(#wx_ref{type=ThisT,ref=ThisRef},Style,Fore)
when is_integer(Style),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetForeground,
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Back::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetbackground">external documentation</a>.
+-spec styleSetBackground(This, Style, Back) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Back::wx:wx_colour().
styleSetBackground(#wx_ref{type=ThisT,ref=ThisRef},Style,Back)
when is_integer(Style),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetBackground,
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Bold::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetbold">external documentation</a>.
+-spec styleSetBold(This, Style, Bold) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Bold::boolean().
styleSetBold(#wx_ref{type=ThisT,ref=ThisRef},Style,Bold)
when is_integer(Style),is_boolean(Bold) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetBold,
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Bold)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Italic::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetitalic">external documentation</a>.
+-spec styleSetItalic(This, Style, Italic) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Italic::boolean().
styleSetItalic(#wx_ref{type=ThisT,ref=ThisRef},Style,Italic)
when is_integer(Style),is_boolean(Italic) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetItalic,
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Italic)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), SizePoints::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetsize">external documentation</a>.
+-spec styleSetSize(This, Style, SizePoints) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), SizePoints::integer().
styleSetSize(#wx_ref{type=ThisT,ref=ThisRef},Style,SizePoints)
when is_integer(Style),is_integer(SizePoints) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetSize,
<<ThisRef:32/?UI,Style:32/?UI,SizePoints:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), FontName::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetfacename">external documentation</a>.
+-spec styleSetFaceName(This, Style, FontName) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), FontName::unicode:chardata().
styleSetFaceName(#wx_ref{type=ThisT,ref=ThisRef},Style,FontName)
when is_integer(Style),is_list(FontName) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -744,140 +827,158 @@ styleSetFaceName(#wx_ref{type=ThisT,ref=ThisRef},Style,FontName)
wxe_util:cast(?wxStyledTextCtrl_StyleSetFaceName,
<<ThisRef:32/?UI,Style:32/?UI,(byte_size(FontName_UC)):32/?UI,(FontName_UC)/binary, 0:(((8- ((4+byte_size(FontName_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Filled::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstyleseteolfilled">external documentation</a>.
+-spec styleSetEOLFilled(This, Style, Filled) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Filled::boolean().
styleSetEOLFilled(#wx_ref{type=ThisT,ref=ThisRef},Style,Filled)
when is_integer(Style),is_boolean(Filled) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetEOLFilled,
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Filled)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstyleresetdefault">external documentation</a>.
+-spec styleResetDefault(This) -> ok when
+ This::wxStyledTextCtrl().
styleResetDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleResetDefault,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Underline::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetunderline">external documentation</a>.
+-spec styleSetUnderline(This, Style, Underline) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Underline::boolean().
styleSetUnderline(#wx_ref{type=ThisT,ref=ThisRef},Style,Underline)
when is_integer(Style),is_boolean(Underline) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetUnderline,
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Underline)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), CaseForce::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetcase">external documentation</a>.
+-spec styleSetCase(This, Style, CaseForce) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), CaseForce::integer().
styleSetCase(#wx_ref{type=ThisT,ref=ThisRef},Style,CaseForce)
when is_integer(Style),is_integer(CaseForce) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetCase,
<<ThisRef:32/?UI,Style:32/?UI,CaseForce:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Hotspot::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesethotspot">external documentation</a>.
+-spec styleSetHotSpot(This, Style, Hotspot) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Hotspot::boolean().
styleSetHotSpot(#wx_ref{type=ThisT,ref=ThisRef},Style,Hotspot)
when is_integer(Style),is_boolean(Hotspot) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetHotSpot,
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Hotspot)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), UseSetting::bool(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselforeground">external documentation</a>.
+-spec setSelForeground(This, UseSetting, Fore) -> ok when
+ This::wxStyledTextCtrl(), UseSetting::boolean(), Fore::wx:wx_colour().
setSelForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
when is_boolean(UseSetting),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSelForeground,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), UseSetting::bool(), Back::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselbackground">external documentation</a>.
+-spec setSelBackground(This, UseSetting, Back) -> ok when
+ This::wxStyledTextCtrl(), UseSetting::boolean(), Back::wx:wx_colour().
setSelBackground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
when is_boolean(UseSetting),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSelBackground,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetselalpha">external documentation</a>.
+-spec getSelAlpha(This) -> integer() when
+ This::wxStyledTextCtrl().
getSelAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSelAlpha,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Alpha::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselalpha">external documentation</a>.
+-spec setSelAlpha(This, Alpha) -> ok when
+ This::wxStyledTextCtrl(), Alpha::integer().
setSelAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha)
when is_integer(Alpha) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSelAlpha,
<<ThisRef:32/?UI,Alpha:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretforeground">external documentation</a>.
+-spec setCaretForeground(This, Fore) -> ok when
+ This::wxStyledTextCtrl(), Fore::wx:wx_colour().
setCaretForeground(#wx_ref{type=ThisT,ref=ThisRef},Fore)
when tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCaretForeground,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Key::integer(), Modifiers::integer(), Cmd::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcmdkeyassign">external documentation</a>.
+-spec cmdKeyAssign(This, Key, Modifiers, Cmd) -> ok when
+ This::wxStyledTextCtrl(), Key::integer(), Modifiers::integer(), Cmd::integer().
cmdKeyAssign(#wx_ref{type=ThisT,ref=ThisRef},Key,Modifiers,Cmd)
when is_integer(Key),is_integer(Modifiers),is_integer(Cmd) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CmdKeyAssign,
<<ThisRef:32/?UI,Key:32/?UI,Modifiers:32/?UI,Cmd:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Key::integer(), Modifiers::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcmdkeyclear">external documentation</a>.
+-spec cmdKeyClear(This, Key, Modifiers) -> ok when
+ This::wxStyledTextCtrl(), Key::integer(), Modifiers::integer().
cmdKeyClear(#wx_ref{type=ThisT,ref=ThisRef},Key,Modifiers)
when is_integer(Key),is_integer(Modifiers) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CmdKeyClear,
<<ThisRef:32/?UI,Key:32/?UI,Modifiers:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcmdkeyclearall">external documentation</a>.
+-spec cmdKeyClearAll(This) -> ok when
+ This::wxStyledTextCtrl().
cmdKeyClearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CmdKeyClearAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Length::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstylebytes">external documentation</a>.
+-spec setStyleBytes(This, Length) -> integer() when
+ This::wxStyledTextCtrl(), Length::integer().
setStyleBytes(#wx_ref{type=ThisT,ref=ThisRef},Length)
when is_integer(Length) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_SetStyleBytes,
<<ThisRef:32/?UI,Length:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Visible::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetvisible">external documentation</a>.
+-spec styleSetVisible(This, Style, Visible) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Visible::boolean().
styleSetVisible(#wx_ref{type=ThisT,ref=ThisRef},Style,Visible)
when is_integer(Style),is_boolean(Visible) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetVisible,
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Visible)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcaretperiod">external documentation</a>.
+-spec getCaretPeriod(This) -> integer() when
+ This::wxStyledTextCtrl().
getCaretPeriod(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCaretPeriod,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), PeriodMilliseconds::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretperiod">external documentation</a>.
+-spec setCaretPeriod(This, PeriodMilliseconds) -> ok when
+ This::wxStyledTextCtrl(), PeriodMilliseconds::integer().
setCaretPeriod(#wx_ref{type=ThisT,ref=ThisRef},PeriodMilliseconds)
when is_integer(PeriodMilliseconds) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCaretPeriod,
<<ThisRef:32/?UI,PeriodMilliseconds:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Characters::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwordchars">external documentation</a>.
+-spec setWordChars(This, Characters) -> ok when
+ This::wxStyledTextCtrl(), Characters::unicode:chardata().
setWordChars(#wx_ref{type=ThisT,ref=ThisRef},Characters)
when is_list(Characters) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -885,130 +986,147 @@ setWordChars(#wx_ref{type=ThisT,ref=ThisRef},Characters)
wxe_util:cast(?wxStyledTextCtrl_SetWordChars,
<<ThisRef:32/?UI,(byte_size(Characters_UC)):32/?UI,(Characters_UC)/binary, 0:(((8- ((0+byte_size(Characters_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlbeginundoaction">external documentation</a>.
+-spec beginUndoAction(This) -> ok when
+ This::wxStyledTextCtrl().
beginUndoAction(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_BeginUndoAction,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlendundoaction">external documentation</a>.
+-spec endUndoAction(This) -> ok when
+ This::wxStyledTextCtrl().
endUndoAction(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_EndUndoAction,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Indic::integer(), Style::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlindicatorsetstyle">external documentation</a>.
+-spec indicatorSetStyle(This, Indic, Style) -> ok when
+ This::wxStyledTextCtrl(), Indic::integer(), Style::integer().
indicatorSetStyle(#wx_ref{type=ThisT,ref=ThisRef},Indic,Style)
when is_integer(Indic),is_integer(Style) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_IndicatorSetStyle,
<<ThisRef:32/?UI,Indic:32/?UI,Style:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Indic::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlindicatorgetstyle">external documentation</a>.
+-spec indicatorGetStyle(This, Indic) -> integer() when
+ This::wxStyledTextCtrl(), Indic::integer().
indicatorGetStyle(#wx_ref{type=ThisT,ref=ThisRef},Indic)
when is_integer(Indic) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_IndicatorGetStyle,
<<ThisRef:32/?UI,Indic:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Indic::integer(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlindicatorsetforeground">external documentation</a>.
+-spec indicatorSetForeground(This, Indic, Fore) -> ok when
+ This::wxStyledTextCtrl(), Indic::integer(), Fore::wx:wx_colour().
indicatorSetForeground(#wx_ref{type=ThisT,ref=ThisRef},Indic,Fore)
when is_integer(Indic),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_IndicatorSetForeground,
<<ThisRef:32/?UI,Indic:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Indic::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlindicatorgetforeground">external documentation</a>.
+-spec indicatorGetForeground(This, Indic) -> wx:wx_colour4() when
+ This::wxStyledTextCtrl(), Indic::integer().
indicatorGetForeground(#wx_ref{type=ThisT,ref=ThisRef},Indic)
when is_integer(Indic) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_IndicatorGetForeground,
<<ThisRef:32/?UI,Indic:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), UseSetting::bool(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwhitespaceforeground">external documentation</a>.
+-spec setWhitespaceForeground(This, UseSetting, Fore) -> ok when
+ This::wxStyledTextCtrl(), UseSetting::boolean(), Fore::wx:wx_colour().
setWhitespaceForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
when is_boolean(UseSetting),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetWhitespaceForeground,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), UseSetting::bool(), Back::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwhitespacebackground">external documentation</a>.
+-spec setWhitespaceBackground(This, UseSetting, Back) -> ok when
+ This::wxStyledTextCtrl(), UseSetting::boolean(), Back::wx:wx_colour().
setWhitespaceBackground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
when is_boolean(UseSetting),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetWhitespaceBackground,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetstylebits">external documentation</a>.
+-spec getStyleBits(This) -> integer() when
+ This::wxStyledTextCtrl().
getStyleBits(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetStyleBits,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), State::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlinestate">external documentation</a>.
+-spec setLineState(This, Line, State) -> ok when
+ This::wxStyledTextCtrl(), Line::integer(), State::integer().
setLineState(#wx_ref{type=ThisT,ref=ThisRef},Line,State)
when is_integer(Line),is_integer(State) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetLineState,
<<ThisRef:32/?UI,Line:32/?UI,State:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlinestate">external documentation</a>.
+-spec getLineState(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
getLineState(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLineState,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmaxlinestate">external documentation</a>.
+-spec getMaxLineState(This) -> integer() when
+ This::wxStyledTextCtrl().
getMaxLineState(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMaxLineState,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcaretlinevisible">external documentation</a>.
+-spec getCaretLineVisible(This) -> boolean() when
+ This::wxStyledTextCtrl().
getCaretLineVisible(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCaretLineVisible,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Show::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretlinevisible">external documentation</a>.
+-spec setCaretLineVisible(This, Show) -> ok when
+ This::wxStyledTextCtrl(), Show::boolean().
setCaretLineVisible(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCaretLineVisible,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcaretlinebackground">external documentation</a>.
+-spec getCaretLineBackground(This) -> wx:wx_colour4() when
+ This::wxStyledTextCtrl().
getCaretLineBackground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCaretLineBackground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Back::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretlinebackground">external documentation</a>.
+-spec setCaretLineBackground(This, Back) -> ok when
+ This::wxStyledTextCtrl(), Back::wx:wx_colour().
setCaretLineBackground(#wx_ref{type=ThisT,ref=ThisRef},Back)
when tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCaretLineBackground,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), LenEntered::integer(), ItemList::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompshow">external documentation</a>.
+-spec autoCompShow(This, LenEntered, ItemList) -> ok when
+ This::wxStyledTextCtrl(), LenEntered::integer(), ItemList::unicode:chardata().
autoCompShow(#wx_ref{type=ThisT,ref=ThisRef},LenEntered,ItemList)
when is_integer(LenEntered),is_list(ItemList) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1016,36 +1134,41 @@ autoCompShow(#wx_ref{type=ThisT,ref=ThisRef},LenEntered,ItemList)
wxe_util:cast(?wxStyledTextCtrl_AutoCompShow,
<<ThisRef:32/?UI,LenEntered:32/?UI,(byte_size(ItemList_UC)):32/?UI,(ItemList_UC)/binary, 0:(((8- ((4+byte_size(ItemList_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompcancel">external documentation</a>.
+-spec autoCompCancel(This) -> ok when
+ This::wxStyledTextCtrl().
autoCompCancel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompCancel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompactive">external documentation</a>.
+-spec autoCompActive(This) -> boolean() when
+ This::wxStyledTextCtrl().
autoCompActive(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompActive,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompposstart">external documentation</a>.
+-spec autoCompPosStart(This) -> integer() when
+ This::wxStyledTextCtrl().
autoCompPosStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompPosStart,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompcomplete">external documentation</a>.
+-spec autoCompComplete(This) -> ok when
+ This::wxStyledTextCtrl().
autoCompComplete(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompComplete,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), CharacterSet::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompstops">external documentation</a>.
+-spec autoCompStops(This, CharacterSet) -> ok when
+ This::wxStyledTextCtrl(), CharacterSet::unicode:chardata().
autoCompStops(#wx_ref{type=ThisT,ref=ThisRef},CharacterSet)
when is_list(CharacterSet) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1053,23 +1176,26 @@ autoCompStops(#wx_ref{type=ThisT,ref=ThisRef},CharacterSet)
wxe_util:cast(?wxStyledTextCtrl_AutoCompStops,
<<ThisRef:32/?UI,(byte_size(CharacterSet_UC)):32/?UI,(CharacterSet_UC)/binary, 0:(((8- ((0+byte_size(CharacterSet_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), SeparatorCharacter::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetseparator">external documentation</a>.
+-spec autoCompSetSeparator(This, SeparatorCharacter) -> ok when
+ This::wxStyledTextCtrl(), SeparatorCharacter::integer().
autoCompSetSeparator(#wx_ref{type=ThisT,ref=ThisRef},SeparatorCharacter)
when is_integer(SeparatorCharacter) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetSeparator,
<<ThisRef:32/?UI,SeparatorCharacter:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetseparator">external documentation</a>.
+-spec autoCompGetSeparator(This) -> integer() when
+ This::wxStyledTextCtrl().
autoCompGetSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetSeparator,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompselect">external documentation</a>.
+-spec autoCompSelect(This, Text) -> ok when
+ This::wxStyledTextCtrl(), Text::unicode:chardata().
autoCompSelect(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1077,23 +1203,26 @@ autoCompSelect(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxStyledTextCtrl_AutoCompSelect,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Cancel::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetcancelatstart">external documentation</a>.
+-spec autoCompSetCancelAtStart(This, Cancel) -> ok when
+ This::wxStyledTextCtrl(), Cancel::boolean().
autoCompSetCancelAtStart(#wx_ref{type=ThisT,ref=ThisRef},Cancel)
when is_boolean(Cancel) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetCancelAtStart,
<<ThisRef:32/?UI,(wxe_util:from_bool(Cancel)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetcancelatstart">external documentation</a>.
+-spec autoCompGetCancelAtStart(This) -> boolean() when
+ This::wxStyledTextCtrl().
autoCompGetCancelAtStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetCancelAtStart,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), CharacterSet::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetfillups">external documentation</a>.
+-spec autoCompSetFillUps(This, CharacterSet) -> ok when
+ This::wxStyledTextCtrl(), CharacterSet::unicode:chardata().
autoCompSetFillUps(#wx_ref{type=ThisT,ref=ThisRef},CharacterSet)
when is_list(CharacterSet) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1101,38 +1230,43 @@ autoCompSetFillUps(#wx_ref{type=ThisT,ref=ThisRef},CharacterSet)
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetFillUps,
<<ThisRef:32/?UI,(byte_size(CharacterSet_UC)):32/?UI,(CharacterSet_UC)/binary, 0:(((8- ((0+byte_size(CharacterSet_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), ChooseSingle::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetchoosesingle">external documentation</a>.
+-spec autoCompSetChooseSingle(This, ChooseSingle) -> ok when
+ This::wxStyledTextCtrl(), ChooseSingle::boolean().
autoCompSetChooseSingle(#wx_ref{type=ThisT,ref=ThisRef},ChooseSingle)
when is_boolean(ChooseSingle) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetChooseSingle,
<<ThisRef:32/?UI,(wxe_util:from_bool(ChooseSingle)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetchoosesingle">external documentation</a>.
+-spec autoCompGetChooseSingle(This) -> boolean() when
+ This::wxStyledTextCtrl().
autoCompGetChooseSingle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetChooseSingle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), IgnoreCase::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetignorecase">external documentation</a>.
+-spec autoCompSetIgnoreCase(This, IgnoreCase) -> ok when
+ This::wxStyledTextCtrl(), IgnoreCase::boolean().
autoCompSetIgnoreCase(#wx_ref{type=ThisT,ref=ThisRef},IgnoreCase)
when is_boolean(IgnoreCase) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetIgnoreCase,
<<ThisRef:32/?UI,(wxe_util:from_bool(IgnoreCase)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetignorecase">external documentation</a>.
+-spec autoCompGetIgnoreCase(This) -> boolean() when
+ This::wxStyledTextCtrl().
autoCompGetIgnoreCase(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetIgnoreCase,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), ListType::integer(), ItemList::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrluserlistshow">external documentation</a>.
+-spec userListShow(This, ListType, ItemList) -> ok when
+ This::wxStyledTextCtrl(), ListType::integer(), ItemList::unicode:chardata().
userListShow(#wx_ref{type=ThisT,ref=ThisRef},ListType,ItemList)
when is_integer(ListType),is_list(ItemList) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1140,38 +1274,43 @@ userListShow(#wx_ref{type=ThisT,ref=ThisRef},ListType,ItemList)
wxe_util:cast(?wxStyledTextCtrl_UserListShow,
<<ThisRef:32/?UI,ListType:32/?UI,(byte_size(ItemList_UC)):32/?UI,(ItemList_UC)/binary, 0:(((8- ((4+byte_size(ItemList_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), AutoHide::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetautohide">external documentation</a>.
+-spec autoCompSetAutoHide(This, AutoHide) -> ok when
+ This::wxStyledTextCtrl(), AutoHide::boolean().
autoCompSetAutoHide(#wx_ref{type=ThisT,ref=ThisRef},AutoHide)
when is_boolean(AutoHide) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetAutoHide,
<<ThisRef:32/?UI,(wxe_util:from_bool(AutoHide)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetautohide">external documentation</a>.
+-spec autoCompGetAutoHide(This) -> boolean() when
+ This::wxStyledTextCtrl().
autoCompGetAutoHide(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetAutoHide,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), DropRestOfWord::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetdroprestofword">external documentation</a>.
+-spec autoCompSetDropRestOfWord(This, DropRestOfWord) -> ok when
+ This::wxStyledTextCtrl(), DropRestOfWord::boolean().
autoCompSetDropRestOfWord(#wx_ref{type=ThisT,ref=ThisRef},DropRestOfWord)
when is_boolean(DropRestOfWord) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetDropRestOfWord,
<<ThisRef:32/?UI,(wxe_util:from_bool(DropRestOfWord)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetdroprestofword">external documentation</a>.
+-spec autoCompGetDropRestOfWord(This) -> boolean() when
+ This::wxStyledTextCtrl().
autoCompGetDropRestOfWord(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetDropRestOfWord,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Type::integer(), Bmp::wxBitmap:wxBitmap()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlregisterimage">external documentation</a>.
+-spec registerImage(This, Type, Bmp) -> ok when
+ This::wxStyledTextCtrl(), Type::integer(), Bmp::wxBitmap:wxBitmap().
registerImage(#wx_ref{type=ThisT,ref=ThisRef},Type,#wx_ref{type=BmpT,ref=BmpRef})
when is_integer(Type) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1179,271 +1318,308 @@ registerImage(#wx_ref{type=ThisT,ref=ThisRef},Type,#wx_ref{type=BmpT,ref=BmpRef}
wxe_util:cast(?wxStyledTextCtrl_RegisterImage,
<<ThisRef:32/?UI,Type:32/?UI,BmpRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlclearregisteredimages">external documentation</a>.
+-spec clearRegisteredImages(This) -> ok when
+ This::wxStyledTextCtrl().
clearRegisteredImages(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ClearRegisteredImages,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgettypeseparator">external documentation</a>.
+-spec autoCompGetTypeSeparator(This) -> integer() when
+ This::wxStyledTextCtrl().
autoCompGetTypeSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetTypeSeparator,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), SeparatorCharacter::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsettypeseparator">external documentation</a>.
+-spec autoCompSetTypeSeparator(This, SeparatorCharacter) -> ok when
+ This::wxStyledTextCtrl(), SeparatorCharacter::integer().
autoCompSetTypeSeparator(#wx_ref{type=ThisT,ref=ThisRef},SeparatorCharacter)
when is_integer(SeparatorCharacter) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetTypeSeparator,
<<ThisRef:32/?UI,SeparatorCharacter:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), CharacterCount::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetmaxwidth">external documentation</a>.
+-spec autoCompSetMaxWidth(This, CharacterCount) -> ok when
+ This::wxStyledTextCtrl(), CharacterCount::integer().
autoCompSetMaxWidth(#wx_ref{type=ThisT,ref=ThisRef},CharacterCount)
when is_integer(CharacterCount) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetMaxWidth,
<<ThisRef:32/?UI,CharacterCount:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetmaxwidth">external documentation</a>.
+-spec autoCompGetMaxWidth(This) -> integer() when
+ This::wxStyledTextCtrl().
autoCompGetMaxWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetMaxWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), RowCount::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetmaxheight">external documentation</a>.
+-spec autoCompSetMaxHeight(This, RowCount) -> ok when
+ This::wxStyledTextCtrl(), RowCount::integer().
autoCompSetMaxHeight(#wx_ref{type=ThisT,ref=ThisRef},RowCount)
when is_integer(RowCount) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_AutoCompSetMaxHeight,
<<ThisRef:32/?UI,RowCount:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetmaxheight">external documentation</a>.
+-spec autoCompGetMaxHeight(This) -> integer() when
+ This::wxStyledTextCtrl().
autoCompGetMaxHeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetMaxHeight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), IndentSize::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetindent">external documentation</a>.
+-spec setIndent(This, IndentSize) -> ok when
+ This::wxStyledTextCtrl(), IndentSize::integer().
setIndent(#wx_ref{type=ThisT,ref=ThisRef},IndentSize)
when is_integer(IndentSize) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetIndent,
<<ThisRef:32/?UI,IndentSize:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetindent">external documentation</a>.
+-spec getIndent(This) -> integer() when
+ This::wxStyledTextCtrl().
getIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetIndent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), UseTabs::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetusetabs">external documentation</a>.
+-spec setUseTabs(This, UseTabs) -> ok when
+ This::wxStyledTextCtrl(), UseTabs::boolean().
setUseTabs(#wx_ref{type=ThisT,ref=ThisRef},UseTabs)
when is_boolean(UseTabs) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetUseTabs,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseTabs)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetusetabs">external documentation</a>.
+-spec getUseTabs(This) -> boolean() when
+ This::wxStyledTextCtrl().
getUseTabs(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetUseTabs,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), IndentSize::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlineindentation">external documentation</a>.
+-spec setLineIndentation(This, Line, IndentSize) -> ok when
+ This::wxStyledTextCtrl(), Line::integer(), IndentSize::integer().
setLineIndentation(#wx_ref{type=ThisT,ref=ThisRef},Line,IndentSize)
when is_integer(Line),is_integer(IndentSize) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetLineIndentation,
<<ThisRef:32/?UI,Line:32/?UI,IndentSize:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlineindentation">external documentation</a>.
+-spec getLineIndentation(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
getLineIndentation(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLineIndentation,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlineindentposition">external documentation</a>.
+-spec getLineIndentPosition(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
getLineIndentPosition(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLineIndentPosition,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcolumn">external documentation</a>.
+-spec getColumn(This, Pos) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer().
getColumn(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetColumn,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Show::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetusehorizontalscrollbar">external documentation</a>.
+-spec setUseHorizontalScrollBar(This, Show) -> ok when
+ This::wxStyledTextCtrl(), Show::boolean().
setUseHorizontalScrollBar(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetUseHorizontalScrollBar,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetusehorizontalscrollbar">external documentation</a>.
+-spec getUseHorizontalScrollBar(This) -> boolean() when
+ This::wxStyledTextCtrl().
getUseHorizontalScrollBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetUseHorizontalScrollBar,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Show::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetindentationguides">external documentation</a>.
+-spec setIndentationGuides(This, Show) -> ok when
+ This::wxStyledTextCtrl(), Show::boolean().
setIndentationGuides(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetIndentationGuides,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetindentationguides">external documentation</a>.
+-spec getIndentationGuides(This) -> boolean() when
+ This::wxStyledTextCtrl().
getIndentationGuides(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetIndentationGuides,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Column::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsethighlightguide">external documentation</a>.
+-spec setHighlightGuide(This, Column) -> ok when
+ This::wxStyledTextCtrl(), Column::integer().
setHighlightGuide(#wx_ref{type=ThisT,ref=ThisRef},Column)
when is_integer(Column) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetHighlightGuide,
<<ThisRef:32/?UI,Column:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgethighlightguide">external documentation</a>.
+-spec getHighlightGuide(This) -> integer() when
+ This::wxStyledTextCtrl().
getHighlightGuide(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetHighlightGuide,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlineendposition">external documentation</a>.
+-spec getLineEndPosition(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
getLineEndPosition(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLineEndPosition,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcodepage">external documentation</a>.
+-spec getCodePage(This) -> integer() when
+ This::wxStyledTextCtrl().
getCodePage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCodePage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcaretforeground">external documentation</a>.
+-spec getCaretForeground(This) -> wx:wx_colour4() when
+ This::wxStyledTextCtrl().
getCaretForeground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCaretForeground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetreadonly">external documentation</a>.
+-spec getReadOnly(This) -> boolean() when
+ This::wxStyledTextCtrl().
getReadOnly(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetReadOnly,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcurrentpos">external documentation</a>.
+-spec setCurrentPos(This, Pos) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer().
setCurrentPos(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCurrentPos,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselectionstart">external documentation</a>.
+-spec setSelectionStart(This, Pos) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer().
setSelectionStart(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSelectionStart,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetselectionstart">external documentation</a>.
+-spec getSelectionStart(This) -> integer() when
+ This::wxStyledTextCtrl().
getSelectionStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSelectionStart,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselectionend">external documentation</a>.
+-spec setSelectionEnd(This, Pos) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer().
setSelectionEnd(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSelectionEnd,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetselectionend">external documentation</a>.
+-spec getSelectionEnd(This) -> integer() when
+ This::wxStyledTextCtrl().
getSelectionEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSelectionEnd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Magnification::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetprintmagnification">external documentation</a>.
+-spec setPrintMagnification(This, Magnification) -> ok when
+ This::wxStyledTextCtrl(), Magnification::integer().
setPrintMagnification(#wx_ref{type=ThisT,ref=ThisRef},Magnification)
when is_integer(Magnification) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetPrintMagnification,
<<ThisRef:32/?UI,Magnification:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetprintmagnification">external documentation</a>.
+-spec getPrintMagnification(This) -> integer() when
+ This::wxStyledTextCtrl().
getPrintMagnification(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetPrintMagnification,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Mode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetprintcolourmode">external documentation</a>.
+-spec setPrintColourMode(This, Mode) -> ok when
+ This::wxStyledTextCtrl(), Mode::integer().
setPrintColourMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetPrintColourMode,
<<ThisRef:32/?UI,Mode:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetprintcolourmode">external documentation</a>.
+-spec getPrintColourMode(This) -> integer() when
+ This::wxStyledTextCtrl().
getPrintColourMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetPrintColourMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), MinPos::integer(), MaxPos::integer(), Text::string()) -> integer()
%% @equiv findText(This,MinPos,MaxPos,Text, [])
+-spec findText(This, MinPos, MaxPos, Text) -> integer() when
+ This::wxStyledTextCtrl(), MinPos::integer(), MaxPos::integer(), Text::unicode:chardata().
+
findText(This,MinPos,MaxPos,Text)
when is_record(This, wx_ref),is_integer(MinPos),is_integer(MaxPos),is_list(Text) ->
findText(This,MinPos,MaxPos,Text, []).
-%% @spec (This::wxStyledTextCtrl(), MinPos::integer(), MaxPos::integer(), Text::string(), [Option]) -> integer()
-%% Option = {flags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlfindtext">external documentation</a>.
+-spec findText(This, MinPos, MaxPos, Text, [Option]) -> integer() when
+ This::wxStyledTextCtrl(), MinPos::integer(), MaxPos::integer(), Text::unicode:chardata(),
+ Option :: {flags, integer()}.
findText(#wx_ref{type=ThisT,ref=ThisRef},MinPos,MaxPos,Text, Options)
when is_integer(MinPos),is_integer(MaxPos),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1454,8 +1630,9 @@ findText(#wx_ref{type=ThisT,ref=ThisRef},MinPos,MaxPos,Text, Options)
wxe_util:call(?wxStyledTextCtrl_FindText,
<<ThisRef:32/?UI,MinPos:32/?UI,MaxPos:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxStyledTextCtrl(), DoDraw::bool(), StartPos::integer(), EndPos::integer(), Draw::wxDC:wxDC(), Target::wxDC:wxDC(), RenderRect::{X::integer(), Y::integer(), W::integer(), H::integer()}, PageRect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlformatrange">external documentation</a>.
+-spec formatRange(This, DoDraw, StartPos, EndPos, Draw, Target, RenderRect, PageRect) -> integer() when
+ This::wxStyledTextCtrl(), DoDraw::boolean(), StartPos::integer(), EndPos::integer(), Draw::wxDC:wxDC(), Target::wxDC:wxDC(), RenderRect::{X::integer(), Y::integer(), W::integer(), H::integer()}, PageRect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
formatRange(#wx_ref{type=ThisT,ref=ThisRef},DoDraw,StartPos,EndPos,#wx_ref{type=DrawT,ref=DrawRef},#wx_ref{type=TargetT,ref=TargetRef},{RenderRectX,RenderRectY,RenderRectW,RenderRectH},{PageRectX,PageRectY,PageRectW,PageRectH})
when is_boolean(DoDraw),is_integer(StartPos),is_integer(EndPos),is_integer(RenderRectX),is_integer(RenderRectY),is_integer(RenderRectW),is_integer(RenderRectH),is_integer(PageRectX),is_integer(PageRectY),is_integer(PageRectW),is_integer(PageRectH) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1464,129 +1641,146 @@ formatRange(#wx_ref{type=ThisT,ref=ThisRef},DoDraw,StartPos,EndPos,#wx_ref{type=
wxe_util:call(?wxStyledTextCtrl_FormatRange,
<<ThisRef:32/?UI,(wxe_util:from_bool(DoDraw)):32/?UI,StartPos:32/?UI,EndPos:32/?UI,DrawRef:32/?UI,TargetRef:32/?UI,RenderRectX:32/?UI,RenderRectY:32/?UI,RenderRectW:32/?UI,RenderRectH:32/?UI,PageRectX:32/?UI,PageRectY:32/?UI,PageRectW:32/?UI,PageRectH:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetfirstvisibleline">external documentation</a>.
+-spec getFirstVisibleLine(This) -> integer() when
+ This::wxStyledTextCtrl().
getFirstVisibleLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetFirstVisibleLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetline">external documentation</a>.
+-spec getLine(This, Line) -> unicode:charlist() when
+ This::wxStyledTextCtrl(), Line::integer().
getLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLine,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlinecount">external documentation</a>.
+-spec getLineCount(This) -> integer() when
+ This::wxStyledTextCtrl().
getLineCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLineCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), PixelWidth::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginleft">external documentation</a>.
+-spec setMarginLeft(This, PixelWidth) -> ok when
+ This::wxStyledTextCtrl(), PixelWidth::integer().
setMarginLeft(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMarginLeft,
<<ThisRef:32/?UI,PixelWidth:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmarginleft">external documentation</a>.
+-spec getMarginLeft(This) -> integer() when
+ This::wxStyledTextCtrl().
getMarginLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMarginLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), PixelWidth::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginright">external documentation</a>.
+-spec setMarginRight(This, PixelWidth) -> ok when
+ This::wxStyledTextCtrl(), PixelWidth::integer().
setMarginRight(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMarginRight,
<<ThisRef:32/?UI,PixelWidth:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmarginright">external documentation</a>.
+-spec getMarginRight(This) -> integer() when
+ This::wxStyledTextCtrl().
getMarginRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMarginRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmodify">external documentation</a>.
+-spec getModify(This) -> boolean() when
+ This::wxStyledTextCtrl().
getModify(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetModify,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Start::integer(), End::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselection">external documentation</a>.
+-spec setSelection(This, Start, End) -> ok when
+ This::wxStyledTextCtrl(), Start::integer(), End::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
when is_integer(Start),is_integer(End) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSelection,
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetselectedtext">external documentation</a>.
+-spec getSelectedText(This) -> unicode:charlist() when
+ This::wxStyledTextCtrl().
getSelectedText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSelectedText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), StartPos::integer(), EndPos::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettextrange">external documentation</a>.
+-spec getTextRange(This, StartPos, EndPos) -> unicode:charlist() when
+ This::wxStyledTextCtrl(), StartPos::integer(), EndPos::integer().
getTextRange(#wx_ref{type=ThisT,ref=ThisRef},StartPos,EndPos)
when is_integer(StartPos),is_integer(EndPos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTextRange,
<<ThisRef:32/?UI,StartPos:32/?UI,EndPos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Normal::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlhideselection">external documentation</a>.
+-spec hideSelection(This, Normal) -> ok when
+ This::wxStyledTextCtrl(), Normal::boolean().
hideSelection(#wx_ref{type=ThisT,ref=ThisRef},Normal)
when is_boolean(Normal) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_HideSelection,
<<ThisRef:32/?UI,(wxe_util:from_bool(Normal)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinefromposition">external documentation</a>.
+-spec lineFromPosition(This, Pos) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer().
lineFromPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_LineFromPosition,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpositionfromline">external documentation</a>.
+-spec positionFromLine(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
positionFromLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_PositionFromLine,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Columns::integer(), Lines::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinescroll">external documentation</a>.
+-spec lineScroll(This, Columns, Lines) -> ok when
+ This::wxStyledTextCtrl(), Columns::integer(), Lines::integer().
lineScroll(#wx_ref{type=ThisT,ref=ThisRef},Columns,Lines)
when is_integer(Columns),is_integer(Lines) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineScroll,
<<ThisRef:32/?UI,Columns:32/?UI,Lines:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlensurecaretvisible">external documentation</a>.
+-spec ensureCaretVisible(This) -> ok when
+ This::wxStyledTextCtrl().
ensureCaretVisible(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_EnsureCaretVisible,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlreplaceselection">external documentation</a>.
+-spec replaceSelection(This, Text) -> ok when
+ This::wxStyledTextCtrl(), Text::unicode:chardata().
replaceSelection(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1594,72 +1788,82 @@ replaceSelection(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxStyledTextCtrl_ReplaceSelection,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), ReadOnly::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetreadonly">external documentation</a>.
+-spec setReadOnly(This, ReadOnly) -> ok when
+ This::wxStyledTextCtrl(), ReadOnly::boolean().
setReadOnly(#wx_ref{type=ThisT,ref=ThisRef},ReadOnly)
when is_boolean(ReadOnly) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetReadOnly,
<<ThisRef:32/?UI,(wxe_util:from_bool(ReadOnly)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcanpaste">external documentation</a>.
+-spec canPaste(This) -> boolean() when
+ This::wxStyledTextCtrl().
canPaste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_CanPaste,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcanundo">external documentation</a>.
+-spec canUndo(This) -> boolean() when
+ This::wxStyledTextCtrl().
canUndo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_CanUndo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlemptyundobuffer">external documentation</a>.
+-spec emptyUndoBuffer(This) -> ok when
+ This::wxStyledTextCtrl().
emptyUndoBuffer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_EmptyUndoBuffer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlundo">external documentation</a>.
+-spec undo(This) -> ok when
+ This::wxStyledTextCtrl().
undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Undo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcut">external documentation</a>.
+-spec cut(This) -> ok when
+ This::wxStyledTextCtrl().
cut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Cut,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcopy">external documentation</a>.
+-spec copy(This) -> ok when
+ This::wxStyledTextCtrl().
copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Copy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpaste">external documentation</a>.
+-spec paste(This) -> ok when
+ This::wxStyledTextCtrl().
paste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Paste,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlclear">external documentation</a>.
+-spec clear(This) -> ok when
+ This::wxStyledTextCtrl().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Clear,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsettext">external documentation</a>.
+-spec setText(This, Text) -> ok when
+ This::wxStyledTextCtrl(), Text::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1667,74 +1871,84 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxStyledTextCtrl_SetText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettext">external documentation</a>.
+-spec getText(This) -> unicode:charlist() when
+ This::wxStyledTextCtrl().
getText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettextlength">external documentation</a>.
+-spec getTextLength(This) -> integer() when
+ This::wxStyledTextCtrl().
getTextLength(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTextLength,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetovertype">external documentation</a>.
+-spec getOvertype(This) -> boolean() when
+ This::wxStyledTextCtrl().
getOvertype(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetOvertype,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), PixelWidth::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretwidth">external documentation</a>.
+-spec setCaretWidth(This, PixelWidth) -> ok when
+ This::wxStyledTextCtrl(), PixelWidth::integer().
setCaretWidth(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCaretWidth,
<<ThisRef:32/?UI,PixelWidth:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcaretwidth">external documentation</a>.
+-spec getCaretWidth(This) -> integer() when
+ This::wxStyledTextCtrl().
getCaretWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCaretWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsettargetstart">external documentation</a>.
+-spec setTargetStart(This, Pos) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer().
setTargetStart(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetTargetStart,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettargetstart">external documentation</a>.
+-spec getTargetStart(This) -> integer() when
+ This::wxStyledTextCtrl().
getTargetStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTargetStart,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsettargetend">external documentation</a>.
+-spec setTargetEnd(This, Pos) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer().
setTargetEnd(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetTargetEnd,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettargetend">external documentation</a>.
+-spec getTargetEnd(This) -> integer() when
+ This::wxStyledTextCtrl().
getTargetEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTargetEnd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Text::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlreplacetarget">external documentation</a>.
+-spec replaceTarget(This, Text) -> integer() when
+ This::wxStyledTextCtrl(), Text::unicode:chardata().
replaceTarget(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1742,8 +1956,9 @@ replaceTarget(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:call(?wxStyledTextCtrl_ReplaceTarget,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Text::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsearchintarget">external documentation</a>.
+-spec searchInTarget(This, Text) -> integer() when
+ This::wxStyledTextCtrl(), Text::unicode:chardata().
searchInTarget(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1751,23 +1966,26 @@ searchInTarget(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:call(?wxStyledTextCtrl_SearchInTarget,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Flags::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetsearchflags">external documentation</a>.
+-spec setSearchFlags(This, Flags) -> ok when
+ This::wxStyledTextCtrl(), Flags::integer().
setSearchFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSearchFlags,
<<ThisRef:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetsearchflags">external documentation</a>.
+-spec getSearchFlags(This) -> integer() when
+ This::wxStyledTextCtrl().
getSearchFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSearchFlags,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer(), Definition::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipshow">external documentation</a>.
+-spec callTipShow(This, Pos, Definition) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer(), Definition::unicode:chardata().
callTipShow(#wx_ref{type=ThisT,ref=ThisRef},Pos,Definition)
when is_integer(Pos),is_list(Definition) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1775,348 +1993,393 @@ callTipShow(#wx_ref{type=ThisT,ref=ThisRef},Pos,Definition)
wxe_util:cast(?wxStyledTextCtrl_CallTipShow,
<<ThisRef:32/?UI,Pos:32/?UI,(byte_size(Definition_UC)):32/?UI,(Definition_UC)/binary, 0:(((8- ((4+byte_size(Definition_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipcancel">external documentation</a>.
+-spec callTipCancel(This) -> ok when
+ This::wxStyledTextCtrl().
callTipCancel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CallTipCancel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipactive">external documentation</a>.
+-spec callTipActive(This) -> boolean() when
+ This::wxStyledTextCtrl().
callTipActive(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_CallTipActive,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipposatstart">external documentation</a>.
+-spec callTipPosAtStart(This) -> integer() when
+ This::wxStyledTextCtrl().
callTipPosAtStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_CallTipPosAtStart,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Start::integer(), End::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipsethighlight">external documentation</a>.
+-spec callTipSetHighlight(This, Start, End) -> ok when
+ This::wxStyledTextCtrl(), Start::integer(), End::integer().
callTipSetHighlight(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
when is_integer(Start),is_integer(End) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CallTipSetHighlight,
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Back::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipsetbackground">external documentation</a>.
+-spec callTipSetBackground(This, Back) -> ok when
+ This::wxStyledTextCtrl(), Back::wx:wx_colour().
callTipSetBackground(#wx_ref{type=ThisT,ref=ThisRef},Back)
when tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CallTipSetBackground,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipsetforeground">external documentation</a>.
+-spec callTipSetForeground(This, Fore) -> ok when
+ This::wxStyledTextCtrl(), Fore::wx:wx_colour().
callTipSetForeground(#wx_ref{type=ThisT,ref=ThisRef},Fore)
when tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CallTipSetForeground,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipsetforegroundhighlight">external documentation</a>.
+-spec callTipSetForegroundHighlight(This, Fore) -> ok when
+ This::wxStyledTextCtrl(), Fore::wx:wx_colour().
callTipSetForegroundHighlight(#wx_ref{type=ThisT,ref=ThisRef},Fore)
when tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CallTipSetForegroundHighlight,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), TabSize::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipusestyle">external documentation</a>.
+-spec callTipUseStyle(This, TabSize) -> ok when
+ This::wxStyledTextCtrl(), TabSize::integer().
callTipUseStyle(#wx_ref{type=ThisT,ref=ThisRef},TabSize)
when is_integer(TabSize) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CallTipUseStyle,
<<ThisRef:32/?UI,TabSize:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlvisiblefromdocline">external documentation</a>.
+-spec visibleFromDocLine(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
visibleFromDocLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_VisibleFromDocLine,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), LineDisplay::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldoclinefromvisible">external documentation</a>.
+-spec docLineFromVisible(This, LineDisplay) -> integer() when
+ This::wxStyledTextCtrl(), LineDisplay::integer().
docLineFromVisible(#wx_ref{type=ThisT,ref=ThisRef},LineDisplay)
when is_integer(LineDisplay) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_DocLineFromVisible,
<<ThisRef:32/?UI,LineDisplay:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwrapcount">external documentation</a>.
+-spec wrapCount(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
wrapCount(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_WrapCount,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), Level::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldlevel">external documentation</a>.
+-spec setFoldLevel(This, Line, Level) -> ok when
+ This::wxStyledTextCtrl(), Line::integer(), Level::integer().
setFoldLevel(#wx_ref{type=ThisT,ref=ThisRef},Line,Level)
when is_integer(Line),is_integer(Level) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetFoldLevel,
<<ThisRef:32/?UI,Line:32/?UI,Level:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetfoldlevel">external documentation</a>.
+-spec getFoldLevel(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
getFoldLevel(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetFoldLevel,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), Level::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlastchild">external documentation</a>.
+-spec getLastChild(This, Line, Level) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer(), Level::integer().
getLastChild(#wx_ref{type=ThisT,ref=ThisRef},Line,Level)
when is_integer(Line),is_integer(Level) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLastChild,
<<ThisRef:32/?UI,Line:32/?UI,Level:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetfoldparent">external documentation</a>.
+-spec getFoldParent(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
getFoldParent(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetFoldParent,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), LineStart::integer(), LineEnd::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlshowlines">external documentation</a>.
+-spec showLines(This, LineStart, LineEnd) -> ok when
+ This::wxStyledTextCtrl(), LineStart::integer(), LineEnd::integer().
showLines(#wx_ref{type=ThisT,ref=ThisRef},LineStart,LineEnd)
when is_integer(LineStart),is_integer(LineEnd) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ShowLines,
<<ThisRef:32/?UI,LineStart:32/?UI,LineEnd:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), LineStart::integer(), LineEnd::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlhidelines">external documentation</a>.
+-spec hideLines(This, LineStart, LineEnd) -> ok when
+ This::wxStyledTextCtrl(), LineStart::integer(), LineEnd::integer().
hideLines(#wx_ref{type=ThisT,ref=ThisRef},LineStart,LineEnd)
when is_integer(LineStart),is_integer(LineEnd) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_HideLines,
<<ThisRef:32/?UI,LineStart:32/?UI,LineEnd:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlinevisible">external documentation</a>.
+-spec getLineVisible(This, Line) -> boolean() when
+ This::wxStyledTextCtrl(), Line::integer().
getLineVisible(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLineVisible,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), Expanded::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldexpanded">external documentation</a>.
+-spec setFoldExpanded(This, Line, Expanded) -> ok when
+ This::wxStyledTextCtrl(), Line::integer(), Expanded::boolean().
setFoldExpanded(#wx_ref{type=ThisT,ref=ThisRef},Line,Expanded)
when is_integer(Line),is_boolean(Expanded) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetFoldExpanded,
<<ThisRef:32/?UI,Line:32/?UI,(wxe_util:from_bool(Expanded)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetfoldexpanded">external documentation</a>.
+-spec getFoldExpanded(This, Line) -> boolean() when
+ This::wxStyledTextCtrl(), Line::integer().
getFoldExpanded(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetFoldExpanded,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrltogglefold">external documentation</a>.
+-spec toggleFold(This, Line) -> ok when
+ This::wxStyledTextCtrl(), Line::integer().
toggleFold(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ToggleFold,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlensurevisible">external documentation</a>.
+-spec ensureVisible(This, Line) -> ok when
+ This::wxStyledTextCtrl(), Line::integer().
ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_EnsureVisible,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Flags::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldflags">external documentation</a>.
+-spec setFoldFlags(This, Flags) -> ok when
+ This::wxStyledTextCtrl(), Flags::integer().
setFoldFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetFoldFlags,
<<ThisRef:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlensurevisibleenforcepolicy">external documentation</a>.
+-spec ensureVisibleEnforcePolicy(This, Line) -> ok when
+ This::wxStyledTextCtrl(), Line::integer().
ensureVisibleEnforcePolicy(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_EnsureVisibleEnforcePolicy,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), TabIndents::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsettabindents">external documentation</a>.
+-spec setTabIndents(This, TabIndents) -> ok when
+ This::wxStyledTextCtrl(), TabIndents::boolean().
setTabIndents(#wx_ref{type=ThisT,ref=ThisRef},TabIndents)
when is_boolean(TabIndents) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetTabIndents,
<<ThisRef:32/?UI,(wxe_util:from_bool(TabIndents)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettabindents">external documentation</a>.
+-spec getTabIndents(This) -> boolean() when
+ This::wxStyledTextCtrl().
getTabIndents(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTabIndents,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), BsUnIndents::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetbackspaceunindents">external documentation</a>.
+-spec setBackSpaceUnIndents(This, BsUnIndents) -> ok when
+ This::wxStyledTextCtrl(), BsUnIndents::boolean().
setBackSpaceUnIndents(#wx_ref{type=ThisT,ref=ThisRef},BsUnIndents)
when is_boolean(BsUnIndents) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetBackSpaceUnIndents,
<<ThisRef:32/?UI,(wxe_util:from_bool(BsUnIndents)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetbackspaceunindents">external documentation</a>.
+-spec getBackSpaceUnIndents(This) -> boolean() when
+ This::wxStyledTextCtrl().
getBackSpaceUnIndents(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetBackSpaceUnIndents,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), PeriodMilliseconds::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmousedwelltime">external documentation</a>.
+-spec setMouseDwellTime(This, PeriodMilliseconds) -> ok when
+ This::wxStyledTextCtrl(), PeriodMilliseconds::integer().
setMouseDwellTime(#wx_ref{type=ThisT,ref=ThisRef},PeriodMilliseconds)
when is_integer(PeriodMilliseconds) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMouseDwellTime,
<<ThisRef:32/?UI,PeriodMilliseconds:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmousedwelltime">external documentation</a>.
+-spec getMouseDwellTime(This) -> integer() when
+ This::wxStyledTextCtrl().
getMouseDwellTime(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMouseDwellTime,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer(), OnlyWordCharacters::bool()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordstartposition">external documentation</a>.
+-spec wordStartPosition(This, Pos, OnlyWordCharacters) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer(), OnlyWordCharacters::boolean().
wordStartPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos,OnlyWordCharacters)
when is_integer(Pos),is_boolean(OnlyWordCharacters) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_WordStartPosition,
<<ThisRef:32/?UI,Pos:32/?UI,(wxe_util:from_bool(OnlyWordCharacters)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer(), OnlyWordCharacters::bool()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordendposition">external documentation</a>.
+-spec wordEndPosition(This, Pos, OnlyWordCharacters) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer(), OnlyWordCharacters::boolean().
wordEndPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos,OnlyWordCharacters)
when is_integer(Pos),is_boolean(OnlyWordCharacters) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_WordEndPosition,
<<ThisRef:32/?UI,Pos:32/?UI,(wxe_util:from_bool(OnlyWordCharacters)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Mode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwrapmode">external documentation</a>.
+-spec setWrapMode(This, Mode) -> ok when
+ This::wxStyledTextCtrl(), Mode::integer().
setWrapMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetWrapMode,
<<ThisRef:32/?UI,Mode:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetwrapmode">external documentation</a>.
+-spec getWrapMode(This) -> integer() when
+ This::wxStyledTextCtrl().
getWrapMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetWrapMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), WrapVisualFlags::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwrapvisualflags">external documentation</a>.
+-spec setWrapVisualFlags(This, WrapVisualFlags) -> ok when
+ This::wxStyledTextCtrl(), WrapVisualFlags::integer().
setWrapVisualFlags(#wx_ref{type=ThisT,ref=ThisRef},WrapVisualFlags)
when is_integer(WrapVisualFlags) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetWrapVisualFlags,
<<ThisRef:32/?UI,WrapVisualFlags:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetwrapvisualflags">external documentation</a>.
+-spec getWrapVisualFlags(This) -> integer() when
+ This::wxStyledTextCtrl().
getWrapVisualFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetWrapVisualFlags,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), WrapVisualFlagsLocation::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwrapvisualflagslocation">external documentation</a>.
+-spec setWrapVisualFlagsLocation(This, WrapVisualFlagsLocation) -> ok when
+ This::wxStyledTextCtrl(), WrapVisualFlagsLocation::integer().
setWrapVisualFlagsLocation(#wx_ref{type=ThisT,ref=ThisRef},WrapVisualFlagsLocation)
when is_integer(WrapVisualFlagsLocation) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetWrapVisualFlagsLocation,
<<ThisRef:32/?UI,WrapVisualFlagsLocation:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetwrapvisualflagslocation">external documentation</a>.
+-spec getWrapVisualFlagsLocation(This) -> integer() when
+ This::wxStyledTextCtrl().
getWrapVisualFlagsLocation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetWrapVisualFlagsLocation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Indent::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwrapstartindent">external documentation</a>.
+-spec setWrapStartIndent(This, Indent) -> ok when
+ This::wxStyledTextCtrl(), Indent::integer().
setWrapStartIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent)
when is_integer(Indent) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetWrapStartIndent,
<<ThisRef:32/?UI,Indent:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetwrapstartindent">external documentation</a>.
+-spec getWrapStartIndent(This) -> integer() when
+ This::wxStyledTextCtrl().
getWrapStartIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetWrapStartIndent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Mode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlayoutcache">external documentation</a>.
+-spec setLayoutCache(This, Mode) -> ok when
+ This::wxStyledTextCtrl(), Mode::integer().
setLayoutCache(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetLayoutCache,
<<ThisRef:32/?UI,Mode:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlayoutcache">external documentation</a>.
+-spec getLayoutCache(This) -> integer() when
+ This::wxStyledTextCtrl().
getLayoutCache(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLayoutCache,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), PixelWidth::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetscrollwidth">external documentation</a>.
+-spec setScrollWidth(This, PixelWidth) -> ok when
+ This::wxStyledTextCtrl(), PixelWidth::integer().
setScrollWidth(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetScrollWidth,
<<ThisRef:32/?UI,PixelWidth:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetscrollwidth">external documentation</a>.
+-spec getScrollWidth(This) -> integer() when
+ This::wxStyledTextCtrl().
getScrollWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetScrollWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Text::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrltextwidth">external documentation</a>.
+-spec textWidth(This, Style, Text) -> integer() when
+ This::wxStyledTextCtrl(), Style::integer(), Text::unicode:chardata().
textWidth(#wx_ref{type=ThisT,ref=ThisRef},Style,Text)
when is_integer(Style),is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2124,38 +2387,43 @@ textWidth(#wx_ref{type=ThisT,ref=ThisRef},Style,Text)
wxe_util:call(?wxStyledTextCtrl_TextWidth,
<<ThisRef:32/?UI,Style:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetendatlastline">external documentation</a>.
+-spec getEndAtLastLine(This) -> boolean() when
+ This::wxStyledTextCtrl().
getEndAtLastLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetEndAtLastLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrltextheight">external documentation</a>.
+-spec textHeight(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
textHeight(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_TextHeight,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Show::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetuseverticalscrollbar">external documentation</a>.
+-spec setUseVerticalScrollBar(This, Show) -> ok when
+ This::wxStyledTextCtrl(), Show::boolean().
setUseVerticalScrollBar(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetUseVerticalScrollBar,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetuseverticalscrollbar">external documentation</a>.
+-spec getUseVerticalScrollBar(This) -> boolean() when
+ This::wxStyledTextCtrl().
getUseVerticalScrollBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetUseVerticalScrollBar,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlappendtext">external documentation</a>.
+-spec appendText(This, Text) -> ok when
+ This::wxStyledTextCtrl(), Text::unicode:chardata().
appendText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2163,559 +2431,646 @@ appendText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxStyledTextCtrl_AppendText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettwophasedraw">external documentation</a>.
+-spec getTwoPhaseDraw(This) -> boolean() when
+ This::wxStyledTextCtrl().
getTwoPhaseDraw(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTwoPhaseDraw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), TwoPhase::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsettwophasedraw">external documentation</a>.
+-spec setTwoPhaseDraw(This, TwoPhase) -> ok when
+ This::wxStyledTextCtrl(), TwoPhase::boolean().
setTwoPhaseDraw(#wx_ref{type=ThisT,ref=ThisRef},TwoPhase)
when is_boolean(TwoPhase) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetTwoPhaseDraw,
<<ThisRef:32/?UI,(wxe_util:from_bool(TwoPhase)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrltargetfromselection">external documentation</a>.
+-spec targetFromSelection(This) -> ok when
+ This::wxStyledTextCtrl().
targetFromSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_TargetFromSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinesjoin">external documentation</a>.
+-spec linesJoin(This) -> ok when
+ This::wxStyledTextCtrl().
linesJoin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LinesJoin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), PixelWidth::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinessplit">external documentation</a>.
+-spec linesSplit(This, PixelWidth) -> ok when
+ This::wxStyledTextCtrl(), PixelWidth::integer().
linesSplit(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LinesSplit,
<<ThisRef:32/?UI,PixelWidth:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), UseSetting::bool(), Back::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldmargincolour">external documentation</a>.
+-spec setFoldMarginColour(This, UseSetting, Back) -> ok when
+ This::wxStyledTextCtrl(), UseSetting::boolean(), Back::wx:wx_colour().
setFoldMarginColour(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
when is_boolean(UseSetting),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetFoldMarginColour,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), UseSetting::bool(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldmarginhicolour">external documentation</a>.
+-spec setFoldMarginHiColour(This, UseSetting, Fore) -> ok when
+ This::wxStyledTextCtrl(), UseSetting::boolean(), Fore::wx:wx_colour().
setFoldMarginHiColour(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
when is_boolean(UseSetting),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetFoldMarginHiColour,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinedown">external documentation</a>.
+-spec lineDown(This) -> ok when
+ This::wxStyledTextCtrl().
lineDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinedownextend">external documentation</a>.
+-spec lineDownExtend(This) -> ok when
+ This::wxStyledTextCtrl().
lineDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineDownExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineup">external documentation</a>.
+-spec lineUp(This) -> ok when
+ This::wxStyledTextCtrl().
lineUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineupextend">external documentation</a>.
+-spec lineUpExtend(This) -> ok when
+ This::wxStyledTextCtrl().
lineUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineUpExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcharleft">external documentation</a>.
+-spec charLeft(This) -> ok when
+ This::wxStyledTextCtrl().
charLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CharLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcharleftextend">external documentation</a>.
+-spec charLeftExtend(This) -> ok when
+ This::wxStyledTextCtrl().
charLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CharLeftExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcharright">external documentation</a>.
+-spec charRight(This) -> ok when
+ This::wxStyledTextCtrl().
charRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CharRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcharrightextend">external documentation</a>.
+-spec charRightExtend(This) -> ok when
+ This::wxStyledTextCtrl().
charRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CharRightExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordleft">external documentation</a>.
+-spec wordLeft(This) -> ok when
+ This::wxStyledTextCtrl().
wordLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordleftextend">external documentation</a>.
+-spec wordLeftExtend(This) -> ok when
+ This::wxStyledTextCtrl().
wordLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordLeftExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordright">external documentation</a>.
+-spec wordRight(This) -> ok when
+ This::wxStyledTextCtrl().
wordRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordrightextend">external documentation</a>.
+-spec wordRightExtend(This) -> ok when
+ This::wxStyledTextCtrl().
wordRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordRightExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlhome">external documentation</a>.
+-spec home(This) -> ok when
+ This::wxStyledTextCtrl().
home(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Home,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlhomeextend">external documentation</a>.
+-spec homeExtend(This) -> ok when
+ This::wxStyledTextCtrl().
homeExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_HomeExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineend">external documentation</a>.
+-spec lineEnd(This) -> ok when
+ This::wxStyledTextCtrl().
lineEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineEnd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineendextend">external documentation</a>.
+-spec lineEndExtend(This) -> ok when
+ This::wxStyledTextCtrl().
lineEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineEndExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldocumentstart">external documentation</a>.
+-spec documentStart(This) -> ok when
+ This::wxStyledTextCtrl().
documentStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DocumentStart,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldocumentstartextend">external documentation</a>.
+-spec documentStartExtend(This) -> ok when
+ This::wxStyledTextCtrl().
documentStartExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DocumentStartExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldocumentend">external documentation</a>.
+-spec documentEnd(This) -> ok when
+ This::wxStyledTextCtrl().
documentEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DocumentEnd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldocumentendextend">external documentation</a>.
+-spec documentEndExtend(This) -> ok when
+ This::wxStyledTextCtrl().
documentEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DocumentEndExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpageup">external documentation</a>.
+-spec pageUp(This) -> ok when
+ This::wxStyledTextCtrl().
pageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_PageUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpageupextend">external documentation</a>.
+-spec pageUpExtend(This) -> ok when
+ This::wxStyledTextCtrl().
pageUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_PageUpExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpagedown">external documentation</a>.
+-spec pageDown(This) -> ok when
+ This::wxStyledTextCtrl().
pageDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_PageDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpagedownextend">external documentation</a>.
+-spec pageDownExtend(This) -> ok when
+ This::wxStyledTextCtrl().
pageDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_PageDownExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrledittoggleovertype">external documentation</a>.
+-spec editToggleOvertype(This) -> ok when
+ This::wxStyledTextCtrl().
editToggleOvertype(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_EditToggleOvertype,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcancel">external documentation</a>.
+-spec cancel(This) -> ok when
+ This::wxStyledTextCtrl().
cancel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Cancel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldeleteback">external documentation</a>.
+-spec deleteBack(This) -> ok when
+ This::wxStyledTextCtrl().
deleteBack(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DeleteBack,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrltab">external documentation</a>.
+-spec tab(This) -> ok when
+ This::wxStyledTextCtrl().
tab(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Tab,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlbacktab">external documentation</a>.
+-spec backTab(This) -> ok when
+ This::wxStyledTextCtrl().
backTab(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_BackTab,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlnewline">external documentation</a>.
+-spec newLine(This) -> ok when
+ This::wxStyledTextCtrl().
newLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_NewLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlformfeed">external documentation</a>.
+-spec formFeed(This) -> ok when
+ This::wxStyledTextCtrl().
formFeed(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_FormFeed,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlvchome">external documentation</a>.
+-spec vCHome(This) -> ok when
+ This::wxStyledTextCtrl().
vCHome(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_VCHome,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlvchomeextend">external documentation</a>.
+-spec vCHomeExtend(This) -> ok when
+ This::wxStyledTextCtrl().
vCHomeExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_VCHomeExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlzoomin">external documentation</a>.
+-spec zoomIn(This) -> ok when
+ This::wxStyledTextCtrl().
zoomIn(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ZoomIn,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlzoomout">external documentation</a>.
+-spec zoomOut(This) -> ok when
+ This::wxStyledTextCtrl().
zoomOut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ZoomOut,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldelwordleft">external documentation</a>.
+-spec delWordLeft(This) -> ok when
+ This::wxStyledTextCtrl().
delWordLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DelWordLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldelwordright">external documentation</a>.
+-spec delWordRight(This) -> ok when
+ This::wxStyledTextCtrl().
delWordRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DelWordRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinecut">external documentation</a>.
+-spec lineCut(This) -> ok when
+ This::wxStyledTextCtrl().
lineCut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineCut,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinedelete">external documentation</a>.
+-spec lineDelete(This) -> ok when
+ This::wxStyledTextCtrl().
lineDelete(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineDelete,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinetranspose">external documentation</a>.
+-spec lineTranspose(This) -> ok when
+ This::wxStyledTextCtrl().
lineTranspose(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineTranspose,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineduplicate">external documentation</a>.
+-spec lineDuplicate(This) -> ok when
+ This::wxStyledTextCtrl().
lineDuplicate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineDuplicate,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllowercase">external documentation</a>.
+-spec lowerCase(This) -> ok when
+ This::wxStyledTextCtrl().
lowerCase(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LowerCase,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrluppercase">external documentation</a>.
+-spec upperCase(This) -> ok when
+ This::wxStyledTextCtrl().
upperCase(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_UpperCase,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinescrolldown">external documentation</a>.
+-spec lineScrollDown(This) -> ok when
+ This::wxStyledTextCtrl().
lineScrollDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineScrollDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinescrollup">external documentation</a>.
+-spec lineScrollUp(This) -> ok when
+ This::wxStyledTextCtrl().
lineScrollUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineScrollUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldeletebacknotline">external documentation</a>.
+-spec deleteBackNotLine(This) -> ok when
+ This::wxStyledTextCtrl().
deleteBackNotLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DeleteBackNotLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlhomedisplay">external documentation</a>.
+-spec homeDisplay(This) -> ok when
+ This::wxStyledTextCtrl().
homeDisplay(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_HomeDisplay,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlhomedisplayextend">external documentation</a>.
+-spec homeDisplayExtend(This) -> ok when
+ This::wxStyledTextCtrl().
homeDisplayExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_HomeDisplayExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineenddisplay">external documentation</a>.
+-spec lineEndDisplay(This) -> ok when
+ This::wxStyledTextCtrl().
lineEndDisplay(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineEndDisplay,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineenddisplayextend">external documentation</a>.
+-spec lineEndDisplayExtend(This) -> ok when
+ This::wxStyledTextCtrl().
lineEndDisplayExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineEndDisplayExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlhomewrapextend">external documentation</a>.
+-spec homeWrapExtend(This) -> ok when
+ This::wxStyledTextCtrl().
homeWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_HomeWrapExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineendwrap">external documentation</a>.
+-spec lineEndWrap(This) -> ok when
+ This::wxStyledTextCtrl().
lineEndWrap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineEndWrap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineendwrapextend">external documentation</a>.
+-spec lineEndWrapExtend(This) -> ok when
+ This::wxStyledTextCtrl().
lineEndWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineEndWrapExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlvchomewrap">external documentation</a>.
+-spec vCHomeWrap(This) -> ok when
+ This::wxStyledTextCtrl().
vCHomeWrap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_VCHomeWrap,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlvchomewrapextend">external documentation</a>.
+-spec vCHomeWrapExtend(This) -> ok when
+ This::wxStyledTextCtrl().
vCHomeWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_VCHomeWrapExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinecopy">external documentation</a>.
+-spec lineCopy(This) -> ok when
+ This::wxStyledTextCtrl().
lineCopy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineCopy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlmovecaretinsideview">external documentation</a>.
+-spec moveCaretInsideView(This) -> ok when
+ This::wxStyledTextCtrl().
moveCaretInsideView(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_MoveCaretInsideView,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinelength">external documentation</a>.
+-spec lineLength(This, Line) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer().
lineLength(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_LineLength,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos1::integer(), Pos2::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlbracehighlight">external documentation</a>.
+-spec braceHighlight(This, Pos1, Pos2) -> ok when
+ This::wxStyledTextCtrl(), Pos1::integer(), Pos2::integer().
braceHighlight(#wx_ref{type=ThisT,ref=ThisRef},Pos1,Pos2)
when is_integer(Pos1),is_integer(Pos2) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_BraceHighlight,
<<ThisRef:32/?UI,Pos1:32/?UI,Pos2:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlbracebadlight">external documentation</a>.
+-spec braceBadLight(This, Pos) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer().
braceBadLight(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_BraceBadLight,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlbracematch">external documentation</a>.
+-spec braceMatch(This, Pos) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer().
braceMatch(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_BraceMatch,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetvieweol">external documentation</a>.
+-spec getViewEOL(This) -> boolean() when
+ This::wxStyledTextCtrl().
getViewEOL(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetViewEOL,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Visible::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetvieweol">external documentation</a>.
+-spec setViewEOL(This, Visible) -> ok when
+ This::wxStyledTextCtrl(), Visible::boolean().
setViewEOL(#wx_ref{type=ThisT,ref=ThisRef},Visible)
when is_boolean(Visible) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetViewEOL,
<<ThisRef:32/?UI,(wxe_util:from_bool(Visible)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Mask::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmodeventmask">external documentation</a>.
+-spec setModEventMask(This, Mask) -> ok when
+ This::wxStyledTextCtrl(), Mask::integer().
setModEventMask(#wx_ref{type=ThisT,ref=ThisRef},Mask)
when is_integer(Mask) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetModEventMask,
<<ThisRef:32/?UI,Mask:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetedgecolumn">external documentation</a>.
+-spec getEdgeColumn(This) -> integer() when
+ This::wxStyledTextCtrl().
getEdgeColumn(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetEdgeColumn,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Column::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetedgecolumn">external documentation</a>.
+-spec setEdgeColumn(This, Column) -> ok when
+ This::wxStyledTextCtrl(), Column::integer().
setEdgeColumn(#wx_ref{type=ThisT,ref=ThisRef},Column)
when is_integer(Column) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetEdgeColumn,
<<ThisRef:32/?UI,Column:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
+%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetedgemode">external documentation</a>.
+-spec setEdgeMode(This, Mode) -> ok when
+ This::wxStyledTextCtrl(), Mode::integer().
+setEdgeMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
+ when is_integer(Mode) ->
+ ?CLASS(ThisT,wxStyledTextCtrl),
+ wxe_util:cast(?wxStyledTextCtrl_SetEdgeMode,
+ <<ThisRef:32/?UI,Mode:32/?UI>>).
+
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetedgemode">external documentation</a>.
+-spec getEdgeMode(This) -> integer() when
+ This::wxStyledTextCtrl().
getEdgeMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetEdgeMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetedgecolour">external documentation</a>.
+-spec getEdgeColour(This) -> wx:wx_colour4() when
+ This::wxStyledTextCtrl().
getEdgeColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetEdgeColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), EdgeColour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetedgecolour">external documentation</a>.
+-spec setEdgeColour(This, EdgeColour) -> ok when
+ This::wxStyledTextCtrl(), EdgeColour::wx:wx_colour().
setEdgeColour(#wx_ref{type=ThisT,ref=ThisRef},EdgeColour)
when tuple_size(EdgeColour) =:= 3; tuple_size(EdgeColour) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetEdgeColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(EdgeColour)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsearchanchor">external documentation</a>.
+-spec searchAnchor(This) -> ok when
+ This::wxStyledTextCtrl().
searchAnchor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SearchAnchor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Flags::integer(), Text::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsearchnext">external documentation</a>.
+-spec searchNext(This, Flags, Text) -> integer() when
+ This::wxStyledTextCtrl(), Flags::integer(), Text::unicode:chardata().
searchNext(#wx_ref{type=ThisT,ref=ThisRef},Flags,Text)
when is_integer(Flags),is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2723,8 +3078,9 @@ searchNext(#wx_ref{type=ThisT,ref=ThisRef},Flags,Text)
wxe_util:call(?wxStyledTextCtrl_SearchNext,
<<ThisRef:32/?UI,Flags:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Flags::integer(), Text::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsearchprev">external documentation</a>.
+-spec searchPrev(This, Flags, Text) -> integer() when
+ This::wxStyledTextCtrl(), Flags::integer(), Text::unicode:chardata().
searchPrev(#wx_ref{type=ThisT,ref=ThisRef},Flags,Text)
when is_integer(Flags),is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2732,291 +3088,330 @@ searchPrev(#wx_ref{type=ThisT,ref=ThisRef},Flags,Text)
wxe_util:call(?wxStyledTextCtrl_SearchPrev,
<<ThisRef:32/?UI,Flags:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinesonscreen">external documentation</a>.
+-spec linesOnScreen(This) -> integer() when
+ This::wxStyledTextCtrl().
linesOnScreen(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_LinesOnScreen,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), AllowPopUp::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlusepopup">external documentation</a>.
+-spec usePopUp(This, AllowPopUp) -> ok when
+ This::wxStyledTextCtrl(), AllowPopUp::boolean().
usePopUp(#wx_ref{type=ThisT,ref=ThisRef},AllowPopUp)
when is_boolean(AllowPopUp) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_UsePopUp,
<<ThisRef:32/?UI,(wxe_util:from_bool(AllowPopUp)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlselectionisrectangle">external documentation</a>.
+-spec selectionIsRectangle(This) -> boolean() when
+ This::wxStyledTextCtrl().
selectionIsRectangle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_SelectionIsRectangle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Zoom::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetzoom">external documentation</a>.
+-spec setZoom(This, Zoom) -> ok when
+ This::wxStyledTextCtrl(), Zoom::integer().
setZoom(#wx_ref{type=ThisT,ref=ThisRef},Zoom)
when is_integer(Zoom) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetZoom,
<<ThisRef:32/?UI,Zoom:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetzoom">external documentation</a>.
+-spec getZoom(This) -> integer() when
+ This::wxStyledTextCtrl().
getZoom(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetZoom,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmodeventmask">external documentation</a>.
+-spec getModEventMask(This) -> integer() when
+ This::wxStyledTextCtrl().
getModEventMask(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetModEventMask,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Focus::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstcfocus">external documentation</a>.
+-spec setSTCFocus(This, Focus) -> ok when
+ This::wxStyledTextCtrl(), Focus::boolean().
setSTCFocus(#wx_ref{type=ThisT,ref=ThisRef},Focus)
when is_boolean(Focus) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSTCFocus,
<<ThisRef:32/?UI,(wxe_util:from_bool(Focus)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetstcfocus">external documentation</a>.
+-spec getSTCFocus(This) -> boolean() when
+ This::wxStyledTextCtrl().
getSTCFocus(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSTCFocus,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), StatusCode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstatus">external documentation</a>.
+-spec setStatus(This, StatusCode) -> ok when
+ This::wxStyledTextCtrl(), StatusCode::integer().
setStatus(#wx_ref{type=ThisT,ref=ThisRef},StatusCode)
when is_integer(StatusCode) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetStatus,
<<ThisRef:32/?UI,StatusCode:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetstatus">external documentation</a>.
+-spec getStatus(This) -> integer() when
+ This::wxStyledTextCtrl().
getStatus(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetStatus,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Captures::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmousedowncaptures">external documentation</a>.
+-spec setMouseDownCaptures(This, Captures) -> ok when
+ This::wxStyledTextCtrl(), Captures::boolean().
setMouseDownCaptures(#wx_ref{type=ThisT,ref=ThisRef},Captures)
when is_boolean(Captures) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMouseDownCaptures,
<<ThisRef:32/?UI,(wxe_util:from_bool(Captures)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetmousedowncaptures">external documentation</a>.
+-spec getMouseDownCaptures(This) -> boolean() when
+ This::wxStyledTextCtrl().
getMouseDownCaptures(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetMouseDownCaptures,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), CursorType::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstccursor">external documentation</a>.
+-spec setSTCCursor(This, CursorType) -> ok when
+ This::wxStyledTextCtrl(), CursorType::integer().
setSTCCursor(#wx_ref{type=ThisT,ref=ThisRef},CursorType)
when is_integer(CursorType) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSTCCursor,
<<ThisRef:32/?UI,CursorType:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetstccursor">external documentation</a>.
+-spec getSTCCursor(This) -> integer() when
+ This::wxStyledTextCtrl().
getSTCCursor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSTCCursor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Symbol::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcontrolcharsymbol">external documentation</a>.
+-spec setControlCharSymbol(This, Symbol) -> ok when
+ This::wxStyledTextCtrl(), Symbol::integer().
setControlCharSymbol(#wx_ref{type=ThisT,ref=ThisRef},Symbol)
when is_integer(Symbol) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetControlCharSymbol,
<<ThisRef:32/?UI,Symbol:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcontrolcharsymbol">external documentation</a>.
+-spec getControlCharSymbol(This) -> integer() when
+ This::wxStyledTextCtrl().
getControlCharSymbol(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetControlCharSymbol,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordpartleft">external documentation</a>.
+-spec wordPartLeft(This) -> ok when
+ This::wxStyledTextCtrl().
wordPartLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordPartLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordpartleftextend">external documentation</a>.
+-spec wordPartLeftExtend(This) -> ok when
+ This::wxStyledTextCtrl().
wordPartLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordPartLeftExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordpartright">external documentation</a>.
+-spec wordPartRight(This) -> ok when
+ This::wxStyledTextCtrl().
wordPartRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordPartRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordpartrightextend">external documentation</a>.
+-spec wordPartRightExtend(This) -> ok when
+ This::wxStyledTextCtrl().
wordPartRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordPartRightExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), VisiblePolicy::integer(), VisibleSlop::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetvisiblepolicy">external documentation</a>.
+-spec setVisiblePolicy(This, VisiblePolicy, VisibleSlop) -> ok when
+ This::wxStyledTextCtrl(), VisiblePolicy::integer(), VisibleSlop::integer().
setVisiblePolicy(#wx_ref{type=ThisT,ref=ThisRef},VisiblePolicy,VisibleSlop)
when is_integer(VisiblePolicy),is_integer(VisibleSlop) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetVisiblePolicy,
<<ThisRef:32/?UI,VisiblePolicy:32/?UI,VisibleSlop:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldellineleft">external documentation</a>.
+-spec delLineLeft(This) -> ok when
+ This::wxStyledTextCtrl().
delLineLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DelLineLeft,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldellineright">external documentation</a>.
+-spec delLineRight(This) -> ok when
+ This::wxStyledTextCtrl().
delLineRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_DelLineRight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetxoffset">external documentation</a>.
+-spec getXOffset(This) -> integer() when
+ This::wxStyledTextCtrl().
getXOffset(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetXOffset,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlchoosecaretx">external documentation</a>.
+-spec chooseCaretX(This) -> ok when
+ This::wxStyledTextCtrl().
chooseCaretX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ChooseCaretX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), CaretPolicy::integer(), CaretSlop::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetxcaretpolicy">external documentation</a>.
+-spec setXCaretPolicy(This, CaretPolicy, CaretSlop) -> ok when
+ This::wxStyledTextCtrl(), CaretPolicy::integer(), CaretSlop::integer().
setXCaretPolicy(#wx_ref{type=ThisT,ref=ThisRef},CaretPolicy,CaretSlop)
when is_integer(CaretPolicy),is_integer(CaretSlop) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetXCaretPolicy,
<<ThisRef:32/?UI,CaretPolicy:32/?UI,CaretSlop:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), CaretPolicy::integer(), CaretSlop::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetycaretpolicy">external documentation</a>.
+-spec setYCaretPolicy(This, CaretPolicy, CaretSlop) -> ok when
+ This::wxStyledTextCtrl(), CaretPolicy::integer(), CaretSlop::integer().
setYCaretPolicy(#wx_ref{type=ThisT,ref=ThisRef},CaretPolicy,CaretSlop)
when is_integer(CaretPolicy),is_integer(CaretSlop) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetYCaretPolicy,
<<ThisRef:32/?UI,CaretPolicy:32/?UI,CaretSlop:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetprintwrapmode">external documentation</a>.
+-spec getPrintWrapMode(This) -> integer() when
+ This::wxStyledTextCtrl().
getPrintWrapMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetPrintWrapMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), UseSetting::bool(), Fore::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsethotspotactiveforeground">external documentation</a>.
+-spec setHotspotActiveForeground(This, UseSetting, Fore) -> ok when
+ This::wxStyledTextCtrl(), UseSetting::boolean(), Fore::wx:wx_colour().
setHotspotActiveForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
when is_boolean(UseSetting),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetHotspotActiveForeground,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), UseSetting::bool(), Back::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsethotspotactivebackground">external documentation</a>.
+-spec setHotspotActiveBackground(This, UseSetting, Back) -> ok when
+ This::wxStyledTextCtrl(), UseSetting::boolean(), Back::wx:wx_colour().
setHotspotActiveBackground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
when is_boolean(UseSetting),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetHotspotActiveBackground,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Underline::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsethotspotactiveunderline">external documentation</a>.
+-spec setHotspotActiveUnderline(This, Underline) -> ok when
+ This::wxStyledTextCtrl(), Underline::boolean().
setHotspotActiveUnderline(#wx_ref{type=ThisT,ref=ThisRef},Underline)
when is_boolean(Underline) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetHotspotActiveUnderline,
<<ThisRef:32/?UI,(wxe_util:from_bool(Underline)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), SingleLine::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsethotspotsingleline">external documentation</a>.
+-spec setHotspotSingleLine(This, SingleLine) -> ok when
+ This::wxStyledTextCtrl(), SingleLine::boolean().
setHotspotSingleLine(#wx_ref{type=ThisT,ref=ThisRef},SingleLine)
when is_boolean(SingleLine) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetHotspotSingleLine,
<<ThisRef:32/?UI,(wxe_util:from_bool(SingleLine)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlparadownextend">external documentation</a>.
+-spec paraDownExtend(This) -> ok when
+ This::wxStyledTextCtrl().
paraDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ParaDownExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlparaup">external documentation</a>.
+-spec paraUp(This) -> ok when
+ This::wxStyledTextCtrl().
paraUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ParaUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlparaupextend">external documentation</a>.
+-spec paraUpExtend(This) -> ok when
+ This::wxStyledTextCtrl().
paraUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ParaUpExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpositionbefore">external documentation</a>.
+-spec positionBefore(This, Pos) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer().
positionBefore(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_PositionBefore,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpositionafter">external documentation</a>.
+-spec positionAfter(This, Pos) -> integer() when
+ This::wxStyledTextCtrl(), Pos::integer().
positionAfter(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_PositionAfter,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Start::integer(), End::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcopyrange">external documentation</a>.
+-spec copyRange(This, Start, End) -> ok when
+ This::wxStyledTextCtrl(), Start::integer(), End::integer().
copyRange(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
when is_integer(Start),is_integer(End) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CopyRange,
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Length::integer(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcopytext">external documentation</a>.
+-spec copyText(This, Length, Text) -> ok when
+ This::wxStyledTextCtrl(), Length::integer(), Text::unicode:chardata().
copyText(#wx_ref{type=ThisT,ref=ThisRef},Length,Text)
when is_integer(Length),is_list(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3024,142 +3419,162 @@ copyText(#wx_ref{type=ThisT,ref=ThisRef},Length,Text)
wxe_util:cast(?wxStyledTextCtrl_CopyText,
<<ThisRef:32/?UI,Length:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Mode::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselectionmode">external documentation</a>.
+-spec setSelectionMode(This, Mode) -> ok when
+ This::wxStyledTextCtrl(), Mode::integer().
setSelectionMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetSelectionMode,
<<ThisRef:32/?UI,Mode:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetselectionmode">external documentation</a>.
+-spec getSelectionMode(This) -> integer() when
+ This::wxStyledTextCtrl().
getSelectionMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSelectionMode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllinedownrectextend">external documentation</a>.
+-spec lineDownRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
lineDownRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineDownRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineuprectextend">external documentation</a>.
+-spec lineUpRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
lineUpRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineUpRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcharleftrectextend">external documentation</a>.
+-spec charLeftRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
charLeftRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CharLeftRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcharrightrectextend">external documentation</a>.
+-spec charRightRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
charRightRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CharRightRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlhomerectextend">external documentation</a>.
+-spec homeRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
homeRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_HomeRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlvchomerectextend">external documentation</a>.
+-spec vCHomeRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
vCHomeRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_VCHomeRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrllineendrectextend">external documentation</a>.
+-spec lineEndRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
lineEndRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_LineEndRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpageuprectextend">external documentation</a>.
+-spec pageUpRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
pageUpRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_PageUpRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpagedownrectextend">external documentation</a>.
+-spec pageDownRectExtend(This) -> ok when
+ This::wxStyledTextCtrl().
pageDownRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_PageDownRectExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstutteredpageup">external documentation</a>.
+-spec stutteredPageUp(This) -> ok when
+ This::wxStyledTextCtrl().
stutteredPageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StutteredPageUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstutteredpageupextend">external documentation</a>.
+-spec stutteredPageUpExtend(This) -> ok when
+ This::wxStyledTextCtrl().
stutteredPageUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StutteredPageUpExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstutteredpagedown">external documentation</a>.
+-spec stutteredPageDown(This) -> ok when
+ This::wxStyledTextCtrl().
stutteredPageDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StutteredPageDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstutteredpagedownextend">external documentation</a>.
+-spec stutteredPageDownExtend(This) -> ok when
+ This::wxStyledTextCtrl().
stutteredPageDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StutteredPageDownExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordleftend">external documentation</a>.
+-spec wordLeftEnd(This) -> ok when
+ This::wxStyledTextCtrl().
wordLeftEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordLeftEnd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordleftendextend">external documentation</a>.
+-spec wordLeftEndExtend(This) -> ok when
+ This::wxStyledTextCtrl().
wordLeftEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordLeftEndExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordrightend">external documentation</a>.
+-spec wordRightEnd(This) -> ok when
+ This::wxStyledTextCtrl().
wordRightEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordRightEnd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlwordrightendextend">external documentation</a>.
+-spec wordRightEndExtend(This) -> ok when
+ This::wxStyledTextCtrl().
wordRightEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_WordRightEndExtend,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Characters::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwhitespacechars">external documentation</a>.
+-spec setWhitespaceChars(This, Characters) -> ok when
+ This::wxStyledTextCtrl(), Characters::unicode:chardata().
setWhitespaceChars(#wx_ref{type=ThisT,ref=ThisRef},Characters)
when is_list(Characters) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3167,134 +3582,152 @@ setWhitespaceChars(#wx_ref{type=ThisT,ref=ThisRef},Characters)
wxe_util:cast(?wxStyledTextCtrl_SetWhitespaceChars,
<<ThisRef:32/?UI,(byte_size(Characters_UC)):32/?UI,(Characters_UC)/binary, 0:(((8- ((0+byte_size(Characters_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcharsdefault">external documentation</a>.
+-spec setCharsDefault(This) -> ok when
+ This::wxStyledTextCtrl().
setCharsDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCharsDefault,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompgetcurrent">external documentation</a>.
+-spec autoCompGetCurrent(This) -> integer() when
+ This::wxStyledTextCtrl().
autoCompGetCurrent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_AutoCompGetCurrent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Bytes::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlallocate">external documentation</a>.
+-spec allocate(This, Bytes) -> ok when
+ This::wxStyledTextCtrl(), Bytes::integer().
allocate(#wx_ref{type=ThisT,ref=ThisRef},Bytes)
when is_integer(Bytes) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Allocate,
<<ThisRef:32/?UI,Bytes:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer(), Column::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlfindcolumn">external documentation</a>.
+-spec findColumn(This, Line, Column) -> integer() when
+ This::wxStyledTextCtrl(), Line::integer(), Column::integer().
findColumn(#wx_ref{type=ThisT,ref=ThisRef},Line,Column)
when is_integer(Line),is_integer(Column) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_FindColumn,
<<ThisRef:32/?UI,Line:32/?UI,Column:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcaretsticky">external documentation</a>.
+-spec getCaretSticky(This) -> boolean() when
+ This::wxStyledTextCtrl().
getCaretSticky(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCaretSticky,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), UseCaretStickyBehaviour::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretsticky">external documentation</a>.
+-spec setCaretSticky(This, UseCaretStickyBehaviour) -> ok when
+ This::wxStyledTextCtrl(), UseCaretStickyBehaviour::boolean().
setCaretSticky(#wx_ref{type=ThisT,ref=ThisRef},UseCaretStickyBehaviour)
when is_boolean(UseCaretStickyBehaviour) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCaretSticky,
<<ThisRef:32/?UI,(wxe_util:from_bool(UseCaretStickyBehaviour)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrltogglecaretsticky">external documentation</a>.
+-spec toggleCaretSticky(This) -> ok when
+ This::wxStyledTextCtrl().
toggleCaretSticky(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ToggleCaretSticky,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Convert::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetpasteconvertendings">external documentation</a>.
+-spec setPasteConvertEndings(This, Convert) -> ok when
+ This::wxStyledTextCtrl(), Convert::boolean().
setPasteConvertEndings(#wx_ref{type=ThisT,ref=ThisRef},Convert)
when is_boolean(Convert) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetPasteConvertEndings,
<<ThisRef:32/?UI,(wxe_util:from_bool(Convert)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetpasteconvertendings">external documentation</a>.
+-spec getPasteConvertEndings(This) -> boolean() when
+ This::wxStyledTextCtrl().
getPasteConvertEndings(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetPasteConvertEndings,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlselectionduplicate">external documentation</a>.
+-spec selectionDuplicate(This) -> ok when
+ This::wxStyledTextCtrl().
selectionDuplicate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SelectionDuplicate,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Alpha::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretlinebackalpha">external documentation</a>.
+-spec setCaretLineBackAlpha(This, Alpha) -> ok when
+ This::wxStyledTextCtrl(), Alpha::integer().
setCaretLineBackAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha)
when is_integer(Alpha) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetCaretLineBackAlpha,
<<ThisRef:32/?UI,Alpha:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcaretlinebackalpha">external documentation</a>.
+-spec getCaretLineBackAlpha(This) -> integer() when
+ This::wxStyledTextCtrl().
getCaretLineBackAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCaretLineBackAlpha,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstartrecord">external documentation</a>.
+-spec startRecord(This) -> ok when
+ This::wxStyledTextCtrl().
startRecord(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StartRecord,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstoprecord">external documentation</a>.
+-spec stopRecord(This) -> ok when
+ This::wxStyledTextCtrl().
stopRecord(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StopRecord,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Lexer::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlexer">external documentation</a>.
+-spec setLexer(This, Lexer) -> ok when
+ This::wxStyledTextCtrl(), Lexer::integer().
setLexer(#wx_ref{type=ThisT,ref=ThisRef},Lexer)
when is_integer(Lexer) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetLexer,
<<ThisRef:32/?UI,Lexer:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlexer">external documentation</a>.
+-spec getLexer(This) -> integer() when
+ This::wxStyledTextCtrl().
getLexer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLexer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Start::integer(), End::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcolourise">external documentation</a>.
+-spec colourise(This, Start, End) -> ok when
+ This::wxStyledTextCtrl(), Start::integer(), End::integer().
colourise(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
when is_integer(Start),is_integer(End) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_Colourise,
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Key::string(), Value::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetproperty">external documentation</a>.
+-spec setProperty(This, Key, Value) -> ok when
+ This::wxStyledTextCtrl(), Key::unicode:chardata(), Value::unicode:chardata().
setProperty(#wx_ref{type=ThisT,ref=ThisRef},Key,Value)
when is_list(Key),is_list(Value) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3303,8 +3736,9 @@ setProperty(#wx_ref{type=ThisT,ref=ThisRef},Key,Value)
wxe_util:cast(?wxStyledTextCtrl_SetProperty,
<<ThisRef:32/?UI,(byte_size(Key_UC)):32/?UI,(Key_UC)/binary, 0:(((8- ((0+byte_size(Key_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((4+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), KeywordSet::integer(), KeyWords::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetkeywords">external documentation</a>.
+-spec setKeyWords(This, KeywordSet, KeyWords) -> ok when
+ This::wxStyledTextCtrl(), KeywordSet::integer(), KeyWords::unicode:chardata().
setKeyWords(#wx_ref{type=ThisT,ref=ThisRef},KeywordSet,KeyWords)
when is_integer(KeywordSet),is_list(KeyWords) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3312,8 +3746,9 @@ setKeyWords(#wx_ref{type=ThisT,ref=ThisRef},KeywordSet,KeyWords)
wxe_util:cast(?wxStyledTextCtrl_SetKeyWords,
<<ThisRef:32/?UI,KeywordSet:32/?UI,(byte_size(KeyWords_UC)):32/?UI,(KeyWords_UC)/binary, 0:(((8- ((4+byte_size(KeyWords_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Language::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlexerlanguage">external documentation</a>.
+-spec setLexerLanguage(This, Language) -> ok when
+ This::wxStyledTextCtrl(), Language::unicode:chardata().
setLexerLanguage(#wx_ref{type=ThisT,ref=ThisRef},Language)
when is_list(Language) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3321,8 +3756,9 @@ setLexerLanguage(#wx_ref{type=ThisT,ref=ThisRef},Language)
wxe_util:cast(?wxStyledTextCtrl_SetLexerLanguage,
<<ThisRef:32/?UI,(byte_size(Language_UC)):32/?UI,(Language_UC)/binary, 0:(((8- ((0+byte_size(Language_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Key::string()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetproperty">external documentation</a>.
+-spec getProperty(This, Key) -> unicode:charlist() when
+ This::wxStyledTextCtrl(), Key::unicode:chardata().
getProperty(#wx_ref{type=ThisT,ref=ThisRef},Key)
when is_list(Key) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3330,22 +3766,25 @@ getProperty(#wx_ref{type=ThisT,ref=ThisRef},Key)
wxe_util:call(?wxStyledTextCtrl_GetProperty,
<<ThisRef:32/?UI,(byte_size(Key_UC)):32/?UI,(Key_UC)/binary, 0:(((8- ((0+byte_size(Key_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetstylebitsneeded">external documentation</a>.
+-spec getStyleBitsNeeded(This) -> integer() when
+ This::wxStyledTextCtrl().
getStyleBitsNeeded(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetStyleBitsNeeded,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcurrentline">external documentation</a>.
+-spec getCurrentLine(This) -> integer() when
+ This::wxStyledTextCtrl().
getCurrentLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCurrentLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), StyleNum::integer(), Spec::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetspec">external documentation</a>.
+-spec styleSetSpec(This, StyleNum, Spec) -> ok when
+ This::wxStyledTextCtrl(), StyleNum::integer(), Spec::unicode:chardata().
styleSetSpec(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,Spec)
when is_integer(StyleNum),is_list(Spec) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3353,8 +3792,9 @@ styleSetSpec(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,Spec)
wxe_util:cast(?wxStyledTextCtrl_StyleSetSpec,
<<ThisRef:32/?UI,StyleNum:32/?UI,(byte_size(Spec_UC)):32/?UI,(Spec_UC)/binary, 0:(((8- ((4+byte_size(Spec_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), StyleNum::integer(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetfont">external documentation</a>.
+-spec styleSetFont(This, StyleNum, Font) -> ok when
+ This::wxStyledTextCtrl(), StyleNum::integer(), Font::wxFont:wxFont().
styleSetFont(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,#wx_ref{type=FontT,ref=FontRef})
when is_integer(StyleNum) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3362,17 +3802,19 @@ styleSetFont(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,#wx_ref{type=FontT,ref=Fon
wxe_util:cast(?wxStyledTextCtrl_StyleSetFont,
<<ThisRef:32/?UI,StyleNum:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), StyleNum::integer(), Size::integer(), FaceName::string(), Bold::bool(), Italic::bool(), Underline::bool()) -> ok
%% @equiv styleSetFontAttr(This,StyleNum,Size,FaceName,Bold,Italic,Underline, [])
+-spec styleSetFontAttr(This, StyleNum, Size, FaceName, Bold, Italic, Underline) -> ok when
+ This::wxStyledTextCtrl(), StyleNum::integer(), Size::integer(), FaceName::unicode:chardata(), Bold::boolean(), Italic::boolean(), Underline::boolean().
+
styleSetFontAttr(This,StyleNum,Size,FaceName,Bold,Italic,Underline)
when is_record(This, wx_ref),is_integer(StyleNum),is_integer(Size),is_list(FaceName),is_boolean(Bold),is_boolean(Italic),is_boolean(Underline) ->
styleSetFontAttr(This,StyleNum,Size,FaceName,Bold,Italic,Underline, []).
-%% @spec (This::wxStyledTextCtrl(), StyleNum::integer(), Size::integer(), FaceName::string(), Bold::bool(), Italic::bool(), Underline::bool(), [Option]) -> ok
-%% Option = {encoding, WxFontEncoding}
-%% WxFontEncoding = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetfontattr">external documentation</a>.
-%%<br /> WxFontEncoding is one of ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+%%<br /> Encoding = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+-spec styleSetFontAttr(This, StyleNum, Size, FaceName, Bold, Italic, Underline, [Option]) -> ok when
+ This::wxStyledTextCtrl(), StyleNum::integer(), Size::integer(), FaceName::unicode:chardata(), Bold::boolean(), Italic::boolean(), Underline::boolean(),
+ Option :: {encoding, wx:wx_enum()}.
styleSetFontAttr(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,Size,FaceName,Bold,Italic,Underline, Options)
when is_integer(StyleNum),is_integer(Size),is_list(FaceName),is_boolean(Bold),is_boolean(Italic),is_boolean(Underline),is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3383,80 +3825,91 @@ styleSetFontAttr(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,Size,FaceName,Bold,Ita
wxe_util:cast(?wxStyledTextCtrl_StyleSetFontAttr,
<<ThisRef:32/?UI,StyleNum:32/?UI,Size:32/?UI,(byte_size(FaceName_UC)):32/?UI,(FaceName_UC)/binary, 0:(((8- ((0+byte_size(FaceName_UC)) band 16#7)) band 16#7))/unit:8,(wxe_util:from_bool(Bold)):32/?UI,(wxe_util:from_bool(Italic)):32/?UI,(wxe_util:from_bool(Underline)):32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), CharacterSet::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetcharacterset">external documentation</a>.
+-spec styleSetCharacterSet(This, Style, CharacterSet) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), CharacterSet::integer().
styleSetCharacterSet(#wx_ref{type=ThisT,ref=ThisRef},Style,CharacterSet)
when is_integer(Style),is_integer(CharacterSet) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetCharacterSet,
<<ThisRef:32/?UI,Style:32/?UI,CharacterSet:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Style::integer(), Encoding::WxFontEncoding) -> ok
-%% WxFontEncoding = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetfontencoding">external documentation</a>.
-%%<br /> WxFontEncoding is one of ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+%%<br /> Encoding = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+-spec styleSetFontEncoding(This, Style, Encoding) -> ok when
+ This::wxStyledTextCtrl(), Style::integer(), Encoding::wx:wx_enum().
styleSetFontEncoding(#wx_ref{type=ThisT,ref=ThisRef},Style,Encoding)
when is_integer(Style),is_integer(Encoding) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_StyleSetFontEncoding,
<<ThisRef:32/?UI,Style:32/?UI,Encoding:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Cmd::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlcmdkeyexecute">external documentation</a>.
+-spec cmdKeyExecute(This, Cmd) -> ok when
+ This::wxStyledTextCtrl(), Cmd::integer().
cmdKeyExecute(#wx_ref{type=ThisT,ref=ThisRef},Cmd)
when is_integer(Cmd) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_CmdKeyExecute,
<<ThisRef:32/?UI,Cmd:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Left::integer(), Right::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmargins">external documentation</a>.
+-spec setMargins(This, Left, Right) -> ok when
+ This::wxStyledTextCtrl(), Left::integer(), Right::integer().
setMargins(#wx_ref{type=ThisT,ref=ThisRef},Left,Right)
when is_integer(Left),is_integer(Right) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetMargins,
<<ThisRef:32/?UI,Left:32/?UI,Right:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> {StartPos::integer(), EndPos::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetselection">external documentation</a>.
+-spec getSelection(This) -> {StartPos::integer(), EndPos::integer()} when
+ This::wxStyledTextCtrl().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlpointfromposition">external documentation</a>.
+-spec pointFromPosition(This, Pos) -> {X::integer(), Y::integer()} when
+ This::wxStyledTextCtrl(), Pos::integer().
pointFromPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_PointFromPosition,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlscrolltoline">external documentation</a>.
+-spec scrollToLine(This, Line) -> ok when
+ This::wxStyledTextCtrl(), Line::integer().
scrollToLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ScrollToLine,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Column::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlscrolltocolumn">external documentation</a>.
+-spec scrollToColumn(This, Column) -> ok when
+ This::wxStyledTextCtrl(), Column::integer().
scrollToColumn(#wx_ref{type=ThisT,ref=ThisRef},Column)
when is_integer(Column) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_ScrollToColumn,
<<ThisRef:32/?UI,Column:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Msg::integer()) -> integer()
%% @equiv sendMsg(This,Msg, [])
+-spec sendMsg(This, Msg) -> integer() when
+ This::wxStyledTextCtrl(), Msg::integer().
+
sendMsg(This,Msg)
when is_record(This, wx_ref),is_integer(Msg) ->
sendMsg(This,Msg, []).
-%% @spec (This::wxStyledTextCtrl(), Msg::integer(), [Option]) -> integer()
-%% Option = {wp, integer()} | {lp, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsendmsg">external documentation</a>.
+-spec sendMsg(This, Msg, [Option]) -> integer() when
+ This::wxStyledTextCtrl(), Msg::integer(),
+ Option :: {wp, integer()}
+ | {lp, integer()}.
sendMsg(#wx_ref{type=ThisT,ref=ThisRef},Msg, Options)
when is_integer(Msg),is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3467,39 +3920,44 @@ sendMsg(#wx_ref{type=ThisT,ref=ThisRef},Msg, Options)
wxe_util:call(?wxStyledTextCtrl_SendMsg,
<<ThisRef:32/?UI,Msg:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxStyledTextCtrl(), Bar::wxScrollBar:wxScrollBar()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetvscrollbar">external documentation</a>.
+-spec setVScrollBar(This, Bar) -> ok when
+ This::wxStyledTextCtrl(), Bar::wxScrollBar:wxScrollBar().
setVScrollBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BarT,ref=BarRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
?CLASS(BarT,wxScrollBar),
wxe_util:cast(?wxStyledTextCtrl_SetVScrollBar,
<<ThisRef:32/?UI,BarRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Bar::wxScrollBar:wxScrollBar()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsethscrollbar">external documentation</a>.
+-spec setHScrollBar(This, Bar) -> ok when
+ This::wxStyledTextCtrl(), Bar::wxScrollBar:wxScrollBar().
setHScrollBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BarT,ref=BarRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
?CLASS(BarT,wxScrollBar),
wxe_util:cast(?wxStyledTextCtrl_SetHScrollBar,
<<ThisRef:32/?UI,BarRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlastkeydownprocessed">external documentation</a>.
+-spec getLastKeydownProcessed(This) -> boolean() when
+ This::wxStyledTextCtrl().
getLastKeydownProcessed(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLastKeydownProcessed,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Val::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlastkeydownprocessed">external documentation</a>.
+-spec setLastKeydownProcessed(This, Val) -> ok when
+ This::wxStyledTextCtrl(), Val::boolean().
setLastKeydownProcessed(#wx_ref{type=ThisT,ref=ThisRef},Val)
when is_boolean(Val) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:cast(?wxStyledTextCtrl_SetLastKeydownProcessed,
<<ThisRef:32/?UI,(wxe_util:from_bool(Val)):32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Filename::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsavefile">external documentation</a>.
+-spec saveFile(This, Filename) -> boolean() when
+ This::wxStyledTextCtrl(), Filename::unicode:chardata().
saveFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
when is_list(Filename) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3507,8 +3965,9 @@ saveFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
wxe_util:call(?wxStyledTextCtrl_SaveFile,
<<ThisRef:32/?UI,(byte_size(Filename_UC)):32/?UI,(Filename_UC)/binary, 0:(((8- ((0+byte_size(Filename_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), Filename::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlloadfile">external documentation</a>.
+-spec loadFile(This, Filename) -> boolean() when
+ This::wxStyledTextCtrl(), Filename::unicode:chardata().
loadFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
when is_list(Filename) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3516,20 +3975,20 @@ loadFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
wxe_util:call(?wxStyledTextCtrl_LoadFile,
<<ThisRef:32/?UI,(byte_size(Filename_UC)):32/?UI,(Filename_UC)/binary, 0:(((8- ((0+byte_size(Filename_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl(), X::integer(), Y::integer(), Def::WxDragResult) -> WxDragResult
-%% WxDragResult = integer()
-%% WxDragResult = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldodragover">external documentation</a>.
-%%<br /> WxDragResult is one of ?wxDragError | ?wxDragNone | ?wxDragCopy | ?wxDragMove | ?wxDragLink | ?wxDragCancel
-%%<br /> WxDragResult is one of ?wxDragError | ?wxDragNone | ?wxDragCopy | ?wxDragMove | ?wxDragLink | ?wxDragCancel
+%%<br /> Def = ?wxDragError | ?wxDragNone | ?wxDragCopy | ?wxDragMove | ?wxDragLink | ?wxDragCancel
+%%<br /> Res = ?wxDragError | ?wxDragNone | ?wxDragCopy | ?wxDragMove | ?wxDragLink | ?wxDragCancel
+-spec doDragOver(This, X, Y, Def) -> wx:wx_enum() when
+ This::wxStyledTextCtrl(), X::integer(), Y::integer(), Def::wx:wx_enum().
doDragOver(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Def)
when is_integer(X),is_integer(Y),is_integer(Def) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_DoDragOver,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,Def:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), X::integer(), Y::integer(), Data::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrldodroptext">external documentation</a>.
+-spec doDropText(This, X, Y, Data) -> boolean() when
+ This::wxStyledTextCtrl(), X::integer(), Y::integer(), Data::unicode:chardata().
doDropText(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Data)
when is_integer(X),is_integer(Y),is_list(Data) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3537,15 +3996,17 @@ doDropText(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Data)
wxe_util:call(?wxStyledTextCtrl_DoDropText,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,(byte_size(Data_UC)):32/?UI,(Data_UC)/binary, 0:(((8- ((0+byte_size(Data_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxStyledTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetuseantialiasing">external documentation</a>.
+-spec getUseAntiAliasing(This) -> boolean() when
+ This::wxStyledTextCtrl().
getUseAntiAliasing(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetUseAntiAliasing,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Text::binary()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrladdtextraw">external documentation</a>.
+-spec addTextRaw(This, Text) -> ok when
+ This::wxStyledTextCtrl(), Text::binary().
addTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_binary(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3553,8 +4014,9 @@ addTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxStyledTextCtrl_AddTextRaw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Pos::integer(), Text::binary()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlinserttextraw">external documentation</a>.
+-spec insertTextRaw(This, Pos, Text) -> ok when
+ This::wxStyledTextCtrl(), Pos::integer(), Text::binary().
insertTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Pos,Text)
when is_integer(Pos),is_binary(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3562,38 +4024,44 @@ insertTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Pos,Text)
wxe_util:cast(?wxStyledTextCtrl_InsertTextRaw,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> {binary(), LinePos::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetcurlineraw">external documentation</a>.
+-spec getCurLineRaw(This) -> Result when
+ Result ::{Res ::binary(), LinePos::integer()},
+ This::wxStyledTextCtrl().
getCurLineRaw(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetCurLineRaw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Line::integer()) -> binary()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetlineraw">external documentation</a>.
+-spec getLineRaw(This, Line) -> binary() when
+ This::wxStyledTextCtrl(), Line::integer().
getLineRaw(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetLineRaw,
<<ThisRef:32/?UI,Line:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> binary()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgetselectedtextraw">external documentation</a>.
+-spec getSelectedTextRaw(This) -> binary() when
+ This::wxStyledTextCtrl().
getSelectedTextRaw(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetSelectedTextRaw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), StartPos::integer(), EndPos::integer()) -> binary()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettextrangeraw">external documentation</a>.
+-spec getTextRangeRaw(This, StartPos, EndPos) -> binary() when
+ This::wxStyledTextCtrl(), StartPos::integer(), EndPos::integer().
getTextRangeRaw(#wx_ref{type=ThisT,ref=ThisRef},StartPos,EndPos)
when is_integer(StartPos),is_integer(EndPos) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTextRangeRaw,
<<ThisRef:32/?UI,StartPos:32/?UI,EndPos:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Text::binary()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlsettextraw">external documentation</a>.
+-spec setTextRaw(This, Text) -> ok when
+ This::wxStyledTextCtrl(), Text::binary().
setTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_binary(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3601,15 +4069,17 @@ setTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxStyledTextCtrl_SetTextRaw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> binary()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlgettextraw">external documentation</a>.
+-spec getTextRaw(This) -> binary() when
+ This::wxStyledTextCtrl().
getTextRaw(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
wxe_util:call(?wxStyledTextCtrl_GetTextRaw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl(), Text::binary()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextctrl.html#wxstyledtextctrlappendtextraw">external documentation</a>.
+-spec appendTextRaw(This, Text) -> ok when
+ This::wxStyledTextCtrl(), Text::binary().
appendTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_binary(Text) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3617,8 +4087,8 @@ appendTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxStyledTextCtrl_AppendTextRaw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxStyledTextCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStyledTextCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStyledTextEvent.erl b/lib/wx/src/gen/wxStyledTextEvent.erl
index 5d98ae585d..1c2c79fe5d 100644
--- a/lib/wx/src/gen/wxStyledTextEvent.erl
+++ b/lib/wx/src/gen/wxStyledTextEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -44,169 +44,193 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxStyledTextEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxStyledTextEvent()) -> integer()
+-type wxStyledTextEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetposition">external documentation</a>.
+-spec getPosition(This) -> integer() when
+ This::wxStyledTextEvent().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetkey">external documentation</a>.
+-spec getKey(This) -> integer() when
+ This::wxStyledTextEvent().
getKey(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetKey,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetmodifiers">external documentation</a>.
+-spec getModifiers(This) -> integer() when
+ This::wxStyledTextEvent().
getModifiers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetModifiers,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetmodificationtype">external documentation</a>.
+-spec getModificationType(This) -> integer() when
+ This::wxStyledTextEvent().
getModificationType(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetModificationType,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgettext">external documentation</a>.
+-spec getText(This) -> unicode:charlist() when
+ This::wxStyledTextEvent().
getText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetlength">external documentation</a>.
+-spec getLength(This) -> integer() when
+ This::wxStyledTextEvent().
getLength(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetLength,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetlinesadded">external documentation</a>.
+-spec getLinesAdded(This) -> integer() when
+ This::wxStyledTextEvent().
getLinesAdded(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetLinesAdded,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetline">external documentation</a>.
+-spec getLine(This) -> integer() when
+ This::wxStyledTextEvent().
getLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetfoldlevelnow">external documentation</a>.
+-spec getFoldLevelNow(This) -> integer() when
+ This::wxStyledTextEvent().
getFoldLevelNow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetFoldLevelNow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetfoldlevelprev">external documentation</a>.
+-spec getFoldLevelPrev(This) -> integer() when
+ This::wxStyledTextEvent().
getFoldLevelPrev(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetFoldLevelPrev,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetmargin">external documentation</a>.
+-spec getMargin(This) -> integer() when
+ This::wxStyledTextEvent().
getMargin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetMargin,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetmessage">external documentation</a>.
+-spec getMessage(This) -> integer() when
+ This::wxStyledTextEvent().
getMessage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetMessage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetwparam">external documentation</a>.
+-spec getWParam(This) -> integer() when
+ This::wxStyledTextEvent().
getWParam(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetWParam,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetlparam">external documentation</a>.
+-spec getLParam(This) -> integer() when
+ This::wxStyledTextEvent().
getLParam(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetLParam,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetlisttype">external documentation</a>.
+-spec getListType(This) -> integer() when
+ This::wxStyledTextEvent().
getListType(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetListType,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetx">external documentation</a>.
+-spec getX(This) -> integer() when
+ This::wxStyledTextEvent().
getX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetX,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgety">external documentation</a>.
+-spec getY(This) -> integer() when
+ This::wxStyledTextEvent().
getY(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetY,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetdragtext">external documentation</a>.
+-spec getDragText(This) -> unicode:charlist() when
+ This::wxStyledTextEvent().
getDragText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetDragText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetdragallowmove">external documentation</a>.
+-spec getDragAllowMove(This) -> boolean() when
+ This::wxStyledTextEvent().
getDragAllowMove(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetDragAllowMove,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> WxDragResult
-%% WxDragResult = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetdragresult">external documentation</a>.
-%%<br /> WxDragResult is one of ?wxDragError | ?wxDragNone | ?wxDragCopy | ?wxDragMove | ?wxDragLink | ?wxDragCancel
+%%<br /> Res = ?wxDragError | ?wxDragNone | ?wxDragCopy | ?wxDragMove | ?wxDragLink | ?wxDragCancel
+-spec getDragResult(This) -> wx:wx_enum() when
+ This::wxStyledTextEvent().
getDragResult(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetDragResult,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetshift">external documentation</a>.
+-spec getShift(This) -> boolean() when
+ This::wxStyledTextEvent().
getShift(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetShift,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetcontrol">external documentation</a>.
+-spec getControl(This) -> boolean() when
+ This::wxStyledTextEvent().
getControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxStyledTextEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxstyledtextevent.html#wxstyledtexteventgetalt">external documentation</a>.
+-spec getAlt(This) -> boolean() when
+ This::wxStyledTextEvent().
getAlt(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextEvent),
wxe_util:call(?wxStyledTextEvent_GetAlt,
diff --git a/lib/wx/src/gen/wxSysColourChangedEvent.erl b/lib/wx/src/gen/wxSysColourChangedEvent.erl
index 0d86edcf5b..94777748d2 100644
--- a/lib/wx/src/gen/wxSysColourChangedEvent.erl
+++ b/lib/wx/src/gen/wxSysColourChangedEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,10 +37,12 @@
-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+-export_type([wxSysColourChangedEvent/0]).
%% @hidden
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxSysColourChangedEvent() :: wx:wx_object().
%% From wxEvent
%% @hidden
stopPropagation(This) -> wxEvent:stopPropagation(This).
diff --git a/lib/wx/src/gen/wxSystemOptions.erl b/lib/wx/src/gen/wxSystemOptions.erl
index d5e504632b..757eb698a2 100644
--- a/lib/wx/src/gen/wxSystemOptions.erl
+++ b/lib/wx/src/gen/wxSystemOptions.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,50 +29,56 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxSystemOptions/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Name::string()) -> string()
+-type wxSystemOptions() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemoptions.html#wxsystemoptionsgetoption">external documentation</a>.
+-spec getOption(Name) -> unicode:charlist() when
+ Name::unicode:chardata().
getOption(Name)
when is_list(Name) ->
Name_UC = unicode:characters_to_binary([Name,0]),
wxe_util:call(?wxSystemOptions_GetOption,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (Name::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemoptions.html#wxsystemoptionsgetoptionint">external documentation</a>.
+-spec getOptionInt(Name) -> integer() when
+ Name::unicode:chardata().
getOptionInt(Name)
when is_list(Name) ->
Name_UC = unicode:characters_to_binary([Name,0]),
wxe_util:call(?wxSystemOptions_GetOptionInt,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (Name::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemoptions.html#wxsystemoptionshasoption">external documentation</a>.
+-spec hasOption(Name) -> boolean() when
+ Name::unicode:chardata().
hasOption(Name)
when is_list(Name) ->
Name_UC = unicode:characters_to_binary([Name,0]),
wxe_util:call(?wxSystemOptions_HasOption,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (Name::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemoptions.html#wxsystemoptionsisfalse">external documentation</a>.
+-spec isFalse(Name) -> boolean() when
+ Name::unicode:chardata().
isFalse(Name)
when is_list(Name) ->
Name_UC = unicode:characters_to_binary([Name,0]),
wxe_util:call(?wxSystemOptions_IsFalse,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (Name::string(),X::integer()|string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemoptions.html#wxsystemoptionssetoption">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setOption(Name::string(), Value::integer()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setOption(Name::string(), Value::string()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setOption(Name, Value) -> ok when<br />
+%% Name::unicode:chardata(), Value::unicode:chardata().<br />
+%%
+-spec setOption(Name, Value) -> ok when
+ Name::unicode:chardata(), Value::integer();
+ (Name, Value) -> ok when
+ Name::unicode:chardata(), Value::unicode:chardata().
setOption(Name,Value)
when is_list(Name),is_integer(Value) ->
Name_UC = unicode:characters_to_binary([Name,0]),
diff --git a/lib/wx/src/gen/wxSystemSettings.erl b/lib/wx/src/gen/wxSystemSettings.erl
index 3f7e0a1ad6..a3bae5c85f 100644
--- a/lib/wx/src/gen/wxSystemSettings.erl
+++ b/lib/wx/src/gen/wxSystemSettings.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,38 +29,42 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxSystemSettings/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Index::WxSystemColour) -> wx:colour()
-%% WxSystemColour = integer()
+-type wxSystemSettings() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemsettings.html#wxsystemsettingsgetcolour">external documentation</a>.
-%%<br /> WxSystemColour is one of ?wxSYS_COLOUR_SCROLLBAR | ?wxSYS_COLOUR_BACKGROUND | ?wxSYS_COLOUR_DESKTOP | ?wxSYS_COLOUR_ACTIVECAPTION | ?wxSYS_COLOUR_INACTIVECAPTION | ?wxSYS_COLOUR_MENU | ?wxSYS_COLOUR_WINDOW | ?wxSYS_COLOUR_WINDOWFRAME | ?wxSYS_COLOUR_MENUTEXT | ?wxSYS_COLOUR_WINDOWTEXT | ?wxSYS_COLOUR_CAPTIONTEXT | ?wxSYS_COLOUR_ACTIVEBORDER | ?wxSYS_COLOUR_INACTIVEBORDER | ?wxSYS_COLOUR_APPWORKSPACE | ?wxSYS_COLOUR_HIGHLIGHT | ?wxSYS_COLOUR_HIGHLIGHTTEXT | ?wxSYS_COLOUR_BTNFACE | ?wxSYS_COLOUR_3DFACE | ?wxSYS_COLOUR_BTNSHADOW | ?wxSYS_COLOUR_3DSHADOW | ?wxSYS_COLOUR_GRAYTEXT | ?wxSYS_COLOUR_BTNTEXT | ?wxSYS_COLOUR_INACTIVECAPTIONTEXT | ?wxSYS_COLOUR_BTNHIGHLIGHT | ?wxSYS_COLOUR_BTNHILIGHT | ?wxSYS_COLOUR_3DHIGHLIGHT | ?wxSYS_COLOUR_3DHILIGHT | ?wxSYS_COLOUR_3DDKSHADOW | ?wxSYS_COLOUR_3DLIGHT | ?wxSYS_COLOUR_INFOTEXT | ?wxSYS_COLOUR_INFOBK | ?wxSYS_COLOUR_LISTBOX | ?wxSYS_COLOUR_HOTLIGHT | ?wxSYS_COLOUR_GRADIENTACTIVECAPTION | ?wxSYS_COLOUR_GRADIENTINACTIVECAPTION | ?wxSYS_COLOUR_MENUHILIGHT | ?wxSYS_COLOUR_MENUBAR | ?wxSYS_COLOUR_LISTBOXTEXT | ?wxSYS_COLOUR_MAX
+%%<br /> Index = ?wxSYS_COLOUR_SCROLLBAR | ?wxSYS_COLOUR_BACKGROUND | ?wxSYS_COLOUR_DESKTOP | ?wxSYS_COLOUR_ACTIVECAPTION | ?wxSYS_COLOUR_INACTIVECAPTION | ?wxSYS_COLOUR_MENU | ?wxSYS_COLOUR_WINDOW | ?wxSYS_COLOUR_WINDOWFRAME | ?wxSYS_COLOUR_MENUTEXT | ?wxSYS_COLOUR_WINDOWTEXT | ?wxSYS_COLOUR_CAPTIONTEXT | ?wxSYS_COLOUR_ACTIVEBORDER | ?wxSYS_COLOUR_INACTIVEBORDER | ?wxSYS_COLOUR_APPWORKSPACE | ?wxSYS_COLOUR_HIGHLIGHT | ?wxSYS_COLOUR_HIGHLIGHTTEXT | ?wxSYS_COLOUR_BTNFACE | ?wxSYS_COLOUR_3DFACE | ?wxSYS_COLOUR_BTNSHADOW | ?wxSYS_COLOUR_3DSHADOW | ?wxSYS_COLOUR_GRAYTEXT | ?wxSYS_COLOUR_BTNTEXT | ?wxSYS_COLOUR_INACTIVECAPTIONTEXT | ?wxSYS_COLOUR_BTNHIGHLIGHT | ?wxSYS_COLOUR_BTNHILIGHT | ?wxSYS_COLOUR_3DHIGHLIGHT | ?wxSYS_COLOUR_3DHILIGHT | ?wxSYS_COLOUR_3DDKSHADOW | ?wxSYS_COLOUR_3DLIGHT | ?wxSYS_COLOUR_INFOTEXT | ?wxSYS_COLOUR_INFOBK | ?wxSYS_COLOUR_LISTBOX | ?wxSYS_COLOUR_HOTLIGHT | ?wxSYS_COLOUR_GRADIENTACTIVECAPTION | ?wxSYS_COLOUR_GRADIENTINACTIVECAPTION | ?wxSYS_COLOUR_MENUHILIGHT | ?wxSYS_COLOUR_MENUBAR | ?wxSYS_COLOUR_LISTBOXTEXT | ?wxSYS_COLOUR_MAX
+-spec getColour(Index) -> wx:wx_colour4() when
+ Index::wx:wx_enum().
getColour(Index)
when is_integer(Index) ->
wxe_util:call(?wxSystemSettings_GetColour,
<<Index:32/?UI>>).
-%% @spec (Index::WxSystemFont) -> wxFont:wxFont()
-%% WxSystemFont = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemsettings.html#wxsystemsettingsgetfont">external documentation</a>.
-%%<br /> WxSystemFont is one of ?wxSYS_OEM_FIXED_FONT | ?wxSYS_ANSI_FIXED_FONT | ?wxSYS_ANSI_VAR_FONT | ?wxSYS_SYSTEM_FONT | ?wxSYS_DEVICE_DEFAULT_FONT | ?wxSYS_DEFAULT_PALETTE | ?wxSYS_SYSTEM_FIXED_FONT | ?wxSYS_DEFAULT_GUI_FONT | ?wxSYS_ICONTITLE_FONT
+%%<br /> Index = ?wxSYS_OEM_FIXED_FONT | ?wxSYS_ANSI_FIXED_FONT | ?wxSYS_ANSI_VAR_FONT | ?wxSYS_SYSTEM_FONT | ?wxSYS_DEVICE_DEFAULT_FONT | ?wxSYS_DEFAULT_PALETTE | ?wxSYS_SYSTEM_FIXED_FONT | ?wxSYS_DEFAULT_GUI_FONT | ?wxSYS_ICONTITLE_FONT
+-spec getFont(Index) -> wxFont:wxFont() when
+ Index::wx:wx_enum().
getFont(Index)
when is_integer(Index) ->
wxe_util:call(?wxSystemSettings_GetFont,
<<Index:32/?UI>>).
-%% @spec (Index::WxSystemMetric) -> integer()
%% @equiv getMetric(Index, [])
+-spec getMetric(Index) -> integer() when
+ Index::wx:wx_enum().
+
getMetric(Index)
when is_integer(Index) ->
getMetric(Index, []).
-%% @spec (Index::WxSystemMetric, [Option]) -> integer()
-%% Option = {win, wxWindow:wxWindow()}
-%% WxSystemMetric = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemsettings.html#wxsystemsettingsgetmetric">external documentation</a>.
-%%<br /> WxSystemMetric is one of ?wxSYS_MOUSE_BUTTONS | ?wxSYS_BORDER_X | ?wxSYS_BORDER_Y | ?wxSYS_CURSOR_X | ?wxSYS_CURSOR_Y | ?wxSYS_DCLICK_X | ?wxSYS_DCLICK_Y | ?wxSYS_DRAG_X | ?wxSYS_DRAG_Y | ?wxSYS_EDGE_X | ?wxSYS_EDGE_Y | ?wxSYS_HSCROLL_ARROW_X | ?wxSYS_HSCROLL_ARROW_Y | ?wxSYS_HTHUMB_X | ?wxSYS_ICON_X | ?wxSYS_ICON_Y | ?wxSYS_ICONSPACING_X | ?wxSYS_ICONSPACING_Y | ?wxSYS_WINDOWMIN_X | ?wxSYS_WINDOWMIN_Y | ?wxSYS_SCREEN_X | ?wxSYS_SCREEN_Y | ?wxSYS_FRAMESIZE_X | ?wxSYS_FRAMESIZE_Y | ?wxSYS_SMALLICON_X | ?wxSYS_SMALLICON_Y | ?wxSYS_HSCROLL_Y | ?wxSYS_VSCROLL_X | ?wxSYS_VSCROLL_ARROW_X | ?wxSYS_VSCROLL_ARROW_Y | ?wxSYS_VTHUMB_Y | ?wxSYS_CAPTION_Y | ?wxSYS_MENU_Y | ?wxSYS_NETWORK_PRESENT | ?wxSYS_PENWINDOWS_PRESENT | ?wxSYS_SHOW_SOUNDS | ?wxSYS_SWAP_BUTTONS
+%%<br /> Index = ?wxSYS_MOUSE_BUTTONS | ?wxSYS_BORDER_X | ?wxSYS_BORDER_Y | ?wxSYS_CURSOR_X | ?wxSYS_CURSOR_Y | ?wxSYS_DCLICK_X | ?wxSYS_DCLICK_Y | ?wxSYS_DRAG_X | ?wxSYS_DRAG_Y | ?wxSYS_EDGE_X | ?wxSYS_EDGE_Y | ?wxSYS_HSCROLL_ARROW_X | ?wxSYS_HSCROLL_ARROW_Y | ?wxSYS_HTHUMB_X | ?wxSYS_ICON_X | ?wxSYS_ICON_Y | ?wxSYS_ICONSPACING_X | ?wxSYS_ICONSPACING_Y | ?wxSYS_WINDOWMIN_X | ?wxSYS_WINDOWMIN_Y | ?wxSYS_SCREEN_X | ?wxSYS_SCREEN_Y | ?wxSYS_FRAMESIZE_X | ?wxSYS_FRAMESIZE_Y | ?wxSYS_SMALLICON_X | ?wxSYS_SMALLICON_Y | ?wxSYS_HSCROLL_Y | ?wxSYS_VSCROLL_X | ?wxSYS_VSCROLL_ARROW_X | ?wxSYS_VSCROLL_ARROW_Y | ?wxSYS_VTHUMB_Y | ?wxSYS_CAPTION_Y | ?wxSYS_MENU_Y | ?wxSYS_NETWORK_PRESENT | ?wxSYS_PENWINDOWS_PRESENT | ?wxSYS_SHOW_SOUNDS | ?wxSYS_SWAP_BUTTONS
+-spec getMetric(Index, [Option]) -> integer() when
+ Index::wx:wx_enum(),
+ Option :: {win, wxWindow:wxWindow()}.
getMetric(Index, Options)
when is_integer(Index),is_list(Options) ->
MOpts = fun({win, #wx_ref{type=WinT,ref=WinRef}}, Acc) -> ?CLASS(WinT,wxWindow),[<<1:32/?UI,WinRef:32/?UI>>|Acc];
@@ -69,10 +73,9 @@ getMetric(Index, Options)
wxe_util:call(?wxSystemSettings_GetMetric,
<<Index:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec () -> WxSystemScreenType
-%% WxSystemScreenType = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxsystemsettings.html#wxsystemsettingsgetscreentype">external documentation</a>.
-%%<br /> WxSystemScreenType is one of ?wxSYS_SCREEN_NONE | ?wxSYS_SCREEN_TINY | ?wxSYS_SCREEN_PDA | ?wxSYS_SCREEN_SMALL | ?wxSYS_SCREEN_DESKTOP
+%%<br /> Res = ?wxSYS_SCREEN_NONE | ?wxSYS_SCREEN_TINY | ?wxSYS_SCREEN_PDA | ?wxSYS_SCREEN_SMALL | ?wxSYS_SCREEN_DESKTOP
+-spec getScreenType() -> wx:wx_enum().
getScreenType() ->
wxe_util:call(?wxSystemSettings_GetScreenType,
<<>>).
diff --git a/lib/wx/src/gen/wxTaskBarIcon.erl b/lib/wx/src/gen/wxTaskBarIcon.erl
new file mode 100644
index 0000000000..5ca2c91b16
--- /dev/null
+++ b/lib/wx/src/gen/wxTaskBarIcon.erl
@@ -0,0 +1,102 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html">wxTaskBarIcon</a>.
+%% <p>This class is derived (and can use functions) from:
+%% <br />{@link wxEvtHandler}
+%% </p>
+%% @type wxTaskBarIcon(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxTaskBarIcon).
+-include("wxe.hrl").
+-export([destroy/1,new/0,popupMenu/2,removeIcon/1,setIcon/2,setIcon/3]).
+
+%% inherited exports
+-export([connect/2,connect/3,disconnect/1,disconnect/2,disconnect/3,parent_class/1]).
+
+-export_type([wxTaskBarIcon/0]).
+%% @hidden
+parent_class(wxEvtHandler) -> true;
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxTaskBarIcon() :: wx:wx_object().
+%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html#wxtaskbariconwxtaskbaricon">external documentation</a>.
+-spec new() -> wxTaskBarIcon().
+new() ->
+ wxe_util:construct(?wxTaskBarIcon_new,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html#wxtaskbariconpopupmenu">external documentation</a>.
+-spec popupMenu(This, Menu) -> boolean() when
+ This::wxTaskBarIcon(), Menu::wxMenu:wxMenu().
+popupMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}) ->
+ ?CLASS(ThisT,wxTaskBarIcon),
+ ?CLASS(MenuT,wxMenu),
+ wxe_util:call(?wxTaskBarIcon_PopupMenu,
+ <<ThisRef:32/?UI,MenuRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html#wxtaskbariconremoveicon">external documentation</a>.
+-spec removeIcon(This) -> boolean() when
+ This::wxTaskBarIcon().
+removeIcon(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxTaskBarIcon),
+ wxe_util:call(?wxTaskBarIcon_RemoveIcon,
+ <<ThisRef:32/?UI>>).
+
+%% @equiv setIcon(This,Icon, [])
+-spec setIcon(This, Icon) -> boolean() when
+ This::wxTaskBarIcon(), Icon::wxIcon:wxIcon().
+
+setIcon(This,Icon)
+ when is_record(This, wx_ref),is_record(Icon, wx_ref) ->
+ setIcon(This,Icon, []).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html#wxtaskbariconseticon">external documentation</a>.
+-spec setIcon(This, Icon, [Option]) -> boolean() when
+ This::wxTaskBarIcon(), Icon::wxIcon:wxIcon(),
+ Option :: {tooltip, unicode:chardata()}.
+setIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}, Options)
+ when is_list(Options) ->
+ ?CLASS(ThisT,wxTaskBarIcon),
+ ?CLASS(IconT,wxIcon),
+ MOpts = fun({tooltip, Tooltip}, Acc) -> Tooltip_UC = unicode:characters_to_binary([Tooltip,0]),[<<1:32/?UI,(byte_size(Tooltip_UC)):32/?UI,(Tooltip_UC)/binary, 0:(((8- ((0+byte_size(Tooltip_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxTaskBarIcon_SetIcon,
+ <<ThisRef:32/?UI,IconRef:32/?UI, BinOpt/binary>>).
+
+%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxTaskBarIcon()) -> ok.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxTaskBarIcon),
+ wxe_util:destroy(?DESTROY_OBJECT,Obj),
+ ok.
+ %% From wxEvtHandler
+%% @hidden
+disconnect(This,EventType, Options) -> wxEvtHandler:disconnect(This,EventType, Options).
+%% @hidden
+disconnect(This,EventType) -> wxEvtHandler:disconnect(This,EventType).
+%% @hidden
+disconnect(This) -> wxEvtHandler:disconnect(This).
+%% @hidden
+connect(This,EventType, Options) -> wxEvtHandler:connect(This,EventType, Options).
+%% @hidden
+connect(This,EventType) -> wxEvtHandler:connect(This,EventType).
diff --git a/lib/wx/src/gen/wxTaskBarIconEvent.erl b/lib/wx/src/gen/wxTaskBarIconEvent.erl
new file mode 100644
index 0000000000..9f2af608c5
--- /dev/null
+++ b/lib/wx/src/gen/wxTaskBarIconEvent.erl
@@ -0,0 +1,64 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbariconevent.html">wxTaskBarIconEvent</a>.
+%% <dl><dt>Use {@link wxEvtHandler:connect/3.} with EventType:</dt>
+%% <dd><em>taskbar_move</em>, <em>taskbar_left_down</em>, <em>taskbar_left_up</em>, <em>taskbar_right_down</em>, <em>taskbar_right_up</em>, <em>taskbar_left_dclick</em>, <em>taskbar_right_dclick</em></dd></dl>
+%% See also the message variant {@link wxEvtHandler:wxTaskBarIcon(). #wxTaskBarIcon{}} event record type.
+%%
+%% <p>This class is derived (and can use functions) from:
+%% <br />{@link wxEvent}
+%% </p>
+%% @type wxTaskBarIconEvent(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxTaskBarIconEvent).
+-include("wxe.hrl").
+-export([]).
+
+%% inherited exports
+-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
+ resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+
+-export_type([wxTaskBarIconEvent/0]).
+%% @hidden
+parent_class(wxEvent) -> true;
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxTaskBarIconEvent() :: wx:wx_object().
+ %% From wxEvent
+%% @hidden
+stopPropagation(This) -> wxEvent:stopPropagation(This).
+%% @hidden
+skip(This, Options) -> wxEvent:skip(This, Options).
+%% @hidden
+skip(This) -> wxEvent:skip(This).
+%% @hidden
+shouldPropagate(This) -> wxEvent:shouldPropagate(This).
+%% @hidden
+resumePropagation(This,PropagationLevel) -> wxEvent:resumePropagation(This,PropagationLevel).
+%% @hidden
+isCommandEvent(This) -> wxEvent:isCommandEvent(This).
+%% @hidden
+getTimestamp(This) -> wxEvent:getTimestamp(This).
+%% @hidden
+getSkipped(This) -> wxEvent:getSkipped(This).
+%% @hidden
+getId(This) -> wxEvent:getId(This).
diff --git a/lib/wx/src/gen/wxTextAttr.erl b/lib/wx/src/gen/wxTextAttr.erl
index 056dc59161..16bb943359 100644
--- a/lib/wx/src/gen/wxTextAttr.erl
+++ b/lib/wx/src/gen/wxTextAttr.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,26 +34,32 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxTextAttr/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxTextAttr()
+-type wxTextAttr() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrwxtextattr">external documentation</a>.
+-spec new() -> wxTextAttr().
new() ->
wxe_util:construct(?wxTextAttr_new_0,
<<>>).
-%% @spec (ColText::wx:colour()) -> wxTextAttr()
%% @equiv new(ColText, [])
+-spec new(ColText) -> wxTextAttr() when
+ ColText::wx:wx_colour().
+
new(ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
new(ColText, []).
-%% @spec (ColText::wx:colour(), [Option]) -> wxTextAttr()
-%% Option = {colBack, wx:colour()} | {font, wxFont:wxFont()} | {alignment, WxTextAttrAlignment}
-%% WxTextAttrAlignment = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrwxtextattr">external documentation</a>.
-%%<br /> WxTextAttrAlignment is one of ?wxTEXT_ALIGNMENT_DEFAULT | ?wxTEXT_ALIGNMENT_LEFT | ?wxTEXT_ALIGNMENT_CENTRE | ?wxTEXT_ALIGNMENT_CENTER | ?wxTEXT_ALIGNMENT_RIGHT | ?wxTEXT_ALIGNMENT_JUSTIFIED
+%%<br /> Alignment = ?wxTEXT_ALIGNMENT_DEFAULT | ?wxTEXT_ALIGNMENT_LEFT | ?wxTEXT_ALIGNMENT_CENTRE | ?wxTEXT_ALIGNMENT_CENTER | ?wxTEXT_ALIGNMENT_RIGHT | ?wxTEXT_ALIGNMENT_JUSTIFIED
+-spec new(ColText, [Option]) -> wxTextAttr() when
+ ColText::wx:wx_colour(),
+ Option :: {colBack, wx:wx_colour()}
+ | {font, wxFont:wxFont()}
+ | {alignment, wx:wx_enum()}.
new(ColText, Options)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4,is_list(Options) ->
MOpts = fun({colBack, ColBack}, Acc) -> [<<1:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary,0:32>>|Acc];
@@ -64,134 +70,151 @@ new(ColText, Options)
wxe_util:construct(?wxTextAttr_new_2,
<<(wxe_util:colour_bin(ColText)):16/binary, BinOpt/binary>>).
-%% @spec (This::wxTextAttr()) -> WxTextAttrAlignment
-%% WxTextAttrAlignment = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgetalignment">external documentation</a>.
-%%<br /> WxTextAttrAlignment is one of ?wxTEXT_ALIGNMENT_DEFAULT | ?wxTEXT_ALIGNMENT_LEFT | ?wxTEXT_ALIGNMENT_CENTRE | ?wxTEXT_ALIGNMENT_CENTER | ?wxTEXT_ALIGNMENT_RIGHT | ?wxTEXT_ALIGNMENT_JUSTIFIED
+%%<br /> Res = ?wxTEXT_ALIGNMENT_DEFAULT | ?wxTEXT_ALIGNMENT_LEFT | ?wxTEXT_ALIGNMENT_CENTRE | ?wxTEXT_ALIGNMENT_CENTER | ?wxTEXT_ALIGNMENT_RIGHT | ?wxTEXT_ALIGNMENT_JUSTIFIED
+-spec getAlignment(This) -> wx:wx_enum() when
+ This::wxTextAttr().
getAlignment(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetAlignment,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgetbackgroundcolour">external documentation</a>.
+-spec getBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxTextAttr().
getBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgetfont">external documentation</a>.
+-spec getFont(This) -> wxFont:wxFont() when
+ This::wxTextAttr().
getFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgetleftindent">external documentation</a>.
+-spec getLeftIndent(This) -> integer() when
+ This::wxTextAttr().
getLeftIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetLeftIndent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgetleftsubindent">external documentation</a>.
+-spec getLeftSubIndent(This) -> integer() when
+ This::wxTextAttr().
getLeftSubIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetLeftSubIndent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgetrightindent">external documentation</a>.
+-spec getRightIndent(This) -> integer() when
+ This::wxTextAttr().
getRightIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetRightIndent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> [integer()]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgettabs">external documentation</a>.
+-spec getTabs(This) -> [integer()] when
+ This::wxTextAttr().
getTabs(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetTabs,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgettextcolour">external documentation</a>.
+-spec getTextColour(This) -> wx:wx_colour4() when
+ This::wxTextAttr().
getTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrhasbackgroundcolour">external documentation</a>.
+-spec hasBackgroundColour(This) -> boolean() when
+ This::wxTextAttr().
hasBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_HasBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrhasfont">external documentation</a>.
+-spec hasFont(This) -> boolean() when
+ This::wxTextAttr().
hasFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_HasFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrhastextcolour">external documentation</a>.
+-spec hasTextColour(This) -> boolean() when
+ This::wxTextAttr().
hasTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_HasTextColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrgetflags">external documentation</a>.
+-spec getFlags(This) -> integer() when
+ This::wxTextAttr().
getFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_GetFlags,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrisdefault">external documentation</a>.
+-spec isDefault(This) -> boolean() when
+ This::wxTextAttr().
isDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:call(?wxTextAttr_IsDefault,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextAttr(), Alignment::WxTextAttrAlignment) -> ok
-%% WxTextAttrAlignment = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrsetalignment">external documentation</a>.
-%%<br /> WxTextAttrAlignment is one of ?wxTEXT_ALIGNMENT_DEFAULT | ?wxTEXT_ALIGNMENT_LEFT | ?wxTEXT_ALIGNMENT_CENTRE | ?wxTEXT_ALIGNMENT_CENTER | ?wxTEXT_ALIGNMENT_RIGHT | ?wxTEXT_ALIGNMENT_JUSTIFIED
+%%<br /> Alignment = ?wxTEXT_ALIGNMENT_DEFAULT | ?wxTEXT_ALIGNMENT_LEFT | ?wxTEXT_ALIGNMENT_CENTRE | ?wxTEXT_ALIGNMENT_CENTER | ?wxTEXT_ALIGNMENT_RIGHT | ?wxTEXT_ALIGNMENT_JUSTIFIED
+-spec setAlignment(This, Alignment) -> ok when
+ This::wxTextAttr(), Alignment::wx:wx_enum().
setAlignment(#wx_ref{type=ThisT,ref=ThisRef},Alignment)
when is_integer(Alignment) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:cast(?wxTextAttr_SetAlignment,
<<ThisRef:32/?UI,Alignment:32/?UI>>).
-%% @spec (This::wxTextAttr(), ColBack::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrsetbackgroundcolour">external documentation</a>.
+-spec setBackgroundColour(This, ColBack) -> ok when
+ This::wxTextAttr(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
?CLASS(ThisT,wxTextAttr),
wxe_util:cast(?wxTextAttr_SetBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
-%% @spec (This::wxTextAttr(), Flags::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrsetflags">external documentation</a>.
+-spec setFlags(This, Flags) -> ok when
+ This::wxTextAttr(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:cast(?wxTextAttr_SetFlags,
<<ThisRef:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxTextAttr(), Font::wxFont:wxFont()) -> ok
%% @equiv setFont(This,Font, [])
+-spec setFont(This, Font) -> ok when
+ This::wxTextAttr(), Font::wxFont:wxFont().
+
setFont(This,Font)
when is_record(This, wx_ref),is_record(Font, wx_ref) ->
setFont(This,Font, []).
-%% @spec (This::wxTextAttr(), Font::wxFont:wxFont(), [Option]) -> ok
-%% Option = {flags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrsetfont">external documentation</a>.
+-spec setFont(This, Font, [Option]) -> ok when
+ This::wxTextAttr(), Font::wxFont:wxFont(),
+ Option :: {flags, integer()}.
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTextAttr),
@@ -202,15 +225,18 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options
wxe_util:cast(?wxTextAttr_SetFont,
<<ThisRef:32/?UI,FontRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTextAttr(), Indent::integer()) -> ok
%% @equiv setLeftIndent(This,Indent, [])
+-spec setLeftIndent(This, Indent) -> ok when
+ This::wxTextAttr(), Indent::integer().
+
setLeftIndent(This,Indent)
when is_record(This, wx_ref),is_integer(Indent) ->
setLeftIndent(This,Indent, []).
-%% @spec (This::wxTextAttr(), Indent::integer(), [Option]) -> ok
-%% Option = {subIndent, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrsetleftindent">external documentation</a>.
+-spec setLeftIndent(This, Indent, [Option]) -> ok when
+ This::wxTextAttr(), Indent::integer(),
+ Option :: {subIndent, integer()}.
setLeftIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent, Options)
when is_integer(Indent),is_list(Options) ->
?CLASS(ThisT,wxTextAttr),
@@ -220,16 +246,18 @@ setLeftIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent, Options)
wxe_util:cast(?wxTextAttr_SetLeftIndent,
<<ThisRef:32/?UI,Indent:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTextAttr(), Indent::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrsetrightindent">external documentation</a>.
+-spec setRightIndent(This, Indent) -> ok when
+ This::wxTextAttr(), Indent::integer().
setRightIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent)
when is_integer(Indent) ->
?CLASS(ThisT,wxTextAttr),
wxe_util:cast(?wxTextAttr_SetRightIndent,
<<ThisRef:32/?UI,Indent:32/?UI>>).
-%% @spec (This::wxTextAttr(), Tabs::[integer()]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrsettabs">external documentation</a>.
+-spec setTabs(This, Tabs) -> ok when
+ This::wxTextAttr(), Tabs::[integer()].
setTabs(#wx_ref{type=ThisT,ref=ThisRef},Tabs)
when is_list(Tabs) ->
?CLASS(ThisT,wxTextAttr),
@@ -237,16 +265,17 @@ setTabs(#wx_ref{type=ThisT,ref=ThisRef},Tabs)
<<ThisRef:32/?UI,(length(Tabs)):32/?UI,
(<< <<C:32/?I>> || C <- Tabs>>)/binary, 0:(((0+length(Tabs)) rem 2)*32)>>).
-%% @spec (This::wxTextAttr(), ColText::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextattr.html#wxtextattrsettextcolour">external documentation</a>.
+-spec setTextColour(This, ColText) -> ok when
+ This::wxTextAttr(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
?CLASS(ThisT,wxTextAttr),
wxe_util:cast(?wxTextAttr_SetTextColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
-%% @spec (This::wxTextAttr()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxTextAttr()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTextAttr),
wxe_util:destroy(?wxTextAttr_destroy,Obj),
diff --git a/lib/wx/src/gen/wxTextCtrl.erl b/lib/wx/src/gen/wxTextCtrl.erl
index b32f45b83b..e1f82c40c3 100644
--- a/lib/wx/src/gen/wxTextCtrl.erl
+++ b/lib/wx/src/gen/wxTextCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,27 +77,36 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxTextCtrl/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxTextCtrl()
+-type wxTextCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlwxtextctrl">external documentation</a>.
+-spec new() -> wxTextCtrl().
new() ->
wxe_util:construct(?wxTextCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxTextCtrl()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxTextCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxTextCtrl()
-%% Option = {value, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlwxtextctrl">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxTextCtrl() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {value, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -111,8 +120,9 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxTextCtrl_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTextCtrl(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlappendtext">external documentation</a>.
+-spec appendText(This, Text) -> ok when
+ This::wxTextCtrl(), Text::unicode:chardata().
appendText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxTextCtrl),
@@ -120,64 +130,78 @@ appendText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxTextCtrl_AppendText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlcancopy">external documentation</a>.
+-spec canCopy(This) -> boolean() when
+ This::wxTextCtrl().
canCopy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_CanCopy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlcancut">external documentation</a>.
+-spec canCut(This) -> boolean() when
+ This::wxTextCtrl().
canCut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_CanCut,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlcanpaste">external documentation</a>.
+-spec canPaste(This) -> boolean() when
+ This::wxTextCtrl().
canPaste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_CanPaste,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlcanredo">external documentation</a>.
+-spec canRedo(This) -> boolean() when
+ This::wxTextCtrl().
canRedo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_CanRedo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlcanundo">external documentation</a>.
+-spec canUndo(This) -> boolean() when
+ This::wxTextCtrl().
canUndo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_CanUndo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlclear">external documentation</a>.
+-spec clear(This) -> ok when
+ This::wxTextCtrl().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_Clear,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlcopy">external documentation</a>.
+-spec copy(This) -> ok when
+ This::wxTextCtrl().
copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_Copy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxTextCtrl(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxTextCtrl(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {value, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxTextCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {value, unicode:chardata()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxTextCtrl),
@@ -192,96 +216,109 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxTextCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlcut">external documentation</a>.
+-spec cut(This) -> ok when
+ This::wxTextCtrl().
cut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_Cut,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrldiscardedits">external documentation</a>.
+-spec discardEdits(This) -> ok when
+ This::wxTextCtrl().
discardEdits(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_DiscardEdits,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Event::wxKeyEvent:wxKeyEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlemulatekeypress">external documentation</a>.
+-spec emulateKeyPress(This, Event) -> boolean() when
+ This::wxTextCtrl(), Event::wxKeyEvent:wxKeyEvent().
emulateKeyPress(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef}) ->
?CLASS(ThisT,wxTextCtrl),
?CLASS(EventT,wxKeyEvent),
wxe_util:call(?wxTextCtrl_EmulateKeyPress,
<<ThisRef:32/?UI,EventRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> wxTextAttr:wxTextAttr()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetdefaultstyle">external documentation</a>.
+-spec getDefaultStyle(This) -> wxTextAttr:wxTextAttr() when
+ This::wxTextCtrl().
getDefaultStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetDefaultStyle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetinsertionpoint">external documentation</a>.
+-spec getInsertionPoint(This) -> integer() when
+ This::wxTextCtrl().
getInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetInsertionPoint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetlastposition">external documentation</a>.
+-spec getLastPosition(This) -> integer() when
+ This::wxTextCtrl().
getLastPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetLastPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), LineNo::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetlinelength">external documentation</a>.
+-spec getLineLength(This, LineNo) -> integer() when
+ This::wxTextCtrl(), LineNo::integer().
getLineLength(#wx_ref{type=ThisT,ref=ThisRef},LineNo)
when is_integer(LineNo) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetLineLength,
<<ThisRef:32/?UI,LineNo:32/?UI>>).
-%% @spec (This::wxTextCtrl(), LineNo::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetlinetext">external documentation</a>.
+-spec getLineText(This, LineNo) -> unicode:charlist() when
+ This::wxTextCtrl(), LineNo::integer().
getLineText(#wx_ref{type=ThisT,ref=ThisRef},LineNo)
when is_integer(LineNo) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetLineText,
<<ThisRef:32/?UI,LineNo:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetnumberoflines">external documentation</a>.
+-spec getNumberOfLines(This) -> integer() when
+ This::wxTextCtrl().
getNumberOfLines(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetNumberOfLines,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), From::integer(), To::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetrange">external documentation</a>.
+-spec getRange(This, From, To) -> unicode:charlist() when
+ This::wxTextCtrl(), From::integer(), To::integer().
getRange(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetRange,
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> {From::integer(), To::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetselection">external documentation</a>.
+-spec getSelection(This) -> {From::integer(), To::integer()} when
+ This::wxTextCtrl().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetstringselection">external documentation</a>.
+-spec getStringSelection(This) -> unicode:charlist() when
+ This::wxTextCtrl().
getStringSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetStringSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Position::integer(), Style::wxTextAttr:wxTextAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetstyle">external documentation</a>.
+-spec getStyle(This, Position, Style) -> boolean() when
+ This::wxTextCtrl(), Position::integer(), Style::wxTextAttr:wxTextAttr().
getStyle(#wx_ref{type=ThisT,ref=ThisRef},Position,#wx_ref{type=StyleT,ref=StyleRef})
when is_integer(Position) ->
?CLASS(ThisT,wxTextCtrl),
@@ -289,50 +326,58 @@ getStyle(#wx_ref{type=ThisT,ref=ThisRef},Position,#wx_ref{type=StyleT,ref=StyleR
wxe_util:call(?wxTextCtrl_GetStyle,
<<ThisRef:32/?UI,Position:32/?UI,StyleRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlgetvalue">external documentation</a>.
+-spec getValue(This) -> unicode:charlist() when
+ This::wxTextCtrl().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrliseditable">external documentation</a>.
+-spec isEditable(This) -> boolean() when
+ This::wxTextCtrl().
isEditable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_IsEditable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlismodified">external documentation</a>.
+-spec isModified(This) -> boolean() when
+ This::wxTextCtrl().
isModified(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_IsModified,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlismultiline">external documentation</a>.
+-spec isMultiLine(This) -> boolean() when
+ This::wxTextCtrl().
isMultiLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_IsMultiLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlissingleline">external documentation</a>.
+-spec isSingleLine(This) -> boolean() when
+ This::wxTextCtrl().
isSingleLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_IsSingleLine,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), File::string()) -> bool()
%% @equiv loadFile(This,File, [])
+-spec loadFile(This, File) -> boolean() when
+ This::wxTextCtrl(), File::unicode:chardata().
+
loadFile(This,File)
when is_record(This, wx_ref),is_list(File) ->
loadFile(This,File, []).
-%% @spec (This::wxTextCtrl(), File::string(), [Option]) -> bool()
-%% Option = {fileType, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlloadfile">external documentation</a>.
+-spec loadFile(This, File, [Option]) -> boolean() when
+ This::wxTextCtrl(), File::unicode:chardata(),
+ Option :: {fileType, integer()}.
loadFile(#wx_ref{type=ThisT,ref=ThisRef},File, Options)
when is_list(File),is_list(Options) ->
?CLASS(ThisT,wxTextCtrl),
@@ -343,45 +388,52 @@ loadFile(#wx_ref{type=ThisT,ref=ThisRef},File, Options)
wxe_util:call(?wxTextCtrl_LoadFile,
<<ThisRef:32/?UI,(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((0+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlmarkdirty">external documentation</a>.
+-spec markDirty(This) -> ok when
+ This::wxTextCtrl().
markDirty(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_MarkDirty,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlpaste">external documentation</a>.
+-spec paste(This) -> ok when
+ This::wxTextCtrl().
paste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_Paste,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Pos::integer()) -> {bool(), X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlpositiontoxy">external documentation</a>.
+-spec positionToXY(This, Pos) -> Result when
+ Result ::{Res ::boolean(), X::integer(), Y::integer()},
+ This::wxTextCtrl(), Pos::integer().
positionToXY(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_PositionToXY,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlredo">external documentation</a>.
+-spec redo(This) -> ok when
+ This::wxTextCtrl().
redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_Redo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), From::integer(), To::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlremove">external documentation</a>.
+-spec remove(This, From, To) -> ok when
+ This::wxTextCtrl(), From::integer(), To::integer().
remove(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_Remove,
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
-%% @spec (This::wxTextCtrl(), From::integer(), To::integer(), Value::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlreplace">external documentation</a>.
+-spec replace(This, From, To, Value) -> ok when
+ This::wxTextCtrl(), From::integer(), To::integer(), Value::unicode:chardata().
replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value)
when is_integer(From),is_integer(To),is_list(Value) ->
?CLASS(ThisT,wxTextCtrl),
@@ -389,15 +441,19 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value)
wxe_util:cast(?wxTextCtrl_Replace,
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((0+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTextCtrl()) -> bool()
%% @equiv saveFile(This, [])
+-spec saveFile(This) -> boolean() when
+ This::wxTextCtrl().
+
saveFile(This)
when is_record(This, wx_ref) ->
saveFile(This, []).
-%% @spec (This::wxTextCtrl(), [Option]) -> bool()
-%% Option = {file, string()} | {fileType, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlsavefile">external documentation</a>.
+-spec saveFile(This, [Option]) -> boolean() when
+ This::wxTextCtrl(),
+ Option :: {file, unicode:chardata()}
+ | {fileType, integer()}.
saveFile(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTextCtrl),
@@ -408,55 +464,62 @@ saveFile(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxTextCtrl_SaveFile,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTextCtrl(), Style::wxTextAttr:wxTextAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlsetdefaultstyle">external documentation</a>.
+-spec setDefaultStyle(This, Style) -> boolean() when
+ This::wxTextCtrl(), Style::wxTextAttr:wxTextAttr().
setDefaultStyle(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StyleT,ref=StyleRef}) ->
?CLASS(ThisT,wxTextCtrl),
?CLASS(StyleT,wxTextAttr),
wxe_util:call(?wxTextCtrl_SetDefaultStyle,
<<ThisRef:32/?UI,StyleRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Editable::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlseteditable">external documentation</a>.
+-spec setEditable(This, Editable) -> ok when
+ This::wxTextCtrl(), Editable::boolean().
setEditable(#wx_ref{type=ThisT,ref=ThisRef},Editable)
when is_boolean(Editable) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_SetEditable,
<<ThisRef:32/?UI,(wxe_util:from_bool(Editable)):32/?UI>>).
-%% @spec (This::wxTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlsetinsertionpoint">external documentation</a>.
+-spec setInsertionPoint(This, Pos) -> ok when
+ This::wxTextCtrl(), Pos::integer().
setInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_SetInsertionPoint,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlsetinsertionpointend">external documentation</a>.
+-spec setInsertionPointEnd(This) -> ok when
+ This::wxTextCtrl().
setInsertionPointEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_SetInsertionPointEnd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Len::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlsetmaxlength">external documentation</a>.
+-spec setMaxLength(This, Len) -> ok when
+ This::wxTextCtrl(), Len::integer().
setMaxLength(#wx_ref{type=ThisT,ref=ThisRef},Len)
when is_integer(Len) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_SetMaxLength,
<<ThisRef:32/?UI,Len:32/?UI>>).
-%% @spec (This::wxTextCtrl(), From::integer(), To::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlsetselection">external documentation</a>.
+-spec setSelection(This, From, To) -> ok when
+ This::wxTextCtrl(), From::integer(), To::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_SetSelection,
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Start::integer(), End::integer(), Style::wxTextAttr:wxTextAttr()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlsetstyle">external documentation</a>.
+-spec setStyle(This, Start, End, Style) -> boolean() when
+ This::wxTextCtrl(), Start::integer(), End::integer(), Style::wxTextAttr:wxTextAttr().
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Start,End,#wx_ref{type=StyleT,ref=StyleRef})
when is_integer(Start),is_integer(End) ->
?CLASS(ThisT,wxTextCtrl),
@@ -464,8 +527,9 @@ setStyle(#wx_ref{type=ThisT,ref=ThisRef},Start,End,#wx_ref{type=StyleT,ref=Style
wxe_util:call(?wxTextCtrl_SetStyle,
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI,StyleRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Value::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlsetvalue">external documentation</a>.
+-spec setValue(This, Value) -> ok when
+ This::wxTextCtrl(), Value::unicode:chardata().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_list(Value) ->
?CLASS(ThisT,wxTextCtrl),
@@ -473,23 +537,26 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
wxe_util:cast(?wxTextCtrl_SetValue,
<<ThisRef:32/?UI,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((0+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTextCtrl(), Pos::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlshowposition">external documentation</a>.
+-spec showPosition(This, Pos) -> ok when
+ This::wxTextCtrl(), Pos::integer().
showPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_ShowPosition,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlundo">external documentation</a>.
+-spec undo(This) -> ok when
+ This::wxTextCtrl().
undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:cast(?wxTextCtrl_Undo,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextCtrl(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlwritetext">external documentation</a>.
+-spec writeText(This, Text) -> ok when
+ This::wxTextCtrl(), Text::unicode:chardata().
writeText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxTextCtrl),
@@ -497,16 +564,17 @@ writeText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxTextCtrl_WriteText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTextCtrl(), X::integer(), Y::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextctrl.html#wxtextctrlxytoposition">external documentation</a>.
+-spec xYToPosition(This, X, Y) -> integer() when
+ This::wxTextCtrl(), X::integer(), Y::integer().
xYToPosition(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxTextCtrl),
wxe_util:call(?wxTextCtrl_XYToPosition,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxTextCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxTextCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTextCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxTextDataObject.erl b/lib/wx/src/gen/wxTextDataObject.erl
index f4fe3b5e0c..4ffa2de4a7 100644
--- a/lib/wx/src/gen/wxTextDataObject.erl
+++ b/lib/wx/src/gen/wxTextDataObject.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,18 +32,21 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxTextDataObject/0]).
%% @hidden
parent_class(wxDataObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxTextDataObject()
+-type wxTextDataObject() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxTextDataObject().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxTextDataObject()
-%% Option = {text, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextdataobject.html#wxtextdataobjectwxtextdataobject">external documentation</a>.
+-spec new([Option]) -> wxTextDataObject() when
+ Option :: {text, unicode:chardata()}.
new(Options)
when is_list(Options) ->
MOpts = fun({text, Text}, Acc) -> Text_UC = unicode:characters_to_binary([Text,0]),[<<1:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
@@ -52,22 +55,25 @@ new(Options)
wxe_util:construct(?wxTextDataObject_new,
<<BinOpt/binary>>).
-%% @spec (This::wxTextDataObject()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextdataobject.html#wxtextdataobjectgettextlength">external documentation</a>.
+-spec getTextLength(This) -> integer() when
+ This::wxTextDataObject().
getTextLength(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextDataObject),
wxe_util:call(?wxTextDataObject_GetTextLength,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextDataObject()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextdataobject.html#wxtextdataobjectgettext">external documentation</a>.
+-spec getText(This) -> unicode:charlist() when
+ This::wxTextDataObject().
getText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextDataObject),
wxe_util:call(?wxTextDataObject_GetText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextDataObject(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextdataobject.html#wxtextdataobjectsettext">external documentation</a>.
+-spec setText(This, Text) -> ok when
+ This::wxTextDataObject(), Text::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxTextDataObject),
@@ -75,8 +81,8 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxTextDataObject_SetText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTextDataObject()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxTextDataObject()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTextDataObject),
wxe_util:destroy(?wxTextDataObject_destroy,Obj),
diff --git a/lib/wx/src/gen/wxTextEntryDialog.erl b/lib/wx/src/gen/wxTextEntryDialog.erl
index 53694a47e6..78e6e32b98 100644
--- a/lib/wx/src/gen/wxTextEntryDialog.erl
+++ b/lib/wx/src/gen/wxTextEntryDialog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,6 +77,7 @@
transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1,
updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxTextEntryDialog/0]).
%% @hidden
parent_class(wxDialog) -> true;
parent_class(wxTopLevelWindow) -> true;
@@ -84,15 +85,22 @@ parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string()) -> wxTextEntryDialog()
+-type wxTextEntryDialog() :: wx:wx_object().
%% @equiv new(Parent,Message, [])
+-spec new(Parent, Message) -> wxTextEntryDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata().
+
new(Parent,Message)
when is_record(Parent, wx_ref),is_list(Message) ->
new(Parent,Message, []).
-%% @spec (Parent::wxWindow:wxWindow(), Message::string(), [Option]) -> wxTextEntryDialog()
-%% Option = {caption, string()} | {value, string()} | {style, integer()} | {pos, {X::integer(), Y::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextentrydialog.html#wxtextentrydialogwxtextentrydialog">external documentation</a>.
+-spec new(Parent, Message, [Option]) -> wxTextEntryDialog() when
+ Parent::wxWindow:wxWindow(), Message::unicode:chardata(),
+ Option :: {caption, unicode:chardata()}
+ | {value, unicode:chardata()}
+ | {style, integer()}
+ | {pos, {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
when is_list(Message),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -106,15 +114,17 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
wxe_util:construct(?wxTextEntryDialog_new,
<<ParentRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTextEntryDialog()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextentrydialog.html#wxtextentrydialoggetvalue">external documentation</a>.
+-spec getValue(This) -> unicode:charlist() when
+ This::wxTextEntryDialog().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextEntryDialog),
wxe_util:call(?wxTextEntryDialog_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTextEntryDialog(), Val::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtextentrydialog.html#wxtextentrydialogsetvalue">external documentation</a>.
+-spec setValue(This, Val) -> ok when
+ This::wxTextEntryDialog(), Val::unicode:chardata().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Val)
when is_list(Val) ->
?CLASS(ThisT,wxTextEntryDialog),
@@ -122,8 +132,8 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Val)
wxe_util:cast(?wxTextEntryDialog_SetValue,
<<ThisRef:32/?UI,(byte_size(Val_UC)):32/?UI,(Val_UC)/binary, 0:(((8- ((0+byte_size(Val_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTextEntryDialog()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxTextEntryDialog()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTextEntryDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxToggleButton.erl b/lib/wx/src/gen/wxToggleButton.erl
index d7755cc50b..ed2f564952 100644
--- a/lib/wx/src/gen/wxToggleButton.erl
+++ b/lib/wx/src/gen/wxToggleButton.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -69,27 +69,35 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxToggleButton/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxToggleButton()
+-type wxToggleButton() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtogglebutton.html#wxtogglebuttonwxtogglebutton">external documentation</a>.
+-spec new() -> wxToggleButton().
new() ->
wxe_util:construct(?wxToggleButton_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> wxToggleButton()
%% @equiv new(Parent,Id,Label, [])
+-spec new(Parent, Id, Label) -> wxToggleButton() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
new(Parent,Id,Label)
when is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
new(Parent,Id,Label, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> wxToggleButton()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtogglebutton.html#wxtogglebuttonwxtogglebutton">external documentation</a>.
+-spec new(Parent, Id, Label, [Option]) -> wxToggleButton() when
+ Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -103,15 +111,21 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
wxe_util:construct(?wxToggleButton_new_4,
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxToggleButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string()) -> bool()
%% @equiv create(This,Parent,Id,Label, [])
+-spec create(This, Parent, Id, Label) -> boolean() when
+ This::wxToggleButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata().
+
create(This,Parent,Id,Label)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Label) ->
create(This,Parent,Id,Label, []).
-%% @spec (This::wxToggleButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::string(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtogglebutton.html#wxtogglebuttoncreate">external documentation</a>.
+-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
+ This::wxToggleButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxToggleButton),
@@ -126,23 +140,25 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,La
wxe_util:call(?wxToggleButton_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxToggleButton()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtogglebutton.html#wxtogglebuttongetvalue">external documentation</a>.
+-spec getValue(This) -> boolean() when
+ This::wxToggleButton().
getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToggleButton),
wxe_util:call(?wxToggleButton_GetValue,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToggleButton(), State::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtogglebutton.html#wxtogglebuttonsetvalue">external documentation</a>.
+-spec setValue(This, State) -> ok when
+ This::wxToggleButton(), State::boolean().
setValue(#wx_ref{type=ThisT,ref=ThisRef},State)
when is_boolean(State) ->
?CLASS(ThisT,wxToggleButton),
wxe_util:cast(?wxToggleButton_SetValue,
<<ThisRef:32/?UI,(wxe_util:from_bool(State)):32/?UI>>).
-%% @spec (This::wxToggleButton()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxToggleButton()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxToggleButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxToolBar.erl b/lib/wx/src/gen/wxToolBar.erl
index 59369368f0..9401e30e20 100644
--- a/lib/wx/src/gen/wxToolBar.erl
+++ b/lib/wx/src/gen/wxToolBar.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,52 +77,66 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxToolBar/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxToolBar(), Control::wxControl:wxControl()) -> wx:wx()
+-type wxToolBar() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddcontrol">external documentation</a>.
+-spec addControl(This, Control) -> wx:wx_object() when
+ This::wxToolBar(), Control::wxControl:wxControl().
addControl(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ControlT,ref=ControlRef}) ->
?CLASS(ThisT,wxToolBar),
?CLASS(ControlT,wxControl),
wxe_util:call(?wxToolBar_AddControl,
<<ThisRef:32/?UI,ControlRef:32/?UI>>).
-%% @spec (This::wxToolBar()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddseparator">external documentation</a>.
+-spec addSeparator(This) -> wx:wx_object() when
+ This::wxToolBar().
addSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_AddSeparator,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolBar(), Tool::wx:wx()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddtool">external documentation</a>.
+-spec addTool(This, Tool) -> wx:wx_object() when
+ This::wxToolBar(), Tool::wx:wx_object().
addTool(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ToolT,ref=ToolRef}) ->
?CLASS(ThisT,wxToolBar),
?CLASS(ToolT,wx),
wxe_util:call(?wxToolBar_AddTool_1,
<<ThisRef:32/?UI,ToolRef:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap()) -> wx:wx()
%% @equiv addTool(This,Toolid,Bitmap, [])
+-spec addTool(This, Toolid, Bitmap) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap().
+
addTool(This,Toolid,Bitmap)
when is_record(This, wx_ref),is_integer(Toolid),is_record(Bitmap, wx_ref) ->
addTool(This,Toolid,Bitmap, []).
-%% @spec (This::wxToolBar(),Toolid::integer(),X::string()|term(),X::term()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddtool">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% addTool(This::wxToolBar(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap()) -> addTool(This,Toolid,Label,Bitmap, []) </c></p>
-%% <p><c>
-%% addTool(This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap()) -> addTool(This,Toolid,Bitmap,BmpDisabled, []) </c></p>
-%% <p><c>
-%% addTool(This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), [Option]) -> wx:wx() </c>
-%%<br /> Option = {shortHelpString, string()} | {longHelpString, string()}
-%% </p>
+%% <br /> Also:<br />
+%% addTool(This, Toolid, Bitmap, BmpDisabled) -> wx:wx_object() when<br />
+%% This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap();<br />
+%% (This, Toolid, Bitmap, [Option]) -> wx:wx_object() when<br />
+%% This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(),<br />
+%% Option :: {shortHelpString, unicode:chardata()}<br />
+%% | {longHelpString, unicode:chardata()}.<br />
+%%
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec addTool(This, Toolid, Label, Bitmap) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap();
+ (This, Toolid, Bitmap, BmpDisabled) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap();
+ (This, Toolid, Bitmap, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(),
+ Option :: {shortHelpString, unicode:chardata()}
+ | {longHelpString, unicode:chardata()}.
addTool(This,Toolid,Label,Bitmap)
when is_record(This, wx_ref),is_integer(Toolid),is_list(Label),is_record(Bitmap, wx_ref) ->
@@ -142,21 +156,32 @@ addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,#wx_ref{type=BitmapT,ref=BitmapRe
wxe_util:call(?wxToolBar_AddTool_3,
<<ThisRef:32/?UI,Toolid:32/?UI,BitmapRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxToolBar(),Toolid::integer(),X::string()|term(),X::term(),X::term()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddtool">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% addTool(This::wxToolBar(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap()) -> addTool(This,Toolid,Label,Bitmap,BmpDisabled, []) </c></p>
-%% <p><c>
-%% addTool(This::wxToolBar(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap(), [Option]) -> wx:wx() </c>
-%%<br /> Option = {shortHelp, string()} | {kind, WxItemKind}
-%%<br /> WxItemKind = integer()
-%%<br /> WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-%% </p>
-%% <p><c>
-%% addTool(This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(), [Option]) -> wx:wx() </c>
-%%<br /> Option = {toggle, bool()} | {clientData, wx:wx()} | {shortHelpString, string()} | {longHelpString, string()}
-%% </p>
+%% <br /> Also:<br />
+%% addTool(This, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when<br />
+%% This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),<br />
+%% Option :: {shortHelp, unicode:chardata()}<br />
+%% | {kind, wx:wx_enum()};<br />
+%% (This, Toolid, Bitmap, BmpDisabled, [Option]) -> wx:wx_object() when<br />
+%% This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(),<br />
+%% Option :: {toggle, boolean()}<br />
+%% | {clientData, wx:wx_object()}<br />
+%% | {shortHelpString, unicode:chardata()}<br />
+%% | {longHelpString, unicode:chardata()}.<br />
+%%
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec addTool(This, Toolid, Label, Bitmap, BmpDisabled) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap();
+ (This, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),
+ Option :: {shortHelp, unicode:chardata()}
+ | {kind, wx:wx_enum()};
+ (This, Toolid, Bitmap, BmpDisabled, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(),
+ Option :: {toggle, boolean()}
+ | {clientData, wx:wx_object()}
+ | {shortHelpString, unicode:chardata()}
+ | {longHelpString, unicode:chardata()}.
addTool(This,Toolid,Label,Bitmap,BmpDisabled)
when is_record(This, wx_ref),is_integer(Toolid),is_list(Label),is_record(Bitmap, wx_ref),is_record(BmpDisabled, wx_ref) ->
@@ -186,17 +211,24 @@ addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,#wx_ref{type=BitmapT,ref=BitmapRe
wxe_util:call(?wxToolBar_AddTool_4_1,
<<ThisRef:32/?UI,Toolid:32/?UI,BitmapRef:32/?UI,BmpDisabledRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxToolBar(),Toolid::integer(),X::term()|string(),X::term(),X::bool()|term(),X::integer()|term()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddtool">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% addTool(This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(), Toggle::bool(), XPos::integer()) -> addTool(This,Toolid,Bitmap,BmpDisabled,Toggle,XPos, []) </c></p>
-%% <p><c>
-%% addTool(This::wxToolBar(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(), [Option]) -> wx:wx() </c>
-%%<br /> Option = {kind, WxItemKind} | {shortHelp, string()} | {longHelp, string()} | {data, wx:wx()}
-%%<br /> WxItemKind = integer()
-%%<br /> WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-%% </p>
+%% <br /> Also:<br />
+%% addTool(This, Toolid, Label, Bitmap, BmpDisabled, [Option]) -> wx:wx_object() when<br />
+%% This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(),<br />
+%% Option :: {kind, wx:wx_enum()}<br />
+%% | {shortHelp, unicode:chardata()}<br />
+%% | {longHelp, unicode:chardata()}<br />
+%% | {data, wx:wx_object()}.<br />
+%%
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec addTool(This, Toolid, Bitmap, BmpDisabled, Toggle, XPos) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(), Toggle::boolean(), XPos::integer();
+ (This, Toolid, Label, Bitmap, BmpDisabled, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(),
+ Option :: {kind, wx:wx_enum()}
+ | {shortHelp, unicode:chardata()}
+ | {longHelp, unicode:chardata()}
+ | {data, wx:wx_object()}.
addTool(This,Toolid,Bitmap,BmpDisabled,Toggle,XPos)
when is_record(This, wx_ref),is_integer(Toolid),is_record(Bitmap, wx_ref),is_record(BmpDisabled, wx_ref),is_boolean(Toggle),is_integer(XPos) ->
@@ -216,9 +248,13 @@ addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Label,#wx_ref{type=BitmapT,ref=Bi
wxe_util:call(?wxToolBar_AddTool_5,
<<ThisRef:32/?UI,Toolid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8,BitmapRef:32/?UI,BmpDisabledRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(), Toggle::bool(), XPos::integer(), [Option]) -> wx:wx()
-%% Option = {yPos, integer()} | {clientData, wx:wx()} | {shortHelp, string()} | {longHelp, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddtool">external documentation</a>.
+-spec addTool(This, Toolid, Bitmap, BmpDisabled, Toggle, XPos, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(), Toggle::boolean(), XPos::integer(),
+ Option :: {yPos, integer()}
+ | {clientData, wx:wx_object()}
+ | {shortHelp, unicode:chardata()}
+ | {longHelp, unicode:chardata()}.
addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,#wx_ref{type=BitmapT,ref=BitmapRef},#wx_ref{type=BmpDisabledT,ref=BmpDisabledRef},Toggle,XPos, Options)
when is_integer(Toolid),is_boolean(Toggle),is_integer(XPos),is_list(Options) ->
?CLASS(ThisT,wxToolBar),
@@ -233,15 +269,21 @@ addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,#wx_ref{type=BitmapT,ref=BitmapRe
wxe_util:call(?wxToolBar_AddTool_6,
<<ThisRef:32/?UI,Toolid:32/?UI,BitmapRef:32/?UI,BmpDisabledRef:32/?UI,(wxe_util:from_bool(Toggle)):32/?UI,XPos:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxToolBar(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap()) -> wx:wx()
%% @equiv addCheckTool(This,Toolid,Label,Bitmap, [])
+-spec addCheckTool(This, Toolid, Label, Bitmap) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap().
+
addCheckTool(This,Toolid,Label,Bitmap)
when is_record(This, wx_ref),is_integer(Toolid),is_list(Label),is_record(Bitmap, wx_ref) ->
addCheckTool(This,Toolid,Label,Bitmap, []).
-%% @spec (This::wxToolBar(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap(), [Option]) -> wx:wx()
-%% Option = {bmpDisabled, wxBitmap:wxBitmap()} | {shortHelp, string()} | {longHelp, string()} | {data, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddchecktool">external documentation</a>.
+-spec addCheckTool(This, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),
+ Option :: {bmpDisabled, wxBitmap:wxBitmap()}
+ | {shortHelp, unicode:chardata()}
+ | {longHelp, unicode:chardata()}
+ | {data, wx:wx_object()}.
addCheckTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Label,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Toolid),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxToolBar),
@@ -256,15 +298,21 @@ addCheckTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Label,#wx_ref{type=BitmapT,r
wxe_util:call(?wxToolBar_AddCheckTool,
<<ThisRef:32/?UI,Toolid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8,BitmapRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxToolBar(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap()) -> wx:wx()
%% @equiv addRadioTool(This,Toolid,Label,Bitmap, [])
+-spec addRadioTool(This, Toolid, Label, Bitmap) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap().
+
addRadioTool(This,Toolid,Label,Bitmap)
when is_record(This, wx_ref),is_integer(Toolid),is_list(Label),is_record(Bitmap, wx_ref) ->
addRadioTool(This,Toolid,Label,Bitmap, []).
-%% @spec (This::wxToolBar(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap(), [Option]) -> wx:wx()
-%% Option = {bmpDisabled, wxBitmap:wxBitmap()} | {shortHelp, string()} | {longHelp, string()} | {data, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbaraddradiotool">external documentation</a>.
+-spec addRadioTool(This, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),
+ Option :: {bmpDisabled, wxBitmap:wxBitmap()}
+ | {shortHelp, unicode:chardata()}
+ | {longHelp, unicode:chardata()}
+ | {data, wx:wx_object()}.
addRadioTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Label,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Toolid),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxToolBar),
@@ -279,131 +327,148 @@ addRadioTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Label,#wx_ref{type=BitmapT,r
wxe_util:call(?wxToolBar_AddRadioTool,
<<ThisRef:32/?UI,Toolid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8,BitmapRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxToolBar(), Toolid::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbardeletetool">external documentation</a>.
+-spec deleteTool(This, Toolid) -> boolean() when
+ This::wxToolBar(), Toolid::integer().
deleteTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
when is_integer(Toolid) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_DeleteTool,
<<ThisRef:32/?UI,Toolid:32/?UI>>).
-%% @spec (This::wxToolBar(), Pos::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbardeletetoolbypos">external documentation</a>.
+-spec deleteToolByPos(This, Pos) -> boolean() when
+ This::wxToolBar(), Pos::integer().
deleteToolByPos(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_DeleteToolByPos,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer(), Enable::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarenabletool">external documentation</a>.
+-spec enableTool(This, Toolid, Enable) -> ok when
+ This::wxToolBar(), Toolid::integer(), Enable::boolean().
enableTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Enable)
when is_integer(Toolid),is_boolean(Enable) ->
?CLASS(ThisT,wxToolBar),
wxe_util:cast(?wxToolBar_EnableTool,
<<ThisRef:32/?UI,Toolid:32/?UI,(wxe_util:from_bool(Enable)):32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarfindbyid">external documentation</a>.
+-spec findById(This, Toolid) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer().
findById(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
when is_integer(Toolid) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_FindById,
<<ThisRef:32/?UI,Toolid:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer()) -> wxControl:wxControl()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarfindcontrol">external documentation</a>.
+-spec findControl(This, Toolid) -> wxControl:wxControl() when
+ This::wxToolBar(), Toolid::integer().
findControl(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
when is_integer(Toolid) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_FindControl,
<<ThisRef:32/?UI,Toolid:32/?UI>>).
-%% @spec (This::wxToolBar(), X::integer(), Y::integer()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarfindtoolforposition">external documentation</a>.
+-spec findToolForPosition(This, X, Y) -> wx:wx_object() when
+ This::wxToolBar(), X::integer(), Y::integer().
findToolForPosition(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_FindToolForPosition,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxToolBar()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoolsize">external documentation</a>.
+-spec getToolSize(This) -> {W::integer(), H::integer()} when
+ This::wxToolBar().
getToolSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolBar()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoolbitmapsize">external documentation</a>.
+-spec getToolBitmapSize(This) -> {W::integer(), H::integer()} when
+ This::wxToolBar().
getToolBitmapSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolBitmapSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolBar()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargetmargins">external documentation</a>.
+-spec getMargins(This) -> {W::integer(), H::integer()} when
+ This::wxToolBar().
getMargins(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetMargins,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoolenabled">external documentation</a>.
+-spec getToolEnabled(This, Toolid) -> boolean() when
+ This::wxToolBar(), Toolid::integer().
getToolEnabled(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
when is_integer(Toolid) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolEnabled,
<<ThisRef:32/?UI,Toolid:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoollonghelp">external documentation</a>.
+-spec getToolLongHelp(This, Toolid) -> unicode:charlist() when
+ This::wxToolBar(), Toolid::integer().
getToolLongHelp(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
when is_integer(Toolid) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolLongHelp,
<<ThisRef:32/?UI,Toolid:32/?UI>>).
-%% @spec (This::wxToolBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoolpacking">external documentation</a>.
+-spec getToolPacking(This) -> integer() when
+ This::wxToolBar().
getToolPacking(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolPacking,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolBar(), Id::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoolpos">external documentation</a>.
+-spec getToolPos(This, Id) -> integer() when
+ This::wxToolBar(), Id::integer().
getToolPos(#wx_ref{type=ThisT,ref=ThisRef},Id)
when is_integer(Id) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolPos,
<<ThisRef:32/?UI,Id:32/?UI>>).
-%% @spec (This::wxToolBar()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoolseparation">external documentation</a>.
+-spec getToolSeparation(This) -> integer() when
+ This::wxToolBar().
getToolSeparation(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolSeparation,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoolshorthelp">external documentation</a>.
+-spec getToolShortHelp(This, Toolid) -> unicode:charlist() when
+ This::wxToolBar(), Toolid::integer().
getToolShortHelp(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
when is_integer(Toolid) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolShortHelp,
<<ThisRef:32/?UI,Toolid:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbargettoolstate">external documentation</a>.
+-spec getToolState(This, Toolid) -> boolean() when
+ This::wxToolBar(), Toolid::integer().
getToolState(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
when is_integer(Toolid) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_GetToolState,
<<ThisRef:32/?UI,Toolid:32/?UI>>).
-%% @spec (This::wxToolBar(), Pos::integer(), Control::wxControl:wxControl()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarinsertcontrol">external documentation</a>.
+-spec insertControl(This, Pos, Control) -> wx:wx_object() when
+ This::wxToolBar(), Pos::integer(), Control::wxControl:wxControl().
insertControl(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ControlT,ref=ControlRef})
when is_integer(Pos) ->
?CLASS(ThisT,wxToolBar),
@@ -411,16 +476,18 @@ insertControl(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ControlT,ref=Cont
wxe_util:call(?wxToolBar_InsertControl,
<<ThisRef:32/?UI,Pos:32/?UI,ControlRef:32/?UI>>).
-%% @spec (This::wxToolBar(), Pos::integer()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarinsertseparator">external documentation</a>.
+-spec insertSeparator(This, Pos) -> wx:wx_object() when
+ This::wxToolBar(), Pos::integer().
insertSeparator(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_InsertSeparator,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxToolBar(), Pos::integer(), Tool::wx:wx()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarinserttool">external documentation</a>.
+-spec insertTool(This, Pos, Tool) -> wx:wx_object() when
+ This::wxToolBar(), Pos::integer(), Tool::wx:wx_object().
insertTool(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ToolT,ref=ToolRef})
when is_integer(Pos) ->
?CLASS(ThisT,wxToolBar),
@@ -428,21 +495,34 @@ insertTool(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ToolT,ref=ToolRef})
wxe_util:call(?wxToolBar_InsertTool_2,
<<ThisRef:32/?UI,Pos:32/?UI,ToolRef:32/?UI>>).
-%% @spec (This::wxToolBar(), Pos::integer(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap()) -> wx:wx()
%% @equiv insertTool(This,Pos,Toolid,Bitmap, [])
+-spec insertTool(This, Pos, Toolid, Bitmap) -> wx:wx_object() when
+ This::wxToolBar(), Pos::integer(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap().
+
insertTool(This,Pos,Toolid,Bitmap)
when is_record(This, wx_ref),is_integer(Pos),is_integer(Toolid),is_record(Bitmap, wx_ref) ->
insertTool(This,Pos,Toolid,Bitmap, []).
-%% @spec (This::wxToolBar(),Pos::integer(),Toolid::integer(),X::string()|term(),X::term()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarinserttool">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% insertTool(This::wxToolBar(), Pos::integer(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap()) -> insertTool(This,Pos,Toolid,Label,Bitmap, []) </c></p>
-%% <p><c>
-%% insertTool(This::wxToolBar(), Pos::integer(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), [Option]) -> wx:wx() </c>
-%%<br /> Option = {bmpDisabled, wxBitmap:wxBitmap()} | {toggle, bool()} | {clientData, wx:wx()} | {shortHelp, string()} | {longHelp, string()}
-%% </p>
+%% <br /> Also:<br />
+%% insertTool(This, Pos, Toolid, Bitmap, [Option]) -> wx:wx_object() when<br />
+%% This::wxToolBar(), Pos::integer(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(),<br />
+%% Option :: {bmpDisabled, wxBitmap:wxBitmap()}<br />
+%% | {toggle, boolean()}<br />
+%% | {clientData, wx:wx_object()}<br />
+%% | {shortHelp, unicode:chardata()}<br />
+%% | {longHelp, unicode:chardata()}.<br />
+%%
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec insertTool(This, Pos, Toolid, Label, Bitmap) -> wx:wx_object() when
+ This::wxToolBar(), Pos::integer(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap();
+ (This, Pos, Toolid, Bitmap, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Pos::integer(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(),
+ Option :: {bmpDisabled, wxBitmap:wxBitmap()}
+ | {toggle, boolean()}
+ | {clientData, wx:wx_object()}
+ | {shortHelp, unicode:chardata()}
+ | {longHelp, unicode:chardata()}.
insertTool(This,Pos,Toolid,Label,Bitmap)
when is_record(This, wx_ref),is_integer(Pos),is_integer(Toolid),is_list(Label),is_record(Bitmap, wx_ref) ->
@@ -461,11 +541,15 @@ insertTool(#wx_ref{type=ThisT,ref=ThisRef},Pos,Toolid,#wx_ref{type=BitmapT,ref=B
wxe_util:call(?wxToolBar_InsertTool_4,
<<ThisRef:32/?UI,Pos:32/?UI,Toolid:32/?UI,BitmapRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxToolBar(), Pos::integer(), Toolid::integer(), Label::string(), Bitmap::wxBitmap:wxBitmap(), [Option]) -> wx:wx()
-%% Option = {bmpDisabled, wxBitmap:wxBitmap()} | {kind, WxItemKind} | {shortHelp, string()} | {longHelp, string()} | {clientData, wx:wx()}
-%% WxItemKind = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarinserttool">external documentation</a>.
-%%<br /> WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
+-spec insertTool(This, Pos, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when
+ This::wxToolBar(), Pos::integer(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),
+ Option :: {bmpDisabled, wxBitmap:wxBitmap()}
+ | {kind, wx:wx_enum()}
+ | {shortHelp, unicode:chardata()}
+ | {longHelp, unicode:chardata()}
+ | {clientData, wx:wx_object()}.
insertTool(#wx_ref{type=ThisT,ref=ThisRef},Pos,Toolid,Label,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Pos),is_integer(Toolid),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxToolBar),
@@ -481,39 +565,44 @@ insertTool(#wx_ref{type=ThisT,ref=ThisRef},Pos,Toolid,Label,#wx_ref{type=BitmapT
wxe_util:call(?wxToolBar_InsertTool_5,
<<ThisRef:32/?UI,Pos:32/?UI,Toolid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8,BitmapRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxToolBar()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarrealize">external documentation</a>.
+-spec realize(This) -> boolean() when
+ This::wxToolBar().
realize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_Realize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer()) -> wx:wx()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarremovetool">external documentation</a>.
+-spec removeTool(This, Toolid) -> wx:wx_object() when
+ This::wxToolBar(), Toolid::integer().
removeTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
when is_integer(Toolid) ->
?CLASS(ThisT,wxToolBar),
wxe_util:call(?wxToolBar_RemoveTool,
<<ThisRef:32/?UI,Toolid:32/?UI>>).
-%% @spec (This::wxToolBar(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarsetmargins">external documentation</a>.
+-spec setMargins(This, X, Y) -> ok when
+ This::wxToolBar(), X::integer(), Y::integer().
setMargins(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxToolBar),
wxe_util:cast(?wxToolBar_SetMargins,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxToolBar(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarsettoolbitmapsize">external documentation</a>.
+-spec setToolBitmapSize(This, Size) -> ok when
+ This::wxToolBar(), Size::{W::integer(), H::integer()}.
setToolBitmapSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxToolBar),
wxe_util:cast(?wxToolBar_SetToolBitmapSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer(), HelpString::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarsettoollonghelp">external documentation</a>.
+-spec setToolLongHelp(This, Toolid, HelpString) -> ok when
+ This::wxToolBar(), Toolid::integer(), HelpString::unicode:chardata().
setToolLongHelp(#wx_ref{type=ThisT,ref=ThisRef},Toolid,HelpString)
when is_integer(Toolid),is_list(HelpString) ->
?CLASS(ThisT,wxToolBar),
@@ -521,16 +610,18 @@ setToolLongHelp(#wx_ref{type=ThisT,ref=ThisRef},Toolid,HelpString)
wxe_util:cast(?wxToolBar_SetToolLongHelp,
<<ThisRef:32/?UI,Toolid:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxToolBar(), Packing::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarsettoolpacking">external documentation</a>.
+-spec setToolPacking(This, Packing) -> ok when
+ This::wxToolBar(), Packing::integer().
setToolPacking(#wx_ref{type=ThisT,ref=ThisRef},Packing)
when is_integer(Packing) ->
?CLASS(ThisT,wxToolBar),
wxe_util:cast(?wxToolBar_SetToolPacking,
<<ThisRef:32/?UI,Packing:32/?UI>>).
-%% @spec (This::wxToolBar(), Id::integer(), HelpString::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarsettoolshorthelp">external documentation</a>.
+-spec setToolShortHelp(This, Id, HelpString) -> ok when
+ This::wxToolBar(), Id::integer(), HelpString::unicode:chardata().
setToolShortHelp(#wx_ref{type=ThisT,ref=ThisRef},Id,HelpString)
when is_integer(Id),is_list(HelpString) ->
?CLASS(ThisT,wxToolBar),
@@ -538,16 +629,18 @@ setToolShortHelp(#wx_ref{type=ThisT,ref=ThisRef},Id,HelpString)
wxe_util:cast(?wxToolBar_SetToolShortHelp,
<<ThisRef:32/?UI,Id:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxToolBar(), Separation::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbarsettoolseparation">external documentation</a>.
+-spec setToolSeparation(This, Separation) -> ok when
+ This::wxToolBar(), Separation::integer().
setToolSeparation(#wx_ref{type=ThisT,ref=ThisRef},Separation)
when is_integer(Separation) ->
?CLASS(ThisT,wxToolBar),
wxe_util:cast(?wxToolBar_SetToolSeparation,
<<ThisRef:32/?UI,Separation:32/?UI>>).
-%% @spec (This::wxToolBar(), Toolid::integer(), Toggle::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbar.html#wxtoolbartoggletool">external documentation</a>.
+-spec toggleTool(This, Toolid, Toggle) -> ok when
+ This::wxToolBar(), Toolid::integer(), Toggle::boolean().
toggleTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Toggle)
when is_integer(Toolid),is_boolean(Toggle) ->
?CLASS(ThisT,wxToolBar),
diff --git a/lib/wx/src/gen/wxToolTip.erl b/lib/wx/src/gen/wxToolTip.erl
index b0749c851a..e9b5510357 100644
--- a/lib/wx/src/gen/wxToolTip.erl
+++ b/lib/wx/src/gen/wxToolTip.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,33 +29,39 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxToolTip/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Flag::bool()) -> ok
+-type wxToolTip() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtooltip.html#wxtooltipenable">external documentation</a>.
+-spec enable(Flag) -> ok when
+ Flag::boolean().
enable(Flag)
when is_boolean(Flag) ->
wxe_util:cast(?wxToolTip_Enable,
<<(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec (Msecs::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtooltip.html#wxtooltipsetdelay">external documentation</a>.
+-spec setDelay(Msecs) -> ok when
+ Msecs::integer().
setDelay(Msecs)
when is_integer(Msecs) ->
wxe_util:cast(?wxToolTip_SetDelay,
<<Msecs:32/?UI>>).
-%% @spec (Tip::string()) -> wxToolTip()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtooltip.html#wxtooltipwxtooltip">external documentation</a>.
+-spec new(Tip) -> wxToolTip() when
+ Tip::unicode:chardata().
new(Tip)
when is_list(Tip) ->
Tip_UC = unicode:characters_to_binary([Tip,0]),
wxe_util:construct(?wxToolTip_new,
<<(byte_size(Tip_UC)):32/?UI,(Tip_UC)/binary, 0:(((8- ((4+byte_size(Tip_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxToolTip(), Tip::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtooltip.html#wxtooltipsettip">external documentation</a>.
+-spec setTip(This, Tip) -> ok when
+ This::wxToolTip(), Tip::unicode:chardata().
setTip(#wx_ref{type=ThisT,ref=ThisRef},Tip)
when is_list(Tip) ->
?CLASS(ThisT,wxToolTip),
@@ -63,22 +69,24 @@ setTip(#wx_ref{type=ThisT,ref=ThisRef},Tip)
wxe_util:cast(?wxToolTip_SetTip,
<<ThisRef:32/?UI,(byte_size(Tip_UC)):32/?UI,(Tip_UC)/binary, 0:(((8- ((0+byte_size(Tip_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxToolTip()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtooltip.html#wxtooltipgettip">external documentation</a>.
+-spec getTip(This) -> unicode:charlist() when
+ This::wxToolTip().
getTip(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolTip),
wxe_util:call(?wxToolTip_GetTip,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolTip()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtooltip.html#wxtooltipgetwindow">external documentation</a>.
+-spec getWindow(This) -> wxWindow:wxWindow() when
+ This::wxToolTip().
getWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolTip),
wxe_util:call(?wxToolTip_GetWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolTip()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxToolTip()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxToolTip),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxToolbook.erl b/lib/wx/src/gen/wxToolbook.erl
index 764f66c2e5..9172f7a2d9 100644
--- a/lib/wx/src/gen/wxToolbook.erl
+++ b/lib/wx/src/gen/wxToolbook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,27 +74,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxToolbook/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxToolbook()
+-type wxToolbook() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookwxtoolbook">external documentation</a>.
+-spec new() -> wxToolbook().
new() ->
wxe_util:construct(?wxToolbook_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxToolbook()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxToolbook() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxToolbook()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookwxtoolbook">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxToolbook() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -106,15 +113,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxToolbook_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxToolbook(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv addPage(This,Page,Text, [])
+-spec addPage(This, Page, Text) -> boolean() when
+ This::wxToolbook(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
addPage(This,Page,Text)
when is_record(This, wx_ref),is_record(Page, wx_ref),is_list(Text) ->
addPage(This,Page,Text, []).
-%% @spec (This::wxToolbook(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookaddpage">external documentation</a>.
+-spec addPage(This, Page, Text, [Option]) -> boolean() when
+ This::wxToolbook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxToolbook),
@@ -127,15 +138,18 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
wxe_util:call(?wxToolbook_AddPage,
<<ThisRef:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxToolbook()) -> ok
%% @equiv advanceSelection(This, [])
+-spec advanceSelection(This) -> ok when
+ This::wxToolbook().
+
advanceSelection(This)
when is_record(This, wx_ref) ->
advanceSelection(This, []).
-%% @spec (This::wxToolbook(), [Option]) -> ok
-%% Option = {forward, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookadvanceselection">external documentation</a>.
+-spec advanceSelection(This, [Option]) -> ok when
+ This::wxToolbook(),
+ Option :: {forward, boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxToolbook),
@@ -145,23 +159,29 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxToolbook_AdvanceSelection,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxToolbook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookassignimagelist">external documentation</a>.
+-spec assignImageList(This, ImageList) -> ok when
+ This::wxToolbook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxToolbook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxToolbook_AssignImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxToolbook(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxToolbook(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxToolbook(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxToolbook(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxToolbook),
@@ -174,98 +194,114 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxToolbook_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxToolbook()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookdeleteallpages">external documentation</a>.
+-spec deleteAllPages(This) -> boolean() when
+ This::wxToolbook().
deleteAllPages(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_DeleteAllPages,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookdeletepage">external documentation</a>.
+-spec deletePage(This, N) -> boolean() when
+ This::wxToolbook(), N::integer().
deletePage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_DeletePage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookremovepage">external documentation</a>.
+-spec removePage(This, N) -> boolean() when
+ This::wxToolbook(), N::integer().
removePage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_RemovePage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxToolbook()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookgetcurrentpage">external documentation</a>.
+-spec getCurrentPage(This) -> wxWindow:wxWindow() when
+ This::wxToolbook().
getCurrentPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_GetCurrentPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolbook()) -> wxImageList:wxImageList()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookgetimagelist">external documentation</a>.
+-spec getImageList(This) -> wxImageList:wxImageList() when
+ This::wxToolbook().
getImageList(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_GetImageList,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookgetpage">external documentation</a>.
+-spec getPage(This, N) -> wxWindow:wxWindow() when
+ This::wxToolbook(), N::integer().
getPage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_GetPage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxToolbook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookgetpagecount">external documentation</a>.
+-spec getPageCount(This) -> integer() when
+ This::wxToolbook().
getPageCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_GetPageCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookgetpageimage">external documentation</a>.
+-spec getPageImage(This, N) -> integer() when
+ This::wxToolbook(), N::integer().
getPageImage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_GetPageImage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookgetpagetext">external documentation</a>.
+-spec getPageText(This, N) -> unicode:charlist() when
+ This::wxToolbook(), N::integer().
getPageText(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_GetPageText,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxToolbook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxToolbook().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxToolbook(), Pt::{X::integer(), Y::integer()}) -> {integer(), Flags::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookhittest">external documentation</a>.
+-spec hitTest(This, Pt) -> Result when
+ Result ::{Res ::integer(), Flags::integer()},
+ This::wxToolbook(), Pt::{X::integer(), Y::integer()}.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_HitTest,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv insertPage(This,N,Page,Text, [])
+-spec insertPage(This, N, Page, Text) -> boolean() when
+ This::wxToolbook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
insertPage(This,N,Page,Text)
when is_record(This, wx_ref),is_integer(N),is_record(Page, wx_ref),is_list(Text) ->
insertPage(This,N,Page,Text, []).
-%% @spec (This::wxToolbook(), N::integer(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookinsertpage">external documentation</a>.
+-spec insertPage(This, N, Page, Text, [Option]) -> boolean() when
+ This::wxToolbook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(N),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxToolbook),
@@ -278,32 +314,36 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Tex
wxe_util:call(?wxToolbook_InsertPage,
<<ThisRef:32/?UI,N:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxToolbook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbooksetimagelist">external documentation</a>.
+-spec setImageList(This, ImageList) -> ok when
+ This::wxToolbook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxToolbook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxToolbook_SetImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxToolbook(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbooksetpagesize">external documentation</a>.
+-spec setPageSize(This, Size) -> ok when
+ This::wxToolbook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxToolbook),
wxe_util:cast(?wxToolbook_SetPageSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer(), ImageId::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbooksetpageimage">external documentation</a>.
+-spec setPageImage(This, N, ImageId) -> boolean() when
+ This::wxToolbook(), N::integer(), ImageId::integer().
setPageImage(#wx_ref{type=ThisT,ref=ThisRef},N,ImageId)
when is_integer(N),is_integer(ImageId) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_SetPageImage,
<<ThisRef:32/?UI,N:32/?UI,ImageId:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer(), StrText::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbooksetpagetext">external documentation</a>.
+-spec setPageText(This, N, StrText) -> boolean() when
+ This::wxToolbook(), N::integer(), StrText::unicode:chardata().
setPageText(#wx_ref{type=ThisT,ref=ThisRef},N,StrText)
when is_integer(N),is_list(StrText) ->
?CLASS(ThisT,wxToolbook),
@@ -311,24 +351,26 @@ setPageText(#wx_ref{type=ThisT,ref=ThisRef},N,StrText)
wxe_util:call(?wxToolbook_SetPageText,
<<ThisRef:32/?UI,N:32/?UI,(byte_size(StrText_UC)):32/?UI,(StrText_UC)/binary, 0:(((8- ((4+byte_size(StrText_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxToolbook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbooksetselection">external documentation</a>.
+-spec setSelection(This, N) -> integer() when
+ This::wxToolbook(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_SetSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxToolbook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoolbook.html#wxtoolbookchangeselection">external documentation</a>.
+-spec changeSelection(This, N) -> integer() when
+ This::wxToolbook(), N::integer().
changeSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxToolbook),
wxe_util:call(?wxToolbook_ChangeSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxToolbook()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxToolbook()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxToolbook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxTopLevelWindow.erl b/lib/wx/src/gen/wxTopLevelWindow.erl
index e0551b480f..5659c0927f 100644
--- a/lib/wx/src/gen/wxTopLevelWindow.erl
+++ b/lib/wx/src/gen/wxTopLevelWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,48 +72,57 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxTopLevelWindow/0]).
%% @hidden
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxTopLevelWindow()) -> wxIcon:wxIcon()
+-type wxTopLevelWindow() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowgeticon">external documentation</a>.
+-spec getIcon(This) -> wxIcon:wxIcon() when
+ This::wxTopLevelWindow().
getIcon(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
wxe_util:call(?wxTopLevelWindow_GetIcon,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow()) -> wxIconBundle:wxIconBundle()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowgeticons">external documentation</a>.
+-spec getIcons(This) -> wxIconBundle:wxIconBundle() when
+ This::wxTopLevelWindow().
getIcons(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
wxe_util:call(?wxTopLevelWindow_GetIcons,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowgettitle">external documentation</a>.
+-spec getTitle(This) -> unicode:charlist() when
+ This::wxTopLevelWindow().
getTitle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
wxe_util:call(?wxTopLevelWindow_GetTitle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowisactive">external documentation</a>.
+-spec isActive(This) -> boolean() when
+ This::wxTopLevelWindow().
isActive(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
wxe_util:call(?wxTopLevelWindow_IsActive,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow()) -> ok
%% @equiv iconize(This, [])
+-spec iconize(This) -> ok when
+ This::wxTopLevelWindow().
+
iconize(This)
when is_record(This, wx_ref) ->
iconize(This, []).
-%% @spec (This::wxTopLevelWindow(), [Option]) -> ok
-%% Option = {iconize, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowiconize">external documentation</a>.
+-spec iconize(This, [Option]) -> ok when
+ This::wxTopLevelWindow(),
+ Option :: {iconize, boolean()}.
iconize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -123,36 +132,42 @@ iconize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxTopLevelWindow_Iconize,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTopLevelWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowisfullscreen">external documentation</a>.
+-spec isFullScreen(This) -> boolean() when
+ This::wxTopLevelWindow().
isFullScreen(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
wxe_util:call(?wxTopLevelWindow_IsFullScreen,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowisiconized">external documentation</a>.
+-spec isIconized(This) -> boolean() when
+ This::wxTopLevelWindow().
isIconized(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
wxe_util:call(?wxTopLevelWindow_IsIconized,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowismaximized">external documentation</a>.
+-spec isMaximized(This) -> boolean() when
+ This::wxTopLevelWindow().
isMaximized(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
wxe_util:call(?wxTopLevelWindow_IsMaximized,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow()) -> ok
%% @equiv maximize(This, [])
+-spec maximize(This) -> ok when
+ This::wxTopLevelWindow().
+
maximize(This)
when is_record(This, wx_ref) ->
maximize(This, []).
-%% @spec (This::wxTopLevelWindow(), [Option]) -> ok
-%% Option = {maximize, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowmaximize">external documentation</a>.
+-spec maximize(This, [Option]) -> ok when
+ This::wxTopLevelWindow(),
+ Option :: {maximize, boolean()}.
maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -162,15 +177,18 @@ maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxTopLevelWindow_Maximize,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTopLevelWindow()) -> ok
%% @equiv requestUserAttention(This, [])
+-spec requestUserAttention(This) -> ok when
+ This::wxTopLevelWindow().
+
requestUserAttention(This)
when is_record(This, wx_ref) ->
requestUserAttention(This, []).
-%% @spec (This::wxTopLevelWindow(), [Option]) -> ok
-%% Option = {flags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowrequestuserattention">external documentation</a>.
+-spec requestUserAttention(This, [Option]) -> ok when
+ This::wxTopLevelWindow(),
+ Option :: {flags, integer()}.
requestUserAttention(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -180,31 +198,36 @@ requestUserAttention(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxTopLevelWindow_RequestUserAttention,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTopLevelWindow(), Icon::wxIcon:wxIcon()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowseticon">external documentation</a>.
+-spec setIcon(This, Icon) -> ok when
+ This::wxTopLevelWindow(), Icon::wxIcon:wxIcon().
setIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
?CLASS(IconT,wxIcon),
wxe_util:cast(?wxTopLevelWindow_SetIcon,
<<ThisRef:32/?UI,IconRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow(), Icons::wxIconBundle:wxIconBundle()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowseticons">external documentation</a>.
+-spec setIcons(This, Icons) -> ok when
+ This::wxTopLevelWindow(), Icons::wxIconBundle:wxIconBundle().
setIcons(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconsT,ref=IconsRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
?CLASS(IconsT,wxIconBundle),
wxe_util:cast(?wxTopLevelWindow_SetIcons,
<<ThisRef:32/?UI,IconsRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow()) -> ok
%% @equiv centerOnScreen(This, [])
+-spec centerOnScreen(This) -> ok when
+ This::wxTopLevelWindow().
+
centerOnScreen(This)
when is_record(This, wx_ref) ->
centerOnScreen(This, []).
-%% @spec (This::wxTopLevelWindow(), [Option]) -> ok
-%% Option = {dir, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowcenteronscreen">external documentation</a>.
+-spec centerOnScreen(This, [Option]) -> ok when
+ This::wxTopLevelWindow(),
+ Option :: {dir, integer()}.
centerOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -214,15 +237,18 @@ centerOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxTopLevelWindow_CenterOnScreen,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTopLevelWindow()) -> ok
%% @equiv centreOnScreen(This, [])
+-spec centreOnScreen(This) -> ok when
+ This::wxTopLevelWindow().
+
centreOnScreen(This)
when is_record(This, wx_ref) ->
centreOnScreen(This, []).
-%% @spec (This::wxTopLevelWindow(), [Option]) -> ok
-%% Option = {dir, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowcentreonscreen">external documentation</a>.
+-spec centreOnScreen(This, [Option]) -> ok when
+ This::wxTopLevelWindow(),
+ Option :: {dir, integer()}.
centreOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -232,16 +258,18 @@ centreOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxTopLevelWindow_CentreOnScreen,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTopLevelWindow(), Region::wxRegion:wxRegion()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowsetshape">external documentation</a>.
+-spec setShape(This, Region) -> boolean() when
+ This::wxTopLevelWindow(), Region::wxRegion:wxRegion().
setShape(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
?CLASS(RegionT,wxRegion),
wxe_util:call(?wxTopLevelWindow_SetShape,
<<ThisRef:32/?UI,RegionRef:32/?UI>>).
-%% @spec (This::wxTopLevelWindow(), Title::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowsettitle">external documentation</a>.
+-spec setTitle(This, Title) -> ok when
+ This::wxTopLevelWindow(), Title::unicode:chardata().
setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title)
when is_list(Title) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -249,15 +277,18 @@ setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title)
wxe_util:cast(?wxTopLevelWindow_SetTitle,
<<ThisRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTopLevelWindow(), Show::bool()) -> bool()
%% @equiv showFullScreen(This,Show, [])
+-spec showFullScreen(This, Show) -> boolean() when
+ This::wxTopLevelWindow(), Show::boolean().
+
showFullScreen(This,Show)
when is_record(This, wx_ref),is_boolean(Show) ->
showFullScreen(This,Show, []).
-%% @spec (This::wxTopLevelWindow(), Show::bool(), [Option]) -> bool()
-%% Option = {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowshowfullscreen">external documentation</a>.
+-spec showFullScreen(This, Show, [Option]) -> boolean() when
+ This::wxTopLevelWindow(), Show::boolean(),
+ Option :: {style, integer()}.
showFullScreen(#wx_ref{type=ThisT,ref=ThisRef},Show, Options)
when is_boolean(Show),is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
diff --git a/lib/wx/src/gen/wxTreeCtrl.erl b/lib/wx/src/gen/wxTreeCtrl.erl
index 77705ec76e..dfa9e691ce 100644
--- a/lib/wx/src/gen/wxTreeCtrl.erl
+++ b/lib/wx/src/gen/wxTreeCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -89,27 +89,36 @@
show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,update/1,
updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxTreeCtrl/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxTreeCtrl()
+-type wxTreeCtrl() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlwxtreectrl">external documentation</a>.
+-spec new() -> wxTreeCtrl().
new() ->
wxe_util:construct(?wxTreeCtrl_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow()) -> wxTreeCtrl()
%% @equiv new(Parent, [])
+-spec new(Parent) -> wxTreeCtrl() when
+ Parent::wxWindow:wxWindow().
+
new(Parent)
when is_record(Parent, wx_ref) ->
new(Parent, []).
-%% @spec (Parent::wxWindow:wxWindow(), [Option]) -> wxTreeCtrl()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlwxtreectrl">external documentation</a>.
+-spec new(Parent, [Option]) -> wxTreeCtrl() when
+ Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -123,15 +132,20 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
wxe_util:construct(?wxTreeCtrl_new_2,
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Text::string()) -> integer()
%% @equiv addRoot(This,Text, [])
+-spec addRoot(This, Text) -> integer() when
+ This::wxTreeCtrl(), Text::unicode:chardata().
+
addRoot(This,Text)
when is_record(This, wx_ref),is_list(Text) ->
addRoot(This,Text, []).
-%% @spec (This::wxTreeCtrl(), Text::string(), [Option]) -> integer()
-%% Option = {image, integer()} | {selectedImage, integer()} | {data, term()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrladdroot">external documentation</a>.
+-spec addRoot(This, Text, [Option]) -> integer() when
+ This::wxTreeCtrl(), Text::unicode:chardata(),
+ Option :: {image, integer()}
+ | {selectedImage, integer()}
+ | {data, term()}.
addRoot(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -144,15 +158,20 @@ addRoot(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
wxe_util:call(?wxTreeCtrl_AddRoot,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Parent::integer(), Text::string()) -> integer()
%% @equiv appendItem(This,Parent,Text, [])
+-spec appendItem(This, Parent, Text) -> integer() when
+ This::wxTreeCtrl(), Parent::integer(), Text::unicode:chardata().
+
appendItem(This,Parent,Text)
when is_record(This, wx_ref),is_integer(Parent),is_list(Text) ->
appendItem(This,Parent,Text, []).
-%% @spec (This::wxTreeCtrl(), Parent::integer(), Text::string(), [Option]) -> integer()
-%% Option = {image, integer()} | {selectedImage, integer()} | {data, term()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlappenditem">external documentation</a>.
+-spec appendItem(This, Parent, Text, [Option]) -> integer() when
+ This::wxTreeCtrl(), Parent::integer(), Text::unicode:chardata(),
+ Option :: {image, integer()}
+ | {selectedImage, integer()}
+ | {data, term()}.
appendItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
when is_integer(Parent),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -165,47 +184,58 @@ appendItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
wxe_util:call(?wxTreeCtrl_AppendItem,
<<ThisRef:32/?UI,0:32,Parent:64/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlassignimagelist">external documentation</a>.
+-spec assignImageList(This, ImageList) -> ok when
+ This::wxTreeCtrl(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreeCtrl),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxTreeCtrl_AssignImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlassignstateimagelist">external documentation</a>.
+-spec assignStateImageList(This, ImageList) -> ok when
+ This::wxTreeCtrl(), ImageList::wxImageList:wxImageList().
assignStateImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreeCtrl),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxTreeCtrl_AssignStateImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlcollapse">external documentation</a>.
+-spec collapse(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
collapse(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Collapse,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlcollapseandreset">external documentation</a>.
+-spec collapseAndReset(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
collapseAndReset(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_CollapseAndReset,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Parent::wxWindow:wxWindow()) -> bool()
%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxTreeCtrl(), Parent::wxWindow:wxWindow().
+
create(This,Parent)
when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
create(This,Parent, []).
-%% @spec (This::wxTreeCtrl(), Parent::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {id, integer()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlcreate">external documentation</a>.
+-spec create(This, Parent, [Option]) -> boolean() when
+ This::wxTreeCtrl(), Parent::wxWindow:wxWindow(),
+ Option :: {id, integer()}
+ | {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}
+ | {validator, wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -220,62 +250,71 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
wxe_util:call(?wxTreeCtrl_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrldelete">external documentation</a>.
+-spec delete(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
delete(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Delete,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrldeleteallitems">external documentation</a>.
+-spec deleteAllItems(This) -> ok when
+ This::wxTreeCtrl().
deleteAllItems(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_DeleteAllItems,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrldeletechildren">external documentation</a>.
+-spec deleteChildren(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
deleteChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_DeleteChildren,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> wxTextCtrl:wxTextCtrl()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrleditlabel">external documentation</a>.
+-spec editLabel(This, Item) -> wxTextCtrl:wxTextCtrl() when
+ This::wxTreeCtrl(), Item::integer().
editLabel(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_EditLabel,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlensurevisible">external documentation</a>.
+-spec ensureVisible(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_EnsureVisible,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlexpand">external documentation</a>.
+-spec expand(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
expand(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Expand,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool()
%% @equiv getBoundingRect(This,Item,Rect, [])
+-spec getBoundingRect(This, Item, Rect) -> boolean() when
+ This::wxTreeCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
+
getBoundingRect(This,Item,Rect={RectX,RectY,RectW,RectH})
when is_record(This, wx_ref),is_integer(Item),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
getBoundingRect(This,Item,Rect, []).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, [Option]) -> bool()
-%% Option = {textOnly, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetboundingrect">external documentation</a>.
+-spec getBoundingRect(This, Item, Rect, [Option]) -> boolean() when
+ This::wxTreeCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},
+ Option :: {textOnly, boolean()}.
getBoundingRect(#wx_ref{type=ThisT,ref=ThisRef},Item,{RectX,RectY,RectW,RectH}, Options)
when is_integer(Item),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -285,15 +324,18 @@ getBoundingRect(#wx_ref{type=ThisT,ref=ThisRef},Item,{RectX,RectY,RectW,RectH},
wxe_util:call(?wxTreeCtrl_GetBoundingRect,
<<ThisRef:32/?UI,0:32,Item:64/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @equiv getChildrenCount(This,Item, [])
+-spec getChildrenCount(This, Item) -> integer() when
+ This::wxTreeCtrl(), Item::integer().
+
getChildrenCount(This,Item)
when is_record(This, wx_ref),is_integer(Item) ->
getChildrenCount(This,Item, []).
-%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> integer()
-%% Option = {recursively, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetchildrencount">external documentation</a>.
+-spec getChildrenCount(This, Item, [Option]) -> integer() when
+ This::wxTreeCtrl(), Item::integer(),
+ Option :: {recursively, boolean()}.
getChildrenCount(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -303,94 +345,107 @@ getChildrenCount(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
wxe_util:call(?wxTreeCtrl_GetChildrenCount,
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetcount">external documentation</a>.
+-spec getCount(This) -> integer() when
+ This::wxTreeCtrl().
getCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> wxTextCtrl:wxTextCtrl()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgeteditcontrol">external documentation</a>.
+-spec getEditControl(This) -> wxTextCtrl:wxTextCtrl() when
+ This::wxTreeCtrl().
getEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetEditControl,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> {integer(), Cookie::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetfirstchild">external documentation</a>.
+-spec getFirstChild(This, Item) -> Result when
+ Result ::{Res ::integer(), Cookie::integer()},
+ This::wxTreeCtrl(), Item::integer().
getFirstChild(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetFirstChild,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Cookie::integer()) -> {integer(), Cookie::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetnextchild">external documentation</a>.
+-spec getNextChild(This, Item, Cookie) -> Result when
+ Result ::{Res ::integer(), Cookie::integer()},
+ This::wxTreeCtrl(), Item::integer(), Cookie::integer().
getNextChild(#wx_ref{type=ThisT,ref=ThisRef},Item,Cookie)
when is_integer(Item),is_integer(Cookie) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetNextChild,
<<ThisRef:32/?UI,0:32,Item:64/?UI,Cookie:64/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetfirstvisibleitem">external documentation</a>.
+-spec getFirstVisibleItem(This) -> integer() when
+ This::wxTreeCtrl().
getFirstVisibleItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetFirstVisibleItem,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> wxImageList:wxImageList()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetimagelist">external documentation</a>.
+-spec getImageList(This) -> wxImageList:wxImageList() when
+ This::wxTreeCtrl().
getImageList(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetImageList,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetindent">external documentation</a>.
+-spec getIndent(This) -> integer() when
+ This::wxTreeCtrl().
getIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetIndent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitembackgroundcolour">external documentation</a>.
+-spec getItemBackgroundColour(This, Item) -> wx:wx_colour4() when
+ This::wxTreeCtrl(), Item::integer().
getItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemBackgroundColour,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> term()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemdata">external documentation</a>.
+-spec getItemData(This, Item) -> term() when
+ This::wxTreeCtrl(), Item::integer().
getItemData(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemData,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemfont">external documentation</a>.
+-spec getItemFont(This, Item) -> wxFont:wxFont() when
+ This::wxTreeCtrl(), Item::integer().
getItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemFont,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemimage">external documentation</a>.
+-spec getItemImage(This, Item) -> integer() when
+ This::wxTreeCtrl(), Item::integer().
getItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemImage_1,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> integer()
-%% Option = {which, WxTreeItemIcon}
-%% WxTreeItemIcon = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemimage">external documentation</a>.
-%%<br /> WxTreeItemIcon is one of ?wxTreeItemIcon_Normal | ?wxTreeItemIcon_Selected | ?wxTreeItemIcon_Expanded | ?wxTreeItemIcon_SelectedExpanded | ?wxTreeItemIcon_Max
+%%<br /> Which = ?wxTreeItemIcon_Normal | ?wxTreeItemIcon_Selected | ?wxTreeItemIcon_Expanded | ?wxTreeItemIcon_SelectedExpanded | ?wxTreeItemIcon_Max
+-spec getItemImage(This, Item, [Option]) -> integer() when
+ This::wxTreeCtrl(), Item::integer(),
+ Option :: {which, wx:wx_enum()}.
getItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -400,115 +455,134 @@ getItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
wxe_util:call(?wxTreeCtrl_GetItemImage_2,
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemtext">external documentation</a>.
+-spec getItemText(This, Item) -> unicode:charlist() when
+ This::wxTreeCtrl(), Item::integer().
getItemText(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemText,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemtextcolour">external documentation</a>.
+-spec getItemTextColour(This, Item) -> wx:wx_colour4() when
+ This::wxTreeCtrl(), Item::integer().
getItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemTextColour,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetlastchild">external documentation</a>.
+-spec getLastChild(This, Item) -> integer() when
+ This::wxTreeCtrl(), Item::integer().
getLastChild(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetLastChild,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetnextsibling">external documentation</a>.
+-spec getNextSibling(This, Item) -> integer() when
+ This::wxTreeCtrl(), Item::integer().
getNextSibling(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetNextSibling,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetnextvisible">external documentation</a>.
+-spec getNextVisible(This, Item) -> integer() when
+ This::wxTreeCtrl(), Item::integer().
getNextVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetNextVisible,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetitemparent">external documentation</a>.
+-spec getItemParent(This, Item) -> integer() when
+ This::wxTreeCtrl(), Item::integer().
getItemParent(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetItemParent,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetprevsibling">external documentation</a>.
+-spec getPrevSibling(This, Item) -> integer() when
+ This::wxTreeCtrl(), Item::integer().
getPrevSibling(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetPrevSibling,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetprevvisible">external documentation</a>.
+-spec getPrevVisible(This, Item) -> integer() when
+ This::wxTreeCtrl(), Item::integer().
getPrevVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetPrevVisible,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetrootitem">external documentation</a>.
+-spec getRootItem(This) -> integer() when
+ This::wxTreeCtrl().
getRootItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetRootItem,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxTreeCtrl().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> {integer(), Val::[integer()]}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetselections">external documentation</a>.
+-spec getSelections(This) -> Result when
+ Result ::{Res ::integer(), Val::[integer()]},
+ This::wxTreeCtrl().
getSelections(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetSelections,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> wxImageList:wxImageList()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetstateimagelist">external documentation</a>.
+-spec getStateImageList(This) -> wxImageList:wxImageList() when
+ This::wxTreeCtrl().
getStateImageList(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_GetStateImageList,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Point::{X::integer(), Y::integer()}) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlhittest">external documentation</a>.
+-spec hitTest(This, Point) -> integer() when
+ This::wxTreeCtrl(), Point::{X::integer(), Y::integer()}.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY})
when is_integer(PointX),is_integer(PointY) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_HitTest,
<<ThisRef:32/?UI,PointX:32/?UI,PointY:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Parent::integer(), Pos::integer(), Text::string()) -> integer()
%% @equiv insertItem(This,Parent,Pos,Text, [])
+-spec insertItem(This, Parent, Pos, Text) -> integer() when
+ This::wxTreeCtrl(), Parent::integer(), Pos::integer(), Text::unicode:chardata().
+
insertItem(This,Parent,Pos,Text)
when is_record(This, wx_ref),is_integer(Parent),is_integer(Pos),is_list(Text) ->
insertItem(This,Parent,Pos,Text, []).
-%% @spec (This::wxTreeCtrl(), Parent::integer(), Pos::integer(), Text::string(), [Option]) -> integer()
-%% Option = {image, integer()} | {selImage, integer()} | {data, term()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlinsertitem">external documentation</a>.
+-spec insertItem(This, Parent, Pos, Text, [Option]) -> integer() when
+ This::wxTreeCtrl(), Parent::integer(), Pos::integer(), Text::unicode:chardata(),
+ Option :: {image, integer()}
+ | {selImage, integer()}
+ | {data, term()}.
insertItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Pos,Text, Options)
when is_integer(Parent),is_integer(Pos),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -521,55 +595,65 @@ insertItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Pos,Text, Options)
wxe_util:call(?wxTreeCtrl_InsertItem,
<<ThisRef:32/?UI,0:32,Parent:64/?UI,Pos:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlisbold">external documentation</a>.
+-spec isBold(This, Item) -> boolean() when
+ This::wxTreeCtrl(), Item::integer().
isBold(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_IsBold,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlisexpanded">external documentation</a>.
+-spec isExpanded(This, Item) -> boolean() when
+ This::wxTreeCtrl(), Item::integer().
isExpanded(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_IsExpanded,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlisselected">external documentation</a>.
+-spec isSelected(This, Item) -> boolean() when
+ This::wxTreeCtrl(), Item::integer().
isSelected(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_IsSelected,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlisvisible">external documentation</a>.
+-spec isVisible(This, Item) -> boolean() when
+ This::wxTreeCtrl(), Item::integer().
isVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_IsVisible,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlitemhaschildren">external documentation</a>.
+-spec itemHasChildren(This, Item) -> boolean() when
+ This::wxTreeCtrl(), Item::integer().
itemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:call(?wxTreeCtrl_ItemHasChildren,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Parent::integer(), Text::string()) -> integer()
%% @equiv prependItem(This,Parent,Text, [])
+-spec prependItem(This, Parent, Text) -> integer() when
+ This::wxTreeCtrl(), Parent::integer(), Text::unicode:chardata().
+
prependItem(This,Parent,Text)
when is_record(This, wx_ref),is_integer(Parent),is_list(Text) ->
prependItem(This,Parent,Text, []).
-%% @spec (This::wxTreeCtrl(), Parent::integer(), Text::string(), [Option]) -> integer()
-%% Option = {image, integer()} | {selectedImage, integer()} | {data, term()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlprependitem">external documentation</a>.
+-spec prependItem(This, Parent, Text, [Option]) -> integer() when
+ This::wxTreeCtrl(), Parent::integer(), Text::unicode:chardata(),
+ Option :: {image, integer()}
+ | {selectedImage, integer()}
+ | {data, term()}.
prependItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
when is_integer(Parent),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -582,25 +666,28 @@ prependItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
wxe_util:call(?wxTreeCtrl_PrependItem,
<<ThisRef:32/?UI,0:32,Parent:64/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlscrollto">external documentation</a>.
+-spec scrollTo(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
scrollTo(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_ScrollTo,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlselectitem">external documentation</a>.
+-spec selectItem(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SelectItem_1,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> ok
-%% Option = {select, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlselectitem">external documentation</a>.
+-spec selectItem(This, Item, [Option]) -> ok when
+ This::wxTreeCtrl(), Item::integer(),
+ Option :: {select, boolean()}.
selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -610,39 +697,45 @@ selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
wxe_util:cast(?wxTreeCtrl_SelectItem_2,
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Indent::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetindent">external documentation</a>.
+-spec setIndent(This, Indent) -> ok when
+ This::wxTreeCtrl(), Indent::integer().
setIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent)
when is_integer(Indent) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SetIndent,
<<ThisRef:32/?UI,Indent:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetimagelist">external documentation</a>.
+-spec setImageList(This, ImageList) -> ok when
+ This::wxTreeCtrl(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreeCtrl),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxTreeCtrl_SetImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitembackgroundcolour">external documentation</a>.
+-spec setItemBackgroundColour(This, Item, Col) -> ok when
+ This::wxTreeCtrl(), Item::integer(), Col::wx:wx_colour().
setItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SetItemBackgroundColour,
<<ThisRef:32/?UI,0:32,Item:64/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @equiv setItemBold(This,Item, [])
+-spec setItemBold(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
+
setItemBold(This,Item)
when is_record(This, wx_ref),is_integer(Item) ->
setItemBold(This,Item, []).
-%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> ok
-%% Option = {bold, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitembold">external documentation</a>.
+-spec setItemBold(This, Item, [Option]) -> ok when
+ This::wxTreeCtrl(), Item::integer(),
+ Option :: {bold, boolean()}.
setItemBold(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -652,8 +745,9 @@ setItemBold(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
wxe_util:cast(?wxTreeCtrl_SetItemBold,
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Data::term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemdata">external documentation</a>.
+-spec setItemData(This, Item, Data) -> ok when
+ This::wxTreeCtrl(), Item::integer(), Data::term().
setItemData(#wx_ref{type=ThisT,ref=ThisRef},Item,Data)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -661,15 +755,18 @@ setItemData(#wx_ref{type=ThisT,ref=ThisRef},Item,Data)
wxe_util:cast(?wxTreeCtrl_SetItemData,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @equiv setItemDropHighlight(This,Item, [])
+-spec setItemDropHighlight(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
+
setItemDropHighlight(This,Item)
when is_record(This, wx_ref),is_integer(Item) ->
setItemDropHighlight(This,Item, []).
-%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> ok
-%% Option = {highlight, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemdrophighlight">external documentation</a>.
+-spec setItemDropHighlight(This, Item, [Option]) -> ok when
+ This::wxTreeCtrl(), Item::integer(),
+ Option :: {highlight, boolean()}.
setItemDropHighlight(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -679,8 +776,9 @@ setItemDropHighlight(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
wxe_util:cast(?wxTreeCtrl_SetItemDropHighlight,
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemfont">external documentation</a>.
+-spec setItemFont(This, Item, Font) -> ok when
+ This::wxTreeCtrl(), Item::integer(), Font::wxFont:wxFont().
setItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item,#wx_ref{type=FontT,ref=FontRef})
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -688,15 +786,18 @@ setItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item,#wx_ref{type=FontT,ref=FontRef}
wxe_util:cast(?wxTreeCtrl_SetItemFont,
<<ThisRef:32/?UI,0:32,Item:64/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @equiv setItemHasChildren(This,Item, [])
+-spec setItemHasChildren(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
+
setItemHasChildren(This,Item)
when is_record(This, wx_ref),is_integer(Item) ->
setItemHasChildren(This,Item, []).
-%% @spec (This::wxTreeCtrl(), Item::integer(), [Option]) -> ok
-%% Option = {has, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemhaschildren">external documentation</a>.
+-spec setItemHasChildren(This, Item, [Option]) -> ok when
+ This::wxTreeCtrl(), Item::integer(),
+ Option :: {has, boolean()}.
setItemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -706,19 +807,20 @@ setItemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
wxe_util:cast(?wxTreeCtrl_SetItemHasChildren,
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Image::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemimage">external documentation</a>.
+-spec setItemImage(This, Item, Image) -> ok when
+ This::wxTreeCtrl(), Item::integer(), Image::integer().
setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image)
when is_integer(Item),is_integer(Image) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SetItemImage_2,
<<ThisRef:32/?UI,0:32,Item:64/?UI,Image:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Image::integer(), [Option]) -> ok
-%% Option = {which, WxTreeItemIcon}
-%% WxTreeItemIcon = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemimage">external documentation</a>.
-%%<br /> WxTreeItemIcon is one of ?wxTreeItemIcon_Normal | ?wxTreeItemIcon_Selected | ?wxTreeItemIcon_Expanded | ?wxTreeItemIcon_SelectedExpanded | ?wxTreeItemIcon_Max
+%%<br /> Which = ?wxTreeItemIcon_Normal | ?wxTreeItemIcon_Selected | ?wxTreeItemIcon_Expanded | ?wxTreeItemIcon_SelectedExpanded | ?wxTreeItemIcon_Max
+-spec setItemImage(This, Item, Image, [Option]) -> ok when
+ This::wxTreeCtrl(), Item::integer(), Image::integer(),
+ Option :: {which, wx:wx_enum()}.
setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image, Options)
when is_integer(Item),is_integer(Image),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -728,8 +830,9 @@ setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image, Options)
wxe_util:cast(?wxTreeCtrl_SetItemImage_3,
<<ThisRef:32/?UI,0:32,Item:64/?UI,Image:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemtext">external documentation</a>.
+-spec setItemText(This, Item, Text) -> ok when
+ This::wxTreeCtrl(), Item::integer(), Text::unicode:chardata().
setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
when is_integer(Item),is_list(Text) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -737,78 +840,87 @@ setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
wxe_util:cast(?wxTreeCtrl_SetItemText,
<<ThisRef:32/?UI,0:32,Item:64/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTreeCtrl(), Item::integer(), Col::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetitemtextcolour">external documentation</a>.
+-spec setItemTextColour(This, Item, Col) -> ok when
+ This::wxTreeCtrl(), Item::integer(), Col::wx:wx_colour().
setItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SetItemTextColour,
<<ThisRef:32/?UI,0:32,Item:64/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
-%% @spec (This::wxTreeCtrl(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetstateimagelist">external documentation</a>.
+-spec setStateImageList(This, ImageList) -> ok when
+ This::wxTreeCtrl(), ImageList::wxImageList:wxImageList().
setStateImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreeCtrl),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxTreeCtrl_SetStateImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Styles::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsetwindowstyle">external documentation</a>.
+-spec setWindowStyle(This, Styles) -> ok when
+ This::wxTreeCtrl(), Styles::integer().
setWindowStyle(#wx_ref{type=ThisT,ref=ThisRef},Styles)
when is_integer(Styles) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SetWindowStyle,
<<ThisRef:32/?UI,Styles:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlsortchildren">external documentation</a>.
+-spec sortChildren(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
sortChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_SortChildren,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrltoggle">external documentation</a>.
+-spec toggle(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
toggle(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Toggle,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrltoggleitemselection">external documentation</a>.
+-spec toggleItemSelection(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
toggleItemSelection(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_ToggleItemSelection,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlunselect">external documentation</a>.
+-spec unselect(This) -> ok when
+ This::wxTreeCtrl().
unselect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_Unselect,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlunselectall">external documentation</a>.
+-spec unselectAll(This) -> ok when
+ This::wxTreeCtrl().
unselectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_UnselectAll,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeCtrl(), Item::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlunselectitem">external documentation</a>.
+-spec unselectItem(This, Item) -> ok when
+ This::wxTreeCtrl(), Item::integer().
unselectItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
?CLASS(ThisT,wxTreeCtrl),
wxe_util:cast(?wxTreeCtrl_UnselectItem,
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
-%% @spec (This::wxTreeCtrl()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxTreeCtrl()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTreeCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxTreeEvent.erl b/lib/wx/src/gen/wxTreeEvent.erl
index 0264d43568..d042fb93e5 100644
--- a/lib/wx/src/gen/wxTreeEvent.erl
+++ b/lib/wx/src/gen/wxTreeEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,63 +42,73 @@
isSelection/1,parent_class/1,resumePropagation/2,setInt/2,setString/2,
shouldPropagate/1,skip/1,skip/2,stopPropagation/1,veto/1]).
+-export_type([wxTreeEvent/0]).
%% @hidden
parent_class(wxNotifyEvent) -> true;
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (This::wxTreeEvent()) -> integer()
+-type wxTreeEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventgetkeycode">external documentation</a>.
+-spec getKeyCode(This) -> integer() when
+ This::wxTreeEvent().
getKeyCode(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
wxe_util:call(?wxTreeEvent_GetKeyCode,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventgetitem">external documentation</a>.
+-spec getItem(This) -> integer() when
+ This::wxTreeEvent().
getItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
wxe_util:call(?wxTreeEvent_GetItem,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent()) -> wxKeyEvent:wxKeyEvent()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventgetkeyevent">external documentation</a>.
+-spec getKeyEvent(This) -> wxKeyEvent:wxKeyEvent() when
+ This::wxTreeEvent().
getKeyEvent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
wxe_util:call(?wxTreeEvent_GetKeyEvent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventgetlabel">external documentation</a>.
+-spec getLabel(This) -> unicode:charlist() when
+ This::wxTreeEvent().
getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
wxe_util:call(?wxTreeEvent_GetLabel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventgetolditem">external documentation</a>.
+-spec getOldItem(This) -> integer() when
+ This::wxTreeEvent().
getOldItem(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
wxe_util:call(?wxTreeEvent_GetOldItem,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventgetpoint">external documentation</a>.
+-spec getPoint(This) -> {X::integer(), Y::integer()} when
+ This::wxTreeEvent().
getPoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
wxe_util:call(?wxTreeEvent_GetPoint,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventiseditcancelled">external documentation</a>.
+-spec isEditCancelled(This) -> boolean() when
+ This::wxTreeEvent().
isEditCancelled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeEvent),
wxe_util:call(?wxTreeEvent_IsEditCancelled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreeEvent(), ToolTip::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreeevent.html#wxtreeeventsettooltip">external documentation</a>.
+-spec setToolTip(This, ToolTip) -> ok when
+ This::wxTreeEvent(), ToolTip::unicode:chardata().
setToolTip(#wx_ref{type=ThisT,ref=ThisRef},ToolTip)
when is_list(ToolTip) ->
?CLASS(ThisT,wxTreeEvent),
diff --git a/lib/wx/src/gen/wxTreebook.erl b/lib/wx/src/gen/wxTreebook.erl
index 24f5d72c43..5d08c12cce 100644
--- a/lib/wx/src/gen/wxTreebook.erl
+++ b/lib/wx/src/gen/wxTreebook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -75,27 +75,34 @@
show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+-export_type([wxTreebook/0]).
%% @hidden
parent_class(wxControl) -> true;
parent_class(wxWindow) -> true;
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxTreebook()
+-type wxTreebook() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookwxtreebook">external documentation</a>.
+-spec new() -> wxTreebook().
new() ->
wxe_util:construct(?wxTreebook_new_0,
<<>>).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxTreebook()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxTreebook() when
+ Parent::wxWindow:wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxTreebook()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookwxtreebook">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxTreebook() when
+ Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -107,15 +114,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxTreebook_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreebook(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv addPage(This,Page,Text, [])
+-spec addPage(This, Page, Text) -> boolean() when
+ This::wxTreebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
addPage(This,Page,Text)
when is_record(This, wx_ref),is_record(Page, wx_ref),is_list(Text) ->
addPage(This,Page,Text, []).
-%% @spec (This::wxTreebook(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookaddpage">external documentation</a>.
+-spec addPage(This, Page, Text, [Option]) -> boolean() when
+ This::wxTreebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -128,15 +139,18 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
wxe_util:call(?wxTreebook_AddPage,
<<ThisRef:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreebook()) -> ok
%% @equiv advanceSelection(This, [])
+-spec advanceSelection(This) -> ok when
+ This::wxTreebook().
+
advanceSelection(This)
when is_record(This, wx_ref) ->
advanceSelection(This, []).
-%% @spec (This::wxTreebook(), [Option]) -> ok
-%% Option = {forward, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookadvanceselection">external documentation</a>.
+-spec advanceSelection(This, [Option]) -> ok when
+ This::wxTreebook(),
+ Option :: {forward, boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -146,23 +160,29 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxTreebook_AdvanceSelection,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTreebook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookassignimagelist">external documentation</a>.
+-spec assignImageList(This, ImageList) -> ok when
+ This::wxTreebook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreebook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxTreebook_AssignImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxTreebook(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool()
%% @equiv create(This,Parent,Id, [])
+-spec create(This, Parent, Id) -> boolean() when
+ This::wxTreebook(), Parent::wxWindow:wxWindow(), Id::integer().
+
create(This,Parent,Id)
when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) ->
create(This,Parent,Id, []).
-%% @spec (This::wxTreebook(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookcreate">external documentation</a>.
+-spec create(This, Parent, Id, [Option]) -> boolean() when
+ This::wxTreebook(), Parent::wxWindow:wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -175,90 +195,103 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
wxe_util:call(?wxTreebook_Create,
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxTreebook()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookdeleteallpages">external documentation</a>.
+-spec deleteAllPages(This) -> boolean() when
+ This::wxTreebook().
deleteAllPages(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_DeleteAllPages,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreebook(), Pos::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookdeletepage">external documentation</a>.
+-spec deletePage(This, Pos) -> boolean() when
+ This::wxTreebook(), Pos::integer().
deletePage(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_DeletePage,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxTreebook(), N::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookremovepage">external documentation</a>.
+-spec removePage(This, N) -> boolean() when
+ This::wxTreebook(), N::integer().
removePage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_RemovePage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxTreebook()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookgetcurrentpage">external documentation</a>.
+-spec getCurrentPage(This) -> wxWindow:wxWindow() when
+ This::wxTreebook().
getCurrentPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_GetCurrentPage,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreebook()) -> wxImageList:wxImageList()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookgetimagelist">external documentation</a>.
+-spec getImageList(This) -> wxImageList:wxImageList() when
+ This::wxTreebook().
getImageList(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_GetImageList,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreebook(), N::integer()) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookgetpage">external documentation</a>.
+-spec getPage(This, N) -> wxWindow:wxWindow() when
+ This::wxTreebook(), N::integer().
getPage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_GetPage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxTreebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookgetpagecount">external documentation</a>.
+-spec getPageCount(This) -> integer() when
+ This::wxTreebook().
getPageCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_GetPageCount,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreebook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookgetpageimage">external documentation</a>.
+-spec getPageImage(This, N) -> integer() when
+ This::wxTreebook(), N::integer().
getPageImage(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_GetPageImage,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxTreebook(), N::integer()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookgetpagetext">external documentation</a>.
+-spec getPageText(This, N) -> unicode:charlist() when
+ This::wxTreebook(), N::integer().
getPageText(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_GetPageText,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxTreebook()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookgetselection">external documentation</a>.
+-spec getSelection(This) -> integer() when
+ This::wxTreebook().
getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_GetSelection,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxTreebook(), Pos::integer()) -> bool()
%% @equiv expandNode(This,Pos, [])
+-spec expandNode(This, Pos) -> boolean() when
+ This::wxTreebook(), Pos::integer().
+
expandNode(This,Pos)
when is_record(This, wx_ref),is_integer(Pos) ->
expandNode(This,Pos, []).
-%% @spec (This::wxTreebook(), Pos::integer(), [Option]) -> bool()
-%% Option = {expand, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookexpandnode">external documentation</a>.
+-spec expandNode(This, Pos, [Option]) -> boolean() when
+ This::wxTreebook(), Pos::integer(),
+ Option :: {expand, boolean()}.
expandNode(#wx_ref{type=ThisT,ref=ThisRef},Pos, Options)
when is_integer(Pos),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -268,31 +301,38 @@ expandNode(#wx_ref{type=ThisT,ref=ThisRef},Pos, Options)
wxe_util:call(?wxTreebook_ExpandNode,
<<ThisRef:32/?UI,Pos:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxTreebook(), Pos::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookisnodeexpanded">external documentation</a>.
+-spec isNodeExpanded(This, Pos) -> boolean() when
+ This::wxTreebook(), Pos::integer().
isNodeExpanded(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_IsNodeExpanded,
<<ThisRef:32/?UI,Pos:32/?UI>>).
-%% @spec (This::wxTreebook(), Pt::{X::integer(), Y::integer()}) -> {integer(), Flags::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookhittest">external documentation</a>.
+-spec hitTest(This, Pt) -> Result when
+ Result ::{Res ::integer(), Flags::integer()},
+ This::wxTreebook(), Pt::{X::integer(), Y::integer()}.
hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_HitTest,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv insertPage(This,Pos,Page,Text, [])
+-spec insertPage(This, Pos, Page, Text) -> boolean() when
+ This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
insertPage(This,Pos,Page,Text)
when is_record(This, wx_ref),is_integer(Pos),is_record(Page, wx_ref),is_list(Text) ->
insertPage(This,Pos,Page,Text, []).
-%% @spec (This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookinsertpage">external documentation</a>.
+-spec insertPage(This, Pos, Page, Text, [Option]) -> boolean() when
+ This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(Pos),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -305,15 +345,19 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=PageT,ref=PageRef},T
wxe_util:call(?wxTreebook_InsertPage,
<<ThisRef:32/?UI,Pos:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::string()) -> bool()
%% @equiv insertSubPage(This,Pos,Page,Text, [])
+-spec insertSubPage(This, Pos, Page, Text) -> boolean() when
+ This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata().
+
insertSubPage(This,Pos,Page,Text)
when is_record(This, wx_ref),is_integer(Pos),is_record(Page, wx_ref),is_list(Text) ->
insertSubPage(This,Pos,Page,Text, []).
-%% @spec (This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::string(), [Option]) -> bool()
-%% Option = {bSelect, bool()} | {imageId, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookinsertsubpage">external documentation</a>.
+-spec insertSubPage(This, Pos, Page, Text, [Option]) -> boolean() when
+ This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
+ Option :: {bSelect, boolean()}
+ | {imageId, integer()}.
insertSubPage(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(Pos),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -326,32 +370,36 @@ insertSubPage(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=PageT,ref=PageRef
wxe_util:call(?wxTreebook_InsertSubPage,
<<ThisRef:32/?UI,Pos:32/?UI,PageRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxTreebook(), ImageList::wxImageList:wxImageList()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebooksetimagelist">external documentation</a>.
+-spec setImageList(This, ImageList) -> ok when
+ This::wxTreebook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreebook),
?CLASS(ImageListT,wxImageList),
wxe_util:cast(?wxTreebook_SetImageList,
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
-%% @spec (This::wxTreebook(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebooksetpagesize">external documentation</a>.
+-spec setPageSize(This, Size) -> ok when
+ This::wxTreebook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxTreebook),
wxe_util:cast(?wxTreebook_SetPageSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxTreebook(), N::integer(), ImageId::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebooksetpageimage">external documentation</a>.
+-spec setPageImage(This, N, ImageId) -> boolean() when
+ This::wxTreebook(), N::integer(), ImageId::integer().
setPageImage(#wx_ref{type=ThisT,ref=ThisRef},N,ImageId)
when is_integer(N),is_integer(ImageId) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_SetPageImage,
<<ThisRef:32/?UI,N:32/?UI,ImageId:32/?UI>>).
-%% @spec (This::wxTreebook(), N::integer(), StrText::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebooksetpagetext">external documentation</a>.
+-spec setPageText(This, N, StrText) -> boolean() when
+ This::wxTreebook(), N::integer(), StrText::unicode:chardata().
setPageText(#wx_ref{type=ThisT,ref=ThisRef},N,StrText)
when is_integer(N),is_list(StrText) ->
?CLASS(ThisT,wxTreebook),
@@ -359,24 +407,26 @@ setPageText(#wx_ref{type=ThisT,ref=ThisRef},N,StrText)
wxe_util:call(?wxTreebook_SetPageText,
<<ThisRef:32/?UI,N:32/?UI,(byte_size(StrText_UC)):32/?UI,(StrText_UC)/binary, 0:(((8- ((4+byte_size(StrText_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxTreebook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebooksetselection">external documentation</a>.
+-spec setSelection(This, N) -> integer() when
+ This::wxTreebook(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_SetSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxTreebook(), N::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreebook.html#wxtreebookchangeselection">external documentation</a>.
+-spec changeSelection(This, N) -> integer() when
+ This::wxTreebook(), N::integer().
changeSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
?CLASS(ThisT,wxTreebook),
wxe_util:call(?wxTreebook_ChangeSelection,
<<ThisRef:32/?UI,N:32/?UI>>).
-%% @spec (This::wxTreebook()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxTreebook()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTreebook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxUpdateUIEvent.erl b/lib/wx/src/gen/wxUpdateUIEvent.erl
index baf9fc8b52..f6d46611ab 100644
--- a/lib/wx/src/gen/wxUpdateUIEvent.erl
+++ b/lib/wx/src/gen/wxUpdateUIEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,129 +42,143 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxUpdateUIEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec (Win::wxWindow:wxWindow()) -> bool()
+-type wxUpdateUIEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventcanupdate">external documentation</a>.
+-spec canUpdate(Win) -> boolean() when
+ Win::wxWindow:wxWindow().
canUpdate(#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(WinT,wxWindow),
wxe_util:call(?wxUpdateUIEvent_CanUpdate,
<<WinRef:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent(), Check::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventcheck">external documentation</a>.
+-spec check(This, Check) -> ok when
+ This::wxUpdateUIEvent(), Check::boolean().
check(#wx_ref{type=ThisT,ref=ThisRef},Check)
when is_boolean(Check) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:cast(?wxUpdateUIEvent_Check,
<<ThisRef:32/?UI,(wxe_util:from_bool(Check)):32/?UI>>).
-%% @spec (This::wxUpdateUIEvent(), Enable::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventenable">external documentation</a>.
+-spec enable(This, Enable) -> ok when
+ This::wxUpdateUIEvent(), Enable::boolean().
enable(#wx_ref{type=ThisT,ref=ThisRef},Enable)
when is_boolean(Enable) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:cast(?wxUpdateUIEvent_Enable,
<<ThisRef:32/?UI,(wxe_util:from_bool(Enable)):32/?UI>>).
-%% @spec (This::wxUpdateUIEvent(), Show::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventshow">external documentation</a>.
+-spec show(This, Show) -> ok when
+ This::wxUpdateUIEvent(), Show::boolean().
show(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:cast(?wxUpdateUIEvent_Show,
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
-%% @spec (This::wxUpdateUIEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetchecked">external documentation</a>.
+-spec getChecked(This) -> boolean() when
+ This::wxUpdateUIEvent().
getChecked(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:call(?wxUpdateUIEvent_GetChecked,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetenabled">external documentation</a>.
+-spec getEnabled(This) -> boolean() when
+ This::wxUpdateUIEvent().
getEnabled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:call(?wxUpdateUIEvent_GetEnabled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetshown">external documentation</a>.
+-spec getShown(This) -> boolean() when
+ This::wxUpdateUIEvent().
getShown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:call(?wxUpdateUIEvent_GetShown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetsetchecked">external documentation</a>.
+-spec getSetChecked(This) -> boolean() when
+ This::wxUpdateUIEvent().
getSetChecked(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:call(?wxUpdateUIEvent_GetSetChecked,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetsetenabled">external documentation</a>.
+-spec getSetEnabled(This) -> boolean() when
+ This::wxUpdateUIEvent().
getSetEnabled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:call(?wxUpdateUIEvent_GetSetEnabled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetsetshown">external documentation</a>.
+-spec getSetShown(This) -> boolean() when
+ This::wxUpdateUIEvent().
getSetShown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:call(?wxUpdateUIEvent_GetSetShown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetsettext">external documentation</a>.
+-spec getSetText(This) -> boolean() when
+ This::wxUpdateUIEvent().
getSetText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:call(?wxUpdateUIEvent_GetSetText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgettext">external documentation</a>.
+-spec getText(This) -> unicode:charlist() when
+ This::wxUpdateUIEvent().
getText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxUpdateUIEvent),
wxe_util:call(?wxUpdateUIEvent_GetText,
<<ThisRef:32/?UI>>).
-%% @spec () -> WxUpdateUIMode
-%% WxUpdateUIMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetmode">external documentation</a>.
-%%<br /> WxUpdateUIMode is one of ?wxUPDATE_UI_PROCESS_ALL | ?wxUPDATE_UI_PROCESS_SPECIFIED
+%%<br /> Res = ?wxUPDATE_UI_PROCESS_ALL | ?wxUPDATE_UI_PROCESS_SPECIFIED
+-spec getMode() -> wx:wx_enum().
getMode() ->
wxe_util:call(?wxUpdateUIEvent_GetMode,
<<>>).
-%% @spec () -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventgetupdateinterval">external documentation</a>.
+-spec getUpdateInterval() -> integer().
getUpdateInterval() ->
wxe_util:call(?wxUpdateUIEvent_GetUpdateInterval,
<<>>).
-%% @spec () -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventresetupdatetime">external documentation</a>.
+-spec resetUpdateTime() -> ok.
resetUpdateTime() ->
wxe_util:cast(?wxUpdateUIEvent_ResetUpdateTime,
<<>>).
-%% @spec (Mode::WxUpdateUIMode) -> ok
-%% WxUpdateUIMode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventsetmode">external documentation</a>.
-%%<br /> WxUpdateUIMode is one of ?wxUPDATE_UI_PROCESS_ALL | ?wxUPDATE_UI_PROCESS_SPECIFIED
+%%<br /> Mode = ?wxUPDATE_UI_PROCESS_ALL | ?wxUPDATE_UI_PROCESS_SPECIFIED
+-spec setMode(Mode) -> ok when
+ Mode::wx:wx_enum().
setMode(Mode)
when is_integer(Mode) ->
wxe_util:cast(?wxUpdateUIEvent_SetMode,
<<Mode:32/?UI>>).
-%% @spec (This::wxUpdateUIEvent(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventsettext">external documentation</a>.
+-spec setText(This, Text) -> ok when
+ This::wxUpdateUIEvent(), Text::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxUpdateUIEvent),
@@ -172,8 +186,9 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxUpdateUIEvent_SetText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (UpdateInterval::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxupdateuievent.html#wxupdateuieventsetupdateinterval">external documentation</a>.
+-spec setUpdateInterval(UpdateInterval) -> ok when
+ UpdateInterval::integer().
setUpdateInterval(UpdateInterval)
when is_integer(UpdateInterval) ->
wxe_util:cast(?wxUpdateUIEvent_SetUpdateInterval,
diff --git a/lib/wx/src/gen/wxWindow.erl b/lib/wx/src/gen/wxWindow.erl
index 6b57cf508e..229633a106 100644
--- a/lib/wx/src/gen/wxWindow.erl
+++ b/lib/wx/src/gen/wxWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -69,25 +69,32 @@
%% inherited exports
-export([connect/2,connect/3,disconnect/1,disconnect/2,disconnect/3,parent_class/1]).
+-export_type([wxWindow/0]).
%% @hidden
parent_class(wxEvtHandler) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxWindow()
+-type wxWindow() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowwxwindow">external documentation</a>.
+-spec new() -> wxWindow().
new() ->
wxe_util:construct(?wxWindow_new_0,
<<>>).
-%% @spec (Parent::wxWindow(), Id::integer()) -> wxWindow()
%% @equiv new(Parent,Id, [])
+-spec new(Parent, Id) -> wxWindow() when
+ Parent::wxWindow(), Id::integer().
+
new(Parent,Id)
when is_record(Parent, wx_ref),is_integer(Id) ->
new(Parent,Id, []).
-%% @spec (Parent::wxWindow(), Id::integer(), [Option]) -> wxWindow()
-%% Option = {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowwxwindow">external documentation</a>.
+-spec new(Parent, Id, [Option]) -> wxWindow() when
+ Parent::wxWindow(), Id::integer(),
+ Option :: {pos, {X::integer(), Y::integer()}}
+ | {size, {W::integer(), H::integer()}}
+ | {style, integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -99,30 +106,35 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
wxe_util:construct(?wxWindow_new_3,
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxWindow(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowcachebestsize">external documentation</a>.
+-spec cacheBestSize(This, Size) -> ok when
+ This::wxWindow(), Size::{W::integer(), H::integer()}.
cacheBestSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_CacheBestSize,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowcapturemouse">external documentation</a>.
+-spec captureMouse(This) -> ok when
+ This::wxWindow().
captureMouse(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_CaptureMouse,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @equiv center(This, [])
+-spec center(This) -> ok when
+ This::wxWindow().
+
center(This)
when is_record(This, wx_ref) ->
center(This, []).
-%% @spec (This::wxWindow(), [Option]) -> ok
-%% Option = {dir, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowcenter">external documentation</a>.
+-spec center(This, [Option]) -> ok when
+ This::wxWindow(),
+ Option :: {dir, integer()}.
center(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -132,15 +144,18 @@ center(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxWindow_Center,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> ok
%% @equiv centerOnParent(This, [])
+-spec centerOnParent(This) -> ok when
+ This::wxWindow().
+
centerOnParent(This)
when is_record(This, wx_ref) ->
centerOnParent(This, []).
-%% @spec (This::wxWindow(), [Option]) -> ok
-%% Option = {dir, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowcenteronparent">external documentation</a>.
+-spec centerOnParent(This, [Option]) -> ok when
+ This::wxWindow(),
+ Option :: {dir, integer()}.
centerOnParent(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -150,15 +165,18 @@ centerOnParent(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxWindow_CenterOnParent,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> ok
%% @equiv centre(This, [])
+-spec centre(This) -> ok when
+ This::wxWindow().
+
centre(This)
when is_record(This, wx_ref) ->
centre(This, []).
-%% @spec (This::wxWindow(), [Option]) -> ok
-%% Option = {dir, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowcentre">external documentation</a>.
+-spec centre(This, [Option]) -> ok when
+ This::wxWindow(),
+ Option :: {dir, integer()}.
centre(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -168,15 +186,18 @@ centre(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxWindow_Centre,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> ok
%% @equiv centreOnParent(This, [])
+-spec centreOnParent(This) -> ok when
+ This::wxWindow().
+
centreOnParent(This)
when is_record(This, wx_ref) ->
centreOnParent(This, []).
-%% @spec (This::wxWindow(), [Option]) -> ok
-%% Option = {dir, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowcentreonparent">external documentation</a>.
+-spec centreOnParent(This, [Option]) -> ok when
+ This::wxWindow(),
+ Option :: {dir, integer()}.
centreOnParent(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -186,38 +207,44 @@ centreOnParent(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxWindow_CentreOnParent,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowclearbackground">external documentation</a>.
+-spec clearBackground(This) -> ok when
+ This::wxWindow().
clearBackground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_ClearBackground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(), Pt::{X::integer(), Y::integer()}) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowclienttoscreen">external documentation</a>.
+-spec clientToScreen(This, Pt) -> {X::integer(), Y::integer()} when
+ This::wxWindow(), Pt::{X::integer(), Y::integer()}.
clientToScreen(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ClientToScreen_1,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxWindow(), X::integer(), Y::integer()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowclienttoscreen">external documentation</a>.
+-spec clientToScreen(This, X, Y) -> {X::integer(), Y::integer()} when
+ This::wxWindow(), X::integer(), Y::integer().
clientToScreen(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ClientToScreen_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @equiv close(This, [])
+-spec close(This) -> boolean() when
+ This::wxWindow().
+
close(This)
when is_record(This, wx_ref) ->
close(This, []).
-%% @spec (This::wxWindow(), [Option]) -> bool()
-%% Option = {force, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowclose">external documentation</a>.
+-spec close(This, [Option]) -> boolean() when
+ This::wxWindow(),
+ Option :: {force, boolean()}.
close(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -227,52 +254,60 @@ close(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxWindow_Close,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Sz::{W::integer(), H::integer()}) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowconvertdialogtopixels">external documentation</a>.
+-spec convertDialogToPixels(This, Sz) -> {W::integer(), H::integer()} when
+ This::wxWindow(), Sz::{W::integer(), H::integer()}.
convertDialogToPixels(#wx_ref{type=ThisT,ref=ThisRef},{SzW,SzH})
when is_integer(SzW),is_integer(SzH) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ConvertDialogToPixels,
<<ThisRef:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
-%% @spec (This::wxWindow(), Sz::{W::integer(), H::integer()}) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowconvertpixelstodialog">external documentation</a>.
+-spec convertPixelsToDialog(This, Sz) -> {W::integer(), H::integer()} when
+ This::wxWindow(), Sz::{W::integer(), H::integer()}.
convertPixelsToDialog(#wx_ref{type=ThisT,ref=ThisRef},{SzW,SzH})
when is_integer(SzW),is_integer(SzH) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ConvertPixelsToDialog,
<<ThisRef:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowdestroy">external documentation</a>.
+-spec 'Destroy'(This) -> boolean() when
+ This::wxWindow().
'Destroy'(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_Destroy,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowdestroychildren">external documentation</a>.
+-spec destroyChildren(This) -> boolean() when
+ This::wxWindow().
destroyChildren(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_DestroyChildren,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowdisable">external documentation</a>.
+-spec disable(This) -> boolean() when
+ This::wxWindow().
disable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_Disable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @equiv enable(This, [])
+-spec enable(This) -> boolean() when
+ This::wxWindow().
+
enable(This)
when is_record(This, wx_ref) ->
enable(This, []).
-%% @spec (This::wxWindow(), [Option]) -> bool()
-%% Option = {enable, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowenable">external documentation</a>.
+-spec enable(This, [Option]) -> boolean() when
+ This::wxWindow(),
+ Option :: {enable, boolean()}.
enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -282,21 +317,21 @@ enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxWindow_Enable,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec () -> wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowfindfocus">external documentation</a>.
+-spec findFocus() -> wxWindow().
findFocus() ->
wxe_util:call(?wxWindow_FindFocus,
<<>>).
-%% @spec (This::wxWindow(),X::integer()|string()) -> wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowfindwindow">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% findWindow(This::wxWindow(), Winid::integer()) -> wxWindow() </c>
-%% </p>
-%% <p><c>
-%% findWindow(This::wxWindow(), Name::string()) -> wxWindow() </c>
-%% </p>
+%% <br /> Also:<br />
+%% findWindow(This, Name) -> wxWindow() when<br />
+%% This::wxWindow(), Name::unicode:chardata().<br />
+%%
+-spec findWindow(This, Winid) -> wxWindow() when
+ This::wxWindow(), Winid::integer();
+ (This, Name) -> wxWindow() when
+ This::wxWindow(), Name::unicode:chardata().
findWindow(#wx_ref{type=ThisT,ref=ThisRef},Winid)
when is_integer(Winid) ->
?CLASS(ThisT,wxWindow),
@@ -309,15 +344,18 @@ findWindow(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxWindow_FindWindow_1_1,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (Winid::integer()) -> wxWindow()
%% @equiv findWindowById(Winid, [])
+-spec findWindowById(Winid) -> wxWindow() when
+ Winid::integer().
+
findWindowById(Winid)
when is_integer(Winid) ->
findWindowById(Winid, []).
-%% @spec (Winid::integer(), [Option]) -> wxWindow()
-%% Option = {parent, wxWindow()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowfindwindowbyid">external documentation</a>.
+-spec findWindowById(Winid, [Option]) -> wxWindow() when
+ Winid::integer(),
+ Option :: {parent, wxWindow()}.
findWindowById(Winid, Options)
when is_integer(Winid),is_list(Options) ->
MOpts = fun({parent, #wx_ref{type=ParentT,ref=ParentRef}}, Acc) -> ?CLASS(ParentT,wxWindow),[<<1:32/?UI,ParentRef:32/?UI>>|Acc];
@@ -326,15 +364,18 @@ findWindowById(Winid, Options)
wxe_util:call(?wxWindow_FindWindowById,
<<Winid:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (Name::string()) -> wxWindow()
%% @equiv findWindowByName(Name, [])
+-spec findWindowByName(Name) -> wxWindow() when
+ Name::unicode:chardata().
+
findWindowByName(Name)
when is_list(Name) ->
findWindowByName(Name, []).
-%% @spec (Name::string(), [Option]) -> wxWindow()
-%% Option = {parent, wxWindow()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowfindwindowbyname">external documentation</a>.
+-spec findWindowByName(Name, [Option]) -> wxWindow() when
+ Name::unicode:chardata(),
+ Option :: {parent, wxWindow()}.
findWindowByName(Name, Options)
when is_list(Name),is_list(Options) ->
Name_UC = unicode:characters_to_binary([Name,0]),
@@ -344,15 +385,18 @@ findWindowByName(Name, Options)
wxe_util:call(?wxWindow_FindWindowByName,
<<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (Label::string()) -> wxWindow()
%% @equiv findWindowByLabel(Label, [])
+-spec findWindowByLabel(Label) -> wxWindow() when
+ Label::unicode:chardata().
+
findWindowByLabel(Label)
when is_list(Label) ->
findWindowByLabel(Label, []).
-%% @spec (Label::string(), [Option]) -> wxWindow()
-%% Option = {parent, wxWindow()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowfindwindowbylabel">external documentation</a>.
+-spec findWindowByLabel(Label, [Option]) -> wxWindow() when
+ Label::unicode:chardata(),
+ Option :: {parent, wxWindow()}.
findWindowByLabel(Label, Options)
when is_list(Label),is_list(Options) ->
Label_UC = unicode:characters_to_binary([Label,0]),
@@ -362,285 +406,326 @@ findWindowByLabel(Label, Options)
wxe_util:call(?wxWindow_FindWindowByLabel,
<<(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowfit">external documentation</a>.
+-spec fit(This) -> ok when
+ This::wxWindow().
fit(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_Fit,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowfitinside">external documentation</a>.
+-spec fitInside(This) -> ok when
+ This::wxWindow().
fitInside(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_FitInside,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowfreeze">external documentation</a>.
+-spec freeze(This) -> ok when
+ This::wxWindow().
freeze(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_Freeze,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxAcceleratorTable:wxAcceleratorTable()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetacceleratortable">external documentation</a>.
+-spec getAcceleratorTable(This) -> wxAcceleratorTable:wxAcceleratorTable() when
+ This::wxWindow().
getAcceleratorTable(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetAcceleratorTable,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetbackgroundcolour">external documentation</a>.
+-spec getBackgroundColour(This) -> wx:wx_colour4() when
+ This::wxWindow().
getBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetBackgroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> WxBackgroundStyle
-%% WxBackgroundStyle = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetbackgroundstyle">external documentation</a>.
-%%<br /> WxBackgroundStyle is one of ?wxBG_STYLE_SYSTEM | ?wxBG_STYLE_COLOUR | ?wxBG_STYLE_CUSTOM
+%%<br /> Res = ?wxBG_STYLE_SYSTEM | ?wxBG_STYLE_COLOUR | ?wxBG_STYLE_CUSTOM
+-spec getBackgroundStyle(This) -> wx:wx_enum() when
+ This::wxWindow().
getBackgroundStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetBackgroundStyle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetbestsize">external documentation</a>.
+-spec getBestSize(This) -> {W::integer(), H::integer()} when
+ This::wxWindow().
getBestSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetBestSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxCaret:wxCaret()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetcaret">external documentation</a>.
+-spec getCaret(This) -> wxCaret:wxCaret() when
+ This::wxWindow().
getCaret(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetCaret,
<<ThisRef:32/?UI>>).
-%% @spec () -> wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetcapture">external documentation</a>.
+-spec getCapture() -> wxWindow().
getCapture() ->
wxe_util:call(?wxWindow_GetCapture,
<<>>).
-%% @spec (This::wxWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetcharheight">external documentation</a>.
+-spec getCharHeight(This) -> integer() when
+ This::wxWindow().
getCharHeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetCharHeight,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetcharwidth">external documentation</a>.
+-spec getCharWidth(This) -> integer() when
+ This::wxWindow().
getCharWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetCharWidth,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> [wxWindow()]
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetchildren">external documentation</a>.
+-spec getChildren(This) -> [wxWindow()] when
+ This::wxWindow().
getChildren(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetChildren,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetclientsize">external documentation</a>.
+-spec getClientSize(This) -> {W::integer(), H::integer()} when
+ This::wxWindow().
getClientSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetClientSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxSizer:wxSizer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetcontainingsizer">external documentation</a>.
+-spec getContainingSizer(This) -> wxSizer:wxSizer() when
+ This::wxWindow().
getContainingSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetContainingSizer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxCursor:wxCursor()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetcursor">external documentation</a>.
+-spec getCursor(This) -> wxCursor:wxCursor() when
+ This::wxWindow().
getCursor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetCursor,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxDropTarget:wxDropTarget()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetdroptarget">external documentation</a>.
+-spec getDropTarget(This) -> wx:wx_object() when
+ This::wxWindow().
getDropTarget(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetDropTarget,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxEvtHandler:wxEvtHandler()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgeteventhandler">external documentation</a>.
+-spec getEventHandler(This) -> wxEvtHandler:wxEvtHandler() when
+ This::wxWindow().
getEventHandler(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetEventHandler,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetextrastyle">external documentation</a>.
+-spec getExtraStyle(This) -> integer() when
+ This::wxWindow().
getExtraStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetExtraStyle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxFont:wxFont()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetfont">external documentation</a>.
+-spec getFont(This) -> wxFont:wxFont() when
+ This::wxWindow().
getFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetFont,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wx:colour()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetforegroundcolour">external documentation</a>.
+-spec getForegroundColour(This) -> wx:wx_colour4() when
+ This::wxWindow().
getForegroundColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetForegroundColour,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetgrandparent">external documentation</a>.
+-spec getGrandParent(This) -> wxWindow() when
+ This::wxWindow().
getGrandParent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetGrandParent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgethandle">external documentation</a>.
+-spec getHandle(This) -> integer() when
+ This::wxWindow().
getHandle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetHandle,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgethelptext">external documentation</a>.
+-spec getHelpText(This) -> unicode:charlist() when
+ This::wxWindow().
getHelpText(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetHelpText,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetid">external documentation</a>.
+-spec getId(This) -> integer() when
+ This::wxWindow().
getId(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetId,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetlabel">external documentation</a>.
+-spec getLabel(This) -> unicode:charlist() when
+ This::wxWindow().
getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetLabel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetmaxsize">external documentation</a>.
+-spec getMaxSize(This) -> {W::integer(), H::integer()} when
+ This::wxWindow().
getMaxSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetMaxSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetminsize">external documentation</a>.
+-spec getMinSize(This) -> {W::integer(), H::integer()} when
+ This::wxWindow().
getMinSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetMinSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetname">external documentation</a>.
+-spec getName(This) -> unicode:charlist() when
+ This::wxWindow().
getName(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetName,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetparent">external documentation</a>.
+-spec getParent(This) -> wxWindow() when
+ This::wxWindow().
getParent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetParent,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetposition">external documentation</a>.
+-spec getPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxWindow().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetrect">external documentation</a>.
+-spec getRect(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxWindow().
getRect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetRect,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetscreenposition">external documentation</a>.
+-spec getScreenPosition(This) -> {X::integer(), Y::integer()} when
+ This::wxWindow().
getScreenPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetScreenPosition,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {X::integer(), Y::integer(), W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetscreenrect">external documentation</a>.
+-spec getScreenRect(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
+ This::wxWindow().
getScreenRect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetScreenRect,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(), Orient::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetscrollpos">external documentation</a>.
+-spec getScrollPos(This, Orient) -> integer() when
+ This::wxWindow(), Orient::integer().
getScrollPos(#wx_ref{type=ThisT,ref=ThisRef},Orient)
when is_integer(Orient) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetScrollPos,
<<ThisRef:32/?UI,Orient:32/?UI>>).
-%% @spec (This::wxWindow(), Orient::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetscrollrange">external documentation</a>.
+-spec getScrollRange(This, Orient) -> integer() when
+ This::wxWindow(), Orient::integer().
getScrollRange(#wx_ref{type=ThisT,ref=ThisRef},Orient)
when is_integer(Orient) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetScrollRange,
<<ThisRef:32/?UI,Orient:32/?UI>>).
-%% @spec (This::wxWindow(), Orient::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetscrollthumb">external documentation</a>.
+-spec getScrollThumb(This, Orient) -> integer() when
+ This::wxWindow(), Orient::integer().
getScrollThumb(#wx_ref{type=ThisT,ref=ThisRef},Orient)
when is_integer(Orient) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetScrollThumb,
<<ThisRef:32/?UI,Orient:32/?UI>>).
-%% @spec (This::wxWindow()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetsize">external documentation</a>.
+-spec getSize(This) -> {W::integer(), H::integer()} when
+ This::wxWindow().
getSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxSizer:wxSizer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetsizer">external documentation</a>.
+-spec getSizer(This) -> wxSizer:wxSizer() when
+ This::wxWindow().
getSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetSizer,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(), String::string()) -> {X::integer(), Y::integer(), Descent::integer(), ExternalLeading::integer()}
%% @equiv getTextExtent(This,String, [])
+-spec getTextExtent(This, String) -> Result when
+ Result ::{X::integer(), Y::integer(), Descent::integer(), ExternalLeading::integer()},
+ This::wxWindow(), String::unicode:chardata().
+
getTextExtent(This,String)
when is_record(This, wx_ref),is_list(String) ->
getTextExtent(This,String, []).
-%% @spec (This::wxWindow(), String::string(), [Option]) -> {X::integer(), Y::integer(), Descent::integer(), ExternalLeading::integer()}
-%% Option = {theFont, wxFont:wxFont()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgettextextent">external documentation</a>.
+-spec getTextExtent(This, String, [Option]) -> Result when
+ Result :: {X::integer(), Y::integer(), Descent::integer(), ExternalLeading::integer()},
+ This::wxWindow(), String::unicode:chardata(),
+ Option :: {theFont, wxFont:wxFont()}.
getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
when is_list(String),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -651,109 +736,121 @@ getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
wxe_util:call(?wxWindow_GetTextExtent,
<<ThisRef:32/?UI,(byte_size(String_UC)):32/?UI,(String_UC)/binary, 0:(((8- ((0+byte_size(String_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> wxToolTip:wxToolTip()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgettooltip">external documentation</a>.
+-spec getToolTip(This) -> wxToolTip:wxToolTip() when
+ This::wxWindow().
getToolTip(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetToolTip,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxRegion:wxRegion()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetupdateregion">external documentation</a>.
+-spec getUpdateRegion(This) -> wxRegion:wxRegion() when
+ This::wxWindow().
getUpdateRegion(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetUpdateRegion,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {W::integer(), H::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetvirtualsize">external documentation</a>.
+-spec getVirtualSize(This) -> {W::integer(), H::integer()} when
+ This::wxWindow().
getVirtualSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetVirtualSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetwindowstyleflag">external documentation</a>.
+-spec getWindowStyleFlag(This) -> integer() when
+ This::wxWindow().
getWindowStyleFlag(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetWindowStyleFlag,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> WxWindowVariant
-%% WxWindowVariant = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowgetwindowvariant">external documentation</a>.
-%%<br /> WxWindowVariant is one of ?wxWINDOW_VARIANT_NORMAL | ?wxWINDOW_VARIANT_SMALL | ?wxWINDOW_VARIANT_MINI | ?wxWINDOW_VARIANT_LARGE | ?wxWINDOW_VARIANT_MAX
+%%<br /> Res = ?wxWINDOW_VARIANT_NORMAL | ?wxWINDOW_VARIANT_SMALL | ?wxWINDOW_VARIANT_MINI | ?wxWINDOW_VARIANT_LARGE | ?wxWINDOW_VARIANT_MAX
+-spec getWindowVariant(This) -> wx:wx_enum() when
+ This::wxWindow().
getWindowVariant(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_GetWindowVariant,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowhascapture">external documentation</a>.
+-spec hasCapture(This) -> boolean() when
+ This::wxWindow().
hasCapture(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_HasCapture,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(), Orient::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowhasscrollbar">external documentation</a>.
+-spec hasScrollbar(This, Orient) -> boolean() when
+ This::wxWindow(), Orient::integer().
hasScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Orient)
when is_integer(Orient) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_HasScrollbar,
<<ThisRef:32/?UI,Orient:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowhastransparentbackground">external documentation</a>.
+-spec hasTransparentBackground(This) -> boolean() when
+ This::wxWindow().
hasTransparentBackground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_HasTransparentBackground,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowhide">external documentation</a>.
+-spec hide(This) -> boolean() when
+ This::wxWindow().
hide(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_Hide,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowinheritattributes">external documentation</a>.
+-spec inheritAttributes(This) -> ok when
+ This::wxWindow().
inheritAttributes(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_InheritAttributes,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowinitdialog">external documentation</a>.
+-spec initDialog(This) -> ok when
+ This::wxWindow().
initDialog(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_InitDialog,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowinvalidatebestsize">external documentation</a>.
+-spec invalidateBestSize(This) -> ok when
+ This::wxWindow().
invalidateBestSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_InvalidateBestSize,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowisenabled">external documentation</a>.
+-spec isEnabled(This) -> boolean() when
+ This::wxWindow().
isEnabled(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_IsEnabled,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(),X::term()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowisexposed">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% isExposed(This::wxWindow(), Pt::{X::integer(), Y::integer()}) -> bool() </c>
-%% </p>
-%% <p><c>
-%% isExposed(This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> bool() </c>
-%% </p>
+%% <br /> Also:<br />
+%% isExposed(This, Rect) -> boolean() when<br />
+%% This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+-spec isExposed(This, Pt) -> boolean() when
+ This::wxWindow(), Pt::{X::integer(), Y::integer()};
+ (This, Rect) -> boolean() when
+ This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
isExposed(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxWindow),
@@ -765,80 +862,92 @@ isExposed(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
wxe_util:call(?wxWindow_IsExposed_1_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxWindow(), X::integer(), Y::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowisexposed">external documentation</a>.
+-spec isExposed(This, X, Y) -> boolean() when
+ This::wxWindow(), X::integer(), Y::integer().
isExposed(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_IsExposed_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxWindow(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowisexposed">external documentation</a>.
+-spec isExposed(This, X, Y, W, H) -> boolean() when
+ This::wxWindow(), X::integer(), Y::integer(), W::integer(), H::integer().
isExposed(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_integer(X),is_integer(Y),is_integer(W),is_integer(H) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_IsExposed_4,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowisretained">external documentation</a>.
+-spec isRetained(This) -> boolean() when
+ This::wxWindow().
isRetained(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_IsRetained,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowisshown">external documentation</a>.
+-spec isShown(This) -> boolean() when
+ This::wxWindow().
isShown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_IsShown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowistoplevel">external documentation</a>.
+-spec isTopLevel(This) -> boolean() when
+ This::wxWindow().
isTopLevel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_IsTopLevel,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowlayout">external documentation</a>.
+-spec layout(This) -> boolean() when
+ This::wxWindow().
layout(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_Layout,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowlinedown">external documentation</a>.
+-spec lineDown(This) -> boolean() when
+ This::wxWindow().
lineDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_LineDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowlineup">external documentation</a>.
+-spec lineUp(This) -> boolean() when
+ This::wxWindow().
lineUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_LineUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowlower">external documentation</a>.
+-spec lower(This) -> ok when
+ This::wxWindow().
lower(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_Lower,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @equiv makeModal(This, [])
+-spec makeModal(This) -> ok when
+ This::wxWindow().
+
makeModal(This)
when is_record(This, wx_ref) ->
makeModal(This, []).
-%% @spec (This::wxWindow(), [Option]) -> ok
-%% Option = {modal, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowmakemodal">external documentation</a>.
+-spec makeModal(This, [Option]) -> ok when
+ This::wxWindow(),
+ Option :: {modal, boolean()}.
makeModal(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -848,21 +957,25 @@ makeModal(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxWindow_MakeModal,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Pt::{X::integer(), Y::integer()}) -> ok
%% @equiv move(This,Pt, [])
+-spec move(This, Pt) -> ok when
+ This::wxWindow(), Pt::{X::integer(), Y::integer()}.
+
move(This,Pt={PtX,PtY})
when is_record(This, wx_ref),is_integer(PtX),is_integer(PtY) ->
move(This,Pt, []).
-%% @spec (This::wxWindow(),X::integer()|term(),X::integer()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowmove">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% move(This::wxWindow(), X::integer(), Y::integer()) -> move(This,X,Y, []) </c></p>
-%% <p><c>
-%% move(This::wxWindow(), Pt::{X::integer(), Y::integer()}, [Option]) -> ok </c>
-%%<br /> Option = {flags, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% move(This, Pt, [Option]) -> ok when<br />
+%% This::wxWindow(), Pt::{X::integer(), Y::integer()},<br />
+%% Option :: {flags, integer()}.<br />
+%%
+-spec move(This, X, Y) -> ok when
+ This::wxWindow(), X::integer(), Y::integer();
+ (This, Pt, [Option]) -> ok when
+ This::wxWindow(), Pt::{X::integer(), Y::integer()},
+ Option :: {flags, integer()}.
move(This,X,Y)
when is_record(This, wx_ref),is_integer(X),is_integer(Y) ->
@@ -876,9 +989,10 @@ move(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY}, Options)
wxe_util:cast(?wxWindow_Move_2,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), X::integer(), Y::integer(), [Option]) -> ok
-%% Option = {flags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowmove">external documentation</a>.
+-spec move(This, X, Y, [Option]) -> ok when
+ This::wxWindow(), X::integer(), Y::integer(),
+ Option :: {flags, integer()}.
move(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
when is_integer(X),is_integer(Y),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -888,31 +1002,36 @@ move(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
wxe_util:cast(?wxWindow_Move_3,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Win::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowmoveafterintaborder">external documentation</a>.
+-spec moveAfterInTabOrder(This, Win) -> ok when
+ This::wxWindow(), Win::wxWindow().
moveAfterInTabOrder(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(WinT,wxWindow),
wxe_util:cast(?wxWindow_MoveAfterInTabOrder,
<<ThisRef:32/?UI,WinRef:32/?UI>>).
-%% @spec (This::wxWindow(), Win::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowmovebeforeintaborder">external documentation</a>.
+-spec moveBeforeInTabOrder(This, Win) -> ok when
+ This::wxWindow(), Win::wxWindow().
moveBeforeInTabOrder(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(WinT,wxWindow),
wxe_util:cast(?wxWindow_MoveBeforeInTabOrder,
<<ThisRef:32/?UI,WinRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @equiv navigate(This, [])
+-spec navigate(This) -> boolean() when
+ This::wxWindow().
+
navigate(This)
when is_record(This, wx_ref) ->
navigate(This, []).
-%% @spec (This::wxWindow(), [Option]) -> bool()
-%% Option = {flags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindownavigate">external documentation</a>.
+-spec navigate(This, [Option]) -> boolean() when
+ This::wxWindow(),
+ Option :: {flags, integer()}.
navigate(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -922,29 +1041,34 @@ navigate(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxWindow_Navigate,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowpagedown">external documentation</a>.
+-spec pageDown(This) -> boolean() when
+ This::wxWindow().
pageDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_PageDown,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowpageup">external documentation</a>.
+-spec pageUp(This) -> boolean() when
+ This::wxWindow().
pageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_PageUp,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> wxEvtHandler:wxEvtHandler()
%% @equiv popEventHandler(This, [])
+-spec popEventHandler(This) -> wxEvtHandler:wxEvtHandler() when
+ This::wxWindow().
+
popEventHandler(This)
when is_record(This, wx_ref) ->
popEventHandler(This, []).
-%% @spec (This::wxWindow(), [Option]) -> wxEvtHandler:wxEvtHandler()
-%% Option = {deleteHandler, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowpopeventhandler">external documentation</a>.
+-spec popEventHandler(This, [Option]) -> wxEvtHandler:wxEvtHandler() when
+ This::wxWindow(),
+ Option :: {deleteHandler, boolean()}.
popEventHandler(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -954,15 +1078,18 @@ popEventHandler(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxWindow_PopEventHandler,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Menu::wxMenu:wxMenu()) -> bool()
%% @equiv popupMenu(This,Menu, [])
+-spec popupMenu(This, Menu) -> boolean() when
+ This::wxWindow(), Menu::wxMenu:wxMenu().
+
popupMenu(This,Menu)
when is_record(This, wx_ref),is_record(Menu, wx_ref) ->
popupMenu(This,Menu, []).
-%% @spec (This::wxWindow(), Menu::wxMenu:wxMenu(), [Option]) -> bool()
-%% Option = {pos, {X::integer(), Y::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowpopupmenu">external documentation</a>.
+-spec popupMenu(This, Menu, [Option]) -> boolean() when
+ This::wxWindow(), Menu::wxMenu:wxMenu(),
+ Option :: {pos, {X::integer(), Y::integer()}}.
popupMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -973,8 +1100,9 @@ popupMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}, Optio
wxe_util:call(?wxWindow_PopupMenu_2,
<<ThisRef:32/?UI,MenuRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxWindow(), Menu::wxMenu:wxMenu(), X::integer(), Y::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowpopupmenu">external documentation</a>.
+-spec popupMenu(This, Menu, X, Y) -> boolean() when
+ This::wxWindow(), Menu::wxMenu:wxMenu(), X::integer(), Y::integer().
popupMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxWindow),
@@ -982,22 +1110,27 @@ popupMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef},X,Y)
wxe_util:call(?wxWindow_PopupMenu_3,
<<ThisRef:32/?UI,MenuRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowraise">external documentation</a>.
+-spec raise(This) -> ok when
+ This::wxWindow().
raise(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_Raise,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @equiv refresh(This, [])
+-spec refresh(This) -> ok when
+ This::wxWindow().
+
refresh(This)
when is_record(This, wx_ref) ->
refresh(This, []).
-%% @spec (This::wxWindow(), [Option]) -> ok
-%% Option = {eraseBackground, bool()} | {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowrefresh">external documentation</a>.
+-spec refresh(This, [Option]) -> ok when
+ This::wxWindow(),
+ Option :: {eraseBackground, boolean()}
+ | {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}.
refresh(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1008,15 +1141,18 @@ refresh(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxWindow_Refresh,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok
%% @equiv refreshRect(This,Rect, [])
+-spec refreshRect(This, Rect) -> ok when
+ This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
+
refreshRect(This,Rect={RectX,RectY,RectW,RectH})
when is_record(This, wx_ref),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
refreshRect(This,Rect, []).
-%% @spec (This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, [Option]) -> ok
-%% Option = {eraseBackground, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowrefreshrect">external documentation</a>.
+-spec refreshRect(This, Rect, [Option]) -> ok when
+ This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},
+ Option :: {eraseBackground, boolean()}.
refreshRect(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}, Options)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1026,69 +1162,79 @@ refreshRect(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}, Options)
wxe_util:cast(?wxWindow_RefreshRect,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowreleasemouse">external documentation</a>.
+-spec releaseMouse(This) -> ok when
+ This::wxWindow().
releaseMouse(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_ReleaseMouse,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(), Child::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowremovechild">external documentation</a>.
+-spec removeChild(This, Child) -> ok when
+ This::wxWindow(), Child::wxWindow().
removeChild(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ChildT,ref=ChildRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(ChildT,wxWindow),
wxe_util:cast(?wxWindow_RemoveChild,
<<ThisRef:32/?UI,ChildRef:32/?UI>>).
-%% @spec (This::wxWindow(), NewParent::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowreparent">external documentation</a>.
+-spec reparent(This, NewParent) -> boolean() when
+ This::wxWindow(), NewParent::wxWindow().
reparent(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=NewParentT,ref=NewParentRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(NewParentT,wxWindow),
wxe_util:call(?wxWindow_Reparent,
<<ThisRef:32/?UI,NewParentRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowscreentoclient">external documentation</a>.
+-spec screenToClient(This) -> {X::integer(), Y::integer()} when
+ This::wxWindow().
screenToClient(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ScreenToClient_2,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(), Pt::{X::integer(), Y::integer()}) -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowscreentoclient">external documentation</a>.
+-spec screenToClient(This, Pt) -> {X::integer(), Y::integer()} when
+ This::wxWindow(), Pt::{X::integer(), Y::integer()}.
screenToClient(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ScreenToClient_1,
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (This::wxWindow(), Lines::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowscrolllines">external documentation</a>.
+-spec scrollLines(This, Lines) -> boolean() when
+ This::wxWindow(), Lines::integer().
scrollLines(#wx_ref{type=ThisT,ref=ThisRef},Lines)
when is_integer(Lines) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ScrollLines,
<<ThisRef:32/?UI,Lines:32/?UI>>).
-%% @spec (This::wxWindow(), Pages::integer()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowscrollpages">external documentation</a>.
+-spec scrollPages(This, Pages) -> boolean() when
+ This::wxWindow(), Pages::integer().
scrollPages(#wx_ref{type=ThisT,ref=ThisRef},Pages)
when is_integer(Pages) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ScrollPages,
<<ThisRef:32/?UI,Pages:32/?UI>>).
-%% @spec (This::wxWindow(), Dx::integer(), Dy::integer()) -> ok
%% @equiv scrollWindow(This,Dx,Dy, [])
+-spec scrollWindow(This, Dx, Dy) -> ok when
+ This::wxWindow(), Dx::integer(), Dy::integer().
+
scrollWindow(This,Dx,Dy)
when is_record(This, wx_ref),is_integer(Dx),is_integer(Dy) ->
scrollWindow(This,Dx,Dy, []).
-%% @spec (This::wxWindow(), Dx::integer(), Dy::integer(), [Option]) -> ok
-%% Option = {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowscrollwindow">external documentation</a>.
+-spec scrollWindow(This, Dx, Dy, [Option]) -> ok when
+ This::wxWindow(), Dx::integer(), Dy::integer(),
+ Option :: {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}.
scrollWindow(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy, Options)
when is_integer(Dx),is_integer(Dy),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1098,57 +1244,61 @@ scrollWindow(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy, Options)
wxe_util:cast(?wxWindow_ScrollWindow,
<<ThisRef:32/?UI,Dx:32/?UI,Dy:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Accel::wxAcceleratorTable:wxAcceleratorTable()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetacceleratortable">external documentation</a>.
+-spec setAcceleratorTable(This, Accel) -> ok when
+ This::wxWindow(), Accel::wxAcceleratorTable:wxAcceleratorTable().
setAcceleratorTable(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=AccelT,ref=AccelRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(AccelT,wxAcceleratorTable),
wxe_util:cast(?wxWindow_SetAcceleratorTable,
<<ThisRef:32/?UI,AccelRef:32/?UI>>).
-%% @spec (This::wxWindow(), AutoLayout::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetautolayout">external documentation</a>.
+-spec setAutoLayout(This, AutoLayout) -> ok when
+ This::wxWindow(), AutoLayout::boolean().
setAutoLayout(#wx_ref{type=ThisT,ref=ThisRef},AutoLayout)
when is_boolean(AutoLayout) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetAutoLayout,
<<ThisRef:32/?UI,(wxe_util:from_bool(AutoLayout)):32/?UI>>).
-%% @spec (This::wxWindow(), Colour::wx:colour()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetbackgroundcolour">external documentation</a>.
+-spec setBackgroundColour(This, Colour) -> boolean() when
+ This::wxWindow(), Colour::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_SetBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxWindow(), Style::WxBackgroundStyle) -> bool()
-%% WxBackgroundStyle = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetbackgroundstyle">external documentation</a>.
-%%<br /> WxBackgroundStyle is one of ?wxBG_STYLE_SYSTEM | ?wxBG_STYLE_COLOUR | ?wxBG_STYLE_CUSTOM
+%%<br /> Style = ?wxBG_STYLE_SYSTEM | ?wxBG_STYLE_COLOUR | ?wxBG_STYLE_CUSTOM
+-spec setBackgroundStyle(This, Style) -> boolean() when
+ This::wxWindow(), Style::wx:wx_enum().
setBackgroundStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_SetBackgroundStyle,
<<ThisRef:32/?UI,Style:32/?UI>>).
-%% @spec (This::wxWindow(), Caret::wxCaret:wxCaret()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetcaret">external documentation</a>.
+-spec setCaret(This, Caret) -> ok when
+ This::wxWindow(), Caret::wxCaret:wxCaret().
setCaret(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CaretT,ref=CaretRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(CaretT,wxCaret),
wxe_util:cast(?wxWindow_SetCaret,
<<ThisRef:32/?UI,CaretRef:32/?UI>>).
-%% @spec (This::wxWindow(),X::term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetclientsize">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setClientSize(This::wxWindow(), Size::{W::integer(), H::integer()}) -> ok </c>
-%% </p>
-%% <p><c>
-%% setClientSize(This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setClientSize(This, Rect) -> ok when<br />
+%% This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
+%%
+-spec setClientSize(This, Size) -> ok when
+ This::wxWindow(), Size::{W::integer(), H::integer()};
+ (This, Rect) -> ok when
+ This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
setClientSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxWindow),
@@ -1160,118 +1310,133 @@ setClientSize(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
wxe_util:cast(?wxWindow_SetClientSize_1_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
-%% @spec (This::wxWindow(), Width::integer(), Height::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetclientsize">external documentation</a>.
+-spec setClientSize(This, Width, Height) -> ok when
+ This::wxWindow(), Width::integer(), Height::integer().
setClientSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetClientSize_2,
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
-%% @spec (This::wxWindow(), Sizer::wxSizer:wxSizer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetcontainingsizer">external documentation</a>.
+-spec setContainingSizer(This, Sizer) -> ok when
+ This::wxWindow(), Sizer::wxSizer:wxSizer().
setContainingSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(SizerT,wxSizer),
wxe_util:cast(?wxWindow_SetContainingSizer,
<<ThisRef:32/?UI,SizerRef:32/?UI>>).
-%% @spec (This::wxWindow(), Cursor::wxCursor:wxCursor()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetcursor">external documentation</a>.
+-spec setCursor(This, Cursor) -> boolean() when
+ This::wxWindow(), Cursor::wxCursor:wxCursor().
setCursor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CursorT,ref=CursorRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(CursorT,wxCursor),
wxe_util:call(?wxWindow_SetCursor,
<<ThisRef:32/?UI,CursorRef:32/?UI>>).
-%% @spec (This::wxWindow(), MaxSize::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetmaxsize">external documentation</a>.
+-spec setMaxSize(This, MaxSize) -> ok when
+ This::wxWindow(), MaxSize::{W::integer(), H::integer()}.
setMaxSize(#wx_ref{type=ThisT,ref=ThisRef},{MaxSizeW,MaxSizeH})
when is_integer(MaxSizeW),is_integer(MaxSizeH) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetMaxSize,
<<ThisRef:32/?UI,MaxSizeW:32/?UI,MaxSizeH:32/?UI>>).
-%% @spec (This::wxWindow(), MinSize::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetminsize">external documentation</a>.
+-spec setMinSize(This, MinSize) -> ok when
+ This::wxWindow(), MinSize::{W::integer(), H::integer()}.
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{MinSizeW,MinSizeH})
when is_integer(MinSizeW),is_integer(MinSizeH) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetMinSize,
<<ThisRef:32/?UI,MinSizeW:32/?UI,MinSizeH:32/?UI>>).
-%% @spec (This::wxWindow(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetownbackgroundcolour">external documentation</a>.
+-spec setOwnBackgroundColour(This, Colour) -> ok when
+ This::wxWindow(), Colour::wx:wx_colour().
setOwnBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetOwnBackgroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxWindow(), Font::wxFont:wxFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetownfont">external documentation</a>.
+-spec setOwnFont(This, Font) -> ok when
+ This::wxWindow(), Font::wxFont:wxFont().
setOwnFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(FontT,wxFont),
wxe_util:cast(?wxWindow_SetOwnFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxWindow(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetownforegroundcolour">external documentation</a>.
+-spec setOwnForegroundColour(This, Colour) -> ok when
+ This::wxWindow(), Colour::wx:wx_colour().
setOwnForegroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetOwnForegroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxWindow(), DropTarget::wxDropTarget:wxDropTarget()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetdroptarget">external documentation</a>.
+-spec setDropTarget(This, DropTarget) -> ok when
+ This::wxWindow(), DropTarget::wx:wx_object().
setDropTarget(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DropTargetT,ref=DropTargetRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(DropTargetT,wxDropTarget),
wxe_util:cast(?wxWindow_SetDropTarget,
<<ThisRef:32/?UI,DropTargetRef:32/?UI>>).
-%% @spec (This::wxWindow(), ExStyle::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetextrastyle">external documentation</a>.
+-spec setExtraStyle(This, ExStyle) -> ok when
+ This::wxWindow(), ExStyle::integer().
setExtraStyle(#wx_ref{type=ThisT,ref=ThisRef},ExStyle)
when is_integer(ExStyle) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetExtraStyle,
<<ThisRef:32/?UI,ExStyle:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetfocus">external documentation</a>.
+-spec setFocus(This) -> ok when
+ This::wxWindow().
setFocus(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetFocus,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetfocusfromkbd">external documentation</a>.
+-spec setFocusFromKbd(This) -> ok when
+ This::wxWindow().
setFocusFromKbd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetFocusFromKbd,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(), Font::wxFont:wxFont()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetfont">external documentation</a>.
+-spec setFont(This, Font) -> boolean() when
+ This::wxWindow(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(FontT,wxFont),
wxe_util:call(?wxWindow_SetFont,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxWindow(), Colour::wx:colour()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetforegroundcolour">external documentation</a>.
+-spec setForegroundColour(This, Colour) -> boolean() when
+ This::wxWindow(), Colour::wx:wx_colour().
setForegroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_SetForegroundColour,
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxWindow(), Text::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsethelptext">external documentation</a>.
+-spec setHelpText(This, Text) -> ok when
+ This::wxWindow(), Text::unicode:chardata().
setHelpText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxWindow),
@@ -1279,16 +1444,18 @@ setHelpText(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:cast(?wxWindow_SetHelpText,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxWindow(), Winid::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetid">external documentation</a>.
+-spec setId(This, Winid) -> ok when
+ This::wxWindow(), Winid::integer().
setId(#wx_ref{type=ThisT,ref=ThisRef},Winid)
when is_integer(Winid) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetId,
<<ThisRef:32/?UI,Winid:32/?UI>>).
-%% @spec (This::wxWindow(), Label::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetlabel">external documentation</a>.
+-spec setLabel(This, Label) -> ok when
+ This::wxWindow(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
when is_list(Label) ->
?CLASS(ThisT,wxWindow),
@@ -1296,8 +1463,9 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
wxe_util:cast(?wxWindow_SetLabel,
<<ThisRef:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxWindow(), Name::string()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetname">external documentation</a>.
+-spec setName(This, Name) -> ok when
+ This::wxWindow(), Name::unicode:chardata().
setName(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxWindow),
@@ -1305,23 +1473,27 @@ setName(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:cast(?wxWindow_SetName,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxWindow(), Pal::wxPalette:wxPalette()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetpalette">external documentation</a>.
+-spec setPalette(This, Pal) -> ok when
+ This::wxWindow(), Pal::wxPalette:wxPalette().
setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PalT,ref=PalRef}) ->
?CLASS(ThisT,wxWindow),
?CLASS(PalT,wxPalette),
wxe_util:cast(?wxWindow_SetPalette,
<<ThisRef:32/?UI,PalRef:32/?UI>>).
-%% @spec (This::wxWindow(), Orient::integer(), Pos::integer(), ThumbVisible::integer(), Range::integer()) -> ok
%% @equiv setScrollbar(This,Orient,Pos,ThumbVisible,Range, [])
+-spec setScrollbar(This, Orient, Pos, ThumbVisible, Range) -> ok when
+ This::wxWindow(), Orient::integer(), Pos::integer(), ThumbVisible::integer(), Range::integer().
+
setScrollbar(This,Orient,Pos,ThumbVisible,Range)
when is_record(This, wx_ref),is_integer(Orient),is_integer(Pos),is_integer(ThumbVisible),is_integer(Range) ->
setScrollbar(This,Orient,Pos,ThumbVisible,Range, []).
-%% @spec (This::wxWindow(), Orient::integer(), Pos::integer(), ThumbVisible::integer(), Range::integer(), [Option]) -> ok
-%% Option = {refresh, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetscrollbar">external documentation</a>.
+-spec setScrollbar(This, Orient, Pos, ThumbVisible, Range, [Option]) -> ok when
+ This::wxWindow(), Orient::integer(), Pos::integer(), ThumbVisible::integer(), Range::integer(),
+ Option :: {refresh, boolean()}.
setScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Orient,Pos,ThumbVisible,Range, Options)
when is_integer(Orient),is_integer(Pos),is_integer(ThumbVisible),is_integer(Range),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1331,15 +1503,18 @@ setScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Orient,Pos,ThumbVisible,Range, Opti
wxe_util:cast(?wxWindow_SetScrollbar,
<<ThisRef:32/?UI,Orient:32/?UI,Pos:32/?UI,ThumbVisible:32/?UI,Range:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Orient::integer(), Pos::integer()) -> ok
%% @equiv setScrollPos(This,Orient,Pos, [])
+-spec setScrollPos(This, Orient, Pos) -> ok when
+ This::wxWindow(), Orient::integer(), Pos::integer().
+
setScrollPos(This,Orient,Pos)
when is_record(This, wx_ref),is_integer(Orient),is_integer(Pos) ->
setScrollPos(This,Orient,Pos, []).
-%% @spec (This::wxWindow(), Orient::integer(), Pos::integer(), [Option]) -> ok
-%% Option = {refresh, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetscrollpos">external documentation</a>.
+-spec setScrollPos(This, Orient, Pos, [Option]) -> ok when
+ This::wxWindow(), Orient::integer(), Pos::integer(),
+ Option :: {refresh, boolean()}.
setScrollPos(#wx_ref{type=ThisT,ref=ThisRef},Orient,Pos, Options)
when is_integer(Orient),is_integer(Pos),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1349,14 +1524,15 @@ setScrollPos(#wx_ref{type=ThisT,ref=ThisRef},Orient,Pos, Options)
wxe_util:cast(?wxWindow_SetScrollPos,
<<ThisRef:32/?UI,Orient:32/?UI,Pos:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(),X::term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetsize">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setSize(This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}) -> setSize(This,Rect, []) </c></p>
-%% <p><c>
-%% setSize(This::wxWindow(), Size::{W::integer(), H::integer()}) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setSize(This, Size) -> ok when<br />
+%% This::wxWindow(), Size::{W::integer(), H::integer()}.<br />
+%%
+-spec setSize(This, Rect) -> ok when
+ This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()};
+ (This, Size) -> ok when
+ This::wxWindow(), Size::{W::integer(), H::integer()}.
setSize(This,Rect={RectX,RectY,RectW,RectH})
when is_record(This, wx_ref),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
@@ -1367,16 +1543,17 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
wxe_util:cast(?wxWindow_SetSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxWindow(),X::integer()|term(),X::integer()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetsize">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setSize(This::wxWindow(), Width::integer(), Height::integer()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setSize(This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, [Option]) -> ok </c>
-%%<br /> Option = {sizeFlags, integer()}
-%% </p>
+%% <br /> Also:<br />
+%% setSize(This, Rect, [Option]) -> ok when<br />
+%% This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},<br />
+%% Option :: {sizeFlags, integer()}.<br />
+%%
+-spec setSize(This, Width, Height) -> ok when
+ This::wxWindow(), Width::integer(), Height::integer();
+ (This, Rect, [Option]) -> ok when
+ This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},
+ Option :: {sizeFlags, integer()}.
setSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxWindow),
@@ -1391,15 +1568,18 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}, Options)
wxe_util:cast(?wxWindow_SetSize_2_1,
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer()) -> ok
%% @equiv setSize(This,X,Y,Width,Height, [])
+-spec setSize(This, X, Y, Width, Height) -> ok when
+ This::wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer().
+
setSize(This,X,Y,Width,Height)
when is_record(This, wx_ref),is_integer(X),is_integer(Y),is_integer(Width),is_integer(Height) ->
setSize(This,X,Y,Width,Height, []).
-%% @spec (This::wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer(), [Option]) -> ok
-%% Option = {sizeFlags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetsize">external documentation</a>.
+-spec setSize(This, X, Y, Width, Height, [Option]) -> ok when
+ This::wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer(),
+ Option :: {sizeFlags, integer()}.
setSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Width,Height, Options)
when is_integer(X),is_integer(Y),is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1409,21 +1589,27 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Width,Height, Options)
wxe_util:cast(?wxWindow_SetSize_5,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), MinSize::{W::integer(), H::integer()}) -> ok
%% @equiv setSizeHints(This,MinSize, [])
+-spec setSizeHints(This, MinSize) -> ok when
+ This::wxWindow(), MinSize::{W::integer(), H::integer()}.
+
setSizeHints(This,MinSize={MinSizeW,MinSizeH})
when is_record(This, wx_ref),is_integer(MinSizeW),is_integer(MinSizeH) ->
setSizeHints(This,MinSize, []).
-%% @spec (This::wxWindow(),X::integer()|term(),X::integer()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetsizehints">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setSizeHints(This::wxWindow(), MinW::integer(), MinH::integer()) -> setSizeHints(This,MinW,MinH, []) </c></p>
-%% <p><c>
-%% setSizeHints(This::wxWindow(), MinSize::{W::integer(), H::integer()}, [Option]) -> ok </c>
-%%<br /> Option = {maxSize, {W::integer(), H::integer()}} | {incSize, {W::integer(), H::integer()}}
-%% </p>
+%% <br /> Also:<br />
+%% setSizeHints(This, MinSize, [Option]) -> ok when<br />
+%% This::wxWindow(), MinSize::{W::integer(), H::integer()},<br />
+%% Option :: {maxSize, {W::integer(), H::integer()}}<br />
+%% | {incSize, {W::integer(), H::integer()}}.<br />
+%%
+-spec setSizeHints(This, MinW, MinH) -> ok when
+ This::wxWindow(), MinW::integer(), MinH::integer();
+ (This, MinSize, [Option]) -> ok when
+ This::wxWindow(), MinSize::{W::integer(), H::integer()},
+ Option :: {maxSize, {W::integer(), H::integer()}}
+ | {incSize, {W::integer(), H::integer()}}.
setSizeHints(This,MinW,MinH)
when is_record(This, wx_ref),is_integer(MinW),is_integer(MinH) ->
@@ -1438,9 +1624,13 @@ setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},{MinSizeW,MinSizeH}, Options)
wxe_util:cast(?wxWindow_SetSizeHints_2,
<<ThisRef:32/?UI,MinSizeW:32/?UI,MinSizeH:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), MinW::integer(), MinH::integer(), [Option]) -> ok
-%% Option = {maxW, integer()} | {maxH, integer()} | {incW, integer()} | {incH, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetsizehints">external documentation</a>.
+-spec setSizeHints(This, MinW, MinH, [Option]) -> ok when
+ This::wxWindow(), MinW::integer(), MinH::integer(),
+ Option :: {maxW, integer()}
+ | {maxH, integer()}
+ | {incW, integer()}
+ | {incH, integer()}.
setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},MinW,MinH, Options)
when is_integer(MinW),is_integer(MinH),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1453,15 +1643,18 @@ setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},MinW,MinH, Options)
wxe_util:cast(?wxWindow_SetSizeHints_3,
<<ThisRef:32/?UI,MinW:32/?UI,MinH:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Sizer::wxSizer:wxSizer()) -> ok
%% @equiv setSizer(This,Sizer, [])
+-spec setSizer(This, Sizer) -> ok when
+ This::wxWindow(), Sizer::wxSizer:wxSizer().
+
setSizer(This,Sizer)
when is_record(This, wx_ref),is_record(Sizer, wx_ref) ->
setSizer(This,Sizer, []).
-%% @spec (This::wxWindow(), Sizer::wxSizer:wxSizer(), [Option]) -> ok
-%% Option = {deleteOld, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetsizer">external documentation</a>.
+-spec setSizer(This, Sizer, [Option]) -> ok when
+ This::wxWindow(), Sizer::wxSizer:wxSizer(),
+ Option :: {deleteOld, boolean()}.
setSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1472,15 +1665,18 @@ setSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}, Opti
wxe_util:cast(?wxWindow_SetSizer,
<<ThisRef:32/?UI,SizerRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxWindow(), Sizer::wxSizer:wxSizer()) -> ok
%% @equiv setSizerAndFit(This,Sizer, [])
+-spec setSizerAndFit(This, Sizer) -> ok when
+ This::wxWindow(), Sizer::wxSizer:wxSizer().
+
setSizerAndFit(This,Sizer)
when is_record(This, wx_ref),is_record(Sizer, wx_ref) ->
setSizerAndFit(This,Sizer, []).
-%% @spec (This::wxWindow(), Sizer::wxSizer:wxSizer(), [Option]) -> ok
-%% Option = {deleteOld, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetsizerandfit">external documentation</a>.
+-spec setSizerAndFit(This, Sizer, [Option]) -> ok when
+ This::wxWindow(), Sizer::wxSizer:wxSizer(),
+ Option :: {deleteOld, boolean()}.
setSizerAndFit(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1491,23 +1687,24 @@ setSizerAndFit(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}
wxe_util:cast(?wxWindow_SetSizerAndFit,
<<ThisRef:32/?UI,SizerRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxWindow(), EnableTheme::bool()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetthemeenabled">external documentation</a>.
+-spec setThemeEnabled(This, EnableTheme) -> ok when
+ This::wxWindow(), EnableTheme::boolean().
setThemeEnabled(#wx_ref{type=ThisT,ref=ThisRef},EnableTheme)
when is_boolean(EnableTheme) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetThemeEnabled,
<<ThisRef:32/?UI,(wxe_util:from_bool(EnableTheme)):32/?UI>>).
-%% @spec (This::wxWindow(),X::string()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsettooltip">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setToolTip(This::wxWindow(), Tip::string()) -> ok </c>
-%% </p>
-%% <p><c>
-%% setToolTip(This::wxWindow(), Tip::wxToolTip:wxToolTip()) -> ok </c>
-%% </p>
+%% <br /> Also:<br />
+%% setToolTip(This, Tip) -> ok when<br />
+%% This::wxWindow(), Tip::wxToolTip:wxToolTip().<br />
+%%
+-spec setToolTip(This, Tip) -> ok when
+ This::wxWindow(), Tip::unicode:chardata();
+ (This, Tip) -> ok when
+ This::wxWindow(), Tip::wxToolTip:wxToolTip().
setToolTip(#wx_ref{type=ThisT,ref=ThisRef},Tip)
when is_list(Tip) ->
?CLASS(ThisT,wxWindow),
@@ -1520,37 +1717,43 @@ setToolTip(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=TipT,ref=TipRef}) ->
wxe_util:cast(?wxWindow_SetToolTip_1_1,
<<ThisRef:32/?UI,TipRef:32/?UI>>).
-%% @spec (This::wxWindow(), Size::{W::integer(), H::integer()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetvirtualsize">external documentation</a>.
+-spec setVirtualSize(This, Size) -> ok when
+ This::wxWindow(), Size::{W::integer(), H::integer()}.
setVirtualSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetVirtualSize_1,
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
-%% @spec (This::wxWindow(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetvirtualsize">external documentation</a>.
+-spec setVirtualSize(This, X, Y) -> ok when
+ This::wxWindow(), X::integer(), Y::integer().
setVirtualSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetVirtualSize_2,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxWindow(), MinSize::{W::integer(), H::integer()}) -> ok
%% @equiv setVirtualSizeHints(This,MinSize, [])
+-spec setVirtualSizeHints(This, MinSize) -> ok when
+ This::wxWindow(), MinSize::{W::integer(), H::integer()}.
+
setVirtualSizeHints(This,MinSize={MinSizeW,MinSizeH})
when is_record(This, wx_ref),is_integer(MinSizeW),is_integer(MinSizeH) ->
setVirtualSizeHints(This,MinSize, []).
-%% @spec (This::wxWindow(),X::integer()|term(),X::integer()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetvirtualsizehints">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% setVirtualSizeHints(This::wxWindow(), MinW::integer(), MinH::integer()) -> setVirtualSizeHints(This,MinW,MinH, []) </c></p>
-%% <p><c>
-%% setVirtualSizeHints(This::wxWindow(), MinSize::{W::integer(), H::integer()}, [Option]) -> ok </c>
-%%<br /> Option = {maxSize, {W::integer(), H::integer()}}
-%% </p>
+%% <br /> Also:<br />
+%% setVirtualSizeHints(This, MinSize, [Option]) -> ok when<br />
+%% This::wxWindow(), MinSize::{W::integer(), H::integer()},<br />
+%% Option :: {maxSize, {W::integer(), H::integer()}}.<br />
+%%
+-spec setVirtualSizeHints(This, MinW, MinH) -> ok when
+ This::wxWindow(), MinW::integer(), MinH::integer();
+ (This, MinSize, [Option]) -> ok when
+ This::wxWindow(), MinSize::{W::integer(), H::integer()},
+ Option :: {maxSize, {W::integer(), H::integer()}}.
setVirtualSizeHints(This,MinW,MinH)
when is_record(This, wx_ref),is_integer(MinW),is_integer(MinH) ->
@@ -1564,9 +1767,11 @@ setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},{MinSizeW,MinSizeH}, Options
wxe_util:cast(?wxWindow_SetVirtualSizeHints_2,
<<ThisRef:32/?UI,MinSizeW:32/?UI,MinSizeH:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), MinW::integer(), MinH::integer(), [Option]) -> ok
-%% Option = {maxW, integer()} | {maxH, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetvirtualsizehints">external documentation</a>.
+-spec setVirtualSizeHints(This, MinW, MinH, [Option]) -> ok when
+ This::wxWindow(), MinW::integer(), MinH::integer(),
+ Option :: {maxW, integer()}
+ | {maxH, integer()}.
setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},MinW,MinH, Options)
when is_integer(MinW),is_integer(MinH),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1577,48 +1782,54 @@ setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},MinW,MinH, Options)
wxe_util:cast(?wxWindow_SetVirtualSizeHints_3,
<<ThisRef:32/?UI,MinW:32/?UI,MinH:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow(), Style::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetwindowstyle">external documentation</a>.
+-spec setWindowStyle(This, Style) -> ok when
+ This::wxWindow(), Style::integer().
setWindowStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetWindowStyle,
<<ThisRef:32/?UI,Style:32/?UI>>).
-%% @spec (This::wxWindow(), Style::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetwindowstyleflag">external documentation</a>.
+-spec setWindowStyleFlag(This, Style) -> ok when
+ This::wxWindow(), Style::integer().
setWindowStyleFlag(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetWindowStyleFlag,
<<ThisRef:32/?UI,Style:32/?UI>>).
-%% @spec (This::wxWindow(), Variant::WxWindowVariant) -> ok
-%% WxWindowVariant = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowsetwindowvariant">external documentation</a>.
-%%<br /> WxWindowVariant is one of ?wxWINDOW_VARIANT_NORMAL | ?wxWINDOW_VARIANT_SMALL | ?wxWINDOW_VARIANT_MINI | ?wxWINDOW_VARIANT_LARGE | ?wxWINDOW_VARIANT_MAX
+%%<br /> Variant = ?wxWINDOW_VARIANT_NORMAL | ?wxWINDOW_VARIANT_SMALL | ?wxWINDOW_VARIANT_MINI | ?wxWINDOW_VARIANT_LARGE | ?wxWINDOW_VARIANT_MAX
+-spec setWindowVariant(This, Variant) -> ok when
+ This::wxWindow(), Variant::wx:wx_enum().
setWindowVariant(#wx_ref{type=ThisT,ref=ThisRef},Variant)
when is_integer(Variant) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_SetWindowVariant,
<<ThisRef:32/?UI,Variant:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowshouldinheritcolours">external documentation</a>.
+-spec shouldInheritColours(This) -> boolean() when
+ This::wxWindow().
shouldInheritColours(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_ShouldInheritColours,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @equiv show(This, [])
+-spec show(This) -> boolean() when
+ This::wxWindow().
+
show(This)
when is_record(This, wx_ref) ->
show(This, []).
-%% @spec (This::wxWindow(), [Option]) -> bool()
-%% Option = {show, bool()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowshow">external documentation</a>.
+-spec show(This, [Option]) -> boolean() when
+ This::wxWindow(),
+ Option :: {show, boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1628,43 +1839,50 @@ show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxWindow_Show,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowthaw">external documentation</a>.
+-spec thaw(This) -> ok when
+ This::wxWindow().
thaw(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_Thaw,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowtransferdatafromwindow">external documentation</a>.
+-spec transferDataFromWindow(This) -> boolean() when
+ This::wxWindow().
transferDataFromWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_TransferDataFromWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowtransferdatatowindow">external documentation</a>.
+-spec transferDataToWindow(This) -> boolean() when
+ This::wxWindow().
transferDataToWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_TransferDataToWindow,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowupdate">external documentation</a>.
+-spec update(This) -> ok when
+ This::wxWindow().
update(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_Update,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @equiv updateWindowUI(This, [])
+-spec updateWindowUI(This) -> ok when
+ This::wxWindow().
+
updateWindowUI(This)
when is_record(This, wx_ref) ->
updateWindowUI(This, []).
-%% @spec (This::wxWindow(), [Option]) -> ok
-%% Option = {flags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowupdatewindowui">external documentation</a>.
+-spec updateWindowUI(This, [Option]) -> ok when
+ This::wxWindow(),
+ Option :: {flags, integer()}.
updateWindowUI(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1674,23 +1892,25 @@ updateWindowUI(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:cast(?wxWindow_UpdateWindowUI,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxWindow()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowvalidate">external documentation</a>.
+-spec validate(This) -> boolean() when
+ This::wxWindow().
validate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
wxe_util:call(?wxWindow_Validate,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxWindow(), X::integer(), Y::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html#wxwindowwarppointer">external documentation</a>.
+-spec warpPointer(This, X, Y) -> ok when
+ This::wxWindow(), X::integer(), Y::integer().
warpPointer(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxWindow),
wxe_util:cast(?wxWindow_WarpPointer,
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
-%% @spec (This::wxWindow()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxWindow()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxWindowCreateEvent.erl b/lib/wx/src/gen/wxWindowCreateEvent.erl
index c8b3c74f81..f17d6011d9 100644
--- a/lib/wx/src/gen/wxWindowCreateEvent.erl
+++ b/lib/wx/src/gen/wxWindowCreateEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,11 +40,13 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxWindowCreateEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxWindowCreateEvent() :: wx:wx_object().
%% From wxCommandEvent
%% @hidden
setString(This,S) -> wxCommandEvent:setString(This,S).
diff --git a/lib/wx/src/gen/wxWindowDC.erl b/lib/wx/src/gen/wxWindowDC.erl
index 17cbd3d378..babb3c0e90 100644
--- a/lib/wx/src/gen/wxWindowDC.erl
+++ b/lib/wx/src/gen/wxWindowDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,10 +38,10 @@
drawPoint/2,drawPolygon/2,drawPolygon/3,drawRectangle/2,drawRectangle/3,
drawRotatedText/4,drawRoundedRectangle/3,drawRoundedRectangle/4,
drawText/3,endDoc/1,endPage/1,floodFill/3,floodFill/4,getBackground/1,
- getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/2,
+ getBackgroundMode/1,getBrush/1,getCharHeight/1,getCharWidth/1,getClippingBox/1,
getFont/1,getLayoutDirection/1,getLogicalFunction/1,getMapMode/1,
- getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/3,
- getPen/1,getPixel/3,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
+ getMultiLineTextExtent/2,getMultiLineTextExtent/3,getPPI/1,getPartialTextExtents/2,
+ getPen/1,getPixel/2,getSize/1,getSizeMM/1,getTextBackground/1,getTextExtent/2,
getTextExtent/3,getTextForeground/1,getUserScale/1,gradientFillConcentric/4,
gradientFillConcentric/5,gradientFillLinear/4,gradientFillLinear/5,
isOk/1,logicalToDeviceX/2,logicalToDeviceXRel/2,logicalToDeviceY/2,
@@ -52,25 +52,28 @@
setPen/2,setTextBackground/2,setTextForeground/2,setUserScale/3,startDoc/2,
startPage/1]).
+-export_type([wxWindowDC/0]).
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxWindowDC()
+-type wxWindowDC() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindowdc.html#wxwindowdcwxwindowdc">external documentation</a>.
+-spec new() -> wxWindowDC().
new() ->
wxe_util:construct(?wxWindowDC_new_0,
<<>>).
-%% @spec (Win::wxWindow:wxWindow()) -> wxWindowDC()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxwindowdc.html#wxwindowdcwxwindowdc">external documentation</a>.
+-spec new(Win) -> wxWindowDC() when
+ Win::wxWindow:wxWindow().
new(#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(WinT,wxWindow),
wxe_util:construct(?wxWindowDC_new_1,
<<WinRef:32/?UI>>).
-%% @spec (This::wxWindowDC()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxWindowDC()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxWindowDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
@@ -157,11 +160,11 @@ getSize(This) -> wxDC:getSize(This).
%% @hidden
getPPI(This) -> wxDC:getPPI(This).
%% @hidden
-getPixel(This,Pt,Col) -> wxDC:getPixel(This,Pt,Col).
+getPixel(This,Pt) -> wxDC:getPixel(This,Pt).
%% @hidden
getPen(This) -> wxDC:getPen(This).
%% @hidden
-getPartialTextExtents(This,Text,Widths) -> wxDC:getPartialTextExtents(This,Text,Widths).
+getPartialTextExtents(This,Text) -> wxDC:getPartialTextExtents(This,Text).
%% @hidden
getMultiLineTextExtent(This,String, Options) -> wxDC:getMultiLineTextExtent(This,String, Options).
%% @hidden
@@ -175,7 +178,7 @@ getLayoutDirection(This) -> wxDC:getLayoutDirection(This).
%% @hidden
getFont(This) -> wxDC:getFont(This).
%% @hidden
-getClippingBox(This,Rect) -> wxDC:getClippingBox(This,Rect).
+getClippingBox(This) -> wxDC:getClippingBox(This).
%% @hidden
getCharWidth(This) -> wxDC:getCharWidth(This).
%% @hidden
diff --git a/lib/wx/src/gen/wxWindowDestroyEvent.erl b/lib/wx/src/gen/wxWindowDestroyEvent.erl
index e62700da4a..909f521d82 100644
--- a/lib/wx/src/gen/wxWindowDestroyEvent.erl
+++ b/lib/wx/src/gen/wxWindowDestroyEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,11 +40,13 @@
parent_class/1,resumePropagation/2,setInt/2,setString/2,shouldPropagate/1,
skip/1,skip/2,stopPropagation/1]).
+-export_type([wxWindowDestroyEvent/0]).
%% @hidden
parent_class(wxCommandEvent) -> true;
parent_class(wxEvent) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+-type wxWindowDestroyEvent() :: wx:wx_object().
%% From wxCommandEvent
%% @hidden
setString(This,S) -> wxCommandEvent:setString(This,S).
diff --git a/lib/wx/src/gen/wxXmlResource.erl b/lib/wx/src/gen/wxXmlResource.erl
index 2b69a49bd7..aa0cffb5a8 100644
--- a/lib/wx/src/gen/wxXmlResource.erl
+++ b/lib/wx/src/gen/wxXmlResource.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,17 +34,21 @@
%% inherited exports
-export([parent_class/1]).
+-export_type([wxXmlResource/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxXmlResource()
+-type wxXmlResource() :: wx:wx_object().
%% @equiv new([])
+-spec new() -> wxXmlResource().
+
new() ->
new([]).
-%% @spec ([Option]) -> wxXmlResource()
-%% Option = {flags, integer()} | {domain, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourcewxxmlresource">external documentation</a>.
+-spec new([Option]) -> wxXmlResource() when
+ Option :: {flags, integer()}
+ | {domain, unicode:chardata()}.
new(Options)
when is_list(Options) ->
MOpts = fun({flags, Flags}, Acc) -> [<<1:32/?UI,Flags:32/?UI>>|Acc];
@@ -54,9 +58,11 @@ new(Options)
wxe_util:construct(?wxXmlResource_new_1,
<<BinOpt/binary>>).
-%% @spec (Filemask::string(), [Option]) -> wxXmlResource()
-%% Option = {flags, integer()} | {domain, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourcewxxmlresource">external documentation</a>.
+-spec new(Filemask, [Option]) -> wxXmlResource() when
+ Filemask::unicode:chardata(),
+ Option :: {flags, integer()}
+ | {domain, unicode:chardata()}.
new(Filemask, Options)
when is_list(Filemask),is_list(Options) ->
Filemask_UC = unicode:characters_to_binary([Filemask,0]),
@@ -67,15 +73,18 @@ new(Filemask, Options)
wxe_util:construct(?wxXmlResource_new_2,
<<(byte_size(Filemask_UC)):32/?UI,(Filemask_UC)/binary, 0:(((8- ((4+byte_size(Filemask_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxXmlResource(), Name::string(), Control::wxWindow:wxWindow()) -> bool()
%% @equiv attachUnknownControl(This,Name,Control, [])
+-spec attachUnknownControl(This, Name, Control) -> boolean() when
+ This::wxXmlResource(), Name::unicode:chardata(), Control::wxWindow:wxWindow().
+
attachUnknownControl(This,Name,Control)
when is_record(This, wx_ref),is_list(Name),is_record(Control, wx_ref) ->
attachUnknownControl(This,Name,Control, []).
-%% @spec (This::wxXmlResource(), Name::string(), Control::wxWindow:wxWindow(), [Option]) -> bool()
-%% Option = {parent, wxWindow:wxWindow()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceattachunknowncontrol">external documentation</a>.
+-spec attachUnknownControl(This, Name, Control, [Option]) -> boolean() when
+ This::wxXmlResource(), Name::unicode:chardata(), Control::wxWindow:wxWindow(),
+ Option :: {parent, wxWindow:wxWindow()}.
attachUnknownControl(#wx_ref{type=ThisT,ref=ThisRef},Name,#wx_ref{type=ControlT,ref=ControlRef}, Options)
when is_list(Name),is_list(Options) ->
?CLASS(ThisT,wxXmlResource),
@@ -87,50 +96,57 @@ attachUnknownControl(#wx_ref{type=ThisT,ref=ThisRef},Name,#wx_ref{type=ControlT,
wxe_util:call(?wxXmlResource_AttachUnknownControl,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,ControlRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxXmlResource()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceclearhandlers">external documentation</a>.
+-spec clearHandlers(This) -> ok when
+ This::wxXmlResource().
clearHandlers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxXmlResource),
wxe_util:cast(?wxXmlResource_ClearHandlers,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxXmlResource(), Major::integer(), Minor::integer(), Release::integer(), Revision::integer()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourcecompareversion">external documentation</a>.
+-spec compareVersion(This, Major, Minor, Release, Revision) -> integer() when
+ This::wxXmlResource(), Major::integer(), Minor::integer(), Release::integer(), Revision::integer().
compareVersion(#wx_ref{type=ThisT,ref=ThisRef},Major,Minor,Release,Revision)
when is_integer(Major),is_integer(Minor),is_integer(Release),is_integer(Revision) ->
?CLASS(ThisT,wxXmlResource),
wxe_util:call(?wxXmlResource_CompareVersion,
<<ThisRef:32/?UI,Major:32/?UI,Minor:32/?UI,Release:32/?UI,Revision:32/?UI>>).
-%% @spec () -> wxXmlResource()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceget">external documentation</a>.
+-spec get() -> wxXmlResource().
get() ->
wxe_util:call(?wxXmlResource_Get,
<<>>).
-%% @spec (This::wxXmlResource()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourcegetflags">external documentation</a>.
+-spec getFlags(This) -> integer() when
+ This::wxXmlResource().
getFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxXmlResource),
wxe_util:call(?wxXmlResource_GetFlags,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxXmlResource()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourcegetversion">external documentation</a>.
+-spec getVersion(This) -> integer() when
+ This::wxXmlResource().
getVersion(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxXmlResource),
wxe_util:call(?wxXmlResource_GetVersion,
<<ThisRef:32/?UI>>).
-%% @spec (Str_id::[string()]) -> integer()
%% @equiv getXRCID(Str_id, [])
+-spec getXRCID(Str_id) -> integer() when
+ Str_id::[unicode:chardata()].
+
getXRCID(Str_id)
when is_list(Str_id) ->
getXRCID(Str_id, []).
-%% @spec (Str_id::[string()], [Option]) -> integer()
-%% Option = {value_if_not_found, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourcegetxrcid">external documentation</a>.
+-spec getXRCID(Str_id, [Option]) -> integer() when
+ Str_id::[unicode:chardata()],
+ Option :: {value_if_not_found, integer()}.
getXRCID(Str_id, Options)
when is_list(Str_id),is_list(Options) ->
Str_id_UC = unicode:characters_to_binary([Str_id,0]),
@@ -140,15 +156,17 @@ getXRCID(Str_id, Options)
wxe_util:call(?wxXmlResource_GetXRCID,
<<(byte_size(Str_id_UC)):32/?UI,(Str_id_UC)/binary, 0:(((8- ((4+byte_size(Str_id_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec (This::wxXmlResource()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceinitallhandlers">external documentation</a>.
+-spec initAllHandlers(This) -> ok when
+ This::wxXmlResource().
initAllHandlers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxXmlResource),
wxe_util:cast(?wxXmlResource_InitAllHandlers,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxXmlResource(), Filemask::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceload">external documentation</a>.
+-spec load(This, Filemask) -> boolean() when
+ This::wxXmlResource(), Filemask::unicode:chardata().
load(#wx_ref{type=ThisT,ref=ThisRef},Filemask)
when is_list(Filemask) ->
?CLASS(ThisT,wxXmlResource),
@@ -156,8 +174,9 @@ load(#wx_ref{type=ThisT,ref=ThisRef},Filemask)
wxe_util:call(?wxXmlResource_Load,
<<ThisRef:32/?UI,(byte_size(Filemask_UC)):32/?UI,(Filemask_UC)/binary, 0:(((8- ((0+byte_size(Filemask_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Name::string()) -> wxBitmap:wxBitmap()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadbitmap">external documentation</a>.
+-spec loadBitmap(This, Name) -> wxBitmap:wxBitmap() when
+ This::wxXmlResource(), Name::unicode:chardata().
loadBitmap(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -165,8 +184,9 @@ loadBitmap(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxXmlResource_LoadBitmap,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::string()) -> wxDialog:wxDialog()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloaddialog">external documentation</a>.
+-spec loadDialog(This, Parent, Name) -> wxDialog:wxDialog() when
+ This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::unicode:chardata().
loadDialog(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -175,8 +195,9 @@ loadDialog(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},N
wxe_util:call(?wxXmlResource_LoadDialog_2,
<<ThisRef:32/?UI,ParentRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Dlg::wxDialog:wxDialog(), Parent::wxWindow:wxWindow(), Name::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloaddialog">external documentation</a>.
+-spec loadDialog(This, Dlg, Parent, Name) -> boolean() when
+ This::wxXmlResource(), Dlg::wxDialog:wxDialog(), Parent::wxWindow:wxWindow(), Name::unicode:chardata().
loadDialog(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DlgT,ref=DlgRef},#wx_ref{type=ParentT,ref=ParentRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -186,8 +207,9 @@ loadDialog(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DlgT,ref=DlgRef},#wx_ref
wxe_util:call(?wxXmlResource_LoadDialog_3,
<<ThisRef:32/?UI,DlgRef:32/?UI,ParentRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::string()) -> wxFrame:wxFrame()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadframe">external documentation</a>.
+-spec loadFrame(This, Parent, Name) -> wxFrame:wxFrame() when
+ This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::unicode:chardata().
loadFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -196,8 +218,9 @@ loadFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Na
wxe_util:call(?wxXmlResource_LoadFrame_2,
<<ThisRef:32/?UI,ParentRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Frame::wxFrame:wxFrame(), Parent::wxWindow:wxWindow(), Name::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadframe">external documentation</a>.
+-spec loadFrame(This, Frame, Parent, Name) -> boolean() when
+ This::wxXmlResource(), Frame::wxFrame:wxFrame(), Parent::wxWindow:wxWindow(), Name::unicode:chardata().
loadFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef},#wx_ref{type=ParentT,ref=ParentRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -207,8 +230,9 @@ loadFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef},#wx_
wxe_util:call(?wxXmlResource_LoadFrame_3,
<<ThisRef:32/?UI,FrameRef:32/?UI,ParentRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Name::string()) -> wxIcon:wxIcon()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadicon">external documentation</a>.
+-spec loadIcon(This, Name) -> wxIcon:wxIcon() when
+ This::wxXmlResource(), Name::unicode:chardata().
loadIcon(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -216,8 +240,9 @@ loadIcon(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxXmlResource_LoadIcon,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Name::string()) -> wxMenu:wxMenu()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadmenu">external documentation</a>.
+-spec loadMenu(This, Name) -> wxMenu:wxMenu() when
+ This::wxXmlResource(), Name::unicode:chardata().
loadMenu(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -225,8 +250,9 @@ loadMenu(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxXmlResource_LoadMenu,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Name::string()) -> wxMenuBar:wxMenuBar()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadmenubar">external documentation</a>.
+-spec loadMenuBar(This, Name) -> wxMenuBar:wxMenuBar() when
+ This::wxXmlResource(), Name::unicode:chardata().
loadMenuBar(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -234,8 +260,9 @@ loadMenuBar(#wx_ref{type=ThisT,ref=ThisRef},Name)
wxe_util:call(?wxXmlResource_LoadMenuBar_1,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::string()) -> wxMenuBar:wxMenuBar()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadmenubar">external documentation</a>.
+-spec loadMenuBar(This, Parent, Name) -> wxMenuBar:wxMenuBar() when
+ This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::unicode:chardata().
loadMenuBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -244,8 +271,9 @@ loadMenuBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},
wxe_util:call(?wxXmlResource_LoadMenuBar_2,
<<ThisRef:32/?UI,ParentRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::string()) -> wxPanel:wxPanel()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadpanel">external documentation</a>.
+-spec loadPanel(This, Parent, Name) -> wxPanel:wxPanel() when
+ This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::unicode:chardata().
loadPanel(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -254,8 +282,9 @@ loadPanel(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Na
wxe_util:call(?wxXmlResource_LoadPanel_2,
<<ThisRef:32/?UI,ParentRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Panel::wxPanel:wxPanel(), Parent::wxWindow:wxWindow(), Name::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadpanel">external documentation</a>.
+-spec loadPanel(This, Panel, Parent, Name) -> boolean() when
+ This::wxXmlResource(), Panel::wxPanel:wxPanel(), Parent::wxWindow:wxWindow(), Name::unicode:chardata().
loadPanel(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PanelT,ref=PanelRef},#wx_ref{type=ParentT,ref=ParentRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -265,8 +294,9 @@ loadPanel(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PanelT,ref=PanelRef},#wx_
wxe_util:call(?wxXmlResource_LoadPanel_3,
<<ThisRef:32/?UI,PanelRef:32/?UI,ParentRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::string()) -> wxToolBar:wxToolBar()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceloadtoolbar">external documentation</a>.
+-spec loadToolBar(This, Parent, Name) -> wxToolBar:wxToolBar() when
+ This::wxXmlResource(), Parent::wxWindow:wxWindow(), Name::unicode:chardata().
loadToolBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Name)
when is_list(Name) ->
?CLASS(ThisT,wxXmlResource),
@@ -275,23 +305,26 @@ loadToolBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},
wxe_util:call(?wxXmlResource_LoadToolBar,
<<ThisRef:32/?UI,ParentRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (Res::wxXmlResource()) -> wxXmlResource()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceset">external documentation</a>.
+-spec set(Res) -> wxXmlResource() when
+ Res::wxXmlResource().
set(#wx_ref{type=ResT,ref=ResRef}) ->
?CLASS(ResT,wxXmlResource),
wxe_util:call(?wxXmlResource_Set,
<<ResRef:32/?UI>>).
-%% @spec (This::wxXmlResource(), Flags::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourcesetflags">external documentation</a>.
+-spec setFlags(This, Flags) -> ok when
+ This::wxXmlResource(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
?CLASS(ThisT,wxXmlResource),
wxe_util:cast(?wxXmlResource_SetFlags,
<<ThisRef:32/?UI,Flags:32/?UI>>).
-%% @spec (This::wxXmlResource(), Filename::string()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxxmlresource.html#wxxmlresourceunload">external documentation</a>.
+-spec unload(This, Filename) -> boolean() when
+ This::wxXmlResource(), Filename::unicode:chardata().
unload(#wx_ref{type=ThisT,ref=ThisRef},Filename)
when is_list(Filename) ->
?CLASS(ThisT,wxXmlResource),
@@ -318,8 +351,8 @@ xrcctrl(Window = #wx_ref{}, Name, Type) when is_list(Name), is_atom(Type) ->
Res = wxWindow:findWindow(Window,ID),
wx:typeCast(Res, Type).
-%% @spec (This::wxXmlResource()) -> ok
%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxXmlResource()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxXmlResource),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wx_misc.erl b/lib/wx/src/gen/wx_misc.erl
index 3382d898e4..a2a39bdae7 100644
--- a/lib/wx/src/gen/wx_misc.erl
+++ b/lib/wx/src/gen/wx_misc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,42 +30,44 @@
launchDefaultBrowser/2,newId/0,registerId/1,setDetectableAutoRepeat/1,
shell/0,shell/1,shutdown/1]).
-%% @spec (Key::WxKeyCode) -> bool()
-%% WxKeyCode = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgetkeystate">external documentation</a>.
-%%<br /> WxKeyCode is one of ?WXK_BACK | ?WXK_TAB | ?WXK_RETURN | ?WXK_ESCAPE | ?WXK_SPACE | ?WXK_DELETE | ?WXK_START | ?WXK_LBUTTON | ?WXK_RBUTTON | ?WXK_CANCEL | ?WXK_MBUTTON | ?WXK_CLEAR | ?WXK_SHIFT | ?WXK_ALT | ?WXK_CONTROL | ?WXK_MENU | ?WXK_PAUSE | ?WXK_CAPITAL | ?WXK_END | ?WXK_HOME | ?WXK_LEFT | ?WXK_UP | ?WXK_RIGHT | ?WXK_DOWN | ?WXK_SELECT | ?WXK_PRINT | ?WXK_EXECUTE | ?WXK_SNAPSHOT | ?WXK_INSERT | ?WXK_HELP | ?WXK_NUMPAD0 | ?WXK_NUMPAD1 | ?WXK_NUMPAD2 | ?WXK_NUMPAD3 | ?WXK_NUMPAD4 | ?WXK_NUMPAD5 | ?WXK_NUMPAD6 | ?WXK_NUMPAD7 | ?WXK_NUMPAD8 | ?WXK_NUMPAD9 | ?WXK_MULTIPLY | ?WXK_ADD | ?WXK_SEPARATOR | ?WXK_SUBTRACT | ?WXK_DECIMAL | ?WXK_DIVIDE | ?WXK_F1 | ?WXK_F2 | ?WXK_F3 | ?WXK_F4 | ?WXK_F5 | ?WXK_F6 | ?WXK_F7 | ?WXK_F8 | ?WXK_F9 | ?WXK_F10 | ?WXK_F11 | ?WXK_F12 | ?WXK_F13 | ?WXK_F14 | ?WXK_F15 | ?WXK_F16 | ?WXK_F17 | ?WXK_F18 | ?WXK_F19 | ?WXK_F20 | ?WXK_F21 | ?WXK_F22 | ?WXK_F23 | ?WXK_F24 | ?WXK_NUMLOCK | ?WXK_SCROLL | ?WXK_PAGEUP | ?WXK_PAGEDOWN | ?WXK_NUMPAD_SPACE | ?WXK_NUMPAD_TAB | ?WXK_NUMPAD_ENTER | ?WXK_NUMPAD_F1 | ?WXK_NUMPAD_F2 | ?WXK_NUMPAD_F3 | ?WXK_NUMPAD_F4 | ?WXK_NUMPAD_HOME | ?WXK_NUMPAD_LEFT | ?WXK_NUMPAD_UP | ?WXK_NUMPAD_RIGHT | ?WXK_NUMPAD_DOWN | ?WXK_NUMPAD_PAGEUP | ?WXK_NUMPAD_PAGEDOWN | ?WXK_NUMPAD_END | ?WXK_NUMPAD_BEGIN | ?WXK_NUMPAD_INSERT | ?WXK_NUMPAD_DELETE | ?WXK_NUMPAD_EQUAL | ?WXK_NUMPAD_MULTIPLY | ?WXK_NUMPAD_ADD | ?WXK_NUMPAD_SEPARATOR | ?WXK_NUMPAD_SUBTRACT | ?WXK_NUMPAD_DECIMAL | ?WXK_NUMPAD_DIVIDE | ?WXK_WINDOWS_LEFT | ?WXK_WINDOWS_RIGHT | ?WXK_WINDOWS_MENU | ?WXK_COMMAND | ?WXK_SPECIAL1 | ?WXK_SPECIAL2 | ?WXK_SPECIAL3 | ?WXK_SPECIAL4 | ?WXK_SPECIAL5 | ?WXK_SPECIAL6 | ?WXK_SPECIAL7 | ?WXK_SPECIAL8 | ?WXK_SPECIAL9 | ?WXK_SPECIAL10 | ?WXK_SPECIAL11 | ?WXK_SPECIAL12 | ?WXK_SPECIAL13 | ?WXK_SPECIAL14 | ?WXK_SPECIAL15 | ?WXK_SPECIAL16 | ?WXK_SPECIAL17 | ?WXK_SPECIAL18 | ?WXK_SPECIAL19 | ?WXK_SPECIAL20
+%%<br /> Key = ?WXK_BACK | ?WXK_TAB | ?WXK_RETURN | ?WXK_ESCAPE | ?WXK_SPACE | ?WXK_DELETE | ?WXK_START | ?WXK_LBUTTON | ?WXK_RBUTTON | ?WXK_CANCEL | ?WXK_MBUTTON | ?WXK_CLEAR | ?WXK_SHIFT | ?WXK_ALT | ?WXK_CONTROL | ?WXK_MENU | ?WXK_PAUSE | ?WXK_CAPITAL | ?WXK_END | ?WXK_HOME | ?WXK_LEFT | ?WXK_UP | ?WXK_RIGHT | ?WXK_DOWN | ?WXK_SELECT | ?WXK_PRINT | ?WXK_EXECUTE | ?WXK_SNAPSHOT | ?WXK_INSERT | ?WXK_HELP | ?WXK_NUMPAD0 | ?WXK_NUMPAD1 | ?WXK_NUMPAD2 | ?WXK_NUMPAD3 | ?WXK_NUMPAD4 | ?WXK_NUMPAD5 | ?WXK_NUMPAD6 | ?WXK_NUMPAD7 | ?WXK_NUMPAD8 | ?WXK_NUMPAD9 | ?WXK_MULTIPLY | ?WXK_ADD | ?WXK_SEPARATOR | ?WXK_SUBTRACT | ?WXK_DECIMAL | ?WXK_DIVIDE | ?WXK_F1 | ?WXK_F2 | ?WXK_F3 | ?WXK_F4 | ?WXK_F5 | ?WXK_F6 | ?WXK_F7 | ?WXK_F8 | ?WXK_F9 | ?WXK_F10 | ?WXK_F11 | ?WXK_F12 | ?WXK_F13 | ?WXK_F14 | ?WXK_F15 | ?WXK_F16 | ?WXK_F17 | ?WXK_F18 | ?WXK_F19 | ?WXK_F20 | ?WXK_F21 | ?WXK_F22 | ?WXK_F23 | ?WXK_F24 | ?WXK_NUMLOCK | ?WXK_SCROLL | ?WXK_PAGEUP | ?WXK_PAGEDOWN | ?WXK_NUMPAD_SPACE | ?WXK_NUMPAD_TAB | ?WXK_NUMPAD_ENTER | ?WXK_NUMPAD_F1 | ?WXK_NUMPAD_F2 | ?WXK_NUMPAD_F3 | ?WXK_NUMPAD_F4 | ?WXK_NUMPAD_HOME | ?WXK_NUMPAD_LEFT | ?WXK_NUMPAD_UP | ?WXK_NUMPAD_RIGHT | ?WXK_NUMPAD_DOWN | ?WXK_NUMPAD_PAGEUP | ?WXK_NUMPAD_PAGEDOWN | ?WXK_NUMPAD_END | ?WXK_NUMPAD_BEGIN | ?WXK_NUMPAD_INSERT | ?WXK_NUMPAD_DELETE | ?WXK_NUMPAD_EQUAL | ?WXK_NUMPAD_MULTIPLY | ?WXK_NUMPAD_ADD | ?WXK_NUMPAD_SEPARATOR | ?WXK_NUMPAD_SUBTRACT | ?WXK_NUMPAD_DECIMAL | ?WXK_NUMPAD_DIVIDE | ?WXK_WINDOWS_LEFT | ?WXK_WINDOWS_RIGHT | ?WXK_WINDOWS_MENU | ?WXK_COMMAND | ?WXK_SPECIAL1 | ?WXK_SPECIAL2 | ?WXK_SPECIAL3 | ?WXK_SPECIAL4 | ?WXK_SPECIAL5 | ?WXK_SPECIAL6 | ?WXK_SPECIAL7 | ?WXK_SPECIAL8 | ?WXK_SPECIAL9 | ?WXK_SPECIAL10 | ?WXK_SPECIAL11 | ?WXK_SPECIAL12 | ?WXK_SPECIAL13 | ?WXK_SPECIAL14 | ?WXK_SPECIAL15 | ?WXK_SPECIAL16 | ?WXK_SPECIAL17 | ?WXK_SPECIAL18 | ?WXK_SPECIAL19 | ?WXK_SPECIAL20
+-spec getKeyState(Key) -> boolean() when
+ Key::wx:wx_enum().
getKeyState(Key)
when is_integer(Key) ->
wxe_util:call(?utils_wxGetKeyState,
<<Key:32/?UI>>).
-%% @spec () -> {X::integer(), Y::integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgetmouseposition">external documentation</a>.
+-spec getMousePosition() -> {X::integer(), Y::integer()}.
getMousePosition() ->
wxe_util:call(?utils_wxGetMousePosition,
<<>>).
-%% @spec () -> wx:wxMouseState()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgetmousestate">external documentation</a>.
+-spec getMouseState() -> wx:wx_wxMouseState().
getMouseState() ->
wxe_util:call(?utils_wxGetMouseState,
<<>>).
-%% @spec (Flag::bool()) -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxsetdetectableautorepeat">external documentation</a>.
+-spec setDetectableAutoRepeat(Flag) -> boolean() when
+ Flag::boolean().
setDetectableAutoRepeat(Flag)
when is_boolean(Flag) ->
wxe_util:call(?utils_wxSetDetectableAutoRepeat,
<<(wxe_util:from_bool(Flag)):32/?UI>>).
-%% @spec () -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxbell">external documentation</a>.
+-spec bell() -> ok.
bell() ->
wxe_util:cast(?utils_wxBell,
<<>>).
-%% @spec (Frame::wxFrame:wxFrame(), MenuString::string(), ItemString::string()) -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxfindmenuitemid">external documentation</a>.
+-spec findMenuItemId(Frame, MenuString, ItemString) -> integer() when
+ Frame::wxFrame:wxFrame(), MenuString::unicode:chardata(), ItemString::unicode:chardata().
findMenuItemId(#wx_ref{type=FrameT,ref=FrameRef},MenuString,ItemString)
when is_list(MenuString),is_list(ItemString) ->
?CLASS(FrameT,wxFrame),
@@ -74,28 +76,31 @@ findMenuItemId(#wx_ref{type=FrameT,ref=FrameRef},MenuString,ItemString)
wxe_util:call(?utils_wxFindMenuItemId,
<<FrameRef:32/?UI,(byte_size(MenuString_UC)):32/?UI,(MenuString_UC)/binary, 0:(((8- ((0+byte_size(MenuString_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(ItemString_UC)):32/?UI,(ItemString_UC)/binary, 0:(((8- ((4+byte_size(ItemString_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (Pt::{X::integer(), Y::integer()}) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgenericfindwindowatpoint">external documentation</a>.
+-spec genericFindWindowAtPoint(Pt) -> wxWindow:wxWindow() when
+ Pt::{X::integer(), Y::integer()}.
genericFindWindowAtPoint({PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
wxe_util:call(?utils_wxGenericFindWindowAtPoint,
<<PtX:32/?UI,PtY:32/?UI>>).
-%% @spec (Pt::{X::integer(), Y::integer()}) -> wxWindow:wxWindow()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxfindwindowatpoint">external documentation</a>.
+-spec findWindowAtPoint(Pt) -> wxWindow:wxWindow() when
+ Pt::{X::integer(), Y::integer()}.
findWindowAtPoint({PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
wxe_util:call(?utils_wxFindWindowAtPoint,
<<PtX:32/?UI,PtY:32/?UI>>).
-%% @spec () -> ok
%% @equiv beginBusyCursor([])
+-spec beginBusyCursor() -> ok.
+
beginBusyCursor() ->
beginBusyCursor([]).
-%% @spec ([Option]) -> ok
-%% Option = {cursor, wxCursor:wxCursor()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxbeginbusycursor">external documentation</a>.
+-spec beginBusyCursor([Option]) -> ok when
+ Option :: {cursor, wxCursor:wxCursor()}.
beginBusyCursor(Options)
when is_list(Options) ->
MOpts = fun({cursor, #wx_ref{type=CursorT,ref=CursorRef}}, Acc) -> ?CLASS(CursorT,wxCursor),[<<1:32/?UI,CursorRef:32/?UI>>|Acc];
@@ -104,35 +109,36 @@ beginBusyCursor(Options)
wxe_util:cast(?utils_wxBeginBusyCursor,
<<BinOpt/binary>>).
-%% @spec () -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxendbusycursor">external documentation</a>.
+-spec endBusyCursor() -> ok.
endBusyCursor() ->
wxe_util:cast(?utils_wxEndBusyCursor,
<<>>).
-%% @spec () -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxisbusy">external documentation</a>.
+-spec isBusy() -> boolean().
isBusy() ->
wxe_util:call(?utils_wxIsBusy,
<<>>).
-%% @spec (WFlags::WxShutdownFlags) -> bool()
-%% WxShutdownFlags = integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxshutdown">external documentation</a>.
-%%<br /> WxShutdownFlags is one of ?wxSHUTDOWN_POWEROFF | ?wxSHUTDOWN_REBOOT
+%%<br /> WFlags = ?wxSHUTDOWN_POWEROFF | ?wxSHUTDOWN_REBOOT
+-spec shutdown(WFlags) -> boolean() when
+ WFlags::wx:wx_enum().
shutdown(WFlags)
when is_integer(WFlags) ->
wxe_util:call(?utils_wxShutdown,
<<WFlags:32/?UI>>).
-%% @spec () -> bool()
%% @equiv shell([])
+-spec shell() -> boolean().
+
shell() ->
shell([]).
-%% @spec ([Option]) -> bool()
-%% Option = {command, string()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxshell">external documentation</a>.
+-spec shell([Option]) -> boolean() when
+ Option :: {command, unicode:chardata()}.
shell(Options)
when is_list(Options) ->
MOpts = fun({command, Command}, Acc) -> Command_UC = unicode:characters_to_binary([Command,0]),[<<1:32/?UI,(byte_size(Command_UC)):32/?UI,(Command_UC)/binary, 0:(((8- ((0+byte_size(Command_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
@@ -141,15 +147,18 @@ shell(Options)
wxe_util:call(?utils_wxShell,
<<BinOpt/binary>>).
-%% @spec (Url::string()) -> bool()
%% @equiv launchDefaultBrowser(Url, [])
+-spec launchDefaultBrowser(Url) -> boolean() when
+ Url::unicode:chardata().
+
launchDefaultBrowser(Url)
when is_list(Url) ->
launchDefaultBrowser(Url, []).
-%% @spec (Url::string(), [Option]) -> bool()
-%% Option = {flags, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxlaunchdefaultbrowser">external documentation</a>.
+-spec launchDefaultBrowser(Url, [Option]) -> boolean() when
+ Url::unicode:chardata(),
+ Option :: {flags, integer()}.
launchDefaultBrowser(Url, Options)
when is_list(Url),is_list(Options) ->
Url_UC = unicode:characters_to_binary([Url,0]),
@@ -159,57 +168,58 @@ launchDefaultBrowser(Url, Options)
wxe_util:call(?utils_wxLaunchDefaultBrowser,
<<(byte_size(Url_UC)):32/?UI,(Url_UC)/binary, 0:(((8- ((4+byte_size(Url_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
-%% @spec () -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgetemailaddress">external documentation</a>.
+-spec getEmailAddress() -> unicode:charlist().
getEmailAddress() ->
wxe_util:call(?utils_wxGetEmailAddress,
<<>>).
-%% @spec () -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgetuserid">external documentation</a>.
+-spec getUserId() -> unicode:charlist().
getUserId() ->
wxe_util:call(?utils_wxGetUserId,
<<>>).
-%% @spec () -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgethomedir">external documentation</a>.
+-spec getHomeDir() -> unicode:charlist().
getHomeDir() ->
wxe_util:call(?utils_wxGetHomeDir,
<<>>).
-%% @spec () -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxnewid">external documentation</a>.
+-spec newId() -> integer().
newId() ->
wxe_util:call(?utils_wxNewId,
<<>>).
-%% @spec (Id::integer()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxregisterid">external documentation</a>.
+-spec registerId(Id) -> ok when
+ Id::integer().
registerId(Id)
when is_integer(Id) ->
wxe_util:cast(?utils_wxRegisterId,
<<Id:32/?UI>>).
-%% @spec () -> integer()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgetcurrentid">external documentation</a>.
+-spec getCurrentId() -> integer().
getCurrentId() ->
wxe_util:call(?utils_wxGetCurrentId,
<<>>).
-%% @spec () -> string()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxgetosdescription">external documentation</a>.
+-spec getOsDescription() -> unicode:charlist().
getOsDescription() ->
wxe_util:call(?utils_wxGetOsDescription,
<<>>).
-%% @spec () -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxisplatformlittleendian">external documentation</a>.
+-spec isPlatformLittleEndian() -> boolean().
isPlatformLittleEndian() ->
wxe_util:call(?utils_wxIsPlatformLittleEndian,
<<>>).
-%% @spec () -> bool()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_miscellany.html#wxisplatform64bit">external documentation</a>.
+-spec isPlatform64Bit() -> boolean().
isPlatform64Bit() ->
wxe_util:call(?utils_wxIsPlatform64Bit,
<<>>).
diff --git a/lib/wx/src/gen/wxe_debug.hrl b/lib/wx/src/gen/wxe_debug.hrl
index 4224c54200..297d99324a 100644
--- a/lib/wx/src/gen/wxe_debug.hrl
+++ b/lib/wx/src/gen/wxe_debug.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -563,2742 +563,2747 @@ wxdebug_table() ->
{662, {wxDC, getBrush, 0}},
{663, {wxDC, getCharHeight, 0}},
{664, {wxDC, getCharWidth, 0}},
- {665, {wxDC, getClippingBox, 1}},
- {666, {wxDC, getFont, 0}},
- {667, {wxDC, getLayoutDirection, 0}},
- {668, {wxDC, getLogicalFunction, 0}},
- {669, {wxDC, getMapMode, 0}},
- {670, {wxDC, getMultiLineTextExtent_4, 4}},
- {671, {wxDC, getMultiLineTextExtent_1, 1}},
- {672, {wxDC, getPartialTextExtents, 2}},
- {673, {wxDC, getPen, 0}},
- {674, {wxDC, getPixel, 2}},
- {675, {wxDC, getPPI, 0}},
- {677, {wxDC, getSize, 0}},
- {679, {wxDC, getSizeMM, 0}},
- {680, {wxDC, getTextBackground, 0}},
- {681, {wxDC, getTextExtent_4, 4}},
- {682, {wxDC, getTextExtent_1, 1}},
- {684, {wxDC, getTextForeground, 0}},
- {685, {wxDC, getUserScale, 2}},
- {686, {wxDC, gradientFillConcentric_3, 3}},
- {687, {wxDC, gradientFillConcentric_4, 4}},
- {688, {wxDC, gradientFillLinear, 4}},
- {689, {wxDC, logicalToDeviceX, 1}},
- {690, {wxDC, logicalToDeviceXRel, 1}},
- {691, {wxDC, logicalToDeviceY, 1}},
- {692, {wxDC, logicalToDeviceYRel, 1}},
- {693, {wxDC, maxX, 0}},
- {694, {wxDC, maxY, 0}},
- {695, {wxDC, minX, 0}},
- {696, {wxDC, minY, 0}},
- {697, {wxDC, isOk, 0}},
- {698, {wxDC, resetBoundingBox, 0}},
- {699, {wxDC, setAxisOrientation, 2}},
- {700, {wxDC, setBackground, 1}},
- {701, {wxDC, setBackgroundMode, 1}},
- {702, {wxDC, setBrush, 1}},
- {704, {wxDC, setClippingRegion_2, 2}},
- {705, {wxDC, setClippingRegion_1_1, 1}},
- {706, {wxDC, setClippingRegion_1_0, 1}},
- {707, {wxDC, setDeviceOrigin, 2}},
- {708, {wxDC, setFont, 1}},
- {709, {wxDC, setLayoutDirection, 1}},
- {710, {wxDC, setLogicalFunction, 1}},
- {711, {wxDC, setMapMode, 1}},
- {712, {wxDC, setPalette, 1}},
- {713, {wxDC, setPen, 1}},
- {714, {wxDC, setTextBackground, 1}},
- {715, {wxDC, setTextForeground, 1}},
- {716, {wxDC, setUserScale, 2}},
- {717, {wxDC, startDoc, 1}},
- {718, {wxDC, startPage, 0}},
- {719, {wxMirrorDC, new, 2}},
- {720, {wxMirrorDC, 'Destroy', undefined}},
- {721, {wxScreenDC, new, 0}},
- {722, {wxScreenDC, destruct, 0}},
- {723, {wxPostScriptDC, new_0, 0}},
- {724, {wxPostScriptDC, new_1, 1}},
- {725, {wxPostScriptDC, destruct, 0}},
- {726, {wxPostScriptDC, setResolution, 1}},
- {727, {wxPostScriptDC, getResolution, 0}},
- {728, {wxWindowDC, new_0, 0}},
- {729, {wxWindowDC, new_1, 1}},
- {730, {wxWindowDC, destruct, 0}},
- {731, {wxClientDC, new_0, 0}},
- {732, {wxClientDC, new_1, 1}},
- {733, {wxClientDC, 'Destroy', undefined}},
- {734, {wxPaintDC, new_0, 0}},
- {735, {wxPaintDC, new_1, 1}},
- {736, {wxPaintDC, 'Destroy', undefined}},
- {738, {wxMemoryDC, new_1_0, 1}},
- {739, {wxMemoryDC, new_1_1, 1}},
- {740, {wxMemoryDC, new_0, 0}},
- {742, {wxMemoryDC, destruct, 0}},
- {743, {wxMemoryDC, selectObject, 1}},
- {744, {wxMemoryDC, selectObjectAsSource, 1}},
- {745, {wxBufferedDC, new_0, 0}},
- {746, {wxBufferedDC, new_2, 2}},
- {747, {wxBufferedDC, new_3, 3}},
- {748, {wxBufferedDC, destruct, 0}},
- {749, {wxBufferedDC, init_2, 2}},
- {750, {wxBufferedDC, init_3, 3}},
- {751, {wxBufferedPaintDC, new_3, 3}},
- {752, {wxBufferedPaintDC, new_2, 2}},
- {753, {wxBufferedPaintDC, destruct, 0}},
- {754, {wxGraphicsObject, getRenderer, 0}},
- {755, {wxGraphicsObject, isNull, 0}},
- {756, {wxGraphicsContext, create_1_1, 1}},
- {757, {wxGraphicsContext, create_1_0, 1}},
- {758, {wxGraphicsContext, create_0, 0}},
- {759, {wxGraphicsContext, createPen, 1}},
- {760, {wxGraphicsContext, createBrush, 1}},
- {761, {wxGraphicsContext, createRadialGradientBrush, 7}},
- {762, {wxGraphicsContext, createLinearGradientBrush, 6}},
- {763, {wxGraphicsContext, createFont, 2}},
- {764, {wxGraphicsContext, createMatrix, 1}},
- {765, {wxGraphicsContext, createPath, 0}},
- {766, {wxGraphicsContext, clip_1, 1}},
- {767, {wxGraphicsContext, clip_4, 4}},
- {768, {wxGraphicsContext, resetClip, 0}},
- {769, {wxGraphicsContext, drawBitmap, 5}},
- {770, {wxGraphicsContext, drawEllipse, 4}},
- {771, {wxGraphicsContext, drawIcon, 5}},
- {772, {wxGraphicsContext, drawLines, 3}},
- {773, {wxGraphicsContext, drawPath, 2}},
- {774, {wxGraphicsContext, drawRectangle, 4}},
- {775, {wxGraphicsContext, drawRoundedRectangle, 5}},
- {776, {wxGraphicsContext, drawText_3, 3}},
- {777, {wxGraphicsContext, drawText_4_0, 4}},
- {778, {wxGraphicsContext, drawText_4_1, 4}},
- {779, {wxGraphicsContext, drawText_5, 5}},
- {780, {wxGraphicsContext, fillPath, 2}},
- {781, {wxGraphicsContext, strokePath, 1}},
- {782, {wxGraphicsContext, getNativeContext, 0}},
- {783, {wxGraphicsContext, getPartialTextExtents, 2}},
- {784, {wxGraphicsContext, getTextExtent, 5}},
- {785, {wxGraphicsContext, rotate, 1}},
- {786, {wxGraphicsContext, scale, 2}},
- {787, {wxGraphicsContext, translate, 2}},
- {788, {wxGraphicsContext, getTransform, 0}},
- {789, {wxGraphicsContext, setTransform, 1}},
- {790, {wxGraphicsContext, concatTransform, 1}},
- {791, {wxGraphicsContext, setBrush_1_1, 1}},
- {792, {wxGraphicsContext, setBrush_1_0, 1}},
- {793, {wxGraphicsContext, setFont_1, 1}},
- {794, {wxGraphicsContext, setFont_2, 2}},
- {795, {wxGraphicsContext, setPen_1_0, 1}},
- {796, {wxGraphicsContext, setPen_1_1, 1}},
- {797, {wxGraphicsContext, strokeLine, 4}},
- {798, {wxGraphicsContext, strokeLines_2, 2}},
- {799, {wxGraphicsContext, strokeLines_3, 3}},
- {800, {wxGraphicsMatrix, concat, 1}},
- {802, {wxGraphicsMatrix, get, 1}},
- {803, {wxGraphicsMatrix, getNativeMatrix, 0}},
- {804, {wxGraphicsMatrix, invert, 0}},
- {805, {wxGraphicsMatrix, isEqual, 1}},
- {807, {wxGraphicsMatrix, isIdentity, 0}},
- {808, {wxGraphicsMatrix, rotate, 1}},
- {809, {wxGraphicsMatrix, scale, 2}},
- {810, {wxGraphicsMatrix, translate, 2}},
- {811, {wxGraphicsMatrix, set, 1}},
- {812, {wxGraphicsMatrix, transformPoint, 2}},
- {813, {wxGraphicsMatrix, transformDistance, 2}},
- {814, {wxGraphicsPath, moveToPoint_2, 2}},
- {815, {wxGraphicsPath, moveToPoint_1, 1}},
- {816, {wxGraphicsPath, addArc_6, 6}},
- {817, {wxGraphicsPath, addArc_5, 5}},
- {818, {wxGraphicsPath, addArcToPoint, 5}},
- {819, {wxGraphicsPath, addCircle, 3}},
- {820, {wxGraphicsPath, addCurveToPoint_6, 6}},
- {821, {wxGraphicsPath, addCurveToPoint_3, 3}},
- {822, {wxGraphicsPath, addEllipse, 4}},
- {823, {wxGraphicsPath, addLineToPoint_2, 2}},
- {824, {wxGraphicsPath, addLineToPoint_1, 1}},
- {825, {wxGraphicsPath, addPath, 1}},
- {826, {wxGraphicsPath, addQuadCurveToPoint, 4}},
- {827, {wxGraphicsPath, addRectangle, 4}},
- {828, {wxGraphicsPath, addRoundedRectangle, 5}},
- {829, {wxGraphicsPath, closeSubpath, 0}},
- {830, {wxGraphicsPath, contains_3, 3}},
- {831, {wxGraphicsPath, contains_2, 2}},
- {833, {wxGraphicsPath, getBox, 0}},
- {835, {wxGraphicsPath, getCurrentPoint, 0}},
- {836, {wxGraphicsPath, transform, 1}},
- {837, {wxGraphicsRenderer, getDefaultRenderer, 0}},
- {838, {wxGraphicsRenderer, createContext_1_1, 1}},
- {839, {wxGraphicsRenderer, createContext_1_0, 1}},
- {840, {wxGraphicsRenderer, createPen, 1}},
- {841, {wxGraphicsRenderer, createBrush, 1}},
- {842, {wxGraphicsRenderer, createLinearGradientBrush, 6}},
- {843, {wxGraphicsRenderer, createRadialGradientBrush, 7}},
- {844, {wxGraphicsRenderer, createFont, 2}},
- {845, {wxGraphicsRenderer, createMatrix, 1}},
- {846, {wxGraphicsRenderer, createPath, 0}},
- {848, {wxMenuBar, new_1, 1}},
- {850, {wxMenuBar, new_0, 0}},
- {852, {wxMenuBar, destruct, 0}},
- {853, {wxMenuBar, append, 2}},
- {854, {wxMenuBar, check, 2}},
- {855, {wxMenuBar, enable_2, 2}},
- {856, {wxMenuBar, enable_1, 1}},
- {857, {wxMenuBar, enableTop, 2}},
- {858, {wxMenuBar, findMenu, 1}},
- {859, {wxMenuBar, findMenuItem, 2}},
- {860, {wxMenuBar, findItem, 2}},
- {861, {wxMenuBar, getHelpString, 1}},
- {862, {wxMenuBar, getLabel_1, 1}},
- {863, {wxMenuBar, getLabel_0, 0}},
- {864, {wxMenuBar, getLabelTop, 1}},
- {865, {wxMenuBar, getMenu, 1}},
- {866, {wxMenuBar, getMenuCount, 0}},
- {867, {wxMenuBar, insert, 3}},
- {868, {wxMenuBar, isChecked, 1}},
- {869, {wxMenuBar, isEnabled_1, 1}},
- {870, {wxMenuBar, isEnabled_0, 0}},
- {871, {wxMenuBar, remove, 1}},
- {872, {wxMenuBar, replace, 3}},
- {873, {wxMenuBar, setHelpString, 2}},
- {874, {wxMenuBar, setLabel_2, 2}},
- {875, {wxMenuBar, setLabel_1, 1}},
- {876, {wxMenuBar, setLabelTop, 2}},
- {877, {wxControl, getLabel, 0}},
- {878, {wxControl, setLabel, 1}},
- {879, {wxControlWithItems, append_1, 1}},
- {880, {wxControlWithItems, append_2, 2}},
- {881, {wxControlWithItems, appendStrings_1, 1}},
- {882, {wxControlWithItems, clear, 0}},
- {883, {wxControlWithItems, delete, 1}},
- {884, {wxControlWithItems, findString, 2}},
- {885, {wxControlWithItems, getClientData, 1}},
- {886, {wxControlWithItems, setClientData, 2}},
- {887, {wxControlWithItems, getCount, 0}},
- {888, {wxControlWithItems, getSelection, 0}},
- {889, {wxControlWithItems, getString, 1}},
- {890, {wxControlWithItems, getStringSelection, 0}},
- {891, {wxControlWithItems, insert_2, 2}},
- {892, {wxControlWithItems, insert_3, 3}},
- {893, {wxControlWithItems, isEmpty, 0}},
- {894, {wxControlWithItems, select, 1}},
- {895, {wxControlWithItems, setSelection, 1}},
- {896, {wxControlWithItems, setString, 2}},
- {897, {wxControlWithItems, setStringSelection, 1}},
- {900, {wxMenu, new_2, 2}},
- {901, {wxMenu, new_1, 1}},
- {903, {wxMenu, destruct, 0}},
- {904, {wxMenu, append_3, 3}},
- {905, {wxMenu, append_1, 1}},
- {906, {wxMenu, append_4_0, 4}},
- {907, {wxMenu, append_4_1, 4}},
- {908, {wxMenu, appendCheckItem, 3}},
- {909, {wxMenu, appendRadioItem, 3}},
- {910, {wxMenu, appendSeparator, 0}},
- {911, {wxMenu, break, 0}},
- {912, {wxMenu, check, 2}},
- {913, {wxMenu, delete_1_0, 1}},
- {914, {wxMenu, delete_1_1, 1}},
- {915, {wxMenu, destroy_1_0, 1}},
- {916, {wxMenu, destroy_1_1, 1}},
- {917, {wxMenu, enable, 2}},
- {918, {wxMenu, findItem_1, 1}},
- {919, {wxMenu, findItem_2, 2}},
- {920, {wxMenu, findItemByPosition, 1}},
- {921, {wxMenu, getHelpString, 1}},
- {922, {wxMenu, getLabel, 1}},
- {923, {wxMenu, getMenuItemCount, 0}},
- {924, {wxMenu, getMenuItems, 0}},
- {926, {wxMenu, getTitle, 0}},
- {927, {wxMenu, insert_2, 2}},
- {928, {wxMenu, insert_3, 3}},
- {929, {wxMenu, insert_5_1, 5}},
- {930, {wxMenu, insert_5_0, 5}},
- {931, {wxMenu, insertCheckItem, 4}},
- {932, {wxMenu, insertRadioItem, 4}},
- {933, {wxMenu, insertSeparator, 1}},
- {934, {wxMenu, isChecked, 1}},
- {935, {wxMenu, isEnabled, 1}},
- {936, {wxMenu, prepend_1, 1}},
- {937, {wxMenu, prepend_2, 2}},
- {938, {wxMenu, prepend_4_1, 4}},
- {939, {wxMenu, prepend_4_0, 4}},
- {940, {wxMenu, prependCheckItem, 3}},
- {941, {wxMenu, prependRadioItem, 3}},
- {942, {wxMenu, prependSeparator, 0}},
- {943, {wxMenu, remove_1_0, 1}},
- {944, {wxMenu, remove_1_1, 1}},
- {945, {wxMenu, setHelpString, 2}},
- {946, {wxMenu, setLabel, 2}},
- {947, {wxMenu, setTitle, 1}},
- {948, {wxMenuItem, new, 1}},
- {950, {wxMenuItem, destruct, 0}},
- {951, {wxMenuItem, check, 1}},
- {952, {wxMenuItem, enable, 1}},
- {953, {wxMenuItem, getBitmap, 0}},
- {954, {wxMenuItem, getHelp, 0}},
- {955, {wxMenuItem, getId, 0}},
- {956, {wxMenuItem, getKind, 0}},
- {957, {wxMenuItem, getLabel, 0}},
- {958, {wxMenuItem, getLabelFromText, 1}},
- {959, {wxMenuItem, getMenu, 0}},
- {960, {wxMenuItem, getText, 0}},
- {961, {wxMenuItem, getSubMenu, 0}},
- {962, {wxMenuItem, isCheckable, 0}},
- {963, {wxMenuItem, isChecked, 0}},
- {964, {wxMenuItem, isEnabled, 0}},
- {965, {wxMenuItem, isSeparator, 0}},
- {966, {wxMenuItem, isSubMenu, 0}},
- {967, {wxMenuItem, setBitmap, 1}},
- {968, {wxMenuItem, setHelp, 1}},
- {969, {wxMenuItem, setMenu, 1}},
- {970, {wxMenuItem, setSubMenu, 1}},
- {971, {wxMenuItem, setText, 1}},
- {972, {wxToolBar, addControl, 1}},
- {973, {wxToolBar, addSeparator, 0}},
- {974, {wxToolBar, addTool_5, 5}},
- {975, {wxToolBar, addTool_4_0, 4}},
- {976, {wxToolBar, addTool_1, 1}},
- {977, {wxToolBar, addTool_4_1, 4}},
- {978, {wxToolBar, addTool_3, 3}},
- {979, {wxToolBar, addTool_6, 6}},
- {980, {wxToolBar, addCheckTool, 4}},
- {981, {wxToolBar, addRadioTool, 4}},
- {982, {wxToolBar, deleteTool, 1}},
- {983, {wxToolBar, deleteToolByPos, 1}},
- {984, {wxToolBar, enableTool, 2}},
- {985, {wxToolBar, findById, 1}},
- {986, {wxToolBar, findControl, 1}},
- {987, {wxToolBar, findToolForPosition, 2}},
- {988, {wxToolBar, getToolSize, 0}},
- {989, {wxToolBar, getToolBitmapSize, 0}},
- {990, {wxToolBar, getMargins, 0}},
- {991, {wxToolBar, getToolEnabled, 1}},
- {992, {wxToolBar, getToolLongHelp, 1}},
- {993, {wxToolBar, getToolPacking, 0}},
- {994, {wxToolBar, getToolPos, 1}},
- {995, {wxToolBar, getToolSeparation, 0}},
- {996, {wxToolBar, getToolShortHelp, 1}},
- {997, {wxToolBar, getToolState, 1}},
- {998, {wxToolBar, insertControl, 2}},
- {999, {wxToolBar, insertSeparator, 1}},
- {1000, {wxToolBar, insertTool_5, 5}},
- {1001, {wxToolBar, insertTool_2, 2}},
- {1002, {wxToolBar, insertTool_4, 4}},
- {1003, {wxToolBar, realize, 0}},
- {1004, {wxToolBar, removeTool, 1}},
- {1005, {wxToolBar, setMargins, 2}},
- {1006, {wxToolBar, setToolBitmapSize, 1}},
- {1007, {wxToolBar, setToolLongHelp, 2}},
- {1008, {wxToolBar, setToolPacking, 1}},
- {1009, {wxToolBar, setToolShortHelp, 2}},
- {1010, {wxToolBar, setToolSeparation, 1}},
- {1011, {wxToolBar, toggleTool, 2}},
- {1013, {wxStatusBar, new_0, 0}},
- {1014, {wxStatusBar, new_2, 2}},
- {1016, {wxStatusBar, destruct, 0}},
- {1017, {wxStatusBar, create, 2}},
- {1018, {wxStatusBar, getFieldRect, 2}},
- {1019, {wxStatusBar, getFieldsCount, 0}},
- {1020, {wxStatusBar, getStatusText, 1}},
- {1021, {wxStatusBar, popStatusText, 1}},
- {1022, {wxStatusBar, pushStatusText, 2}},
- {1023, {wxStatusBar, setFieldsCount, 2}},
- {1024, {wxStatusBar, setMinHeight, 1}},
- {1025, {wxStatusBar, setStatusText, 2}},
- {1026, {wxStatusBar, setStatusWidths, 2}},
- {1027, {wxStatusBar, setStatusStyles, 2}},
- {1028, {wxBitmap, new_0, 0}},
- {1029, {wxBitmap, new_3, 3}},
- {1030, {wxBitmap, new_4, 4}},
- {1031, {wxBitmap, new_2_0, 2}},
- {1032, {wxBitmap, new_2_1, 2}},
- {1033, {wxBitmap, destruct, 0}},
- {1034, {wxBitmap, convertToImage, 0}},
- {1035, {wxBitmap, copyFromIcon, 1}},
- {1036, {wxBitmap, create, 3}},
- {1037, {wxBitmap, getDepth, 0}},
- {1038, {wxBitmap, getHeight, 0}},
- {1039, {wxBitmap, getPalette, 0}},
- {1040, {wxBitmap, getMask, 0}},
- {1041, {wxBitmap, getWidth, 0}},
- {1042, {wxBitmap, getSubBitmap, 1}},
- {1043, {wxBitmap, loadFile, 2}},
- {1044, {wxBitmap, ok, 0}},
- {1045, {wxBitmap, saveFile, 3}},
- {1046, {wxBitmap, setDepth, 1}},
- {1047, {wxBitmap, setHeight, 1}},
- {1048, {wxBitmap, setMask, 1}},
- {1049, {wxBitmap, setPalette, 1}},
- {1050, {wxBitmap, setWidth, 1}},
- {1051, {wxIcon, new_0, 0}},
- {1052, {wxIcon, new_2, 2}},
- {1053, {wxIcon, new_1, 1}},
- {1054, {wxIcon, copyFromBitmap, 1}},
- {1055, {wxIcon, 'Destroy', undefined}},
- {1056, {wxIconBundle, new_0, 0}},
- {1057, {wxIconBundle, new_2, 2}},
- {1058, {wxIconBundle, new_1_0, 1}},
- {1059, {wxIconBundle, new_1_1, 1}},
- {1060, {wxIconBundle, destruct, 0}},
- {1061, {wxIconBundle, addIcon_2, 2}},
- {1062, {wxIconBundle, addIcon_1, 1}},
- {1063, {wxIconBundle, getIcon_1_1, 1}},
- {1064, {wxIconBundle, getIcon_1_0, 1}},
- {1065, {wxCursor, new_0, 0}},
- {1066, {wxCursor, new_1_0, 1}},
- {1067, {wxCursor, new_1_1, 1}},
- {1068, {wxCursor, new_4, 4}},
- {1069, {wxCursor, destruct, 0}},
- {1070, {wxCursor, ok, 0}},
- {1071, {wxMask, new_0, 0}},
- {1072, {wxMask, new_2_1, 2}},
- {1073, {wxMask, new_2_0, 2}},
- {1074, {wxMask, new_1, 1}},
- {1075, {wxMask, destruct, 0}},
- {1076, {wxMask, create_2_1, 2}},
- {1077, {wxMask, create_2_0, 2}},
- {1078, {wxMask, create_1, 1}},
- {1079, {wxImage, new_0, 0}},
- {1080, {wxImage, new_3_0, 3}},
- {1081, {wxImage, new_4, 4}},
- {1082, {wxImage, new_5, 5}},
- {1083, {wxImage, new_2, 2}},
- {1084, {wxImage, new_3_1, 3}},
- {1085, {wxImage, blur, 1}},
- {1086, {wxImage, blurHorizontal, 1}},
- {1087, {wxImage, blurVertical, 1}},
- {1088, {wxImage, convertAlphaToMask, 1}},
- {1089, {wxImage, convertToGreyscale, 1}},
- {1090, {wxImage, convertToMono, 3}},
- {1091, {wxImage, copy, 0}},
- {1092, {wxImage, create_3, 3}},
- {1093, {wxImage, create_4, 4}},
- {1094, {wxImage, create_5, 5}},
- {1095, {wxImage, 'Destroy', 0}},
- {1096, {wxImage, findFirstUnusedColour, 4}},
- {1097, {wxImage, getImageExtWildcard, 0}},
- {1098, {wxImage, getAlpha_2, 2}},
- {1099, {wxImage, getAlpha_0, 0}},
- {1100, {wxImage, getBlue, 2}},
- {1101, {wxImage, getData, 0}},
- {1102, {wxImage, getGreen, 2}},
- {1103, {wxImage, getImageCount, 2}},
- {1104, {wxImage, getHeight, 0}},
- {1105, {wxImage, getMaskBlue, 0}},
- {1106, {wxImage, getMaskGreen, 0}},
- {1107, {wxImage, getMaskRed, 0}},
- {1108, {wxImage, getOrFindMaskColour, 3}},
- {1109, {wxImage, getPalette, 0}},
- {1110, {wxImage, getRed, 2}},
- {1111, {wxImage, getSubImage, 1}},
- {1112, {wxImage, getWidth, 0}},
- {1113, {wxImage, hasAlpha, 0}},
- {1114, {wxImage, hasMask, 0}},
- {1115, {wxImage, getOption, 1}},
- {1116, {wxImage, getOptionInt, 1}},
- {1117, {wxImage, hasOption, 1}},
- {1118, {wxImage, initAlpha, 0}},
- {1119, {wxImage, initStandardHandlers, 0}},
- {1120, {wxImage, isTransparent, 3}},
- {1121, {wxImage, loadFile_2, 2}},
- {1122, {wxImage, loadFile_3, 3}},
- {1123, {wxImage, ok, 0}},
- {1124, {wxImage, removeHandler, 1}},
- {1125, {wxImage, mirror, 1}},
- {1126, {wxImage, replace, 6}},
- {1127, {wxImage, rescale, 3}},
- {1128, {wxImage, resize, 3}},
- {1129, {wxImage, rotate, 3}},
- {1130, {wxImage, rotateHue, 1}},
- {1131, {wxImage, rotate90, 1}},
- {1132, {wxImage, saveFile_1, 1}},
- {1133, {wxImage, saveFile_2_0, 2}},
- {1134, {wxImage, saveFile_2_1, 2}},
- {1135, {wxImage, scale, 3}},
- {1136, {wxImage, size, 3}},
- {1137, {wxImage, setAlpha_3, 3}},
- {1138, {wxImage, setAlpha_2, 2}},
- {1139, {wxImage, setData_2, 2}},
- {1140, {wxImage, setData_4, 4}},
- {1141, {wxImage, setMask, 1}},
- {1142, {wxImage, setMaskColour, 3}},
- {1143, {wxImage, setMaskFromImage, 4}},
- {1144, {wxImage, setOption_2_1, 2}},
- {1145, {wxImage, setOption_2_0, 2}},
- {1146, {wxImage, setPalette, 1}},
- {1147, {wxImage, setRGB_5, 5}},
- {1148, {wxImage, setRGB_4, 4}},
- {1149, {wxImage, 'Destroy', undefined}},
- {1150, {wxBrush, new_0, 0}},
- {1151, {wxBrush, new_2, 2}},
- {1152, {wxBrush, new_1, 1}},
- {1154, {wxBrush, destruct, 0}},
- {1155, {wxBrush, getColour, 0}},
- {1156, {wxBrush, getStipple, 0}},
- {1157, {wxBrush, getStyle, 0}},
- {1158, {wxBrush, isHatch, 0}},
- {1159, {wxBrush, isOk, 0}},
- {1160, {wxBrush, setColour_1, 1}},
- {1161, {wxBrush, setColour_3, 3}},
- {1162, {wxBrush, setStipple, 1}},
- {1163, {wxBrush, setStyle, 1}},
- {1164, {wxPen, new_0, 0}},
- {1165, {wxPen, new_2, 2}},
- {1166, {wxPen, destruct, 0}},
- {1167, {wxPen, getCap, 0}},
- {1168, {wxPen, getColour, 0}},
- {1169, {wxPen, getJoin, 0}},
- {1170, {wxPen, getStyle, 0}},
- {1171, {wxPen, getWidth, 0}},
- {1172, {wxPen, isOk, 0}},
- {1173, {wxPen, setCap, 1}},
- {1174, {wxPen, setColour_1, 1}},
- {1175, {wxPen, setColour_3, 3}},
- {1176, {wxPen, setJoin, 1}},
- {1177, {wxPen, setStyle, 1}},
- {1178, {wxPen, setWidth, 1}},
- {1179, {wxRegion, new_0, 0}},
- {1180, {wxRegion, new_4, 4}},
- {1181, {wxRegion, new_2, 2}},
- {1182, {wxRegion, new_1_1, 1}},
- {1184, {wxRegion, new_1_0, 1}},
- {1186, {wxRegion, destruct, 0}},
- {1187, {wxRegion, clear, 0}},
- {1188, {wxRegion, contains_2, 2}},
- {1189, {wxRegion, contains_1_0, 1}},
- {1190, {wxRegion, contains_4, 4}},
- {1191, {wxRegion, contains_1_1, 1}},
- {1192, {wxRegion, convertToBitmap, 0}},
- {1193, {wxRegion, getBox, 0}},
- {1194, {wxRegion, intersect_4, 4}},
- {1195, {wxRegion, intersect_1_1, 1}},
- {1196, {wxRegion, intersect_1_0, 1}},
- {1197, {wxRegion, isEmpty, 0}},
- {1198, {wxRegion, subtract_4, 4}},
- {1199, {wxRegion, subtract_1_1, 1}},
- {1200, {wxRegion, subtract_1_0, 1}},
- {1201, {wxRegion, offset_2, 2}},
- {1202, {wxRegion, offset_1, 1}},
- {1203, {wxRegion, union_4, 4}},
- {1204, {wxRegion, union_1_2, 1}},
- {1205, {wxRegion, union_1_1, 1}},
- {1206, {wxRegion, union_1_0, 1}},
- {1207, {wxRegion, union_3, 3}},
- {1208, {wxRegion, xor_4, 4}},
- {1209, {wxRegion, xor_1_1, 1}},
- {1210, {wxRegion, xor_1_0, 1}},
- {1211, {wxAcceleratorTable, new_0, 0}},
- {1212, {wxAcceleratorTable, new_2, 2}},
- {1213, {wxAcceleratorTable, destruct, 0}},
- {1214, {wxAcceleratorTable, ok, 0}},
- {1215, {wxAcceleratorEntry, new_1_0, 1}},
- {1216, {wxAcceleratorEntry, new_1_1, 1}},
- {1217, {wxAcceleratorEntry, getCommand, 0}},
- {1218, {wxAcceleratorEntry, getFlags, 0}},
- {1219, {wxAcceleratorEntry, getKeyCode, 0}},
- {1220, {wxAcceleratorEntry, set, 4}},
- {1221, {wxAcceleratorEntry, 'Destroy', undefined}},
- {1226, {wxCaret, new_3, 3}},
- {1227, {wxCaret, new_2, 2}},
- {1229, {wxCaret, destruct, 0}},
- {1230, {wxCaret, create_3, 3}},
- {1231, {wxCaret, create_2, 2}},
- {1232, {wxCaret, getBlinkTime, 0}},
- {1234, {wxCaret, getPosition, 0}},
- {1236, {wxCaret, getSize, 0}},
- {1237, {wxCaret, getWindow, 0}},
- {1238, {wxCaret, hide, 0}},
- {1239, {wxCaret, isOk, 0}},
- {1240, {wxCaret, isVisible, 0}},
- {1241, {wxCaret, move_2, 2}},
- {1242, {wxCaret, move_1, 1}},
- {1243, {wxCaret, setBlinkTime, 1}},
- {1244, {wxCaret, setSize_2, 2}},
- {1245, {wxCaret, setSize_1, 1}},
- {1246, {wxCaret, show, 1}},
- {1247, {wxSizer, add_2_1, 2}},
- {1248, {wxSizer, add_2_0, 2}},
- {1249, {wxSizer, add_3, 3}},
- {1250, {wxSizer, add_2_3, 2}},
- {1251, {wxSizer, add_2_2, 2}},
- {1252, {wxSizer, addSpacer, 1}},
- {1253, {wxSizer, addStretchSpacer, 1}},
- {1254, {wxSizer, calcMin, 0}},
- {1255, {wxSizer, clear, 1}},
- {1256, {wxSizer, detach_1_2, 1}},
- {1257, {wxSizer, detach_1_1, 1}},
- {1258, {wxSizer, detach_1_0, 1}},
- {1259, {wxSizer, fit, 1}},
- {1260, {wxSizer, fitInside, 1}},
- {1261, {wxSizer, getChildren, 0}},
- {1262, {wxSizer, getItem_2_1, 2}},
- {1263, {wxSizer, getItem_2_0, 2}},
- {1264, {wxSizer, getItem_1, 1}},
- {1265, {wxSizer, getSize, 0}},
- {1266, {wxSizer, getPosition, 0}},
- {1267, {wxSizer, getMinSize, 0}},
- {1268, {wxSizer, hide_2_0, 2}},
- {1269, {wxSizer, hide_2_1, 2}},
- {1270, {wxSizer, hide_1, 1}},
- {1271, {wxSizer, insert_3_1, 3}},
- {1272, {wxSizer, insert_3_0, 3}},
- {1273, {wxSizer, insert_4, 4}},
- {1274, {wxSizer, insert_3_3, 3}},
- {1275, {wxSizer, insert_3_2, 3}},
- {1276, {wxSizer, insert_2, 2}},
- {1277, {wxSizer, insertSpacer, 2}},
- {1278, {wxSizer, insertStretchSpacer, 2}},
- {1279, {wxSizer, isShown_1_2, 1}},
- {1280, {wxSizer, isShown_1_1, 1}},
- {1281, {wxSizer, isShown_1_0, 1}},
- {1282, {wxSizer, layout, 0}},
- {1283, {wxSizer, prepend_2_1, 2}},
- {1284, {wxSizer, prepend_2_0, 2}},
- {1285, {wxSizer, prepend_3, 3}},
- {1286, {wxSizer, prepend_2_3, 2}},
- {1287, {wxSizer, prepend_2_2, 2}},
- {1288, {wxSizer, prepend_1, 1}},
- {1289, {wxSizer, prependSpacer, 1}},
- {1290, {wxSizer, prependStretchSpacer, 1}},
- {1291, {wxSizer, recalcSizes, 0}},
- {1292, {wxSizer, remove_1_1, 1}},
- {1293, {wxSizer, remove_1_0, 1}},
- {1294, {wxSizer, replace_3_1, 3}},
- {1295, {wxSizer, replace_3_0, 3}},
- {1296, {wxSizer, replace_2, 2}},
- {1297, {wxSizer, setDimension, 4}},
- {1298, {wxSizer, setMinSize_2, 2}},
- {1299, {wxSizer, setMinSize_1, 1}},
- {1300, {wxSizer, setItemMinSize_3_2, 3}},
- {1301, {wxSizer, setItemMinSize_2_2, 2}},
- {1302, {wxSizer, setItemMinSize_3_1, 3}},
- {1303, {wxSizer, setItemMinSize_2_1, 2}},
- {1304, {wxSizer, setItemMinSize_3_0, 3}},
- {1305, {wxSizer, setItemMinSize_2_0, 2}},
- {1306, {wxSizer, setSizeHints, 1}},
- {1307, {wxSizer, setVirtualSizeHints, 1}},
- {1308, {wxSizer, show_2_2, 2}},
- {1309, {wxSizer, show_2_1, 2}},
- {1310, {wxSizer, show_2_0, 2}},
- {1311, {wxSizer, show_1, 1}},
- {1312, {wxSizerFlags, new, 1}},
- {1313, {wxSizerFlags, align, 1}},
- {1314, {wxSizerFlags, border_2, 2}},
- {1315, {wxSizerFlags, border_1, 1}},
- {1316, {wxSizerFlags, center, 0}},
- {1317, {wxSizerFlags, centre, 0}},
- {1318, {wxSizerFlags, expand, 0}},
- {1319, {wxSizerFlags, left, 0}},
- {1320, {wxSizerFlags, proportion, 1}},
- {1321, {wxSizerFlags, right, 0}},
- {1322, {wxSizerFlags, 'Destroy', undefined}},
- {1323, {wxSizerItem, new_5_1, 5}},
- {1324, {wxSizerItem, new_2_1, 2}},
- {1325, {wxSizerItem, new_5_0, 5}},
- {1326, {wxSizerItem, new_2_0, 2}},
- {1327, {wxSizerItem, new_6, 6}},
- {1328, {wxSizerItem, new_3, 3}},
- {1329, {wxSizerItem, new_0, 0}},
- {1330, {wxSizerItem, destruct, 0}},
- {1331, {wxSizerItem, calcMin, 0}},
- {1332, {wxSizerItem, deleteWindows, 0}},
- {1333, {wxSizerItem, detachSizer, 0}},
- {1334, {wxSizerItem, getBorder, 0}},
- {1335, {wxSizerItem, getFlag, 0}},
- {1336, {wxSizerItem, getMinSize, 0}},
- {1337, {wxSizerItem, getPosition, 0}},
- {1338, {wxSizerItem, getProportion, 0}},
- {1339, {wxSizerItem, getRatio, 0}},
- {1340, {wxSizerItem, getRect, 0}},
- {1341, {wxSizerItem, getSize, 0}},
- {1342, {wxSizerItem, getSizer, 0}},
- {1343, {wxSizerItem, getSpacer, 0}},
- {1344, {wxSizerItem, getUserData, 0}},
- {1345, {wxSizerItem, getWindow, 0}},
- {1346, {wxSizerItem, isSizer, 0}},
- {1347, {wxSizerItem, isShown, 0}},
- {1348, {wxSizerItem, isSpacer, 0}},
- {1349, {wxSizerItem, isWindow, 0}},
- {1350, {wxSizerItem, setBorder, 1}},
- {1351, {wxSizerItem, setDimension, 2}},
- {1352, {wxSizerItem, setFlag, 1}},
- {1353, {wxSizerItem, setInitSize, 2}},
- {1354, {wxSizerItem, setMinSize_1, 1}},
- {1355, {wxSizerItem, setMinSize_2, 2}},
- {1356, {wxSizerItem, setProportion, 1}},
- {1357, {wxSizerItem, setRatio_2, 2}},
- {1358, {wxSizerItem, setRatio_1_1, 1}},
- {1359, {wxSizerItem, setRatio_1_0, 1}},
- {1360, {wxSizerItem, setSizer, 1}},
- {1361, {wxSizerItem, setSpacer_1, 1}},
- {1362, {wxSizerItem, setSpacer_2, 2}},
- {1363, {wxSizerItem, setWindow, 1}},
- {1364, {wxSizerItem, show, 1}},
- {1365, {wxBoxSizer, new, 1}},
- {1366, {wxBoxSizer, getOrientation, 0}},
- {1367, {wxBoxSizer, 'Destroy', undefined}},
- {1368, {wxStaticBoxSizer, new_2, 2}},
- {1369, {wxStaticBoxSizer, new_3, 3}},
- {1370, {wxStaticBoxSizer, getStaticBox, 0}},
- {1371, {wxStaticBoxSizer, 'Destroy', undefined}},
- {1372, {wxGridSizer, new_4, 4}},
- {1373, {wxGridSizer, new_2, 2}},
- {1374, {wxGridSizer, getCols, 0}},
- {1375, {wxGridSizer, getHGap, 0}},
- {1376, {wxGridSizer, getRows, 0}},
- {1377, {wxGridSizer, getVGap, 0}},
- {1378, {wxGridSizer, setCols, 1}},
- {1379, {wxGridSizer, setHGap, 1}},
- {1380, {wxGridSizer, setRows, 1}},
- {1381, {wxGridSizer, setVGap, 1}},
- {1382, {wxGridSizer, 'Destroy', undefined}},
- {1383, {wxFlexGridSizer, new_4, 4}},
- {1384, {wxFlexGridSizer, new_2, 2}},
- {1385, {wxFlexGridSizer, addGrowableCol, 2}},
- {1386, {wxFlexGridSizer, addGrowableRow, 2}},
- {1387, {wxFlexGridSizer, getFlexibleDirection, 0}},
- {1388, {wxFlexGridSizer, getNonFlexibleGrowMode, 0}},
- {1389, {wxFlexGridSizer, removeGrowableCol, 1}},
- {1390, {wxFlexGridSizer, removeGrowableRow, 1}},
- {1391, {wxFlexGridSizer, setFlexibleDirection, 1}},
- {1392, {wxFlexGridSizer, setNonFlexibleGrowMode, 1}},
- {1393, {wxFlexGridSizer, 'Destroy', undefined}},
- {1394, {wxGridBagSizer, new, 1}},
- {1395, {wxGridBagSizer, add_3_2, 3}},
- {1396, {wxGridBagSizer, add_3_1, 3}},
- {1397, {wxGridBagSizer, add_4, 4}},
- {1398, {wxGridBagSizer, add_1_0, 1}},
- {1399, {wxGridBagSizer, add_2_1, 2}},
- {1400, {wxGridBagSizer, add_2_0, 2}},
- {1401, {wxGridBagSizer, add_3_0, 3}},
- {1402, {wxGridBagSizer, add_1_1, 1}},
- {1403, {wxGridBagSizer, calcMin, 0}},
- {1404, {wxGridBagSizer, checkForIntersection_2, 2}},
- {1405, {wxGridBagSizer, checkForIntersection_3, 3}},
- {1406, {wxGridBagSizer, findItem_1_1, 1}},
- {1407, {wxGridBagSizer, findItem_1_0, 1}},
- {1408, {wxGridBagSizer, findItemAtPoint, 1}},
- {1409, {wxGridBagSizer, findItemAtPosition, 1}},
- {1410, {wxGridBagSizer, findItemWithData, 1}},
- {1411, {wxGridBagSizer, getCellSize, 2}},
- {1412, {wxGridBagSizer, getEmptyCellSize, 0}},
- {1413, {wxGridBagSizer, getItemPosition_1_2, 1}},
- {1414, {wxGridBagSizer, getItemPosition_1_1, 1}},
- {1415, {wxGridBagSizer, getItemPosition_1_0, 1}},
- {1416, {wxGridBagSizer, getItemSpan_1_2, 1}},
- {1417, {wxGridBagSizer, getItemSpan_1_1, 1}},
- {1418, {wxGridBagSizer, getItemSpan_1_0, 1}},
- {1419, {wxGridBagSizer, setEmptyCellSize, 1}},
- {1420, {wxGridBagSizer, setItemPosition_2_2, 2}},
- {1421, {wxGridBagSizer, setItemPosition_2_1, 2}},
- {1422, {wxGridBagSizer, setItemPosition_2_0, 2}},
- {1423, {wxGridBagSizer, setItemSpan_2_2, 2}},
- {1424, {wxGridBagSizer, setItemSpan_2_1, 2}},
- {1425, {wxGridBagSizer, setItemSpan_2_0, 2}},
- {1426, {wxGridBagSizer, 'Destroy', undefined}},
- {1427, {wxStdDialogButtonSizer, new, 0}},
- {1428, {wxStdDialogButtonSizer, addButton, 1}},
- {1429, {wxStdDialogButtonSizer, realize, 0}},
- {1430, {wxStdDialogButtonSizer, setAffirmativeButton, 1}},
- {1431, {wxStdDialogButtonSizer, setCancelButton, 1}},
- {1432, {wxStdDialogButtonSizer, setNegativeButton, 1}},
- {1433, {wxStdDialogButtonSizer, 'Destroy', undefined}},
- {1434, {wxFont, new_0, 0}},
- {1435, {wxFont, new_1, 1}},
- {1436, {wxFont, new_5, 5}},
- {1438, {wxFont, destruct, 0}},
- {1439, {wxFont, isFixedWidth, 0}},
- {1440, {wxFont, getDefaultEncoding, 0}},
- {1441, {wxFont, getFaceName, 0}},
- {1442, {wxFont, getFamily, 0}},
- {1443, {wxFont, getNativeFontInfoDesc, 0}},
- {1444, {wxFont, getNativeFontInfoUserDesc, 0}},
- {1445, {wxFont, getPointSize, 0}},
- {1446, {wxFont, getStyle, 0}},
- {1447, {wxFont, getUnderlined, 0}},
- {1448, {wxFont, getWeight, 0}},
- {1449, {wxFont, ok, 0}},
- {1450, {wxFont, setDefaultEncoding, 1}},
- {1451, {wxFont, setFaceName, 1}},
- {1452, {wxFont, setFamily, 1}},
- {1453, {wxFont, setPointSize, 1}},
- {1454, {wxFont, setStyle, 1}},
- {1455, {wxFont, setUnderlined, 1}},
- {1456, {wxFont, setWeight, 1}},
- {1457, {wxToolTip, enable, 1}},
- {1458, {wxToolTip, setDelay, 1}},
- {1459, {wxToolTip, new, 1}},
- {1460, {wxToolTip, setTip, 1}},
- {1461, {wxToolTip, getTip, 0}},
- {1462, {wxToolTip, getWindow, 0}},
- {1463, {wxToolTip, 'Destroy', undefined}},
- {1465, {wxButton, new_3, 3}},
- {1466, {wxButton, new_0, 0}},
- {1467, {wxButton, destruct, 0}},
- {1468, {wxButton, create, 3}},
- {1469, {wxButton, getDefaultSize, 0}},
- {1470, {wxButton, setDefault, 0}},
- {1471, {wxButton, setLabel, 1}},
- {1473, {wxBitmapButton, new_4, 4}},
- {1474, {wxBitmapButton, new_0, 0}},
- {1475, {wxBitmapButton, create, 4}},
- {1476, {wxBitmapButton, getBitmapDisabled, 0}},
- {1478, {wxBitmapButton, getBitmapFocus, 0}},
- {1480, {wxBitmapButton, getBitmapLabel, 0}},
- {1482, {wxBitmapButton, getBitmapSelected, 0}},
- {1484, {wxBitmapButton, setBitmapDisabled, 1}},
- {1485, {wxBitmapButton, setBitmapFocus, 1}},
- {1486, {wxBitmapButton, setBitmapLabel, 1}},
- {1487, {wxBitmapButton, setBitmapSelected, 1}},
- {1488, {wxBitmapButton, 'Destroy', undefined}},
- {1489, {wxToggleButton, new_0, 0}},
- {1490, {wxToggleButton, new_4, 4}},
- {1491, {wxToggleButton, create, 4}},
- {1492, {wxToggleButton, getValue, 0}},
- {1493, {wxToggleButton, setValue, 1}},
- {1494, {wxToggleButton, 'Destroy', undefined}},
- {1495, {wxCalendarCtrl, new_0, 0}},
- {1496, {wxCalendarCtrl, new_3, 3}},
- {1497, {wxCalendarCtrl, create, 3}},
- {1498, {wxCalendarCtrl, destruct, 0}},
- {1499, {wxCalendarCtrl, setDate, 1}},
- {1500, {wxCalendarCtrl, getDate, 0}},
- {1501, {wxCalendarCtrl, enableYearChange, 1}},
- {1502, {wxCalendarCtrl, enableMonthChange, 1}},
- {1503, {wxCalendarCtrl, enableHolidayDisplay, 1}},
- {1504, {wxCalendarCtrl, setHeaderColours, 2}},
- {1505, {wxCalendarCtrl, getHeaderColourFg, 0}},
- {1506, {wxCalendarCtrl, getHeaderColourBg, 0}},
- {1507, {wxCalendarCtrl, setHighlightColours, 2}},
- {1508, {wxCalendarCtrl, getHighlightColourFg, 0}},
- {1509, {wxCalendarCtrl, getHighlightColourBg, 0}},
- {1510, {wxCalendarCtrl, setHolidayColours, 2}},
- {1511, {wxCalendarCtrl, getHolidayColourFg, 0}},
- {1512, {wxCalendarCtrl, getHolidayColourBg, 0}},
- {1513, {wxCalendarCtrl, getAttr, 1}},
- {1514, {wxCalendarCtrl, setAttr, 2}},
- {1515, {wxCalendarCtrl, setHoliday, 1}},
- {1516, {wxCalendarCtrl, resetAttr, 1}},
- {1517, {wxCalendarCtrl, hitTest, 2}},
- {1518, {wxCalendarDateAttr, new_0, 0}},
- {1519, {wxCalendarDateAttr, new_2_1, 2}},
- {1520, {wxCalendarDateAttr, new_2_0, 2}},
- {1521, {wxCalendarDateAttr, setTextColour, 1}},
- {1522, {wxCalendarDateAttr, setBackgroundColour, 1}},
- {1523, {wxCalendarDateAttr, setBorderColour, 1}},
- {1524, {wxCalendarDateAttr, setFont, 1}},
- {1525, {wxCalendarDateAttr, setBorder, 1}},
- {1526, {wxCalendarDateAttr, setHoliday, 1}},
- {1527, {wxCalendarDateAttr, hasTextColour, 0}},
- {1528, {wxCalendarDateAttr, hasBackgroundColour, 0}},
- {1529, {wxCalendarDateAttr, hasBorderColour, 0}},
- {1530, {wxCalendarDateAttr, hasFont, 0}},
- {1531, {wxCalendarDateAttr, hasBorder, 0}},
- {1532, {wxCalendarDateAttr, isHoliday, 0}},
- {1533, {wxCalendarDateAttr, getTextColour, 0}},
- {1534, {wxCalendarDateAttr, getBackgroundColour, 0}},
- {1535, {wxCalendarDateAttr, getBorderColour, 0}},
- {1536, {wxCalendarDateAttr, getFont, 0}},
- {1537, {wxCalendarDateAttr, getBorder, 0}},
- {1538, {wxCalendarDateAttr, 'Destroy', undefined}},
- {1540, {wxCheckBox, new_4, 4}},
- {1541, {wxCheckBox, new_0, 0}},
- {1542, {wxCheckBox, create, 4}},
- {1543, {wxCheckBox, getValue, 0}},
- {1544, {wxCheckBox, get3StateValue, 0}},
- {1545, {wxCheckBox, is3rdStateAllowedForUser, 0}},
- {1546, {wxCheckBox, is3State, 0}},
- {1547, {wxCheckBox, isChecked, 0}},
- {1548, {wxCheckBox, setValue, 1}},
- {1549, {wxCheckBox, set3StateValue, 1}},
- {1550, {wxCheckBox, 'Destroy', undefined}},
- {1551, {wxCheckListBox, new_0, 0}},
- {1553, {wxCheckListBox, new_3, 3}},
- {1554, {wxCheckListBox, check, 2}},
- {1555, {wxCheckListBox, isChecked, 1}},
- {1556, {wxCheckListBox, 'Destroy', undefined}},
- {1559, {wxChoice, new_3, 3}},
- {1560, {wxChoice, new_0, 0}},
- {1562, {wxChoice, destruct, 0}},
- {1564, {wxChoice, create, 6}},
- {1565, {wxChoice, delete, 1}},
- {1566, {wxChoice, getColumns, 0}},
- {1567, {wxChoice, setColumns, 1}},
- {1568, {wxComboBox, new_0, 0}},
- {1570, {wxComboBox, new_3, 3}},
- {1571, {wxComboBox, destruct, 0}},
- {1573, {wxComboBox, create, 7}},
- {1574, {wxComboBox, canCopy, 0}},
- {1575, {wxComboBox, canCut, 0}},
- {1576, {wxComboBox, canPaste, 0}},
- {1577, {wxComboBox, canRedo, 0}},
- {1578, {wxComboBox, canUndo, 0}},
- {1579, {wxComboBox, copy, 0}},
- {1580, {wxComboBox, cut, 0}},
- {1581, {wxComboBox, getInsertionPoint, 0}},
- {1582, {wxComboBox, getLastPosition, 0}},
- {1583, {wxComboBox, getValue, 0}},
- {1584, {wxComboBox, paste, 0}},
- {1585, {wxComboBox, redo, 0}},
- {1586, {wxComboBox, replace, 3}},
- {1587, {wxComboBox, remove, 2}},
- {1588, {wxComboBox, setInsertionPoint, 1}},
- {1589, {wxComboBox, setInsertionPointEnd, 0}},
- {1590, {wxComboBox, setSelection_1, 1}},
- {1591, {wxComboBox, setSelection_2, 2}},
- {1592, {wxComboBox, setValue, 1}},
- {1593, {wxComboBox, undo, 0}},
- {1594, {wxGauge, new_0, 0}},
- {1595, {wxGauge, new_4, 4}},
- {1596, {wxGauge, create, 4}},
- {1597, {wxGauge, getBezelFace, 0}},
- {1598, {wxGauge, getRange, 0}},
- {1599, {wxGauge, getShadowWidth, 0}},
- {1600, {wxGauge, getValue, 0}},
- {1601, {wxGauge, isVertical, 0}},
- {1602, {wxGauge, setBezelFace, 1}},
- {1603, {wxGauge, setRange, 1}},
- {1604, {wxGauge, setShadowWidth, 1}},
- {1605, {wxGauge, setValue, 1}},
- {1606, {wxGauge, pulse, 0}},
- {1607, {wxGauge, 'Destroy', undefined}},
- {1608, {wxGenericDirCtrl, new_0, 0}},
- {1609, {wxGenericDirCtrl, new_2, 2}},
- {1610, {wxGenericDirCtrl, destruct, 0}},
- {1611, {wxGenericDirCtrl, create, 2}},
- {1612, {wxGenericDirCtrl, init, 0}},
- {1613, {wxGenericDirCtrl, collapseTree, 0}},
- {1614, {wxGenericDirCtrl, expandPath, 1}},
- {1615, {wxGenericDirCtrl, getDefaultPath, 0}},
- {1616, {wxGenericDirCtrl, getPath, 0}},
- {1617, {wxGenericDirCtrl, getFilePath, 0}},
- {1618, {wxGenericDirCtrl, getFilter, 0}},
- {1619, {wxGenericDirCtrl, getFilterIndex, 0}},
- {1620, {wxGenericDirCtrl, getRootId, 0}},
- {1621, {wxGenericDirCtrl, getTreeCtrl, 0}},
- {1622, {wxGenericDirCtrl, reCreateTree, 0}},
- {1623, {wxGenericDirCtrl, setDefaultPath, 1}},
- {1624, {wxGenericDirCtrl, setFilter, 1}},
- {1625, {wxGenericDirCtrl, setFilterIndex, 1}},
- {1626, {wxGenericDirCtrl, setPath, 1}},
- {1628, {wxStaticBox, new_4, 4}},
- {1629, {wxStaticBox, new_0, 0}},
- {1630, {wxStaticBox, create, 4}},
- {1631, {wxStaticBox, 'Destroy', undefined}},
- {1633, {wxStaticLine, new_2, 2}},
- {1634, {wxStaticLine, new_0, 0}},
- {1635, {wxStaticLine, create, 2}},
- {1636, {wxStaticLine, isVertical, 0}},
- {1637, {wxStaticLine, getDefaultSize, 0}},
- {1638, {wxStaticLine, 'Destroy', undefined}},
- {1641, {wxListBox, new_3, 3}},
- {1642, {wxListBox, new_0, 0}},
- {1644, {wxListBox, destruct, 0}},
- {1646, {wxListBox, create, 6}},
- {1647, {wxListBox, deselect, 1}},
- {1648, {wxListBox, getSelections, 1}},
- {1649, {wxListBox, insertItems, 2}},
- {1650, {wxListBox, isSelected, 1}},
- {1652, {wxListBox, set, 2}},
- {1653, {wxListBox, hitTest, 1}},
- {1654, {wxListBox, setFirstItem_1_0, 1}},
- {1655, {wxListBox, setFirstItem_1_1, 1}},
- {1656, {wxListCtrl, new_0, 0}},
- {1657, {wxListCtrl, new_2, 2}},
- {1658, {wxListCtrl, arrange, 1}},
- {1659, {wxListCtrl, assignImageList, 2}},
- {1660, {wxListCtrl, clearAll, 0}},
- {1661, {wxListCtrl, create, 2}},
- {1662, {wxListCtrl, deleteAllItems, 0}},
- {1663, {wxListCtrl, deleteColumn, 1}},
- {1664, {wxListCtrl, deleteItem, 1}},
- {1665, {wxListCtrl, editLabel, 1}},
- {1666, {wxListCtrl, ensureVisible, 1}},
- {1667, {wxListCtrl, findItem_3_0, 3}},
- {1668, {wxListCtrl, findItem_3_1, 3}},
- {1669, {wxListCtrl, getColumn, 2}},
- {1670, {wxListCtrl, getColumnCount, 0}},
- {1671, {wxListCtrl, getColumnWidth, 1}},
- {1672, {wxListCtrl, getCountPerPage, 0}},
- {1673, {wxListCtrl, getEditControl, 0}},
- {1674, {wxListCtrl, getImageList, 1}},
- {1675, {wxListCtrl, getItem, 1}},
- {1676, {wxListCtrl, getItemBackgroundColour, 1}},
- {1677, {wxListCtrl, getItemCount, 0}},
- {1678, {wxListCtrl, getItemData, 1}},
- {1679, {wxListCtrl, getItemFont, 1}},
- {1680, {wxListCtrl, getItemPosition, 2}},
- {1681, {wxListCtrl, getItemRect, 3}},
- {1682, {wxListCtrl, getItemSpacing, 0}},
- {1683, {wxListCtrl, getItemState, 2}},
- {1684, {wxListCtrl, getItemText, 1}},
- {1685, {wxListCtrl, getItemTextColour, 1}},
- {1686, {wxListCtrl, getNextItem, 2}},
- {1687, {wxListCtrl, getSelectedItemCount, 0}},
- {1688, {wxListCtrl, getTextColour, 0}},
- {1689, {wxListCtrl, getTopItem, 0}},
- {1690, {wxListCtrl, getViewRect, 0}},
- {1691, {wxListCtrl, hitTest, 2}},
- {1692, {wxListCtrl, insertColumn_2, 2}},
- {1693, {wxListCtrl, insertColumn_3, 3}},
- {1694, {wxListCtrl, insertItem_1, 1}},
- {1695, {wxListCtrl, insertItem_2_1, 2}},
- {1696, {wxListCtrl, insertItem_2_0, 2}},
- {1697, {wxListCtrl, insertItem_3, 3}},
- {1698, {wxListCtrl, refreshItem, 1}},
- {1699, {wxListCtrl, refreshItems, 2}},
- {1700, {wxListCtrl, scrollList, 2}},
- {1701, {wxListCtrl, setBackgroundColour, 1}},
- {1702, {wxListCtrl, setColumn, 2}},
- {1703, {wxListCtrl, setColumnWidth, 2}},
- {1704, {wxListCtrl, setImageList, 2}},
- {1705, {wxListCtrl, setItem_1, 1}},
- {1706, {wxListCtrl, setItem_4, 4}},
- {1707, {wxListCtrl, setItemBackgroundColour, 2}},
- {1708, {wxListCtrl, setItemCount, 1}},
- {1709, {wxListCtrl, setItemData, 2}},
- {1710, {wxListCtrl, setItemFont, 2}},
- {1711, {wxListCtrl, setItemImage, 3}},
- {1712, {wxListCtrl, setItemColumnImage, 3}},
- {1713, {wxListCtrl, setItemPosition, 2}},
- {1714, {wxListCtrl, setItemState, 3}},
- {1715, {wxListCtrl, setItemText, 2}},
- {1716, {wxListCtrl, setItemTextColour, 2}},
- {1717, {wxListCtrl, setSingleStyle, 2}},
- {1718, {wxListCtrl, setTextColour, 1}},
- {1719, {wxListCtrl, setWindowStyleFlag, 1}},
- {1720, {wxListCtrl, sortItems, 2}},
- {1721, {wxListCtrl, 'Destroy', undefined}},
- {1722, {wxListView, clearColumnImage, 1}},
- {1723, {wxListView, focus, 1}},
- {1724, {wxListView, getFirstSelected, 0}},
- {1725, {wxListView, getFocusedItem, 0}},
- {1726, {wxListView, getNextSelected, 1}},
- {1727, {wxListView, isSelected, 1}},
- {1728, {wxListView, select, 2}},
- {1729, {wxListView, setColumnImage, 2}},
- {1730, {wxListItem, new_0, 0}},
- {1731, {wxListItem, new_1, 1}},
- {1732, {wxListItem, destruct, 0}},
- {1733, {wxListItem, clear, 0}},
- {1734, {wxListItem, getAlign, 0}},
- {1735, {wxListItem, getBackgroundColour, 0}},
- {1736, {wxListItem, getColumn, 0}},
- {1737, {wxListItem, getFont, 0}},
- {1738, {wxListItem, getId, 0}},
- {1739, {wxListItem, getImage, 0}},
- {1740, {wxListItem, getMask, 0}},
- {1741, {wxListItem, getState, 0}},
- {1742, {wxListItem, getText, 0}},
- {1743, {wxListItem, getTextColour, 0}},
- {1744, {wxListItem, getWidth, 0}},
- {1745, {wxListItem, setAlign, 1}},
- {1746, {wxListItem, setBackgroundColour, 1}},
- {1747, {wxListItem, setColumn, 1}},
- {1748, {wxListItem, setFont, 1}},
- {1749, {wxListItem, setId, 1}},
- {1750, {wxListItem, setImage, 1}},
- {1751, {wxListItem, setMask, 1}},
- {1752, {wxListItem, setState, 1}},
- {1753, {wxListItem, setStateMask, 1}},
- {1754, {wxListItem, setText, 1}},
- {1755, {wxListItem, setTextColour, 1}},
- {1756, {wxListItem, setWidth, 1}},
- {1757, {wxListItemAttr, new_0, 0}},
- {1758, {wxListItemAttr, new_3, 3}},
- {1759, {wxListItemAttr, getBackgroundColour, 0}},
- {1760, {wxListItemAttr, getFont, 0}},
- {1761, {wxListItemAttr, getTextColour, 0}},
- {1762, {wxListItemAttr, hasBackgroundColour, 0}},
- {1763, {wxListItemAttr, hasFont, 0}},
- {1764, {wxListItemAttr, hasTextColour, 0}},
- {1765, {wxListItemAttr, setBackgroundColour, 1}},
- {1766, {wxListItemAttr, setFont, 1}},
- {1767, {wxListItemAttr, setTextColour, 1}},
- {1768, {wxListItemAttr, 'Destroy', undefined}},
- {1769, {wxImageList, new_0, 0}},
- {1770, {wxImageList, new_3, 3}},
- {1771, {wxImageList, add_1, 1}},
- {1772, {wxImageList, add_2_0, 2}},
- {1773, {wxImageList, add_2_1, 2}},
- {1774, {wxImageList, create, 3}},
- {1776, {wxImageList, draw, 5}},
- {1777, {wxImageList, getBitmap, 1}},
- {1778, {wxImageList, getIcon, 1}},
- {1779, {wxImageList, getImageCount, 0}},
- {1780, {wxImageList, getSize, 3}},
- {1781, {wxImageList, remove, 1}},
- {1782, {wxImageList, removeAll, 0}},
- {1783, {wxImageList, replace_2, 2}},
- {1784, {wxImageList, replace_3, 3}},
- {1785, {wxImageList, 'Destroy', undefined}},
- {1786, {wxTextAttr, new_0, 0}},
- {1787, {wxTextAttr, new_2, 2}},
- {1788, {wxTextAttr, getAlignment, 0}},
- {1789, {wxTextAttr, getBackgroundColour, 0}},
- {1790, {wxTextAttr, getFont, 0}},
- {1791, {wxTextAttr, getLeftIndent, 0}},
- {1792, {wxTextAttr, getLeftSubIndent, 0}},
- {1793, {wxTextAttr, getRightIndent, 0}},
- {1794, {wxTextAttr, getTabs, 0}},
- {1795, {wxTextAttr, getTextColour, 0}},
- {1796, {wxTextAttr, hasBackgroundColour, 0}},
- {1797, {wxTextAttr, hasFont, 0}},
- {1798, {wxTextAttr, hasTextColour, 0}},
- {1799, {wxTextAttr, getFlags, 0}},
- {1800, {wxTextAttr, isDefault, 0}},
- {1801, {wxTextAttr, setAlignment, 1}},
- {1802, {wxTextAttr, setBackgroundColour, 1}},
- {1803, {wxTextAttr, setFlags, 1}},
- {1804, {wxTextAttr, setFont, 2}},
- {1805, {wxTextAttr, setLeftIndent, 2}},
- {1806, {wxTextAttr, setRightIndent, 1}},
- {1807, {wxTextAttr, setTabs, 1}},
- {1808, {wxTextAttr, setTextColour, 1}},
- {1809, {wxTextAttr, 'Destroy', undefined}},
- {1811, {wxTextCtrl, new_3, 3}},
- {1812, {wxTextCtrl, new_0, 0}},
- {1814, {wxTextCtrl, destruct, 0}},
- {1815, {wxTextCtrl, appendText, 1}},
- {1816, {wxTextCtrl, canCopy, 0}},
- {1817, {wxTextCtrl, canCut, 0}},
- {1818, {wxTextCtrl, canPaste, 0}},
- {1819, {wxTextCtrl, canRedo, 0}},
- {1820, {wxTextCtrl, canUndo, 0}},
- {1821, {wxTextCtrl, clear, 0}},
- {1822, {wxTextCtrl, copy, 0}},
- {1823, {wxTextCtrl, create, 3}},
- {1824, {wxTextCtrl, cut, 0}},
- {1825, {wxTextCtrl, discardEdits, 0}},
- {1826, {wxTextCtrl, emulateKeyPress, 1}},
- {1827, {wxTextCtrl, getDefaultStyle, 0}},
- {1828, {wxTextCtrl, getInsertionPoint, 0}},
- {1829, {wxTextCtrl, getLastPosition, 0}},
- {1830, {wxTextCtrl, getLineLength, 1}},
- {1831, {wxTextCtrl, getLineText, 1}},
- {1832, {wxTextCtrl, getNumberOfLines, 0}},
- {1833, {wxTextCtrl, getRange, 2}},
- {1834, {wxTextCtrl, getSelection, 2}},
- {1835, {wxTextCtrl, getStringSelection, 0}},
- {1836, {wxTextCtrl, getStyle, 2}},
- {1837, {wxTextCtrl, getValue, 0}},
- {1838, {wxTextCtrl, isEditable, 0}},
- {1839, {wxTextCtrl, isModified, 0}},
- {1840, {wxTextCtrl, isMultiLine, 0}},
- {1841, {wxTextCtrl, isSingleLine, 0}},
- {1842, {wxTextCtrl, loadFile, 2}},
- {1843, {wxTextCtrl, markDirty, 0}},
- {1844, {wxTextCtrl, paste, 0}},
- {1845, {wxTextCtrl, positionToXY, 3}},
- {1846, {wxTextCtrl, redo, 0}},
- {1847, {wxTextCtrl, remove, 2}},
- {1848, {wxTextCtrl, replace, 3}},
- {1849, {wxTextCtrl, saveFile, 1}},
- {1850, {wxTextCtrl, setDefaultStyle, 1}},
- {1851, {wxTextCtrl, setEditable, 1}},
- {1852, {wxTextCtrl, setInsertionPoint, 1}},
- {1853, {wxTextCtrl, setInsertionPointEnd, 0}},
- {1855, {wxTextCtrl, setMaxLength, 1}},
- {1856, {wxTextCtrl, setSelection, 2}},
- {1857, {wxTextCtrl, setStyle, 3}},
- {1858, {wxTextCtrl, setValue, 1}},
- {1859, {wxTextCtrl, showPosition, 1}},
- {1860, {wxTextCtrl, undo, 0}},
- {1861, {wxTextCtrl, writeText, 1}},
- {1862, {wxTextCtrl, xYToPosition, 2}},
- {1865, {wxNotebook, new_0, 0}},
- {1866, {wxNotebook, new_3, 3}},
- {1867, {wxNotebook, destruct, 0}},
- {1868, {wxNotebook, addPage, 3}},
- {1869, {wxNotebook, advanceSelection, 1}},
- {1870, {wxNotebook, assignImageList, 1}},
- {1871, {wxNotebook, create, 3}},
- {1872, {wxNotebook, deleteAllPages, 0}},
- {1873, {wxNotebook, deletePage, 1}},
- {1874, {wxNotebook, removePage, 1}},
- {1875, {wxNotebook, getCurrentPage, 0}},
- {1876, {wxNotebook, getImageList, 0}},
- {1878, {wxNotebook, getPage, 1}},
- {1879, {wxNotebook, getPageCount, 0}},
- {1880, {wxNotebook, getPageImage, 1}},
- {1881, {wxNotebook, getPageText, 1}},
- {1882, {wxNotebook, getRowCount, 0}},
- {1883, {wxNotebook, getSelection, 0}},
- {1884, {wxNotebook, getThemeBackgroundColour, 0}},
- {1886, {wxNotebook, hitTest, 2}},
- {1888, {wxNotebook, insertPage, 4}},
- {1889, {wxNotebook, setImageList, 1}},
- {1890, {wxNotebook, setPadding, 1}},
- {1891, {wxNotebook, setPageSize, 1}},
- {1892, {wxNotebook, setPageImage, 2}},
- {1893, {wxNotebook, setPageText, 2}},
- {1894, {wxNotebook, setSelection, 1}},
- {1895, {wxNotebook, changeSelection, 1}},
- {1896, {wxChoicebook, new_0, 0}},
- {1897, {wxChoicebook, new_3, 3}},
- {1898, {wxChoicebook, addPage, 3}},
- {1899, {wxChoicebook, advanceSelection, 1}},
- {1900, {wxChoicebook, assignImageList, 1}},
- {1901, {wxChoicebook, create, 3}},
- {1902, {wxChoicebook, deleteAllPages, 0}},
- {1903, {wxChoicebook, deletePage, 1}},
- {1904, {wxChoicebook, removePage, 1}},
- {1905, {wxChoicebook, getCurrentPage, 0}},
- {1906, {wxChoicebook, getImageList, 0}},
- {1908, {wxChoicebook, getPage, 1}},
- {1909, {wxChoicebook, getPageCount, 0}},
- {1910, {wxChoicebook, getPageImage, 1}},
- {1911, {wxChoicebook, getPageText, 1}},
- {1912, {wxChoicebook, getSelection, 0}},
- {1913, {wxChoicebook, hitTest, 2}},
- {1914, {wxChoicebook, insertPage, 4}},
- {1915, {wxChoicebook, setImageList, 1}},
- {1916, {wxChoicebook, setPageSize, 1}},
- {1917, {wxChoicebook, setPageImage, 2}},
- {1918, {wxChoicebook, setPageText, 2}},
- {1919, {wxChoicebook, setSelection, 1}},
- {1920, {wxChoicebook, changeSelection, 1}},
- {1921, {wxChoicebook, 'Destroy', undefined}},
- {1922, {wxToolbook, new_0, 0}},
- {1923, {wxToolbook, new_3, 3}},
- {1924, {wxToolbook, addPage, 3}},
- {1925, {wxToolbook, advanceSelection, 1}},
- {1926, {wxToolbook, assignImageList, 1}},
- {1927, {wxToolbook, create, 3}},
- {1928, {wxToolbook, deleteAllPages, 0}},
- {1929, {wxToolbook, deletePage, 1}},
- {1930, {wxToolbook, removePage, 1}},
- {1931, {wxToolbook, getCurrentPage, 0}},
- {1932, {wxToolbook, getImageList, 0}},
- {1934, {wxToolbook, getPage, 1}},
- {1935, {wxToolbook, getPageCount, 0}},
- {1936, {wxToolbook, getPageImage, 1}},
- {1937, {wxToolbook, getPageText, 1}},
- {1938, {wxToolbook, getSelection, 0}},
- {1940, {wxToolbook, hitTest, 2}},
- {1941, {wxToolbook, insertPage, 4}},
- {1942, {wxToolbook, setImageList, 1}},
- {1943, {wxToolbook, setPageSize, 1}},
- {1944, {wxToolbook, setPageImage, 2}},
- {1945, {wxToolbook, setPageText, 2}},
- {1946, {wxToolbook, setSelection, 1}},
- {1947, {wxToolbook, changeSelection, 1}},
- {1948, {wxToolbook, 'Destroy', undefined}},
- {1949, {wxListbook, new_0, 0}},
- {1950, {wxListbook, new_3, 3}},
- {1951, {wxListbook, addPage, 3}},
- {1952, {wxListbook, advanceSelection, 1}},
- {1953, {wxListbook, assignImageList, 1}},
- {1954, {wxListbook, create, 3}},
- {1955, {wxListbook, deleteAllPages, 0}},
- {1956, {wxListbook, deletePage, 1}},
- {1957, {wxListbook, removePage, 1}},
- {1958, {wxListbook, getCurrentPage, 0}},
- {1959, {wxListbook, getImageList, 0}},
- {1961, {wxListbook, getPage, 1}},
- {1962, {wxListbook, getPageCount, 0}},
- {1963, {wxListbook, getPageImage, 1}},
- {1964, {wxListbook, getPageText, 1}},
- {1965, {wxListbook, getSelection, 0}},
- {1967, {wxListbook, hitTest, 2}},
- {1968, {wxListbook, insertPage, 4}},
- {1969, {wxListbook, setImageList, 1}},
- {1970, {wxListbook, setPageSize, 1}},
- {1971, {wxListbook, setPageImage, 2}},
- {1972, {wxListbook, setPageText, 2}},
- {1973, {wxListbook, setSelection, 1}},
- {1974, {wxListbook, changeSelection, 1}},
- {1975, {wxListbook, 'Destroy', undefined}},
- {1976, {wxTreebook, new_0, 0}},
- {1977, {wxTreebook, new_3, 3}},
- {1978, {wxTreebook, addPage, 3}},
- {1979, {wxTreebook, advanceSelection, 1}},
- {1980, {wxTreebook, assignImageList, 1}},
- {1981, {wxTreebook, create, 3}},
- {1982, {wxTreebook, deleteAllPages, 0}},
- {1983, {wxTreebook, deletePage, 1}},
- {1984, {wxTreebook, removePage, 1}},
- {1985, {wxTreebook, getCurrentPage, 0}},
- {1986, {wxTreebook, getImageList, 0}},
- {1988, {wxTreebook, getPage, 1}},
- {1989, {wxTreebook, getPageCount, 0}},
- {1990, {wxTreebook, getPageImage, 1}},
- {1991, {wxTreebook, getPageText, 1}},
- {1992, {wxTreebook, getSelection, 0}},
- {1993, {wxTreebook, expandNode, 2}},
- {1994, {wxTreebook, isNodeExpanded, 1}},
- {1996, {wxTreebook, hitTest, 2}},
- {1997, {wxTreebook, insertPage, 4}},
- {1998, {wxTreebook, insertSubPage, 4}},
- {1999, {wxTreebook, setImageList, 1}},
- {2000, {wxTreebook, setPageSize, 1}},
- {2001, {wxTreebook, setPageImage, 2}},
- {2002, {wxTreebook, setPageText, 2}},
- {2003, {wxTreebook, setSelection, 1}},
- {2004, {wxTreebook, changeSelection, 1}},
- {2005, {wxTreebook, 'Destroy', undefined}},
- {2008, {wxTreeCtrl, new_2, 2}},
- {2009, {wxTreeCtrl, new_0, 0}},
- {2011, {wxTreeCtrl, destruct, 0}},
- {2012, {wxTreeCtrl, addRoot, 2}},
- {2013, {wxTreeCtrl, appendItem, 3}},
- {2014, {wxTreeCtrl, assignImageList, 1}},
- {2015, {wxTreeCtrl, assignStateImageList, 1}},
- {2016, {wxTreeCtrl, collapse, 1}},
- {2017, {wxTreeCtrl, collapseAndReset, 1}},
- {2018, {wxTreeCtrl, create, 2}},
- {2019, {wxTreeCtrl, delete, 1}},
- {2020, {wxTreeCtrl, deleteAllItems, 0}},
- {2021, {wxTreeCtrl, deleteChildren, 1}},
- {2022, {wxTreeCtrl, editLabel, 1}},
- {2023, {wxTreeCtrl, ensureVisible, 1}},
- {2024, {wxTreeCtrl, expand, 1}},
- {2025, {wxTreeCtrl, getBoundingRect, 3}},
- {2027, {wxTreeCtrl, getChildrenCount, 2}},
- {2028, {wxTreeCtrl, getCount, 0}},
- {2029, {wxTreeCtrl, getEditControl, 0}},
- {2030, {wxTreeCtrl, getFirstChild, 2}},
- {2031, {wxTreeCtrl, getNextChild, 2}},
- {2032, {wxTreeCtrl, getFirstVisibleItem, 0}},
- {2033, {wxTreeCtrl, getImageList, 0}},
- {2034, {wxTreeCtrl, getIndent, 0}},
- {2035, {wxTreeCtrl, getItemBackgroundColour, 1}},
- {2036, {wxTreeCtrl, getItemData, 1}},
- {2037, {wxTreeCtrl, getItemFont, 1}},
- {2038, {wxTreeCtrl, getItemImage_1, 1}},
- {2039, {wxTreeCtrl, getItemImage_2, 2}},
- {2040, {wxTreeCtrl, getItemText, 1}},
- {2041, {wxTreeCtrl, getItemTextColour, 1}},
- {2042, {wxTreeCtrl, getLastChild, 1}},
- {2043, {wxTreeCtrl, getNextSibling, 1}},
- {2044, {wxTreeCtrl, getNextVisible, 1}},
- {2045, {wxTreeCtrl, getItemParent, 1}},
- {2046, {wxTreeCtrl, getPrevSibling, 1}},
- {2047, {wxTreeCtrl, getPrevVisible, 1}},
- {2048, {wxTreeCtrl, getRootItem, 0}},
- {2049, {wxTreeCtrl, getSelection, 0}},
- {2050, {wxTreeCtrl, getSelections, 1}},
- {2051, {wxTreeCtrl, getStateImageList, 0}},
- {2052, {wxTreeCtrl, hitTest, 1}},
- {2054, {wxTreeCtrl, insertItem, 4}},
- {2055, {wxTreeCtrl, isBold, 1}},
- {2056, {wxTreeCtrl, isExpanded, 1}},
- {2057, {wxTreeCtrl, isSelected, 1}},
- {2058, {wxTreeCtrl, isVisible, 1}},
- {2059, {wxTreeCtrl, itemHasChildren, 1}},
- {2060, {wxTreeCtrl, prependItem, 3}},
- {2061, {wxTreeCtrl, scrollTo, 1}},
- {2062, {wxTreeCtrl, selectItem_1, 1}},
- {2063, {wxTreeCtrl, selectItem_2, 2}},
- {2064, {wxTreeCtrl, setIndent, 1}},
- {2065, {wxTreeCtrl, setImageList, 1}},
- {2066, {wxTreeCtrl, setItemBackgroundColour, 2}},
- {2067, {wxTreeCtrl, setItemBold, 2}},
- {2068, {wxTreeCtrl, setItemData, 2}},
- {2069, {wxTreeCtrl, setItemDropHighlight, 2}},
- {2070, {wxTreeCtrl, setItemFont, 2}},
- {2071, {wxTreeCtrl, setItemHasChildren, 2}},
- {2072, {wxTreeCtrl, setItemImage_2, 2}},
- {2073, {wxTreeCtrl, setItemImage_3, 3}},
- {2074, {wxTreeCtrl, setItemText, 2}},
- {2075, {wxTreeCtrl, setItemTextColour, 2}},
- {2076, {wxTreeCtrl, setStateImageList, 1}},
- {2077, {wxTreeCtrl, setWindowStyle, 1}},
- {2078, {wxTreeCtrl, sortChildren, 1}},
- {2079, {wxTreeCtrl, toggle, 1}},
- {2080, {wxTreeCtrl, toggleItemSelection, 1}},
- {2081, {wxTreeCtrl, unselect, 0}},
- {2082, {wxTreeCtrl, unselectAll, 0}},
- {2083, {wxTreeCtrl, unselectItem, 1}},
- {2084, {wxScrollBar, new_0, 0}},
- {2085, {wxScrollBar, new_3, 3}},
- {2086, {wxScrollBar, destruct, 0}},
- {2087, {wxScrollBar, create, 3}},
- {2088, {wxScrollBar, getRange, 0}},
- {2089, {wxScrollBar, getPageSize, 0}},
- {2090, {wxScrollBar, getThumbPosition, 0}},
- {2091, {wxScrollBar, getThumbSize, 0}},
- {2092, {wxScrollBar, setThumbPosition, 1}},
- {2093, {wxScrollBar, setScrollbar, 5}},
- {2095, {wxSpinButton, new_2, 2}},
- {2096, {wxSpinButton, new_0, 0}},
- {2097, {wxSpinButton, create, 2}},
- {2098, {wxSpinButton, getMax, 0}},
- {2099, {wxSpinButton, getMin, 0}},
- {2100, {wxSpinButton, getValue, 0}},
- {2101, {wxSpinButton, setRange, 2}},
- {2102, {wxSpinButton, setValue, 1}},
- {2103, {wxSpinButton, 'Destroy', undefined}},
- {2104, {wxSpinCtrl, new_0, 0}},
- {2105, {wxSpinCtrl, new_2, 2}},
- {2107, {wxSpinCtrl, create, 2}},
- {2110, {wxSpinCtrl, setValue_1_1, 1}},
- {2111, {wxSpinCtrl, setValue_1_0, 1}},
- {2113, {wxSpinCtrl, getValue, 0}},
- {2115, {wxSpinCtrl, setRange, 2}},
- {2116, {wxSpinCtrl, setSelection, 2}},
- {2118, {wxSpinCtrl, getMin, 0}},
- {2120, {wxSpinCtrl, getMax, 0}},
- {2121, {wxSpinCtrl, 'Destroy', undefined}},
- {2122, {wxStaticText, new_0, 0}},
- {2123, {wxStaticText, new_4, 4}},
- {2124, {wxStaticText, create, 4}},
- {2125, {wxStaticText, getLabel, 0}},
- {2126, {wxStaticText, setLabel, 1}},
- {2127, {wxStaticText, wrap, 1}},
- {2128, {wxStaticText, 'Destroy', undefined}},
- {2129, {wxStaticBitmap, new_0, 0}},
- {2130, {wxStaticBitmap, new_4, 4}},
- {2131, {wxStaticBitmap, create, 4}},
- {2132, {wxStaticBitmap, getBitmap, 0}},
- {2133, {wxStaticBitmap, setBitmap, 1}},
- {2134, {wxStaticBitmap, 'Destroy', undefined}},
- {2135, {wxRadioBox, new, 7}},
- {2137, {wxRadioBox, destruct, 0}},
- {2138, {wxRadioBox, create, 7}},
- {2139, {wxRadioBox, enable_2, 2}},
- {2140, {wxRadioBox, enable_1, 1}},
- {2141, {wxRadioBox, getSelection, 0}},
- {2142, {wxRadioBox, getString, 1}},
- {2143, {wxRadioBox, setSelection, 1}},
- {2144, {wxRadioBox, show_2, 2}},
- {2145, {wxRadioBox, show_1, 1}},
- {2146, {wxRadioBox, getColumnCount, 0}},
- {2147, {wxRadioBox, getItemHelpText, 1}},
- {2148, {wxRadioBox, getItemToolTip, 1}},
- {2150, {wxRadioBox, getItemFromPoint, 1}},
- {2151, {wxRadioBox, getRowCount, 0}},
- {2152, {wxRadioBox, isItemEnabled, 1}},
- {2153, {wxRadioBox, isItemShown, 1}},
- {2154, {wxRadioBox, setItemHelpText, 2}},
- {2155, {wxRadioBox, setItemToolTip, 2}},
- {2156, {wxRadioButton, new_0, 0}},
- {2157, {wxRadioButton, new_4, 4}},
- {2158, {wxRadioButton, create, 4}},
- {2159, {wxRadioButton, getValue, 0}},
- {2160, {wxRadioButton, setValue, 1}},
- {2161, {wxRadioButton, 'Destroy', undefined}},
- {2163, {wxSlider, new_6, 6}},
- {2164, {wxSlider, new_0, 0}},
- {2165, {wxSlider, create, 6}},
- {2166, {wxSlider, getLineSize, 0}},
- {2167, {wxSlider, getMax, 0}},
- {2168, {wxSlider, getMin, 0}},
- {2169, {wxSlider, getPageSize, 0}},
- {2170, {wxSlider, getThumbLength, 0}},
- {2171, {wxSlider, getValue, 0}},
- {2172, {wxSlider, setLineSize, 1}},
- {2173, {wxSlider, setPageSize, 1}},
- {2174, {wxSlider, setRange, 2}},
- {2175, {wxSlider, setThumbLength, 1}},
- {2176, {wxSlider, setValue, 1}},
- {2177, {wxSlider, 'Destroy', undefined}},
- {2179, {wxDialog, new_4, 4}},
- {2180, {wxDialog, new_0, 0}},
- {2182, {wxDialog, destruct, 0}},
- {2183, {wxDialog, create, 4}},
- {2184, {wxDialog, createButtonSizer, 1}},
- {2185, {wxDialog, createStdDialogButtonSizer, 1}},
- {2186, {wxDialog, endModal, 1}},
- {2187, {wxDialog, getAffirmativeId, 0}},
- {2188, {wxDialog, getReturnCode, 0}},
- {2189, {wxDialog, isModal, 0}},
- {2190, {wxDialog, setAffirmativeId, 1}},
- {2191, {wxDialog, setReturnCode, 1}},
- {2192, {wxDialog, show, 1}},
- {2193, {wxDialog, showModal, 0}},
- {2194, {wxColourDialog, new_0, 0}},
- {2195, {wxColourDialog, new_2, 2}},
- {2196, {wxColourDialog, destruct, 0}},
- {2197, {wxColourDialog, create, 2}},
- {2198, {wxColourDialog, getColourData, 0}},
- {2199, {wxColourData, new_0, 0}},
- {2200, {wxColourData, new_1, 1}},
- {2201, {wxColourData, destruct, 0}},
- {2202, {wxColourData, getChooseFull, 0}},
- {2203, {wxColourData, getColour, 0}},
- {2205, {wxColourData, getCustomColour, 1}},
- {2206, {wxColourData, setChooseFull, 1}},
- {2207, {wxColourData, setColour, 1}},
- {2208, {wxColourData, setCustomColour, 2}},
- {2209, {wxPalette, new_0, 0}},
- {2210, {wxPalette, new_4, 4}},
- {2212, {wxPalette, destruct, 0}},
- {2213, {wxPalette, create, 4}},
- {2214, {wxPalette, getColoursCount, 0}},
- {2215, {wxPalette, getPixel, 3}},
- {2216, {wxPalette, getRGB, 4}},
- {2217, {wxPalette, isOk, 0}},
- {2221, {wxDirDialog, new, 2}},
- {2222, {wxDirDialog, destruct, 0}},
- {2223, {wxDirDialog, getPath, 0}},
- {2224, {wxDirDialog, getMessage, 0}},
- {2225, {wxDirDialog, setMessage, 1}},
- {2226, {wxDirDialog, setPath, 1}},
- {2230, {wxFileDialog, new, 2}},
- {2231, {wxFileDialog, destruct, 0}},
- {2232, {wxFileDialog, getDirectory, 0}},
- {2233, {wxFileDialog, getFilename, 0}},
- {2234, {wxFileDialog, getFilenames, 1}},
- {2235, {wxFileDialog, getFilterIndex, 0}},
- {2236, {wxFileDialog, getMessage, 0}},
- {2237, {wxFileDialog, getPath, 0}},
- {2238, {wxFileDialog, getPaths, 1}},
- {2239, {wxFileDialog, getWildcard, 0}},
- {2240, {wxFileDialog, setDirectory, 1}},
- {2241, {wxFileDialog, setFilename, 1}},
- {2242, {wxFileDialog, setFilterIndex, 1}},
- {2243, {wxFileDialog, setMessage, 1}},
- {2244, {wxFileDialog, setPath, 1}},
- {2245, {wxFileDialog, setWildcard, 1}},
- {2246, {wxPickerBase, setInternalMargin, 1}},
- {2247, {wxPickerBase, getInternalMargin, 0}},
- {2248, {wxPickerBase, setTextCtrlProportion, 1}},
- {2249, {wxPickerBase, setPickerCtrlProportion, 1}},
- {2250, {wxPickerBase, getTextCtrlProportion, 0}},
- {2251, {wxPickerBase, getPickerCtrlProportion, 0}},
- {2252, {wxPickerBase, hasTextCtrl, 0}},
- {2253, {wxPickerBase, getTextCtrl, 0}},
- {2254, {wxPickerBase, isTextCtrlGrowable, 0}},
- {2255, {wxPickerBase, setPickerCtrlGrowable, 1}},
- {2256, {wxPickerBase, setTextCtrlGrowable, 1}},
- {2257, {wxPickerBase, isPickerCtrlGrowable, 0}},
- {2258, {wxFilePickerCtrl, new_0, 0}},
- {2259, {wxFilePickerCtrl, new_3, 3}},
- {2260, {wxFilePickerCtrl, create, 3}},
- {2261, {wxFilePickerCtrl, getPath, 0}},
- {2262, {wxFilePickerCtrl, setPath, 1}},
- {2263, {wxFilePickerCtrl, 'Destroy', undefined}},
- {2264, {wxDirPickerCtrl, new_0, 0}},
- {2265, {wxDirPickerCtrl, new_3, 3}},
- {2266, {wxDirPickerCtrl, create, 3}},
- {2267, {wxDirPickerCtrl, getPath, 0}},
- {2268, {wxDirPickerCtrl, setPath, 1}},
- {2269, {wxDirPickerCtrl, 'Destroy', undefined}},
- {2270, {wxColourPickerCtrl, new_0, 0}},
- {2271, {wxColourPickerCtrl, new_3, 3}},
- {2272, {wxColourPickerCtrl, create, 3}},
- {2273, {wxColourPickerCtrl, getColour, 0}},
- {2274, {wxColourPickerCtrl, setColour_1_1, 1}},
- {2275, {wxColourPickerCtrl, setColour_1_0, 1}},
- {2276, {wxColourPickerCtrl, 'Destroy', undefined}},
- {2277, {wxDatePickerCtrl, new_0, 0}},
- {2278, {wxDatePickerCtrl, new_3, 3}},
- {2279, {wxDatePickerCtrl, getRange, 2}},
- {2280, {wxDatePickerCtrl, getValue, 0}},
- {2281, {wxDatePickerCtrl, setRange, 2}},
- {2282, {wxDatePickerCtrl, setValue, 1}},
- {2283, {wxDatePickerCtrl, 'Destroy', undefined}},
- {2284, {wxFontPickerCtrl, new_0, 0}},
- {2285, {wxFontPickerCtrl, new_3, 3}},
- {2286, {wxFontPickerCtrl, create, 3}},
- {2287, {wxFontPickerCtrl, getSelectedFont, 0}},
- {2288, {wxFontPickerCtrl, setSelectedFont, 1}},
- {2289, {wxFontPickerCtrl, getMaxPointSize, 0}},
- {2290, {wxFontPickerCtrl, setMaxPointSize, 1}},
- {2291, {wxFontPickerCtrl, 'Destroy', undefined}},
- {2294, {wxFindReplaceDialog, new_0, 0}},
- {2295, {wxFindReplaceDialog, new_4, 4}},
- {2296, {wxFindReplaceDialog, destruct, 0}},
- {2297, {wxFindReplaceDialog, create, 4}},
- {2298, {wxFindReplaceDialog, getData, 0}},
- {2299, {wxFindReplaceData, new_0, 0}},
- {2300, {wxFindReplaceData, new_1, 1}},
- {2301, {wxFindReplaceData, getFindString, 0}},
- {2302, {wxFindReplaceData, getReplaceString, 0}},
- {2303, {wxFindReplaceData, getFlags, 0}},
- {2304, {wxFindReplaceData, setFlags, 1}},
- {2305, {wxFindReplaceData, setFindString, 1}},
- {2306, {wxFindReplaceData, setReplaceString, 1}},
- {2307, {wxFindReplaceData, 'Destroy', undefined}},
- {2308, {wxMultiChoiceDialog, new_0, 0}},
- {2310, {wxMultiChoiceDialog, new_5, 5}},
- {2311, {wxMultiChoiceDialog, getSelections, 0}},
- {2312, {wxMultiChoiceDialog, setSelections, 1}},
- {2313, {wxMultiChoiceDialog, 'Destroy', undefined}},
- {2314, {wxSingleChoiceDialog, new_0, 0}},
- {2316, {wxSingleChoiceDialog, new_5, 5}},
- {2317, {wxSingleChoiceDialog, getSelection, 0}},
- {2318, {wxSingleChoiceDialog, getStringSelection, 0}},
- {2319, {wxSingleChoiceDialog, setSelection, 1}},
- {2320, {wxSingleChoiceDialog, 'Destroy', undefined}},
- {2321, {wxTextEntryDialog, new, 3}},
- {2322, {wxTextEntryDialog, getValue, 0}},
- {2323, {wxTextEntryDialog, setValue, 1}},
- {2324, {wxTextEntryDialog, 'Destroy', undefined}},
- {2325, {wxPasswordEntryDialog, new, 3}},
- {2326, {wxPasswordEntryDialog, 'Destroy', undefined}},
- {2327, {wxFontData, new_0, 0}},
- {2328, {wxFontData, new_1, 1}},
- {2329, {wxFontData, destruct, 0}},
- {2330, {wxFontData, enableEffects, 1}},
- {2331, {wxFontData, getAllowSymbols, 0}},
- {2332, {wxFontData, getColour, 0}},
- {2333, {wxFontData, getChosenFont, 0}},
- {2334, {wxFontData, getEnableEffects, 0}},
- {2335, {wxFontData, getInitialFont, 0}},
- {2336, {wxFontData, getShowHelp, 0}},
- {2337, {wxFontData, setAllowSymbols, 1}},
- {2338, {wxFontData, setChosenFont, 1}},
- {2339, {wxFontData, setColour, 1}},
- {2340, {wxFontData, setInitialFont, 1}},
- {2341, {wxFontData, setRange, 2}},
- {2342, {wxFontData, setShowHelp, 1}},
- {2346, {wxFontDialog, new_0, 0}},
- {2348, {wxFontDialog, new_2, 2}},
- {2350, {wxFontDialog, create, 2}},
- {2351, {wxFontDialog, getFontData, 0}},
- {2353, {wxFontDialog, 'Destroy', undefined}},
- {2354, {wxProgressDialog, new, 3}},
- {2355, {wxProgressDialog, destruct, 0}},
- {2356, {wxProgressDialog, resume, 0}},
- {2357, {wxProgressDialog, update_2, 2}},
- {2358, {wxProgressDialog, update_0, 0}},
- {2359, {wxMessageDialog, new, 3}},
- {2360, {wxMessageDialog, destruct, 0}},
- {2361, {wxPageSetupDialog, new, 2}},
- {2362, {wxPageSetupDialog, destruct, 0}},
- {2363, {wxPageSetupDialog, getPageSetupData, 0}},
- {2364, {wxPageSetupDialog, showModal, 0}},
- {2365, {wxPageSetupDialogData, new_0, 0}},
- {2366, {wxPageSetupDialogData, new_1_0, 1}},
- {2367, {wxPageSetupDialogData, new_1_1, 1}},
- {2368, {wxPageSetupDialogData, destruct, 0}},
- {2369, {wxPageSetupDialogData, enableHelp, 1}},
- {2370, {wxPageSetupDialogData, enableMargins, 1}},
- {2371, {wxPageSetupDialogData, enableOrientation, 1}},
- {2372, {wxPageSetupDialogData, enablePaper, 1}},
- {2373, {wxPageSetupDialogData, enablePrinter, 1}},
- {2374, {wxPageSetupDialogData, getDefaultMinMargins, 0}},
- {2375, {wxPageSetupDialogData, getEnableMargins, 0}},
- {2376, {wxPageSetupDialogData, getEnableOrientation, 0}},
- {2377, {wxPageSetupDialogData, getEnablePaper, 0}},
- {2378, {wxPageSetupDialogData, getEnablePrinter, 0}},
- {2379, {wxPageSetupDialogData, getEnableHelp, 0}},
- {2380, {wxPageSetupDialogData, getDefaultInfo, 0}},
- {2381, {wxPageSetupDialogData, getMarginTopLeft, 0}},
- {2382, {wxPageSetupDialogData, getMarginBottomRight, 0}},
- {2383, {wxPageSetupDialogData, getMinMarginTopLeft, 0}},
- {2384, {wxPageSetupDialogData, getMinMarginBottomRight, 0}},
- {2385, {wxPageSetupDialogData, getPaperId, 0}},
- {2386, {wxPageSetupDialogData, getPaperSize, 0}},
- {2388, {wxPageSetupDialogData, getPrintData, 0}},
- {2389, {wxPageSetupDialogData, isOk, 0}},
- {2390, {wxPageSetupDialogData, setDefaultInfo, 1}},
- {2391, {wxPageSetupDialogData, setDefaultMinMargins, 1}},
- {2392, {wxPageSetupDialogData, setMarginTopLeft, 1}},
- {2393, {wxPageSetupDialogData, setMarginBottomRight, 1}},
- {2394, {wxPageSetupDialogData, setMinMarginTopLeft, 1}},
- {2395, {wxPageSetupDialogData, setMinMarginBottomRight, 1}},
- {2396, {wxPageSetupDialogData, setPaperId, 1}},
- {2397, {wxPageSetupDialogData, setPaperSize_1_1, 1}},
- {2398, {wxPageSetupDialogData, setPaperSize_1_0, 1}},
- {2399, {wxPageSetupDialogData, setPrintData, 1}},
- {2400, {wxPrintDialog, new_2_0, 2}},
- {2401, {wxPrintDialog, new_2_1, 2}},
- {2402, {wxPrintDialog, destruct, 0}},
- {2403, {wxPrintDialog, getPrintDialogData, 0}},
- {2404, {wxPrintDialog, getPrintDC, 0}},
- {2405, {wxPrintDialogData, new_0, 0}},
- {2406, {wxPrintDialogData, new_1_1, 1}},
- {2407, {wxPrintDialogData, new_1_0, 1}},
- {2408, {wxPrintDialogData, destruct, 0}},
- {2409, {wxPrintDialogData, enableHelp, 1}},
- {2410, {wxPrintDialogData, enablePageNumbers, 1}},
- {2411, {wxPrintDialogData, enablePrintToFile, 1}},
- {2412, {wxPrintDialogData, enableSelection, 1}},
- {2413, {wxPrintDialogData, getAllPages, 0}},
- {2414, {wxPrintDialogData, getCollate, 0}},
- {2415, {wxPrintDialogData, getFromPage, 0}},
- {2416, {wxPrintDialogData, getMaxPage, 0}},
- {2417, {wxPrintDialogData, getMinPage, 0}},
- {2418, {wxPrintDialogData, getNoCopies, 0}},
- {2419, {wxPrintDialogData, getPrintData, 0}},
- {2420, {wxPrintDialogData, getPrintToFile, 0}},
- {2421, {wxPrintDialogData, getSelection, 0}},
- {2422, {wxPrintDialogData, getToPage, 0}},
- {2423, {wxPrintDialogData, isOk, 0}},
- {2424, {wxPrintDialogData, setCollate, 1}},
- {2425, {wxPrintDialogData, setFromPage, 1}},
- {2426, {wxPrintDialogData, setMaxPage, 1}},
- {2427, {wxPrintDialogData, setMinPage, 1}},
- {2428, {wxPrintDialogData, setNoCopies, 1}},
- {2429, {wxPrintDialogData, setPrintData, 1}},
- {2430, {wxPrintDialogData, setPrintToFile, 1}},
- {2431, {wxPrintDialogData, setSelection, 1}},
- {2432, {wxPrintDialogData, setToPage, 1}},
- {2433, {wxPrintData, new_0, 0}},
- {2434, {wxPrintData, new_1, 1}},
- {2435, {wxPrintData, destruct, 0}},
- {2436, {wxPrintData, getCollate, 0}},
- {2437, {wxPrintData, getBin, 0}},
- {2438, {wxPrintData, getColour, 0}},
- {2439, {wxPrintData, getDuplex, 0}},
- {2440, {wxPrintData, getNoCopies, 0}},
- {2441, {wxPrintData, getOrientation, 0}},
- {2442, {wxPrintData, getPaperId, 0}},
- {2443, {wxPrintData, getPrinterName, 0}},
- {2444, {wxPrintData, getQuality, 0}},
- {2445, {wxPrintData, isOk, 0}},
- {2446, {wxPrintData, setBin, 1}},
- {2447, {wxPrintData, setCollate, 1}},
- {2448, {wxPrintData, setColour, 1}},
- {2449, {wxPrintData, setDuplex, 1}},
- {2450, {wxPrintData, setNoCopies, 1}},
- {2451, {wxPrintData, setOrientation, 1}},
- {2452, {wxPrintData, setPaperId, 1}},
- {2453, {wxPrintData, setPrinterName, 1}},
- {2454, {wxPrintData, setQuality, 1}},
- {2457, {wxPrintPreview, new_2, 2}},
- {2458, {wxPrintPreview, new_3, 3}},
- {2460, {wxPrintPreview, destruct, 0}},
- {2461, {wxPrintPreview, getCanvas, 0}},
- {2462, {wxPrintPreview, getCurrentPage, 0}},
- {2463, {wxPrintPreview, getFrame, 0}},
- {2464, {wxPrintPreview, getMaxPage, 0}},
- {2465, {wxPrintPreview, getMinPage, 0}},
- {2466, {wxPrintPreview, getPrintout, 0}},
- {2467, {wxPrintPreview, getPrintoutForPrinting, 0}},
- {2468, {wxPrintPreview, isOk, 0}},
- {2469, {wxPrintPreview, paintPage, 2}},
- {2470, {wxPrintPreview, print, 1}},
- {2471, {wxPrintPreview, renderPage, 1}},
- {2472, {wxPrintPreview, setCanvas, 1}},
- {2473, {wxPrintPreview, setCurrentPage, 1}},
- {2474, {wxPrintPreview, setFrame, 1}},
- {2475, {wxPrintPreview, setPrintout, 1}},
- {2476, {wxPrintPreview, setZoom, 1}},
- {2477, {wxPreviewFrame, new, 3}},
- {2478, {wxPreviewFrame, destruct, 0}},
- {2479, {wxPreviewFrame, createControlBar, 0}},
- {2480, {wxPreviewFrame, createCanvas, 0}},
- {2481, {wxPreviewFrame, initialize, 0}},
- {2482, {wxPreviewFrame, onCloseWindow, 1}},
- {2483, {wxPreviewControlBar, new, 4}},
- {2484, {wxPreviewControlBar, destruct, 0}},
- {2485, {wxPreviewControlBar, createButtons, 0}},
- {2486, {wxPreviewControlBar, getPrintPreview, 0}},
- {2487, {wxPreviewControlBar, getZoomControl, 0}},
- {2488, {wxPreviewControlBar, setZoomControl, 1}},
- {2490, {wxPrinter, new, 1}},
- {2491, {wxPrinter, createAbortWindow, 2}},
- {2492, {wxPrinter, getAbort, 0}},
- {2493, {wxPrinter, getLastError, 0}},
- {2494, {wxPrinter, getPrintDialogData, 0}},
- {2495, {wxPrinter, print, 3}},
- {2496, {wxPrinter, printDialog, 1}},
- {2497, {wxPrinter, reportError, 3}},
- {2498, {wxPrinter, setup, 1}},
- {2499, {wxPrinter, 'Destroy', undefined}},
- {2500, {wxXmlResource, new_1, 1}},
- {2501, {wxXmlResource, new_2, 2}},
- {2502, {wxXmlResource, destruct, 0}},
- {2503, {wxXmlResource, attachUnknownControl, 3}},
- {2504, {wxXmlResource, clearHandlers, 0}},
- {2505, {wxXmlResource, compareVersion, 4}},
- {2506, {wxXmlResource, get, 0}},
- {2507, {wxXmlResource, getFlags, 0}},
- {2508, {wxXmlResource, getVersion, 0}},
- {2509, {wxXmlResource, getXRCID, 2}},
- {2510, {wxXmlResource, initAllHandlers, 0}},
- {2511, {wxXmlResource, load, 1}},
- {2512, {wxXmlResource, loadBitmap, 1}},
- {2513, {wxXmlResource, loadDialog_2, 2}},
- {2514, {wxXmlResource, loadDialog_3, 3}},
- {2515, {wxXmlResource, loadFrame_2, 2}},
- {2516, {wxXmlResource, loadFrame_3, 3}},
- {2517, {wxXmlResource, loadIcon, 1}},
- {2518, {wxXmlResource, loadMenu, 1}},
- {2519, {wxXmlResource, loadMenuBar_2, 2}},
- {2520, {wxXmlResource, loadMenuBar_1, 1}},
- {2521, {wxXmlResource, loadPanel_2, 2}},
- {2522, {wxXmlResource, loadPanel_3, 3}},
- {2523, {wxXmlResource, loadToolBar, 2}},
- {2524, {wxXmlResource, set, 1}},
- {2525, {wxXmlResource, setFlags, 1}},
- {2526, {wxXmlResource, unload, 1}},
- {2527, {wxXmlResource, xrcctrl, 3}},
- {2528, {wxHtmlEasyPrinting, new, 1}},
- {2529, {wxHtmlEasyPrinting, destruct, 0}},
- {2530, {wxHtmlEasyPrinting, getPrintData, 0}},
- {2531, {wxHtmlEasyPrinting, getPageSetupData, 0}},
- {2532, {wxHtmlEasyPrinting, previewFile, 1}},
- {2533, {wxHtmlEasyPrinting, previewText, 2}},
- {2534, {wxHtmlEasyPrinting, printFile, 1}},
- {2535, {wxHtmlEasyPrinting, printText, 2}},
- {2536, {wxHtmlEasyPrinting, pageSetup, 0}},
- {2537, {wxHtmlEasyPrinting, setFonts, 3}},
- {2538, {wxHtmlEasyPrinting, setHeader, 2}},
- {2539, {wxHtmlEasyPrinting, setFooter, 2}},
- {2541, {wxGLCanvas, new_2, 2}},
- {2542, {wxGLCanvas, new_3_1, 3}},
- {2543, {wxGLCanvas, new_3_0, 3}},
- {2544, {wxGLCanvas, getContext, 0}},
- {2546, {wxGLCanvas, setCurrent, 0}},
- {2547, {wxGLCanvas, swapBuffers, 0}},
- {2548, {wxGLCanvas, 'Destroy', undefined}},
- {2549, {wxAuiManager, new, 1}},
- {2550, {wxAuiManager, destruct, 0}},
- {2551, {wxAuiManager, addPane_2_1, 2}},
- {2552, {wxAuiManager, addPane_3, 3}},
- {2553, {wxAuiManager, addPane_2_0, 2}},
- {2554, {wxAuiManager, detachPane, 1}},
- {2555, {wxAuiManager, getAllPanes, 0}},
- {2556, {wxAuiManager, getArtProvider, 0}},
- {2557, {wxAuiManager, getDockSizeConstraint, 2}},
- {2558, {wxAuiManager, getFlags, 0}},
- {2559, {wxAuiManager, getManagedWindow, 0}},
- {2560, {wxAuiManager, getManager, 1}},
- {2561, {wxAuiManager, getPane_1_1, 1}},
- {2562, {wxAuiManager, getPane_1_0, 1}},
- {2563, {wxAuiManager, hideHint, 0}},
- {2564, {wxAuiManager, insertPane, 3}},
- {2565, {wxAuiManager, loadPaneInfo, 2}},
- {2566, {wxAuiManager, loadPerspective, 2}},
- {2567, {wxAuiManager, savePaneInfo, 1}},
- {2568, {wxAuiManager, savePerspective, 0}},
- {2569, {wxAuiManager, setArtProvider, 1}},
- {2570, {wxAuiManager, setDockSizeConstraint, 2}},
- {2571, {wxAuiManager, setFlags, 1}},
- {2572, {wxAuiManager, setManagedWindow, 1}},
- {2573, {wxAuiManager, showHint, 1}},
- {2574, {wxAuiManager, unInit, 0}},
- {2575, {wxAuiManager, update, 0}},
- {2576, {wxAuiPaneInfo, new_0, 0}},
- {2577, {wxAuiPaneInfo, new_1, 1}},
- {2578, {wxAuiPaneInfo, destruct, 0}},
- {2579, {wxAuiPaneInfo, bestSize_1, 1}},
- {2580, {wxAuiPaneInfo, bestSize_2, 2}},
- {2581, {wxAuiPaneInfo, bottom, 0}},
- {2582, {wxAuiPaneInfo, bottomDockable, 1}},
- {2583, {wxAuiPaneInfo, caption, 1}},
- {2584, {wxAuiPaneInfo, captionVisible, 1}},
- {2585, {wxAuiPaneInfo, centre, 0}},
- {2586, {wxAuiPaneInfo, centrePane, 0}},
- {2587, {wxAuiPaneInfo, closeButton, 1}},
- {2588, {wxAuiPaneInfo, defaultPane, 0}},
- {2589, {wxAuiPaneInfo, destroyOnClose, 1}},
- {2590, {wxAuiPaneInfo, direction, 1}},
- {2591, {wxAuiPaneInfo, dock, 0}},
- {2592, {wxAuiPaneInfo, dockable, 1}},
- {2593, {wxAuiPaneInfo, fixed, 0}},
- {2594, {wxAuiPaneInfo, float, 0}},
- {2595, {wxAuiPaneInfo, floatable, 1}},
- {2596, {wxAuiPaneInfo, floatingPosition_1, 1}},
- {2597, {wxAuiPaneInfo, floatingPosition_2, 2}},
- {2598, {wxAuiPaneInfo, floatingSize_1, 1}},
- {2599, {wxAuiPaneInfo, floatingSize_2, 2}},
- {2600, {wxAuiPaneInfo, gripper, 1}},
- {2601, {wxAuiPaneInfo, gripperTop, 1}},
- {2602, {wxAuiPaneInfo, hasBorder, 0}},
- {2603, {wxAuiPaneInfo, hasCaption, 0}},
- {2604, {wxAuiPaneInfo, hasCloseButton, 0}},
- {2605, {wxAuiPaneInfo, hasFlag, 1}},
- {2606, {wxAuiPaneInfo, hasGripper, 0}},
- {2607, {wxAuiPaneInfo, hasGripperTop, 0}},
- {2608, {wxAuiPaneInfo, hasMaximizeButton, 0}},
- {2609, {wxAuiPaneInfo, hasMinimizeButton, 0}},
- {2610, {wxAuiPaneInfo, hasPinButton, 0}},
- {2611, {wxAuiPaneInfo, hide, 0}},
- {2612, {wxAuiPaneInfo, isBottomDockable, 0}},
- {2613, {wxAuiPaneInfo, isDocked, 0}},
- {2614, {wxAuiPaneInfo, isFixed, 0}},
- {2615, {wxAuiPaneInfo, isFloatable, 0}},
- {2616, {wxAuiPaneInfo, isFloating, 0}},
- {2617, {wxAuiPaneInfo, isLeftDockable, 0}},
- {2618, {wxAuiPaneInfo, isMovable, 0}},
- {2619, {wxAuiPaneInfo, isOk, 0}},
- {2620, {wxAuiPaneInfo, isResizable, 0}},
- {2621, {wxAuiPaneInfo, isRightDockable, 0}},
- {2622, {wxAuiPaneInfo, isShown, 0}},
- {2623, {wxAuiPaneInfo, isToolbar, 0}},
- {2624, {wxAuiPaneInfo, isTopDockable, 0}},
- {2625, {wxAuiPaneInfo, layer, 1}},
- {2626, {wxAuiPaneInfo, left, 0}},
- {2627, {wxAuiPaneInfo, leftDockable, 1}},
- {2628, {wxAuiPaneInfo, maxSize_1, 1}},
- {2629, {wxAuiPaneInfo, maxSize_2, 2}},
- {2630, {wxAuiPaneInfo, maximizeButton, 1}},
- {2631, {wxAuiPaneInfo, minSize_1, 1}},
- {2632, {wxAuiPaneInfo, minSize_2, 2}},
- {2633, {wxAuiPaneInfo, minimizeButton, 1}},
- {2634, {wxAuiPaneInfo, movable, 1}},
- {2635, {wxAuiPaneInfo, name, 1}},
- {2636, {wxAuiPaneInfo, paneBorder, 1}},
- {2637, {wxAuiPaneInfo, pinButton, 1}},
- {2638, {wxAuiPaneInfo, position, 1}},
- {2639, {wxAuiPaneInfo, resizable, 1}},
- {2640, {wxAuiPaneInfo, right, 0}},
- {2641, {wxAuiPaneInfo, rightDockable, 1}},
- {2642, {wxAuiPaneInfo, row, 1}},
- {2643, {wxAuiPaneInfo, safeSet, 1}},
- {2644, {wxAuiPaneInfo, setFlag, 2}},
- {2645, {wxAuiPaneInfo, show, 1}},
- {2646, {wxAuiPaneInfo, toolbarPane, 0}},
- {2647, {wxAuiPaneInfo, top, 0}},
- {2648, {wxAuiPaneInfo, topDockable, 1}},
- {2649, {wxAuiPaneInfo, window, 1}},
- {2650, {wxAuiNotebook, new_0, 0}},
- {2651, {wxAuiNotebook, new_2, 2}},
- {2652, {wxAuiNotebook, addPage, 3}},
- {2653, {wxAuiNotebook, create, 2}},
- {2654, {wxAuiNotebook, deletePage, 1}},
- {2655, {wxAuiNotebook, getArtProvider, 0}},
- {2656, {wxAuiNotebook, getPage, 1}},
- {2657, {wxAuiNotebook, getPageBitmap, 1}},
- {2658, {wxAuiNotebook, getPageCount, 0}},
- {2659, {wxAuiNotebook, getPageIndex, 1}},
- {2660, {wxAuiNotebook, getPageText, 1}},
- {2661, {wxAuiNotebook, getSelection, 0}},
- {2662, {wxAuiNotebook, insertPage, 4}},
- {2663, {wxAuiNotebook, removePage, 1}},
- {2664, {wxAuiNotebook, setArtProvider, 1}},
- {2665, {wxAuiNotebook, setFont, 1}},
- {2666, {wxAuiNotebook, setPageBitmap, 2}},
- {2667, {wxAuiNotebook, setPageText, 2}},
- {2668, {wxAuiNotebook, setSelection, 1}},
- {2669, {wxAuiNotebook, setTabCtrlHeight, 1}},
- {2670, {wxAuiNotebook, setUniformBitmapSize, 1}},
- {2671, {wxAuiNotebook, 'Destroy', undefined}},
- {2672, {wxMDIParentFrame, new_0, 0}},
- {2673, {wxMDIParentFrame, new_4, 4}},
- {2674, {wxMDIParentFrame, destruct, 0}},
- {2675, {wxMDIParentFrame, activateNext, 0}},
- {2676, {wxMDIParentFrame, activatePrevious, 0}},
- {2677, {wxMDIParentFrame, arrangeIcons, 0}},
- {2678, {wxMDIParentFrame, cascade, 0}},
- {2679, {wxMDIParentFrame, create, 4}},
- {2680, {wxMDIParentFrame, getActiveChild, 0}},
- {2681, {wxMDIParentFrame, getClientWindow, 0}},
- {2682, {wxMDIParentFrame, tile, 1}},
- {2683, {wxMDIChildFrame, new_0, 0}},
- {2684, {wxMDIChildFrame, new_4, 4}},
- {2685, {wxMDIChildFrame, destruct, 0}},
- {2686, {wxMDIChildFrame, activate, 0}},
- {2687, {wxMDIChildFrame, create, 4}},
- {2688, {wxMDIChildFrame, maximize, 1}},
- {2689, {wxMDIChildFrame, restore, 0}},
- {2690, {wxMDIClientWindow, new_0, 0}},
- {2691, {wxMDIClientWindow, new_2, 2}},
- {2692, {wxMDIClientWindow, destruct, 0}},
- {2693, {wxMDIClientWindow, createClient, 2}},
- {2694, {wxLayoutAlgorithm, new, 0}},
- {2695, {wxLayoutAlgorithm, layoutFrame, 2}},
- {2696, {wxLayoutAlgorithm, layoutMDIFrame, 2}},
- {2697, {wxLayoutAlgorithm, layoutWindow, 2}},
- {2698, {wxLayoutAlgorithm, 'Destroy', undefined}},
- {2699, {wxEvent, getId, 0}},
- {2700, {wxEvent, getSkipped, 0}},
- {2701, {wxEvent, getTimestamp, 0}},
- {2702, {wxEvent, isCommandEvent, 0}},
- {2703, {wxEvent, resumePropagation, 1}},
- {2704, {wxEvent, shouldPropagate, 0}},
- {2705, {wxEvent, skip, 1}},
- {2706, {wxEvent, stopPropagation, 0}},
- {2707, {wxCommandEvent, getClientData, 0}},
- {2708, {wxCommandEvent, getExtraLong, 0}},
- {2709, {wxCommandEvent, getInt, 0}},
- {2710, {wxCommandEvent, getSelection, 0}},
- {2711, {wxCommandEvent, getString, 0}},
- {2712, {wxCommandEvent, isChecked, 0}},
- {2713, {wxCommandEvent, isSelection, 0}},
- {2714, {wxCommandEvent, setInt, 1}},
- {2715, {wxCommandEvent, setString, 1}},
- {2716, {wxScrollEvent, getOrientation, 0}},
- {2717, {wxScrollEvent, getPosition, 0}},
- {2718, {wxScrollWinEvent, getOrientation, 0}},
- {2719, {wxScrollWinEvent, getPosition, 0}},
- {2720, {wxMouseEvent, altDown, 0}},
- {2721, {wxMouseEvent, button, 1}},
- {2722, {wxMouseEvent, buttonDClick, 1}},
- {2723, {wxMouseEvent, buttonDown, 1}},
- {2724, {wxMouseEvent, buttonUp, 1}},
- {2725, {wxMouseEvent, cmdDown, 0}},
- {2726, {wxMouseEvent, controlDown, 0}},
- {2727, {wxMouseEvent, dragging, 0}},
- {2728, {wxMouseEvent, entering, 0}},
- {2729, {wxMouseEvent, getButton, 0}},
- {2732, {wxMouseEvent, getPosition, 0}},
- {2733, {wxMouseEvent, getLogicalPosition, 1}},
- {2734, {wxMouseEvent, getLinesPerAction, 0}},
- {2735, {wxMouseEvent, getWheelRotation, 0}},
- {2736, {wxMouseEvent, getWheelDelta, 0}},
- {2737, {wxMouseEvent, getX, 0}},
- {2738, {wxMouseEvent, getY, 0}},
- {2739, {wxMouseEvent, isButton, 0}},
- {2740, {wxMouseEvent, isPageScroll, 0}},
- {2741, {wxMouseEvent, leaving, 0}},
- {2742, {wxMouseEvent, leftDClick, 0}},
- {2743, {wxMouseEvent, leftDown, 0}},
- {2744, {wxMouseEvent, leftIsDown, 0}},
- {2745, {wxMouseEvent, leftUp, 0}},
- {2746, {wxMouseEvent, metaDown, 0}},
- {2747, {wxMouseEvent, middleDClick, 0}},
- {2748, {wxMouseEvent, middleDown, 0}},
- {2749, {wxMouseEvent, middleIsDown, 0}},
- {2750, {wxMouseEvent, middleUp, 0}},
- {2751, {wxMouseEvent, moving, 0}},
- {2752, {wxMouseEvent, rightDClick, 0}},
- {2753, {wxMouseEvent, rightDown, 0}},
- {2754, {wxMouseEvent, rightIsDown, 0}},
- {2755, {wxMouseEvent, rightUp, 0}},
- {2756, {wxMouseEvent, shiftDown, 0}},
- {2757, {wxSetCursorEvent, getCursor, 0}},
- {2758, {wxSetCursorEvent, getX, 0}},
- {2759, {wxSetCursorEvent, getY, 0}},
- {2760, {wxSetCursorEvent, hasCursor, 0}},
- {2761, {wxSetCursorEvent, setCursor, 1}},
- {2762, {wxKeyEvent, altDown, 0}},
- {2763, {wxKeyEvent, cmdDown, 0}},
- {2764, {wxKeyEvent, controlDown, 0}},
- {2765, {wxKeyEvent, getKeyCode, 0}},
- {2766, {wxKeyEvent, getModifiers, 0}},
- {2769, {wxKeyEvent, getPosition, 0}},
- {2770, {wxKeyEvent, getRawKeyCode, 0}},
- {2771, {wxKeyEvent, getRawKeyFlags, 0}},
- {2772, {wxKeyEvent, getUnicodeKey, 0}},
- {2773, {wxKeyEvent, getX, 0}},
- {2774, {wxKeyEvent, getY, 0}},
- {2775, {wxKeyEvent, hasModifiers, 0}},
- {2776, {wxKeyEvent, metaDown, 0}},
- {2777, {wxKeyEvent, shiftDown, 0}},
- {2778, {wxSizeEvent, getSize, 0}},
- {2779, {wxMoveEvent, getPosition, 0}},
- {2780, {wxEraseEvent, getDC, 0}},
- {2781, {wxFocusEvent, getWindow, 0}},
- {2782, {wxChildFocusEvent, getWindow, 0}},
- {2783, {wxMenuEvent, getMenu, 0}},
- {2784, {wxMenuEvent, getMenuId, 0}},
- {2785, {wxMenuEvent, isPopup, 0}},
- {2786, {wxCloseEvent, canVeto, 0}},
- {2787, {wxCloseEvent, getLoggingOff, 0}},
- {2788, {wxCloseEvent, setCanVeto, 1}},
- {2789, {wxCloseEvent, setLoggingOff, 1}},
- {2790, {wxCloseEvent, veto, 1}},
- {2791, {wxShowEvent, setShow, 1}},
- {2792, {wxShowEvent, getShow, 0}},
- {2793, {wxIconizeEvent, iconized, 0}},
- {2794, {wxJoystickEvent, buttonDown, 1}},
- {2795, {wxJoystickEvent, buttonIsDown, 1}},
- {2796, {wxJoystickEvent, buttonUp, 1}},
- {2797, {wxJoystickEvent, getButtonChange, 0}},
- {2798, {wxJoystickEvent, getButtonState, 0}},
- {2799, {wxJoystickEvent, getJoystick, 0}},
- {2800, {wxJoystickEvent, getPosition, 0}},
- {2801, {wxJoystickEvent, getZPosition, 0}},
- {2802, {wxJoystickEvent, isButton, 0}},
- {2803, {wxJoystickEvent, isMove, 0}},
- {2804, {wxJoystickEvent, isZMove, 0}},
- {2805, {wxUpdateUIEvent, canUpdate, 1}},
- {2806, {wxUpdateUIEvent, check, 1}},
- {2807, {wxUpdateUIEvent, enable, 1}},
- {2808, {wxUpdateUIEvent, show, 1}},
- {2809, {wxUpdateUIEvent, getChecked, 0}},
- {2810, {wxUpdateUIEvent, getEnabled, 0}},
- {2811, {wxUpdateUIEvent, getShown, 0}},
- {2812, {wxUpdateUIEvent, getSetChecked, 0}},
- {2813, {wxUpdateUIEvent, getSetEnabled, 0}},
- {2814, {wxUpdateUIEvent, getSetShown, 0}},
- {2815, {wxUpdateUIEvent, getSetText, 0}},
- {2816, {wxUpdateUIEvent, getText, 0}},
- {2817, {wxUpdateUIEvent, getMode, 0}},
- {2818, {wxUpdateUIEvent, getUpdateInterval, 0}},
- {2819, {wxUpdateUIEvent, resetUpdateTime, 0}},
- {2820, {wxUpdateUIEvent, setMode, 1}},
- {2821, {wxUpdateUIEvent, setText, 1}},
- {2822, {wxUpdateUIEvent, setUpdateInterval, 1}},
- {2823, {wxMouseCaptureChangedEvent, getCapturedWindow, 0}},
- {2824, {wxPaletteChangedEvent, setChangedWindow, 1}},
- {2825, {wxPaletteChangedEvent, getChangedWindow, 0}},
- {2826, {wxQueryNewPaletteEvent, setPaletteRealized, 1}},
- {2827, {wxQueryNewPaletteEvent, getPaletteRealized, 0}},
- {2828, {wxNavigationKeyEvent, getDirection, 0}},
- {2829, {wxNavigationKeyEvent, setDirection, 1}},
- {2830, {wxNavigationKeyEvent, isWindowChange, 0}},
- {2831, {wxNavigationKeyEvent, setWindowChange, 1}},
- {2832, {wxNavigationKeyEvent, isFromTab, 0}},
- {2833, {wxNavigationKeyEvent, setFromTab, 1}},
- {2834, {wxNavigationKeyEvent, getCurrentFocus, 0}},
- {2835, {wxNavigationKeyEvent, setCurrentFocus, 1}},
- {2836, {wxHelpEvent, getOrigin, 0}},
- {2837, {wxHelpEvent, getPosition, 0}},
- {2838, {wxHelpEvent, setOrigin, 1}},
- {2839, {wxHelpEvent, setPosition, 1}},
- {2840, {wxContextMenuEvent, getPosition, 0}},
- {2841, {wxContextMenuEvent, setPosition, 1}},
- {2842, {wxIdleEvent, canSend, 1}},
- {2843, {wxIdleEvent, getMode, 0}},
- {2844, {wxIdleEvent, requestMore, 1}},
- {2845, {wxIdleEvent, moreRequested, 0}},
- {2846, {wxIdleEvent, setMode, 1}},
- {2847, {wxGridEvent, altDown, 0}},
- {2848, {wxGridEvent, controlDown, 0}},
- {2849, {wxGridEvent, getCol, 0}},
- {2850, {wxGridEvent, getPosition, 0}},
- {2851, {wxGridEvent, getRow, 0}},
- {2852, {wxGridEvent, metaDown, 0}},
- {2853, {wxGridEvent, selecting, 0}},
- {2854, {wxGridEvent, shiftDown, 0}},
- {2855, {wxNotifyEvent, allow, 0}},
- {2856, {wxNotifyEvent, isAllowed, 0}},
- {2857, {wxNotifyEvent, veto, 0}},
- {2858, {wxSashEvent, getEdge, 0}},
- {2859, {wxSashEvent, getDragRect, 0}},
- {2860, {wxSashEvent, getDragStatus, 0}},
- {2861, {wxListEvent, getCacheFrom, 0}},
- {2862, {wxListEvent, getCacheTo, 0}},
- {2863, {wxListEvent, getKeyCode, 0}},
- {2864, {wxListEvent, getIndex, 0}},
- {2865, {wxListEvent, getColumn, 0}},
- {2866, {wxListEvent, getPoint, 0}},
- {2867, {wxListEvent, getLabel, 0}},
- {2868, {wxListEvent, getText, 0}},
- {2869, {wxListEvent, getImage, 0}},
- {2870, {wxListEvent, getData, 0}},
- {2871, {wxListEvent, getMask, 0}},
- {2872, {wxListEvent, getItem, 0}},
- {2873, {wxListEvent, isEditCancelled, 0}},
- {2874, {wxDateEvent, getDate, 0}},
- {2875, {wxCalendarEvent, getWeekDay, 0}},
- {2876, {wxFileDirPickerEvent, getPath, 0}},
- {2877, {wxColourPickerEvent, getColour, 0}},
- {2878, {wxFontPickerEvent, getFont, 0}},
- {2879, {wxStyledTextEvent, getPosition, 0}},
- {2880, {wxStyledTextEvent, getKey, 0}},
- {2881, {wxStyledTextEvent, getModifiers, 0}},
- {2882, {wxStyledTextEvent, getModificationType, 0}},
- {2883, {wxStyledTextEvent, getText, 0}},
- {2884, {wxStyledTextEvent, getLength, 0}},
- {2885, {wxStyledTextEvent, getLinesAdded, 0}},
- {2886, {wxStyledTextEvent, getLine, 0}},
- {2887, {wxStyledTextEvent, getFoldLevelNow, 0}},
- {2888, {wxStyledTextEvent, getFoldLevelPrev, 0}},
- {2889, {wxStyledTextEvent, getMargin, 0}},
- {2890, {wxStyledTextEvent, getMessage, 0}},
- {2891, {wxStyledTextEvent, getWParam, 0}},
- {2892, {wxStyledTextEvent, getLParam, 0}},
- {2893, {wxStyledTextEvent, getListType, 0}},
- {2894, {wxStyledTextEvent, getX, 0}},
- {2895, {wxStyledTextEvent, getY, 0}},
- {2896, {wxStyledTextEvent, getDragText, 0}},
- {2897, {wxStyledTextEvent, getDragAllowMove, 0}},
- {2898, {wxStyledTextEvent, getDragResult, 0}},
- {2899, {wxStyledTextEvent, getShift, 0}},
- {2900, {wxStyledTextEvent, getControl, 0}},
- {2901, {wxStyledTextEvent, getAlt, 0}},
- {2902, {utils, getKeyState, 1}},
- {2903, {utils, getMousePosition, 2}},
- {2904, {utils, getMouseState, 0}},
- {2905, {utils, setDetectableAutoRepeat, 1}},
- {2906, {utils, bell, 0}},
- {2907, {utils, findMenuItemId, 3}},
- {2908, {utils, genericFindWindowAtPoint, 1}},
- {2909, {utils, findWindowAtPoint, 1}},
- {2910, {utils, beginBusyCursor, 1}},
- {2911, {utils, endBusyCursor, 0}},
- {2912, {utils, isBusy, 0}},
- {2913, {utils, shutdown, 1}},
- {2914, {utils, shell, 1}},
- {2915, {utils, launchDefaultBrowser, 2}},
- {2916, {utils, getEmailAddress, 0}},
- {2917, {utils, getUserId, 0}},
- {2918, {utils, getHomeDir, 0}},
- {2919, {utils, newId, 0}},
- {2920, {utils, registerId, 1}},
- {2921, {utils, getCurrentId, 0}},
- {2922, {utils, getOsDescription, 0}},
- {2923, {utils, isPlatformLittleEndian, 0}},
- {2924, {utils, isPlatform64Bit, 0}},
- {2925, {wxPrintout, new, 1}},
- {2926, {wxPrintout, destruct, 0}},
- {2927, {wxPrintout, getDC, 0}},
- {2928, {wxPrintout, getPageSizeMM, 2}},
- {2929, {wxPrintout, getPageSizePixels, 2}},
- {2930, {wxPrintout, getPaperRectPixels, 0}},
- {2931, {wxPrintout, getPPIPrinter, 2}},
- {2932, {wxPrintout, getPPIScreen, 2}},
- {2933, {wxPrintout, getTitle, 0}},
- {2934, {wxPrintout, isPreview, 0}},
- {2935, {wxPrintout, fitThisSizeToPaper, 1}},
- {2936, {wxPrintout, fitThisSizeToPage, 1}},
- {2937, {wxPrintout, fitThisSizeToPageMargins, 2}},
- {2938, {wxPrintout, mapScreenSizeToPaper, 0}},
- {2939, {wxPrintout, mapScreenSizeToPage, 0}},
- {2940, {wxPrintout, mapScreenSizeToPageMargins, 1}},
- {2941, {wxPrintout, mapScreenSizeToDevice, 0}},
- {2942, {wxPrintout, getLogicalPaperRect, 0}},
- {2943, {wxPrintout, getLogicalPageRect, 0}},
- {2944, {wxPrintout, getLogicalPageMarginsRect, 1}},
- {2945, {wxPrintout, setLogicalOrigin, 2}},
- {2946, {wxPrintout, offsetLogicalOrigin, 2}},
- {2947, {wxStyledTextCtrl, new_2, 2}},
- {2948, {wxStyledTextCtrl, new_0, 0}},
- {2949, {wxStyledTextCtrl, destruct, 0}},
- {2950, {wxStyledTextCtrl, create, 2}},
- {2951, {wxStyledTextCtrl, addText, 1}},
- {2952, {wxStyledTextCtrl, addStyledText, 1}},
- {2953, {wxStyledTextCtrl, insertText, 2}},
- {2954, {wxStyledTextCtrl, clearAll, 0}},
- {2955, {wxStyledTextCtrl, clearDocumentStyle, 0}},
- {2956, {wxStyledTextCtrl, getLength, 0}},
- {2957, {wxStyledTextCtrl, getCharAt, 1}},
- {2958, {wxStyledTextCtrl, getCurrentPos, 0}},
- {2959, {wxStyledTextCtrl, getAnchor, 0}},
- {2960, {wxStyledTextCtrl, getStyleAt, 1}},
- {2961, {wxStyledTextCtrl, redo, 0}},
- {2962, {wxStyledTextCtrl, setUndoCollection, 1}},
- {2963, {wxStyledTextCtrl, selectAll, 0}},
- {2964, {wxStyledTextCtrl, setSavePoint, 0}},
- {2965, {wxStyledTextCtrl, getStyledText, 2}},
- {2966, {wxStyledTextCtrl, canRedo, 0}},
- {2967, {wxStyledTextCtrl, markerLineFromHandle, 1}},
- {2968, {wxStyledTextCtrl, markerDeleteHandle, 1}},
- {2969, {wxStyledTextCtrl, getUndoCollection, 0}},
- {2970, {wxStyledTextCtrl, getViewWhiteSpace, 0}},
- {2971, {wxStyledTextCtrl, setViewWhiteSpace, 1}},
- {2972, {wxStyledTextCtrl, positionFromPoint, 1}},
- {2973, {wxStyledTextCtrl, positionFromPointClose, 2}},
- {2974, {wxStyledTextCtrl, gotoLine, 1}},
- {2975, {wxStyledTextCtrl, gotoPos, 1}},
- {2976, {wxStyledTextCtrl, setAnchor, 1}},
- {2977, {wxStyledTextCtrl, getCurLine, 1}},
- {2978, {wxStyledTextCtrl, getEndStyled, 0}},
- {2979, {wxStyledTextCtrl, convertEOLs, 1}},
- {2980, {wxStyledTextCtrl, getEOLMode, 0}},
- {2981, {wxStyledTextCtrl, setEOLMode, 1}},
- {2982, {wxStyledTextCtrl, startStyling, 2}},
- {2983, {wxStyledTextCtrl, setStyling, 2}},
- {2984, {wxStyledTextCtrl, getBufferedDraw, 0}},
- {2985, {wxStyledTextCtrl, setBufferedDraw, 1}},
- {2986, {wxStyledTextCtrl, setTabWidth, 1}},
- {2987, {wxStyledTextCtrl, getTabWidth, 0}},
- {2988, {wxStyledTextCtrl, setCodePage, 1}},
- {2989, {wxStyledTextCtrl, markerDefine, 3}},
- {2990, {wxStyledTextCtrl, markerSetForeground, 2}},
- {2991, {wxStyledTextCtrl, markerSetBackground, 2}},
- {2992, {wxStyledTextCtrl, markerAdd, 2}},
- {2993, {wxStyledTextCtrl, markerDelete, 2}},
- {2994, {wxStyledTextCtrl, markerDeleteAll, 1}},
- {2995, {wxStyledTextCtrl, markerGet, 1}},
- {2996, {wxStyledTextCtrl, markerNext, 2}},
- {2997, {wxStyledTextCtrl, markerPrevious, 2}},
- {2998, {wxStyledTextCtrl, markerDefineBitmap, 2}},
- {2999, {wxStyledTextCtrl, markerAddSet, 2}},
- {3000, {wxStyledTextCtrl, markerSetAlpha, 2}},
- {3001, {wxStyledTextCtrl, setMarginType, 2}},
- {3002, {wxStyledTextCtrl, getMarginType, 1}},
- {3003, {wxStyledTextCtrl, setMarginWidth, 2}},
- {3004, {wxStyledTextCtrl, getMarginWidth, 1}},
- {3005, {wxStyledTextCtrl, setMarginMask, 2}},
- {3006, {wxStyledTextCtrl, getMarginMask, 1}},
- {3007, {wxStyledTextCtrl, setMarginSensitive, 2}},
- {3008, {wxStyledTextCtrl, getMarginSensitive, 1}},
- {3009, {wxStyledTextCtrl, styleClearAll, 0}},
- {3010, {wxStyledTextCtrl, styleSetForeground, 2}},
- {3011, {wxStyledTextCtrl, styleSetBackground, 2}},
- {3012, {wxStyledTextCtrl, styleSetBold, 2}},
- {3013, {wxStyledTextCtrl, styleSetItalic, 2}},
- {3014, {wxStyledTextCtrl, styleSetSize, 2}},
- {3015, {wxStyledTextCtrl, styleSetFaceName, 2}},
- {3016, {wxStyledTextCtrl, styleSetEOLFilled, 2}},
- {3017, {wxStyledTextCtrl, styleResetDefault, 0}},
- {3018, {wxStyledTextCtrl, styleSetUnderline, 2}},
- {3019, {wxStyledTextCtrl, styleSetCase, 2}},
- {3020, {wxStyledTextCtrl, styleSetHotSpot, 2}},
- {3021, {wxStyledTextCtrl, setSelForeground, 2}},
- {3022, {wxStyledTextCtrl, setSelBackground, 2}},
- {3023, {wxStyledTextCtrl, getSelAlpha, 0}},
- {3024, {wxStyledTextCtrl, setSelAlpha, 1}},
- {3025, {wxStyledTextCtrl, setCaretForeground, 1}},
- {3026, {wxStyledTextCtrl, cmdKeyAssign, 3}},
- {3027, {wxStyledTextCtrl, cmdKeyClear, 2}},
- {3028, {wxStyledTextCtrl, cmdKeyClearAll, 0}},
- {3029, {wxStyledTextCtrl, setStyleBytes, 2}},
- {3030, {wxStyledTextCtrl, styleSetVisible, 2}},
- {3031, {wxStyledTextCtrl, getCaretPeriod, 0}},
- {3032, {wxStyledTextCtrl, setCaretPeriod, 1}},
- {3033, {wxStyledTextCtrl, setWordChars, 1}},
- {3034, {wxStyledTextCtrl, beginUndoAction, 0}},
- {3035, {wxStyledTextCtrl, endUndoAction, 0}},
- {3036, {wxStyledTextCtrl, indicatorSetStyle, 2}},
- {3037, {wxStyledTextCtrl, indicatorGetStyle, 1}},
- {3038, {wxStyledTextCtrl, indicatorSetForeground, 2}},
- {3039, {wxStyledTextCtrl, indicatorGetForeground, 1}},
- {3040, {wxStyledTextCtrl, setWhitespaceForeground, 2}},
- {3041, {wxStyledTextCtrl, setWhitespaceBackground, 2}},
- {3042, {wxStyledTextCtrl, getStyleBits, 0}},
- {3043, {wxStyledTextCtrl, setLineState, 2}},
- {3044, {wxStyledTextCtrl, getLineState, 1}},
- {3045, {wxStyledTextCtrl, getMaxLineState, 0}},
- {3046, {wxStyledTextCtrl, getCaretLineVisible, 0}},
- {3047, {wxStyledTextCtrl, setCaretLineVisible, 1}},
- {3048, {wxStyledTextCtrl, getCaretLineBackground, 0}},
- {3049, {wxStyledTextCtrl, setCaretLineBackground, 1}},
- {3050, {wxStyledTextCtrl, autoCompShow, 2}},
- {3051, {wxStyledTextCtrl, autoCompCancel, 0}},
- {3052, {wxStyledTextCtrl, autoCompActive, 0}},
- {3053, {wxStyledTextCtrl, autoCompPosStart, 0}},
- {3054, {wxStyledTextCtrl, autoCompComplete, 0}},
- {3055, {wxStyledTextCtrl, autoCompStops, 1}},
- {3056, {wxStyledTextCtrl, autoCompSetSeparator, 1}},
- {3057, {wxStyledTextCtrl, autoCompGetSeparator, 0}},
- {3058, {wxStyledTextCtrl, autoCompSelect, 1}},
- {3059, {wxStyledTextCtrl, autoCompSetCancelAtStart, 1}},
- {3060, {wxStyledTextCtrl, autoCompGetCancelAtStart, 0}},
- {3061, {wxStyledTextCtrl, autoCompSetFillUps, 1}},
- {3062, {wxStyledTextCtrl, autoCompSetChooseSingle, 1}},
- {3063, {wxStyledTextCtrl, autoCompGetChooseSingle, 0}},
- {3064, {wxStyledTextCtrl, autoCompSetIgnoreCase, 1}},
- {3065, {wxStyledTextCtrl, autoCompGetIgnoreCase, 0}},
- {3066, {wxStyledTextCtrl, userListShow, 2}},
- {3067, {wxStyledTextCtrl, autoCompSetAutoHide, 1}},
- {3068, {wxStyledTextCtrl, autoCompGetAutoHide, 0}},
- {3069, {wxStyledTextCtrl, autoCompSetDropRestOfWord, 1}},
- {3070, {wxStyledTextCtrl, autoCompGetDropRestOfWord, 0}},
- {3071, {wxStyledTextCtrl, registerImage, 2}},
- {3072, {wxStyledTextCtrl, clearRegisteredImages, 0}},
- {3073, {wxStyledTextCtrl, autoCompGetTypeSeparator, 0}},
- {3074, {wxStyledTextCtrl, autoCompSetTypeSeparator, 1}},
- {3075, {wxStyledTextCtrl, autoCompSetMaxWidth, 1}},
- {3076, {wxStyledTextCtrl, autoCompGetMaxWidth, 0}},
- {3077, {wxStyledTextCtrl, autoCompSetMaxHeight, 1}},
- {3078, {wxStyledTextCtrl, autoCompGetMaxHeight, 0}},
- {3079, {wxStyledTextCtrl, setIndent, 1}},
- {3080, {wxStyledTextCtrl, getIndent, 0}},
- {3081, {wxStyledTextCtrl, setUseTabs, 1}},
- {3082, {wxStyledTextCtrl, getUseTabs, 0}},
- {3083, {wxStyledTextCtrl, setLineIndentation, 2}},
- {3084, {wxStyledTextCtrl, getLineIndentation, 1}},
- {3085, {wxStyledTextCtrl, getLineIndentPosition, 1}},
- {3086, {wxStyledTextCtrl, getColumn, 1}},
- {3087, {wxStyledTextCtrl, setUseHorizontalScrollBar, 1}},
- {3088, {wxStyledTextCtrl, getUseHorizontalScrollBar, 0}},
- {3089, {wxStyledTextCtrl, setIndentationGuides, 1}},
- {3090, {wxStyledTextCtrl, getIndentationGuides, 0}},
- {3091, {wxStyledTextCtrl, setHighlightGuide, 1}},
- {3092, {wxStyledTextCtrl, getHighlightGuide, 0}},
- {3093, {wxStyledTextCtrl, getLineEndPosition, 1}},
- {3094, {wxStyledTextCtrl, getCodePage, 0}},
- {3095, {wxStyledTextCtrl, getCaretForeground, 0}},
- {3096, {wxStyledTextCtrl, getReadOnly, 0}},
- {3097, {wxStyledTextCtrl, setCurrentPos, 1}},
- {3098, {wxStyledTextCtrl, setSelectionStart, 1}},
- {3099, {wxStyledTextCtrl, getSelectionStart, 0}},
- {3100, {wxStyledTextCtrl, setSelectionEnd, 1}},
- {3101, {wxStyledTextCtrl, getSelectionEnd, 0}},
- {3102, {wxStyledTextCtrl, setPrintMagnification, 1}},
- {3103, {wxStyledTextCtrl, getPrintMagnification, 0}},
- {3104, {wxStyledTextCtrl, setPrintColourMode, 1}},
- {3105, {wxStyledTextCtrl, getPrintColourMode, 0}},
- {3106, {wxStyledTextCtrl, findText, 4}},
- {3107, {wxStyledTextCtrl, formatRange, 7}},
- {3108, {wxStyledTextCtrl, getFirstVisibleLine, 0}},
- {3109, {wxStyledTextCtrl, getLine, 1}},
- {3110, {wxStyledTextCtrl, getLineCount, 0}},
- {3111, {wxStyledTextCtrl, setMarginLeft, 1}},
- {3112, {wxStyledTextCtrl, getMarginLeft, 0}},
- {3113, {wxStyledTextCtrl, setMarginRight, 1}},
- {3114, {wxStyledTextCtrl, getMarginRight, 0}},
- {3115, {wxStyledTextCtrl, getModify, 0}},
- {3116, {wxStyledTextCtrl, setSelection, 2}},
- {3117, {wxStyledTextCtrl, getSelectedText, 0}},
- {3118, {wxStyledTextCtrl, getTextRange, 2}},
- {3119, {wxStyledTextCtrl, hideSelection, 1}},
- {3120, {wxStyledTextCtrl, lineFromPosition, 1}},
- {3121, {wxStyledTextCtrl, positionFromLine, 1}},
- {3122, {wxStyledTextCtrl, lineScroll, 2}},
- {3123, {wxStyledTextCtrl, ensureCaretVisible, 0}},
- {3124, {wxStyledTextCtrl, replaceSelection, 1}},
- {3125, {wxStyledTextCtrl, setReadOnly, 1}},
- {3126, {wxStyledTextCtrl, canPaste, 0}},
- {3127, {wxStyledTextCtrl, canUndo, 0}},
- {3128, {wxStyledTextCtrl, emptyUndoBuffer, 0}},
- {3129, {wxStyledTextCtrl, undo, 0}},
- {3130, {wxStyledTextCtrl, cut, 0}},
- {3131, {wxStyledTextCtrl, copy, 0}},
- {3132, {wxStyledTextCtrl, paste, 0}},
- {3133, {wxStyledTextCtrl, clear, 0}},
- {3134, {wxStyledTextCtrl, setText, 1}},
- {3135, {wxStyledTextCtrl, getText, 0}},
- {3136, {wxStyledTextCtrl, getTextLength, 0}},
- {3137, {wxStyledTextCtrl, getOvertype, 0}},
- {3138, {wxStyledTextCtrl, setCaretWidth, 1}},
- {3139, {wxStyledTextCtrl, getCaretWidth, 0}},
- {3140, {wxStyledTextCtrl, setTargetStart, 1}},
- {3141, {wxStyledTextCtrl, getTargetStart, 0}},
- {3142, {wxStyledTextCtrl, setTargetEnd, 1}},
- {3143, {wxStyledTextCtrl, getTargetEnd, 0}},
- {3144, {wxStyledTextCtrl, replaceTarget, 1}},
- {3145, {wxStyledTextCtrl, searchInTarget, 1}},
- {3146, {wxStyledTextCtrl, setSearchFlags, 1}},
- {3147, {wxStyledTextCtrl, getSearchFlags, 0}},
- {3148, {wxStyledTextCtrl, callTipShow, 2}},
- {3149, {wxStyledTextCtrl, callTipCancel, 0}},
- {3150, {wxStyledTextCtrl, callTipActive, 0}},
- {3151, {wxStyledTextCtrl, callTipPosAtStart, 0}},
- {3152, {wxStyledTextCtrl, callTipSetHighlight, 2}},
- {3153, {wxStyledTextCtrl, callTipSetBackground, 1}},
- {3154, {wxStyledTextCtrl, callTipSetForeground, 1}},
- {3155, {wxStyledTextCtrl, callTipSetForegroundHighlight, 1}},
- {3156, {wxStyledTextCtrl, callTipUseStyle, 1}},
- {3157, {wxStyledTextCtrl, visibleFromDocLine, 1}},
- {3158, {wxStyledTextCtrl, docLineFromVisible, 1}},
- {3159, {wxStyledTextCtrl, wrapCount, 1}},
- {3160, {wxStyledTextCtrl, setFoldLevel, 2}},
- {3161, {wxStyledTextCtrl, getFoldLevel, 1}},
- {3162, {wxStyledTextCtrl, getLastChild, 2}},
- {3163, {wxStyledTextCtrl, getFoldParent, 1}},
- {3164, {wxStyledTextCtrl, showLines, 2}},
- {3165, {wxStyledTextCtrl, hideLines, 2}},
- {3166, {wxStyledTextCtrl, getLineVisible, 1}},
- {3167, {wxStyledTextCtrl, setFoldExpanded, 2}},
- {3168, {wxStyledTextCtrl, getFoldExpanded, 1}},
- {3169, {wxStyledTextCtrl, toggleFold, 1}},
- {3170, {wxStyledTextCtrl, ensureVisible, 1}},
- {3171, {wxStyledTextCtrl, setFoldFlags, 1}},
- {3172, {wxStyledTextCtrl, ensureVisibleEnforcePolicy, 1}},
- {3173, {wxStyledTextCtrl, setTabIndents, 1}},
- {3174, {wxStyledTextCtrl, getTabIndents, 0}},
- {3175, {wxStyledTextCtrl, setBackSpaceUnIndents, 1}},
- {3176, {wxStyledTextCtrl, getBackSpaceUnIndents, 0}},
- {3177, {wxStyledTextCtrl, setMouseDwellTime, 1}},
- {3178, {wxStyledTextCtrl, getMouseDwellTime, 0}},
- {3179, {wxStyledTextCtrl, wordStartPosition, 2}},
- {3180, {wxStyledTextCtrl, wordEndPosition, 2}},
- {3181, {wxStyledTextCtrl, setWrapMode, 1}},
- {3182, {wxStyledTextCtrl, getWrapMode, 0}},
- {3183, {wxStyledTextCtrl, setWrapVisualFlags, 1}},
- {3184, {wxStyledTextCtrl, getWrapVisualFlags, 0}},
- {3185, {wxStyledTextCtrl, setWrapVisualFlagsLocation, 1}},
- {3186, {wxStyledTextCtrl, getWrapVisualFlagsLocation, 0}},
- {3187, {wxStyledTextCtrl, setWrapStartIndent, 1}},
- {3188, {wxStyledTextCtrl, getWrapStartIndent, 0}},
- {3189, {wxStyledTextCtrl, setLayoutCache, 1}},
- {3190, {wxStyledTextCtrl, getLayoutCache, 0}},
- {3191, {wxStyledTextCtrl, setScrollWidth, 1}},
- {3192, {wxStyledTextCtrl, getScrollWidth, 0}},
- {3193, {wxStyledTextCtrl, textWidth, 2}},
- {3194, {wxStyledTextCtrl, getEndAtLastLine, 0}},
- {3195, {wxStyledTextCtrl, textHeight, 1}},
- {3196, {wxStyledTextCtrl, setUseVerticalScrollBar, 1}},
- {3197, {wxStyledTextCtrl, getUseVerticalScrollBar, 0}},
- {3198, {wxStyledTextCtrl, appendText, 1}},
- {3199, {wxStyledTextCtrl, getTwoPhaseDraw, 0}},
- {3200, {wxStyledTextCtrl, setTwoPhaseDraw, 1}},
- {3201, {wxStyledTextCtrl, targetFromSelection, 0}},
- {3202, {wxStyledTextCtrl, linesJoin, 0}},
- {3203, {wxStyledTextCtrl, linesSplit, 1}},
- {3204, {wxStyledTextCtrl, setFoldMarginColour, 2}},
- {3205, {wxStyledTextCtrl, setFoldMarginHiColour, 2}},
- {3206, {wxStyledTextCtrl, lineDown, 0}},
- {3207, {wxStyledTextCtrl, lineDownExtend, 0}},
- {3208, {wxStyledTextCtrl, lineUp, 0}},
- {3209, {wxStyledTextCtrl, lineUpExtend, 0}},
- {3210, {wxStyledTextCtrl, charLeft, 0}},
- {3211, {wxStyledTextCtrl, charLeftExtend, 0}},
- {3212, {wxStyledTextCtrl, charRight, 0}},
- {3213, {wxStyledTextCtrl, charRightExtend, 0}},
- {3214, {wxStyledTextCtrl, wordLeft, 0}},
- {3215, {wxStyledTextCtrl, wordLeftExtend, 0}},
- {3216, {wxStyledTextCtrl, wordRight, 0}},
- {3217, {wxStyledTextCtrl, wordRightExtend, 0}},
- {3218, {wxStyledTextCtrl, home, 0}},
- {3219, {wxStyledTextCtrl, homeExtend, 0}},
- {3220, {wxStyledTextCtrl, lineEnd, 0}},
- {3221, {wxStyledTextCtrl, lineEndExtend, 0}},
- {3222, {wxStyledTextCtrl, documentStart, 0}},
- {3223, {wxStyledTextCtrl, documentStartExtend, 0}},
- {3224, {wxStyledTextCtrl, documentEnd, 0}},
- {3225, {wxStyledTextCtrl, documentEndExtend, 0}},
- {3226, {wxStyledTextCtrl, pageUp, 0}},
- {3227, {wxStyledTextCtrl, pageUpExtend, 0}},
- {3228, {wxStyledTextCtrl, pageDown, 0}},
- {3229, {wxStyledTextCtrl, pageDownExtend, 0}},
- {3230, {wxStyledTextCtrl, editToggleOvertype, 0}},
- {3231, {wxStyledTextCtrl, cancel, 0}},
- {3232, {wxStyledTextCtrl, deleteBack, 0}},
- {3233, {wxStyledTextCtrl, tab, 0}},
- {3234, {wxStyledTextCtrl, backTab, 0}},
- {3235, {wxStyledTextCtrl, newLine, 0}},
- {3236, {wxStyledTextCtrl, formFeed, 0}},
- {3237, {wxStyledTextCtrl, vCHome, 0}},
- {3238, {wxStyledTextCtrl, vCHomeExtend, 0}},
- {3239, {wxStyledTextCtrl, zoomIn, 0}},
- {3240, {wxStyledTextCtrl, zoomOut, 0}},
- {3241, {wxStyledTextCtrl, delWordLeft, 0}},
- {3242, {wxStyledTextCtrl, delWordRight, 0}},
- {3243, {wxStyledTextCtrl, lineCut, 0}},
- {3244, {wxStyledTextCtrl, lineDelete, 0}},
- {3245, {wxStyledTextCtrl, lineTranspose, 0}},
- {3246, {wxStyledTextCtrl, lineDuplicate, 0}},
- {3247, {wxStyledTextCtrl, lowerCase, 0}},
- {3248, {wxStyledTextCtrl, upperCase, 0}},
- {3249, {wxStyledTextCtrl, lineScrollDown, 0}},
- {3250, {wxStyledTextCtrl, lineScrollUp, 0}},
- {3251, {wxStyledTextCtrl, deleteBackNotLine, 0}},
- {3252, {wxStyledTextCtrl, homeDisplay, 0}},
- {3253, {wxStyledTextCtrl, homeDisplayExtend, 0}},
- {3254, {wxStyledTextCtrl, lineEndDisplay, 0}},
- {3255, {wxStyledTextCtrl, lineEndDisplayExtend, 0}},
- {3256, {wxStyledTextCtrl, homeWrapExtend, 0}},
- {3257, {wxStyledTextCtrl, lineEndWrap, 0}},
- {3258, {wxStyledTextCtrl, lineEndWrapExtend, 0}},
- {3259, {wxStyledTextCtrl, vCHomeWrap, 0}},
- {3260, {wxStyledTextCtrl, vCHomeWrapExtend, 0}},
- {3261, {wxStyledTextCtrl, lineCopy, 0}},
- {3262, {wxStyledTextCtrl, moveCaretInsideView, 0}},
- {3263, {wxStyledTextCtrl, lineLength, 1}},
- {3264, {wxStyledTextCtrl, braceHighlight, 2}},
- {3265, {wxStyledTextCtrl, braceBadLight, 1}},
- {3266, {wxStyledTextCtrl, braceMatch, 1}},
- {3267, {wxStyledTextCtrl, getViewEOL, 0}},
- {3268, {wxStyledTextCtrl, setViewEOL, 1}},
- {3269, {wxStyledTextCtrl, setModEventMask, 1}},
- {3270, {wxStyledTextCtrl, getEdgeColumn, 0}},
- {3271, {wxStyledTextCtrl, setEdgeColumn, 1}},
- {3272, {wxStyledTextCtrl, getEdgeMode, 0}},
- {3273, {wxStyledTextCtrl, getEdgeColour, 0}},
- {3274, {wxStyledTextCtrl, setEdgeColour, 1}},
- {3275, {wxStyledTextCtrl, searchAnchor, 0}},
- {3276, {wxStyledTextCtrl, searchNext, 2}},
- {3277, {wxStyledTextCtrl, searchPrev, 2}},
- {3278, {wxStyledTextCtrl, linesOnScreen, 0}},
- {3279, {wxStyledTextCtrl, usePopUp, 1}},
- {3280, {wxStyledTextCtrl, selectionIsRectangle, 0}},
- {3281, {wxStyledTextCtrl, setZoom, 1}},
- {3282, {wxStyledTextCtrl, getZoom, 0}},
- {3283, {wxStyledTextCtrl, getModEventMask, 0}},
- {3284, {wxStyledTextCtrl, setSTCFocus, 1}},
- {3285, {wxStyledTextCtrl, getSTCFocus, 0}},
- {3286, {wxStyledTextCtrl, setStatus, 1}},
- {3287, {wxStyledTextCtrl, getStatus, 0}},
- {3288, {wxStyledTextCtrl, setMouseDownCaptures, 1}},
- {3289, {wxStyledTextCtrl, getMouseDownCaptures, 0}},
- {3290, {wxStyledTextCtrl, setSTCCursor, 1}},
- {3291, {wxStyledTextCtrl, getSTCCursor, 0}},
- {3292, {wxStyledTextCtrl, setControlCharSymbol, 1}},
- {3293, {wxStyledTextCtrl, getControlCharSymbol, 0}},
- {3294, {wxStyledTextCtrl, wordPartLeft, 0}},
- {3295, {wxStyledTextCtrl, wordPartLeftExtend, 0}},
- {3296, {wxStyledTextCtrl, wordPartRight, 0}},
- {3297, {wxStyledTextCtrl, wordPartRightExtend, 0}},
- {3298, {wxStyledTextCtrl, setVisiblePolicy, 2}},
- {3299, {wxStyledTextCtrl, delLineLeft, 0}},
- {3300, {wxStyledTextCtrl, delLineRight, 0}},
- {3301, {wxStyledTextCtrl, getXOffset, 0}},
- {3302, {wxStyledTextCtrl, chooseCaretX, 0}},
- {3303, {wxStyledTextCtrl, setXCaretPolicy, 2}},
- {3304, {wxStyledTextCtrl, setYCaretPolicy, 2}},
- {3305, {wxStyledTextCtrl, getPrintWrapMode, 0}},
- {3306, {wxStyledTextCtrl, setHotspotActiveForeground, 2}},
- {3307, {wxStyledTextCtrl, setHotspotActiveBackground, 2}},
- {3308, {wxStyledTextCtrl, setHotspotActiveUnderline, 1}},
- {3309, {wxStyledTextCtrl, setHotspotSingleLine, 1}},
- {3310, {wxStyledTextCtrl, paraDownExtend, 0}},
- {3311, {wxStyledTextCtrl, paraUp, 0}},
- {3312, {wxStyledTextCtrl, paraUpExtend, 0}},
- {3313, {wxStyledTextCtrl, positionBefore, 1}},
- {3314, {wxStyledTextCtrl, positionAfter, 1}},
- {3315, {wxStyledTextCtrl, copyRange, 2}},
- {3316, {wxStyledTextCtrl, copyText, 2}},
- {3317, {wxStyledTextCtrl, setSelectionMode, 1}},
- {3318, {wxStyledTextCtrl, getSelectionMode, 0}},
- {3319, {wxStyledTextCtrl, lineDownRectExtend, 0}},
- {3320, {wxStyledTextCtrl, lineUpRectExtend, 0}},
- {3321, {wxStyledTextCtrl, charLeftRectExtend, 0}},
- {3322, {wxStyledTextCtrl, charRightRectExtend, 0}},
- {3323, {wxStyledTextCtrl, homeRectExtend, 0}},
- {3324, {wxStyledTextCtrl, vCHomeRectExtend, 0}},
- {3325, {wxStyledTextCtrl, lineEndRectExtend, 0}},
- {3326, {wxStyledTextCtrl, pageUpRectExtend, 0}},
- {3327, {wxStyledTextCtrl, pageDownRectExtend, 0}},
- {3328, {wxStyledTextCtrl, stutteredPageUp, 0}},
- {3329, {wxStyledTextCtrl, stutteredPageUpExtend, 0}},
- {3330, {wxStyledTextCtrl, stutteredPageDown, 0}},
- {3331, {wxStyledTextCtrl, stutteredPageDownExtend, 0}},
- {3332, {wxStyledTextCtrl, wordLeftEnd, 0}},
- {3333, {wxStyledTextCtrl, wordLeftEndExtend, 0}},
- {3334, {wxStyledTextCtrl, wordRightEnd, 0}},
- {3335, {wxStyledTextCtrl, wordRightEndExtend, 0}},
- {3336, {wxStyledTextCtrl, setWhitespaceChars, 1}},
- {3337, {wxStyledTextCtrl, setCharsDefault, 0}},
- {3338, {wxStyledTextCtrl, autoCompGetCurrent, 0}},
- {3339, {wxStyledTextCtrl, allocate, 1}},
- {3340, {wxStyledTextCtrl, findColumn, 2}},
- {3341, {wxStyledTextCtrl, getCaretSticky, 0}},
- {3342, {wxStyledTextCtrl, setCaretSticky, 1}},
- {3343, {wxStyledTextCtrl, toggleCaretSticky, 0}},
- {3344, {wxStyledTextCtrl, setPasteConvertEndings, 1}},
- {3345, {wxStyledTextCtrl, getPasteConvertEndings, 0}},
- {3346, {wxStyledTextCtrl, selectionDuplicate, 0}},
- {3347, {wxStyledTextCtrl, setCaretLineBackAlpha, 1}},
- {3348, {wxStyledTextCtrl, getCaretLineBackAlpha, 0}},
- {3349, {wxStyledTextCtrl, startRecord, 0}},
- {3350, {wxStyledTextCtrl, stopRecord, 0}},
- {3351, {wxStyledTextCtrl, setLexer, 1}},
- {3352, {wxStyledTextCtrl, getLexer, 0}},
- {3353, {wxStyledTextCtrl, colourise, 2}},
- {3354, {wxStyledTextCtrl, setProperty, 2}},
- {3355, {wxStyledTextCtrl, setKeyWords, 2}},
- {3356, {wxStyledTextCtrl, setLexerLanguage, 1}},
- {3357, {wxStyledTextCtrl, getProperty, 1}},
- {3358, {wxStyledTextCtrl, getStyleBitsNeeded, 0}},
- {3359, {wxStyledTextCtrl, getCurrentLine, 0}},
- {3360, {wxStyledTextCtrl, styleSetSpec, 2}},
- {3361, {wxStyledTextCtrl, styleSetFont, 2}},
- {3362, {wxStyledTextCtrl, styleSetFontAttr, 7}},
- {3363, {wxStyledTextCtrl, styleSetCharacterSet, 2}},
- {3364, {wxStyledTextCtrl, styleSetFontEncoding, 2}},
- {3365, {wxStyledTextCtrl, cmdKeyExecute, 1}},
- {3366, {wxStyledTextCtrl, setMargins, 2}},
- {3367, {wxStyledTextCtrl, getSelection, 2}},
- {3368, {wxStyledTextCtrl, pointFromPosition, 1}},
- {3369, {wxStyledTextCtrl, scrollToLine, 1}},
- {3370, {wxStyledTextCtrl, scrollToColumn, 1}},
- {3371, {wxStyledTextCtrl, sendMsg, 2}},
- {3372, {wxStyledTextCtrl, setVScrollBar, 1}},
- {3373, {wxStyledTextCtrl, setHScrollBar, 1}},
- {3374, {wxStyledTextCtrl, getLastKeydownProcessed, 0}},
- {3375, {wxStyledTextCtrl, setLastKeydownProcessed, 1}},
- {3376, {wxStyledTextCtrl, saveFile, 1}},
- {3377, {wxStyledTextCtrl, loadFile, 1}},
- {3378, {wxStyledTextCtrl, doDragOver, 3}},
- {3379, {wxStyledTextCtrl, doDropText, 3}},
- {3380, {wxStyledTextCtrl, getUseAntiAliasing, 0}},
- {3381, {wxStyledTextCtrl, addTextRaw, 1}},
- {3382, {wxStyledTextCtrl, insertTextRaw, 2}},
- {3383, {wxStyledTextCtrl, getCurLineRaw, 1}},
- {3384, {wxStyledTextCtrl, getLineRaw, 1}},
- {3385, {wxStyledTextCtrl, getSelectedTextRaw, 0}},
- {3386, {wxStyledTextCtrl, getTextRangeRaw, 2}},
- {3387, {wxStyledTextCtrl, setTextRaw, 1}},
- {3388, {wxStyledTextCtrl, getTextRaw, 0}},
- {3389, {wxStyledTextCtrl, appendTextRaw, 1}},
- {3390, {wxArtProvider, getBitmap, 2}},
- {3391, {wxArtProvider, getIcon, 2}},
- {3392, {wxTreeEvent, getKeyCode, 0}},
- {3393, {wxTreeEvent, getItem, 0}},
- {3394, {wxTreeEvent, getKeyEvent, 0}},
- {3395, {wxTreeEvent, getLabel, 0}},
- {3396, {wxTreeEvent, getOldItem, 0}},
- {3397, {wxTreeEvent, getPoint, 0}},
- {3398, {wxTreeEvent, isEditCancelled, 0}},
- {3399, {wxTreeEvent, setToolTip, 1}},
- {3400, {wxNotebookEvent, getOldSelection, 0}},
- {3401, {wxNotebookEvent, getSelection, 0}},
- {3402, {wxNotebookEvent, setOldSelection, 1}},
- {3403, {wxNotebookEvent, setSelection, 1}},
- {3404, {wxFileDataObject, new, 0}},
- {3405, {wxFileDataObject, addFile, 1}},
- {3406, {wxFileDataObject, getFilenames, 0}},
- {3407, {wxFileDataObject, 'Destroy', undefined}},
- {3408, {wxTextDataObject, new, 1}},
- {3409, {wxTextDataObject, getTextLength, 0}},
- {3410, {wxTextDataObject, getText, 0}},
- {3411, {wxTextDataObject, setText, 1}},
- {3412, {wxTextDataObject, 'Destroy', undefined}},
- {3413, {wxBitmapDataObject, new_1_1, 1}},
- {3414, {wxBitmapDataObject, new_1_0, 1}},
- {3415, {wxBitmapDataObject, getBitmap, 0}},
- {3416, {wxBitmapDataObject, setBitmap, 1}},
- {3417, {wxBitmapDataObject, 'Destroy', undefined}},
- {3419, {wxClipboard, new, 0}},
- {3420, {wxClipboard, destruct, 0}},
- {3421, {wxClipboard, addData, 1}},
- {3422, {wxClipboard, clear, 0}},
- {3423, {wxClipboard, close, 0}},
- {3424, {wxClipboard, flush, 0}},
- {3425, {wxClipboard, getData, 1}},
- {3426, {wxClipboard, isOpened, 0}},
- {3427, {wxClipboard, open, 0}},
- {3428, {wxClipboard, setData, 1}},
- {3430, {wxClipboard, usePrimarySelection, 1}},
- {3431, {wxClipboard, isSupported, 1}},
- {3432, {wxClipboard, get, 0}},
- {3433, {wxSpinEvent, getPosition, 0}},
- {3434, {wxSpinEvent, setPosition, 1}},
- {3435, {wxSplitterWindow, new_0, 0}},
- {3436, {wxSplitterWindow, new_2, 2}},
- {3437, {wxSplitterWindow, destruct, 0}},
- {3438, {wxSplitterWindow, create, 2}},
- {3439, {wxSplitterWindow, getMinimumPaneSize, 0}},
- {3440, {wxSplitterWindow, getSashGravity, 0}},
- {3441, {wxSplitterWindow, getSashPosition, 0}},
- {3442, {wxSplitterWindow, getSplitMode, 0}},
- {3443, {wxSplitterWindow, getWindow1, 0}},
- {3444, {wxSplitterWindow, getWindow2, 0}},
- {3445, {wxSplitterWindow, initialize, 1}},
- {3446, {wxSplitterWindow, isSplit, 0}},
- {3447, {wxSplitterWindow, replaceWindow, 2}},
- {3448, {wxSplitterWindow, setSashGravity, 1}},
- {3449, {wxSplitterWindow, setSashPosition, 2}},
- {3450, {wxSplitterWindow, setSashSize, 1}},
- {3451, {wxSplitterWindow, setMinimumPaneSize, 1}},
- {3452, {wxSplitterWindow, setSplitMode, 1}},
- {3453, {wxSplitterWindow, splitHorizontally, 3}},
- {3454, {wxSplitterWindow, splitVertically, 3}},
- {3455, {wxSplitterWindow, unsplit, 1}},
- {3456, {wxSplitterWindow, updateSize, 0}},
- {3457, {wxSplitterEvent, getSashPosition, 0}},
- {3458, {wxSplitterEvent, getX, 0}},
- {3459, {wxSplitterEvent, getY, 0}},
- {3460, {wxSplitterEvent, getWindowBeingRemoved, 0}},
- {3461, {wxSplitterEvent, setSashPosition, 1}},
- {3462, {wxHtmlWindow, new_0, 0}},
- {3463, {wxHtmlWindow, new_2, 2}},
- {3464, {wxHtmlWindow, appendToPage, 1}},
- {3465, {wxHtmlWindow, getOpenedAnchor, 0}},
- {3466, {wxHtmlWindow, getOpenedPage, 0}},
- {3467, {wxHtmlWindow, getOpenedPageTitle, 0}},
- {3468, {wxHtmlWindow, getRelatedFrame, 0}},
- {3469, {wxHtmlWindow, historyBack, 0}},
- {3470, {wxHtmlWindow, historyCanBack, 0}},
- {3471, {wxHtmlWindow, historyCanForward, 0}},
- {3472, {wxHtmlWindow, historyClear, 0}},
- {3473, {wxHtmlWindow, historyForward, 0}},
- {3474, {wxHtmlWindow, loadFile, 1}},
- {3475, {wxHtmlWindow, loadPage, 1}},
- {3476, {wxHtmlWindow, selectAll, 0}},
- {3477, {wxHtmlWindow, selectionToText, 0}},
- {3478, {wxHtmlWindow, selectLine, 1}},
- {3479, {wxHtmlWindow, selectWord, 1}},
- {3480, {wxHtmlWindow, setBorders, 1}},
- {3481, {wxHtmlWindow, setFonts, 3}},
- {3482, {wxHtmlWindow, setPage, 1}},
- {3483, {wxHtmlWindow, setRelatedFrame, 2}},
- {3484, {wxHtmlWindow, setRelatedStatusBar, 1}},
- {3485, {wxHtmlWindow, toText, 0}},
- {3486, {wxHtmlWindow, 'Destroy', undefined}},
- {3487, {wxHtmlLinkEvent, getLinkInfo, 0}},
- {3488, {wxSystemSettings, getColour, 1}},
- {3489, {wxSystemSettings, getFont, 1}},
- {3490, {wxSystemSettings, getMetric, 2}},
- {3491, {wxSystemSettings, getScreenType, 0}},
- {3492, {wxSystemOptions, getOption, 1}},
- {3493, {wxSystemOptions, getOptionInt, 1}},
- {3494, {wxSystemOptions, hasOption, 1}},
- {3495, {wxSystemOptions, isFalse, 1}},
- {3496, {wxSystemOptions, setOption_2_1, 2}},
- {3497, {wxSystemOptions, setOption_2_0, 2}},
- {3498, {wxAuiNotebookEvent, setSelection, 1}},
- {3499, {wxAuiNotebookEvent, getSelection, 0}},
- {3500, {wxAuiNotebookEvent, setOldSelection, 1}},
- {3501, {wxAuiNotebookEvent, getOldSelection, 0}},
- {3502, {wxAuiNotebookEvent, setDragSource, 1}},
- {3503, {wxAuiNotebookEvent, getDragSource, 0}},
- {3504, {wxAuiManagerEvent, setManager, 1}},
- {3505, {wxAuiManagerEvent, getManager, 0}},
- {3506, {wxAuiManagerEvent, setPane, 1}},
- {3507, {wxAuiManagerEvent, getPane, 0}},
- {3508, {wxAuiManagerEvent, setButton, 1}},
- {3509, {wxAuiManagerEvent, getButton, 0}},
- {3510, {wxAuiManagerEvent, setDC, 1}},
- {3511, {wxAuiManagerEvent, getDC, 0}},
- {3512, {wxAuiManagerEvent, veto, 1}},
- {3513, {wxAuiManagerEvent, getVeto, 0}},
- {3514, {wxAuiManagerEvent, setCanVeto, 1}},
- {3515, {wxAuiManagerEvent, canVeto, 0}},
- {3516, {wxLogNull, new, 0}},
- {3517, {wxLogNull, 'Destroy', undefined}},
+ {665, {wxDC, getClippingBox, 4}},
+ {667, {wxDC, getFont, 0}},
+ {668, {wxDC, getLayoutDirection, 0}},
+ {669, {wxDC, getLogicalFunction, 0}},
+ {670, {wxDC, getMapMode, 0}},
+ {671, {wxDC, getMultiLineTextExtent_4, 4}},
+ {672, {wxDC, getMultiLineTextExtent_1, 1}},
+ {673, {wxDC, getPartialTextExtents, 2}},
+ {674, {wxDC, getPen, 0}},
+ {675, {wxDC, getPixel, 2}},
+ {676, {wxDC, getPPI, 0}},
+ {678, {wxDC, getSize, 0}},
+ {680, {wxDC, getSizeMM, 0}},
+ {681, {wxDC, getTextBackground, 0}},
+ {682, {wxDC, getTextExtent_4, 4}},
+ {683, {wxDC, getTextExtent_1, 1}},
+ {685, {wxDC, getTextForeground, 0}},
+ {686, {wxDC, getUserScale, 2}},
+ {687, {wxDC, gradientFillConcentric_3, 3}},
+ {688, {wxDC, gradientFillConcentric_4, 4}},
+ {689, {wxDC, gradientFillLinear, 4}},
+ {690, {wxDC, logicalToDeviceX, 1}},
+ {691, {wxDC, logicalToDeviceXRel, 1}},
+ {692, {wxDC, logicalToDeviceY, 1}},
+ {693, {wxDC, logicalToDeviceYRel, 1}},
+ {694, {wxDC, maxX, 0}},
+ {695, {wxDC, maxY, 0}},
+ {696, {wxDC, minX, 0}},
+ {697, {wxDC, minY, 0}},
+ {698, {wxDC, isOk, 0}},
+ {699, {wxDC, resetBoundingBox, 0}},
+ {700, {wxDC, setAxisOrientation, 2}},
+ {701, {wxDC, setBackground, 1}},
+ {702, {wxDC, setBackgroundMode, 1}},
+ {703, {wxDC, setBrush, 1}},
+ {705, {wxDC, setClippingRegion_2, 2}},
+ {706, {wxDC, setClippingRegion_1_1, 1}},
+ {707, {wxDC, setClippingRegion_1_0, 1}},
+ {708, {wxDC, setDeviceOrigin, 2}},
+ {709, {wxDC, setFont, 1}},
+ {710, {wxDC, setLayoutDirection, 1}},
+ {711, {wxDC, setLogicalFunction, 1}},
+ {712, {wxDC, setMapMode, 1}},
+ {713, {wxDC, setPalette, 1}},
+ {714, {wxDC, setPen, 1}},
+ {715, {wxDC, setTextBackground, 1}},
+ {716, {wxDC, setTextForeground, 1}},
+ {717, {wxDC, setUserScale, 2}},
+ {718, {wxDC, startDoc, 1}},
+ {719, {wxDC, startPage, 0}},
+ {720, {wxMirrorDC, new, 2}},
+ {721, {wxMirrorDC, 'Destroy', undefined}},
+ {722, {wxScreenDC, new, 0}},
+ {723, {wxScreenDC, destruct, 0}},
+ {724, {wxPostScriptDC, new_0, 0}},
+ {725, {wxPostScriptDC, new_1, 1}},
+ {726, {wxPostScriptDC, destruct, 0}},
+ {727, {wxPostScriptDC, setResolution, 1}},
+ {728, {wxPostScriptDC, getResolution, 0}},
+ {729, {wxWindowDC, new_0, 0}},
+ {730, {wxWindowDC, new_1, 1}},
+ {731, {wxWindowDC, destruct, 0}},
+ {732, {wxClientDC, new_0, 0}},
+ {733, {wxClientDC, new_1, 1}},
+ {734, {wxClientDC, 'Destroy', undefined}},
+ {735, {wxPaintDC, new_0, 0}},
+ {736, {wxPaintDC, new_1, 1}},
+ {737, {wxPaintDC, 'Destroy', undefined}},
+ {739, {wxMemoryDC, new_1_0, 1}},
+ {740, {wxMemoryDC, new_1_1, 1}},
+ {741, {wxMemoryDC, new_0, 0}},
+ {743, {wxMemoryDC, destruct, 0}},
+ {744, {wxMemoryDC, selectObject, 1}},
+ {745, {wxMemoryDC, selectObjectAsSource, 1}},
+ {746, {wxBufferedDC, new_0, 0}},
+ {747, {wxBufferedDC, new_2, 2}},
+ {748, {wxBufferedDC, new_3, 3}},
+ {749, {wxBufferedDC, destruct, 0}},
+ {750, {wxBufferedDC, init_2, 2}},
+ {751, {wxBufferedDC, init_3, 3}},
+ {752, {wxBufferedPaintDC, new_3, 3}},
+ {753, {wxBufferedPaintDC, new_2, 2}},
+ {754, {wxBufferedPaintDC, destruct, 0}},
+ {755, {wxGraphicsObject, destruct, 0}},
+ {756, {wxGraphicsObject, getRenderer, 0}},
+ {757, {wxGraphicsObject, isNull, 0}},
+ {758, {wxGraphicsContext, destruct, 0}},
+ {759, {wxGraphicsContext, create_1_1, 1}},
+ {760, {wxGraphicsContext, create_1_0, 1}},
+ {761, {wxGraphicsContext, create_0, 0}},
+ {762, {wxGraphicsContext, createPen, 1}},
+ {763, {wxGraphicsContext, createBrush, 1}},
+ {764, {wxGraphicsContext, createRadialGradientBrush, 7}},
+ {765, {wxGraphicsContext, createLinearGradientBrush, 6}},
+ {766, {wxGraphicsContext, createFont, 2}},
+ {767, {wxGraphicsContext, createMatrix, 1}},
+ {768, {wxGraphicsContext, createPath, 0}},
+ {769, {wxGraphicsContext, clip_1, 1}},
+ {770, {wxGraphicsContext, clip_4, 4}},
+ {771, {wxGraphicsContext, resetClip, 0}},
+ {772, {wxGraphicsContext, drawBitmap, 5}},
+ {773, {wxGraphicsContext, drawEllipse, 4}},
+ {774, {wxGraphicsContext, drawIcon, 5}},
+ {775, {wxGraphicsContext, drawLines, 3}},
+ {776, {wxGraphicsContext, drawPath, 2}},
+ {777, {wxGraphicsContext, drawRectangle, 4}},
+ {778, {wxGraphicsContext, drawRoundedRectangle, 5}},
+ {779, {wxGraphicsContext, drawText_3, 3}},
+ {780, {wxGraphicsContext, drawText_4_0, 4}},
+ {781, {wxGraphicsContext, drawText_4_1, 4}},
+ {782, {wxGraphicsContext, drawText_5, 5}},
+ {783, {wxGraphicsContext, fillPath, 2}},
+ {784, {wxGraphicsContext, strokePath, 1}},
+ {785, {wxGraphicsContext, getPartialTextExtents, 2}},
+ {786, {wxGraphicsContext, getTextExtent, 5}},
+ {787, {wxGraphicsContext, rotate, 1}},
+ {788, {wxGraphicsContext, scale, 2}},
+ {789, {wxGraphicsContext, translate, 2}},
+ {790, {wxGraphicsContext, getTransform, 0}},
+ {791, {wxGraphicsContext, setTransform, 1}},
+ {792, {wxGraphicsContext, concatTransform, 1}},
+ {793, {wxGraphicsContext, setBrush_1_1, 1}},
+ {794, {wxGraphicsContext, setBrush_1_0, 1}},
+ {795, {wxGraphicsContext, setFont_1, 1}},
+ {796, {wxGraphicsContext, setFont_2, 2}},
+ {797, {wxGraphicsContext, setPen_1_0, 1}},
+ {798, {wxGraphicsContext, setPen_1_1, 1}},
+ {799, {wxGraphicsContext, strokeLine, 4}},
+ {800, {wxGraphicsContext, strokeLines, 2}},
+ {802, {wxGraphicsMatrix, concat, 1}},
+ {804, {wxGraphicsMatrix, get, 1}},
+ {805, {wxGraphicsMatrix, invert, 0}},
+ {806, {wxGraphicsMatrix, isEqual, 1}},
+ {808, {wxGraphicsMatrix, isIdentity, 0}},
+ {809, {wxGraphicsMatrix, rotate, 1}},
+ {810, {wxGraphicsMatrix, scale, 2}},
+ {811, {wxGraphicsMatrix, translate, 2}},
+ {812, {wxGraphicsMatrix, set, 1}},
+ {813, {wxGraphicsMatrix, transformPoint, 2}},
+ {814, {wxGraphicsMatrix, transformDistance, 2}},
+ {815, {wxGraphicsPath, moveToPoint_2, 2}},
+ {816, {wxGraphicsPath, moveToPoint_1, 1}},
+ {817, {wxGraphicsPath, addArc_6, 6}},
+ {818, {wxGraphicsPath, addArc_5, 5}},
+ {819, {wxGraphicsPath, addArcToPoint, 5}},
+ {820, {wxGraphicsPath, addCircle, 3}},
+ {821, {wxGraphicsPath, addCurveToPoint_6, 6}},
+ {822, {wxGraphicsPath, addCurveToPoint_3, 3}},
+ {823, {wxGraphicsPath, addEllipse, 4}},
+ {824, {wxGraphicsPath, addLineToPoint_2, 2}},
+ {825, {wxGraphicsPath, addLineToPoint_1, 1}},
+ {826, {wxGraphicsPath, addPath, 1}},
+ {827, {wxGraphicsPath, addQuadCurveToPoint, 4}},
+ {828, {wxGraphicsPath, addRectangle, 4}},
+ {829, {wxGraphicsPath, addRoundedRectangle, 5}},
+ {830, {wxGraphicsPath, closeSubpath, 0}},
+ {831, {wxGraphicsPath, contains_3, 3}},
+ {832, {wxGraphicsPath, contains_2, 2}},
+ {834, {wxGraphicsPath, getBox, 0}},
+ {836, {wxGraphicsPath, getCurrentPoint, 0}},
+ {837, {wxGraphicsPath, transform, 1}},
+ {838, {wxGraphicsRenderer, getDefaultRenderer, 0}},
+ {839, {wxGraphicsRenderer, createContext_1_1, 1}},
+ {840, {wxGraphicsRenderer, createContext_1_0, 1}},
+ {841, {wxGraphicsRenderer, createPen, 1}},
+ {842, {wxGraphicsRenderer, createBrush, 1}},
+ {843, {wxGraphicsRenderer, createLinearGradientBrush, 6}},
+ {844, {wxGraphicsRenderer, createRadialGradientBrush, 7}},
+ {845, {wxGraphicsRenderer, createFont, 2}},
+ {846, {wxGraphicsRenderer, createMatrix, 1}},
+ {847, {wxGraphicsRenderer, createPath, 0}},
+ {849, {wxMenuBar, new_1, 1}},
+ {851, {wxMenuBar, new_0, 0}},
+ {853, {wxMenuBar, destruct, 0}},
+ {854, {wxMenuBar, append, 2}},
+ {855, {wxMenuBar, check, 2}},
+ {856, {wxMenuBar, enable_2, 2}},
+ {857, {wxMenuBar, enable_1, 1}},
+ {858, {wxMenuBar, enableTop, 2}},
+ {859, {wxMenuBar, findMenu, 1}},
+ {860, {wxMenuBar, findMenuItem, 2}},
+ {861, {wxMenuBar, findItem, 2}},
+ {862, {wxMenuBar, getHelpString, 1}},
+ {863, {wxMenuBar, getLabel_1, 1}},
+ {864, {wxMenuBar, getLabel_0, 0}},
+ {865, {wxMenuBar, getLabelTop, 1}},
+ {866, {wxMenuBar, getMenu, 1}},
+ {867, {wxMenuBar, getMenuCount, 0}},
+ {868, {wxMenuBar, insert, 3}},
+ {869, {wxMenuBar, isChecked, 1}},
+ {870, {wxMenuBar, isEnabled_1, 1}},
+ {871, {wxMenuBar, isEnabled_0, 0}},
+ {872, {wxMenuBar, remove, 1}},
+ {873, {wxMenuBar, replace, 3}},
+ {874, {wxMenuBar, setHelpString, 2}},
+ {875, {wxMenuBar, setLabel_2, 2}},
+ {876, {wxMenuBar, setLabel_1, 1}},
+ {877, {wxMenuBar, setLabelTop, 2}},
+ {878, {wxControl, getLabel, 0}},
+ {879, {wxControl, setLabel, 1}},
+ {880, {wxControlWithItems, append_1, 1}},
+ {881, {wxControlWithItems, append_2, 2}},
+ {882, {wxControlWithItems, appendStrings_1, 1}},
+ {883, {wxControlWithItems, clear, 0}},
+ {884, {wxControlWithItems, delete, 1}},
+ {885, {wxControlWithItems, findString, 2}},
+ {886, {wxControlWithItems, getClientData, 1}},
+ {887, {wxControlWithItems, setClientData, 2}},
+ {888, {wxControlWithItems, getCount, 0}},
+ {889, {wxControlWithItems, getSelection, 0}},
+ {890, {wxControlWithItems, getString, 1}},
+ {891, {wxControlWithItems, getStringSelection, 0}},
+ {892, {wxControlWithItems, insert_2, 2}},
+ {893, {wxControlWithItems, insert_3, 3}},
+ {894, {wxControlWithItems, isEmpty, 0}},
+ {895, {wxControlWithItems, select, 1}},
+ {896, {wxControlWithItems, setSelection, 1}},
+ {897, {wxControlWithItems, setString, 2}},
+ {898, {wxControlWithItems, setStringSelection, 1}},
+ {901, {wxMenu, new_2, 2}},
+ {902, {wxMenu, new_1, 1}},
+ {904, {wxMenu, destruct, 0}},
+ {905, {wxMenu, append_3, 3}},
+ {906, {wxMenu, append_1, 1}},
+ {907, {wxMenu, append_4_0, 4}},
+ {908, {wxMenu, append_4_1, 4}},
+ {909, {wxMenu, appendCheckItem, 3}},
+ {910, {wxMenu, appendRadioItem, 3}},
+ {911, {wxMenu, appendSeparator, 0}},
+ {912, {wxMenu, break, 0}},
+ {913, {wxMenu, check, 2}},
+ {914, {wxMenu, delete_1_0, 1}},
+ {915, {wxMenu, delete_1_1, 1}},
+ {916, {wxMenu, destroy_1_0, 1}},
+ {917, {wxMenu, destroy_1_1, 1}},
+ {918, {wxMenu, enable, 2}},
+ {919, {wxMenu, findItem_1, 1}},
+ {920, {wxMenu, findItem_2, 2}},
+ {921, {wxMenu, findItemByPosition, 1}},
+ {922, {wxMenu, getHelpString, 1}},
+ {923, {wxMenu, getLabel, 1}},
+ {924, {wxMenu, getMenuItemCount, 0}},
+ {925, {wxMenu, getMenuItems, 0}},
+ {927, {wxMenu, getTitle, 0}},
+ {928, {wxMenu, insert_2, 2}},
+ {929, {wxMenu, insert_3, 3}},
+ {930, {wxMenu, insert_5_1, 5}},
+ {931, {wxMenu, insert_5_0, 5}},
+ {932, {wxMenu, insertCheckItem, 4}},
+ {933, {wxMenu, insertRadioItem, 4}},
+ {934, {wxMenu, insertSeparator, 1}},
+ {935, {wxMenu, isChecked, 1}},
+ {936, {wxMenu, isEnabled, 1}},
+ {937, {wxMenu, prepend_1, 1}},
+ {938, {wxMenu, prepend_2, 2}},
+ {939, {wxMenu, prepend_4_1, 4}},
+ {940, {wxMenu, prepend_4_0, 4}},
+ {941, {wxMenu, prependCheckItem, 3}},
+ {942, {wxMenu, prependRadioItem, 3}},
+ {943, {wxMenu, prependSeparator, 0}},
+ {944, {wxMenu, remove_1_0, 1}},
+ {945, {wxMenu, remove_1_1, 1}},
+ {946, {wxMenu, setHelpString, 2}},
+ {947, {wxMenu, setLabel, 2}},
+ {948, {wxMenu, setTitle, 1}},
+ {949, {wxMenuItem, new, 1}},
+ {951, {wxMenuItem, destruct, 0}},
+ {952, {wxMenuItem, check, 1}},
+ {953, {wxMenuItem, enable, 1}},
+ {954, {wxMenuItem, getBitmap, 0}},
+ {955, {wxMenuItem, getHelp, 0}},
+ {956, {wxMenuItem, getId, 0}},
+ {957, {wxMenuItem, getKind, 0}},
+ {958, {wxMenuItem, getLabel, 0}},
+ {959, {wxMenuItem, getLabelFromText, 1}},
+ {960, {wxMenuItem, getMenu, 0}},
+ {961, {wxMenuItem, getText, 0}},
+ {962, {wxMenuItem, getSubMenu, 0}},
+ {963, {wxMenuItem, isCheckable, 0}},
+ {964, {wxMenuItem, isChecked, 0}},
+ {965, {wxMenuItem, isEnabled, 0}},
+ {966, {wxMenuItem, isSeparator, 0}},
+ {967, {wxMenuItem, isSubMenu, 0}},
+ {968, {wxMenuItem, setBitmap, 1}},
+ {969, {wxMenuItem, setHelp, 1}},
+ {970, {wxMenuItem, setMenu, 1}},
+ {971, {wxMenuItem, setSubMenu, 1}},
+ {972, {wxMenuItem, setText, 1}},
+ {973, {wxToolBar, addControl, 1}},
+ {974, {wxToolBar, addSeparator, 0}},
+ {975, {wxToolBar, addTool_5, 5}},
+ {976, {wxToolBar, addTool_4_0, 4}},
+ {977, {wxToolBar, addTool_1, 1}},
+ {978, {wxToolBar, addTool_4_1, 4}},
+ {979, {wxToolBar, addTool_3, 3}},
+ {980, {wxToolBar, addTool_6, 6}},
+ {981, {wxToolBar, addCheckTool, 4}},
+ {982, {wxToolBar, addRadioTool, 4}},
+ {983, {wxToolBar, deleteTool, 1}},
+ {984, {wxToolBar, deleteToolByPos, 1}},
+ {985, {wxToolBar, enableTool, 2}},
+ {986, {wxToolBar, findById, 1}},
+ {987, {wxToolBar, findControl, 1}},
+ {988, {wxToolBar, findToolForPosition, 2}},
+ {989, {wxToolBar, getToolSize, 0}},
+ {990, {wxToolBar, getToolBitmapSize, 0}},
+ {991, {wxToolBar, getMargins, 0}},
+ {992, {wxToolBar, getToolEnabled, 1}},
+ {993, {wxToolBar, getToolLongHelp, 1}},
+ {994, {wxToolBar, getToolPacking, 0}},
+ {995, {wxToolBar, getToolPos, 1}},
+ {996, {wxToolBar, getToolSeparation, 0}},
+ {997, {wxToolBar, getToolShortHelp, 1}},
+ {998, {wxToolBar, getToolState, 1}},
+ {999, {wxToolBar, insertControl, 2}},
+ {1000, {wxToolBar, insertSeparator, 1}},
+ {1001, {wxToolBar, insertTool_5, 5}},
+ {1002, {wxToolBar, insertTool_2, 2}},
+ {1003, {wxToolBar, insertTool_4, 4}},
+ {1004, {wxToolBar, realize, 0}},
+ {1005, {wxToolBar, removeTool, 1}},
+ {1006, {wxToolBar, setMargins, 2}},
+ {1007, {wxToolBar, setToolBitmapSize, 1}},
+ {1008, {wxToolBar, setToolLongHelp, 2}},
+ {1009, {wxToolBar, setToolPacking, 1}},
+ {1010, {wxToolBar, setToolShortHelp, 2}},
+ {1011, {wxToolBar, setToolSeparation, 1}},
+ {1012, {wxToolBar, toggleTool, 2}},
+ {1014, {wxStatusBar, new_0, 0}},
+ {1015, {wxStatusBar, new_2, 2}},
+ {1017, {wxStatusBar, destruct, 0}},
+ {1018, {wxStatusBar, create, 2}},
+ {1019, {wxStatusBar, getFieldRect, 2}},
+ {1020, {wxStatusBar, getFieldsCount, 0}},
+ {1021, {wxStatusBar, getStatusText, 1}},
+ {1022, {wxStatusBar, popStatusText, 1}},
+ {1023, {wxStatusBar, pushStatusText, 2}},
+ {1024, {wxStatusBar, setFieldsCount, 2}},
+ {1025, {wxStatusBar, setMinHeight, 1}},
+ {1026, {wxStatusBar, setStatusText, 2}},
+ {1027, {wxStatusBar, setStatusWidths, 2}},
+ {1028, {wxStatusBar, setStatusStyles, 2}},
+ {1029, {wxBitmap, new_0, 0}},
+ {1030, {wxBitmap, new_3, 3}},
+ {1031, {wxBitmap, new_4, 4}},
+ {1032, {wxBitmap, new_2_0, 2}},
+ {1033, {wxBitmap, new_2_1, 2}},
+ {1034, {wxBitmap, destruct, 0}},
+ {1035, {wxBitmap, convertToImage, 0}},
+ {1036, {wxBitmap, copyFromIcon, 1}},
+ {1037, {wxBitmap, create, 3}},
+ {1038, {wxBitmap, getDepth, 0}},
+ {1039, {wxBitmap, getHeight, 0}},
+ {1040, {wxBitmap, getPalette, 0}},
+ {1041, {wxBitmap, getMask, 0}},
+ {1042, {wxBitmap, getWidth, 0}},
+ {1043, {wxBitmap, getSubBitmap, 1}},
+ {1044, {wxBitmap, loadFile, 2}},
+ {1045, {wxBitmap, ok, 0}},
+ {1046, {wxBitmap, saveFile, 3}},
+ {1047, {wxBitmap, setDepth, 1}},
+ {1048, {wxBitmap, setHeight, 1}},
+ {1049, {wxBitmap, setMask, 1}},
+ {1050, {wxBitmap, setPalette, 1}},
+ {1051, {wxBitmap, setWidth, 1}},
+ {1052, {wxIcon, new_0, 0}},
+ {1053, {wxIcon, new_2, 2}},
+ {1054, {wxIcon, new_1, 1}},
+ {1055, {wxIcon, copyFromBitmap, 1}},
+ {1056, {wxIcon, 'Destroy', undefined}},
+ {1057, {wxIconBundle, new_0, 0}},
+ {1058, {wxIconBundle, new_2, 2}},
+ {1059, {wxIconBundle, new_1_0, 1}},
+ {1060, {wxIconBundle, new_1_1, 1}},
+ {1061, {wxIconBundle, destruct, 0}},
+ {1062, {wxIconBundle, addIcon_2, 2}},
+ {1063, {wxIconBundle, addIcon_1, 1}},
+ {1064, {wxIconBundle, getIcon_1_1, 1}},
+ {1065, {wxIconBundle, getIcon_1_0, 1}},
+ {1066, {wxCursor, new_0, 0}},
+ {1067, {wxCursor, new_1_0, 1}},
+ {1068, {wxCursor, new_1_1, 1}},
+ {1069, {wxCursor, new_4, 4}},
+ {1070, {wxCursor, destruct, 0}},
+ {1071, {wxCursor, ok, 0}},
+ {1072, {wxMask, new_0, 0}},
+ {1073, {wxMask, new_2_1, 2}},
+ {1074, {wxMask, new_2_0, 2}},
+ {1075, {wxMask, new_1, 1}},
+ {1076, {wxMask, destruct, 0}},
+ {1077, {wxMask, create_2_1, 2}},
+ {1078, {wxMask, create_2_0, 2}},
+ {1079, {wxMask, create_1, 1}},
+ {1080, {wxImage, new_0, 0}},
+ {1081, {wxImage, new_3_0, 3}},
+ {1082, {wxImage, new_4, 4}},
+ {1083, {wxImage, new_5, 5}},
+ {1084, {wxImage, new_2, 2}},
+ {1085, {wxImage, new_3_1, 3}},
+ {1086, {wxImage, blur, 1}},
+ {1087, {wxImage, blurHorizontal, 1}},
+ {1088, {wxImage, blurVertical, 1}},
+ {1089, {wxImage, convertAlphaToMask, 1}},
+ {1090, {wxImage, convertToGreyscale, 1}},
+ {1091, {wxImage, convertToMono, 3}},
+ {1092, {wxImage, copy, 0}},
+ {1093, {wxImage, create_3, 3}},
+ {1094, {wxImage, create_4, 4}},
+ {1095, {wxImage, create_5, 5}},
+ {1096, {wxImage, 'Destroy', 0}},
+ {1097, {wxImage, findFirstUnusedColour, 4}},
+ {1098, {wxImage, getImageExtWildcard, 0}},
+ {1099, {wxImage, getAlpha_2, 2}},
+ {1100, {wxImage, getAlpha_0, 0}},
+ {1101, {wxImage, getBlue, 2}},
+ {1102, {wxImage, getData, 0}},
+ {1103, {wxImage, getGreen, 2}},
+ {1104, {wxImage, getImageCount, 2}},
+ {1105, {wxImage, getHeight, 0}},
+ {1106, {wxImage, getMaskBlue, 0}},
+ {1107, {wxImage, getMaskGreen, 0}},
+ {1108, {wxImage, getMaskRed, 0}},
+ {1109, {wxImage, getOrFindMaskColour, 3}},
+ {1110, {wxImage, getPalette, 0}},
+ {1111, {wxImage, getRed, 2}},
+ {1112, {wxImage, getSubImage, 1}},
+ {1113, {wxImage, getWidth, 0}},
+ {1114, {wxImage, hasAlpha, 0}},
+ {1115, {wxImage, hasMask, 0}},
+ {1116, {wxImage, getOption, 1}},
+ {1117, {wxImage, getOptionInt, 1}},
+ {1118, {wxImage, hasOption, 1}},
+ {1119, {wxImage, initAlpha, 0}},
+ {1120, {wxImage, initStandardHandlers, 0}},
+ {1121, {wxImage, isTransparent, 3}},
+ {1122, {wxImage, loadFile_2, 2}},
+ {1123, {wxImage, loadFile_3, 3}},
+ {1124, {wxImage, ok, 0}},
+ {1125, {wxImage, removeHandler, 1}},
+ {1126, {wxImage, mirror, 1}},
+ {1127, {wxImage, replace, 6}},
+ {1128, {wxImage, rescale, 3}},
+ {1129, {wxImage, resize, 3}},
+ {1130, {wxImage, rotate, 3}},
+ {1131, {wxImage, rotateHue, 1}},
+ {1132, {wxImage, rotate90, 1}},
+ {1133, {wxImage, saveFile_1, 1}},
+ {1134, {wxImage, saveFile_2_0, 2}},
+ {1135, {wxImage, saveFile_2_1, 2}},
+ {1136, {wxImage, scale, 3}},
+ {1137, {wxImage, size, 3}},
+ {1138, {wxImage, setAlpha_3, 3}},
+ {1139, {wxImage, setAlpha_2, 2}},
+ {1140, {wxImage, setData_2, 2}},
+ {1141, {wxImage, setData_4, 4}},
+ {1142, {wxImage, setMask, 1}},
+ {1143, {wxImage, setMaskColour, 3}},
+ {1144, {wxImage, setMaskFromImage, 4}},
+ {1145, {wxImage, setOption_2_1, 2}},
+ {1146, {wxImage, setOption_2_0, 2}},
+ {1147, {wxImage, setPalette, 1}},
+ {1148, {wxImage, setRGB_5, 5}},
+ {1149, {wxImage, setRGB_4, 4}},
+ {1150, {wxImage, 'Destroy', undefined}},
+ {1151, {wxBrush, new_0, 0}},
+ {1152, {wxBrush, new_2, 2}},
+ {1153, {wxBrush, new_1, 1}},
+ {1155, {wxBrush, destruct, 0}},
+ {1156, {wxBrush, getColour, 0}},
+ {1157, {wxBrush, getStipple, 0}},
+ {1158, {wxBrush, getStyle, 0}},
+ {1159, {wxBrush, isHatch, 0}},
+ {1160, {wxBrush, isOk, 0}},
+ {1161, {wxBrush, setColour_1, 1}},
+ {1162, {wxBrush, setColour_3, 3}},
+ {1163, {wxBrush, setStipple, 1}},
+ {1164, {wxBrush, setStyle, 1}},
+ {1165, {wxPen, new_0, 0}},
+ {1166, {wxPen, new_2, 2}},
+ {1167, {wxPen, destruct, 0}},
+ {1168, {wxPen, getCap, 0}},
+ {1169, {wxPen, getColour, 0}},
+ {1170, {wxPen, getJoin, 0}},
+ {1171, {wxPen, getStyle, 0}},
+ {1172, {wxPen, getWidth, 0}},
+ {1173, {wxPen, isOk, 0}},
+ {1174, {wxPen, setCap, 1}},
+ {1175, {wxPen, setColour_1, 1}},
+ {1176, {wxPen, setColour_3, 3}},
+ {1177, {wxPen, setJoin, 1}},
+ {1178, {wxPen, setStyle, 1}},
+ {1179, {wxPen, setWidth, 1}},
+ {1180, {wxRegion, new_0, 0}},
+ {1181, {wxRegion, new_4, 4}},
+ {1182, {wxRegion, new_2, 2}},
+ {1183, {wxRegion, new_1_1, 1}},
+ {1185, {wxRegion, new_1_0, 1}},
+ {1187, {wxRegion, destruct, 0}},
+ {1188, {wxRegion, clear, 0}},
+ {1189, {wxRegion, contains_2, 2}},
+ {1190, {wxRegion, contains_1_0, 1}},
+ {1191, {wxRegion, contains_4, 4}},
+ {1192, {wxRegion, contains_1_1, 1}},
+ {1193, {wxRegion, convertToBitmap, 0}},
+ {1194, {wxRegion, getBox, 0}},
+ {1195, {wxRegion, intersect_4, 4}},
+ {1196, {wxRegion, intersect_1_1, 1}},
+ {1197, {wxRegion, intersect_1_0, 1}},
+ {1198, {wxRegion, isEmpty, 0}},
+ {1199, {wxRegion, subtract_4, 4}},
+ {1200, {wxRegion, subtract_1_1, 1}},
+ {1201, {wxRegion, subtract_1_0, 1}},
+ {1202, {wxRegion, offset_2, 2}},
+ {1203, {wxRegion, offset_1, 1}},
+ {1204, {wxRegion, union_4, 4}},
+ {1205, {wxRegion, union_1_2, 1}},
+ {1206, {wxRegion, union_1_1, 1}},
+ {1207, {wxRegion, union_1_0, 1}},
+ {1208, {wxRegion, union_3, 3}},
+ {1209, {wxRegion, xor_4, 4}},
+ {1210, {wxRegion, xor_1_1, 1}},
+ {1211, {wxRegion, xor_1_0, 1}},
+ {1212, {wxAcceleratorTable, new_0, 0}},
+ {1213, {wxAcceleratorTable, new_2, 2}},
+ {1214, {wxAcceleratorTable, destruct, 0}},
+ {1215, {wxAcceleratorTable, ok, 0}},
+ {1216, {wxAcceleratorEntry, new_1_0, 1}},
+ {1217, {wxAcceleratorEntry, new_1_1, 1}},
+ {1218, {wxAcceleratorEntry, getCommand, 0}},
+ {1219, {wxAcceleratorEntry, getFlags, 0}},
+ {1220, {wxAcceleratorEntry, getKeyCode, 0}},
+ {1221, {wxAcceleratorEntry, set, 4}},
+ {1222, {wxAcceleratorEntry, 'Destroy', undefined}},
+ {1227, {wxCaret, new_3, 3}},
+ {1228, {wxCaret, new_2, 2}},
+ {1230, {wxCaret, destruct, 0}},
+ {1231, {wxCaret, create_3, 3}},
+ {1232, {wxCaret, create_2, 2}},
+ {1233, {wxCaret, getBlinkTime, 0}},
+ {1235, {wxCaret, getPosition, 0}},
+ {1237, {wxCaret, getSize, 0}},
+ {1238, {wxCaret, getWindow, 0}},
+ {1239, {wxCaret, hide, 0}},
+ {1240, {wxCaret, isOk, 0}},
+ {1241, {wxCaret, isVisible, 0}},
+ {1242, {wxCaret, move_2, 2}},
+ {1243, {wxCaret, move_1, 1}},
+ {1244, {wxCaret, setBlinkTime, 1}},
+ {1245, {wxCaret, setSize_2, 2}},
+ {1246, {wxCaret, setSize_1, 1}},
+ {1247, {wxCaret, show, 1}},
+ {1248, {wxSizer, add_2_1, 2}},
+ {1249, {wxSizer, add_2_0, 2}},
+ {1250, {wxSizer, add_3, 3}},
+ {1251, {wxSizer, add_2_3, 2}},
+ {1252, {wxSizer, add_2_2, 2}},
+ {1253, {wxSizer, addSpacer, 1}},
+ {1254, {wxSizer, addStretchSpacer, 1}},
+ {1255, {wxSizer, calcMin, 0}},
+ {1256, {wxSizer, clear, 1}},
+ {1257, {wxSizer, detach_1_2, 1}},
+ {1258, {wxSizer, detach_1_1, 1}},
+ {1259, {wxSizer, detach_1_0, 1}},
+ {1260, {wxSizer, fit, 1}},
+ {1261, {wxSizer, fitInside, 1}},
+ {1262, {wxSizer, getChildren, 0}},
+ {1263, {wxSizer, getItem_2_1, 2}},
+ {1264, {wxSizer, getItem_2_0, 2}},
+ {1265, {wxSizer, getItem_1, 1}},
+ {1266, {wxSizer, getSize, 0}},
+ {1267, {wxSizer, getPosition, 0}},
+ {1268, {wxSizer, getMinSize, 0}},
+ {1269, {wxSizer, hide_2_0, 2}},
+ {1270, {wxSizer, hide_2_1, 2}},
+ {1271, {wxSizer, hide_1, 1}},
+ {1272, {wxSizer, insert_3_1, 3}},
+ {1273, {wxSizer, insert_3_0, 3}},
+ {1274, {wxSizer, insert_4, 4}},
+ {1275, {wxSizer, insert_3_3, 3}},
+ {1276, {wxSizer, insert_3_2, 3}},
+ {1277, {wxSizer, insert_2, 2}},
+ {1278, {wxSizer, insertSpacer, 2}},
+ {1279, {wxSizer, insertStretchSpacer, 2}},
+ {1280, {wxSizer, isShown_1_2, 1}},
+ {1281, {wxSizer, isShown_1_1, 1}},
+ {1282, {wxSizer, isShown_1_0, 1}},
+ {1283, {wxSizer, layout, 0}},
+ {1284, {wxSizer, prepend_2_1, 2}},
+ {1285, {wxSizer, prepend_2_0, 2}},
+ {1286, {wxSizer, prepend_3, 3}},
+ {1287, {wxSizer, prepend_2_3, 2}},
+ {1288, {wxSizer, prepend_2_2, 2}},
+ {1289, {wxSizer, prepend_1, 1}},
+ {1290, {wxSizer, prependSpacer, 1}},
+ {1291, {wxSizer, prependStretchSpacer, 1}},
+ {1292, {wxSizer, recalcSizes, 0}},
+ {1293, {wxSizer, remove_1_1, 1}},
+ {1294, {wxSizer, remove_1_0, 1}},
+ {1295, {wxSizer, replace_3_1, 3}},
+ {1296, {wxSizer, replace_3_0, 3}},
+ {1297, {wxSizer, replace_2, 2}},
+ {1298, {wxSizer, setDimension, 4}},
+ {1299, {wxSizer, setMinSize_2, 2}},
+ {1300, {wxSizer, setMinSize_1, 1}},
+ {1301, {wxSizer, setItemMinSize_3_2, 3}},
+ {1302, {wxSizer, setItemMinSize_2_2, 2}},
+ {1303, {wxSizer, setItemMinSize_3_1, 3}},
+ {1304, {wxSizer, setItemMinSize_2_1, 2}},
+ {1305, {wxSizer, setItemMinSize_3_0, 3}},
+ {1306, {wxSizer, setItemMinSize_2_0, 2}},
+ {1307, {wxSizer, setSizeHints, 1}},
+ {1308, {wxSizer, setVirtualSizeHints, 1}},
+ {1309, {wxSizer, show_2_2, 2}},
+ {1310, {wxSizer, show_2_1, 2}},
+ {1311, {wxSizer, show_2_0, 2}},
+ {1312, {wxSizer, show_1, 1}},
+ {1313, {wxSizerFlags, new, 1}},
+ {1314, {wxSizerFlags, align, 1}},
+ {1315, {wxSizerFlags, border_2, 2}},
+ {1316, {wxSizerFlags, border_1, 1}},
+ {1317, {wxSizerFlags, center, 0}},
+ {1318, {wxSizerFlags, centre, 0}},
+ {1319, {wxSizerFlags, expand, 0}},
+ {1320, {wxSizerFlags, left, 0}},
+ {1321, {wxSizerFlags, proportion, 1}},
+ {1322, {wxSizerFlags, right, 0}},
+ {1323, {wxSizerFlags, 'Destroy', undefined}},
+ {1324, {wxSizerItem, new_5_1, 5}},
+ {1325, {wxSizerItem, new_2_1, 2}},
+ {1326, {wxSizerItem, new_5_0, 5}},
+ {1327, {wxSizerItem, new_2_0, 2}},
+ {1328, {wxSizerItem, new_6, 6}},
+ {1329, {wxSizerItem, new_3, 3}},
+ {1330, {wxSizerItem, new_0, 0}},
+ {1331, {wxSizerItem, destruct, 0}},
+ {1332, {wxSizerItem, calcMin, 0}},
+ {1333, {wxSizerItem, deleteWindows, 0}},
+ {1334, {wxSizerItem, detachSizer, 0}},
+ {1335, {wxSizerItem, getBorder, 0}},
+ {1336, {wxSizerItem, getFlag, 0}},
+ {1337, {wxSizerItem, getMinSize, 0}},
+ {1338, {wxSizerItem, getPosition, 0}},
+ {1339, {wxSizerItem, getProportion, 0}},
+ {1340, {wxSizerItem, getRatio, 0}},
+ {1341, {wxSizerItem, getRect, 0}},
+ {1342, {wxSizerItem, getSize, 0}},
+ {1343, {wxSizerItem, getSizer, 0}},
+ {1344, {wxSizerItem, getSpacer, 0}},
+ {1345, {wxSizerItem, getUserData, 0}},
+ {1346, {wxSizerItem, getWindow, 0}},
+ {1347, {wxSizerItem, isSizer, 0}},
+ {1348, {wxSizerItem, isShown, 0}},
+ {1349, {wxSizerItem, isSpacer, 0}},
+ {1350, {wxSizerItem, isWindow, 0}},
+ {1351, {wxSizerItem, setBorder, 1}},
+ {1352, {wxSizerItem, setDimension, 2}},
+ {1353, {wxSizerItem, setFlag, 1}},
+ {1354, {wxSizerItem, setInitSize, 2}},
+ {1355, {wxSizerItem, setMinSize_1, 1}},
+ {1356, {wxSizerItem, setMinSize_2, 2}},
+ {1357, {wxSizerItem, setProportion, 1}},
+ {1358, {wxSizerItem, setRatio_2, 2}},
+ {1359, {wxSizerItem, setRatio_1_1, 1}},
+ {1360, {wxSizerItem, setRatio_1_0, 1}},
+ {1361, {wxSizerItem, setSizer, 1}},
+ {1362, {wxSizerItem, setSpacer_1, 1}},
+ {1363, {wxSizerItem, setSpacer_2, 2}},
+ {1364, {wxSizerItem, setWindow, 1}},
+ {1365, {wxSizerItem, show, 1}},
+ {1366, {wxBoxSizer, new, 1}},
+ {1367, {wxBoxSizer, getOrientation, 0}},
+ {1368, {wxBoxSizer, 'Destroy', undefined}},
+ {1369, {wxStaticBoxSizer, new_2, 2}},
+ {1370, {wxStaticBoxSizer, new_3, 3}},
+ {1371, {wxStaticBoxSizer, getStaticBox, 0}},
+ {1372, {wxStaticBoxSizer, 'Destroy', undefined}},
+ {1373, {wxGridSizer, new_4, 4}},
+ {1374, {wxGridSizer, new_2, 2}},
+ {1375, {wxGridSizer, getCols, 0}},
+ {1376, {wxGridSizer, getHGap, 0}},
+ {1377, {wxGridSizer, getRows, 0}},
+ {1378, {wxGridSizer, getVGap, 0}},
+ {1379, {wxGridSizer, setCols, 1}},
+ {1380, {wxGridSizer, setHGap, 1}},
+ {1381, {wxGridSizer, setRows, 1}},
+ {1382, {wxGridSizer, setVGap, 1}},
+ {1383, {wxGridSizer, 'Destroy', undefined}},
+ {1384, {wxFlexGridSizer, new_4, 4}},
+ {1385, {wxFlexGridSizer, new_2, 2}},
+ {1386, {wxFlexGridSizer, addGrowableCol, 2}},
+ {1387, {wxFlexGridSizer, addGrowableRow, 2}},
+ {1388, {wxFlexGridSizer, getFlexibleDirection, 0}},
+ {1389, {wxFlexGridSizer, getNonFlexibleGrowMode, 0}},
+ {1390, {wxFlexGridSizer, removeGrowableCol, 1}},
+ {1391, {wxFlexGridSizer, removeGrowableRow, 1}},
+ {1392, {wxFlexGridSizer, setFlexibleDirection, 1}},
+ {1393, {wxFlexGridSizer, setNonFlexibleGrowMode, 1}},
+ {1394, {wxFlexGridSizer, 'Destroy', undefined}},
+ {1395, {wxGridBagSizer, new, 1}},
+ {1396, {wxGridBagSizer, add_3_2, 3}},
+ {1397, {wxGridBagSizer, add_3_1, 3}},
+ {1398, {wxGridBagSizer, add_4, 4}},
+ {1399, {wxGridBagSizer, add_1_0, 1}},
+ {1400, {wxGridBagSizer, add_2_1, 2}},
+ {1401, {wxGridBagSizer, add_2_0, 2}},
+ {1402, {wxGridBagSizer, add_3_0, 3}},
+ {1403, {wxGridBagSizer, add_1_1, 1}},
+ {1404, {wxGridBagSizer, calcMin, 0}},
+ {1405, {wxGridBagSizer, checkForIntersection_2, 2}},
+ {1406, {wxGridBagSizer, checkForIntersection_3, 3}},
+ {1407, {wxGridBagSizer, findItem_1_1, 1}},
+ {1408, {wxGridBagSizer, findItem_1_0, 1}},
+ {1409, {wxGridBagSizer, findItemAtPoint, 1}},
+ {1410, {wxGridBagSizer, findItemAtPosition, 1}},
+ {1411, {wxGridBagSizer, findItemWithData, 1}},
+ {1412, {wxGridBagSizer, getCellSize, 2}},
+ {1413, {wxGridBagSizer, getEmptyCellSize, 0}},
+ {1414, {wxGridBagSizer, getItemPosition_1_2, 1}},
+ {1415, {wxGridBagSizer, getItemPosition_1_1, 1}},
+ {1416, {wxGridBagSizer, getItemPosition_1_0, 1}},
+ {1417, {wxGridBagSizer, getItemSpan_1_2, 1}},
+ {1418, {wxGridBagSizer, getItemSpan_1_1, 1}},
+ {1419, {wxGridBagSizer, getItemSpan_1_0, 1}},
+ {1420, {wxGridBagSizer, setEmptyCellSize, 1}},
+ {1421, {wxGridBagSizer, setItemPosition_2_2, 2}},
+ {1422, {wxGridBagSizer, setItemPosition_2_1, 2}},
+ {1423, {wxGridBagSizer, setItemPosition_2_0, 2}},
+ {1424, {wxGridBagSizer, setItemSpan_2_2, 2}},
+ {1425, {wxGridBagSizer, setItemSpan_2_1, 2}},
+ {1426, {wxGridBagSizer, setItemSpan_2_0, 2}},
+ {1427, {wxGridBagSizer, 'Destroy', undefined}},
+ {1428, {wxStdDialogButtonSizer, new, 0}},
+ {1429, {wxStdDialogButtonSizer, addButton, 1}},
+ {1430, {wxStdDialogButtonSizer, realize, 0}},
+ {1431, {wxStdDialogButtonSizer, setAffirmativeButton, 1}},
+ {1432, {wxStdDialogButtonSizer, setCancelButton, 1}},
+ {1433, {wxStdDialogButtonSizer, setNegativeButton, 1}},
+ {1434, {wxStdDialogButtonSizer, 'Destroy', undefined}},
+ {1435, {wxFont, new_0, 0}},
+ {1436, {wxFont, new_1, 1}},
+ {1437, {wxFont, new_5, 5}},
+ {1439, {wxFont, destruct, 0}},
+ {1440, {wxFont, isFixedWidth, 0}},
+ {1441, {wxFont, getDefaultEncoding, 0}},
+ {1442, {wxFont, getFaceName, 0}},
+ {1443, {wxFont, getFamily, 0}},
+ {1444, {wxFont, getNativeFontInfoDesc, 0}},
+ {1445, {wxFont, getNativeFontInfoUserDesc, 0}},
+ {1446, {wxFont, getPointSize, 0}},
+ {1447, {wxFont, getStyle, 0}},
+ {1448, {wxFont, getUnderlined, 0}},
+ {1449, {wxFont, getWeight, 0}},
+ {1450, {wxFont, ok, 0}},
+ {1451, {wxFont, setDefaultEncoding, 1}},
+ {1452, {wxFont, setFaceName, 1}},
+ {1453, {wxFont, setFamily, 1}},
+ {1454, {wxFont, setPointSize, 1}},
+ {1455, {wxFont, setStyle, 1}},
+ {1456, {wxFont, setUnderlined, 1}},
+ {1457, {wxFont, setWeight, 1}},
+ {1458, {wxToolTip, enable, 1}},
+ {1459, {wxToolTip, setDelay, 1}},
+ {1460, {wxToolTip, new, 1}},
+ {1461, {wxToolTip, setTip, 1}},
+ {1462, {wxToolTip, getTip, 0}},
+ {1463, {wxToolTip, getWindow, 0}},
+ {1464, {wxToolTip, 'Destroy', undefined}},
+ {1466, {wxButton, new_3, 3}},
+ {1467, {wxButton, new_0, 0}},
+ {1468, {wxButton, destruct, 0}},
+ {1469, {wxButton, create, 3}},
+ {1470, {wxButton, getDefaultSize, 0}},
+ {1471, {wxButton, setDefault, 0}},
+ {1472, {wxButton, setLabel, 1}},
+ {1474, {wxBitmapButton, new_4, 4}},
+ {1475, {wxBitmapButton, new_0, 0}},
+ {1476, {wxBitmapButton, create, 4}},
+ {1477, {wxBitmapButton, getBitmapDisabled, 0}},
+ {1479, {wxBitmapButton, getBitmapFocus, 0}},
+ {1481, {wxBitmapButton, getBitmapLabel, 0}},
+ {1483, {wxBitmapButton, getBitmapSelected, 0}},
+ {1485, {wxBitmapButton, setBitmapDisabled, 1}},
+ {1486, {wxBitmapButton, setBitmapFocus, 1}},
+ {1487, {wxBitmapButton, setBitmapLabel, 1}},
+ {1488, {wxBitmapButton, setBitmapSelected, 1}},
+ {1489, {wxBitmapButton, 'Destroy', undefined}},
+ {1490, {wxToggleButton, new_0, 0}},
+ {1491, {wxToggleButton, new_4, 4}},
+ {1492, {wxToggleButton, create, 4}},
+ {1493, {wxToggleButton, getValue, 0}},
+ {1494, {wxToggleButton, setValue, 1}},
+ {1495, {wxToggleButton, 'Destroy', undefined}},
+ {1496, {wxCalendarCtrl, new_0, 0}},
+ {1497, {wxCalendarCtrl, new_3, 3}},
+ {1498, {wxCalendarCtrl, create, 3}},
+ {1499, {wxCalendarCtrl, destruct, 0}},
+ {1500, {wxCalendarCtrl, setDate, 1}},
+ {1501, {wxCalendarCtrl, getDate, 0}},
+ {1502, {wxCalendarCtrl, enableYearChange, 1}},
+ {1503, {wxCalendarCtrl, enableMonthChange, 1}},
+ {1504, {wxCalendarCtrl, enableHolidayDisplay, 1}},
+ {1505, {wxCalendarCtrl, setHeaderColours, 2}},
+ {1506, {wxCalendarCtrl, getHeaderColourFg, 0}},
+ {1507, {wxCalendarCtrl, getHeaderColourBg, 0}},
+ {1508, {wxCalendarCtrl, setHighlightColours, 2}},
+ {1509, {wxCalendarCtrl, getHighlightColourFg, 0}},
+ {1510, {wxCalendarCtrl, getHighlightColourBg, 0}},
+ {1511, {wxCalendarCtrl, setHolidayColours, 2}},
+ {1512, {wxCalendarCtrl, getHolidayColourFg, 0}},
+ {1513, {wxCalendarCtrl, getHolidayColourBg, 0}},
+ {1514, {wxCalendarCtrl, getAttr, 1}},
+ {1515, {wxCalendarCtrl, setAttr, 2}},
+ {1516, {wxCalendarCtrl, setHoliday, 1}},
+ {1517, {wxCalendarCtrl, resetAttr, 1}},
+ {1518, {wxCalendarCtrl, hitTest, 2}},
+ {1519, {wxCalendarDateAttr, new_0, 0}},
+ {1520, {wxCalendarDateAttr, new_2_1, 2}},
+ {1521, {wxCalendarDateAttr, new_2_0, 2}},
+ {1522, {wxCalendarDateAttr, setTextColour, 1}},
+ {1523, {wxCalendarDateAttr, setBackgroundColour, 1}},
+ {1524, {wxCalendarDateAttr, setBorderColour, 1}},
+ {1525, {wxCalendarDateAttr, setFont, 1}},
+ {1526, {wxCalendarDateAttr, setBorder, 1}},
+ {1527, {wxCalendarDateAttr, setHoliday, 1}},
+ {1528, {wxCalendarDateAttr, hasTextColour, 0}},
+ {1529, {wxCalendarDateAttr, hasBackgroundColour, 0}},
+ {1530, {wxCalendarDateAttr, hasBorderColour, 0}},
+ {1531, {wxCalendarDateAttr, hasFont, 0}},
+ {1532, {wxCalendarDateAttr, hasBorder, 0}},
+ {1533, {wxCalendarDateAttr, isHoliday, 0}},
+ {1534, {wxCalendarDateAttr, getTextColour, 0}},
+ {1535, {wxCalendarDateAttr, getBackgroundColour, 0}},
+ {1536, {wxCalendarDateAttr, getBorderColour, 0}},
+ {1537, {wxCalendarDateAttr, getFont, 0}},
+ {1538, {wxCalendarDateAttr, getBorder, 0}},
+ {1539, {wxCalendarDateAttr, 'Destroy', undefined}},
+ {1541, {wxCheckBox, new_4, 4}},
+ {1542, {wxCheckBox, new_0, 0}},
+ {1543, {wxCheckBox, create, 4}},
+ {1544, {wxCheckBox, getValue, 0}},
+ {1545, {wxCheckBox, get3StateValue, 0}},
+ {1546, {wxCheckBox, is3rdStateAllowedForUser, 0}},
+ {1547, {wxCheckBox, is3State, 0}},
+ {1548, {wxCheckBox, isChecked, 0}},
+ {1549, {wxCheckBox, setValue, 1}},
+ {1550, {wxCheckBox, set3StateValue, 1}},
+ {1551, {wxCheckBox, 'Destroy', undefined}},
+ {1552, {wxCheckListBox, new_0, 0}},
+ {1554, {wxCheckListBox, new_3, 3}},
+ {1555, {wxCheckListBox, check, 2}},
+ {1556, {wxCheckListBox, isChecked, 1}},
+ {1557, {wxCheckListBox, 'Destroy', undefined}},
+ {1560, {wxChoice, new_3, 3}},
+ {1561, {wxChoice, new_0, 0}},
+ {1563, {wxChoice, destruct, 0}},
+ {1565, {wxChoice, create, 6}},
+ {1566, {wxChoice, delete, 1}},
+ {1567, {wxChoice, getColumns, 0}},
+ {1568, {wxChoice, setColumns, 1}},
+ {1569, {wxComboBox, new_0, 0}},
+ {1571, {wxComboBox, new_3, 3}},
+ {1572, {wxComboBox, destruct, 0}},
+ {1574, {wxComboBox, create, 7}},
+ {1575, {wxComboBox, canCopy, 0}},
+ {1576, {wxComboBox, canCut, 0}},
+ {1577, {wxComboBox, canPaste, 0}},
+ {1578, {wxComboBox, canRedo, 0}},
+ {1579, {wxComboBox, canUndo, 0}},
+ {1580, {wxComboBox, copy, 0}},
+ {1581, {wxComboBox, cut, 0}},
+ {1582, {wxComboBox, getInsertionPoint, 0}},
+ {1583, {wxComboBox, getLastPosition, 0}},
+ {1584, {wxComboBox, getValue, 0}},
+ {1585, {wxComboBox, paste, 0}},
+ {1586, {wxComboBox, redo, 0}},
+ {1587, {wxComboBox, replace, 3}},
+ {1588, {wxComboBox, remove, 2}},
+ {1589, {wxComboBox, setInsertionPoint, 1}},
+ {1590, {wxComboBox, setInsertionPointEnd, 0}},
+ {1591, {wxComboBox, setSelection_1, 1}},
+ {1592, {wxComboBox, setSelection_2, 2}},
+ {1593, {wxComboBox, setValue, 1}},
+ {1594, {wxComboBox, undo, 0}},
+ {1595, {wxGauge, new_0, 0}},
+ {1596, {wxGauge, new_4, 4}},
+ {1597, {wxGauge, create, 4}},
+ {1598, {wxGauge, getBezelFace, 0}},
+ {1599, {wxGauge, getRange, 0}},
+ {1600, {wxGauge, getShadowWidth, 0}},
+ {1601, {wxGauge, getValue, 0}},
+ {1602, {wxGauge, isVertical, 0}},
+ {1603, {wxGauge, setBezelFace, 1}},
+ {1604, {wxGauge, setRange, 1}},
+ {1605, {wxGauge, setShadowWidth, 1}},
+ {1606, {wxGauge, setValue, 1}},
+ {1607, {wxGauge, pulse, 0}},
+ {1608, {wxGauge, 'Destroy', undefined}},
+ {1609, {wxGenericDirCtrl, new_0, 0}},
+ {1610, {wxGenericDirCtrl, new_2, 2}},
+ {1611, {wxGenericDirCtrl, destruct, 0}},
+ {1612, {wxGenericDirCtrl, create, 2}},
+ {1613, {wxGenericDirCtrl, init, 0}},
+ {1614, {wxGenericDirCtrl, collapseTree, 0}},
+ {1615, {wxGenericDirCtrl, expandPath, 1}},
+ {1616, {wxGenericDirCtrl, getDefaultPath, 0}},
+ {1617, {wxGenericDirCtrl, getPath, 0}},
+ {1618, {wxGenericDirCtrl, getFilePath, 0}},
+ {1619, {wxGenericDirCtrl, getFilter, 0}},
+ {1620, {wxGenericDirCtrl, getFilterIndex, 0}},
+ {1621, {wxGenericDirCtrl, getRootId, 0}},
+ {1622, {wxGenericDirCtrl, getTreeCtrl, 0}},
+ {1623, {wxGenericDirCtrl, reCreateTree, 0}},
+ {1624, {wxGenericDirCtrl, setDefaultPath, 1}},
+ {1625, {wxGenericDirCtrl, setFilter, 1}},
+ {1626, {wxGenericDirCtrl, setFilterIndex, 1}},
+ {1627, {wxGenericDirCtrl, setPath, 1}},
+ {1629, {wxStaticBox, new_4, 4}},
+ {1630, {wxStaticBox, new_0, 0}},
+ {1631, {wxStaticBox, create, 4}},
+ {1632, {wxStaticBox, 'Destroy', undefined}},
+ {1634, {wxStaticLine, new_2, 2}},
+ {1635, {wxStaticLine, new_0, 0}},
+ {1636, {wxStaticLine, create, 2}},
+ {1637, {wxStaticLine, isVertical, 0}},
+ {1638, {wxStaticLine, getDefaultSize, 0}},
+ {1639, {wxStaticLine, 'Destroy', undefined}},
+ {1642, {wxListBox, new_3, 3}},
+ {1643, {wxListBox, new_0, 0}},
+ {1645, {wxListBox, destruct, 0}},
+ {1647, {wxListBox, create, 6}},
+ {1648, {wxListBox, deselect, 1}},
+ {1649, {wxListBox, getSelections, 1}},
+ {1650, {wxListBox, insertItems, 2}},
+ {1651, {wxListBox, isSelected, 1}},
+ {1653, {wxListBox, set, 2}},
+ {1654, {wxListBox, hitTest, 1}},
+ {1655, {wxListBox, setFirstItem_1_0, 1}},
+ {1656, {wxListBox, setFirstItem_1_1, 1}},
+ {1657, {wxListCtrl, new_0, 0}},
+ {1658, {wxListCtrl, new_2, 2}},
+ {1659, {wxListCtrl, arrange, 1}},
+ {1660, {wxListCtrl, assignImageList, 2}},
+ {1661, {wxListCtrl, clearAll, 0}},
+ {1662, {wxListCtrl, create, 2}},
+ {1663, {wxListCtrl, deleteAllItems, 0}},
+ {1664, {wxListCtrl, deleteColumn, 1}},
+ {1665, {wxListCtrl, deleteItem, 1}},
+ {1666, {wxListCtrl, editLabel, 1}},
+ {1667, {wxListCtrl, ensureVisible, 1}},
+ {1668, {wxListCtrl, findItem_3_0, 3}},
+ {1669, {wxListCtrl, findItem_3_1, 3}},
+ {1670, {wxListCtrl, getColumn, 2}},
+ {1671, {wxListCtrl, getColumnCount, 0}},
+ {1672, {wxListCtrl, getColumnWidth, 1}},
+ {1673, {wxListCtrl, getCountPerPage, 0}},
+ {1674, {wxListCtrl, getEditControl, 0}},
+ {1675, {wxListCtrl, getImageList, 1}},
+ {1676, {wxListCtrl, getItem, 1}},
+ {1677, {wxListCtrl, getItemBackgroundColour, 1}},
+ {1678, {wxListCtrl, getItemCount, 0}},
+ {1679, {wxListCtrl, getItemData, 1}},
+ {1680, {wxListCtrl, getItemFont, 1}},
+ {1681, {wxListCtrl, getItemPosition, 2}},
+ {1682, {wxListCtrl, getItemRect, 3}},
+ {1683, {wxListCtrl, getItemSpacing, 0}},
+ {1684, {wxListCtrl, getItemState, 2}},
+ {1685, {wxListCtrl, getItemText, 1}},
+ {1686, {wxListCtrl, getItemTextColour, 1}},
+ {1687, {wxListCtrl, getNextItem, 2}},
+ {1688, {wxListCtrl, getSelectedItemCount, 0}},
+ {1689, {wxListCtrl, getTextColour, 0}},
+ {1690, {wxListCtrl, getTopItem, 0}},
+ {1691, {wxListCtrl, getViewRect, 0}},
+ {1692, {wxListCtrl, hitTest, 2}},
+ {1693, {wxListCtrl, insertColumn_2, 2}},
+ {1694, {wxListCtrl, insertColumn_3, 3}},
+ {1695, {wxListCtrl, insertItem_1, 1}},
+ {1696, {wxListCtrl, insertItem_2_1, 2}},
+ {1697, {wxListCtrl, insertItem_2_0, 2}},
+ {1698, {wxListCtrl, insertItem_3, 3}},
+ {1699, {wxListCtrl, refreshItem, 1}},
+ {1700, {wxListCtrl, refreshItems, 2}},
+ {1701, {wxListCtrl, scrollList, 2}},
+ {1702, {wxListCtrl, setBackgroundColour, 1}},
+ {1703, {wxListCtrl, setColumn, 2}},
+ {1704, {wxListCtrl, setColumnWidth, 2}},
+ {1705, {wxListCtrl, setImageList, 2}},
+ {1706, {wxListCtrl, setItem_1, 1}},
+ {1707, {wxListCtrl, setItem_4, 4}},
+ {1708, {wxListCtrl, setItemBackgroundColour, 2}},
+ {1709, {wxListCtrl, setItemCount, 1}},
+ {1710, {wxListCtrl, setItemData, 2}},
+ {1711, {wxListCtrl, setItemFont, 2}},
+ {1712, {wxListCtrl, setItemImage, 3}},
+ {1713, {wxListCtrl, setItemColumnImage, 3}},
+ {1714, {wxListCtrl, setItemPosition, 2}},
+ {1715, {wxListCtrl, setItemState, 3}},
+ {1716, {wxListCtrl, setItemText, 2}},
+ {1717, {wxListCtrl, setItemTextColour, 2}},
+ {1718, {wxListCtrl, setSingleStyle, 2}},
+ {1719, {wxListCtrl, setTextColour, 1}},
+ {1720, {wxListCtrl, setWindowStyleFlag, 1}},
+ {1721, {wxListCtrl, sortItems, 2}},
+ {1722, {wxListCtrl, 'Destroy', undefined}},
+ {1723, {wxListView, clearColumnImage, 1}},
+ {1724, {wxListView, focus, 1}},
+ {1725, {wxListView, getFirstSelected, 0}},
+ {1726, {wxListView, getFocusedItem, 0}},
+ {1727, {wxListView, getNextSelected, 1}},
+ {1728, {wxListView, isSelected, 1}},
+ {1729, {wxListView, select, 2}},
+ {1730, {wxListView, setColumnImage, 2}},
+ {1731, {wxListItem, new_0, 0}},
+ {1732, {wxListItem, new_1, 1}},
+ {1733, {wxListItem, destruct, 0}},
+ {1734, {wxListItem, clear, 0}},
+ {1735, {wxListItem, getAlign, 0}},
+ {1736, {wxListItem, getBackgroundColour, 0}},
+ {1737, {wxListItem, getColumn, 0}},
+ {1738, {wxListItem, getFont, 0}},
+ {1739, {wxListItem, getId, 0}},
+ {1740, {wxListItem, getImage, 0}},
+ {1741, {wxListItem, getMask, 0}},
+ {1742, {wxListItem, getState, 0}},
+ {1743, {wxListItem, getText, 0}},
+ {1744, {wxListItem, getTextColour, 0}},
+ {1745, {wxListItem, getWidth, 0}},
+ {1746, {wxListItem, setAlign, 1}},
+ {1747, {wxListItem, setBackgroundColour, 1}},
+ {1748, {wxListItem, setColumn, 1}},
+ {1749, {wxListItem, setFont, 1}},
+ {1750, {wxListItem, setId, 1}},
+ {1751, {wxListItem, setImage, 1}},
+ {1752, {wxListItem, setMask, 1}},
+ {1753, {wxListItem, setState, 1}},
+ {1754, {wxListItem, setStateMask, 1}},
+ {1755, {wxListItem, setText, 1}},
+ {1756, {wxListItem, setTextColour, 1}},
+ {1757, {wxListItem, setWidth, 1}},
+ {1758, {wxListItemAttr, new_0, 0}},
+ {1759, {wxListItemAttr, new_3, 3}},
+ {1760, {wxListItemAttr, getBackgroundColour, 0}},
+ {1761, {wxListItemAttr, getFont, 0}},
+ {1762, {wxListItemAttr, getTextColour, 0}},
+ {1763, {wxListItemAttr, hasBackgroundColour, 0}},
+ {1764, {wxListItemAttr, hasFont, 0}},
+ {1765, {wxListItemAttr, hasTextColour, 0}},
+ {1766, {wxListItemAttr, setBackgroundColour, 1}},
+ {1767, {wxListItemAttr, setFont, 1}},
+ {1768, {wxListItemAttr, setTextColour, 1}},
+ {1769, {wxListItemAttr, 'Destroy', undefined}},
+ {1770, {wxImageList, new_0, 0}},
+ {1771, {wxImageList, new_3, 3}},
+ {1772, {wxImageList, add_1, 1}},
+ {1773, {wxImageList, add_2_0, 2}},
+ {1774, {wxImageList, add_2_1, 2}},
+ {1775, {wxImageList, create, 3}},
+ {1777, {wxImageList, draw, 5}},
+ {1778, {wxImageList, getBitmap, 1}},
+ {1779, {wxImageList, getIcon, 1}},
+ {1780, {wxImageList, getImageCount, 0}},
+ {1781, {wxImageList, getSize, 3}},
+ {1782, {wxImageList, remove, 1}},
+ {1783, {wxImageList, removeAll, 0}},
+ {1784, {wxImageList, replace_2, 2}},
+ {1785, {wxImageList, replace_3, 3}},
+ {1786, {wxImageList, 'Destroy', undefined}},
+ {1787, {wxTextAttr, new_0, 0}},
+ {1788, {wxTextAttr, new_2, 2}},
+ {1789, {wxTextAttr, getAlignment, 0}},
+ {1790, {wxTextAttr, getBackgroundColour, 0}},
+ {1791, {wxTextAttr, getFont, 0}},
+ {1792, {wxTextAttr, getLeftIndent, 0}},
+ {1793, {wxTextAttr, getLeftSubIndent, 0}},
+ {1794, {wxTextAttr, getRightIndent, 0}},
+ {1795, {wxTextAttr, getTabs, 0}},
+ {1796, {wxTextAttr, getTextColour, 0}},
+ {1797, {wxTextAttr, hasBackgroundColour, 0}},
+ {1798, {wxTextAttr, hasFont, 0}},
+ {1799, {wxTextAttr, hasTextColour, 0}},
+ {1800, {wxTextAttr, getFlags, 0}},
+ {1801, {wxTextAttr, isDefault, 0}},
+ {1802, {wxTextAttr, setAlignment, 1}},
+ {1803, {wxTextAttr, setBackgroundColour, 1}},
+ {1804, {wxTextAttr, setFlags, 1}},
+ {1805, {wxTextAttr, setFont, 2}},
+ {1806, {wxTextAttr, setLeftIndent, 2}},
+ {1807, {wxTextAttr, setRightIndent, 1}},
+ {1808, {wxTextAttr, setTabs, 1}},
+ {1809, {wxTextAttr, setTextColour, 1}},
+ {1810, {wxTextAttr, 'Destroy', undefined}},
+ {1812, {wxTextCtrl, new_3, 3}},
+ {1813, {wxTextCtrl, new_0, 0}},
+ {1815, {wxTextCtrl, destruct, 0}},
+ {1816, {wxTextCtrl, appendText, 1}},
+ {1817, {wxTextCtrl, canCopy, 0}},
+ {1818, {wxTextCtrl, canCut, 0}},
+ {1819, {wxTextCtrl, canPaste, 0}},
+ {1820, {wxTextCtrl, canRedo, 0}},
+ {1821, {wxTextCtrl, canUndo, 0}},
+ {1822, {wxTextCtrl, clear, 0}},
+ {1823, {wxTextCtrl, copy, 0}},
+ {1824, {wxTextCtrl, create, 3}},
+ {1825, {wxTextCtrl, cut, 0}},
+ {1826, {wxTextCtrl, discardEdits, 0}},
+ {1827, {wxTextCtrl, emulateKeyPress, 1}},
+ {1828, {wxTextCtrl, getDefaultStyle, 0}},
+ {1829, {wxTextCtrl, getInsertionPoint, 0}},
+ {1830, {wxTextCtrl, getLastPosition, 0}},
+ {1831, {wxTextCtrl, getLineLength, 1}},
+ {1832, {wxTextCtrl, getLineText, 1}},
+ {1833, {wxTextCtrl, getNumberOfLines, 0}},
+ {1834, {wxTextCtrl, getRange, 2}},
+ {1835, {wxTextCtrl, getSelection, 2}},
+ {1836, {wxTextCtrl, getStringSelection, 0}},
+ {1837, {wxTextCtrl, getStyle, 2}},
+ {1838, {wxTextCtrl, getValue, 0}},
+ {1839, {wxTextCtrl, isEditable, 0}},
+ {1840, {wxTextCtrl, isModified, 0}},
+ {1841, {wxTextCtrl, isMultiLine, 0}},
+ {1842, {wxTextCtrl, isSingleLine, 0}},
+ {1843, {wxTextCtrl, loadFile, 2}},
+ {1844, {wxTextCtrl, markDirty, 0}},
+ {1845, {wxTextCtrl, paste, 0}},
+ {1846, {wxTextCtrl, positionToXY, 3}},
+ {1847, {wxTextCtrl, redo, 0}},
+ {1848, {wxTextCtrl, remove, 2}},
+ {1849, {wxTextCtrl, replace, 3}},
+ {1850, {wxTextCtrl, saveFile, 1}},
+ {1851, {wxTextCtrl, setDefaultStyle, 1}},
+ {1852, {wxTextCtrl, setEditable, 1}},
+ {1853, {wxTextCtrl, setInsertionPoint, 1}},
+ {1854, {wxTextCtrl, setInsertionPointEnd, 0}},
+ {1856, {wxTextCtrl, setMaxLength, 1}},
+ {1857, {wxTextCtrl, setSelection, 2}},
+ {1858, {wxTextCtrl, setStyle, 3}},
+ {1859, {wxTextCtrl, setValue, 1}},
+ {1860, {wxTextCtrl, showPosition, 1}},
+ {1861, {wxTextCtrl, undo, 0}},
+ {1862, {wxTextCtrl, writeText, 1}},
+ {1863, {wxTextCtrl, xYToPosition, 2}},
+ {1866, {wxNotebook, new_0, 0}},
+ {1867, {wxNotebook, new_3, 3}},
+ {1868, {wxNotebook, destruct, 0}},
+ {1869, {wxNotebook, addPage, 3}},
+ {1870, {wxNotebook, advanceSelection, 1}},
+ {1871, {wxNotebook, assignImageList, 1}},
+ {1872, {wxNotebook, create, 3}},
+ {1873, {wxNotebook, deleteAllPages, 0}},
+ {1874, {wxNotebook, deletePage, 1}},
+ {1875, {wxNotebook, removePage, 1}},
+ {1876, {wxNotebook, getCurrentPage, 0}},
+ {1877, {wxNotebook, getImageList, 0}},
+ {1879, {wxNotebook, getPage, 1}},
+ {1880, {wxNotebook, getPageCount, 0}},
+ {1881, {wxNotebook, getPageImage, 1}},
+ {1882, {wxNotebook, getPageText, 1}},
+ {1883, {wxNotebook, getRowCount, 0}},
+ {1884, {wxNotebook, getSelection, 0}},
+ {1885, {wxNotebook, getThemeBackgroundColour, 0}},
+ {1887, {wxNotebook, hitTest, 2}},
+ {1889, {wxNotebook, insertPage, 4}},
+ {1890, {wxNotebook, setImageList, 1}},
+ {1891, {wxNotebook, setPadding, 1}},
+ {1892, {wxNotebook, setPageSize, 1}},
+ {1893, {wxNotebook, setPageImage, 2}},
+ {1894, {wxNotebook, setPageText, 2}},
+ {1895, {wxNotebook, setSelection, 1}},
+ {1896, {wxNotebook, changeSelection, 1}},
+ {1897, {wxChoicebook, new_0, 0}},
+ {1898, {wxChoicebook, new_3, 3}},
+ {1899, {wxChoicebook, addPage, 3}},
+ {1900, {wxChoicebook, advanceSelection, 1}},
+ {1901, {wxChoicebook, assignImageList, 1}},
+ {1902, {wxChoicebook, create, 3}},
+ {1903, {wxChoicebook, deleteAllPages, 0}},
+ {1904, {wxChoicebook, deletePage, 1}},
+ {1905, {wxChoicebook, removePage, 1}},
+ {1906, {wxChoicebook, getCurrentPage, 0}},
+ {1907, {wxChoicebook, getImageList, 0}},
+ {1909, {wxChoicebook, getPage, 1}},
+ {1910, {wxChoicebook, getPageCount, 0}},
+ {1911, {wxChoicebook, getPageImage, 1}},
+ {1912, {wxChoicebook, getPageText, 1}},
+ {1913, {wxChoicebook, getSelection, 0}},
+ {1914, {wxChoicebook, hitTest, 2}},
+ {1915, {wxChoicebook, insertPage, 4}},
+ {1916, {wxChoicebook, setImageList, 1}},
+ {1917, {wxChoicebook, setPageSize, 1}},
+ {1918, {wxChoicebook, setPageImage, 2}},
+ {1919, {wxChoicebook, setPageText, 2}},
+ {1920, {wxChoicebook, setSelection, 1}},
+ {1921, {wxChoicebook, changeSelection, 1}},
+ {1922, {wxChoicebook, 'Destroy', undefined}},
+ {1923, {wxToolbook, new_0, 0}},
+ {1924, {wxToolbook, new_3, 3}},
+ {1925, {wxToolbook, addPage, 3}},
+ {1926, {wxToolbook, advanceSelection, 1}},
+ {1927, {wxToolbook, assignImageList, 1}},
+ {1928, {wxToolbook, create, 3}},
+ {1929, {wxToolbook, deleteAllPages, 0}},
+ {1930, {wxToolbook, deletePage, 1}},
+ {1931, {wxToolbook, removePage, 1}},
+ {1932, {wxToolbook, getCurrentPage, 0}},
+ {1933, {wxToolbook, getImageList, 0}},
+ {1935, {wxToolbook, getPage, 1}},
+ {1936, {wxToolbook, getPageCount, 0}},
+ {1937, {wxToolbook, getPageImage, 1}},
+ {1938, {wxToolbook, getPageText, 1}},
+ {1939, {wxToolbook, getSelection, 0}},
+ {1941, {wxToolbook, hitTest, 2}},
+ {1942, {wxToolbook, insertPage, 4}},
+ {1943, {wxToolbook, setImageList, 1}},
+ {1944, {wxToolbook, setPageSize, 1}},
+ {1945, {wxToolbook, setPageImage, 2}},
+ {1946, {wxToolbook, setPageText, 2}},
+ {1947, {wxToolbook, setSelection, 1}},
+ {1948, {wxToolbook, changeSelection, 1}},
+ {1949, {wxToolbook, 'Destroy', undefined}},
+ {1950, {wxListbook, new_0, 0}},
+ {1951, {wxListbook, new_3, 3}},
+ {1952, {wxListbook, addPage, 3}},
+ {1953, {wxListbook, advanceSelection, 1}},
+ {1954, {wxListbook, assignImageList, 1}},
+ {1955, {wxListbook, create, 3}},
+ {1956, {wxListbook, deleteAllPages, 0}},
+ {1957, {wxListbook, deletePage, 1}},
+ {1958, {wxListbook, removePage, 1}},
+ {1959, {wxListbook, getCurrentPage, 0}},
+ {1960, {wxListbook, getImageList, 0}},
+ {1962, {wxListbook, getPage, 1}},
+ {1963, {wxListbook, getPageCount, 0}},
+ {1964, {wxListbook, getPageImage, 1}},
+ {1965, {wxListbook, getPageText, 1}},
+ {1966, {wxListbook, getSelection, 0}},
+ {1968, {wxListbook, hitTest, 2}},
+ {1969, {wxListbook, insertPage, 4}},
+ {1970, {wxListbook, setImageList, 1}},
+ {1971, {wxListbook, setPageSize, 1}},
+ {1972, {wxListbook, setPageImage, 2}},
+ {1973, {wxListbook, setPageText, 2}},
+ {1974, {wxListbook, setSelection, 1}},
+ {1975, {wxListbook, changeSelection, 1}},
+ {1976, {wxListbook, 'Destroy', undefined}},
+ {1977, {wxTreebook, new_0, 0}},
+ {1978, {wxTreebook, new_3, 3}},
+ {1979, {wxTreebook, addPage, 3}},
+ {1980, {wxTreebook, advanceSelection, 1}},
+ {1981, {wxTreebook, assignImageList, 1}},
+ {1982, {wxTreebook, create, 3}},
+ {1983, {wxTreebook, deleteAllPages, 0}},
+ {1984, {wxTreebook, deletePage, 1}},
+ {1985, {wxTreebook, removePage, 1}},
+ {1986, {wxTreebook, getCurrentPage, 0}},
+ {1987, {wxTreebook, getImageList, 0}},
+ {1989, {wxTreebook, getPage, 1}},
+ {1990, {wxTreebook, getPageCount, 0}},
+ {1991, {wxTreebook, getPageImage, 1}},
+ {1992, {wxTreebook, getPageText, 1}},
+ {1993, {wxTreebook, getSelection, 0}},
+ {1994, {wxTreebook, expandNode, 2}},
+ {1995, {wxTreebook, isNodeExpanded, 1}},
+ {1997, {wxTreebook, hitTest, 2}},
+ {1998, {wxTreebook, insertPage, 4}},
+ {1999, {wxTreebook, insertSubPage, 4}},
+ {2000, {wxTreebook, setImageList, 1}},
+ {2001, {wxTreebook, setPageSize, 1}},
+ {2002, {wxTreebook, setPageImage, 2}},
+ {2003, {wxTreebook, setPageText, 2}},
+ {2004, {wxTreebook, setSelection, 1}},
+ {2005, {wxTreebook, changeSelection, 1}},
+ {2006, {wxTreebook, 'Destroy', undefined}},
+ {2009, {wxTreeCtrl, new_2, 2}},
+ {2010, {wxTreeCtrl, new_0, 0}},
+ {2012, {wxTreeCtrl, destruct, 0}},
+ {2013, {wxTreeCtrl, addRoot, 2}},
+ {2014, {wxTreeCtrl, appendItem, 3}},
+ {2015, {wxTreeCtrl, assignImageList, 1}},
+ {2016, {wxTreeCtrl, assignStateImageList, 1}},
+ {2017, {wxTreeCtrl, collapse, 1}},
+ {2018, {wxTreeCtrl, collapseAndReset, 1}},
+ {2019, {wxTreeCtrl, create, 2}},
+ {2020, {wxTreeCtrl, delete, 1}},
+ {2021, {wxTreeCtrl, deleteAllItems, 0}},
+ {2022, {wxTreeCtrl, deleteChildren, 1}},
+ {2023, {wxTreeCtrl, editLabel, 1}},
+ {2024, {wxTreeCtrl, ensureVisible, 1}},
+ {2025, {wxTreeCtrl, expand, 1}},
+ {2026, {wxTreeCtrl, getBoundingRect, 3}},
+ {2028, {wxTreeCtrl, getChildrenCount, 2}},
+ {2029, {wxTreeCtrl, getCount, 0}},
+ {2030, {wxTreeCtrl, getEditControl, 0}},
+ {2031, {wxTreeCtrl, getFirstChild, 2}},
+ {2032, {wxTreeCtrl, getNextChild, 2}},
+ {2033, {wxTreeCtrl, getFirstVisibleItem, 0}},
+ {2034, {wxTreeCtrl, getImageList, 0}},
+ {2035, {wxTreeCtrl, getIndent, 0}},
+ {2036, {wxTreeCtrl, getItemBackgroundColour, 1}},
+ {2037, {wxTreeCtrl, getItemData, 1}},
+ {2038, {wxTreeCtrl, getItemFont, 1}},
+ {2039, {wxTreeCtrl, getItemImage_1, 1}},
+ {2040, {wxTreeCtrl, getItemImage_2, 2}},
+ {2041, {wxTreeCtrl, getItemText, 1}},
+ {2042, {wxTreeCtrl, getItemTextColour, 1}},
+ {2043, {wxTreeCtrl, getLastChild, 1}},
+ {2044, {wxTreeCtrl, getNextSibling, 1}},
+ {2045, {wxTreeCtrl, getNextVisible, 1}},
+ {2046, {wxTreeCtrl, getItemParent, 1}},
+ {2047, {wxTreeCtrl, getPrevSibling, 1}},
+ {2048, {wxTreeCtrl, getPrevVisible, 1}},
+ {2049, {wxTreeCtrl, getRootItem, 0}},
+ {2050, {wxTreeCtrl, getSelection, 0}},
+ {2051, {wxTreeCtrl, getSelections, 1}},
+ {2052, {wxTreeCtrl, getStateImageList, 0}},
+ {2053, {wxTreeCtrl, hitTest, 1}},
+ {2055, {wxTreeCtrl, insertItem, 4}},
+ {2056, {wxTreeCtrl, isBold, 1}},
+ {2057, {wxTreeCtrl, isExpanded, 1}},
+ {2058, {wxTreeCtrl, isSelected, 1}},
+ {2059, {wxTreeCtrl, isVisible, 1}},
+ {2060, {wxTreeCtrl, itemHasChildren, 1}},
+ {2061, {wxTreeCtrl, prependItem, 3}},
+ {2062, {wxTreeCtrl, scrollTo, 1}},
+ {2063, {wxTreeCtrl, selectItem_1, 1}},
+ {2064, {wxTreeCtrl, selectItem_2, 2}},
+ {2065, {wxTreeCtrl, setIndent, 1}},
+ {2066, {wxTreeCtrl, setImageList, 1}},
+ {2067, {wxTreeCtrl, setItemBackgroundColour, 2}},
+ {2068, {wxTreeCtrl, setItemBold, 2}},
+ {2069, {wxTreeCtrl, setItemData, 2}},
+ {2070, {wxTreeCtrl, setItemDropHighlight, 2}},
+ {2071, {wxTreeCtrl, setItemFont, 2}},
+ {2072, {wxTreeCtrl, setItemHasChildren, 2}},
+ {2073, {wxTreeCtrl, setItemImage_2, 2}},
+ {2074, {wxTreeCtrl, setItemImage_3, 3}},
+ {2075, {wxTreeCtrl, setItemText, 2}},
+ {2076, {wxTreeCtrl, setItemTextColour, 2}},
+ {2077, {wxTreeCtrl, setStateImageList, 1}},
+ {2078, {wxTreeCtrl, setWindowStyle, 1}},
+ {2079, {wxTreeCtrl, sortChildren, 1}},
+ {2080, {wxTreeCtrl, toggle, 1}},
+ {2081, {wxTreeCtrl, toggleItemSelection, 1}},
+ {2082, {wxTreeCtrl, unselect, 0}},
+ {2083, {wxTreeCtrl, unselectAll, 0}},
+ {2084, {wxTreeCtrl, unselectItem, 1}},
+ {2085, {wxScrollBar, new_0, 0}},
+ {2086, {wxScrollBar, new_3, 3}},
+ {2087, {wxScrollBar, destruct, 0}},
+ {2088, {wxScrollBar, create, 3}},
+ {2089, {wxScrollBar, getRange, 0}},
+ {2090, {wxScrollBar, getPageSize, 0}},
+ {2091, {wxScrollBar, getThumbPosition, 0}},
+ {2092, {wxScrollBar, getThumbSize, 0}},
+ {2093, {wxScrollBar, setThumbPosition, 1}},
+ {2094, {wxScrollBar, setScrollbar, 5}},
+ {2096, {wxSpinButton, new_2, 2}},
+ {2097, {wxSpinButton, new_0, 0}},
+ {2098, {wxSpinButton, create, 2}},
+ {2099, {wxSpinButton, getMax, 0}},
+ {2100, {wxSpinButton, getMin, 0}},
+ {2101, {wxSpinButton, getValue, 0}},
+ {2102, {wxSpinButton, setRange, 2}},
+ {2103, {wxSpinButton, setValue, 1}},
+ {2104, {wxSpinButton, 'Destroy', undefined}},
+ {2105, {wxSpinCtrl, new_0, 0}},
+ {2106, {wxSpinCtrl, new_2, 2}},
+ {2108, {wxSpinCtrl, create, 2}},
+ {2111, {wxSpinCtrl, setValue_1_1, 1}},
+ {2112, {wxSpinCtrl, setValue_1_0, 1}},
+ {2114, {wxSpinCtrl, getValue, 0}},
+ {2116, {wxSpinCtrl, setRange, 2}},
+ {2117, {wxSpinCtrl, setSelection, 2}},
+ {2119, {wxSpinCtrl, getMin, 0}},
+ {2121, {wxSpinCtrl, getMax, 0}},
+ {2122, {wxSpinCtrl, 'Destroy', undefined}},
+ {2123, {wxStaticText, new_0, 0}},
+ {2124, {wxStaticText, new_4, 4}},
+ {2125, {wxStaticText, create, 4}},
+ {2126, {wxStaticText, getLabel, 0}},
+ {2127, {wxStaticText, setLabel, 1}},
+ {2128, {wxStaticText, wrap, 1}},
+ {2129, {wxStaticText, 'Destroy', undefined}},
+ {2130, {wxStaticBitmap, new_0, 0}},
+ {2131, {wxStaticBitmap, new_4, 4}},
+ {2132, {wxStaticBitmap, create, 4}},
+ {2133, {wxStaticBitmap, getBitmap, 0}},
+ {2134, {wxStaticBitmap, setBitmap, 1}},
+ {2135, {wxStaticBitmap, 'Destroy', undefined}},
+ {2136, {wxRadioBox, new, 7}},
+ {2138, {wxRadioBox, destruct, 0}},
+ {2139, {wxRadioBox, create, 7}},
+ {2140, {wxRadioBox, enable_2, 2}},
+ {2141, {wxRadioBox, enable_1, 1}},
+ {2142, {wxRadioBox, getSelection, 0}},
+ {2143, {wxRadioBox, getString, 1}},
+ {2144, {wxRadioBox, setSelection, 1}},
+ {2145, {wxRadioBox, show_2, 2}},
+ {2146, {wxRadioBox, show_1, 1}},
+ {2147, {wxRadioBox, getColumnCount, 0}},
+ {2148, {wxRadioBox, getItemHelpText, 1}},
+ {2149, {wxRadioBox, getItemToolTip, 1}},
+ {2151, {wxRadioBox, getItemFromPoint, 1}},
+ {2152, {wxRadioBox, getRowCount, 0}},
+ {2153, {wxRadioBox, isItemEnabled, 1}},
+ {2154, {wxRadioBox, isItemShown, 1}},
+ {2155, {wxRadioBox, setItemHelpText, 2}},
+ {2156, {wxRadioBox, setItemToolTip, 2}},
+ {2157, {wxRadioButton, new_0, 0}},
+ {2158, {wxRadioButton, new_4, 4}},
+ {2159, {wxRadioButton, create, 4}},
+ {2160, {wxRadioButton, getValue, 0}},
+ {2161, {wxRadioButton, setValue, 1}},
+ {2162, {wxRadioButton, 'Destroy', undefined}},
+ {2164, {wxSlider, new_6, 6}},
+ {2165, {wxSlider, new_0, 0}},
+ {2166, {wxSlider, create, 6}},
+ {2167, {wxSlider, getLineSize, 0}},
+ {2168, {wxSlider, getMax, 0}},
+ {2169, {wxSlider, getMin, 0}},
+ {2170, {wxSlider, getPageSize, 0}},
+ {2171, {wxSlider, getThumbLength, 0}},
+ {2172, {wxSlider, getValue, 0}},
+ {2173, {wxSlider, setLineSize, 1}},
+ {2174, {wxSlider, setPageSize, 1}},
+ {2175, {wxSlider, setRange, 2}},
+ {2176, {wxSlider, setThumbLength, 1}},
+ {2177, {wxSlider, setValue, 1}},
+ {2178, {wxSlider, 'Destroy', undefined}},
+ {2180, {wxDialog, new_4, 4}},
+ {2181, {wxDialog, new_0, 0}},
+ {2183, {wxDialog, destruct, 0}},
+ {2184, {wxDialog, create, 4}},
+ {2185, {wxDialog, createButtonSizer, 1}},
+ {2186, {wxDialog, createStdDialogButtonSizer, 1}},
+ {2187, {wxDialog, endModal, 1}},
+ {2188, {wxDialog, getAffirmativeId, 0}},
+ {2189, {wxDialog, getReturnCode, 0}},
+ {2190, {wxDialog, isModal, 0}},
+ {2191, {wxDialog, setAffirmativeId, 1}},
+ {2192, {wxDialog, setReturnCode, 1}},
+ {2193, {wxDialog, show, 1}},
+ {2194, {wxDialog, showModal, 0}},
+ {2195, {wxColourDialog, new_0, 0}},
+ {2196, {wxColourDialog, new_2, 2}},
+ {2197, {wxColourDialog, destruct, 0}},
+ {2198, {wxColourDialog, create, 2}},
+ {2199, {wxColourDialog, getColourData, 0}},
+ {2200, {wxColourData, new_0, 0}},
+ {2201, {wxColourData, new_1, 1}},
+ {2202, {wxColourData, destruct, 0}},
+ {2203, {wxColourData, getChooseFull, 0}},
+ {2204, {wxColourData, getColour, 0}},
+ {2206, {wxColourData, getCustomColour, 1}},
+ {2207, {wxColourData, setChooseFull, 1}},
+ {2208, {wxColourData, setColour, 1}},
+ {2209, {wxColourData, setCustomColour, 2}},
+ {2210, {wxPalette, new_0, 0}},
+ {2211, {wxPalette, new_4, 4}},
+ {2213, {wxPalette, destruct, 0}},
+ {2214, {wxPalette, create, 4}},
+ {2215, {wxPalette, getColoursCount, 0}},
+ {2216, {wxPalette, getPixel, 3}},
+ {2217, {wxPalette, getRGB, 4}},
+ {2218, {wxPalette, isOk, 0}},
+ {2222, {wxDirDialog, new, 2}},
+ {2223, {wxDirDialog, destruct, 0}},
+ {2224, {wxDirDialog, getPath, 0}},
+ {2225, {wxDirDialog, getMessage, 0}},
+ {2226, {wxDirDialog, setMessage, 1}},
+ {2227, {wxDirDialog, setPath, 1}},
+ {2231, {wxFileDialog, new, 2}},
+ {2232, {wxFileDialog, destruct, 0}},
+ {2233, {wxFileDialog, getDirectory, 0}},
+ {2234, {wxFileDialog, getFilename, 0}},
+ {2235, {wxFileDialog, getFilenames, 1}},
+ {2236, {wxFileDialog, getFilterIndex, 0}},
+ {2237, {wxFileDialog, getMessage, 0}},
+ {2238, {wxFileDialog, getPath, 0}},
+ {2239, {wxFileDialog, getPaths, 1}},
+ {2240, {wxFileDialog, getWildcard, 0}},
+ {2241, {wxFileDialog, setDirectory, 1}},
+ {2242, {wxFileDialog, setFilename, 1}},
+ {2243, {wxFileDialog, setFilterIndex, 1}},
+ {2244, {wxFileDialog, setMessage, 1}},
+ {2245, {wxFileDialog, setPath, 1}},
+ {2246, {wxFileDialog, setWildcard, 1}},
+ {2247, {wxPickerBase, setInternalMargin, 1}},
+ {2248, {wxPickerBase, getInternalMargin, 0}},
+ {2249, {wxPickerBase, setTextCtrlProportion, 1}},
+ {2250, {wxPickerBase, setPickerCtrlProportion, 1}},
+ {2251, {wxPickerBase, getTextCtrlProportion, 0}},
+ {2252, {wxPickerBase, getPickerCtrlProportion, 0}},
+ {2253, {wxPickerBase, hasTextCtrl, 0}},
+ {2254, {wxPickerBase, getTextCtrl, 0}},
+ {2255, {wxPickerBase, isTextCtrlGrowable, 0}},
+ {2256, {wxPickerBase, setPickerCtrlGrowable, 1}},
+ {2257, {wxPickerBase, setTextCtrlGrowable, 1}},
+ {2258, {wxPickerBase, isPickerCtrlGrowable, 0}},
+ {2259, {wxFilePickerCtrl, new_0, 0}},
+ {2260, {wxFilePickerCtrl, new_3, 3}},
+ {2261, {wxFilePickerCtrl, create, 3}},
+ {2262, {wxFilePickerCtrl, getPath, 0}},
+ {2263, {wxFilePickerCtrl, setPath, 1}},
+ {2264, {wxFilePickerCtrl, 'Destroy', undefined}},
+ {2265, {wxDirPickerCtrl, new_0, 0}},
+ {2266, {wxDirPickerCtrl, new_3, 3}},
+ {2267, {wxDirPickerCtrl, create, 3}},
+ {2268, {wxDirPickerCtrl, getPath, 0}},
+ {2269, {wxDirPickerCtrl, setPath, 1}},
+ {2270, {wxDirPickerCtrl, 'Destroy', undefined}},
+ {2271, {wxColourPickerCtrl, new_0, 0}},
+ {2272, {wxColourPickerCtrl, new_3, 3}},
+ {2273, {wxColourPickerCtrl, create, 3}},
+ {2274, {wxColourPickerCtrl, getColour, 0}},
+ {2275, {wxColourPickerCtrl, setColour_1_1, 1}},
+ {2276, {wxColourPickerCtrl, setColour_1_0, 1}},
+ {2277, {wxColourPickerCtrl, 'Destroy', undefined}},
+ {2278, {wxDatePickerCtrl, new_0, 0}},
+ {2279, {wxDatePickerCtrl, new_3, 3}},
+ {2280, {wxDatePickerCtrl, getRange, 2}},
+ {2281, {wxDatePickerCtrl, getValue, 0}},
+ {2282, {wxDatePickerCtrl, setRange, 2}},
+ {2283, {wxDatePickerCtrl, setValue, 1}},
+ {2284, {wxDatePickerCtrl, 'Destroy', undefined}},
+ {2285, {wxFontPickerCtrl, new_0, 0}},
+ {2286, {wxFontPickerCtrl, new_3, 3}},
+ {2287, {wxFontPickerCtrl, create, 3}},
+ {2288, {wxFontPickerCtrl, getSelectedFont, 0}},
+ {2289, {wxFontPickerCtrl, setSelectedFont, 1}},
+ {2290, {wxFontPickerCtrl, getMaxPointSize, 0}},
+ {2291, {wxFontPickerCtrl, setMaxPointSize, 1}},
+ {2292, {wxFontPickerCtrl, 'Destroy', undefined}},
+ {2295, {wxFindReplaceDialog, new_0, 0}},
+ {2296, {wxFindReplaceDialog, new_4, 4}},
+ {2297, {wxFindReplaceDialog, destruct, 0}},
+ {2298, {wxFindReplaceDialog, create, 4}},
+ {2299, {wxFindReplaceDialog, getData, 0}},
+ {2300, {wxFindReplaceData, new_0, 0}},
+ {2301, {wxFindReplaceData, new_1, 1}},
+ {2302, {wxFindReplaceData, getFindString, 0}},
+ {2303, {wxFindReplaceData, getReplaceString, 0}},
+ {2304, {wxFindReplaceData, getFlags, 0}},
+ {2305, {wxFindReplaceData, setFlags, 1}},
+ {2306, {wxFindReplaceData, setFindString, 1}},
+ {2307, {wxFindReplaceData, setReplaceString, 1}},
+ {2308, {wxFindReplaceData, 'Destroy', undefined}},
+ {2309, {wxMultiChoiceDialog, new_0, 0}},
+ {2311, {wxMultiChoiceDialog, new_5, 5}},
+ {2312, {wxMultiChoiceDialog, getSelections, 0}},
+ {2313, {wxMultiChoiceDialog, setSelections, 1}},
+ {2314, {wxMultiChoiceDialog, 'Destroy', undefined}},
+ {2315, {wxSingleChoiceDialog, new_0, 0}},
+ {2317, {wxSingleChoiceDialog, new_5, 5}},
+ {2318, {wxSingleChoiceDialog, getSelection, 0}},
+ {2319, {wxSingleChoiceDialog, getStringSelection, 0}},
+ {2320, {wxSingleChoiceDialog, setSelection, 1}},
+ {2321, {wxSingleChoiceDialog, 'Destroy', undefined}},
+ {2322, {wxTextEntryDialog, new, 3}},
+ {2323, {wxTextEntryDialog, getValue, 0}},
+ {2324, {wxTextEntryDialog, setValue, 1}},
+ {2325, {wxTextEntryDialog, 'Destroy', undefined}},
+ {2326, {wxPasswordEntryDialog, new, 3}},
+ {2327, {wxPasswordEntryDialog, 'Destroy', undefined}},
+ {2328, {wxFontData, new_0, 0}},
+ {2329, {wxFontData, new_1, 1}},
+ {2330, {wxFontData, destruct, 0}},
+ {2331, {wxFontData, enableEffects, 1}},
+ {2332, {wxFontData, getAllowSymbols, 0}},
+ {2333, {wxFontData, getColour, 0}},
+ {2334, {wxFontData, getChosenFont, 0}},
+ {2335, {wxFontData, getEnableEffects, 0}},
+ {2336, {wxFontData, getInitialFont, 0}},
+ {2337, {wxFontData, getShowHelp, 0}},
+ {2338, {wxFontData, setAllowSymbols, 1}},
+ {2339, {wxFontData, setChosenFont, 1}},
+ {2340, {wxFontData, setColour, 1}},
+ {2341, {wxFontData, setInitialFont, 1}},
+ {2342, {wxFontData, setRange, 2}},
+ {2343, {wxFontData, setShowHelp, 1}},
+ {2347, {wxFontDialog, new_0, 0}},
+ {2349, {wxFontDialog, new_2, 2}},
+ {2351, {wxFontDialog, create, 2}},
+ {2352, {wxFontDialog, getFontData, 0}},
+ {2354, {wxFontDialog, 'Destroy', undefined}},
+ {2355, {wxProgressDialog, new, 3}},
+ {2356, {wxProgressDialog, destruct, 0}},
+ {2357, {wxProgressDialog, resume, 0}},
+ {2358, {wxProgressDialog, update_2, 2}},
+ {2359, {wxProgressDialog, update_0, 0}},
+ {2360, {wxMessageDialog, new, 3}},
+ {2361, {wxMessageDialog, destruct, 0}},
+ {2362, {wxPageSetupDialog, new, 2}},
+ {2363, {wxPageSetupDialog, destruct, 0}},
+ {2364, {wxPageSetupDialog, getPageSetupData, 0}},
+ {2365, {wxPageSetupDialog, showModal, 0}},
+ {2366, {wxPageSetupDialogData, new_0, 0}},
+ {2367, {wxPageSetupDialogData, new_1_0, 1}},
+ {2368, {wxPageSetupDialogData, new_1_1, 1}},
+ {2369, {wxPageSetupDialogData, destruct, 0}},
+ {2370, {wxPageSetupDialogData, enableHelp, 1}},
+ {2371, {wxPageSetupDialogData, enableMargins, 1}},
+ {2372, {wxPageSetupDialogData, enableOrientation, 1}},
+ {2373, {wxPageSetupDialogData, enablePaper, 1}},
+ {2374, {wxPageSetupDialogData, enablePrinter, 1}},
+ {2375, {wxPageSetupDialogData, getDefaultMinMargins, 0}},
+ {2376, {wxPageSetupDialogData, getEnableMargins, 0}},
+ {2377, {wxPageSetupDialogData, getEnableOrientation, 0}},
+ {2378, {wxPageSetupDialogData, getEnablePaper, 0}},
+ {2379, {wxPageSetupDialogData, getEnablePrinter, 0}},
+ {2380, {wxPageSetupDialogData, getEnableHelp, 0}},
+ {2381, {wxPageSetupDialogData, getDefaultInfo, 0}},
+ {2382, {wxPageSetupDialogData, getMarginTopLeft, 0}},
+ {2383, {wxPageSetupDialogData, getMarginBottomRight, 0}},
+ {2384, {wxPageSetupDialogData, getMinMarginTopLeft, 0}},
+ {2385, {wxPageSetupDialogData, getMinMarginBottomRight, 0}},
+ {2386, {wxPageSetupDialogData, getPaperId, 0}},
+ {2387, {wxPageSetupDialogData, getPaperSize, 0}},
+ {2389, {wxPageSetupDialogData, getPrintData, 0}},
+ {2390, {wxPageSetupDialogData, isOk, 0}},
+ {2391, {wxPageSetupDialogData, setDefaultInfo, 1}},
+ {2392, {wxPageSetupDialogData, setDefaultMinMargins, 1}},
+ {2393, {wxPageSetupDialogData, setMarginTopLeft, 1}},
+ {2394, {wxPageSetupDialogData, setMarginBottomRight, 1}},
+ {2395, {wxPageSetupDialogData, setMinMarginTopLeft, 1}},
+ {2396, {wxPageSetupDialogData, setMinMarginBottomRight, 1}},
+ {2397, {wxPageSetupDialogData, setPaperId, 1}},
+ {2398, {wxPageSetupDialogData, setPaperSize_1_1, 1}},
+ {2399, {wxPageSetupDialogData, setPaperSize_1_0, 1}},
+ {2400, {wxPageSetupDialogData, setPrintData, 1}},
+ {2401, {wxPrintDialog, new_2_0, 2}},
+ {2402, {wxPrintDialog, new_2_1, 2}},
+ {2403, {wxPrintDialog, destruct, 0}},
+ {2404, {wxPrintDialog, getPrintDialogData, 0}},
+ {2405, {wxPrintDialog, getPrintDC, 0}},
+ {2406, {wxPrintDialogData, new_0, 0}},
+ {2407, {wxPrintDialogData, new_1_1, 1}},
+ {2408, {wxPrintDialogData, new_1_0, 1}},
+ {2409, {wxPrintDialogData, destruct, 0}},
+ {2410, {wxPrintDialogData, enableHelp, 1}},
+ {2411, {wxPrintDialogData, enablePageNumbers, 1}},
+ {2412, {wxPrintDialogData, enablePrintToFile, 1}},
+ {2413, {wxPrintDialogData, enableSelection, 1}},
+ {2414, {wxPrintDialogData, getAllPages, 0}},
+ {2415, {wxPrintDialogData, getCollate, 0}},
+ {2416, {wxPrintDialogData, getFromPage, 0}},
+ {2417, {wxPrintDialogData, getMaxPage, 0}},
+ {2418, {wxPrintDialogData, getMinPage, 0}},
+ {2419, {wxPrintDialogData, getNoCopies, 0}},
+ {2420, {wxPrintDialogData, getPrintData, 0}},
+ {2421, {wxPrintDialogData, getPrintToFile, 0}},
+ {2422, {wxPrintDialogData, getSelection, 0}},
+ {2423, {wxPrintDialogData, getToPage, 0}},
+ {2424, {wxPrintDialogData, isOk, 0}},
+ {2425, {wxPrintDialogData, setCollate, 1}},
+ {2426, {wxPrintDialogData, setFromPage, 1}},
+ {2427, {wxPrintDialogData, setMaxPage, 1}},
+ {2428, {wxPrintDialogData, setMinPage, 1}},
+ {2429, {wxPrintDialogData, setNoCopies, 1}},
+ {2430, {wxPrintDialogData, setPrintData, 1}},
+ {2431, {wxPrintDialogData, setPrintToFile, 1}},
+ {2432, {wxPrintDialogData, setSelection, 1}},
+ {2433, {wxPrintDialogData, setToPage, 1}},
+ {2434, {wxPrintData, new_0, 0}},
+ {2435, {wxPrintData, new_1, 1}},
+ {2436, {wxPrintData, destruct, 0}},
+ {2437, {wxPrintData, getCollate, 0}},
+ {2438, {wxPrintData, getBin, 0}},
+ {2439, {wxPrintData, getColour, 0}},
+ {2440, {wxPrintData, getDuplex, 0}},
+ {2441, {wxPrintData, getNoCopies, 0}},
+ {2442, {wxPrintData, getOrientation, 0}},
+ {2443, {wxPrintData, getPaperId, 0}},
+ {2444, {wxPrintData, getPrinterName, 0}},
+ {2445, {wxPrintData, getQuality, 0}},
+ {2446, {wxPrintData, isOk, 0}},
+ {2447, {wxPrintData, setBin, 1}},
+ {2448, {wxPrintData, setCollate, 1}},
+ {2449, {wxPrintData, setColour, 1}},
+ {2450, {wxPrintData, setDuplex, 1}},
+ {2451, {wxPrintData, setNoCopies, 1}},
+ {2452, {wxPrintData, setOrientation, 1}},
+ {2453, {wxPrintData, setPaperId, 1}},
+ {2454, {wxPrintData, setPrinterName, 1}},
+ {2455, {wxPrintData, setQuality, 1}},
+ {2458, {wxPrintPreview, new_2, 2}},
+ {2459, {wxPrintPreview, new_3, 3}},
+ {2461, {wxPrintPreview, destruct, 0}},
+ {2462, {wxPrintPreview, getCanvas, 0}},
+ {2463, {wxPrintPreview, getCurrentPage, 0}},
+ {2464, {wxPrintPreview, getFrame, 0}},
+ {2465, {wxPrintPreview, getMaxPage, 0}},
+ {2466, {wxPrintPreview, getMinPage, 0}},
+ {2467, {wxPrintPreview, getPrintout, 0}},
+ {2468, {wxPrintPreview, getPrintoutForPrinting, 0}},
+ {2469, {wxPrintPreview, isOk, 0}},
+ {2470, {wxPrintPreview, paintPage, 2}},
+ {2471, {wxPrintPreview, print, 1}},
+ {2472, {wxPrintPreview, renderPage, 1}},
+ {2473, {wxPrintPreview, setCanvas, 1}},
+ {2474, {wxPrintPreview, setCurrentPage, 1}},
+ {2475, {wxPrintPreview, setFrame, 1}},
+ {2476, {wxPrintPreview, setPrintout, 1}},
+ {2477, {wxPrintPreview, setZoom, 1}},
+ {2478, {wxPreviewFrame, new, 3}},
+ {2479, {wxPreviewFrame, destruct, 0}},
+ {2480, {wxPreviewFrame, createControlBar, 0}},
+ {2481, {wxPreviewFrame, createCanvas, 0}},
+ {2482, {wxPreviewFrame, initialize, 0}},
+ {2483, {wxPreviewFrame, onCloseWindow, 1}},
+ {2484, {wxPreviewControlBar, new, 4}},
+ {2485, {wxPreviewControlBar, destruct, 0}},
+ {2486, {wxPreviewControlBar, createButtons, 0}},
+ {2487, {wxPreviewControlBar, getPrintPreview, 0}},
+ {2488, {wxPreviewControlBar, getZoomControl, 0}},
+ {2489, {wxPreviewControlBar, setZoomControl, 1}},
+ {2491, {wxPrinter, new, 1}},
+ {2492, {wxPrinter, createAbortWindow, 2}},
+ {2493, {wxPrinter, getAbort, 0}},
+ {2494, {wxPrinter, getLastError, 0}},
+ {2495, {wxPrinter, getPrintDialogData, 0}},
+ {2496, {wxPrinter, print, 3}},
+ {2497, {wxPrinter, printDialog, 1}},
+ {2498, {wxPrinter, reportError, 3}},
+ {2499, {wxPrinter, setup, 1}},
+ {2500, {wxPrinter, 'Destroy', undefined}},
+ {2501, {wxXmlResource, new_1, 1}},
+ {2502, {wxXmlResource, new_2, 2}},
+ {2503, {wxXmlResource, destruct, 0}},
+ {2504, {wxXmlResource, attachUnknownControl, 3}},
+ {2505, {wxXmlResource, clearHandlers, 0}},
+ {2506, {wxXmlResource, compareVersion, 4}},
+ {2507, {wxXmlResource, get, 0}},
+ {2508, {wxXmlResource, getFlags, 0}},
+ {2509, {wxXmlResource, getVersion, 0}},
+ {2510, {wxXmlResource, getXRCID, 2}},
+ {2511, {wxXmlResource, initAllHandlers, 0}},
+ {2512, {wxXmlResource, load, 1}},
+ {2513, {wxXmlResource, loadBitmap, 1}},
+ {2514, {wxXmlResource, loadDialog_2, 2}},
+ {2515, {wxXmlResource, loadDialog_3, 3}},
+ {2516, {wxXmlResource, loadFrame_2, 2}},
+ {2517, {wxXmlResource, loadFrame_3, 3}},
+ {2518, {wxXmlResource, loadIcon, 1}},
+ {2519, {wxXmlResource, loadMenu, 1}},
+ {2520, {wxXmlResource, loadMenuBar_2, 2}},
+ {2521, {wxXmlResource, loadMenuBar_1, 1}},
+ {2522, {wxXmlResource, loadPanel_2, 2}},
+ {2523, {wxXmlResource, loadPanel_3, 3}},
+ {2524, {wxXmlResource, loadToolBar, 2}},
+ {2525, {wxXmlResource, set, 1}},
+ {2526, {wxXmlResource, setFlags, 1}},
+ {2527, {wxXmlResource, unload, 1}},
+ {2528, {wxXmlResource, xrcctrl, 3}},
+ {2529, {wxHtmlEasyPrinting, new, 1}},
+ {2530, {wxHtmlEasyPrinting, destruct, 0}},
+ {2531, {wxHtmlEasyPrinting, getPrintData, 0}},
+ {2532, {wxHtmlEasyPrinting, getPageSetupData, 0}},
+ {2533, {wxHtmlEasyPrinting, previewFile, 1}},
+ {2534, {wxHtmlEasyPrinting, previewText, 2}},
+ {2535, {wxHtmlEasyPrinting, printFile, 1}},
+ {2536, {wxHtmlEasyPrinting, printText, 2}},
+ {2537, {wxHtmlEasyPrinting, pageSetup, 0}},
+ {2538, {wxHtmlEasyPrinting, setFonts, 3}},
+ {2539, {wxHtmlEasyPrinting, setHeader, 2}},
+ {2540, {wxHtmlEasyPrinting, setFooter, 2}},
+ {2542, {wxGLCanvas, new_2, 2}},
+ {2543, {wxGLCanvas, new_3_1, 3}},
+ {2544, {wxGLCanvas, new_3_0, 3}},
+ {2545, {wxGLCanvas, getContext, 0}},
+ {2547, {wxGLCanvas, setCurrent, 0}},
+ {2548, {wxGLCanvas, swapBuffers, 0}},
+ {2549, {wxGLCanvas, 'Destroy', undefined}},
+ {2550, {wxAuiManager, new, 1}},
+ {2551, {wxAuiManager, destruct, 0}},
+ {2552, {wxAuiManager, addPane_2_1, 2}},
+ {2553, {wxAuiManager, addPane_3, 3}},
+ {2554, {wxAuiManager, addPane_2_0, 2}},
+ {2555, {wxAuiManager, detachPane, 1}},
+ {2556, {wxAuiManager, getAllPanes, 0}},
+ {2557, {wxAuiManager, getArtProvider, 0}},
+ {2558, {wxAuiManager, getDockSizeConstraint, 2}},
+ {2559, {wxAuiManager, getFlags, 0}},
+ {2560, {wxAuiManager, getManagedWindow, 0}},
+ {2561, {wxAuiManager, getManager, 1}},
+ {2562, {wxAuiManager, getPane_1_1, 1}},
+ {2563, {wxAuiManager, getPane_1_0, 1}},
+ {2564, {wxAuiManager, hideHint, 0}},
+ {2565, {wxAuiManager, insertPane, 3}},
+ {2566, {wxAuiManager, loadPaneInfo, 2}},
+ {2567, {wxAuiManager, loadPerspective, 2}},
+ {2568, {wxAuiManager, savePaneInfo, 1}},
+ {2569, {wxAuiManager, savePerspective, 0}},
+ {2570, {wxAuiManager, setArtProvider, 1}},
+ {2571, {wxAuiManager, setDockSizeConstraint, 2}},
+ {2572, {wxAuiManager, setFlags, 1}},
+ {2573, {wxAuiManager, setManagedWindow, 1}},
+ {2574, {wxAuiManager, showHint, 1}},
+ {2575, {wxAuiManager, unInit, 0}},
+ {2576, {wxAuiManager, update, 0}},
+ {2577, {wxAuiPaneInfo, new_0, 0}},
+ {2578, {wxAuiPaneInfo, new_1, 1}},
+ {2579, {wxAuiPaneInfo, destruct, 0}},
+ {2580, {wxAuiPaneInfo, bestSize_1, 1}},
+ {2581, {wxAuiPaneInfo, bestSize_2, 2}},
+ {2582, {wxAuiPaneInfo, bottom, 0}},
+ {2583, {wxAuiPaneInfo, bottomDockable, 1}},
+ {2584, {wxAuiPaneInfo, caption, 1}},
+ {2585, {wxAuiPaneInfo, captionVisible, 1}},
+ {2586, {wxAuiPaneInfo, centre, 0}},
+ {2587, {wxAuiPaneInfo, centrePane, 0}},
+ {2588, {wxAuiPaneInfo, closeButton, 1}},
+ {2589, {wxAuiPaneInfo, defaultPane, 0}},
+ {2590, {wxAuiPaneInfo, destroyOnClose, 1}},
+ {2591, {wxAuiPaneInfo, direction, 1}},
+ {2592, {wxAuiPaneInfo, dock, 0}},
+ {2593, {wxAuiPaneInfo, dockable, 1}},
+ {2594, {wxAuiPaneInfo, fixed, 0}},
+ {2595, {wxAuiPaneInfo, float, 0}},
+ {2596, {wxAuiPaneInfo, floatable, 1}},
+ {2597, {wxAuiPaneInfo, floatingPosition_1, 1}},
+ {2598, {wxAuiPaneInfo, floatingPosition_2, 2}},
+ {2599, {wxAuiPaneInfo, floatingSize_1, 1}},
+ {2600, {wxAuiPaneInfo, floatingSize_2, 2}},
+ {2601, {wxAuiPaneInfo, gripper, 1}},
+ {2602, {wxAuiPaneInfo, gripperTop, 1}},
+ {2603, {wxAuiPaneInfo, hasBorder, 0}},
+ {2604, {wxAuiPaneInfo, hasCaption, 0}},
+ {2605, {wxAuiPaneInfo, hasCloseButton, 0}},
+ {2606, {wxAuiPaneInfo, hasFlag, 1}},
+ {2607, {wxAuiPaneInfo, hasGripper, 0}},
+ {2608, {wxAuiPaneInfo, hasGripperTop, 0}},
+ {2609, {wxAuiPaneInfo, hasMaximizeButton, 0}},
+ {2610, {wxAuiPaneInfo, hasMinimizeButton, 0}},
+ {2611, {wxAuiPaneInfo, hasPinButton, 0}},
+ {2612, {wxAuiPaneInfo, hide, 0}},
+ {2613, {wxAuiPaneInfo, isBottomDockable, 0}},
+ {2614, {wxAuiPaneInfo, isDocked, 0}},
+ {2615, {wxAuiPaneInfo, isFixed, 0}},
+ {2616, {wxAuiPaneInfo, isFloatable, 0}},
+ {2617, {wxAuiPaneInfo, isFloating, 0}},
+ {2618, {wxAuiPaneInfo, isLeftDockable, 0}},
+ {2619, {wxAuiPaneInfo, isMovable, 0}},
+ {2620, {wxAuiPaneInfo, isOk, 0}},
+ {2621, {wxAuiPaneInfo, isResizable, 0}},
+ {2622, {wxAuiPaneInfo, isRightDockable, 0}},
+ {2623, {wxAuiPaneInfo, isShown, 0}},
+ {2624, {wxAuiPaneInfo, isToolbar, 0}},
+ {2625, {wxAuiPaneInfo, isTopDockable, 0}},
+ {2626, {wxAuiPaneInfo, layer, 1}},
+ {2627, {wxAuiPaneInfo, left, 0}},
+ {2628, {wxAuiPaneInfo, leftDockable, 1}},
+ {2629, {wxAuiPaneInfo, maxSize_1, 1}},
+ {2630, {wxAuiPaneInfo, maxSize_2, 2}},
+ {2631, {wxAuiPaneInfo, maximizeButton, 1}},
+ {2632, {wxAuiPaneInfo, minSize_1, 1}},
+ {2633, {wxAuiPaneInfo, minSize_2, 2}},
+ {2634, {wxAuiPaneInfo, minimizeButton, 1}},
+ {2635, {wxAuiPaneInfo, movable, 1}},
+ {2636, {wxAuiPaneInfo, name, 1}},
+ {2637, {wxAuiPaneInfo, paneBorder, 1}},
+ {2638, {wxAuiPaneInfo, pinButton, 1}},
+ {2639, {wxAuiPaneInfo, position, 1}},
+ {2640, {wxAuiPaneInfo, resizable, 1}},
+ {2641, {wxAuiPaneInfo, right, 0}},
+ {2642, {wxAuiPaneInfo, rightDockable, 1}},
+ {2643, {wxAuiPaneInfo, row, 1}},
+ {2644, {wxAuiPaneInfo, safeSet, 1}},
+ {2645, {wxAuiPaneInfo, setFlag, 2}},
+ {2646, {wxAuiPaneInfo, show, 1}},
+ {2647, {wxAuiPaneInfo, toolbarPane, 0}},
+ {2648, {wxAuiPaneInfo, top, 0}},
+ {2649, {wxAuiPaneInfo, topDockable, 1}},
+ {2650, {wxAuiPaneInfo, window, 1}},
+ {2651, {wxAuiNotebook, new_0, 0}},
+ {2652, {wxAuiNotebook, new_2, 2}},
+ {2653, {wxAuiNotebook, addPage, 3}},
+ {2654, {wxAuiNotebook, create, 2}},
+ {2655, {wxAuiNotebook, deletePage, 1}},
+ {2656, {wxAuiNotebook, getArtProvider, 0}},
+ {2657, {wxAuiNotebook, getPage, 1}},
+ {2658, {wxAuiNotebook, getPageBitmap, 1}},
+ {2659, {wxAuiNotebook, getPageCount, 0}},
+ {2660, {wxAuiNotebook, getPageIndex, 1}},
+ {2661, {wxAuiNotebook, getPageText, 1}},
+ {2662, {wxAuiNotebook, getSelection, 0}},
+ {2663, {wxAuiNotebook, insertPage, 4}},
+ {2664, {wxAuiNotebook, removePage, 1}},
+ {2665, {wxAuiNotebook, setArtProvider, 1}},
+ {2666, {wxAuiNotebook, setFont, 1}},
+ {2667, {wxAuiNotebook, setPageBitmap, 2}},
+ {2668, {wxAuiNotebook, setPageText, 2}},
+ {2669, {wxAuiNotebook, setSelection, 1}},
+ {2670, {wxAuiNotebook, setTabCtrlHeight, 1}},
+ {2671, {wxAuiNotebook, setUniformBitmapSize, 1}},
+ {2672, {wxAuiNotebook, 'Destroy', undefined}},
+ {2673, {wxMDIParentFrame, new_0, 0}},
+ {2674, {wxMDIParentFrame, new_4, 4}},
+ {2675, {wxMDIParentFrame, destruct, 0}},
+ {2676, {wxMDIParentFrame, activateNext, 0}},
+ {2677, {wxMDIParentFrame, activatePrevious, 0}},
+ {2678, {wxMDIParentFrame, arrangeIcons, 0}},
+ {2679, {wxMDIParentFrame, cascade, 0}},
+ {2680, {wxMDIParentFrame, create, 4}},
+ {2681, {wxMDIParentFrame, getActiveChild, 0}},
+ {2682, {wxMDIParentFrame, getClientWindow, 0}},
+ {2683, {wxMDIParentFrame, tile, 1}},
+ {2684, {wxMDIChildFrame, new_0, 0}},
+ {2685, {wxMDIChildFrame, new_4, 4}},
+ {2686, {wxMDIChildFrame, destruct, 0}},
+ {2687, {wxMDIChildFrame, activate, 0}},
+ {2688, {wxMDIChildFrame, create, 4}},
+ {2689, {wxMDIChildFrame, maximize, 1}},
+ {2690, {wxMDIChildFrame, restore, 0}},
+ {2691, {wxMDIClientWindow, new_0, 0}},
+ {2692, {wxMDIClientWindow, new_2, 2}},
+ {2693, {wxMDIClientWindow, destruct, 0}},
+ {2694, {wxMDIClientWindow, createClient, 2}},
+ {2695, {wxLayoutAlgorithm, new, 0}},
+ {2696, {wxLayoutAlgorithm, layoutFrame, 2}},
+ {2697, {wxLayoutAlgorithm, layoutMDIFrame, 2}},
+ {2698, {wxLayoutAlgorithm, layoutWindow, 2}},
+ {2699, {wxLayoutAlgorithm, 'Destroy', undefined}},
+ {2700, {wxEvent, getId, 0}},
+ {2701, {wxEvent, getSkipped, 0}},
+ {2702, {wxEvent, getTimestamp, 0}},
+ {2703, {wxEvent, isCommandEvent, 0}},
+ {2704, {wxEvent, resumePropagation, 1}},
+ {2705, {wxEvent, shouldPropagate, 0}},
+ {2706, {wxEvent, skip, 1}},
+ {2707, {wxEvent, stopPropagation, 0}},
+ {2708, {wxCommandEvent, getClientData, 0}},
+ {2709, {wxCommandEvent, getExtraLong, 0}},
+ {2710, {wxCommandEvent, getInt, 0}},
+ {2711, {wxCommandEvent, getSelection, 0}},
+ {2712, {wxCommandEvent, getString, 0}},
+ {2713, {wxCommandEvent, isChecked, 0}},
+ {2714, {wxCommandEvent, isSelection, 0}},
+ {2715, {wxCommandEvent, setInt, 1}},
+ {2716, {wxCommandEvent, setString, 1}},
+ {2717, {wxScrollEvent, getOrientation, 0}},
+ {2718, {wxScrollEvent, getPosition, 0}},
+ {2719, {wxScrollWinEvent, getOrientation, 0}},
+ {2720, {wxScrollWinEvent, getPosition, 0}},
+ {2721, {wxMouseEvent, altDown, 0}},
+ {2722, {wxMouseEvent, button, 1}},
+ {2723, {wxMouseEvent, buttonDClick, 1}},
+ {2724, {wxMouseEvent, buttonDown, 1}},
+ {2725, {wxMouseEvent, buttonUp, 1}},
+ {2726, {wxMouseEvent, cmdDown, 0}},
+ {2727, {wxMouseEvent, controlDown, 0}},
+ {2728, {wxMouseEvent, dragging, 0}},
+ {2729, {wxMouseEvent, entering, 0}},
+ {2730, {wxMouseEvent, getButton, 0}},
+ {2733, {wxMouseEvent, getPosition, 0}},
+ {2734, {wxMouseEvent, getLogicalPosition, 1}},
+ {2735, {wxMouseEvent, getLinesPerAction, 0}},
+ {2736, {wxMouseEvent, getWheelRotation, 0}},
+ {2737, {wxMouseEvent, getWheelDelta, 0}},
+ {2738, {wxMouseEvent, getX, 0}},
+ {2739, {wxMouseEvent, getY, 0}},
+ {2740, {wxMouseEvent, isButton, 0}},
+ {2741, {wxMouseEvent, isPageScroll, 0}},
+ {2742, {wxMouseEvent, leaving, 0}},
+ {2743, {wxMouseEvent, leftDClick, 0}},
+ {2744, {wxMouseEvent, leftDown, 0}},
+ {2745, {wxMouseEvent, leftIsDown, 0}},
+ {2746, {wxMouseEvent, leftUp, 0}},
+ {2747, {wxMouseEvent, metaDown, 0}},
+ {2748, {wxMouseEvent, middleDClick, 0}},
+ {2749, {wxMouseEvent, middleDown, 0}},
+ {2750, {wxMouseEvent, middleIsDown, 0}},
+ {2751, {wxMouseEvent, middleUp, 0}},
+ {2752, {wxMouseEvent, moving, 0}},
+ {2753, {wxMouseEvent, rightDClick, 0}},
+ {2754, {wxMouseEvent, rightDown, 0}},
+ {2755, {wxMouseEvent, rightIsDown, 0}},
+ {2756, {wxMouseEvent, rightUp, 0}},
+ {2757, {wxMouseEvent, shiftDown, 0}},
+ {2758, {wxSetCursorEvent, getCursor, 0}},
+ {2759, {wxSetCursorEvent, getX, 0}},
+ {2760, {wxSetCursorEvent, getY, 0}},
+ {2761, {wxSetCursorEvent, hasCursor, 0}},
+ {2762, {wxSetCursorEvent, setCursor, 1}},
+ {2763, {wxKeyEvent, altDown, 0}},
+ {2764, {wxKeyEvent, cmdDown, 0}},
+ {2765, {wxKeyEvent, controlDown, 0}},
+ {2766, {wxKeyEvent, getKeyCode, 0}},
+ {2767, {wxKeyEvent, getModifiers, 0}},
+ {2770, {wxKeyEvent, getPosition, 0}},
+ {2771, {wxKeyEvent, getRawKeyCode, 0}},
+ {2772, {wxKeyEvent, getRawKeyFlags, 0}},
+ {2773, {wxKeyEvent, getUnicodeKey, 0}},
+ {2774, {wxKeyEvent, getX, 0}},
+ {2775, {wxKeyEvent, getY, 0}},
+ {2776, {wxKeyEvent, hasModifiers, 0}},
+ {2777, {wxKeyEvent, metaDown, 0}},
+ {2778, {wxKeyEvent, shiftDown, 0}},
+ {2779, {wxSizeEvent, getSize, 0}},
+ {2780, {wxMoveEvent, getPosition, 0}},
+ {2781, {wxEraseEvent, getDC, 0}},
+ {2782, {wxFocusEvent, getWindow, 0}},
+ {2783, {wxChildFocusEvent, getWindow, 0}},
+ {2784, {wxMenuEvent, getMenu, 0}},
+ {2785, {wxMenuEvent, getMenuId, 0}},
+ {2786, {wxMenuEvent, isPopup, 0}},
+ {2787, {wxCloseEvent, canVeto, 0}},
+ {2788, {wxCloseEvent, getLoggingOff, 0}},
+ {2789, {wxCloseEvent, setCanVeto, 1}},
+ {2790, {wxCloseEvent, setLoggingOff, 1}},
+ {2791, {wxCloseEvent, veto, 1}},
+ {2792, {wxShowEvent, setShow, 1}},
+ {2793, {wxShowEvent, getShow, 0}},
+ {2794, {wxIconizeEvent, iconized, 0}},
+ {2795, {wxJoystickEvent, buttonDown, 1}},
+ {2796, {wxJoystickEvent, buttonIsDown, 1}},
+ {2797, {wxJoystickEvent, buttonUp, 1}},
+ {2798, {wxJoystickEvent, getButtonChange, 0}},
+ {2799, {wxJoystickEvent, getButtonState, 0}},
+ {2800, {wxJoystickEvent, getJoystick, 0}},
+ {2801, {wxJoystickEvent, getPosition, 0}},
+ {2802, {wxJoystickEvent, getZPosition, 0}},
+ {2803, {wxJoystickEvent, isButton, 0}},
+ {2804, {wxJoystickEvent, isMove, 0}},
+ {2805, {wxJoystickEvent, isZMove, 0}},
+ {2806, {wxUpdateUIEvent, canUpdate, 1}},
+ {2807, {wxUpdateUIEvent, check, 1}},
+ {2808, {wxUpdateUIEvent, enable, 1}},
+ {2809, {wxUpdateUIEvent, show, 1}},
+ {2810, {wxUpdateUIEvent, getChecked, 0}},
+ {2811, {wxUpdateUIEvent, getEnabled, 0}},
+ {2812, {wxUpdateUIEvent, getShown, 0}},
+ {2813, {wxUpdateUIEvent, getSetChecked, 0}},
+ {2814, {wxUpdateUIEvent, getSetEnabled, 0}},
+ {2815, {wxUpdateUIEvent, getSetShown, 0}},
+ {2816, {wxUpdateUIEvent, getSetText, 0}},
+ {2817, {wxUpdateUIEvent, getText, 0}},
+ {2818, {wxUpdateUIEvent, getMode, 0}},
+ {2819, {wxUpdateUIEvent, getUpdateInterval, 0}},
+ {2820, {wxUpdateUIEvent, resetUpdateTime, 0}},
+ {2821, {wxUpdateUIEvent, setMode, 1}},
+ {2822, {wxUpdateUIEvent, setText, 1}},
+ {2823, {wxUpdateUIEvent, setUpdateInterval, 1}},
+ {2824, {wxMouseCaptureChangedEvent, getCapturedWindow, 0}},
+ {2825, {wxPaletteChangedEvent, setChangedWindow, 1}},
+ {2826, {wxPaletteChangedEvent, getChangedWindow, 0}},
+ {2827, {wxQueryNewPaletteEvent, setPaletteRealized, 1}},
+ {2828, {wxQueryNewPaletteEvent, getPaletteRealized, 0}},
+ {2829, {wxNavigationKeyEvent, getDirection, 0}},
+ {2830, {wxNavigationKeyEvent, setDirection, 1}},
+ {2831, {wxNavigationKeyEvent, isWindowChange, 0}},
+ {2832, {wxNavigationKeyEvent, setWindowChange, 1}},
+ {2833, {wxNavigationKeyEvent, isFromTab, 0}},
+ {2834, {wxNavigationKeyEvent, setFromTab, 1}},
+ {2835, {wxNavigationKeyEvent, getCurrentFocus, 0}},
+ {2836, {wxNavigationKeyEvent, setCurrentFocus, 1}},
+ {2837, {wxHelpEvent, getOrigin, 0}},
+ {2838, {wxHelpEvent, getPosition, 0}},
+ {2839, {wxHelpEvent, setOrigin, 1}},
+ {2840, {wxHelpEvent, setPosition, 1}},
+ {2841, {wxContextMenuEvent, getPosition, 0}},
+ {2842, {wxContextMenuEvent, setPosition, 1}},
+ {2843, {wxIdleEvent, canSend, 1}},
+ {2844, {wxIdleEvent, getMode, 0}},
+ {2845, {wxIdleEvent, requestMore, 1}},
+ {2846, {wxIdleEvent, moreRequested, 0}},
+ {2847, {wxIdleEvent, setMode, 1}},
+ {2848, {wxGridEvent, altDown, 0}},
+ {2849, {wxGridEvent, controlDown, 0}},
+ {2850, {wxGridEvent, getCol, 0}},
+ {2851, {wxGridEvent, getPosition, 0}},
+ {2852, {wxGridEvent, getRow, 0}},
+ {2853, {wxGridEvent, metaDown, 0}},
+ {2854, {wxGridEvent, selecting, 0}},
+ {2855, {wxGridEvent, shiftDown, 0}},
+ {2856, {wxNotifyEvent, allow, 0}},
+ {2857, {wxNotifyEvent, isAllowed, 0}},
+ {2858, {wxNotifyEvent, veto, 0}},
+ {2859, {wxSashEvent, getEdge, 0}},
+ {2860, {wxSashEvent, getDragRect, 0}},
+ {2861, {wxSashEvent, getDragStatus, 0}},
+ {2862, {wxListEvent, getCacheFrom, 0}},
+ {2863, {wxListEvent, getCacheTo, 0}},
+ {2864, {wxListEvent, getKeyCode, 0}},
+ {2865, {wxListEvent, getIndex, 0}},
+ {2866, {wxListEvent, getColumn, 0}},
+ {2867, {wxListEvent, getPoint, 0}},
+ {2868, {wxListEvent, getLabel, 0}},
+ {2869, {wxListEvent, getText, 0}},
+ {2870, {wxListEvent, getImage, 0}},
+ {2871, {wxListEvent, getData, 0}},
+ {2872, {wxListEvent, getMask, 0}},
+ {2873, {wxListEvent, getItem, 0}},
+ {2874, {wxListEvent, isEditCancelled, 0}},
+ {2875, {wxDateEvent, getDate, 0}},
+ {2876, {wxCalendarEvent, getWeekDay, 0}},
+ {2877, {wxFileDirPickerEvent, getPath, 0}},
+ {2878, {wxColourPickerEvent, getColour, 0}},
+ {2879, {wxFontPickerEvent, getFont, 0}},
+ {2880, {wxStyledTextEvent, getPosition, 0}},
+ {2881, {wxStyledTextEvent, getKey, 0}},
+ {2882, {wxStyledTextEvent, getModifiers, 0}},
+ {2883, {wxStyledTextEvent, getModificationType, 0}},
+ {2884, {wxStyledTextEvent, getText, 0}},
+ {2885, {wxStyledTextEvent, getLength, 0}},
+ {2886, {wxStyledTextEvent, getLinesAdded, 0}},
+ {2887, {wxStyledTextEvent, getLine, 0}},
+ {2888, {wxStyledTextEvent, getFoldLevelNow, 0}},
+ {2889, {wxStyledTextEvent, getFoldLevelPrev, 0}},
+ {2890, {wxStyledTextEvent, getMargin, 0}},
+ {2891, {wxStyledTextEvent, getMessage, 0}},
+ {2892, {wxStyledTextEvent, getWParam, 0}},
+ {2893, {wxStyledTextEvent, getLParam, 0}},
+ {2894, {wxStyledTextEvent, getListType, 0}},
+ {2895, {wxStyledTextEvent, getX, 0}},
+ {2896, {wxStyledTextEvent, getY, 0}},
+ {2897, {wxStyledTextEvent, getDragText, 0}},
+ {2898, {wxStyledTextEvent, getDragAllowMove, 0}},
+ {2899, {wxStyledTextEvent, getDragResult, 0}},
+ {2900, {wxStyledTextEvent, getShift, 0}},
+ {2901, {wxStyledTextEvent, getControl, 0}},
+ {2902, {wxStyledTextEvent, getAlt, 0}},
+ {2903, {utils, getKeyState, 1}},
+ {2904, {utils, getMousePosition, 2}},
+ {2905, {utils, getMouseState, 0}},
+ {2906, {utils, setDetectableAutoRepeat, 1}},
+ {2907, {utils, bell, 0}},
+ {2908, {utils, findMenuItemId, 3}},
+ {2909, {utils, genericFindWindowAtPoint, 1}},
+ {2910, {utils, findWindowAtPoint, 1}},
+ {2911, {utils, beginBusyCursor, 1}},
+ {2912, {utils, endBusyCursor, 0}},
+ {2913, {utils, isBusy, 0}},
+ {2914, {utils, shutdown, 1}},
+ {2915, {utils, shell, 1}},
+ {2916, {utils, launchDefaultBrowser, 2}},
+ {2917, {utils, getEmailAddress, 0}},
+ {2918, {utils, getUserId, 0}},
+ {2919, {utils, getHomeDir, 0}},
+ {2920, {utils, newId, 0}},
+ {2921, {utils, registerId, 1}},
+ {2922, {utils, getCurrentId, 0}},
+ {2923, {utils, getOsDescription, 0}},
+ {2924, {utils, isPlatformLittleEndian, 0}},
+ {2925, {utils, isPlatform64Bit, 0}},
+ {2926, {wxPrintout, new, 1}},
+ {2927, {wxPrintout, destruct, 0}},
+ {2928, {wxPrintout, getDC, 0}},
+ {2929, {wxPrintout, getPageSizeMM, 2}},
+ {2930, {wxPrintout, getPageSizePixels, 2}},
+ {2931, {wxPrintout, getPaperRectPixels, 0}},
+ {2932, {wxPrintout, getPPIPrinter, 2}},
+ {2933, {wxPrintout, getPPIScreen, 2}},
+ {2934, {wxPrintout, getTitle, 0}},
+ {2935, {wxPrintout, isPreview, 0}},
+ {2936, {wxPrintout, fitThisSizeToPaper, 1}},
+ {2937, {wxPrintout, fitThisSizeToPage, 1}},
+ {2938, {wxPrintout, fitThisSizeToPageMargins, 2}},
+ {2939, {wxPrintout, mapScreenSizeToPaper, 0}},
+ {2940, {wxPrintout, mapScreenSizeToPage, 0}},
+ {2941, {wxPrintout, mapScreenSizeToPageMargins, 1}},
+ {2942, {wxPrintout, mapScreenSizeToDevice, 0}},
+ {2943, {wxPrintout, getLogicalPaperRect, 0}},
+ {2944, {wxPrintout, getLogicalPageRect, 0}},
+ {2945, {wxPrintout, getLogicalPageMarginsRect, 1}},
+ {2946, {wxPrintout, setLogicalOrigin, 2}},
+ {2947, {wxPrintout, offsetLogicalOrigin, 2}},
+ {2948, {wxStyledTextCtrl, new_2, 2}},
+ {2949, {wxStyledTextCtrl, new_0, 0}},
+ {2950, {wxStyledTextCtrl, destruct, 0}},
+ {2951, {wxStyledTextCtrl, create, 2}},
+ {2952, {wxStyledTextCtrl, addText, 1}},
+ {2953, {wxStyledTextCtrl, addStyledText, 1}},
+ {2954, {wxStyledTextCtrl, insertText, 2}},
+ {2955, {wxStyledTextCtrl, clearAll, 0}},
+ {2956, {wxStyledTextCtrl, clearDocumentStyle, 0}},
+ {2957, {wxStyledTextCtrl, getLength, 0}},
+ {2958, {wxStyledTextCtrl, getCharAt, 1}},
+ {2959, {wxStyledTextCtrl, getCurrentPos, 0}},
+ {2960, {wxStyledTextCtrl, getAnchor, 0}},
+ {2961, {wxStyledTextCtrl, getStyleAt, 1}},
+ {2962, {wxStyledTextCtrl, redo, 0}},
+ {2963, {wxStyledTextCtrl, setUndoCollection, 1}},
+ {2964, {wxStyledTextCtrl, selectAll, 0}},
+ {2965, {wxStyledTextCtrl, setSavePoint, 0}},
+ {2966, {wxStyledTextCtrl, getStyledText, 2}},
+ {2967, {wxStyledTextCtrl, canRedo, 0}},
+ {2968, {wxStyledTextCtrl, markerLineFromHandle, 1}},
+ {2969, {wxStyledTextCtrl, markerDeleteHandle, 1}},
+ {2970, {wxStyledTextCtrl, getUndoCollection, 0}},
+ {2971, {wxStyledTextCtrl, getViewWhiteSpace, 0}},
+ {2972, {wxStyledTextCtrl, setViewWhiteSpace, 1}},
+ {2973, {wxStyledTextCtrl, positionFromPoint, 1}},
+ {2974, {wxStyledTextCtrl, positionFromPointClose, 2}},
+ {2975, {wxStyledTextCtrl, gotoLine, 1}},
+ {2976, {wxStyledTextCtrl, gotoPos, 1}},
+ {2977, {wxStyledTextCtrl, setAnchor, 1}},
+ {2978, {wxStyledTextCtrl, getCurLine, 1}},
+ {2979, {wxStyledTextCtrl, getEndStyled, 0}},
+ {2980, {wxStyledTextCtrl, convertEOLs, 1}},
+ {2981, {wxStyledTextCtrl, getEOLMode, 0}},
+ {2982, {wxStyledTextCtrl, setEOLMode, 1}},
+ {2983, {wxStyledTextCtrl, startStyling, 2}},
+ {2984, {wxStyledTextCtrl, setStyling, 2}},
+ {2985, {wxStyledTextCtrl, getBufferedDraw, 0}},
+ {2986, {wxStyledTextCtrl, setBufferedDraw, 1}},
+ {2987, {wxStyledTextCtrl, setTabWidth, 1}},
+ {2988, {wxStyledTextCtrl, getTabWidth, 0}},
+ {2989, {wxStyledTextCtrl, setCodePage, 1}},
+ {2990, {wxStyledTextCtrl, markerDefine, 3}},
+ {2991, {wxStyledTextCtrl, markerSetForeground, 2}},
+ {2992, {wxStyledTextCtrl, markerSetBackground, 2}},
+ {2993, {wxStyledTextCtrl, markerAdd, 2}},
+ {2994, {wxStyledTextCtrl, markerDelete, 2}},
+ {2995, {wxStyledTextCtrl, markerDeleteAll, 1}},
+ {2996, {wxStyledTextCtrl, markerGet, 1}},
+ {2997, {wxStyledTextCtrl, markerNext, 2}},
+ {2998, {wxStyledTextCtrl, markerPrevious, 2}},
+ {2999, {wxStyledTextCtrl, markerDefineBitmap, 2}},
+ {3000, {wxStyledTextCtrl, markerAddSet, 2}},
+ {3001, {wxStyledTextCtrl, markerSetAlpha, 2}},
+ {3002, {wxStyledTextCtrl, setMarginType, 2}},
+ {3003, {wxStyledTextCtrl, getMarginType, 1}},
+ {3004, {wxStyledTextCtrl, setMarginWidth, 2}},
+ {3005, {wxStyledTextCtrl, getMarginWidth, 1}},
+ {3006, {wxStyledTextCtrl, setMarginMask, 2}},
+ {3007, {wxStyledTextCtrl, getMarginMask, 1}},
+ {3008, {wxStyledTextCtrl, setMarginSensitive, 2}},
+ {3009, {wxStyledTextCtrl, getMarginSensitive, 1}},
+ {3010, {wxStyledTextCtrl, styleClearAll, 0}},
+ {3011, {wxStyledTextCtrl, styleSetForeground, 2}},
+ {3012, {wxStyledTextCtrl, styleSetBackground, 2}},
+ {3013, {wxStyledTextCtrl, styleSetBold, 2}},
+ {3014, {wxStyledTextCtrl, styleSetItalic, 2}},
+ {3015, {wxStyledTextCtrl, styleSetSize, 2}},
+ {3016, {wxStyledTextCtrl, styleSetFaceName, 2}},
+ {3017, {wxStyledTextCtrl, styleSetEOLFilled, 2}},
+ {3018, {wxStyledTextCtrl, styleResetDefault, 0}},
+ {3019, {wxStyledTextCtrl, styleSetUnderline, 2}},
+ {3020, {wxStyledTextCtrl, styleSetCase, 2}},
+ {3021, {wxStyledTextCtrl, styleSetHotSpot, 2}},
+ {3022, {wxStyledTextCtrl, setSelForeground, 2}},
+ {3023, {wxStyledTextCtrl, setSelBackground, 2}},
+ {3024, {wxStyledTextCtrl, getSelAlpha, 0}},
+ {3025, {wxStyledTextCtrl, setSelAlpha, 1}},
+ {3026, {wxStyledTextCtrl, setCaretForeground, 1}},
+ {3027, {wxStyledTextCtrl, cmdKeyAssign, 3}},
+ {3028, {wxStyledTextCtrl, cmdKeyClear, 2}},
+ {3029, {wxStyledTextCtrl, cmdKeyClearAll, 0}},
+ {3030, {wxStyledTextCtrl, setStyleBytes, 2}},
+ {3031, {wxStyledTextCtrl, styleSetVisible, 2}},
+ {3032, {wxStyledTextCtrl, getCaretPeriod, 0}},
+ {3033, {wxStyledTextCtrl, setCaretPeriod, 1}},
+ {3034, {wxStyledTextCtrl, setWordChars, 1}},
+ {3035, {wxStyledTextCtrl, beginUndoAction, 0}},
+ {3036, {wxStyledTextCtrl, endUndoAction, 0}},
+ {3037, {wxStyledTextCtrl, indicatorSetStyle, 2}},
+ {3038, {wxStyledTextCtrl, indicatorGetStyle, 1}},
+ {3039, {wxStyledTextCtrl, indicatorSetForeground, 2}},
+ {3040, {wxStyledTextCtrl, indicatorGetForeground, 1}},
+ {3041, {wxStyledTextCtrl, setWhitespaceForeground, 2}},
+ {3042, {wxStyledTextCtrl, setWhitespaceBackground, 2}},
+ {3043, {wxStyledTextCtrl, getStyleBits, 0}},
+ {3044, {wxStyledTextCtrl, setLineState, 2}},
+ {3045, {wxStyledTextCtrl, getLineState, 1}},
+ {3046, {wxStyledTextCtrl, getMaxLineState, 0}},
+ {3047, {wxStyledTextCtrl, getCaretLineVisible, 0}},
+ {3048, {wxStyledTextCtrl, setCaretLineVisible, 1}},
+ {3049, {wxStyledTextCtrl, getCaretLineBackground, 0}},
+ {3050, {wxStyledTextCtrl, setCaretLineBackground, 1}},
+ {3051, {wxStyledTextCtrl, autoCompShow, 2}},
+ {3052, {wxStyledTextCtrl, autoCompCancel, 0}},
+ {3053, {wxStyledTextCtrl, autoCompActive, 0}},
+ {3054, {wxStyledTextCtrl, autoCompPosStart, 0}},
+ {3055, {wxStyledTextCtrl, autoCompComplete, 0}},
+ {3056, {wxStyledTextCtrl, autoCompStops, 1}},
+ {3057, {wxStyledTextCtrl, autoCompSetSeparator, 1}},
+ {3058, {wxStyledTextCtrl, autoCompGetSeparator, 0}},
+ {3059, {wxStyledTextCtrl, autoCompSelect, 1}},
+ {3060, {wxStyledTextCtrl, autoCompSetCancelAtStart, 1}},
+ {3061, {wxStyledTextCtrl, autoCompGetCancelAtStart, 0}},
+ {3062, {wxStyledTextCtrl, autoCompSetFillUps, 1}},
+ {3063, {wxStyledTextCtrl, autoCompSetChooseSingle, 1}},
+ {3064, {wxStyledTextCtrl, autoCompGetChooseSingle, 0}},
+ {3065, {wxStyledTextCtrl, autoCompSetIgnoreCase, 1}},
+ {3066, {wxStyledTextCtrl, autoCompGetIgnoreCase, 0}},
+ {3067, {wxStyledTextCtrl, userListShow, 2}},
+ {3068, {wxStyledTextCtrl, autoCompSetAutoHide, 1}},
+ {3069, {wxStyledTextCtrl, autoCompGetAutoHide, 0}},
+ {3070, {wxStyledTextCtrl, autoCompSetDropRestOfWord, 1}},
+ {3071, {wxStyledTextCtrl, autoCompGetDropRestOfWord, 0}},
+ {3072, {wxStyledTextCtrl, registerImage, 2}},
+ {3073, {wxStyledTextCtrl, clearRegisteredImages, 0}},
+ {3074, {wxStyledTextCtrl, autoCompGetTypeSeparator, 0}},
+ {3075, {wxStyledTextCtrl, autoCompSetTypeSeparator, 1}},
+ {3076, {wxStyledTextCtrl, autoCompSetMaxWidth, 1}},
+ {3077, {wxStyledTextCtrl, autoCompGetMaxWidth, 0}},
+ {3078, {wxStyledTextCtrl, autoCompSetMaxHeight, 1}},
+ {3079, {wxStyledTextCtrl, autoCompGetMaxHeight, 0}},
+ {3080, {wxStyledTextCtrl, setIndent, 1}},
+ {3081, {wxStyledTextCtrl, getIndent, 0}},
+ {3082, {wxStyledTextCtrl, setUseTabs, 1}},
+ {3083, {wxStyledTextCtrl, getUseTabs, 0}},
+ {3084, {wxStyledTextCtrl, setLineIndentation, 2}},
+ {3085, {wxStyledTextCtrl, getLineIndentation, 1}},
+ {3086, {wxStyledTextCtrl, getLineIndentPosition, 1}},
+ {3087, {wxStyledTextCtrl, getColumn, 1}},
+ {3088, {wxStyledTextCtrl, setUseHorizontalScrollBar, 1}},
+ {3089, {wxStyledTextCtrl, getUseHorizontalScrollBar, 0}},
+ {3090, {wxStyledTextCtrl, setIndentationGuides, 1}},
+ {3091, {wxStyledTextCtrl, getIndentationGuides, 0}},
+ {3092, {wxStyledTextCtrl, setHighlightGuide, 1}},
+ {3093, {wxStyledTextCtrl, getHighlightGuide, 0}},
+ {3094, {wxStyledTextCtrl, getLineEndPosition, 1}},
+ {3095, {wxStyledTextCtrl, getCodePage, 0}},
+ {3096, {wxStyledTextCtrl, getCaretForeground, 0}},
+ {3097, {wxStyledTextCtrl, getReadOnly, 0}},
+ {3098, {wxStyledTextCtrl, setCurrentPos, 1}},
+ {3099, {wxStyledTextCtrl, setSelectionStart, 1}},
+ {3100, {wxStyledTextCtrl, getSelectionStart, 0}},
+ {3101, {wxStyledTextCtrl, setSelectionEnd, 1}},
+ {3102, {wxStyledTextCtrl, getSelectionEnd, 0}},
+ {3103, {wxStyledTextCtrl, setPrintMagnification, 1}},
+ {3104, {wxStyledTextCtrl, getPrintMagnification, 0}},
+ {3105, {wxStyledTextCtrl, setPrintColourMode, 1}},
+ {3106, {wxStyledTextCtrl, getPrintColourMode, 0}},
+ {3107, {wxStyledTextCtrl, findText, 4}},
+ {3108, {wxStyledTextCtrl, formatRange, 7}},
+ {3109, {wxStyledTextCtrl, getFirstVisibleLine, 0}},
+ {3110, {wxStyledTextCtrl, getLine, 1}},
+ {3111, {wxStyledTextCtrl, getLineCount, 0}},
+ {3112, {wxStyledTextCtrl, setMarginLeft, 1}},
+ {3113, {wxStyledTextCtrl, getMarginLeft, 0}},
+ {3114, {wxStyledTextCtrl, setMarginRight, 1}},
+ {3115, {wxStyledTextCtrl, getMarginRight, 0}},
+ {3116, {wxStyledTextCtrl, getModify, 0}},
+ {3117, {wxStyledTextCtrl, setSelection, 2}},
+ {3118, {wxStyledTextCtrl, getSelectedText, 0}},
+ {3119, {wxStyledTextCtrl, getTextRange, 2}},
+ {3120, {wxStyledTextCtrl, hideSelection, 1}},
+ {3121, {wxStyledTextCtrl, lineFromPosition, 1}},
+ {3122, {wxStyledTextCtrl, positionFromLine, 1}},
+ {3123, {wxStyledTextCtrl, lineScroll, 2}},
+ {3124, {wxStyledTextCtrl, ensureCaretVisible, 0}},
+ {3125, {wxStyledTextCtrl, replaceSelection, 1}},
+ {3126, {wxStyledTextCtrl, setReadOnly, 1}},
+ {3127, {wxStyledTextCtrl, canPaste, 0}},
+ {3128, {wxStyledTextCtrl, canUndo, 0}},
+ {3129, {wxStyledTextCtrl, emptyUndoBuffer, 0}},
+ {3130, {wxStyledTextCtrl, undo, 0}},
+ {3131, {wxStyledTextCtrl, cut, 0}},
+ {3132, {wxStyledTextCtrl, copy, 0}},
+ {3133, {wxStyledTextCtrl, paste, 0}},
+ {3134, {wxStyledTextCtrl, clear, 0}},
+ {3135, {wxStyledTextCtrl, setText, 1}},
+ {3136, {wxStyledTextCtrl, getText, 0}},
+ {3137, {wxStyledTextCtrl, getTextLength, 0}},
+ {3138, {wxStyledTextCtrl, getOvertype, 0}},
+ {3139, {wxStyledTextCtrl, setCaretWidth, 1}},
+ {3140, {wxStyledTextCtrl, getCaretWidth, 0}},
+ {3141, {wxStyledTextCtrl, setTargetStart, 1}},
+ {3142, {wxStyledTextCtrl, getTargetStart, 0}},
+ {3143, {wxStyledTextCtrl, setTargetEnd, 1}},
+ {3144, {wxStyledTextCtrl, getTargetEnd, 0}},
+ {3145, {wxStyledTextCtrl, replaceTarget, 1}},
+ {3146, {wxStyledTextCtrl, searchInTarget, 1}},
+ {3147, {wxStyledTextCtrl, setSearchFlags, 1}},
+ {3148, {wxStyledTextCtrl, getSearchFlags, 0}},
+ {3149, {wxStyledTextCtrl, callTipShow, 2}},
+ {3150, {wxStyledTextCtrl, callTipCancel, 0}},
+ {3151, {wxStyledTextCtrl, callTipActive, 0}},
+ {3152, {wxStyledTextCtrl, callTipPosAtStart, 0}},
+ {3153, {wxStyledTextCtrl, callTipSetHighlight, 2}},
+ {3154, {wxStyledTextCtrl, callTipSetBackground, 1}},
+ {3155, {wxStyledTextCtrl, callTipSetForeground, 1}},
+ {3156, {wxStyledTextCtrl, callTipSetForegroundHighlight, 1}},
+ {3157, {wxStyledTextCtrl, callTipUseStyle, 1}},
+ {3158, {wxStyledTextCtrl, visibleFromDocLine, 1}},
+ {3159, {wxStyledTextCtrl, docLineFromVisible, 1}},
+ {3160, {wxStyledTextCtrl, wrapCount, 1}},
+ {3161, {wxStyledTextCtrl, setFoldLevel, 2}},
+ {3162, {wxStyledTextCtrl, getFoldLevel, 1}},
+ {3163, {wxStyledTextCtrl, getLastChild, 2}},
+ {3164, {wxStyledTextCtrl, getFoldParent, 1}},
+ {3165, {wxStyledTextCtrl, showLines, 2}},
+ {3166, {wxStyledTextCtrl, hideLines, 2}},
+ {3167, {wxStyledTextCtrl, getLineVisible, 1}},
+ {3168, {wxStyledTextCtrl, setFoldExpanded, 2}},
+ {3169, {wxStyledTextCtrl, getFoldExpanded, 1}},
+ {3170, {wxStyledTextCtrl, toggleFold, 1}},
+ {3171, {wxStyledTextCtrl, ensureVisible, 1}},
+ {3172, {wxStyledTextCtrl, setFoldFlags, 1}},
+ {3173, {wxStyledTextCtrl, ensureVisibleEnforcePolicy, 1}},
+ {3174, {wxStyledTextCtrl, setTabIndents, 1}},
+ {3175, {wxStyledTextCtrl, getTabIndents, 0}},
+ {3176, {wxStyledTextCtrl, setBackSpaceUnIndents, 1}},
+ {3177, {wxStyledTextCtrl, getBackSpaceUnIndents, 0}},
+ {3178, {wxStyledTextCtrl, setMouseDwellTime, 1}},
+ {3179, {wxStyledTextCtrl, getMouseDwellTime, 0}},
+ {3180, {wxStyledTextCtrl, wordStartPosition, 2}},
+ {3181, {wxStyledTextCtrl, wordEndPosition, 2}},
+ {3182, {wxStyledTextCtrl, setWrapMode, 1}},
+ {3183, {wxStyledTextCtrl, getWrapMode, 0}},
+ {3184, {wxStyledTextCtrl, setWrapVisualFlags, 1}},
+ {3185, {wxStyledTextCtrl, getWrapVisualFlags, 0}},
+ {3186, {wxStyledTextCtrl, setWrapVisualFlagsLocation, 1}},
+ {3187, {wxStyledTextCtrl, getWrapVisualFlagsLocation, 0}},
+ {3188, {wxStyledTextCtrl, setWrapStartIndent, 1}},
+ {3189, {wxStyledTextCtrl, getWrapStartIndent, 0}},
+ {3190, {wxStyledTextCtrl, setLayoutCache, 1}},
+ {3191, {wxStyledTextCtrl, getLayoutCache, 0}},
+ {3192, {wxStyledTextCtrl, setScrollWidth, 1}},
+ {3193, {wxStyledTextCtrl, getScrollWidth, 0}},
+ {3194, {wxStyledTextCtrl, textWidth, 2}},
+ {3195, {wxStyledTextCtrl, getEndAtLastLine, 0}},
+ {3196, {wxStyledTextCtrl, textHeight, 1}},
+ {3197, {wxStyledTextCtrl, setUseVerticalScrollBar, 1}},
+ {3198, {wxStyledTextCtrl, getUseVerticalScrollBar, 0}},
+ {3199, {wxStyledTextCtrl, appendText, 1}},
+ {3200, {wxStyledTextCtrl, getTwoPhaseDraw, 0}},
+ {3201, {wxStyledTextCtrl, setTwoPhaseDraw, 1}},
+ {3202, {wxStyledTextCtrl, targetFromSelection, 0}},
+ {3203, {wxStyledTextCtrl, linesJoin, 0}},
+ {3204, {wxStyledTextCtrl, linesSplit, 1}},
+ {3205, {wxStyledTextCtrl, setFoldMarginColour, 2}},
+ {3206, {wxStyledTextCtrl, setFoldMarginHiColour, 2}},
+ {3207, {wxStyledTextCtrl, lineDown, 0}},
+ {3208, {wxStyledTextCtrl, lineDownExtend, 0}},
+ {3209, {wxStyledTextCtrl, lineUp, 0}},
+ {3210, {wxStyledTextCtrl, lineUpExtend, 0}},
+ {3211, {wxStyledTextCtrl, charLeft, 0}},
+ {3212, {wxStyledTextCtrl, charLeftExtend, 0}},
+ {3213, {wxStyledTextCtrl, charRight, 0}},
+ {3214, {wxStyledTextCtrl, charRightExtend, 0}},
+ {3215, {wxStyledTextCtrl, wordLeft, 0}},
+ {3216, {wxStyledTextCtrl, wordLeftExtend, 0}},
+ {3217, {wxStyledTextCtrl, wordRight, 0}},
+ {3218, {wxStyledTextCtrl, wordRightExtend, 0}},
+ {3219, {wxStyledTextCtrl, home, 0}},
+ {3220, {wxStyledTextCtrl, homeExtend, 0}},
+ {3221, {wxStyledTextCtrl, lineEnd, 0}},
+ {3222, {wxStyledTextCtrl, lineEndExtend, 0}},
+ {3223, {wxStyledTextCtrl, documentStart, 0}},
+ {3224, {wxStyledTextCtrl, documentStartExtend, 0}},
+ {3225, {wxStyledTextCtrl, documentEnd, 0}},
+ {3226, {wxStyledTextCtrl, documentEndExtend, 0}},
+ {3227, {wxStyledTextCtrl, pageUp, 0}},
+ {3228, {wxStyledTextCtrl, pageUpExtend, 0}},
+ {3229, {wxStyledTextCtrl, pageDown, 0}},
+ {3230, {wxStyledTextCtrl, pageDownExtend, 0}},
+ {3231, {wxStyledTextCtrl, editToggleOvertype, 0}},
+ {3232, {wxStyledTextCtrl, cancel, 0}},
+ {3233, {wxStyledTextCtrl, deleteBack, 0}},
+ {3234, {wxStyledTextCtrl, tab, 0}},
+ {3235, {wxStyledTextCtrl, backTab, 0}},
+ {3236, {wxStyledTextCtrl, newLine, 0}},
+ {3237, {wxStyledTextCtrl, formFeed, 0}},
+ {3238, {wxStyledTextCtrl, vCHome, 0}},
+ {3239, {wxStyledTextCtrl, vCHomeExtend, 0}},
+ {3240, {wxStyledTextCtrl, zoomIn, 0}},
+ {3241, {wxStyledTextCtrl, zoomOut, 0}},
+ {3242, {wxStyledTextCtrl, delWordLeft, 0}},
+ {3243, {wxStyledTextCtrl, delWordRight, 0}},
+ {3244, {wxStyledTextCtrl, lineCut, 0}},
+ {3245, {wxStyledTextCtrl, lineDelete, 0}},
+ {3246, {wxStyledTextCtrl, lineTranspose, 0}},
+ {3247, {wxStyledTextCtrl, lineDuplicate, 0}},
+ {3248, {wxStyledTextCtrl, lowerCase, 0}},
+ {3249, {wxStyledTextCtrl, upperCase, 0}},
+ {3250, {wxStyledTextCtrl, lineScrollDown, 0}},
+ {3251, {wxStyledTextCtrl, lineScrollUp, 0}},
+ {3252, {wxStyledTextCtrl, deleteBackNotLine, 0}},
+ {3253, {wxStyledTextCtrl, homeDisplay, 0}},
+ {3254, {wxStyledTextCtrl, homeDisplayExtend, 0}},
+ {3255, {wxStyledTextCtrl, lineEndDisplay, 0}},
+ {3256, {wxStyledTextCtrl, lineEndDisplayExtend, 0}},
+ {3257, {wxStyledTextCtrl, homeWrapExtend, 0}},
+ {3258, {wxStyledTextCtrl, lineEndWrap, 0}},
+ {3259, {wxStyledTextCtrl, lineEndWrapExtend, 0}},
+ {3260, {wxStyledTextCtrl, vCHomeWrap, 0}},
+ {3261, {wxStyledTextCtrl, vCHomeWrapExtend, 0}},
+ {3262, {wxStyledTextCtrl, lineCopy, 0}},
+ {3263, {wxStyledTextCtrl, moveCaretInsideView, 0}},
+ {3264, {wxStyledTextCtrl, lineLength, 1}},
+ {3265, {wxStyledTextCtrl, braceHighlight, 2}},
+ {3266, {wxStyledTextCtrl, braceBadLight, 1}},
+ {3267, {wxStyledTextCtrl, braceMatch, 1}},
+ {3268, {wxStyledTextCtrl, getViewEOL, 0}},
+ {3269, {wxStyledTextCtrl, setViewEOL, 1}},
+ {3270, {wxStyledTextCtrl, setModEventMask, 1}},
+ {3271, {wxStyledTextCtrl, getEdgeColumn, 0}},
+ {3272, {wxStyledTextCtrl, setEdgeColumn, 1}},
+ {3273, {wxStyledTextCtrl, setEdgeMode, 1}},
+ {3274, {wxStyledTextCtrl, getEdgeMode, 0}},
+ {3275, {wxStyledTextCtrl, getEdgeColour, 0}},
+ {3276, {wxStyledTextCtrl, setEdgeColour, 1}},
+ {3277, {wxStyledTextCtrl, searchAnchor, 0}},
+ {3278, {wxStyledTextCtrl, searchNext, 2}},
+ {3279, {wxStyledTextCtrl, searchPrev, 2}},
+ {3280, {wxStyledTextCtrl, linesOnScreen, 0}},
+ {3281, {wxStyledTextCtrl, usePopUp, 1}},
+ {3282, {wxStyledTextCtrl, selectionIsRectangle, 0}},
+ {3283, {wxStyledTextCtrl, setZoom, 1}},
+ {3284, {wxStyledTextCtrl, getZoom, 0}},
+ {3285, {wxStyledTextCtrl, getModEventMask, 0}},
+ {3286, {wxStyledTextCtrl, setSTCFocus, 1}},
+ {3287, {wxStyledTextCtrl, getSTCFocus, 0}},
+ {3288, {wxStyledTextCtrl, setStatus, 1}},
+ {3289, {wxStyledTextCtrl, getStatus, 0}},
+ {3290, {wxStyledTextCtrl, setMouseDownCaptures, 1}},
+ {3291, {wxStyledTextCtrl, getMouseDownCaptures, 0}},
+ {3292, {wxStyledTextCtrl, setSTCCursor, 1}},
+ {3293, {wxStyledTextCtrl, getSTCCursor, 0}},
+ {3294, {wxStyledTextCtrl, setControlCharSymbol, 1}},
+ {3295, {wxStyledTextCtrl, getControlCharSymbol, 0}},
+ {3296, {wxStyledTextCtrl, wordPartLeft, 0}},
+ {3297, {wxStyledTextCtrl, wordPartLeftExtend, 0}},
+ {3298, {wxStyledTextCtrl, wordPartRight, 0}},
+ {3299, {wxStyledTextCtrl, wordPartRightExtend, 0}},
+ {3300, {wxStyledTextCtrl, setVisiblePolicy, 2}},
+ {3301, {wxStyledTextCtrl, delLineLeft, 0}},
+ {3302, {wxStyledTextCtrl, delLineRight, 0}},
+ {3303, {wxStyledTextCtrl, getXOffset, 0}},
+ {3304, {wxStyledTextCtrl, chooseCaretX, 0}},
+ {3305, {wxStyledTextCtrl, setXCaretPolicy, 2}},
+ {3306, {wxStyledTextCtrl, setYCaretPolicy, 2}},
+ {3307, {wxStyledTextCtrl, getPrintWrapMode, 0}},
+ {3308, {wxStyledTextCtrl, setHotspotActiveForeground, 2}},
+ {3309, {wxStyledTextCtrl, setHotspotActiveBackground, 2}},
+ {3310, {wxStyledTextCtrl, setHotspotActiveUnderline, 1}},
+ {3311, {wxStyledTextCtrl, setHotspotSingleLine, 1}},
+ {3312, {wxStyledTextCtrl, paraDownExtend, 0}},
+ {3313, {wxStyledTextCtrl, paraUp, 0}},
+ {3314, {wxStyledTextCtrl, paraUpExtend, 0}},
+ {3315, {wxStyledTextCtrl, positionBefore, 1}},
+ {3316, {wxStyledTextCtrl, positionAfter, 1}},
+ {3317, {wxStyledTextCtrl, copyRange, 2}},
+ {3318, {wxStyledTextCtrl, copyText, 2}},
+ {3319, {wxStyledTextCtrl, setSelectionMode, 1}},
+ {3320, {wxStyledTextCtrl, getSelectionMode, 0}},
+ {3321, {wxStyledTextCtrl, lineDownRectExtend, 0}},
+ {3322, {wxStyledTextCtrl, lineUpRectExtend, 0}},
+ {3323, {wxStyledTextCtrl, charLeftRectExtend, 0}},
+ {3324, {wxStyledTextCtrl, charRightRectExtend, 0}},
+ {3325, {wxStyledTextCtrl, homeRectExtend, 0}},
+ {3326, {wxStyledTextCtrl, vCHomeRectExtend, 0}},
+ {3327, {wxStyledTextCtrl, lineEndRectExtend, 0}},
+ {3328, {wxStyledTextCtrl, pageUpRectExtend, 0}},
+ {3329, {wxStyledTextCtrl, pageDownRectExtend, 0}},
+ {3330, {wxStyledTextCtrl, stutteredPageUp, 0}},
+ {3331, {wxStyledTextCtrl, stutteredPageUpExtend, 0}},
+ {3332, {wxStyledTextCtrl, stutteredPageDown, 0}},
+ {3333, {wxStyledTextCtrl, stutteredPageDownExtend, 0}},
+ {3334, {wxStyledTextCtrl, wordLeftEnd, 0}},
+ {3335, {wxStyledTextCtrl, wordLeftEndExtend, 0}},
+ {3336, {wxStyledTextCtrl, wordRightEnd, 0}},
+ {3337, {wxStyledTextCtrl, wordRightEndExtend, 0}},
+ {3338, {wxStyledTextCtrl, setWhitespaceChars, 1}},
+ {3339, {wxStyledTextCtrl, setCharsDefault, 0}},
+ {3340, {wxStyledTextCtrl, autoCompGetCurrent, 0}},
+ {3341, {wxStyledTextCtrl, allocate, 1}},
+ {3342, {wxStyledTextCtrl, findColumn, 2}},
+ {3343, {wxStyledTextCtrl, getCaretSticky, 0}},
+ {3344, {wxStyledTextCtrl, setCaretSticky, 1}},
+ {3345, {wxStyledTextCtrl, toggleCaretSticky, 0}},
+ {3346, {wxStyledTextCtrl, setPasteConvertEndings, 1}},
+ {3347, {wxStyledTextCtrl, getPasteConvertEndings, 0}},
+ {3348, {wxStyledTextCtrl, selectionDuplicate, 0}},
+ {3349, {wxStyledTextCtrl, setCaretLineBackAlpha, 1}},
+ {3350, {wxStyledTextCtrl, getCaretLineBackAlpha, 0}},
+ {3351, {wxStyledTextCtrl, startRecord, 0}},
+ {3352, {wxStyledTextCtrl, stopRecord, 0}},
+ {3353, {wxStyledTextCtrl, setLexer, 1}},
+ {3354, {wxStyledTextCtrl, getLexer, 0}},
+ {3355, {wxStyledTextCtrl, colourise, 2}},
+ {3356, {wxStyledTextCtrl, setProperty, 2}},
+ {3357, {wxStyledTextCtrl, setKeyWords, 2}},
+ {3358, {wxStyledTextCtrl, setLexerLanguage, 1}},
+ {3359, {wxStyledTextCtrl, getProperty, 1}},
+ {3360, {wxStyledTextCtrl, getStyleBitsNeeded, 0}},
+ {3361, {wxStyledTextCtrl, getCurrentLine, 0}},
+ {3362, {wxStyledTextCtrl, styleSetSpec, 2}},
+ {3363, {wxStyledTextCtrl, styleSetFont, 2}},
+ {3364, {wxStyledTextCtrl, styleSetFontAttr, 7}},
+ {3365, {wxStyledTextCtrl, styleSetCharacterSet, 2}},
+ {3366, {wxStyledTextCtrl, styleSetFontEncoding, 2}},
+ {3367, {wxStyledTextCtrl, cmdKeyExecute, 1}},
+ {3368, {wxStyledTextCtrl, setMargins, 2}},
+ {3369, {wxStyledTextCtrl, getSelection, 2}},
+ {3370, {wxStyledTextCtrl, pointFromPosition, 1}},
+ {3371, {wxStyledTextCtrl, scrollToLine, 1}},
+ {3372, {wxStyledTextCtrl, scrollToColumn, 1}},
+ {3373, {wxStyledTextCtrl, sendMsg, 2}},
+ {3374, {wxStyledTextCtrl, setVScrollBar, 1}},
+ {3375, {wxStyledTextCtrl, setHScrollBar, 1}},
+ {3376, {wxStyledTextCtrl, getLastKeydownProcessed, 0}},
+ {3377, {wxStyledTextCtrl, setLastKeydownProcessed, 1}},
+ {3378, {wxStyledTextCtrl, saveFile, 1}},
+ {3379, {wxStyledTextCtrl, loadFile, 1}},
+ {3380, {wxStyledTextCtrl, doDragOver, 3}},
+ {3381, {wxStyledTextCtrl, doDropText, 3}},
+ {3382, {wxStyledTextCtrl, getUseAntiAliasing, 0}},
+ {3383, {wxStyledTextCtrl, addTextRaw, 1}},
+ {3384, {wxStyledTextCtrl, insertTextRaw, 2}},
+ {3385, {wxStyledTextCtrl, getCurLineRaw, 1}},
+ {3386, {wxStyledTextCtrl, getLineRaw, 1}},
+ {3387, {wxStyledTextCtrl, getSelectedTextRaw, 0}},
+ {3388, {wxStyledTextCtrl, getTextRangeRaw, 2}},
+ {3389, {wxStyledTextCtrl, setTextRaw, 1}},
+ {3390, {wxStyledTextCtrl, getTextRaw, 0}},
+ {3391, {wxStyledTextCtrl, appendTextRaw, 1}},
+ {3392, {wxArtProvider, getBitmap, 2}},
+ {3393, {wxArtProvider, getIcon, 2}},
+ {3394, {wxTreeEvent, getKeyCode, 0}},
+ {3395, {wxTreeEvent, getItem, 0}},
+ {3396, {wxTreeEvent, getKeyEvent, 0}},
+ {3397, {wxTreeEvent, getLabel, 0}},
+ {3398, {wxTreeEvent, getOldItem, 0}},
+ {3399, {wxTreeEvent, getPoint, 0}},
+ {3400, {wxTreeEvent, isEditCancelled, 0}},
+ {3401, {wxTreeEvent, setToolTip, 1}},
+ {3402, {wxNotebookEvent, getOldSelection, 0}},
+ {3403, {wxNotebookEvent, getSelection, 0}},
+ {3404, {wxNotebookEvent, setOldSelection, 1}},
+ {3405, {wxNotebookEvent, setSelection, 1}},
+ {3406, {wxFileDataObject, new, 0}},
+ {3407, {wxFileDataObject, addFile, 1}},
+ {3408, {wxFileDataObject, getFilenames, 0}},
+ {3409, {wxFileDataObject, 'Destroy', undefined}},
+ {3410, {wxTextDataObject, new, 1}},
+ {3411, {wxTextDataObject, getTextLength, 0}},
+ {3412, {wxTextDataObject, getText, 0}},
+ {3413, {wxTextDataObject, setText, 1}},
+ {3414, {wxTextDataObject, 'Destroy', undefined}},
+ {3415, {wxBitmapDataObject, new_1_1, 1}},
+ {3416, {wxBitmapDataObject, new_1_0, 1}},
+ {3417, {wxBitmapDataObject, getBitmap, 0}},
+ {3418, {wxBitmapDataObject, setBitmap, 1}},
+ {3419, {wxBitmapDataObject, 'Destroy', undefined}},
+ {3421, {wxClipboard, new, 0}},
+ {3422, {wxClipboard, destruct, 0}},
+ {3423, {wxClipboard, addData, 1}},
+ {3424, {wxClipboard, clear, 0}},
+ {3425, {wxClipboard, close, 0}},
+ {3426, {wxClipboard, flush, 0}},
+ {3427, {wxClipboard, getData, 1}},
+ {3428, {wxClipboard, isOpened, 0}},
+ {3429, {wxClipboard, open, 0}},
+ {3430, {wxClipboard, setData, 1}},
+ {3432, {wxClipboard, usePrimarySelection, 1}},
+ {3433, {wxClipboard, isSupported, 1}},
+ {3434, {wxClipboard, get, 0}},
+ {3435, {wxSpinEvent, getPosition, 0}},
+ {3436, {wxSpinEvent, setPosition, 1}},
+ {3437, {wxSplitterWindow, new_0, 0}},
+ {3438, {wxSplitterWindow, new_2, 2}},
+ {3439, {wxSplitterWindow, destruct, 0}},
+ {3440, {wxSplitterWindow, create, 2}},
+ {3441, {wxSplitterWindow, getMinimumPaneSize, 0}},
+ {3442, {wxSplitterWindow, getSashGravity, 0}},
+ {3443, {wxSplitterWindow, getSashPosition, 0}},
+ {3444, {wxSplitterWindow, getSplitMode, 0}},
+ {3445, {wxSplitterWindow, getWindow1, 0}},
+ {3446, {wxSplitterWindow, getWindow2, 0}},
+ {3447, {wxSplitterWindow, initialize, 1}},
+ {3448, {wxSplitterWindow, isSplit, 0}},
+ {3449, {wxSplitterWindow, replaceWindow, 2}},
+ {3450, {wxSplitterWindow, setSashGravity, 1}},
+ {3451, {wxSplitterWindow, setSashPosition, 2}},
+ {3452, {wxSplitterWindow, setSashSize, 1}},
+ {3453, {wxSplitterWindow, setMinimumPaneSize, 1}},
+ {3454, {wxSplitterWindow, setSplitMode, 1}},
+ {3455, {wxSplitterWindow, splitHorizontally, 3}},
+ {3456, {wxSplitterWindow, splitVertically, 3}},
+ {3457, {wxSplitterWindow, unsplit, 1}},
+ {3458, {wxSplitterWindow, updateSize, 0}},
+ {3459, {wxSplitterEvent, getSashPosition, 0}},
+ {3460, {wxSplitterEvent, getX, 0}},
+ {3461, {wxSplitterEvent, getY, 0}},
+ {3462, {wxSplitterEvent, getWindowBeingRemoved, 0}},
+ {3463, {wxSplitterEvent, setSashPosition, 1}},
+ {3464, {wxHtmlWindow, new_0, 0}},
+ {3465, {wxHtmlWindow, new_2, 2}},
+ {3466, {wxHtmlWindow, appendToPage, 1}},
+ {3467, {wxHtmlWindow, getOpenedAnchor, 0}},
+ {3468, {wxHtmlWindow, getOpenedPage, 0}},
+ {3469, {wxHtmlWindow, getOpenedPageTitle, 0}},
+ {3470, {wxHtmlWindow, getRelatedFrame, 0}},
+ {3471, {wxHtmlWindow, historyBack, 0}},
+ {3472, {wxHtmlWindow, historyCanBack, 0}},
+ {3473, {wxHtmlWindow, historyCanForward, 0}},
+ {3474, {wxHtmlWindow, historyClear, 0}},
+ {3475, {wxHtmlWindow, historyForward, 0}},
+ {3476, {wxHtmlWindow, loadFile, 1}},
+ {3477, {wxHtmlWindow, loadPage, 1}},
+ {3478, {wxHtmlWindow, selectAll, 0}},
+ {3479, {wxHtmlWindow, selectionToText, 0}},
+ {3480, {wxHtmlWindow, selectLine, 1}},
+ {3481, {wxHtmlWindow, selectWord, 1}},
+ {3482, {wxHtmlWindow, setBorders, 1}},
+ {3483, {wxHtmlWindow, setFonts, 3}},
+ {3484, {wxHtmlWindow, setPage, 1}},
+ {3485, {wxHtmlWindow, setRelatedFrame, 2}},
+ {3486, {wxHtmlWindow, setRelatedStatusBar, 1}},
+ {3487, {wxHtmlWindow, toText, 0}},
+ {3488, {wxHtmlWindow, 'Destroy', undefined}},
+ {3489, {wxHtmlLinkEvent, getLinkInfo, 0}},
+ {3490, {wxSystemSettings, getColour, 1}},
+ {3491, {wxSystemSettings, getFont, 1}},
+ {3492, {wxSystemSettings, getMetric, 2}},
+ {3493, {wxSystemSettings, getScreenType, 0}},
+ {3494, {wxSystemOptions, getOption, 1}},
+ {3495, {wxSystemOptions, getOptionInt, 1}},
+ {3496, {wxSystemOptions, hasOption, 1}},
+ {3497, {wxSystemOptions, isFalse, 1}},
+ {3498, {wxSystemOptions, setOption_2_1, 2}},
+ {3499, {wxSystemOptions, setOption_2_0, 2}},
+ {3500, {wxAuiNotebookEvent, setSelection, 1}},
+ {3501, {wxAuiNotebookEvent, getSelection, 0}},
+ {3502, {wxAuiNotebookEvent, setOldSelection, 1}},
+ {3503, {wxAuiNotebookEvent, getOldSelection, 0}},
+ {3504, {wxAuiNotebookEvent, setDragSource, 1}},
+ {3505, {wxAuiNotebookEvent, getDragSource, 0}},
+ {3506, {wxAuiManagerEvent, setManager, 1}},
+ {3507, {wxAuiManagerEvent, getManager, 0}},
+ {3508, {wxAuiManagerEvent, setPane, 1}},
+ {3509, {wxAuiManagerEvent, getPane, 0}},
+ {3510, {wxAuiManagerEvent, setButton, 1}},
+ {3511, {wxAuiManagerEvent, getButton, 0}},
+ {3512, {wxAuiManagerEvent, setDC, 1}},
+ {3513, {wxAuiManagerEvent, getDC, 0}},
+ {3514, {wxAuiManagerEvent, veto, 1}},
+ {3515, {wxAuiManagerEvent, getVeto, 0}},
+ {3516, {wxAuiManagerEvent, setCanVeto, 1}},
+ {3517, {wxAuiManagerEvent, canVeto, 0}},
+ {3518, {wxLogNull, new, 0}},
+ {3519, {wxLogNull, 'Destroy', undefined}},
+ {3520, {wxTaskBarIcon, new, 0}},
+ {3521, {wxTaskBarIcon, destruct, 0}},
+ {3522, {wxTaskBarIcon, popupMenu, 1}},
+ {3523, {wxTaskBarIcon, removeIcon, 0}},
+ {3524, {wxTaskBarIcon, setIcon, 2}},
{-1, {mod, func, -1}}
].
diff --git a/lib/wx/src/gen/wxe_funcs.hrl b/lib/wx/src/gen/wxe_funcs.hrl
index 55cbee5572..fe35cb1374 100644
--- a/lib/wx/src/gen/wxe_funcs.hrl
+++ b/lib/wx/src/gen/wxe_funcs.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -561,2738 +561,2743 @@
-define(wxDC_GetCharHeight, 663).
-define(wxDC_GetCharWidth, 664).
-define(wxDC_GetClippingBox, 665).
--define(wxDC_GetFont, 666).
--define(wxDC_GetLayoutDirection, 667).
--define(wxDC_GetLogicalFunction, 668).
--define(wxDC_GetMapMode, 669).
--define(wxDC_GetMultiLineTextExtent_4, 670).
--define(wxDC_GetMultiLineTextExtent_1, 671).
--define(wxDC_GetPartialTextExtents, 672).
--define(wxDC_GetPen, 673).
--define(wxDC_GetPixel, 674).
--define(wxDC_GetPPI, 675).
--define(wxDC_GetSize, 677).
--define(wxDC_GetSizeMM, 679).
--define(wxDC_GetTextBackground, 680).
--define(wxDC_GetTextExtent_4, 681).
--define(wxDC_GetTextExtent_1, 682).
--define(wxDC_GetTextForeground, 684).
--define(wxDC_GetUserScale, 685).
--define(wxDC_GradientFillConcentric_3, 686).
--define(wxDC_GradientFillConcentric_4, 687).
--define(wxDC_GradientFillLinear, 688).
--define(wxDC_LogicalToDeviceX, 689).
--define(wxDC_LogicalToDeviceXRel, 690).
--define(wxDC_LogicalToDeviceY, 691).
--define(wxDC_LogicalToDeviceYRel, 692).
--define(wxDC_MaxX, 693).
--define(wxDC_MaxY, 694).
--define(wxDC_MinX, 695).
--define(wxDC_MinY, 696).
--define(wxDC_IsOk, 697).
--define(wxDC_ResetBoundingBox, 698).
--define(wxDC_SetAxisOrientation, 699).
--define(wxDC_SetBackground, 700).
--define(wxDC_SetBackgroundMode, 701).
--define(wxDC_SetBrush, 702).
--define(wxDC_SetClippingRegion_2, 704).
--define(wxDC_SetClippingRegion_1_1, 705).
--define(wxDC_SetClippingRegion_1_0, 706).
--define(wxDC_SetDeviceOrigin, 707).
--define(wxDC_SetFont, 708).
--define(wxDC_SetLayoutDirection, 709).
--define(wxDC_SetLogicalFunction, 710).
--define(wxDC_SetMapMode, 711).
--define(wxDC_SetPalette, 712).
--define(wxDC_SetPen, 713).
--define(wxDC_SetTextBackground, 714).
--define(wxDC_SetTextForeground, 715).
--define(wxDC_SetUserScale, 716).
--define(wxDC_StartDoc, 717).
--define(wxDC_StartPage, 718).
--define(wxMirrorDC_new, 719).
--define(wxMirrorDC_destroy, 720).
--define(wxScreenDC_new, 721).
--define(wxScreenDC_destruct, 722).
--define(wxPostScriptDC_new_0, 723).
--define(wxPostScriptDC_new_1, 724).
--define(wxPostScriptDC_destruct, 725).
--define(wxPostScriptDC_SetResolution, 726).
--define(wxPostScriptDC_GetResolution, 727).
--define(wxWindowDC_new_0, 728).
--define(wxWindowDC_new_1, 729).
--define(wxWindowDC_destruct, 730).
--define(wxClientDC_new_0, 731).
--define(wxClientDC_new_1, 732).
--define(wxClientDC_destroy, 733).
--define(wxPaintDC_new_0, 734).
--define(wxPaintDC_new_1, 735).
--define(wxPaintDC_destroy, 736).
--define(wxMemoryDC_new_1_0, 738).
--define(wxMemoryDC_new_1_1, 739).
--define(wxMemoryDC_new_0, 740).
--define(wxMemoryDC_destruct, 742).
--define(wxMemoryDC_SelectObject, 743).
--define(wxMemoryDC_SelectObjectAsSource, 744).
--define(wxBufferedDC_new_0, 745).
--define(wxBufferedDC_new_2, 746).
--define(wxBufferedDC_new_3, 747).
--define(wxBufferedDC_destruct, 748).
--define(wxBufferedDC_Init_2, 749).
--define(wxBufferedDC_Init_3, 750).
--define(wxBufferedPaintDC_new_3, 751).
--define(wxBufferedPaintDC_new_2, 752).
--define(wxBufferedPaintDC_destruct, 753).
--define(wxGraphicsObject_GetRenderer, 754).
--define(wxGraphicsObject_IsNull, 755).
--define(wxGraphicsContext_Create_1_1, 756).
--define(wxGraphicsContext_Create_1_0, 757).
--define(wxGraphicsContext_Create_0, 758).
--define(wxGraphicsContext_CreatePen, 759).
--define(wxGraphicsContext_CreateBrush, 760).
--define(wxGraphicsContext_CreateRadialGradientBrush, 761).
--define(wxGraphicsContext_CreateLinearGradientBrush, 762).
--define(wxGraphicsContext_CreateFont, 763).
--define(wxGraphicsContext_CreateMatrix, 764).
--define(wxGraphicsContext_CreatePath, 765).
--define(wxGraphicsContext_Clip_1, 766).
--define(wxGraphicsContext_Clip_4, 767).
--define(wxGraphicsContext_ResetClip, 768).
--define(wxGraphicsContext_DrawBitmap, 769).
--define(wxGraphicsContext_DrawEllipse, 770).
--define(wxGraphicsContext_DrawIcon, 771).
--define(wxGraphicsContext_DrawLines, 772).
--define(wxGraphicsContext_DrawPath, 773).
--define(wxGraphicsContext_DrawRectangle, 774).
--define(wxGraphicsContext_DrawRoundedRectangle, 775).
--define(wxGraphicsContext_DrawText_3, 776).
--define(wxGraphicsContext_DrawText_4_0, 777).
--define(wxGraphicsContext_DrawText_4_1, 778).
--define(wxGraphicsContext_DrawText_5, 779).
--define(wxGraphicsContext_FillPath, 780).
--define(wxGraphicsContext_StrokePath, 781).
--define(wxGraphicsContext_GetNativeContext, 782).
--define(wxGraphicsContext_GetPartialTextExtents, 783).
--define(wxGraphicsContext_GetTextExtent, 784).
--define(wxGraphicsContext_Rotate, 785).
--define(wxGraphicsContext_Scale, 786).
--define(wxGraphicsContext_Translate, 787).
--define(wxGraphicsContext_GetTransform, 788).
--define(wxGraphicsContext_SetTransform, 789).
--define(wxGraphicsContext_ConcatTransform, 790).
--define(wxGraphicsContext_SetBrush_1_1, 791).
--define(wxGraphicsContext_SetBrush_1_0, 792).
--define(wxGraphicsContext_SetFont_1, 793).
--define(wxGraphicsContext_SetFont_2, 794).
--define(wxGraphicsContext_SetPen_1_0, 795).
--define(wxGraphicsContext_SetPen_1_1, 796).
--define(wxGraphicsContext_StrokeLine, 797).
--define(wxGraphicsContext_StrokeLines_2, 798).
--define(wxGraphicsContext_StrokeLines_3, 799).
--define(wxGraphicsMatrix_Concat, 800).
--define(wxGraphicsMatrix_Get, 802).
--define(wxGraphicsMatrix_GetNativeMatrix, 803).
--define(wxGraphicsMatrix_Invert, 804).
--define(wxGraphicsMatrix_IsEqual, 805).
--define(wxGraphicsMatrix_IsIdentity, 807).
--define(wxGraphicsMatrix_Rotate, 808).
--define(wxGraphicsMatrix_Scale, 809).
--define(wxGraphicsMatrix_Translate, 810).
--define(wxGraphicsMatrix_Set, 811).
--define(wxGraphicsMatrix_TransformPoint, 812).
--define(wxGraphicsMatrix_TransformDistance, 813).
--define(wxGraphicsPath_MoveToPoint_2, 814).
--define(wxGraphicsPath_MoveToPoint_1, 815).
--define(wxGraphicsPath_AddArc_6, 816).
--define(wxGraphicsPath_AddArc_5, 817).
--define(wxGraphicsPath_AddArcToPoint, 818).
--define(wxGraphicsPath_AddCircle, 819).
--define(wxGraphicsPath_AddCurveToPoint_6, 820).
--define(wxGraphicsPath_AddCurveToPoint_3, 821).
--define(wxGraphicsPath_AddEllipse, 822).
--define(wxGraphicsPath_AddLineToPoint_2, 823).
--define(wxGraphicsPath_AddLineToPoint_1, 824).
--define(wxGraphicsPath_AddPath, 825).
--define(wxGraphicsPath_AddQuadCurveToPoint, 826).
--define(wxGraphicsPath_AddRectangle, 827).
--define(wxGraphicsPath_AddRoundedRectangle, 828).
--define(wxGraphicsPath_CloseSubpath, 829).
--define(wxGraphicsPath_Contains_3, 830).
--define(wxGraphicsPath_Contains_2, 831).
--define(wxGraphicsPath_GetBox, 833).
--define(wxGraphicsPath_GetCurrentPoint, 835).
--define(wxGraphicsPath_Transform, 836).
--define(wxGraphicsRenderer_GetDefaultRenderer, 837).
--define(wxGraphicsRenderer_CreateContext_1_1, 838).
--define(wxGraphicsRenderer_CreateContext_1_0, 839).
--define(wxGraphicsRenderer_CreatePen, 840).
--define(wxGraphicsRenderer_CreateBrush, 841).
--define(wxGraphicsRenderer_CreateLinearGradientBrush, 842).
--define(wxGraphicsRenderer_CreateRadialGradientBrush, 843).
--define(wxGraphicsRenderer_CreateFont, 844).
--define(wxGraphicsRenderer_CreateMatrix, 845).
--define(wxGraphicsRenderer_CreatePath, 846).
--define(wxMenuBar_new_1, 848).
--define(wxMenuBar_new_0, 850).
--define(wxMenuBar_destruct, 852).
--define(wxMenuBar_Append, 853).
--define(wxMenuBar_Check, 854).
--define(wxMenuBar_Enable_2, 855).
--define(wxMenuBar_Enable_1, 856).
--define(wxMenuBar_EnableTop, 857).
--define(wxMenuBar_FindMenu, 858).
--define(wxMenuBar_FindMenuItem, 859).
--define(wxMenuBar_FindItem, 860).
--define(wxMenuBar_GetHelpString, 861).
--define(wxMenuBar_GetLabel_1, 862).
--define(wxMenuBar_GetLabel_0, 863).
--define(wxMenuBar_GetLabelTop, 864).
--define(wxMenuBar_GetMenu, 865).
--define(wxMenuBar_GetMenuCount, 866).
--define(wxMenuBar_Insert, 867).
--define(wxMenuBar_IsChecked, 868).
--define(wxMenuBar_IsEnabled_1, 869).
--define(wxMenuBar_IsEnabled_0, 870).
--define(wxMenuBar_Remove, 871).
--define(wxMenuBar_Replace, 872).
--define(wxMenuBar_SetHelpString, 873).
--define(wxMenuBar_SetLabel_2, 874).
--define(wxMenuBar_SetLabel_1, 875).
--define(wxMenuBar_SetLabelTop, 876).
--define(wxControl_GetLabel, 877).
--define(wxControl_SetLabel, 878).
--define(wxControlWithItems_Append_1, 879).
--define(wxControlWithItems_Append_2, 880).
--define(wxControlWithItems_appendStrings_1, 881).
--define(wxControlWithItems_Clear, 882).
--define(wxControlWithItems_Delete, 883).
--define(wxControlWithItems_FindString, 884).
--define(wxControlWithItems_getClientData, 885).
--define(wxControlWithItems_setClientData, 886).
--define(wxControlWithItems_GetCount, 887).
--define(wxControlWithItems_GetSelection, 888).
--define(wxControlWithItems_GetString, 889).
--define(wxControlWithItems_GetStringSelection, 890).
--define(wxControlWithItems_Insert_2, 891).
--define(wxControlWithItems_Insert_3, 892).
--define(wxControlWithItems_IsEmpty, 893).
--define(wxControlWithItems_Select, 894).
--define(wxControlWithItems_SetSelection, 895).
--define(wxControlWithItems_SetString, 896).
--define(wxControlWithItems_SetStringSelection, 897).
--define(wxMenu_new_2, 900).
--define(wxMenu_new_1, 901).
--define(wxMenu_destruct, 903).
--define(wxMenu_Append_3, 904).
--define(wxMenu_Append_1, 905).
--define(wxMenu_Append_4_0, 906).
--define(wxMenu_Append_4_1, 907).
--define(wxMenu_AppendCheckItem, 908).
--define(wxMenu_AppendRadioItem, 909).
--define(wxMenu_AppendSeparator, 910).
--define(wxMenu_Break, 911).
--define(wxMenu_Check, 912).
--define(wxMenu_Delete_1_0, 913).
--define(wxMenu_Delete_1_1, 914).
--define(wxMenu_Destroy_1_0, 915).
--define(wxMenu_Destroy_1_1, 916).
--define(wxMenu_Enable, 917).
--define(wxMenu_FindItem_1, 918).
--define(wxMenu_FindItem_2, 919).
--define(wxMenu_FindItemByPosition, 920).
--define(wxMenu_GetHelpString, 921).
--define(wxMenu_GetLabel, 922).
--define(wxMenu_GetMenuItemCount, 923).
--define(wxMenu_GetMenuItems, 924).
--define(wxMenu_GetTitle, 926).
--define(wxMenu_Insert_2, 927).
--define(wxMenu_Insert_3, 928).
--define(wxMenu_Insert_5_1, 929).
--define(wxMenu_Insert_5_0, 930).
--define(wxMenu_InsertCheckItem, 931).
--define(wxMenu_InsertRadioItem, 932).
--define(wxMenu_InsertSeparator, 933).
--define(wxMenu_IsChecked, 934).
--define(wxMenu_IsEnabled, 935).
--define(wxMenu_Prepend_1, 936).
--define(wxMenu_Prepend_2, 937).
--define(wxMenu_Prepend_4_1, 938).
--define(wxMenu_Prepend_4_0, 939).
--define(wxMenu_PrependCheckItem, 940).
--define(wxMenu_PrependRadioItem, 941).
--define(wxMenu_PrependSeparator, 942).
--define(wxMenu_Remove_1_0, 943).
--define(wxMenu_Remove_1_1, 944).
--define(wxMenu_SetHelpString, 945).
--define(wxMenu_SetLabel, 946).
--define(wxMenu_SetTitle, 947).
--define(wxMenuItem_new, 948).
--define(wxMenuItem_destruct, 950).
--define(wxMenuItem_Check, 951).
--define(wxMenuItem_Enable, 952).
--define(wxMenuItem_GetBitmap, 953).
--define(wxMenuItem_GetHelp, 954).
--define(wxMenuItem_GetId, 955).
--define(wxMenuItem_GetKind, 956).
--define(wxMenuItem_GetLabel, 957).
--define(wxMenuItem_GetLabelFromText, 958).
--define(wxMenuItem_GetMenu, 959).
--define(wxMenuItem_GetText, 960).
--define(wxMenuItem_GetSubMenu, 961).
--define(wxMenuItem_IsCheckable, 962).
--define(wxMenuItem_IsChecked, 963).
--define(wxMenuItem_IsEnabled, 964).
--define(wxMenuItem_IsSeparator, 965).
--define(wxMenuItem_IsSubMenu, 966).
--define(wxMenuItem_SetBitmap, 967).
--define(wxMenuItem_SetHelp, 968).
--define(wxMenuItem_SetMenu, 969).
--define(wxMenuItem_SetSubMenu, 970).
--define(wxMenuItem_SetText, 971).
--define(wxToolBar_AddControl, 972).
--define(wxToolBar_AddSeparator, 973).
--define(wxToolBar_AddTool_5, 974).
--define(wxToolBar_AddTool_4_0, 975).
--define(wxToolBar_AddTool_1, 976).
--define(wxToolBar_AddTool_4_1, 977).
--define(wxToolBar_AddTool_3, 978).
--define(wxToolBar_AddTool_6, 979).
--define(wxToolBar_AddCheckTool, 980).
--define(wxToolBar_AddRadioTool, 981).
--define(wxToolBar_DeleteTool, 982).
--define(wxToolBar_DeleteToolByPos, 983).
--define(wxToolBar_EnableTool, 984).
--define(wxToolBar_FindById, 985).
--define(wxToolBar_FindControl, 986).
--define(wxToolBar_FindToolForPosition, 987).
--define(wxToolBar_GetToolSize, 988).
--define(wxToolBar_GetToolBitmapSize, 989).
--define(wxToolBar_GetMargins, 990).
--define(wxToolBar_GetToolEnabled, 991).
--define(wxToolBar_GetToolLongHelp, 992).
--define(wxToolBar_GetToolPacking, 993).
--define(wxToolBar_GetToolPos, 994).
--define(wxToolBar_GetToolSeparation, 995).
--define(wxToolBar_GetToolShortHelp, 996).
--define(wxToolBar_GetToolState, 997).
--define(wxToolBar_InsertControl, 998).
--define(wxToolBar_InsertSeparator, 999).
--define(wxToolBar_InsertTool_5, 1000).
--define(wxToolBar_InsertTool_2, 1001).
--define(wxToolBar_InsertTool_4, 1002).
--define(wxToolBar_Realize, 1003).
--define(wxToolBar_RemoveTool, 1004).
--define(wxToolBar_SetMargins, 1005).
--define(wxToolBar_SetToolBitmapSize, 1006).
--define(wxToolBar_SetToolLongHelp, 1007).
--define(wxToolBar_SetToolPacking, 1008).
--define(wxToolBar_SetToolShortHelp, 1009).
--define(wxToolBar_SetToolSeparation, 1010).
--define(wxToolBar_ToggleTool, 1011).
--define(wxStatusBar_new_0, 1013).
--define(wxStatusBar_new_2, 1014).
--define(wxStatusBar_destruct, 1016).
--define(wxStatusBar_Create, 1017).
--define(wxStatusBar_GetFieldRect, 1018).
--define(wxStatusBar_GetFieldsCount, 1019).
--define(wxStatusBar_GetStatusText, 1020).
--define(wxStatusBar_PopStatusText, 1021).
--define(wxStatusBar_PushStatusText, 1022).
--define(wxStatusBar_SetFieldsCount, 1023).
--define(wxStatusBar_SetMinHeight, 1024).
--define(wxStatusBar_SetStatusText, 1025).
--define(wxStatusBar_SetStatusWidths, 1026).
--define(wxStatusBar_SetStatusStyles, 1027).
--define(wxBitmap_new_0, 1028).
--define(wxBitmap_new_3, 1029).
--define(wxBitmap_new_4, 1030).
--define(wxBitmap_new_2_0, 1031).
--define(wxBitmap_new_2_1, 1032).
--define(wxBitmap_destruct, 1033).
--define(wxBitmap_ConvertToImage, 1034).
--define(wxBitmap_CopyFromIcon, 1035).
--define(wxBitmap_Create, 1036).
--define(wxBitmap_GetDepth, 1037).
--define(wxBitmap_GetHeight, 1038).
--define(wxBitmap_GetPalette, 1039).
--define(wxBitmap_GetMask, 1040).
--define(wxBitmap_GetWidth, 1041).
--define(wxBitmap_GetSubBitmap, 1042).
--define(wxBitmap_LoadFile, 1043).
--define(wxBitmap_Ok, 1044).
--define(wxBitmap_SaveFile, 1045).
--define(wxBitmap_SetDepth, 1046).
--define(wxBitmap_SetHeight, 1047).
--define(wxBitmap_SetMask, 1048).
--define(wxBitmap_SetPalette, 1049).
--define(wxBitmap_SetWidth, 1050).
--define(wxIcon_new_0, 1051).
--define(wxIcon_new_2, 1052).
--define(wxIcon_new_1, 1053).
--define(wxIcon_CopyFromBitmap, 1054).
--define(wxIcon_destroy, 1055).
--define(wxIconBundle_new_0, 1056).
--define(wxIconBundle_new_2, 1057).
--define(wxIconBundle_new_1_0, 1058).
--define(wxIconBundle_new_1_1, 1059).
--define(wxIconBundle_destruct, 1060).
--define(wxIconBundle_AddIcon_2, 1061).
--define(wxIconBundle_AddIcon_1, 1062).
--define(wxIconBundle_GetIcon_1_1, 1063).
--define(wxIconBundle_GetIcon_1_0, 1064).
--define(wxCursor_new_0, 1065).
--define(wxCursor_new_1_0, 1066).
--define(wxCursor_new_1_1, 1067).
--define(wxCursor_new_4, 1068).
--define(wxCursor_destruct, 1069).
--define(wxCursor_Ok, 1070).
--define(wxMask_new_0, 1071).
--define(wxMask_new_2_1, 1072).
--define(wxMask_new_2_0, 1073).
--define(wxMask_new_1, 1074).
--define(wxMask_destruct, 1075).
--define(wxMask_Create_2_1, 1076).
--define(wxMask_Create_2_0, 1077).
--define(wxMask_Create_1, 1078).
--define(wxImage_new_0, 1079).
--define(wxImage_new_3_0, 1080).
--define(wxImage_new_4, 1081).
--define(wxImage_new_5, 1082).
--define(wxImage_new_2, 1083).
--define(wxImage_new_3_1, 1084).
--define(wxImage_Blur, 1085).
--define(wxImage_BlurHorizontal, 1086).
--define(wxImage_BlurVertical, 1087).
--define(wxImage_ConvertAlphaToMask, 1088).
--define(wxImage_ConvertToGreyscale, 1089).
--define(wxImage_ConvertToMono, 1090).
--define(wxImage_Copy, 1091).
--define(wxImage_Create_3, 1092).
--define(wxImage_Create_4, 1093).
--define(wxImage_Create_5, 1094).
--define(wxImage_Destroy, 1095).
--define(wxImage_FindFirstUnusedColour, 1096).
--define(wxImage_GetImageExtWildcard, 1097).
--define(wxImage_GetAlpha_2, 1098).
--define(wxImage_GetAlpha_0, 1099).
--define(wxImage_GetBlue, 1100).
--define(wxImage_GetData, 1101).
--define(wxImage_GetGreen, 1102).
--define(wxImage_GetImageCount, 1103).
--define(wxImage_GetHeight, 1104).
--define(wxImage_GetMaskBlue, 1105).
--define(wxImage_GetMaskGreen, 1106).
--define(wxImage_GetMaskRed, 1107).
--define(wxImage_GetOrFindMaskColour, 1108).
--define(wxImage_GetPalette, 1109).
--define(wxImage_GetRed, 1110).
--define(wxImage_GetSubImage, 1111).
--define(wxImage_GetWidth, 1112).
--define(wxImage_HasAlpha, 1113).
--define(wxImage_HasMask, 1114).
--define(wxImage_GetOption, 1115).
--define(wxImage_GetOptionInt, 1116).
--define(wxImage_HasOption, 1117).
--define(wxImage_InitAlpha, 1118).
--define(wxImage_InitStandardHandlers, 1119).
--define(wxImage_IsTransparent, 1120).
--define(wxImage_LoadFile_2, 1121).
--define(wxImage_LoadFile_3, 1122).
--define(wxImage_Ok, 1123).
--define(wxImage_RemoveHandler, 1124).
--define(wxImage_Mirror, 1125).
--define(wxImage_Replace, 1126).
--define(wxImage_Rescale, 1127).
--define(wxImage_Resize, 1128).
--define(wxImage_Rotate, 1129).
--define(wxImage_RotateHue, 1130).
--define(wxImage_Rotate90, 1131).
--define(wxImage_SaveFile_1, 1132).
--define(wxImage_SaveFile_2_0, 1133).
--define(wxImage_SaveFile_2_1, 1134).
--define(wxImage_Scale, 1135).
--define(wxImage_Size, 1136).
--define(wxImage_SetAlpha_3, 1137).
--define(wxImage_SetAlpha_2, 1138).
--define(wxImage_SetData_2, 1139).
--define(wxImage_SetData_4, 1140).
--define(wxImage_SetMask, 1141).
--define(wxImage_SetMaskColour, 1142).
--define(wxImage_SetMaskFromImage, 1143).
--define(wxImage_SetOption_2_1, 1144).
--define(wxImage_SetOption_2_0, 1145).
--define(wxImage_SetPalette, 1146).
--define(wxImage_SetRGB_5, 1147).
--define(wxImage_SetRGB_4, 1148).
--define(wxImage_destroy, 1149).
--define(wxBrush_new_0, 1150).
--define(wxBrush_new_2, 1151).
--define(wxBrush_new_1, 1152).
--define(wxBrush_destruct, 1154).
--define(wxBrush_GetColour, 1155).
--define(wxBrush_GetStipple, 1156).
--define(wxBrush_GetStyle, 1157).
--define(wxBrush_IsHatch, 1158).
--define(wxBrush_IsOk, 1159).
--define(wxBrush_SetColour_1, 1160).
--define(wxBrush_SetColour_3, 1161).
--define(wxBrush_SetStipple, 1162).
--define(wxBrush_SetStyle, 1163).
--define(wxPen_new_0, 1164).
--define(wxPen_new_2, 1165).
--define(wxPen_destruct, 1166).
--define(wxPen_GetCap, 1167).
--define(wxPen_GetColour, 1168).
--define(wxPen_GetJoin, 1169).
--define(wxPen_GetStyle, 1170).
--define(wxPen_GetWidth, 1171).
--define(wxPen_IsOk, 1172).
--define(wxPen_SetCap, 1173).
--define(wxPen_SetColour_1, 1174).
--define(wxPen_SetColour_3, 1175).
--define(wxPen_SetJoin, 1176).
--define(wxPen_SetStyle, 1177).
--define(wxPen_SetWidth, 1178).
--define(wxRegion_new_0, 1179).
--define(wxRegion_new_4, 1180).
--define(wxRegion_new_2, 1181).
--define(wxRegion_new_1_1, 1182).
--define(wxRegion_new_1_0, 1184).
--define(wxRegion_destruct, 1186).
--define(wxRegion_Clear, 1187).
--define(wxRegion_Contains_2, 1188).
--define(wxRegion_Contains_1_0, 1189).
--define(wxRegion_Contains_4, 1190).
--define(wxRegion_Contains_1_1, 1191).
--define(wxRegion_ConvertToBitmap, 1192).
--define(wxRegion_GetBox, 1193).
--define(wxRegion_Intersect_4, 1194).
--define(wxRegion_Intersect_1_1, 1195).
--define(wxRegion_Intersect_1_0, 1196).
--define(wxRegion_IsEmpty, 1197).
--define(wxRegion_Subtract_4, 1198).
--define(wxRegion_Subtract_1_1, 1199).
--define(wxRegion_Subtract_1_0, 1200).
--define(wxRegion_Offset_2, 1201).
--define(wxRegion_Offset_1, 1202).
--define(wxRegion_Union_4, 1203).
--define(wxRegion_Union_1_2, 1204).
--define(wxRegion_Union_1_1, 1205).
--define(wxRegion_Union_1_0, 1206).
--define(wxRegion_Union_3, 1207).
--define(wxRegion_Xor_4, 1208).
--define(wxRegion_Xor_1_1, 1209).
--define(wxRegion_Xor_1_0, 1210).
--define(wxAcceleratorTable_new_0, 1211).
--define(wxAcceleratorTable_new_2, 1212).
--define(wxAcceleratorTable_destruct, 1213).
--define(wxAcceleratorTable_Ok, 1214).
--define(wxAcceleratorEntry_new_1_0, 1215).
--define(wxAcceleratorEntry_new_1_1, 1216).
--define(wxAcceleratorEntry_GetCommand, 1217).
--define(wxAcceleratorEntry_GetFlags, 1218).
--define(wxAcceleratorEntry_GetKeyCode, 1219).
--define(wxAcceleratorEntry_Set, 1220).
--define(wxAcceleratorEntry_destroy, 1221).
--define(wxCaret_new_3, 1226).
--define(wxCaret_new_2, 1227).
--define(wxCaret_destruct, 1229).
--define(wxCaret_Create_3, 1230).
--define(wxCaret_Create_2, 1231).
--define(wxCaret_GetBlinkTime, 1232).
--define(wxCaret_GetPosition, 1234).
--define(wxCaret_GetSize, 1236).
--define(wxCaret_GetWindow, 1237).
--define(wxCaret_Hide, 1238).
--define(wxCaret_IsOk, 1239).
--define(wxCaret_IsVisible, 1240).
--define(wxCaret_Move_2, 1241).
--define(wxCaret_Move_1, 1242).
--define(wxCaret_SetBlinkTime, 1243).
--define(wxCaret_SetSize_2, 1244).
--define(wxCaret_SetSize_1, 1245).
--define(wxCaret_Show, 1246).
--define(wxSizer_Add_2_1, 1247).
--define(wxSizer_Add_2_0, 1248).
--define(wxSizer_Add_3, 1249).
--define(wxSizer_Add_2_3, 1250).
--define(wxSizer_Add_2_2, 1251).
--define(wxSizer_AddSpacer, 1252).
--define(wxSizer_AddStretchSpacer, 1253).
--define(wxSizer_CalcMin, 1254).
--define(wxSizer_Clear, 1255).
--define(wxSizer_Detach_1_2, 1256).
--define(wxSizer_Detach_1_1, 1257).
--define(wxSizer_Detach_1_0, 1258).
--define(wxSizer_Fit, 1259).
--define(wxSizer_FitInside, 1260).
--define(wxSizer_GetChildren, 1261).
--define(wxSizer_GetItem_2_1, 1262).
--define(wxSizer_GetItem_2_0, 1263).
--define(wxSizer_GetItem_1, 1264).
--define(wxSizer_GetSize, 1265).
--define(wxSizer_GetPosition, 1266).
--define(wxSizer_GetMinSize, 1267).
--define(wxSizer_Hide_2_0, 1268).
--define(wxSizer_Hide_2_1, 1269).
--define(wxSizer_Hide_1, 1270).
--define(wxSizer_Insert_3_1, 1271).
--define(wxSizer_Insert_3_0, 1272).
--define(wxSizer_Insert_4, 1273).
--define(wxSizer_Insert_3_3, 1274).
--define(wxSizer_Insert_3_2, 1275).
--define(wxSizer_Insert_2, 1276).
--define(wxSizer_InsertSpacer, 1277).
--define(wxSizer_InsertStretchSpacer, 1278).
--define(wxSizer_IsShown_1_2, 1279).
--define(wxSizer_IsShown_1_1, 1280).
--define(wxSizer_IsShown_1_0, 1281).
--define(wxSizer_Layout, 1282).
--define(wxSizer_Prepend_2_1, 1283).
--define(wxSizer_Prepend_2_0, 1284).
--define(wxSizer_Prepend_3, 1285).
--define(wxSizer_Prepend_2_3, 1286).
--define(wxSizer_Prepend_2_2, 1287).
--define(wxSizer_Prepend_1, 1288).
--define(wxSizer_PrependSpacer, 1289).
--define(wxSizer_PrependStretchSpacer, 1290).
--define(wxSizer_RecalcSizes, 1291).
--define(wxSizer_Remove_1_1, 1292).
--define(wxSizer_Remove_1_0, 1293).
--define(wxSizer_Replace_3_1, 1294).
--define(wxSizer_Replace_3_0, 1295).
--define(wxSizer_Replace_2, 1296).
--define(wxSizer_SetDimension, 1297).
--define(wxSizer_SetMinSize_2, 1298).
--define(wxSizer_SetMinSize_1, 1299).
--define(wxSizer_SetItemMinSize_3_2, 1300).
--define(wxSizer_SetItemMinSize_2_2, 1301).
--define(wxSizer_SetItemMinSize_3_1, 1302).
--define(wxSizer_SetItemMinSize_2_1, 1303).
--define(wxSizer_SetItemMinSize_3_0, 1304).
--define(wxSizer_SetItemMinSize_2_0, 1305).
--define(wxSizer_SetSizeHints, 1306).
--define(wxSizer_SetVirtualSizeHints, 1307).
--define(wxSizer_Show_2_2, 1308).
--define(wxSizer_Show_2_1, 1309).
--define(wxSizer_Show_2_0, 1310).
--define(wxSizer_Show_1, 1311).
--define(wxSizerFlags_new, 1312).
--define(wxSizerFlags_Align, 1313).
--define(wxSizerFlags_Border_2, 1314).
--define(wxSizerFlags_Border_1, 1315).
--define(wxSizerFlags_Center, 1316).
--define(wxSizerFlags_Centre, 1317).
--define(wxSizerFlags_Expand, 1318).
--define(wxSizerFlags_Left, 1319).
--define(wxSizerFlags_Proportion, 1320).
--define(wxSizerFlags_Right, 1321).
--define(wxSizerFlags_destroy, 1322).
--define(wxSizerItem_new_5_1, 1323).
--define(wxSizerItem_new_2_1, 1324).
--define(wxSizerItem_new_5_0, 1325).
--define(wxSizerItem_new_2_0, 1326).
--define(wxSizerItem_new_6, 1327).
--define(wxSizerItem_new_3, 1328).
--define(wxSizerItem_new_0, 1329).
--define(wxSizerItem_destruct, 1330).
--define(wxSizerItem_CalcMin, 1331).
--define(wxSizerItem_DeleteWindows, 1332).
--define(wxSizerItem_DetachSizer, 1333).
--define(wxSizerItem_GetBorder, 1334).
--define(wxSizerItem_GetFlag, 1335).
--define(wxSizerItem_GetMinSize, 1336).
--define(wxSizerItem_GetPosition, 1337).
--define(wxSizerItem_GetProportion, 1338).
--define(wxSizerItem_GetRatio, 1339).
--define(wxSizerItem_GetRect, 1340).
--define(wxSizerItem_GetSize, 1341).
--define(wxSizerItem_GetSizer, 1342).
--define(wxSizerItem_GetSpacer, 1343).
--define(wxSizerItem_GetUserData, 1344).
--define(wxSizerItem_GetWindow, 1345).
--define(wxSizerItem_IsSizer, 1346).
--define(wxSizerItem_IsShown, 1347).
--define(wxSizerItem_IsSpacer, 1348).
--define(wxSizerItem_IsWindow, 1349).
--define(wxSizerItem_SetBorder, 1350).
--define(wxSizerItem_SetDimension, 1351).
--define(wxSizerItem_SetFlag, 1352).
--define(wxSizerItem_SetInitSize, 1353).
--define(wxSizerItem_SetMinSize_1, 1354).
--define(wxSizerItem_SetMinSize_2, 1355).
--define(wxSizerItem_SetProportion, 1356).
--define(wxSizerItem_SetRatio_2, 1357).
--define(wxSizerItem_SetRatio_1_1, 1358).
--define(wxSizerItem_SetRatio_1_0, 1359).
--define(wxSizerItem_SetSizer, 1360).
--define(wxSizerItem_SetSpacer_1, 1361).
--define(wxSizerItem_SetSpacer_2, 1362).
--define(wxSizerItem_SetWindow, 1363).
--define(wxSizerItem_Show, 1364).
--define(wxBoxSizer_new, 1365).
--define(wxBoxSizer_GetOrientation, 1366).
--define(wxBoxSizer_destroy, 1367).
--define(wxStaticBoxSizer_new_2, 1368).
--define(wxStaticBoxSizer_new_3, 1369).
--define(wxStaticBoxSizer_GetStaticBox, 1370).
--define(wxStaticBoxSizer_destroy, 1371).
--define(wxGridSizer_new_4, 1372).
--define(wxGridSizer_new_2, 1373).
--define(wxGridSizer_GetCols, 1374).
--define(wxGridSizer_GetHGap, 1375).
--define(wxGridSizer_GetRows, 1376).
--define(wxGridSizer_GetVGap, 1377).
--define(wxGridSizer_SetCols, 1378).
--define(wxGridSizer_SetHGap, 1379).
--define(wxGridSizer_SetRows, 1380).
--define(wxGridSizer_SetVGap, 1381).
--define(wxGridSizer_destroy, 1382).
--define(wxFlexGridSizer_new_4, 1383).
--define(wxFlexGridSizer_new_2, 1384).
--define(wxFlexGridSizer_AddGrowableCol, 1385).
--define(wxFlexGridSizer_AddGrowableRow, 1386).
--define(wxFlexGridSizer_GetFlexibleDirection, 1387).
--define(wxFlexGridSizer_GetNonFlexibleGrowMode, 1388).
--define(wxFlexGridSizer_RemoveGrowableCol, 1389).
--define(wxFlexGridSizer_RemoveGrowableRow, 1390).
--define(wxFlexGridSizer_SetFlexibleDirection, 1391).
--define(wxFlexGridSizer_SetNonFlexibleGrowMode, 1392).
--define(wxFlexGridSizer_destroy, 1393).
--define(wxGridBagSizer_new, 1394).
--define(wxGridBagSizer_Add_3_2, 1395).
--define(wxGridBagSizer_Add_3_1, 1396).
--define(wxGridBagSizer_Add_4, 1397).
--define(wxGridBagSizer_Add_1_0, 1398).
--define(wxGridBagSizer_Add_2_1, 1399).
--define(wxGridBagSizer_Add_2_0, 1400).
--define(wxGridBagSizer_Add_3_0, 1401).
--define(wxGridBagSizer_Add_1_1, 1402).
--define(wxGridBagSizer_CalcMin, 1403).
--define(wxGridBagSizer_CheckForIntersection_2, 1404).
--define(wxGridBagSizer_CheckForIntersection_3, 1405).
--define(wxGridBagSizer_FindItem_1_1, 1406).
--define(wxGridBagSizer_FindItem_1_0, 1407).
--define(wxGridBagSizer_FindItemAtPoint, 1408).
--define(wxGridBagSizer_FindItemAtPosition, 1409).
--define(wxGridBagSizer_FindItemWithData, 1410).
--define(wxGridBagSizer_GetCellSize, 1411).
--define(wxGridBagSizer_GetEmptyCellSize, 1412).
--define(wxGridBagSizer_GetItemPosition_1_2, 1413).
--define(wxGridBagSizer_GetItemPosition_1_1, 1414).
--define(wxGridBagSizer_GetItemPosition_1_0, 1415).
--define(wxGridBagSizer_GetItemSpan_1_2, 1416).
--define(wxGridBagSizer_GetItemSpan_1_1, 1417).
--define(wxGridBagSizer_GetItemSpan_1_0, 1418).
--define(wxGridBagSizer_SetEmptyCellSize, 1419).
--define(wxGridBagSizer_SetItemPosition_2_2, 1420).
--define(wxGridBagSizer_SetItemPosition_2_1, 1421).
--define(wxGridBagSizer_SetItemPosition_2_0, 1422).
--define(wxGridBagSizer_SetItemSpan_2_2, 1423).
--define(wxGridBagSizer_SetItemSpan_2_1, 1424).
--define(wxGridBagSizer_SetItemSpan_2_0, 1425).
--define(wxGridBagSizer_destroy, 1426).
--define(wxStdDialogButtonSizer_new, 1427).
--define(wxStdDialogButtonSizer_AddButton, 1428).
--define(wxStdDialogButtonSizer_Realize, 1429).
--define(wxStdDialogButtonSizer_SetAffirmativeButton, 1430).
--define(wxStdDialogButtonSizer_SetCancelButton, 1431).
--define(wxStdDialogButtonSizer_SetNegativeButton, 1432).
--define(wxStdDialogButtonSizer_destroy, 1433).
--define(wxFont_new_0, 1434).
--define(wxFont_new_1, 1435).
--define(wxFont_new_5, 1436).
--define(wxFont_destruct, 1438).
--define(wxFont_IsFixedWidth, 1439).
--define(wxFont_GetDefaultEncoding, 1440).
--define(wxFont_GetFaceName, 1441).
--define(wxFont_GetFamily, 1442).
--define(wxFont_GetNativeFontInfoDesc, 1443).
--define(wxFont_GetNativeFontInfoUserDesc, 1444).
--define(wxFont_GetPointSize, 1445).
--define(wxFont_GetStyle, 1446).
--define(wxFont_GetUnderlined, 1447).
--define(wxFont_GetWeight, 1448).
--define(wxFont_Ok, 1449).
--define(wxFont_SetDefaultEncoding, 1450).
--define(wxFont_SetFaceName, 1451).
--define(wxFont_SetFamily, 1452).
--define(wxFont_SetPointSize, 1453).
--define(wxFont_SetStyle, 1454).
--define(wxFont_SetUnderlined, 1455).
--define(wxFont_SetWeight, 1456).
--define(wxToolTip_Enable, 1457).
--define(wxToolTip_SetDelay, 1458).
--define(wxToolTip_new, 1459).
--define(wxToolTip_SetTip, 1460).
--define(wxToolTip_GetTip, 1461).
--define(wxToolTip_GetWindow, 1462).
--define(wxToolTip_destroy, 1463).
--define(wxButton_new_3, 1465).
--define(wxButton_new_0, 1466).
--define(wxButton_destruct, 1467).
--define(wxButton_Create, 1468).
--define(wxButton_GetDefaultSize, 1469).
--define(wxButton_SetDefault, 1470).
--define(wxButton_SetLabel, 1471).
--define(wxBitmapButton_new_4, 1473).
--define(wxBitmapButton_new_0, 1474).
--define(wxBitmapButton_Create, 1475).
--define(wxBitmapButton_GetBitmapDisabled, 1476).
--define(wxBitmapButton_GetBitmapFocus, 1478).
--define(wxBitmapButton_GetBitmapLabel, 1480).
--define(wxBitmapButton_GetBitmapSelected, 1482).
--define(wxBitmapButton_SetBitmapDisabled, 1484).
--define(wxBitmapButton_SetBitmapFocus, 1485).
--define(wxBitmapButton_SetBitmapLabel, 1486).
--define(wxBitmapButton_SetBitmapSelected, 1487).
--define(wxBitmapButton_destroy, 1488).
--define(wxToggleButton_new_0, 1489).
--define(wxToggleButton_new_4, 1490).
--define(wxToggleButton_Create, 1491).
--define(wxToggleButton_GetValue, 1492).
--define(wxToggleButton_SetValue, 1493).
--define(wxToggleButton_destroy, 1494).
--define(wxCalendarCtrl_new_0, 1495).
--define(wxCalendarCtrl_new_3, 1496).
--define(wxCalendarCtrl_Create, 1497).
--define(wxCalendarCtrl_destruct, 1498).
--define(wxCalendarCtrl_SetDate, 1499).
--define(wxCalendarCtrl_GetDate, 1500).
--define(wxCalendarCtrl_EnableYearChange, 1501).
--define(wxCalendarCtrl_EnableMonthChange, 1502).
--define(wxCalendarCtrl_EnableHolidayDisplay, 1503).
--define(wxCalendarCtrl_SetHeaderColours, 1504).
--define(wxCalendarCtrl_GetHeaderColourFg, 1505).
--define(wxCalendarCtrl_GetHeaderColourBg, 1506).
--define(wxCalendarCtrl_SetHighlightColours, 1507).
--define(wxCalendarCtrl_GetHighlightColourFg, 1508).
--define(wxCalendarCtrl_GetHighlightColourBg, 1509).
--define(wxCalendarCtrl_SetHolidayColours, 1510).
--define(wxCalendarCtrl_GetHolidayColourFg, 1511).
--define(wxCalendarCtrl_GetHolidayColourBg, 1512).
--define(wxCalendarCtrl_GetAttr, 1513).
--define(wxCalendarCtrl_SetAttr, 1514).
--define(wxCalendarCtrl_SetHoliday, 1515).
--define(wxCalendarCtrl_ResetAttr, 1516).
--define(wxCalendarCtrl_HitTest, 1517).
--define(wxCalendarDateAttr_new_0, 1518).
--define(wxCalendarDateAttr_new_2_1, 1519).
--define(wxCalendarDateAttr_new_2_0, 1520).
--define(wxCalendarDateAttr_SetTextColour, 1521).
--define(wxCalendarDateAttr_SetBackgroundColour, 1522).
--define(wxCalendarDateAttr_SetBorderColour, 1523).
--define(wxCalendarDateAttr_SetFont, 1524).
--define(wxCalendarDateAttr_SetBorder, 1525).
--define(wxCalendarDateAttr_SetHoliday, 1526).
--define(wxCalendarDateAttr_HasTextColour, 1527).
--define(wxCalendarDateAttr_HasBackgroundColour, 1528).
--define(wxCalendarDateAttr_HasBorderColour, 1529).
--define(wxCalendarDateAttr_HasFont, 1530).
--define(wxCalendarDateAttr_HasBorder, 1531).
--define(wxCalendarDateAttr_IsHoliday, 1532).
--define(wxCalendarDateAttr_GetTextColour, 1533).
--define(wxCalendarDateAttr_GetBackgroundColour, 1534).
--define(wxCalendarDateAttr_GetBorderColour, 1535).
--define(wxCalendarDateAttr_GetFont, 1536).
--define(wxCalendarDateAttr_GetBorder, 1537).
--define(wxCalendarDateAttr_destroy, 1538).
--define(wxCheckBox_new_4, 1540).
--define(wxCheckBox_new_0, 1541).
--define(wxCheckBox_Create, 1542).
--define(wxCheckBox_GetValue, 1543).
--define(wxCheckBox_Get3StateValue, 1544).
--define(wxCheckBox_Is3rdStateAllowedForUser, 1545).
--define(wxCheckBox_Is3State, 1546).
--define(wxCheckBox_IsChecked, 1547).
--define(wxCheckBox_SetValue, 1548).
--define(wxCheckBox_Set3StateValue, 1549).
--define(wxCheckBox_destroy, 1550).
--define(wxCheckListBox_new_0, 1551).
--define(wxCheckListBox_new_3, 1553).
--define(wxCheckListBox_Check, 1554).
--define(wxCheckListBox_IsChecked, 1555).
--define(wxCheckListBox_destroy, 1556).
--define(wxChoice_new_3, 1559).
--define(wxChoice_new_0, 1560).
--define(wxChoice_destruct, 1562).
--define(wxChoice_Create, 1564).
--define(wxChoice_Delete, 1565).
--define(wxChoice_GetColumns, 1566).
--define(wxChoice_SetColumns, 1567).
--define(wxComboBox_new_0, 1568).
--define(wxComboBox_new_3, 1570).
--define(wxComboBox_destruct, 1571).
--define(wxComboBox_Create, 1573).
--define(wxComboBox_CanCopy, 1574).
--define(wxComboBox_CanCut, 1575).
--define(wxComboBox_CanPaste, 1576).
--define(wxComboBox_CanRedo, 1577).
--define(wxComboBox_CanUndo, 1578).
--define(wxComboBox_Copy, 1579).
--define(wxComboBox_Cut, 1580).
--define(wxComboBox_GetInsertionPoint, 1581).
--define(wxComboBox_GetLastPosition, 1582).
--define(wxComboBox_GetValue, 1583).
--define(wxComboBox_Paste, 1584).
--define(wxComboBox_Redo, 1585).
--define(wxComboBox_Replace, 1586).
--define(wxComboBox_Remove, 1587).
--define(wxComboBox_SetInsertionPoint, 1588).
--define(wxComboBox_SetInsertionPointEnd, 1589).
--define(wxComboBox_SetSelection_1, 1590).
--define(wxComboBox_SetSelection_2, 1591).
--define(wxComboBox_SetValue, 1592).
--define(wxComboBox_Undo, 1593).
--define(wxGauge_new_0, 1594).
--define(wxGauge_new_4, 1595).
--define(wxGauge_Create, 1596).
--define(wxGauge_GetBezelFace, 1597).
--define(wxGauge_GetRange, 1598).
--define(wxGauge_GetShadowWidth, 1599).
--define(wxGauge_GetValue, 1600).
--define(wxGauge_IsVertical, 1601).
--define(wxGauge_SetBezelFace, 1602).
--define(wxGauge_SetRange, 1603).
--define(wxGauge_SetShadowWidth, 1604).
--define(wxGauge_SetValue, 1605).
--define(wxGauge_Pulse, 1606).
--define(wxGauge_destroy, 1607).
--define(wxGenericDirCtrl_new_0, 1608).
--define(wxGenericDirCtrl_new_2, 1609).
--define(wxGenericDirCtrl_destruct, 1610).
--define(wxGenericDirCtrl_Create, 1611).
--define(wxGenericDirCtrl_Init, 1612).
--define(wxGenericDirCtrl_CollapseTree, 1613).
--define(wxGenericDirCtrl_ExpandPath, 1614).
--define(wxGenericDirCtrl_GetDefaultPath, 1615).
--define(wxGenericDirCtrl_GetPath, 1616).
--define(wxGenericDirCtrl_GetFilePath, 1617).
--define(wxGenericDirCtrl_GetFilter, 1618).
--define(wxGenericDirCtrl_GetFilterIndex, 1619).
--define(wxGenericDirCtrl_GetRootId, 1620).
--define(wxGenericDirCtrl_GetTreeCtrl, 1621).
--define(wxGenericDirCtrl_ReCreateTree, 1622).
--define(wxGenericDirCtrl_SetDefaultPath, 1623).
--define(wxGenericDirCtrl_SetFilter, 1624).
--define(wxGenericDirCtrl_SetFilterIndex, 1625).
--define(wxGenericDirCtrl_SetPath, 1626).
--define(wxStaticBox_new_4, 1628).
--define(wxStaticBox_new_0, 1629).
--define(wxStaticBox_Create, 1630).
--define(wxStaticBox_destroy, 1631).
--define(wxStaticLine_new_2, 1633).
--define(wxStaticLine_new_0, 1634).
--define(wxStaticLine_Create, 1635).
--define(wxStaticLine_IsVertical, 1636).
--define(wxStaticLine_GetDefaultSize, 1637).
--define(wxStaticLine_destroy, 1638).
--define(wxListBox_new_3, 1641).
--define(wxListBox_new_0, 1642).
--define(wxListBox_destruct, 1644).
--define(wxListBox_Create, 1646).
--define(wxListBox_Deselect, 1647).
--define(wxListBox_GetSelections, 1648).
--define(wxListBox_InsertItems, 1649).
--define(wxListBox_IsSelected, 1650).
--define(wxListBox_Set, 1652).
--define(wxListBox_HitTest, 1653).
--define(wxListBox_SetFirstItem_1_0, 1654).
--define(wxListBox_SetFirstItem_1_1, 1655).
--define(wxListCtrl_new_0, 1656).
--define(wxListCtrl_new_2, 1657).
--define(wxListCtrl_Arrange, 1658).
--define(wxListCtrl_AssignImageList, 1659).
--define(wxListCtrl_ClearAll, 1660).
--define(wxListCtrl_Create, 1661).
--define(wxListCtrl_DeleteAllItems, 1662).
--define(wxListCtrl_DeleteColumn, 1663).
--define(wxListCtrl_DeleteItem, 1664).
--define(wxListCtrl_EditLabel, 1665).
--define(wxListCtrl_EnsureVisible, 1666).
--define(wxListCtrl_FindItem_3_0, 1667).
--define(wxListCtrl_FindItem_3_1, 1668).
--define(wxListCtrl_GetColumn, 1669).
--define(wxListCtrl_GetColumnCount, 1670).
--define(wxListCtrl_GetColumnWidth, 1671).
--define(wxListCtrl_GetCountPerPage, 1672).
--define(wxListCtrl_GetEditControl, 1673).
--define(wxListCtrl_GetImageList, 1674).
--define(wxListCtrl_GetItem, 1675).
--define(wxListCtrl_GetItemBackgroundColour, 1676).
--define(wxListCtrl_GetItemCount, 1677).
--define(wxListCtrl_GetItemData, 1678).
--define(wxListCtrl_GetItemFont, 1679).
--define(wxListCtrl_GetItemPosition, 1680).
--define(wxListCtrl_GetItemRect, 1681).
--define(wxListCtrl_GetItemSpacing, 1682).
--define(wxListCtrl_GetItemState, 1683).
--define(wxListCtrl_GetItemText, 1684).
--define(wxListCtrl_GetItemTextColour, 1685).
--define(wxListCtrl_GetNextItem, 1686).
--define(wxListCtrl_GetSelectedItemCount, 1687).
--define(wxListCtrl_GetTextColour, 1688).
--define(wxListCtrl_GetTopItem, 1689).
--define(wxListCtrl_GetViewRect, 1690).
--define(wxListCtrl_HitTest, 1691).
--define(wxListCtrl_InsertColumn_2, 1692).
--define(wxListCtrl_InsertColumn_3, 1693).
--define(wxListCtrl_InsertItem_1, 1694).
--define(wxListCtrl_InsertItem_2_1, 1695).
--define(wxListCtrl_InsertItem_2_0, 1696).
--define(wxListCtrl_InsertItem_3, 1697).
--define(wxListCtrl_RefreshItem, 1698).
--define(wxListCtrl_RefreshItems, 1699).
--define(wxListCtrl_ScrollList, 1700).
--define(wxListCtrl_SetBackgroundColour, 1701).
--define(wxListCtrl_SetColumn, 1702).
--define(wxListCtrl_SetColumnWidth, 1703).
--define(wxListCtrl_SetImageList, 1704).
--define(wxListCtrl_SetItem_1, 1705).
--define(wxListCtrl_SetItem_4, 1706).
--define(wxListCtrl_SetItemBackgroundColour, 1707).
--define(wxListCtrl_SetItemCount, 1708).
--define(wxListCtrl_SetItemData, 1709).
--define(wxListCtrl_SetItemFont, 1710).
--define(wxListCtrl_SetItemImage, 1711).
--define(wxListCtrl_SetItemColumnImage, 1712).
--define(wxListCtrl_SetItemPosition, 1713).
--define(wxListCtrl_SetItemState, 1714).
--define(wxListCtrl_SetItemText, 1715).
--define(wxListCtrl_SetItemTextColour, 1716).
--define(wxListCtrl_SetSingleStyle, 1717).
--define(wxListCtrl_SetTextColour, 1718).
--define(wxListCtrl_SetWindowStyleFlag, 1719).
--define(wxListCtrl_SortItems, 1720).
--define(wxListCtrl_destroy, 1721).
--define(wxListView_ClearColumnImage, 1722).
--define(wxListView_Focus, 1723).
--define(wxListView_GetFirstSelected, 1724).
--define(wxListView_GetFocusedItem, 1725).
--define(wxListView_GetNextSelected, 1726).
--define(wxListView_IsSelected, 1727).
--define(wxListView_Select, 1728).
--define(wxListView_SetColumnImage, 1729).
--define(wxListItem_new_0, 1730).
--define(wxListItem_new_1, 1731).
--define(wxListItem_destruct, 1732).
--define(wxListItem_Clear, 1733).
--define(wxListItem_GetAlign, 1734).
--define(wxListItem_GetBackgroundColour, 1735).
--define(wxListItem_GetColumn, 1736).
--define(wxListItem_GetFont, 1737).
--define(wxListItem_GetId, 1738).
--define(wxListItem_GetImage, 1739).
--define(wxListItem_GetMask, 1740).
--define(wxListItem_GetState, 1741).
--define(wxListItem_GetText, 1742).
--define(wxListItem_GetTextColour, 1743).
--define(wxListItem_GetWidth, 1744).
--define(wxListItem_SetAlign, 1745).
--define(wxListItem_SetBackgroundColour, 1746).
--define(wxListItem_SetColumn, 1747).
--define(wxListItem_SetFont, 1748).
--define(wxListItem_SetId, 1749).
--define(wxListItem_SetImage, 1750).
--define(wxListItem_SetMask, 1751).
--define(wxListItem_SetState, 1752).
--define(wxListItem_SetStateMask, 1753).
--define(wxListItem_SetText, 1754).
--define(wxListItem_SetTextColour, 1755).
--define(wxListItem_SetWidth, 1756).
--define(wxListItemAttr_new_0, 1757).
--define(wxListItemAttr_new_3, 1758).
--define(wxListItemAttr_GetBackgroundColour, 1759).
--define(wxListItemAttr_GetFont, 1760).
--define(wxListItemAttr_GetTextColour, 1761).
--define(wxListItemAttr_HasBackgroundColour, 1762).
--define(wxListItemAttr_HasFont, 1763).
--define(wxListItemAttr_HasTextColour, 1764).
--define(wxListItemAttr_SetBackgroundColour, 1765).
--define(wxListItemAttr_SetFont, 1766).
--define(wxListItemAttr_SetTextColour, 1767).
--define(wxListItemAttr_destroy, 1768).
--define(wxImageList_new_0, 1769).
--define(wxImageList_new_3, 1770).
--define(wxImageList_Add_1, 1771).
--define(wxImageList_Add_2_0, 1772).
--define(wxImageList_Add_2_1, 1773).
--define(wxImageList_Create, 1774).
--define(wxImageList_Draw, 1776).
--define(wxImageList_GetBitmap, 1777).
--define(wxImageList_GetIcon, 1778).
--define(wxImageList_GetImageCount, 1779).
--define(wxImageList_GetSize, 1780).
--define(wxImageList_Remove, 1781).
--define(wxImageList_RemoveAll, 1782).
--define(wxImageList_Replace_2, 1783).
--define(wxImageList_Replace_3, 1784).
--define(wxImageList_destroy, 1785).
--define(wxTextAttr_new_0, 1786).
--define(wxTextAttr_new_2, 1787).
--define(wxTextAttr_GetAlignment, 1788).
--define(wxTextAttr_GetBackgroundColour, 1789).
--define(wxTextAttr_GetFont, 1790).
--define(wxTextAttr_GetLeftIndent, 1791).
--define(wxTextAttr_GetLeftSubIndent, 1792).
--define(wxTextAttr_GetRightIndent, 1793).
--define(wxTextAttr_GetTabs, 1794).
--define(wxTextAttr_GetTextColour, 1795).
--define(wxTextAttr_HasBackgroundColour, 1796).
--define(wxTextAttr_HasFont, 1797).
--define(wxTextAttr_HasTextColour, 1798).
--define(wxTextAttr_GetFlags, 1799).
--define(wxTextAttr_IsDefault, 1800).
--define(wxTextAttr_SetAlignment, 1801).
--define(wxTextAttr_SetBackgroundColour, 1802).
--define(wxTextAttr_SetFlags, 1803).
--define(wxTextAttr_SetFont, 1804).
--define(wxTextAttr_SetLeftIndent, 1805).
--define(wxTextAttr_SetRightIndent, 1806).
--define(wxTextAttr_SetTabs, 1807).
--define(wxTextAttr_SetTextColour, 1808).
--define(wxTextAttr_destroy, 1809).
--define(wxTextCtrl_new_3, 1811).
--define(wxTextCtrl_new_0, 1812).
--define(wxTextCtrl_destruct, 1814).
--define(wxTextCtrl_AppendText, 1815).
--define(wxTextCtrl_CanCopy, 1816).
--define(wxTextCtrl_CanCut, 1817).
--define(wxTextCtrl_CanPaste, 1818).
--define(wxTextCtrl_CanRedo, 1819).
--define(wxTextCtrl_CanUndo, 1820).
--define(wxTextCtrl_Clear, 1821).
--define(wxTextCtrl_Copy, 1822).
--define(wxTextCtrl_Create, 1823).
--define(wxTextCtrl_Cut, 1824).
--define(wxTextCtrl_DiscardEdits, 1825).
--define(wxTextCtrl_EmulateKeyPress, 1826).
--define(wxTextCtrl_GetDefaultStyle, 1827).
--define(wxTextCtrl_GetInsertionPoint, 1828).
--define(wxTextCtrl_GetLastPosition, 1829).
--define(wxTextCtrl_GetLineLength, 1830).
--define(wxTextCtrl_GetLineText, 1831).
--define(wxTextCtrl_GetNumberOfLines, 1832).
--define(wxTextCtrl_GetRange, 1833).
--define(wxTextCtrl_GetSelection, 1834).
--define(wxTextCtrl_GetStringSelection, 1835).
--define(wxTextCtrl_GetStyle, 1836).
--define(wxTextCtrl_GetValue, 1837).
--define(wxTextCtrl_IsEditable, 1838).
--define(wxTextCtrl_IsModified, 1839).
--define(wxTextCtrl_IsMultiLine, 1840).
--define(wxTextCtrl_IsSingleLine, 1841).
--define(wxTextCtrl_LoadFile, 1842).
--define(wxTextCtrl_MarkDirty, 1843).
--define(wxTextCtrl_Paste, 1844).
--define(wxTextCtrl_PositionToXY, 1845).
--define(wxTextCtrl_Redo, 1846).
--define(wxTextCtrl_Remove, 1847).
--define(wxTextCtrl_Replace, 1848).
--define(wxTextCtrl_SaveFile, 1849).
--define(wxTextCtrl_SetDefaultStyle, 1850).
--define(wxTextCtrl_SetEditable, 1851).
--define(wxTextCtrl_SetInsertionPoint, 1852).
--define(wxTextCtrl_SetInsertionPointEnd, 1853).
--define(wxTextCtrl_SetMaxLength, 1855).
--define(wxTextCtrl_SetSelection, 1856).
--define(wxTextCtrl_SetStyle, 1857).
--define(wxTextCtrl_SetValue, 1858).
--define(wxTextCtrl_ShowPosition, 1859).
--define(wxTextCtrl_Undo, 1860).
--define(wxTextCtrl_WriteText, 1861).
--define(wxTextCtrl_XYToPosition, 1862).
--define(wxNotebook_new_0, 1865).
--define(wxNotebook_new_3, 1866).
--define(wxNotebook_destruct, 1867).
--define(wxNotebook_AddPage, 1868).
--define(wxNotebook_AdvanceSelection, 1869).
--define(wxNotebook_AssignImageList, 1870).
--define(wxNotebook_Create, 1871).
--define(wxNotebook_DeleteAllPages, 1872).
--define(wxNotebook_DeletePage, 1873).
--define(wxNotebook_RemovePage, 1874).
--define(wxNotebook_GetCurrentPage, 1875).
--define(wxNotebook_GetImageList, 1876).
--define(wxNotebook_GetPage, 1878).
--define(wxNotebook_GetPageCount, 1879).
--define(wxNotebook_GetPageImage, 1880).
--define(wxNotebook_GetPageText, 1881).
--define(wxNotebook_GetRowCount, 1882).
--define(wxNotebook_GetSelection, 1883).
--define(wxNotebook_GetThemeBackgroundColour, 1884).
--define(wxNotebook_HitTest, 1886).
--define(wxNotebook_InsertPage, 1888).
--define(wxNotebook_SetImageList, 1889).
--define(wxNotebook_SetPadding, 1890).
--define(wxNotebook_SetPageSize, 1891).
--define(wxNotebook_SetPageImage, 1892).
--define(wxNotebook_SetPageText, 1893).
--define(wxNotebook_SetSelection, 1894).
--define(wxNotebook_ChangeSelection, 1895).
--define(wxChoicebook_new_0, 1896).
--define(wxChoicebook_new_3, 1897).
--define(wxChoicebook_AddPage, 1898).
--define(wxChoicebook_AdvanceSelection, 1899).
--define(wxChoicebook_AssignImageList, 1900).
--define(wxChoicebook_Create, 1901).
--define(wxChoicebook_DeleteAllPages, 1902).
--define(wxChoicebook_DeletePage, 1903).
--define(wxChoicebook_RemovePage, 1904).
--define(wxChoicebook_GetCurrentPage, 1905).
--define(wxChoicebook_GetImageList, 1906).
--define(wxChoicebook_GetPage, 1908).
--define(wxChoicebook_GetPageCount, 1909).
--define(wxChoicebook_GetPageImage, 1910).
--define(wxChoicebook_GetPageText, 1911).
--define(wxChoicebook_GetSelection, 1912).
--define(wxChoicebook_HitTest, 1913).
--define(wxChoicebook_InsertPage, 1914).
--define(wxChoicebook_SetImageList, 1915).
--define(wxChoicebook_SetPageSize, 1916).
--define(wxChoicebook_SetPageImage, 1917).
--define(wxChoicebook_SetPageText, 1918).
--define(wxChoicebook_SetSelection, 1919).
--define(wxChoicebook_ChangeSelection, 1920).
--define(wxChoicebook_destroy, 1921).
--define(wxToolbook_new_0, 1922).
--define(wxToolbook_new_3, 1923).
--define(wxToolbook_AddPage, 1924).
--define(wxToolbook_AdvanceSelection, 1925).
--define(wxToolbook_AssignImageList, 1926).
--define(wxToolbook_Create, 1927).
--define(wxToolbook_DeleteAllPages, 1928).
--define(wxToolbook_DeletePage, 1929).
--define(wxToolbook_RemovePage, 1930).
--define(wxToolbook_GetCurrentPage, 1931).
--define(wxToolbook_GetImageList, 1932).
--define(wxToolbook_GetPage, 1934).
--define(wxToolbook_GetPageCount, 1935).
--define(wxToolbook_GetPageImage, 1936).
--define(wxToolbook_GetPageText, 1937).
--define(wxToolbook_GetSelection, 1938).
--define(wxToolbook_HitTest, 1940).
--define(wxToolbook_InsertPage, 1941).
--define(wxToolbook_SetImageList, 1942).
--define(wxToolbook_SetPageSize, 1943).
--define(wxToolbook_SetPageImage, 1944).
--define(wxToolbook_SetPageText, 1945).
--define(wxToolbook_SetSelection, 1946).
--define(wxToolbook_ChangeSelection, 1947).
--define(wxToolbook_destroy, 1948).
--define(wxListbook_new_0, 1949).
--define(wxListbook_new_3, 1950).
--define(wxListbook_AddPage, 1951).
--define(wxListbook_AdvanceSelection, 1952).
--define(wxListbook_AssignImageList, 1953).
--define(wxListbook_Create, 1954).
--define(wxListbook_DeleteAllPages, 1955).
--define(wxListbook_DeletePage, 1956).
--define(wxListbook_RemovePage, 1957).
--define(wxListbook_GetCurrentPage, 1958).
--define(wxListbook_GetImageList, 1959).
--define(wxListbook_GetPage, 1961).
--define(wxListbook_GetPageCount, 1962).
--define(wxListbook_GetPageImage, 1963).
--define(wxListbook_GetPageText, 1964).
--define(wxListbook_GetSelection, 1965).
--define(wxListbook_HitTest, 1967).
--define(wxListbook_InsertPage, 1968).
--define(wxListbook_SetImageList, 1969).
--define(wxListbook_SetPageSize, 1970).
--define(wxListbook_SetPageImage, 1971).
--define(wxListbook_SetPageText, 1972).
--define(wxListbook_SetSelection, 1973).
--define(wxListbook_ChangeSelection, 1974).
--define(wxListbook_destroy, 1975).
--define(wxTreebook_new_0, 1976).
--define(wxTreebook_new_3, 1977).
--define(wxTreebook_AddPage, 1978).
--define(wxTreebook_AdvanceSelection, 1979).
--define(wxTreebook_AssignImageList, 1980).
--define(wxTreebook_Create, 1981).
--define(wxTreebook_DeleteAllPages, 1982).
--define(wxTreebook_DeletePage, 1983).
--define(wxTreebook_RemovePage, 1984).
--define(wxTreebook_GetCurrentPage, 1985).
--define(wxTreebook_GetImageList, 1986).
--define(wxTreebook_GetPage, 1988).
--define(wxTreebook_GetPageCount, 1989).
--define(wxTreebook_GetPageImage, 1990).
--define(wxTreebook_GetPageText, 1991).
--define(wxTreebook_GetSelection, 1992).
--define(wxTreebook_ExpandNode, 1993).
--define(wxTreebook_IsNodeExpanded, 1994).
--define(wxTreebook_HitTest, 1996).
--define(wxTreebook_InsertPage, 1997).
--define(wxTreebook_InsertSubPage, 1998).
--define(wxTreebook_SetImageList, 1999).
--define(wxTreebook_SetPageSize, 2000).
--define(wxTreebook_SetPageImage, 2001).
--define(wxTreebook_SetPageText, 2002).
--define(wxTreebook_SetSelection, 2003).
--define(wxTreebook_ChangeSelection, 2004).
--define(wxTreebook_destroy, 2005).
--define(wxTreeCtrl_new_2, 2008).
--define(wxTreeCtrl_new_0, 2009).
--define(wxTreeCtrl_destruct, 2011).
--define(wxTreeCtrl_AddRoot, 2012).
--define(wxTreeCtrl_AppendItem, 2013).
--define(wxTreeCtrl_AssignImageList, 2014).
--define(wxTreeCtrl_AssignStateImageList, 2015).
--define(wxTreeCtrl_Collapse, 2016).
--define(wxTreeCtrl_CollapseAndReset, 2017).
--define(wxTreeCtrl_Create, 2018).
--define(wxTreeCtrl_Delete, 2019).
--define(wxTreeCtrl_DeleteAllItems, 2020).
--define(wxTreeCtrl_DeleteChildren, 2021).
--define(wxTreeCtrl_EditLabel, 2022).
--define(wxTreeCtrl_EnsureVisible, 2023).
--define(wxTreeCtrl_Expand, 2024).
--define(wxTreeCtrl_GetBoundingRect, 2025).
--define(wxTreeCtrl_GetChildrenCount, 2027).
--define(wxTreeCtrl_GetCount, 2028).
--define(wxTreeCtrl_GetEditControl, 2029).
--define(wxTreeCtrl_GetFirstChild, 2030).
--define(wxTreeCtrl_GetNextChild, 2031).
--define(wxTreeCtrl_GetFirstVisibleItem, 2032).
--define(wxTreeCtrl_GetImageList, 2033).
--define(wxTreeCtrl_GetIndent, 2034).
--define(wxTreeCtrl_GetItemBackgroundColour, 2035).
--define(wxTreeCtrl_GetItemData, 2036).
--define(wxTreeCtrl_GetItemFont, 2037).
--define(wxTreeCtrl_GetItemImage_1, 2038).
--define(wxTreeCtrl_GetItemImage_2, 2039).
--define(wxTreeCtrl_GetItemText, 2040).
--define(wxTreeCtrl_GetItemTextColour, 2041).
--define(wxTreeCtrl_GetLastChild, 2042).
--define(wxTreeCtrl_GetNextSibling, 2043).
--define(wxTreeCtrl_GetNextVisible, 2044).
--define(wxTreeCtrl_GetItemParent, 2045).
--define(wxTreeCtrl_GetPrevSibling, 2046).
--define(wxTreeCtrl_GetPrevVisible, 2047).
--define(wxTreeCtrl_GetRootItem, 2048).
--define(wxTreeCtrl_GetSelection, 2049).
--define(wxTreeCtrl_GetSelections, 2050).
--define(wxTreeCtrl_GetStateImageList, 2051).
--define(wxTreeCtrl_HitTest, 2052).
--define(wxTreeCtrl_InsertItem, 2054).
--define(wxTreeCtrl_IsBold, 2055).
--define(wxTreeCtrl_IsExpanded, 2056).
--define(wxTreeCtrl_IsSelected, 2057).
--define(wxTreeCtrl_IsVisible, 2058).
--define(wxTreeCtrl_ItemHasChildren, 2059).
--define(wxTreeCtrl_PrependItem, 2060).
--define(wxTreeCtrl_ScrollTo, 2061).
--define(wxTreeCtrl_SelectItem_1, 2062).
--define(wxTreeCtrl_SelectItem_2, 2063).
--define(wxTreeCtrl_SetIndent, 2064).
--define(wxTreeCtrl_SetImageList, 2065).
--define(wxTreeCtrl_SetItemBackgroundColour, 2066).
--define(wxTreeCtrl_SetItemBold, 2067).
--define(wxTreeCtrl_SetItemData, 2068).
--define(wxTreeCtrl_SetItemDropHighlight, 2069).
--define(wxTreeCtrl_SetItemFont, 2070).
--define(wxTreeCtrl_SetItemHasChildren, 2071).
--define(wxTreeCtrl_SetItemImage_2, 2072).
--define(wxTreeCtrl_SetItemImage_3, 2073).
--define(wxTreeCtrl_SetItemText, 2074).
--define(wxTreeCtrl_SetItemTextColour, 2075).
--define(wxTreeCtrl_SetStateImageList, 2076).
--define(wxTreeCtrl_SetWindowStyle, 2077).
--define(wxTreeCtrl_SortChildren, 2078).
--define(wxTreeCtrl_Toggle, 2079).
--define(wxTreeCtrl_ToggleItemSelection, 2080).
--define(wxTreeCtrl_Unselect, 2081).
--define(wxTreeCtrl_UnselectAll, 2082).
--define(wxTreeCtrl_UnselectItem, 2083).
--define(wxScrollBar_new_0, 2084).
--define(wxScrollBar_new_3, 2085).
--define(wxScrollBar_destruct, 2086).
--define(wxScrollBar_Create, 2087).
--define(wxScrollBar_GetRange, 2088).
--define(wxScrollBar_GetPageSize, 2089).
--define(wxScrollBar_GetThumbPosition, 2090).
--define(wxScrollBar_GetThumbSize, 2091).
--define(wxScrollBar_SetThumbPosition, 2092).
--define(wxScrollBar_SetScrollbar, 2093).
--define(wxSpinButton_new_2, 2095).
--define(wxSpinButton_new_0, 2096).
--define(wxSpinButton_Create, 2097).
--define(wxSpinButton_GetMax, 2098).
--define(wxSpinButton_GetMin, 2099).
--define(wxSpinButton_GetValue, 2100).
--define(wxSpinButton_SetRange, 2101).
--define(wxSpinButton_SetValue, 2102).
--define(wxSpinButton_destroy, 2103).
--define(wxSpinCtrl_new_0, 2104).
--define(wxSpinCtrl_new_2, 2105).
--define(wxSpinCtrl_Create, 2107).
--define(wxSpinCtrl_SetValue_1_1, 2110).
--define(wxSpinCtrl_SetValue_1_0, 2111).
--define(wxSpinCtrl_GetValue, 2113).
--define(wxSpinCtrl_SetRange, 2115).
--define(wxSpinCtrl_SetSelection, 2116).
--define(wxSpinCtrl_GetMin, 2118).
--define(wxSpinCtrl_GetMax, 2120).
--define(wxSpinCtrl_destroy, 2121).
--define(wxStaticText_new_0, 2122).
--define(wxStaticText_new_4, 2123).
--define(wxStaticText_Create, 2124).
--define(wxStaticText_GetLabel, 2125).
--define(wxStaticText_SetLabel, 2126).
--define(wxStaticText_Wrap, 2127).
--define(wxStaticText_destroy, 2128).
--define(wxStaticBitmap_new_0, 2129).
--define(wxStaticBitmap_new_4, 2130).
--define(wxStaticBitmap_Create, 2131).
--define(wxStaticBitmap_GetBitmap, 2132).
--define(wxStaticBitmap_SetBitmap, 2133).
--define(wxStaticBitmap_destroy, 2134).
--define(wxRadioBox_new, 2135).
--define(wxRadioBox_destruct, 2137).
--define(wxRadioBox_Create, 2138).
--define(wxRadioBox_Enable_2, 2139).
--define(wxRadioBox_Enable_1, 2140).
--define(wxRadioBox_GetSelection, 2141).
--define(wxRadioBox_GetString, 2142).
--define(wxRadioBox_SetSelection, 2143).
--define(wxRadioBox_Show_2, 2144).
--define(wxRadioBox_Show_1, 2145).
--define(wxRadioBox_GetColumnCount, 2146).
--define(wxRadioBox_GetItemHelpText, 2147).
--define(wxRadioBox_GetItemToolTip, 2148).
--define(wxRadioBox_GetItemFromPoint, 2150).
--define(wxRadioBox_GetRowCount, 2151).
--define(wxRadioBox_IsItemEnabled, 2152).
--define(wxRadioBox_IsItemShown, 2153).
--define(wxRadioBox_SetItemHelpText, 2154).
--define(wxRadioBox_SetItemToolTip, 2155).
--define(wxRadioButton_new_0, 2156).
--define(wxRadioButton_new_4, 2157).
--define(wxRadioButton_Create, 2158).
--define(wxRadioButton_GetValue, 2159).
--define(wxRadioButton_SetValue, 2160).
--define(wxRadioButton_destroy, 2161).
--define(wxSlider_new_6, 2163).
--define(wxSlider_new_0, 2164).
--define(wxSlider_Create, 2165).
--define(wxSlider_GetLineSize, 2166).
--define(wxSlider_GetMax, 2167).
--define(wxSlider_GetMin, 2168).
--define(wxSlider_GetPageSize, 2169).
--define(wxSlider_GetThumbLength, 2170).
--define(wxSlider_GetValue, 2171).
--define(wxSlider_SetLineSize, 2172).
--define(wxSlider_SetPageSize, 2173).
--define(wxSlider_SetRange, 2174).
--define(wxSlider_SetThumbLength, 2175).
--define(wxSlider_SetValue, 2176).
--define(wxSlider_destroy, 2177).
--define(wxDialog_new_4, 2179).
--define(wxDialog_new_0, 2180).
--define(wxDialog_destruct, 2182).
--define(wxDialog_Create, 2183).
--define(wxDialog_CreateButtonSizer, 2184).
--define(wxDialog_CreateStdDialogButtonSizer, 2185).
--define(wxDialog_EndModal, 2186).
--define(wxDialog_GetAffirmativeId, 2187).
--define(wxDialog_GetReturnCode, 2188).
--define(wxDialog_IsModal, 2189).
--define(wxDialog_SetAffirmativeId, 2190).
--define(wxDialog_SetReturnCode, 2191).
--define(wxDialog_Show, 2192).
--define(wxDialog_ShowModal, 2193).
--define(wxColourDialog_new_0, 2194).
--define(wxColourDialog_new_2, 2195).
--define(wxColourDialog_destruct, 2196).
--define(wxColourDialog_Create, 2197).
--define(wxColourDialog_GetColourData, 2198).
--define(wxColourData_new_0, 2199).
--define(wxColourData_new_1, 2200).
--define(wxColourData_destruct, 2201).
--define(wxColourData_GetChooseFull, 2202).
--define(wxColourData_GetColour, 2203).
--define(wxColourData_GetCustomColour, 2205).
--define(wxColourData_SetChooseFull, 2206).
--define(wxColourData_SetColour, 2207).
--define(wxColourData_SetCustomColour, 2208).
--define(wxPalette_new_0, 2209).
--define(wxPalette_new_4, 2210).
--define(wxPalette_destruct, 2212).
--define(wxPalette_Create, 2213).
--define(wxPalette_GetColoursCount, 2214).
--define(wxPalette_GetPixel, 2215).
--define(wxPalette_GetRGB, 2216).
--define(wxPalette_IsOk, 2217).
--define(wxDirDialog_new, 2221).
--define(wxDirDialog_destruct, 2222).
--define(wxDirDialog_GetPath, 2223).
--define(wxDirDialog_GetMessage, 2224).
--define(wxDirDialog_SetMessage, 2225).
--define(wxDirDialog_SetPath, 2226).
--define(wxFileDialog_new, 2230).
--define(wxFileDialog_destruct, 2231).
--define(wxFileDialog_GetDirectory, 2232).
--define(wxFileDialog_GetFilename, 2233).
--define(wxFileDialog_GetFilenames, 2234).
--define(wxFileDialog_GetFilterIndex, 2235).
--define(wxFileDialog_GetMessage, 2236).
--define(wxFileDialog_GetPath, 2237).
--define(wxFileDialog_GetPaths, 2238).
--define(wxFileDialog_GetWildcard, 2239).
--define(wxFileDialog_SetDirectory, 2240).
--define(wxFileDialog_SetFilename, 2241).
--define(wxFileDialog_SetFilterIndex, 2242).
--define(wxFileDialog_SetMessage, 2243).
--define(wxFileDialog_SetPath, 2244).
--define(wxFileDialog_SetWildcard, 2245).
--define(wxPickerBase_SetInternalMargin, 2246).
--define(wxPickerBase_GetInternalMargin, 2247).
--define(wxPickerBase_SetTextCtrlProportion, 2248).
--define(wxPickerBase_SetPickerCtrlProportion, 2249).
--define(wxPickerBase_GetTextCtrlProportion, 2250).
--define(wxPickerBase_GetPickerCtrlProportion, 2251).
--define(wxPickerBase_HasTextCtrl, 2252).
--define(wxPickerBase_GetTextCtrl, 2253).
--define(wxPickerBase_IsTextCtrlGrowable, 2254).
--define(wxPickerBase_SetPickerCtrlGrowable, 2255).
--define(wxPickerBase_SetTextCtrlGrowable, 2256).
--define(wxPickerBase_IsPickerCtrlGrowable, 2257).
--define(wxFilePickerCtrl_new_0, 2258).
--define(wxFilePickerCtrl_new_3, 2259).
--define(wxFilePickerCtrl_Create, 2260).
--define(wxFilePickerCtrl_GetPath, 2261).
--define(wxFilePickerCtrl_SetPath, 2262).
--define(wxFilePickerCtrl_destroy, 2263).
--define(wxDirPickerCtrl_new_0, 2264).
--define(wxDirPickerCtrl_new_3, 2265).
--define(wxDirPickerCtrl_Create, 2266).
--define(wxDirPickerCtrl_GetPath, 2267).
--define(wxDirPickerCtrl_SetPath, 2268).
--define(wxDirPickerCtrl_destroy, 2269).
--define(wxColourPickerCtrl_new_0, 2270).
--define(wxColourPickerCtrl_new_3, 2271).
--define(wxColourPickerCtrl_Create, 2272).
--define(wxColourPickerCtrl_GetColour, 2273).
--define(wxColourPickerCtrl_SetColour_1_1, 2274).
--define(wxColourPickerCtrl_SetColour_1_0, 2275).
--define(wxColourPickerCtrl_destroy, 2276).
--define(wxDatePickerCtrl_new_0, 2277).
--define(wxDatePickerCtrl_new_3, 2278).
--define(wxDatePickerCtrl_GetRange, 2279).
--define(wxDatePickerCtrl_GetValue, 2280).
--define(wxDatePickerCtrl_SetRange, 2281).
--define(wxDatePickerCtrl_SetValue, 2282).
--define(wxDatePickerCtrl_destroy, 2283).
--define(wxFontPickerCtrl_new_0, 2284).
--define(wxFontPickerCtrl_new_3, 2285).
--define(wxFontPickerCtrl_Create, 2286).
--define(wxFontPickerCtrl_GetSelectedFont, 2287).
--define(wxFontPickerCtrl_SetSelectedFont, 2288).
--define(wxFontPickerCtrl_GetMaxPointSize, 2289).
--define(wxFontPickerCtrl_SetMaxPointSize, 2290).
--define(wxFontPickerCtrl_destroy, 2291).
--define(wxFindReplaceDialog_new_0, 2294).
--define(wxFindReplaceDialog_new_4, 2295).
--define(wxFindReplaceDialog_destruct, 2296).
--define(wxFindReplaceDialog_Create, 2297).
--define(wxFindReplaceDialog_GetData, 2298).
--define(wxFindReplaceData_new_0, 2299).
--define(wxFindReplaceData_new_1, 2300).
--define(wxFindReplaceData_GetFindString, 2301).
--define(wxFindReplaceData_GetReplaceString, 2302).
--define(wxFindReplaceData_GetFlags, 2303).
--define(wxFindReplaceData_SetFlags, 2304).
--define(wxFindReplaceData_SetFindString, 2305).
--define(wxFindReplaceData_SetReplaceString, 2306).
--define(wxFindReplaceData_destroy, 2307).
--define(wxMultiChoiceDialog_new_0, 2308).
--define(wxMultiChoiceDialog_new_5, 2310).
--define(wxMultiChoiceDialog_GetSelections, 2311).
--define(wxMultiChoiceDialog_SetSelections, 2312).
--define(wxMultiChoiceDialog_destroy, 2313).
--define(wxSingleChoiceDialog_new_0, 2314).
--define(wxSingleChoiceDialog_new_5, 2316).
--define(wxSingleChoiceDialog_GetSelection, 2317).
--define(wxSingleChoiceDialog_GetStringSelection, 2318).
--define(wxSingleChoiceDialog_SetSelection, 2319).
--define(wxSingleChoiceDialog_destroy, 2320).
--define(wxTextEntryDialog_new, 2321).
--define(wxTextEntryDialog_GetValue, 2322).
--define(wxTextEntryDialog_SetValue, 2323).
--define(wxTextEntryDialog_destroy, 2324).
--define(wxPasswordEntryDialog_new, 2325).
--define(wxPasswordEntryDialog_destroy, 2326).
--define(wxFontData_new_0, 2327).
--define(wxFontData_new_1, 2328).
--define(wxFontData_destruct, 2329).
--define(wxFontData_EnableEffects, 2330).
--define(wxFontData_GetAllowSymbols, 2331).
--define(wxFontData_GetColour, 2332).
--define(wxFontData_GetChosenFont, 2333).
--define(wxFontData_GetEnableEffects, 2334).
--define(wxFontData_GetInitialFont, 2335).
--define(wxFontData_GetShowHelp, 2336).
--define(wxFontData_SetAllowSymbols, 2337).
--define(wxFontData_SetChosenFont, 2338).
--define(wxFontData_SetColour, 2339).
--define(wxFontData_SetInitialFont, 2340).
--define(wxFontData_SetRange, 2341).
--define(wxFontData_SetShowHelp, 2342).
--define(wxFontDialog_new_0, 2346).
--define(wxFontDialog_new_2, 2348).
--define(wxFontDialog_Create, 2350).
--define(wxFontDialog_GetFontData, 2351).
--define(wxFontDialog_destroy, 2353).
--define(wxProgressDialog_new, 2354).
--define(wxProgressDialog_destruct, 2355).
--define(wxProgressDialog_Resume, 2356).
--define(wxProgressDialog_Update_2, 2357).
--define(wxProgressDialog_Update_0, 2358).
--define(wxMessageDialog_new, 2359).
--define(wxMessageDialog_destruct, 2360).
--define(wxPageSetupDialog_new, 2361).
--define(wxPageSetupDialog_destruct, 2362).
--define(wxPageSetupDialog_GetPageSetupData, 2363).
--define(wxPageSetupDialog_ShowModal, 2364).
--define(wxPageSetupDialogData_new_0, 2365).
--define(wxPageSetupDialogData_new_1_0, 2366).
--define(wxPageSetupDialogData_new_1_1, 2367).
--define(wxPageSetupDialogData_destruct, 2368).
--define(wxPageSetupDialogData_EnableHelp, 2369).
--define(wxPageSetupDialogData_EnableMargins, 2370).
--define(wxPageSetupDialogData_EnableOrientation, 2371).
--define(wxPageSetupDialogData_EnablePaper, 2372).
--define(wxPageSetupDialogData_EnablePrinter, 2373).
--define(wxPageSetupDialogData_GetDefaultMinMargins, 2374).
--define(wxPageSetupDialogData_GetEnableMargins, 2375).
--define(wxPageSetupDialogData_GetEnableOrientation, 2376).
--define(wxPageSetupDialogData_GetEnablePaper, 2377).
--define(wxPageSetupDialogData_GetEnablePrinter, 2378).
--define(wxPageSetupDialogData_GetEnableHelp, 2379).
--define(wxPageSetupDialogData_GetDefaultInfo, 2380).
--define(wxPageSetupDialogData_GetMarginTopLeft, 2381).
--define(wxPageSetupDialogData_GetMarginBottomRight, 2382).
--define(wxPageSetupDialogData_GetMinMarginTopLeft, 2383).
--define(wxPageSetupDialogData_GetMinMarginBottomRight, 2384).
--define(wxPageSetupDialogData_GetPaperId, 2385).
--define(wxPageSetupDialogData_GetPaperSize, 2386).
--define(wxPageSetupDialogData_GetPrintData, 2388).
--define(wxPageSetupDialogData_IsOk, 2389).
--define(wxPageSetupDialogData_SetDefaultInfo, 2390).
--define(wxPageSetupDialogData_SetDefaultMinMargins, 2391).
--define(wxPageSetupDialogData_SetMarginTopLeft, 2392).
--define(wxPageSetupDialogData_SetMarginBottomRight, 2393).
--define(wxPageSetupDialogData_SetMinMarginTopLeft, 2394).
--define(wxPageSetupDialogData_SetMinMarginBottomRight, 2395).
--define(wxPageSetupDialogData_SetPaperId, 2396).
--define(wxPageSetupDialogData_SetPaperSize_1_1, 2397).
--define(wxPageSetupDialogData_SetPaperSize_1_0, 2398).
--define(wxPageSetupDialogData_SetPrintData, 2399).
--define(wxPrintDialog_new_2_0, 2400).
--define(wxPrintDialog_new_2_1, 2401).
--define(wxPrintDialog_destruct, 2402).
--define(wxPrintDialog_GetPrintDialogData, 2403).
--define(wxPrintDialog_GetPrintDC, 2404).
--define(wxPrintDialogData_new_0, 2405).
--define(wxPrintDialogData_new_1_1, 2406).
--define(wxPrintDialogData_new_1_0, 2407).
--define(wxPrintDialogData_destruct, 2408).
--define(wxPrintDialogData_EnableHelp, 2409).
--define(wxPrintDialogData_EnablePageNumbers, 2410).
--define(wxPrintDialogData_EnablePrintToFile, 2411).
--define(wxPrintDialogData_EnableSelection, 2412).
--define(wxPrintDialogData_GetAllPages, 2413).
--define(wxPrintDialogData_GetCollate, 2414).
--define(wxPrintDialogData_GetFromPage, 2415).
--define(wxPrintDialogData_GetMaxPage, 2416).
--define(wxPrintDialogData_GetMinPage, 2417).
--define(wxPrintDialogData_GetNoCopies, 2418).
--define(wxPrintDialogData_GetPrintData, 2419).
--define(wxPrintDialogData_GetPrintToFile, 2420).
--define(wxPrintDialogData_GetSelection, 2421).
--define(wxPrintDialogData_GetToPage, 2422).
--define(wxPrintDialogData_IsOk, 2423).
--define(wxPrintDialogData_SetCollate, 2424).
--define(wxPrintDialogData_SetFromPage, 2425).
--define(wxPrintDialogData_SetMaxPage, 2426).
--define(wxPrintDialogData_SetMinPage, 2427).
--define(wxPrintDialogData_SetNoCopies, 2428).
--define(wxPrintDialogData_SetPrintData, 2429).
--define(wxPrintDialogData_SetPrintToFile, 2430).
--define(wxPrintDialogData_SetSelection, 2431).
--define(wxPrintDialogData_SetToPage, 2432).
--define(wxPrintData_new_0, 2433).
--define(wxPrintData_new_1, 2434).
--define(wxPrintData_destruct, 2435).
--define(wxPrintData_GetCollate, 2436).
--define(wxPrintData_GetBin, 2437).
--define(wxPrintData_GetColour, 2438).
--define(wxPrintData_GetDuplex, 2439).
--define(wxPrintData_GetNoCopies, 2440).
--define(wxPrintData_GetOrientation, 2441).
--define(wxPrintData_GetPaperId, 2442).
--define(wxPrintData_GetPrinterName, 2443).
--define(wxPrintData_GetQuality, 2444).
--define(wxPrintData_IsOk, 2445).
--define(wxPrintData_SetBin, 2446).
--define(wxPrintData_SetCollate, 2447).
--define(wxPrintData_SetColour, 2448).
--define(wxPrintData_SetDuplex, 2449).
--define(wxPrintData_SetNoCopies, 2450).
--define(wxPrintData_SetOrientation, 2451).
--define(wxPrintData_SetPaperId, 2452).
--define(wxPrintData_SetPrinterName, 2453).
--define(wxPrintData_SetQuality, 2454).
--define(wxPrintPreview_new_2, 2457).
--define(wxPrintPreview_new_3, 2458).
--define(wxPrintPreview_destruct, 2460).
--define(wxPrintPreview_GetCanvas, 2461).
--define(wxPrintPreview_GetCurrentPage, 2462).
--define(wxPrintPreview_GetFrame, 2463).
--define(wxPrintPreview_GetMaxPage, 2464).
--define(wxPrintPreview_GetMinPage, 2465).
--define(wxPrintPreview_GetPrintout, 2466).
--define(wxPrintPreview_GetPrintoutForPrinting, 2467).
--define(wxPrintPreview_IsOk, 2468).
--define(wxPrintPreview_PaintPage, 2469).
--define(wxPrintPreview_Print, 2470).
--define(wxPrintPreview_RenderPage, 2471).
--define(wxPrintPreview_SetCanvas, 2472).
--define(wxPrintPreview_SetCurrentPage, 2473).
--define(wxPrintPreview_SetFrame, 2474).
--define(wxPrintPreview_SetPrintout, 2475).
--define(wxPrintPreview_SetZoom, 2476).
--define(wxPreviewFrame_new, 2477).
--define(wxPreviewFrame_destruct, 2478).
--define(wxPreviewFrame_CreateControlBar, 2479).
--define(wxPreviewFrame_CreateCanvas, 2480).
--define(wxPreviewFrame_Initialize, 2481).
--define(wxPreviewFrame_OnCloseWindow, 2482).
--define(wxPreviewControlBar_new, 2483).
--define(wxPreviewControlBar_destruct, 2484).
--define(wxPreviewControlBar_CreateButtons, 2485).
--define(wxPreviewControlBar_GetPrintPreview, 2486).
--define(wxPreviewControlBar_GetZoomControl, 2487).
--define(wxPreviewControlBar_SetZoomControl, 2488).
--define(wxPrinter_new, 2490).
--define(wxPrinter_CreateAbortWindow, 2491).
--define(wxPrinter_GetAbort, 2492).
--define(wxPrinter_GetLastError, 2493).
--define(wxPrinter_GetPrintDialogData, 2494).
--define(wxPrinter_Print, 2495).
--define(wxPrinter_PrintDialog, 2496).
--define(wxPrinter_ReportError, 2497).
--define(wxPrinter_Setup, 2498).
--define(wxPrinter_destroy, 2499).
--define(wxXmlResource_new_1, 2500).
--define(wxXmlResource_new_2, 2501).
--define(wxXmlResource_destruct, 2502).
--define(wxXmlResource_AttachUnknownControl, 2503).
--define(wxXmlResource_ClearHandlers, 2504).
--define(wxXmlResource_CompareVersion, 2505).
--define(wxXmlResource_Get, 2506).
--define(wxXmlResource_GetFlags, 2507).
--define(wxXmlResource_GetVersion, 2508).
--define(wxXmlResource_GetXRCID, 2509).
--define(wxXmlResource_InitAllHandlers, 2510).
--define(wxXmlResource_Load, 2511).
--define(wxXmlResource_LoadBitmap, 2512).
--define(wxXmlResource_LoadDialog_2, 2513).
--define(wxXmlResource_LoadDialog_3, 2514).
--define(wxXmlResource_LoadFrame_2, 2515).
--define(wxXmlResource_LoadFrame_3, 2516).
--define(wxXmlResource_LoadIcon, 2517).
--define(wxXmlResource_LoadMenu, 2518).
--define(wxXmlResource_LoadMenuBar_2, 2519).
--define(wxXmlResource_LoadMenuBar_1, 2520).
--define(wxXmlResource_LoadPanel_2, 2521).
--define(wxXmlResource_LoadPanel_3, 2522).
--define(wxXmlResource_LoadToolBar, 2523).
--define(wxXmlResource_Set, 2524).
--define(wxXmlResource_SetFlags, 2525).
--define(wxXmlResource_Unload, 2526).
--define(wxXmlResource_xrcctrl, 2527).
--define(wxHtmlEasyPrinting_new, 2528).
--define(wxHtmlEasyPrinting_destruct, 2529).
--define(wxHtmlEasyPrinting_GetPrintData, 2530).
--define(wxHtmlEasyPrinting_GetPageSetupData, 2531).
--define(wxHtmlEasyPrinting_PreviewFile, 2532).
--define(wxHtmlEasyPrinting_PreviewText, 2533).
--define(wxHtmlEasyPrinting_PrintFile, 2534).
--define(wxHtmlEasyPrinting_PrintText, 2535).
--define(wxHtmlEasyPrinting_PageSetup, 2536).
--define(wxHtmlEasyPrinting_SetFonts, 2537).
--define(wxHtmlEasyPrinting_SetHeader, 2538).
--define(wxHtmlEasyPrinting_SetFooter, 2539).
--define(wxGLCanvas_new_2, 2541).
--define(wxGLCanvas_new_3_1, 2542).
--define(wxGLCanvas_new_3_0, 2543).
--define(wxGLCanvas_GetContext, 2544).
--define(wxGLCanvas_SetCurrent, 2546).
--define(wxGLCanvas_SwapBuffers, 2547).
--define(wxGLCanvas_destroy, 2548).
--define(wxAuiManager_new, 2549).
--define(wxAuiManager_destruct, 2550).
--define(wxAuiManager_AddPane_2_1, 2551).
--define(wxAuiManager_AddPane_3, 2552).
--define(wxAuiManager_AddPane_2_0, 2553).
--define(wxAuiManager_DetachPane, 2554).
--define(wxAuiManager_GetAllPanes, 2555).
--define(wxAuiManager_GetArtProvider, 2556).
--define(wxAuiManager_GetDockSizeConstraint, 2557).
--define(wxAuiManager_GetFlags, 2558).
--define(wxAuiManager_GetManagedWindow, 2559).
--define(wxAuiManager_GetManager, 2560).
--define(wxAuiManager_GetPane_1_1, 2561).
--define(wxAuiManager_GetPane_1_0, 2562).
--define(wxAuiManager_HideHint, 2563).
--define(wxAuiManager_InsertPane, 2564).
--define(wxAuiManager_LoadPaneInfo, 2565).
--define(wxAuiManager_LoadPerspective, 2566).
--define(wxAuiManager_SavePaneInfo, 2567).
--define(wxAuiManager_SavePerspective, 2568).
--define(wxAuiManager_SetArtProvider, 2569).
--define(wxAuiManager_SetDockSizeConstraint, 2570).
--define(wxAuiManager_SetFlags, 2571).
--define(wxAuiManager_SetManagedWindow, 2572).
--define(wxAuiManager_ShowHint, 2573).
--define(wxAuiManager_UnInit, 2574).
--define(wxAuiManager_Update, 2575).
--define(wxAuiPaneInfo_new_0, 2576).
--define(wxAuiPaneInfo_new_1, 2577).
--define(wxAuiPaneInfo_destruct, 2578).
--define(wxAuiPaneInfo_BestSize_1, 2579).
--define(wxAuiPaneInfo_BestSize_2, 2580).
--define(wxAuiPaneInfo_Bottom, 2581).
--define(wxAuiPaneInfo_BottomDockable, 2582).
--define(wxAuiPaneInfo_Caption, 2583).
--define(wxAuiPaneInfo_CaptionVisible, 2584).
--define(wxAuiPaneInfo_Centre, 2585).
--define(wxAuiPaneInfo_CentrePane, 2586).
--define(wxAuiPaneInfo_CloseButton, 2587).
--define(wxAuiPaneInfo_DefaultPane, 2588).
--define(wxAuiPaneInfo_DestroyOnClose, 2589).
--define(wxAuiPaneInfo_Direction, 2590).
--define(wxAuiPaneInfo_Dock, 2591).
--define(wxAuiPaneInfo_Dockable, 2592).
--define(wxAuiPaneInfo_Fixed, 2593).
--define(wxAuiPaneInfo_Float, 2594).
--define(wxAuiPaneInfo_Floatable, 2595).
--define(wxAuiPaneInfo_FloatingPosition_1, 2596).
--define(wxAuiPaneInfo_FloatingPosition_2, 2597).
--define(wxAuiPaneInfo_FloatingSize_1, 2598).
--define(wxAuiPaneInfo_FloatingSize_2, 2599).
--define(wxAuiPaneInfo_Gripper, 2600).
--define(wxAuiPaneInfo_GripperTop, 2601).
--define(wxAuiPaneInfo_HasBorder, 2602).
--define(wxAuiPaneInfo_HasCaption, 2603).
--define(wxAuiPaneInfo_HasCloseButton, 2604).
--define(wxAuiPaneInfo_HasFlag, 2605).
--define(wxAuiPaneInfo_HasGripper, 2606).
--define(wxAuiPaneInfo_HasGripperTop, 2607).
--define(wxAuiPaneInfo_HasMaximizeButton, 2608).
--define(wxAuiPaneInfo_HasMinimizeButton, 2609).
--define(wxAuiPaneInfo_HasPinButton, 2610).
--define(wxAuiPaneInfo_Hide, 2611).
--define(wxAuiPaneInfo_IsBottomDockable, 2612).
--define(wxAuiPaneInfo_IsDocked, 2613).
--define(wxAuiPaneInfo_IsFixed, 2614).
--define(wxAuiPaneInfo_IsFloatable, 2615).
--define(wxAuiPaneInfo_IsFloating, 2616).
--define(wxAuiPaneInfo_IsLeftDockable, 2617).
--define(wxAuiPaneInfo_IsMovable, 2618).
--define(wxAuiPaneInfo_IsOk, 2619).
--define(wxAuiPaneInfo_IsResizable, 2620).
--define(wxAuiPaneInfo_IsRightDockable, 2621).
--define(wxAuiPaneInfo_IsShown, 2622).
--define(wxAuiPaneInfo_IsToolbar, 2623).
--define(wxAuiPaneInfo_IsTopDockable, 2624).
--define(wxAuiPaneInfo_Layer, 2625).
--define(wxAuiPaneInfo_Left, 2626).
--define(wxAuiPaneInfo_LeftDockable, 2627).
--define(wxAuiPaneInfo_MaxSize_1, 2628).
--define(wxAuiPaneInfo_MaxSize_2, 2629).
--define(wxAuiPaneInfo_MaximizeButton, 2630).
--define(wxAuiPaneInfo_MinSize_1, 2631).
--define(wxAuiPaneInfo_MinSize_2, 2632).
--define(wxAuiPaneInfo_MinimizeButton, 2633).
--define(wxAuiPaneInfo_Movable, 2634).
--define(wxAuiPaneInfo_Name, 2635).
--define(wxAuiPaneInfo_PaneBorder, 2636).
--define(wxAuiPaneInfo_PinButton, 2637).
--define(wxAuiPaneInfo_Position, 2638).
--define(wxAuiPaneInfo_Resizable, 2639).
--define(wxAuiPaneInfo_Right, 2640).
--define(wxAuiPaneInfo_RightDockable, 2641).
--define(wxAuiPaneInfo_Row, 2642).
--define(wxAuiPaneInfo_SafeSet, 2643).
--define(wxAuiPaneInfo_SetFlag, 2644).
--define(wxAuiPaneInfo_Show, 2645).
--define(wxAuiPaneInfo_ToolbarPane, 2646).
--define(wxAuiPaneInfo_Top, 2647).
--define(wxAuiPaneInfo_TopDockable, 2648).
--define(wxAuiPaneInfo_Window, 2649).
--define(wxAuiNotebook_new_0, 2650).
--define(wxAuiNotebook_new_2, 2651).
--define(wxAuiNotebook_AddPage, 2652).
--define(wxAuiNotebook_Create, 2653).
--define(wxAuiNotebook_DeletePage, 2654).
--define(wxAuiNotebook_GetArtProvider, 2655).
--define(wxAuiNotebook_GetPage, 2656).
--define(wxAuiNotebook_GetPageBitmap, 2657).
--define(wxAuiNotebook_GetPageCount, 2658).
--define(wxAuiNotebook_GetPageIndex, 2659).
--define(wxAuiNotebook_GetPageText, 2660).
--define(wxAuiNotebook_GetSelection, 2661).
--define(wxAuiNotebook_InsertPage, 2662).
--define(wxAuiNotebook_RemovePage, 2663).
--define(wxAuiNotebook_SetArtProvider, 2664).
--define(wxAuiNotebook_SetFont, 2665).
--define(wxAuiNotebook_SetPageBitmap, 2666).
--define(wxAuiNotebook_SetPageText, 2667).
--define(wxAuiNotebook_SetSelection, 2668).
--define(wxAuiNotebook_SetTabCtrlHeight, 2669).
--define(wxAuiNotebook_SetUniformBitmapSize, 2670).
--define(wxAuiNotebook_destroy, 2671).
--define(wxMDIParentFrame_new_0, 2672).
--define(wxMDIParentFrame_new_4, 2673).
--define(wxMDIParentFrame_destruct, 2674).
--define(wxMDIParentFrame_ActivateNext, 2675).
--define(wxMDIParentFrame_ActivatePrevious, 2676).
--define(wxMDIParentFrame_ArrangeIcons, 2677).
--define(wxMDIParentFrame_Cascade, 2678).
--define(wxMDIParentFrame_Create, 2679).
--define(wxMDIParentFrame_GetActiveChild, 2680).
--define(wxMDIParentFrame_GetClientWindow, 2681).
--define(wxMDIParentFrame_Tile, 2682).
--define(wxMDIChildFrame_new_0, 2683).
--define(wxMDIChildFrame_new_4, 2684).
--define(wxMDIChildFrame_destruct, 2685).
--define(wxMDIChildFrame_Activate, 2686).
--define(wxMDIChildFrame_Create, 2687).
--define(wxMDIChildFrame_Maximize, 2688).
--define(wxMDIChildFrame_Restore, 2689).
--define(wxMDIClientWindow_new_0, 2690).
--define(wxMDIClientWindow_new_2, 2691).
--define(wxMDIClientWindow_destruct, 2692).
--define(wxMDIClientWindow_CreateClient, 2693).
--define(wxLayoutAlgorithm_new, 2694).
--define(wxLayoutAlgorithm_LayoutFrame, 2695).
--define(wxLayoutAlgorithm_LayoutMDIFrame, 2696).
--define(wxLayoutAlgorithm_LayoutWindow, 2697).
--define(wxLayoutAlgorithm_destroy, 2698).
--define(wxEvent_GetId, 2699).
--define(wxEvent_GetSkipped, 2700).
--define(wxEvent_GetTimestamp, 2701).
--define(wxEvent_IsCommandEvent, 2702).
--define(wxEvent_ResumePropagation, 2703).
--define(wxEvent_ShouldPropagate, 2704).
--define(wxEvent_Skip, 2705).
--define(wxEvent_StopPropagation, 2706).
--define(wxCommandEvent_getClientData, 2707).
--define(wxCommandEvent_GetExtraLong, 2708).
--define(wxCommandEvent_GetInt, 2709).
--define(wxCommandEvent_GetSelection, 2710).
--define(wxCommandEvent_GetString, 2711).
--define(wxCommandEvent_IsChecked, 2712).
--define(wxCommandEvent_IsSelection, 2713).
--define(wxCommandEvent_SetInt, 2714).
--define(wxCommandEvent_SetString, 2715).
--define(wxScrollEvent_GetOrientation, 2716).
--define(wxScrollEvent_GetPosition, 2717).
--define(wxScrollWinEvent_GetOrientation, 2718).
--define(wxScrollWinEvent_GetPosition, 2719).
--define(wxMouseEvent_AltDown, 2720).
--define(wxMouseEvent_Button, 2721).
--define(wxMouseEvent_ButtonDClick, 2722).
--define(wxMouseEvent_ButtonDown, 2723).
--define(wxMouseEvent_ButtonUp, 2724).
--define(wxMouseEvent_CmdDown, 2725).
--define(wxMouseEvent_ControlDown, 2726).
--define(wxMouseEvent_Dragging, 2727).
--define(wxMouseEvent_Entering, 2728).
--define(wxMouseEvent_GetButton, 2729).
--define(wxMouseEvent_GetPosition, 2732).
--define(wxMouseEvent_GetLogicalPosition, 2733).
--define(wxMouseEvent_GetLinesPerAction, 2734).
--define(wxMouseEvent_GetWheelRotation, 2735).
--define(wxMouseEvent_GetWheelDelta, 2736).
--define(wxMouseEvent_GetX, 2737).
--define(wxMouseEvent_GetY, 2738).
--define(wxMouseEvent_IsButton, 2739).
--define(wxMouseEvent_IsPageScroll, 2740).
--define(wxMouseEvent_Leaving, 2741).
--define(wxMouseEvent_LeftDClick, 2742).
--define(wxMouseEvent_LeftDown, 2743).
--define(wxMouseEvent_LeftIsDown, 2744).
--define(wxMouseEvent_LeftUp, 2745).
--define(wxMouseEvent_MetaDown, 2746).
--define(wxMouseEvent_MiddleDClick, 2747).
--define(wxMouseEvent_MiddleDown, 2748).
--define(wxMouseEvent_MiddleIsDown, 2749).
--define(wxMouseEvent_MiddleUp, 2750).
--define(wxMouseEvent_Moving, 2751).
--define(wxMouseEvent_RightDClick, 2752).
--define(wxMouseEvent_RightDown, 2753).
--define(wxMouseEvent_RightIsDown, 2754).
--define(wxMouseEvent_RightUp, 2755).
--define(wxMouseEvent_ShiftDown, 2756).
--define(wxSetCursorEvent_GetCursor, 2757).
--define(wxSetCursorEvent_GetX, 2758).
--define(wxSetCursorEvent_GetY, 2759).
--define(wxSetCursorEvent_HasCursor, 2760).
--define(wxSetCursorEvent_SetCursor, 2761).
--define(wxKeyEvent_AltDown, 2762).
--define(wxKeyEvent_CmdDown, 2763).
--define(wxKeyEvent_ControlDown, 2764).
--define(wxKeyEvent_GetKeyCode, 2765).
--define(wxKeyEvent_GetModifiers, 2766).
--define(wxKeyEvent_GetPosition, 2769).
--define(wxKeyEvent_GetRawKeyCode, 2770).
--define(wxKeyEvent_GetRawKeyFlags, 2771).
--define(wxKeyEvent_GetUnicodeKey, 2772).
--define(wxKeyEvent_GetX, 2773).
--define(wxKeyEvent_GetY, 2774).
--define(wxKeyEvent_HasModifiers, 2775).
--define(wxKeyEvent_MetaDown, 2776).
--define(wxKeyEvent_ShiftDown, 2777).
--define(wxSizeEvent_GetSize, 2778).
--define(wxMoveEvent_GetPosition, 2779).
--define(wxEraseEvent_GetDC, 2780).
--define(wxFocusEvent_GetWindow, 2781).
--define(wxChildFocusEvent_GetWindow, 2782).
--define(wxMenuEvent_GetMenu, 2783).
--define(wxMenuEvent_GetMenuId, 2784).
--define(wxMenuEvent_IsPopup, 2785).
--define(wxCloseEvent_CanVeto, 2786).
--define(wxCloseEvent_GetLoggingOff, 2787).
--define(wxCloseEvent_SetCanVeto, 2788).
--define(wxCloseEvent_SetLoggingOff, 2789).
--define(wxCloseEvent_Veto, 2790).
--define(wxShowEvent_SetShow, 2791).
--define(wxShowEvent_GetShow, 2792).
--define(wxIconizeEvent_Iconized, 2793).
--define(wxJoystickEvent_ButtonDown, 2794).
--define(wxJoystickEvent_ButtonIsDown, 2795).
--define(wxJoystickEvent_ButtonUp, 2796).
--define(wxJoystickEvent_GetButtonChange, 2797).
--define(wxJoystickEvent_GetButtonState, 2798).
--define(wxJoystickEvent_GetJoystick, 2799).
--define(wxJoystickEvent_GetPosition, 2800).
--define(wxJoystickEvent_GetZPosition, 2801).
--define(wxJoystickEvent_IsButton, 2802).
--define(wxJoystickEvent_IsMove, 2803).
--define(wxJoystickEvent_IsZMove, 2804).
--define(wxUpdateUIEvent_CanUpdate, 2805).
--define(wxUpdateUIEvent_Check, 2806).
--define(wxUpdateUIEvent_Enable, 2807).
--define(wxUpdateUIEvent_Show, 2808).
--define(wxUpdateUIEvent_GetChecked, 2809).
--define(wxUpdateUIEvent_GetEnabled, 2810).
--define(wxUpdateUIEvent_GetShown, 2811).
--define(wxUpdateUIEvent_GetSetChecked, 2812).
--define(wxUpdateUIEvent_GetSetEnabled, 2813).
--define(wxUpdateUIEvent_GetSetShown, 2814).
--define(wxUpdateUIEvent_GetSetText, 2815).
--define(wxUpdateUIEvent_GetText, 2816).
--define(wxUpdateUIEvent_GetMode, 2817).
--define(wxUpdateUIEvent_GetUpdateInterval, 2818).
--define(wxUpdateUIEvent_ResetUpdateTime, 2819).
--define(wxUpdateUIEvent_SetMode, 2820).
--define(wxUpdateUIEvent_SetText, 2821).
--define(wxUpdateUIEvent_SetUpdateInterval, 2822).
--define(wxMouseCaptureChangedEvent_GetCapturedWindow, 2823).
--define(wxPaletteChangedEvent_SetChangedWindow, 2824).
--define(wxPaletteChangedEvent_GetChangedWindow, 2825).
--define(wxQueryNewPaletteEvent_SetPaletteRealized, 2826).
--define(wxQueryNewPaletteEvent_GetPaletteRealized, 2827).
--define(wxNavigationKeyEvent_GetDirection, 2828).
--define(wxNavigationKeyEvent_SetDirection, 2829).
--define(wxNavigationKeyEvent_IsWindowChange, 2830).
--define(wxNavigationKeyEvent_SetWindowChange, 2831).
--define(wxNavigationKeyEvent_IsFromTab, 2832).
--define(wxNavigationKeyEvent_SetFromTab, 2833).
--define(wxNavigationKeyEvent_GetCurrentFocus, 2834).
--define(wxNavigationKeyEvent_SetCurrentFocus, 2835).
--define(wxHelpEvent_GetOrigin, 2836).
--define(wxHelpEvent_GetPosition, 2837).
--define(wxHelpEvent_SetOrigin, 2838).
--define(wxHelpEvent_SetPosition, 2839).
--define(wxContextMenuEvent_GetPosition, 2840).
--define(wxContextMenuEvent_SetPosition, 2841).
--define(wxIdleEvent_CanSend, 2842).
--define(wxIdleEvent_GetMode, 2843).
--define(wxIdleEvent_RequestMore, 2844).
--define(wxIdleEvent_MoreRequested, 2845).
--define(wxIdleEvent_SetMode, 2846).
--define(wxGridEvent_AltDown, 2847).
--define(wxGridEvent_ControlDown, 2848).
--define(wxGridEvent_GetCol, 2849).
--define(wxGridEvent_GetPosition, 2850).
--define(wxGridEvent_GetRow, 2851).
--define(wxGridEvent_MetaDown, 2852).
--define(wxGridEvent_Selecting, 2853).
--define(wxGridEvent_ShiftDown, 2854).
--define(wxNotifyEvent_Allow, 2855).
--define(wxNotifyEvent_IsAllowed, 2856).
--define(wxNotifyEvent_Veto, 2857).
--define(wxSashEvent_GetEdge, 2858).
--define(wxSashEvent_GetDragRect, 2859).
--define(wxSashEvent_GetDragStatus, 2860).
--define(wxListEvent_GetCacheFrom, 2861).
--define(wxListEvent_GetCacheTo, 2862).
--define(wxListEvent_GetKeyCode, 2863).
--define(wxListEvent_GetIndex, 2864).
--define(wxListEvent_GetColumn, 2865).
--define(wxListEvent_GetPoint, 2866).
--define(wxListEvent_GetLabel, 2867).
--define(wxListEvent_GetText, 2868).
--define(wxListEvent_GetImage, 2869).
--define(wxListEvent_GetData, 2870).
--define(wxListEvent_GetMask, 2871).
--define(wxListEvent_GetItem, 2872).
--define(wxListEvent_IsEditCancelled, 2873).
--define(wxDateEvent_GetDate, 2874).
--define(wxCalendarEvent_GetWeekDay, 2875).
--define(wxFileDirPickerEvent_GetPath, 2876).
--define(wxColourPickerEvent_GetColour, 2877).
--define(wxFontPickerEvent_GetFont, 2878).
--define(wxStyledTextEvent_GetPosition, 2879).
--define(wxStyledTextEvent_GetKey, 2880).
--define(wxStyledTextEvent_GetModifiers, 2881).
--define(wxStyledTextEvent_GetModificationType, 2882).
--define(wxStyledTextEvent_GetText, 2883).
--define(wxStyledTextEvent_GetLength, 2884).
--define(wxStyledTextEvent_GetLinesAdded, 2885).
--define(wxStyledTextEvent_GetLine, 2886).
--define(wxStyledTextEvent_GetFoldLevelNow, 2887).
--define(wxStyledTextEvent_GetFoldLevelPrev, 2888).
--define(wxStyledTextEvent_GetMargin, 2889).
--define(wxStyledTextEvent_GetMessage, 2890).
--define(wxStyledTextEvent_GetWParam, 2891).
--define(wxStyledTextEvent_GetLParam, 2892).
--define(wxStyledTextEvent_GetListType, 2893).
--define(wxStyledTextEvent_GetX, 2894).
--define(wxStyledTextEvent_GetY, 2895).
--define(wxStyledTextEvent_GetDragText, 2896).
--define(wxStyledTextEvent_GetDragAllowMove, 2897).
--define(wxStyledTextEvent_GetDragResult, 2898).
--define(wxStyledTextEvent_GetShift, 2899).
--define(wxStyledTextEvent_GetControl, 2900).
--define(wxStyledTextEvent_GetAlt, 2901).
--define(utils_wxGetKeyState, 2902).
--define(utils_wxGetMousePosition, 2903).
--define(utils_wxGetMouseState, 2904).
--define(utils_wxSetDetectableAutoRepeat, 2905).
--define(utils_wxBell, 2906).
--define(utils_wxFindMenuItemId, 2907).
--define(utils_wxGenericFindWindowAtPoint, 2908).
--define(utils_wxFindWindowAtPoint, 2909).
--define(utils_wxBeginBusyCursor, 2910).
--define(utils_wxEndBusyCursor, 2911).
--define(utils_wxIsBusy, 2912).
--define(utils_wxShutdown, 2913).
--define(utils_wxShell, 2914).
--define(utils_wxLaunchDefaultBrowser, 2915).
--define(utils_wxGetEmailAddress, 2916).
--define(utils_wxGetUserId, 2917).
--define(utils_wxGetHomeDir, 2918).
--define(utils_wxNewId, 2919).
--define(utils_wxRegisterId, 2920).
--define(utils_wxGetCurrentId, 2921).
--define(utils_wxGetOsDescription, 2922).
--define(utils_wxIsPlatformLittleEndian, 2923).
--define(utils_wxIsPlatform64Bit, 2924).
--define(wxPrintout_new, 2925).
--define(wxPrintout_destruct, 2926).
--define(wxPrintout_GetDC, 2927).
--define(wxPrintout_GetPageSizeMM, 2928).
--define(wxPrintout_GetPageSizePixels, 2929).
--define(wxPrintout_GetPaperRectPixels, 2930).
--define(wxPrintout_GetPPIPrinter, 2931).
--define(wxPrintout_GetPPIScreen, 2932).
--define(wxPrintout_GetTitle, 2933).
--define(wxPrintout_IsPreview, 2934).
--define(wxPrintout_FitThisSizeToPaper, 2935).
--define(wxPrintout_FitThisSizeToPage, 2936).
--define(wxPrintout_FitThisSizeToPageMargins, 2937).
--define(wxPrintout_MapScreenSizeToPaper, 2938).
--define(wxPrintout_MapScreenSizeToPage, 2939).
--define(wxPrintout_MapScreenSizeToPageMargins, 2940).
--define(wxPrintout_MapScreenSizeToDevice, 2941).
--define(wxPrintout_GetLogicalPaperRect, 2942).
--define(wxPrintout_GetLogicalPageRect, 2943).
--define(wxPrintout_GetLogicalPageMarginsRect, 2944).
--define(wxPrintout_SetLogicalOrigin, 2945).
--define(wxPrintout_OffsetLogicalOrigin, 2946).
--define(wxStyledTextCtrl_new_2, 2947).
--define(wxStyledTextCtrl_new_0, 2948).
--define(wxStyledTextCtrl_destruct, 2949).
--define(wxStyledTextCtrl_Create, 2950).
--define(wxStyledTextCtrl_AddText, 2951).
--define(wxStyledTextCtrl_AddStyledText, 2952).
--define(wxStyledTextCtrl_InsertText, 2953).
--define(wxStyledTextCtrl_ClearAll, 2954).
--define(wxStyledTextCtrl_ClearDocumentStyle, 2955).
--define(wxStyledTextCtrl_GetLength, 2956).
--define(wxStyledTextCtrl_GetCharAt, 2957).
--define(wxStyledTextCtrl_GetCurrentPos, 2958).
--define(wxStyledTextCtrl_GetAnchor, 2959).
--define(wxStyledTextCtrl_GetStyleAt, 2960).
--define(wxStyledTextCtrl_Redo, 2961).
--define(wxStyledTextCtrl_SetUndoCollection, 2962).
--define(wxStyledTextCtrl_SelectAll, 2963).
--define(wxStyledTextCtrl_SetSavePoint, 2964).
--define(wxStyledTextCtrl_GetStyledText, 2965).
--define(wxStyledTextCtrl_CanRedo, 2966).
--define(wxStyledTextCtrl_MarkerLineFromHandle, 2967).
--define(wxStyledTextCtrl_MarkerDeleteHandle, 2968).
--define(wxStyledTextCtrl_GetUndoCollection, 2969).
--define(wxStyledTextCtrl_GetViewWhiteSpace, 2970).
--define(wxStyledTextCtrl_SetViewWhiteSpace, 2971).
--define(wxStyledTextCtrl_PositionFromPoint, 2972).
--define(wxStyledTextCtrl_PositionFromPointClose, 2973).
--define(wxStyledTextCtrl_GotoLine, 2974).
--define(wxStyledTextCtrl_GotoPos, 2975).
--define(wxStyledTextCtrl_SetAnchor, 2976).
--define(wxStyledTextCtrl_GetCurLine, 2977).
--define(wxStyledTextCtrl_GetEndStyled, 2978).
--define(wxStyledTextCtrl_ConvertEOLs, 2979).
--define(wxStyledTextCtrl_GetEOLMode, 2980).
--define(wxStyledTextCtrl_SetEOLMode, 2981).
--define(wxStyledTextCtrl_StartStyling, 2982).
--define(wxStyledTextCtrl_SetStyling, 2983).
--define(wxStyledTextCtrl_GetBufferedDraw, 2984).
--define(wxStyledTextCtrl_SetBufferedDraw, 2985).
--define(wxStyledTextCtrl_SetTabWidth, 2986).
--define(wxStyledTextCtrl_GetTabWidth, 2987).
--define(wxStyledTextCtrl_SetCodePage, 2988).
--define(wxStyledTextCtrl_MarkerDefine, 2989).
--define(wxStyledTextCtrl_MarkerSetForeground, 2990).
--define(wxStyledTextCtrl_MarkerSetBackground, 2991).
--define(wxStyledTextCtrl_MarkerAdd, 2992).
--define(wxStyledTextCtrl_MarkerDelete, 2993).
--define(wxStyledTextCtrl_MarkerDeleteAll, 2994).
--define(wxStyledTextCtrl_MarkerGet, 2995).
--define(wxStyledTextCtrl_MarkerNext, 2996).
--define(wxStyledTextCtrl_MarkerPrevious, 2997).
--define(wxStyledTextCtrl_MarkerDefineBitmap, 2998).
--define(wxStyledTextCtrl_MarkerAddSet, 2999).
--define(wxStyledTextCtrl_MarkerSetAlpha, 3000).
--define(wxStyledTextCtrl_SetMarginType, 3001).
--define(wxStyledTextCtrl_GetMarginType, 3002).
--define(wxStyledTextCtrl_SetMarginWidth, 3003).
--define(wxStyledTextCtrl_GetMarginWidth, 3004).
--define(wxStyledTextCtrl_SetMarginMask, 3005).
--define(wxStyledTextCtrl_GetMarginMask, 3006).
--define(wxStyledTextCtrl_SetMarginSensitive, 3007).
--define(wxStyledTextCtrl_GetMarginSensitive, 3008).
--define(wxStyledTextCtrl_StyleClearAll, 3009).
--define(wxStyledTextCtrl_StyleSetForeground, 3010).
--define(wxStyledTextCtrl_StyleSetBackground, 3011).
--define(wxStyledTextCtrl_StyleSetBold, 3012).
--define(wxStyledTextCtrl_StyleSetItalic, 3013).
--define(wxStyledTextCtrl_StyleSetSize, 3014).
--define(wxStyledTextCtrl_StyleSetFaceName, 3015).
--define(wxStyledTextCtrl_StyleSetEOLFilled, 3016).
--define(wxStyledTextCtrl_StyleResetDefault, 3017).
--define(wxStyledTextCtrl_StyleSetUnderline, 3018).
--define(wxStyledTextCtrl_StyleSetCase, 3019).
--define(wxStyledTextCtrl_StyleSetHotSpot, 3020).
--define(wxStyledTextCtrl_SetSelForeground, 3021).
--define(wxStyledTextCtrl_SetSelBackground, 3022).
--define(wxStyledTextCtrl_GetSelAlpha, 3023).
--define(wxStyledTextCtrl_SetSelAlpha, 3024).
--define(wxStyledTextCtrl_SetCaretForeground, 3025).
--define(wxStyledTextCtrl_CmdKeyAssign, 3026).
--define(wxStyledTextCtrl_CmdKeyClear, 3027).
--define(wxStyledTextCtrl_CmdKeyClearAll, 3028).
--define(wxStyledTextCtrl_SetStyleBytes, 3029).
--define(wxStyledTextCtrl_StyleSetVisible, 3030).
--define(wxStyledTextCtrl_GetCaretPeriod, 3031).
--define(wxStyledTextCtrl_SetCaretPeriod, 3032).
--define(wxStyledTextCtrl_SetWordChars, 3033).
--define(wxStyledTextCtrl_BeginUndoAction, 3034).
--define(wxStyledTextCtrl_EndUndoAction, 3035).
--define(wxStyledTextCtrl_IndicatorSetStyle, 3036).
--define(wxStyledTextCtrl_IndicatorGetStyle, 3037).
--define(wxStyledTextCtrl_IndicatorSetForeground, 3038).
--define(wxStyledTextCtrl_IndicatorGetForeground, 3039).
--define(wxStyledTextCtrl_SetWhitespaceForeground, 3040).
--define(wxStyledTextCtrl_SetWhitespaceBackground, 3041).
--define(wxStyledTextCtrl_GetStyleBits, 3042).
--define(wxStyledTextCtrl_SetLineState, 3043).
--define(wxStyledTextCtrl_GetLineState, 3044).
--define(wxStyledTextCtrl_GetMaxLineState, 3045).
--define(wxStyledTextCtrl_GetCaretLineVisible, 3046).
--define(wxStyledTextCtrl_SetCaretLineVisible, 3047).
--define(wxStyledTextCtrl_GetCaretLineBackground, 3048).
--define(wxStyledTextCtrl_SetCaretLineBackground, 3049).
--define(wxStyledTextCtrl_AutoCompShow, 3050).
--define(wxStyledTextCtrl_AutoCompCancel, 3051).
--define(wxStyledTextCtrl_AutoCompActive, 3052).
--define(wxStyledTextCtrl_AutoCompPosStart, 3053).
--define(wxStyledTextCtrl_AutoCompComplete, 3054).
--define(wxStyledTextCtrl_AutoCompStops, 3055).
--define(wxStyledTextCtrl_AutoCompSetSeparator, 3056).
--define(wxStyledTextCtrl_AutoCompGetSeparator, 3057).
--define(wxStyledTextCtrl_AutoCompSelect, 3058).
--define(wxStyledTextCtrl_AutoCompSetCancelAtStart, 3059).
--define(wxStyledTextCtrl_AutoCompGetCancelAtStart, 3060).
--define(wxStyledTextCtrl_AutoCompSetFillUps, 3061).
--define(wxStyledTextCtrl_AutoCompSetChooseSingle, 3062).
--define(wxStyledTextCtrl_AutoCompGetChooseSingle, 3063).
--define(wxStyledTextCtrl_AutoCompSetIgnoreCase, 3064).
--define(wxStyledTextCtrl_AutoCompGetIgnoreCase, 3065).
--define(wxStyledTextCtrl_UserListShow, 3066).
--define(wxStyledTextCtrl_AutoCompSetAutoHide, 3067).
--define(wxStyledTextCtrl_AutoCompGetAutoHide, 3068).
--define(wxStyledTextCtrl_AutoCompSetDropRestOfWord, 3069).
--define(wxStyledTextCtrl_AutoCompGetDropRestOfWord, 3070).
--define(wxStyledTextCtrl_RegisterImage, 3071).
--define(wxStyledTextCtrl_ClearRegisteredImages, 3072).
--define(wxStyledTextCtrl_AutoCompGetTypeSeparator, 3073).
--define(wxStyledTextCtrl_AutoCompSetTypeSeparator, 3074).
--define(wxStyledTextCtrl_AutoCompSetMaxWidth, 3075).
--define(wxStyledTextCtrl_AutoCompGetMaxWidth, 3076).
--define(wxStyledTextCtrl_AutoCompSetMaxHeight, 3077).
--define(wxStyledTextCtrl_AutoCompGetMaxHeight, 3078).
--define(wxStyledTextCtrl_SetIndent, 3079).
--define(wxStyledTextCtrl_GetIndent, 3080).
--define(wxStyledTextCtrl_SetUseTabs, 3081).
--define(wxStyledTextCtrl_GetUseTabs, 3082).
--define(wxStyledTextCtrl_SetLineIndentation, 3083).
--define(wxStyledTextCtrl_GetLineIndentation, 3084).
--define(wxStyledTextCtrl_GetLineIndentPosition, 3085).
--define(wxStyledTextCtrl_GetColumn, 3086).
--define(wxStyledTextCtrl_SetUseHorizontalScrollBar, 3087).
--define(wxStyledTextCtrl_GetUseHorizontalScrollBar, 3088).
--define(wxStyledTextCtrl_SetIndentationGuides, 3089).
--define(wxStyledTextCtrl_GetIndentationGuides, 3090).
--define(wxStyledTextCtrl_SetHighlightGuide, 3091).
--define(wxStyledTextCtrl_GetHighlightGuide, 3092).
--define(wxStyledTextCtrl_GetLineEndPosition, 3093).
--define(wxStyledTextCtrl_GetCodePage, 3094).
--define(wxStyledTextCtrl_GetCaretForeground, 3095).
--define(wxStyledTextCtrl_GetReadOnly, 3096).
--define(wxStyledTextCtrl_SetCurrentPos, 3097).
--define(wxStyledTextCtrl_SetSelectionStart, 3098).
--define(wxStyledTextCtrl_GetSelectionStart, 3099).
--define(wxStyledTextCtrl_SetSelectionEnd, 3100).
--define(wxStyledTextCtrl_GetSelectionEnd, 3101).
--define(wxStyledTextCtrl_SetPrintMagnification, 3102).
--define(wxStyledTextCtrl_GetPrintMagnification, 3103).
--define(wxStyledTextCtrl_SetPrintColourMode, 3104).
--define(wxStyledTextCtrl_GetPrintColourMode, 3105).
--define(wxStyledTextCtrl_FindText, 3106).
--define(wxStyledTextCtrl_FormatRange, 3107).
--define(wxStyledTextCtrl_GetFirstVisibleLine, 3108).
--define(wxStyledTextCtrl_GetLine, 3109).
--define(wxStyledTextCtrl_GetLineCount, 3110).
--define(wxStyledTextCtrl_SetMarginLeft, 3111).
--define(wxStyledTextCtrl_GetMarginLeft, 3112).
--define(wxStyledTextCtrl_SetMarginRight, 3113).
--define(wxStyledTextCtrl_GetMarginRight, 3114).
--define(wxStyledTextCtrl_GetModify, 3115).
--define(wxStyledTextCtrl_SetSelection, 3116).
--define(wxStyledTextCtrl_GetSelectedText, 3117).
--define(wxStyledTextCtrl_GetTextRange, 3118).
--define(wxStyledTextCtrl_HideSelection, 3119).
--define(wxStyledTextCtrl_LineFromPosition, 3120).
--define(wxStyledTextCtrl_PositionFromLine, 3121).
--define(wxStyledTextCtrl_LineScroll, 3122).
--define(wxStyledTextCtrl_EnsureCaretVisible, 3123).
--define(wxStyledTextCtrl_ReplaceSelection, 3124).
--define(wxStyledTextCtrl_SetReadOnly, 3125).
--define(wxStyledTextCtrl_CanPaste, 3126).
--define(wxStyledTextCtrl_CanUndo, 3127).
--define(wxStyledTextCtrl_EmptyUndoBuffer, 3128).
--define(wxStyledTextCtrl_Undo, 3129).
--define(wxStyledTextCtrl_Cut, 3130).
--define(wxStyledTextCtrl_Copy, 3131).
--define(wxStyledTextCtrl_Paste, 3132).
--define(wxStyledTextCtrl_Clear, 3133).
--define(wxStyledTextCtrl_SetText, 3134).
--define(wxStyledTextCtrl_GetText, 3135).
--define(wxStyledTextCtrl_GetTextLength, 3136).
--define(wxStyledTextCtrl_GetOvertype, 3137).
--define(wxStyledTextCtrl_SetCaretWidth, 3138).
--define(wxStyledTextCtrl_GetCaretWidth, 3139).
--define(wxStyledTextCtrl_SetTargetStart, 3140).
--define(wxStyledTextCtrl_GetTargetStart, 3141).
--define(wxStyledTextCtrl_SetTargetEnd, 3142).
--define(wxStyledTextCtrl_GetTargetEnd, 3143).
--define(wxStyledTextCtrl_ReplaceTarget, 3144).
--define(wxStyledTextCtrl_SearchInTarget, 3145).
--define(wxStyledTextCtrl_SetSearchFlags, 3146).
--define(wxStyledTextCtrl_GetSearchFlags, 3147).
--define(wxStyledTextCtrl_CallTipShow, 3148).
--define(wxStyledTextCtrl_CallTipCancel, 3149).
--define(wxStyledTextCtrl_CallTipActive, 3150).
--define(wxStyledTextCtrl_CallTipPosAtStart, 3151).
--define(wxStyledTextCtrl_CallTipSetHighlight, 3152).
--define(wxStyledTextCtrl_CallTipSetBackground, 3153).
--define(wxStyledTextCtrl_CallTipSetForeground, 3154).
--define(wxStyledTextCtrl_CallTipSetForegroundHighlight, 3155).
--define(wxStyledTextCtrl_CallTipUseStyle, 3156).
--define(wxStyledTextCtrl_VisibleFromDocLine, 3157).
--define(wxStyledTextCtrl_DocLineFromVisible, 3158).
--define(wxStyledTextCtrl_WrapCount, 3159).
--define(wxStyledTextCtrl_SetFoldLevel, 3160).
--define(wxStyledTextCtrl_GetFoldLevel, 3161).
--define(wxStyledTextCtrl_GetLastChild, 3162).
--define(wxStyledTextCtrl_GetFoldParent, 3163).
--define(wxStyledTextCtrl_ShowLines, 3164).
--define(wxStyledTextCtrl_HideLines, 3165).
--define(wxStyledTextCtrl_GetLineVisible, 3166).
--define(wxStyledTextCtrl_SetFoldExpanded, 3167).
--define(wxStyledTextCtrl_GetFoldExpanded, 3168).
--define(wxStyledTextCtrl_ToggleFold, 3169).
--define(wxStyledTextCtrl_EnsureVisible, 3170).
--define(wxStyledTextCtrl_SetFoldFlags, 3171).
--define(wxStyledTextCtrl_EnsureVisibleEnforcePolicy, 3172).
--define(wxStyledTextCtrl_SetTabIndents, 3173).
--define(wxStyledTextCtrl_GetTabIndents, 3174).
--define(wxStyledTextCtrl_SetBackSpaceUnIndents, 3175).
--define(wxStyledTextCtrl_GetBackSpaceUnIndents, 3176).
--define(wxStyledTextCtrl_SetMouseDwellTime, 3177).
--define(wxStyledTextCtrl_GetMouseDwellTime, 3178).
--define(wxStyledTextCtrl_WordStartPosition, 3179).
--define(wxStyledTextCtrl_WordEndPosition, 3180).
--define(wxStyledTextCtrl_SetWrapMode, 3181).
--define(wxStyledTextCtrl_GetWrapMode, 3182).
--define(wxStyledTextCtrl_SetWrapVisualFlags, 3183).
--define(wxStyledTextCtrl_GetWrapVisualFlags, 3184).
--define(wxStyledTextCtrl_SetWrapVisualFlagsLocation, 3185).
--define(wxStyledTextCtrl_GetWrapVisualFlagsLocation, 3186).
--define(wxStyledTextCtrl_SetWrapStartIndent, 3187).
--define(wxStyledTextCtrl_GetWrapStartIndent, 3188).
--define(wxStyledTextCtrl_SetLayoutCache, 3189).
--define(wxStyledTextCtrl_GetLayoutCache, 3190).
--define(wxStyledTextCtrl_SetScrollWidth, 3191).
--define(wxStyledTextCtrl_GetScrollWidth, 3192).
--define(wxStyledTextCtrl_TextWidth, 3193).
--define(wxStyledTextCtrl_GetEndAtLastLine, 3194).
--define(wxStyledTextCtrl_TextHeight, 3195).
--define(wxStyledTextCtrl_SetUseVerticalScrollBar, 3196).
--define(wxStyledTextCtrl_GetUseVerticalScrollBar, 3197).
--define(wxStyledTextCtrl_AppendText, 3198).
--define(wxStyledTextCtrl_GetTwoPhaseDraw, 3199).
--define(wxStyledTextCtrl_SetTwoPhaseDraw, 3200).
--define(wxStyledTextCtrl_TargetFromSelection, 3201).
--define(wxStyledTextCtrl_LinesJoin, 3202).
--define(wxStyledTextCtrl_LinesSplit, 3203).
--define(wxStyledTextCtrl_SetFoldMarginColour, 3204).
--define(wxStyledTextCtrl_SetFoldMarginHiColour, 3205).
--define(wxStyledTextCtrl_LineDown, 3206).
--define(wxStyledTextCtrl_LineDownExtend, 3207).
--define(wxStyledTextCtrl_LineUp, 3208).
--define(wxStyledTextCtrl_LineUpExtend, 3209).
--define(wxStyledTextCtrl_CharLeft, 3210).
--define(wxStyledTextCtrl_CharLeftExtend, 3211).
--define(wxStyledTextCtrl_CharRight, 3212).
--define(wxStyledTextCtrl_CharRightExtend, 3213).
--define(wxStyledTextCtrl_WordLeft, 3214).
--define(wxStyledTextCtrl_WordLeftExtend, 3215).
--define(wxStyledTextCtrl_WordRight, 3216).
--define(wxStyledTextCtrl_WordRightExtend, 3217).
--define(wxStyledTextCtrl_Home, 3218).
--define(wxStyledTextCtrl_HomeExtend, 3219).
--define(wxStyledTextCtrl_LineEnd, 3220).
--define(wxStyledTextCtrl_LineEndExtend, 3221).
--define(wxStyledTextCtrl_DocumentStart, 3222).
--define(wxStyledTextCtrl_DocumentStartExtend, 3223).
--define(wxStyledTextCtrl_DocumentEnd, 3224).
--define(wxStyledTextCtrl_DocumentEndExtend, 3225).
--define(wxStyledTextCtrl_PageUp, 3226).
--define(wxStyledTextCtrl_PageUpExtend, 3227).
--define(wxStyledTextCtrl_PageDown, 3228).
--define(wxStyledTextCtrl_PageDownExtend, 3229).
--define(wxStyledTextCtrl_EditToggleOvertype, 3230).
--define(wxStyledTextCtrl_Cancel, 3231).
--define(wxStyledTextCtrl_DeleteBack, 3232).
--define(wxStyledTextCtrl_Tab, 3233).
--define(wxStyledTextCtrl_BackTab, 3234).
--define(wxStyledTextCtrl_NewLine, 3235).
--define(wxStyledTextCtrl_FormFeed, 3236).
--define(wxStyledTextCtrl_VCHome, 3237).
--define(wxStyledTextCtrl_VCHomeExtend, 3238).
--define(wxStyledTextCtrl_ZoomIn, 3239).
--define(wxStyledTextCtrl_ZoomOut, 3240).
--define(wxStyledTextCtrl_DelWordLeft, 3241).
--define(wxStyledTextCtrl_DelWordRight, 3242).
--define(wxStyledTextCtrl_LineCut, 3243).
--define(wxStyledTextCtrl_LineDelete, 3244).
--define(wxStyledTextCtrl_LineTranspose, 3245).
--define(wxStyledTextCtrl_LineDuplicate, 3246).
--define(wxStyledTextCtrl_LowerCase, 3247).
--define(wxStyledTextCtrl_UpperCase, 3248).
--define(wxStyledTextCtrl_LineScrollDown, 3249).
--define(wxStyledTextCtrl_LineScrollUp, 3250).
--define(wxStyledTextCtrl_DeleteBackNotLine, 3251).
--define(wxStyledTextCtrl_HomeDisplay, 3252).
--define(wxStyledTextCtrl_HomeDisplayExtend, 3253).
--define(wxStyledTextCtrl_LineEndDisplay, 3254).
--define(wxStyledTextCtrl_LineEndDisplayExtend, 3255).
--define(wxStyledTextCtrl_HomeWrapExtend, 3256).
--define(wxStyledTextCtrl_LineEndWrap, 3257).
--define(wxStyledTextCtrl_LineEndWrapExtend, 3258).
--define(wxStyledTextCtrl_VCHomeWrap, 3259).
--define(wxStyledTextCtrl_VCHomeWrapExtend, 3260).
--define(wxStyledTextCtrl_LineCopy, 3261).
--define(wxStyledTextCtrl_MoveCaretInsideView, 3262).
--define(wxStyledTextCtrl_LineLength, 3263).
--define(wxStyledTextCtrl_BraceHighlight, 3264).
--define(wxStyledTextCtrl_BraceBadLight, 3265).
--define(wxStyledTextCtrl_BraceMatch, 3266).
--define(wxStyledTextCtrl_GetViewEOL, 3267).
--define(wxStyledTextCtrl_SetViewEOL, 3268).
--define(wxStyledTextCtrl_SetModEventMask, 3269).
--define(wxStyledTextCtrl_GetEdgeColumn, 3270).
--define(wxStyledTextCtrl_SetEdgeColumn, 3271).
--define(wxStyledTextCtrl_GetEdgeMode, 3272).
--define(wxStyledTextCtrl_GetEdgeColour, 3273).
--define(wxStyledTextCtrl_SetEdgeColour, 3274).
--define(wxStyledTextCtrl_SearchAnchor, 3275).
--define(wxStyledTextCtrl_SearchNext, 3276).
--define(wxStyledTextCtrl_SearchPrev, 3277).
--define(wxStyledTextCtrl_LinesOnScreen, 3278).
--define(wxStyledTextCtrl_UsePopUp, 3279).
--define(wxStyledTextCtrl_SelectionIsRectangle, 3280).
--define(wxStyledTextCtrl_SetZoom, 3281).
--define(wxStyledTextCtrl_GetZoom, 3282).
--define(wxStyledTextCtrl_GetModEventMask, 3283).
--define(wxStyledTextCtrl_SetSTCFocus, 3284).
--define(wxStyledTextCtrl_GetSTCFocus, 3285).
--define(wxStyledTextCtrl_SetStatus, 3286).
--define(wxStyledTextCtrl_GetStatus, 3287).
--define(wxStyledTextCtrl_SetMouseDownCaptures, 3288).
--define(wxStyledTextCtrl_GetMouseDownCaptures, 3289).
--define(wxStyledTextCtrl_SetSTCCursor, 3290).
--define(wxStyledTextCtrl_GetSTCCursor, 3291).
--define(wxStyledTextCtrl_SetControlCharSymbol, 3292).
--define(wxStyledTextCtrl_GetControlCharSymbol, 3293).
--define(wxStyledTextCtrl_WordPartLeft, 3294).
--define(wxStyledTextCtrl_WordPartLeftExtend, 3295).
--define(wxStyledTextCtrl_WordPartRight, 3296).
--define(wxStyledTextCtrl_WordPartRightExtend, 3297).
--define(wxStyledTextCtrl_SetVisiblePolicy, 3298).
--define(wxStyledTextCtrl_DelLineLeft, 3299).
--define(wxStyledTextCtrl_DelLineRight, 3300).
--define(wxStyledTextCtrl_GetXOffset, 3301).
--define(wxStyledTextCtrl_ChooseCaretX, 3302).
--define(wxStyledTextCtrl_SetXCaretPolicy, 3303).
--define(wxStyledTextCtrl_SetYCaretPolicy, 3304).
--define(wxStyledTextCtrl_GetPrintWrapMode, 3305).
--define(wxStyledTextCtrl_SetHotspotActiveForeground, 3306).
--define(wxStyledTextCtrl_SetHotspotActiveBackground, 3307).
--define(wxStyledTextCtrl_SetHotspotActiveUnderline, 3308).
--define(wxStyledTextCtrl_SetHotspotSingleLine, 3309).
--define(wxStyledTextCtrl_ParaDownExtend, 3310).
--define(wxStyledTextCtrl_ParaUp, 3311).
--define(wxStyledTextCtrl_ParaUpExtend, 3312).
--define(wxStyledTextCtrl_PositionBefore, 3313).
--define(wxStyledTextCtrl_PositionAfter, 3314).
--define(wxStyledTextCtrl_CopyRange, 3315).
--define(wxStyledTextCtrl_CopyText, 3316).
--define(wxStyledTextCtrl_SetSelectionMode, 3317).
--define(wxStyledTextCtrl_GetSelectionMode, 3318).
--define(wxStyledTextCtrl_LineDownRectExtend, 3319).
--define(wxStyledTextCtrl_LineUpRectExtend, 3320).
--define(wxStyledTextCtrl_CharLeftRectExtend, 3321).
--define(wxStyledTextCtrl_CharRightRectExtend, 3322).
--define(wxStyledTextCtrl_HomeRectExtend, 3323).
--define(wxStyledTextCtrl_VCHomeRectExtend, 3324).
--define(wxStyledTextCtrl_LineEndRectExtend, 3325).
--define(wxStyledTextCtrl_PageUpRectExtend, 3326).
--define(wxStyledTextCtrl_PageDownRectExtend, 3327).
--define(wxStyledTextCtrl_StutteredPageUp, 3328).
--define(wxStyledTextCtrl_StutteredPageUpExtend, 3329).
--define(wxStyledTextCtrl_StutteredPageDown, 3330).
--define(wxStyledTextCtrl_StutteredPageDownExtend, 3331).
--define(wxStyledTextCtrl_WordLeftEnd, 3332).
--define(wxStyledTextCtrl_WordLeftEndExtend, 3333).
--define(wxStyledTextCtrl_WordRightEnd, 3334).
--define(wxStyledTextCtrl_WordRightEndExtend, 3335).
--define(wxStyledTextCtrl_SetWhitespaceChars, 3336).
--define(wxStyledTextCtrl_SetCharsDefault, 3337).
--define(wxStyledTextCtrl_AutoCompGetCurrent, 3338).
--define(wxStyledTextCtrl_Allocate, 3339).
--define(wxStyledTextCtrl_FindColumn, 3340).
--define(wxStyledTextCtrl_GetCaretSticky, 3341).
--define(wxStyledTextCtrl_SetCaretSticky, 3342).
--define(wxStyledTextCtrl_ToggleCaretSticky, 3343).
--define(wxStyledTextCtrl_SetPasteConvertEndings, 3344).
--define(wxStyledTextCtrl_GetPasteConvertEndings, 3345).
--define(wxStyledTextCtrl_SelectionDuplicate, 3346).
--define(wxStyledTextCtrl_SetCaretLineBackAlpha, 3347).
--define(wxStyledTextCtrl_GetCaretLineBackAlpha, 3348).
--define(wxStyledTextCtrl_StartRecord, 3349).
--define(wxStyledTextCtrl_StopRecord, 3350).
--define(wxStyledTextCtrl_SetLexer, 3351).
--define(wxStyledTextCtrl_GetLexer, 3352).
--define(wxStyledTextCtrl_Colourise, 3353).
--define(wxStyledTextCtrl_SetProperty, 3354).
--define(wxStyledTextCtrl_SetKeyWords, 3355).
--define(wxStyledTextCtrl_SetLexerLanguage, 3356).
--define(wxStyledTextCtrl_GetProperty, 3357).
--define(wxStyledTextCtrl_GetStyleBitsNeeded, 3358).
--define(wxStyledTextCtrl_GetCurrentLine, 3359).
--define(wxStyledTextCtrl_StyleSetSpec, 3360).
--define(wxStyledTextCtrl_StyleSetFont, 3361).
--define(wxStyledTextCtrl_StyleSetFontAttr, 3362).
--define(wxStyledTextCtrl_StyleSetCharacterSet, 3363).
--define(wxStyledTextCtrl_StyleSetFontEncoding, 3364).
--define(wxStyledTextCtrl_CmdKeyExecute, 3365).
--define(wxStyledTextCtrl_SetMargins, 3366).
--define(wxStyledTextCtrl_GetSelection, 3367).
--define(wxStyledTextCtrl_PointFromPosition, 3368).
--define(wxStyledTextCtrl_ScrollToLine, 3369).
--define(wxStyledTextCtrl_ScrollToColumn, 3370).
--define(wxStyledTextCtrl_SendMsg, 3371).
--define(wxStyledTextCtrl_SetVScrollBar, 3372).
--define(wxStyledTextCtrl_SetHScrollBar, 3373).
--define(wxStyledTextCtrl_GetLastKeydownProcessed, 3374).
--define(wxStyledTextCtrl_SetLastKeydownProcessed, 3375).
--define(wxStyledTextCtrl_SaveFile, 3376).
--define(wxStyledTextCtrl_LoadFile, 3377).
--define(wxStyledTextCtrl_DoDragOver, 3378).
--define(wxStyledTextCtrl_DoDropText, 3379).
--define(wxStyledTextCtrl_GetUseAntiAliasing, 3380).
--define(wxStyledTextCtrl_AddTextRaw, 3381).
--define(wxStyledTextCtrl_InsertTextRaw, 3382).
--define(wxStyledTextCtrl_GetCurLineRaw, 3383).
--define(wxStyledTextCtrl_GetLineRaw, 3384).
--define(wxStyledTextCtrl_GetSelectedTextRaw, 3385).
--define(wxStyledTextCtrl_GetTextRangeRaw, 3386).
--define(wxStyledTextCtrl_SetTextRaw, 3387).
--define(wxStyledTextCtrl_GetTextRaw, 3388).
--define(wxStyledTextCtrl_AppendTextRaw, 3389).
--define(wxArtProvider_GetBitmap, 3390).
--define(wxArtProvider_GetIcon, 3391).
--define(wxTreeEvent_GetKeyCode, 3392).
--define(wxTreeEvent_GetItem, 3393).
--define(wxTreeEvent_GetKeyEvent, 3394).
--define(wxTreeEvent_GetLabel, 3395).
--define(wxTreeEvent_GetOldItem, 3396).
--define(wxTreeEvent_GetPoint, 3397).
--define(wxTreeEvent_IsEditCancelled, 3398).
--define(wxTreeEvent_SetToolTip, 3399).
--define(wxNotebookEvent_GetOldSelection, 3400).
--define(wxNotebookEvent_GetSelection, 3401).
--define(wxNotebookEvent_SetOldSelection, 3402).
--define(wxNotebookEvent_SetSelection, 3403).
--define(wxFileDataObject_new, 3404).
--define(wxFileDataObject_AddFile, 3405).
--define(wxFileDataObject_GetFilenames, 3406).
--define(wxFileDataObject_destroy, 3407).
--define(wxTextDataObject_new, 3408).
--define(wxTextDataObject_GetTextLength, 3409).
--define(wxTextDataObject_GetText, 3410).
--define(wxTextDataObject_SetText, 3411).
--define(wxTextDataObject_destroy, 3412).
--define(wxBitmapDataObject_new_1_1, 3413).
--define(wxBitmapDataObject_new_1_0, 3414).
--define(wxBitmapDataObject_GetBitmap, 3415).
--define(wxBitmapDataObject_SetBitmap, 3416).
--define(wxBitmapDataObject_destroy, 3417).
--define(wxClipboard_new, 3419).
--define(wxClipboard_destruct, 3420).
--define(wxClipboard_AddData, 3421).
--define(wxClipboard_Clear, 3422).
--define(wxClipboard_Close, 3423).
--define(wxClipboard_Flush, 3424).
--define(wxClipboard_GetData, 3425).
--define(wxClipboard_IsOpened, 3426).
--define(wxClipboard_Open, 3427).
--define(wxClipboard_SetData, 3428).
--define(wxClipboard_UsePrimarySelection, 3430).
--define(wxClipboard_IsSupported, 3431).
--define(wxClipboard_Get, 3432).
--define(wxSpinEvent_GetPosition, 3433).
--define(wxSpinEvent_SetPosition, 3434).
--define(wxSplitterWindow_new_0, 3435).
--define(wxSplitterWindow_new_2, 3436).
--define(wxSplitterWindow_destruct, 3437).
--define(wxSplitterWindow_Create, 3438).
--define(wxSplitterWindow_GetMinimumPaneSize, 3439).
--define(wxSplitterWindow_GetSashGravity, 3440).
--define(wxSplitterWindow_GetSashPosition, 3441).
--define(wxSplitterWindow_GetSplitMode, 3442).
--define(wxSplitterWindow_GetWindow1, 3443).
--define(wxSplitterWindow_GetWindow2, 3444).
--define(wxSplitterWindow_Initialize, 3445).
--define(wxSplitterWindow_IsSplit, 3446).
--define(wxSplitterWindow_ReplaceWindow, 3447).
--define(wxSplitterWindow_SetSashGravity, 3448).
--define(wxSplitterWindow_SetSashPosition, 3449).
--define(wxSplitterWindow_SetSashSize, 3450).
--define(wxSplitterWindow_SetMinimumPaneSize, 3451).
--define(wxSplitterWindow_SetSplitMode, 3452).
--define(wxSplitterWindow_SplitHorizontally, 3453).
--define(wxSplitterWindow_SplitVertically, 3454).
--define(wxSplitterWindow_Unsplit, 3455).
--define(wxSplitterWindow_UpdateSize, 3456).
--define(wxSplitterEvent_GetSashPosition, 3457).
--define(wxSplitterEvent_GetX, 3458).
--define(wxSplitterEvent_GetY, 3459).
--define(wxSplitterEvent_GetWindowBeingRemoved, 3460).
--define(wxSplitterEvent_SetSashPosition, 3461).
--define(wxHtmlWindow_new_0, 3462).
--define(wxHtmlWindow_new_2, 3463).
--define(wxHtmlWindow_AppendToPage, 3464).
--define(wxHtmlWindow_GetOpenedAnchor, 3465).
--define(wxHtmlWindow_GetOpenedPage, 3466).
--define(wxHtmlWindow_GetOpenedPageTitle, 3467).
--define(wxHtmlWindow_GetRelatedFrame, 3468).
--define(wxHtmlWindow_HistoryBack, 3469).
--define(wxHtmlWindow_HistoryCanBack, 3470).
--define(wxHtmlWindow_HistoryCanForward, 3471).
--define(wxHtmlWindow_HistoryClear, 3472).
--define(wxHtmlWindow_HistoryForward, 3473).
--define(wxHtmlWindow_LoadFile, 3474).
--define(wxHtmlWindow_LoadPage, 3475).
--define(wxHtmlWindow_SelectAll, 3476).
--define(wxHtmlWindow_SelectionToText, 3477).
--define(wxHtmlWindow_SelectLine, 3478).
--define(wxHtmlWindow_SelectWord, 3479).
--define(wxHtmlWindow_SetBorders, 3480).
--define(wxHtmlWindow_SetFonts, 3481).
--define(wxHtmlWindow_SetPage, 3482).
--define(wxHtmlWindow_SetRelatedFrame, 3483).
--define(wxHtmlWindow_SetRelatedStatusBar, 3484).
--define(wxHtmlWindow_ToText, 3485).
--define(wxHtmlWindow_destroy, 3486).
--define(wxHtmlLinkEvent_GetLinkInfo, 3487).
--define(wxSystemSettings_GetColour, 3488).
--define(wxSystemSettings_GetFont, 3489).
--define(wxSystemSettings_GetMetric, 3490).
--define(wxSystemSettings_GetScreenType, 3491).
--define(wxSystemOptions_GetOption, 3492).
--define(wxSystemOptions_GetOptionInt, 3493).
--define(wxSystemOptions_HasOption, 3494).
--define(wxSystemOptions_IsFalse, 3495).
--define(wxSystemOptions_SetOption_2_1, 3496).
--define(wxSystemOptions_SetOption_2_0, 3497).
--define(wxAuiNotebookEvent_SetSelection, 3498).
--define(wxAuiNotebookEvent_GetSelection, 3499).
--define(wxAuiNotebookEvent_SetOldSelection, 3500).
--define(wxAuiNotebookEvent_GetOldSelection, 3501).
--define(wxAuiNotebookEvent_SetDragSource, 3502).
--define(wxAuiNotebookEvent_GetDragSource, 3503).
--define(wxAuiManagerEvent_SetManager, 3504).
--define(wxAuiManagerEvent_GetManager, 3505).
--define(wxAuiManagerEvent_SetPane, 3506).
--define(wxAuiManagerEvent_GetPane, 3507).
--define(wxAuiManagerEvent_SetButton, 3508).
--define(wxAuiManagerEvent_GetButton, 3509).
--define(wxAuiManagerEvent_SetDC, 3510).
--define(wxAuiManagerEvent_GetDC, 3511).
--define(wxAuiManagerEvent_Veto, 3512).
--define(wxAuiManagerEvent_GetVeto, 3513).
--define(wxAuiManagerEvent_SetCanVeto, 3514).
--define(wxAuiManagerEvent_CanVeto, 3515).
--define(wxLogNull_new, 3516).
--define(wxLogNull_destroy, 3517).
+-define(wxDC_GetFont, 667).
+-define(wxDC_GetLayoutDirection, 668).
+-define(wxDC_GetLogicalFunction, 669).
+-define(wxDC_GetMapMode, 670).
+-define(wxDC_GetMultiLineTextExtent_4, 671).
+-define(wxDC_GetMultiLineTextExtent_1, 672).
+-define(wxDC_GetPartialTextExtents, 673).
+-define(wxDC_GetPen, 674).
+-define(wxDC_GetPixel, 675).
+-define(wxDC_GetPPI, 676).
+-define(wxDC_GetSize, 678).
+-define(wxDC_GetSizeMM, 680).
+-define(wxDC_GetTextBackground, 681).
+-define(wxDC_GetTextExtent_4, 682).
+-define(wxDC_GetTextExtent_1, 683).
+-define(wxDC_GetTextForeground, 685).
+-define(wxDC_GetUserScale, 686).
+-define(wxDC_GradientFillConcentric_3, 687).
+-define(wxDC_GradientFillConcentric_4, 688).
+-define(wxDC_GradientFillLinear, 689).
+-define(wxDC_LogicalToDeviceX, 690).
+-define(wxDC_LogicalToDeviceXRel, 691).
+-define(wxDC_LogicalToDeviceY, 692).
+-define(wxDC_LogicalToDeviceYRel, 693).
+-define(wxDC_MaxX, 694).
+-define(wxDC_MaxY, 695).
+-define(wxDC_MinX, 696).
+-define(wxDC_MinY, 697).
+-define(wxDC_IsOk, 698).
+-define(wxDC_ResetBoundingBox, 699).
+-define(wxDC_SetAxisOrientation, 700).
+-define(wxDC_SetBackground, 701).
+-define(wxDC_SetBackgroundMode, 702).
+-define(wxDC_SetBrush, 703).
+-define(wxDC_SetClippingRegion_2, 705).
+-define(wxDC_SetClippingRegion_1_1, 706).
+-define(wxDC_SetClippingRegion_1_0, 707).
+-define(wxDC_SetDeviceOrigin, 708).
+-define(wxDC_SetFont, 709).
+-define(wxDC_SetLayoutDirection, 710).
+-define(wxDC_SetLogicalFunction, 711).
+-define(wxDC_SetMapMode, 712).
+-define(wxDC_SetPalette, 713).
+-define(wxDC_SetPen, 714).
+-define(wxDC_SetTextBackground, 715).
+-define(wxDC_SetTextForeground, 716).
+-define(wxDC_SetUserScale, 717).
+-define(wxDC_StartDoc, 718).
+-define(wxDC_StartPage, 719).
+-define(wxMirrorDC_new, 720).
+-define(wxMirrorDC_destroy, 721).
+-define(wxScreenDC_new, 722).
+-define(wxScreenDC_destruct, 723).
+-define(wxPostScriptDC_new_0, 724).
+-define(wxPostScriptDC_new_1, 725).
+-define(wxPostScriptDC_destruct, 726).
+-define(wxPostScriptDC_SetResolution, 727).
+-define(wxPostScriptDC_GetResolution, 728).
+-define(wxWindowDC_new_0, 729).
+-define(wxWindowDC_new_1, 730).
+-define(wxWindowDC_destruct, 731).
+-define(wxClientDC_new_0, 732).
+-define(wxClientDC_new_1, 733).
+-define(wxClientDC_destroy, 734).
+-define(wxPaintDC_new_0, 735).
+-define(wxPaintDC_new_1, 736).
+-define(wxPaintDC_destroy, 737).
+-define(wxMemoryDC_new_1_0, 739).
+-define(wxMemoryDC_new_1_1, 740).
+-define(wxMemoryDC_new_0, 741).
+-define(wxMemoryDC_destruct, 743).
+-define(wxMemoryDC_SelectObject, 744).
+-define(wxMemoryDC_SelectObjectAsSource, 745).
+-define(wxBufferedDC_new_0, 746).
+-define(wxBufferedDC_new_2, 747).
+-define(wxBufferedDC_new_3, 748).
+-define(wxBufferedDC_destruct, 749).
+-define(wxBufferedDC_Init_2, 750).
+-define(wxBufferedDC_Init_3, 751).
+-define(wxBufferedPaintDC_new_3, 752).
+-define(wxBufferedPaintDC_new_2, 753).
+-define(wxBufferedPaintDC_destruct, 754).
+-define(wxGraphicsObject_destruct, 755).
+-define(wxGraphicsObject_GetRenderer, 756).
+-define(wxGraphicsObject_IsNull, 757).
+-define(wxGraphicsContext_destruct, 758).
+-define(wxGraphicsContext_Create_1_1, 759).
+-define(wxGraphicsContext_Create_1_0, 760).
+-define(wxGraphicsContext_Create_0, 761).
+-define(wxGraphicsContext_CreatePen, 762).
+-define(wxGraphicsContext_CreateBrush, 763).
+-define(wxGraphicsContext_CreateRadialGradientBrush, 764).
+-define(wxGraphicsContext_CreateLinearGradientBrush, 765).
+-define(wxGraphicsContext_CreateFont, 766).
+-define(wxGraphicsContext_CreateMatrix, 767).
+-define(wxGraphicsContext_CreatePath, 768).
+-define(wxGraphicsContext_Clip_1, 769).
+-define(wxGraphicsContext_Clip_4, 770).
+-define(wxGraphicsContext_ResetClip, 771).
+-define(wxGraphicsContext_DrawBitmap, 772).
+-define(wxGraphicsContext_DrawEllipse, 773).
+-define(wxGraphicsContext_DrawIcon, 774).
+-define(wxGraphicsContext_DrawLines, 775).
+-define(wxGraphicsContext_DrawPath, 776).
+-define(wxGraphicsContext_DrawRectangle, 777).
+-define(wxGraphicsContext_DrawRoundedRectangle, 778).
+-define(wxGraphicsContext_DrawText_3, 779).
+-define(wxGraphicsContext_DrawText_4_0, 780).
+-define(wxGraphicsContext_DrawText_4_1, 781).
+-define(wxGraphicsContext_DrawText_5, 782).
+-define(wxGraphicsContext_FillPath, 783).
+-define(wxGraphicsContext_StrokePath, 784).
+-define(wxGraphicsContext_GetPartialTextExtents, 785).
+-define(wxGraphicsContext_GetTextExtent, 786).
+-define(wxGraphicsContext_Rotate, 787).
+-define(wxGraphicsContext_Scale, 788).
+-define(wxGraphicsContext_Translate, 789).
+-define(wxGraphicsContext_GetTransform, 790).
+-define(wxGraphicsContext_SetTransform, 791).
+-define(wxGraphicsContext_ConcatTransform, 792).
+-define(wxGraphicsContext_SetBrush_1_1, 793).
+-define(wxGraphicsContext_SetBrush_1_0, 794).
+-define(wxGraphicsContext_SetFont_1, 795).
+-define(wxGraphicsContext_SetFont_2, 796).
+-define(wxGraphicsContext_SetPen_1_0, 797).
+-define(wxGraphicsContext_SetPen_1_1, 798).
+-define(wxGraphicsContext_StrokeLine, 799).
+-define(wxGraphicsContext_StrokeLines, 800).
+-define(wxGraphicsMatrix_Concat, 802).
+-define(wxGraphicsMatrix_Get, 804).
+-define(wxGraphicsMatrix_Invert, 805).
+-define(wxGraphicsMatrix_IsEqual, 806).
+-define(wxGraphicsMatrix_IsIdentity, 808).
+-define(wxGraphicsMatrix_Rotate, 809).
+-define(wxGraphicsMatrix_Scale, 810).
+-define(wxGraphicsMatrix_Translate, 811).
+-define(wxGraphicsMatrix_Set, 812).
+-define(wxGraphicsMatrix_TransformPoint, 813).
+-define(wxGraphicsMatrix_TransformDistance, 814).
+-define(wxGraphicsPath_MoveToPoint_2, 815).
+-define(wxGraphicsPath_MoveToPoint_1, 816).
+-define(wxGraphicsPath_AddArc_6, 817).
+-define(wxGraphicsPath_AddArc_5, 818).
+-define(wxGraphicsPath_AddArcToPoint, 819).
+-define(wxGraphicsPath_AddCircle, 820).
+-define(wxGraphicsPath_AddCurveToPoint_6, 821).
+-define(wxGraphicsPath_AddCurveToPoint_3, 822).
+-define(wxGraphicsPath_AddEllipse, 823).
+-define(wxGraphicsPath_AddLineToPoint_2, 824).
+-define(wxGraphicsPath_AddLineToPoint_1, 825).
+-define(wxGraphicsPath_AddPath, 826).
+-define(wxGraphicsPath_AddQuadCurveToPoint, 827).
+-define(wxGraphicsPath_AddRectangle, 828).
+-define(wxGraphicsPath_AddRoundedRectangle, 829).
+-define(wxGraphicsPath_CloseSubpath, 830).
+-define(wxGraphicsPath_Contains_3, 831).
+-define(wxGraphicsPath_Contains_2, 832).
+-define(wxGraphicsPath_GetBox, 834).
+-define(wxGraphicsPath_GetCurrentPoint, 836).
+-define(wxGraphicsPath_Transform, 837).
+-define(wxGraphicsRenderer_GetDefaultRenderer, 838).
+-define(wxGraphicsRenderer_CreateContext_1_1, 839).
+-define(wxGraphicsRenderer_CreateContext_1_0, 840).
+-define(wxGraphicsRenderer_CreatePen, 841).
+-define(wxGraphicsRenderer_CreateBrush, 842).
+-define(wxGraphicsRenderer_CreateLinearGradientBrush, 843).
+-define(wxGraphicsRenderer_CreateRadialGradientBrush, 844).
+-define(wxGraphicsRenderer_CreateFont, 845).
+-define(wxGraphicsRenderer_CreateMatrix, 846).
+-define(wxGraphicsRenderer_CreatePath, 847).
+-define(wxMenuBar_new_1, 849).
+-define(wxMenuBar_new_0, 851).
+-define(wxMenuBar_destruct, 853).
+-define(wxMenuBar_Append, 854).
+-define(wxMenuBar_Check, 855).
+-define(wxMenuBar_Enable_2, 856).
+-define(wxMenuBar_Enable_1, 857).
+-define(wxMenuBar_EnableTop, 858).
+-define(wxMenuBar_FindMenu, 859).
+-define(wxMenuBar_FindMenuItem, 860).
+-define(wxMenuBar_FindItem, 861).
+-define(wxMenuBar_GetHelpString, 862).
+-define(wxMenuBar_GetLabel_1, 863).
+-define(wxMenuBar_GetLabel_0, 864).
+-define(wxMenuBar_GetLabelTop, 865).
+-define(wxMenuBar_GetMenu, 866).
+-define(wxMenuBar_GetMenuCount, 867).
+-define(wxMenuBar_Insert, 868).
+-define(wxMenuBar_IsChecked, 869).
+-define(wxMenuBar_IsEnabled_1, 870).
+-define(wxMenuBar_IsEnabled_0, 871).
+-define(wxMenuBar_Remove, 872).
+-define(wxMenuBar_Replace, 873).
+-define(wxMenuBar_SetHelpString, 874).
+-define(wxMenuBar_SetLabel_2, 875).
+-define(wxMenuBar_SetLabel_1, 876).
+-define(wxMenuBar_SetLabelTop, 877).
+-define(wxControl_GetLabel, 878).
+-define(wxControl_SetLabel, 879).
+-define(wxControlWithItems_Append_1, 880).
+-define(wxControlWithItems_Append_2, 881).
+-define(wxControlWithItems_appendStrings_1, 882).
+-define(wxControlWithItems_Clear, 883).
+-define(wxControlWithItems_Delete, 884).
+-define(wxControlWithItems_FindString, 885).
+-define(wxControlWithItems_getClientData, 886).
+-define(wxControlWithItems_setClientData, 887).
+-define(wxControlWithItems_GetCount, 888).
+-define(wxControlWithItems_GetSelection, 889).
+-define(wxControlWithItems_GetString, 890).
+-define(wxControlWithItems_GetStringSelection, 891).
+-define(wxControlWithItems_Insert_2, 892).
+-define(wxControlWithItems_Insert_3, 893).
+-define(wxControlWithItems_IsEmpty, 894).
+-define(wxControlWithItems_Select, 895).
+-define(wxControlWithItems_SetSelection, 896).
+-define(wxControlWithItems_SetString, 897).
+-define(wxControlWithItems_SetStringSelection, 898).
+-define(wxMenu_new_2, 901).
+-define(wxMenu_new_1, 902).
+-define(wxMenu_destruct, 904).
+-define(wxMenu_Append_3, 905).
+-define(wxMenu_Append_1, 906).
+-define(wxMenu_Append_4_0, 907).
+-define(wxMenu_Append_4_1, 908).
+-define(wxMenu_AppendCheckItem, 909).
+-define(wxMenu_AppendRadioItem, 910).
+-define(wxMenu_AppendSeparator, 911).
+-define(wxMenu_Break, 912).
+-define(wxMenu_Check, 913).
+-define(wxMenu_Delete_1_0, 914).
+-define(wxMenu_Delete_1_1, 915).
+-define(wxMenu_Destroy_1_0, 916).
+-define(wxMenu_Destroy_1_1, 917).
+-define(wxMenu_Enable, 918).
+-define(wxMenu_FindItem_1, 919).
+-define(wxMenu_FindItem_2, 920).
+-define(wxMenu_FindItemByPosition, 921).
+-define(wxMenu_GetHelpString, 922).
+-define(wxMenu_GetLabel, 923).
+-define(wxMenu_GetMenuItemCount, 924).
+-define(wxMenu_GetMenuItems, 925).
+-define(wxMenu_GetTitle, 927).
+-define(wxMenu_Insert_2, 928).
+-define(wxMenu_Insert_3, 929).
+-define(wxMenu_Insert_5_1, 930).
+-define(wxMenu_Insert_5_0, 931).
+-define(wxMenu_InsertCheckItem, 932).
+-define(wxMenu_InsertRadioItem, 933).
+-define(wxMenu_InsertSeparator, 934).
+-define(wxMenu_IsChecked, 935).
+-define(wxMenu_IsEnabled, 936).
+-define(wxMenu_Prepend_1, 937).
+-define(wxMenu_Prepend_2, 938).
+-define(wxMenu_Prepend_4_1, 939).
+-define(wxMenu_Prepend_4_0, 940).
+-define(wxMenu_PrependCheckItem, 941).
+-define(wxMenu_PrependRadioItem, 942).
+-define(wxMenu_PrependSeparator, 943).
+-define(wxMenu_Remove_1_0, 944).
+-define(wxMenu_Remove_1_1, 945).
+-define(wxMenu_SetHelpString, 946).
+-define(wxMenu_SetLabel, 947).
+-define(wxMenu_SetTitle, 948).
+-define(wxMenuItem_new, 949).
+-define(wxMenuItem_destruct, 951).
+-define(wxMenuItem_Check, 952).
+-define(wxMenuItem_Enable, 953).
+-define(wxMenuItem_GetBitmap, 954).
+-define(wxMenuItem_GetHelp, 955).
+-define(wxMenuItem_GetId, 956).
+-define(wxMenuItem_GetKind, 957).
+-define(wxMenuItem_GetLabel, 958).
+-define(wxMenuItem_GetLabelFromText, 959).
+-define(wxMenuItem_GetMenu, 960).
+-define(wxMenuItem_GetText, 961).
+-define(wxMenuItem_GetSubMenu, 962).
+-define(wxMenuItem_IsCheckable, 963).
+-define(wxMenuItem_IsChecked, 964).
+-define(wxMenuItem_IsEnabled, 965).
+-define(wxMenuItem_IsSeparator, 966).
+-define(wxMenuItem_IsSubMenu, 967).
+-define(wxMenuItem_SetBitmap, 968).
+-define(wxMenuItem_SetHelp, 969).
+-define(wxMenuItem_SetMenu, 970).
+-define(wxMenuItem_SetSubMenu, 971).
+-define(wxMenuItem_SetText, 972).
+-define(wxToolBar_AddControl, 973).
+-define(wxToolBar_AddSeparator, 974).
+-define(wxToolBar_AddTool_5, 975).
+-define(wxToolBar_AddTool_4_0, 976).
+-define(wxToolBar_AddTool_1, 977).
+-define(wxToolBar_AddTool_4_1, 978).
+-define(wxToolBar_AddTool_3, 979).
+-define(wxToolBar_AddTool_6, 980).
+-define(wxToolBar_AddCheckTool, 981).
+-define(wxToolBar_AddRadioTool, 982).
+-define(wxToolBar_DeleteTool, 983).
+-define(wxToolBar_DeleteToolByPos, 984).
+-define(wxToolBar_EnableTool, 985).
+-define(wxToolBar_FindById, 986).
+-define(wxToolBar_FindControl, 987).
+-define(wxToolBar_FindToolForPosition, 988).
+-define(wxToolBar_GetToolSize, 989).
+-define(wxToolBar_GetToolBitmapSize, 990).
+-define(wxToolBar_GetMargins, 991).
+-define(wxToolBar_GetToolEnabled, 992).
+-define(wxToolBar_GetToolLongHelp, 993).
+-define(wxToolBar_GetToolPacking, 994).
+-define(wxToolBar_GetToolPos, 995).
+-define(wxToolBar_GetToolSeparation, 996).
+-define(wxToolBar_GetToolShortHelp, 997).
+-define(wxToolBar_GetToolState, 998).
+-define(wxToolBar_InsertControl, 999).
+-define(wxToolBar_InsertSeparator, 1000).
+-define(wxToolBar_InsertTool_5, 1001).
+-define(wxToolBar_InsertTool_2, 1002).
+-define(wxToolBar_InsertTool_4, 1003).
+-define(wxToolBar_Realize, 1004).
+-define(wxToolBar_RemoveTool, 1005).
+-define(wxToolBar_SetMargins, 1006).
+-define(wxToolBar_SetToolBitmapSize, 1007).
+-define(wxToolBar_SetToolLongHelp, 1008).
+-define(wxToolBar_SetToolPacking, 1009).
+-define(wxToolBar_SetToolShortHelp, 1010).
+-define(wxToolBar_SetToolSeparation, 1011).
+-define(wxToolBar_ToggleTool, 1012).
+-define(wxStatusBar_new_0, 1014).
+-define(wxStatusBar_new_2, 1015).
+-define(wxStatusBar_destruct, 1017).
+-define(wxStatusBar_Create, 1018).
+-define(wxStatusBar_GetFieldRect, 1019).
+-define(wxStatusBar_GetFieldsCount, 1020).
+-define(wxStatusBar_GetStatusText, 1021).
+-define(wxStatusBar_PopStatusText, 1022).
+-define(wxStatusBar_PushStatusText, 1023).
+-define(wxStatusBar_SetFieldsCount, 1024).
+-define(wxStatusBar_SetMinHeight, 1025).
+-define(wxStatusBar_SetStatusText, 1026).
+-define(wxStatusBar_SetStatusWidths, 1027).
+-define(wxStatusBar_SetStatusStyles, 1028).
+-define(wxBitmap_new_0, 1029).
+-define(wxBitmap_new_3, 1030).
+-define(wxBitmap_new_4, 1031).
+-define(wxBitmap_new_2_0, 1032).
+-define(wxBitmap_new_2_1, 1033).
+-define(wxBitmap_destruct, 1034).
+-define(wxBitmap_ConvertToImage, 1035).
+-define(wxBitmap_CopyFromIcon, 1036).
+-define(wxBitmap_Create, 1037).
+-define(wxBitmap_GetDepth, 1038).
+-define(wxBitmap_GetHeight, 1039).
+-define(wxBitmap_GetPalette, 1040).
+-define(wxBitmap_GetMask, 1041).
+-define(wxBitmap_GetWidth, 1042).
+-define(wxBitmap_GetSubBitmap, 1043).
+-define(wxBitmap_LoadFile, 1044).
+-define(wxBitmap_Ok, 1045).
+-define(wxBitmap_SaveFile, 1046).
+-define(wxBitmap_SetDepth, 1047).
+-define(wxBitmap_SetHeight, 1048).
+-define(wxBitmap_SetMask, 1049).
+-define(wxBitmap_SetPalette, 1050).
+-define(wxBitmap_SetWidth, 1051).
+-define(wxIcon_new_0, 1052).
+-define(wxIcon_new_2, 1053).
+-define(wxIcon_new_1, 1054).
+-define(wxIcon_CopyFromBitmap, 1055).
+-define(wxIcon_destroy, 1056).
+-define(wxIconBundle_new_0, 1057).
+-define(wxIconBundle_new_2, 1058).
+-define(wxIconBundle_new_1_0, 1059).
+-define(wxIconBundle_new_1_1, 1060).
+-define(wxIconBundle_destruct, 1061).
+-define(wxIconBundle_AddIcon_2, 1062).
+-define(wxIconBundle_AddIcon_1, 1063).
+-define(wxIconBundle_GetIcon_1_1, 1064).
+-define(wxIconBundle_GetIcon_1_0, 1065).
+-define(wxCursor_new_0, 1066).
+-define(wxCursor_new_1_0, 1067).
+-define(wxCursor_new_1_1, 1068).
+-define(wxCursor_new_4, 1069).
+-define(wxCursor_destruct, 1070).
+-define(wxCursor_Ok, 1071).
+-define(wxMask_new_0, 1072).
+-define(wxMask_new_2_1, 1073).
+-define(wxMask_new_2_0, 1074).
+-define(wxMask_new_1, 1075).
+-define(wxMask_destruct, 1076).
+-define(wxMask_Create_2_1, 1077).
+-define(wxMask_Create_2_0, 1078).
+-define(wxMask_Create_1, 1079).
+-define(wxImage_new_0, 1080).
+-define(wxImage_new_3_0, 1081).
+-define(wxImage_new_4, 1082).
+-define(wxImage_new_5, 1083).
+-define(wxImage_new_2, 1084).
+-define(wxImage_new_3_1, 1085).
+-define(wxImage_Blur, 1086).
+-define(wxImage_BlurHorizontal, 1087).
+-define(wxImage_BlurVertical, 1088).
+-define(wxImage_ConvertAlphaToMask, 1089).
+-define(wxImage_ConvertToGreyscale, 1090).
+-define(wxImage_ConvertToMono, 1091).
+-define(wxImage_Copy, 1092).
+-define(wxImage_Create_3, 1093).
+-define(wxImage_Create_4, 1094).
+-define(wxImage_Create_5, 1095).
+-define(wxImage_Destroy, 1096).
+-define(wxImage_FindFirstUnusedColour, 1097).
+-define(wxImage_GetImageExtWildcard, 1098).
+-define(wxImage_GetAlpha_2, 1099).
+-define(wxImage_GetAlpha_0, 1100).
+-define(wxImage_GetBlue, 1101).
+-define(wxImage_GetData, 1102).
+-define(wxImage_GetGreen, 1103).
+-define(wxImage_GetImageCount, 1104).
+-define(wxImage_GetHeight, 1105).
+-define(wxImage_GetMaskBlue, 1106).
+-define(wxImage_GetMaskGreen, 1107).
+-define(wxImage_GetMaskRed, 1108).
+-define(wxImage_GetOrFindMaskColour, 1109).
+-define(wxImage_GetPalette, 1110).
+-define(wxImage_GetRed, 1111).
+-define(wxImage_GetSubImage, 1112).
+-define(wxImage_GetWidth, 1113).
+-define(wxImage_HasAlpha, 1114).
+-define(wxImage_HasMask, 1115).
+-define(wxImage_GetOption, 1116).
+-define(wxImage_GetOptionInt, 1117).
+-define(wxImage_HasOption, 1118).
+-define(wxImage_InitAlpha, 1119).
+-define(wxImage_InitStandardHandlers, 1120).
+-define(wxImage_IsTransparent, 1121).
+-define(wxImage_LoadFile_2, 1122).
+-define(wxImage_LoadFile_3, 1123).
+-define(wxImage_Ok, 1124).
+-define(wxImage_RemoveHandler, 1125).
+-define(wxImage_Mirror, 1126).
+-define(wxImage_Replace, 1127).
+-define(wxImage_Rescale, 1128).
+-define(wxImage_Resize, 1129).
+-define(wxImage_Rotate, 1130).
+-define(wxImage_RotateHue, 1131).
+-define(wxImage_Rotate90, 1132).
+-define(wxImage_SaveFile_1, 1133).
+-define(wxImage_SaveFile_2_0, 1134).
+-define(wxImage_SaveFile_2_1, 1135).
+-define(wxImage_Scale, 1136).
+-define(wxImage_Size, 1137).
+-define(wxImage_SetAlpha_3, 1138).
+-define(wxImage_SetAlpha_2, 1139).
+-define(wxImage_SetData_2, 1140).
+-define(wxImage_SetData_4, 1141).
+-define(wxImage_SetMask, 1142).
+-define(wxImage_SetMaskColour, 1143).
+-define(wxImage_SetMaskFromImage, 1144).
+-define(wxImage_SetOption_2_1, 1145).
+-define(wxImage_SetOption_2_0, 1146).
+-define(wxImage_SetPalette, 1147).
+-define(wxImage_SetRGB_5, 1148).
+-define(wxImage_SetRGB_4, 1149).
+-define(wxImage_destroy, 1150).
+-define(wxBrush_new_0, 1151).
+-define(wxBrush_new_2, 1152).
+-define(wxBrush_new_1, 1153).
+-define(wxBrush_destruct, 1155).
+-define(wxBrush_GetColour, 1156).
+-define(wxBrush_GetStipple, 1157).
+-define(wxBrush_GetStyle, 1158).
+-define(wxBrush_IsHatch, 1159).
+-define(wxBrush_IsOk, 1160).
+-define(wxBrush_SetColour_1, 1161).
+-define(wxBrush_SetColour_3, 1162).
+-define(wxBrush_SetStipple, 1163).
+-define(wxBrush_SetStyle, 1164).
+-define(wxPen_new_0, 1165).
+-define(wxPen_new_2, 1166).
+-define(wxPen_destruct, 1167).
+-define(wxPen_GetCap, 1168).
+-define(wxPen_GetColour, 1169).
+-define(wxPen_GetJoin, 1170).
+-define(wxPen_GetStyle, 1171).
+-define(wxPen_GetWidth, 1172).
+-define(wxPen_IsOk, 1173).
+-define(wxPen_SetCap, 1174).
+-define(wxPen_SetColour_1, 1175).
+-define(wxPen_SetColour_3, 1176).
+-define(wxPen_SetJoin, 1177).
+-define(wxPen_SetStyle, 1178).
+-define(wxPen_SetWidth, 1179).
+-define(wxRegion_new_0, 1180).
+-define(wxRegion_new_4, 1181).
+-define(wxRegion_new_2, 1182).
+-define(wxRegion_new_1_1, 1183).
+-define(wxRegion_new_1_0, 1185).
+-define(wxRegion_destruct, 1187).
+-define(wxRegion_Clear, 1188).
+-define(wxRegion_Contains_2, 1189).
+-define(wxRegion_Contains_1_0, 1190).
+-define(wxRegion_Contains_4, 1191).
+-define(wxRegion_Contains_1_1, 1192).
+-define(wxRegion_ConvertToBitmap, 1193).
+-define(wxRegion_GetBox, 1194).
+-define(wxRegion_Intersect_4, 1195).
+-define(wxRegion_Intersect_1_1, 1196).
+-define(wxRegion_Intersect_1_0, 1197).
+-define(wxRegion_IsEmpty, 1198).
+-define(wxRegion_Subtract_4, 1199).
+-define(wxRegion_Subtract_1_1, 1200).
+-define(wxRegion_Subtract_1_0, 1201).
+-define(wxRegion_Offset_2, 1202).
+-define(wxRegion_Offset_1, 1203).
+-define(wxRegion_Union_4, 1204).
+-define(wxRegion_Union_1_2, 1205).
+-define(wxRegion_Union_1_1, 1206).
+-define(wxRegion_Union_1_0, 1207).
+-define(wxRegion_Union_3, 1208).
+-define(wxRegion_Xor_4, 1209).
+-define(wxRegion_Xor_1_1, 1210).
+-define(wxRegion_Xor_1_0, 1211).
+-define(wxAcceleratorTable_new_0, 1212).
+-define(wxAcceleratorTable_new_2, 1213).
+-define(wxAcceleratorTable_destruct, 1214).
+-define(wxAcceleratorTable_Ok, 1215).
+-define(wxAcceleratorEntry_new_1_0, 1216).
+-define(wxAcceleratorEntry_new_1_1, 1217).
+-define(wxAcceleratorEntry_GetCommand, 1218).
+-define(wxAcceleratorEntry_GetFlags, 1219).
+-define(wxAcceleratorEntry_GetKeyCode, 1220).
+-define(wxAcceleratorEntry_Set, 1221).
+-define(wxAcceleratorEntry_destroy, 1222).
+-define(wxCaret_new_3, 1227).
+-define(wxCaret_new_2, 1228).
+-define(wxCaret_destruct, 1230).
+-define(wxCaret_Create_3, 1231).
+-define(wxCaret_Create_2, 1232).
+-define(wxCaret_GetBlinkTime, 1233).
+-define(wxCaret_GetPosition, 1235).
+-define(wxCaret_GetSize, 1237).
+-define(wxCaret_GetWindow, 1238).
+-define(wxCaret_Hide, 1239).
+-define(wxCaret_IsOk, 1240).
+-define(wxCaret_IsVisible, 1241).
+-define(wxCaret_Move_2, 1242).
+-define(wxCaret_Move_1, 1243).
+-define(wxCaret_SetBlinkTime, 1244).
+-define(wxCaret_SetSize_2, 1245).
+-define(wxCaret_SetSize_1, 1246).
+-define(wxCaret_Show, 1247).
+-define(wxSizer_Add_2_1, 1248).
+-define(wxSizer_Add_2_0, 1249).
+-define(wxSizer_Add_3, 1250).
+-define(wxSizer_Add_2_3, 1251).
+-define(wxSizer_Add_2_2, 1252).
+-define(wxSizer_AddSpacer, 1253).
+-define(wxSizer_AddStretchSpacer, 1254).
+-define(wxSizer_CalcMin, 1255).
+-define(wxSizer_Clear, 1256).
+-define(wxSizer_Detach_1_2, 1257).
+-define(wxSizer_Detach_1_1, 1258).
+-define(wxSizer_Detach_1_0, 1259).
+-define(wxSizer_Fit, 1260).
+-define(wxSizer_FitInside, 1261).
+-define(wxSizer_GetChildren, 1262).
+-define(wxSizer_GetItem_2_1, 1263).
+-define(wxSizer_GetItem_2_0, 1264).
+-define(wxSizer_GetItem_1, 1265).
+-define(wxSizer_GetSize, 1266).
+-define(wxSizer_GetPosition, 1267).
+-define(wxSizer_GetMinSize, 1268).
+-define(wxSizer_Hide_2_0, 1269).
+-define(wxSizer_Hide_2_1, 1270).
+-define(wxSizer_Hide_1, 1271).
+-define(wxSizer_Insert_3_1, 1272).
+-define(wxSizer_Insert_3_0, 1273).
+-define(wxSizer_Insert_4, 1274).
+-define(wxSizer_Insert_3_3, 1275).
+-define(wxSizer_Insert_3_2, 1276).
+-define(wxSizer_Insert_2, 1277).
+-define(wxSizer_InsertSpacer, 1278).
+-define(wxSizer_InsertStretchSpacer, 1279).
+-define(wxSizer_IsShown_1_2, 1280).
+-define(wxSizer_IsShown_1_1, 1281).
+-define(wxSizer_IsShown_1_0, 1282).
+-define(wxSizer_Layout, 1283).
+-define(wxSizer_Prepend_2_1, 1284).
+-define(wxSizer_Prepend_2_0, 1285).
+-define(wxSizer_Prepend_3, 1286).
+-define(wxSizer_Prepend_2_3, 1287).
+-define(wxSizer_Prepend_2_2, 1288).
+-define(wxSizer_Prepend_1, 1289).
+-define(wxSizer_PrependSpacer, 1290).
+-define(wxSizer_PrependStretchSpacer, 1291).
+-define(wxSizer_RecalcSizes, 1292).
+-define(wxSizer_Remove_1_1, 1293).
+-define(wxSizer_Remove_1_0, 1294).
+-define(wxSizer_Replace_3_1, 1295).
+-define(wxSizer_Replace_3_0, 1296).
+-define(wxSizer_Replace_2, 1297).
+-define(wxSizer_SetDimension, 1298).
+-define(wxSizer_SetMinSize_2, 1299).
+-define(wxSizer_SetMinSize_1, 1300).
+-define(wxSizer_SetItemMinSize_3_2, 1301).
+-define(wxSizer_SetItemMinSize_2_2, 1302).
+-define(wxSizer_SetItemMinSize_3_1, 1303).
+-define(wxSizer_SetItemMinSize_2_1, 1304).
+-define(wxSizer_SetItemMinSize_3_0, 1305).
+-define(wxSizer_SetItemMinSize_2_0, 1306).
+-define(wxSizer_SetSizeHints, 1307).
+-define(wxSizer_SetVirtualSizeHints, 1308).
+-define(wxSizer_Show_2_2, 1309).
+-define(wxSizer_Show_2_1, 1310).
+-define(wxSizer_Show_2_0, 1311).
+-define(wxSizer_Show_1, 1312).
+-define(wxSizerFlags_new, 1313).
+-define(wxSizerFlags_Align, 1314).
+-define(wxSizerFlags_Border_2, 1315).
+-define(wxSizerFlags_Border_1, 1316).
+-define(wxSizerFlags_Center, 1317).
+-define(wxSizerFlags_Centre, 1318).
+-define(wxSizerFlags_Expand, 1319).
+-define(wxSizerFlags_Left, 1320).
+-define(wxSizerFlags_Proportion, 1321).
+-define(wxSizerFlags_Right, 1322).
+-define(wxSizerFlags_destroy, 1323).
+-define(wxSizerItem_new_5_1, 1324).
+-define(wxSizerItem_new_2_1, 1325).
+-define(wxSizerItem_new_5_0, 1326).
+-define(wxSizerItem_new_2_0, 1327).
+-define(wxSizerItem_new_6, 1328).
+-define(wxSizerItem_new_3, 1329).
+-define(wxSizerItem_new_0, 1330).
+-define(wxSizerItem_destruct, 1331).
+-define(wxSizerItem_CalcMin, 1332).
+-define(wxSizerItem_DeleteWindows, 1333).
+-define(wxSizerItem_DetachSizer, 1334).
+-define(wxSizerItem_GetBorder, 1335).
+-define(wxSizerItem_GetFlag, 1336).
+-define(wxSizerItem_GetMinSize, 1337).
+-define(wxSizerItem_GetPosition, 1338).
+-define(wxSizerItem_GetProportion, 1339).
+-define(wxSizerItem_GetRatio, 1340).
+-define(wxSizerItem_GetRect, 1341).
+-define(wxSizerItem_GetSize, 1342).
+-define(wxSizerItem_GetSizer, 1343).
+-define(wxSizerItem_GetSpacer, 1344).
+-define(wxSizerItem_GetUserData, 1345).
+-define(wxSizerItem_GetWindow, 1346).
+-define(wxSizerItem_IsSizer, 1347).
+-define(wxSizerItem_IsShown, 1348).
+-define(wxSizerItem_IsSpacer, 1349).
+-define(wxSizerItem_IsWindow, 1350).
+-define(wxSizerItem_SetBorder, 1351).
+-define(wxSizerItem_SetDimension, 1352).
+-define(wxSizerItem_SetFlag, 1353).
+-define(wxSizerItem_SetInitSize, 1354).
+-define(wxSizerItem_SetMinSize_1, 1355).
+-define(wxSizerItem_SetMinSize_2, 1356).
+-define(wxSizerItem_SetProportion, 1357).
+-define(wxSizerItem_SetRatio_2, 1358).
+-define(wxSizerItem_SetRatio_1_1, 1359).
+-define(wxSizerItem_SetRatio_1_0, 1360).
+-define(wxSizerItem_SetSizer, 1361).
+-define(wxSizerItem_SetSpacer_1, 1362).
+-define(wxSizerItem_SetSpacer_2, 1363).
+-define(wxSizerItem_SetWindow, 1364).
+-define(wxSizerItem_Show, 1365).
+-define(wxBoxSizer_new, 1366).
+-define(wxBoxSizer_GetOrientation, 1367).
+-define(wxBoxSizer_destroy, 1368).
+-define(wxStaticBoxSizer_new_2, 1369).
+-define(wxStaticBoxSizer_new_3, 1370).
+-define(wxStaticBoxSizer_GetStaticBox, 1371).
+-define(wxStaticBoxSizer_destroy, 1372).
+-define(wxGridSizer_new_4, 1373).
+-define(wxGridSizer_new_2, 1374).
+-define(wxGridSizer_GetCols, 1375).
+-define(wxGridSizer_GetHGap, 1376).
+-define(wxGridSizer_GetRows, 1377).
+-define(wxGridSizer_GetVGap, 1378).
+-define(wxGridSizer_SetCols, 1379).
+-define(wxGridSizer_SetHGap, 1380).
+-define(wxGridSizer_SetRows, 1381).
+-define(wxGridSizer_SetVGap, 1382).
+-define(wxGridSizer_destroy, 1383).
+-define(wxFlexGridSizer_new_4, 1384).
+-define(wxFlexGridSizer_new_2, 1385).
+-define(wxFlexGridSizer_AddGrowableCol, 1386).
+-define(wxFlexGridSizer_AddGrowableRow, 1387).
+-define(wxFlexGridSizer_GetFlexibleDirection, 1388).
+-define(wxFlexGridSizer_GetNonFlexibleGrowMode, 1389).
+-define(wxFlexGridSizer_RemoveGrowableCol, 1390).
+-define(wxFlexGridSizer_RemoveGrowableRow, 1391).
+-define(wxFlexGridSizer_SetFlexibleDirection, 1392).
+-define(wxFlexGridSizer_SetNonFlexibleGrowMode, 1393).
+-define(wxFlexGridSizer_destroy, 1394).
+-define(wxGridBagSizer_new, 1395).
+-define(wxGridBagSizer_Add_3_2, 1396).
+-define(wxGridBagSizer_Add_3_1, 1397).
+-define(wxGridBagSizer_Add_4, 1398).
+-define(wxGridBagSizer_Add_1_0, 1399).
+-define(wxGridBagSizer_Add_2_1, 1400).
+-define(wxGridBagSizer_Add_2_0, 1401).
+-define(wxGridBagSizer_Add_3_0, 1402).
+-define(wxGridBagSizer_Add_1_1, 1403).
+-define(wxGridBagSizer_CalcMin, 1404).
+-define(wxGridBagSizer_CheckForIntersection_2, 1405).
+-define(wxGridBagSizer_CheckForIntersection_3, 1406).
+-define(wxGridBagSizer_FindItem_1_1, 1407).
+-define(wxGridBagSizer_FindItem_1_0, 1408).
+-define(wxGridBagSizer_FindItemAtPoint, 1409).
+-define(wxGridBagSizer_FindItemAtPosition, 1410).
+-define(wxGridBagSizer_FindItemWithData, 1411).
+-define(wxGridBagSizer_GetCellSize, 1412).
+-define(wxGridBagSizer_GetEmptyCellSize, 1413).
+-define(wxGridBagSizer_GetItemPosition_1_2, 1414).
+-define(wxGridBagSizer_GetItemPosition_1_1, 1415).
+-define(wxGridBagSizer_GetItemPosition_1_0, 1416).
+-define(wxGridBagSizer_GetItemSpan_1_2, 1417).
+-define(wxGridBagSizer_GetItemSpan_1_1, 1418).
+-define(wxGridBagSizer_GetItemSpan_1_0, 1419).
+-define(wxGridBagSizer_SetEmptyCellSize, 1420).
+-define(wxGridBagSizer_SetItemPosition_2_2, 1421).
+-define(wxGridBagSizer_SetItemPosition_2_1, 1422).
+-define(wxGridBagSizer_SetItemPosition_2_0, 1423).
+-define(wxGridBagSizer_SetItemSpan_2_2, 1424).
+-define(wxGridBagSizer_SetItemSpan_2_1, 1425).
+-define(wxGridBagSizer_SetItemSpan_2_0, 1426).
+-define(wxGridBagSizer_destroy, 1427).
+-define(wxStdDialogButtonSizer_new, 1428).
+-define(wxStdDialogButtonSizer_AddButton, 1429).
+-define(wxStdDialogButtonSizer_Realize, 1430).
+-define(wxStdDialogButtonSizer_SetAffirmativeButton, 1431).
+-define(wxStdDialogButtonSizer_SetCancelButton, 1432).
+-define(wxStdDialogButtonSizer_SetNegativeButton, 1433).
+-define(wxStdDialogButtonSizer_destroy, 1434).
+-define(wxFont_new_0, 1435).
+-define(wxFont_new_1, 1436).
+-define(wxFont_new_5, 1437).
+-define(wxFont_destruct, 1439).
+-define(wxFont_IsFixedWidth, 1440).
+-define(wxFont_GetDefaultEncoding, 1441).
+-define(wxFont_GetFaceName, 1442).
+-define(wxFont_GetFamily, 1443).
+-define(wxFont_GetNativeFontInfoDesc, 1444).
+-define(wxFont_GetNativeFontInfoUserDesc, 1445).
+-define(wxFont_GetPointSize, 1446).
+-define(wxFont_GetStyle, 1447).
+-define(wxFont_GetUnderlined, 1448).
+-define(wxFont_GetWeight, 1449).
+-define(wxFont_Ok, 1450).
+-define(wxFont_SetDefaultEncoding, 1451).
+-define(wxFont_SetFaceName, 1452).
+-define(wxFont_SetFamily, 1453).
+-define(wxFont_SetPointSize, 1454).
+-define(wxFont_SetStyle, 1455).
+-define(wxFont_SetUnderlined, 1456).
+-define(wxFont_SetWeight, 1457).
+-define(wxToolTip_Enable, 1458).
+-define(wxToolTip_SetDelay, 1459).
+-define(wxToolTip_new, 1460).
+-define(wxToolTip_SetTip, 1461).
+-define(wxToolTip_GetTip, 1462).
+-define(wxToolTip_GetWindow, 1463).
+-define(wxToolTip_destroy, 1464).
+-define(wxButton_new_3, 1466).
+-define(wxButton_new_0, 1467).
+-define(wxButton_destruct, 1468).
+-define(wxButton_Create, 1469).
+-define(wxButton_GetDefaultSize, 1470).
+-define(wxButton_SetDefault, 1471).
+-define(wxButton_SetLabel, 1472).
+-define(wxBitmapButton_new_4, 1474).
+-define(wxBitmapButton_new_0, 1475).
+-define(wxBitmapButton_Create, 1476).
+-define(wxBitmapButton_GetBitmapDisabled, 1477).
+-define(wxBitmapButton_GetBitmapFocus, 1479).
+-define(wxBitmapButton_GetBitmapLabel, 1481).
+-define(wxBitmapButton_GetBitmapSelected, 1483).
+-define(wxBitmapButton_SetBitmapDisabled, 1485).
+-define(wxBitmapButton_SetBitmapFocus, 1486).
+-define(wxBitmapButton_SetBitmapLabel, 1487).
+-define(wxBitmapButton_SetBitmapSelected, 1488).
+-define(wxBitmapButton_destroy, 1489).
+-define(wxToggleButton_new_0, 1490).
+-define(wxToggleButton_new_4, 1491).
+-define(wxToggleButton_Create, 1492).
+-define(wxToggleButton_GetValue, 1493).
+-define(wxToggleButton_SetValue, 1494).
+-define(wxToggleButton_destroy, 1495).
+-define(wxCalendarCtrl_new_0, 1496).
+-define(wxCalendarCtrl_new_3, 1497).
+-define(wxCalendarCtrl_Create, 1498).
+-define(wxCalendarCtrl_destruct, 1499).
+-define(wxCalendarCtrl_SetDate, 1500).
+-define(wxCalendarCtrl_GetDate, 1501).
+-define(wxCalendarCtrl_EnableYearChange, 1502).
+-define(wxCalendarCtrl_EnableMonthChange, 1503).
+-define(wxCalendarCtrl_EnableHolidayDisplay, 1504).
+-define(wxCalendarCtrl_SetHeaderColours, 1505).
+-define(wxCalendarCtrl_GetHeaderColourFg, 1506).
+-define(wxCalendarCtrl_GetHeaderColourBg, 1507).
+-define(wxCalendarCtrl_SetHighlightColours, 1508).
+-define(wxCalendarCtrl_GetHighlightColourFg, 1509).
+-define(wxCalendarCtrl_GetHighlightColourBg, 1510).
+-define(wxCalendarCtrl_SetHolidayColours, 1511).
+-define(wxCalendarCtrl_GetHolidayColourFg, 1512).
+-define(wxCalendarCtrl_GetHolidayColourBg, 1513).
+-define(wxCalendarCtrl_GetAttr, 1514).
+-define(wxCalendarCtrl_SetAttr, 1515).
+-define(wxCalendarCtrl_SetHoliday, 1516).
+-define(wxCalendarCtrl_ResetAttr, 1517).
+-define(wxCalendarCtrl_HitTest, 1518).
+-define(wxCalendarDateAttr_new_0, 1519).
+-define(wxCalendarDateAttr_new_2_1, 1520).
+-define(wxCalendarDateAttr_new_2_0, 1521).
+-define(wxCalendarDateAttr_SetTextColour, 1522).
+-define(wxCalendarDateAttr_SetBackgroundColour, 1523).
+-define(wxCalendarDateAttr_SetBorderColour, 1524).
+-define(wxCalendarDateAttr_SetFont, 1525).
+-define(wxCalendarDateAttr_SetBorder, 1526).
+-define(wxCalendarDateAttr_SetHoliday, 1527).
+-define(wxCalendarDateAttr_HasTextColour, 1528).
+-define(wxCalendarDateAttr_HasBackgroundColour, 1529).
+-define(wxCalendarDateAttr_HasBorderColour, 1530).
+-define(wxCalendarDateAttr_HasFont, 1531).
+-define(wxCalendarDateAttr_HasBorder, 1532).
+-define(wxCalendarDateAttr_IsHoliday, 1533).
+-define(wxCalendarDateAttr_GetTextColour, 1534).
+-define(wxCalendarDateAttr_GetBackgroundColour, 1535).
+-define(wxCalendarDateAttr_GetBorderColour, 1536).
+-define(wxCalendarDateAttr_GetFont, 1537).
+-define(wxCalendarDateAttr_GetBorder, 1538).
+-define(wxCalendarDateAttr_destroy, 1539).
+-define(wxCheckBox_new_4, 1541).
+-define(wxCheckBox_new_0, 1542).
+-define(wxCheckBox_Create, 1543).
+-define(wxCheckBox_GetValue, 1544).
+-define(wxCheckBox_Get3StateValue, 1545).
+-define(wxCheckBox_Is3rdStateAllowedForUser, 1546).
+-define(wxCheckBox_Is3State, 1547).
+-define(wxCheckBox_IsChecked, 1548).
+-define(wxCheckBox_SetValue, 1549).
+-define(wxCheckBox_Set3StateValue, 1550).
+-define(wxCheckBox_destroy, 1551).
+-define(wxCheckListBox_new_0, 1552).
+-define(wxCheckListBox_new_3, 1554).
+-define(wxCheckListBox_Check, 1555).
+-define(wxCheckListBox_IsChecked, 1556).
+-define(wxCheckListBox_destroy, 1557).
+-define(wxChoice_new_3, 1560).
+-define(wxChoice_new_0, 1561).
+-define(wxChoice_destruct, 1563).
+-define(wxChoice_Create, 1565).
+-define(wxChoice_Delete, 1566).
+-define(wxChoice_GetColumns, 1567).
+-define(wxChoice_SetColumns, 1568).
+-define(wxComboBox_new_0, 1569).
+-define(wxComboBox_new_3, 1571).
+-define(wxComboBox_destruct, 1572).
+-define(wxComboBox_Create, 1574).
+-define(wxComboBox_CanCopy, 1575).
+-define(wxComboBox_CanCut, 1576).
+-define(wxComboBox_CanPaste, 1577).
+-define(wxComboBox_CanRedo, 1578).
+-define(wxComboBox_CanUndo, 1579).
+-define(wxComboBox_Copy, 1580).
+-define(wxComboBox_Cut, 1581).
+-define(wxComboBox_GetInsertionPoint, 1582).
+-define(wxComboBox_GetLastPosition, 1583).
+-define(wxComboBox_GetValue, 1584).
+-define(wxComboBox_Paste, 1585).
+-define(wxComboBox_Redo, 1586).
+-define(wxComboBox_Replace, 1587).
+-define(wxComboBox_Remove, 1588).
+-define(wxComboBox_SetInsertionPoint, 1589).
+-define(wxComboBox_SetInsertionPointEnd, 1590).
+-define(wxComboBox_SetSelection_1, 1591).
+-define(wxComboBox_SetSelection_2, 1592).
+-define(wxComboBox_SetValue, 1593).
+-define(wxComboBox_Undo, 1594).
+-define(wxGauge_new_0, 1595).
+-define(wxGauge_new_4, 1596).
+-define(wxGauge_Create, 1597).
+-define(wxGauge_GetBezelFace, 1598).
+-define(wxGauge_GetRange, 1599).
+-define(wxGauge_GetShadowWidth, 1600).
+-define(wxGauge_GetValue, 1601).
+-define(wxGauge_IsVertical, 1602).
+-define(wxGauge_SetBezelFace, 1603).
+-define(wxGauge_SetRange, 1604).
+-define(wxGauge_SetShadowWidth, 1605).
+-define(wxGauge_SetValue, 1606).
+-define(wxGauge_Pulse, 1607).
+-define(wxGauge_destroy, 1608).
+-define(wxGenericDirCtrl_new_0, 1609).
+-define(wxGenericDirCtrl_new_2, 1610).
+-define(wxGenericDirCtrl_destruct, 1611).
+-define(wxGenericDirCtrl_Create, 1612).
+-define(wxGenericDirCtrl_Init, 1613).
+-define(wxGenericDirCtrl_CollapseTree, 1614).
+-define(wxGenericDirCtrl_ExpandPath, 1615).
+-define(wxGenericDirCtrl_GetDefaultPath, 1616).
+-define(wxGenericDirCtrl_GetPath, 1617).
+-define(wxGenericDirCtrl_GetFilePath, 1618).
+-define(wxGenericDirCtrl_GetFilter, 1619).
+-define(wxGenericDirCtrl_GetFilterIndex, 1620).
+-define(wxGenericDirCtrl_GetRootId, 1621).
+-define(wxGenericDirCtrl_GetTreeCtrl, 1622).
+-define(wxGenericDirCtrl_ReCreateTree, 1623).
+-define(wxGenericDirCtrl_SetDefaultPath, 1624).
+-define(wxGenericDirCtrl_SetFilter, 1625).
+-define(wxGenericDirCtrl_SetFilterIndex, 1626).
+-define(wxGenericDirCtrl_SetPath, 1627).
+-define(wxStaticBox_new_4, 1629).
+-define(wxStaticBox_new_0, 1630).
+-define(wxStaticBox_Create, 1631).
+-define(wxStaticBox_destroy, 1632).
+-define(wxStaticLine_new_2, 1634).
+-define(wxStaticLine_new_0, 1635).
+-define(wxStaticLine_Create, 1636).
+-define(wxStaticLine_IsVertical, 1637).
+-define(wxStaticLine_GetDefaultSize, 1638).
+-define(wxStaticLine_destroy, 1639).
+-define(wxListBox_new_3, 1642).
+-define(wxListBox_new_0, 1643).
+-define(wxListBox_destruct, 1645).
+-define(wxListBox_Create, 1647).
+-define(wxListBox_Deselect, 1648).
+-define(wxListBox_GetSelections, 1649).
+-define(wxListBox_InsertItems, 1650).
+-define(wxListBox_IsSelected, 1651).
+-define(wxListBox_Set, 1653).
+-define(wxListBox_HitTest, 1654).
+-define(wxListBox_SetFirstItem_1_0, 1655).
+-define(wxListBox_SetFirstItem_1_1, 1656).
+-define(wxListCtrl_new_0, 1657).
+-define(wxListCtrl_new_2, 1658).
+-define(wxListCtrl_Arrange, 1659).
+-define(wxListCtrl_AssignImageList, 1660).
+-define(wxListCtrl_ClearAll, 1661).
+-define(wxListCtrl_Create, 1662).
+-define(wxListCtrl_DeleteAllItems, 1663).
+-define(wxListCtrl_DeleteColumn, 1664).
+-define(wxListCtrl_DeleteItem, 1665).
+-define(wxListCtrl_EditLabel, 1666).
+-define(wxListCtrl_EnsureVisible, 1667).
+-define(wxListCtrl_FindItem_3_0, 1668).
+-define(wxListCtrl_FindItem_3_1, 1669).
+-define(wxListCtrl_GetColumn, 1670).
+-define(wxListCtrl_GetColumnCount, 1671).
+-define(wxListCtrl_GetColumnWidth, 1672).
+-define(wxListCtrl_GetCountPerPage, 1673).
+-define(wxListCtrl_GetEditControl, 1674).
+-define(wxListCtrl_GetImageList, 1675).
+-define(wxListCtrl_GetItem, 1676).
+-define(wxListCtrl_GetItemBackgroundColour, 1677).
+-define(wxListCtrl_GetItemCount, 1678).
+-define(wxListCtrl_GetItemData, 1679).
+-define(wxListCtrl_GetItemFont, 1680).
+-define(wxListCtrl_GetItemPosition, 1681).
+-define(wxListCtrl_GetItemRect, 1682).
+-define(wxListCtrl_GetItemSpacing, 1683).
+-define(wxListCtrl_GetItemState, 1684).
+-define(wxListCtrl_GetItemText, 1685).
+-define(wxListCtrl_GetItemTextColour, 1686).
+-define(wxListCtrl_GetNextItem, 1687).
+-define(wxListCtrl_GetSelectedItemCount, 1688).
+-define(wxListCtrl_GetTextColour, 1689).
+-define(wxListCtrl_GetTopItem, 1690).
+-define(wxListCtrl_GetViewRect, 1691).
+-define(wxListCtrl_HitTest, 1692).
+-define(wxListCtrl_InsertColumn_2, 1693).
+-define(wxListCtrl_InsertColumn_3, 1694).
+-define(wxListCtrl_InsertItem_1, 1695).
+-define(wxListCtrl_InsertItem_2_1, 1696).
+-define(wxListCtrl_InsertItem_2_0, 1697).
+-define(wxListCtrl_InsertItem_3, 1698).
+-define(wxListCtrl_RefreshItem, 1699).
+-define(wxListCtrl_RefreshItems, 1700).
+-define(wxListCtrl_ScrollList, 1701).
+-define(wxListCtrl_SetBackgroundColour, 1702).
+-define(wxListCtrl_SetColumn, 1703).
+-define(wxListCtrl_SetColumnWidth, 1704).
+-define(wxListCtrl_SetImageList, 1705).
+-define(wxListCtrl_SetItem_1, 1706).
+-define(wxListCtrl_SetItem_4, 1707).
+-define(wxListCtrl_SetItemBackgroundColour, 1708).
+-define(wxListCtrl_SetItemCount, 1709).
+-define(wxListCtrl_SetItemData, 1710).
+-define(wxListCtrl_SetItemFont, 1711).
+-define(wxListCtrl_SetItemImage, 1712).
+-define(wxListCtrl_SetItemColumnImage, 1713).
+-define(wxListCtrl_SetItemPosition, 1714).
+-define(wxListCtrl_SetItemState, 1715).
+-define(wxListCtrl_SetItemText, 1716).
+-define(wxListCtrl_SetItemTextColour, 1717).
+-define(wxListCtrl_SetSingleStyle, 1718).
+-define(wxListCtrl_SetTextColour, 1719).
+-define(wxListCtrl_SetWindowStyleFlag, 1720).
+-define(wxListCtrl_SortItems, 1721).
+-define(wxListCtrl_destroy, 1722).
+-define(wxListView_ClearColumnImage, 1723).
+-define(wxListView_Focus, 1724).
+-define(wxListView_GetFirstSelected, 1725).
+-define(wxListView_GetFocusedItem, 1726).
+-define(wxListView_GetNextSelected, 1727).
+-define(wxListView_IsSelected, 1728).
+-define(wxListView_Select, 1729).
+-define(wxListView_SetColumnImage, 1730).
+-define(wxListItem_new_0, 1731).
+-define(wxListItem_new_1, 1732).
+-define(wxListItem_destruct, 1733).
+-define(wxListItem_Clear, 1734).
+-define(wxListItem_GetAlign, 1735).
+-define(wxListItem_GetBackgroundColour, 1736).
+-define(wxListItem_GetColumn, 1737).
+-define(wxListItem_GetFont, 1738).
+-define(wxListItem_GetId, 1739).
+-define(wxListItem_GetImage, 1740).
+-define(wxListItem_GetMask, 1741).
+-define(wxListItem_GetState, 1742).
+-define(wxListItem_GetText, 1743).
+-define(wxListItem_GetTextColour, 1744).
+-define(wxListItem_GetWidth, 1745).
+-define(wxListItem_SetAlign, 1746).
+-define(wxListItem_SetBackgroundColour, 1747).
+-define(wxListItem_SetColumn, 1748).
+-define(wxListItem_SetFont, 1749).
+-define(wxListItem_SetId, 1750).
+-define(wxListItem_SetImage, 1751).
+-define(wxListItem_SetMask, 1752).
+-define(wxListItem_SetState, 1753).
+-define(wxListItem_SetStateMask, 1754).
+-define(wxListItem_SetText, 1755).
+-define(wxListItem_SetTextColour, 1756).
+-define(wxListItem_SetWidth, 1757).
+-define(wxListItemAttr_new_0, 1758).
+-define(wxListItemAttr_new_3, 1759).
+-define(wxListItemAttr_GetBackgroundColour, 1760).
+-define(wxListItemAttr_GetFont, 1761).
+-define(wxListItemAttr_GetTextColour, 1762).
+-define(wxListItemAttr_HasBackgroundColour, 1763).
+-define(wxListItemAttr_HasFont, 1764).
+-define(wxListItemAttr_HasTextColour, 1765).
+-define(wxListItemAttr_SetBackgroundColour, 1766).
+-define(wxListItemAttr_SetFont, 1767).
+-define(wxListItemAttr_SetTextColour, 1768).
+-define(wxListItemAttr_destroy, 1769).
+-define(wxImageList_new_0, 1770).
+-define(wxImageList_new_3, 1771).
+-define(wxImageList_Add_1, 1772).
+-define(wxImageList_Add_2_0, 1773).
+-define(wxImageList_Add_2_1, 1774).
+-define(wxImageList_Create, 1775).
+-define(wxImageList_Draw, 1777).
+-define(wxImageList_GetBitmap, 1778).
+-define(wxImageList_GetIcon, 1779).
+-define(wxImageList_GetImageCount, 1780).
+-define(wxImageList_GetSize, 1781).
+-define(wxImageList_Remove, 1782).
+-define(wxImageList_RemoveAll, 1783).
+-define(wxImageList_Replace_2, 1784).
+-define(wxImageList_Replace_3, 1785).
+-define(wxImageList_destroy, 1786).
+-define(wxTextAttr_new_0, 1787).
+-define(wxTextAttr_new_2, 1788).
+-define(wxTextAttr_GetAlignment, 1789).
+-define(wxTextAttr_GetBackgroundColour, 1790).
+-define(wxTextAttr_GetFont, 1791).
+-define(wxTextAttr_GetLeftIndent, 1792).
+-define(wxTextAttr_GetLeftSubIndent, 1793).
+-define(wxTextAttr_GetRightIndent, 1794).
+-define(wxTextAttr_GetTabs, 1795).
+-define(wxTextAttr_GetTextColour, 1796).
+-define(wxTextAttr_HasBackgroundColour, 1797).
+-define(wxTextAttr_HasFont, 1798).
+-define(wxTextAttr_HasTextColour, 1799).
+-define(wxTextAttr_GetFlags, 1800).
+-define(wxTextAttr_IsDefault, 1801).
+-define(wxTextAttr_SetAlignment, 1802).
+-define(wxTextAttr_SetBackgroundColour, 1803).
+-define(wxTextAttr_SetFlags, 1804).
+-define(wxTextAttr_SetFont, 1805).
+-define(wxTextAttr_SetLeftIndent, 1806).
+-define(wxTextAttr_SetRightIndent, 1807).
+-define(wxTextAttr_SetTabs, 1808).
+-define(wxTextAttr_SetTextColour, 1809).
+-define(wxTextAttr_destroy, 1810).
+-define(wxTextCtrl_new_3, 1812).
+-define(wxTextCtrl_new_0, 1813).
+-define(wxTextCtrl_destruct, 1815).
+-define(wxTextCtrl_AppendText, 1816).
+-define(wxTextCtrl_CanCopy, 1817).
+-define(wxTextCtrl_CanCut, 1818).
+-define(wxTextCtrl_CanPaste, 1819).
+-define(wxTextCtrl_CanRedo, 1820).
+-define(wxTextCtrl_CanUndo, 1821).
+-define(wxTextCtrl_Clear, 1822).
+-define(wxTextCtrl_Copy, 1823).
+-define(wxTextCtrl_Create, 1824).
+-define(wxTextCtrl_Cut, 1825).
+-define(wxTextCtrl_DiscardEdits, 1826).
+-define(wxTextCtrl_EmulateKeyPress, 1827).
+-define(wxTextCtrl_GetDefaultStyle, 1828).
+-define(wxTextCtrl_GetInsertionPoint, 1829).
+-define(wxTextCtrl_GetLastPosition, 1830).
+-define(wxTextCtrl_GetLineLength, 1831).
+-define(wxTextCtrl_GetLineText, 1832).
+-define(wxTextCtrl_GetNumberOfLines, 1833).
+-define(wxTextCtrl_GetRange, 1834).
+-define(wxTextCtrl_GetSelection, 1835).
+-define(wxTextCtrl_GetStringSelection, 1836).
+-define(wxTextCtrl_GetStyle, 1837).
+-define(wxTextCtrl_GetValue, 1838).
+-define(wxTextCtrl_IsEditable, 1839).
+-define(wxTextCtrl_IsModified, 1840).
+-define(wxTextCtrl_IsMultiLine, 1841).
+-define(wxTextCtrl_IsSingleLine, 1842).
+-define(wxTextCtrl_LoadFile, 1843).
+-define(wxTextCtrl_MarkDirty, 1844).
+-define(wxTextCtrl_Paste, 1845).
+-define(wxTextCtrl_PositionToXY, 1846).
+-define(wxTextCtrl_Redo, 1847).
+-define(wxTextCtrl_Remove, 1848).
+-define(wxTextCtrl_Replace, 1849).
+-define(wxTextCtrl_SaveFile, 1850).
+-define(wxTextCtrl_SetDefaultStyle, 1851).
+-define(wxTextCtrl_SetEditable, 1852).
+-define(wxTextCtrl_SetInsertionPoint, 1853).
+-define(wxTextCtrl_SetInsertionPointEnd, 1854).
+-define(wxTextCtrl_SetMaxLength, 1856).
+-define(wxTextCtrl_SetSelection, 1857).
+-define(wxTextCtrl_SetStyle, 1858).
+-define(wxTextCtrl_SetValue, 1859).
+-define(wxTextCtrl_ShowPosition, 1860).
+-define(wxTextCtrl_Undo, 1861).
+-define(wxTextCtrl_WriteText, 1862).
+-define(wxTextCtrl_XYToPosition, 1863).
+-define(wxNotebook_new_0, 1866).
+-define(wxNotebook_new_3, 1867).
+-define(wxNotebook_destruct, 1868).
+-define(wxNotebook_AddPage, 1869).
+-define(wxNotebook_AdvanceSelection, 1870).
+-define(wxNotebook_AssignImageList, 1871).
+-define(wxNotebook_Create, 1872).
+-define(wxNotebook_DeleteAllPages, 1873).
+-define(wxNotebook_DeletePage, 1874).
+-define(wxNotebook_RemovePage, 1875).
+-define(wxNotebook_GetCurrentPage, 1876).
+-define(wxNotebook_GetImageList, 1877).
+-define(wxNotebook_GetPage, 1879).
+-define(wxNotebook_GetPageCount, 1880).
+-define(wxNotebook_GetPageImage, 1881).
+-define(wxNotebook_GetPageText, 1882).
+-define(wxNotebook_GetRowCount, 1883).
+-define(wxNotebook_GetSelection, 1884).
+-define(wxNotebook_GetThemeBackgroundColour, 1885).
+-define(wxNotebook_HitTest, 1887).
+-define(wxNotebook_InsertPage, 1889).
+-define(wxNotebook_SetImageList, 1890).
+-define(wxNotebook_SetPadding, 1891).
+-define(wxNotebook_SetPageSize, 1892).
+-define(wxNotebook_SetPageImage, 1893).
+-define(wxNotebook_SetPageText, 1894).
+-define(wxNotebook_SetSelection, 1895).
+-define(wxNotebook_ChangeSelection, 1896).
+-define(wxChoicebook_new_0, 1897).
+-define(wxChoicebook_new_3, 1898).
+-define(wxChoicebook_AddPage, 1899).
+-define(wxChoicebook_AdvanceSelection, 1900).
+-define(wxChoicebook_AssignImageList, 1901).
+-define(wxChoicebook_Create, 1902).
+-define(wxChoicebook_DeleteAllPages, 1903).
+-define(wxChoicebook_DeletePage, 1904).
+-define(wxChoicebook_RemovePage, 1905).
+-define(wxChoicebook_GetCurrentPage, 1906).
+-define(wxChoicebook_GetImageList, 1907).
+-define(wxChoicebook_GetPage, 1909).
+-define(wxChoicebook_GetPageCount, 1910).
+-define(wxChoicebook_GetPageImage, 1911).
+-define(wxChoicebook_GetPageText, 1912).
+-define(wxChoicebook_GetSelection, 1913).
+-define(wxChoicebook_HitTest, 1914).
+-define(wxChoicebook_InsertPage, 1915).
+-define(wxChoicebook_SetImageList, 1916).
+-define(wxChoicebook_SetPageSize, 1917).
+-define(wxChoicebook_SetPageImage, 1918).
+-define(wxChoicebook_SetPageText, 1919).
+-define(wxChoicebook_SetSelection, 1920).
+-define(wxChoicebook_ChangeSelection, 1921).
+-define(wxChoicebook_destroy, 1922).
+-define(wxToolbook_new_0, 1923).
+-define(wxToolbook_new_3, 1924).
+-define(wxToolbook_AddPage, 1925).
+-define(wxToolbook_AdvanceSelection, 1926).
+-define(wxToolbook_AssignImageList, 1927).
+-define(wxToolbook_Create, 1928).
+-define(wxToolbook_DeleteAllPages, 1929).
+-define(wxToolbook_DeletePage, 1930).
+-define(wxToolbook_RemovePage, 1931).
+-define(wxToolbook_GetCurrentPage, 1932).
+-define(wxToolbook_GetImageList, 1933).
+-define(wxToolbook_GetPage, 1935).
+-define(wxToolbook_GetPageCount, 1936).
+-define(wxToolbook_GetPageImage, 1937).
+-define(wxToolbook_GetPageText, 1938).
+-define(wxToolbook_GetSelection, 1939).
+-define(wxToolbook_HitTest, 1941).
+-define(wxToolbook_InsertPage, 1942).
+-define(wxToolbook_SetImageList, 1943).
+-define(wxToolbook_SetPageSize, 1944).
+-define(wxToolbook_SetPageImage, 1945).
+-define(wxToolbook_SetPageText, 1946).
+-define(wxToolbook_SetSelection, 1947).
+-define(wxToolbook_ChangeSelection, 1948).
+-define(wxToolbook_destroy, 1949).
+-define(wxListbook_new_0, 1950).
+-define(wxListbook_new_3, 1951).
+-define(wxListbook_AddPage, 1952).
+-define(wxListbook_AdvanceSelection, 1953).
+-define(wxListbook_AssignImageList, 1954).
+-define(wxListbook_Create, 1955).
+-define(wxListbook_DeleteAllPages, 1956).
+-define(wxListbook_DeletePage, 1957).
+-define(wxListbook_RemovePage, 1958).
+-define(wxListbook_GetCurrentPage, 1959).
+-define(wxListbook_GetImageList, 1960).
+-define(wxListbook_GetPage, 1962).
+-define(wxListbook_GetPageCount, 1963).
+-define(wxListbook_GetPageImage, 1964).
+-define(wxListbook_GetPageText, 1965).
+-define(wxListbook_GetSelection, 1966).
+-define(wxListbook_HitTest, 1968).
+-define(wxListbook_InsertPage, 1969).
+-define(wxListbook_SetImageList, 1970).
+-define(wxListbook_SetPageSize, 1971).
+-define(wxListbook_SetPageImage, 1972).
+-define(wxListbook_SetPageText, 1973).
+-define(wxListbook_SetSelection, 1974).
+-define(wxListbook_ChangeSelection, 1975).
+-define(wxListbook_destroy, 1976).
+-define(wxTreebook_new_0, 1977).
+-define(wxTreebook_new_3, 1978).
+-define(wxTreebook_AddPage, 1979).
+-define(wxTreebook_AdvanceSelection, 1980).
+-define(wxTreebook_AssignImageList, 1981).
+-define(wxTreebook_Create, 1982).
+-define(wxTreebook_DeleteAllPages, 1983).
+-define(wxTreebook_DeletePage, 1984).
+-define(wxTreebook_RemovePage, 1985).
+-define(wxTreebook_GetCurrentPage, 1986).
+-define(wxTreebook_GetImageList, 1987).
+-define(wxTreebook_GetPage, 1989).
+-define(wxTreebook_GetPageCount, 1990).
+-define(wxTreebook_GetPageImage, 1991).
+-define(wxTreebook_GetPageText, 1992).
+-define(wxTreebook_GetSelection, 1993).
+-define(wxTreebook_ExpandNode, 1994).
+-define(wxTreebook_IsNodeExpanded, 1995).
+-define(wxTreebook_HitTest, 1997).
+-define(wxTreebook_InsertPage, 1998).
+-define(wxTreebook_InsertSubPage, 1999).
+-define(wxTreebook_SetImageList, 2000).
+-define(wxTreebook_SetPageSize, 2001).
+-define(wxTreebook_SetPageImage, 2002).
+-define(wxTreebook_SetPageText, 2003).
+-define(wxTreebook_SetSelection, 2004).
+-define(wxTreebook_ChangeSelection, 2005).
+-define(wxTreebook_destroy, 2006).
+-define(wxTreeCtrl_new_2, 2009).
+-define(wxTreeCtrl_new_0, 2010).
+-define(wxTreeCtrl_destruct, 2012).
+-define(wxTreeCtrl_AddRoot, 2013).
+-define(wxTreeCtrl_AppendItem, 2014).
+-define(wxTreeCtrl_AssignImageList, 2015).
+-define(wxTreeCtrl_AssignStateImageList, 2016).
+-define(wxTreeCtrl_Collapse, 2017).
+-define(wxTreeCtrl_CollapseAndReset, 2018).
+-define(wxTreeCtrl_Create, 2019).
+-define(wxTreeCtrl_Delete, 2020).
+-define(wxTreeCtrl_DeleteAllItems, 2021).
+-define(wxTreeCtrl_DeleteChildren, 2022).
+-define(wxTreeCtrl_EditLabel, 2023).
+-define(wxTreeCtrl_EnsureVisible, 2024).
+-define(wxTreeCtrl_Expand, 2025).
+-define(wxTreeCtrl_GetBoundingRect, 2026).
+-define(wxTreeCtrl_GetChildrenCount, 2028).
+-define(wxTreeCtrl_GetCount, 2029).
+-define(wxTreeCtrl_GetEditControl, 2030).
+-define(wxTreeCtrl_GetFirstChild, 2031).
+-define(wxTreeCtrl_GetNextChild, 2032).
+-define(wxTreeCtrl_GetFirstVisibleItem, 2033).
+-define(wxTreeCtrl_GetImageList, 2034).
+-define(wxTreeCtrl_GetIndent, 2035).
+-define(wxTreeCtrl_GetItemBackgroundColour, 2036).
+-define(wxTreeCtrl_GetItemData, 2037).
+-define(wxTreeCtrl_GetItemFont, 2038).
+-define(wxTreeCtrl_GetItemImage_1, 2039).
+-define(wxTreeCtrl_GetItemImage_2, 2040).
+-define(wxTreeCtrl_GetItemText, 2041).
+-define(wxTreeCtrl_GetItemTextColour, 2042).
+-define(wxTreeCtrl_GetLastChild, 2043).
+-define(wxTreeCtrl_GetNextSibling, 2044).
+-define(wxTreeCtrl_GetNextVisible, 2045).
+-define(wxTreeCtrl_GetItemParent, 2046).
+-define(wxTreeCtrl_GetPrevSibling, 2047).
+-define(wxTreeCtrl_GetPrevVisible, 2048).
+-define(wxTreeCtrl_GetRootItem, 2049).
+-define(wxTreeCtrl_GetSelection, 2050).
+-define(wxTreeCtrl_GetSelections, 2051).
+-define(wxTreeCtrl_GetStateImageList, 2052).
+-define(wxTreeCtrl_HitTest, 2053).
+-define(wxTreeCtrl_InsertItem, 2055).
+-define(wxTreeCtrl_IsBold, 2056).
+-define(wxTreeCtrl_IsExpanded, 2057).
+-define(wxTreeCtrl_IsSelected, 2058).
+-define(wxTreeCtrl_IsVisible, 2059).
+-define(wxTreeCtrl_ItemHasChildren, 2060).
+-define(wxTreeCtrl_PrependItem, 2061).
+-define(wxTreeCtrl_ScrollTo, 2062).
+-define(wxTreeCtrl_SelectItem_1, 2063).
+-define(wxTreeCtrl_SelectItem_2, 2064).
+-define(wxTreeCtrl_SetIndent, 2065).
+-define(wxTreeCtrl_SetImageList, 2066).
+-define(wxTreeCtrl_SetItemBackgroundColour, 2067).
+-define(wxTreeCtrl_SetItemBold, 2068).
+-define(wxTreeCtrl_SetItemData, 2069).
+-define(wxTreeCtrl_SetItemDropHighlight, 2070).
+-define(wxTreeCtrl_SetItemFont, 2071).
+-define(wxTreeCtrl_SetItemHasChildren, 2072).
+-define(wxTreeCtrl_SetItemImage_2, 2073).
+-define(wxTreeCtrl_SetItemImage_3, 2074).
+-define(wxTreeCtrl_SetItemText, 2075).
+-define(wxTreeCtrl_SetItemTextColour, 2076).
+-define(wxTreeCtrl_SetStateImageList, 2077).
+-define(wxTreeCtrl_SetWindowStyle, 2078).
+-define(wxTreeCtrl_SortChildren, 2079).
+-define(wxTreeCtrl_Toggle, 2080).
+-define(wxTreeCtrl_ToggleItemSelection, 2081).
+-define(wxTreeCtrl_Unselect, 2082).
+-define(wxTreeCtrl_UnselectAll, 2083).
+-define(wxTreeCtrl_UnselectItem, 2084).
+-define(wxScrollBar_new_0, 2085).
+-define(wxScrollBar_new_3, 2086).
+-define(wxScrollBar_destruct, 2087).
+-define(wxScrollBar_Create, 2088).
+-define(wxScrollBar_GetRange, 2089).
+-define(wxScrollBar_GetPageSize, 2090).
+-define(wxScrollBar_GetThumbPosition, 2091).
+-define(wxScrollBar_GetThumbSize, 2092).
+-define(wxScrollBar_SetThumbPosition, 2093).
+-define(wxScrollBar_SetScrollbar, 2094).
+-define(wxSpinButton_new_2, 2096).
+-define(wxSpinButton_new_0, 2097).
+-define(wxSpinButton_Create, 2098).
+-define(wxSpinButton_GetMax, 2099).
+-define(wxSpinButton_GetMin, 2100).
+-define(wxSpinButton_GetValue, 2101).
+-define(wxSpinButton_SetRange, 2102).
+-define(wxSpinButton_SetValue, 2103).
+-define(wxSpinButton_destroy, 2104).
+-define(wxSpinCtrl_new_0, 2105).
+-define(wxSpinCtrl_new_2, 2106).
+-define(wxSpinCtrl_Create, 2108).
+-define(wxSpinCtrl_SetValue_1_1, 2111).
+-define(wxSpinCtrl_SetValue_1_0, 2112).
+-define(wxSpinCtrl_GetValue, 2114).
+-define(wxSpinCtrl_SetRange, 2116).
+-define(wxSpinCtrl_SetSelection, 2117).
+-define(wxSpinCtrl_GetMin, 2119).
+-define(wxSpinCtrl_GetMax, 2121).
+-define(wxSpinCtrl_destroy, 2122).
+-define(wxStaticText_new_0, 2123).
+-define(wxStaticText_new_4, 2124).
+-define(wxStaticText_Create, 2125).
+-define(wxStaticText_GetLabel, 2126).
+-define(wxStaticText_SetLabel, 2127).
+-define(wxStaticText_Wrap, 2128).
+-define(wxStaticText_destroy, 2129).
+-define(wxStaticBitmap_new_0, 2130).
+-define(wxStaticBitmap_new_4, 2131).
+-define(wxStaticBitmap_Create, 2132).
+-define(wxStaticBitmap_GetBitmap, 2133).
+-define(wxStaticBitmap_SetBitmap, 2134).
+-define(wxStaticBitmap_destroy, 2135).
+-define(wxRadioBox_new, 2136).
+-define(wxRadioBox_destruct, 2138).
+-define(wxRadioBox_Create, 2139).
+-define(wxRadioBox_Enable_2, 2140).
+-define(wxRadioBox_Enable_1, 2141).
+-define(wxRadioBox_GetSelection, 2142).
+-define(wxRadioBox_GetString, 2143).
+-define(wxRadioBox_SetSelection, 2144).
+-define(wxRadioBox_Show_2, 2145).
+-define(wxRadioBox_Show_1, 2146).
+-define(wxRadioBox_GetColumnCount, 2147).
+-define(wxRadioBox_GetItemHelpText, 2148).
+-define(wxRadioBox_GetItemToolTip, 2149).
+-define(wxRadioBox_GetItemFromPoint, 2151).
+-define(wxRadioBox_GetRowCount, 2152).
+-define(wxRadioBox_IsItemEnabled, 2153).
+-define(wxRadioBox_IsItemShown, 2154).
+-define(wxRadioBox_SetItemHelpText, 2155).
+-define(wxRadioBox_SetItemToolTip, 2156).
+-define(wxRadioButton_new_0, 2157).
+-define(wxRadioButton_new_4, 2158).
+-define(wxRadioButton_Create, 2159).
+-define(wxRadioButton_GetValue, 2160).
+-define(wxRadioButton_SetValue, 2161).
+-define(wxRadioButton_destroy, 2162).
+-define(wxSlider_new_6, 2164).
+-define(wxSlider_new_0, 2165).
+-define(wxSlider_Create, 2166).
+-define(wxSlider_GetLineSize, 2167).
+-define(wxSlider_GetMax, 2168).
+-define(wxSlider_GetMin, 2169).
+-define(wxSlider_GetPageSize, 2170).
+-define(wxSlider_GetThumbLength, 2171).
+-define(wxSlider_GetValue, 2172).
+-define(wxSlider_SetLineSize, 2173).
+-define(wxSlider_SetPageSize, 2174).
+-define(wxSlider_SetRange, 2175).
+-define(wxSlider_SetThumbLength, 2176).
+-define(wxSlider_SetValue, 2177).
+-define(wxSlider_destroy, 2178).
+-define(wxDialog_new_4, 2180).
+-define(wxDialog_new_0, 2181).
+-define(wxDialog_destruct, 2183).
+-define(wxDialog_Create, 2184).
+-define(wxDialog_CreateButtonSizer, 2185).
+-define(wxDialog_CreateStdDialogButtonSizer, 2186).
+-define(wxDialog_EndModal, 2187).
+-define(wxDialog_GetAffirmativeId, 2188).
+-define(wxDialog_GetReturnCode, 2189).
+-define(wxDialog_IsModal, 2190).
+-define(wxDialog_SetAffirmativeId, 2191).
+-define(wxDialog_SetReturnCode, 2192).
+-define(wxDialog_Show, 2193).
+-define(wxDialog_ShowModal, 2194).
+-define(wxColourDialog_new_0, 2195).
+-define(wxColourDialog_new_2, 2196).
+-define(wxColourDialog_destruct, 2197).
+-define(wxColourDialog_Create, 2198).
+-define(wxColourDialog_GetColourData, 2199).
+-define(wxColourData_new_0, 2200).
+-define(wxColourData_new_1, 2201).
+-define(wxColourData_destruct, 2202).
+-define(wxColourData_GetChooseFull, 2203).
+-define(wxColourData_GetColour, 2204).
+-define(wxColourData_GetCustomColour, 2206).
+-define(wxColourData_SetChooseFull, 2207).
+-define(wxColourData_SetColour, 2208).
+-define(wxColourData_SetCustomColour, 2209).
+-define(wxPalette_new_0, 2210).
+-define(wxPalette_new_4, 2211).
+-define(wxPalette_destruct, 2213).
+-define(wxPalette_Create, 2214).
+-define(wxPalette_GetColoursCount, 2215).
+-define(wxPalette_GetPixel, 2216).
+-define(wxPalette_GetRGB, 2217).
+-define(wxPalette_IsOk, 2218).
+-define(wxDirDialog_new, 2222).
+-define(wxDirDialog_destruct, 2223).
+-define(wxDirDialog_GetPath, 2224).
+-define(wxDirDialog_GetMessage, 2225).
+-define(wxDirDialog_SetMessage, 2226).
+-define(wxDirDialog_SetPath, 2227).
+-define(wxFileDialog_new, 2231).
+-define(wxFileDialog_destruct, 2232).
+-define(wxFileDialog_GetDirectory, 2233).
+-define(wxFileDialog_GetFilename, 2234).
+-define(wxFileDialog_GetFilenames, 2235).
+-define(wxFileDialog_GetFilterIndex, 2236).
+-define(wxFileDialog_GetMessage, 2237).
+-define(wxFileDialog_GetPath, 2238).
+-define(wxFileDialog_GetPaths, 2239).
+-define(wxFileDialog_GetWildcard, 2240).
+-define(wxFileDialog_SetDirectory, 2241).
+-define(wxFileDialog_SetFilename, 2242).
+-define(wxFileDialog_SetFilterIndex, 2243).
+-define(wxFileDialog_SetMessage, 2244).
+-define(wxFileDialog_SetPath, 2245).
+-define(wxFileDialog_SetWildcard, 2246).
+-define(wxPickerBase_SetInternalMargin, 2247).
+-define(wxPickerBase_GetInternalMargin, 2248).
+-define(wxPickerBase_SetTextCtrlProportion, 2249).
+-define(wxPickerBase_SetPickerCtrlProportion, 2250).
+-define(wxPickerBase_GetTextCtrlProportion, 2251).
+-define(wxPickerBase_GetPickerCtrlProportion, 2252).
+-define(wxPickerBase_HasTextCtrl, 2253).
+-define(wxPickerBase_GetTextCtrl, 2254).
+-define(wxPickerBase_IsTextCtrlGrowable, 2255).
+-define(wxPickerBase_SetPickerCtrlGrowable, 2256).
+-define(wxPickerBase_SetTextCtrlGrowable, 2257).
+-define(wxPickerBase_IsPickerCtrlGrowable, 2258).
+-define(wxFilePickerCtrl_new_0, 2259).
+-define(wxFilePickerCtrl_new_3, 2260).
+-define(wxFilePickerCtrl_Create, 2261).
+-define(wxFilePickerCtrl_GetPath, 2262).
+-define(wxFilePickerCtrl_SetPath, 2263).
+-define(wxFilePickerCtrl_destroy, 2264).
+-define(wxDirPickerCtrl_new_0, 2265).
+-define(wxDirPickerCtrl_new_3, 2266).
+-define(wxDirPickerCtrl_Create, 2267).
+-define(wxDirPickerCtrl_GetPath, 2268).
+-define(wxDirPickerCtrl_SetPath, 2269).
+-define(wxDirPickerCtrl_destroy, 2270).
+-define(wxColourPickerCtrl_new_0, 2271).
+-define(wxColourPickerCtrl_new_3, 2272).
+-define(wxColourPickerCtrl_Create, 2273).
+-define(wxColourPickerCtrl_GetColour, 2274).
+-define(wxColourPickerCtrl_SetColour_1_1, 2275).
+-define(wxColourPickerCtrl_SetColour_1_0, 2276).
+-define(wxColourPickerCtrl_destroy, 2277).
+-define(wxDatePickerCtrl_new_0, 2278).
+-define(wxDatePickerCtrl_new_3, 2279).
+-define(wxDatePickerCtrl_GetRange, 2280).
+-define(wxDatePickerCtrl_GetValue, 2281).
+-define(wxDatePickerCtrl_SetRange, 2282).
+-define(wxDatePickerCtrl_SetValue, 2283).
+-define(wxDatePickerCtrl_destroy, 2284).
+-define(wxFontPickerCtrl_new_0, 2285).
+-define(wxFontPickerCtrl_new_3, 2286).
+-define(wxFontPickerCtrl_Create, 2287).
+-define(wxFontPickerCtrl_GetSelectedFont, 2288).
+-define(wxFontPickerCtrl_SetSelectedFont, 2289).
+-define(wxFontPickerCtrl_GetMaxPointSize, 2290).
+-define(wxFontPickerCtrl_SetMaxPointSize, 2291).
+-define(wxFontPickerCtrl_destroy, 2292).
+-define(wxFindReplaceDialog_new_0, 2295).
+-define(wxFindReplaceDialog_new_4, 2296).
+-define(wxFindReplaceDialog_destruct, 2297).
+-define(wxFindReplaceDialog_Create, 2298).
+-define(wxFindReplaceDialog_GetData, 2299).
+-define(wxFindReplaceData_new_0, 2300).
+-define(wxFindReplaceData_new_1, 2301).
+-define(wxFindReplaceData_GetFindString, 2302).
+-define(wxFindReplaceData_GetReplaceString, 2303).
+-define(wxFindReplaceData_GetFlags, 2304).
+-define(wxFindReplaceData_SetFlags, 2305).
+-define(wxFindReplaceData_SetFindString, 2306).
+-define(wxFindReplaceData_SetReplaceString, 2307).
+-define(wxFindReplaceData_destroy, 2308).
+-define(wxMultiChoiceDialog_new_0, 2309).
+-define(wxMultiChoiceDialog_new_5, 2311).
+-define(wxMultiChoiceDialog_GetSelections, 2312).
+-define(wxMultiChoiceDialog_SetSelections, 2313).
+-define(wxMultiChoiceDialog_destroy, 2314).
+-define(wxSingleChoiceDialog_new_0, 2315).
+-define(wxSingleChoiceDialog_new_5, 2317).
+-define(wxSingleChoiceDialog_GetSelection, 2318).
+-define(wxSingleChoiceDialog_GetStringSelection, 2319).
+-define(wxSingleChoiceDialog_SetSelection, 2320).
+-define(wxSingleChoiceDialog_destroy, 2321).
+-define(wxTextEntryDialog_new, 2322).
+-define(wxTextEntryDialog_GetValue, 2323).
+-define(wxTextEntryDialog_SetValue, 2324).
+-define(wxTextEntryDialog_destroy, 2325).
+-define(wxPasswordEntryDialog_new, 2326).
+-define(wxPasswordEntryDialog_destroy, 2327).
+-define(wxFontData_new_0, 2328).
+-define(wxFontData_new_1, 2329).
+-define(wxFontData_destruct, 2330).
+-define(wxFontData_EnableEffects, 2331).
+-define(wxFontData_GetAllowSymbols, 2332).
+-define(wxFontData_GetColour, 2333).
+-define(wxFontData_GetChosenFont, 2334).
+-define(wxFontData_GetEnableEffects, 2335).
+-define(wxFontData_GetInitialFont, 2336).
+-define(wxFontData_GetShowHelp, 2337).
+-define(wxFontData_SetAllowSymbols, 2338).
+-define(wxFontData_SetChosenFont, 2339).
+-define(wxFontData_SetColour, 2340).
+-define(wxFontData_SetInitialFont, 2341).
+-define(wxFontData_SetRange, 2342).
+-define(wxFontData_SetShowHelp, 2343).
+-define(wxFontDialog_new_0, 2347).
+-define(wxFontDialog_new_2, 2349).
+-define(wxFontDialog_Create, 2351).
+-define(wxFontDialog_GetFontData, 2352).
+-define(wxFontDialog_destroy, 2354).
+-define(wxProgressDialog_new, 2355).
+-define(wxProgressDialog_destruct, 2356).
+-define(wxProgressDialog_Resume, 2357).
+-define(wxProgressDialog_Update_2, 2358).
+-define(wxProgressDialog_Update_0, 2359).
+-define(wxMessageDialog_new, 2360).
+-define(wxMessageDialog_destruct, 2361).
+-define(wxPageSetupDialog_new, 2362).
+-define(wxPageSetupDialog_destruct, 2363).
+-define(wxPageSetupDialog_GetPageSetupData, 2364).
+-define(wxPageSetupDialog_ShowModal, 2365).
+-define(wxPageSetupDialogData_new_0, 2366).
+-define(wxPageSetupDialogData_new_1_0, 2367).
+-define(wxPageSetupDialogData_new_1_1, 2368).
+-define(wxPageSetupDialogData_destruct, 2369).
+-define(wxPageSetupDialogData_EnableHelp, 2370).
+-define(wxPageSetupDialogData_EnableMargins, 2371).
+-define(wxPageSetupDialogData_EnableOrientation, 2372).
+-define(wxPageSetupDialogData_EnablePaper, 2373).
+-define(wxPageSetupDialogData_EnablePrinter, 2374).
+-define(wxPageSetupDialogData_GetDefaultMinMargins, 2375).
+-define(wxPageSetupDialogData_GetEnableMargins, 2376).
+-define(wxPageSetupDialogData_GetEnableOrientation, 2377).
+-define(wxPageSetupDialogData_GetEnablePaper, 2378).
+-define(wxPageSetupDialogData_GetEnablePrinter, 2379).
+-define(wxPageSetupDialogData_GetEnableHelp, 2380).
+-define(wxPageSetupDialogData_GetDefaultInfo, 2381).
+-define(wxPageSetupDialogData_GetMarginTopLeft, 2382).
+-define(wxPageSetupDialogData_GetMarginBottomRight, 2383).
+-define(wxPageSetupDialogData_GetMinMarginTopLeft, 2384).
+-define(wxPageSetupDialogData_GetMinMarginBottomRight, 2385).
+-define(wxPageSetupDialogData_GetPaperId, 2386).
+-define(wxPageSetupDialogData_GetPaperSize, 2387).
+-define(wxPageSetupDialogData_GetPrintData, 2389).
+-define(wxPageSetupDialogData_IsOk, 2390).
+-define(wxPageSetupDialogData_SetDefaultInfo, 2391).
+-define(wxPageSetupDialogData_SetDefaultMinMargins, 2392).
+-define(wxPageSetupDialogData_SetMarginTopLeft, 2393).
+-define(wxPageSetupDialogData_SetMarginBottomRight, 2394).
+-define(wxPageSetupDialogData_SetMinMarginTopLeft, 2395).
+-define(wxPageSetupDialogData_SetMinMarginBottomRight, 2396).
+-define(wxPageSetupDialogData_SetPaperId, 2397).
+-define(wxPageSetupDialogData_SetPaperSize_1_1, 2398).
+-define(wxPageSetupDialogData_SetPaperSize_1_0, 2399).
+-define(wxPageSetupDialogData_SetPrintData, 2400).
+-define(wxPrintDialog_new_2_0, 2401).
+-define(wxPrintDialog_new_2_1, 2402).
+-define(wxPrintDialog_destruct, 2403).
+-define(wxPrintDialog_GetPrintDialogData, 2404).
+-define(wxPrintDialog_GetPrintDC, 2405).
+-define(wxPrintDialogData_new_0, 2406).
+-define(wxPrintDialogData_new_1_1, 2407).
+-define(wxPrintDialogData_new_1_0, 2408).
+-define(wxPrintDialogData_destruct, 2409).
+-define(wxPrintDialogData_EnableHelp, 2410).
+-define(wxPrintDialogData_EnablePageNumbers, 2411).
+-define(wxPrintDialogData_EnablePrintToFile, 2412).
+-define(wxPrintDialogData_EnableSelection, 2413).
+-define(wxPrintDialogData_GetAllPages, 2414).
+-define(wxPrintDialogData_GetCollate, 2415).
+-define(wxPrintDialogData_GetFromPage, 2416).
+-define(wxPrintDialogData_GetMaxPage, 2417).
+-define(wxPrintDialogData_GetMinPage, 2418).
+-define(wxPrintDialogData_GetNoCopies, 2419).
+-define(wxPrintDialogData_GetPrintData, 2420).
+-define(wxPrintDialogData_GetPrintToFile, 2421).
+-define(wxPrintDialogData_GetSelection, 2422).
+-define(wxPrintDialogData_GetToPage, 2423).
+-define(wxPrintDialogData_IsOk, 2424).
+-define(wxPrintDialogData_SetCollate, 2425).
+-define(wxPrintDialogData_SetFromPage, 2426).
+-define(wxPrintDialogData_SetMaxPage, 2427).
+-define(wxPrintDialogData_SetMinPage, 2428).
+-define(wxPrintDialogData_SetNoCopies, 2429).
+-define(wxPrintDialogData_SetPrintData, 2430).
+-define(wxPrintDialogData_SetPrintToFile, 2431).
+-define(wxPrintDialogData_SetSelection, 2432).
+-define(wxPrintDialogData_SetToPage, 2433).
+-define(wxPrintData_new_0, 2434).
+-define(wxPrintData_new_1, 2435).
+-define(wxPrintData_destruct, 2436).
+-define(wxPrintData_GetCollate, 2437).
+-define(wxPrintData_GetBin, 2438).
+-define(wxPrintData_GetColour, 2439).
+-define(wxPrintData_GetDuplex, 2440).
+-define(wxPrintData_GetNoCopies, 2441).
+-define(wxPrintData_GetOrientation, 2442).
+-define(wxPrintData_GetPaperId, 2443).
+-define(wxPrintData_GetPrinterName, 2444).
+-define(wxPrintData_GetQuality, 2445).
+-define(wxPrintData_IsOk, 2446).
+-define(wxPrintData_SetBin, 2447).
+-define(wxPrintData_SetCollate, 2448).
+-define(wxPrintData_SetColour, 2449).
+-define(wxPrintData_SetDuplex, 2450).
+-define(wxPrintData_SetNoCopies, 2451).
+-define(wxPrintData_SetOrientation, 2452).
+-define(wxPrintData_SetPaperId, 2453).
+-define(wxPrintData_SetPrinterName, 2454).
+-define(wxPrintData_SetQuality, 2455).
+-define(wxPrintPreview_new_2, 2458).
+-define(wxPrintPreview_new_3, 2459).
+-define(wxPrintPreview_destruct, 2461).
+-define(wxPrintPreview_GetCanvas, 2462).
+-define(wxPrintPreview_GetCurrentPage, 2463).
+-define(wxPrintPreview_GetFrame, 2464).
+-define(wxPrintPreview_GetMaxPage, 2465).
+-define(wxPrintPreview_GetMinPage, 2466).
+-define(wxPrintPreview_GetPrintout, 2467).
+-define(wxPrintPreview_GetPrintoutForPrinting, 2468).
+-define(wxPrintPreview_IsOk, 2469).
+-define(wxPrintPreview_PaintPage, 2470).
+-define(wxPrintPreview_Print, 2471).
+-define(wxPrintPreview_RenderPage, 2472).
+-define(wxPrintPreview_SetCanvas, 2473).
+-define(wxPrintPreview_SetCurrentPage, 2474).
+-define(wxPrintPreview_SetFrame, 2475).
+-define(wxPrintPreview_SetPrintout, 2476).
+-define(wxPrintPreview_SetZoom, 2477).
+-define(wxPreviewFrame_new, 2478).
+-define(wxPreviewFrame_destruct, 2479).
+-define(wxPreviewFrame_CreateControlBar, 2480).
+-define(wxPreviewFrame_CreateCanvas, 2481).
+-define(wxPreviewFrame_Initialize, 2482).
+-define(wxPreviewFrame_OnCloseWindow, 2483).
+-define(wxPreviewControlBar_new, 2484).
+-define(wxPreviewControlBar_destruct, 2485).
+-define(wxPreviewControlBar_CreateButtons, 2486).
+-define(wxPreviewControlBar_GetPrintPreview, 2487).
+-define(wxPreviewControlBar_GetZoomControl, 2488).
+-define(wxPreviewControlBar_SetZoomControl, 2489).
+-define(wxPrinter_new, 2491).
+-define(wxPrinter_CreateAbortWindow, 2492).
+-define(wxPrinter_GetAbort, 2493).
+-define(wxPrinter_GetLastError, 2494).
+-define(wxPrinter_GetPrintDialogData, 2495).
+-define(wxPrinter_Print, 2496).
+-define(wxPrinter_PrintDialog, 2497).
+-define(wxPrinter_ReportError, 2498).
+-define(wxPrinter_Setup, 2499).
+-define(wxPrinter_destroy, 2500).
+-define(wxXmlResource_new_1, 2501).
+-define(wxXmlResource_new_2, 2502).
+-define(wxXmlResource_destruct, 2503).
+-define(wxXmlResource_AttachUnknownControl, 2504).
+-define(wxXmlResource_ClearHandlers, 2505).
+-define(wxXmlResource_CompareVersion, 2506).
+-define(wxXmlResource_Get, 2507).
+-define(wxXmlResource_GetFlags, 2508).
+-define(wxXmlResource_GetVersion, 2509).
+-define(wxXmlResource_GetXRCID, 2510).
+-define(wxXmlResource_InitAllHandlers, 2511).
+-define(wxXmlResource_Load, 2512).
+-define(wxXmlResource_LoadBitmap, 2513).
+-define(wxXmlResource_LoadDialog_2, 2514).
+-define(wxXmlResource_LoadDialog_3, 2515).
+-define(wxXmlResource_LoadFrame_2, 2516).
+-define(wxXmlResource_LoadFrame_3, 2517).
+-define(wxXmlResource_LoadIcon, 2518).
+-define(wxXmlResource_LoadMenu, 2519).
+-define(wxXmlResource_LoadMenuBar_2, 2520).
+-define(wxXmlResource_LoadMenuBar_1, 2521).
+-define(wxXmlResource_LoadPanel_2, 2522).
+-define(wxXmlResource_LoadPanel_3, 2523).
+-define(wxXmlResource_LoadToolBar, 2524).
+-define(wxXmlResource_Set, 2525).
+-define(wxXmlResource_SetFlags, 2526).
+-define(wxXmlResource_Unload, 2527).
+-define(wxXmlResource_xrcctrl, 2528).
+-define(wxHtmlEasyPrinting_new, 2529).
+-define(wxHtmlEasyPrinting_destruct, 2530).
+-define(wxHtmlEasyPrinting_GetPrintData, 2531).
+-define(wxHtmlEasyPrinting_GetPageSetupData, 2532).
+-define(wxHtmlEasyPrinting_PreviewFile, 2533).
+-define(wxHtmlEasyPrinting_PreviewText, 2534).
+-define(wxHtmlEasyPrinting_PrintFile, 2535).
+-define(wxHtmlEasyPrinting_PrintText, 2536).
+-define(wxHtmlEasyPrinting_PageSetup, 2537).
+-define(wxHtmlEasyPrinting_SetFonts, 2538).
+-define(wxHtmlEasyPrinting_SetHeader, 2539).
+-define(wxHtmlEasyPrinting_SetFooter, 2540).
+-define(wxGLCanvas_new_2, 2542).
+-define(wxGLCanvas_new_3_1, 2543).
+-define(wxGLCanvas_new_3_0, 2544).
+-define(wxGLCanvas_GetContext, 2545).
+-define(wxGLCanvas_SetCurrent, 2547).
+-define(wxGLCanvas_SwapBuffers, 2548).
+-define(wxGLCanvas_destroy, 2549).
+-define(wxAuiManager_new, 2550).
+-define(wxAuiManager_destruct, 2551).
+-define(wxAuiManager_AddPane_2_1, 2552).
+-define(wxAuiManager_AddPane_3, 2553).
+-define(wxAuiManager_AddPane_2_0, 2554).
+-define(wxAuiManager_DetachPane, 2555).
+-define(wxAuiManager_GetAllPanes, 2556).
+-define(wxAuiManager_GetArtProvider, 2557).
+-define(wxAuiManager_GetDockSizeConstraint, 2558).
+-define(wxAuiManager_GetFlags, 2559).
+-define(wxAuiManager_GetManagedWindow, 2560).
+-define(wxAuiManager_GetManager, 2561).
+-define(wxAuiManager_GetPane_1_1, 2562).
+-define(wxAuiManager_GetPane_1_0, 2563).
+-define(wxAuiManager_HideHint, 2564).
+-define(wxAuiManager_InsertPane, 2565).
+-define(wxAuiManager_LoadPaneInfo, 2566).
+-define(wxAuiManager_LoadPerspective, 2567).
+-define(wxAuiManager_SavePaneInfo, 2568).
+-define(wxAuiManager_SavePerspective, 2569).
+-define(wxAuiManager_SetArtProvider, 2570).
+-define(wxAuiManager_SetDockSizeConstraint, 2571).
+-define(wxAuiManager_SetFlags, 2572).
+-define(wxAuiManager_SetManagedWindow, 2573).
+-define(wxAuiManager_ShowHint, 2574).
+-define(wxAuiManager_UnInit, 2575).
+-define(wxAuiManager_Update, 2576).
+-define(wxAuiPaneInfo_new_0, 2577).
+-define(wxAuiPaneInfo_new_1, 2578).
+-define(wxAuiPaneInfo_destruct, 2579).
+-define(wxAuiPaneInfo_BestSize_1, 2580).
+-define(wxAuiPaneInfo_BestSize_2, 2581).
+-define(wxAuiPaneInfo_Bottom, 2582).
+-define(wxAuiPaneInfo_BottomDockable, 2583).
+-define(wxAuiPaneInfo_Caption, 2584).
+-define(wxAuiPaneInfo_CaptionVisible, 2585).
+-define(wxAuiPaneInfo_Centre, 2586).
+-define(wxAuiPaneInfo_CentrePane, 2587).
+-define(wxAuiPaneInfo_CloseButton, 2588).
+-define(wxAuiPaneInfo_DefaultPane, 2589).
+-define(wxAuiPaneInfo_DestroyOnClose, 2590).
+-define(wxAuiPaneInfo_Direction, 2591).
+-define(wxAuiPaneInfo_Dock, 2592).
+-define(wxAuiPaneInfo_Dockable, 2593).
+-define(wxAuiPaneInfo_Fixed, 2594).
+-define(wxAuiPaneInfo_Float, 2595).
+-define(wxAuiPaneInfo_Floatable, 2596).
+-define(wxAuiPaneInfo_FloatingPosition_1, 2597).
+-define(wxAuiPaneInfo_FloatingPosition_2, 2598).
+-define(wxAuiPaneInfo_FloatingSize_1, 2599).
+-define(wxAuiPaneInfo_FloatingSize_2, 2600).
+-define(wxAuiPaneInfo_Gripper, 2601).
+-define(wxAuiPaneInfo_GripperTop, 2602).
+-define(wxAuiPaneInfo_HasBorder, 2603).
+-define(wxAuiPaneInfo_HasCaption, 2604).
+-define(wxAuiPaneInfo_HasCloseButton, 2605).
+-define(wxAuiPaneInfo_HasFlag, 2606).
+-define(wxAuiPaneInfo_HasGripper, 2607).
+-define(wxAuiPaneInfo_HasGripperTop, 2608).
+-define(wxAuiPaneInfo_HasMaximizeButton, 2609).
+-define(wxAuiPaneInfo_HasMinimizeButton, 2610).
+-define(wxAuiPaneInfo_HasPinButton, 2611).
+-define(wxAuiPaneInfo_Hide, 2612).
+-define(wxAuiPaneInfo_IsBottomDockable, 2613).
+-define(wxAuiPaneInfo_IsDocked, 2614).
+-define(wxAuiPaneInfo_IsFixed, 2615).
+-define(wxAuiPaneInfo_IsFloatable, 2616).
+-define(wxAuiPaneInfo_IsFloating, 2617).
+-define(wxAuiPaneInfo_IsLeftDockable, 2618).
+-define(wxAuiPaneInfo_IsMovable, 2619).
+-define(wxAuiPaneInfo_IsOk, 2620).
+-define(wxAuiPaneInfo_IsResizable, 2621).
+-define(wxAuiPaneInfo_IsRightDockable, 2622).
+-define(wxAuiPaneInfo_IsShown, 2623).
+-define(wxAuiPaneInfo_IsToolbar, 2624).
+-define(wxAuiPaneInfo_IsTopDockable, 2625).
+-define(wxAuiPaneInfo_Layer, 2626).
+-define(wxAuiPaneInfo_Left, 2627).
+-define(wxAuiPaneInfo_LeftDockable, 2628).
+-define(wxAuiPaneInfo_MaxSize_1, 2629).
+-define(wxAuiPaneInfo_MaxSize_2, 2630).
+-define(wxAuiPaneInfo_MaximizeButton, 2631).
+-define(wxAuiPaneInfo_MinSize_1, 2632).
+-define(wxAuiPaneInfo_MinSize_2, 2633).
+-define(wxAuiPaneInfo_MinimizeButton, 2634).
+-define(wxAuiPaneInfo_Movable, 2635).
+-define(wxAuiPaneInfo_Name, 2636).
+-define(wxAuiPaneInfo_PaneBorder, 2637).
+-define(wxAuiPaneInfo_PinButton, 2638).
+-define(wxAuiPaneInfo_Position, 2639).
+-define(wxAuiPaneInfo_Resizable, 2640).
+-define(wxAuiPaneInfo_Right, 2641).
+-define(wxAuiPaneInfo_RightDockable, 2642).
+-define(wxAuiPaneInfo_Row, 2643).
+-define(wxAuiPaneInfo_SafeSet, 2644).
+-define(wxAuiPaneInfo_SetFlag, 2645).
+-define(wxAuiPaneInfo_Show, 2646).
+-define(wxAuiPaneInfo_ToolbarPane, 2647).
+-define(wxAuiPaneInfo_Top, 2648).
+-define(wxAuiPaneInfo_TopDockable, 2649).
+-define(wxAuiPaneInfo_Window, 2650).
+-define(wxAuiNotebook_new_0, 2651).
+-define(wxAuiNotebook_new_2, 2652).
+-define(wxAuiNotebook_AddPage, 2653).
+-define(wxAuiNotebook_Create, 2654).
+-define(wxAuiNotebook_DeletePage, 2655).
+-define(wxAuiNotebook_GetArtProvider, 2656).
+-define(wxAuiNotebook_GetPage, 2657).
+-define(wxAuiNotebook_GetPageBitmap, 2658).
+-define(wxAuiNotebook_GetPageCount, 2659).
+-define(wxAuiNotebook_GetPageIndex, 2660).
+-define(wxAuiNotebook_GetPageText, 2661).
+-define(wxAuiNotebook_GetSelection, 2662).
+-define(wxAuiNotebook_InsertPage, 2663).
+-define(wxAuiNotebook_RemovePage, 2664).
+-define(wxAuiNotebook_SetArtProvider, 2665).
+-define(wxAuiNotebook_SetFont, 2666).
+-define(wxAuiNotebook_SetPageBitmap, 2667).
+-define(wxAuiNotebook_SetPageText, 2668).
+-define(wxAuiNotebook_SetSelection, 2669).
+-define(wxAuiNotebook_SetTabCtrlHeight, 2670).
+-define(wxAuiNotebook_SetUniformBitmapSize, 2671).
+-define(wxAuiNotebook_destroy, 2672).
+-define(wxMDIParentFrame_new_0, 2673).
+-define(wxMDIParentFrame_new_4, 2674).
+-define(wxMDIParentFrame_destruct, 2675).
+-define(wxMDIParentFrame_ActivateNext, 2676).
+-define(wxMDIParentFrame_ActivatePrevious, 2677).
+-define(wxMDIParentFrame_ArrangeIcons, 2678).
+-define(wxMDIParentFrame_Cascade, 2679).
+-define(wxMDIParentFrame_Create, 2680).
+-define(wxMDIParentFrame_GetActiveChild, 2681).
+-define(wxMDIParentFrame_GetClientWindow, 2682).
+-define(wxMDIParentFrame_Tile, 2683).
+-define(wxMDIChildFrame_new_0, 2684).
+-define(wxMDIChildFrame_new_4, 2685).
+-define(wxMDIChildFrame_destruct, 2686).
+-define(wxMDIChildFrame_Activate, 2687).
+-define(wxMDIChildFrame_Create, 2688).
+-define(wxMDIChildFrame_Maximize, 2689).
+-define(wxMDIChildFrame_Restore, 2690).
+-define(wxMDIClientWindow_new_0, 2691).
+-define(wxMDIClientWindow_new_2, 2692).
+-define(wxMDIClientWindow_destruct, 2693).
+-define(wxMDIClientWindow_CreateClient, 2694).
+-define(wxLayoutAlgorithm_new, 2695).
+-define(wxLayoutAlgorithm_LayoutFrame, 2696).
+-define(wxLayoutAlgorithm_LayoutMDIFrame, 2697).
+-define(wxLayoutAlgorithm_LayoutWindow, 2698).
+-define(wxLayoutAlgorithm_destroy, 2699).
+-define(wxEvent_GetId, 2700).
+-define(wxEvent_GetSkipped, 2701).
+-define(wxEvent_GetTimestamp, 2702).
+-define(wxEvent_IsCommandEvent, 2703).
+-define(wxEvent_ResumePropagation, 2704).
+-define(wxEvent_ShouldPropagate, 2705).
+-define(wxEvent_Skip, 2706).
+-define(wxEvent_StopPropagation, 2707).
+-define(wxCommandEvent_getClientData, 2708).
+-define(wxCommandEvent_GetExtraLong, 2709).
+-define(wxCommandEvent_GetInt, 2710).
+-define(wxCommandEvent_GetSelection, 2711).
+-define(wxCommandEvent_GetString, 2712).
+-define(wxCommandEvent_IsChecked, 2713).
+-define(wxCommandEvent_IsSelection, 2714).
+-define(wxCommandEvent_SetInt, 2715).
+-define(wxCommandEvent_SetString, 2716).
+-define(wxScrollEvent_GetOrientation, 2717).
+-define(wxScrollEvent_GetPosition, 2718).
+-define(wxScrollWinEvent_GetOrientation, 2719).
+-define(wxScrollWinEvent_GetPosition, 2720).
+-define(wxMouseEvent_AltDown, 2721).
+-define(wxMouseEvent_Button, 2722).
+-define(wxMouseEvent_ButtonDClick, 2723).
+-define(wxMouseEvent_ButtonDown, 2724).
+-define(wxMouseEvent_ButtonUp, 2725).
+-define(wxMouseEvent_CmdDown, 2726).
+-define(wxMouseEvent_ControlDown, 2727).
+-define(wxMouseEvent_Dragging, 2728).
+-define(wxMouseEvent_Entering, 2729).
+-define(wxMouseEvent_GetButton, 2730).
+-define(wxMouseEvent_GetPosition, 2733).
+-define(wxMouseEvent_GetLogicalPosition, 2734).
+-define(wxMouseEvent_GetLinesPerAction, 2735).
+-define(wxMouseEvent_GetWheelRotation, 2736).
+-define(wxMouseEvent_GetWheelDelta, 2737).
+-define(wxMouseEvent_GetX, 2738).
+-define(wxMouseEvent_GetY, 2739).
+-define(wxMouseEvent_IsButton, 2740).
+-define(wxMouseEvent_IsPageScroll, 2741).
+-define(wxMouseEvent_Leaving, 2742).
+-define(wxMouseEvent_LeftDClick, 2743).
+-define(wxMouseEvent_LeftDown, 2744).
+-define(wxMouseEvent_LeftIsDown, 2745).
+-define(wxMouseEvent_LeftUp, 2746).
+-define(wxMouseEvent_MetaDown, 2747).
+-define(wxMouseEvent_MiddleDClick, 2748).
+-define(wxMouseEvent_MiddleDown, 2749).
+-define(wxMouseEvent_MiddleIsDown, 2750).
+-define(wxMouseEvent_MiddleUp, 2751).
+-define(wxMouseEvent_Moving, 2752).
+-define(wxMouseEvent_RightDClick, 2753).
+-define(wxMouseEvent_RightDown, 2754).
+-define(wxMouseEvent_RightIsDown, 2755).
+-define(wxMouseEvent_RightUp, 2756).
+-define(wxMouseEvent_ShiftDown, 2757).
+-define(wxSetCursorEvent_GetCursor, 2758).
+-define(wxSetCursorEvent_GetX, 2759).
+-define(wxSetCursorEvent_GetY, 2760).
+-define(wxSetCursorEvent_HasCursor, 2761).
+-define(wxSetCursorEvent_SetCursor, 2762).
+-define(wxKeyEvent_AltDown, 2763).
+-define(wxKeyEvent_CmdDown, 2764).
+-define(wxKeyEvent_ControlDown, 2765).
+-define(wxKeyEvent_GetKeyCode, 2766).
+-define(wxKeyEvent_GetModifiers, 2767).
+-define(wxKeyEvent_GetPosition, 2770).
+-define(wxKeyEvent_GetRawKeyCode, 2771).
+-define(wxKeyEvent_GetRawKeyFlags, 2772).
+-define(wxKeyEvent_GetUnicodeKey, 2773).
+-define(wxKeyEvent_GetX, 2774).
+-define(wxKeyEvent_GetY, 2775).
+-define(wxKeyEvent_HasModifiers, 2776).
+-define(wxKeyEvent_MetaDown, 2777).
+-define(wxKeyEvent_ShiftDown, 2778).
+-define(wxSizeEvent_GetSize, 2779).
+-define(wxMoveEvent_GetPosition, 2780).
+-define(wxEraseEvent_GetDC, 2781).
+-define(wxFocusEvent_GetWindow, 2782).
+-define(wxChildFocusEvent_GetWindow, 2783).
+-define(wxMenuEvent_GetMenu, 2784).
+-define(wxMenuEvent_GetMenuId, 2785).
+-define(wxMenuEvent_IsPopup, 2786).
+-define(wxCloseEvent_CanVeto, 2787).
+-define(wxCloseEvent_GetLoggingOff, 2788).
+-define(wxCloseEvent_SetCanVeto, 2789).
+-define(wxCloseEvent_SetLoggingOff, 2790).
+-define(wxCloseEvent_Veto, 2791).
+-define(wxShowEvent_SetShow, 2792).
+-define(wxShowEvent_GetShow, 2793).
+-define(wxIconizeEvent_Iconized, 2794).
+-define(wxJoystickEvent_ButtonDown, 2795).
+-define(wxJoystickEvent_ButtonIsDown, 2796).
+-define(wxJoystickEvent_ButtonUp, 2797).
+-define(wxJoystickEvent_GetButtonChange, 2798).
+-define(wxJoystickEvent_GetButtonState, 2799).
+-define(wxJoystickEvent_GetJoystick, 2800).
+-define(wxJoystickEvent_GetPosition, 2801).
+-define(wxJoystickEvent_GetZPosition, 2802).
+-define(wxJoystickEvent_IsButton, 2803).
+-define(wxJoystickEvent_IsMove, 2804).
+-define(wxJoystickEvent_IsZMove, 2805).
+-define(wxUpdateUIEvent_CanUpdate, 2806).
+-define(wxUpdateUIEvent_Check, 2807).
+-define(wxUpdateUIEvent_Enable, 2808).
+-define(wxUpdateUIEvent_Show, 2809).
+-define(wxUpdateUIEvent_GetChecked, 2810).
+-define(wxUpdateUIEvent_GetEnabled, 2811).
+-define(wxUpdateUIEvent_GetShown, 2812).
+-define(wxUpdateUIEvent_GetSetChecked, 2813).
+-define(wxUpdateUIEvent_GetSetEnabled, 2814).
+-define(wxUpdateUIEvent_GetSetShown, 2815).
+-define(wxUpdateUIEvent_GetSetText, 2816).
+-define(wxUpdateUIEvent_GetText, 2817).
+-define(wxUpdateUIEvent_GetMode, 2818).
+-define(wxUpdateUIEvent_GetUpdateInterval, 2819).
+-define(wxUpdateUIEvent_ResetUpdateTime, 2820).
+-define(wxUpdateUIEvent_SetMode, 2821).
+-define(wxUpdateUIEvent_SetText, 2822).
+-define(wxUpdateUIEvent_SetUpdateInterval, 2823).
+-define(wxMouseCaptureChangedEvent_GetCapturedWindow, 2824).
+-define(wxPaletteChangedEvent_SetChangedWindow, 2825).
+-define(wxPaletteChangedEvent_GetChangedWindow, 2826).
+-define(wxQueryNewPaletteEvent_SetPaletteRealized, 2827).
+-define(wxQueryNewPaletteEvent_GetPaletteRealized, 2828).
+-define(wxNavigationKeyEvent_GetDirection, 2829).
+-define(wxNavigationKeyEvent_SetDirection, 2830).
+-define(wxNavigationKeyEvent_IsWindowChange, 2831).
+-define(wxNavigationKeyEvent_SetWindowChange, 2832).
+-define(wxNavigationKeyEvent_IsFromTab, 2833).
+-define(wxNavigationKeyEvent_SetFromTab, 2834).
+-define(wxNavigationKeyEvent_GetCurrentFocus, 2835).
+-define(wxNavigationKeyEvent_SetCurrentFocus, 2836).
+-define(wxHelpEvent_GetOrigin, 2837).
+-define(wxHelpEvent_GetPosition, 2838).
+-define(wxHelpEvent_SetOrigin, 2839).
+-define(wxHelpEvent_SetPosition, 2840).
+-define(wxContextMenuEvent_GetPosition, 2841).
+-define(wxContextMenuEvent_SetPosition, 2842).
+-define(wxIdleEvent_CanSend, 2843).
+-define(wxIdleEvent_GetMode, 2844).
+-define(wxIdleEvent_RequestMore, 2845).
+-define(wxIdleEvent_MoreRequested, 2846).
+-define(wxIdleEvent_SetMode, 2847).
+-define(wxGridEvent_AltDown, 2848).
+-define(wxGridEvent_ControlDown, 2849).
+-define(wxGridEvent_GetCol, 2850).
+-define(wxGridEvent_GetPosition, 2851).
+-define(wxGridEvent_GetRow, 2852).
+-define(wxGridEvent_MetaDown, 2853).
+-define(wxGridEvent_Selecting, 2854).
+-define(wxGridEvent_ShiftDown, 2855).
+-define(wxNotifyEvent_Allow, 2856).
+-define(wxNotifyEvent_IsAllowed, 2857).
+-define(wxNotifyEvent_Veto, 2858).
+-define(wxSashEvent_GetEdge, 2859).
+-define(wxSashEvent_GetDragRect, 2860).
+-define(wxSashEvent_GetDragStatus, 2861).
+-define(wxListEvent_GetCacheFrom, 2862).
+-define(wxListEvent_GetCacheTo, 2863).
+-define(wxListEvent_GetKeyCode, 2864).
+-define(wxListEvent_GetIndex, 2865).
+-define(wxListEvent_GetColumn, 2866).
+-define(wxListEvent_GetPoint, 2867).
+-define(wxListEvent_GetLabel, 2868).
+-define(wxListEvent_GetText, 2869).
+-define(wxListEvent_GetImage, 2870).
+-define(wxListEvent_GetData, 2871).
+-define(wxListEvent_GetMask, 2872).
+-define(wxListEvent_GetItem, 2873).
+-define(wxListEvent_IsEditCancelled, 2874).
+-define(wxDateEvent_GetDate, 2875).
+-define(wxCalendarEvent_GetWeekDay, 2876).
+-define(wxFileDirPickerEvent_GetPath, 2877).
+-define(wxColourPickerEvent_GetColour, 2878).
+-define(wxFontPickerEvent_GetFont, 2879).
+-define(wxStyledTextEvent_GetPosition, 2880).
+-define(wxStyledTextEvent_GetKey, 2881).
+-define(wxStyledTextEvent_GetModifiers, 2882).
+-define(wxStyledTextEvent_GetModificationType, 2883).
+-define(wxStyledTextEvent_GetText, 2884).
+-define(wxStyledTextEvent_GetLength, 2885).
+-define(wxStyledTextEvent_GetLinesAdded, 2886).
+-define(wxStyledTextEvent_GetLine, 2887).
+-define(wxStyledTextEvent_GetFoldLevelNow, 2888).
+-define(wxStyledTextEvent_GetFoldLevelPrev, 2889).
+-define(wxStyledTextEvent_GetMargin, 2890).
+-define(wxStyledTextEvent_GetMessage, 2891).
+-define(wxStyledTextEvent_GetWParam, 2892).
+-define(wxStyledTextEvent_GetLParam, 2893).
+-define(wxStyledTextEvent_GetListType, 2894).
+-define(wxStyledTextEvent_GetX, 2895).
+-define(wxStyledTextEvent_GetY, 2896).
+-define(wxStyledTextEvent_GetDragText, 2897).
+-define(wxStyledTextEvent_GetDragAllowMove, 2898).
+-define(wxStyledTextEvent_GetDragResult, 2899).
+-define(wxStyledTextEvent_GetShift, 2900).
+-define(wxStyledTextEvent_GetControl, 2901).
+-define(wxStyledTextEvent_GetAlt, 2902).
+-define(utils_wxGetKeyState, 2903).
+-define(utils_wxGetMousePosition, 2904).
+-define(utils_wxGetMouseState, 2905).
+-define(utils_wxSetDetectableAutoRepeat, 2906).
+-define(utils_wxBell, 2907).
+-define(utils_wxFindMenuItemId, 2908).
+-define(utils_wxGenericFindWindowAtPoint, 2909).
+-define(utils_wxFindWindowAtPoint, 2910).
+-define(utils_wxBeginBusyCursor, 2911).
+-define(utils_wxEndBusyCursor, 2912).
+-define(utils_wxIsBusy, 2913).
+-define(utils_wxShutdown, 2914).
+-define(utils_wxShell, 2915).
+-define(utils_wxLaunchDefaultBrowser, 2916).
+-define(utils_wxGetEmailAddress, 2917).
+-define(utils_wxGetUserId, 2918).
+-define(utils_wxGetHomeDir, 2919).
+-define(utils_wxNewId, 2920).
+-define(utils_wxRegisterId, 2921).
+-define(utils_wxGetCurrentId, 2922).
+-define(utils_wxGetOsDescription, 2923).
+-define(utils_wxIsPlatformLittleEndian, 2924).
+-define(utils_wxIsPlatform64Bit, 2925).
+-define(wxPrintout_new, 2926).
+-define(wxPrintout_destruct, 2927).
+-define(wxPrintout_GetDC, 2928).
+-define(wxPrintout_GetPageSizeMM, 2929).
+-define(wxPrintout_GetPageSizePixels, 2930).
+-define(wxPrintout_GetPaperRectPixels, 2931).
+-define(wxPrintout_GetPPIPrinter, 2932).
+-define(wxPrintout_GetPPIScreen, 2933).
+-define(wxPrintout_GetTitle, 2934).
+-define(wxPrintout_IsPreview, 2935).
+-define(wxPrintout_FitThisSizeToPaper, 2936).
+-define(wxPrintout_FitThisSizeToPage, 2937).
+-define(wxPrintout_FitThisSizeToPageMargins, 2938).
+-define(wxPrintout_MapScreenSizeToPaper, 2939).
+-define(wxPrintout_MapScreenSizeToPage, 2940).
+-define(wxPrintout_MapScreenSizeToPageMargins, 2941).
+-define(wxPrintout_MapScreenSizeToDevice, 2942).
+-define(wxPrintout_GetLogicalPaperRect, 2943).
+-define(wxPrintout_GetLogicalPageRect, 2944).
+-define(wxPrintout_GetLogicalPageMarginsRect, 2945).
+-define(wxPrintout_SetLogicalOrigin, 2946).
+-define(wxPrintout_OffsetLogicalOrigin, 2947).
+-define(wxStyledTextCtrl_new_2, 2948).
+-define(wxStyledTextCtrl_new_0, 2949).
+-define(wxStyledTextCtrl_destruct, 2950).
+-define(wxStyledTextCtrl_Create, 2951).
+-define(wxStyledTextCtrl_AddText, 2952).
+-define(wxStyledTextCtrl_AddStyledText, 2953).
+-define(wxStyledTextCtrl_InsertText, 2954).
+-define(wxStyledTextCtrl_ClearAll, 2955).
+-define(wxStyledTextCtrl_ClearDocumentStyle, 2956).
+-define(wxStyledTextCtrl_GetLength, 2957).
+-define(wxStyledTextCtrl_GetCharAt, 2958).
+-define(wxStyledTextCtrl_GetCurrentPos, 2959).
+-define(wxStyledTextCtrl_GetAnchor, 2960).
+-define(wxStyledTextCtrl_GetStyleAt, 2961).
+-define(wxStyledTextCtrl_Redo, 2962).
+-define(wxStyledTextCtrl_SetUndoCollection, 2963).
+-define(wxStyledTextCtrl_SelectAll, 2964).
+-define(wxStyledTextCtrl_SetSavePoint, 2965).
+-define(wxStyledTextCtrl_GetStyledText, 2966).
+-define(wxStyledTextCtrl_CanRedo, 2967).
+-define(wxStyledTextCtrl_MarkerLineFromHandle, 2968).
+-define(wxStyledTextCtrl_MarkerDeleteHandle, 2969).
+-define(wxStyledTextCtrl_GetUndoCollection, 2970).
+-define(wxStyledTextCtrl_GetViewWhiteSpace, 2971).
+-define(wxStyledTextCtrl_SetViewWhiteSpace, 2972).
+-define(wxStyledTextCtrl_PositionFromPoint, 2973).
+-define(wxStyledTextCtrl_PositionFromPointClose, 2974).
+-define(wxStyledTextCtrl_GotoLine, 2975).
+-define(wxStyledTextCtrl_GotoPos, 2976).
+-define(wxStyledTextCtrl_SetAnchor, 2977).
+-define(wxStyledTextCtrl_GetCurLine, 2978).
+-define(wxStyledTextCtrl_GetEndStyled, 2979).
+-define(wxStyledTextCtrl_ConvertEOLs, 2980).
+-define(wxStyledTextCtrl_GetEOLMode, 2981).
+-define(wxStyledTextCtrl_SetEOLMode, 2982).
+-define(wxStyledTextCtrl_StartStyling, 2983).
+-define(wxStyledTextCtrl_SetStyling, 2984).
+-define(wxStyledTextCtrl_GetBufferedDraw, 2985).
+-define(wxStyledTextCtrl_SetBufferedDraw, 2986).
+-define(wxStyledTextCtrl_SetTabWidth, 2987).
+-define(wxStyledTextCtrl_GetTabWidth, 2988).
+-define(wxStyledTextCtrl_SetCodePage, 2989).
+-define(wxStyledTextCtrl_MarkerDefine, 2990).
+-define(wxStyledTextCtrl_MarkerSetForeground, 2991).
+-define(wxStyledTextCtrl_MarkerSetBackground, 2992).
+-define(wxStyledTextCtrl_MarkerAdd, 2993).
+-define(wxStyledTextCtrl_MarkerDelete, 2994).
+-define(wxStyledTextCtrl_MarkerDeleteAll, 2995).
+-define(wxStyledTextCtrl_MarkerGet, 2996).
+-define(wxStyledTextCtrl_MarkerNext, 2997).
+-define(wxStyledTextCtrl_MarkerPrevious, 2998).
+-define(wxStyledTextCtrl_MarkerDefineBitmap, 2999).
+-define(wxStyledTextCtrl_MarkerAddSet, 3000).
+-define(wxStyledTextCtrl_MarkerSetAlpha, 3001).
+-define(wxStyledTextCtrl_SetMarginType, 3002).
+-define(wxStyledTextCtrl_GetMarginType, 3003).
+-define(wxStyledTextCtrl_SetMarginWidth, 3004).
+-define(wxStyledTextCtrl_GetMarginWidth, 3005).
+-define(wxStyledTextCtrl_SetMarginMask, 3006).
+-define(wxStyledTextCtrl_GetMarginMask, 3007).
+-define(wxStyledTextCtrl_SetMarginSensitive, 3008).
+-define(wxStyledTextCtrl_GetMarginSensitive, 3009).
+-define(wxStyledTextCtrl_StyleClearAll, 3010).
+-define(wxStyledTextCtrl_StyleSetForeground, 3011).
+-define(wxStyledTextCtrl_StyleSetBackground, 3012).
+-define(wxStyledTextCtrl_StyleSetBold, 3013).
+-define(wxStyledTextCtrl_StyleSetItalic, 3014).
+-define(wxStyledTextCtrl_StyleSetSize, 3015).
+-define(wxStyledTextCtrl_StyleSetFaceName, 3016).
+-define(wxStyledTextCtrl_StyleSetEOLFilled, 3017).
+-define(wxStyledTextCtrl_StyleResetDefault, 3018).
+-define(wxStyledTextCtrl_StyleSetUnderline, 3019).
+-define(wxStyledTextCtrl_StyleSetCase, 3020).
+-define(wxStyledTextCtrl_StyleSetHotSpot, 3021).
+-define(wxStyledTextCtrl_SetSelForeground, 3022).
+-define(wxStyledTextCtrl_SetSelBackground, 3023).
+-define(wxStyledTextCtrl_GetSelAlpha, 3024).
+-define(wxStyledTextCtrl_SetSelAlpha, 3025).
+-define(wxStyledTextCtrl_SetCaretForeground, 3026).
+-define(wxStyledTextCtrl_CmdKeyAssign, 3027).
+-define(wxStyledTextCtrl_CmdKeyClear, 3028).
+-define(wxStyledTextCtrl_CmdKeyClearAll, 3029).
+-define(wxStyledTextCtrl_SetStyleBytes, 3030).
+-define(wxStyledTextCtrl_StyleSetVisible, 3031).
+-define(wxStyledTextCtrl_GetCaretPeriod, 3032).
+-define(wxStyledTextCtrl_SetCaretPeriod, 3033).
+-define(wxStyledTextCtrl_SetWordChars, 3034).
+-define(wxStyledTextCtrl_BeginUndoAction, 3035).
+-define(wxStyledTextCtrl_EndUndoAction, 3036).
+-define(wxStyledTextCtrl_IndicatorSetStyle, 3037).
+-define(wxStyledTextCtrl_IndicatorGetStyle, 3038).
+-define(wxStyledTextCtrl_IndicatorSetForeground, 3039).
+-define(wxStyledTextCtrl_IndicatorGetForeground, 3040).
+-define(wxStyledTextCtrl_SetWhitespaceForeground, 3041).
+-define(wxStyledTextCtrl_SetWhitespaceBackground, 3042).
+-define(wxStyledTextCtrl_GetStyleBits, 3043).
+-define(wxStyledTextCtrl_SetLineState, 3044).
+-define(wxStyledTextCtrl_GetLineState, 3045).
+-define(wxStyledTextCtrl_GetMaxLineState, 3046).
+-define(wxStyledTextCtrl_GetCaretLineVisible, 3047).
+-define(wxStyledTextCtrl_SetCaretLineVisible, 3048).
+-define(wxStyledTextCtrl_GetCaretLineBackground, 3049).
+-define(wxStyledTextCtrl_SetCaretLineBackground, 3050).
+-define(wxStyledTextCtrl_AutoCompShow, 3051).
+-define(wxStyledTextCtrl_AutoCompCancel, 3052).
+-define(wxStyledTextCtrl_AutoCompActive, 3053).
+-define(wxStyledTextCtrl_AutoCompPosStart, 3054).
+-define(wxStyledTextCtrl_AutoCompComplete, 3055).
+-define(wxStyledTextCtrl_AutoCompStops, 3056).
+-define(wxStyledTextCtrl_AutoCompSetSeparator, 3057).
+-define(wxStyledTextCtrl_AutoCompGetSeparator, 3058).
+-define(wxStyledTextCtrl_AutoCompSelect, 3059).
+-define(wxStyledTextCtrl_AutoCompSetCancelAtStart, 3060).
+-define(wxStyledTextCtrl_AutoCompGetCancelAtStart, 3061).
+-define(wxStyledTextCtrl_AutoCompSetFillUps, 3062).
+-define(wxStyledTextCtrl_AutoCompSetChooseSingle, 3063).
+-define(wxStyledTextCtrl_AutoCompGetChooseSingle, 3064).
+-define(wxStyledTextCtrl_AutoCompSetIgnoreCase, 3065).
+-define(wxStyledTextCtrl_AutoCompGetIgnoreCase, 3066).
+-define(wxStyledTextCtrl_UserListShow, 3067).
+-define(wxStyledTextCtrl_AutoCompSetAutoHide, 3068).
+-define(wxStyledTextCtrl_AutoCompGetAutoHide, 3069).
+-define(wxStyledTextCtrl_AutoCompSetDropRestOfWord, 3070).
+-define(wxStyledTextCtrl_AutoCompGetDropRestOfWord, 3071).
+-define(wxStyledTextCtrl_RegisterImage, 3072).
+-define(wxStyledTextCtrl_ClearRegisteredImages, 3073).
+-define(wxStyledTextCtrl_AutoCompGetTypeSeparator, 3074).
+-define(wxStyledTextCtrl_AutoCompSetTypeSeparator, 3075).
+-define(wxStyledTextCtrl_AutoCompSetMaxWidth, 3076).
+-define(wxStyledTextCtrl_AutoCompGetMaxWidth, 3077).
+-define(wxStyledTextCtrl_AutoCompSetMaxHeight, 3078).
+-define(wxStyledTextCtrl_AutoCompGetMaxHeight, 3079).
+-define(wxStyledTextCtrl_SetIndent, 3080).
+-define(wxStyledTextCtrl_GetIndent, 3081).
+-define(wxStyledTextCtrl_SetUseTabs, 3082).
+-define(wxStyledTextCtrl_GetUseTabs, 3083).
+-define(wxStyledTextCtrl_SetLineIndentation, 3084).
+-define(wxStyledTextCtrl_GetLineIndentation, 3085).
+-define(wxStyledTextCtrl_GetLineIndentPosition, 3086).
+-define(wxStyledTextCtrl_GetColumn, 3087).
+-define(wxStyledTextCtrl_SetUseHorizontalScrollBar, 3088).
+-define(wxStyledTextCtrl_GetUseHorizontalScrollBar, 3089).
+-define(wxStyledTextCtrl_SetIndentationGuides, 3090).
+-define(wxStyledTextCtrl_GetIndentationGuides, 3091).
+-define(wxStyledTextCtrl_SetHighlightGuide, 3092).
+-define(wxStyledTextCtrl_GetHighlightGuide, 3093).
+-define(wxStyledTextCtrl_GetLineEndPosition, 3094).
+-define(wxStyledTextCtrl_GetCodePage, 3095).
+-define(wxStyledTextCtrl_GetCaretForeground, 3096).
+-define(wxStyledTextCtrl_GetReadOnly, 3097).
+-define(wxStyledTextCtrl_SetCurrentPos, 3098).
+-define(wxStyledTextCtrl_SetSelectionStart, 3099).
+-define(wxStyledTextCtrl_GetSelectionStart, 3100).
+-define(wxStyledTextCtrl_SetSelectionEnd, 3101).
+-define(wxStyledTextCtrl_GetSelectionEnd, 3102).
+-define(wxStyledTextCtrl_SetPrintMagnification, 3103).
+-define(wxStyledTextCtrl_GetPrintMagnification, 3104).
+-define(wxStyledTextCtrl_SetPrintColourMode, 3105).
+-define(wxStyledTextCtrl_GetPrintColourMode, 3106).
+-define(wxStyledTextCtrl_FindText, 3107).
+-define(wxStyledTextCtrl_FormatRange, 3108).
+-define(wxStyledTextCtrl_GetFirstVisibleLine, 3109).
+-define(wxStyledTextCtrl_GetLine, 3110).
+-define(wxStyledTextCtrl_GetLineCount, 3111).
+-define(wxStyledTextCtrl_SetMarginLeft, 3112).
+-define(wxStyledTextCtrl_GetMarginLeft, 3113).
+-define(wxStyledTextCtrl_SetMarginRight, 3114).
+-define(wxStyledTextCtrl_GetMarginRight, 3115).
+-define(wxStyledTextCtrl_GetModify, 3116).
+-define(wxStyledTextCtrl_SetSelection, 3117).
+-define(wxStyledTextCtrl_GetSelectedText, 3118).
+-define(wxStyledTextCtrl_GetTextRange, 3119).
+-define(wxStyledTextCtrl_HideSelection, 3120).
+-define(wxStyledTextCtrl_LineFromPosition, 3121).
+-define(wxStyledTextCtrl_PositionFromLine, 3122).
+-define(wxStyledTextCtrl_LineScroll, 3123).
+-define(wxStyledTextCtrl_EnsureCaretVisible, 3124).
+-define(wxStyledTextCtrl_ReplaceSelection, 3125).
+-define(wxStyledTextCtrl_SetReadOnly, 3126).
+-define(wxStyledTextCtrl_CanPaste, 3127).
+-define(wxStyledTextCtrl_CanUndo, 3128).
+-define(wxStyledTextCtrl_EmptyUndoBuffer, 3129).
+-define(wxStyledTextCtrl_Undo, 3130).
+-define(wxStyledTextCtrl_Cut, 3131).
+-define(wxStyledTextCtrl_Copy, 3132).
+-define(wxStyledTextCtrl_Paste, 3133).
+-define(wxStyledTextCtrl_Clear, 3134).
+-define(wxStyledTextCtrl_SetText, 3135).
+-define(wxStyledTextCtrl_GetText, 3136).
+-define(wxStyledTextCtrl_GetTextLength, 3137).
+-define(wxStyledTextCtrl_GetOvertype, 3138).
+-define(wxStyledTextCtrl_SetCaretWidth, 3139).
+-define(wxStyledTextCtrl_GetCaretWidth, 3140).
+-define(wxStyledTextCtrl_SetTargetStart, 3141).
+-define(wxStyledTextCtrl_GetTargetStart, 3142).
+-define(wxStyledTextCtrl_SetTargetEnd, 3143).
+-define(wxStyledTextCtrl_GetTargetEnd, 3144).
+-define(wxStyledTextCtrl_ReplaceTarget, 3145).
+-define(wxStyledTextCtrl_SearchInTarget, 3146).
+-define(wxStyledTextCtrl_SetSearchFlags, 3147).
+-define(wxStyledTextCtrl_GetSearchFlags, 3148).
+-define(wxStyledTextCtrl_CallTipShow, 3149).
+-define(wxStyledTextCtrl_CallTipCancel, 3150).
+-define(wxStyledTextCtrl_CallTipActive, 3151).
+-define(wxStyledTextCtrl_CallTipPosAtStart, 3152).
+-define(wxStyledTextCtrl_CallTipSetHighlight, 3153).
+-define(wxStyledTextCtrl_CallTipSetBackground, 3154).
+-define(wxStyledTextCtrl_CallTipSetForeground, 3155).
+-define(wxStyledTextCtrl_CallTipSetForegroundHighlight, 3156).
+-define(wxStyledTextCtrl_CallTipUseStyle, 3157).
+-define(wxStyledTextCtrl_VisibleFromDocLine, 3158).
+-define(wxStyledTextCtrl_DocLineFromVisible, 3159).
+-define(wxStyledTextCtrl_WrapCount, 3160).
+-define(wxStyledTextCtrl_SetFoldLevel, 3161).
+-define(wxStyledTextCtrl_GetFoldLevel, 3162).
+-define(wxStyledTextCtrl_GetLastChild, 3163).
+-define(wxStyledTextCtrl_GetFoldParent, 3164).
+-define(wxStyledTextCtrl_ShowLines, 3165).
+-define(wxStyledTextCtrl_HideLines, 3166).
+-define(wxStyledTextCtrl_GetLineVisible, 3167).
+-define(wxStyledTextCtrl_SetFoldExpanded, 3168).
+-define(wxStyledTextCtrl_GetFoldExpanded, 3169).
+-define(wxStyledTextCtrl_ToggleFold, 3170).
+-define(wxStyledTextCtrl_EnsureVisible, 3171).
+-define(wxStyledTextCtrl_SetFoldFlags, 3172).
+-define(wxStyledTextCtrl_EnsureVisibleEnforcePolicy, 3173).
+-define(wxStyledTextCtrl_SetTabIndents, 3174).
+-define(wxStyledTextCtrl_GetTabIndents, 3175).
+-define(wxStyledTextCtrl_SetBackSpaceUnIndents, 3176).
+-define(wxStyledTextCtrl_GetBackSpaceUnIndents, 3177).
+-define(wxStyledTextCtrl_SetMouseDwellTime, 3178).
+-define(wxStyledTextCtrl_GetMouseDwellTime, 3179).
+-define(wxStyledTextCtrl_WordStartPosition, 3180).
+-define(wxStyledTextCtrl_WordEndPosition, 3181).
+-define(wxStyledTextCtrl_SetWrapMode, 3182).
+-define(wxStyledTextCtrl_GetWrapMode, 3183).
+-define(wxStyledTextCtrl_SetWrapVisualFlags, 3184).
+-define(wxStyledTextCtrl_GetWrapVisualFlags, 3185).
+-define(wxStyledTextCtrl_SetWrapVisualFlagsLocation, 3186).
+-define(wxStyledTextCtrl_GetWrapVisualFlagsLocation, 3187).
+-define(wxStyledTextCtrl_SetWrapStartIndent, 3188).
+-define(wxStyledTextCtrl_GetWrapStartIndent, 3189).
+-define(wxStyledTextCtrl_SetLayoutCache, 3190).
+-define(wxStyledTextCtrl_GetLayoutCache, 3191).
+-define(wxStyledTextCtrl_SetScrollWidth, 3192).
+-define(wxStyledTextCtrl_GetScrollWidth, 3193).
+-define(wxStyledTextCtrl_TextWidth, 3194).
+-define(wxStyledTextCtrl_GetEndAtLastLine, 3195).
+-define(wxStyledTextCtrl_TextHeight, 3196).
+-define(wxStyledTextCtrl_SetUseVerticalScrollBar, 3197).
+-define(wxStyledTextCtrl_GetUseVerticalScrollBar, 3198).
+-define(wxStyledTextCtrl_AppendText, 3199).
+-define(wxStyledTextCtrl_GetTwoPhaseDraw, 3200).
+-define(wxStyledTextCtrl_SetTwoPhaseDraw, 3201).
+-define(wxStyledTextCtrl_TargetFromSelection, 3202).
+-define(wxStyledTextCtrl_LinesJoin, 3203).
+-define(wxStyledTextCtrl_LinesSplit, 3204).
+-define(wxStyledTextCtrl_SetFoldMarginColour, 3205).
+-define(wxStyledTextCtrl_SetFoldMarginHiColour, 3206).
+-define(wxStyledTextCtrl_LineDown, 3207).
+-define(wxStyledTextCtrl_LineDownExtend, 3208).
+-define(wxStyledTextCtrl_LineUp, 3209).
+-define(wxStyledTextCtrl_LineUpExtend, 3210).
+-define(wxStyledTextCtrl_CharLeft, 3211).
+-define(wxStyledTextCtrl_CharLeftExtend, 3212).
+-define(wxStyledTextCtrl_CharRight, 3213).
+-define(wxStyledTextCtrl_CharRightExtend, 3214).
+-define(wxStyledTextCtrl_WordLeft, 3215).
+-define(wxStyledTextCtrl_WordLeftExtend, 3216).
+-define(wxStyledTextCtrl_WordRight, 3217).
+-define(wxStyledTextCtrl_WordRightExtend, 3218).
+-define(wxStyledTextCtrl_Home, 3219).
+-define(wxStyledTextCtrl_HomeExtend, 3220).
+-define(wxStyledTextCtrl_LineEnd, 3221).
+-define(wxStyledTextCtrl_LineEndExtend, 3222).
+-define(wxStyledTextCtrl_DocumentStart, 3223).
+-define(wxStyledTextCtrl_DocumentStartExtend, 3224).
+-define(wxStyledTextCtrl_DocumentEnd, 3225).
+-define(wxStyledTextCtrl_DocumentEndExtend, 3226).
+-define(wxStyledTextCtrl_PageUp, 3227).
+-define(wxStyledTextCtrl_PageUpExtend, 3228).
+-define(wxStyledTextCtrl_PageDown, 3229).
+-define(wxStyledTextCtrl_PageDownExtend, 3230).
+-define(wxStyledTextCtrl_EditToggleOvertype, 3231).
+-define(wxStyledTextCtrl_Cancel, 3232).
+-define(wxStyledTextCtrl_DeleteBack, 3233).
+-define(wxStyledTextCtrl_Tab, 3234).
+-define(wxStyledTextCtrl_BackTab, 3235).
+-define(wxStyledTextCtrl_NewLine, 3236).
+-define(wxStyledTextCtrl_FormFeed, 3237).
+-define(wxStyledTextCtrl_VCHome, 3238).
+-define(wxStyledTextCtrl_VCHomeExtend, 3239).
+-define(wxStyledTextCtrl_ZoomIn, 3240).
+-define(wxStyledTextCtrl_ZoomOut, 3241).
+-define(wxStyledTextCtrl_DelWordLeft, 3242).
+-define(wxStyledTextCtrl_DelWordRight, 3243).
+-define(wxStyledTextCtrl_LineCut, 3244).
+-define(wxStyledTextCtrl_LineDelete, 3245).
+-define(wxStyledTextCtrl_LineTranspose, 3246).
+-define(wxStyledTextCtrl_LineDuplicate, 3247).
+-define(wxStyledTextCtrl_LowerCase, 3248).
+-define(wxStyledTextCtrl_UpperCase, 3249).
+-define(wxStyledTextCtrl_LineScrollDown, 3250).
+-define(wxStyledTextCtrl_LineScrollUp, 3251).
+-define(wxStyledTextCtrl_DeleteBackNotLine, 3252).
+-define(wxStyledTextCtrl_HomeDisplay, 3253).
+-define(wxStyledTextCtrl_HomeDisplayExtend, 3254).
+-define(wxStyledTextCtrl_LineEndDisplay, 3255).
+-define(wxStyledTextCtrl_LineEndDisplayExtend, 3256).
+-define(wxStyledTextCtrl_HomeWrapExtend, 3257).
+-define(wxStyledTextCtrl_LineEndWrap, 3258).
+-define(wxStyledTextCtrl_LineEndWrapExtend, 3259).
+-define(wxStyledTextCtrl_VCHomeWrap, 3260).
+-define(wxStyledTextCtrl_VCHomeWrapExtend, 3261).
+-define(wxStyledTextCtrl_LineCopy, 3262).
+-define(wxStyledTextCtrl_MoveCaretInsideView, 3263).
+-define(wxStyledTextCtrl_LineLength, 3264).
+-define(wxStyledTextCtrl_BraceHighlight, 3265).
+-define(wxStyledTextCtrl_BraceBadLight, 3266).
+-define(wxStyledTextCtrl_BraceMatch, 3267).
+-define(wxStyledTextCtrl_GetViewEOL, 3268).
+-define(wxStyledTextCtrl_SetViewEOL, 3269).
+-define(wxStyledTextCtrl_SetModEventMask, 3270).
+-define(wxStyledTextCtrl_GetEdgeColumn, 3271).
+-define(wxStyledTextCtrl_SetEdgeColumn, 3272).
+-define(wxStyledTextCtrl_SetEdgeMode, 3273).
+-define(wxStyledTextCtrl_GetEdgeMode, 3274).
+-define(wxStyledTextCtrl_GetEdgeColour, 3275).
+-define(wxStyledTextCtrl_SetEdgeColour, 3276).
+-define(wxStyledTextCtrl_SearchAnchor, 3277).
+-define(wxStyledTextCtrl_SearchNext, 3278).
+-define(wxStyledTextCtrl_SearchPrev, 3279).
+-define(wxStyledTextCtrl_LinesOnScreen, 3280).
+-define(wxStyledTextCtrl_UsePopUp, 3281).
+-define(wxStyledTextCtrl_SelectionIsRectangle, 3282).
+-define(wxStyledTextCtrl_SetZoom, 3283).
+-define(wxStyledTextCtrl_GetZoom, 3284).
+-define(wxStyledTextCtrl_GetModEventMask, 3285).
+-define(wxStyledTextCtrl_SetSTCFocus, 3286).
+-define(wxStyledTextCtrl_GetSTCFocus, 3287).
+-define(wxStyledTextCtrl_SetStatus, 3288).
+-define(wxStyledTextCtrl_GetStatus, 3289).
+-define(wxStyledTextCtrl_SetMouseDownCaptures, 3290).
+-define(wxStyledTextCtrl_GetMouseDownCaptures, 3291).
+-define(wxStyledTextCtrl_SetSTCCursor, 3292).
+-define(wxStyledTextCtrl_GetSTCCursor, 3293).
+-define(wxStyledTextCtrl_SetControlCharSymbol, 3294).
+-define(wxStyledTextCtrl_GetControlCharSymbol, 3295).
+-define(wxStyledTextCtrl_WordPartLeft, 3296).
+-define(wxStyledTextCtrl_WordPartLeftExtend, 3297).
+-define(wxStyledTextCtrl_WordPartRight, 3298).
+-define(wxStyledTextCtrl_WordPartRightExtend, 3299).
+-define(wxStyledTextCtrl_SetVisiblePolicy, 3300).
+-define(wxStyledTextCtrl_DelLineLeft, 3301).
+-define(wxStyledTextCtrl_DelLineRight, 3302).
+-define(wxStyledTextCtrl_GetXOffset, 3303).
+-define(wxStyledTextCtrl_ChooseCaretX, 3304).
+-define(wxStyledTextCtrl_SetXCaretPolicy, 3305).
+-define(wxStyledTextCtrl_SetYCaretPolicy, 3306).
+-define(wxStyledTextCtrl_GetPrintWrapMode, 3307).
+-define(wxStyledTextCtrl_SetHotspotActiveForeground, 3308).
+-define(wxStyledTextCtrl_SetHotspotActiveBackground, 3309).
+-define(wxStyledTextCtrl_SetHotspotActiveUnderline, 3310).
+-define(wxStyledTextCtrl_SetHotspotSingleLine, 3311).
+-define(wxStyledTextCtrl_ParaDownExtend, 3312).
+-define(wxStyledTextCtrl_ParaUp, 3313).
+-define(wxStyledTextCtrl_ParaUpExtend, 3314).
+-define(wxStyledTextCtrl_PositionBefore, 3315).
+-define(wxStyledTextCtrl_PositionAfter, 3316).
+-define(wxStyledTextCtrl_CopyRange, 3317).
+-define(wxStyledTextCtrl_CopyText, 3318).
+-define(wxStyledTextCtrl_SetSelectionMode, 3319).
+-define(wxStyledTextCtrl_GetSelectionMode, 3320).
+-define(wxStyledTextCtrl_LineDownRectExtend, 3321).
+-define(wxStyledTextCtrl_LineUpRectExtend, 3322).
+-define(wxStyledTextCtrl_CharLeftRectExtend, 3323).
+-define(wxStyledTextCtrl_CharRightRectExtend, 3324).
+-define(wxStyledTextCtrl_HomeRectExtend, 3325).
+-define(wxStyledTextCtrl_VCHomeRectExtend, 3326).
+-define(wxStyledTextCtrl_LineEndRectExtend, 3327).
+-define(wxStyledTextCtrl_PageUpRectExtend, 3328).
+-define(wxStyledTextCtrl_PageDownRectExtend, 3329).
+-define(wxStyledTextCtrl_StutteredPageUp, 3330).
+-define(wxStyledTextCtrl_StutteredPageUpExtend, 3331).
+-define(wxStyledTextCtrl_StutteredPageDown, 3332).
+-define(wxStyledTextCtrl_StutteredPageDownExtend, 3333).
+-define(wxStyledTextCtrl_WordLeftEnd, 3334).
+-define(wxStyledTextCtrl_WordLeftEndExtend, 3335).
+-define(wxStyledTextCtrl_WordRightEnd, 3336).
+-define(wxStyledTextCtrl_WordRightEndExtend, 3337).
+-define(wxStyledTextCtrl_SetWhitespaceChars, 3338).
+-define(wxStyledTextCtrl_SetCharsDefault, 3339).
+-define(wxStyledTextCtrl_AutoCompGetCurrent, 3340).
+-define(wxStyledTextCtrl_Allocate, 3341).
+-define(wxStyledTextCtrl_FindColumn, 3342).
+-define(wxStyledTextCtrl_GetCaretSticky, 3343).
+-define(wxStyledTextCtrl_SetCaretSticky, 3344).
+-define(wxStyledTextCtrl_ToggleCaretSticky, 3345).
+-define(wxStyledTextCtrl_SetPasteConvertEndings, 3346).
+-define(wxStyledTextCtrl_GetPasteConvertEndings, 3347).
+-define(wxStyledTextCtrl_SelectionDuplicate, 3348).
+-define(wxStyledTextCtrl_SetCaretLineBackAlpha, 3349).
+-define(wxStyledTextCtrl_GetCaretLineBackAlpha, 3350).
+-define(wxStyledTextCtrl_StartRecord, 3351).
+-define(wxStyledTextCtrl_StopRecord, 3352).
+-define(wxStyledTextCtrl_SetLexer, 3353).
+-define(wxStyledTextCtrl_GetLexer, 3354).
+-define(wxStyledTextCtrl_Colourise, 3355).
+-define(wxStyledTextCtrl_SetProperty, 3356).
+-define(wxStyledTextCtrl_SetKeyWords, 3357).
+-define(wxStyledTextCtrl_SetLexerLanguage, 3358).
+-define(wxStyledTextCtrl_GetProperty, 3359).
+-define(wxStyledTextCtrl_GetStyleBitsNeeded, 3360).
+-define(wxStyledTextCtrl_GetCurrentLine, 3361).
+-define(wxStyledTextCtrl_StyleSetSpec, 3362).
+-define(wxStyledTextCtrl_StyleSetFont, 3363).
+-define(wxStyledTextCtrl_StyleSetFontAttr, 3364).
+-define(wxStyledTextCtrl_StyleSetCharacterSet, 3365).
+-define(wxStyledTextCtrl_StyleSetFontEncoding, 3366).
+-define(wxStyledTextCtrl_CmdKeyExecute, 3367).
+-define(wxStyledTextCtrl_SetMargins, 3368).
+-define(wxStyledTextCtrl_GetSelection, 3369).
+-define(wxStyledTextCtrl_PointFromPosition, 3370).
+-define(wxStyledTextCtrl_ScrollToLine, 3371).
+-define(wxStyledTextCtrl_ScrollToColumn, 3372).
+-define(wxStyledTextCtrl_SendMsg, 3373).
+-define(wxStyledTextCtrl_SetVScrollBar, 3374).
+-define(wxStyledTextCtrl_SetHScrollBar, 3375).
+-define(wxStyledTextCtrl_GetLastKeydownProcessed, 3376).
+-define(wxStyledTextCtrl_SetLastKeydownProcessed, 3377).
+-define(wxStyledTextCtrl_SaveFile, 3378).
+-define(wxStyledTextCtrl_LoadFile, 3379).
+-define(wxStyledTextCtrl_DoDragOver, 3380).
+-define(wxStyledTextCtrl_DoDropText, 3381).
+-define(wxStyledTextCtrl_GetUseAntiAliasing, 3382).
+-define(wxStyledTextCtrl_AddTextRaw, 3383).
+-define(wxStyledTextCtrl_InsertTextRaw, 3384).
+-define(wxStyledTextCtrl_GetCurLineRaw, 3385).
+-define(wxStyledTextCtrl_GetLineRaw, 3386).
+-define(wxStyledTextCtrl_GetSelectedTextRaw, 3387).
+-define(wxStyledTextCtrl_GetTextRangeRaw, 3388).
+-define(wxStyledTextCtrl_SetTextRaw, 3389).
+-define(wxStyledTextCtrl_GetTextRaw, 3390).
+-define(wxStyledTextCtrl_AppendTextRaw, 3391).
+-define(wxArtProvider_GetBitmap, 3392).
+-define(wxArtProvider_GetIcon, 3393).
+-define(wxTreeEvent_GetKeyCode, 3394).
+-define(wxTreeEvent_GetItem, 3395).
+-define(wxTreeEvent_GetKeyEvent, 3396).
+-define(wxTreeEvent_GetLabel, 3397).
+-define(wxTreeEvent_GetOldItem, 3398).
+-define(wxTreeEvent_GetPoint, 3399).
+-define(wxTreeEvent_IsEditCancelled, 3400).
+-define(wxTreeEvent_SetToolTip, 3401).
+-define(wxNotebookEvent_GetOldSelection, 3402).
+-define(wxNotebookEvent_GetSelection, 3403).
+-define(wxNotebookEvent_SetOldSelection, 3404).
+-define(wxNotebookEvent_SetSelection, 3405).
+-define(wxFileDataObject_new, 3406).
+-define(wxFileDataObject_AddFile, 3407).
+-define(wxFileDataObject_GetFilenames, 3408).
+-define(wxFileDataObject_destroy, 3409).
+-define(wxTextDataObject_new, 3410).
+-define(wxTextDataObject_GetTextLength, 3411).
+-define(wxTextDataObject_GetText, 3412).
+-define(wxTextDataObject_SetText, 3413).
+-define(wxTextDataObject_destroy, 3414).
+-define(wxBitmapDataObject_new_1_1, 3415).
+-define(wxBitmapDataObject_new_1_0, 3416).
+-define(wxBitmapDataObject_GetBitmap, 3417).
+-define(wxBitmapDataObject_SetBitmap, 3418).
+-define(wxBitmapDataObject_destroy, 3419).
+-define(wxClipboard_new, 3421).
+-define(wxClipboard_destruct, 3422).
+-define(wxClipboard_AddData, 3423).
+-define(wxClipboard_Clear, 3424).
+-define(wxClipboard_Close, 3425).
+-define(wxClipboard_Flush, 3426).
+-define(wxClipboard_GetData, 3427).
+-define(wxClipboard_IsOpened, 3428).
+-define(wxClipboard_Open, 3429).
+-define(wxClipboard_SetData, 3430).
+-define(wxClipboard_UsePrimarySelection, 3432).
+-define(wxClipboard_IsSupported, 3433).
+-define(wxClipboard_Get, 3434).
+-define(wxSpinEvent_GetPosition, 3435).
+-define(wxSpinEvent_SetPosition, 3436).
+-define(wxSplitterWindow_new_0, 3437).
+-define(wxSplitterWindow_new_2, 3438).
+-define(wxSplitterWindow_destruct, 3439).
+-define(wxSplitterWindow_Create, 3440).
+-define(wxSplitterWindow_GetMinimumPaneSize, 3441).
+-define(wxSplitterWindow_GetSashGravity, 3442).
+-define(wxSplitterWindow_GetSashPosition, 3443).
+-define(wxSplitterWindow_GetSplitMode, 3444).
+-define(wxSplitterWindow_GetWindow1, 3445).
+-define(wxSplitterWindow_GetWindow2, 3446).
+-define(wxSplitterWindow_Initialize, 3447).
+-define(wxSplitterWindow_IsSplit, 3448).
+-define(wxSplitterWindow_ReplaceWindow, 3449).
+-define(wxSplitterWindow_SetSashGravity, 3450).
+-define(wxSplitterWindow_SetSashPosition, 3451).
+-define(wxSplitterWindow_SetSashSize, 3452).
+-define(wxSplitterWindow_SetMinimumPaneSize, 3453).
+-define(wxSplitterWindow_SetSplitMode, 3454).
+-define(wxSplitterWindow_SplitHorizontally, 3455).
+-define(wxSplitterWindow_SplitVertically, 3456).
+-define(wxSplitterWindow_Unsplit, 3457).
+-define(wxSplitterWindow_UpdateSize, 3458).
+-define(wxSplitterEvent_GetSashPosition, 3459).
+-define(wxSplitterEvent_GetX, 3460).
+-define(wxSplitterEvent_GetY, 3461).
+-define(wxSplitterEvent_GetWindowBeingRemoved, 3462).
+-define(wxSplitterEvent_SetSashPosition, 3463).
+-define(wxHtmlWindow_new_0, 3464).
+-define(wxHtmlWindow_new_2, 3465).
+-define(wxHtmlWindow_AppendToPage, 3466).
+-define(wxHtmlWindow_GetOpenedAnchor, 3467).
+-define(wxHtmlWindow_GetOpenedPage, 3468).
+-define(wxHtmlWindow_GetOpenedPageTitle, 3469).
+-define(wxHtmlWindow_GetRelatedFrame, 3470).
+-define(wxHtmlWindow_HistoryBack, 3471).
+-define(wxHtmlWindow_HistoryCanBack, 3472).
+-define(wxHtmlWindow_HistoryCanForward, 3473).
+-define(wxHtmlWindow_HistoryClear, 3474).
+-define(wxHtmlWindow_HistoryForward, 3475).
+-define(wxHtmlWindow_LoadFile, 3476).
+-define(wxHtmlWindow_LoadPage, 3477).
+-define(wxHtmlWindow_SelectAll, 3478).
+-define(wxHtmlWindow_SelectionToText, 3479).
+-define(wxHtmlWindow_SelectLine, 3480).
+-define(wxHtmlWindow_SelectWord, 3481).
+-define(wxHtmlWindow_SetBorders, 3482).
+-define(wxHtmlWindow_SetFonts, 3483).
+-define(wxHtmlWindow_SetPage, 3484).
+-define(wxHtmlWindow_SetRelatedFrame, 3485).
+-define(wxHtmlWindow_SetRelatedStatusBar, 3486).
+-define(wxHtmlWindow_ToText, 3487).
+-define(wxHtmlWindow_destroy, 3488).
+-define(wxHtmlLinkEvent_GetLinkInfo, 3489).
+-define(wxSystemSettings_GetColour, 3490).
+-define(wxSystemSettings_GetFont, 3491).
+-define(wxSystemSettings_GetMetric, 3492).
+-define(wxSystemSettings_GetScreenType, 3493).
+-define(wxSystemOptions_GetOption, 3494).
+-define(wxSystemOptions_GetOptionInt, 3495).
+-define(wxSystemOptions_HasOption, 3496).
+-define(wxSystemOptions_IsFalse, 3497).
+-define(wxSystemOptions_SetOption_2_1, 3498).
+-define(wxSystemOptions_SetOption_2_0, 3499).
+-define(wxAuiNotebookEvent_SetSelection, 3500).
+-define(wxAuiNotebookEvent_GetSelection, 3501).
+-define(wxAuiNotebookEvent_SetOldSelection, 3502).
+-define(wxAuiNotebookEvent_GetOldSelection, 3503).
+-define(wxAuiNotebookEvent_SetDragSource, 3504).
+-define(wxAuiNotebookEvent_GetDragSource, 3505).
+-define(wxAuiManagerEvent_SetManager, 3506).
+-define(wxAuiManagerEvent_GetManager, 3507).
+-define(wxAuiManagerEvent_SetPane, 3508).
+-define(wxAuiManagerEvent_GetPane, 3509).
+-define(wxAuiManagerEvent_SetButton, 3510).
+-define(wxAuiManagerEvent_GetButton, 3511).
+-define(wxAuiManagerEvent_SetDC, 3512).
+-define(wxAuiManagerEvent_GetDC, 3513).
+-define(wxAuiManagerEvent_Veto, 3514).
+-define(wxAuiManagerEvent_GetVeto, 3515).
+-define(wxAuiManagerEvent_SetCanVeto, 3516).
+-define(wxAuiManagerEvent_CanVeto, 3517).
+-define(wxLogNull_new, 3518).
+-define(wxLogNull_destroy, 3519).
+-define(wxTaskBarIcon_new, 3520).
+-define(wxTaskBarIcon_destruct, 3521).
+-define(wxTaskBarIcon_PopupMenu, 3522).
+-define(wxTaskBarIcon_RemoveIcon, 3523).
+-define(wxTaskBarIcon_SetIcon, 3524).
diff --git a/lib/wx/src/wx.erl b/lib/wx/src/wx.erl
index 9d76f3bc42..7d62305048 100644
--- a/lib/wx/src/wx.erl
+++ b/lib/wx/src/wx.erl
@@ -1,46 +1,46 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%%-------------------------------------------------------------------
%%% File : wx.erl
%%% Author : Dan Gudmundsson <[email protected]>
-%%% Description :
+%%% Description :
%%%
%%% Created : 22 Feb 2007 by Dan Gudmundsson <[email protected]>
%%%-------------------------------------------------------------------
%% @doc A port of <a href="http://www.wxwidgets.org/">wxWidgets</a>.
-%%
+%%
%% This is the base api of <a href="http://www.wxwidgets.org/">wxWidgets</a>.
-%% This module contains functions for
+%% This module contains functions for
%% starting and stopping the wx-server, as well as other utility functions.
%%
%% wxWidgets is object oriented, and not functional. Thus, in wxErlang a
%% module represents a class, and the object created by this class
%% has an own type, wxCLASS(). This module represents the base
%% class, and all other wxMODULE's are sub-classes of this class.
-%%
-%% Objects of a class are created with wxCLASS:new(...) and destroyed with
+%%
+%% Objects of a class are created with wxCLASS:new(...) and destroyed with
%% wxCLASS:destroy(). Member functions are called with wxCLASS:member(Object, ...)
%% instead of as in C++ Object.member(...).
-%%
+%%
%% Sub class modules inherit (non static) functions from their parents.
%% The inherited functions are not documented in the sub-classes.
-%%
+%%
%% This erlang port of wxWidgets tries to be a one-to-one mapping with
%% the original wxWidgets library. Some things are different though,
%% as the optional arguments use property lists and can be in any
@@ -49,7 +49,7 @@
%%
%% The following classes are implemented directly as erlang types: <br />
%% wxPoint={x,y},wxSize={w,h},wxRect={x,y,w,h},wxColour={r,g,b [,a]},
-%% wxString={@link //stdlib/unicode:charlist()},
+%% wxString={@link //stdlib/unicode:chardata()},
%% wxGBPosition={r,c},wxGBSpan={rs,cs},wxGridCellCoords={r,c}.
%%
%% wxWidgets uses a process specific environment, which is created by
@@ -59,42 +59,50 @@
%%
%% Global (classless) functions are located in the wx_misc module.
-%% @type wxObject(). Opaque object
-%% @type wx_env(). Wx process environment
-%% @type wx_mem(). Wx memory area
-%% @type colour(). A 3 or 4 tuple: {R,G,B,A} or as argument {R,G,B} is also accepted
-%% where each colour channel is a an integer between 0-255.
-%% @type datetime(). {{Year,Month,Day}, {Hour,Minute,Second}} in local timezone.
-%% @type mouseState(). See #wxMouseState{} defined in wx.hrl
-
-
-module(wx).
-export([parent_class/1, new/0, new/1, destroy/0,
get_env/0,set_env/1, debug/1,
batch/1,foreach/2,map/2,foldl/3,foldr/3,
- getObjectType/1, typeCast/2,
+ getObjectType/1, typeCast/2,
null/0, is_null/1]).
-export([create_memory/1, get_memory_bin/1,
retain_memory/1, release_memory/1]).
-
-export([demo/0]).
+-export_type([wx_object/0, wx_env/0, wx_memory/0]).
+-export_type([wx_colour/0, wx_colour4/0, wx_datetime/0,
+ wx_enum/0, wx_wxMouseState/0, wx_wxHtmlLinkInfo/0]).
+
-include("wxe.hrl").
+-include("../include/wx.hrl").
+
+-type wx_object() :: #wx_ref{}. %% Opaque object reference
+-type wx_env() :: #wx_env{}. %% Opaque process environment
+-type wx_memory() :: binary() | #wx_mem{}. %% Opaque memory reference
+
+-type wx_colour4() :: {R::byte(),G::byte(),B::byte(), A::byte()}.
+-type wx_colour() :: {R::byte(),G::byte(),B::byte()} | wx_colour4().
+
+-type wx_datetime() :: {{Year::integer(),Month::integer(),Day::integer()},
+ {Hour::integer(),Minute::integer(),Second::integer()}}. %% In Local Timezone
+
+-type wx_wxMouseState() :: #wxMouseState{}. %% See #wxMouseState{} defined in wx.hrl
+-type wx_enum() :: integer(). %% Constant defined in wx.hrl
+-type wx_wxHtmlLinkInfo() :: #wxHtmlLinkInfo{}.
-%% @hidden
parent_class(_) -> true. %% Let the null pointers be sent down.
-%% @spec () -> wxObject()
%% @doc Starts a wx server.
+-spec new() -> wx_object().
new() ->
new([]).
-%% @spec ([Option]) -> wxObject()
-%% @doc Starts a wx server.
+%% @doc Starts a wx server.
%% Option may be {debug, Level}, see debug/1.
+-spec new([Option]) -> wx_object() when Option :: {debug, list() | atom()}.
new(Options) when is_list(Options) ->
#wx_env{port=Port} = wxe_server:start(),
put(opengl_port, Port),
@@ -102,130 +110,129 @@ new(Options) when is_list(Options) ->
debug(Debug),
null().
-%% @spec () -> ok
%% @doc Stops a wx server.
+-spec destroy() -> ok.
destroy() ->
wxe_server:stop(),
erase(?WXE_IDENTIFIER),
ok.
-%% @spec () -> wx_env()
%% @doc Gets this process's current wx environment.
%% Can be sent to other processes to allow them use this process wx environment.
%% @see set_env/1
+-spec get_env() -> wx_env().
get_env() ->
case get(?WXE_IDENTIFIER) of
undefined -> erlang:error({wxe,unknown_port});
Env = #wx_env{} -> Env
end.
-%% @spec (wx_env()) -> ok
%% @doc Sets the process wx environment, allows this process to use
%% another process wx environment.
+-spec set_env(wx_env()) -> ok.
set_env(#wx_env{sv=Pid, port=Port} = Env) ->
- put(?WXE_IDENTIFIER, Env),
+ put(?WXE_IDENTIFIER, Env),
put(opengl_port, Port),
%% wxe_util:cast(?REGISTER_PID, <<>>),
wxe_server:register_me(Pid),
ok.
-%% @spec () -> wxObject()
%% @doc Returns the null object
+-spec null() -> wx_object().
null() ->
#wx_ref{ref=0, type=wx}.
-%% @spec (wxObject()) -> boolean()
%% @doc Returns true if object is null, false otherwise
+-spec is_null(wx_object()) -> boolean().
is_null(#wx_ref{ref=NULL}) -> NULL =:= 0.
-%% @spec (wxObject()) -> atom()
%% @doc Returns the object type
+-spec getObjectType(wx_object()) -> atom().
getObjectType(#wx_ref{type=Type}) ->
Type.
-%% @spec (wxObject(), atom()) -> wxObject()
%% @doc Casts the object to class NewType.
-%% It is needed when using functions like wxWindow:findWindow/2, which
+%% It is needed when using functions like wxWindow:findWindow/2, which
%% returns a generic wxObject type.
+-spec typeCast(wx_object(), atom()) -> wx_object().
typeCast(Old=#wx_ref{}, NewType) when is_atom(NewType) ->
Old#wx_ref{type=NewType}.
-%% @spec (function()) -> term()
%% @doc Batches all <c>wx</c> commands
%% used in the fun. Improves performance of the command processing by
%% grabbing the wxWidgets thread so that no event processing will be
%% done before the complete batch of commands is invoked.
-%%
+%%
%% @see map/2
%% @see foreach/2
%% @see foldl/3
%% @see foldr/3
+-spec batch(function()) -> term().
batch(Fun) ->
ok = wxe_util:cast(?BATCH_BEGIN, <<>>),
try Fun()
- catch
+ catch
error:W -> erlang:exit({W, erlang:get_stacktrace()});
throw:W -> erlang:throw(W);
exit:W -> erlang:exit(W)
- after
+ after
ok = wxe_util:cast(?BATCH_END, <<>>)
end.
-%% @spec (function(), list()) -> ok
-%% @doc Behaves like {@link //stdlib/lists:foreach/2} but batches wx commands. See {@link batch/1}.
+%% @doc Behaves like {@link //stdlib/lists:foreach/2} but batches wx commands. See {@link batch/1}.
+-spec foreach(function(), list()) -> ok.
foreach(Fun, List) ->
ok = wxe_util:cast(?BATCH_BEGIN, <<>>),
try lists:foreach(Fun, List)
- catch
+ catch
error:W -> erlang:exit({W, erlang:get_stacktrace()});
throw:W -> erlang:throw(W);
exit:W -> erlang:exit(W)
- after
+ after
ok = wxe_util:cast(?BATCH_END, <<>>)
end.
-%% @spec (function(), list()) -> list()
-%% @doc Behaves like {@link //stdlib/lists:map/2} but batches wx commands. See {@link batch/1}.
+%% @doc Behaves like {@link //stdlib/lists:map/2} but batches wx commands. See {@link batch/1}.
+-spec map(function(), list()) -> list().
map(Fun, List) ->
ok = wxe_util:cast(?BATCH_BEGIN, <<>>),
try lists:map(Fun, List)
- catch
+ catch
error:W -> erlang:exit({W, erlang:get_stacktrace()});
throw:W -> erlang:throw(W);
exit:W -> erlang:exit(W)
- after
+ after
ok = wxe_util:cast(?BATCH_END, <<>>)
end.
-%% @spec (function(), term(), list()) -> term()
-%% @doc Behaves like {@link //stdlib/lists:foldl/3} but batches wx commands. See {@link batch/1}.
+%% @doc Behaves like {@link //stdlib/lists:foldl/3} but batches wx commands. See {@link batch/1}.
+-spec foldl(function(), term(), list()) -> term().
foldl(Fun, Acc, List) ->
ok = wxe_util:cast(?BATCH_BEGIN, <<>>),
try lists:foldl(Fun, Acc, List)
- catch
+ catch
error:W -> erlang:exit({W, erlang:get_stacktrace()});
throw:W -> erlang:throw(W);
exit:W -> erlang:exit(W)
- after
+ after
ok = wxe_util:cast(?BATCH_END, <<>>)
end.
-%% @spec (function(), term(), list()) -> term()
-%% @doc Behaves like {@link //stdlib/lists:foldr/3} but batches wx commands. See {@link batch/1}.
+%% @doc Behaves like {@link //stdlib/lists:foldr/3} but batches wx commands. See {@link batch/1}.
+-spec foldr(function(), term(), list()) -> term().
foldr(Fun, Acc, List) ->
ok = wxe_util:cast(?BATCH_BEGIN, <<>>),
try lists:foldr(Fun, Acc, List)
- catch
+ catch
error:W -> erlang:exit({W, erlang:get_stacktrace()});
throw:W -> erlang:throw(W);
exit:W -> erlang:exit(W)
- after
+ after
ok = wxe_util:cast(?BATCH_END, <<>>)
end.
-define(MIN_BIN_SIZE, 64). %% Current emulator min off heap size
-%% @spec (integer()) -> wx_memory()
%% @doc Creates a memory area (of Size in bytes) which can be used by an external library (i.e. opengl).
%% It is up to the client to keep a reference to this object so it does
%% not get garbage collected by erlang while still in use by the external
@@ -233,22 +240,23 @@ foldr(Fun, Acc, List) ->
%%
%% This is far from erlang's intentional usage and can crash the erlang emulator.
%% Use it carefully.
+-spec create_memory(integer()) -> wx_memory().
create_memory(Size) when Size > ?MIN_BIN_SIZE ->
#wx_mem{bin = <<0:(Size*8)>>, size = Size};
create_memory(Size) ->
#wx_mem{bin = <<0:((?MIN_BIN_SIZE+1)*8)>>, size = Size}.
-%% @spec (wx_memory()) -> binary()
%% @doc Returns the memory area as a binary.
+-spec get_memory_bin(wx_memory()) -> binary().
get_memory_bin(#wx_mem{bin=Bin, size=Size}) when Size > ?MIN_BIN_SIZE ->
Bin;
get_memory_bin(#wx_mem{bin=Bin, size=Size}) ->
<<WithCorrectSize:Size/binary, _/binary>> = Bin,
WithCorrectSize.
-%% @spec (wx_memory()) -> ok
%% @doc Saves the memory from deletion until release_memory/1 is called.
%% If release_memory/1 is not called the memory will not be garbage collected.
+-spec retain_memory(wx_memory()) -> ok.
retain_memory(#wx_mem{bin=Bin}) ->
wxe_util:send_bin(Bin),
ok = wxe_util:cast(?WXE_BIN_INCR, <<>>);
@@ -260,30 +268,29 @@ retain_memory(Bin) when is_binary(Bin) ->
wxe_util:send_bin(Bin),
ok = wxe_util:cast(?WXE_BIN_INCR, <<>>).
+-spec release_memory(wx_memory()) -> ok.
release_memory(#wx_mem{bin=Bin}) ->
wxe_util:send_bin(Bin),
ok = wxe_util:cast(?WXE_BIN_DECR, <<>>);
release_memory(Bin) when is_binary(Bin) ->
wxe_util:send_bin(Bin),
ok = wxe_util:cast(?WXE_BIN_DECR, <<>>).
-
-
-
-%% @spec (Level::term()) -> ok
-%% Level = none | verbose | trace | driver | [Level]
-%% @doc Sets debug level. If debug level is verbose or trace
-%% each call is printed on console. If Level is driver each allocated
+%% @doc Sets debug level. If debug level is 'verbose' or 'trace'
+%% each call is printed on console. If Level is 'driver' each allocated
%% object and deletion is printed on the console.
+-spec debug(Level | [Level]) -> ok
+ when Level :: none | verbose | trace | driver | integer().
+
debug(none) -> debug(0);
debug(verbose) -> debug(1);
debug(trace) -> debug(2);
debug(driver) -> debug(16);
debug([]) -> debug(0);
-debug(List) when is_list(List) ->
- {Drv,Erl} =
- lists:foldl(fun(verbose, {Drv,_Erl}) ->
+debug(List) when is_list(List) ->
+ {Drv,Erl} =
+ lists:foldl(fun(verbose, {Drv,_Erl}) ->
{Drv,1};
(trace, {Drv,_Erl}) ->
{Drv,2};
@@ -295,28 +302,29 @@ debug(Level) when is_integer(Level) ->
case get(?WXE_IDENTIFIER) of
undefined -> erlang:error({wxe,unknown_port});
#wx_env{debug=Old} when Old =:= Level -> ok;
- Env = #wx_env{sv=Server, port=Port, debug=Old} ->
- if
+ Env = #wx_env{sv=Server, port=Port, debug=Old} ->
+ if
Old > 16, Level > 16 -> ok;
Old < 16, Level < 16 -> ok;
true ->
erlang:port_call(Port,?WXE_DEBUG_DRIVER, [Level bsr 4])
- end,
+ end,
put(?WXE_IDENTIFIER, Env#wx_env{debug=Level}),
wxe_server:set_debug(Server,Level),
ok
end.
-%% @spec () -> ok
%% @doc Starts a wxErlang demo if examples directory exists and is compiled
+-spec demo() -> ok | {error, atom()}.
demo() ->
Priv = code:priv_dir(wx),
Demo = filename:join([filename:dirname(Priv),examples,demo]),
Mod = list_to_atom("demo"), %% Fool xref tests
case file:set_cwd(Demo) of
- ok ->
- apply(Mod, start, []);
+ ok ->
+ apply(Mod, start, []),
+ ok;
_ ->
{error, no_demo_dir}
end.
-
+
diff --git a/lib/wx/src/wxe_master.erl b/lib/wx/src/wxe_master.erl
index 9efe59054c..ac6e4a56e6 100644
--- a/lib/wx/src/wxe_master.erl
+++ b/lib/wx/src/wxe_master.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -100,17 +100,10 @@ init([]) ->
case catch erlang:system_info(smp_support) of
true -> ok;
_ ->
- error_logger:format("WX ERROR: SMP emulator required", []),
+ error_logger:format("WX ERROR: SMP emulator required (start with erl -smp)", []),
erlang:error(not_smp)
end,
- case catch (erlang:system_info(version) >= "5.6.2") of
- true -> ok;
- _ -> %% Needs to be able to disable FPU exceptions.
- error_logger:format("WX ERROR: OTP R12B-2 or Emulator >= 5.6.2 required", []),
- erlang:error(wrong_version)
- end,
- %% io:format("Loading ~p @ ~p ~n", [DriverName,PrivDir]),
case os:type() of
{win32,_} -> %% Needed for mingwm10.dll
Path = os:getenv("PATH"),
diff --git a/lib/wx/test/Makefile b/lib/wx/test/Makefile
index 333711789f..ac8a4bdd60 100644
--- a/lib/wx/test/Makefile
+++ b/lib/wx/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2011. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -48,14 +48,6 @@ clean:
docs:
-
-# Rules
-ifneq ($(INSIDE_ERLSRC),true)
-
-$(EBIN)/%.beam: $(ESRC)/%.erl
- $(ERLC) -W -bbeam $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -o$(EBIN) $<
-
-else
RELSYSDIR = $(RELEASE_PATH)/wx_test
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec:
@@ -66,5 +58,3 @@ release_tests_spec: opt
$(INSTALL_SCRIPT) wxt $(RELSYSDIR)
release_docs_spec:
-
-endif
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index b75b0cc74e..6ed7243c5b 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -50,7 +50,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[calendarCtrl, treeCtrl, notebook, staticBoxSizer,
clipboard, helpFrame, htmlWindow, listCtrlSort, listCtrlVirtual,
- radioBox, systemSettings].
+ radioBox, systemSettings, taskBarIcon].
groups() ->
[].
@@ -470,3 +470,15 @@ textCtrl(Config) ->
wxTextAttr:destroy(Attr),
wxWindow:show(Frame),
wx_test_lib:wx_destroy(Frame,Config).
+
+taskBarIcon(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
+taskBarIcon(Config) ->
+ Wx = wx:new(),
+ Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
+ TBI = wxTaskBarIcon:new(),
+ Icon = wxIcon:new(filename:join(code:priv_dir(debugger), "erlang_bug.png")),
+ wxTaskBarIcon:setIcon(TBI, Icon, [{tooltip, "Testing wxTaskBarIcon"}]),
+ wxWindow:show(Frame),
+ wxTaskBarIcon:connect(TBI, taskbar_left_down, [{callback, fun(Ev,_) -> io:format("Left clicked: ~p~n",[Ev]) end}]),
+ wxTaskBarIcon:connect(TBI, taskbar_right_down, [{callback,fun(Ev,_) -> io:format("Right clicked: ~p~n",[Ev]) end}]),
+ wx_test_lib:wx_destroy(Frame,Config).
diff --git a/lib/xmerl/include/xmerl_xlink.hrl b/lib/xmerl/include/xmerl_xlink.hrl
deleted file mode 100644
index 375e244c23..0000000000
--- a/lib/xmerl/include/xmerl_xlink.hrl
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-%% The following is a brief summary of the element types (columns) on
-%% which the global attributes are allowed:
-%%
-%% simple extended locator arc resource title
-%% type X X X X X X
-%% href X X
-%% role X X X X
-%% title X X X X
-%% show X X X
-%% actuate X X X
-%% from X
-%% to X
-%%
--record(xlink, {
- type, % simple | extended | locator | arc | resource | title
- href,
- role
- title,
- show,
- actuate,
- from,
- to
- }).
diff --git a/lib/xmerl/src/Makefile b/lib/xmerl/src/Makefile
index 7009b50f6c..5b77c9478b 100644
--- a/lib/xmerl/src/Makefile
+++ b/lib/xmerl/src/Makefile
@@ -94,7 +94,6 @@ MODULES = $(EDOC_MODULES) \
HRL_FILES = \
../include/xmerl.hrl \
- ../include/xmerl_xlink.hrl \
../include/xmerl_xpath.hrl \
../include/xmerl_xsd.hrl
diff --git a/lib/xmerl/src/xmerl_sax_parser.erl b/lib/xmerl/src/xmerl_sax_parser.erl
index 45e2a928ac..1d795799ce 100644
--- a/lib/xmerl/src/xmerl_sax_parser.erl
+++ b/lib/xmerl/src/xmerl_sax_parser.erl
@@ -217,7 +217,7 @@ check_encoding_option(E) when E==utf8; E=={utf16,little}; E=={utf16,big};
check_encoding_option(utf16) ->
{utf16,big};
check_encoding_option(E) ->
- {error, io_lib:format("Charcter set ~p not supported", [E])}.
+ {error, io_lib:format("Character set ~p not supported", [E])}.
%%----------------------------------------------------------------------
%% Function: detect_charset(Xml, State)
@@ -279,6 +279,7 @@ convert_encoding(Enc) -> %% Just for 7,8 bit + utf8
case string:to_lower(Enc) of
"utf-8" -> utf8;
"us-ascii" -> utf8;
+ "latin1" -> latin1;
"iso-8859-1" -> latin1; % Handle all iso-8859 as latin1
"iso-8859-2" -> latin1;
"iso-8859-3" -> latin1;
diff --git a/lib/xmerl/src/xmerl_sax_parser_base.erlsrc b/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
index c25cde0472..e988c49292 100644
--- a/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
+++ b/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
@@ -39,6 +39,9 @@
%% Internal exports
%%----------------------------------------------------------------------
-export([
+ cf/3,
+ cf/4,
+ cf/5
]).
%%----------------------------------------------------------------------