├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── build.lua ├── dep ├── build-lua-msvc.bat ├── cef │ ├── include │ │ ├── base │ │ │ ├── cef_atomic_ref_count.h │ │ │ ├── cef_atomicops.h │ │ │ ├── cef_basictypes.h │ │ │ ├── cef_bind.h │ │ │ ├── cef_bind_helpers.h │ │ │ ├── cef_build.h │ │ │ ├── cef_callback.h │ │ │ ├── cef_callback_forward.h │ │ │ ├── cef_callback_helpers.h │ │ │ ├── cef_callback_list.h │ │ │ ├── cef_cancelable_callback.h │ │ │ ├── cef_lock.h │ │ │ ├── cef_logging.h │ │ │ ├── cef_macros.h │ │ │ ├── cef_move.h │ │ │ ├── cef_platform_thread.h │ │ │ ├── cef_ref_counted.h │ │ │ ├── cef_scoped_ptr.h │ │ │ ├── cef_string16.h │ │ │ ├── cef_template_util.h │ │ │ ├── cef_thread_checker.h │ │ │ ├── cef_thread_collision_warner.h │ │ │ ├── cef_trace_event.h │ │ │ ├── cef_tuple.h │ │ │ ├── cef_weak_ptr.h │ │ │ └── internal │ │ │ │ ├── cef_atomicops_x86_msvc.h │ │ │ │ ├── cef_bind_internal.h │ │ │ │ ├── cef_bind_internal_win.h │ │ │ │ ├── cef_callback_internal.h │ │ │ │ ├── cef_lock_impl.h │ │ │ │ ├── cef_raw_scoped_refptr_mismatch_checker.h │ │ │ │ └── cef_thread_checker_impl.h │ │ ├── capi │ │ │ ├── cef_accessibility_handler_capi.h │ │ │ ├── cef_app_capi.h │ │ │ ├── cef_auth_callback_capi.h │ │ │ ├── cef_base_capi.h │ │ │ ├── cef_browser_capi.h │ │ │ ├── cef_browser_process_handler_capi.h │ │ │ ├── cef_callback_capi.h │ │ │ ├── cef_client_capi.h │ │ │ ├── cef_command_line_capi.h │ │ │ ├── cef_context_menu_handler_capi.h │ │ │ ├── cef_cookie_capi.h │ │ │ ├── cef_crash_util_capi.h │ │ │ ├── cef_dialog_handler_capi.h │ │ │ ├── cef_display_handler_capi.h │ │ │ ├── cef_dom_capi.h │ │ │ ├── cef_download_handler_capi.h │ │ │ ├── cef_download_item_capi.h │ │ │ ├── cef_drag_data_capi.h │ │ │ ├── cef_drag_handler_capi.h │ │ │ ├── cef_file_util_capi.h │ │ │ ├── cef_find_handler_capi.h │ │ │ ├── cef_focus_handler_capi.h │ │ │ ├── cef_frame_capi.h │ │ │ ├── cef_geolocation_capi.h │ │ │ ├── cef_geolocation_handler_capi.h │ │ │ ├── cef_image_capi.h │ │ │ ├── cef_jsdialog_handler_capi.h │ │ │ ├── cef_keyboard_handler_capi.h │ │ │ ├── cef_life_span_handler_capi.h │ │ │ ├── cef_load_handler_capi.h │ │ │ ├── cef_menu_model_capi.h │ │ │ ├── cef_menu_model_delegate_capi.h │ │ │ ├── cef_navigation_entry_capi.h │ │ │ ├── cef_origin_whitelist_capi.h │ │ │ ├── cef_parser_capi.h │ │ │ ├── cef_path_util_capi.h │ │ │ ├── cef_print_handler_capi.h │ │ │ ├── cef_print_settings_capi.h │ │ │ ├── cef_process_message_capi.h │ │ │ ├── cef_process_util_capi.h │ │ │ ├── cef_render_handler_capi.h │ │ │ ├── cef_render_process_handler_capi.h │ │ │ ├── cef_request_capi.h │ │ │ ├── cef_request_context_capi.h │ │ │ ├── cef_request_context_handler_capi.h │ │ │ ├── cef_request_handler_capi.h │ │ │ ├── cef_resource_bundle_capi.h │ │ │ ├── cef_resource_bundle_handler_capi.h │ │ │ ├── cef_resource_handler_capi.h │ │ │ ├── cef_response_capi.h │ │ │ ├── cef_response_filter_capi.h │ │ │ ├── cef_scheme_capi.h │ │ │ ├── cef_ssl_info_capi.h │ │ │ ├── cef_ssl_status_capi.h │ │ │ ├── cef_stream_capi.h │ │ │ ├── cef_string_visitor_capi.h │ │ │ ├── cef_task_capi.h │ │ │ ├── cef_thread_capi.h │ │ │ ├── cef_trace_capi.h │ │ │ ├── cef_urlrequest_capi.h │ │ │ ├── cef_v8_capi.h │ │ │ ├── cef_values_capi.h │ │ │ ├── cef_waitable_event_capi.h │ │ │ ├── cef_web_plugin_capi.h │ │ │ ├── cef_x509_certificate_capi.h │ │ │ ├── cef_xml_reader_capi.h │ │ │ ├── cef_zip_reader_capi.h │ │ │ ├── test │ │ │ │ ├── cef_test_helpers_capi.h │ │ │ │ └── cef_translator_test_capi.h │ │ │ └── views │ │ │ │ ├── cef_box_layout_capi.h │ │ │ │ ├── cef_browser_view_capi.h │ │ │ │ ├── cef_browser_view_delegate_capi.h │ │ │ │ ├── cef_button_capi.h │ │ │ │ ├── cef_button_delegate_capi.h │ │ │ │ ├── cef_display_capi.h │ │ │ │ ├── cef_fill_layout_capi.h │ │ │ │ ├── cef_label_button_capi.h │ │ │ │ ├── cef_layout_capi.h │ │ │ │ ├── cef_menu_button_capi.h │ │ │ │ ├── cef_menu_button_delegate_capi.h │ │ │ │ ├── cef_panel_capi.h │ │ │ │ ├── cef_panel_delegate_capi.h │ │ │ │ ├── cef_scroll_view_capi.h │ │ │ │ ├── cef_textfield_capi.h │ │ │ │ ├── cef_textfield_delegate_capi.h │ │ │ │ ├── cef_view_capi.h │ │ │ │ ├── cef_view_delegate_capi.h │ │ │ │ ├── cef_window_capi.h │ │ │ │ └── cef_window_delegate_capi.h │ │ ├── cef_accessibility_handler.h │ │ ├── cef_app.h │ │ ├── cef_auth_callback.h │ │ ├── cef_base.h │ │ ├── cef_browser.h │ │ ├── cef_browser_process_handler.h │ │ ├── cef_callback.h │ │ ├── cef_client.h │ │ ├── cef_command_line.h │ │ ├── cef_context_menu_handler.h │ │ ├── cef_cookie.h │ │ ├── cef_crash_util.h │ │ ├── cef_dialog_handler.h │ │ ├── cef_display_handler.h │ │ ├── cef_dom.h │ │ ├── cef_download_handler.h │ │ ├── cef_download_item.h │ │ ├── cef_drag_data.h │ │ ├── cef_drag_handler.h │ │ ├── cef_file_util.h │ │ ├── cef_find_handler.h │ │ ├── cef_focus_handler.h │ │ ├── cef_frame.h │ │ ├── cef_geolocation.h │ │ ├── cef_geolocation_handler.h │ │ ├── cef_image.h │ │ ├── cef_jsdialog_handler.h │ │ ├── cef_keyboard_handler.h │ │ ├── cef_life_span_handler.h │ │ ├── cef_load_handler.h │ │ ├── cef_menu_model.h │ │ ├── cef_menu_model_delegate.h │ │ ├── cef_navigation_entry.h │ │ ├── cef_origin_whitelist.h │ │ ├── cef_pack_resources.h │ │ ├── cef_pack_strings.h │ │ ├── cef_parser.h │ │ ├── cef_path_util.h │ │ ├── cef_print_handler.h │ │ ├── cef_print_settings.h │ │ ├── cef_process_message.h │ │ ├── cef_process_util.h │ │ ├── cef_render_handler.h │ │ ├── cef_render_process_handler.h │ │ ├── cef_request.h │ │ ├── cef_request_context.h │ │ ├── cef_request_context_handler.h │ │ ├── cef_request_handler.h │ │ ├── cef_resource_bundle.h │ │ ├── cef_resource_bundle_handler.h │ │ ├── cef_resource_handler.h │ │ ├── cef_response.h │ │ ├── cef_response_filter.h │ │ ├── cef_sandbox_win.h │ │ ├── cef_scheme.h │ │ ├── cef_ssl_info.h │ │ ├── cef_ssl_status.h │ │ ├── cef_stream.h │ │ ├── cef_string_visitor.h │ │ ├── cef_task.h │ │ ├── cef_thread.h │ │ ├── cef_trace.h │ │ ├── cef_urlrequest.h │ │ ├── cef_v8.h │ │ ├── cef_values.h │ │ ├── cef_version.h │ │ ├── cef_waitable_event.h │ │ ├── cef_web_plugin.h │ │ ├── cef_x509_certificate.h │ │ ├── cef_xml_reader.h │ │ ├── cef_zip_reader.h │ │ ├── internal │ │ │ ├── cef_export.h │ │ │ ├── cef_logging_internal.h │ │ │ ├── cef_ptr.h │ │ │ ├── cef_string.h │ │ │ ├── cef_string_list.h │ │ │ ├── cef_string_map.h │ │ │ ├── cef_string_multimap.h │ │ │ ├── cef_string_types.h │ │ │ ├── cef_string_wrappers.h │ │ │ ├── cef_thread_internal.h │ │ │ ├── cef_time.h │ │ │ ├── cef_trace_event_internal.h │ │ │ ├── cef_types.h │ │ │ ├── cef_types_linux.h │ │ │ ├── cef_types_win.h │ │ │ ├── cef_types_wrappers.h │ │ │ └── cef_win.h │ │ ├── test │ │ │ ├── cef_test_helpers.h │ │ │ └── cef_translator_test.h │ │ ├── views │ │ │ ├── cef_box_layout.h │ │ │ ├── cef_browser_view.h │ │ │ ├── cef_browser_view_delegate.h │ │ │ ├── cef_button.h │ │ │ ├── cef_button_delegate.h │ │ │ ├── cef_display.h │ │ │ ├── cef_fill_layout.h │ │ │ ├── cef_label_button.h │ │ │ ├── cef_layout.h │ │ │ ├── cef_menu_button.h │ │ │ ├── cef_menu_button_delegate.h │ │ │ ├── cef_panel.h │ │ │ ├── cef_panel_delegate.h │ │ │ ├── cef_scroll_view.h │ │ │ ├── cef_textfield.h │ │ │ ├── cef_textfield_delegate.h │ │ │ ├── cef_view.h │ │ │ ├── cef_view_delegate.h │ │ │ ├── cef_window.h │ │ │ └── cef_window_delegate.h │ │ └── wrapper │ │ │ ├── cef_byte_read_handler.h │ │ │ ├── cef_closure_task.h │ │ │ ├── cef_helpers.h │ │ │ ├── cef_message_router.h │ │ │ ├── cef_resource_manager.h │ │ │ ├── cef_scoped_temp_dir.h │ │ │ ├── cef_stream_resource_handler.h │ │ │ ├── cef_xml_object.h │ │ │ └── cef_zip_archive.h │ ├── libcef.lib │ └── x64 │ │ └── libcef.lib ├── lua-5.1.5 │ ├── COPYRIGHT │ ├── HISTORY │ ├── INSTALL │ ├── Makefile │ ├── README │ ├── lua51.lib │ ├── lua51_x64.lib │ └── src │ │ ├── Makefile │ │ ├── lapi.c │ │ ├── lapi.h │ │ ├── lauxlib.c │ │ ├── lauxlib.h │ │ ├── lbaselib.c │ │ ├── lcode.c │ │ ├── lcode.h │ │ ├── ldblib.c │ │ ├── ldebug.c │ │ ├── ldebug.h │ │ ├── ldo.c │ │ ├── ldo.h │ │ ├── ldump.c │ │ ├── lfunc.c │ │ ├── lfunc.h │ │ ├── lgc.c │ │ ├── lgc.h │ │ ├── linit.c │ │ ├── liolib.c │ │ ├── llex.c │ │ ├── llex.h │ │ ├── llimits.h │ │ ├── lmathlib.c │ │ ├── lmem.c │ │ ├── lmem.h │ │ ├── loadlib.c │ │ ├── lobject.c │ │ ├── lobject.h │ │ ├── lopcodes.c │ │ ├── lopcodes.h │ │ ├── loslib.c │ │ ├── lparser.c │ │ ├── lparser.h │ │ ├── lstate.c │ │ ├── lstate.h │ │ ├── lstring.c │ │ ├── lstring.h │ │ ├── lstrlib.c │ │ ├── ltable.c │ │ ├── ltable.h │ │ ├── ltablib.c │ │ ├── ltm.c │ │ ├── ltm.h │ │ ├── lua.c │ │ ├── lua.h │ │ ├── luac.c │ │ ├── luaconf.h │ │ ├── lualib.h │ │ ├── lundump.c │ │ ├── lundump.h │ │ ├── lvm.c │ │ ├── lvm.h │ │ ├── lzio.c │ │ ├── lzio.h │ │ └── print.c ├── lua-5.2.4 │ ├── Makefile │ ├── README │ ├── lua52.lib │ ├── lua52_x64.lib │ └── src │ │ ├── Makefile │ │ ├── lapi.c │ │ ├── lapi.h │ │ ├── lauxlib.c │ │ ├── lauxlib.h │ │ ├── lbaselib.c │ │ ├── lbitlib.c │ │ ├── lcode.c │ │ ├── lcode.h │ │ ├── lcorolib.c │ │ ├── lctype.c │ │ ├── lctype.h │ │ ├── ldblib.c │ │ ├── ldebug.c │ │ ├── ldebug.h │ │ ├── ldo.c │ │ ├── ldo.h │ │ ├── ldump.c │ │ ├── lfunc.c │ │ ├── lfunc.h │ │ ├── lgc.c │ │ ├── lgc.h │ │ ├── linit.c │ │ ├── liolib.c │ │ ├── llex.c │ │ ├── llex.h │ │ ├── llimits.h │ │ ├── lmathlib.c │ │ ├── lmem.c │ │ ├── lmem.h │ │ ├── loadlib.c │ │ ├── lobject.c │ │ ├── lobject.h │ │ ├── lopcodes.c │ │ ├── lopcodes.h │ │ ├── loslib.c │ │ ├── lparser.c │ │ ├── lparser.h │ │ ├── lstate.c │ │ ├── lstate.h │ │ ├── lstring.c │ │ ├── lstring.h │ │ ├── lstrlib.c │ │ ├── ltable.c │ │ ├── ltable.h │ │ ├── ltablib.c │ │ ├── ltm.c │ │ ├── ltm.h │ │ ├── lua.c │ │ ├── lua.h │ │ ├── lua.hpp │ │ ├── luac.c │ │ ├── luaconf.h │ │ ├── lualib.h │ │ ├── lundump.c │ │ ├── lundump.h │ │ ├── lvm.c │ │ ├── lvm.h │ │ ├── lzio.c │ │ └── lzio.h └── lua-5.3.4 │ ├── Makefile │ ├── README │ ├── lua53.lib │ ├── lua53_x64.lib │ └── src │ ├── Makefile │ ├── lapi.c │ ├── lapi.h │ ├── lauxlib.c │ ├── lauxlib.h │ ├── lbaselib.c │ ├── lbitlib.c │ ├── lcode.c │ ├── lcode.h │ ├── lcorolib.c │ ├── lctype.c │ ├── lctype.h │ ├── ldblib.c │ ├── ldebug.c │ ├── ldebug.h │ ├── ldo.c │ ├── ldo.h │ ├── ldump.c │ ├── lfunc.c │ ├── lfunc.h │ ├── lgc.c │ ├── lgc.h │ ├── linit.c │ ├── liolib.c │ ├── llex.c │ ├── llex.h │ ├── llimits.h │ ├── lmathlib.c │ ├── lmem.c │ ├── lmem.h │ ├── loadlib.c │ ├── lobject.c │ ├── lobject.h │ ├── lopcodes.c │ ├── lopcodes.h │ ├── loslib.c │ ├── lparser.c │ ├── lparser.h │ ├── lprefix.h │ ├── lstate.c │ ├── lstate.h │ ├── lstring.c │ ├── lstring.h │ ├── lstrlib.c │ ├── ltable.c │ ├── ltable.h │ ├── ltablib.c │ ├── ltm.c │ ├── ltm.h │ ├── lua.c │ ├── lua.h │ ├── lua.hpp │ ├── luac.c │ ├── luaconf.h │ ├── lualib.h │ ├── lundump.c │ ├── lundump.h │ ├── lutf8lib.c │ ├── lvm.c │ ├── lvm.h │ ├── lzio.c │ └── lzio.h ├── lcf.png ├── pro ├── luacef.sln └── luacef │ ├── luacef.vcxproj │ ├── luacef.vcxproj.filters │ └── luacef.vcxproj.user └── src ├── api ├── browser_process_handler.c ├── callback.c ├── command_line.c ├── context_menu_handler.c ├── cookie.c ├── dialog_handler.c ├── display_handler.c ├── dom.c ├── download_handler.c ├── download_item.c ├── drag_data.c ├── drag_handler.c ├── find_handler.c ├── geolocation_handler.c ├── image.c ├── jsdialog_handler.c ├── keyboard_handler.c ├── life_span_handler.c ├── load_handler.c ├── menu_model.c ├── render_handler.c ├── render_process_handler.c ├── request.c ├── request_handler.c ├── resource_bunble_handler.c ├── ssl_info.c ├── string_list.c ├── string_map.c ├── task.c ├── time.c ├── v8.c ├── values.c ├── web_plugin.c └── x509_certificate.c ├── base ├── app.c ├── base.c └── client.c ├── compat-5.3.c ├── compat-5.3.h ├── luacef.c ├── luacef.h ├── luacef_api.h ├── types ├── browser.c ├── frame.c ├── funcs.c ├── ptr.c ├── types.c └── types_os.c └── ultils └── string.c /.travis.yml: -------------------------------------------------------------------------------- 1 | os: windows 2 | language: c 3 | 4 | script: 5 | - git clone https://github.com/wy3/luacef.git 6 | - cd luacef 7 | - choco feature enable -n=allowGlobalConfirmation 8 | - choco install mingw 9 | - choco install make 10 | - choco install curl 11 | - choco install 7zip 12 | - curl http://opensource.spotify.com/cefbuilds/cef_binary_3.3112.1659.gfef43e0_windows64_minimal.tar.bz2 --output cef.tar.bz2 13 | - 7z -y x cef.tar.bz2 14 | - 7z -y x cef.tar 15 | - rm cef.tar.bz2 16 | - rm cef.tar 17 | - mv cef_binary_3.3112.1659.gfef43e0_windows64_minimal cef_minimal 18 | - cp ./cef_minimal/Release/libcef.lib ./deps/cef/ 19 | - curl https://www.lua.org/ftp/lua-5.3.5.tar.gz --output lua.tar.gz 20 | - 7z -y x lua.tar.gz 21 | - 7z -y x lua.tar 22 | - rm lua.tar.gz 23 | - rm lua.tar 24 | - mv lua-5.3.5 lua53 25 | - cd lua53 26 | - make mingw 27 | - cd .. 28 | - cp ./lua53/src/lua.exe ./lua53/ 29 | - cp ./lua53/src/lua53.dll ./lua53/ 30 | - cp ./lua53/src/liblua.a ./deps/lua53/liblua53.a 31 | - rm ./deps/lua53/lua53.lib 32 | - ./lua53/lua.exe build.lua 33 | 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Nomi-san 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /build.lua: -------------------------------------------------------------------------------- 1 | local win32 = package.config:sub(1,1) == '\\' and true or false 2 | 3 | function path(path) 4 | if win32 then 5 | path = string.gsub(path, '/', '\\') 6 | else 7 | path = string.gsub(path, '\\', '/') 8 | end 9 | return path 10 | end 11 | 12 | function scandir(d) 13 | local i, t, p = 0, {}, io.popen(win32 and ('dir "'..d..'" /b ') or ('ls -a "'..d..'" ')) 14 | for f in p:lines() do 15 | i = i + 1; t[i] = f 16 | end 17 | p:close() 18 | return t 19 | end 20 | 21 | function findLast(s, p) 22 | local f = s:reverse():find(p:reverse(), nil, true) 23 | return f and #s - #p - f + 2 or f 24 | end 25 | 26 | function exists(file) 27 | local ok, err, code = os.rename(file, file) 28 | if not ok then 29 | if code == 13 then 30 | return true 31 | end 32 | end 33 | return ok, err 34 | end 35 | 36 | function isdir(path) 37 | return exists(path.."/") 38 | end 39 | 40 | function del(file) 41 | file = path(file) 42 | if win32 then 43 | os.execute('del /S /Q '..file) 44 | else 45 | os.execute('rm -r '..file) 46 | end 47 | end 48 | 49 | function mkdir(dir) 50 | os.execute('mkdir '..path(dir)) 51 | end 52 | 53 | function rmdir(dir) 54 | os.execute('rmdir '..path(dir)) 55 | end 56 | 57 | -------------------------------------------------------------- 58 | -- src/ 59 | -- |--*.c 60 | -- |--*dir/ 61 | -- | |--*.c 62 | -- | .. 63 | -- .. 64 | -- 65 | 66 | dir = 'src' 67 | c, d, l = {}, {}, {} 68 | 69 | for k, v in pairs(scandir(dir)) do 70 | if not findLast(v, '.') then 71 | d[#d+1] = dir..'/'..v 72 | elseif findLast(v, '.c') then 73 | c[#c+1] = dir..'/'..v 74 | l[#l+1] = v:gsub('%.c', '') 75 | end 76 | end 77 | 78 | for n = 1, #d do 79 | for k, v in pairs(scandir(d[n])) do 80 | if findLast(v, '.c') then 81 | c[#c+1] = d[n]..'/'..v 82 | l[#l+1] = v:gsub('%.c', '') 83 | end 84 | end 85 | end 86 | 87 | function exec(cmd) 88 | local _,__,c = os.execute(cmd) 89 | if c > 0 then 90 | print('build error!') 91 | os.exit() 92 | end 93 | end 94 | 95 | cc = 'gcc -std=gnu99 ' 96 | 97 | if (isdir('build')) then 98 | if (isdir('build/obj')) then 99 | del('build/obj/*') 100 | rmdir('build/obj') 101 | end 102 | del('build/*') 103 | rmdir('build') 104 | end 105 | 106 | mkdir('build') 107 | mkdir('build/obj') 108 | 109 | print("# Generating object...") 110 | for m = 1, #c do 111 | exec(cc .. ' -std=c99 -w -fPIC -I./deps/lua53/src -I./deps/cef -c -o ./build/obj/' .. l[m] .. '.o '.. c[m]) 112 | print(' ./' .. c[m] .. ' -> ./build/obj/' .. l[m] .. '.o' ) 113 | end 114 | 115 | print("# Linking library...") 116 | if win32 then 117 | exec(cc .. ' -shared -o ./build/luacef.dll ./build/obj/*.o -Ldeps/lua53 -Ldeps/cef -llua53 -llibcef -lole32') 118 | print(" -> ./build/luacef.dll") 119 | else 120 | cef_dir = 'cef_minimal/Release' -- directoty which included `libcef.so` 121 | exec(cc .. ' -std=c99 -shared -o ./build/luacef.so ./build/obj/*.o -Wl,-rpath,. -L./ -L./'..cef_dir..' -lcef') 122 | print(" -> ./build/luacef.so") 123 | end 124 | 125 | print("# Done.\n") 126 | -------------------------------------------------------------------------------- /dep/build-lua-msvc.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cl >nul 2>&1 && ( 4 | cd lua-5.3.4 5 | cl /MD /O2 /c /DLUA_BUILD_AS_DLL src/*.c 6 | ren lua.obj lua.o 7 | ren luac.obj luac.o 8 | link /DLL /IMPLIB:lua53.lib /OUT:lua53.dll *.obj 9 | link /OUT:lua.exe lua.o lua53.lib 10 | lib /OUT:lua53-static.lib *.obj 11 | link /OUT:luac.exe luac.o lua53-static.lib 12 | del *.exp *.obj *.o 13 | cd .. 14 | ) || ( 15 | echo cl.exe not found 16 | ) 17 | -------------------------------------------------------------------------------- /dep/cef/include/base/cef_basictypes.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012 2 | // Google Inc. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the name Chromium Embedded 15 | // Framework nor the names of its contributors may be used to endorse 16 | // or promote products derived from this software without specific prior 17 | // written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef CEF_INCLUDE_BASE_CEF_BASICTYPES_H_ 32 | #define CEF_INCLUDE_BASE_CEF_BASICTYPES_H_ 33 | #pragma once 34 | 35 | #include // For UINT_MAX 36 | #include // For size_t 37 | 38 | #include "include/base/cef_build.h" 39 | 40 | // The NSPR system headers define 64-bit as |long| when possible, except on 41 | // Mac OS X. In order to not have typedef mismatches, we do the same on LP64. 42 | // 43 | // On Mac OS X, |long long| is used for 64-bit types for compatibility with 44 | // format macros even in the LP64 model. 45 | #if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) 46 | typedef long int64; 47 | typedef unsigned long uint64; 48 | #else 49 | typedef long long int64; 50 | typedef unsigned long long uint64; 51 | #endif 52 | 53 | // TODO: Remove these type guards. These are to avoid conflicts with 54 | // obsolete/protypes.h in the Gecko SDK. 55 | #ifndef _INT32 56 | #define _INT32 57 | typedef int int32; 58 | #endif 59 | 60 | // TODO: Remove these type guards. These are to avoid conflicts with 61 | // obsolete/protypes.h in the Gecko SDK. 62 | #ifndef _UINT32 63 | #define _UINT32 64 | typedef unsigned int uint32; 65 | #endif 66 | 67 | // UTF-16 character type. 68 | // This should be kept synchronized with base/strings/string16.h 69 | #ifndef char16 70 | #if defined(WCHAR_T_IS_UTF16) 71 | typedef wchar_t char16; 72 | #elif defined(WCHAR_T_IS_UTF32) 73 | typedef unsigned short char16; 74 | #endif 75 | #endif 76 | 77 | #endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_ 78 | -------------------------------------------------------------------------------- /dep/cef/include/base/cef_callback_forward.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011 2 | // Google Inc. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the name Chromium Embedded 15 | // Framework nor the names of its contributors may be used to endorse 16 | // or promote products derived from this software without specific prior 17 | // written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_ 32 | #define INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_ 33 | #pragma once 34 | 35 | #if defined(BASE_CALLBACK_FORWARD_H_) 36 | // Do nothing if the Chromium header has already been included. 37 | // This can happen in cases where Chromium code is used directly by the 38 | // client application. When using Chromium code directly always include 39 | // the Chromium header first to avoid type conflicts. 40 | #elif defined(USING_CHROMIUM_INCLUDES) 41 | // When building CEF include the Chromium header directly. 42 | #include "base/callback_forward.h" 43 | #else // !USING_CHROMIUM_INCLUDES 44 | // The following is substantially similar to the Chromium implementation. 45 | // If the Chromium implementation diverges the below implementation should be 46 | // updated to match. 47 | 48 | namespace base { 49 | 50 | template 51 | class Callback; 52 | 53 | typedef Callback Closure; 54 | 55 | } // namespace base 56 | 57 | #endif // !!USING_CHROMIUM_INCLUDES 58 | 59 | #endif // INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_ 60 | -------------------------------------------------------------------------------- /dep/cef/include/base/internal/cef_thread_checker_impl.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Do not include this header file directly. Use base/cef_thread_checker.h 31 | // instead. 32 | 33 | #ifndef CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_ 34 | #define CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_ 35 | 36 | #include "include/base/cef_lock.h" 37 | #include "include/base/cef_platform_thread.h" 38 | 39 | namespace base { 40 | namespace cef_internal { 41 | 42 | // Real implementation of ThreadChecker, for use in debug mode, or 43 | // for temporary use in release mode (e.g. to CHECK on a threading issue 44 | // seen only in the wild). 45 | // 46 | // Note: You should almost always use the ThreadChecker class to get the 47 | // right version for your build configuration. 48 | class ThreadCheckerImpl { 49 | public: 50 | ThreadCheckerImpl(); 51 | ~ThreadCheckerImpl(); 52 | 53 | bool CalledOnValidThread() const; 54 | 55 | // Changes the thread that is checked for in CalledOnValidThread. This may 56 | // be useful when an object may be created on one thread and then used 57 | // exclusively on another thread. 58 | void DetachFromThread(); 59 | 60 | private: 61 | void EnsureThreadIdAssigned() const; 62 | 63 | mutable base::Lock lock_; 64 | // This is mutable so that CalledOnValidThread can set it. 65 | // It's guarded by |lock_|. 66 | mutable PlatformThreadRef valid_thread_id_; 67 | }; 68 | 69 | } // namespace cef_internal 70 | } // namespace base 71 | 72 | #endif // CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_ 73 | -------------------------------------------------------------------------------- /dep/cef/include/capi/cef_auth_callback_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=639d58245ecd39624d39ee8b49e0e4e056d1c4ed$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/cef_base_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /// 50 | // Callback structure used for asynchronous continuation of authentication 51 | // requests. 52 | /// 53 | typedef struct _cef_auth_callback_t { 54 | /// 55 | // Base structure. 56 | /// 57 | cef_base_ref_counted_t base; 58 | 59 | /// 60 | // Continue the authentication request. 61 | /// 62 | void(CEF_CALLBACK* cont)(struct _cef_auth_callback_t* self, 63 | const cef_string_t* username, 64 | const cef_string_t* password); 65 | 66 | /// 67 | // Cancel the authentication request. 68 | /// 69 | void(CEF_CALLBACK* cancel)(struct _cef_auth_callback_t* self); 70 | } cef_auth_callback_t; 71 | 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | 76 | #endif // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ 77 | -------------------------------------------------------------------------------- /dep/cef/include/capi/cef_callback_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=68de2255fd429696d62115786fc480f1d5f9882b$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/cef_base_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /// 50 | // Generic callback structure used for asynchronous continuation. 51 | /// 52 | typedef struct _cef_callback_t { 53 | /// 54 | // Base structure. 55 | /// 56 | cef_base_ref_counted_t base; 57 | 58 | /// 59 | // Continue processing. 60 | /// 61 | void(CEF_CALLBACK* cont)(struct _cef_callback_t* self); 62 | 63 | /// 64 | // Cancel processing. 65 | /// 66 | void(CEF_CALLBACK* cancel)(struct _cef_callback_t* self); 67 | } cef_callback_t; 68 | 69 | /// 70 | // Generic callback structure used for asynchronous completion. 71 | /// 72 | typedef struct _cef_completion_callback_t { 73 | /// 74 | // Base structure. 75 | /// 76 | cef_base_ref_counted_t base; 77 | 78 | /// 79 | // Method that will be called once the task is complete. 80 | /// 81 | void(CEF_CALLBACK* on_complete)(struct _cef_completion_callback_t* self); 82 | } cef_completion_callback_t; 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 89 | -------------------------------------------------------------------------------- /dep/cef/include/capi/cef_path_util_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=fbb817705137a12b4718950ff696396c30057007$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/cef_base_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /// 50 | // Retrieve the path associated with the specified |key|. Returns true (1) on 51 | // success. Can be called on any thread in the browser process. 52 | /// 53 | CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 60 | -------------------------------------------------------------------------------- /dep/cef/include/capi/cef_process_util_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=aad07da2d500b8d31e02a75331bdb68f16d4c662$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/cef_base_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /// 50 | // Launches the process specified via |command_line|. Returns true (1) upon 51 | // success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. 52 | // 53 | // Unix-specific notes: - All file descriptors open in the parent process will 54 | // be closed in the 55 | // child process except for stdin, stdout, and stderr. 56 | // - If the first argument on the command line does not contain a slash, 57 | // PATH will be searched. (See man execvp.) 58 | /// 59 | CEF_EXPORT int cef_launch_process(struct _cef_command_line_t* command_line); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 66 | -------------------------------------------------------------------------------- /dep/cef/include/capi/cef_string_visitor_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=2e8edddfd49aea615c7adf8d0d092a4865b79229$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/cef_base_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /// 50 | // Implement this structure to receive string values asynchronously. 51 | /// 52 | typedef struct _cef_string_visitor_t { 53 | /// 54 | // Base structure. 55 | /// 56 | cef_base_ref_counted_t base; 57 | 58 | /// 59 | // Method that will be executed. 60 | /// 61 | void(CEF_CALLBACK* visit)(struct _cef_string_visitor_t* self, 62 | const cef_string_t* string); 63 | } cef_string_visitor_t; 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 70 | -------------------------------------------------------------------------------- /dep/cef/include/capi/test/cef_test_helpers_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=a43c32d6951dd8f125f87d21948798f4d596768e$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_TEST_CEF_TEST_HELPERS_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_TEST_CEF_TEST_HELPERS_CAPI_H_ 41 | #pragma once 42 | 43 | #if !defined(BUILDING_CEF_SHARED) && !defined(WRAPPING_CEF_SHARED) && \ 44 | !defined(UNIT_TEST) 45 | #error This file can be included for unit tests only 46 | #endif 47 | 48 | #include "include/capi/cef_base_capi.h" 49 | 50 | #ifdef __cplusplus 51 | extern "C" { 52 | #endif 53 | 54 | /// 55 | // Execute JavaScript with a user gesture to trigger functionality like 56 | // onbeforeunload handlers that will otherwise be blocked. 57 | /// 58 | CEF_EXPORT void cef_execute_java_script_with_user_gesture_for_tests( 59 | struct _cef_frame_t* frame, 60 | const cef_string_t* javascript); 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif // CEF_INCLUDE_CAPI_TEST_CEF_TEST_HELPERS_CAPI_H_ 67 | -------------------------------------------------------------------------------- /dep/cef/include/capi/views/cef_button_delegate_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=eb5e428e07fbad33c7da94735969b0ff4dd6fb9f$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/views/cef_view_delegate_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | struct _cef_button_t; 50 | 51 | /// 52 | // Implement this structure to handle Button events. The functions of this 53 | // structure will be called on the browser process UI thread unless otherwise 54 | // indicated. 55 | /// 56 | typedef struct _cef_button_delegate_t { 57 | /// 58 | // Base structure. 59 | /// 60 | cef_view_delegate_t base; 61 | 62 | /// 63 | // Called when |button| is pressed. 64 | /// 65 | void(CEF_CALLBACK* on_button_pressed)(struct _cef_button_delegate_t* self, 66 | struct _cef_button_t* button); 67 | 68 | /// 69 | // Called when the state of |button| changes. 70 | /// 71 | void(CEF_CALLBACK* on_button_state_changed)( 72 | struct _cef_button_delegate_t* self, 73 | struct _cef_button_t* button); 74 | } cef_button_delegate_t; 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_ 81 | -------------------------------------------------------------------------------- /dep/cef/include/capi/views/cef_fill_layout_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=32d7f76955b00935902e954344c76efe864eabf4$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/views/cef_layout_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /// 50 | // A simple Layout that causes the associated Panel's one child to be sized to 51 | // match the bounds of its parent. Methods must be called on the browser process 52 | // UI thread unless otherwise indicated. 53 | /// 54 | typedef struct _cef_fill_layout_t { 55 | /// 56 | // Base structure. 57 | /// 58 | cef_layout_t base; 59 | } cef_fill_layout_t; 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_ 66 | -------------------------------------------------------------------------------- /dep/cef/include/capi/views/cef_menu_button_delegate_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=a2b3912f8188f19f3d5109aec1b1d03227e31429$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/views/cef_button_delegate_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | struct _cef_menu_button_t; 50 | 51 | /// 52 | // Implement this structure to handle MenuButton events. The functions of this 53 | // structure will be called on the browser process UI thread unless otherwise 54 | // indicated. 55 | /// 56 | typedef struct _cef_menu_button_delegate_t { 57 | /// 58 | // Base structure. 59 | /// 60 | cef_button_delegate_t base; 61 | 62 | /// 63 | // Called when |button| is pressed. Call cef_menu_button_t::show_menu() to 64 | // show the resulting menu at |screen_point|. 65 | /// 66 | void(CEF_CALLBACK* on_menu_button_pressed)( 67 | struct _cef_menu_button_delegate_t* self, 68 | struct _cef_menu_button_t* menu_button, 69 | const cef_point_t* screen_point); 70 | } cef_menu_button_delegate_t; 71 | 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | 76 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_ 77 | -------------------------------------------------------------------------------- /dep/cef/include/capi/views/cef_panel_delegate_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // This file was generated by the CEF translator tool and should not edited 33 | // by hand. See the translator.README.txt file in the tools directory for 34 | // more information. 35 | // 36 | // $hash=c3aac051e19d368c3c7e415fcb160abb83060011$ 37 | // 38 | 39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_ 40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_ 41 | #pragma once 42 | 43 | #include "include/capi/views/cef_view_delegate_capi.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /// 50 | // Implement this structure to handle Panel events. The functions of this 51 | // structure will be called on the browser process UI thread unless otherwise 52 | // indicated. 53 | /// 54 | typedef struct _cef_panel_delegate_t { 55 | /// 56 | // Base structure. 57 | /// 58 | cef_view_delegate_t base; 59 | } cef_panel_delegate_t; 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_ 66 | -------------------------------------------------------------------------------- /dep/cef/include/cef_accessibility_handler.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_ACCESSIBILITY_HANDLER_H_ 38 | #define CEF_INCLUDE_CEF_ACCESSIBILITY_HANDLER_H_ 39 | #pragma once 40 | 41 | #include "include/cef_values.h" 42 | 43 | /// 44 | // Implement this interface to receive accessibility notification when 45 | // accessibility events have been registered. The methods of this class will 46 | // be called on the UI thread. 47 | /// 48 | /*--cef(source=client)--*/ 49 | class CefAccessibilityHandler : public virtual CefBaseRefCounted { 50 | public: 51 | /// 52 | // Called after renderer process sends accessibility tree changes to the 53 | // browser process. 54 | /// 55 | /*--cef()--*/ 56 | virtual void OnAccessibilityTreeChange(CefRefPtr value) = 0; 57 | 58 | /// 59 | // Called after renderer process sends accessibility location changes to the 60 | // browser process. 61 | /// 62 | /*--cef()--*/ 63 | virtual void OnAccessibilityLocationChange(CefRefPtr value) = 0; 64 | }; 65 | 66 | #endif // CEF_INCLUDE_CEF_ACCESSIBILITY_HANDLER_H_ 67 | -------------------------------------------------------------------------------- /dep/cef/include/cef_auth_callback.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_AUTH_CALLBACK_H_ 38 | #define CEF_INCLUDE_CEF_AUTH_CALLBACK_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | 43 | /// 44 | // Callback interface used for asynchronous continuation of authentication 45 | // requests. 46 | /// 47 | /*--cef(source=library)--*/ 48 | class CefAuthCallback : public virtual CefBaseRefCounted { 49 | public: 50 | /// 51 | // Continue the authentication request. 52 | /// 53 | /*--cef(capi_name=cont,optional_param=password)--*/ 54 | virtual void Continue(const CefString& username, 55 | const CefString& password) = 0; 56 | 57 | /// 58 | // Cancel the authentication request. 59 | /// 60 | /*--cef()--*/ 61 | virtual void Cancel() = 0; 62 | }; 63 | 64 | #endif // CEF_INCLUDE_CEF_AUTH_CALLBACK_H_ 65 | -------------------------------------------------------------------------------- /dep/cef/include/cef_callback.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_CALLBACK_H_ 38 | #define CEF_INCLUDE_CEF_CALLBACK_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | 43 | /// 44 | // Generic callback interface used for asynchronous continuation. 45 | /// 46 | /*--cef(source=library)--*/ 47 | class CefCallback : public virtual CefBaseRefCounted { 48 | public: 49 | /// 50 | // Continue processing. 51 | /// 52 | /*--cef(capi_name=cont)--*/ 53 | virtual void Continue() = 0; 54 | 55 | /// 56 | // Cancel processing. 57 | /// 58 | /*--cef()--*/ 59 | virtual void Cancel() = 0; 60 | }; 61 | 62 | /// 63 | // Generic callback interface used for asynchronous completion. 64 | /// 65 | /*--cef(source=client)--*/ 66 | class CefCompletionCallback : public virtual CefBaseRefCounted { 67 | public: 68 | /// 69 | // Method that will be called once the task is complete. 70 | /// 71 | /*--cef()--*/ 72 | virtual void OnComplete() = 0; 73 | }; 74 | 75 | #endif // CEF_INCLUDE_CEF_CALLBACK_H_ 76 | -------------------------------------------------------------------------------- /dep/cef/include/cef_geolocation.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_GEOLOCATION_H_ 38 | #define CEF_INCLUDE_CEF_GEOLOCATION_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | 43 | /// 44 | // Implement this interface to receive geolocation updates. The methods of this 45 | // class will be called on the browser process UI thread. 46 | /// 47 | /*--cef(source=client)--*/ 48 | class CefGetGeolocationCallback : public virtual CefBaseRefCounted { 49 | public: 50 | /// 51 | // Called with the 'best available' location information or, if the location 52 | // update failed, with error information. 53 | /// 54 | /*--cef()--*/ 55 | virtual void OnLocationUpdate(const CefGeoposition& position) = 0; 56 | }; 57 | 58 | /// 59 | // Request a one-time geolocation update. This function bypasses any user 60 | // permission checks so should only be used by code that is allowed to access 61 | // location information. 62 | /// 63 | /*--cef()--*/ 64 | bool CefGetGeolocation(CefRefPtr callback); 65 | 66 | #endif // CEF_INCLUDE_CEF_GEOLOCATION_H_ 67 | -------------------------------------------------------------------------------- /dep/cef/include/cef_path_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_PATH_UTIL_H_ 38 | #define CEF_INCLUDE_CEF_PATH_UTIL_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | 43 | typedef cef_path_key_t PathKey; 44 | 45 | /// 46 | // Retrieve the path associated with the specified |key|. Returns true on 47 | // success. Can be called on any thread in the browser process. 48 | /// 49 | /*--cef()--*/ 50 | bool CefGetPath(PathKey key, CefString& path); 51 | 52 | #endif // CEF_INCLUDE_CEF_PATH_UTIL_H_ 53 | -------------------------------------------------------------------------------- /dep/cef/include/cef_process_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_PROCESS_UTIL_H_ 38 | #define CEF_INCLUDE_CEF_PROCESS_UTIL_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | #include "include/cef_command_line.h" 43 | 44 | /// 45 | // Launches the process specified via |command_line|. Returns true upon 46 | // success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. 47 | // 48 | // Unix-specific notes: 49 | // - All file descriptors open in the parent process will be closed in the 50 | // child process except for stdin, stdout, and stderr. 51 | // - If the first argument on the command line does not contain a slash, 52 | // PATH will be searched. (See man execvp.) 53 | /// 54 | /*--cef()--*/ 55 | bool CefLaunchProcess(CefRefPtr command_line); 56 | 57 | #endif // CEF_INCLUDE_CEF_PROCESS_UTIL_H_ 58 | -------------------------------------------------------------------------------- /dep/cef/include/cef_ssl_info.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_SSL_INFO_H_ 38 | #define CEF_INCLUDE_CEF_SSL_INFO_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | #include "include/cef_values.h" 43 | 44 | #include "include/cef_x509_certificate.h" 45 | 46 | /// 47 | // Class representing SSL information. 48 | /// 49 | /*--cef(source=library)--*/ 50 | class CefSSLInfo : public virtual CefBaseRefCounted { 51 | public: 52 | /// 53 | // Returns a bitmask containing any and all problems verifying the server 54 | // certificate. 55 | /// 56 | /*--cef(default_retval=CERT_STATUS_NONE)--*/ 57 | virtual cef_cert_status_t GetCertStatus() = 0; 58 | 59 | /// 60 | // Returns the X.509 certificate. 61 | /// 62 | /*--cef()--*/ 63 | virtual CefRefPtr GetX509Certificate() = 0; 64 | }; 65 | 66 | /// 67 | // Returns true if the certificate status has any error, major or minor. 68 | /// 69 | /*--cef()--*/ 70 | bool CefIsCertStatusError(cef_cert_status_t status); 71 | 72 | /// 73 | // Returns true if the certificate status represents only minor errors 74 | // (e.g. failure to verify certificate revocation). 75 | /// 76 | /*--cef()--*/ 77 | bool CefIsCertStatusMinorError(cef_cert_status_t status); 78 | 79 | #endif // CEF_INCLUDE_CEF_SSL_INFO_H_ 80 | -------------------------------------------------------------------------------- /dep/cef/include/cef_string_visitor.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_STRING_VISITOR_H_ 38 | #define CEF_INCLUDE_CEF_STRING_VISITOR_H_ 39 | 40 | #include "include/cef_base.h" 41 | 42 | /// 43 | // Implement this interface to receive string values asynchronously. 44 | /// 45 | /*--cef(source=client)--*/ 46 | class CefStringVisitor : public virtual CefBaseRefCounted { 47 | public: 48 | /// 49 | // Method that will be executed. 50 | /// 51 | /*--cef(optional_param=string)--*/ 52 | virtual void Visit(const CefString& string) = 0; 53 | }; 54 | 55 | #endif // CEF_INCLUDE_CEF_STRING_VISITOR_H_ 56 | -------------------------------------------------------------------------------- /dep/cef/include/internal/cef_export.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights 2 | // reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the name Chromium Embedded 15 | // Framework nor the names of its contributors may be used to endorse 16 | // or promote products derived from this software without specific prior 17 | // written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 32 | #define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 33 | #pragma once 34 | 35 | #include "include/base/cef_build.h" 36 | 37 | #if defined(COMPILER_MSVC) 38 | 39 | #ifdef BUILDING_CEF_SHARED 40 | #define CEF_EXPORT __declspec(dllexport) 41 | #elif USING_CEF_SHARED 42 | #define CEF_EXPORT __declspec(dllimport) 43 | #else 44 | #define CEF_EXPORT 45 | #endif 46 | 47 | #elif defined(COMPILER_GCC) 48 | 49 | #define CEF_EXPORT __attribute__((visibility("default"))) 50 | 51 | #endif // COMPILER_GCC 52 | 53 | #if defined(OS_WIN) 54 | #define CEF_CALLBACK __stdcall 55 | #else 56 | #define CEF_CALLBACK 57 | #endif 58 | 59 | #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 60 | -------------------------------------------------------------------------------- /dep/cef/include/internal/cef_logging_internal.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_ 31 | #define CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_ 32 | #pragma once 33 | 34 | #include 35 | 36 | #include "include/internal/cef_export.h" 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | // See include/base/cef_logging.h for macros and intended usage. 43 | 44 | /// 45 | // Gets the current log level. 46 | /// 47 | CEF_EXPORT int cef_get_min_log_level(); 48 | 49 | /// 50 | // Gets the current vlog level for the given file (usually taken from 51 | // __FILE__). Note that |N| is the size *with* the null terminator. 52 | /// 53 | CEF_EXPORT int cef_get_vlog_level(const char* file_start, size_t N); 54 | 55 | /// 56 | // Add a log message. See the LogSeverity defines for supported |severity| 57 | // values. 58 | /// 59 | CEF_EXPORT void cef_log(const char* file, 60 | int line, 61 | int severity, 62 | const char* message); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif // __cplusplus 67 | 68 | #endif // CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_ 69 | -------------------------------------------------------------------------------- /dep/cef/include/internal/cef_thread_internal.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_ 31 | #define CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_ 32 | #pragma once 33 | 34 | #if defined(OS_WIN) 35 | #include 36 | #elif defined(OS_POSIX) 37 | #include 38 | #include 39 | #endif 40 | 41 | #include "include/internal/cef_export.h" 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | #if defined(OS_WIN) 48 | typedef DWORD cef_platform_thread_id_t; 49 | #define kInvalidPlatformThreadId 0U 50 | #elif defined(OS_POSIX) 51 | typedef pid_t cef_platform_thread_id_t; 52 | #define kInvalidPlatformThreadId 0 53 | #endif 54 | 55 | /// 56 | // Returns the current platform thread ID. 57 | /// 58 | CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id(); 59 | 60 | #if defined(OS_WIN) 61 | typedef DWORD cef_platform_thread_handle_t; 62 | #define kInvalidPlatformThreadHandle 0U 63 | #elif defined(OS_POSIX) 64 | typedef pthread_t cef_platform_thread_handle_t; 65 | #define kInvalidPlatformThreadHandle 0 66 | #endif 67 | 68 | /// 69 | // Returns the current platform thread handle. 70 | /// 71 | CEF_EXPORT cef_platform_thread_handle_t 72 | cef_get_current_platform_thread_handle(); 73 | 74 | #ifdef __cplusplus 75 | } 76 | #endif // __cplusplus 77 | 78 | #endif // CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_ 79 | -------------------------------------------------------------------------------- /dep/cef/include/test/cef_test_helpers.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | // THIS FILE IS FOR TESTING PURPOSES ONLY. 37 | // 38 | // The APIs defined in this file are for testing purposes only. They should only 39 | // be included from unit test targets. 40 | // 41 | 42 | #ifndef CEF_INCLUDE_TEST_CEF_TEST_HELPERS_H_ 43 | #define CEF_INCLUDE_TEST_CEF_TEST_HELPERS_H_ 44 | #pragma once 45 | 46 | #if !defined(BUILDING_CEF_SHARED) && !defined(WRAPPING_CEF_SHARED) && \ 47 | !defined(UNIT_TEST) 48 | #error This file can be included for unit tests only 49 | #endif 50 | 51 | #include "include/cef_frame.h" 52 | 53 | /// 54 | // Execute JavaScript with a user gesture to trigger functionality like 55 | // onbeforeunload handlers that will otherwise be blocked. 56 | /// 57 | /*--cef(optional_param=javascript)--*/ 58 | void CefExecuteJavaScriptWithUserGestureForTests(CefRefPtr frame, 59 | const CefString& javascript); 60 | 61 | #endif // CEF_INCLUDE_TEST_CEF_TEST_HELPERS_H_ 62 | -------------------------------------------------------------------------------- /dep/cef/include/views/cef_button_delegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_ 38 | #define CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_ 39 | #pragma once 40 | 41 | #include "include/views/cef_view_delegate.h" 42 | 43 | class CefButton; 44 | 45 | /// 46 | // Implement this interface to handle Button events. The methods of this class 47 | // will be called on the browser process UI thread unless otherwise indicated. 48 | /// 49 | /*--cef(source=client)--*/ 50 | class CefButtonDelegate : public CefViewDelegate { 51 | public: 52 | /// 53 | // Called when |button| is pressed. 54 | /// 55 | /*--cef()--*/ 56 | virtual void OnButtonPressed(CefRefPtr button) = 0; 57 | 58 | /// 59 | // Called when the state of |button| changes. 60 | /// 61 | /*--cef()--*/ 62 | virtual void OnButtonStateChanged(CefRefPtr button){}; 63 | }; 64 | 65 | #endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_ 66 | -------------------------------------------------------------------------------- /dep/cef/include/views/cef_fill_layout.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_ 38 | #define CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_ 39 | #pragma once 40 | 41 | #include "include/views/cef_layout.h" 42 | 43 | /// 44 | // A simple Layout that causes the associated Panel's one child to be sized to 45 | // match the bounds of its parent. Methods must be called on the browser process 46 | // UI thread unless otherwise indicated. 47 | /// 48 | /*--cef(source=library)--*/ 49 | class CefFillLayout : public CefLayout {}; 50 | 51 | #endif // CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_ 52 | -------------------------------------------------------------------------------- /dep/cef/include/views/cef_layout.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_ 38 | #define CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | 43 | class CefBoxLayout; 44 | class CefFillLayout; 45 | 46 | /// 47 | // A Layout handles the sizing of the children of a Panel according to 48 | // implementation-specific heuristics. Methods must be called on the browser 49 | // process UI thread unless otherwise indicated. 50 | /// 51 | /*--cef(source=library)--*/ 52 | class CefLayout : public CefBaseRefCounted { 53 | public: 54 | /// 55 | // Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout. 56 | /// 57 | /*--cef()--*/ 58 | virtual CefRefPtr AsBoxLayout() = 0; 59 | 60 | /// 61 | // Returns this Layout as a FillLayout or NULL if this is not a FillLayout. 62 | /// 63 | /*--cef()--*/ 64 | virtual CefRefPtr AsFillLayout() = 0; 65 | 66 | /// 67 | // Returns true if this Layout is valid. 68 | /// 69 | /*--cef()--*/ 70 | virtual bool IsValid() = 0; 71 | }; 72 | 73 | #endif // CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_ 74 | -------------------------------------------------------------------------------- /dep/cef/include/views/cef_menu_button_delegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_ 38 | #define CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_ 39 | #pragma once 40 | 41 | #include "include/views/cef_button_delegate.h" 42 | 43 | class CefMenuButton; 44 | 45 | /// 46 | // Implement this interface to handle MenuButton events. The methods of this 47 | // class will be called on the browser process UI thread unless otherwise 48 | // indicated. 49 | /// 50 | /*--cef(source=client)--*/ 51 | class CefMenuButtonDelegate : public CefButtonDelegate { 52 | public: 53 | /// 54 | // Called when |button| is pressed. Call CefMenuButton::ShowMenu() to show the 55 | // resulting menu at |screen_point|. 56 | /// 57 | /*--cef()--*/ 58 | virtual void OnMenuButtonPressed(CefRefPtr menu_button, 59 | const CefPoint& screen_point) = 0; 60 | }; 61 | 62 | #endif // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_ 63 | -------------------------------------------------------------------------------- /dep/cef/include/views/cef_panel_delegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_ 38 | #define CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_ 39 | #pragma once 40 | 41 | #include "include/views/cef_view_delegate.h" 42 | 43 | /// 44 | // Implement this interface to handle Panel events. The methods of this class 45 | // will be called on the browser process UI thread unless otherwise indicated. 46 | /// 47 | /*--cef(source=client)--*/ 48 | class CefPanelDelegate : public CefViewDelegate {}; 49 | 50 | #endif // CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_ 51 | -------------------------------------------------------------------------------- /dep/cef/include/views/cef_textfield_delegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_ 38 | #define CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_ 39 | #pragma once 40 | 41 | #include "include/views/cef_view_delegate.h" 42 | 43 | class CefTextfield; 44 | 45 | /// 46 | // Implement this interface to handle Textfield events. The methods of this 47 | // class will be called on the browser process UI thread unless otherwise 48 | // indicated. 49 | /// 50 | /*--cef(source=client)--*/ 51 | class CefTextfieldDelegate : public CefViewDelegate { 52 | public: 53 | /// 54 | // Called when |textfield| recieves a keyboard event. |event| contains 55 | // information about the keyboard event. Return true if the keyboard event was 56 | // handled or false otherwise for default handling. 57 | /// 58 | /*--cef()--*/ 59 | virtual bool OnKeyEvent(CefRefPtr textfield, 60 | const CefKeyEvent& event) { 61 | return false; 62 | } 63 | 64 | /// 65 | // Called after performing a user action that may change |textfield|. 66 | /// 67 | /*--cef()--*/ 68 | virtual void OnAfterUserAction(CefRefPtr textfield) {} 69 | }; 70 | 71 | #endif // CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_ 72 | -------------------------------------------------------------------------------- /dep/cef/libcef.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/dep/cef/libcef.lib -------------------------------------------------------------------------------- /dep/cef/x64/libcef.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/dep/cef/x64/libcef.lib -------------------------------------------------------------------------------- /dep/lua-5.1.5/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Lua License 2 | ----------- 3 | 4 | Lua is licensed under the terms of the MIT license reproduced below. 5 | This means that Lua is free software and can be used for both academic 6 | and commercial purposes at absolutely no cost. 7 | 8 | For details and rationale, see http://www.lua.org/license.html . 9 | 10 | =============================================================================== 11 | 12 | Copyright (C) 1994-2012 Lua.org, PUC-Rio. 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | THE SOFTWARE. 31 | 32 | =============================================================================== 33 | 34 | (end of COPYRIGHT) 35 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/README: -------------------------------------------------------------------------------- 1 | README for Lua 5.1 2 | 3 | See INSTALL for installation instructions. 4 | See HISTORY for a summary of changes since the last released version. 5 | 6 | * What is Lua? 7 | ------------ 8 | Lua is a powerful, light-weight programming language designed for extending 9 | applications. Lua is also frequently used as a general-purpose, stand-alone 10 | language. Lua is free software. 11 | 12 | For complete information, visit Lua's web site at http://www.lua.org/ . 13 | For an executive summary, see http://www.lua.org/about.html . 14 | 15 | Lua has been used in many different projects around the world. 16 | For a short list, see http://www.lua.org/uses.html . 17 | 18 | * Availability 19 | ------------ 20 | Lua is freely available for both academic and commercial purposes. 21 | See COPYRIGHT and http://www.lua.org/license.html for details. 22 | Lua can be downloaded at http://www.lua.org/download.html . 23 | 24 | * Installation 25 | ------------ 26 | Lua is implemented in pure ANSI C, and compiles unmodified in all known 27 | platforms that have an ANSI C compiler. In most Unix-like platforms, simply 28 | do "make" with a suitable target. See INSTALL for detailed instructions. 29 | 30 | * Origin 31 | ------ 32 | Lua is developed at Lua.org, a laboratory of the Department of Computer 33 | Science of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro 34 | in Brazil). 35 | For more information about the authors, see http://www.lua.org/authors.html . 36 | 37 | (end of README) 38 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/lua51.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/dep/lua-5.1.5/lua51.lib -------------------------------------------------------------------------------- /dep/lua-5.1.5/lua51_x64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/dep/lua-5.1.5/lua51_x64.lib -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.2.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lcode.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lcode.h,v 1.48.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Code generator for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lcode_h 8 | #define lcode_h 9 | 10 | #include "llex.h" 11 | #include "lobject.h" 12 | #include "lopcodes.h" 13 | #include "lparser.h" 14 | 15 | 16 | /* 17 | ** Marks the end of a patch list. It is an invalid value both as an absolute 18 | ** address, and as a list link (would link an element to itself). 19 | */ 20 | #define NO_JUMP (-1) 21 | 22 | 23 | /* 24 | ** grep "ORDER OPR" if you change these enums 25 | */ 26 | typedef enum BinOpr { 27 | OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, 28 | OPR_CONCAT, 29 | OPR_NE, OPR_EQ, 30 | OPR_LT, OPR_LE, OPR_GT, OPR_GE, 31 | OPR_AND, OPR_OR, 32 | OPR_NOBINOPR 33 | } BinOpr; 34 | 35 | 36 | typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; 37 | 38 | 39 | #define getcode(fs,e) ((fs)->f->code[(e)->u.s.info]) 40 | 41 | #define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) 42 | 43 | #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) 44 | 45 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); 46 | LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); 47 | LUAI_FUNC void luaK_fixline (FuncState *fs, int line); 48 | LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); 49 | LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); 50 | LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); 51 | LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); 52 | LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r); 53 | LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e); 54 | LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e); 55 | LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e); 56 | LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e); 57 | LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); 58 | LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); 59 | LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); 60 | LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); 61 | LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); 62 | LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); 63 | LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); 64 | LUAI_FUNC int luaK_jump (FuncState *fs); 65 | LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret); 66 | LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); 67 | LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); 68 | LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); 69 | LUAI_FUNC int luaK_getlabel (FuncState *fs); 70 | LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v); 71 | LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); 72 | LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, expdesc *v2); 73 | LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); 74 | 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.3.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2); 24 | LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, 25 | const TValue *p2); 26 | LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, 27 | const TValue *p2); 28 | LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...); 29 | LUAI_FUNC void luaG_errormsg (lua_State *L); 30 | LUAI_FUNC int luaG_checkcode (const Proto *pt); 31 | LUAI_FUNC int luaG_checkopenop (Instruction i); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/ldo.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldo.h,v 2.7.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Stack and Call structure of Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldo_h 8 | #define ldo_h 9 | 10 | 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | #include "lzio.h" 14 | 15 | 16 | #define luaD_checkstack(L,n) \ 17 | if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TValue)) \ 18 | luaD_growstack(L, n); \ 19 | else condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); 20 | 21 | 22 | #define incr_top(L) {luaD_checkstack(L,1); L->top++;} 23 | 24 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) 25 | #define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) 26 | 27 | #define saveci(L,p) ((char *)(p) - (char *)L->base_ci) 28 | #define restoreci(L,n) ((CallInfo *)((char *)L->base_ci + (n))) 29 | 30 | 31 | /* results from luaD_precall */ 32 | #define PCRLUA 0 /* initiated a call to a Lua function */ 33 | #define PCRC 1 /* did a call to a C function */ 34 | #define PCRYIELD 2 /* C funtion yielded */ 35 | 36 | 37 | /* type of protected functions, to be ran by `runprotected' */ 38 | typedef void (*Pfunc) (lua_State *L, void *ud); 39 | 40 | LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name); 41 | LUAI_FUNC void luaD_callhook (lua_State *L, int event, int line); 42 | LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); 43 | LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); 44 | LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, 45 | ptrdiff_t oldtop, ptrdiff_t ef); 46 | LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); 47 | LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); 48 | LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); 49 | LUAI_FUNC void luaD_growstack (lua_State *L, int n); 50 | 51 | LUAI_FUNC void luaD_throw (lua_State *L, int errcode); 52 | LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); 53 | 54 | LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop); 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 2.4.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); 23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); 24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); 25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 27 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 28 | LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c); 29 | LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); 30 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 31 | int pc); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Initialization of libraries for lua.c 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #define linit_c 9 | #define LUA_LIB 10 | 11 | #include "lua.h" 12 | 13 | #include "lualib.h" 14 | #include "lauxlib.h" 15 | 16 | 17 | static const luaL_Reg lualibs[] = { 18 | {"", luaopen_base}, 19 | {LUA_LOADLIBNAME, luaopen_package}, 20 | {LUA_TABLIBNAME, luaopen_table}, 21 | {LUA_IOLIBNAME, luaopen_io}, 22 | {LUA_OSLIBNAME, luaopen_os}, 23 | {LUA_STRLIBNAME, luaopen_string}, 24 | {LUA_MATHLIBNAME, luaopen_math}, 25 | {LUA_DBLIBNAME, luaopen_debug}, 26 | {NULL, NULL} 27 | }; 28 | 29 | 30 | LUALIB_API void luaL_openlibs (lua_State *L) { 31 | const luaL_Reg *lib = lualibs; 32 | for (; lib->func; lib++) { 33 | lua_pushcfunction(L, lib->func); 34 | lua_pushstring(L, lib->name); 35 | lua_call(L, 1, 0); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/llex.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: llex.h,v 1.58.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lexical Analyzer 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef llex_h 8 | #define llex_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | 14 | #define FIRST_RESERVED 257 15 | 16 | /* maximum length of a reserved word */ 17 | #define TOKEN_LEN (sizeof("function")/sizeof(char)) 18 | 19 | 20 | /* 21 | * WARNING: if you change the order of this enumeration, 22 | * grep "ORDER RESERVED" 23 | */ 24 | enum RESERVED { 25 | /* terminal symbols denoted by reserved words */ 26 | TK_AND = FIRST_RESERVED, TK_BREAK, 27 | TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, 28 | TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, 29 | TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, 30 | /* other terminal symbols */ 31 | TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_NUMBER, 32 | TK_NAME, TK_STRING, TK_EOS 33 | }; 34 | 35 | /* number of reserved words */ 36 | #define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) 37 | 38 | 39 | /* array with token `names' */ 40 | LUAI_DATA const char *const luaX_tokens []; 41 | 42 | 43 | typedef union { 44 | lua_Number r; 45 | TString *ts; 46 | } SemInfo; /* semantics information */ 47 | 48 | 49 | typedef struct Token { 50 | int token; 51 | SemInfo seminfo; 52 | } Token; 53 | 54 | 55 | typedef struct LexState { 56 | int current; /* current character (charint) */ 57 | int linenumber; /* input line counter */ 58 | int lastline; /* line of last token `consumed' */ 59 | Token t; /* current token */ 60 | Token lookahead; /* look ahead token */ 61 | struct FuncState *fs; /* `FuncState' is private to the parser */ 62 | struct lua_State *L; 63 | ZIO *z; /* input stream */ 64 | Mbuffer *buff; /* buffer for tokens */ 65 | TString *source; /* current source name */ 66 | char decpoint; /* locale decimal point */ 67 | } LexState; 68 | 69 | 70 | LUAI_FUNC void luaX_init (lua_State *L); 71 | LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, 72 | TString *source); 73 | LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); 74 | LUAI_FUNC void luaX_next (LexState *ls); 75 | LUAI_FUNC void luaX_lookahead (LexState *ls); 76 | LUAI_FUNC void luaX_lexerror (LexState *ls, const char *msg, int token); 77 | LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s); 78 | LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); 79 | 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/llimits.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: llimits.h,v 1.69.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Limits, basic types, and some other `installation-dependent' definitions 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef llimits_h 8 | #define llimits_h 9 | 10 | 11 | #include 12 | #include 13 | 14 | 15 | #include "lua.h" 16 | 17 | 18 | typedef LUAI_UINT32 lu_int32; 19 | 20 | typedef LUAI_UMEM lu_mem; 21 | 22 | typedef LUAI_MEM l_mem; 23 | 24 | 25 | 26 | /* chars used as small naturals (so that `char' is reserved for characters) */ 27 | typedef unsigned char lu_byte; 28 | 29 | 30 | #define MAX_SIZET ((size_t)(~(size_t)0)-2) 31 | 32 | #define MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2) 33 | 34 | 35 | #define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ 36 | 37 | /* 38 | ** conversion of pointer to integer 39 | ** this is for hashing only; there is no problem if the integer 40 | ** cannot hold the whole pointer value 41 | */ 42 | #define IntPoint(p) ((unsigned int)(lu_mem)(p)) 43 | 44 | 45 | 46 | /* type to ensure maximum alignment */ 47 | typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; 48 | 49 | 50 | /* result of a `usual argument conversion' over lua_Number */ 51 | typedef LUAI_UACNUMBER l_uacNumber; 52 | 53 | 54 | /* internal assertions for in-house debugging */ 55 | #ifdef lua_assert 56 | 57 | #define check_exp(c,e) (lua_assert(c), (e)) 58 | #define api_check(l,e) lua_assert(e) 59 | 60 | #else 61 | 62 | #define lua_assert(c) ((void)0) 63 | #define check_exp(c,e) (e) 64 | #define api_check luai_apicheck 65 | 66 | #endif 67 | 68 | 69 | #ifndef UNUSED 70 | #define UNUSED(x) ((void)(x)) /* to avoid warnings */ 71 | #endif 72 | 73 | 74 | #ifndef cast 75 | #define cast(t, exp) ((t)(exp)) 76 | #endif 77 | 78 | #define cast_byte(i) cast(lu_byte, (i)) 79 | #define cast_num(i) cast(lua_Number, (i)) 80 | #define cast_int(i) cast(int, (i)) 81 | 82 | 83 | 84 | /* 85 | ** type for virtual-machine instructions 86 | ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) 87 | */ 88 | typedef lu_int32 Instruction; 89 | 90 | 91 | 92 | /* maximum stack for a Lua function */ 93 | #define MAXSTACK 250 94 | 95 | 96 | 97 | /* minimum size for the string table (must be power of 2) */ 98 | #ifndef MINSTRTABSIZE 99 | #define MINSTRTABSIZE 32 100 | #endif 101 | 102 | 103 | /* minimum size for string buffer */ 104 | #ifndef LUA_MINBUFFER 105 | #define LUA_MINBUFFER 32 106 | #endif 107 | 108 | 109 | #ifndef lua_lock 110 | #define lua_lock(L) ((void) 0) 111 | #define lua_unlock(L) ((void) 0) 112 | #endif 113 | 114 | #ifndef luai_threadyield 115 | #define luai_threadyield(L) {lua_unlock(L); lua_lock(L);} 116 | #endif 117 | 118 | 119 | /* 120 | ** macro to control inclusion of some hard tests on stack reallocation 121 | */ 122 | #ifndef HARDSTACKTESTS 123 | #define condhardstacktests(x) ((void)0) 124 | #else 125 | #define condhardstacktests(x) x 126 | #endif 127 | 128 | #endif 129 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lmem.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.c,v 1.70.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lmem_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "ldebug.h" 16 | #include "ldo.h" 17 | #include "lmem.h" 18 | #include "lobject.h" 19 | #include "lstate.h" 20 | 21 | 22 | 23 | /* 24 | ** About the realloc function: 25 | ** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize); 26 | ** (`osize' is the old size, `nsize' is the new size) 27 | ** 28 | ** Lua ensures that (ptr == NULL) iff (osize == 0). 29 | ** 30 | ** * frealloc(ud, NULL, 0, x) creates a new block of size `x' 31 | ** 32 | ** * frealloc(ud, p, x, 0) frees the block `p' 33 | ** (in this specific case, frealloc must return NULL). 34 | ** particularly, frealloc(ud, NULL, 0, 0) does nothing 35 | ** (which is equivalent to free(NULL) in ANSI C) 36 | ** 37 | ** frealloc returns NULL if it cannot create or reallocate the area 38 | ** (any reallocation to an equal or smaller size cannot fail!) 39 | */ 40 | 41 | 42 | 43 | #define MINSIZEARRAY 4 44 | 45 | 46 | void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, 47 | int limit, const char *errormsg) { 48 | void *newblock; 49 | int newsize; 50 | if (*size >= limit/2) { /* cannot double it? */ 51 | if (*size >= limit) /* cannot grow even a little? */ 52 | luaG_runerror(L, errormsg); 53 | newsize = limit; /* still have at least one free place */ 54 | } 55 | else { 56 | newsize = (*size)*2; 57 | if (newsize < MINSIZEARRAY) 58 | newsize = MINSIZEARRAY; /* minimum size */ 59 | } 60 | newblock = luaM_reallocv(L, block, *size, newsize, size_elems); 61 | *size = newsize; /* update only when everything else is OK */ 62 | return newblock; 63 | } 64 | 65 | 66 | void *luaM_toobig (lua_State *L) { 67 | luaG_runerror(L, "memory allocation error: block too big"); 68 | return NULL; /* to avoid warnings */ 69 | } 70 | 71 | 72 | 73 | /* 74 | ** generic allocation routine. 75 | */ 76 | void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { 77 | global_State *g = G(L); 78 | lua_assert((osize == 0) == (block == NULL)); 79 | block = (*g->frealloc)(g->ud, block, osize, nsize); 80 | if (block == NULL && nsize > 0) 81 | luaD_throw(L, LUA_ERRMEM); 82 | lua_assert((nsize == 0) == (block == NULL)); 83 | g->totalbytes = (g->totalbytes - osize) + nsize; 84 | return block; 85 | } 86 | 87 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.h,v 1.31.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lmem_h 8 | #define lmem_h 9 | 10 | 11 | #include 12 | 13 | #include "llimits.h" 14 | #include "lua.h" 15 | 16 | #define MEMERRMSG "not enough memory" 17 | 18 | 19 | #define luaM_reallocv(L,b,on,n,e) \ 20 | ((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \ 21 | luaM_realloc_(L, (b), (on)*(e), (n)*(e)) : \ 22 | luaM_toobig(L)) 23 | 24 | #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) 25 | #define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) 26 | #define luaM_freearray(L, b, n, t) luaM_reallocv(L, (b), n, 0, sizeof(t)) 27 | 28 | #define luaM_malloc(L,t) luaM_realloc_(L, NULL, 0, (t)) 29 | #define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) 30 | #define luaM_newvector(L,n,t) \ 31 | cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) 32 | 33 | #define luaM_growvector(L,v,nelems,size,t,limit,e) \ 34 | if ((nelems)+1 > (size)) \ 35 | ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) 36 | 37 | #define luaM_reallocvector(L, v,oldn,n,t) \ 38 | ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) 39 | 40 | 41 | LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, 42 | size_t size); 43 | LUAI_FUNC void *luaM_toobig (lua_State *L); 44 | LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, 45 | size_t size_elem, int limit, 46 | const char *errormsg); 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lparser.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lparser.h,v 1.57.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua Parser 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lparser_h 8 | #define lparser_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* 16 | ** Expression descriptor 17 | */ 18 | 19 | typedef enum { 20 | VVOID, /* no value */ 21 | VNIL, 22 | VTRUE, 23 | VFALSE, 24 | VK, /* info = index of constant in `k' */ 25 | VKNUM, /* nval = numerical value */ 26 | VLOCAL, /* info = local register */ 27 | VUPVAL, /* info = index of upvalue in `upvalues' */ 28 | VGLOBAL, /* info = index of table; aux = index of global name in `k' */ 29 | VINDEXED, /* info = table register; aux = index register (or `k') */ 30 | VJMP, /* info = instruction pc */ 31 | VRELOCABLE, /* info = instruction pc */ 32 | VNONRELOC, /* info = result register */ 33 | VCALL, /* info = instruction pc */ 34 | VVARARG /* info = instruction pc */ 35 | } expkind; 36 | 37 | typedef struct expdesc { 38 | expkind k; 39 | union { 40 | struct { int info, aux; } s; 41 | lua_Number nval; 42 | } u; 43 | int t; /* patch list of `exit when true' */ 44 | int f; /* patch list of `exit when false' */ 45 | } expdesc; 46 | 47 | 48 | typedef struct upvaldesc { 49 | lu_byte k; 50 | lu_byte info; 51 | } upvaldesc; 52 | 53 | 54 | struct BlockCnt; /* defined in lparser.c */ 55 | 56 | 57 | /* state needed to generate code for a given function */ 58 | typedef struct FuncState { 59 | Proto *f; /* current function header */ 60 | Table *h; /* table to find (and reuse) elements in `k' */ 61 | struct FuncState *prev; /* enclosing function */ 62 | struct LexState *ls; /* lexical state */ 63 | struct lua_State *L; /* copy of the Lua state */ 64 | struct BlockCnt *bl; /* chain of current blocks */ 65 | int pc; /* next position to code (equivalent to `ncode') */ 66 | int lasttarget; /* `pc' of last `jump target' */ 67 | int jpc; /* list of pending jumps to `pc' */ 68 | int freereg; /* first free register */ 69 | int nk; /* number of elements in `k' */ 70 | int np; /* number of elements in `p' */ 71 | short nlocvars; /* number of elements in `locvars' */ 72 | lu_byte nactvar; /* number of active local variables */ 73 | upvaldesc upvalues[LUAI_MAXUPVALUES]; /* upvalues */ 74 | unsigned short actvar[LUAI_MAXVARS]; /* declared-variable stack */ 75 | } FuncState; 76 | 77 | 78 | LUAI_FUNC Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, 79 | const char *name); 80 | 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.43.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | 11 | #include "lgc.h" 12 | #include "lobject.h" 13 | #include "lstate.h" 14 | 15 | 16 | #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) 17 | 18 | #define sizeudata(u) (sizeof(union Udata)+(u)->len) 19 | 20 | #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 21 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 22 | (sizeof(s)/sizeof(char))-1)) 23 | 24 | #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) 25 | 26 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 27 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); 28 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/ltable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltable.h,v 2.10.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua tables (hash) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltable_h 8 | #define ltable_h 9 | 10 | #include "lobject.h" 11 | 12 | 13 | #define gnode(t,i) (&(t)->node[i]) 14 | #define gkey(n) (&(n)->i_key.nk) 15 | #define gval(n) (&(n)->i_val) 16 | #define gnext(n) ((n)->i_key.nk.next) 17 | 18 | #define key2tval(n) (&(n)->i_key.tvk) 19 | 20 | 21 | LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 22 | LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 23 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 24 | LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); 25 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 26 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 27 | LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); 28 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); 29 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); 30 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 31 | LUAI_FUNC int luaH_getn (Table *t); 32 | 33 | 34 | #if defined(LUA_DEBUG) 35 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 36 | LUAI_FUNC int luaH_isdummy (Node *n); 37 | #endif 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/ltm.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.c,v 2.8.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define ltm_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "lobject.h" 16 | #include "lstate.h" 17 | #include "lstring.h" 18 | #include "ltable.h" 19 | #include "ltm.h" 20 | 21 | 22 | 23 | const char *const luaT_typenames[] = { 24 | "nil", "boolean", "userdata", "number", 25 | "string", "table", "function", "userdata", "thread", 26 | "proto", "upval" 27 | }; 28 | 29 | 30 | void luaT_init (lua_State *L) { 31 | static const char *const luaT_eventname[] = { /* ORDER TM */ 32 | "__index", "__newindex", 33 | "__gc", "__mode", "__eq", 34 | "__add", "__sub", "__mul", "__div", "__mod", 35 | "__pow", "__unm", "__len", "__lt", "__le", 36 | "__concat", "__call" 37 | }; 38 | int i; 39 | for (i=0; itmname[i] = luaS_new(L, luaT_eventname[i]); 41 | luaS_fix(G(L)->tmname[i]); /* never collect these names */ 42 | } 43 | } 44 | 45 | 46 | /* 47 | ** function to be used with macro "fasttm": optimized for absence of 48 | ** tag methods 49 | */ 50 | const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { 51 | const TValue *tm = luaH_getstr(events, ename); 52 | lua_assert(event <= TM_EQ); 53 | if (ttisnil(tm)) { /* no tag method? */ 54 | events->flags |= cast_byte(1u<metatable; 66 | break; 67 | case LUA_TUSERDATA: 68 | mt = uvalue(o)->metatable; 69 | break; 70 | default: 71 | mt = G(L)->mt[ttype(o)]; 72 | } 73 | return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject); 74 | } 75 | 76 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.h,v 2.6.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_EQ, /* last tag method with `fast' access */ 24 | TM_ADD, 25 | TM_SUB, 26 | TM_MUL, 27 | TM_DIV, 28 | TM_MOD, 29 | TM_POW, 30 | TM_UNM, 31 | TM_LEN, 32 | TM_LT, 33 | TM_LE, 34 | TM_CONCAT, 35 | TM_CALL, 36 | TM_N /* number of elements in the enum */ 37 | } TMS; 38 | 39 | 40 | 41 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 42 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 43 | 44 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 45 | 46 | LUAI_DATA const char *const luaT_typenames[]; 47 | 48 | 49 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 50 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 51 | TMS event); 52 | LUAI_FUNC void luaT_init (lua_State *L); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.36.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* Key to file-handle type */ 15 | #define LUA_FILEHANDLE "FILE*" 16 | 17 | 18 | #define LUA_COLIBNAME "coroutine" 19 | LUALIB_API int (luaopen_base) (lua_State *L); 20 | 21 | #define LUA_TABLIBNAME "table" 22 | LUALIB_API int (luaopen_table) (lua_State *L); 23 | 24 | #define LUA_IOLIBNAME "io" 25 | LUALIB_API int (luaopen_io) (lua_State *L); 26 | 27 | #define LUA_OSLIBNAME "os" 28 | LUALIB_API int (luaopen_os) (lua_State *L); 29 | 30 | #define LUA_STRLIBNAME "string" 31 | LUALIB_API int (luaopen_string) (lua_State *L); 32 | 33 | #define LUA_MATHLIBNAME "math" 34 | LUALIB_API int (luaopen_math) (lua_State *L); 35 | 36 | #define LUA_DBLIBNAME "debug" 37 | LUALIB_API int (luaopen_debug) (lua_State *L); 38 | 39 | #define LUA_LOADLIBNAME "package" 40 | LUALIB_API int (luaopen_package) (lua_State *L); 41 | 42 | 43 | /* open all previous libraries */ 44 | LUALIB_API void (luaL_openlibs) (lua_State *L); 45 | 46 | 47 | 48 | #ifndef lua_assert 49 | #define lua_assert(x) ((void)0) 50 | #endif 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.37.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | /* load one chunk; from lundump.c */ 14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); 15 | 16 | /* make header; from lundump.c */ 17 | LUAI_FUNC void luaU_header (char* h); 18 | 19 | /* dump one chunk; from ldump.c */ 20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); 21 | 22 | #ifdef luac_c 23 | /* print one chunk; from print.c */ 24 | LUAI_FUNC void luaU_print (const Proto* f, int full); 25 | #endif 26 | 27 | /* for header of binary files -- this is Lua 5.1 */ 28 | #define LUAC_VERSION 0x51 29 | 30 | /* for header of binary files -- this is the official format */ 31 | #define LUAC_FORMAT 0 32 | 33 | /* size of header of binary files */ 34 | #define LUAC_HEADERSIZE 12 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lvm.h,v 2.5.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua virtual machine 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lvm_h 8 | #define lvm_h 9 | 10 | 11 | #include "ldo.h" 12 | #include "lobject.h" 13 | #include "ltm.h" 14 | 15 | 16 | #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) 17 | 18 | #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ 19 | (((o) = luaV_tonumber(o,n)) != NULL)) 20 | 21 | #define equalobj(L,o1,o2) \ 22 | (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2)) 23 | 24 | 25 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); 26 | LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2); 27 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); 28 | LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); 29 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, 30 | StkId val); 31 | LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, 32 | StkId val); 33 | LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls); 34 | LUAI_FUNC void luaV_concat (lua_State *L, int total, int last); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.c,v 1.31.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** a generic input stream interface 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lzio_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "llimits.h" 16 | #include "lmem.h" 17 | #include "lstate.h" 18 | #include "lzio.h" 19 | 20 | 21 | int luaZ_fill (ZIO *z) { 22 | size_t size; 23 | lua_State *L = z->L; 24 | const char *buff; 25 | lua_unlock(L); 26 | buff = z->reader(L, z->data, &size); 27 | lua_lock(L); 28 | if (buff == NULL || size == 0) return EOZ; 29 | z->n = size - 1; 30 | z->p = buff; 31 | return char2int(*(z->p++)); 32 | } 33 | 34 | 35 | int luaZ_lookahead (ZIO *z) { 36 | if (z->n == 0) { 37 | if (luaZ_fill(z) == EOZ) 38 | return EOZ; 39 | else { 40 | z->n++; /* luaZ_fill removed first byte; put back it */ 41 | z->p--; 42 | } 43 | } 44 | return char2int(*z->p); 45 | } 46 | 47 | 48 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 49 | z->L = L; 50 | z->reader = reader; 51 | z->data = data; 52 | z->n = 0; 53 | z->p = NULL; 54 | } 55 | 56 | 57 | /* --------------------------------------------------------------- read --- */ 58 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 59 | while (n) { 60 | size_t m; 61 | if (luaZ_lookahead(z) == EOZ) 62 | return n; /* return number of missing bytes */ 63 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 64 | memcpy(b, z->p, m); 65 | z->n -= m; 66 | z->p += m; 67 | b = (char *)b + m; 68 | n -= m; 69 | } 70 | return 0; 71 | } 72 | 73 | /* ------------------------------------------------------------------------ */ 74 | char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) { 75 | if (n > buff->buffsize) { 76 | if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; 77 | luaZ_resizebuffer(L, buff, n); 78 | } 79 | return buff->buffer; 80 | } 81 | 82 | 83 | -------------------------------------------------------------------------------- /dep/lua-5.1.5/src/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.21.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define char2int(c) cast(int, cast(unsigned char, (c))) 21 | 22 | #define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z)) 23 | 24 | typedef struct Mbuffer { 25 | char *buffer; 26 | size_t n; 27 | size_t buffsize; 28 | } Mbuffer; 29 | 30 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 31 | 32 | #define luaZ_buffer(buff) ((buff)->buffer) 33 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 34 | #define luaZ_bufflen(buff) ((buff)->n) 35 | 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | (luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \ 41 | (buff)->buffsize = size) 42 | 43 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 44 | 45 | 46 | LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 48 | void *data); 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ 50 | LUAI_FUNC int luaZ_lookahead (ZIO *z); 51 | 52 | 53 | 54 | /* --------- Private Part ------------------ */ 55 | 56 | struct Zio { 57 | size_t n; /* bytes still unread */ 58 | const char *p; /* current position in buffer */ 59 | lua_Reader reader; 60 | void* data; /* additional data */ 61 | lua_State *L; /* Lua state (for reader) */ 62 | }; 63 | 64 | 65 | LUAI_FUNC int luaZ_fill (ZIO *z); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/README: -------------------------------------------------------------------------------- 1 | 2 | This is Lua 5.2.4, released on 25 Feb 2015. 3 | 4 | For installation instructions, license details, and 5 | further information about Lua, see doc/readme.html. 6 | 7 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/lua52.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/dep/lua-5.2.4/lua52.lib -------------------------------------------------------------------------------- /dep/lua-5.2.4/lua52_x64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/dep/lua-5.2.4/lua52_x64.lib -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "llimits.h" 12 | #include "lstate.h" 13 | 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ 15 | "stack overflow");} 16 | 17 | #define adjustresults(L,nres) \ 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } 19 | 20 | #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ 21 | "not enough elements in the stack") 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lctype.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lctype.c,v 1.11.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** 'ctype' functions for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #define lctype_c 8 | #define LUA_CORE 9 | 10 | #include "lctype.h" 11 | 12 | #if !LUA_USE_CTYPE /* { */ 13 | 14 | #include 15 | 16 | LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = { 17 | 0x00, /* EOZ */ 18 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0. */ 19 | 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1. */ 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 22 | 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* 2. */ 23 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 24 | 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, /* 3. */ 25 | 0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 26 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 4. */ 27 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 28 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 5. */ 29 | 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x05, 30 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 6. */ 31 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 32 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 7. */ 33 | 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8. */ 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 36 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9. */ 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a. */ 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b. */ 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c. */ 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d. */ 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e. */ 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f. */ 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | }; 51 | 52 | #endif /* } */ 53 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lctype.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lctype.h,v 1.12.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** 'ctype' functions for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lctype_h 8 | #define lctype_h 9 | 10 | #include "lua.h" 11 | 12 | 13 | /* 14 | ** WARNING: the functions defined here do not necessarily correspond 15 | ** to the similar functions in the standard C ctype.h. They are 16 | ** optimized for the specific needs of Lua 17 | */ 18 | 19 | #if !defined(LUA_USE_CTYPE) 20 | 21 | #if 'A' == 65 && '0' == 48 22 | /* ASCII case: can use its own tables; faster and fixed */ 23 | #define LUA_USE_CTYPE 0 24 | #else 25 | /* must use standard C ctype */ 26 | #define LUA_USE_CTYPE 1 27 | #endif 28 | 29 | #endif 30 | 31 | 32 | #if !LUA_USE_CTYPE /* { */ 33 | 34 | #include 35 | 36 | #include "llimits.h" 37 | 38 | 39 | #define ALPHABIT 0 40 | #define DIGITBIT 1 41 | #define PRINTBIT 2 42 | #define SPACEBIT 3 43 | #define XDIGITBIT 4 44 | 45 | 46 | #define MASK(B) (1 << (B)) 47 | 48 | 49 | /* 50 | ** add 1 to char to allow index -1 (EOZ) 51 | */ 52 | #define testprop(c,p) (luai_ctype_[(c)+1] & (p)) 53 | 54 | /* 55 | ** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_' 56 | */ 57 | #define lislalpha(c) testprop(c, MASK(ALPHABIT)) 58 | #define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT))) 59 | #define lisdigit(c) testprop(c, MASK(DIGITBIT)) 60 | #define lisspace(c) testprop(c, MASK(SPACEBIT)) 61 | #define lisprint(c) testprop(c, MASK(PRINTBIT)) 62 | #define lisxdigit(c) testprop(c, MASK(XDIGITBIT)) 63 | 64 | /* 65 | ** this 'ltolower' only works for alphabetic characters 66 | */ 67 | #define ltolower(c) ((c) | ('A' ^ 'a')) 68 | 69 | 70 | /* two more entries for 0 and -1 (EOZ) */ 71 | LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2]; 72 | 73 | 74 | #else /* }{ */ 75 | 76 | /* 77 | ** use standard C ctypes 78 | */ 79 | 80 | #include 81 | 82 | 83 | #define lislalpha(c) (isalpha(c) || (c) == '_') 84 | #define lislalnum(c) (isalnum(c) || (c) == '_') 85 | #define lisdigit(c) (isdigit(c)) 86 | #define lisspace(c) (isspace(c)) 87 | #define lisprint(c) (isprint(c)) 88 | #define lisxdigit(c) (isxdigit(c)) 89 | 90 | #define ltolower(c) (tolower(c)) 91 | 92 | #endif /* } */ 93 | 94 | #endif 95 | 96 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | /* Active Lua function (given call info) */ 21 | #define ci_func(ci) (clLvalue((ci)->func)) 22 | 23 | 24 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 25 | const char *opname); 26 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2); 27 | LUAI_FUNC l_noret luaG_aritherror (lua_State *L, const TValue *p1, 28 | const TValue *p2); 29 | LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, 30 | const TValue *p2); 31 | LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); 32 | LUAI_FUNC l_noret luaG_errormsg (lua_State *L); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/ldo.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldo.h,v 2.20.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Stack and Call structure of Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldo_h 8 | #define ldo_h 9 | 10 | 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | #include "lzio.h" 14 | 15 | 16 | #define luaD_checkstack(L,n) if (L->stack_last - L->top <= (n)) \ 17 | luaD_growstack(L, n); else condmovestack(L); 18 | 19 | 20 | #define incr_top(L) {L->top++; luaD_checkstack(L,0);} 21 | 22 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) 23 | #define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) 24 | 25 | 26 | /* type of protected functions, to be ran by `runprotected' */ 27 | typedef void (*Pfunc) (lua_State *L, void *ud); 28 | 29 | LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, 30 | const char *mode); 31 | LUAI_FUNC void luaD_hook (lua_State *L, int event, int line); 32 | LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); 33 | LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults, 34 | int allowyield); 35 | LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, 36 | ptrdiff_t oldtop, ptrdiff_t ef); 37 | LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); 38 | LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); 39 | LUAI_FUNC void luaD_growstack (lua_State *L, int n); 40 | LUAI_FUNC void luaD_shrinkstack (lua_State *L); 41 | 42 | LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode); 43 | LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); 44 | 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 2.8.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems); 23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems); 24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); 25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 27 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 28 | LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); 29 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 30 | int pc); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: linit.c,v 1.32.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Initialization of libraries for lua.c and other clients 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | /* 9 | ** If you embed Lua in your program and need to open the standard 10 | ** libraries, call luaL_openlibs in your program. If you need a 11 | ** different set of libraries, copy this file to your project and edit 12 | ** it to suit your needs. 13 | */ 14 | 15 | 16 | #define linit_c 17 | #define LUA_LIB 18 | 19 | #include "lua.h" 20 | 21 | #include "lualib.h" 22 | #include "lauxlib.h" 23 | 24 | 25 | /* 26 | ** these libs are loaded by lua.c and are readily available to any Lua 27 | ** program 28 | */ 29 | static const luaL_Reg loadedlibs[] = { 30 | {"_G", luaopen_base}, 31 | {LUA_LOADLIBNAME, luaopen_package}, 32 | {LUA_COLIBNAME, luaopen_coroutine}, 33 | {LUA_TABLIBNAME, luaopen_table}, 34 | {LUA_IOLIBNAME, luaopen_io}, 35 | {LUA_OSLIBNAME, luaopen_os}, 36 | {LUA_STRLIBNAME, luaopen_string}, 37 | {LUA_BITLIBNAME, luaopen_bit32}, 38 | {LUA_MATHLIBNAME, luaopen_math}, 39 | {LUA_DBLIBNAME, luaopen_debug}, 40 | {NULL, NULL} 41 | }; 42 | 43 | 44 | /* 45 | ** these libs are preloaded and must be required before used 46 | */ 47 | static const luaL_Reg preloadedlibs[] = { 48 | {NULL, NULL} 49 | }; 50 | 51 | 52 | LUALIB_API void luaL_openlibs (lua_State *L) { 53 | const luaL_Reg *lib; 54 | /* call open functions from 'loadedlibs' and set results to global table */ 55 | for (lib = loadedlibs; lib->func; lib++) { 56 | luaL_requiref(L, lib->name, lib->func, 1); 57 | lua_pop(L, 1); /* remove lib */ 58 | } 59 | /* add open functions from 'preloadedlibs' into 'package.preload' table */ 60 | luaL_getsubtable(L, LUA_REGISTRYINDEX, "_PRELOAD"); 61 | for (lib = preloadedlibs; lib->func; lib++) { 62 | lua_pushcfunction(L, lib->func); 63 | lua_setfield(L, -2, lib->name); 64 | } 65 | lua_pop(L, 1); /* remove _PRELOAD table */ 66 | } 67 | 68 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/llex.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: llex.h,v 1.72.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Lexical Analyzer 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef llex_h 8 | #define llex_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | 14 | #define FIRST_RESERVED 257 15 | 16 | 17 | 18 | /* 19 | * WARNING: if you change the order of this enumeration, 20 | * grep "ORDER RESERVED" 21 | */ 22 | enum RESERVED { 23 | /* terminal symbols denoted by reserved words */ 24 | TK_AND = FIRST_RESERVED, TK_BREAK, 25 | TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, 26 | TK_GOTO, TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, 27 | TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, 28 | /* other terminal symbols */ 29 | TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_DBCOLON, TK_EOS, 30 | TK_NUMBER, TK_NAME, TK_STRING 31 | }; 32 | 33 | /* number of reserved words */ 34 | #define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) 35 | 36 | 37 | typedef union { 38 | lua_Number r; 39 | TString *ts; 40 | } SemInfo; /* semantics information */ 41 | 42 | 43 | typedef struct Token { 44 | int token; 45 | SemInfo seminfo; 46 | } Token; 47 | 48 | 49 | /* state of the lexer plus state of the parser when shared by all 50 | functions */ 51 | typedef struct LexState { 52 | int current; /* current character (charint) */ 53 | int linenumber; /* input line counter */ 54 | int lastline; /* line of last token `consumed' */ 55 | Token t; /* current token */ 56 | Token lookahead; /* look ahead token */ 57 | struct FuncState *fs; /* current function (parser) */ 58 | struct lua_State *L; 59 | ZIO *z; /* input stream */ 60 | Mbuffer *buff; /* buffer for tokens */ 61 | struct Dyndata *dyd; /* dynamic structures used by the parser */ 62 | TString *source; /* current source name */ 63 | TString *envn; /* environment variable name */ 64 | char decpoint; /* locale decimal point */ 65 | } LexState; 66 | 67 | 68 | LUAI_FUNC void luaX_init (lua_State *L); 69 | LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, 70 | TString *source, int firstchar); 71 | LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); 72 | LUAI_FUNC void luaX_next (LexState *ls); 73 | LUAI_FUNC int luaX_lookahead (LexState *ls); 74 | LUAI_FUNC l_noret luaX_syntaxerror (LexState *ls, const char *s); 75 | LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); 76 | 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lmem.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.c,v 1.84.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lmem_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "ldebug.h" 16 | #include "ldo.h" 17 | #include "lgc.h" 18 | #include "lmem.h" 19 | #include "lobject.h" 20 | #include "lstate.h" 21 | 22 | 23 | 24 | /* 25 | ** About the realloc function: 26 | ** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize); 27 | ** (`osize' is the old size, `nsize' is the new size) 28 | ** 29 | ** * frealloc(ud, NULL, x, s) creates a new block of size `s' (no 30 | ** matter 'x'). 31 | ** 32 | ** * frealloc(ud, p, x, 0) frees the block `p' 33 | ** (in this specific case, frealloc must return NULL); 34 | ** particularly, frealloc(ud, NULL, 0, 0) does nothing 35 | ** (which is equivalent to free(NULL) in ANSI C) 36 | ** 37 | ** frealloc returns NULL if it cannot create or reallocate the area 38 | ** (any reallocation to an equal or smaller size cannot fail!) 39 | */ 40 | 41 | 42 | 43 | #define MINSIZEARRAY 4 44 | 45 | 46 | void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, 47 | int limit, const char *what) { 48 | void *newblock; 49 | int newsize; 50 | if (*size >= limit/2) { /* cannot double it? */ 51 | if (*size >= limit) /* cannot grow even a little? */ 52 | luaG_runerror(L, "too many %s (limit is %d)", what, limit); 53 | newsize = limit; /* still have at least one free place */ 54 | } 55 | else { 56 | newsize = (*size)*2; 57 | if (newsize < MINSIZEARRAY) 58 | newsize = MINSIZEARRAY; /* minimum size */ 59 | } 60 | newblock = luaM_reallocv(L, block, *size, newsize, size_elems); 61 | *size = newsize; /* update only when everything else is OK */ 62 | return newblock; 63 | } 64 | 65 | 66 | l_noret luaM_toobig (lua_State *L) { 67 | luaG_runerror(L, "memory allocation error: block too big"); 68 | } 69 | 70 | 71 | 72 | /* 73 | ** generic allocation routine. 74 | */ 75 | void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { 76 | void *newblock; 77 | global_State *g = G(L); 78 | size_t realosize = (block) ? osize : 0; 79 | lua_assert((realosize == 0) == (block == NULL)); 80 | #if defined(HARDMEMTESTS) 81 | if (nsize > realosize && g->gcrunning) 82 | luaC_fullgc(L, 1); /* force a GC whenever possible */ 83 | #endif 84 | newblock = (*g->frealloc)(g->ud, block, osize, nsize); 85 | if (newblock == NULL && nsize > 0) { 86 | api_check(L, nsize > realosize, 87 | "realloc cannot fail when shrinking a block"); 88 | if (g->gcrunning) { 89 | luaC_fullgc(L, 1); /* try to free some memory... */ 90 | newblock = (*g->frealloc)(g->ud, block, osize, nsize); /* try again */ 91 | } 92 | if (newblock == NULL) 93 | luaD_throw(L, LUA_ERRMEM); 94 | } 95 | lua_assert((nsize == 0) == (newblock == NULL)); 96 | g->GCdebt = (g->GCdebt + nsize) - realosize; 97 | return newblock; 98 | } 99 | 100 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.h,v 1.40.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lmem_h 8 | #define lmem_h 9 | 10 | 11 | #include 12 | 13 | #include "llimits.h" 14 | #include "lua.h" 15 | 16 | 17 | /* 18 | ** This macro avoids the runtime division MAX_SIZET/(e), as 'e' is 19 | ** always constant. 20 | ** The macro is somewhat complex to avoid warnings: 21 | ** +1 avoids warnings of "comparison has constant result"; 22 | ** cast to 'void' avoids warnings of "value unused". 23 | */ 24 | #define luaM_reallocv(L,b,on,n,e) \ 25 | (cast(void, \ 26 | (cast(size_t, (n)+1) > MAX_SIZET/(e)) ? (luaM_toobig(L), 0) : 0), \ 27 | luaM_realloc_(L, (b), (on)*(e), (n)*(e))) 28 | 29 | #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) 30 | #define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) 31 | #define luaM_freearray(L, b, n) luaM_reallocv(L, (b), n, 0, sizeof((b)[0])) 32 | 33 | #define luaM_malloc(L,s) luaM_realloc_(L, NULL, 0, (s)) 34 | #define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) 35 | #define luaM_newvector(L,n,t) \ 36 | cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) 37 | 38 | #define luaM_newobject(L,tag,s) luaM_realloc_(L, NULL, tag, (s)) 39 | 40 | #define luaM_growvector(L,v,nelems,size,t,limit,e) \ 41 | if ((nelems)+1 > (size)) \ 42 | ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) 43 | 44 | #define luaM_reallocvector(L, v,oldn,n,t) \ 45 | ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) 46 | 47 | LUAI_FUNC l_noret luaM_toobig (lua_State *L); 48 | 49 | /* not to be called directly */ 50 | LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, 51 | size_t size); 52 | LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, 53 | size_t size_elem, int limit, 54 | const char *what); 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.49.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | #include "lgc.h" 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | 14 | 15 | #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) 16 | 17 | #define sizeudata(u) (sizeof(union Udata)+(u)->len) 18 | 19 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 20 | (sizeof(s)/sizeof(char))-1)) 21 | 22 | #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) 23 | 24 | 25 | /* 26 | ** test whether a string is a reserved word 27 | */ 28 | #define isreserved(s) ((s)->tsv.tt == LUA_TSHRSTR && (s)->tsv.extra > 0) 29 | 30 | 31 | /* 32 | ** equality for short strings, which are always internalized 33 | */ 34 | #define eqshrstr(a,b) check_exp((a)->tsv.tt == LUA_TSHRSTR, (a) == (b)) 35 | 36 | 37 | LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed); 38 | LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); 39 | LUAI_FUNC int luaS_eqstr (TString *a, TString *b); 40 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 41 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); 42 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 43 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/ltable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltable.h,v 2.16.1.2 2013/08/30 15:49:41 roberto Exp $ 3 | ** Lua tables (hash) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltable_h 8 | #define ltable_h 9 | 10 | #include "lobject.h" 11 | 12 | 13 | #define gnode(t,i) (&(t)->node[i]) 14 | #define gkey(n) (&(n)->i_key.tvk) 15 | #define gval(n) (&(n)->i_val) 16 | #define gnext(n) ((n)->i_key.nk.next) 17 | 18 | #define invalidateTMcache(t) ((t)->flags = 0) 19 | 20 | /* returns the key, given the value of a table entry */ 21 | #define keyfromval(v) \ 22 | (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val)))) 23 | 24 | 25 | LUAI_FUNC const TValue *luaH_getint (Table *t, int key); 26 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value); 27 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 28 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 29 | LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); 30 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 31 | LUAI_FUNC Table *luaH_new (lua_State *L); 32 | LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize); 33 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); 34 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); 35 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 36 | LUAI_FUNC int luaH_getn (Table *t); 37 | 38 | 39 | #if defined(LUA_DEBUG) 40 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 41 | LUAI_FUNC int luaH_isdummy (Node *n); 42 | #endif 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/ltm.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.c,v 2.14.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define ltm_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "lobject.h" 16 | #include "lstate.h" 17 | #include "lstring.h" 18 | #include "ltable.h" 19 | #include "ltm.h" 20 | 21 | 22 | static const char udatatypename[] = "userdata"; 23 | 24 | LUAI_DDEF const char *const luaT_typenames_[LUA_TOTALTAGS] = { 25 | "no value", 26 | "nil", "boolean", udatatypename, "number", 27 | "string", "table", "function", udatatypename, "thread", 28 | "proto", "upval" /* these last two cases are used for tests only */ 29 | }; 30 | 31 | 32 | void luaT_init (lua_State *L) { 33 | static const char *const luaT_eventname[] = { /* ORDER TM */ 34 | "__index", "__newindex", 35 | "__gc", "__mode", "__len", "__eq", 36 | "__add", "__sub", "__mul", "__div", "__mod", 37 | "__pow", "__unm", "__lt", "__le", 38 | "__concat", "__call" 39 | }; 40 | int i; 41 | for (i=0; itmname[i] = luaS_new(L, luaT_eventname[i]); 43 | luaS_fix(G(L)->tmname[i]); /* never collect these names */ 44 | } 45 | } 46 | 47 | 48 | /* 49 | ** function to be used with macro "fasttm": optimized for absence of 50 | ** tag methods 51 | */ 52 | const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { 53 | const TValue *tm = luaH_getstr(events, ename); 54 | lua_assert(event <= TM_EQ); 55 | if (ttisnil(tm)) { /* no tag method? */ 56 | events->flags |= cast_byte(1u<metatable; 68 | break; 69 | case LUA_TUSERDATA: 70 | mt = uvalue(o)->metatable; 71 | break; 72 | default: 73 | mt = G(L)->mt[ttypenv(o)]; 74 | } 75 | return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject); 76 | } 77 | 78 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.h,v 2.11.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_LEN, 24 | TM_EQ, /* last tag method with `fast' access */ 25 | TM_ADD, 26 | TM_SUB, 27 | TM_MUL, 28 | TM_DIV, 29 | TM_MOD, 30 | TM_POW, 31 | TM_UNM, 32 | TM_LT, 33 | TM_LE, 34 | TM_CONCAT, 35 | TM_CALL, 36 | TM_N /* number of elements in the enum */ 37 | } TMS; 38 | 39 | 40 | 41 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 42 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 43 | 44 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 45 | 46 | #define ttypename(x) luaT_typenames_[(x) + 1] 47 | #define objtypename(x) ttypename(ttypenv(x)) 48 | 49 | LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; 50 | 51 | 52 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 53 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 54 | TMS event); 55 | LUAI_FUNC void luaT_init (lua_State *L); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.43.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | 15 | LUAMOD_API int (luaopen_base) (lua_State *L); 16 | 17 | #define LUA_COLIBNAME "coroutine" 18 | LUAMOD_API int (luaopen_coroutine) (lua_State *L); 19 | 20 | #define LUA_TABLIBNAME "table" 21 | LUAMOD_API int (luaopen_table) (lua_State *L); 22 | 23 | #define LUA_IOLIBNAME "io" 24 | LUAMOD_API int (luaopen_io) (lua_State *L); 25 | 26 | #define LUA_OSLIBNAME "os" 27 | LUAMOD_API int (luaopen_os) (lua_State *L); 28 | 29 | #define LUA_STRLIBNAME "string" 30 | LUAMOD_API int (luaopen_string) (lua_State *L); 31 | 32 | #define LUA_BITLIBNAME "bit32" 33 | LUAMOD_API int (luaopen_bit32) (lua_State *L); 34 | 35 | #define LUA_MATHLIBNAME "math" 36 | LUAMOD_API int (luaopen_math) (lua_State *L); 37 | 38 | #define LUA_DBLIBNAME "debug" 39 | LUAMOD_API int (luaopen_debug) (lua_State *L); 40 | 41 | #define LUA_LOADLIBNAME "package" 42 | LUAMOD_API int (luaopen_package) (lua_State *L); 43 | 44 | 45 | /* open all previous libraries */ 46 | LUALIB_API void (luaL_openlibs) (lua_State *L); 47 | 48 | 49 | 50 | #if !defined(lua_assert) 51 | #define lua_assert(x) ((void)0) 52 | #endif 53 | 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.39.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | /* load one chunk; from lundump.c */ 14 | LUAI_FUNC Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); 15 | 16 | /* make header; from lundump.c */ 17 | LUAI_FUNC void luaU_header (lu_byte* h); 18 | 19 | /* dump one chunk; from ldump.c */ 20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); 21 | 22 | /* data to catch conversion errors */ 23 | #define LUAC_TAIL "\x19\x93\r\n\x1a\n" 24 | 25 | /* size in bytes of header of binary files */ 26 | #define LUAC_HEADERSIZE (sizeof(LUA_SIGNATURE)-sizeof(char)+2+6+sizeof(LUAC_TAIL)-sizeof(char)) 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lvm.h,v 2.18.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Lua virtual machine 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lvm_h 8 | #define lvm_h 9 | 10 | 11 | #include "ldo.h" 12 | #include "lobject.h" 13 | #include "ltm.h" 14 | 15 | 16 | #define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o))) 17 | 18 | #define tonumber(o,n) (ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL)) 19 | 20 | #define equalobj(L,o1,o2) (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2)) 21 | 22 | #define luaV_rawequalobj(o1,o2) equalobj(NULL,o1,o2) 23 | 24 | 25 | /* not to called directly */ 26 | LUAI_FUNC int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2); 27 | 28 | 29 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); 30 | LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); 31 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); 32 | LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); 33 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, 34 | StkId val); 35 | LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, 36 | StkId val); 37 | LUAI_FUNC void luaV_finishOp (lua_State *L); 38 | LUAI_FUNC void luaV_execute (lua_State *L); 39 | LUAI_FUNC void luaV_concat (lua_State *L, int total); 40 | LUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb, 41 | const TValue *rc, TMS op); 42 | LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.c,v 1.35.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lzio_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "llimits.h" 16 | #include "lmem.h" 17 | #include "lstate.h" 18 | #include "lzio.h" 19 | 20 | 21 | int luaZ_fill (ZIO *z) { 22 | size_t size; 23 | lua_State *L = z->L; 24 | const char *buff; 25 | lua_unlock(L); 26 | buff = z->reader(L, z->data, &size); 27 | lua_lock(L); 28 | if (buff == NULL || size == 0) 29 | return EOZ; 30 | z->n = size - 1; /* discount char being returned */ 31 | z->p = buff; 32 | return cast_uchar(*(z->p++)); 33 | } 34 | 35 | 36 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 37 | z->L = L; 38 | z->reader = reader; 39 | z->data = data; 40 | z->n = 0; 41 | z->p = NULL; 42 | } 43 | 44 | 45 | /* --------------------------------------------------------------- read --- */ 46 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 47 | while (n) { 48 | size_t m; 49 | if (z->n == 0) { /* no bytes in buffer? */ 50 | if (luaZ_fill(z) == EOZ) /* try to read more */ 51 | return n; /* no more input; return number of missing bytes */ 52 | else { 53 | z->n++; /* luaZ_fill consumed first byte; put it back */ 54 | z->p--; 55 | } 56 | } 57 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 58 | memcpy(b, z->p, m); 59 | z->n -= m; 60 | z->p += m; 61 | b = (char *)b + m; 62 | n -= m; 63 | } 64 | return 0; 65 | } 66 | 67 | /* ------------------------------------------------------------------------ */ 68 | char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) { 69 | if (n > buff->buffsize) { 70 | if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; 71 | luaZ_resizebuffer(L, buff, n); 72 | } 73 | return buff->buffer; 74 | } 75 | 76 | 77 | -------------------------------------------------------------------------------- /dep/lua-5.2.4/src/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.26.1.1 2013/04/12 18:48:47 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) 21 | 22 | 23 | typedef struct Mbuffer { 24 | char *buffer; 25 | size_t n; 26 | size_t buffsize; 27 | } Mbuffer; 28 | 29 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 30 | 31 | #define luaZ_buffer(buff) ((buff)->buffer) 32 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 33 | #define luaZ_bufflen(buff) ((buff)->n) 34 | 35 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 36 | 37 | 38 | #define luaZ_resizebuffer(L, buff, size) \ 39 | (luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \ 40 | (buff)->buffsize = size) 41 | 42 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 43 | 44 | 45 | LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); 46 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 47 | void *data); 48 | LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ 49 | 50 | 51 | 52 | /* --------- Private Part ------------------ */ 53 | 54 | struct Zio { 55 | size_t n; /* bytes still unread */ 56 | const char *p; /* current position in buffer */ 57 | lua_Reader reader; /* reader function */ 58 | void* data; /* additional data */ 59 | lua_State *L; /* Lua state (for reader) */ 60 | }; 61 | 62 | 63 | LUAI_FUNC int luaZ_fill (ZIO *z); 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/README: -------------------------------------------------------------------------------- 1 | 2 | This is Lua 5.3.4, released on 12 Jan 2017. 3 | 4 | For installation instructions, license details, and 5 | further information about Lua, see doc/readme.html. 6 | 7 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/lua53.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/dep/lua-5.3.4/lua53.lib -------------------------------------------------------------------------------- /dep/lua-5.3.4/lua53_x64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/dep/lua-5.3.4/lua53_x64.lib -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.9 2015/03/06 19:49:50 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "llimits.h" 12 | #include "lstate.h" 13 | 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ 15 | "stack overflow");} 16 | 17 | #define adjustresults(L,nres) \ 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } 19 | 20 | #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ 21 | "not enough elements in the stack") 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lctype.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lctype.c,v 1.12 2014/11/02 19:19:04 roberto Exp $ 3 | ** 'ctype' functions for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #define lctype_c 8 | #define LUA_CORE 9 | 10 | #include "lprefix.h" 11 | 12 | 13 | #include "lctype.h" 14 | 15 | #if !LUA_USE_CTYPE /* { */ 16 | 17 | #include 18 | 19 | LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = { 20 | 0x00, /* EOZ */ 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0. */ 22 | 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1. */ 24 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 25 | 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* 2. */ 26 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 27 | 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, /* 3. */ 28 | 0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 29 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 4. */ 30 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 31 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 5. */ 32 | 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x05, 33 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 6. */ 34 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 35 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 7. */ 36 | 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8. */ 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9. */ 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a. */ 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b. */ 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c. */ 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d. */ 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e. */ 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f. */ 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | }; 54 | 55 | #endif /* } */ 56 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lctype.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lctype.h,v 1.12 2011/07/15 12:50:29 roberto Exp $ 3 | ** 'ctype' functions for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lctype_h 8 | #define lctype_h 9 | 10 | #include "lua.h" 11 | 12 | 13 | /* 14 | ** WARNING: the functions defined here do not necessarily correspond 15 | ** to the similar functions in the standard C ctype.h. They are 16 | ** optimized for the specific needs of Lua 17 | */ 18 | 19 | #if !defined(LUA_USE_CTYPE) 20 | 21 | #if 'A' == 65 && '0' == 48 22 | /* ASCII case: can use its own tables; faster and fixed */ 23 | #define LUA_USE_CTYPE 0 24 | #else 25 | /* must use standard C ctype */ 26 | #define LUA_USE_CTYPE 1 27 | #endif 28 | 29 | #endif 30 | 31 | 32 | #if !LUA_USE_CTYPE /* { */ 33 | 34 | #include 35 | 36 | #include "llimits.h" 37 | 38 | 39 | #define ALPHABIT 0 40 | #define DIGITBIT 1 41 | #define PRINTBIT 2 42 | #define SPACEBIT 3 43 | #define XDIGITBIT 4 44 | 45 | 46 | #define MASK(B) (1 << (B)) 47 | 48 | 49 | /* 50 | ** add 1 to char to allow index -1 (EOZ) 51 | */ 52 | #define testprop(c,p) (luai_ctype_[(c)+1] & (p)) 53 | 54 | /* 55 | ** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_' 56 | */ 57 | #define lislalpha(c) testprop(c, MASK(ALPHABIT)) 58 | #define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT))) 59 | #define lisdigit(c) testprop(c, MASK(DIGITBIT)) 60 | #define lisspace(c) testprop(c, MASK(SPACEBIT)) 61 | #define lisprint(c) testprop(c, MASK(PRINTBIT)) 62 | #define lisxdigit(c) testprop(c, MASK(XDIGITBIT)) 63 | 64 | /* 65 | ** this 'ltolower' only works for alphabetic characters 66 | */ 67 | #define ltolower(c) ((c) | ('A' ^ 'a')) 68 | 69 | 70 | /* two more entries for 0 and -1 (EOZ) */ 71 | LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2]; 72 | 73 | 74 | #else /* }{ */ 75 | 76 | /* 77 | ** use standard C ctypes 78 | */ 79 | 80 | #include 81 | 82 | 83 | #define lislalpha(c) (isalpha(c) || (c) == '_') 84 | #define lislalnum(c) (isalnum(c) || (c) == '_') 85 | #define lisdigit(c) (isdigit(c)) 86 | #define lisspace(c) (isspace(c)) 87 | #define lisprint(c) (isprint(c)) 88 | #define lisxdigit(c) (isxdigit(c)) 89 | 90 | #define ltolower(c) (tolower(c)) 91 | 92 | #endif /* } */ 93 | 94 | #endif 95 | 96 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, 24 | const TValue *p2); 25 | LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1, 26 | const TValue *p2, 27 | const char *msg); 28 | LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1, 29 | const TValue *p2); 30 | LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, 31 | const TValue *p2); 32 | LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); 33 | LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg, 34 | TString *src, int line); 35 | LUAI_FUNC l_noret luaG_errormsg (lua_State *L); 36 | LUAI_FUNC void luaG_traceexec (lua_State *L); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/ldo.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldo.h,v 2.29 2015/12/21 13:02:14 roberto Exp $ 3 | ** Stack and Call structure of Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldo_h 8 | #define ldo_h 9 | 10 | 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | #include "lzio.h" 14 | 15 | 16 | /* 17 | ** Macro to check stack size and grow stack if needed. Parameters 18 | ** 'pre'/'pos' allow the macro to preserve a pointer into the 19 | ** stack across reallocations, doing the work only when needed. 20 | ** 'condmovestack' is used in heavy tests to force a stack reallocation 21 | ** at every check. 22 | */ 23 | #define luaD_checkstackaux(L,n,pre,pos) \ 24 | if (L->stack_last - L->top <= (n)) \ 25 | { pre; luaD_growstack(L, n); pos; } else { condmovestack(L,pre,pos); } 26 | 27 | /* In general, 'pre'/'pos' are empty (nothing to save) */ 28 | #define luaD_checkstack(L,n) luaD_checkstackaux(L,n,(void)0,(void)0) 29 | 30 | 31 | 32 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) 33 | #define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) 34 | 35 | 36 | /* type of protected functions, to be ran by 'runprotected' */ 37 | typedef void (*Pfunc) (lua_State *L, void *ud); 38 | 39 | LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, 40 | const char *mode); 41 | LUAI_FUNC void luaD_hook (lua_State *L, int event, int line); 42 | LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); 43 | LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); 44 | LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults); 45 | LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, 46 | ptrdiff_t oldtop, ptrdiff_t ef); 47 | LUAI_FUNC int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, 48 | int nres); 49 | LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); 50 | LUAI_FUNC void luaD_growstack (lua_State *L, int n); 51 | LUAI_FUNC void luaD_shrinkstack (lua_State *L); 52 | LUAI_FUNC void luaD_inctop (lua_State *L); 53 | 54 | LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode); 55 | LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); 56 | 57 | #endif 58 | 59 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 2.15 2015/01/13 15:49:11 roberto Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | /* test whether thread is in 'twups' list */ 22 | #define isintwups(L) (L->twups != L) 23 | 24 | 25 | /* 26 | ** maximum number of upvalues in a closure (both C and Lua). (Value 27 | ** must fit in a VM register.) 28 | */ 29 | #define MAXUPVAL 255 30 | 31 | 32 | /* 33 | ** Upvalues for Lua closures 34 | */ 35 | struct UpVal { 36 | TValue *v; /* points to stack or to its own value */ 37 | lu_mem refcount; /* reference counter */ 38 | union { 39 | struct { /* (when open) */ 40 | UpVal *next; /* linked list */ 41 | int touched; /* mark to avoid cycles with dead threads */ 42 | } open; 43 | TValue value; /* the value (when closed) */ 44 | } u; 45 | }; 46 | 47 | #define upisopen(up) ((up)->v != &(up)->u.value) 48 | 49 | 50 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 51 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); 52 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); 53 | LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl); 54 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 55 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 56 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 57 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 58 | int pc); 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: linit.c,v 1.39 2016/12/04 20:17:24 roberto Exp $ 3 | ** Initialization of libraries for lua.c and other clients 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #define linit_c 9 | #define LUA_LIB 10 | 11 | /* 12 | ** If you embed Lua in your program and need to open the standard 13 | ** libraries, call luaL_openlibs in your program. If you need a 14 | ** different set of libraries, copy this file to your project and edit 15 | ** it to suit your needs. 16 | ** 17 | ** You can also *preload* libraries, so that a later 'require' can 18 | ** open the library, which is already linked to the application. 19 | ** For that, do the following code: 20 | ** 21 | ** luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_PRELOAD_TABLE); 22 | ** lua_pushcfunction(L, luaopen_modname); 23 | ** lua_setfield(L, -2, modname); 24 | ** lua_pop(L, 1); // remove PRELOAD table 25 | */ 26 | 27 | #include "lprefix.h" 28 | 29 | 30 | #include 31 | 32 | #include "lua.h" 33 | 34 | #include "lualib.h" 35 | #include "lauxlib.h" 36 | 37 | 38 | /* 39 | ** these libs are loaded by lua.c and are readily available to any Lua 40 | ** program 41 | */ 42 | static const luaL_Reg loadedlibs[] = { 43 | {"_G", luaopen_base}, 44 | {LUA_LOADLIBNAME, luaopen_package}, 45 | {LUA_COLIBNAME, luaopen_coroutine}, 46 | {LUA_TABLIBNAME, luaopen_table}, 47 | {LUA_IOLIBNAME, luaopen_io}, 48 | {LUA_OSLIBNAME, luaopen_os}, 49 | {LUA_STRLIBNAME, luaopen_string}, 50 | {LUA_MATHLIBNAME, luaopen_math}, 51 | {LUA_UTF8LIBNAME, luaopen_utf8}, 52 | {LUA_DBLIBNAME, luaopen_debug}, 53 | #if defined(LUA_COMPAT_BITLIB) 54 | {LUA_BITLIBNAME, luaopen_bit32}, 55 | #endif 56 | {NULL, NULL} 57 | }; 58 | 59 | 60 | LUALIB_API void luaL_openlibs (lua_State *L) { 61 | const luaL_Reg *lib; 62 | /* "require" functions from 'loadedlibs' and set results to global table */ 63 | for (lib = loadedlibs; lib->func; lib++) { 64 | luaL_requiref(L, lib->name, lib->func, 1); 65 | lua_pop(L, 1); /* remove lib */ 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/llex.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: llex.h,v 1.79 2016/05/02 14:02:12 roberto Exp $ 3 | ** Lexical Analyzer 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef llex_h 8 | #define llex_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | 14 | #define FIRST_RESERVED 257 15 | 16 | 17 | #if !defined(LUA_ENV) 18 | #define LUA_ENV "_ENV" 19 | #endif 20 | 21 | 22 | /* 23 | * WARNING: if you change the order of this enumeration, 24 | * grep "ORDER RESERVED" 25 | */ 26 | enum RESERVED { 27 | /* terminal symbols denoted by reserved words */ 28 | TK_AND = FIRST_RESERVED, TK_BREAK, 29 | TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, 30 | TK_GOTO, TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, 31 | TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, 32 | /* other terminal symbols */ 33 | TK_IDIV, TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, 34 | TK_SHL, TK_SHR, 35 | TK_DBCOLON, TK_EOS, 36 | TK_FLT, TK_INT, TK_NAME, TK_STRING 37 | }; 38 | 39 | /* number of reserved words */ 40 | #define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) 41 | 42 | 43 | typedef union { 44 | lua_Number r; 45 | lua_Integer i; 46 | TString *ts; 47 | } SemInfo; /* semantics information */ 48 | 49 | 50 | typedef struct Token { 51 | int token; 52 | SemInfo seminfo; 53 | } Token; 54 | 55 | 56 | /* state of the lexer plus state of the parser when shared by all 57 | functions */ 58 | typedef struct LexState { 59 | int current; /* current character (charint) */ 60 | int linenumber; /* input line counter */ 61 | int lastline; /* line of last token 'consumed' */ 62 | Token t; /* current token */ 63 | Token lookahead; /* look ahead token */ 64 | struct FuncState *fs; /* current function (parser) */ 65 | struct lua_State *L; 66 | ZIO *z; /* input stream */ 67 | Mbuffer *buff; /* buffer for tokens */ 68 | Table *h; /* to avoid collection/reuse strings */ 69 | struct Dyndata *dyd; /* dynamic structures used by the parser */ 70 | TString *source; /* current source name */ 71 | TString *envn; /* environment variable name */ 72 | } LexState; 73 | 74 | 75 | LUAI_FUNC void luaX_init (lua_State *L); 76 | LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, 77 | TString *source, int firstchar); 78 | LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); 79 | LUAI_FUNC void luaX_next (LexState *ls); 80 | LUAI_FUNC int luaX_lookahead (LexState *ls); 81 | LUAI_FUNC l_noret luaX_syntaxerror (LexState *ls, const char *s); 82 | LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); 83 | 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lmem.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.c,v 1.91 2015/03/06 19:45:54 roberto Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #define lmem_c 8 | #define LUA_CORE 9 | 10 | #include "lprefix.h" 11 | 12 | 13 | #include 14 | 15 | #include "lua.h" 16 | 17 | #include "ldebug.h" 18 | #include "ldo.h" 19 | #include "lgc.h" 20 | #include "lmem.h" 21 | #include "lobject.h" 22 | #include "lstate.h" 23 | 24 | 25 | 26 | /* 27 | ** About the realloc function: 28 | ** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize); 29 | ** ('osize' is the old size, 'nsize' is the new size) 30 | ** 31 | ** * frealloc(ud, NULL, x, s) creates a new block of size 's' (no 32 | ** matter 'x'). 33 | ** 34 | ** * frealloc(ud, p, x, 0) frees the block 'p' 35 | ** (in this specific case, frealloc must return NULL); 36 | ** particularly, frealloc(ud, NULL, 0, 0) does nothing 37 | ** (which is equivalent to free(NULL) in ISO C) 38 | ** 39 | ** frealloc returns NULL if it cannot create or reallocate the area 40 | ** (any reallocation to an equal or smaller size cannot fail!) 41 | */ 42 | 43 | 44 | 45 | #define MINSIZEARRAY 4 46 | 47 | 48 | void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, 49 | int limit, const char *what) { 50 | void *newblock; 51 | int newsize; 52 | if (*size >= limit/2) { /* cannot double it? */ 53 | if (*size >= limit) /* cannot grow even a little? */ 54 | luaG_runerror(L, "too many %s (limit is %d)", what, limit); 55 | newsize = limit; /* still have at least one free place */ 56 | } 57 | else { 58 | newsize = (*size)*2; 59 | if (newsize < MINSIZEARRAY) 60 | newsize = MINSIZEARRAY; /* minimum size */ 61 | } 62 | newblock = luaM_reallocv(L, block, *size, newsize, size_elems); 63 | *size = newsize; /* update only when everything else is OK */ 64 | return newblock; 65 | } 66 | 67 | 68 | l_noret luaM_toobig (lua_State *L) { 69 | luaG_runerror(L, "memory allocation error: block too big"); 70 | } 71 | 72 | 73 | 74 | /* 75 | ** generic allocation routine. 76 | */ 77 | void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { 78 | void *newblock; 79 | global_State *g = G(L); 80 | size_t realosize = (block) ? osize : 0; 81 | lua_assert((realosize == 0) == (block == NULL)); 82 | #if defined(HARDMEMTESTS) 83 | if (nsize > realosize && g->gcrunning) 84 | luaC_fullgc(L, 1); /* force a GC whenever possible */ 85 | #endif 86 | newblock = (*g->frealloc)(g->ud, block, osize, nsize); 87 | if (newblock == NULL && nsize > 0) { 88 | lua_assert(nsize > realosize); /* cannot fail when shrinking a block */ 89 | if (g->version) { /* is state fully built? */ 90 | luaC_fullgc(L, 1); /* try to free some memory... */ 91 | newblock = (*g->frealloc)(g->ud, block, osize, nsize); /* try again */ 92 | } 93 | if (newblock == NULL) 94 | luaD_throw(L, LUA_ERRMEM); 95 | } 96 | lua_assert((nsize == 0) == (newblock == NULL)); 97 | g->GCdebt = (g->GCdebt + nsize) - realosize; 98 | return newblock; 99 | } 100 | 101 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.h,v 1.43 2014/12/19 17:26:14 roberto Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lmem_h 8 | #define lmem_h 9 | 10 | 11 | #include 12 | 13 | #include "llimits.h" 14 | #include "lua.h" 15 | 16 | 17 | /* 18 | ** This macro reallocs a vector 'b' from 'on' to 'n' elements, where 19 | ** each element has size 'e'. In case of arithmetic overflow of the 20 | ** product 'n'*'e', it raises an error (calling 'luaM_toobig'). Because 21 | ** 'e' is always constant, it avoids the runtime division MAX_SIZET/(e). 22 | ** 23 | ** (The macro is somewhat complex to avoid warnings: The 'sizeof' 24 | ** comparison avoids a runtime comparison when overflow cannot occur. 25 | ** The compiler should be able to optimize the real test by itself, but 26 | ** when it does it, it may give a warning about "comparison is always 27 | ** false due to limited range of data type"; the +1 tricks the compiler, 28 | ** avoiding this warning but also this optimization.) 29 | */ 30 | #define luaM_reallocv(L,b,on,n,e) \ 31 | (((sizeof(n) >= sizeof(size_t) && cast(size_t, (n)) + 1 > MAX_SIZET/(e)) \ 32 | ? luaM_toobig(L) : cast_void(0)) , \ 33 | luaM_realloc_(L, (b), (on)*(e), (n)*(e))) 34 | 35 | /* 36 | ** Arrays of chars do not need any test 37 | */ 38 | #define luaM_reallocvchar(L,b,on,n) \ 39 | cast(char *, luaM_realloc_(L, (b), (on)*sizeof(char), (n)*sizeof(char))) 40 | 41 | #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) 42 | #define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) 43 | #define luaM_freearray(L, b, n) luaM_realloc_(L, (b), (n)*sizeof(*(b)), 0) 44 | 45 | #define luaM_malloc(L,s) luaM_realloc_(L, NULL, 0, (s)) 46 | #define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) 47 | #define luaM_newvector(L,n,t) \ 48 | cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) 49 | 50 | #define luaM_newobject(L,tag,s) luaM_realloc_(L, NULL, tag, (s)) 51 | 52 | #define luaM_growvector(L,v,nelems,size,t,limit,e) \ 53 | if ((nelems)+1 > (size)) \ 54 | ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) 55 | 56 | #define luaM_reallocvector(L, v,oldn,n,t) \ 57 | ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) 58 | 59 | LUAI_FUNC l_noret luaM_toobig (lua_State *L); 60 | 61 | /* not to be called directly */ 62 | LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, 63 | size_t size); 64 | LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, 65 | size_t size_elem, int limit, 66 | const char *what); 67 | 68 | #endif 69 | 70 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lprefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lprefix.h,v 1.2 2014/12/29 16:54:13 roberto Exp $ 3 | ** Definitions for Lua code that must come before any other header file 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lprefix_h 8 | #define lprefix_h 9 | 10 | 11 | /* 12 | ** Allows POSIX/XSI stuff 13 | */ 14 | #if !defined(LUA_USE_C89) /* { */ 15 | 16 | #if !defined(_XOPEN_SOURCE) 17 | #define _XOPEN_SOURCE 600 18 | #elif _XOPEN_SOURCE == 0 19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ 20 | #endif 21 | 22 | /* 23 | ** Allows manipulation of large files in gcc and some other compilers 24 | */ 25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) 26 | #define _LARGEFILE_SOURCE 1 27 | #define _FILE_OFFSET_BITS 64 28 | #endif 29 | 30 | #endif /* } */ 31 | 32 | 33 | /* 34 | ** Windows stuff 35 | */ 36 | #if defined(_WIN32) /* { */ 37 | 38 | #if !defined(_CRT_SECURE_NO_WARNINGS) 39 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ 40 | #endif 41 | 42 | #endif /* } */ 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.61 2015/11/03 15:36:01 roberto Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | #include "lgc.h" 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | 14 | 15 | #define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) 16 | 17 | #define sizeludata(l) (sizeof(union UUdata) + (l)) 18 | #define sizeudata(u) sizeludata((u)->len) 19 | 20 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 21 | (sizeof(s)/sizeof(char))-1)) 22 | 23 | 24 | /* 25 | ** test whether a string is a reserved word 26 | */ 27 | #define isreserved(s) ((s)->tt == LUA_TSHRSTR && (s)->extra > 0) 28 | 29 | 30 | /* 31 | ** equality for short strings, which are always internalized 32 | */ 33 | #define eqshrstr(a,b) check_exp((a)->tt == LUA_TSHRSTR, (a) == (b)) 34 | 35 | 36 | LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed); 37 | LUAI_FUNC unsigned int luaS_hashlongstr (TString *ts); 38 | LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); 39 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 40 | LUAI_FUNC void luaS_clearcache (global_State *g); 41 | LUAI_FUNC void luaS_init (lua_State *L); 42 | LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); 43 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s); 44 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 45 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); 46 | LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/ltable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltable.h,v 2.23 2016/12/22 13:08:50 roberto Exp $ 3 | ** Lua tables (hash) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltable_h 8 | #define ltable_h 9 | 10 | #include "lobject.h" 11 | 12 | 13 | #define gnode(t,i) (&(t)->node[i]) 14 | #define gval(n) (&(n)->i_val) 15 | #define gnext(n) ((n)->i_key.nk.next) 16 | 17 | 18 | /* 'const' to avoid wrong writings that can mess up field 'next' */ 19 | #define gkey(n) cast(const TValue*, (&(n)->i_key.tvk)) 20 | 21 | /* 22 | ** writable version of 'gkey'; allows updates to individual fields, 23 | ** but not to the whole (which has incompatible type) 24 | */ 25 | #define wgkey(n) (&(n)->i_key.nk) 26 | 27 | #define invalidateTMcache(t) ((t)->flags = 0) 28 | 29 | 30 | /* true when 't' is using 'dummynode' as its hash part */ 31 | #define isdummy(t) ((t)->lastfree == NULL) 32 | 33 | 34 | /* allocated size for hash nodes */ 35 | #define allocsizenode(t) (isdummy(t) ? 0 : sizenode(t)) 36 | 37 | 38 | /* returns the key, given the value of a table entry */ 39 | #define keyfromval(v) \ 40 | (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val)))) 41 | 42 | 43 | LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key); 44 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key, 45 | TValue *value); 46 | LUAI_FUNC const TValue *luaH_getshortstr (Table *t, TString *key); 47 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 48 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 49 | LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); 50 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 51 | LUAI_FUNC Table *luaH_new (lua_State *L); 52 | LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize, 53 | unsigned int nhsize); 54 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize); 55 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); 56 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 57 | LUAI_FUNC int luaH_getn (Table *t); 58 | 59 | 60 | #if defined(LUA_DEBUG) 61 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 62 | LUAI_FUNC int luaH_isdummy (const Table *t); 63 | #endif 64 | 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.h,v 2.22 2016/02/26 19:20:15 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" and "ORDER OP" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_LEN, 24 | TM_EQ, /* last tag method with fast access */ 25 | TM_ADD, 26 | TM_SUB, 27 | TM_MUL, 28 | TM_MOD, 29 | TM_POW, 30 | TM_DIV, 31 | TM_IDIV, 32 | TM_BAND, 33 | TM_BOR, 34 | TM_BXOR, 35 | TM_SHL, 36 | TM_SHR, 37 | TM_UNM, 38 | TM_BNOT, 39 | TM_LT, 40 | TM_LE, 41 | TM_CONCAT, 42 | TM_CALL, 43 | TM_N /* number of elements in the enum */ 44 | } TMS; 45 | 46 | 47 | 48 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 49 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 50 | 51 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 52 | 53 | #define ttypename(x) luaT_typenames_[(x) + 1] 54 | 55 | LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; 56 | 57 | 58 | LUAI_FUNC const char *luaT_objtypename (lua_State *L, const TValue *o); 59 | 60 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 61 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 62 | TMS event); 63 | LUAI_FUNC void luaT_init (lua_State *L); 64 | 65 | LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, 66 | const TValue *p2, TValue *p3, int hasres); 67 | LUAI_FUNC int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, 68 | StkId res, TMS event); 69 | LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, 70 | StkId res, TMS event); 71 | LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, 72 | const TValue *p2, TMS event); 73 | 74 | 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.45 2017/01/12 17:14:26 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* version suffix for environment variable names */ 15 | #define LUA_VERSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR 16 | 17 | 18 | LUAMOD_API int (luaopen_base) (lua_State *L); 19 | 20 | #define LUA_COLIBNAME "coroutine" 21 | LUAMOD_API int (luaopen_coroutine) (lua_State *L); 22 | 23 | #define LUA_TABLIBNAME "table" 24 | LUAMOD_API int (luaopen_table) (lua_State *L); 25 | 26 | #define LUA_IOLIBNAME "io" 27 | LUAMOD_API int (luaopen_io) (lua_State *L); 28 | 29 | #define LUA_OSLIBNAME "os" 30 | LUAMOD_API int (luaopen_os) (lua_State *L); 31 | 32 | #define LUA_STRLIBNAME "string" 33 | LUAMOD_API int (luaopen_string) (lua_State *L); 34 | 35 | #define LUA_UTF8LIBNAME "utf8" 36 | LUAMOD_API int (luaopen_utf8) (lua_State *L); 37 | 38 | #define LUA_BITLIBNAME "bit32" 39 | LUAMOD_API int (luaopen_bit32) (lua_State *L); 40 | 41 | #define LUA_MATHLIBNAME "math" 42 | LUAMOD_API int (luaopen_math) (lua_State *L); 43 | 44 | #define LUA_DBLIBNAME "debug" 45 | LUAMOD_API int (luaopen_debug) (lua_State *L); 46 | 47 | #define LUA_LOADLIBNAME "package" 48 | LUAMOD_API int (luaopen_package) (lua_State *L); 49 | 50 | 51 | /* open all previous libraries */ 52 | LUALIB_API void (luaL_openlibs) (lua_State *L); 53 | 54 | 55 | 56 | #if !defined(lua_assert) 57 | #define lua_assert(x) ((void)0) 58 | #endif 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.45 2015/09/08 15:41:05 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* data to catch conversion errors */ 16 | #define LUAC_DATA "\x19\x93\r\n\x1a\n" 17 | 18 | #define LUAC_INT 0x5678 19 | #define LUAC_NUM cast_num(370.5) 20 | 21 | #define MYINT(s) (s[0]-'0') 22 | #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)) 23 | #define LUAC_FORMAT 0 /* this is the official format */ 24 | 25 | /* load one chunk; from lundump.c */ 26 | LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name); 27 | 28 | /* dump one chunk; from ldump.c */ 29 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, 30 | void* data, int strip); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.c,v 1.37 2015/09/08 15:41:05 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #define lzio_c 8 | #define LUA_CORE 9 | 10 | #include "lprefix.h" 11 | 12 | 13 | #include 14 | 15 | #include "lua.h" 16 | 17 | #include "llimits.h" 18 | #include "lmem.h" 19 | #include "lstate.h" 20 | #include "lzio.h" 21 | 22 | 23 | int luaZ_fill (ZIO *z) { 24 | size_t size; 25 | lua_State *L = z->L; 26 | const char *buff; 27 | lua_unlock(L); 28 | buff = z->reader(L, z->data, &size); 29 | lua_lock(L); 30 | if (buff == NULL || size == 0) 31 | return EOZ; 32 | z->n = size - 1; /* discount char being returned */ 33 | z->p = buff; 34 | return cast_uchar(*(z->p++)); 35 | } 36 | 37 | 38 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 39 | z->L = L; 40 | z->reader = reader; 41 | z->data = data; 42 | z->n = 0; 43 | z->p = NULL; 44 | } 45 | 46 | 47 | /* --------------------------------------------------------------- read --- */ 48 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 49 | while (n) { 50 | size_t m; 51 | if (z->n == 0) { /* no bytes in buffer? */ 52 | if (luaZ_fill(z) == EOZ) /* try to read more */ 53 | return n; /* no more input; return number of missing bytes */ 54 | else { 55 | z->n++; /* luaZ_fill consumed first byte; put it back */ 56 | z->p--; 57 | } 58 | } 59 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 60 | memcpy(b, z->p, m); 61 | z->n -= m; 62 | z->p += m; 63 | b = (char *)b + m; 64 | n -= m; 65 | } 66 | return 0; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /dep/lua-5.3.4/src/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.31 2015/09/08 15:41:05 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) 21 | 22 | 23 | typedef struct Mbuffer { 24 | char *buffer; 25 | size_t n; 26 | size_t buffsize; 27 | } Mbuffer; 28 | 29 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 30 | 31 | #define luaZ_buffer(buff) ((buff)->buffer) 32 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 33 | #define luaZ_bufflen(buff) ((buff)->n) 34 | 35 | #define luaZ_buffremove(buff,i) ((buff)->n -= (i)) 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | ((buff)->buffer = luaM_reallocvchar(L, (buff)->buffer, \ 41 | (buff)->buffsize, size), \ 42 | (buff)->buffsize = size) 43 | 44 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 45 | 46 | 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 48 | void *data); 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void *b, size_t n); /* read next n bytes */ 50 | 51 | 52 | 53 | /* --------- Private Part ------------------ */ 54 | 55 | struct Zio { 56 | size_t n; /* bytes still unread */ 57 | const char *p; /* current position in buffer */ 58 | lua_Reader reader; /* reader function */ 59 | void *data; /* additional data */ 60 | lua_State *L; /* Lua state (for reader) */ 61 | }; 62 | 63 | 64 | LUAI_FUNC int luaZ_fill (ZIO *z); 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /lcf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nomi-san/luacef/9f35b62ae9952a1382fa38686abdb051a4ba8fd5/lcf.png -------------------------------------------------------------------------------- /pro/luacef.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.1145 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luacef", "luacef\luacef.vcxproj", "{22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}.Debug|x64.ActiveCfg = Debug|x64 17 | {22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}.Debug|x64.Build.0 = Debug|x64 18 | {22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}.Debug|x86.ActiveCfg = Debug|Win32 19 | {22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}.Debug|x86.Build.0 = Debug|Win32 20 | {22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}.Release|x64.ActiveCfg = Release|x64 21 | {22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}.Release|x64.Build.0 = Release|x64 22 | {22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}.Release|x86.ActiveCfg = Release|Win32 23 | {22223EB6-4E04-4B0B-9C94-DD1F06B8EDAB}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {22FFC1B5-CD43-4E10-95AA-63253FAD8278} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /pro/luacef/luacef.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/api/dialog_handler.c: -------------------------------------------------------------------------------- 1 | #include "../luacef.h" 2 | #include "include/capi/cef_dialog_handler_capi.h" 3 | 4 | #define SELF luacef_DialogHandler 5 | 6 | typedef struct SELF { 7 | 8 | cef_dialog_handler_t self; 9 | 10 | lua_State *L; // state 11 | int ref; // table ref 12 | 13 | } SELF; 14 | 15 | #define API(fn) \ 16 | LCEF_API(DialogHandler, fn) 17 | 18 | #define API_N(fn) \ 19 | LCEF_API_N(DialogHandler, fn) 20 | 21 | #define API_M(mname) \ 22 | LCEF_M(DialogHandler, mname) 23 | 24 | // callback ========================= 25 | 26 | int CEF_CALLBACK API_N(OnFileDialog)( 27 | SELF* self, 28 | struct _cef_browser_t* browser, 29 | cef_file_dialog_mode_t mode, 30 | const cef_string_t* title, 31 | const cef_string_t* default_file_path, 32 | cef_string_list_t accept_filters, 33 | int selected_accept_filter, 34 | struct _cef_file_dialog_callback_t* callback) 35 | { 36 | 37 | return 0; 38 | } 39 | 40 | // api ========================= 41 | 42 | API(new) 43 | { 44 | 45 | } 46 | 47 | API(index) 48 | { 49 | 50 | } 51 | 52 | API(newindex) 53 | { 54 | 55 | } 56 | 57 | API(len) 58 | { 59 | 60 | } 61 | 62 | API(unm) 63 | { 64 | 65 | } 66 | 67 | API_M(meta) 68 | { 69 | 70 | { NULL, NULL } 71 | }; 72 | 73 | void API_N(reg)() 74 | { 75 | 76 | } -------------------------------------------------------------------------------- /src/api/display_handler.c: -------------------------------------------------------------------------------- 1 | #include "../luacef.h" 2 | #include "include/capi/cef_display_handler_capi.h" 3 | 4 | #define SELF luacef_DisplayHandler 5 | 6 | typedef struct SELF { 7 | 8 | cef_display_handler_t self; 9 | 10 | lua_State *L; // state 11 | int ref; // table ref 12 | 13 | } SELF; 14 | 15 | #define API(fn) \ 16 | LCEF_API(DisplayHandler, fn) 17 | 18 | #define API_N(fn) \ 19 | LCEF_API_N(DisplayHandler, fn) 20 | 21 | #define API_M(mname) \ 22 | LCEF_M(DisplayHandler, mname) 23 | 24 | // callback ========================= 25 | 26 | void CEF_CALLBACK API_N(OnAddressChange)(SELF* self, 27 | struct _cef_browser_t* browser, 28 | struct _cef_frame_t* frame, 29 | const cef_string_t* url) 30 | { 31 | 32 | } 33 | 34 | void CEF_CALLBACK API_N(OnTitleChange)(SELF* self, 35 | struct _cef_browser_t* browser, 36 | const cef_string_t* title) 37 | { 38 | 39 | } 40 | 41 | void CEF_CALLBACK API_N(OnFaviconURLChange)(SELF* self, 42 | struct _cef_browser_t* browser, 43 | cef_string_list_t icon_urls) 44 | { 45 | 46 | } 47 | 48 | void CEF_CALLBACK API_N(OnFullscreenModeChange)( 49 | SELF* self, 50 | struct _cef_browser_t* browser, 51 | int fullscreen) 52 | { 53 | 54 | } 55 | 56 | int CEF_CALLBACK API_N(OnTooltip)(SELF* self, 57 | struct _cef_browser_t* browser, 58 | cef_string_t* text) 59 | { 60 | 61 | } 62 | 63 | void CEF_CALLBACK API_N(OnStatusMessage)(SELF* self, 64 | struct _cef_browser_t* browser, 65 | const cef_string_t* value) 66 | { 67 | 68 | } 69 | 70 | int CEF_CALLBACK API_N(OnConsoleMessage)(SELF* self, 71 | struct _cef_browser_t* browser, 72 | const cef_string_t* message, 73 | const cef_string_t* source, 74 | int line) 75 | { 76 | 77 | } 78 | 79 | // api ========================= 80 | 81 | API(new) 82 | { 83 | 84 | } 85 | 86 | API(index) 87 | { 88 | 89 | } 90 | 91 | API(newindex) 92 | { 93 | 94 | } 95 | 96 | API(len) 97 | { 98 | 99 | } 100 | 101 | API(unm) 102 | { 103 | 104 | } 105 | 106 | API_M(meta) 107 | { 108 | 109 | { NULL, NULL } 110 | }; 111 | 112 | void API_N(reg)() 113 | { 114 | 115 | } -------------------------------------------------------------------------------- /src/api/geolocation_handler.c: -------------------------------------------------------------------------------- 1 | #include "../luacef.h" 2 | 3 | #include "include/capi/cef_base_capi.h" 4 | #include "include/capi/cef_browser_capi.h" 5 | 6 | // implement 7 | 8 | typedef struct lua_geolocation_callback { 9 | 10 | cef_base_ref_counted_t base; 11 | 12 | void(CEF_CALLBACK* cont)(struct _cef_geolocation_callback_t* self, int allow); 13 | 14 | } lua_geolocation_callback; 15 | 16 | typedef struct luacef_geolocation_handler { 17 | 18 | cef_base_ref_counted_t base; 19 | 20 | int(CEF_CALLBACK* on_request_geolocation_permission)( 21 | struct _cef_geolocation_handler_t* self, 22 | struct _cef_browser_t* browser, 23 | const cef_string_t* requesting_url, 24 | int request_id, 25 | struct _cef_geolocation_callback_t* callback); 26 | 27 | void(CEF_CALLBACK* on_cancel_geolocation_permission)( 28 | struct _cef_geolocation_handler_t* self, 29 | struct _cef_browser_t* browser, 30 | int request_id); 31 | 32 | } luacef_geolocation_handler; 33 | -------------------------------------------------------------------------------- /src/api/resource_bunble_handler.c: -------------------------------------------------------------------------------- 1 | #include "../luacef.h" 2 | 3 | typedef struct luacef_resource_bundle_handler { 4 | 5 | cef_base_t base; 6 | 7 | int (CEF_CALLBACK *get_localized_string)( 8 | struct luacef_resource_bundle_handler* self, 9 | int string_id, 10 | cef_string_t* string); 11 | 12 | int (CEF_CALLBACK *get_data_resource)( 13 | struct luacef_resource_bundle_handler* self, 14 | int resource_id, 15 | void** data, 16 | size_t* data_size); 17 | 18 | int (CEF_CALLBACK *get_data_resource_for_scale)( 19 | struct luacef_resource_bundle_handler* self, 20 | int resource_id, 21 | cef_scale_factor_t scale_factor, 22 | void** data, 23 | size_t* data_size); 24 | 25 | lua_State *L; 26 | int ref; 27 | 28 | } luacef_resource_bundle_handler; 29 | 30 | const char 31 | *_rbh_get_localized_string = "LocalizedString", 32 | *_rbh_get_data_resource = "DataResource", 33 | *_rbh_get_data_resource_for_scale = "DataResourceForScale"; 34 | 35 | int CEF_CALLBACK rbh_get_localized_string( 36 | struct luacef_resource_bundle_handler* self, 37 | int string_id, 38 | cef_string_t* string) 39 | { 40 | return 0; 41 | } 42 | 43 | int CEF_CALLBACK rbh_get_data_resource( 44 | struct luacef_resource_bundle_handler* self, 45 | int resource_id, 46 | void** data, 47 | size_t* data_size) 48 | { 49 | return 0; 50 | } 51 | 52 | int CEF_CALLBACK rbh_get_data_resource_for_scale( 53 | struct luacef_resource_bundle_handler* self, 54 | int resource_id, 55 | cef_scale_factor_t scale_factor, 56 | void** data, 57 | size_t* data_size) 58 | { 59 | return 0; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/api/ssl_info.c: -------------------------------------------------------------------------------- 1 | #include "../luacef.h" 2 | #include "include/capi/cef_ssl_info_capi.h" 3 | 4 | #define API(fn) \ 5 | LCEF_API(SSLInfo, fn) 6 | 7 | #define API_N(fn) \ 8 | LCEF_API_N(SSLInfo, fn) 9 | 10 | #define API_M(mname) \ 11 | LCEF_M(SSLInfo, mname) 12 | 13 | #define SELF luacef_SSLInfo 14 | 15 | typedef cef_sslinfo_t SELF; 16 | 17 | 18 | API(GetCertStatus) 19 | { 20 | SELF *p = luacef_toudata(L, 1); 21 | 22 | cef_cert_status_t ret = p->get_cert_status(p); 23 | 24 | lua_pushinteger(L, ret); 25 | return 1; 26 | } 27 | 28 | API(GetX509Certificate) 29 | { 30 | SELF *p = luacef_toudata(L, 1); 31 | 32 | cef_x509certificate_t *ret = p->get_x509certificate(p); 33 | 34 | luacef_pushudata(L, ret, __CefX509Certificate); 35 | return 1; 36 | } 37 | 38 | API(unm) 39 | { 40 | SELF *p = luacef_toudata(L, 1); 41 | 42 | lua_pushlightuserdata(L, p); 43 | return 1; 44 | } 45 | 46 | API(len) 47 | { 48 | lua_pushinteger(L, sizeof(SELF)); 49 | return 1; 50 | } 51 | 52 | API_M(meta) 53 | { 54 | { "GetCertStatus", API_N(GetCertStatus) }, 55 | { "GetX509Certificate", API_N(GetX509Certificate) }, 56 | 57 | { "__len", API_N(len) }, 58 | { "__unm", API_N(unm) }, 59 | 60 | { NULL, NULL } 61 | }; 62 | 63 | // static functions ========================================== 64 | 65 | /* 66 | IsCertStatusError( 67 | status 68 | ) 69 | */ 70 | static int luacef_IsCertStatusError(lua_State* L) 71 | { 72 | cef_cert_status_t stt = lua_tointeger(L, 1); 73 | 74 | int ret = cef_is_cert_status_error(stt); 75 | 76 | lua_pushinteger(L, ret); 77 | return 1; 78 | } 79 | 80 | /* 81 | IsCertStatusMinorError( 82 | status 83 | ) 84 | */ 85 | static int luacef_IsCertStatusMinorError(lua_State* L) 86 | { 87 | cef_cert_status_t stt = lua_tointeger(L, 1); 88 | 89 | int ret = cef_is_cert_status_minor_error(stt); 90 | 91 | lua_pushinteger(L, ret); 92 | return 1; 93 | } 94 | 95 | // ================================================== 96 | 97 | void API_N(reg)(lua_State *L) 98 | { 99 | luaL_newmetatable(L, "CefSSLInfo"); 100 | luaL_setfuncs(L, API_N(meta), 0); 101 | lua_setfield(L, -1, __index__); 102 | 103 | lua_pushcfunction(L, luacef_IsCertStatusError); 104 | lua_setfield(L, -2, "IsCertStatusError"); 105 | 106 | lua_pushcfunction(L, luacef_IsCertStatusMinorError); 107 | lua_setfield(L, -2, "IsCertStatusMinorError"); 108 | } -------------------------------------------------------------------------------- /src/api/string_map.c: -------------------------------------------------------------------------------- 1 | #include "../luacef.h" 2 | #include "include/internal/cef_string_map.h" 3 | 4 | static const char __string_map__[] = "CefStringMap"; 5 | 6 | typedef struct { 7 | cef_string_map_t self; 8 | int ref; 9 | } CefStringMap; 10 | 11 | static int luacef_StringMap_totable(lua_State *L) 12 | { 13 | CefStringMap *map = luacef_alloct(CefStringMap); 14 | map->self = cef_string_map_alloc(); 15 | 16 | lua_newtable(L); 17 | 18 | return 1; 19 | } 20 | 21 | 22 | int luacef_StringMap_new(lua_State *L) 23 | { 24 | CefStringMap *map = luacef_alloct(CefStringMap); 25 | map->self = cef_string_map_alloc(); 26 | 27 | // cef_string_map_alloc; 28 | 29 | 30 | luacef_pushudata(L, map, __string_map__); 31 | return 1; 32 | } 33 | 34 | 35 | 36 | int luacef_StringMap_index(lua_State *L) 37 | { 38 | cef_string_map_t map = luacef_toudata(L, 1); 39 | 40 | if (lua_isinteger(L, 2)) { 41 | 42 | 43 | 44 | } 45 | else if (lua_isstring(L, 2)) { 46 | 47 | 48 | 49 | } 50 | 51 | return 1; 52 | } 53 | 54 | int luacef_StringMap_unm(lua_State *L) 55 | { 56 | cef_string_map_t map = luacef_toudata(L, 1); 57 | 58 | lua_pushlightuserdata(L, map); 59 | return 1; 60 | } 61 | 62 | 63 | 64 | 65 | // ================================================== 66 | 67 | static const luaL_Reg luacef_StringMap_meta[] = { 68 | { "__index", luacef_StringMap_index }, 69 | { "__call", luacef_StringMap_index }, 70 | { "__unm", luacef_StringMap_unm }, 71 | { NULL, NULL } 72 | }; 73 | 74 | void luacef_StringMap_reg(lua_State *L) 75 | { 76 | luaL_newmetatable(L, __string_map__); 77 | luaL_setfuncs(L, luacef_StringMap_meta, 0); 78 | lua_pop(L, 1); 79 | 80 | lua_pushcfunction(L, luacef_StringMap_new); 81 | lua_setfield(L, -2, "newStringMap"); 82 | } -------------------------------------------------------------------------------- /src/base/base.c: -------------------------------------------------------------------------------- 1 | #include "../luacef.h" 2 | #include "include/capi/cef_app_capi.h" 3 | #include "include/capi/cef_base_capi.h" 4 | 5 | #define DEBUG_REFERENCE_COUNTING 0 6 | // Print only the first execution of the callback, 7 | // ignore the subsequent. 8 | #define DEBUG_CALLBACK(x) { \ 9 | static int first_call = 1; \ 10 | if (first_call == 1) { \ 11 | first_call = 0; \ 12 | printf(x); \ 13 | } \ 14 | } 15 | 16 | void CEF_CALLBACK add_ref(cef_base_t* self) { 17 | DEBUG_CALLBACK("cef_base_ref_counted_t.add_ref\n"); 18 | if (DEBUG_REFERENCE_COUNTING) 19 | printf("+"); 20 | } 21 | 22 | int CEF_CALLBACK release(cef_base_t* self) { 23 | DEBUG_CALLBACK("cef_base_ref_counted_t.release\n"); 24 | if (DEBUG_REFERENCE_COUNTING) 25 | printf("-"); 26 | return 1; 27 | } 28 | 29 | int CEF_CALLBACK has_one_ref(cef_base_t* self) { 30 | DEBUG_CALLBACK("cef_base_ref_counted_t.has_one_ref\n"); 31 | if (DEBUG_REFERENCE_COUNTING) 32 | printf("="); 33 | return 1; 34 | } 35 | 36 | void initialize_cef_base_ref_counted(cef_base_t* base) { 37 | printf("initialize_cef_base_ref_counted\n"); 38 | // Check if "size" member was set. 39 | size_t size = base->size; 40 | // Let's print the size in case sizeof was used 41 | // on a pointer instead of a structure. In such 42 | // case the number will be very high. 43 | printf("cef_base_ref_counted_t.size = %lu\n", (unsigned long)size); 44 | if (size <= 0) { 45 | printf("FATAL: initialize_cef_base failed, size member not set\n"); 46 | //_exit(1); 47 | } 48 | base->add_ref = add_ref; 49 | base->release = release; 50 | base->has_one_ref = has_one_ref; 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/ultils/string.c: -------------------------------------------------------------------------------- 1 | #include "../luacef.h" 2 | 3 | #if defined(WIN32) || (_WIN32) 4 | 5 | #define CP_UTF8 65001 6 | 7 | LPVOID __stdcall CoTaskMemAlloc(SIZE_T cb); 8 | void __stdcall CoTaskMemFree(LPVOID pv); 9 | 10 | // to wchar_t* 11 | const wchar_t *lua_towlstring(lua_State *L, int idx, int *len) 12 | { 13 | if (lua_isnoneornil(L, idx)) return L""; 14 | const char *s = lua_tolstring(L, idx, len); 15 | int size = MultiByteToWideChar(CP_UTF8, 0, s, -1, 0, 0); 16 | wchar_t *ws = (wchar_t *)CoTaskMemAlloc(size * sizeof(wchar_t)); 17 | MultiByteToWideChar(CP_UTF8, 0, s, -1, ws, size); 18 | return ws; 19 | } 20 | 21 | // push wchar_t* 22 | void lua_pushwstring(lua_State *L, wchar_t *ts) { 23 | int size = WideCharToMultiByte(CP_UTF8, 0, ts, -1, /* s */ 0, /* size */ 0, 0, 0); 24 | char *s = (char*)calloc(size, sizeof(char)); 25 | WideCharToMultiByte(CP_UTF8, 0, ts, -1, s, size, 0, 0); 26 | lua_pushstring(L, s); 27 | free(s); 28 | } 29 | 30 | // clear wchar_t* 31 | void lua_clearwstring(wchar_t *ws) { 32 | CoTaskMemFree(ws); 33 | } 34 | 35 | #else 36 | 37 | // to wchar_t* via cefstring 38 | const wchar_t *lua_tolwstring(lua_State *L, int i, int *len) 39 | { 40 | const char *cs = lua_tolstring(L, i, len); 41 | cef_string_t s = { 0 }; 42 | cef_string_utf8_to_utf16(cs, strlen(cs), &s); 43 | return s.str; 44 | } 45 | 46 | // push wchar_t* via cefstring 47 | void lua_pushwstring(lua_State *L, wchar_t *wcs) 48 | { 49 | cef_string_utf8_t s = { 0 }; 50 | cef_string_wide_to_utf8(wcs, wcslen(wcs), &s); 51 | 52 | lua_pushstring(L, s.str); 53 | } 54 | 55 | #endif 56 | 57 | // to cefstring 58 | cef_string_t luacef_tostring(lua_State *L, int i) 59 | { 60 | int len; 61 | const char *cs = lua_tolstring(L, i, &len); 62 | 63 | cef_string_t s = { 0 }; 64 | cef_string_from_utf8(cs, len, &s); 65 | 66 | return s; 67 | } 68 | 69 | // push cefstring* 70 | void luacef_pushstring(lua_State* L, cef_string_t *s) 71 | { 72 | int len = s->length; 73 | 74 | char *buf = malloc(len+1); 75 | wcstombs(buf, s->str, len); 76 | buf[len] = '\0'; 77 | 78 | lua_pushstring(L, buf); 79 | free(buf); 80 | 81 | //cef_string_utf8_t src = { 0 }; 82 | //cef_string_to_utf8(s->str, s->length, &src); 83 | //lua_pushstring(L, src.str); 84 | } 85 | 86 | // push cef_string_free 87 | void luacef_pushstring_free(lua_State* L, cef_string_userfree_t s) 88 | { 89 | int len = s->length; 90 | 91 | char *buf = malloc(len + 1); 92 | wcstombs(buf, s->str, len); 93 | buf[len] = '\0'; 94 | 95 | lua_pushstring(L, buf); 96 | free(buf); 97 | cef_string_userfree_free(s); 98 | 99 | //cef_string_utf8_t src = { 0 }; 100 | //cef_string_utf16_to_utf8(s->str, s->length, &src); 101 | //lua_pushstring(L, src.str); 102 | //cef_string_userfree_free(s); 103 | } 104 | --------------------------------------------------------------------------------