├── 3rd ├── cef │ ├── include │ │ ├── capi │ │ │ ├── cef_app_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_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_focus_handler_capi.h │ │ │ ├── cef_frame_capi.h │ │ │ ├── cef_geolocation_capi.h │ │ │ ├── cef_geolocation_handler_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_origin_whitelist_capi.h │ │ │ ├── cef_path_util_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_handler_capi.h │ │ │ ├── cef_resource_bundle_handler_capi.h │ │ │ ├── cef_resource_handler_capi.h │ │ │ ├── cef_response_capi.h │ │ │ ├── cef_scheme_capi.h │ │ │ ├── cef_stream_capi.h │ │ │ ├── cef_string_visitor_capi.h │ │ │ ├── cef_task_capi.h │ │ │ ├── cef_trace_capi.h │ │ │ ├── cef_url_capi.h │ │ │ ├── cef_urlrequest_capi.h │ │ │ ├── cef_v8_capi.h │ │ │ ├── cef_values_capi.h │ │ │ ├── cef_web_plugin_capi.h │ │ │ ├── cef_xml_reader_capi.h │ │ │ └── cef_zip_reader_capi.h │ │ ├── cef_app.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_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_focus_handler.h │ │ ├── cef_frame.h │ │ ├── cef_geolocation.h │ │ ├── cef_geolocation_handler.h │ │ ├── cef_jsdialog_handler.h │ │ ├── cef_keyboard_handler.h │ │ ├── cef_life_span_handler.h │ │ ├── cef_load_handler.h │ │ ├── cef_menu_model.h │ │ ├── cef_origin_whitelist.h │ │ ├── cef_pack_resources.h │ │ ├── cef_pack_strings.h │ │ ├── cef_path_util.h │ │ ├── cef_process_message.h │ │ ├── cef_process_util.h │ │ ├── cef_render_handler.h │ │ ├── cef_render_process_handler.h │ │ ├── cef_request.h │ │ ├── cef_request_handler.h │ │ ├── cef_resource_bundle_handler.h │ │ ├── cef_resource_handler.h │ │ ├── cef_response.h │ │ ├── cef_runnable.h │ │ ├── cef_scheme.h │ │ ├── cef_stream.h │ │ ├── cef_string_visitor.h │ │ ├── cef_task.h │ │ ├── cef_trace.h │ │ ├── cef_trace_event.h │ │ ├── cef_url.h │ │ ├── cef_urlrequest.h │ │ ├── cef_v8.h │ │ ├── cef_values.h │ │ ├── cef_version.h │ │ ├── cef_web_plugin.h │ │ ├── cef_xml_reader.h │ │ ├── cef_zip_reader.h │ │ ├── internal │ │ │ ├── cef_build.h │ │ │ ├── cef_export.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_time.h │ │ │ ├── cef_tuple.h │ │ │ ├── cef_types.h │ │ │ ├── cef_types_win.h │ │ │ ├── cef_types_wrappers.h │ │ │ └── cef_win.h │ │ └── wrapper │ │ │ ├── cef_byte_read_handler.h │ │ │ ├── cef_stream_resource_handler.h │ │ │ ├── cef_xml_object.h │ │ │ └── cef_zip_archive.h │ └── libs │ │ ├── d3dcompiler_43.dll │ │ ├── d3dcompiler_46.dll │ │ ├── debug │ │ └── libcef_dll_wrapper.lib │ │ ├── ffmpegsumo.dll │ │ ├── icudt.dll │ │ ├── libEGL.dll │ │ ├── libGLESv2.dll │ │ ├── libcef.dll │ │ ├── libcef.lib │ │ ├── libcef_dll_wrapper.lib │ │ └── locales │ │ ├── am.pak │ │ ├── ar.pak │ │ ├── bg.pak │ │ ├── bn.pak │ │ ├── ca.pak │ │ ├── cs.pak │ │ ├── da.pak │ │ ├── de.pak │ │ ├── el.pak │ │ ├── en-GB.pak │ │ ├── en-US.pak │ │ ├── es-419.pak │ │ ├── es.pak │ │ ├── et.pak │ │ ├── fa.pak │ │ ├── fi.pak │ │ ├── fil.pak │ │ ├── fr.pak │ │ ├── gu.pak │ │ ├── he.pak │ │ ├── hi.pak │ │ ├── hr.pak │ │ ├── hu.pak │ │ ├── id.pak │ │ ├── it.pak │ │ ├── ja.pak │ │ ├── kn.pak │ │ ├── ko.pak │ │ ├── lt.pak │ │ ├── lv.pak │ │ ├── ml.pak │ │ ├── mr.pak │ │ ├── ms.pak │ │ ├── nb.pak │ │ ├── nl.pak │ │ ├── pl.pak │ │ ├── pt-BR.pak │ │ ├── pt-PT.pak │ │ ├── ro.pak │ │ ├── ru.pak │ │ ├── sk.pak │ │ ├── sl.pak │ │ ├── sr.pak │ │ ├── sv.pak │ │ ├── sw.pak │ │ ├── ta.pak │ │ ├── te.pak │ │ ├── th.pak │ │ ├── tr.pak │ │ ├── uk.pak │ │ ├── vi.pak │ │ ├── zh-CN.pak │ │ └── zh-TW.pak └── glog │ ├── include │ ├── log_severity.h │ ├── logging.h │ ├── raw_logging.h │ ├── stl_logging.h │ └── vlog_is_on.h │ ├── libs │ ├── libglog.dll │ ├── libglog.lib │ └── libglog.pdb │ └── source │ └── glog-0.3.3 │ ├── AUTHORS │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── README.windows │ ├── aclocal.m4 │ ├── compile │ ├── config.guess │ ├── config.sub │ ├── configure │ ├── configure.ac │ ├── depcomp │ ├── google-glog.sln │ ├── install-sh │ ├── libglog.pc.in │ ├── ltmain.sh │ ├── missing │ └── mkinstalldirs ├── BundleTestor ├── BundleTestor.cpp ├── BundleTestor.h ├── BundleTestor.vcproj ├── ReadMe.txt ├── dllmain.cpp ├── dllmain.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── CPTF.sln ├── README.md ├── config ├── bundles.xml └── services.xml ├── core ├── StdLibInclude.h ├── StringDefine.h ├── TypeDefine.h ├── core.vcproj ├── service │ ├── AutoObject.h │ ├── BundleConfig.h │ ├── BundleContainer.h │ ├── CpftBase.h │ ├── CptfDllModuleT.h │ ├── CptfModule.h │ ├── CptfModuleT.h │ ├── DefaultServiceImpl.h │ ├── IDispatch.h │ ├── IDispatchImpl.h │ ├── IService.h │ ├── ObjectRoot.h │ ├── ServiceClassFactory.h │ ├── ServiceCoClass.h │ ├── ServiceConfig.h │ ├── ServiceConfigs.h │ ├── ServiceContainer.h │ ├── ServiceCreator.h │ ├── ServiceObject.h │ ├── ServicesCache.h │ ├── SystemOperation.h │ ├── ThreadModel.h │ └── WinDllCreator.h └── utils │ ├── ApplicationPath.h │ ├── CastsUtils.h │ ├── IXmlParser.h │ ├── Log.h │ ├── MetaObject.h │ ├── OS.h │ ├── StringUtils.cpp │ ├── StringUtils.h │ └── mian.cpp ├── demo ├── AlloyTimer │ ├── AlloyTimer-master │ │ ├── README.md │ │ ├── audio │ │ │ └── ring.mp3 │ │ ├── index.html │ │ ├── js │ │ │ ├── core.js │ │ │ ├── jx │ │ │ │ ├── jx.base.js │ │ │ │ ├── jx.browser.js │ │ │ │ ├── jx.cookie.js │ │ │ │ ├── jx.core.js │ │ │ │ ├── jx.date.js │ │ │ │ ├── jx.dom.js │ │ │ │ ├── jx.event.js │ │ │ │ ├── jx.format.js │ │ │ │ ├── jx.fx.js │ │ │ │ ├── jx.http.js │ │ │ │ ├── jx.json.js │ │ │ │ ├── jx.loader.js │ │ │ │ ├── jx.nfx.js │ │ │ │ ├── jx.sound.js │ │ │ │ ├── jx.swfobject.js │ │ │ │ └── swf │ │ │ │ │ ├── expressInstall.swf │ │ │ │ │ └── jxswfsound.swf │ │ │ └── tomato.js │ │ └── style │ │ │ └── main.css │ ├── AlloyTimer.cpp │ ├── AlloyTimer.h │ ├── AlloyTimer.ico │ ├── AlloyTimer.rc │ ├── AlloyTimer.vcproj │ ├── ReadMe.txt │ ├── Resource.h │ ├── debug.log │ ├── small.ico │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── AppDemo │ ├── AppDemo.cpp │ ├── AppDemo.h │ ├── AppDemo.ico │ ├── AppDemo.rc │ ├── AppDemo.vcproj │ ├── BindJsProcessMsgDelegate.cpp │ ├── BindJsProcessMsgDelegate.h │ ├── DailogProcessMsgDelegate.cpp │ ├── DailogProcessMsgDelegate.h │ ├── EditorProcessMsgDelegate.cpp │ ├── EditorProcessMsgDelegate.h │ ├── ReadMe.txt │ ├── Resource.h │ ├── debug.log │ ├── services.xml │ ├── small.ico │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── GameDemo │ ├── GameMain │ │ ├── BattleMannager.cpp │ │ ├── BattleMannager.h │ │ ├── GameMain.cpp │ │ ├── GameMain.vcproj │ │ ├── ReadMe.txt │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── targetver.h │ ├── Role │ │ ├── Dumesa.h │ │ ├── Hero.h │ │ ├── ReadMe.txt │ │ ├── Role.cpp │ │ ├── Role.h │ │ ├── Role.vcproj │ │ ├── Tiger.h │ │ ├── Wolf.h │ │ ├── dllmain.cpp │ │ ├── dllmain.h │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── targetver.h │ └── Weapon │ │ ├── ReadMe.txt │ │ ├── Weapon.cpp │ │ ├── Weapon.vcproj │ │ ├── dllmain.cpp │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── targetver.h ├── MarkdownEditor │ ├── MarkdownEditor.cpp │ ├── MarkdownEditor.h │ ├── MarkdownEditor.ico │ ├── MarkdownEditor.rc │ ├── MarkdownEditor.vcproj │ ├── ReadMe.txt │ ├── Resource.h │ ├── small.ico │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── WtlDemo │ ├── AboutDlg.h │ ├── MainDlg.h │ ├── WtlDemo.aps │ ├── WtlDemo.cpp │ ├── WtlDemo.h │ ├── WtlDemo.rc │ ├── WtlDemo.vcproj │ ├── resource.h │ ├── services.xml │ ├── stdafx.cpp │ └── stdafx.h ├── resource ├── MarkdownEditor │ ├── js │ │ ├── jquery.js │ │ ├── markdowneditor.js │ │ └── marked.js │ └── makedown.html ├── binding.html ├── css │ └── jquery-ui-1.10.4.custom.min.css ├── index.html └── js │ ├── editor.js │ ├── jquery-ui-1.10.4.custom.min.js │ └── jquery.js ├── tools └── GUIDGenerator.py ├── ui └── AppWindow │ ├── AppWindow.aps │ ├── AppWindow.cpp │ ├── AppWindow.h │ ├── AppWindow.rc │ ├── AppWindow.vcproj │ ├── CefProcess.cpp │ ├── CefProcess.h │ ├── ClientApp.cpp │ ├── ClientApp.h │ ├── ClientV8Handler.cpp │ ├── ClientV8Handler.h │ ├── IAppWindow.h │ ├── MainWindowClient.cpp │ ├── MainWindowClient.h │ ├── ProcessMessageDelegate.cpp │ ├── ProcessMessageDelegate.h │ ├── ReadMe.txt │ ├── RunFileDialogCallback.cpp │ ├── RunFileDialogCallback.h │ ├── SetList.h │ ├── WinMainWindowCreator.h │ ├── WinWidgetProcess.cpp │ ├── WinWidgetProcess.h │ ├── dllmain.cpp │ ├── dllmain.h │ ├── resource.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── utils ├── IO ├── FileReader.h ├── IO.cpp ├── IO.vcproj ├── IWinMappingFile.h ├── MappingFileReader.cpp ├── MappingFileReader.h ├── ReadMe.txt ├── dllmain.cpp ├── stdafx.cpp ├── stdafx.h └── targetver.h └── log ├── Glogger.cpp ├── Glogger.h ├── Logger.h ├── ReadMe.txt ├── dllmain.cpp ├── log.cpp ├── log.vcproj ├── stdafx.cpp ├── stdafx.h └── targetver.h /3rd/cef/include/capi/cef_base_capi.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 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 | #ifndef CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ 32 | #define CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | #include "include/internal/cef_export.h" 39 | #include "include/internal/cef_string.h" 40 | #include "include/internal/cef_string_list.h" 41 | #include "include/internal/cef_string_map.h" 42 | #include "include/internal/cef_string_multimap.h" 43 | #include "include/internal/cef_types.h" 44 | 45 | /// 46 | // Structure defining the reference count implementation functions. All 47 | // framework structures must include the cef_base_t structure first. 48 | /// 49 | typedef struct _cef_base_t { 50 | /// 51 | // Size of the data structure. 52 | /// 53 | size_t size; 54 | 55 | /// 56 | // Increment the reference count. 57 | /// 58 | int (CEF_CALLBACK *add_ref)(struct _cef_base_t* self); 59 | 60 | /// 61 | // Decrement the reference count. Delete this object when no references 62 | // remain. 63 | /// 64 | int (CEF_CALLBACK *release)(struct _cef_base_t* self); 65 | 66 | /// 67 | // Returns the current number of references. 68 | /// 69 | int (CEF_CALLBACK *get_refct)(struct _cef_base_t* self); 70 | } cef_base_t; 71 | 72 | 73 | // Check that the structure |s|, which is defined with a cef_base_t member named 74 | // |base|, is large enough to contain the specified member |f|. 75 | #define CEF_MEMBER_EXISTS(s, f) \ 76 | ((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= (s)->base.size) 77 | 78 | #define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f)) 79 | 80 | 81 | #ifdef __cplusplus 82 | } 83 | #endif 84 | 85 | #endif // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ 86 | -------------------------------------------------------------------------------- /3rd/cef/include/capi/cef_callback_capi.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 | // 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 | 37 | #ifndef CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 38 | #define CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 39 | #pragma once 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | #include "include/capi/cef_base_capi.h" 46 | 47 | 48 | /// 49 | // Generic callback structure used for asynchronous continuation. 50 | /// 51 | typedef struct _cef_callback_t { 52 | /// 53 | // Base structure. 54 | /// 55 | cef_base_t base; 56 | 57 | /// 58 | // Continue processing. 59 | /// 60 | void (CEF_CALLBACK *cont)(struct _cef_callback_t* self); 61 | 62 | /// 63 | // Cancel processing. 64 | /// 65 | void (CEF_CALLBACK *cancel)(struct _cef_callback_t* self); 66 | } cef_callback_t; 67 | 68 | 69 | /// 70 | // Generic callback structure used for asynchronous completion. 71 | /// 72 | typedef struct _cef_completion_handler_t { 73 | /// 74 | // Base structure. 75 | /// 76 | cef_base_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_handler_t* self); 82 | } cef_completion_handler_t; 83 | 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 90 | -------------------------------------------------------------------------------- /3rd/cef/include/capi/cef_drag_handler_capi.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 | // 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 | 37 | #ifndef CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ 38 | #define CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ 39 | #pragma once 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | #include "include/capi/cef_base_capi.h" 46 | 47 | 48 | /// 49 | // Implement this structure to handle events related to dragging. The functions 50 | // of this structure will be called on the UI thread. 51 | /// 52 | typedef struct _cef_drag_handler_t { 53 | /// 54 | // Base structure. 55 | /// 56 | cef_base_t base; 57 | 58 | /// 59 | // Called when an external drag event enters the browser window. |dragData| 60 | // contains the drag event data and |mask| represents the type of drag 61 | // operation. Return false (0) for default drag handling behavior or true (1) 62 | // to cancel the drag event. 63 | /// 64 | int (CEF_CALLBACK *on_drag_enter)(struct _cef_drag_handler_t* self, 65 | struct _cef_browser_t* browser, struct _cef_drag_data_t* dragData, 66 | enum cef_drag_operations_mask_t mask); 67 | } cef_drag_handler_t; 68 | 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ 75 | -------------------------------------------------------------------------------- /3rd/cef/include/capi/cef_geolocation_capi.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 | // 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 | 37 | #ifndef CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_ 38 | #define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_ 39 | #pragma once 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | #include "include/capi/cef_base_capi.h" 46 | 47 | 48 | /// 49 | // Request a one-time geolocation update. This function bypasses any user 50 | // permission checks so should only be used by code that is allowed to access 51 | // location information. 52 | /// 53 | CEF_EXPORT int cef_get_geolocation( 54 | struct _cef_get_geolocation_callback_t* callback); 55 | 56 | /// 57 | // Implement this structure to receive geolocation updates. The functions of 58 | // this structure will be called on the browser process UI thread. 59 | /// 60 | typedef struct _cef_get_geolocation_callback_t { 61 | /// 62 | // Base structure. 63 | /// 64 | cef_base_t base; 65 | 66 | /// 67 | // Called with the 'best available' location information or, if the location 68 | // update failed, with error information. 69 | /// 70 | void (CEF_CALLBACK *on_location_update)( 71 | struct _cef_get_geolocation_callback_t* self, 72 | const struct _cef_geoposition_t* position); 73 | } cef_get_geolocation_callback_t; 74 | 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif // CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_ 81 | -------------------------------------------------------------------------------- /3rd/cef/include/capi/cef_path_util_capi.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 | // 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 | 37 | #ifndef CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 38 | #define CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 39 | #pragma once 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | #include "include/capi/cef_base_capi.h" 46 | 47 | 48 | /// 49 | // Retrieve the path associated with the specified |key|. Returns true (1) on 50 | // success. Can be called on any thread in the browser process. 51 | /// 52 | CEF_EXPORT int cef_get_path(enum cef_path_key_t key, cef_string_t* path); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 59 | -------------------------------------------------------------------------------- /3rd/cef/include/capi/cef_process_util_capi.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 | // 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 | 37 | #ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 38 | #define CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 39 | #pragma once 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | #include "include/capi/cef_base_capi.h" 46 | 47 | 48 | /// 49 | // Launches the process specified via |command_line|. Returns true (1) upon 50 | // success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. 51 | // 52 | // Unix-specific notes: - All file descriptors open in the parent process will 53 | // be closed in the 54 | // child process except for stdin, stdout, and stderr. 55 | // - If the first argument on the command line does not contain a slash, 56 | // PATH will be searched. (See man execvp.) 57 | /// 58 | CEF_EXPORT int cef_launch_process(struct _cef_command_line_t* command_line); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 65 | -------------------------------------------------------------------------------- /3rd/cef/include/capi/cef_string_visitor_capi.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 | // 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 | 37 | #ifndef CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 38 | #define CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 39 | #pragma once 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | #include "include/capi/cef_base_capi.h" 46 | 47 | 48 | /// 49 | // Implement this structure to receive string values asynchronously. 50 | /// 51 | typedef struct _cef_string_visitor_t { 52 | /// 53 | // Base structure. 54 | /// 55 | cef_base_t base; 56 | 57 | /// 58 | // Method that will be executed. 59 | /// 60 | void (CEF_CALLBACK *visit)(struct _cef_string_visitor_t* self, 61 | const cef_string_t* string); 62 | } cef_string_visitor_t; 63 | 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 70 | -------------------------------------------------------------------------------- /3rd/cef/include/capi/cef_url_capi.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 | // 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 | 37 | #ifndef CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_ 38 | #define CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_ 39 | #pragma once 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | #include "include/capi/cef_base_capi.h" 46 | 47 | 48 | /// 49 | // Parse the specified |url| into its component parts. Returns false (0) if the 50 | // URL is NULL or invalid. 51 | /// 52 | CEF_EXPORT int cef_parse_url(const cef_string_t* url, 53 | struct _cef_urlparts_t* parts); 54 | 55 | /// 56 | // Creates a URL from the specified |parts|, which must contain a non-NULL spec 57 | // or a non-NULL host and path (at a minimum), but not both. Returns false (0) 58 | // if |parts| isn't initialized as described. 59 | /// 60 | CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts, 61 | cef_string_t* url); 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif // CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_ 68 | -------------------------------------------------------------------------------- /3rd/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 CefBase { 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 CefCompletionHandler : public virtual CefBase { 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 | -------------------------------------------------------------------------------- /3rd/cef/include/cef_drag_handler.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_DRAG_HANDLER_H_ 38 | #define CEF_INCLUDE_CEF_DRAG_HANDLER_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | #include "include/cef_drag_data.h" 43 | #include "include/cef_browser.h" 44 | 45 | /// 46 | // Implement this interface to handle events related to dragging. The methods of 47 | // this class will be called on the UI thread. 48 | /// 49 | /*--cef(source=client)--*/ 50 | class CefDragHandler : public virtual CefBase { 51 | public: 52 | typedef cef_drag_operations_mask_t DragOperationsMask; 53 | 54 | /// 55 | // Called when an external drag event enters the browser window. |dragData| 56 | // contains the drag event data and |mask| represents the type of drag 57 | // operation. Return false for default drag handling behavior or true to 58 | // cancel the drag event. 59 | /// 60 | /*--cef()--*/ 61 | virtual bool OnDragEnter(CefRefPtr browser, 62 | CefRefPtr dragData, 63 | DragOperationsMask mask) { return false; } 64 | }; 65 | 66 | #endif // CEF_INCLUDE_CEF_DRAG_HANDLER_H_ 67 | -------------------------------------------------------------------------------- /3rd/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 CefBase { 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 | -------------------------------------------------------------------------------- /3rd/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 | -------------------------------------------------------------------------------- /3rd/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 | -------------------------------------------------------------------------------- /3rd/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 CefBase { 47 | public: 48 | /// 49 | // Method that will be executed. 50 | /// 51 | /*--cef()--*/ 52 | virtual void Visit(const CefString& string) =0; 53 | }; 54 | 55 | #endif // CEF_INCLUDE_CEF_STRING_VISITOR_H_ 56 | -------------------------------------------------------------------------------- /3rd/cef/include/cef_url.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_URL_H_ 38 | #define CEF_INCLUDE_CEF_URL_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | 43 | /// 44 | // Parse the specified |url| into its component parts. 45 | // Returns false if the URL is empty or invalid. 46 | /// 47 | /*--cef()--*/ 48 | bool CefParseURL(const CefString& url, 49 | CefURLParts& parts); 50 | 51 | /// 52 | // Creates a URL from the specified |parts|, which must contain a non-empty 53 | // spec or a non-empty host and path (at a minimum), but not both. 54 | // Returns false if |parts| isn't initialized as described. 55 | /// 56 | /*--cef()--*/ 57 | bool CefCreateURL(const CefURLParts& parts, 58 | CefString& url); 59 | 60 | #endif // CEF_INCLUDE_CEF_URL_H_ 61 | -------------------------------------------------------------------------------- /3rd/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/internal/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 | #define CEF_CALLBACK __stdcall 47 | 48 | #elif defined(COMPILER_GCC) 49 | 50 | #define CEF_EXPORT __attribute__ ((visibility("default"))) 51 | #define CEF_CALLBACK 52 | 53 | #endif // COMPILER_GCC 54 | 55 | #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 56 | -------------------------------------------------------------------------------- /3rd/cef/include/internal/cef_string_list.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 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_STRING_LIST_H_ 31 | #define CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_ 32 | #pragma once 33 | 34 | #include "include/internal/cef_export.h" 35 | #include "include/internal/cef_string.h" 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | /// 42 | // CEF string maps are a set of key/value string pairs. 43 | /// 44 | typedef void* cef_string_list_t; 45 | 46 | /// 47 | // Allocate a new string map. 48 | /// 49 | CEF_EXPORT cef_string_list_t cef_string_list_alloc(); 50 | 51 | /// 52 | // Return the number of elements in the string list. 53 | /// 54 | CEF_EXPORT int cef_string_list_size(cef_string_list_t list); 55 | 56 | /// 57 | // Retrieve the value at the specified zero-based string list index. Returns 58 | // true (1) if the value was successfully retrieved. 59 | /// 60 | CEF_EXPORT int cef_string_list_value(cef_string_list_t list, 61 | int index, cef_string_t* value); 62 | 63 | /// 64 | // Append a new value at the end of the string list. 65 | /// 66 | CEF_EXPORT void cef_string_list_append(cef_string_list_t list, 67 | const cef_string_t* value); 68 | 69 | /// 70 | // Clear the string list. 71 | /// 72 | CEF_EXPORT void cef_string_list_clear(cef_string_list_t list); 73 | 74 | /// 75 | // Free the string list. 76 | /// 77 | CEF_EXPORT void cef_string_list_free(cef_string_list_t list); 78 | 79 | /// 80 | // Creates a copy of an existing string list. 81 | /// 82 | CEF_EXPORT cef_string_list_t cef_string_list_copy(cef_string_list_t list); 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif // CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_ 89 | -------------------------------------------------------------------------------- /3rd/cef/include/wrapper/cef_byte_read_handler.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 are only available to applications that link 33 | // against the libcef_dll_wrapper target. 34 | // 35 | 36 | #ifndef CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ 37 | #define CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ 38 | #pragma once 39 | 40 | #include "include/cef_base.h" 41 | #include "include/cef_stream.h" 42 | 43 | /// 44 | // Thread safe implementation of the CefReadHandler class for reading an 45 | // in-memory array of bytes. 46 | /// 47 | class CefByteReadHandler : public CefReadHandler { 48 | public: 49 | /// 50 | // Create a new object for reading an array of bytes. An optional |source| 51 | // reference can be kept to keep the underlying data source from being 52 | // released while the reader exists. 53 | /// 54 | CefByteReadHandler(const unsigned char* bytes, 55 | size_t size, 56 | CefRefPtr source); 57 | 58 | // CefReadHandler methods. 59 | virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; 60 | virtual int Seek(int64 offset, int whence) OVERRIDE; 61 | virtual int64 Tell() OVERRIDE; 62 | virtual int Eof() OVERRIDE; 63 | 64 | private: 65 | const unsigned char* bytes_; 66 | int64 size_; 67 | int64 offset_; 68 | CefRefPtr source_; 69 | 70 | IMPLEMENT_REFCOUNTING(CefByteReadHandler); 71 | IMPLEMENT_LOCKING(CefByteReadHandler); 72 | }; 73 | 74 | #endif // CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ 75 | -------------------------------------------------------------------------------- /3rd/cef/libs/d3dcompiler_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/d3dcompiler_43.dll -------------------------------------------------------------------------------- /3rd/cef/libs/d3dcompiler_46.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/d3dcompiler_46.dll -------------------------------------------------------------------------------- /3rd/cef/libs/debug/libcef_dll_wrapper.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/debug/libcef_dll_wrapper.lib -------------------------------------------------------------------------------- /3rd/cef/libs/ffmpegsumo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/ffmpegsumo.dll -------------------------------------------------------------------------------- /3rd/cef/libs/icudt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/icudt.dll -------------------------------------------------------------------------------- /3rd/cef/libs/libEGL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/libEGL.dll -------------------------------------------------------------------------------- /3rd/cef/libs/libGLESv2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/libGLESv2.dll -------------------------------------------------------------------------------- /3rd/cef/libs/libcef.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/libcef.dll -------------------------------------------------------------------------------- /3rd/cef/libs/libcef.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/libcef.lib -------------------------------------------------------------------------------- /3rd/cef/libs/libcef_dll_wrapper.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/libcef_dll_wrapper.lib -------------------------------------------------------------------------------- /3rd/cef/libs/locales/am.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/am.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ar.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ar.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/bg.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/bg.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/bn.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/bn.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ca.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ca.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/cs.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/cs.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/da.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/da.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/de.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/de.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/el.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/el.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/en-GB.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/en-GB.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/en-US.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/en-US.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/es-419.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/es-419.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/es.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/es.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/et.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/et.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/fa.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/fa.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/fi.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/fi.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/fil.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/fil.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/fr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/fr.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/gu.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/gu.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/he.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/he.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/hi.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/hi.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/hr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/hr.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/hu.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/hu.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/id.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/id.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/it.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/it.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ja.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ja.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/kn.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/kn.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ko.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ko.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/lt.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/lt.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/lv.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/lv.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ml.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ml.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/mr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/mr.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ms.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ms.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/nb.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/nb.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/nl.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/nl.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/pl.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/pl.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/pt-BR.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/pt-BR.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/pt-PT.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/pt-PT.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ro.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ro.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ru.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ru.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/sk.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/sk.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/sl.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/sl.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/sr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/sr.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/sv.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/sv.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/sw.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/sw.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/ta.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/ta.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/te.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/te.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/th.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/th.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/tr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/tr.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/uk.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/uk.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/vi.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/vi.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/zh-CN.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/zh-CN.pak -------------------------------------------------------------------------------- /3rd/cef/libs/locales/zh-TW.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/cef/libs/locales/zh-TW.pak -------------------------------------------------------------------------------- /3rd/glog/libs/libglog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/glog/libs/libglog.dll -------------------------------------------------------------------------------- /3rd/glog/libs/libglog.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/glog/libs/libglog.lib -------------------------------------------------------------------------------- /3rd/glog/libs/libglog.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/glog/libs/libglog.pdb -------------------------------------------------------------------------------- /3rd/glog/source/glog-0.3.3/AUTHORS: -------------------------------------------------------------------------------- 1 | opensource@google.com 2 | 3 | -------------------------------------------------------------------------------- /3rd/glog/source/glog-0.3.3/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/3rd/glog/source/glog-0.3.3/NEWS -------------------------------------------------------------------------------- /3rd/glog/source/glog-0.3.3/README: -------------------------------------------------------------------------------- 1 | This repository contains a C++ implementation of the Google logging 2 | module. Documentation for the implementation is in doc/. 3 | 4 | See INSTALL for (generic) installation instructions for C++: basically 5 | ./configure && make && make install 6 | -------------------------------------------------------------------------------- /3rd/glog/source/glog-0.3.3/README.windows: -------------------------------------------------------------------------------- 1 | This project has begun being ported to Windows. A working solution 2 | file exists in this directory: 3 | google-glog.sln 4 | 5 | You can load this solution file into VC++ 9.0 (Visual Studio 6 | 2008). You may also be able to use this solution file with older 7 | Visual Studios by converting the solution file. 8 | 9 | Note that stack tracing and some unittests are not ported 10 | yet. 11 | 12 | You can also link glog code in statically -- see the example project 13 | libglog_static and logging_unittest_static, which does this. For this 14 | to work, you'll need to add "/D GOOGLE_GLOG_DLL_DECL=" to the compile 15 | line of every glog's .cc file. 16 | 17 | I have little experience with Windows programming, so there may be 18 | better ways to set this up than I've done! If you run across any 19 | problems, please post to the google-glog Google Group, or report 20 | them on the google-glog Google Code site: 21 | http://groups.google.com/group/google-glog 22 | http://code.google.com/p/google-glog/issues/list 23 | 24 | -- Shinichiro Hamaji 25 | 26 | Last modified: 23 January 2009 27 | -------------------------------------------------------------------------------- /3rd/glog/source/glog-0.3.3/compile: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Wrapper for compilers which do not understand `-c -o'. 4 | 5 | # Copyright 1999, 2000 Free Software Foundation, Inc. 6 | # Written by Tom Tromey . 7 | # 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | # Usage: 28 | # compile PROGRAM [ARGS]... 29 | # `-o FOO.o' is removed from the args passed to the actual compile. 30 | 31 | prog=$1 32 | shift 33 | 34 | ofile= 35 | cfile= 36 | args= 37 | while test $# -gt 0; do 38 | case "$1" in 39 | -o) 40 | # configure might choose to run compile as `compile cc -o foo foo.c'. 41 | # So we do something ugly here. 42 | ofile=$2 43 | shift 44 | case "$ofile" in 45 | *.o | *.obj) 46 | ;; 47 | *) 48 | args="$args -o $ofile" 49 | ofile= 50 | ;; 51 | esac 52 | ;; 53 | *.c) 54 | cfile=$1 55 | args="$args $1" 56 | ;; 57 | *) 58 | args="$args $1" 59 | ;; 60 | esac 61 | shift 62 | done 63 | 64 | if test -z "$ofile" || test -z "$cfile"; then 65 | # If no `-o' option was seen then we might have been invoked from a 66 | # pattern rule where we don't need one. That is ok -- this is a 67 | # normal compilation that the losing compiler can handle. If no 68 | # `.c' file was seen then we are probably linking. That is also 69 | # ok. 70 | exec "$prog" $args 71 | fi 72 | 73 | # Name of file we expect compiler to create. 74 | cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` 75 | 76 | # Create the lock directory. 77 | # Note: use `[/.-]' here to ensure that we don't use the same name 78 | # that we are using for the .o file. Also, base the name on the expected 79 | # object file name, since that is what matters with a parallel build. 80 | lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d 81 | while true; do 82 | if mkdir $lockdir > /dev/null 2>&1; then 83 | break 84 | fi 85 | sleep 1 86 | done 87 | # FIXME: race condition here if user kills between mkdir and trap. 88 | trap "rmdir $lockdir; exit 1" 1 2 15 89 | 90 | # Run the compile. 91 | "$prog" $args 92 | status=$? 93 | 94 | if test -f "$cofile"; then 95 | mv "$cofile" "$ofile" 96 | fi 97 | 98 | rmdir $lockdir 99 | exit $status 100 | -------------------------------------------------------------------------------- /3rd/glog/source/glog-0.3.3/google-glog.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libglog", "vsprojects\libglog\libglog.vcproj", "{34BD04BD-BC1D-4BFC-AAFC-ED02D9E960F1}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "logging_unittest", "vsprojects\logging_unittest\logging_unittest.vcproj", "{DD0690AA-5E09-46B5-83FD-4B28604CABA8}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {34BD04BD-BC1D-4BFC-AAFC-ED02D9E960F1} = {34BD04BD-BC1D-4BFC-AAFC-ED02D9E960F1} 9 | EndProjectSection 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libglog_static", "vsprojects\libglog_static\libglog_static.vcproj", "{772C2111-BBBF-49E6-B912-198A7F7A88E5}" 12 | EndProject 13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "logging_unittest_static", "vsprojects\logging_unittest_static\logging_unittest_static.vcproj", "{9B239B45-84A9-4E06-AC46-8E220CD43974}" 14 | ProjectSection(ProjectDependencies) = postProject 15 | {772C2111-BBBF-49E6-B912-198A7F7A88E5} = {772C2111-BBBF-49E6-B912-198A7F7A88E5} 16 | EndProjectSection 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|Win32 = Debug|Win32 21 | Release|Win32 = Release|Win32 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {34BD04BD-BC1D-4BFC-AAFC-ED02D9E960F1}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {34BD04BD-BC1D-4BFC-AAFC-ED02D9E960F1}.Debug|Win32.Build.0 = Debug|Win32 26 | {34BD04BD-BC1D-4BFC-AAFC-ED02D9E960F1}.Release|Win32.ActiveCfg = Release|Win32 27 | {34BD04BD-BC1D-4BFC-AAFC-ED02D9E960F1}.Release|Win32.Build.0 = Release|Win32 28 | {DD0690AA-5E09-46B5-83FD-4B28604CABA8}.Debug|Win32.ActiveCfg = Debug|Win32 29 | {DD0690AA-5E09-46B5-83FD-4B28604CABA8}.Debug|Win32.Build.0 = Debug|Win32 30 | {DD0690AA-5E09-46B5-83FD-4B28604CABA8}.Release|Win32.ActiveCfg = Release|Win32 31 | {DD0690AA-5E09-46B5-83FD-4B28604CABA8}.Release|Win32.Build.0 = Release|Win32 32 | {772C2111-BBBF-49E6-B912-198A7F7A88E5}.Debug|Win32.ActiveCfg = Debug|Win32 33 | {772C2111-BBBF-49E6-B912-198A7F7A88E5}.Debug|Win32.Build.0 = Debug|Win32 34 | {772C2111-BBBF-49E6-B912-198A7F7A88E5}.Release|Win32.ActiveCfg = Release|Win32 35 | {772C2111-BBBF-49E6-B912-198A7F7A88E5}.Release|Win32.Build.0 = Release|Win32 36 | {9B239B45-84A9-4E06-AC46-8E220CD43974}.Debug|Win32.ActiveCfg = Debug|Win32 37 | {9B239B45-84A9-4E06-AC46-8E220CD43974}.Debug|Win32.Build.0 = Debug|Win32 38 | {9B239B45-84A9-4E06-AC46-8E220CD43974}.Release|Win32.ActiveCfg = Release|Win32 39 | {9B239B45-84A9-4E06-AC46-8E220CD43974}.Release|Win32.Build.0 = Release|Win32 40 | EndGlobalSection 41 | GlobalSection(SolutionProperties) = preSolution 42 | HideSolutionNode = FALSE 43 | EndGlobalSection 44 | EndGlobal 45 | -------------------------------------------------------------------------------- /3rd/glog/source/glog-0.3.3/libglog.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libglog 7 | Description: Google Log (glog) C++ logging framework 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lglog 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /BundleTestor/BundleTestor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/BundleTestor/BundleTestor.cpp -------------------------------------------------------------------------------- /BundleTestor/BundleTestor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "TypeDefine.h" 4 | #include "service/IDispatch.h" 5 | 6 | const wstring IBundleTestor1_IID = L"333333"; 7 | interfacecptf IBundleTestor1 : public cptf::core::IDispatch{ 8 | virtual cptf::IID getIID(){ 9 | return IBundleTestor1_IID; 10 | } 11 | 12 | virtual bool test() = 0; 13 | 14 | }; 15 | 16 | const wstring BundleTestor1_IID = L"114003cf-505f-11e3-9ce6-222222222222"; -------------------------------------------------------------------------------- /BundleTestor/BundleTestor.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/BundleTestor/BundleTestor.vcproj -------------------------------------------------------------------------------- /BundleTestor/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 动态链接库:BundleTestor 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 BundleTestor DLL。 6 | 7 | 本文件概要介绍组成 BundleTestor 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | BundleTestor.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | BundleTestor.cpp 16 | 这是主 DLL 源文件。 17 | 18 | 此 DLL 在创建时不导出任何符号。因此,在生成此 DLL 时 19 | 将不会产生 .lib 文件。如果希望此项目 20 | 成为其他某个项目的项目依赖项,则需要 21 | 添加代码以从 DLL 导出某些符号, 22 | 以便产生一个导出库,或者,也可以在项目“属性页”对话框中的 23 | “链接器”文件夹中,将“常规”属性页上的 24 | “忽略输入库”属性设置为“是”。 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | 其他标准文件: 28 | 29 | StdAfx.h, StdAfx.cpp 30 | 这些文件用于生成名为 BundleTestor.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | 其他注释: 34 | 35 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 36 | 37 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /BundleTestor/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/BundleTestor/dllmain.cpp -------------------------------------------------------------------------------- /BundleTestor/dllmain.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/BundleTestor/dllmain.h -------------------------------------------------------------------------------- /BundleTestor/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/BundleTestor/stdafx.cpp -------------------------------------------------------------------------------- /BundleTestor/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/BundleTestor/stdafx.h -------------------------------------------------------------------------------- /BundleTestor/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/BundleTestor/targetver.h -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | cptf 2 | ==== 3 | 4 | cpp plugin template framework 5 | -------------------------------------------------------------------------------- /config/bundles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Role.dll 6 | roles 7 | 7f201611-7c1a-11e3-a2d2-bc305bacf447 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /config/services.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Role.dll 6 | 500851c0-7c2a-11e3-8c28-bc305bacf447 7 | hero 8 | hero 9 | Hero 10 | 11 | 12 | -------------------------------------------------------------------------------- /core/StdLibInclude.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_STDLIBINCLUDE_H 2 | #define CORE_SERVICE_STDLIBINCLUDE_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | using boost::shared_ptr; 15 | using boost::uuids::uuid; 16 | using boost::function; 17 | using boost::bind; 18 | namespace bl = boost::lambda; 19 | 20 | #define foreach BOOST_FOREACH 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | using std::wstring; 29 | using std::string; 30 | using std::list; 31 | using std::vector; 32 | using std::map; 33 | 34 | #endif -------------------------------------------------------------------------------- /core/StringDefine.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_STRINGDEFINE_H 2 | #define CORE_STRINGDEFINE_H 3 | #include 4 | 5 | using std::wstring; 6 | const wstring SERVICE_XML_NAME = L"config/services.xml"; 7 | const wstring BUNDLE_XML_NAME = L"config/bundles.xml"; 8 | const wstring MAINAPP = L"MainApp"; 9 | #endif -------------------------------------------------------------------------------- /core/TypeDefine.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_TYPEDEFINE_H 2 | #define CORE_TYPEDEFINE_H 3 | #pragma warning(disable:4251) 4 | #include "StdLibInclude.h" 5 | 6 | // #ifdef CPTF_CORE_LIB 7 | // # define CPTF_EXPORT _declspec(dllexport) 8 | // #else 9 | // # define CPTF_EXPORT _declspec(dllimport) 10 | // #endif 11 | 12 | namespace cptf{ 13 | #define interfacecptf struct 14 | typedef wstring IID; 15 | 16 | typedef unsigned long ulong; 17 | } 18 | 19 | #endif -------------------------------------------------------------------------------- /core/service/AutoObject.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_AUTOOBJECT_H 2 | #define CORE_SERVICE_AUTOOBJECT_H 3 | #include "TypeDefine.h" 4 | 5 | typedef bool (__stdcall CREATORFUNC)(cptf::IID, void**); 6 | 7 | struct AutoObjectEntry 8 | { 9 | const cptf::IID iid; 10 | CREATORFUNC* crateFunc; 11 | 12 | }; 13 | 14 | #pragma section("CPTF$__a", read, shared) 15 | #pragma section("CPTF$__z", read, shared) 16 | #pragma section("CPTF$__m", read, shared) 17 | extern "C" 18 | { 19 | __declspec(selectany) __declspec(allocate("CPTF$__a")) AutoObjectEntry* g_objEntryFirst = NULL; 20 | __declspec(selectany) __declspec(allocate("CPTF$__z")) AutoObjectEntry* g_objEntryLast = NULL; 21 | } 22 | 23 | #define _CPTF_DECL_ALLOCATE_SECTION_M __declspec(allocate("CPTF$__m")) 24 | 25 | #if !defined(_M_IA64) 26 | #pragma comment(linker, "/merge:CPTF=.rdata") 27 | #endif 28 | 29 | __pragma(comment(linker, "/include:_g_objEntryFirst")) 30 | 31 | #if defined(_M_IX86) 32 | #define CPTF_OBJECT_ENTRY_PRAGMA(class) __pragma(comment(linker, "/include:___pobjMap_" #class)); 33 | #elif defined(_M_IA64) 34 | #define CPTF_OBJECT_ENTRY_PRAGMA(class) __pragma(comment(linker, "/include:__pobjMap_" #class)); 35 | #elif defined(_M_AMD64) 36 | #define CPTF_OBJECT_ENTRY_PRAGMA(class) __pragma(comment(linker, "/include:__pobjMap_" #class)); 37 | #else 38 | #error Unknown Platform. define CPTF_OBJECT_ENTRY_PRAGMA 39 | #endif 40 | 41 | #define CPTF_OBJECT_ENTRY_AUTO(class) \ 42 | __declspec(selectany) AutoObjectEntry __objMap_##class = {class::clsid(), class::creatorClass_::createInstance}; \ 43 | extern "C" __declspec(allocate("CPTF$__m")) __declspec(selectany) AutoObjectEntry* const __pobjMap_##class = &__objMap_##class; \ 44 | CPTF_OBJECT_ENTRY_PRAGMA(class) 45 | 46 | 47 | 48 | 49 | #endif // AutoObject_h -------------------------------------------------------------------------------- /core/service/BundleConfig.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_BUNDLECONFIG_H 2 | #define CORE_SERVICE_BUNDLECONFIG_H 3 | 4 | #include "utils/MetaObject.h" 5 | #include "utils/IXmlParser.h" 6 | 7 | namespace cptf{ 8 | namespace core{ 9 | 10 | class BundleConfig : MetaObject 11 | , public IXmlParser 12 | { 13 | BundleConfig(){ 14 | INVOKE(L"name", BundleConfig::name, BundleConfig::setName); 15 | INVOKE(L"description", BundleConfig::description, BundleConfig::setDescription); 16 | INVOKE(L"iid", BundleConfig::iid, BundleConfig::setIid); 17 | 18 | } 19 | ~BundleConfig(){} 20 | 21 | public: 22 | wstring iid(){return iid_;} 23 | void setIid(const wstring& val){iid_ = val;} 24 | 25 | wstring name(){return name_;} 26 | void setName(const wstring& val){name_ = val;} 27 | 28 | protected: 29 | virtual wstring getNodeRelativePath(){return L"repository.bundles";} 30 | private: 31 | wstring iid_; 32 | wstring name_; 33 | }; 34 | 35 | typedef shared_ptr BundleConfigPtr; 36 | 37 | } 38 | } 39 | #endif -------------------------------------------------------------------------------- /core/service/BundleContainer.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_BUNDLECONTAINER_H 2 | #define CORE_SERVICE_BUNDLECONTAINER_H 3 | 4 | #include "utils/ApplicationPath.h" 5 | #include "service/BundleConfig.h" 6 | 7 | namespace cptf{ 8 | namespace core{ 9 | class BundleContainer 10 | { 11 | public: 12 | BundleContainer(){init();} 13 | ~BundleContainer(){} 14 | 15 | public: 16 | 17 | private: 18 | bool init(); 19 | private: 20 | list bundleConfigs_; 21 | }; 22 | 23 | 24 | bool BundleContainer::init() 25 | { 26 | bool rtn(false); 27 | wstring curAppPath = ApplicaitonPath::getCurAppPath(); 28 | wstring serviceXmlPath = curAppPath+ ApplicaitonPath::getDirSeparator() 29 | + BUNDLE_XML_NAME; 30 | 31 | bundleConfigs_ = BundleConfig().read(serviceXmlPath); 32 | return rtn; 33 | } 34 | } 35 | } 36 | 37 | #endif -------------------------------------------------------------------------------- /core/service/CpftBase.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_CPTFBASE_H 2 | #define CORE_SERVICE_CPTFBASE_H 3 | #include "TypeDefine.h" 4 | #include "AutoObject.h" 5 | #include "StdLibInclude.h" 6 | #include "service/IService.h" 7 | 8 | namespace cptf{ 9 | namespace core{ 10 | 11 | struct CptfServiceEntities 12 | { 13 | AutoObjectEntry** autoObjMapFirst_; 14 | AutoObjectEntry** autoObjMapLast_; 15 | }; 16 | typedef shared_ptr CptfServiceEntitiesPtr; 17 | 18 | struct CPTF_INTMAP_ENTRY 19 | { 20 | cptf::IID iid; // the interface id (IID) 21 | cptf::ulong address; 22 | //_ATL_CREATORARGFUNC* pFunc; //NULL:end, 1:offset, n:ptr 23 | }; 24 | 25 | #define CPTF_PACKING 8 26 | #define cptf_offsetofclass(base, derived) \ 27 | ((cptf::ulong)(static_cast((derived*)CPTF_PACKING))-CPTF_PACKING) 28 | 29 | 30 | inline bool cptfModuleGetClassObject(const CptfServiceEntities* cpfgModel 31 | , const cptf::IID& csid 32 | , const cptf::IID& iid 33 | , void** rtnObj) 34 | { 35 | bool rtn(false); 36 | assert(cpfgModel); 37 | for (AutoObjectEntry** entity = cpfgModel->autoObjMapFirst_ 38 | ; entity != cpfgModel->autoObjMapLast_; ++entity) 39 | { 40 | AutoObjectEntry* obj = *entity; 41 | if (obj == NULL) continue; 42 | if (obj->crateFunc != NULL && csid == obj->iid){ 43 | rtn = obj->crateFunc(iid, rtnObj); 44 | break; 45 | } 46 | } 47 | 48 | return rtn; 49 | } 50 | 51 | inline bool cptfInternalQueryInterface(void* pThis 52 | , const CPTF_INTMAP_ENTRY* pEntries 53 | , const cptf::IID& iid 54 | , void** rtnObj) 55 | { 56 | if(pThis == NULL || pEntries == NULL) 57 | return false ; 58 | 59 | *rtnObj = NULL; 60 | 61 | while (pEntries->address != -1) 62 | { 63 | if(iid == pEntries->iid){ 64 | IService* service = (IService*)((ulong)pThis+pEntries->address); 65 | service->addRef(); 66 | *rtnObj = service; 67 | return true; 68 | } 69 | pEntries++; 70 | } 71 | return false; 72 | } 73 | 74 | #define CPTF_BEGIN_SERVICE_MAP(x) public: \ 75 | typedef x _ComMapClass; \ 76 | bool internalQueryInterface(const cptf::IID& iid, void** ppvObject) \ 77 | { return cptfInternalQueryInterface(this, getEntries(), iid, ppvObject); } \ 78 | const static CPTF_INTMAP_ENTRY* getEntries(){ \ 79 | static const CPTF_INTMAP_ENTRY entries[] = { 80 | 81 | #define CPTF_END_SERVICE_MAP() \ 82 | {L"", 0}};\ 83 | return &entries[0];}\ 84 | virtual cptf::ulong addRef() = 0;\ 85 | virtual cptf::ulong release() = 0;\ 86 | virtual bool queryInterface(const cptf::IID& iid, void**rntObj) = 0; 87 | 88 | 89 | #define CPTF_SERVICE_INTERFACE_ENTRY(iid,x)\ 90 | {iid, cptf_offsetofclass(x, _ComMapClass)}, 91 | } 92 | } 93 | 94 | #endif -------------------------------------------------------------------------------- /core/service/CptfDllModuleT.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_CPTFDLLMODELT_H 2 | #define CORE_SERVICE_CPTFDLLMODELT_H 3 | #include "service/CptfModuleT.h" 4 | 5 | namespace cptf{ 6 | namespace core{ 7 | template 8 | class CptfDllModuleT : public CptfModuleT>{ 9 | public: 10 | CptfDllModuleT(){} 11 | ~CptfDllModuleT(){} 12 | 13 | bool dllGetClassObject(const cptf::IID& csid, const cptf::IID& iid, void** rntObj); 14 | 15 | }; 16 | 17 | template 18 | bool CptfDllModuleT::dllGetClassObject(const cptf::IID& csid 19 | , const cptf::IID& iid 20 | , void** rntObj) 21 | { 22 | return cptfModuleGetClassObject(static_cast(this), csid, iid, rntObj); 23 | } 24 | } 25 | } 26 | 27 | #endif -------------------------------------------------------------------------------- /core/service/CptfModule.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_CPTFMODULE_H 2 | #define CORE_SERVICE_CPTFMODULE_H 3 | 4 | #include "service/CptfModuleT.h" 5 | #include "service/ServiceClassFactory.h" 6 | 7 | namespace cptf{ 8 | namespace core{ 9 | 10 | class CptfModule : public CptfModuleT 11 | , public ServiceClassFactory{ 12 | public: 13 | CptfModule(){} 14 | ~CptfModule(){} 15 | 16 | }; 17 | } 18 | } 19 | 20 | 21 | #endif -------------------------------------------------------------------------------- /core/service/CptfModuleT.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_CPTFMODULET_H 2 | #define CORE_SERVICE_CPTFMODULET_H 3 | #include "StdLibInclude.h" 4 | #include "CpftBase.h" 5 | 6 | namespace cptf{ 7 | namespace core{ 8 | 9 | template 10 | class CptfModuleT : public CptfServiceEntities{ 11 | public: 12 | CptfModuleT() 13 | { 14 | autoObjMapFirst_ = &g_objEntryFirst + 1; 15 | autoObjMapLast_ = &g_objEntryLast; 16 | } 17 | ~CptfModuleT(){} 18 | 19 | public: 20 | void initLibId(const wstring& libId); 21 | private: 22 | wstring libId_; 23 | }; 24 | 25 | 26 | template 27 | void CptfModuleT::initLibId(const wstring& libId) 28 | { 29 | libId_ = libId; 30 | } 31 | } 32 | } 33 | 34 | #endif -------------------------------------------------------------------------------- /core/service/DefaultServiceImpl.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_DEFAULTSERVICEIMPL_H 2 | #define CORE_SERVICE_DEFAULTSERVICEIMPL_H 3 | 4 | #include "service/ServiceCoClass.h" 5 | #include "service/ThreadModel.h" 6 | #include "service/ObjectRoot.h" 7 | 8 | namespace cptf{ 9 | namespace core{ 10 | template 11 | class DefaultServiceImpl : public ServiceCoClass 12 | , public ObjectRoot{ 13 | 14 | public: 15 | DefaultServiceImpl(){} 16 | ~DefaultServiceImpl(){} 17 | }; 18 | } 19 | } 20 | #endif -------------------------------------------------------------------------------- /core/service/IDispatch.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_IDISPATCH_H 2 | #define CORE_SERVICE_IDISPATCH_H 3 | #include "../TypeDefine.h" 4 | #include "IService.h" 5 | 6 | namespace cptf{ 7 | namespace core{ 8 | 9 | interfacecptf IDispatch :public IService{ 10 | 11 | // virtual uint getTypeInfoCount() = 0; 12 | // virtual bool invoke()=0; 13 | 14 | }; 15 | } 16 | } 17 | 18 | 19 | #endif // CORE_SERVICE_IDISPATCH_H 20 | -------------------------------------------------------------------------------- /core/service/IDispatchImpl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/core/service/IDispatchImpl.h -------------------------------------------------------------------------------- /core/service/IService.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_ISERVICE_H 2 | #define CORE_SERVICE_ISERVICE_H 3 | #include "TypeDefine.h" 4 | 5 | namespace cptf{ 6 | namespace core{ 7 | interfacecptf IService{ 8 | virtual cptf::ulong addRef() = 0; 9 | virtual cptf::ulong release() = 0; 10 | virtual bool queryInterface(const cptf::IID& iid, void**rntObj) = 0; 11 | }; 12 | } 13 | } 14 | 15 | 16 | #endif // CORE_SERVICE_ISERVICE_H 17 | -------------------------------------------------------------------------------- /core/service/ObjectRoot.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_OBJECTROOT_H 2 | #define CORE_SERVICE_OBJECTROOT_H 3 | 4 | #include "TypeDefine.h" 5 | namespace cptf{ 6 | namespace core{ 7 | template 8 | class ObjectRoot{ 9 | 10 | public: 11 | ObjectRoot(): ref_(0){} 12 | ~ObjectRoot(){} 13 | 14 | ulong internalAddRef() 15 | { 16 | return ThreadModel::increment(&ref_); 17 | } 18 | 19 | ulong internalReleaseRef() 20 | { 21 | return ThreadModel::decrement(&ref_); 22 | } 23 | 24 | private: 25 | ulong ref_; 26 | }; 27 | } 28 | } 29 | #endif -------------------------------------------------------------------------------- /core/service/ServiceClassFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_SERVICECLASSFACTORY_H 2 | #define CORE_SERVICE_SERVICECLASSFACTORY_H 3 | #include "TypeDefine.h" 4 | #include "StringDefine.h" 5 | #include "service/SystemOperation.h" 6 | #include "service/WinDllCreator.h" 7 | #include "service/CpftBase.h" 8 | 9 | namespace cptf{ 10 | namespace core{ 11 | 12 | template 13 | class ServiceClassFactory { 14 | public: 15 | ServiceClassFactory(){} 16 | ~ServiceClassFactory(){} 17 | 18 | public: 19 | bool appClassObject(const cptf::IID& csid, const cptf::IID& iid, void** rntObj); 20 | bool bundleCreateInstance(const wstring& bundleName, const cptf::IID& csid, const cptf::IID& iid, void** rntObj); 21 | }; 22 | 23 | 24 | template 25 | bool ServiceClassFactory::bundleCreateInstance(const wstring& bundleName 26 | , const cptf::IID& csid 27 | , const cptf::IID& iid 28 | , void** rntObj) 29 | { 30 | bool rtn(false); 31 | rtn = SystemOperation::createObjectFromDll( 32 | bundleName, csid, iid, rntObj); 33 | return rtn; 34 | } 35 | 36 | template 37 | bool ServiceClassFactory::appClassObject(const cptf::IID& csid 38 | , const cptf::IID& iid 39 | , void** rntObj) 40 | { 41 | return cptfModuleGetClassObject(static_cast(this), csid, iid, rntObj); 42 | } 43 | } 44 | } 45 | 46 | #endif -------------------------------------------------------------------------------- /core/service/ServiceCoClass.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_SERVICECOCLASS_H 2 | #define CORE_SERVICE_SERVICECOCLASS_H 3 | #include "service/ServiceCreator.h" 4 | #include "service/ServiceObject.h" 5 | 6 | namespace cptf{ 7 | namespace core{ 8 | 9 | template 10 | class ServiceCoClass{ 11 | public: 12 | ServiceCoClass(){} 13 | ~ServiceCoClass(){} 14 | 15 | static wstring clsid() {return T::clsid();} 16 | public: 17 | typedef ServiceCreator< ServiceObject> creatorClass_; 18 | }; 19 | 20 | } 21 | } 22 | 23 | #endif -------------------------------------------------------------------------------- /core/service/ServiceConfig.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_SERVICECONFIG_H 2 | #define CORE_SERVICE_SERVICECONFIG_H 3 | #include "utils/MetaObject.h" 4 | #include "utils/IXmlParser.h" 5 | 6 | namespace cptf{ 7 | namespace core{ 8 | class ServiceConfig : public MetaObject 9 | , public IXmlParser{ 10 | public: 11 | ServiceConfig(){ 12 | INVOKE(L"bundle", ServiceConfig::bundle, ServiceConfig::setBundle); 13 | INVOKE(L"csid", ServiceConfig::csid, ServiceConfig::setCsid); 14 | INVOKE(L"description", ServiceConfig::description, ServiceConfig::setDescription); 15 | INVOKE(L"name", ServiceConfig::name, ServiceConfig::setName); 16 | INVOKE(L"serviceId", ServiceConfig::serviceId, ServiceConfig::setServiceId); 17 | INVOKE(L"serviceName", ServiceConfig::serviceName, ServiceConfig::setServiceName); 18 | } 19 | ~ServiceConfig(){} 20 | 21 | public: 22 | wstring csid(){return csid_;} 23 | void setCsid(const wstring& val){csid_ = val;} 24 | 25 | wstring bundle(){return bundle_;} 26 | void setBundle(const wstring& val){bundle_ = val;} 27 | 28 | wstring description(){return description_;} 29 | void setDescription(const wstring& val){description_ = val;} 30 | 31 | wstring name(){return name_;} 32 | void setName(const wstring& val){name_ = val;} 33 | 34 | wstring serviceId(){return serviceId_;} 35 | void setServiceId(const wstring& val){ 36 | serviceId_ = val; 37 | serviceIds_ = StringUtils<>::splitLast(serviceId_, L";"); 38 | } 39 | 40 | wstring serviceName(){return serviceName_;} 41 | void setServiceName(const wstring& val){serviceName_ = val;} 42 | 43 | vector serviceIds(){return serviceIds_;} 44 | protected: 45 | virtual wstring getNodeRelativePath(){return L"repository.services";} 46 | private: 47 | wstring csid_; 48 | wstring bundle_; 49 | wstring description_; 50 | wstring name_; 51 | wstring serviceId_; 52 | wstring serviceName_; 53 | vector serviceIds_; 54 | }; 55 | 56 | typedef shared_ptr ServiceConfigPtr; 57 | 58 | class ServiceConfigFunctors 59 | { 60 | public: 61 | static bool matchedByService(const ServiceConfigPtr config 62 | , const wstring& serviceId) 63 | { 64 | if (!config.get())return false; 65 | vector serviceIds = config->serviceIds(); 66 | return (find(serviceIds.begin(), serviceIds.end(), serviceId) != serviceIds.end()); 67 | } 68 | 69 | static bool matchedByCsid(const ServiceConfigPtr config 70 | , const wstring& csid) 71 | { 72 | bool rtn = (config.get() && csid == config->csid()); 73 | return rtn; 74 | } 75 | 76 | 77 | }; 78 | } 79 | } 80 | 81 | 82 | #endif -------------------------------------------------------------------------------- /core/service/ServiceConfigs.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_SERVICECONFIGS_H 2 | #define CORE_SERVICE_SERVICECONFIGS_H 3 | #include "StdLibInclude.h" 4 | #include "StringDefine.h" 5 | #include "service/ServiceConfig.h" 6 | #include "utils/ApplicationPath.h" 7 | 8 | namespace cptf{ 9 | namespace core{ 10 | 11 | template 12 | class ServiceConfigs 13 | { 14 | public: 15 | ServiceConfigs(){init();}; 16 | ~ServiceConfigs(){}; 17 | public: 18 | wstring findBundlelName(const wstring& csid); 19 | wstring getIId(const wstring& csid); 20 | vector getCsids(const wstring& iid); 21 | private: 22 | bool init(); 23 | private: 24 | list serviceConfigs_; 25 | }; 26 | 27 | typedef shared_ptr> ServiceConfigsPtr; 28 | 29 | template 30 | bool ServiceConfigs::init() 31 | { 32 | bool rtn(false); 33 | wstring curAppPath = ApplicaitonPath<>::getCurAppPath(); 34 | wstring serviceXmlPath = curAppPath+ ApplicaitonPath<>::getDirSeparator() 35 | + SERVICE_XML_NAME; 36 | 37 | serviceConfigs_ = ServiceConfig().read(serviceXmlPath); 38 | return rtn; 39 | } 40 | 41 | template 42 | wstring ServiceConfigs::findBundlelName(const wstring& csid) 43 | { 44 | wstring bundelName; 45 | list::iterator iter = find_if(serviceConfigs_.begin() 46 | , serviceConfigs_.end(), bind(&ServiceConfigFunctors::matchedByCsid, _1, csid)); 47 | bundelName = (iter != serviceConfigs_.end())?(*iter)->bundle():L""; 48 | return bundelName; 49 | } 50 | 51 | template 52 | wstring ServiceConfigs::getIId(const wstring& csid) 53 | { 54 | wstring iid; 55 | list::iterator iter = find_if(serviceConfigs_.begin() 56 | , serviceConfigs_.end(), bind(&ServiceConfigFunctors::matchedByCsid, _1, csid)); 57 | iid = (iter != serviceConfigs_.end())?(*iter)->serviceId():L""; 58 | return iid; 59 | } 60 | 61 | template 62 | vector ServiceConfigs::getCsids(const wstring& iid) 63 | { 64 | vector csids; 65 | foreach(ServiceConfigPtr config, serviceConfigs_){ 66 | if (ServiceConfigFunctors::matchedByService(config, iid)){ 67 | csids.push_back(config->csid()); 68 | } 69 | } 70 | return csids; 71 | } 72 | } 73 | } 74 | #endif -------------------------------------------------------------------------------- /core/service/ServiceContainer.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_SERVICECONTAINER_H 2 | #define CORE_SERVICE_SERVICECONTAINER_H 3 | 4 | #include "service/ServicesCache.h" 5 | 6 | namespace cptf{ 7 | namespace core{ 8 | 9 | template 10 | class ServiceContainer 11 | { 12 | public: 13 | ServiceContainer(Creator* creator) {creator_ = creator;} 14 | ~ServiceContainer(void){}; 15 | public: 16 | IService* getService(const cptf::IID& csid, const cptf::IID& iid); 17 | list getServices(const cptf::IID& iid); 18 | bool createService(const cptf::IID& csid, const cptf::IID& iid, void** rntObj); 19 | private: 20 | Creator* creator_; 21 | ServicesCache<> servicesCache_; 22 | ServiceConfigs<> serviceConfigs_; 23 | }; 24 | 25 | template 26 | IService* ServiceContainer::getService(const cptf::IID& csid 27 | , const cptf::IID& iid) 28 | { 29 | IService* service(NULL); 30 | if (servicesCache_.contains(csid, iid)){ 31 | service = servicesCache_.get(csid, iid);; 32 | } 33 | else{ 34 | createService(csid, iid, (void**)&service); 35 | servicesCache_.add(csid, iid, service); 36 | } 37 | return service; 38 | } 39 | 40 | template 41 | list ServiceContainer::getServices(const cptf::IID& iid) 42 | { 43 | list services; 44 | vector csids = serviceConfigs_.getCsids(iid); 45 | transform(csids.begin(), csids.end(), back_inserter(services) 46 | , bind(&ServiceContainer::getService, this, _1, iid)); 47 | return services; 48 | } 49 | 50 | template 51 | bool ServiceContainer::createService(const cptf::IID& csid 52 | , const cptf::IID& iid 53 | , void** rntObj) 54 | { 55 | bool rtn(false); 56 | if (!creator_)return rtn; 57 | 58 | wstring bundleName = serviceConfigs_.findBundlelName(csid); 59 | if (MAINAPP == bundleName){ 60 | rtn = creator_->appClassObject(csid, iid, rntObj); 61 | }else{ 62 | if (!bundleName.empty()){ 63 | bundleName = ApplicaitonPath<>::getCurAppPath() + ApplicaitonPath<>::getDirSeparator() 64 | + bundleName; 65 | 66 | rtn = creator_->bundleCreateInstance(bundleName, csid, iid, rntObj); 67 | } 68 | } 69 | return rtn; 70 | } 71 | } 72 | } 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /core/service/ServiceCreator.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_SERVICECREATOR_H 2 | #define CORE_SERVICE_SERVICECREATOR_H 3 | #include "../TypeDefine.h" 4 | namespace cptf{ 5 | namespace core{ 6 | 7 | template 8 | class ServiceCreator{ 9 | 10 | public: 11 | ServiceCreator(){} 12 | virtual ~ServiceCreator(){} 13 | 14 | public: 15 | static bool WINAPI createInstance(cptf::IID iid, void** rtnObj); 16 | }; 17 | 18 | template 19 | bool ServiceCreator::createInstance(cptf::IID iid, void** rtnObj) 20 | { 21 | bool rtn(false); 22 | T* serviceObj(new T()); 23 | if (serviceObj){ 24 | rtn = true; 25 | serviceObj->queryInterface(iid, rtnObj); 26 | } 27 | return rtn; 28 | } 29 | 30 | } 31 | } 32 | 33 | 34 | #endif // CORE_SERVICE_SERVICECREATOR_H -------------------------------------------------------------------------------- /core/service/ServiceObject.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_SERVICEOBJECT_H 2 | #define CORE_SERVICE_SERVICEOBJECT_H 3 | 4 | #include "TypeDefine.h" 5 | 6 | namespace cptf{ 7 | namespace core{ 8 | template 9 | class ServiceObject : public Base{ 10 | public: 11 | virtual ulong addRef() 12 | { 13 | return internalAddRef(); 14 | } 15 | 16 | virtual ulong release() 17 | { 18 | ulong ref = internalReleaseRef(); 19 | if (0 == ref){ 20 | delete this; 21 | } 22 | return ref; 23 | } 24 | 25 | virtual bool queryInterface(const cptf::IID& iid, void**rntObj){ 26 | return internalQueryInterface(iid, rntObj); 27 | } 28 | }; 29 | } 30 | } 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /core/service/ServicesCache.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/core/service/ServicesCache.h -------------------------------------------------------------------------------- /core/service/SystemOperation.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file SystemOperation.h 3 | * @Synopsis 4 | * @author diwu.sld 5 | * @version 1.0 6 | * @date 2013-2-21 7 | */ 8 | #ifndef CORE_SERVICE_SYSTEMOERATION_H 9 | #define CORE_SERVICE_SYSTEMOERATION_H 10 | 11 | namespace cptf{ 12 | namespace core{ 13 | 14 | template 15 | class SystemOperation 16 | { 17 | public: 18 | static bool createObjectFromDll( const wstring& bundleName 19 | , const cptf::IID& csid 20 | , const cptf::IID& iid 21 | , void** rntObj) 22 | { 23 | return creation::createObjectFromDll(bundleName, csid, iid, rntObj); 24 | } 25 | }; 26 | 27 | } 28 | } 29 | 30 | 31 | #endif -------------------------------------------------------------------------------- /core/service/ThreadModel.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_SERVICE_THREAD_MODEL_H 2 | #define CORE_SERVICE_THREAD_MODEL_H 3 | #include "TypeDefine.h" 4 | 5 | namespace cptf{ 6 | namespace core{ 7 | class SingleThreadModel 8 | { 9 | public: 10 | SingleThreadModel(){} 11 | ~SingleThreadModel(); 12 | 13 | static ulong WINAPI increment(ulong* p) {return ++(*p);} 14 | static ulong WINAPI decrement(ulong* p) {return --(*p);} 15 | }; 16 | } 17 | } 18 | 19 | #endif -------------------------------------------------------------------------------- /core/service/WinDllCreator.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file WinDllCreator.h 3 | * @Synopsis 4 | * @author diwu.sld 5 | * @version 1.0 6 | * @date 2013-2-21 7 | */ 8 | #ifndef CORE_SERVICE_WIN_DLL_CREATOR_H 9 | #define CORE_SERVICE_WIN_DLL_CREATOR_H 10 | #include 11 | #include "StdLibInclude.h" 12 | #include "utils/StringUtils.h" 13 | 14 | typedef bool (DLLPROC)(const cptf::IID&, const cptf::IID&, void**); 15 | 16 | namespace cptf{ 17 | namespace core{ 18 | 19 | class WinDllCreator 20 | { 21 | public: 22 | static bool createObjectFromDll(const wstring& bundleName 23 | , const cptf::IID& csid 24 | , const cptf::IID& iid 25 | , void** rntObj) 26 | { 27 | DLLPROC* pFunc = NULL; 28 | vector splits = StringUtils<>::splitLast(bundleName, L"/"); 29 | if (splits.size()<2)return false; 30 | 31 | wstring path = splits[0]; 32 | wstring name = splits[1]; 33 | 34 | HMODULE hMod = GetModuleHandle(name.c_str()); 35 | if (0 == hMod){ 36 | try{ 37 | hMod = LoadLibrary( bundleName.c_str() ); 38 | } 39 | catch( ... ){ 40 | hMod = NULL; 41 | return NULL; 42 | } 43 | } 44 | 45 | try{ 46 | pFunc = ( DLLPROC* ) GetProcAddress(hMod, "dllGetClassObject"); 47 | } 48 | catch(...) 49 | { 50 | pFunc = NULL; 51 | } 52 | 53 | if ( pFunc == NULL ){ 54 | return NULL; 55 | } 56 | return ((*pFunc)(csid, iid, rntObj)); 57 | } 58 | }; 59 | } 60 | } 61 | 62 | 63 | #endif -------------------------------------------------------------------------------- /core/utils/ApplicationPath.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_UTILS_APPLICATIONPATH_H 2 | #define CORE_UTILS_APPLICATIONPATH_H 3 | #include "StdLibInclude.h" 4 | #include "TypeDefine.h" 5 | #include "OS.h" 6 | #include "StringUtils.h" 7 | #include 8 | #include 9 | 10 | // #include 11 | // #include 12 | namespace cptf{ 13 | namespace core{ 14 | template 15 | class ApplicaitonPath{ 16 | public: 17 | static wstring getCurAppPath(); 18 | static wstring getDirSeparator(); 19 | }; 20 | 21 | template 22 | wstring ApplicaitonPath::getCurAppPath() 23 | { 24 | const int MAXPATH = 2000; 25 | char buffer[MAXPATH]; 26 | _getcwd(buffer, MAXPATH); 27 | 28 | return StringUtils<>::strToWstr(string(buffer)); 29 | } 30 | 31 | template 32 | wstring ApplicaitonPath::getDirSeparator() 33 | { 34 | // boost::filesystem::wpath slash(L"/"); 35 | // return slash.make_preferred().native(); 36 | return L"/"; 37 | } 38 | } 39 | } 40 | #endif -------------------------------------------------------------------------------- /core/utils/CastsUtils.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_UTILS_CASTSUTILS_H 2 | #define CORE_UTILS_CASTSUTILS_H 3 | #include "StdLibInclude.h" 4 | 5 | class CastUtils 6 | { 7 | public: 8 | template 9 | static Child* parentToChild(Base* base) 10 | { 11 | Child* child = static_cast(base); 12 | return child; 13 | } 14 | 15 | template 16 | static list parentsToChildren(const list& parents) 17 | { 18 | static list children; 19 | transform(parents.begin(), parents.end(), back_inserter(children) 20 | , bind(&CastUtils::parentToChild, _1)); 21 | 22 | return children; 23 | } 24 | }; 25 | #endif -------------------------------------------------------------------------------- /core/utils/IXmlParser.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_UTILS_IXMLPARSER_H 2 | #define CORE_UTILS_IXMLPARSER_H 3 | #include "utils/StringUtils.h" 4 | 5 | #include 6 | #include 7 | using boost::property_tree::ptree; 8 | using namespace boost::property_tree; 9 | namespace cptf{ 10 | namespace core{ 11 | template 12 | 13 | class IXmlParser{ 14 | public: 15 | IXmlParser(){}; 16 | ~IXmlParser(){}; 17 | public: 18 | list> read(const wstring& filePath); 19 | bool write(const wstring& filePath); 20 | protected: 21 | virtual wstring getNodeRelativePath() = 0; 22 | }; 23 | 24 | 25 | template 26 | list> IXmlParser::read(const wstring& filePath) 27 | { 28 | list> rtnList; 29 | 30 | wptree tree; 31 | string path = StringUtils<>::wstrToStr(filePath); 32 | xml_parser::read_xml(path, tree); 33 | foreach(wptree::value_type& val, tree.get_child(getNodeRelativePath())){ 34 | shared_ptr obj(new T()); 35 | wptree child = val.second; 36 | foreach(wptree::value_type& childval, child){ 37 | wstring first = childval.first; 38 | wstring secode = childval.second.data(); 39 | obj->setProperty(first, secode); 40 | } 41 | rtnList.push_back(obj); 42 | } 43 | 44 | return rtnList; 45 | } 46 | 47 | template 48 | bool IXmlParser::write(const wstring& filePath) 49 | { 50 | bool rtn(false); 51 | 52 | return rtn; 53 | } 54 | } 55 | } 56 | 57 | 58 | 59 | 60 | #endif -------------------------------------------------------------------------------- /core/utils/Log.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/core/utils/Log.h -------------------------------------------------------------------------------- /core/utils/MetaObject.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_UTILS_METAOBJECT_H 2 | #define CORE_UTILS_METAOBJECT_H 3 | #include "StdLibInclude.h" 4 | #include 5 | 6 | namespace cptf{ 7 | namespace core{ 8 | 9 | typedef function SetFunc; 10 | typedef function GetFunc; 11 | struct MetaDataPrivate{ 12 | MetaDataPrivate(const wstring& name, SetFunc setFunc, GetFunc getFunc) 13 | : name_(name) 14 | , setFunc_(setFunc) 15 | , getFunc_(getFunc){ 16 | 17 | } 18 | 19 | static bool nameEqual(const shared_ptr metaData, const wstring& name) 20 | { 21 | return metaData->name_ == name; 22 | } 23 | 24 | 25 | wstring name_; 26 | SetFunc setFunc_; 27 | GetFunc getFunc_; 28 | }; 29 | 30 | typedef shared_ptr MetaDataPrivatePtr; 31 | 32 | template 33 | class MetaObject{ 34 | public: 35 | MetaObject(){} 36 | ~MetaObject(){} 37 | public: 38 | void setProperty(const wstring& name, const wstring& value); 39 | wstring getProperty(const wstring& name); 40 | protected: 41 | void invoke(const wstring& propertyName,GetFunc getFunc, SetFunc setFunc); 42 | protected: 43 | vector metaDatas_; 44 | }; 45 | 46 | template 47 | void MetaObject::setProperty(const wstring& name 48 | , const wstring& value) 49 | { 50 | vector::iterator iter = std::find_if(metaDatas_.begin(), metaDatas_.end() 51 | , bind(&MetaDataPrivate::nameEqual, _1, name)); 52 | 53 | if (iter != metaDatas_.end()){ 54 | (*iter)->setFunc_(value); 55 | } 56 | } 57 | 58 | template 59 | wstring MetaObject::getProperty(const wstring& name) 60 | { 61 | wstring rtnValue; 62 | vector iter = std::find_if(metaDatas_.begin(), metaDatas_.end() 63 | , bind(&MetaDataPrivate::nameEqual, _1, name)); 64 | if ( iter != metaDatas_.end()){ 65 | rtnValue = (*iter)->getFunc_(); 66 | } 67 | return rtnValue; 68 | } 69 | 70 | template 71 | void MetaObject::invoke(const wstring& propertyName 72 | , GetFunc getFunc 73 | , SetFunc setFunc) 74 | { 75 | metaDatas_.push_back(MetaDataPrivatePtr(new MetaDataPrivate( 76 | propertyName, setFunc, getFunc))); 77 | } 78 | 79 | #define INVOKE(name, setFun, getFun) invoke(name, bind(&setFun, this), bind(&getFun, this,_1)) 80 | 81 | } 82 | } 83 | #endif -------------------------------------------------------------------------------- /core/utils/OS.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct Windows{}; -------------------------------------------------------------------------------- /core/utils/StringUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "StringUtils.h" 2 | 3 | namespace cptf{ 4 | namespace core{ 5 | 6 | 7 | } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /core/utils/StringUtils.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_UTILS_STRINGUTILS_H 2 | #define CORE_UTILS_STRINGUTILS_H 3 | #include 4 | #include "TypeDefine.h" 5 | using std::string; 6 | using std::wstring; 7 | 8 | namespace cptf{ 9 | namespace core{ 10 | 11 | template 12 | class StringUtils{ 13 | public: 14 | static string wstrToStr(const wstring& wstr); 15 | static wstring strToWstr(const string& str); 16 | static vector splitLast(const wstring& wstr, const wstring& stuff); 17 | }; 18 | 19 | template 20 | string StringUtils::wstrToStr(const wstring& wstr) 21 | { 22 | return std::string(wstr.begin(), wstr.end()); 23 | } 24 | 25 | template 26 | wstring StringUtils::strToWstr(const string& str) 27 | { 28 | return std::wstring(str.begin(), str.end()); 29 | } 30 | 31 | template 32 | vector StringUtils::splitLast(const wstring& wstr 33 | , const wstring& stuff) 34 | { 35 | vector strList; 36 | int pos = wstr.rfind(stuff); 37 | if (-1 != pos){ 38 | strList.push_back(wstr.substr(0,pos)); 39 | strList.push_back(wstr.substr(pos+1, wstr.length())); 40 | 41 | } 42 | strList.push_back(wstr); 43 | return strList; 44 | } 45 | 46 | template<> 47 | class StringUtils<1>{ 48 | public: 49 | static vector splitLast(const string& str, const string& stuff) 50 | { 51 | vector strList; 52 | int pos = str.rfind(stuff); 53 | if (-1 != pos){ 54 | strList.push_back(str.substr(0,pos)); 55 | strList.push_back(str.substr(pos+1, str.length())); 56 | 57 | } 58 | strList.push_back(str); 59 | return strList; 60 | } 61 | }; 62 | } 63 | } 64 | 65 | 66 | #endif -------------------------------------------------------------------------------- /core/utils/mian.cpp: -------------------------------------------------------------------------------- 1 | 2 | int main(){ 3 | return 0; 4 | } -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer-master/README.md: -------------------------------------------------------------------------------- 1 | AlloyTimer 2 | ========== 3 | AlloyTimer定时器 - 番茄工作法的时间管理应用 4 | 5 | By [AlloyTeam](http://www.AlloyTeam.com/) 6 | 7 | 8 | ### 番茄工作方法 9 | 10 | 1. 输入一个任务,将番茄时间设为25分钟点【开始工作】 11 | 2. 专注工作,中途不允许做任何与该任务无关的事,直到番茄时钟响起 12 | 3. 然后短暂休息一下,5分钟左右 -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer-master/audio/ring.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/AlloyTimer-master/audio/ring.mp3 -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer-master/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 番茄工作法 6 | 7 | 8 | 9 | 10 |

番茄工作法

11 |
12 |
13 |
14 |
15 | 16 | 17 | 18 |
19 |

当前任务

20 |
赶紧开始当前任务吧!
21 | 22 | 23 |

工作名称

24 | 25 | 26 |

工作时长

27 | 28 |

休息时长

29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |

番茄工作方法

38 |
    39 |
  • 输入一个任务,将番茄时间设为25分钟点【开始工作】
  • 40 |
  • 专注工作,中途不允许做任何与该任务无关的事,直到番茄时钟响起
  • 41 |
  • 然后短暂休息一下,5分钟左右
  • 42 |
43 | 44 | 45 |

任务记录

46 |
    47 |
    48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer-master/js/jx/jx.date.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 6.[Date part]: date 扩展包 3 | * 已移到J.format.date实现 4 | */ 5 | Jx().$package(function(J){ 6 | 7 | /** 8 | * dom 名字空间 9 | * 10 | * @namespace 11 | * @name date 12 | * @type Object 13 | */ 14 | J.date = J.date || {}; 15 | 16 | /** 17 | * 让日期和时间按照指定的格式显示的方法 18 | * 19 | * @memberOf date 20 | * @name format 21 | * @function 22 | * @param {String} format 格式字符串 23 | * @return {String} 返回生成的日期时间字符串 24 | * 25 | * @example 26 | * Jx().$package(function(J){ 27 | * var d = new Date(); 28 | * // 以 YYYY-MM-dd hh:mm:ss 格式输出 d 的时间字符串 29 | * J.date.format(d, "YYYY-MM-DD hh:mm:ss"); 30 | * }; 31 | * 32 | */ 33 | J.date.format = J.format.date; 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer-master/js/jx/swf/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/AlloyTimer-master/js/jx/swf/expressInstall.swf -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer-master/js/jx/swf/jxswfsound.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/AlloyTimer-master/js/jx/swf/jxswfsound.swf -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer-master/style/main.css: -------------------------------------------------------------------------------- 1 | /* AlloyTimer By Kinvix 2012 */ 2 | 3 | ::-webkit-scrollbar-track-piece { 4 | background:#f5f5f5; 5 | border-left:1px solid #d2d2d2; 6 | } 7 | ::-webkit-scrollbar { 8 | width:13px; 9 | height:13px; 10 | } 11 | ::-webkit-scrollbar-thumb { 12 | background:#c2c2c2; 13 | background-clip:padding-box; 14 | border:1px solid #979797; 15 | min-height:28px; 16 | 17 | 18 | } 19 | ::-webkit-scrollbar-thumb:hover { 20 | border:1px solid #636363; 21 | background:#929292; 22 | } 23 | 24 | 25 | 26 | 27 | body{ 28 | font-family: Tahoma, Arial, "MS Trebuchet", sans-serif; 29 | font-size:14px; 30 | } 31 | input { 32 | display: block; 33 | margin:10px auto; 34 | } 35 | button{ 36 | display: block; 37 | margin:10px auto; 38 | } 39 | label{ 40 | display: block; 41 | margin:10px auto; 42 | } 43 | 44 | 45 | #title{ 46 | margin:10px auto; 47 | width:500px; 48 | text-align:center; 49 | font-size:60px; 50 | } 51 | #remainTime{ 52 | text-align:center; 53 | font-size:180px; 54 | } 55 | #progressBarBorder, 56 | #progressBar{ 57 | 58 | width:500px; 59 | height:15px; 60 | overflow: hidden; 61 | 62 | } 63 | #progressBarBorder{ 64 | display: block; 65 | margin:10px auto; 66 | border:1px solid #fff; 67 | box-shadow:1px 1px 15px #000; 68 | 69 | } 70 | #progressBar{ 71 | background:blue; 72 | } 73 | #control{ 74 | margin:10px auto; 75 | width:500px; 76 | } 77 | 78 | 79 | .taskLeave{ 80 | background:yellow; 81 | } 82 | 83 | .taskDone{ 84 | background:blue; 85 | } 86 | .taskStop{ 87 | background:red; 88 | } 89 | 90 | .copyright{ 91 | margin: 50px auto; 92 | text-align:center; 93 | } -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/AlloyTimer.cpp -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/AlloyTimer.ico -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/AlloyTimer.rc -------------------------------------------------------------------------------- /demo/AlloyTimer/AlloyTimer.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/AlloyTimer.vcproj -------------------------------------------------------------------------------- /demo/AlloyTimer/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 应用程序:AlloyTimer 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 AlloyTimer 应用程序。 6 | 7 | 本文件概要介绍组成 AlloyTimer 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | AlloyTimer.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | AlloyTimer.cpp 16 | 这是主应用程序源文件。 17 | 18 | ///////////////////////////////////////////////////////////////////////////// 19 | 应用程序向导创建了下列资源: 20 | 21 | AlloyTimer.rc 22 | 这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。 23 | 此文件可以直接在 Microsoft Visual C++ 中进行编辑。 24 | 25 | Resource.h 26 | 这是标准头文件,可用于定义新的资源 ID。 27 | Microsoft Visual C++ 将读取并更新此文件。 28 | 29 | AlloyTimer.ico 30 | 这是一个图标文件,可用作应用程序的图标 (32x32)。 31 | 此图标包括在主资源文件 AlloyTimer.rc 中。 32 | 33 | small.ico 34 | 这是一个图标文件,其中包含应用程序的图标的较小版本 (16x16)。此图标包括在主资源文件 AlloyTimer.rc 中。 35 | 36 | ///////////////////////////////////////////////////////////////////////////// 37 | 其他标准文件: 38 | 39 | StdAfx.h, StdAfx.cpp 40 | 这些文件用于生成名为 AlloyTimer.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | 其他注释: 44 | 45 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 46 | 47 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /demo/AlloyTimer/Resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/Resource.h -------------------------------------------------------------------------------- /demo/AlloyTimer/debug.log: -------------------------------------------------------------------------------- 1 | [0123/140838:INFO:CONSOLE(243)] "null", source: file:///E:/project/github/cptf/demo/AlloyTimer/AlloyTimer-master/js/tomato.js (243) 2 | [0123/140838:INFO:CONSOLE(163)] "[object Object]", source: file:///E:/project/github/cptf/demo/AlloyTimer/AlloyTimer-master/js/tomato.js (163) 3 | [0123/140838:INFO:CONSOLE(98)] "progress:1", source: file:///E:/project/github/cptf/demo/AlloyTimer/AlloyTimer-master/js/tomato.js (98) 4 | [0123/140838:INFO:CONSOLE(101)] "500px", source: file:///E:/project/github/cptf/demo/AlloyTimer/AlloyTimer-master/js/tomato.js (101) 5 | [0123/141315:INFO:CONSOLE(243)] "null", source: file:///E:/project/github/cptf/demo/AlloyTimer/AlloyTimer-master/js/tomato.js (243) 6 | [0123/141315:INFO:CONSOLE(163)] "[object Object]", source: file:///E:/project/github/cptf/demo/AlloyTimer/AlloyTimer-master/js/tomato.js (163) 7 | [0123/141315:INFO:CONSOLE(98)] "progress:1", source: file:///E:/project/github/cptf/demo/AlloyTimer/AlloyTimer-master/js/tomato.js (98) 8 | [0123/141315:INFO:CONSOLE(101)] "500px", source: file:///E:/project/github/cptf/demo/AlloyTimer/AlloyTimer-master/js/tomato.js (101) 9 | [0123/141530:INFO:CONSOLE(243)] "null", source: file:///AlloyTimer-master/js/tomato.js (243) 10 | [0123/141530:INFO:CONSOLE(163)] "[object Object]", source: file:///AlloyTimer-master/js/tomato.js (163) 11 | [0123/141530:INFO:CONSOLE(98)] "progress:1", source: file:///AlloyTimer-master/js/tomato.js (98) 12 | [0123/141530:INFO:CONSOLE(101)] "500px", source: file:///AlloyTimer-master/js/tomato.js (101) 13 | [0428/132847:INFO:CONSOLE(243)] "null", source: file:///AlloyTimer-master/js/tomato.js (243) 14 | [0428/132847:INFO:CONSOLE(163)] "[object Object]", source: file:///AlloyTimer-master/js/tomato.js (163) 15 | [0428/132847:INFO:CONSOLE(98)] "progress:1", source: file:///AlloyTimer-master/js/tomato.js (98) 16 | [0428/132847:INFO:CONSOLE(101)] "500px", source: file:///AlloyTimer-master/js/tomato.js (101) 17 | [0428/132921:INFO:CONSOLE(243)] "null", source: file:///AlloyTimer-master/js/tomato.js (243) 18 | [0428/132921:INFO:CONSOLE(163)] "[object Object]", source: file:///AlloyTimer-master/js/tomato.js (163) 19 | [0428/132921:INFO:CONSOLE(98)] "progress:1", source: file:///AlloyTimer-master/js/tomato.js (98) 20 | [0428/132921:INFO:CONSOLE(101)] "500px", source: file:///AlloyTimer-master/js/tomato.js (101) 21 | -------------------------------------------------------------------------------- /demo/AlloyTimer/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/small.ico -------------------------------------------------------------------------------- /demo/AlloyTimer/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/stdafx.cpp -------------------------------------------------------------------------------- /demo/AlloyTimer/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/stdafx.h -------------------------------------------------------------------------------- /demo/AlloyTimer/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AlloyTimer/targetver.h -------------------------------------------------------------------------------- /demo/AppDemo/AppDemo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/AppDemo.cpp -------------------------------------------------------------------------------- /demo/AppDemo/AppDemo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/AppDemo/AppDemo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/AppDemo.ico -------------------------------------------------------------------------------- /demo/AppDemo/AppDemo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/AppDemo.rc -------------------------------------------------------------------------------- /demo/AppDemo/AppDemo.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/AppDemo.vcproj -------------------------------------------------------------------------------- /demo/AppDemo/BindJsProcessMsgDelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "BindJsProcessMsgDelegate.h" 3 | 4 | static const string BindJsMessageName = "binding_test"; 5 | 6 | BindJsProcessMsgDelegate::BindJsProcessMsgDelegate() 7 | { 8 | } 9 | 10 | BindJsProcessMsgDelegate::~BindJsProcessMsgDelegate() 11 | { 12 | } 13 | 14 | bool BindJsProcessMsgDelegate::excute(const CefRefPtrbrowser 15 | , const CefRefPtr& message) const 16 | { 17 | bool rtn = false; 18 | 19 | std::string result; 20 | CefRefPtr args = message->GetArgumentList(); 21 | if (args->GetSize() > 0 && args->GetType(0) == VTYPE_STRING) { 22 | result = args->GetString(0); 23 | rtn = true; 24 | } else { 25 | result = "Invalid request"; 26 | } 27 | 28 | result += "1234"; 29 | CefRefPtr response = 30 | CefProcessMessage::Create(BindJsMessageName); 31 | response->GetArgumentList()->SetString(0, result); 32 | browser->SendProcessMessage(PID_RENDERER, response); 33 | 34 | return rtn; 35 | } 36 | 37 | string BindJsProcessMsgDelegate::getName() const 38 | { 39 | return BindJsMessageName; 40 | } -------------------------------------------------------------------------------- /demo/AppDemo/BindJsProcessMsgDelegate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ProcessMessageDelegate.h" 3 | #include "service/ServiceCoClass.h" 4 | #include "service/IDispatchImpl.h" 5 | #include "service/ObjectRoot.h" 6 | #include "service/ThreadModel.h" 7 | #include "service/CpftBase.h" 8 | 9 | using namespace cptf::core; 10 | 11 | const wstring BindJsProcessMsgDelegate_IID= L"30e78970-d358-11e3-a119-bc305bacf447"; 12 | class BindJsProcessMsgDelegate: public ServiceCoClass 13 | , public IDispatchImpl 14 | , public ObjectRoot 15 | { 16 | public: 17 | BindJsProcessMsgDelegate(void); 18 | ~BindJsProcessMsgDelegate(void); 19 | 20 | static wstring clsid() {return BindJsProcessMsgDelegate_IID;} 21 | virtual bool excute(const CefRefPtrbrowser 22 | , const CefRefPtr& msg) const; 23 | virtual string getName()const; 24 | 25 | CPTF_BEGIN_SERVICE_MAP(BindJsProcessMsgDelegate) 26 | CPTF_SERVICE_INTERFACE_ENTRY(IProcessMsgImpl_IID, IProcessMsgImpl) 27 | CPTF_END_SERVICE_MAP() 28 | }; 29 | 30 | CPTF_OBJECT_ENTRY_AUTO(BindJsProcessMsgDelegate) 31 | -------------------------------------------------------------------------------- /demo/AppDemo/DailogProcessMsgDelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "DailogProcessMsgDelegate.h" 3 | #include "RunFileDialogCallback.h" 4 | 5 | static const string BindJsMessageName = "DialogTest"; 6 | 7 | DailogProcessMsgDelegate::DailogProcessMsgDelegate() 8 | { 9 | } 10 | 11 | DailogProcessMsgDelegate::~DailogProcessMsgDelegate() 12 | { 13 | } 14 | 15 | bool DailogProcessMsgDelegate::excute(const CefRefPtrbrowser 16 | , const CefRefPtr& message) const 17 | { 18 | std::vector file_types; 19 | file_types.push_back("text/*"); 20 | file_types.push_back(".log"); 21 | file_types.push_back(".patch"); 22 | 23 | browser->GetHost()->RunFileDialog(FILE_DIALOG_OPEN, "My Open Dialog", 24 | "test.txt", file_types, new RunFileDialogCallback()); 25 | 26 | return true; 27 | } 28 | 29 | string DailogProcessMsgDelegate::getName() const 30 | { 31 | return BindJsMessageName; 32 | } -------------------------------------------------------------------------------- /demo/AppDemo/DailogProcessMsgDelegate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ProcessMessageDelegate.h" 3 | #include "service/ServiceCoClass.h" 4 | #include "service/IDispatchImpl.h" 5 | #include "service/ObjectRoot.h" 6 | #include "service/ThreadModel.h" 7 | #include "service/CpftBase.h" 8 | 9 | using namespace cptf::core; 10 | 11 | const wstring DailogProcessMsgDelegate_IID= L"30178970-d358-11e3-a119-bc305bacf447"; 12 | class DailogProcessMsgDelegate: public ServiceCoClass 13 | , public IDispatchImpl 14 | , public ObjectRoot 15 | { 16 | public: 17 | DailogProcessMsgDelegate(void); 18 | ~DailogProcessMsgDelegate(void); 19 | 20 | static wstring clsid() {return DailogProcessMsgDelegate_IID;} 21 | virtual bool excute(const CefRefPtrbrowser 22 | , const CefRefPtr& msg) const; 23 | virtual string getName()const; 24 | 25 | CPTF_BEGIN_SERVICE_MAP(DailogProcessMsgDelegate) 26 | CPTF_SERVICE_INTERFACE_ENTRY(IProcessMsgImpl_IID, IProcessMsgImpl) 27 | CPTF_END_SERVICE_MAP() 28 | }; 29 | 30 | CPTF_OBJECT_ENTRY_AUTO(DailogProcessMsgDelegate) 31 | -------------------------------------------------------------------------------- /demo/AppDemo/EditorProcessMsgDelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "EditorProcessMsgDelegate.h" 3 | #include "RunFileDialogCallback.h" 4 | #include "utils/StringUtils.h" 5 | static const string BindJsMessageName = "Editor"; 6 | 7 | EditorProcessMsgDelegate::EditorProcessMsgDelegate() 8 | { 9 | } 10 | 11 | EditorProcessMsgDelegate::~EditorProcessMsgDelegate() 12 | { 13 | } 14 | 15 | bool EditorProcessMsgDelegate::excute(const CefRefPtrbrowser 16 | , const CefRefPtr& message) const 17 | { 18 | vector msgs =StringUtils<1>::splitLast(message->GetName(), "."); 19 | if(msgs.size() < 2)return false; 20 | 21 | string subMsg = msgs[1]; 22 | if("FileOpen" == subMsg){ 23 | std::vector file_types; 24 | file_types.push_back("text/*"); 25 | file_types.push_back(".log"); 26 | file_types.push_back(".patch"); 27 | 28 | browser->GetHost()->RunFileDialog(FILE_DIALOG_OPEN, "My Open Dialog", 29 | "test.txt", file_types, new RunFileDialogCallback()); 30 | } 31 | 32 | 33 | return true; 34 | } 35 | 36 | string EditorProcessMsgDelegate::getName() const 37 | { 38 | return BindJsMessageName; 39 | } -------------------------------------------------------------------------------- /demo/AppDemo/EditorProcessMsgDelegate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ProcessMessageDelegate.h" 3 | #include "service/ServiceCoClass.h" 4 | #include "service/IDispatchImpl.h" 5 | #include "service/ObjectRoot.h" 6 | #include "service/ThreadModel.h" 7 | #include "service/CpftBase.h" 8 | 9 | using namespace cptf::core; 10 | 11 | const wstring EditorProcessMsgDelegate_IID= L"30078970-d358-11e3-a119-bc305bacf447"; 12 | class EditorProcessMsgDelegate: public ServiceCoClass 13 | , public IDispatchImpl 14 | , public ObjectRoot 15 | { 16 | public: 17 | EditorProcessMsgDelegate(void); 18 | ~EditorProcessMsgDelegate(void); 19 | 20 | static wstring clsid() {return EditorProcessMsgDelegate_IID;} 21 | virtual bool excute(const CefRefPtrbrowser 22 | , const CefRefPtr& msg) const; 23 | virtual string getName()const; 24 | 25 | CPTF_BEGIN_SERVICE_MAP(EditorProcessMsgDelegate) 26 | CPTF_SERVICE_INTERFACE_ENTRY(IProcessMsgImpl_IID, IProcessMsgImpl) 27 | CPTF_END_SERVICE_MAP() 28 | }; 29 | 30 | CPTF_OBJECT_ENTRY_AUTO(EditorProcessMsgDelegate) 31 | -------------------------------------------------------------------------------- /demo/AppDemo/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 应用程序:AppDemo 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 AppDemo 应用程序。 6 | 7 | 本文件概要介绍组成 AppDemo 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | AppDemo.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | AppDemo.cpp 16 | 这是主应用程序源文件。 17 | 18 | ///////////////////////////////////////////////////////////////////////////// 19 | 应用程序向导创建了下列资源: 20 | 21 | AppDemo.rc 22 | 这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。 23 | 此文件可以直接在 Microsoft Visual C++ 中进行编辑。 24 | 25 | Resource.h 26 | 这是标准头文件,可用于定义新的资源 ID。 27 | Microsoft Visual C++ 将读取并更新此文件。 28 | 29 | AppDemo.ico 30 | 这是一个图标文件,可用作应用程序的图标 (32x32)。 31 | 此图标包括在主资源文件 AppDemo.rc 中。 32 | 33 | small.ico 34 | 这是一个图标文件,其中包含应用程序的图标的较小版本 (16x16)。此图标包括在主资源文件 AppDemo.rc 中。 35 | 36 | ///////////////////////////////////////////////////////////////////////////// 37 | 其他标准文件: 38 | 39 | StdAfx.h, StdAfx.cpp 40 | 这些文件用于生成名为 AppDemo.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | 其他注释: 44 | 45 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 46 | 47 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /demo/AppDemo/Resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/Resource.h -------------------------------------------------------------------------------- /demo/AppDemo/services.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 114003cf-505f-11e3-9ce6-00269e3e5da0 6 | MainApp 7 | 8 | 9 | 114003cf-505f-11e3-9ce6-222222222222 10 | E:\project\github\cptf\Debug\BundleTestor.dll 11 | 12 | 13 | 2ff2ff21-7775-11e3-b50d-bc305bacf447 14 | E:\project\github\cptf\Debug\AppWindow.lib 15 | 16 | 17 | -------------------------------------------------------------------------------- /demo/AppDemo/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/small.ico -------------------------------------------------------------------------------- /demo/AppDemo/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/stdafx.cpp -------------------------------------------------------------------------------- /demo/AppDemo/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/stdafx.h -------------------------------------------------------------------------------- /demo/AppDemo/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/AppDemo/targetver.h -------------------------------------------------------------------------------- /demo/GameDemo/GameMain/BattleMannager.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "BattleMannager.h" 3 | #include "utils/CastsUtils.h" 4 | #include 5 | using namespace std; 6 | 7 | BattleMannager::BattleMannager(void) 8 | : hero_(NULL) 9 | , serviceContainer_(&cptfModule_) 10 | { 11 | } 12 | 13 | BattleMannager::~BattleMannager(void) 14 | { 15 | if (hero_)hero_->release(); 16 | } 17 | 18 | void BattleMannager::run() 19 | { 20 | hero_ = static_cast(serviceContainer_.getService(Hero_CSID, IHero_IID)); 21 | if (!hero_)return; 22 | printHero(hero_); 23 | 24 | list services = serviceContainer_.getServices(IOgre_IID); 25 | list ogres = CastUtils::parentsToChildren(services); 26 | for_each(ogres.begin(), ogres.end(), bind(&BattleMannager::printOgre, _1)); 27 | 28 | services = serviceContainer_.getServices(IHumanOgre_IID); 29 | list hummanOgres = CastUtils::parentsToChildren(services); 30 | for_each(hummanOgres.begin(), hummanOgres.end(), bind(&BattleMannager::printHumanOgre, _1)); 31 | } 32 | 33 | void BattleMannager::printHero(IHero* hero) 34 | { 35 | if (!hero)return; 36 | 37 | cptf::ulong hurt = hero->attack(); 38 | wstring name = hero->getName(); 39 | cptf::ulong health = hero->getHealth(); 40 | cout <<"hero-----------------------" <getName(); 52 | cptf::ulong health = ogre->getHealth(); 53 | cout <<"ogre-----------------------" <getLanguage() << endl; 64 | cout <<"humanOgre-----------------------" < serviceContainer_; 21 | IHero* hero_; 22 | }; 23 | -------------------------------------------------------------------------------- /demo/GameDemo/GameMain/GameMain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/GameMain/GameMain.cpp -------------------------------------------------------------------------------- /demo/GameDemo/GameMain/GameMain.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/GameMain/GameMain.vcproj -------------------------------------------------------------------------------- /demo/GameDemo/GameMain/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 控制台应用程序:GameMain 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 GameMain 应用程序。 6 | 7 | 本文件概要介绍组成 GameMain 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | GameMain.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | GameMain.cpp 16 | 这是主应用程序源文件。 17 | 18 | ///////////////////////////////////////////////////////////////////////////// 19 | 其他标准文件: 20 | 21 | StdAfx.h, StdAfx.cpp 22 | 这些文件用于生成名为 GameMain.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | 其他注释: 26 | 27 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 28 | 29 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /demo/GameDemo/GameMain/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/GameMain/stdafx.cpp -------------------------------------------------------------------------------- /demo/GameDemo/GameMain/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/GameMain/stdafx.h -------------------------------------------------------------------------------- /demo/GameDemo/GameMain/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/GameMain/targetver.h -------------------------------------------------------------------------------- /demo/GameDemo/Role/Dumesa.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class Dumesa : public ServiceCoClass 3 | , public ObjectRoot 4 | , IOgre 5 | , IHumanOgre{ 6 | public: 7 | static wstring clsid() {return Dumesa_CSID;} 8 | Dumesa(){} 9 | ~Dumesa(){} 10 | 11 | virtual cptf::ulong getHealth(){return 10;} 12 | virtual cptf::ulong getHurt() {return 1;} 13 | virtual wstring getName() {return L"I am Dumesa";} 14 | virtual wstring getLanguage(){return L"En";} 15 | 16 | CPTF_BEGIN_SERVICE_MAP(Dumesa) 17 | CPTF_SERVICE_INTERFACE_ENTRY(IOgre_IID, IOgre) 18 | CPTF_SERVICE_INTERFACE_ENTRY(IHumanOgre_IID, IHumanOgre) 19 | CPTF_END_SERVICE_MAP() 20 | }; 21 | 22 | CPTF_OBJECT_ENTRY_AUTO(Dumesa) -------------------------------------------------------------------------------- /demo/GameDemo/Role/Hero.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Role.h" 4 | #include "service/DefaultServiceImpl.h" 5 | using namespace cptf::core; 6 | 7 | class Hero : public DefaultServiceImpl 8 | , public IHero{ 9 | public: 10 | static wstring clsid() {return Hero_CSID;} 11 | Hero(){} 12 | ~Hero(){} 13 | 14 | virtual cptf::ulong getHealth(){return 100;} 15 | virtual cptf::ulong getHurt() {return 10;} 16 | virtual wstring getName() {return L"I am Hero";} 17 | 18 | cptf::ulong attack(){return 10;} 19 | 20 | CPTF_BEGIN_SERVICE_MAP(Hero) 21 | CPTF_SERVICE_INTERFACE_ENTRY(IHero_IID, IHero) 22 | CPTF_END_SERVICE_MAP() 23 | }; 24 | 25 | CPTF_OBJECT_ENTRY_AUTO(Hero) -------------------------------------------------------------------------------- /demo/GameDemo/Role/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 动态链接库:Role 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 Role DLL。 6 | 7 | 本文件概要介绍组成 Role 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | Role.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | Role.cpp 16 | 这是主 DLL 源文件。 17 | 18 | 此 DLL 在创建时不导出任何符号。因此,在生成此 DLL 时 19 | 将不会产生 .lib 文件。如果希望此项目 20 | 成为其他某个项目的项目依赖项,则需要 21 | 添加代码以从 DLL 导出某些符号, 22 | 以便产生一个导出库,或者,也可以在项目“属性页”对话框中的 23 | “链接器”文件夹中,将“常规”属性页上的 24 | “忽略输入库”属性设置为“是”。 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | 其他标准文件: 28 | 29 | StdAfx.h, StdAfx.cpp 30 | 这些文件用于生成名为 Role.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | 其他注释: 34 | 35 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 36 | 37 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /demo/GameDemo/Role/Role.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Role/Role.cpp -------------------------------------------------------------------------------- /demo/GameDemo/Role/Role.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TypeDefine.h" 3 | #include "service/IDispatch.h" 4 | 5 | const wstring Bundle_Role_IID = L"7f201611-7c1a-11e3-a2d2-bc305bacf447"; 6 | 7 | interfacecptf IRole{ 8 | virtual cptf::ulong getHealth() = 0; 9 | virtual cptf::ulong getHurt() = 0; 10 | virtual wstring getName() = 0; 11 | }; 12 | 13 | const wstring IHero_IID = L"99f9dd8f-7c1a-11e3-9f9d-bc305bacf447"; 14 | const wstring Hero_CSID= L"500851c0-7c2a-11e3-8c28-bc305bacf447"; 15 | 16 | interfacecptf IHero : public cptf::core::IDispatch 17 | , public IRole{ 18 | virtual cptf::ulong attack() = 0; 19 | }; 20 | 21 | 22 | const wstring IOgre_IID = L"ba435561-7c36-11e3-89e5-bc305bacf447"; 23 | const wstring Wolf_CSID = L"ae8b9bb0-7c36-11e3-99ea-bc305bacf447"; 24 | const wstring Tiger_CSID = L"58134430-7c37-11e3-af0a-bc305bacf447"; 25 | const wstring Dumesa_CSID = L"55635d11-7c50-11e3-8762-bc305bacf447"; 26 | interfacecptf IOgre : public cptf::core::IDispatch 27 | , public IRole{ 28 | 29 | }; 30 | 31 | const wstring IHumanOgre_IID = L"c8f36780-7c36-11e3-baf8-bc305bacf447"; 32 | interfacecptf IHumanOgre : public cptf::core::IDispatch{ 33 | virtual wstring getLanguage() = 0; 34 | }; -------------------------------------------------------------------------------- /demo/GameDemo/Role/Role.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Role/Role.vcproj -------------------------------------------------------------------------------- /demo/GameDemo/Role/Tiger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class Tiger : public DefaultServiceImpl 3 | , IOgre{ 4 | public: 5 | static wstring clsid() {return Tiger_CSID;} 6 | Tiger(){} 7 | ~Tiger(){} 8 | 9 | virtual cptf::ulong getHealth(){return 10;} 10 | virtual cptf::ulong getHurt() {return 1;} 11 | virtual wstring getName() {return L"I am Tiger";} 12 | 13 | CPTF_BEGIN_SERVICE_MAP(Tiger) 14 | CPTF_SERVICE_INTERFACE_ENTRY(IOgre_IID, IOgre) 15 | CPTF_END_SERVICE_MAP() 16 | }; 17 | 18 | CPTF_OBJECT_ENTRY_AUTO(Tiger) -------------------------------------------------------------------------------- /demo/GameDemo/Role/Wolf.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class Wolf : public DefaultServiceImpl 3 | , public IOgre{ 4 | public: 5 | static wstring clsid() {return Wolf_CSID;} 6 | Wolf(){} 7 | ~Wolf(){} 8 | 9 | virtual cptf::ulong getHealth(){return 10;} 10 | virtual cptf::ulong getHurt() {return 1;} 11 | virtual wstring getName() {return L"I am Wolf";} 12 | 13 | CPTF_BEGIN_SERVICE_MAP(Wolf) 14 | CPTF_SERVICE_INTERFACE_ENTRY(IOgre_IID, IOgre) 15 | CPTF_END_SERVICE_MAP() 16 | }; 17 | 18 | CPTF_OBJECT_ENTRY_AUTO(Wolf) -------------------------------------------------------------------------------- /demo/GameDemo/Role/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Role/dllmain.cpp -------------------------------------------------------------------------------- /demo/GameDemo/Role/dllmain.h: -------------------------------------------------------------------------------- 1 | #ifndef DEMO_GAME_DEMO_ROLE_CROLEMODELE_H 2 | #define DEMO_GAME_DEMO_ROLE_CROLEMODELE_H 3 | 4 | #include "service/CptfDllModuleT.h" 5 | using namespace cptf::core; 6 | 7 | class CRoleModule : public CptfDllModuleT 8 | { 9 | public : 10 | }; 11 | 12 | extern class CRoleModule g_module; 13 | 14 | #endif -------------------------------------------------------------------------------- /demo/GameDemo/Role/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Role/stdafx.cpp -------------------------------------------------------------------------------- /demo/GameDemo/Role/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Role/stdafx.h -------------------------------------------------------------------------------- /demo/GameDemo/Role/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Role/targetver.h -------------------------------------------------------------------------------- /demo/GameDemo/Weapon/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 动态链接库:Weapon 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 Weapon DLL。 6 | 7 | 本文件概要介绍组成 Weapon 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | Weapon.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | Weapon.cpp 16 | 这是主 DLL 源文件。 17 | 18 | 此 DLL 在创建时不导出任何符号。因此,在生成此 DLL 时 19 | 将不会产生 .lib 文件。如果希望此项目 20 | 成为其他某个项目的项目依赖项,则需要 21 | 添加代码以从 DLL 导出某些符号, 22 | 以便产生一个导出库,或者,也可以在项目“属性页”对话框中的 23 | “链接器”文件夹中,将“常规”属性页上的 24 | “忽略输入库”属性设置为“是”。 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | 其他标准文件: 28 | 29 | StdAfx.h, StdAfx.cpp 30 | 这些文件用于生成名为 Weapon.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | 其他注释: 34 | 35 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 36 | 37 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /demo/GameDemo/Weapon/Weapon.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Weapon/Weapon.cpp -------------------------------------------------------------------------------- /demo/GameDemo/Weapon/Weapon.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Weapon/Weapon.vcproj -------------------------------------------------------------------------------- /demo/GameDemo/Weapon/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Weapon/dllmain.cpp -------------------------------------------------------------------------------- /demo/GameDemo/Weapon/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Weapon/stdafx.cpp -------------------------------------------------------------------------------- /demo/GameDemo/Weapon/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Weapon/stdafx.h -------------------------------------------------------------------------------- /demo/GameDemo/Weapon/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/GameDemo/Weapon/targetver.h -------------------------------------------------------------------------------- /demo/MarkdownEditor/MarkdownEditor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/MarkdownEditor.cpp -------------------------------------------------------------------------------- /demo/MarkdownEditor/MarkdownEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /demo/MarkdownEditor/MarkdownEditor.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/MarkdownEditor.ico -------------------------------------------------------------------------------- /demo/MarkdownEditor/MarkdownEditor.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/MarkdownEditor.rc -------------------------------------------------------------------------------- /demo/MarkdownEditor/MarkdownEditor.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/MarkdownEditor.vcproj -------------------------------------------------------------------------------- /demo/MarkdownEditor/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 应用程序:MarkdownEditor 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 MarkdownEditor 应用程序。 6 | 7 | 本文件概要介绍组成 MarkdownEditor 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | MarkdownEditor.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | MarkdownEditor.cpp 16 | 这是主应用程序源文件。 17 | 18 | ///////////////////////////////////////////////////////////////////////////// 19 | 应用程序向导创建了下列资源: 20 | 21 | MarkdownEditor.rc 22 | 这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。 23 | 此文件可以直接在 Microsoft Visual C++ 中进行编辑。 24 | 25 | Resource.h 26 | 这是标准头文件,可用于定义新的资源 ID。 27 | Microsoft Visual C++ 将读取并更新此文件。 28 | 29 | MarkdownEditor.ico 30 | 这是一个图标文件,可用作应用程序的图标 (32x32)。 31 | 此图标包括在主资源文件 MarkdownEditor.rc 中。 32 | 33 | small.ico 34 | 这是一个图标文件,其中包含应用程序的图标的较小版本 (16x16)。此图标包括在主资源文件 MarkdownEditor.rc 中。 35 | 36 | ///////////////////////////////////////////////////////////////////////////// 37 | 其他标准文件: 38 | 39 | StdAfx.h, StdAfx.cpp 40 | 这些文件用于生成名为 MarkdownEditor.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | 其他注释: 44 | 45 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 46 | 47 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /demo/MarkdownEditor/Resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/Resource.h -------------------------------------------------------------------------------- /demo/MarkdownEditor/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/small.ico -------------------------------------------------------------------------------- /demo/MarkdownEditor/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/stdafx.cpp -------------------------------------------------------------------------------- /demo/MarkdownEditor/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/stdafx.h -------------------------------------------------------------------------------- /demo/MarkdownEditor/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/MarkdownEditor/targetver.h -------------------------------------------------------------------------------- /demo/WtlDemo/AboutDlg.h: -------------------------------------------------------------------------------- 1 | // aboutdlg.h : interface of the CAboutDlg class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #pragma once 6 | 7 | class CAboutDlg : public CDialogImpl 8 | { 9 | public: 10 | enum { IDD = IDD_ABOUTBOX }; 11 | 12 | BEGIN_MSG_MAP(CAboutDlg) 13 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 14 | COMMAND_ID_HANDLER(IDOK, OnCloseCmd) 15 | COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd) 16 | END_MSG_MAP() 17 | 18 | // Handler prototypes (uncomment arguments if needed): 19 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 20 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 21 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 22 | 23 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 24 | { 25 | CenterWindow(GetParent()); 26 | return TRUE; 27 | } 28 | 29 | LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 30 | { 31 | EndDialog(wID); 32 | return 0; 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /demo/WtlDemo/MainDlg.h: -------------------------------------------------------------------------------- 1 | // MainDlg.h : interface of the CMainDlg class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #pragma once 6 | 7 | 8 | class CMainDlg : public CDialogImpl, public CUpdateUI, 9 | public CMessageFilter, public CIdleHandler 10 | { 11 | public: 12 | enum { IDD = IDD_MAINDLG }; 13 | 14 | virtual BOOL PreTranslateMessage(MSG* pMsg) 15 | { 16 | return CWindow::IsDialogMessage(pMsg); 17 | } 18 | 19 | virtual BOOL OnIdle() 20 | { 21 | return FALSE; 22 | } 23 | 24 | BEGIN_UPDATE_UI_MAP(CMainDlg) 25 | END_UPDATE_UI_MAP() 26 | 27 | BEGIN_MSG_MAP(CMainDlg) 28 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 29 | MESSAGE_HANDLER(WM_DESTROY, OnDestroy) 30 | COMMAND_ID_HANDLER(ID_APP_ABOUT, OnAppAbout) 31 | COMMAND_ID_HANDLER(IDOK, OnOK) 32 | COMMAND_ID_HANDLER(IDCANCEL, OnCancel) 33 | END_MSG_MAP() 34 | 35 | // Handler prototypes (uncomment arguments if needed): 36 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 37 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 38 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 39 | 40 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 41 | { 42 | // center the dialog on the screen 43 | CenterWindow(); 44 | 45 | // set icons 46 | HICON hIcon = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME), 47 | IMAGE_ICON, ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR); 48 | SetIcon(hIcon, TRUE); 49 | HICON hIconSmall = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME), 50 | IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR); 51 | SetIcon(hIconSmall, FALSE); 52 | 53 | // register object for message filtering and idle updates 54 | CMessageLoop* pLoop = _Module.GetMessageLoop(); 55 | ATLASSERT(pLoop != NULL); 56 | pLoop->AddMessageFilter(this); 57 | pLoop->AddIdleHandler(this); 58 | 59 | UIAddChildWindowContainer(m_hWnd); 60 | 61 | return TRUE; 62 | } 63 | 64 | LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 65 | { 66 | // unregister message filtering and idle updates 67 | CMessageLoop* pLoop = _Module.GetMessageLoop(); 68 | ATLASSERT(pLoop != NULL); 69 | pLoop->RemoveMessageFilter(this); 70 | pLoop->RemoveIdleHandler(this); 71 | 72 | return 0; 73 | } 74 | 75 | LRESULT OnAppAbout(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 76 | { 77 | CAboutDlg dlg; 78 | dlg.DoModal(); 79 | return 0; 80 | } 81 | 82 | LRESULT OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 83 | { 84 | // TODO: Add validation code 85 | return 0; 86 | } 87 | 88 | LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 89 | { 90 | CloseDialog(wID); 91 | return 0; 92 | } 93 | 94 | void CloseDialog(int nVal) 95 | { 96 | DestroyWindow(); 97 | ::PostQuitMessage(nVal); 98 | } 99 | }; 100 | -------------------------------------------------------------------------------- /demo/WtlDemo/WtlDemo.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/WtlDemo/WtlDemo.aps -------------------------------------------------------------------------------- /demo/WtlDemo/WtlDemo.h: -------------------------------------------------------------------------------- 1 | // WtlDemo.h 2 | -------------------------------------------------------------------------------- /demo/WtlDemo/WtlDemo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/demo/WtlDemo/WtlDemo.rc -------------------------------------------------------------------------------- /demo/WtlDemo/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by WtlDemo.RC 4 | // 5 | 6 | 7 | #define IDD_ABOUTBOX 100 8 | #define IDR_MAINFRAME 128 9 | //#define IDR_WTLDEMOTYPE 129 10 | #define IDD_MAINDLG 129 11 | 12 | // Next default values for new objects 13 | // 14 | #ifdef APSTUDIO_INVOKED 15 | #ifndef APSTUDIO_READONLY_SYMBOLS 16 | #define _APS_NEXT_RESOURCE_VALUE 201 17 | #define _APS_NEXT_CONTROL_VALUE 1000 18 | #define _APS_NEXT_SYMED_VALUE 101 19 | #define _APS_NEXT_COMMAND_VALUE 32775 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /demo/WtlDemo/services.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 114003cf-505f-11e3-9ce6-00269e3e5da0 6 | MainApp 7 | 8 | 9 | 114003cf-505f-11e3-9ce6-222222222222 10 | E:\project\github\cptf\Debug\BundleTestor.dll 11 | 12 | 13 | -------------------------------------------------------------------------------- /demo/WtlDemo/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // WtlDemo.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | #if (_ATL_VER < 0x0700) 8 | #include 9 | #endif //(_ATL_VER < 0x0700) 10 | -------------------------------------------------------------------------------- /demo/WtlDemo/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | // Change these values to use different versions 9 | #define WINVER 0x0500 10 | #define _WIN32_WINNT 0x0501 11 | #define _WIN32_IE 0x0501 12 | #define _RICHEDIT_VER 0x0200 13 | 14 | #include 15 | #include 16 | #include "service/CptfModule.h" 17 | 18 | using cptf::core::CptfModule; 19 | 20 | extern CAppModule _Module; 21 | extern CptfModule g_cptfModule; 22 | 23 | #include 24 | 25 | #if defined _M_IX86 26 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 27 | #elif defined _M_IA64 28 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 29 | #elif defined _M_X64 30 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 31 | #else 32 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 33 | #endif 34 | -------------------------------------------------------------------------------- /resource/MarkdownEditor/js/markdowneditor.js: -------------------------------------------------------------------------------- 1 | 2 | var MesageName = "Editor"; 3 | var flag = 0 ; 4 | 5 | $(document).ready(function(){ 6 | onload(); 7 | initEvent(); 8 | $("#menu").menu({position: {at: "left bottom"}}); 9 | }); 10 | 11 | function initEvent(){ 12 | $("#code").keydown(function(event){ 13 | keypressEvent(event); 14 | }); 15 | 16 | $("#code").on('change keyup paste', function(){ 17 | reload(); 18 | }); 19 | 20 | $("#file_open").click(function(){ 21 | openFile(); 22 | }); 23 | 24 | $("#file_save").click(function(){ 25 | saveFile(); 26 | }); 27 | 28 | $("#file_new").click(function(){ 29 | newFile(); 30 | }); 31 | 32 | } 33 | 34 | function onload(){ 35 | reload(); 36 | }; 37 | 38 | function reload(){ 39 | var value = $('#code').val(); 40 | setOutput(value); 41 | } 42 | 43 | function setOutput(value){ 44 | document.getElementById("out").innerHTML = marked(value); 45 | } 46 | 47 | function openFile(){ 48 | alert("open"); 49 | } 50 | 51 | function saveFile(){ 52 | alert("save"); 53 | } 54 | 55 | function newFile(){ 56 | alert("new"); 57 | } 58 | 59 | function keypressEvent(keyEvent){ 60 | if(1== flag) 61 | var test = 0; 62 | if(keyEvent.ctrlKey){ 63 | 64 | if(keyEvent.keyCode == 78){ 65 | newFile(); 66 | }else if(keyEvent.keyCode == 83){ 67 | saveFile(); 68 | }else if(keyEvent.keyCode == 79){ 69 | openFile(); 70 | }else if(keyEvent.keyCode == 89){ 71 | alert("y"); 72 | } 73 | 74 | flag = 1; 75 | }else{ 76 | keyEvent.preventDefault(); 77 | } 78 | 79 | } -------------------------------------------------------------------------------- /resource/MarkdownEditor/makedown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    13 | 21 |
    22 |
    23 | qweqwe 24 |
    25 | 26 | -------------------------------------------------------------------------------- /resource/binding.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Binding Test 4 | 28 | 29 | 30 | 31 |
    32 | Message: 33 |
    34 |
    You should see the reverse of your message below: 35 |
    36 |
    37 |
    38 | 39 | 40 | -------------------------------------------------------------------------------- /resource/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | code Editor 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 | 12 | 13 | 14 | 15 |
    16 |
    17 |
    18 | 19 | 20 |
    21 | 22 | -------------------------------------------------------------------------------- /resource/js/editor.js: -------------------------------------------------------------------------------- 1 | 2 | var MesageName = 'editor'; 3 | 4 | /* 5 | $(document).ready(function(){ 6 | onload(); 7 | }); 8 | 9 | function onload(){ 10 | init(); 11 | newBtn = document.getElementById("new"); 12 | openBtn = document.getElementById("open"); 13 | saveBtn = document.getElementById("save"); 14 | 15 | newBtn.addEventListener("click", onNewButon); 16 | openBtn.addEventListener("click", onOpenButon); 17 | saveBtn.addEventListener("click", onSaveButon); 18 | }; 19 | 20 | function init(){ 21 | 22 | }*/ 23 | 24 | function onNewButon(){ 25 | var x = window.screenX + 10; 26 | var y = window.screenY + 10; 27 | window.open('editor.html', '_blank', 'screenX=' + x + ',screenY=' + y); 28 | } 29 | 30 | function onOpenButon(){ 31 | alert("onOpenButon"); 32 | var message = MesageName+'.'+"FileOpen"; 33 | app.setMessageCallback(message, function(name, args){ 34 | document.getElementById("result").value = args[0]; 35 | app.removeMessageCallback(message); 36 | }) 37 | 38 | app.sendMessage(message); 39 | 40 | } 41 | 42 | function onSaveButon(){ 43 | alert("onSaveButon"); 44 | } -------------------------------------------------------------------------------- /tools/GUIDGenerator.py: -------------------------------------------------------------------------------- 1 | import uuid 2 | 3 | def generateUuid(): 4 | print uuid.uuid1() 5 | 6 | if __name__ == '__main__': 7 | generateUuid() 8 | -------------------------------------------------------------------------------- /ui/AppWindow/AppWindow.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/AppWindow.aps -------------------------------------------------------------------------------- /ui/AppWindow/AppWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "AppWindow.h" 3 | #include "WinMainWindowCreator.h" 4 | 5 | AppWindow::AppWindow(void) 6 | { 7 | } 8 | 9 | AppWindow::~AppWindow(void) 10 | { 11 | } 12 | 13 | void AppWindow::init(const AppWindowParam& param) 14 | { 15 | appWindowParam_ = param; 16 | CefProcess::intiCef(); 17 | } 18 | 19 | bool AppWindow::show() 20 | { 21 | bool rtn(false); 22 | WinMainWindowCreator creator(appWindowParam_.className); 23 | creator.initInstance(appWindowParam_.title); 24 | return rtn; 25 | } 26 | 27 | int AppWindow::run() 28 | { 29 | return CefProcess::run(); 30 | } 31 | -------------------------------------------------------------------------------- /ui/AppWindow/AppWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef CPTF_UI_APPWINDOW 2 | #define CPTF_UI_APPWINDOW 3 | 4 | #include "service/CptfModule.h" 5 | 6 | #include "TypeDefine.h" 7 | #include "dllmain.h" 8 | #include "IAppWindow.h" 9 | 10 | extern cptf::core::CptfModule g_cptfModule; 11 | 12 | class AppWindow : public IAppWindow{ 13 | public: 14 | AppWindow(); 15 | ~AppWindow(); 16 | public: 17 | virtual void init(const AppWindowParam& param); 18 | virtual bool show(); 19 | virtual int run(); 20 | 21 | private: 22 | AppWindowParam appWindowParam_; 23 | }; 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /ui/AppWindow/AppWindow.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/AppWindow.rc -------------------------------------------------------------------------------- /ui/AppWindow/AppWindow.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/AppWindow.vcproj -------------------------------------------------------------------------------- /ui/AppWindow/CefProcess.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "CefProcess.h" 3 | #include "ClientApp.h" 4 | #include "utils/ApplicationPath.h" 5 | 6 | 7 | CefProcess::CefProcess(void) 8 | { 9 | } 10 | 11 | CefProcess::~CefProcess(void) 12 | { 13 | } 14 | 15 | void CefProcess::intiCef() 16 | { 17 | CefMainArgs main_args(NULL); 18 | CefRefPtr app(new ClientApp); 19 | int exit_code = CefExecuteProcess(main_args, app.get()); 20 | if (exit_code >= 0) { 21 | return ; 22 | } 23 | CefSettings settings; 24 | CefInitialize(main_args, settings, app.get()); 25 | } 26 | 27 | int CefProcess::run() 28 | { 29 | CefRunMessageLoop(); 30 | CefShutdown(); 31 | return 0; 32 | } 33 | 34 | void CefProcess::createBrowser(HWND hWnd 35 | , CefClient* client) 36 | { 37 | if (!client)return; 38 | 39 | CefBrowserSettings settings; 40 | CefWindowInfo info; 41 | RECT rect; 42 | GetClientRect(hWnd, &rect); 43 | info.SetAsChild(hWnd, rect); 44 | wstring resource = cptf::core::ApplicaitonPath<>::getCurAppPath(); 45 | wstring indexPath = L"file:///" 46 | + resource 47 | + cptf::core::ApplicaitonPath<>::getDirSeparator() 48 | + L"resource" 49 | + cptf::core::ApplicaitonPath<>::getDirSeparator() 50 | + L"main.html"; 51 | CefBrowserHost::CreateBrowser(info, client 52 | , indexPath, settings); 53 | } 54 | 55 | -------------------------------------------------------------------------------- /ui/AppWindow/CefProcess.h: -------------------------------------------------------------------------------- 1 | #ifndef CPTF_UI_CEFPROCEEE_H 2 | #define CPTF_UI_CEFPROCESS_H 3 | 4 | #include "MainWindowClient.h" 5 | 6 | 7 | 8 | class CefProcess 9 | { 10 | public: 11 | CefProcess(void); 12 | ~CefProcess(void); 13 | 14 | public: 15 | static void intiCef(); 16 | static int run(); 17 | static void createBrowser(HWND hWnd, CefClient* client); 18 | private: 19 | 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /ui/AppWindow/ClientApp.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "ClientApp.h" 3 | #include "ClientV8Handler.h" 4 | 5 | ClientApp::ClientApp(void) 6 | { 7 | } 8 | 9 | ClientApp::~ClientApp(void) 10 | { 11 | } 12 | 13 | void ClientApp::SetMessageCallback(const std::string& message_name, 14 | int browser_id, 15 | CefRefPtr context, 16 | CefRefPtr function) 17 | { 18 | callback_map_.insert(std::make_pair(std::make_pair(message_name, browser_id) 19 | , std::make_pair(context, function))); 20 | } 21 | 22 | bool ClientApp::RemoveMessageCallback(const std::string& message_name, 23 | int browser_id) 24 | { 25 | 26 | CallbackMap::iterator it = 27 | callback_map_.find(std::make_pair(message_name, browser_id)); 28 | if (it != callback_map_.end()) { 29 | callback_map_.erase(it); 30 | return true; 31 | } 32 | 33 | return false; 34 | } 35 | 36 | void ClientApp::OnWebKitInitialized() { 37 | // Register the client_app extension. 38 | std::string app_code = 39 | "var app;" 40 | "if (!app)" 41 | " app = {};" 42 | "(function() {" 43 | " app.sendMessage = function(name, arguments) {" 44 | " native function sendMessage();" 45 | " return sendMessage(name, arguments);" 46 | " };" 47 | " app.setMessageCallback = function(name, callback) {" 48 | " native function setMessageCallback();" 49 | " return setMessageCallback(name, callback);" 50 | " };" 51 | " app.removeMessageCallback = function(name) {" 52 | " native function removeMessageCallback();" 53 | " return removeMessageCallback(name);" 54 | " };" 55 | "})();"; 56 | CefRegisterExtension("v8/app", app_code, 57 | new ClientV8Handler(this)); 58 | } 59 | 60 | bool ClientApp::OnProcessMessageReceived(CefRefPtr browser, 61 | CefProcessId source_process, 62 | CefRefPtr message) 63 | { 64 | bool handled = false; 65 | 66 | // Execute the registered JavaScript callback if any. 67 | if (!callback_map_.empty()) { 68 | CefString message_name = message->GetName(); 69 | CallbackMap::const_iterator it = callback_map_.find( 70 | std::make_pair(message_name.ToString(), 71 | browser->GetIdentifier())); 72 | if (it != callback_map_.end()) { 73 | // Keep a local reference to the objects. The callback may remove itself 74 | // from the callback map. 75 | CefRefPtr context = it->second.first; 76 | CefRefPtr callback = it->second.second; 77 | 78 | // Enter the context. 79 | context->Enter(); 80 | 81 | CefV8ValueList arguments; 82 | 83 | // First argument is the message name. 84 | arguments.push_back(CefV8Value::CreateString(message_name)); 85 | 86 | // Second argument is the list of message arguments. 87 | CefRefPtr list = message->GetArgumentList(); 88 | CefRefPtr args = 89 | CefV8Value::CreateArray(static_cast(list->GetSize())); 90 | V8ListSetter::SetList(list, args); 91 | arguments.push_back(args); 92 | 93 | // Execute the callback. 94 | CefRefPtr retval = callback->ExecuteFunction(NULL, arguments); 95 | if (retval.get()) { 96 | if (retval->IsBool()) 97 | handled = retval->GetBoolValue(); 98 | } 99 | 100 | // Exit the context. 101 | context->Exit(); 102 | } 103 | } 104 | 105 | return handled; 106 | } -------------------------------------------------------------------------------- /ui/AppWindow/ClientApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "include/cef_app.h" 3 | #include "SetList.h" 4 | 5 | class ClientApp : public CefApp 6 | , public CefRenderProcessHandler 7 | { 8 | public: 9 | ClientApp(void); 10 | ~ClientApp(void); 11 | 12 | void SetMessageCallback(const std::string& message_name, 13 | int browser_id, 14 | CefRefPtr context, 15 | CefRefPtr function); 16 | 17 | bool RemoveMessageCallback(const std::string& message_name, 18 | int browser_id); 19 | 20 | virtual void OnWebKitInitialized(); 21 | 22 | virtual bool OnProcessMessageReceived( 23 | CefRefPtr browser, 24 | CefProcessId source_process, 25 | CefRefPtr message); 26 | 27 | private: 28 | virtual CefRefPtr GetRenderProcessHandler(){ return this; } 29 | 30 | private: 31 | typedef std::map, 32 | std::pair, CefRefPtr > > 33 | CallbackMap; 34 | CallbackMap callback_map_; 35 | 36 | IMPLEMENT_REFCOUNTING(ClientApp); 37 | }; 38 | -------------------------------------------------------------------------------- /ui/AppWindow/ClientV8Handler.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "ClientV8Handler.h" 3 | 4 | ClientV8Handler::ClientV8Handler(CefRefPtr clientApp) 5 | :clientApp_(clientApp) 6 | { 7 | } 8 | 9 | ClientV8Handler::~ClientV8Handler(void) 10 | { 11 | } 12 | 13 | bool ClientV8Handler::Execute(const CefString& name, 14 | CefRefPtr object, 15 | const CefV8ValueList& arguments, 16 | CefRefPtr& retval, 17 | CefString& exception) 18 | { 19 | bool handled = false; 20 | 21 | if (name == "sendMessage") { 22 | // Send a message to the browser process. 23 | if ((arguments.size() == 1 || arguments.size() == 2) && 24 | arguments[0]->IsString()) { 25 | CefRefPtr browser = 26 | CefV8Context::GetCurrentContext()->GetBrowser(); 27 | 28 | CefString name = arguments[0]->GetStringValue(); 29 | if (!name.empty()) { 30 | CefRefPtr message = 31 | CefProcessMessage::Create(name); 32 | 33 | // Translate the arguments, if any. 34 | if (arguments.size() == 2 && arguments[1]->IsArray()) 35 | V8ListSetter::SetList(arguments[1], message->GetArgumentList()); 36 | 37 | browser->SendProcessMessage(PID_BROWSER, message); 38 | handled = true; 39 | } 40 | } 41 | } else if (name == "setMessageCallback") { 42 | // Set a message callback. 43 | if (arguments.size() == 2 && arguments[0]->IsString() && 44 | arguments[1]->IsFunction()) { 45 | std::string name = arguments[0]->GetStringValue(); 46 | CefRefPtr context = CefV8Context::GetCurrentContext(); 47 | int browser_id = context->GetBrowser()->GetIdentifier(); 48 | clientApp_->SetMessageCallback(name, browser_id, context, 49 | arguments[1]); 50 | handled = true; 51 | } 52 | } else if (name == "removeMessageCallback") { 53 | // Remove a message callback. 54 | if (arguments.size() == 1 && arguments[0]->IsString()) { 55 | std::string name = arguments[0]->GetStringValue(); 56 | CefRefPtr context = CefV8Context::GetCurrentContext(); 57 | int browser_id = context->GetBrowser()->GetIdentifier(); 58 | bool removed = clientApp_->RemoveMessageCallback(name, browser_id); 59 | retval = CefV8Value::CreateBool(removed); 60 | handled = true; 61 | } 62 | } 63 | 64 | if (!handled) 65 | exception = "Invalid method arguments"; 66 | 67 | return true; 68 | } 69 | -------------------------------------------------------------------------------- /ui/AppWindow/ClientV8Handler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ClientApp.h" 3 | 4 | 5 | class ClientV8Handler : public CefV8Handler 6 | { 7 | public: 8 | ClientV8Handler(CefRefPtr clientApp); 9 | ~ClientV8Handler(void); 10 | 11 | virtual bool Execute(const CefString& name, 12 | CefRefPtr object, 13 | const CefV8ValueList& arguments, 14 | CefRefPtr& retval, 15 | CefString& exception); 16 | private: 17 | CefRefPtr clientApp_; 18 | 19 | IMPLEMENT_REFCOUNTING(ClientV8Handler); 20 | }; 21 | -------------------------------------------------------------------------------- /ui/AppWindow/IAppWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef CPTF_UI_IAPPWINDOW 2 | #define CPTF_UI_IAPPWINDOW 3 | 4 | #include "TypeDefine.h" 5 | #include "service/IDispatch.h" 6 | using namespace cptf::core; 7 | 8 | struct AppWindowParam 9 | { 10 | wstring className; 11 | wstring title; 12 | 13 | AppWindowParam(){} 14 | AppWindowParam(const wstring& _className, const wstring& _title) 15 | : className(_className) 16 | , title(_title) 17 | { 18 | 19 | } 20 | }; 21 | 22 | const wstring IAppWindow_IID = L"444444"; 23 | interfacecptf IAppWindow //: public cptf::core::IDispatch 24 | { 25 | virtual cptf::IID getIID(){return IAppWindow_IID;} 26 | 27 | virtual void init(const AppWindowParam& param) = 0; 28 | virtual bool show() = 0; 29 | virtual int run() = 0; 30 | 31 | }; 32 | 33 | //const wstring BundleAppWindow_IID = L"2ff2ff21-7775-11e3-b50d-bc305bacf447"; 34 | 35 | #endif -------------------------------------------------------------------------------- /ui/AppWindow/MainWindowClient.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "MainWindowClient.h" 3 | 4 | MainWindowClient::MainWindowClient(void) 5 | { 6 | } 7 | 8 | MainWindowClient::~MainWindowClient(void) 9 | { 10 | } 11 | 12 | CefRefPtr MainWindowClient::getBrowser() 13 | { 14 | return browser_; 15 | } 16 | 17 | void MainWindowClient::OnAfterCreated(CefRefPtr browser) 18 | { 19 | browser_ = browser; 20 | } 21 | 22 | 23 | bool MainWindowClient::OnProcessMessageReceived(CefRefPtr browser, 24 | CefProcessId source_process, 25 | CefRefPtr message) 26 | { 27 | bool rtn(false); 28 | processMessageDelegate_.OnProcessMessageReceived( 29 | browser 30 | , source_process 31 | , message); 32 | return rtn; 33 | } 34 | -------------------------------------------------------------------------------- /ui/AppWindow/MainWindowClient.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "include/cef_app.h" 3 | #include "include/cef_client.h" 4 | #include "ProcessMessageDelegate.h" 5 | 6 | class MainWindowClient : public CefClient 7 | , public CefLifeSpanHandler 8 | { 9 | public: 10 | MainWindowClient(void); 11 | ~MainWindowClient(void); 12 | 13 | public: 14 | CefRefPtr getBrowser(); 15 | public://override 16 | virtual CefRefPtr GetLifeSpanHandler(){return this;} 17 | virtual void OnAfterCreated(CefRefPtr browser); 18 | virtual bool OnProcessMessageReceived(CefRefPtr browser, 19 | CefProcessId source_process, 20 | CefRefPtr message); 21 | public: 22 | IMPLEMENT_REFCOUNTING(MainWindowClient); 23 | private: 24 | CefRefPtr browser_; 25 | ProcessMessageDelegate processMessageDelegate_; 26 | }; 27 | -------------------------------------------------------------------------------- /ui/AppWindow/ProcessMessageDelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "ProcessMessageDelegate.h" 3 | #include "service/ServiceContainer.h" 4 | #include "AppWindow.h" 5 | #include "utils/StringUtils.h" 6 | #include 7 | using std::string; 8 | using namespace cptf::core; 9 | 10 | ProcessMessageDelegate::ProcessMessageDelegate(void) 11 | { 12 | init(); 13 | } 14 | 15 | ProcessMessageDelegate::~ProcessMessageDelegate(void) 16 | { 17 | } 18 | 19 | void ProcessMessageDelegate::init() 20 | { 21 | vector processMsgDelegateIIds; 22 | processMsgDelegateIIds.push_back(L"30e78970-d358-11e3-a119-bc305bacf447");//BindJsProcessMsgDelegate_IID 23 | processMsgDelegateIIds.push_back(L"30178970-d358-11e3-a119-bc305bacf447");//DailogProcessMsgDelegate_IID 24 | processMsgDelegateIIds.push_back(L"30078970-d358-11e3-a119-bc305bacf447");//EditorProcessMsgDelegate 25 | 26 | 27 | for_each(processMsgDelegateIIds.begin(), processMsgDelegateIIds.end() 28 | ,bind(&ProcessMessageDelegate::appendProcessMsgImpl, this, _1)); 29 | } 30 | 31 | void ProcessMessageDelegate::appendProcessMsgImpl(const wstring& csid) 32 | { 33 | ServiceContainer container(&g_cptfModule); 34 | IProcessMsgImpl* processMsg = NULL; 35 | container.createService(csid, IProcessMsgImpl_IID, (void**)&processMsg); 36 | if(processMsg){ 37 | processMsgImpls_.push_back(processMsg); 38 | } 39 | } 40 | 41 | bool ProcessMessageDelegate::OnProcessMessageReceived(CefRefPtr browser 42 | , CefProcessId source_process 43 | ,CefRefPtr message) 44 | { 45 | for_each(processMsgImpls_.begin(), processMsgImpls_.end() 46 | , bind(&ProcessMessageDelegate::excuteMsg, this, _1, browser, message)); 47 | 48 | return true; 49 | 50 | } 51 | 52 | void ProcessMessageDelegate::excuteMsg(IProcessMsgImpl* processMsg 53 | , const CefRefPtr browser 54 | , const CefRefPtr& msg) 55 | { 56 | if (!processMsg || !browser.get() || !msg.get())return; 57 | 58 | vector msgs =StringUtils<1>::splitLast(msg->GetName(), "."); 59 | if(msgs.empty() || processMsg->getName() != msgs[0])return; 60 | 61 | processMsg->excute(browser, msg); 62 | } -------------------------------------------------------------------------------- /ui/AppWindow/ProcessMessageDelegate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "include/cef_client.h" 3 | #include "TypeDefine.h" 4 | #include "service/IDispatch.h" 5 | 6 | const wstring IProcessMsgImpl_IID = L"29aca551-d358-11e3-826c-bc305bacf447"; 7 | interfacecptf IProcessMsgImpl : public cptf::core::IDispatch 8 | { 9 | virtual bool excute(const CefRefPtrbrowser 10 | , const CefRefPtr& msg) const = 0; 11 | virtual string getName() const = 0; 12 | }; 13 | 14 | class ProcessMessageDelegate : public CefBase 15 | { 16 | public: 17 | ProcessMessageDelegate(); 18 | ~ProcessMessageDelegate(); 19 | 20 | virtual bool OnProcessMessageReceived( 21 | CefRefPtr browser, 22 | CefProcessId source_process, 23 | CefRefPtr message); 24 | private: 25 | void init(); 26 | void excuteMsg(IProcessMsgImpl* processMsg 27 | , CefRefPtr browser 28 | , const CefRefPtr& msg); 29 | void appendProcessMsgImpl(const wstring& csid); 30 | private: 31 | vector processMsgImpls_; 32 | 33 | IMPLEMENT_REFCOUNTING(ProcessMessageDelegate); 34 | }; 35 | 36 | 37 | -------------------------------------------------------------------------------- /ui/AppWindow/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 动态链接库:AppWindow 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 AppWindow DLL。 6 | 7 | 本文件概要介绍组成 AppWindow 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | AppWindow.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | AppWindow.cpp 16 | 这是主 DLL 源文件。 17 | 18 | 此 DLL 在创建时不导出任何符号。因此,在生成此 DLL 时 19 | 将不会产生 .lib 文件。如果希望此项目 20 | 成为其他某个项目的项目依赖项,则需要 21 | 添加代码以从 DLL 导出某些符号, 22 | 以便产生一个导出库,或者,也可以在项目“属性页”对话框中的 23 | “链接器”文件夹中,将“常规”属性页上的 24 | “忽略输入库”属性设置为“是”。 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | 其他标准文件: 28 | 29 | StdAfx.h, StdAfx.cpp 30 | 这些文件用于生成名为 AppWindow.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | 其他注释: 34 | 35 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 36 | 37 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /ui/AppWindow/RunFileDialogCallback.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "RunFileDialogCallback.h" 3 | #include "../../utils/IO/FileReader.h" 4 | #include "service/ServiceContainer.h" 5 | #include "AppWindow.h" 6 | 7 | 8 | using namespace cptf::core; 9 | 10 | RunFileDialogCallback::RunFileDialogCallback(void) 11 | { 12 | } 13 | 14 | RunFileDialogCallback::~RunFileDialogCallback(void) 15 | { 16 | } 17 | 18 | void RunFileDialogCallback::OnFileDialogDismissed( CefRefPtr browser_host, 19 | const std::vector& file_paths) 20 | { 21 | if(file_paths.empty()) return; 22 | 23 | CefRefPtr message = 24 | CefProcessMessage::Create("Editor.FileOpen"); 25 | CefRefPtr args = message->GetArgumentList(); 26 | CefRefPtr val = CefListValue::Create(); 27 | 28 | ServiceContainer container(&g_cptfModule); 29 | IFileReader* fileReader = static_cast(container.getService( 30 | MappingFileReader_IID, IFileReader_IID)); 31 | if (fileReader){ 32 | fileReader->setFileName(file_paths[0].c_str()); 33 | char* content = fileReader->read(); 34 | val->SetString(0, content); 35 | } 36 | 37 | args->SetList(0, val); 38 | 39 | // This will result in a call to the callback registered via JavaScript in 40 | // dialogs.html. 41 | browser_host->GetBrowser()->SendProcessMessage(PID_RENDERER, message); 42 | } 43 | -------------------------------------------------------------------------------- /ui/AppWindow/RunFileDialogCallback.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "include/cef_browser.h" 3 | 4 | class RunFileDialogCallback : public CefRunFileDialogCallback 5 | { 6 | public: 7 | RunFileDialogCallback(void); 8 | ~RunFileDialogCallback(void); 9 | 10 | virtual void OnFileDialogDismissed( 11 | CefRefPtr browser_host, 12 | const std::vector& file_paths); 13 | 14 | IMPLEMENT_REFCOUNTING(CefRunFileDialogCallback) 15 | }; 16 | -------------------------------------------------------------------------------- /ui/AppWindow/SetList.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "include/cef_v8.h" 3 | 4 | 5 | struct V8ListSetter 6 | { 7 | // Transfer a V8 value to a List index. 8 | static void SetListValue(CefRefPtr list 9 | , int index, 10 | CefRefPtr value) 11 | { 12 | if (value->IsArray()) { 13 | CefRefPtr new_list = CefListValue::Create(); 14 | SetList(value, new_list); 15 | list->SetList(index, new_list); 16 | } else if (value->IsString()) { 17 | list->SetString(index, value->GetStringValue()); 18 | } else if (value->IsBool()) { 19 | list->SetBool(index, value->GetBoolValue()); 20 | } else if (value->IsInt()) { 21 | list->SetInt(index, value->GetIntValue()); 22 | } else if (value->IsDouble()) { 23 | list->SetDouble(index, value->GetDoubleValue()); 24 | } 25 | } 26 | 27 | // Transfer a V8 array to a List. 28 | static void SetList(CefRefPtr source 29 | , CefRefPtr target) 30 | { 31 | int arg_length = source->GetArrayLength(); 32 | if (arg_length == 0) 33 | return; 34 | 35 | // Start with null types in all spaces. 36 | target->SetSize(arg_length); 37 | 38 | for (int i = 0; i < arg_length; ++i) 39 | SetListValue(target, i, source->GetValue(i)); 40 | } 41 | 42 | // Transfer a List value to a V8 array index. 43 | static void SetListValue(CefRefPtr list 44 | , int index 45 | , CefRefPtr value) 46 | { 47 | CefRefPtr new_value; 48 | 49 | CefValueType type = value->GetType(index); 50 | switch (type) { 51 | case VTYPE_LIST: { 52 | CefRefPtr list = value->GetList(index); 53 | new_value = CefV8Value::CreateArray(static_cast(list->GetSize())); 54 | SetList(list, new_value); 55 | } break; 56 | case VTYPE_BOOL: 57 | new_value = CefV8Value::CreateBool(value->GetBool(index)); 58 | break; 59 | case VTYPE_DOUBLE: 60 | new_value = CefV8Value::CreateDouble(value->GetDouble(index)); 61 | break; 62 | case VTYPE_INT: 63 | new_value = CefV8Value::CreateInt(value->GetInt(index)); 64 | break; 65 | case VTYPE_STRING: 66 | new_value = CefV8Value::CreateString(value->GetString(index)); 67 | break; 68 | default: 69 | break; 70 | } 71 | 72 | if (new_value.get()) { 73 | list->SetValue(index, new_value); 74 | } else { 75 | list->SetValue(index, CefV8Value::CreateNull()); 76 | } 77 | } 78 | 79 | // Transfer a List to a V8 array. 80 | static void SetList(CefRefPtr source 81 | , CefRefPtr target) 82 | { 83 | int arg_length = static_cast(source->GetSize()); 84 | if (arg_length == 0) 85 | return; 86 | 87 | for (int i = 0; i < arg_length; ++i) 88 | SetListValue(target, i, source); 89 | } 90 | }; 91 | 92 | -------------------------------------------------------------------------------- /ui/AppWindow/WinMainWindowCreator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/WinMainWindowCreator.h -------------------------------------------------------------------------------- /ui/AppWindow/WinWidgetProcess.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "WinWidgetProcess.h" 3 | 4 | WinWidgetProcess::WinWidgetProcess(void) 5 | { 6 | } 7 | 8 | WinWidgetProcess::~WinWidgetProcess(void) 9 | { 10 | } 11 | 12 | void WinWidgetProcess::autoSize(HWND apphwnd, HWND browserHwnd) 13 | { 14 | if (!apphwnd || !browserHwnd)return; 15 | 16 | RECT rect; 17 | GetClientRect(apphwnd, &rect); 18 | 19 | HDWP hdwp = BeginDeferWindowPos(1); 20 | hdwp = DeferWindowPos(hdwp, browserHwnd, NULL, 21 | rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 22 | SWP_NOZORDER); 23 | EndDeferWindowPos(hdwp); 24 | } 25 | -------------------------------------------------------------------------------- /ui/AppWindow/WinWidgetProcess.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class WinWidgetProcess 4 | { 5 | public: 6 | WinWidgetProcess(void); 7 | ~WinWidgetProcess(void); 8 | public: 9 | static void autoSize(HWND apphwnd, HWND browserHwnd); 10 | }; 11 | -------------------------------------------------------------------------------- /ui/AppWindow/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/dllmain.cpp -------------------------------------------------------------------------------- /ui/AppWindow/dllmain.h: -------------------------------------------------------------------------------- 1 | #ifndef CPTF_UI_DLLMAIN_H 2 | #define CPTF_UI_DLLMAIN_H 3 | 4 | #include "service/CptfDllModuleT.h" 5 | using namespace cptf::core; 6 | 7 | class CAppWindowModule : public CptfDllModuleT 8 | { 9 | public : 10 | }; 11 | 12 | extern class CAppWindowModule g_module; 13 | 14 | #endif -------------------------------------------------------------------------------- /ui/AppWindow/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/resource.h -------------------------------------------------------------------------------- /ui/AppWindow/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/stdafx.cpp -------------------------------------------------------------------------------- /ui/AppWindow/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/stdafx.h -------------------------------------------------------------------------------- /ui/AppWindow/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/ui/AppWindow/targetver.h -------------------------------------------------------------------------------- /utils/IO/FileReader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TypeDefine.h" 3 | #include "service/IDispatch.h" 4 | 5 | const wstring IFileReader_IID = L"20aca551-d358-11e3-826c-bc305bacf447"; 6 | interfacecptf IFileReader : public cptf::core::IDispatch { 7 | 8 | virtual void setFileName(const wstring& fileName) = 0; 9 | virtual char* read() = 0; 10 | 11 | }; 12 | 13 | const wstring MappingFileReader_IID= L"30078930-d358-11e3-a119-bc305bacf447"; 14 | 15 | 16 | -------------------------------------------------------------------------------- /utils/IO/IO.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/IO/IO.cpp -------------------------------------------------------------------------------- /utils/IO/IO.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/IO/IO.vcproj -------------------------------------------------------------------------------- /utils/IO/IWinMappingFile.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "windows.h" 3 | #include "utils/Log.h" 4 | 5 | using namespace cptf; 6 | 7 | template 8 | class IWinMappingFile{ 9 | 10 | public: 11 | IWinMappingFile(){} 12 | virtual ~IWinMappingFile(){} 13 | 14 | char* readFile(const wstring& filename); 15 | 16 | private: 17 | HANDLE openFile(const wstring& filename); 18 | HANDLE createFileMap(const HANDLE fileHandle); 19 | char* getData(const HANDLE handleMapping); 20 | }; 21 | 22 | template 23 | char* IWinMappingFile::readFile(const wstring& fileName) 24 | { 25 | HANDLE handelFile = openFile(fileName); 26 | HANDLE handleMapping = createFileMap(handelFile); 27 | char* rtn = getData(handleMapping); 28 | CloseHandle(handleMapping); 29 | CloseHandle(handelFile); 30 | 31 | return rtn; 32 | } 33 | 34 | template 35 | HANDLE IWinMappingFile::openFile(const wstring& fileName) 36 | { 37 | HANDLE handel = ::CreateFile(fileName.c_str() 38 | , GENERIC_READ | GENERIC_WRITE 39 | , 0 40 | , NULL 41 | , OPEN_EXISTING 42 | , FILE_FLAG_SEQUENTIAL_SCAN 43 | , NULL); 44 | 45 | if (INVALID_HANDLE_VALUE == handel) 46 | LOG(ERROR) <<"can not open "< 52 | HANDLE IWinMappingFile::createFileMap(const HANDLE fileHandle) 53 | { 54 | ulong fileSize = ::GetFileSize(fileHandle, NULL); 55 | HANDLE handel = ::CreateFileMapping(fileHandle 56 | , NULL 57 | , PAGE_READWRITE 58 | , 0 59 | , fileSize + 1 60 | , NULL); 61 | if (!handel)LOG(ERROR) <<"CreateFileMapping failed"; 62 | 63 | return handel; 64 | } 65 | 66 | template 67 | char* IWinMappingFile::getData(const HANDLE handleMapping) 68 | { 69 | char* rtn = (char *)::MapViewOfFile(handleMapping 70 | , FILE_MAP_WRITE 71 | , 0 72 | , 0 73 | , 0); 74 | if (!rtn)LOG(ERROR) <<"Can't map file"; 75 | return rtn; 76 | } -------------------------------------------------------------------------------- /utils/IO/MappingFileReader.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "MappingFileReader.h" 3 | 4 | MappingFileReader::MappingFileReader(void) 5 | { 6 | } 7 | 8 | MappingFileReader::~MappingFileReader(void) 9 | { 10 | } 11 | 12 | void MappingFileReader::setFileName(const wstring& fileName) 13 | { 14 | fileName_ = fileName; 15 | } 16 | 17 | char* MappingFileReader::read() 18 | { 19 | return readFile(fileName_); 20 | } 21 | -------------------------------------------------------------------------------- /utils/IO/MappingFileReader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "FileReader.h" 4 | #include "IWinMappingFile.h" 5 | #include "service/ServiceCoClass.h" 6 | #include "service/IDispatchImpl.h" 7 | #include "service/ObjectRoot.h" 8 | #include "service/ThreadModel.h" 9 | #include "service/CpftBase.h" 10 | 11 | using namespace cptf::core; 12 | 13 | class MappingFileReader : public ServiceCoClass 14 | , public ObjectRoot 15 | , public IDispatchImpl 16 | , public IWinMappingFile 17 | { 18 | public: 19 | MappingFileReader(void); 20 | ~MappingFileReader(void); 21 | 22 | static wstring clsid() {return MappingFileReader_IID;} 23 | 24 | public: 25 | virtual void setFileName(const wstring& fileName); 26 | virtual char* read(); 27 | 28 | private: 29 | wstring fileName_; 30 | 31 | CPTF_BEGIN_SERVICE_MAP(MappingFileReader) 32 | CPTF_SERVICE_INTERFACE_ENTRY(IFileReader_IID, IFileReader) 33 | CPTF_END_SERVICE_MAP() 34 | }; 35 | 36 | CPTF_OBJECT_ENTRY_AUTO(MappingFileReader) 37 | -------------------------------------------------------------------------------- /utils/IO/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 动态链接库:IO 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 IO DLL。 6 | 7 | 本文件概要介绍组成 IO 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | IO.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | IO.cpp 16 | 这是主 DLL 源文件。 17 | 18 | 此 DLL 在创建时不导出任何符号。因此,在生成此 DLL 时 19 | 将不会产生 .lib 文件。如果希望此项目 20 | 成为其他某个项目的项目依赖项,则需要 21 | 添加代码以从 DLL 导出某些符号, 22 | 以便产生一个导出库,或者,也可以在项目“属性页”对话框中的 23 | “链接器”文件夹中,将“常规”属性页上的 24 | “忽略输入库”属性设置为“是”。 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | 其他标准文件: 28 | 29 | StdAfx.h, StdAfx.cpp 30 | 这些文件用于生成名为 IO.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | 其他注释: 34 | 35 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 36 | 37 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /utils/IO/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/IO/dllmain.cpp -------------------------------------------------------------------------------- /utils/IO/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/IO/stdafx.cpp -------------------------------------------------------------------------------- /utils/IO/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/IO/stdafx.h -------------------------------------------------------------------------------- /utils/IO/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/IO/targetver.h -------------------------------------------------------------------------------- /utils/log/Glogger.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Glogger.h" 3 | #include "glog/include/logging.h" 4 | Glogger::Glogger() 5 | { 6 | } 7 | 8 | Glogger::~Glogger() 9 | { 10 | } 11 | 12 | void Glogger::init() 13 | { 14 | google::InitGoogleLogging(""); 15 | google::SetLogDestination(google::GLOG_INFO, "log/info.log"); 16 | google::SetLogDestination(google::GLOG_ERROR, "log/error.log"); 17 | google::SetLogDestination(google::GLOG_WARNING, "log/warning.log"); 18 | } 19 | 20 | void Glogger::log(int level 21 | , const string& msg) 22 | { 23 | switch(level){ 24 | case LL_ERROR: 25 | LOG(ERROR) << msg; 26 | break; 27 | case LL_INFO: 28 | LOG(INFO) << msg; 29 | break; 30 | case LL_WARNING: 31 | LOG(WARNING) << msg; 32 | break; 33 | default: 34 | break; 35 | } 36 | } -------------------------------------------------------------------------------- /utils/log/Glogger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Logger.h" 3 | #include "service/ServiceCoClass.h" 4 | #include "service/IDispatchImpl.h" 5 | #include "service/ObjectRoot.h" 6 | #include "service/ThreadModel.h" 7 | #include "service/CpftBase.h" 8 | 9 | using namespace cptf::core; 10 | 11 | const wstring Glogger_IID= L"30098970-d358-11e3-a119-bc305bacf447"; 12 | class Glogger : public ILogger 13 | , public DefaultServiceImpl 14 | { 15 | public: 16 | Glogger(); 17 | ~Glogger(); 18 | 19 | static wstring clsid() {return Glogger_IID;} 20 | 21 | virtual void init(); 22 | virtual void log(int level, const string& msg); 23 | 24 | CPTF_BEGIN_SERVICE_MAP(Glogger) 25 | CPTF_SERVICE_INTERFACE_ENTRY(Glogger_IID, ILogger) 26 | CPTF_END_SERVICE_MAP() 27 | }; 28 | 29 | CPTF_OBJECT_ENTRY_AUTO(Glogger) 30 | -------------------------------------------------------------------------------- /utils/log/Logger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "TypeDefine.h" 4 | #include "service/IDispatch.h" 5 | 6 | enum LoggerLevel{ 7 | LL_ERROR = 0, 8 | LL_INFO, 9 | LL_WARNING 10 | }; 11 | 12 | const wstring ILogger_IID = L"20aca551-d358-11e3-826c-bc305bacf447"; 13 | interfacecptf ILogger: public cptf::core::IDispatch { 14 | virtual void init() = 0; 15 | virtual void log(int level, const string& msg) = 0; 16 | }; -------------------------------------------------------------------------------- /utils/log/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 动态链接库:log 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 log DLL。 6 | 7 | 本文件概要介绍组成 log 应用程序的 8 | 的每个文件的内容。 9 | 10 | 11 | log.vcproj 12 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件, 13 | 其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 14 | 15 | log.cpp 16 | 这是主 DLL 源文件。 17 | 18 | 此 DLL 在创建时不导出任何符号。因此,在生成此 DLL 时 19 | 将不会产生 .lib 文件。如果希望此项目 20 | 成为其他某个项目的项目依赖项,则需要 21 | 添加代码以从 DLL 导出某些符号, 22 | 以便产生一个导出库,或者,也可以在项目“属性页”对话框中的 23 | “链接器”文件夹中,将“常规”属性页上的 24 | “忽略输入库”属性设置为“是”。 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | 其他标准文件: 28 | 29 | StdAfx.h, StdAfx.cpp 30 | 这些文件用于生成名为 log.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | 其他注释: 34 | 35 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 36 | 37 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /utils/log/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/log/dllmain.cpp -------------------------------------------------------------------------------- /utils/log/log.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/log/log.cpp -------------------------------------------------------------------------------- /utils/log/log.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/log/log.vcproj -------------------------------------------------------------------------------- /utils/log/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/log/stdafx.cpp -------------------------------------------------------------------------------- /utils/log/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/log/stdafx.h -------------------------------------------------------------------------------- /utils/log/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sld666666/cptf/090a8806979590258b80beb58f610a9b7e2b4cff/utils/log/targetver.h --------------------------------------------------------------------------------