├── CefVersion.txt
├── CfxDocs
├── CfxDocs.shfbproj
├── CfxDocs.sln
├── Content
│ └── Welcome.aml
├── ContentLayout.content
└── icons
│ └── Help.png
├── CfxGenerator.sln
├── CfxGenerator
├── ApiTypeBuilder.cs
├── ApiTypes
│ ├── ApiType.cs
│ ├── BlittablePtrType.cs
│ ├── BlittableType.cs
│ ├── BooleanInteger.cs
│ ├── CefBasePtrType.cs
│ ├── CefBaseType.cs
│ ├── CefColorType.cs
│ ├── CefEnumPtrType.cs
│ ├── CefEnumType.cs
│ ├── CefPlatformBasePtrType.cs
│ ├── CefPlatformStructType.cs
│ ├── CefStringListType.cs
│ ├── CefStringMapType.cs
│ ├── CefStringMultimapType.cs
│ ├── CefStringOutType.cs
│ ├── CefStringPtrType.cs
│ ├── CefStringPtrTypeConst.cs
│ ├── CefStringType.cs
│ ├── CefStringUserfreeType.cs
│ ├── CefStructOutType.cs
│ ├── CefStructPtrPtrType.cs
│ ├── CefStructPtrType.cs
│ ├── CefStructType.cs
│ ├── CefType.cs
│ ├── NumericOutType.cs
│ ├── NumericType.cs
│ ├── OpaquePtrType.cs
│ ├── SizeType.cs
│ ├── SizeTypeOut.cs
│ ├── SpecialType.cs
│ ├── StringCollectionType.cs
│ ├── VoidPtrPtrType.cs
│ └── WrapperOnly
│ │ ├── CefStructArrayType.cs
│ │ ├── CefStructPtrArrayType.cs
│ │ └── WrapperArrayType.cs
├── AssemblyResources.cs
├── CSharp.cs
├── CefApiDeclarations.cs
├── CefCallbackFunction.cs
├── CefColorRefType.cs
├── CefExportFunction.cs
├── CefPlatform.cs
├── CfxCallMode.cs
├── CfxClass
│ ├── CfxClass.cs
│ ├── CfxClientClass.cs
│ ├── CfxLibraryClass.cs
│ └── CfxValueClass.cs
├── CfxGenerator.csproj
├── CodeBuilder.cs
├── CodeSnippets.cs
├── Config
│ ├── BlittableTypes.txt
│ ├── BrowserProcessOnly.txt
│ ├── LicenseStub.txt
│ ├── PrivateWrapper.txt
│ └── StructsNeedWrapping.txt
├── CustomSignatures
│ ├── CefV8HandlerExecuteSignature.cs
│ ├── CustomSignatures.cs
│ ├── GetFrameIdentifiersSignature.cs
│ ├── GetPageRangesSignature.cs
│ ├── SignatureWithStructArray.cs
│ ├── SignatureWithStructPtrArray.cs
│ ├── StringCollectionAsRetvalSignature.cs
│ └── StructArrayGetterSignature.cs
├── GeneratedFileManager.cs
├── GeneratorConfig.cs
├── Parser
│ ├── CHeaderParser.cs
│ ├── CefCApiParser.cs
│ ├── CefClassesParser.cs
│ ├── CefInternalsParser.cs
│ ├── Nodes
│ │ ├── CallbackNode.cs
│ │ ├── CefApiNode.cs
│ │ ├── CefClassNode.cs
│ │ ├── CefConfigNode.cs
│ │ ├── CefCppFunctionNode.cs
│ │ ├── CommentNode.cs
│ │ ├── EnumNode.cs
│ │ ├── EnumValueNode.cs
│ │ ├── FunctionNode.cs
│ │ ├── ParameterNode.cs
│ │ ├── SignatureNode.cs
│ │ ├── StructMemberNode.cs
│ │ ├── StructNode.cs
│ │ └── TypeNode.cs
│ ├── Parser.cs
│ └── Scanner.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── Signature
│ ├── Parameter.cs
│ └── Signature.cs
├── StructProperty.cs
└── WrapperGenerator.cs
├── CfxTestApp
├── BrowserForm.Designer.cs
├── BrowserForm.cs
├── BrowserForm.resx
├── CfxTestApplication.csproj
├── HttpWebResponseCompatTest.cs
├── JsTestObject.cs
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
└── Walkthrough01.cs
├── ChromiumFX.sln
├── ChromiumFX
├── ChromiumFX.csproj
├── Generated
│ ├── CfxAccessibilityHandler.cs
│ ├── CfxApi.cs
│ ├── CfxApiLoader.cs
│ ├── CfxApp.cs
│ ├── CfxAuthCallback.cs
│ ├── CfxBeforeDownloadCallback.cs
│ ├── CfxBinaryValue.cs
│ ├── CfxBoxLayoutSettings.cs
│ ├── CfxBrowser.cs
│ ├── CfxBrowserHost.cs
│ ├── CfxBrowserProcessHandler.cs
│ ├── CfxBrowserSettings.cs
│ ├── CfxCallback.cs
│ ├── CfxClient.cs
│ ├── CfxCommandLine.cs
│ ├── CfxCompletionCallback.cs
│ ├── CfxCompositionUnderline.cs
│ ├── CfxContextMenuHandler.cs
│ ├── CfxContextMenuParams.cs
│ ├── CfxCookie.cs
│ ├── CfxCookieManager.cs
│ ├── CfxCookieVisitor.cs
│ ├── CfxCursorInfo.cs
│ ├── CfxDeleteCookiesCallback.cs
│ ├── CfxDialogHandler.cs
│ ├── CfxDictionaryValue.cs
│ ├── CfxDisplayHandler.cs
│ ├── CfxDomDocument.cs
│ ├── CfxDomNode.cs
│ ├── CfxDomVisitor.cs
│ ├── CfxDownloadHandler.cs
│ ├── CfxDownloadImageCallback.cs
│ ├── CfxDownloadItem.cs
│ ├── CfxDownloadItemCallback.cs
│ ├── CfxDragData.cs
│ ├── CfxDragHandler.cs
│ ├── CfxDraggableRegion.cs
│ ├── CfxEndTracingCallback.cs
│ ├── CfxEnums.cs
│ ├── CfxExtension.cs
│ ├── CfxExtensionHandler.cs
│ ├── CfxFileDialogCallback.cs
│ ├── CfxFindHandler.cs
│ ├── CfxFocusHandler.cs
│ ├── CfxFrame.cs
│ ├── CfxGetExtensionResourceCallback.cs
│ ├── CfxImage.cs
│ ├── CfxInsets.cs
│ ├── CfxJsDialogCallback.cs
│ ├── CfxJsDialogHandler.cs
│ ├── CfxKeyEvent.cs
│ ├── CfxKeyboardHandler.cs
│ ├── CfxLifeSpanHandler.cs
│ ├── CfxListValue.cs
│ ├── CfxLoadHandler.cs
│ ├── CfxMainArgsLinux.cs
│ ├── CfxMainArgsWindows.cs
│ ├── CfxMenuModel.cs
│ ├── CfxMenuModelDelegate.cs
│ ├── CfxMouseEvent.cs
│ ├── CfxNavigationEntry.cs
│ ├── CfxNavigationEntryVisitor.cs
│ ├── CfxPdfPrintCallback.cs
│ ├── CfxPdfPrintSettings.cs
│ ├── CfxPoint.cs
│ ├── CfxPopupFeatures.cs
│ ├── CfxPostData.cs
│ ├── CfxPostDataElement.cs
│ ├── CfxPrintDialogCallback.cs
│ ├── CfxPrintHandler.cs
│ ├── CfxPrintJobCallback.cs
│ ├── CfxPrintSettings.cs
│ ├── CfxProcessMessage.cs
│ ├── CfxRange.cs
│ ├── CfxReadHandler.cs
│ ├── CfxRect.cs
│ ├── CfxRegisterCdmCallback.cs
│ ├── CfxRenderHandler.cs
│ ├── CfxRenderProcessHandler.cs
│ ├── CfxRequest.cs
│ ├── CfxRequestCallback.cs
│ ├── CfxRequestContext.cs
│ ├── CfxRequestContextHandler.cs
│ ├── CfxRequestContextSettings.cs
│ ├── CfxRequestHandler.cs
│ ├── CfxResolveCallback.cs
│ ├── CfxResourceBundle.cs
│ ├── CfxResourceBundleHandler.cs
│ ├── CfxResourceHandler.cs
│ ├── CfxResponse.cs
│ ├── CfxResponseFilter.cs
│ ├── CfxRunContextMenuCallback.cs
│ ├── CfxRunFileDialogCallback.cs
│ ├── CfxRuntime.cs
│ ├── CfxSchemeHandlerFactory.cs
│ ├── CfxSchemeRegistrar.cs
│ ├── CfxScreenInfo.cs
│ ├── CfxSelectClientCertificateCallback.cs
│ ├── CfxServer.cs
│ ├── CfxServerHandler.cs
│ ├── CfxSetCookieCallback.cs
│ ├── CfxSettings.cs
│ ├── CfxSize.cs
│ ├── CfxSslInfo.cs
│ ├── CfxSslStatus.cs
│ ├── CfxStreamReader.cs
│ ├── CfxStreamWriter.cs
│ ├── CfxStringVisitor.cs
│ ├── CfxTask.cs
│ ├── CfxTaskRunner.cs
│ ├── CfxThread.cs
│ ├── CfxTime.cs
│ ├── CfxUrlParts.cs
│ ├── CfxUrlRequest.cs
│ ├── CfxUrlRequestClient.cs
│ ├── CfxV8Accessor.cs
│ ├── CfxV8ArrayBufferReleaseCallback.cs
│ ├── CfxV8Context.cs
│ ├── CfxV8Exception.cs
│ ├── CfxV8Handler.cs
│ ├── CfxV8Interceptor.cs
│ ├── CfxV8StackFrame.cs
│ ├── CfxV8StackTrace.cs
│ ├── CfxV8Value.cs
│ ├── CfxValue.cs
│ ├── CfxWaitableEvent.cs
│ ├── CfxWebPluginInfo.cs
│ ├── CfxWebPluginInfoVisitor.cs
│ ├── CfxWebPluginUnstableCallback.cs
│ ├── CfxWindowInfoLinux.cs
│ ├── CfxWindowInfoWindows.cs
│ ├── CfxWriteHandler.cs
│ ├── CfxX509CertPrincipal.cs
│ ├── CfxX509Certificate.cs
│ ├── CfxXmlReader.cs
│ ├── CfxZipReader.cs
│ └── Remote
│ │ ├── CfrApp.cs
│ │ ├── CfrBinaryValue.cs
│ │ ├── CfrBrowser.cs
│ │ ├── CfrCallback.cs
│ │ ├── CfrCommandLine.cs
│ │ ├── CfrDictionaryValue.cs
│ │ ├── CfrDomDocument.cs
│ │ ├── CfrDomNode.cs
│ │ ├── CfrDomVisitor.cs
│ │ ├── CfrFrame.cs
│ │ ├── CfrListValue.cs
│ │ ├── CfrLoadHandler.cs
│ │ ├── CfrPostData.cs
│ │ ├── CfrPostDataElement.cs
│ │ ├── CfrProcessMessage.cs
│ │ ├── CfrReadHandler.cs
│ │ ├── CfrRect.cs
│ │ ├── CfrRenderProcessHandler.cs
│ │ ├── CfrRequest.cs
│ │ ├── CfrResourceBundle.cs
│ │ ├── CfrResourceBundleHandler.cs
│ │ ├── CfrResponse.cs
│ │ ├── CfrRuntime.cs
│ │ ├── CfrSchemeRegistrar.cs
│ │ ├── CfrServer.cs
│ │ ├── CfrServerHandler.cs
│ │ ├── CfrStreamReader.cs
│ │ ├── CfrStreamWriter.cs
│ │ ├── CfrStringVisitor.cs
│ │ ├── CfrTask.cs
│ │ ├── CfrTaskRunner.cs
│ │ ├── CfrThread.cs
│ │ ├── CfrTime.cs
│ │ ├── CfrV8Accessor.cs
│ │ ├── CfrV8ArrayBufferReleaseCallback.cs
│ │ ├── CfrV8Context.cs
│ │ ├── CfrV8Exception.cs
│ │ ├── CfrV8Handler.cs
│ │ ├── CfrV8Interceptor.cs
│ │ ├── CfrV8StackFrame.cs
│ │ ├── CfrV8StackTrace.cs
│ │ ├── CfrV8Value.cs
│ │ ├── CfrValue.cs
│ │ ├── CfrWaitableEvent.cs
│ │ ├── CfrWriteHandler.cs
│ │ ├── CfrXmlReader.cs
│ │ ├── CfrZipReader.cs
│ │ ├── CfxAppRemoteCalls.cs
│ │ ├── CfxAppRemoteClient.cs
│ │ ├── CfxBinaryValueRemoteCalls.cs
│ │ ├── CfxBrowserRemoteCalls.cs
│ │ ├── CfxCallbackRemoteCalls.cs
│ │ ├── CfxCommandLineRemoteCalls.cs
│ │ ├── CfxDictionaryValueRemoteCalls.cs
│ │ ├── CfxDomDocumentRemoteCalls.cs
│ │ ├── CfxDomNodeRemoteCalls.cs
│ │ ├── CfxDomVisitorRemoteCalls.cs
│ │ ├── CfxDomVisitorRemoteClient.cs
│ │ ├── CfxFrameRemoteCalls.cs
│ │ ├── CfxListValueRemoteCalls.cs
│ │ ├── CfxLoadHandlerRemoteCalls.cs
│ │ ├── CfxLoadHandlerRemoteClient.cs
│ │ ├── CfxPostDataElementRemoteCalls.cs
│ │ ├── CfxPostDataRemoteCalls.cs
│ │ ├── CfxProcessMessageRemoteCalls.cs
│ │ ├── CfxReadHandlerRemoteCalls.cs
│ │ ├── CfxReadHandlerRemoteClient.cs
│ │ ├── CfxRectRemoteCalls.cs
│ │ ├── CfxRenderProcessHandlerRemoteCalls.cs
│ │ ├── CfxRenderProcessHandlerRemoteClient.cs
│ │ ├── CfxRequestRemoteCalls.cs
│ │ ├── CfxResourceBundleHandlerRemoteCalls.cs
│ │ ├── CfxResourceBundleHandlerRemoteClient.cs
│ │ ├── CfxResourceBundleRemoteCalls.cs
│ │ ├── CfxResponseRemoteCalls.cs
│ │ ├── CfxRuntimeRemoteCalls.cs
│ │ ├── CfxSchemeRegistrarRemoteCalls.cs
│ │ ├── CfxServerHandlerRemoteCalls.cs
│ │ ├── CfxServerHandlerRemoteClient.cs
│ │ ├── CfxServerRemoteCalls.cs
│ │ ├── CfxStreamReaderRemoteCalls.cs
│ │ ├── CfxStreamWriterRemoteCalls.cs
│ │ ├── CfxStringVisitorRemoteCalls.cs
│ │ ├── CfxStringVisitorRemoteClient.cs
│ │ ├── CfxTaskRemoteCalls.cs
│ │ ├── CfxTaskRemoteClient.cs
│ │ ├── CfxTaskRunnerRemoteCalls.cs
│ │ ├── CfxThreadRemoteCalls.cs
│ │ ├── CfxTimeRemoteCalls.cs
│ │ ├── CfxV8AccessorRemoteCalls.cs
│ │ ├── CfxV8AccessorRemoteClient.cs
│ │ ├── CfxV8ArrayBufferReleaseCallbackRemoteCalls.cs
│ │ ├── CfxV8ArrayBufferReleaseCallbackRemoteClient.cs
│ │ ├── CfxV8ContextRemoteCalls.cs
│ │ ├── CfxV8ExceptionRemoteCalls.cs
│ │ ├── CfxV8HandlerRemoteCalls.cs
│ │ ├── CfxV8HandlerRemoteClient.cs
│ │ ├── CfxV8InterceptorRemoteCalls.cs
│ │ ├── CfxV8InterceptorRemoteClient.cs
│ │ ├── CfxV8StackFrameRemoteCalls.cs
│ │ ├── CfxV8StackTraceRemoteCalls.cs
│ │ ├── CfxV8ValueRemoteCalls.cs
│ │ ├── CfxValueRemoteCalls.cs
│ │ ├── CfxWaitableEventRemoteCalls.cs
│ │ ├── CfxWriteHandlerRemoteCalls.cs
│ │ ├── CfxWriteHandlerRemoteClient.cs
│ │ ├── CfxXmlReaderRemoteCalls.cs
│ │ ├── CfxZipReaderRemoteCalls.cs
│ │ ├── RemoteCallFactory.cs
│ │ └── RemoteCallId.cs
├── Properties
│ └── AssemblyInfo.cs
└── Source
│ ├── CfxApi.cs
│ ├── CfxArray.cs
│ ├── CfxBaseClient.cs
│ ├── CfxBaseLibrary.cs
│ ├── CfxBaseRefCounted.cs
│ ├── CfxBaseScoped.cs
│ ├── CfxBinaryValue.cs
│ ├── CfxColor.cs
│ ├── CfxDebug.cs
│ ├── CfxEventArgs.cs
│ ├── CfxException.cs
│ ├── CfxMainArgs.cs
│ ├── CfxMainArgsLinux.cs
│ ├── CfxObject.cs
│ ├── CfxPlatform.cs
│ ├── CfxRemoteCallContext.cs
│ ├── CfxRemoteCallbackManager.cs
│ ├── CfxRuntime.cs
│ ├── CfxStructure.cs
│ ├── CfxTime.cs
│ ├── CfxV8Value.cs
│ ├── CfxWindowInfo.cs
│ ├── CfxZipReader.cs
│ ├── NativeFunctionLoader.cs
│ ├── PinnedObject.cs
│ ├── PinnedString.cs
│ ├── Remote
│ ├── CfrBaseClient.cs
│ ├── CfrBaseLibrary.cs
│ ├── CfrBaseRefCounted.cs
│ ├── CfrBaseScoped.cs
│ ├── CfrBinaryValue.cs
│ ├── CfrEventArgs.cs
│ ├── CfrMarshal.cs
│ ├── CfrMayBlockEventArgs.cs
│ ├── CfrObject.cs
│ ├── CfrRuntime.cs
│ ├── CfrSeekEventArgs.cs
│ ├── CfrStructure.cs
│ ├── CfrTellEventArgs.cs
│ ├── CfrTime.cs
│ ├── CfrV8Value.cs
│ ├── RemoteCall.cs
│ ├── RemoteCallBases.cs
│ ├── RemoteClient.cs
│ ├── RemoteConnection.cs
│ ├── RemotePtr.cs
│ ├── RemoteService.cs
│ ├── StreamHandler.cs
│ └── WorkerPool.cs
│ ├── StringFunctions.cs
│ ├── TimeFunctions.cs
│ ├── WeakCache.cs
│ └── WindowStyle.cs
├── ChromiumWebBrowser
├── BrowserProcess
│ ├── BrowserClient.cs
│ ├── BrowserProcess.cs
│ ├── Events.cs
│ ├── LifeSpanHandler.cs
│ └── RequestHandler.cs
├── ChromiumWebBrowser.cs
├── ChromiumWebBrowser.csproj
├── ChromiumWebBrowserException.cs
├── FindToolbar.cs
├── Images.cs
├── JSDynamicProperty.cs
├── JSFunction.cs
├── JSObject.cs
├── JSProperty.cs
├── Properties
│ └── AssemblyInfo.cs
├── RenderProcess
│ ├── RenderProcess.cs
│ └── RenderProcessHandler.cs
└── WebResource.cs
├── License.txt
├── Readme.md
├── Tests
└── Windowless
│ ├── BrowserControl.cs
│ ├── Program.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Windowless.csproj
│ └── Windowless.sln
├── cef
├── LICENSE.txt
├── README.txt
└── include
│ ├── base
│ ├── cef_atomic_ref_count.h
│ ├── cef_atomicops.h
│ ├── cef_basictypes.h
│ ├── cef_bind.h
│ ├── cef_bind_helpers.h
│ ├── cef_build.h
│ ├── cef_callback.h
│ ├── cef_callback_forward.h
│ ├── cef_callback_helpers.h
│ ├── cef_callback_list.h
│ ├── cef_cancelable_callback.h
│ ├── cef_lock.h
│ ├── cef_logging.h
│ ├── cef_macros.h
│ ├── cef_move.h
│ ├── cef_platform_thread.h
│ ├── cef_ref_counted.h
│ ├── cef_scoped_ptr.h
│ ├── cef_string16.h
│ ├── cef_template_util.h
│ ├── cef_thread_checker.h
│ ├── cef_trace_event.h
│ ├── cef_tuple.h
│ ├── cef_weak_ptr.h
│ └── internal
│ │ ├── cef_atomicops_x86_msvc.h
│ │ ├── cef_bind_internal.h
│ │ ├── cef_bind_internal_win.h
│ │ ├── cef_callback_internal.h
│ │ ├── cef_lock_impl.h
│ │ ├── cef_raw_scoped_refptr_mismatch_checker.h
│ │ └── cef_thread_checker_impl.h
│ ├── capi
│ ├── cef_accessibility_handler_capi.h
│ ├── cef_app_capi.h
│ ├── cef_auth_callback_capi.h
│ ├── cef_base_capi.h
│ ├── cef_browser_capi.h
│ ├── cef_browser_process_handler_capi.h
│ ├── cef_callback_capi.h
│ ├── cef_client_capi.h
│ ├── cef_command_line_capi.h
│ ├── cef_context_menu_handler_capi.h
│ ├── cef_cookie_capi.h
│ ├── cef_crash_util_capi.h
│ ├── cef_dialog_handler_capi.h
│ ├── cef_display_handler_capi.h
│ ├── cef_dom_capi.h
│ ├── cef_download_handler_capi.h
│ ├── cef_download_item_capi.h
│ ├── cef_drag_data_capi.h
│ ├── cef_drag_handler_capi.h
│ ├── cef_extension_capi.h
│ ├── cef_extension_handler_capi.h
│ ├── cef_file_util_capi.h
│ ├── cef_find_handler_capi.h
│ ├── cef_focus_handler_capi.h
│ ├── cef_frame_capi.h
│ ├── cef_image_capi.h
│ ├── cef_jsdialog_handler_capi.h
│ ├── cef_keyboard_handler_capi.h
│ ├── cef_life_span_handler_capi.h
│ ├── cef_load_handler_capi.h
│ ├── cef_menu_model_capi.h
│ ├── cef_menu_model_delegate_capi.h
│ ├── cef_navigation_entry_capi.h
│ ├── cef_origin_whitelist_capi.h
│ ├── cef_parser_capi.h
│ ├── cef_path_util_capi.h
│ ├── cef_print_handler_capi.h
│ ├── cef_print_settings_capi.h
│ ├── cef_process_message_capi.h
│ ├── cef_process_util_capi.h
│ ├── cef_render_handler_capi.h
│ ├── cef_render_process_handler_capi.h
│ ├── cef_request_capi.h
│ ├── cef_request_context_capi.h
│ ├── cef_request_context_handler_capi.h
│ ├── cef_request_handler_capi.h
│ ├── cef_resource_bundle_capi.h
│ ├── cef_resource_bundle_handler_capi.h
│ ├── cef_resource_handler_capi.h
│ ├── cef_response_capi.h
│ ├── cef_response_filter_capi.h
│ ├── cef_scheme_capi.h
│ ├── cef_server_capi.h
│ ├── cef_ssl_info_capi.h
│ ├── cef_ssl_status_capi.h
│ ├── cef_stream_capi.h
│ ├── cef_string_visitor_capi.h
│ ├── cef_task_capi.h
│ ├── cef_thread_capi.h
│ ├── cef_trace_capi.h
│ ├── cef_urlrequest_capi.h
│ ├── cef_v8_capi.h
│ ├── cef_values_capi.h
│ ├── cef_waitable_event_capi.h
│ ├── cef_web_plugin_capi.h
│ ├── cef_x509_certificate_capi.h
│ ├── cef_xml_reader_capi.h
│ └── cef_zip_reader_capi.h
│ ├── cef_accessibility_handler.h
│ ├── cef_app.h
│ ├── cef_auth_callback.h
│ ├── cef_base.h
│ ├── cef_browser.h
│ ├── cef_browser_process_handler.h
│ ├── cef_callback.h
│ ├── cef_client.h
│ ├── cef_command_line.h
│ ├── cef_context_menu_handler.h
│ ├── cef_cookie.h
│ ├── cef_crash_util.h
│ ├── cef_dialog_handler.h
│ ├── cef_display_handler.h
│ ├── cef_dom.h
│ ├── cef_download_handler.h
│ ├── cef_download_item.h
│ ├── cef_drag_data.h
│ ├── cef_drag_handler.h
│ ├── cef_extension.h
│ ├── cef_extension_handler.h
│ ├── cef_file_util.h
│ ├── cef_find_handler.h
│ ├── cef_focus_handler.h
│ ├── cef_frame.h
│ ├── cef_image.h
│ ├── cef_jsdialog_handler.h
│ ├── cef_keyboard_handler.h
│ ├── cef_life_span_handler.h
│ ├── cef_load_handler.h
│ ├── cef_menu_model.h
│ ├── cef_menu_model_delegate.h
│ ├── cef_navigation_entry.h
│ ├── cef_origin_whitelist.h
│ ├── cef_pack_resources.h
│ ├── cef_pack_strings.h
│ ├── cef_parser.h
│ ├── cef_path_util.h
│ ├── cef_print_handler.h
│ ├── cef_print_settings.h
│ ├── cef_process_message.h
│ ├── cef_process_util.h
│ ├── cef_render_handler.h
│ ├── cef_render_process_handler.h
│ ├── cef_request.h
│ ├── cef_request_context.h
│ ├── cef_request_context_handler.h
│ ├── cef_request_handler.h
│ ├── cef_resource_bundle.h
│ ├── cef_resource_bundle_handler.h
│ ├── cef_resource_handler.h
│ ├── cef_response.h
│ ├── cef_response_filter.h
│ ├── cef_sandbox_win.h
│ ├── cef_scheme.h
│ ├── cef_server.h
│ ├── cef_ssl_info.h
│ ├── cef_ssl_status.h
│ ├── cef_stream.h
│ ├── cef_string_visitor.h
│ ├── cef_task.h
│ ├── cef_thread.h
│ ├── cef_trace.h
│ ├── cef_urlrequest.h
│ ├── cef_v8.h
│ ├── cef_values.h
│ ├── cef_version.h
│ ├── cef_waitable_event.h
│ ├── cef_web_plugin.h
│ ├── cef_x509_certificate.h
│ ├── cef_xml_reader.h
│ ├── cef_zip_reader.h
│ └── internal
│ ├── cef_export.h
│ ├── cef_linux.h
│ ├── cef_logging_internal.h
│ ├── cef_ptr.h
│ ├── cef_string.h
│ ├── cef_string_list.h
│ ├── cef_string_map.h
│ ├── cef_string_multimap.h
│ ├── cef_string_types.h
│ ├── cef_string_wrappers.h
│ ├── cef_thread_internal.h
│ ├── cef_time.h
│ ├── cef_trace_event_internal.h
│ ├── cef_types.h
│ ├── cef_types_linux.h
│ ├── cef_types_win.h
│ ├── cef_types_wrappers.h
│ └── cef_win.h
├── libcfx
├── Generated
│ ├── cef_function_pointers.c
│ ├── cef_headers.h
│ ├── cfx_accessibility_handler.c
│ ├── cfx_amalgamation.c
│ ├── cfx_app.c
│ ├── cfx_auth_callback.c
│ ├── cfx_before_download_callback.c
│ ├── cfx_binary_value.c
│ ├── cfx_box_layout_settings.c
│ ├── cfx_browser.c
│ ├── cfx_browser_host.c
│ ├── cfx_browser_process_handler.c
│ ├── cfx_browser_settings.c
│ ├── cfx_callback.c
│ ├── cfx_client.c
│ ├── cfx_command_line.c
│ ├── cfx_completion_callback.c
│ ├── cfx_composition_underline.c
│ ├── cfx_context_menu_handler.c
│ ├── cfx_context_menu_params.c
│ ├── cfx_cookie.c
│ ├── cfx_cookie_manager.c
│ ├── cfx_cookie_visitor.c
│ ├── cfx_cursor_info.c
│ ├── cfx_delete_cookies_callback.c
│ ├── cfx_dialog_handler.c
│ ├── cfx_dictionary_value.c
│ ├── cfx_display_handler.c
│ ├── cfx_domdocument.c
│ ├── cfx_domnode.c
│ ├── cfx_domvisitor.c
│ ├── cfx_download_handler.c
│ ├── cfx_download_image_callback.c
│ ├── cfx_download_item.c
│ ├── cfx_download_item_callback.c
│ ├── cfx_drag_data.c
│ ├── cfx_drag_handler.c
│ ├── cfx_draggable_region.c
│ ├── cfx_end_tracing_callback.c
│ ├── cfx_extension.c
│ ├── cfx_extension_handler.c
│ ├── cfx_file_dialog_callback.c
│ ├── cfx_find_handler.c
│ ├── cfx_focus_handler.c
│ ├── cfx_frame.c
│ ├── cfx_function_pointers.c
│ ├── cfx_get_extension_resource_callback.c
│ ├── cfx_image.c
│ ├── cfx_insets.c
│ ├── cfx_jsdialog_callback.c
│ ├── cfx_jsdialog_handler.c
│ ├── cfx_key_event.c
│ ├── cfx_keyboard_handler.c
│ ├── cfx_life_span_handler.c
│ ├── cfx_list_value.c
│ ├── cfx_load_handler.c
│ ├── cfx_main_args_linux.c
│ ├── cfx_main_args_windows.c
│ ├── cfx_menu_model.c
│ ├── cfx_menu_model_delegate.c
│ ├── cfx_mouse_event.c
│ ├── cfx_navigation_entry.c
│ ├── cfx_navigation_entry_visitor.c
│ ├── cfx_pdf_print_callback.c
│ ├── cfx_pdf_print_settings.c
│ ├── cfx_point.c
│ ├── cfx_popup_features.c
│ ├── cfx_post_data.c
│ ├── cfx_post_data_element.c
│ ├── cfx_print_dialog_callback.c
│ ├── cfx_print_handler.c
│ ├── cfx_print_job_callback.c
│ ├── cfx_print_settings.c
│ ├── cfx_process_message.c
│ ├── cfx_range.c
│ ├── cfx_read_handler.c
│ ├── cfx_rect.c
│ ├── cfx_register_cdm_callback.c
│ ├── cfx_render_handler.c
│ ├── cfx_render_process_handler.c
│ ├── cfx_request.c
│ ├── cfx_request_callback.c
│ ├── cfx_request_context.c
│ ├── cfx_request_context_handler.c
│ ├── cfx_request_context_settings.c
│ ├── cfx_request_handler.c
│ ├── cfx_resolve_callback.c
│ ├── cfx_resource_bundle.c
│ ├── cfx_resource_bundle_handler.c
│ ├── cfx_resource_handler.c
│ ├── cfx_response.c
│ ├── cfx_response_filter.c
│ ├── cfx_run_context_menu_callback.c
│ ├── cfx_run_file_dialog_callback.c
│ ├── cfx_runtime.c
│ ├── cfx_scheme_handler_factory.c
│ ├── cfx_scheme_registrar.c
│ ├── cfx_screen_info.c
│ ├── cfx_select_client_certificate_callback.c
│ ├── cfx_server.c
│ ├── cfx_server_handler.c
│ ├── cfx_set_cookie_callback.c
│ ├── cfx_settings.c
│ ├── cfx_size.c
│ ├── cfx_sslinfo.c
│ ├── cfx_sslstatus.c
│ ├── cfx_stream_reader.c
│ ├── cfx_stream_writer.c
│ ├── cfx_string_collections.c
│ ├── cfx_string_visitor.c
│ ├── cfx_task.c
│ ├── cfx_task_runner.c
│ ├── cfx_thread.c
│ ├── cfx_time.c
│ ├── cfx_urlparts.c
│ ├── cfx_urlrequest.c
│ ├── cfx_urlrequest_client.c
│ ├── cfx_v8accessor.c
│ ├── cfx_v8array_buffer_release_callback.c
│ ├── cfx_v8context.c
│ ├── cfx_v8exception.c
│ ├── cfx_v8handler.c
│ ├── cfx_v8interceptor.c
│ ├── cfx_v8stack_frame.c
│ ├── cfx_v8stack_trace.c
│ ├── cfx_v8value.c
│ ├── cfx_value.c
│ ├── cfx_waitable_event.c
│ ├── cfx_web_plugin_info.c
│ ├── cfx_web_plugin_info_visitor.c
│ ├── cfx_web_plugin_unstable_callback.c
│ ├── cfx_window_info_linux.c
│ ├── cfx_window_info_windows.c
│ ├── cfx_write_handler.c
│ ├── cfx_x509cert_principal.c
│ ├── cfx_x509certificate.c
│ ├── cfx_xml_reader.c
│ └── cfx_zip_reader.c
├── Source
│ └── libcfx.c
└── libcfx.vcxproj
└── linux
├── CfxGenerator.sln
├── CfxLinux.sln
├── Windowless.csproj
├── libcfx64.cproj
└── windowless
/CfxDocs/CfxDocs.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.31101.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{7CF6DF6D-3B04-46F8-A40B-537D21BCA0B4}") = "CfxDocs", "CfxDocs.shfbproj", "{4C9F46EF-9671-48A6-8A8B-8113E9E1C86C}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {4C9F46EF-9671-48A6-8A8B-8113E9E1C86C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {4C9F46EF-9671-48A6-8A8B-8113E9E1C86C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {4C9F46EF-9671-48A6-8A8B-8113E9E1C86C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {4C9F46EF-9671-48A6-8A8B-8113E9E1C86C}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/CfxDocs/ContentLayout.content:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CfxDocs/icons/Help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prepare/ChromiumFX/2aba19f687560e8e5abf6dea787418dc4bf401e7/CfxDocs/icons/Help.png
--------------------------------------------------------------------------------
/CfxGenerator.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.31101.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CfxGenerator", "CfxGenerator\CfxGenerator.csproj", "{BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/BlittablePtrType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | public class BlittablePtrType : ApiType {
10 | public readonly BlittableType BlittableType;
11 |
12 | public readonly string Indirection;
13 |
14 | public BlittablePtrType(BlittableType baseType, string indirection)
15 | : base(AddIndirection(baseType.Name, indirection)) {
16 | this.Indirection = indirection;
17 | this.BlittableType = baseType;
18 | }
19 |
20 | public override string OriginalSymbol {
21 | get { return AddIndirection(BlittableType.OriginalSymbol, Indirection); }
22 | }
23 |
24 | public override string PInvokeSymbol {
25 | get { return "IntPtr"; }
26 | }
27 |
28 | public override string RemoteSymbol {
29 | get {
30 | return "RemotePtr";
31 | }
32 | }
33 |
34 | public override void EmitRemotePreCallStatements(CodeBuilder b, string var) {
35 | switch(RemoteSymbol) {
36 | case "RemotePtr":
37 | b.AppendLine("if({0}.connection != connection) throw new ArgumentException(\"Render process connection mismatch.\", \"{1}\");", CSharp.Escape(var), var);
38 | b.AppendLine("call.{0} = {0}.ptr;", CSharp.Escape(var));
39 | return;
40 | default:
41 | base.EmitRemotePreCallStatements(b, var);
42 | return;
43 | }
44 |
45 | }
46 |
47 | private string[] _matches;
48 |
49 | public override string[] ParserMatches {
50 | get {
51 | if(_matches == null) {
52 | _matches = new string[BlittableType.ParserMatches.Length];
53 | for(var i = 0; i <= _matches.Length - 1; i++) {
54 | _matches[i] = BlittableType.ParserMatches[i] + Indirection;
55 | }
56 | }
57 | return _matches;
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefBasePtrType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefBaseRefCountedPtrType : ApiType {
8 |
9 | public CefBaseRefCountedPtrType()
10 | : base("struct _cef_base_ref_counted_t*") {
11 | }
12 |
13 | public override string PInvokeSymbol {
14 | get { return "IntPtr"; }
15 | }
16 |
17 | public override string PublicSymbol {
18 | get { return "CfxBaseRefCounted"; }
19 | }
20 |
21 | public override string RemoteCallSymbol {
22 | get { return "IntPtr"; }
23 | }
24 |
25 | public override string RemoteSymbol {
26 | get { return "CfrBaseRefCounted"; }
27 | }
28 |
29 | public override string[] ParserMatches {
30 | get {
31 | return new string[] {
32 | Name,
33 | "cef_base_ref_counted_t*"
34 | };
35 | }
36 | }
37 |
38 | public override void EmitRemotePreCallStatements(CodeBuilder b, string var) {
39 | b.AppendLine("if(!CfrObject.CheckConnection({0}, connection)) throw new ArgumentException(\"Render process connection mismatch.\", \"{1}\");", CSharp.Escape(var), var);
40 | b.AppendLine("call.{0} = CfrBaseRefCounted.Unwrap({0}).ptr;", CSharp.Escape(var));
41 | }
42 |
43 |
44 | public override string PublicWrapExpression(string var) {
45 | return string.Format("CfxBaseRefCounted.Cast({0})", var);
46 | }
47 |
48 | public override string PublicUnwrapExpression(string var) {
49 | return string.Format("CfxBaseRefCounted.Unwrap({0})", var);
50 | }
51 |
52 | public override string RemoteWrapExpression(string var) {
53 | return string.Format("CfrBaseRefCounted.Cast(new RemotePtr(connection, {0}))", var);
54 | }
55 |
56 | public override string RemoteProcedureCallArgument(string var) {
57 | return var;
58 | }
59 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefBaseType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefBaseRefCountedType : SpecialType {
8 |
9 | public CefBaseRefCountedType()
10 | : base("cef_base_ref_counted_t") {
11 | }
12 | }
13 |
14 | public class CefBaseScopedType : SpecialType {
15 |
16 | public CefBaseScopedType()
17 | : base("cef_base_scoped_t") {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefColorType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefColorType : ApiType {
8 |
9 | public CefColorType()
10 | : base("cef_color_t") {
11 | }
12 |
13 | public override string NativeSymbol {
14 | get { return "uint32"; }
15 | }
16 |
17 | public override string PInvokeSymbol {
18 | get { return "uint"; }
19 | }
20 |
21 | public override string PublicSymbol {
22 | get { return "CfxColor"; }
23 | }
24 |
25 | public override string PublicUnwrapExpression(string var) {
26 | return string.Format("CfxColor.Unwrap({0})", var);
27 | }
28 |
29 | public override string PublicWrapExpression(string var) {
30 | return string.Format("CfxColor.Wrap({0})", var);
31 | }
32 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefPlatformBasePtrType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefPlatformBasePtrType : SpecialType {
8 |
9 | public CefPlatformBasePtrType(string name)
10 | : base(name) {
11 | }
12 |
13 | public override string PublicSymbol {
14 | get { return "Cfx" + CSharp.ApplyStyle(Name.Substring(4, Name.Length - 7)); }
15 | }
16 |
17 | public override string PublicUnwrapExpression(string var) {
18 | return string.Format("{0}.Unwrap({1})", PublicSymbol, var);
19 | }
20 |
21 | public override string PublicWrapExpression(string var) {
22 | return string.Format("{0}.Wrap({1})", PublicSymbol, var);
23 | }
24 |
25 | public override void EmitNativePreCallStatements(CodeBuilder b, string var) {
26 | if(Name == "cef_main_args_t*") {
27 | b.AppendLine("#if defined CFX_WINDOWS");
28 | b.AppendLine("cef_main_args_t args_tmp = { GetModuleHandle(0) };");
29 | b.AppendLine("args = &args_tmp;");
30 | b.AppendLine("#endif");
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefPlatformStructType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefPlatformStructType : CefStructType {
8 | public readonly CefPlatform Platform;
9 |
10 | private readonly string baseTypeName;
11 |
12 | public CefPlatformStructType(string name, StructCategory category, CefPlatform platform)
13 | : base(name + "_" + platform.ToString().ToLowerInvariant(), category) {
14 | this.Platform = platform;
15 | baseTypeName = name;
16 | }
17 |
18 | public override string OriginalSymbol {
19 | get { return baseTypeName + "_t"; }
20 | }
21 |
22 | public override string[] ParserMatches {
23 | get { return new string[] { Name }; }
24 | }
25 |
26 | public override bool IsCefPlatformStructType {
27 | get { return true; }
28 | }
29 |
30 | public override CefPlatformStructType AsCefPlatformStructType {
31 | get { return this; }
32 | }
33 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefStringListType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefStringListType : StringCollectionType {
8 |
9 | public CefStringListType()
10 | : base("cef_string_list") {
11 | }
12 |
13 | public override string PublicSymbol {
14 | get { return "System.Collections.Generic.List"; }
15 | }
16 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefStringMapType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefStringMapType : StringCollectionType {
8 |
9 | public CefStringMapType()
10 | : base("cef_string_map") {
11 | }
12 |
13 | public override string PublicSymbol {
14 | get { return "System.Collections.Generic.List"; }
15 | }
16 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefStringMultimapType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefStringMultimapType : StringCollectionType {
8 |
9 | public CefStringMultimapType()
10 | : base("cef_string_multimap") {
11 | }
12 |
13 | public override string PublicSymbol {
14 | get { return "System.Collections.Generic.List"; }
15 | }
16 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefStringUserfreeType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | public class CefStringUserFreeType : BlittableType {
10 |
11 | public CefStringUserFreeType()
12 | : base("cef_string_userfree_t", "IntPtr") {
13 | }
14 |
15 | public override string PublicSymbol {
16 | get { return "string"; }
17 | }
18 |
19 | public override string PublicWrapExpression(string var) {
20 | return string.Format("StringFunctions.ConvertStringUserfree({0})", var);
21 | }
22 |
23 | public override string PublicUnwrapExpression(string var) {
24 | throw new Exception();
25 | }
26 |
27 | public override string RemoteProcedureReturnExpression(string var) {
28 | return PublicReturnExpression(var);
29 | }
30 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefStructPtrPtrType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefStructPtrPtrType : ApiType {
8 | public readonly CefStructPtrType StructPtr;
9 | public readonly CefStructType Struct;
10 |
11 | public readonly string Indirection;
12 |
13 | public CefStructPtrPtrType(CefStructPtrType structPtr, string Indirection)
14 | : base(AddIndirection(structPtr.Name, Indirection)) {
15 | this.StructPtr = structPtr;
16 | this.Struct = structPtr.Struct;
17 | this.Indirection = Indirection;
18 | }
19 |
20 | protected CefStructPtrPtrType(CefStructPtrPtrType structPtrPtr)
21 | : this(structPtrPtr.StructPtr, structPtrPtr.Indirection) {
22 | }
23 |
24 | public override string OriginalSymbol {
25 | get { return AddIndirection(Struct.OriginalSymbol, Indirection); }
26 | }
27 |
28 | public override string PInvokeSymbol {
29 | get { return "IntPtr"; }
30 | }
31 |
32 | public override string[] ParserMatches {
33 | get { return new string[] { Struct.ParserMatches[0] + Indirection, Struct.ParserMatches[1] + Indirection }; }
34 | }
35 |
36 | public override bool IsCefStructPtrPtrType {
37 | get { return true; }
38 | }
39 |
40 | public override CefStructPtrPtrType AsCefStructPtrPtrType {
41 | get { return this; }
42 | }
43 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/CefType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public abstract class CefType : ApiType {
8 |
9 | public CefType(string name)
10 | : base(name) {
11 | }
12 |
13 | public override string OriginalSymbol {
14 | get { return Name + "_t"; }
15 | }
16 |
17 | public string CfxName {
18 | get { return "cfx_" + Name.Substring(4); }
19 | }
20 |
21 | public virtual string ClassName {
22 | get { return CSharp.ApplyStyle(CfxName); }
23 | }
24 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/NumericOutType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class NumericOutType : ApiType {
8 | public readonly NumericType BaseType;
9 |
10 | public NumericOutType(NumericType baseType)
11 | : base(AddIndirection(baseType.Name, "*")) {
12 | this.BaseType = baseType;
13 | }
14 |
15 | public override string PInvokeSymbol {
16 | get { return BaseType.PInvokeSymbol; }
17 | }
18 |
19 | public override string PInvokeCallParameter(string var) {
20 | return "out " + BaseType.PInvokeCallParameter(var);
21 | }
22 |
23 | public override string PublicCallParameter(string var) {
24 | return "out " + BaseType.PublicCallParameter(var);
25 | }
26 |
27 | public override string PublicUnwrapExpression(string var) {
28 | return "out " + var;
29 | }
30 |
31 | public override void EmitPublicEventArgSetterStatements(CodeBuilder b, string var) {
32 | b.AppendLine("m_{0} = value;", var);
33 | }
34 |
35 | public override bool IsOut {
36 | get { return true; }
37 | }
38 |
39 | public override bool IsIn {
40 | get { return false; }
41 | }
42 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/NumericType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class NumericType : ApiType {
8 |
9 | private static string[] typeSpecs = {
10 | "int|int",
11 | "int32|int",
12 | "int64|long",
13 | "uint32|uint",
14 | "uint64|ulong",
15 | "unsigned short|ushort",
16 | "long|int",
17 | "unsigned long|uint",
18 | "long long|long",
19 | "unsigned long long|ulong",
20 | "unsigned int|uint",
21 | "unsigned|uint",
22 | "float|float",
23 | "double|double",
24 | "DWORD|int"
25 | };
26 |
27 | public static void CreateAll(ApiTypeBuilder b) {
28 | b.AddType(new SizeType());
29 | b.AddType(new SizeTypeOut());
30 | foreach(var spec in typeSpecs) {
31 | var names = spec.Split('|');
32 | var t = new NumericType(names[0], names[1]);
33 | b.AddType(t);
34 | b.AddType(new NumericOutType(t));
35 | }
36 | }
37 |
38 | public readonly string PInvokeType;
39 |
40 | public NumericType(string name, string pInvokeType)
41 | : base(name) {
42 | this.PInvokeType = pInvokeType;
43 | }
44 |
45 | public override string PInvokeSymbol {
46 | get { return PInvokeType; }
47 | }
48 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/OpaquePtrType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class OpaquePtrType : ApiType {
8 |
9 | public OpaquePtrType(string name)
10 | : base(name + "*") {
11 | }
12 |
13 | public override string NativeSymbol {
14 | get { return "void*"; }
15 | }
16 |
17 | public override string PInvokeSymbol {
18 | get { return "IntPtr"; }
19 | }
20 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/SizeType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class SizeType : NumericType {
8 |
9 | public SizeType()
10 | : base("size_t", "UIntPtr") {
11 | }
12 |
13 | public override string PublicSymbol {
14 | get {
15 | return "ulong";
16 | }
17 | }
18 |
19 | public override string PublicWrapExpression(string var) {
20 | return string.Format("(ulong){0}", CSharp.Escape(var));
21 | }
22 |
23 | public override string PublicUnwrapExpression(string var) {
24 | return string.Format("(UIntPtr){0}", CSharp.Escape(var));
25 | }
26 |
27 | public override string RemoteProcedureReturnExpression(string var) {
28 | return PublicReturnExpression(var);
29 | }
30 |
31 | public override string RemoteUnwrapExpression(string var) {
32 | return string.Format("(UIntPtr){0}", CSharp.Escape(var));
33 | }
34 |
35 | public override void EmitRemoteEventArgGetterStatements(CodeBuilder b, string var) {
36 | b.AppendLine("return (ulong)call.{0};", CSharp.Escape(var));
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/SizeTypeOut.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 |
14 |
15 | internal class SizeTypeOut : NumericOutType {
16 | internal SizeTypeOut() : base(new SizeType()) {
17 | }
18 |
19 | public override string RemoteCallSymbol {
20 | get {
21 | return "ulong";
22 | }
23 | }
24 |
25 | public override string PublicCallArgument(string var) {
26 | return string.Format("out {0}_tmp", var);
27 | }
28 |
29 | public override void EmitPublicPreCallStatements(CodeBuilder b, string var) {
30 | b.AppendLine("UIntPtr {0}_tmp = UIntPtr.Zero;", var);
31 | }
32 |
33 | public override void EmitPublicPostCallStatements(CodeBuilder b, string var) {
34 | b.AppendLine("{0} = (ulong){0}_tmp;", var);
35 | }
36 |
37 | public override void EmitRemoteEventArgSetterStatements(CodeBuilder b, string var) {
38 | b.AppendLine("call.{0} = (UIntPtr)value;", CSharp.Escape(var));
39 | }
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/SpecialType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class SpecialType : ApiType {
8 |
9 | public SpecialType(string name)
10 | : base(name) {
11 | }
12 |
13 | public override string PInvokeSymbol {
14 | get { return "IntPtr"; }
15 | }
16 |
17 | public override string[] ParserMatches {
18 | get { return new string[] { OriginalSymbol, "struct _" + OriginalSymbol }; }
19 | }
20 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/StringCollectionType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class StringCollectionType : CefType {
8 |
9 | public StringCollectionType(string name)
10 | : base(name) {
11 | }
12 |
13 | public override string PInvokeSymbol {
14 | get { return "IntPtr"; }
15 | }
16 |
17 | public override string PublicUnwrapExpression(string var) {
18 | return string.Format("{0}_unwrapped", var);
19 | }
20 |
21 | public override string PublicWrapExpression(string var) {
22 | return string.Format("StringFunctions.Wrap{0}({1})", ClassName, var);
23 | }
24 |
25 | public override void EmitPublicPreCallStatements(CodeBuilder b, string var) {
26 | b.AppendLine("PinnedString[] {0}_handles;", var);
27 | b.AppendLine("var {0}_unwrapped = StringFunctions.Unwrap{1}({0}, out {0}_handles);", var, ClassName);
28 | }
29 |
30 | public override void EmitPublicPostCallStatements(CodeBuilder b, string var) {
31 | b.AppendLine("StringFunctions.FreePinnedStrings({0}_handles);", var);
32 | b.AppendLine("StringFunctions.{0}CopyToManaged({1}_unwrapped, {1});", ClassName, var);
33 | b.AppendLine("CfxApi.Runtime.{0}_free({1}_unwrapped);", CfxName, var);
34 | }
35 |
36 | public override void EmitNativeValueStructDtorStatements(CodeBuilder b, string var) {
37 | b.BeginBlock("if(self->{0})", var);
38 | b.AppendLine("{0}_clear(self->{1});", Name, var);
39 | b.AppendLine("{0}_free(self->{1});", Name, var);
40 | b.EndBlock();
41 | }
42 |
43 | public override void EmitRemotePostCallStatements(CodeBuilder b, string var) {
44 | // TODO
45 | if(ClassName == "CfxStringList")
46 | b.AppendLine("StringFunctions.Copy{0}(call.{1}, {1});", ClassName, var);
47 | }
48 |
49 | public override bool IsStringCollectionType {
50 | get { return true; }
51 | }
52 |
53 | public override StringCollectionType AsStringCollectionType {
54 | get {
55 | return this;
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/VoidPtrPtrType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class VoidPtrPtrType : ApiType {
8 |
9 | public VoidPtrPtrType()
10 | : base("void**") {
11 | }
12 |
13 | public override bool IsIn {
14 | get { return false; }
15 | }
16 |
17 | public override bool IsOut {
18 | get { return true; }
19 | }
20 |
21 | public override string PInvokeSymbol {
22 | get { return "IntPtr"; }
23 | }
24 |
25 | public override string RemoteSymbol {
26 | get {
27 | return "RemotePtr";
28 | }
29 | }
30 |
31 | public override void EmitRemotePreCallStatements(CodeBuilder b, string var) {
32 | b.AppendLine("call.{0} = {0}.ptr;", CSharp.Escape(var));
33 | }
34 |
35 | public override string PInvokeCallParameter(string var) {
36 | return "out IntPtr " + CSharp.Escape(var);
37 | }
38 |
39 | public override string PublicCallParameter(string var) {
40 | return "out IntPtr " + CSharp.Escape(var);
41 | }
42 |
43 | public override string PublicCallArgument(string var) {
44 | return "out " + CSharp.Escape(var);
45 | }
46 | }
--------------------------------------------------------------------------------
/CfxGenerator/ApiTypes/WrapperOnly/WrapperArrayType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class WrapperArrayType : ApiType {
8 | public readonly string ArrayType;
9 |
10 | public WrapperArrayType(string arrayType)
11 | : base("__wrapperArray[]") {
12 | this.ArrayType = arrayType;
13 | }
14 |
15 | public override string PublicSymbol {
16 | get { return ArrayType + "[]"; }
17 | }
18 | }
--------------------------------------------------------------------------------
/CfxGenerator/CefColorRefType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class CefColorRefType : ApiType {
8 |
9 | public CefColorRefType()
10 | : base("cef_color_t*") {
11 | }
12 |
13 | public override string NativeSymbol {
14 | get { return "uint32*"; }
15 | }
16 |
17 | public override string PInvokeSymbol {
18 | get { return "ref uint"; }
19 | }
20 |
21 | public override string PublicSymbol {
22 | get { return "CfxColor"; }
23 | }
24 |
25 | public override string PublicCallParameter(string var) {
26 | return string.Concat("ref ", PublicSymbol, " ", var);
27 | }
28 |
29 | public override string PublicUnwrapExpression(string var) {
30 | return string.Format("ref {0}.color", var);
31 | }
32 | }
--------------------------------------------------------------------------------
/CfxGenerator/CefPlatform.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public enum CefPlatform {
8 | Independent,
9 | Windows,
10 | Linux,
11 | MacOS
12 | }
--------------------------------------------------------------------------------
/CfxGenerator/CfxCallMode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public enum CfxCallMode {
8 | None,
9 | Callback,
10 | FunctionCall,
11 | PropertyGetter,
12 | PropertySetter
13 | }
--------------------------------------------------------------------------------
/CfxGenerator/Config/BlittableTypes.txt:
--------------------------------------------------------------------------------
1 | void*|IntPtr
2 | char|byte
3 | char*|IntPtr
4 | char16*|IntPtr
5 | char16|short
6 | HINSTANCE|IntPtr
7 | cef_window_handle_t|IntPtr
8 | HMENU|IntPtr
9 | BOOL|int
10 | cef_text_input_context_t|IntPtr
11 | cef_event_handle_t|IntPtr
12 | cef_cursor_handle_t|IntPtr
13 | time_t|ulong
14 | cef_platform_thread_id_t|uint
15 | uint16|ushort
16 |
--------------------------------------------------------------------------------
/CfxGenerator/Config/BrowserProcessOnly.txt:
--------------------------------------------------------------------------------
1 | cef_add_cross_origin_whitelist_entry
2 | cef_add_web_plugin_directory
3 | cef_add_web_plugin_path
4 | cef_api_hash
5 | cef_app::get_browser_process_handler
6 | cef_base64decode
7 | cef_base64encode
8 | cef_begin_tracing
9 | cef_browser::get_host
10 | cef_browser_host_
11 | cef_build_revision
12 | cef_clear_cross_origin_whitelist
13 | cef_clear_scheme_handler_factories
14 | cef_cookie_manager_
15 | cef_create_context_shared
16 | cef_create_url
17 | cef_do_message_loop_work
18 | cef_drag_data_
19 | cef_enable_highdpi_support
20 | cef_end_tracing
21 | cef_end_tracing_async
22 | cef_force_web_plugin_shutdown
23 | cef_frame::view_source
24 | cef_get_extensions_for_mime_type
25 | cef_get_geolocation
26 | cef_get_mime_type
27 | cef_get_path
28 | cef_get_trace_buffer_percent_full_async
29 | cef_get_xdisplay
30 | cef_image_
31 | cef_initialize
32 | cef_is_web_plugin_unstable
33 | cef_launch_process
34 | cef_menu_model_
35 | cef_now_from_system_trace_time
36 | cef_parse_csscolor
37 | cef_parse_json
38 | cef_parse_jsonand_return_error
39 | cef_parse_url
40 | cef_print_settings_
41 | cef_quit_message_loop
42 | cef_refresh_web_plugins
43 | cef_register_scheme_handler_factory
44 | cef_register_web_plugin_crash
45 | cef_register_widevine_cdm
46 | cef_request_context_
47 | cef_remove_cross_origin_whitelist_entry
48 | cef_remove_web_plugin_path
49 | cef_run_message_loop
50 | cef_set_osmodal_loop
51 | cef_shutdown
52 | cef_unregister_internal_web_plugin
53 | cef_uridecode
54 | cef_uriencode
55 | cef_urlrequest_create
56 | cef_version_info
57 | cef_visit_web_plugin_info
58 | cef_write_json
59 |
--------------------------------------------------------------------------------
/CfxGenerator/Config/LicenseStub.txt:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
--------------------------------------------------------------------------------
/CfxGenerator/Config/PrivateWrapper.txt:
--------------------------------------------------------------------------------
1 | cef_shutdown
2 | cef_string_map_alloc
3 | cef_string_list_alloc
4 | cef_initialize
5 | cef_execute_process
6 |
--------------------------------------------------------------------------------
/CfxGenerator/Config/StructsNeedWrapping.txt:
--------------------------------------------------------------------------------
1 | cef_cookie
2 | cef_time
3 | cef_key_event
4 | cef_popup_features
5 | cef_window_info_windows
6 | cef_window_info_linux
7 | cef_window_info_macos
8 | cef_rect
9 | cef_geoposition
10 | cef_browser_settings
11 | cef_screen_info
12 | cef_cursor_info
13 | cef_point
14 | cef_range
15 | cef_draggable_region
16 | cef_insets
17 |
--------------------------------------------------------------------------------
/CfxGenerator/CustomSignatures/CefV8HandlerExecuteSignature.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System.Collections.Generic;
8 |
9 | public class CefV8HandlerExecuteSignature : SignatureWithStructPtrArray {
10 |
11 | public CefV8HandlerExecuteSignature(Signature s)
12 | : base(s, 4, 3) {
13 | }
14 |
15 | public override ApiType PublicReturnType {
16 | get { return new CefStructPtrType(new CefStructType("cef_v8value", StructCategory.Library), "*"); }
17 | }
18 |
19 | public override Parameter[] ManagedParameters {
20 | get {
21 | var list = new List();
22 | foreach(var arg in base.ManagedParameters) {
23 | if(arg.VarName != "retval") {
24 | list.Add(arg);
25 | }
26 | }
27 | return list.ToArray();
28 | }
29 | }
30 |
31 | public override void EmitPostPublicEventHandlerReturnValueStatements(CodeBuilder b) {
32 | b.AppendLine("retval = CfxV8Value.Unwrap(e.m_returnValue);");
33 | b.AppendLine("__retval = e.m_returnValue != null || e.m_exception_wrapped != null ? 1 : 0;");
34 | }
35 |
36 | public override void EmitPostRemoteEventHandlerReturnValueStatements(CodeBuilder b) {
37 | b.AppendLine("retval = CfrV8Value.Unwrap(e.m_returnValue).ptr;");
38 | b.AppendLine("__retval = e.m_returnValue != null || e.m_exception_wrapped != null ? 1 : 0;");
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/CfxGenerator/CustomSignatures/SignatureWithStructArray.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System.Collections.Generic;
8 |
9 | public class SignatureWithStructArray : Signature {
10 |
11 | private Parameter[] m_managedParameters;
12 |
13 | public SignatureWithStructArray(Signature s, int arrayIndex, int countIndex)
14 | : base(s) {
15 |
16 | var list = new List();
17 | for(var i = 0; i <= Parameters.Length - 1; i++) {
18 | if(i != arrayIndex && i != countIndex) {
19 | list.Add(Parameters[i]);
20 | } else if(i == arrayIndex) {
21 | var a = new Parameter(Parameters[arrayIndex], new CefStructArrayType(Parameters[arrayIndex], Parameters[countIndex]));
22 | list.Add(a);
23 | Parameters[i] = a;
24 | }
25 | }
26 | m_managedParameters = list.ToArray();
27 | }
28 |
29 | public override Parameter[] ManagedParameters {
30 | get { return m_managedParameters; }
31 | }
32 |
33 | public override void DebugPrintUnhandledArrayParameters(string cefName, CefConfigNode cefConfig, CfxCallMode callMode) {
34 | }
35 | }
--------------------------------------------------------------------------------
/CfxGenerator/CustomSignatures/SignatureWithStructPtrArray.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System.Collections.Generic;
8 |
9 | public class SignatureWithStructPtrArray : Signature {
10 |
11 | int arrayIndex;
12 | int countIndex;
13 |
14 | public SignatureWithStructPtrArray(Signature s, int arrayIndex, int countIndex)
15 | : base(s) {
16 | this.arrayIndex = arrayIndex;
17 | this.countIndex = countIndex;
18 | Parameters[arrayIndex] = new Parameter(Parameters[arrayIndex], new CefStructPtrArrayType(Parameters[arrayIndex], Parameters[countIndex]));
19 | }
20 |
21 | public override Parameter[] ManagedParameters {
22 | get {
23 | var list = new List();
24 | for(var i = 0; i <= Parameters.Length - 1; i++) {
25 | if(i != countIndex) {
26 | list.Add(Parameters[i]);
27 | }
28 | }
29 | return list.ToArray();
30 | }
31 | }
32 |
33 | public override void DebugPrintUnhandledArrayParameters(string cefName, CefConfigNode cefConfig, CfxCallMode callMode) {
34 | }
35 | }
--------------------------------------------------------------------------------
/CfxGenerator/CustomSignatures/StringCollectionAsRetvalSignature.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class StringCollectionAsRetvalSignature : Signature {
8 |
9 | public StringCollectionAsRetvalSignature(Signature s)
10 | : base(s) {
11 | }
12 |
13 | public override Parameter[] ManagedParameters {
14 | get { return new Parameter[] { base.ManagedParameters[0] }; }
15 | }
16 |
17 | public override ApiType PublicReturnType {
18 | get { return base.ManagedParameters[1].ParameterType; }
19 | }
20 |
21 | public override void EmitPublicCall(CodeBuilder b, string apiClassName, string apiFunctionName) {
22 | b.AppendLine("{0} {1} = new {0}();", base.ManagedParameters[1].ParameterType.PublicSymbol, base.ManagedParameters[1].VarName);
23 | base.ManagedParameters[1].EmitPublicPreCallStatements(b);
24 | b.AppendLine(string.Format("CfxApi.{2}.{0}(NativePtr, {1});", apiFunctionName, base.ManagedParameters[1].PublicCallArgument, apiClassName));
25 | base.ManagedParameters[1].EmitPostPublicStatements(b);
26 | b.AppendLine("return {0};", base.ManagedParameters[1].VarName);
27 | }
28 |
29 | protected override void EmitRemoteProcedure(CodeBuilder b, string apiClassName, string apiFunctionName) {
30 | var collectionType = base.ManagedParameters[1].ParameterType.AsStringCollectionType.ClassName;
31 | b.AppendLine("__retval = new {0}();", base.ManagedParameters[1].ParameterType.PublicSymbol);
32 | b.AppendLine("var list = StringFunctions.Alloc{0}();", collectionType);
33 | b.AppendLine("CfxApi.{0}.{1}(@this, list);", apiClassName, apiFunctionName);
34 | b.AppendLine("StringFunctions.{0}CopyToManaged(list, __retval);", collectionType);
35 | b.AppendLine("StringFunctions.Free{0}(list);", collectionType);
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/CallbackNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Parser {
10 | [Serializable()]
11 | public class CallbackNode {
12 | public string Name;
13 | public SignatureNode Signature = new SignatureNode();
14 | public CefConfigNode CefConfig;
15 | public CommentNode Comments = new CommentNode();
16 | public override string ToString() {
17 | return Name;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/CefApiNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 |
10 | namespace Parser {
11 |
12 | [Serializable()]
13 | public class CefApiNode {
14 |
15 | public string ApiHashUniversal;
16 |
17 | public List CefCallbackStructs = new List();
18 | public List CefValueStructs = new List();
19 |
20 | public List CefFunctions = new List();
21 | public List CefEnums = new List();
22 |
23 | public FunctionNode[] CefStringCollectionFunctions;
24 |
25 | public List CefStructsWindows;
26 | public List CefFunctionsWindows;
27 |
28 | public List CefStructsLinux;
29 | public List CefFunctionsLinux;
30 |
31 | public List CefClasses = new List();
32 | public List CefCppFunctions = new List();
33 |
34 | }
35 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/CefClassNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 | namespace Parser {
14 | [Serializable()]
15 | public class CefClassNode {
16 | public string Name;
17 | public CefConfigNode CefConfig = new CefConfigNode();
18 | public List Methods = new List();
19 | public override string ToString() {
20 | return $"class {Name} ({Methods.Count} methods)";
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/CefConfigNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 |
10 | [Serializable()]
11 | public class CefConfigNode {
12 | public string CppApiName;
13 | public string CApiName;
14 | public string IndexParameter;
15 | public List OptionalParameters = new List();
16 | public string CountFunction;
17 | public string DefaultRetval;
18 | public bool ApiHashCheck;
19 | public string Source;
20 | public bool NoDebugctCheck;
21 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/CefCppFunctionNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 | namespace Parser {
14 | [Serializable()]
15 | public class CefCppFunctionNode {
16 | public string Name;
17 | public bool IsStatic;
18 | public CefConfigNode CefConfig = new CefConfigNode();
19 | public bool IsRetvalBoolean;
20 | public List BooleanParameters = new List();
21 | public override string ToString() {
22 | return Name;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/CommentNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 |
10 | [Serializable()]
11 | public class CommentNode {
12 | internal void SetParserLines(List lines) {
13 | var ll = new List();
14 | foreach(var l in lines) {
15 | var line = l.TrimEnd();
16 | line = line.Replace("<", "<");
17 | if(!line.Equals("The resulting string must be freed by calling cef_string_userfree_free().")) {
18 | ll.Add(line);
19 | }
20 | }
21 |
22 | while(ll.Count > 0 && string.IsNullOrWhiteSpace(ll[ll.Count - 1]))
23 | ll.RemoveAt(ll.Count - 1);
24 |
25 | Lines = ll.ToArray();
26 | }
27 | public string FileName;
28 | public string[] Lines = new string[0];
29 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/EnumNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 |
10 | namespace Parser {
11 |
12 | [Serializable()]
13 | public class EnumNode {
14 | public string Name;
15 | public readonly List Members = new List();
16 | public CommentNode Comments = new CommentNode();
17 | }
18 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/EnumValueNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Parser {
10 |
11 | [Serializable()]
12 | public class EnumValueNode {
13 | public string Name;
14 | public string Value;
15 | public CommentNode Comments = new CommentNode();
16 | }
17 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/FunctionNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Parser {
10 |
11 | [Serializable()]
12 | public class FunctionNode {
13 | public string Name;
14 | public SignatureNode Signature = new SignatureNode();
15 | public CommentNode Comments = new CommentNode();
16 | public override string ToString() {
17 | return Name;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/ParameterNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Parser {
10 |
11 | [Serializable()]
12 | public class ParameterNode {
13 | public TypeNode ParameterType = new TypeNode();
14 | public string Var;
15 | public bool IsConst;
16 |
17 | public override string ToString() {
18 | return string.Format("{0} {1}{2}", ParameterType, Var, IsConst ? " (const)" : "");
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/SignatureNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 |
10 | namespace Parser {
11 |
12 | [Serializable()]
13 | public class SignatureNode {
14 | public readonly List Parameters = new List();
15 | public TypeNode ReturnType = new TypeNode();
16 | public bool ReturnValueIsConst;
17 | }
18 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/StructMemberNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Parser {
10 |
11 | [Serializable()]
12 | public class StructMemberNode {
13 | public string Name;
14 | public CefConfigNode CefConfig;
15 | public TypeNode MemberType = new TypeNode();
16 | public CommentNode Comments = new CommentNode();
17 | public override string ToString() {
18 | return Name;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/StructNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 |
10 | namespace Parser {
11 |
12 | //[Serializable()]
13 | //public class StructNode {
14 | // public string Name;
15 | // public string CefBaseType;
16 | // public readonly List CefFunctions = new List();
17 | // public readonly List StructMembers = new List();
18 | // public CommentNode Comments = new CommentNode();
19 | // public CefConfigNode CefConfig;
20 |
21 | // public override string ToString() {
22 | // return Name;
23 | // }
24 | //}
25 |
26 | [Serializable()]
27 | public class ValueStructNode {
28 | public string Name;
29 | public readonly List StructMembers = new List();
30 | public CommentNode Comments = new CommentNode();
31 | public override string ToString() {
32 | return Name;
33 | }
34 | }
35 |
36 | [Serializable()]
37 | public class CallbackStructNode {
38 | public string Name;
39 | public string CefBaseType;
40 | public readonly List CefFunctions = new List();
41 | public readonly List CefCallbacks = new List();
42 | public CommentNode Comments = new CommentNode();
43 | public override string ToString() {
44 | return Name;
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/CfxGenerator/Parser/Nodes/TypeNode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Parser {
10 |
11 | [Serializable()]
12 | public class TypeNode {
13 | public string Name;
14 | public string Indirection;
15 |
16 | public override string ToString() {
17 | return Name + " " + Indirection;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CfxGenerator/Program.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.IO;
9 |
10 | internal static class Program {
11 |
12 |
13 |
14 | public static int EmitDebugInfo = 0;
15 |
16 | public static bool DocumentationFormatBugStillExists;
17 |
18 | public static void Main() {
19 |
20 | // find project directory
21 | var path = Path.GetDirectoryName(new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath);
22 | while(Path.GetFileName(path) != "linux" && Path.GetFileName(path) != "CfxGenerator")
23 | path = Path.GetDirectoryName(path);
24 |
25 | path = Path.GetDirectoryName(path);
26 |
27 | //GeneratedFileManager.PatchFilesLicense(path);
28 | //Environment.Exit(0);
29 |
30 | Environment.CurrentDirectory = path;
31 |
32 | var parser = new ApiTypeBuilder();
33 | var decls = parser.GetDeclarations();
34 |
35 | var gen = new WrapperGenerator(decls);
36 | gen.Run();
37 |
38 | if(!DocumentationFormatBugStillExists) {
39 | //remove workaroung for this bug in CSharp.PrepareSummaryLine
40 | System.Diagnostics.Debugger.Break();
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/CfxGenerator/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System.Reflection;
8 | using System.Runtime.InteropServices;
9 |
10 | [assembly: AssemblyTitle("CfxGenerator")]
11 | [assembly: AssemblyDescription("Code generator for the ChromiumFX bindings.")]
12 | [assembly: AssemblyCopyright("Copyright © 2014-2015 Wolfgang Borgsmüller")]
13 | [assembly: ComVisible(false)]
14 | [assembly: AssemblyVersion("1.0.0.0")]
15 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/CfxGenerator/StructProperty.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | public class StructProperty {
8 | public readonly CefCallbackFunction Getter;
9 | public readonly CefCallbackFunction Setter;
10 | public readonly bool IsBoolean;
11 |
12 | public StructProperty(CefCallbackFunction getter, CefCallbackFunction setter, bool isBoolean) {
13 | this.Getter = getter;
14 | this.Setter = setter;
15 | this.IsBoolean = isBoolean;
16 | getter.IsProperty = true;
17 | getter.PublicPropertyName = PropertyName;
18 | if(setter != null) {
19 | setter.IsProperty = true;
20 | setter.PublicPropertyName = PropertyName;
21 | }
22 | }
23 |
24 | public string PropertyName {
25 | get {
26 | if(Getter.Name.StartsWith("get_")) {
27 | return Getter.PublicName.Substring(3);
28 | } else {
29 | return Getter.PublicName;
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/CfxTestApp/HttpWebResponseCompatTest.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Net;
9 |
10 | namespace CfxTestApplication {
11 |
12 | ///
13 | /// A user wrote me about problems using HttpWebResponse along with ChromiumFX
14 | /// so this is a test for his specific use case.
15 | /// Turns out there is no compatibility problem so far.
16 | ///
17 | class HttpWebResponseCompatTest {
18 | public static void Test() {
19 | var request = HttpWebRequest.Create("http://www.google.com");
20 | using(var response = request.GetResponse()) {
21 | using(var responseStream = response.GetResponseStream()) {
22 | var reader = new System.IO.StreamReader(responseStream);
23 | var html = reader.ReadToEnd();
24 | System.Windows.Forms.MessageBox.Show(string.Format("Read {0} characters from System.Net.HttpWebResponse.", html.Length));
25 | }
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CfxTestApp/JsTestObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using Chromium.Remote;
8 | using Chromium.WebBrowser;
9 |
10 | namespace CfxTestApplication {
11 | class JsTestObject : JSObject {
12 |
13 | private BrowserForm form;
14 |
15 | internal JsTestObject(BrowserForm form) {
16 | this.form = form;
17 | AddFunction("testFunction").Execute += TestFunction_Execute;
18 | AddObject("anotherObject").AddFunction("anotherTestFunction").Execute += AnotherTestFunction_Execute;
19 |
20 | var p = AddDynamicProperty("dynamicProperty");
21 | p.PropertyGet += dynamicProperty_PropertyGet;
22 | p.PropertySet += dynamicProperty_PropertySet;
23 |
24 | }
25 |
26 |
27 | int dynamicPropertyValue;
28 |
29 | void dynamicProperty_PropertySet(object sender, Chromium.Remote.Event.CfrV8AccessorSetEventArgs e) {
30 | form.LogWriteLine("PropertySet({0}, {1})", sender, e);
31 | dynamicPropertyValue = e.Value.IntValue;
32 | }
33 |
34 | void dynamicProperty_PropertyGet(object sender, Chromium.Remote.Event.CfrV8AccessorGetEventArgs e) {
35 | form.LogWriteLine("PropertyGet({0}, {1})", sender, e);
36 | e.Retval = CfrV8Value.CreateInt(dynamicPropertyValue);
37 | e.SetReturnValue(true);
38 | }
39 |
40 | void TestFunction_Execute(object sender, Chromium.Remote.Event.CfrV8HandlerExecuteEventArgs e) {
41 | form.LogWriteLine("TestFunction_Execute({0}, {1})", sender, e);
42 | }
43 |
44 | void AnotherTestFunction_Execute(object sender, Chromium.Remote.Event.CfrV8HandlerExecuteEventArgs e) {
45 | form.LogWriteLine("AnotherTestFunction_Execute({0}, {1})", sender, e);
46 | e.SetReturnValue("The other test function returns this text.");
47 | }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/CfxTestApp/Program.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Drawing;
9 | using System.Windows.Forms;
10 | using Chromium;
11 | using Chromium.Event;
12 | using Chromium.WebBrowser;
13 | using System.Diagnostics;
14 |
15 | using Chromium.WebBrowser.Event;
16 |
17 | namespace CfxTestApplication {
18 |
19 | public class Program {
20 |
21 | [STAThread]
22 | public static void Main() {
23 |
24 | var assemblyDir = System.IO.Path.GetDirectoryName(new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath);
25 |
26 | Environment.CurrentDirectory = System.IO.Path.Combine(assemblyDir, @"..\..\");
27 |
28 | if(CfxRuntime.PlatformArch== CfxPlatformArch.x64)
29 | CfxRuntime.LibCefDirPath = @"cef\Release64";
30 | else
31 | CfxRuntime.LibCefDirPath = @"cef\Release";
32 |
33 | Chromium.WebBrowser.ChromiumWebBrowser.OnBeforeCfxInitialize += ChromiumWebBrowser_OnBeforeCfxInitialize;
34 | ChromiumWebBrowser.OnBeforeCommandLineProcessing += ChromiumWebBrowser_OnBeforeCommandLineProcessing;
35 | Chromium.WebBrowser.ChromiumWebBrowser.Initialize();
36 |
37 | //Walkthrough01.Main();
38 | //return;
39 |
40 | Application.EnableVisualStyles();
41 | var f = new BrowserForm();
42 | f.Show();
43 | Application.Run(f);
44 |
45 | CfxRuntime.Shutdown();
46 |
47 | }
48 |
49 | static void ChromiumWebBrowser_OnBeforeCommandLineProcessing(CfxOnBeforeCommandLineProcessingEventArgs e) {
50 | Console.WriteLine("ChromiumWebBrowser_OnBeforeCommandLineProcessing");
51 | Console.WriteLine(e.CommandLine.CommandLineString);
52 | }
53 |
54 | static void ChromiumWebBrowser_OnBeforeCfxInitialize(OnBeforeCfxInitializeEventArgs e) {
55 | e.Settings.LocalesDirPath = System.IO.Path.GetFullPath(@"cef\Resources\locales");
56 | e.Settings.ResourcesDirPath = System.IO.Path.GetFullPath(@"cef\Resources");
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/CfxTestApp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System.Reflection;
8 | using System.Runtime.InteropServices;
9 |
10 | [assembly: AssemblyTitle("CfxTestApplication")]
11 | [assembly: AssemblyDescription("Tests for ChromiumFX and ChromiumWebBrowser.")]
12 | [assembly: AssemblyCopyright("Copyright © 2014-2015 Wolfgang Borgsmüller")]
13 |
14 | [assembly: ComVisible(false)]
15 |
16 | [assembly: AssemblyVersion("1.0.0.0")]
17 | [assembly: AssemblyFileVersion("1.0.0.0")]
18 |
--------------------------------------------------------------------------------
/CfxTestApp/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | //------------------------------------------------------------------------------
8 | //
9 | // This code was generated by a tool.
10 | // Runtime Version:4.0.30319.1022
11 | //
12 | // Changes to this file may cause incorrect behavior and will be lost if
13 | // the code is regenerated.
14 | //
15 | //------------------------------------------------------------------------------
16 |
17 | namespace CfxTestApplication.Properties {
18 |
19 |
20 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
22 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
23 |
24 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
25 |
26 | public static Settings Default {
27 | get {
28 | return defaultInstance;
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CfxTestApp/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxCallback.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Generic callback structure used for asynchronous continuation.
15 | ///
16 | ///
17 | /// See also the original CEF documentation in
18 | /// cef/include/capi/cef_callback_capi.h.
19 | ///
20 | public class CfxCallback : CfxBaseLibrary {
21 |
22 | internal static CfxCallback Wrap(IntPtr nativePtr) {
23 | if(nativePtr == IntPtr.Zero) return null;
24 | bool isNew = false;
25 | var wrapper = (CfxCallback)weakCache.GetOrAdd(nativePtr, () => {
26 | isNew = true;
27 | return new CfxCallback(nativePtr);
28 | });
29 | if(!isNew) {
30 | CfxApi.cfx_release(nativePtr);
31 | }
32 | return wrapper;
33 | }
34 |
35 |
36 | internal CfxCallback(IntPtr nativePtr) : base(nativePtr) {}
37 |
38 | ///
39 | /// Continue processing.
40 | ///
41 | ///
42 | /// See also the original CEF documentation in
43 | /// cef/include/capi/cef_callback_capi.h.
44 | ///
45 | public void Continue() {
46 | CfxApi.Callback.cfx_callback_cont(NativePtr);
47 | }
48 |
49 | ///
50 | /// Cancel processing.
51 | ///
52 | ///
53 | /// See also the original CEF documentation in
54 | /// cef/include/capi/cef_callback_capi.h.
55 | ///
56 | public void Cancel() {
57 | CfxApi.Callback.cfx_callback_cancel(NativePtr);
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxJsDialogCallback.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Callback structure used for asynchronous continuation of JavaScript dialog
15 | /// requests.
16 | ///
17 | ///
18 | /// See also the original CEF documentation in
19 | /// cef/include/capi/cef_jsdialog_handler_capi.h.
20 | ///
21 | public class CfxJsDialogCallback : CfxBaseLibrary {
22 |
23 | internal static CfxJsDialogCallback Wrap(IntPtr nativePtr) {
24 | if(nativePtr == IntPtr.Zero) return null;
25 | bool isNew = false;
26 | var wrapper = (CfxJsDialogCallback)weakCache.GetOrAdd(nativePtr, () => {
27 | isNew = true;
28 | return new CfxJsDialogCallback(nativePtr);
29 | });
30 | if(!isNew) {
31 | CfxApi.cfx_release(nativePtr);
32 | }
33 | return wrapper;
34 | }
35 |
36 |
37 | internal CfxJsDialogCallback(IntPtr nativePtr) : base(nativePtr) {}
38 |
39 | ///
40 | /// Continue the JS dialog request. Set |success| to true (1) if the OK button
41 | /// was pressed. The |userInput| value should be specified for prompt dialogs.
42 | ///
43 | ///
44 | /// See also the original CEF documentation in
45 | /// cef/include/capi/cef_jsdialog_handler_capi.h.
46 | ///
47 | public void Continue(bool success, string userInput) {
48 | var userInput_pinned = new PinnedString(userInput);
49 | CfxApi.JsDialogCallback.cfx_jsdialog_callback_cont(NativePtr, success ? 1 : 0, userInput_pinned.Obj.PinnedPtr, userInput_pinned.Length);
50 | userInput_pinned.Obj.Free();
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxMainArgsLinux.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Structure representing CfxExecuteProcess arguments.
15 | ///
16 | ///
17 | /// See also the original CEF documentation in
18 | /// cef/include/internal/cef_types_linux.h.
19 | ///
20 | internal sealed partial class CfxMainArgsLinux : CfxStructure {
21 |
22 | public CfxMainArgsLinux() : base(CfxApi.MainArgsLinux.cfx_main_args_linux_ctor, CfxApi.MainArgsLinux.cfx_main_args_linux_dtor) { CfxApi.CheckPlatformOS(CfxPlatformOS.Linux); }
23 |
24 | public int Argc {
25 | get {
26 | int value;
27 | CfxApi.MainArgsLinux.cfx_main_args_linux_get_argc(nativePtrUnchecked, out value);
28 | return value;
29 | }
30 | set {
31 | CfxApi.MainArgsLinux.cfx_main_args_linux_set_argc(nativePtrUnchecked, value);
32 | }
33 | }
34 |
35 | public IntPtr Argv {
36 | get {
37 | IntPtr value;
38 | CfxApi.MainArgsLinux.cfx_main_args_linux_get_argv(nativePtrUnchecked, out value);
39 | return value;
40 | }
41 | set {
42 | CfxApi.MainArgsLinux.cfx_main_args_linux_set_argv(nativePtrUnchecked, value);
43 | }
44 | }
45 |
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxMainArgsWindows.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Structure representing CfxExecuteProcess arguments.
15 | ///
16 | ///
17 | /// See also the original CEF documentation in
18 | /// cef/include/internal/cef_types_win.h.
19 | ///
20 | internal sealed class CfxMainArgsWindows : CfxStructure {
21 |
22 | public CfxMainArgsWindows() : base(CfxApi.MainArgsWindows.cfx_main_args_windows_ctor, CfxApi.MainArgsWindows.cfx_main_args_windows_dtor) { CfxApi.CheckPlatformOS(CfxPlatformOS.Windows); }
23 |
24 | public IntPtr Instance {
25 | get {
26 | IntPtr value;
27 | CfxApi.MainArgsWindows.cfx_main_args_windows_get_instance(nativePtrUnchecked, out value);
28 | return value;
29 | }
30 | set {
31 | CfxApi.MainArgsWindows.cfx_main_args_windows_set_instance(nativePtrUnchecked, value);
32 | }
33 | }
34 |
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxPoint.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Structure representing a point.
15 | ///
16 | ///
17 | /// See also the original CEF documentation in
18 | /// cef/include/internal/cef_types.h.
19 | ///
20 | public sealed class CfxPoint : CfxStructure {
21 |
22 | internal static CfxPoint Wrap(IntPtr nativePtr) {
23 | if(nativePtr == IntPtr.Zero) return null;
24 | return new CfxPoint(nativePtr);
25 | }
26 |
27 | internal static CfxPoint WrapOwned(IntPtr nativePtr) {
28 | if(nativePtr == IntPtr.Zero) return null;
29 | return new CfxPoint(nativePtr, CfxApi.Point.cfx_point_dtor);
30 | }
31 |
32 | public CfxPoint() : base(CfxApi.Point.cfx_point_ctor, CfxApi.Point.cfx_point_dtor) {}
33 | internal CfxPoint(IntPtr nativePtr) : base(nativePtr) {}
34 | internal CfxPoint(IntPtr nativePtr, CfxApi.cfx_dtor_delegate cfx_dtor) : base(nativePtr, cfx_dtor) {}
35 |
36 | public int X {
37 | get {
38 | int value;
39 | CfxApi.Point.cfx_point_get_x(nativePtrUnchecked, out value);
40 | return value;
41 | }
42 | set {
43 | CfxApi.Point.cfx_point_set_x(nativePtrUnchecked, value);
44 | }
45 | }
46 |
47 | public int Y {
48 | get {
49 | int value;
50 | CfxApi.Point.cfx_point_get_y(nativePtrUnchecked, out value);
51 | return value;
52 | }
53 | set {
54 | CfxApi.Point.cfx_point_set_y(nativePtrUnchecked, value);
55 | }
56 | }
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxPrintJobCallback.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Callback structure for asynchronous continuation of print job requests.
15 | ///
16 | ///
17 | /// See also the original CEF documentation in
18 | /// cef/include/capi/cef_print_handler_capi.h.
19 | ///
20 | public class CfxPrintJobCallback : CfxBaseLibrary {
21 |
22 | internal static CfxPrintJobCallback Wrap(IntPtr nativePtr) {
23 | if(nativePtr == IntPtr.Zero) return null;
24 | bool isNew = false;
25 | var wrapper = (CfxPrintJobCallback)weakCache.GetOrAdd(nativePtr, () => {
26 | isNew = true;
27 | return new CfxPrintJobCallback(nativePtr);
28 | });
29 | if(!isNew) {
30 | CfxApi.cfx_release(nativePtr);
31 | }
32 | return wrapper;
33 | }
34 |
35 |
36 | internal CfxPrintJobCallback(IntPtr nativePtr) : base(nativePtr) {}
37 |
38 | ///
39 | /// Indicate completion of the print job.
40 | ///
41 | ///
42 | /// See also the original CEF documentation in
43 | /// cef/include/capi/cef_print_handler_capi.h.
44 | ///
45 | public void Continue() {
46 | CfxApi.PrintJobCallback.cfx_print_job_callback_cont(NativePtr);
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxRange.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Structure representing a range.
15 | ///
16 | ///
17 | /// See also the original CEF documentation in
18 | /// cef/include/internal/cef_types.h.
19 | ///
20 | public sealed class CfxRange : CfxStructure {
21 |
22 | internal static CfxRange Wrap(IntPtr nativePtr) {
23 | if(nativePtr == IntPtr.Zero) return null;
24 | return new CfxRange(nativePtr);
25 | }
26 |
27 | internal static CfxRange WrapOwned(IntPtr nativePtr) {
28 | if(nativePtr == IntPtr.Zero) return null;
29 | return new CfxRange(nativePtr, CfxApi.Range.cfx_range_dtor);
30 | }
31 |
32 | public CfxRange() : base(CfxApi.Range.cfx_range_ctor, CfxApi.Range.cfx_range_dtor) {}
33 | internal CfxRange(IntPtr nativePtr) : base(nativePtr) {}
34 | internal CfxRange(IntPtr nativePtr, CfxApi.cfx_dtor_delegate cfx_dtor) : base(nativePtr, cfx_dtor) {}
35 |
36 | public int From {
37 | get {
38 | int value;
39 | CfxApi.Range.cfx_range_get_from(nativePtrUnchecked, out value);
40 | return value;
41 | }
42 | set {
43 | CfxApi.Range.cfx_range_set_from(nativePtrUnchecked, value);
44 | }
45 | }
46 |
47 | public int To {
48 | get {
49 | int value;
50 | CfxApi.Range.cfx_range_get_to(nativePtrUnchecked, out value);
51 | return value;
52 | }
53 | set {
54 | CfxApi.Range.cfx_range_set_to(nativePtrUnchecked, value);
55 | }
56 | }
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxSelectClientCertificateCallback.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Callback structure used to select a client certificate for authentication.
15 | ///
16 | ///
17 | /// See also the original CEF documentation in
18 | /// cef/include/capi/cef_request_handler_capi.h.
19 | ///
20 | public class CfxSelectClientCertificateCallback : CfxBaseLibrary {
21 |
22 | internal static CfxSelectClientCertificateCallback Wrap(IntPtr nativePtr) {
23 | if(nativePtr == IntPtr.Zero) return null;
24 | bool isNew = false;
25 | var wrapper = (CfxSelectClientCertificateCallback)weakCache.GetOrAdd(nativePtr, () => {
26 | isNew = true;
27 | return new CfxSelectClientCertificateCallback(nativePtr);
28 | });
29 | if(!isNew) {
30 | CfxApi.cfx_release(nativePtr);
31 | }
32 | return wrapper;
33 | }
34 |
35 |
36 | internal CfxSelectClientCertificateCallback(IntPtr nativePtr) : base(nativePtr) {}
37 |
38 | ///
39 | /// Chooses the specified certificate for client certificate authentication.
40 | /// NULL value means that no client certificate should be used.
41 | ///
42 | ///
43 | /// See also the original CEF documentation in
44 | /// cef/include/capi/cef_request_handler_capi.h.
45 | ///
46 | public void Select(CfxX509Certificate cert) {
47 | CfxApi.SelectClientCertificateCallback.cfx_select_client_certificate_callback_select(NativePtr, CfxX509Certificate.Unwrap(cert));
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/CfxSize.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium {
13 | ///
14 | /// Structure representing a size.
15 | ///
16 | ///
17 | /// See also the original CEF documentation in
18 | /// cef/include/internal/cef_types.h.
19 | ///
20 | public sealed class CfxSize : CfxStructure {
21 |
22 | internal static CfxSize Wrap(IntPtr nativePtr) {
23 | if(nativePtr == IntPtr.Zero) return null;
24 | return new CfxSize(nativePtr);
25 | }
26 |
27 | internal static CfxSize WrapOwned(IntPtr nativePtr) {
28 | if(nativePtr == IntPtr.Zero) return null;
29 | return new CfxSize(nativePtr, CfxApi.Size.cfx_size_dtor);
30 | }
31 |
32 | public CfxSize() : base(CfxApi.Size.cfx_size_ctor, CfxApi.Size.cfx_size_dtor) {}
33 | internal CfxSize(IntPtr nativePtr) : base(nativePtr) {}
34 | internal CfxSize(IntPtr nativePtr, CfxApi.cfx_dtor_delegate cfx_dtor) : base(nativePtr, cfx_dtor) {}
35 |
36 | public int Width {
37 | get {
38 | int value;
39 | CfxApi.Size.cfx_size_get_width(nativePtrUnchecked, out value);
40 | return value;
41 | }
42 | set {
43 | CfxApi.Size.cfx_size_set_width(nativePtrUnchecked, value);
44 | }
45 | }
46 |
47 | public int Height {
48 | get {
49 | int value;
50 | CfxApi.Size.cfx_size_get_height(nativePtrUnchecked, out value);
51 | return value;
52 | }
53 | set {
54 | CfxApi.Size.cfx_size_set_height(nativePtrUnchecked, value);
55 | }
56 | }
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/Remote/CfxCallbackRemoteCalls.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium.Remote {
13 |
14 | internal class CfxCallbackContinueRemoteCall : RemoteCall {
15 |
16 | internal CfxCallbackContinueRemoteCall()
17 | : base(RemoteCallId.CfxCallbackContinueRemoteCall) {}
18 |
19 | internal IntPtr @this;
20 |
21 | protected override void WriteArgs(StreamHandler h) {
22 | h.Write(@this);
23 | }
24 |
25 | protected override void ReadArgs(StreamHandler h) {
26 | h.Read(out @this);
27 | }
28 |
29 | protected override void RemoteProcedure() {
30 | CfxApi.Callback.cfx_callback_cont(@this);
31 | }
32 | }
33 |
34 | internal class CfxCallbackCancelRemoteCall : RemoteCall {
35 |
36 | internal CfxCallbackCancelRemoteCall()
37 | : base(RemoteCallId.CfxCallbackCancelRemoteCall) {}
38 |
39 | internal IntPtr @this;
40 |
41 | protected override void WriteArgs(StreamHandler h) {
42 | h.Write(@this);
43 | }
44 |
45 | protected override void ReadArgs(StreamHandler h) {
46 | h.Read(out @this);
47 | }
48 |
49 | protected override void RemoteProcedure() {
50 | CfxApi.Callback.cfx_callback_cancel(@this);
51 | }
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/Remote/CfxDomVisitorRemoteClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium.Remote {
13 | internal static class CfxDomVisitorRemoteClient {
14 |
15 | static CfxDomVisitorRemoteClient() {
16 | visit_native = visit;
17 | visit_native_ptr = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(visit_native);
18 | }
19 |
20 | internal static void SetCallback(IntPtr self, int index, bool active) {
21 | switch(index) {
22 | case 0:
23 | CfxApi.DomVisitor.cfx_domvisitor_set_callback(self, index, active ? visit_native_ptr : IntPtr.Zero);
24 | break;
25 | }
26 | }
27 |
28 | // visit
29 | [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall, SetLastError = false)]
30 | private delegate void visit_delegate(IntPtr gcHandlePtr, IntPtr document, out int document_release);
31 | private static visit_delegate visit_native;
32 | private static IntPtr visit_native_ptr;
33 |
34 | internal static void visit(IntPtr gcHandlePtr, IntPtr document, out int document_release) {
35 | var call = new CfxDomVisitorVisitRemoteEventCall();
36 | call.gcHandlePtr = gcHandlePtr;
37 | call.document = document;
38 | call.RequestExecution();
39 | document_release = call.document_release;
40 | }
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/Remote/CfxStringVisitorRemoteClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium.Remote {
13 | internal static class CfxStringVisitorRemoteClient {
14 |
15 | static CfxStringVisitorRemoteClient() {
16 | visit_native = visit;
17 | visit_native_ptr = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(visit_native);
18 | }
19 |
20 | internal static void SetCallback(IntPtr self, int index, bool active) {
21 | switch(index) {
22 | case 0:
23 | CfxApi.StringVisitor.cfx_string_visitor_set_callback(self, index, active ? visit_native_ptr : IntPtr.Zero);
24 | break;
25 | }
26 | }
27 |
28 | // visit
29 | [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall, SetLastError = false)]
30 | private delegate void visit_delegate(IntPtr gcHandlePtr, IntPtr string_str, int string_length);
31 | private static visit_delegate visit_native;
32 | private static IntPtr visit_native_ptr;
33 |
34 | internal static void visit(IntPtr gcHandlePtr, IntPtr string_str, int string_length) {
35 | var call = new CfxStringVisitorVisitRemoteEventCall();
36 | call.gcHandlePtr = gcHandlePtr;
37 | call.string_str = string_str;
38 | call.string_length = string_length;
39 | call.RequestExecution();
40 | }
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/Remote/CfxTaskRemoteCalls.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium.Remote {
13 | using Event;
14 |
15 | internal class CfxTaskCtorWithGCHandleRemoteCall : CtorWithGCHandleRemoteCall {
16 |
17 | internal CfxTaskCtorWithGCHandleRemoteCall()
18 | : base(RemoteCallId.CfxTaskCtorWithGCHandleRemoteCall) {}
19 |
20 | protected override void RemoteProcedure() {
21 | __retval = CfxApi.Task.cfx_task_ctor(gcHandlePtr, 1);
22 | }
23 | }
24 |
25 | internal class CfxTaskSetCallbackRemoteCall : SetCallbackRemoteCall {
26 |
27 | internal CfxTaskSetCallbackRemoteCall()
28 | : base(RemoteCallId.CfxTaskSetCallbackRemoteCall) {}
29 |
30 | protected override void RemoteProcedure() {
31 | CfxTaskRemoteClient.SetCallback(self, index, active);
32 | }
33 | }
34 |
35 | internal class CfxTaskExecuteRemoteEventCall : RemoteEventCall {
36 |
37 | internal CfxTaskExecuteRemoteEventCall()
38 | : base(RemoteCallId.CfxTaskExecuteRemoteEventCall) {}
39 |
40 |
41 | protected override void WriteArgs(StreamHandler h) {
42 | h.Write(gcHandlePtr);
43 | }
44 |
45 | protected override void ReadArgs(StreamHandler h) {
46 | h.Read(out gcHandlePtr);
47 | }
48 |
49 | protected override void WriteReturn(StreamHandler h) {
50 | }
51 |
52 | protected override void ReadReturn(StreamHandler h) {
53 | }
54 |
55 | protected override void RemoteProcedure() {
56 | var self = (CfrTask)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;
57 | if(self == null || self.CallbacksDisabled) {
58 | return;
59 | }
60 | var e = new CfrEventArgs();
61 | e.connection = CfxRemoteCallContext.CurrentContext.connection;
62 | self.m_Execute?.Invoke(self, e);
63 | e.connection = null;
64 | }
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/Remote/CfxTaskRemoteClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium.Remote {
13 | internal static class CfxTaskRemoteClient {
14 |
15 | static CfxTaskRemoteClient() {
16 | execute_native = execute;
17 | execute_native_ptr = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(execute_native);
18 | }
19 |
20 | internal static void SetCallback(IntPtr self, int index, bool active) {
21 | switch(index) {
22 | case 0:
23 | CfxApi.Task.cfx_task_set_callback(self, index, active ? execute_native_ptr : IntPtr.Zero);
24 | break;
25 | }
26 | }
27 |
28 | // execute
29 | [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall, SetLastError = false)]
30 | private delegate void execute_delegate(IntPtr gcHandlePtr);
31 | private static execute_delegate execute_native;
32 | private static IntPtr execute_native_ptr;
33 |
34 | internal static void execute(IntPtr gcHandlePtr) {
35 | var call = new CfxTaskExecuteRemoteEventCall();
36 | call.gcHandlePtr = gcHandlePtr;
37 | call.RequestExecution();
38 | }
39 |
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/ChromiumFX/Generated/Remote/CfxV8ArrayBufferReleaseCallbackRemoteClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | using System;
11 |
12 | namespace Chromium.Remote {
13 | internal static class CfxV8ArrayBufferReleaseCallbackRemoteClient {
14 |
15 | static CfxV8ArrayBufferReleaseCallbackRemoteClient() {
16 | release_buffer_native = release_buffer;
17 | release_buffer_native_ptr = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(release_buffer_native);
18 | }
19 |
20 | internal static void SetCallback(IntPtr self, int index, bool active) {
21 | switch(index) {
22 | case 0:
23 | CfxApi.V8ArrayBufferReleaseCallback.cfx_v8array_buffer_release_callback_set_callback(self, index, active ? release_buffer_native_ptr : IntPtr.Zero);
24 | break;
25 | }
26 | }
27 |
28 | // release_buffer
29 | [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall, SetLastError = false)]
30 | private delegate void release_buffer_delegate(IntPtr gcHandlePtr, IntPtr buffer);
31 | private static release_buffer_delegate release_buffer_native;
32 | private static IntPtr release_buffer_native_ptr;
33 |
34 | internal static void release_buffer(IntPtr gcHandlePtr, IntPtr buffer) {
35 | var call = new CfxV8ArrayBufferReleaseCallbackReleaseBufferRemoteEventCall();
36 | call.gcHandlePtr = gcHandlePtr;
37 | call.buffer = buffer;
38 | call.RequestExecution();
39 | }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ChromiumFX/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System.Reflection;
8 | using System.Runtime.InteropServices;
9 |
10 | [assembly: AssemblyTitle("ChromiumFX")]
11 | [assembly: AssemblyDescription("Chromium for .NET based on the Chromium Embedded Framework (CEF).")]
12 | [assembly: AssemblyCopyright("Copyright © 2014-2018 Wolfgang Borgsmüller")]
13 |
14 | [assembly: ComVisible(false)]
15 |
16 | [assembly: AssemblyVersion("3.3578.1")]
17 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxArray.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.Linq;
10 | using System.Text;
11 |
12 | using Chromium.Remote;
13 |
14 | namespace Chromium {
15 | internal class CfxArray {
16 |
17 | internal static T[] GetCfrObjects(RemoteConnection connection, IntPtr[] remotePtrs, Func wrapFunction) where T : CfrObject {
18 | if(remotePtrs == null) return null;
19 | var retval = new T[remotePtrs.Length];
20 | for(int i = 0; i < remotePtrs.Length; ++i)
21 | retval[i] = wrapFunction(new RemotePtr(connection, remotePtrs[i]));
22 | return retval;
23 | }
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxBaseClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 | using System.Runtime.InteropServices;
13 |
14 | namespace Chromium {
15 |
16 | ///
17 | /// Base class for all wrapper classes for CEF client callback or handler structs.
18 | ///
19 | public class CfxBaseClient : CfxBaseRefCounted {
20 |
21 | internal CfxBaseClient(IntPtr nativePtr) : base(nativePtr) {}
22 | internal CfxBaseClient(CfxApi.cfx_ctor_with_gc_handle_delegate cfx_ctor) {
23 | // must be a weak handle
24 | // otherwise transient callback structs never go out of scope if
25 | // they are not explicitly disposed
26 | GCHandle handle = GCHandle.Alloc(this, GCHandleType.Weak);
27 | var nativePtr = cfx_ctor(GCHandle.ToIntPtr(handle), 0);
28 | if(nativePtr == IntPtr.Zero)
29 | throw new OutOfMemoryException();
30 | SetNative(nativePtr);
31 | }
32 |
33 | ///
34 | /// Provides access to the underlying native cef struct.
35 | /// This is a refcounted client struct derived from cef_base_ref_counted_t.
36 | /// Add a ref in order to keep it alive when this managed object go out of scope.
37 | ///
38 | public sealed override IntPtr NativePtr {
39 | get {
40 | if(nativePtrUnchecked == IntPtr.Zero) {
41 | throw new ObjectDisposedException(this.GetType().Name);
42 | } else {
43 | return nativePtrUnchecked;
44 | }
45 | }
46 | }
47 |
48 | ///
49 | /// When true, all CEF callback events are disabled for this handler. Incoming callbacks will return default values to CEF.
50 | ///
51 | public bool CallbacksDisabled { get; set; }
52 |
53 | internal override void OnDispose(IntPtr nativePtr) {
54 | CallbacksDisabled = true;
55 | CfxApi.cfx_release(nativePtr);
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxBaseLibrary.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 | namespace Chromium {
14 |
15 | ///
16 | /// Base class for all wrapper classes for CEF library structs.
17 | ///
18 | public class CfxBaseLibrary : CfxBaseRefCounted {
19 |
20 | internal static readonly WeakCache weakCache = new WeakCache();
21 |
22 | internal CfxBaseLibrary(IntPtr nativePtr) : base(nativePtr) { }
23 |
24 | ///
25 | /// Provides access to the underlying native cef struct.
26 | /// This is a refcounted library struct derived from cef_base_ref_counted_t.
27 | /// Add a ref in order to keep it alive when this managed object go out of scope.
28 | ///
29 | public sealed override IntPtr NativePtr {
30 | get {
31 | if(nativePtrUnchecked == IntPtr.Zero) {
32 | throw new ObjectDisposedException(this.GetType().Name);
33 | } else {
34 | return nativePtrUnchecked;
35 | }
36 | }
37 | }
38 |
39 | internal override sealed void OnDispose(IntPtr nativePtr) {
40 | // first remove from weak cache, then release native pointer
41 | weakCache.Remove(nativePtr);
42 | CfxApi.cfx_release(nativePtr);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxBaseRefCounted.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | namespace Chromium {
9 | ///
10 | /// Base class for all wrapper classes for ref counted CEF structs.
11 | ///
12 | public abstract class CfxBaseRefCounted : CfxObject {
13 |
14 | static internal CfxBaseRefCounted Cast(IntPtr nativePtr) {
15 | throw new Exception("Implement this");
16 | }
17 |
18 | static internal IntPtr Unwrap(CfxBaseRefCounted cfxBase) {
19 | if (cfxBase == null) {
20 | return IntPtr.Zero;
21 | } else {
22 | return cfxBase.NativePtr;
23 | }
24 | }
25 |
26 |
27 | internal CfxBaseRefCounted() {}
28 | internal CfxBaseRefCounted(IntPtr nativePtr) : base(nativePtr) {}
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxBaseScoped.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 | namespace Chromium {
14 |
15 | ///
16 | /// Base class for all wrapper classes for scoped CEF library structs.
17 | /// Objects of this type will be disposed when they go out of scope.
18 | ///
19 | public class CfxBaseScoped : CfxObject {
20 |
21 | internal CfxBaseScoped(IntPtr nativePtr) : base(nativePtr) { }
22 |
23 | ///
24 | /// Provides access to the underlying native cef struct.
25 | /// This is a scoped library struct derived from cef_base_scoped_t.
26 | /// It will be destroyed when the managed object goes out of scope.
27 | ///
28 | public sealed override IntPtr NativePtr {
29 | get {
30 | if(nativePtrUnchecked == IntPtr.Zero) {
31 | throw new ObjectDisposedException(this.GetType().Name);
32 | } else {
33 | return nativePtrUnchecked;
34 | }
35 | }
36 | }
37 |
38 | internal override void OnDispose(IntPtr nativePtr) {
39 | // do nothing
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxBinaryValue.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium {
10 | public partial class CfxBinaryValue {
11 |
12 | ///
13 | /// Creates a new object that is not owned by any other object. The specified
14 | /// |data| will be copied.
15 | ///
16 | public static CfxBinaryValue Create(byte[] data) {
17 | if(data == null || data.Length == 0) {
18 | throw new ArgumentException("Data is null or zero length", "data");
19 | }
20 | var po = new PinnedObject(data);
21 | var retval = CfxBinaryValue.Create(po.PinnedPtr, (ulong)data.LongLength);
22 | po.Free();
23 | return retval;
24 | }
25 |
26 | ///
27 | /// Read up to (buffer.Length - bufferOffset) bytes into |buffer|. Reading begins at
28 | /// the specified byte dataOffset. Writing begins at the
29 | /// specified byte bufferOffset.
30 | /// Returns the number of bytes read.
31 | ///
32 | public int GetData(byte[] buffer, int bufferOffset, int dataOffset) {
33 |
34 | if(buffer == null || buffer.Length == 0) {
35 | throw new ArgumentException("Buffer is null or zero length.", "buffer");
36 | }
37 |
38 | var maxBytes = buffer.Length - bufferOffset;
39 | if(maxBytes <= 0)
40 | throw new ArgumentException("bufferOffset >= buffer.Length.", "bufferOffset");
41 |
42 | var po = new PinnedObject(buffer);
43 |
44 | var retval = CfxApi.BinaryValue.cfx_binary_value_get_data(NativePtr, po.PinnedPtr + bufferOffset, (UIntPtr)maxBytes, (UIntPtr)dataOffset);
45 | po.Free();
46 | return (int)retval;
47 | }
48 |
49 | }
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxColor.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium {
10 |
11 | ///
12 | /// 32-bit ARGB color value, not premultiplied. The color components are always
13 | /// in a known order. Equivalent to the SkColor type.
14 | ///
15 | public struct CfxColor {
16 |
17 | internal static CfxColor Wrap(uint value) {
18 | return new CfxColor(value);
19 | }
20 |
21 | internal static uint Unwrap(CfxColor value) {
22 | return value.color;
23 | }
24 |
25 |
26 | internal uint color;
27 |
28 | ///
29 | /// Return an CfxColor with the specified value.
30 | /// A is the highest byte, b is the lowest.
31 | ///
32 | public CfxColor(uint argb) {
33 | this.color = argb;
34 | }
35 |
36 | ///
37 | /// Return an CfxColor with the specified byte component values.
38 | ///
39 | public CfxColor(byte a, byte r, byte g, byte b) {
40 | this.color = (uint)((a << 24) | (r << 16) | (g << 8) | b);
41 | }
42 |
43 | ///
44 | /// Get the ARGB value of this CfxColor.
45 | /// A is the highest byte, b is the lowest.
46 | ///
47 | public uint Argb { get { return color; } }
48 |
49 | ///
50 | /// Get the A value of this CfxColor.
51 | ///
52 | public byte A { get { return (byte)((color >> 24) & 0xFF); } }
53 |
54 | ///
55 | /// Get the R value of this CfxColor.
56 | ///
57 | public byte R { get { return (byte)((color >> 16) & 0xFF); } }
58 |
59 | ///
60 | /// Get the G value of this CfxColor.
61 | ///
62 | public byte G { get { return (byte)((color >> 8) & 0xFF); } }
63 |
64 | ///
65 | /// Get the B value of this CfxColor.
66 | ///
67 | public byte B { get { return (byte)(color & 0xFF); } }
68 |
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxDebug.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 |
10 | namespace Chromium {
11 | internal class CfxDebug {
12 | [Conditional("DEBUG")]
13 | internal static void Announce() {
14 | Debug.Print("Running ChromiumFX debug library.");
15 | }
16 | [Conditional("DEBUG")]
17 | internal static void Assert(bool condition) {
18 | Debug.Assert(condition);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxEventArgs.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | namespace Chromium
9 | {
10 | ///
11 | /// Base class for all CEF framework callback event args.
12 | ///
13 | public class CfxEventArgs : EventArgs
14 | {
15 | internal bool m_isInvalid = false;
16 | internal void CheckAccess()
17 | {
18 | if (m_isInvalid)
19 | throw new CfxException("Do not keep/use a reference to callback event arguments outside the scope of the event handler.");
20 | }
21 | }
22 |
23 | public delegate void CfxEventHandler(object sender, CfxEventArgs e);
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxException.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | namespace Chromium {
9 | ///
10 | /// Class for ChromiumFX related exceptions.
11 | ///
12 | public class CfxException : Exception {
13 | internal CfxException() : base() { }
14 | internal CfxException(string message) : base(message) { }
15 | internal CfxException(string message, Exception inner) : base(message, inner) { }
16 | }
17 |
18 | ///
19 | /// The exception that is thrown when an error in the remote layer occurs.
20 | ///
21 | public class CfxRemotingException : CfxException {
22 | internal CfxRemotingException() : base() { }
23 | internal CfxRemotingException(string message) : base(message) { }
24 | internal CfxRemotingException(string message, Exception inner) : base(message, inner) { }
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxMainArgs.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium {
10 | internal class CfxMainArgs : CfxStructure {
11 |
12 | internal static CfxMainArgs ForLinux() {
13 | CfxMainArgsLinux mainArgsLinux = CfxMainArgsLinux.Create();
14 | return new CfxMainArgs(mainArgsLinux);
15 | }
16 |
17 | internal CfxMainArgsLinux mainArgsLinux;
18 | private CfxMainArgs(CfxMainArgsLinux mainArgsLinux) : base(mainArgsLinux.nativePtrUnchecked) {
19 | this.mainArgsLinux = mainArgsLinux;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxMainArgsLinux.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.Linq;
10 | using System.Text;
11 |
12 | namespace Chromium {
13 | partial class CfxMainArgsLinux {
14 |
15 | internal static CfxMainArgsLinux Create() {
16 | var args = Environment.GetCommandLineArgs();
17 | var mainArgs = new CfxMainArgsLinux();
18 | mainArgs.Argc = args.Length;
19 | if(args.Length > 0) {
20 | mainArgs.managedArgv = new IntPtr[args.Length];
21 | for(int i = 0; i < args.Length; ++i) {
22 | mainArgs.managedArgv[i] = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(args[i]);
23 | }
24 | mainArgs.argvPinned = new PinnedObject(mainArgs.managedArgv);
25 | mainArgs.Argv = mainArgs.argvPinned.PinnedPtr;
26 | }
27 | return mainArgs;
28 | }
29 |
30 | private IntPtr[] managedArgv;
31 | private PinnedObject argvPinned;
32 |
33 | // Must be called explicitly, otherwise leaks
34 | internal void Free() {
35 | if(managedArgv == null) return;
36 | argvPinned.Free();
37 | for(int i = 0; i < managedArgv.Length; ++i) {
38 | System.Runtime.InteropServices.Marshal.FreeHGlobal(managedArgv[i]);
39 | }
40 | managedArgv = null;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium {
10 |
11 | ///
12 | /// Base class for all wrapper classes for CEF structs.
13 | ///
14 | public abstract class CfxObject : IDisposable {
15 |
16 | private IntPtr m_nativePtr;
17 |
18 | internal CfxObject() {}
19 |
20 | internal CfxObject(IntPtr nativePtr) {
21 | this.m_nativePtr = nativePtr;
22 | }
23 |
24 | internal void SetNative(IntPtr nativePtr) {
25 | m_nativePtr = nativePtr;
26 | }
27 |
28 | internal IntPtr nativePtrUnchecked {
29 | get {
30 | return m_nativePtr;
31 | }
32 | }
33 |
34 | public abstract IntPtr NativePtr { get; }
35 |
36 | internal abstract void OnDispose(IntPtr nativePtr);
37 |
38 | public void Dispose() {
39 | if(m_nativePtr != IntPtr.Zero) {
40 | OnDispose(m_nativePtr);
41 | m_nativePtr = IntPtr.Zero;
42 | GC.SuppressFinalize(this);
43 | }
44 | }
45 |
46 | ~CfxObject() {
47 | if(m_nativePtr != IntPtr.Zero) {
48 | OnDispose(m_nativePtr);
49 | m_nativePtr = IntPtr.Zero;
50 | }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxPlatform.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | namespace Chromium {
8 | ///
9 | /// Operating systems supported by CEF.
10 | ///
11 | public enum CfxPlatformOS {
12 | ///
13 | /// Windows (see CEF documentation for supported versions).
14 | ///
15 | Windows = 0,
16 | ///
17 | /// Linux. Not yet supported by ChromiumFX.
18 | ///
19 | Linux,
20 | ///
21 | /// MacOSX. Not yet supported by ChromiumFX.
22 | ///
23 | MacOSX
24 | }
25 |
26 | ///
27 | /// Supported architectures.
28 | ///
29 | public enum CfxPlatformArch {
30 | ///
31 | /// The x86 architecture (32-bit).
32 | ///
33 | x86,
34 | ///
35 | /// The x64 architecture (64-bit).
36 | ///
37 | x64
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxTime.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Runtime.InteropServices;
9 |
10 | namespace Chromium {
11 | public partial class CfxTime {
12 |
13 | public DateTime ToUniversalTime() {
14 | return ToUniversalTime(this);
15 | }
16 |
17 | public static DateTime ToUniversalTime(CfxTime time) {
18 | return new DateTime(time.Year, time.Month, time.DayOfMonth, time.Hour, time.Minute, time.Second, time.Millisecond, DateTimeKind.Utc);
19 | }
20 |
21 | public static CfxTime FromUniversalTime(DateTime time) {
22 |
23 | if (time.Kind != DateTimeKind.Utc)
24 | throw new ArgumentException("time must be of kind DateTimeKind.Utc", "time");
25 |
26 | var r = new CfxTime();
27 | r.Year = time.Year;
28 | r.Month = time.Month;
29 | r.DayOfMonth = time.Day;
30 | r.DayOfWeek = (int)time.DayOfWeek;
31 | r.Hour = time.Hour;
32 | r.Minute = time.Minute;
33 | r.Second = time.Second;
34 | r.Millisecond = time.Millisecond;
35 | return r;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxV8Value.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium {
10 |
11 | partial class CfxV8Value {
12 |
13 | ///
14 | /// Create a new CfxV8Value object of type object with accessor.
15 | /// This function should only be called from within the scope
16 | /// of a CfxRenderProcessHandler, CfxV8Handler or CfxV8Accessor
17 | /// callback, or in combination with calling enter() and exit() on a stored
18 | /// CfxV8Context reference.
19 | ///
20 | public static CfxV8Value CreateObject(CfxV8Accessor accessor) {
21 | return CreateObject(accessor, null);
22 | }
23 |
24 | ///
25 | /// Create a new CfxV8Value object of type object with interceptor.
26 | /// This function should only be called from within the scope
27 | /// of a CfxRenderProcessHandler, CfxV8Handler or CfxV8Accessor
28 | /// callback, or in combination with calling enter() and exit() on a stored
29 | /// CfxV8Context reference.
30 | ///
31 | public static CfxV8Value CreateObject(CfxV8Interceptor interceptor) {
32 | return CreateObject(null, interceptor);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/CfxZipReader.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium {
10 |
11 | public partial class CfxZipReader {
12 | ///
13 | /// Read uncompressed file contents into the specified buffer. Returns
14 | /// 0 if at the end of file, or the number of bytes read.
15 | /// Throws an exception if an error occurred.
16 | ///
17 | public int ReadFile(byte[] buffer) {
18 | if(buffer == null || buffer.Length == 0)
19 | throw new ArgumentException("Buffer can't be null or zero length.", "buffer");
20 | var pb = new PinnedObject(buffer);
21 | var retval = CfxApi.ZipReader.cfx_zip_reader_read_file(NativePtr, pb.PinnedPtr, (UIntPtr)buffer.LongLength);
22 | pb.Free();
23 | if(retval < 0)
24 | throw new CfxException("Failed to read from zip file");
25 | return retval;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/PinnedObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Runtime.InteropServices;
9 |
10 | namespace Chromium {
11 | internal struct PinnedObject {
12 |
13 | public IntPtr PinnedPtr;
14 | private GCHandle handle;
15 |
16 | public PinnedObject(object o) {
17 | if(o == null) {
18 | handle = new GCHandle();
19 | PinnedPtr = IntPtr.Zero;
20 | } else {
21 | handle = GCHandle.Alloc(o, GCHandleType.Pinned);
22 | PinnedPtr = handle.AddrOfPinnedObject();
23 | }
24 | }
25 |
26 | public IntPtr GCHandlePtr() {
27 | return GCHandle.ToIntPtr(handle);
28 | }
29 |
30 | public void Free() {
31 | if (PinnedPtr != IntPtr.Zero) {
32 | handle.Free();
33 | }
34 | }
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/PinnedString.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | namespace Chromium {
9 | internal struct PinnedString {
10 |
11 | public PinnedObject Obj;
12 | public int Length;
13 |
14 | public PinnedString(string s) {
15 | Obj = new PinnedObject(s);
16 | Length = s != null ? s.Length : 0;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrBaseLibrary.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium.Remote {
10 | ///
11 | /// Base class for all remote wrapper classes for CEF library structs.
12 | ///
13 | public abstract class CfrBaseLibrary : CfrBaseRefCounted {
14 | internal CfrBaseLibrary(RemotePtr remotePtr) : base(remotePtr) { }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrBaseRefCounted.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium.Remote {
10 | ///
11 | /// Base class for all remote wrapper classes for ref counted CEF structs.
12 | ///
13 | public abstract class CfrBaseRefCounted : CfrObject {
14 |
15 | static internal CfrBaseRefCounted Cast(RemotePtr nativePtr) {
16 | throw new Exception("Implement this");
17 | }
18 |
19 | internal CfrBaseRefCounted() { }
20 | internal CfrBaseRefCounted(RemotePtr remotePtr) : base(remotePtr) { }
21 |
22 | internal override void OnDispose(RemotePtr remotePtr) {
23 | if (remotePtr.connection.connectionLostException != null){
24 | return;
25 | }
26 | var call = new CfxApiReleaseRemoteCall();
27 | call.nativePtr = remotePtr.ptr;
28 | try {
29 | call.RequestExecution(remotePtr.connection);
30 | } catch {
31 | // if the remote process is gone do nothing
32 | }
33 | }
34 | }
35 |
36 | internal class CfxApiReleaseRemoteCall : DtorRemoteCall {
37 | internal CfxApiReleaseRemoteCall() : base(RemoteCallId.CfxApiReleaseRemoteCall) { }
38 | protected override void RemoteProcedure() {
39 | CfxApi.cfx_release(nativePtr);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrBaseScoped.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 | namespace Chromium.Remote {
14 |
15 | ///
16 | /// Base class for all wrapper classes for scoped CEF library structs.
17 | /// Objects of this type will be disposed when they go out of scope.
18 | ///
19 | public class CfrBaseScoped : CfrObject {
20 |
21 | internal CfrBaseScoped(RemotePtr remotePtr) : base(remotePtr) { }
22 |
23 | internal override void OnDispose(RemotePtr nativePtr) {
24 | // do nothing
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrBinaryValue.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium.Remote {
10 | public partial class CfrBinaryValue {
11 |
12 | ///
13 | /// Creates a new object that is not owned by any other object. The specified
14 | /// |data| will be copied.
15 | ///
16 | public static CfrBinaryValue Create(byte[] data) {
17 | var call = new CfxBinaryValueCreateFromArrayRemoteCall();
18 | call.data = data;
19 | call.RequestExecution();
20 | return CfrBinaryValue.Wrap(new RemotePtr(CfxRemoteCallContext.CurrentContext.connection, call.__retval));
21 | }
22 | }
23 |
24 |
25 | internal class CfxBinaryValueCreateFromArrayRemoteCall : RemoteCall {
26 |
27 | internal CfxBinaryValueCreateFromArrayRemoteCall()
28 | : base(RemoteCallId.CfxBinaryValueCreateFromArrayRemoteCall) { }
29 |
30 | internal byte[] data;
31 | internal IntPtr __retval;
32 |
33 | protected override void WriteArgs(StreamHandler h) {
34 | h.Write(data);
35 | }
36 |
37 | protected override void ReadArgs(StreamHandler h) {
38 | h.Read(out data);
39 | }
40 |
41 | protected override void WriteReturn(StreamHandler h) {
42 | h.Write(__retval);
43 | }
44 |
45 | protected override void ReadReturn(StreamHandler h) {
46 | h.Read(out __retval);
47 | }
48 |
49 | protected override void RemoteProcedure() {
50 | if(data == null || data.Length == 0) {
51 | throw new ArgumentException("Data is null or zero length", "data");
52 | }
53 | var po = new PinnedObject(data);
54 | __retval = CfxApi.BinaryValue.cfx_binary_value_create(po.PinnedPtr, (UIntPtr)data.Length);
55 | po.Free();
56 | }
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrEventArgs.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | namespace Chromium.Remote
9 | {
10 | ///
11 | /// Base class for all remote callback event args.
12 | ///
13 | public class CfrEventArgs : EventArgs {
14 |
15 | internal RemoteConnection connection;
16 | internal void CheckAccess() {
17 | if(connection == null)
18 | throw new CfxException("Do not keep/use a reference to callback event arguments outside the scope of the event handler.");
19 | }
20 | }
21 |
22 | public delegate void CfrEventHandler(object sender, CfrEventArgs e);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrMayBlockEventArgs.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 | namespace Chromium.Remote.Event {
14 |
15 | // this is a hack to make the shared mayblock event work in the remote interface.
16 | // it works because there are no out parameters in that event.
17 |
18 | partial class CfrMayBlockEventArgs {
19 | internal CfrMayBlockEventArgs(CfxWriteHandlerMayBlockRemoteEventCall call) {
20 | this.call = new CfxReadHandlerMayBlockRemoteEventCall();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrSeekEventArgs.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 | namespace Chromium.Remote.Event {
14 |
15 | // this is a hack to make the shared seek event work in the remote interface.
16 | // it works because there are no out parameters in that event.
17 |
18 | partial class CfrSeekEventArgs {
19 | internal CfrSeekEventArgs(CfxWriteHandlerSeekRemoteEventCall call) {
20 | this.call = new CfxReadHandlerSeekRemoteEventCall();
21 | this.call.offset = call.offset;
22 | this.call.whence = call.whence;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrStructure.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium.Remote {
10 | ///
11 | /// Base class for all remote wrapper classes for CEF structs without refcount.
12 | ///
13 | public abstract class CfrStructure : CfrObject {
14 |
15 | private readonly DtorRemoteCall dtor;
16 |
17 | // Case 1) User created structure:
18 | // allocate native on creation, free native on dispose.
19 | internal CfrStructure(CtorRemoteCall ctor, DtorRemoteCall dtor) {
20 | this.dtor = dtor;
21 | ctor.RequestExecution();
22 | SetRemotePtr(new RemotePtr(CfxRemoteCallContext.CurrentContext.connection, ctor.__retval));
23 | lock(RemotePtr.connection.weakCache) {
24 | // TODO: where to remove this from the cache?
25 | RemotePtr.connection.weakCache.Add(RemotePtr.ptr, this);
26 | }
27 | }
28 |
29 | // Case 2) struct pointer passed in from framework in callback function
30 | // wrap native pointer on creation, do not free native pointer
31 | internal CfrStructure(RemotePtr remotePtr) {
32 | SetRemotePtr(remotePtr);
33 | }
34 |
35 | internal override sealed void OnDispose(RemotePtr remotePtr) {
36 | if(dtor != null) {
37 | dtor.nativePtr = remotePtr.ptr;
38 | try {
39 | dtor.RequestExecution(remotePtr.connection);
40 | } catch {
41 | // exception is being ignored in CfrBase, but CfrStructure does not inherit from it any longer,
42 | // so CfxRemotingException on the finalizer thread kills client application
43 | }
44 | }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrTellEventArgs.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 |
13 | namespace Chromium.Remote.Event {
14 |
15 | // this is a hack to make the shared tell event work in the remote interface.
16 | // it works because there are no out parameters in that event.
17 |
18 | partial class CfrTellEventArgs {
19 | internal CfrTellEventArgs(CfxWriteHandlerTellRemoteEventCall call) {
20 | this.call = new CfxReadHandlerTellRemoteEventCall();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/CfrTime.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium.Remote {
10 | partial class CfrTime {
11 |
12 | public DateTime ToUniversalTime() {
13 | return ToUniversalTime(this);
14 | }
15 |
16 | public static DateTime ToUniversalTime(CfrTime time) {
17 | return new DateTime(time.Year, time.Month, time.DayOfMonth, time.Hour, time.Minute, time.Second, time.Millisecond, DateTimeKind.Utc);
18 | }
19 |
20 | public static CfrTime FromUniversalTime(DateTime time) {
21 |
22 | if (time.Kind != DateTimeKind.Utc)
23 | throw new ArgumentException("time must be of kind DateTimeKind.Utc", "time");
24 |
25 | var r = new CfrTime();
26 | r.Year = time.Year;
27 | r.Month = time.Month;
28 | r.DayOfMonth = time.Day;
29 | r.DayOfWeek = (int)time.DayOfWeek;
30 | r.Hour = time.Hour;
31 | r.Minute = time.Minute;
32 | r.Second = time.Second;
33 | r.Millisecond = time.Millisecond;
34 | return r;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/RemoteClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium.Remote {
10 |
11 | internal class RemoteClient {
12 |
13 | ///
14 | /// Remote connection in the render process.
15 | /// If null, then this is the browser process.
16 | ///
17 | internal static RemoteConnection connection;
18 |
19 | internal static int ExecuteProcess(string pipeName) {
20 |
21 | //System.Diagnostics.Debugger.Launch();
22 |
23 | connection = new RemoteConnection(pipeName, true);
24 |
25 | var call = new RenderProcessMainRemoteCall();
26 | call.RequestExecution(connection);
27 | return call.__retval;
28 |
29 | }
30 | }
31 |
32 | internal class RenderProcessMainRemoteCall : RemoteCall {
33 |
34 | internal int __retval;
35 |
36 | internal RenderProcessMainRemoteCall()
37 | : base(RemoteCallId.RenderProcessMainRemoteCall) { }
38 |
39 | protected override void WriteReturn(StreamHandler h) { h.Write(__retval); }
40 | protected override void ReadReturn(StreamHandler h) { h.Read(out __retval); }
41 |
42 | protected override void RemoteProcedure() {
43 | __retval = RemoteService.renderProcessMainCallback();
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/RemotePtr.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium.Remote {
10 | ///
11 | /// Represents an IntPtr in the remote process.
12 | ///
13 | public struct RemotePtr {
14 | ///
15 | /// Two remote pointers are equal if both are null or both are of the same value on the same connection.
16 | ///
17 | public static bool operator ==(RemotePtr p1, RemotePtr p2) { return p1.ptr == p2.ptr && (p1.connection == p2.connection || p1.ptr == IntPtr.Zero); }
18 | public static bool operator !=(RemotePtr p1, RemotePtr p2) { return !(p1.ptr == p2.ptr); }
19 | public static readonly RemotePtr Zero;
20 | internal RemoteConnection connection;
21 | internal IntPtr ptr;
22 | internal RemotePtr(RemoteConnection connection, IntPtr ptr) {
23 | this.connection = connection;
24 | this.ptr = ptr;
25 | }
26 | public override bool Equals(object obj) {
27 | return this == (RemotePtr)obj;
28 | }
29 | public override int GetHashCode() {
30 | return ptr.GetHashCode() ^ connection.GetHashCode();
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/Remote/WorkerPool.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.Diagnostics;
10 | using System.Threading;
11 |
12 | namespace Chromium.Remote {
13 | internal static class WorkerPool {
14 |
15 | static readonly object syncLock = new object();
16 | static readonly Queue tasks = new Queue();
17 | static int waitingThreads;
18 | static int totalThreads;
19 |
20 | internal static void EnqueueTask(Action task) {
21 | lock(syncLock) {
22 | if(waitingThreads == 0) {
23 | ++totalThreads;
24 | var t = new Thread(Pool);
25 | t.IsBackground = true;
26 | t.Name = "cfx_rpc_worker";
27 | t.Start();
28 | } else {
29 | Monitor.Pulse(syncLock);
30 | }
31 | tasks.Enqueue(task);
32 | }
33 | }
34 |
35 | static void Pool() {
36 | for(; ; ) {
37 | Action task = null;
38 | lock(syncLock) {
39 | ++waitingThreads;
40 | while(tasks.Count == 0)
41 | Monitor.Wait(syncLock);
42 | --waitingThreads;
43 | task = tasks.Dequeue();
44 | }
45 | task.Invoke();
46 | }
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ChromiumFX/Source/TimeFunctions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 |
9 | namespace Chromium {
10 | internal class TimeFunctions {
11 | private static DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Unspecified);
12 | internal static DateTime FromTimeT(ulong t) {
13 | return epoch.AddSeconds(t);
14 | }
15 | internal static ulong ToTimeT(DateTime t) {
16 | return (ulong)(t - epoch).TotalSeconds;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/ChromiumWebBrowser/BrowserProcess/BrowserProcess.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using Chromium;
9 | using Chromium.Event;
10 |
11 | namespace Chromium.WebBrowser {
12 | internal static class BrowserProcess {
13 |
14 | internal static CfxApp app;
15 | internal static CfxBrowserProcessHandler processHandler;
16 |
17 | internal static bool initialized;
18 |
19 | internal static void Initialize() {
20 |
21 | if(initialized)
22 | throw new ChromiumWebBrowserException("ChromiumWebBrowser library already initialized.");
23 |
24 |
25 | int retval = CfxRuntime.ExecuteProcess();
26 | if(retval >= 0)
27 | Environment.Exit(retval);
28 |
29 |
30 | app = new CfxApp();
31 | processHandler = new CfxBrowserProcessHandler();
32 |
33 | app.GetBrowserProcessHandler += (s, e) => e.SetReturnValue(processHandler);
34 | app.OnBeforeCommandLineProcessing += (s, e) => ChromiumWebBrowser.RaiseOnBeforeCommandLineProcessing(e);
35 | app.OnRegisterCustomSchemes += (s, e) => ChromiumWebBrowser.RaiseOnRegisterCustomSchemes(e);
36 |
37 | var settings = new CfxSettings();
38 | settings.MultiThreadedMessageLoop = true;
39 | settings.NoSandbox = true;
40 |
41 | ChromiumWebBrowser.RaiseOnBeforeCfxInitialize(settings, processHandler);
42 |
43 | if(!CfxRuntime.Initialize(settings, app, RenderProcess.RenderProcessMain))
44 | throw new ChromiumWebBrowserException("Failed to initialize CEF library.");
45 |
46 | initialized = true;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ChromiumWebBrowser/BrowserProcess/LifeSpanHandler.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using Chromium;
9 | using Chromium.Event;
10 |
11 | namespace Chromium.WebBrowser {
12 | internal class LifeSpanHandler : CfxLifeSpanHandler {
13 |
14 | internal BrowserClient client;
15 |
16 | internal LifeSpanHandler(BrowserClient client) {
17 | this.client = client;
18 |
19 | this.OnAfterCreated += new CfxOnAfterCreatedEventHandler(LifeSpanHandler_OnAfterCreated);
20 | }
21 |
22 | void LifeSpanHandler_OnAfterCreated(object sender, CfxOnAfterCreatedEventArgs e) {
23 | client.browser.OnBrowserCreated(e);
24 | }
25 |
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ChromiumWebBrowser/BrowserProcess/RequestHandler.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.Linq;
10 | using System.Text;
11 |
12 | using Chromium.Event;
13 |
14 | namespace Chromium.WebBrowser {
15 | internal class RequestHandler : CfxRequestHandler {
16 |
17 | internal BrowserClient client;
18 |
19 | internal RequestHandler(BrowserClient client) {
20 | this.client = client;
21 |
22 | this.GetResourceHandler += new CfxGetResourceHandlerEventHandler(RequestHandler_GetResourceHandler);
23 |
24 | }
25 |
26 | void RequestHandler_GetResourceHandler(object sender, CfxGetResourceHandlerEventArgs e) {
27 | WebResource resource;
28 | if(client.browser.webResources.TryGetValue(e.Request.Url, out resource)) {
29 | e.SetReturnValue(resource.GetResourceHandler());
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ChromiumWebBrowser/ChromiumWebBrowserException.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.Diagnostics;
10 |
11 | namespace Chromium.WebBrowser {
12 | class ChromiumWebBrowserException : Exception {
13 | internal ChromiumWebBrowserException(string message) : base(message) { }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ChromiumWebBrowser/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System.Reflection;
8 | using System.Runtime.InteropServices;
9 |
10 | [assembly: AssemblyTitle("ChromiumWebBrowser")]
11 | [assembly: AssemblyDescription("WebBrowser control based on ChromiumFX.")]
12 | [assembly: AssemblyCopyright("Copyright © 2014-2018 Wolfgang Borgsmüller")]
13 |
14 | [assembly: ComVisible(false)]
15 |
16 | [assembly: AssemblyVersion("3.3578.1")]
17 |
--------------------------------------------------------------------------------
/ChromiumWebBrowser/RenderProcess/RenderProcess.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using Chromium.Remote;
10 | using Chromium.Remote.Event;
11 |
12 | namespace Chromium.WebBrowser {
13 | internal class RenderProcess {
14 |
15 | internal static int RenderProcessMain() {
16 | try {
17 | var rp = new RenderProcess();
18 | ChromiumWebBrowser.RaiseRemoteProcessCreated(rp.processHandler);
19 | return rp.RemoteMain();
20 | } catch(CfxRemotingException) {
21 | return -1;
22 | }
23 | }
24 |
25 | private readonly CfrApp app;
26 | private readonly RenderProcessHandler processHandler;
27 |
28 | private List browserReferences = new List();
29 |
30 | internal int RemoteProcessId { get; private set; }
31 |
32 | private RenderProcess() {
33 | RemoteProcessId = CfxRemoteCallContext.CurrentContext.ProcessId;
34 | app = new CfrApp();
35 | processHandler = new RenderProcessHandler(this);
36 | app.GetRenderProcessHandler += (s, e) => e.SetReturnValue(processHandler);
37 | }
38 |
39 | internal void AddBrowserReference(ChromiumWebBrowser browser) {
40 | for(int i = 0; i < browserReferences.Count; ++i) {
41 | if(browserReferences[i].Target == null) {
42 | browserReferences[i] = new WeakReference(browser);
43 | return;
44 | }
45 | }
46 | browserReferences.Add(new WeakReference(browser));
47 | }
48 |
49 | private int RemoteMain() {
50 | try {
51 | var retval = CfrRuntime.ExecuteProcess(app);
52 | return retval;
53 | } finally {
54 | foreach(var br in browserReferences) {
55 | var b = (ChromiumWebBrowser)br.Target;
56 | b?.RemoteProcessExited(this);
57 | }
58 | }
59 | }
60 |
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/License.txt:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions
6 | // are met:
7 | //
8 | // 1. Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | //
11 | // 2. Redistributions in binary form must reproduce the above copyright
12 | // notice, this list of conditions and the following disclaimer in the
13 | // documentation and/or other materials provided with the distribution.
14 | //
15 | // 3. Neither the name of the copyright holder nor the names of its
16 | // contributors may be used to endorse or promote products derived
17 | // from this software without specific prior 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
22 | // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 | // COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 | // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
28 | // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
29 | // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/Tests/Windowless/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | using System.Reflection;
8 | using System.Runtime.CompilerServices;
9 | using System.Runtime.InteropServices;
10 |
11 | // General Information about an assembly is controlled through the following
12 | // set of attributes. Change these attribute values to modify the information
13 | // associated with an assembly.
14 | [assembly: AssemblyTitle("Windowless")]
15 | [assembly: AssemblyDescription("")]
16 | [assembly: AssemblyConfiguration("")]
17 | [assembly: AssemblyCompany("")]
18 | [assembly: AssemblyProduct("Windowless")]
19 | [assembly: AssemblyCopyright("Copyright © 2015")]
20 | [assembly: AssemblyTrademark("")]
21 | [assembly: AssemblyCulture("")]
22 |
23 | // Setting ComVisible to false makes the types in this assembly not visible
24 | // to COM components. If you need to access a type in this assembly from
25 | // COM, set the ComVisible attribute to true on that type.
26 | [assembly: ComVisible(false)]
27 |
28 | // The following GUID is for the ID of the typelib if this project is exposed to COM
29 | [assembly: Guid("e8ad71cf-e0e9-45f6-8dad-98235a1c9868")]
30 |
31 | // Version information for an assembly consists of the following four values:
32 | //
33 | // Major Version
34 | // Minor Version
35 | // Build Number
36 | // Revision
37 | //
38 | // You can specify all the values or you can default the Build and Revision Numbers
39 | // by using the '*' as shown below:
40 | // [assembly: AssemblyVersion("1.0.*")]
41 | [assembly: AssemblyVersion("1.0.0.0")]
42 | [assembly: AssemblyFileVersion("1.0.0.0")]
43 |
--------------------------------------------------------------------------------
/Tests/Windowless/Windowless.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.31101.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Windowless", "Windowless.csproj", "{0D3B9981-FC05-41DA-A9B5-628969742C41}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Release|x64 = Release|x64
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {0D3B9981-FC05-41DA-A9B5-628969742C41}.Debug|x64.ActiveCfg = Debug|x64
15 | {0D3B9981-FC05-41DA-A9B5-628969742C41}.Debug|x64.Build.0 = Debug|x64
16 | {0D3B9981-FC05-41DA-A9B5-628969742C41}.Release|x64.ActiveCfg = Release|x64
17 | {0D3B9981-FC05-41DA-A9B5-628969742C41}.Release|x64.Build.0 = Release|x64
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/cef/LICENSE.txt:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c)
2 | // 2006-2009 Google Inc. All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the name Chromium Embedded
15 | // Framework nor the names of its contributors may be used to endorse
16 | // or promote products derived from this software without specific prior
17 | // written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_auth_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_auth_callback
11 |
12 | // cont
13 | static void cfx_auth_callback_cont(cef_auth_callback_t* self, char16 *username_str, int username_length, char16 *password_str, int password_length) {
14 | cef_string_t username = { username_str, username_length, 0 };
15 | cef_string_t password = { password_str, password_length, 0 };
16 | self->cont(self, &username, &password);
17 | }
18 |
19 | // cancel
20 | static void cfx_auth_callback_cancel(cef_auth_callback_t* self) {
21 | self->cancel(self);
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_before_download_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_before_download_callback
11 |
12 | // cont
13 | static void cfx_before_download_callback_cont(cef_before_download_callback_t* self, char16 *download_path_str, int download_path_length, int show_dialog) {
14 | cef_string_t download_path = { download_path_str, download_path_length, 0 };
15 | self->cont(self, &download_path, show_dialog);
16 | }
17 |
18 |
19 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_binary_value.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_binary_value
11 |
12 | // CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data, size_t data_size);
13 | static cef_binary_value_t* cfx_binary_value_create(const void* data, size_t data_size) {
14 | return cef_binary_value_create(data, data_size);
15 | }
16 | // is_valid
17 | static int cfx_binary_value_is_valid(cef_binary_value_t* self) {
18 | return self->is_valid(self);
19 | }
20 |
21 | // is_owned
22 | static int cfx_binary_value_is_owned(cef_binary_value_t* self) {
23 | return self->is_owned(self);
24 | }
25 |
26 | // is_same
27 | static int cfx_binary_value_is_same(cef_binary_value_t* self, cef_binary_value_t* that) {
28 | if(that) ((cef_base_ref_counted_t*)that)->add_ref((cef_base_ref_counted_t*)that);
29 | return self->is_same(self, that);
30 | }
31 |
32 | // is_equal
33 | static int cfx_binary_value_is_equal(cef_binary_value_t* self, cef_binary_value_t* that) {
34 | if(that) ((cef_base_ref_counted_t*)that)->add_ref((cef_base_ref_counted_t*)that);
35 | return self->is_equal(self, that);
36 | }
37 |
38 | // copy
39 | static cef_binary_value_t* cfx_binary_value_copy(cef_binary_value_t* self) {
40 | return self->copy(self);
41 | }
42 |
43 | // get_size
44 | static size_t cfx_binary_value_get_size(cef_binary_value_t* self) {
45 | return self->get_size(self);
46 | }
47 |
48 | // get_data
49 | static size_t cfx_binary_value_get_data(cef_binary_value_t* self, void* buffer, size_t buffer_size, size_t data_offset) {
50 | return self->get_data(self, buffer, buffer_size, data_offset);
51 | }
52 |
53 |
54 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_callback
11 |
12 | // cont
13 | static void cfx_callback_cont(cef_callback_t* self) {
14 | self->cont(self);
15 | }
16 |
17 | // cancel
18 | static void cfx_callback_cancel(cef_callback_t* self) {
19 | self->cancel(self);
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_composition_underline.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_composition_underline
11 |
12 | static cef_composition_underline_t* cfx_composition_underline_ctor() {
13 | return (cef_composition_underline_t*)calloc(1, sizeof(cef_composition_underline_t));
14 | }
15 |
16 | static void cfx_composition_underline_dtor(cef_composition_underline_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_composition_underline_t->range
21 | static void cfx_composition_underline_set_range(cef_composition_underline_t *self, cef_range_t* range) {
22 | self->range = *(range);
23 | }
24 | static void cfx_composition_underline_get_range(cef_composition_underline_t *self, cef_range_t** range) {
25 | *range = &(self->range);
26 | }
27 |
28 | // cef_composition_underline_t->color
29 | static void cfx_composition_underline_set_color(cef_composition_underline_t *self, uint32 color) {
30 | self->color = color;
31 | }
32 | static void cfx_composition_underline_get_color(cef_composition_underline_t *self, uint32* color) {
33 | *color = self->color;
34 | }
35 |
36 | // cef_composition_underline_t->background_color
37 | static void cfx_composition_underline_set_background_color(cef_composition_underline_t *self, uint32 background_color) {
38 | self->background_color = background_color;
39 | }
40 | static void cfx_composition_underline_get_background_color(cef_composition_underline_t *self, uint32* background_color) {
41 | *background_color = self->background_color;
42 | }
43 |
44 | // cef_composition_underline_t->thick
45 | static void cfx_composition_underline_set_thick(cef_composition_underline_t *self, int thick) {
46 | self->thick = thick;
47 | }
48 | static void cfx_composition_underline_get_thick(cef_composition_underline_t *self, int* thick) {
49 | *thick = self->thick;
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_cursor_info.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_cursor_info
11 |
12 | static cef_cursor_info_t* cfx_cursor_info_ctor() {
13 | return (cef_cursor_info_t*)calloc(1, sizeof(cef_cursor_info_t));
14 | }
15 |
16 | static void cfx_cursor_info_dtor(cef_cursor_info_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_cursor_info_t->hotspot
21 | static void cfx_cursor_info_set_hotspot(cef_cursor_info_t *self, cef_point_t* hotspot) {
22 | self->hotspot = *(hotspot);
23 | }
24 | static void cfx_cursor_info_get_hotspot(cef_cursor_info_t *self, cef_point_t** hotspot) {
25 | *hotspot = &(self->hotspot);
26 | }
27 |
28 | // cef_cursor_info_t->image_scale_factor
29 | static void cfx_cursor_info_set_image_scale_factor(cef_cursor_info_t *self, float image_scale_factor) {
30 | self->image_scale_factor = image_scale_factor;
31 | }
32 | static void cfx_cursor_info_get_image_scale_factor(cef_cursor_info_t *self, float* image_scale_factor) {
33 | *image_scale_factor = self->image_scale_factor;
34 | }
35 |
36 | // cef_cursor_info_t->buffer
37 | static void cfx_cursor_info_set_buffer(cef_cursor_info_t *self, void* buffer) {
38 | self->buffer = buffer;
39 | }
40 | static void cfx_cursor_info_get_buffer(cef_cursor_info_t *self, void** buffer) {
41 | *buffer = self->buffer;
42 | }
43 |
44 | // cef_cursor_info_t->size
45 | static void cfx_cursor_info_set_size(cef_cursor_info_t *self, cef_size_t* size) {
46 | self->size = *(size);
47 | }
48 | static void cfx_cursor_info_get_size(cef_cursor_info_t *self, cef_size_t** size) {
49 | *size = &(self->size);
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_download_item_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_download_item_callback
11 |
12 | // cancel
13 | static void cfx_download_item_callback_cancel(cef_download_item_callback_t* self) {
14 | self->cancel(self);
15 | }
16 |
17 | // pause
18 | static void cfx_download_item_callback_pause(cef_download_item_callback_t* self) {
19 | self->pause(self);
20 | }
21 |
22 | // resume
23 | static void cfx_download_item_callback_resume(cef_download_item_callback_t* self) {
24 | self->resume(self);
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_draggable_region.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_draggable_region
11 |
12 | static cef_draggable_region_t* cfx_draggable_region_ctor() {
13 | return (cef_draggable_region_t*)calloc(1, sizeof(cef_draggable_region_t));
14 | }
15 |
16 | static void cfx_draggable_region_dtor(cef_draggable_region_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_draggable_region_t->bounds
21 | static void cfx_draggable_region_set_bounds(cef_draggable_region_t *self, cef_rect_t* bounds) {
22 | self->bounds = *(bounds);
23 | }
24 | static void cfx_draggable_region_get_bounds(cef_draggable_region_t *self, cef_rect_t** bounds) {
25 | *bounds = &(self->bounds);
26 | }
27 |
28 | // cef_draggable_region_t->draggable
29 | static void cfx_draggable_region_set_draggable(cef_draggable_region_t *self, int draggable) {
30 | self->draggable = draggable;
31 | }
32 | static void cfx_draggable_region_get_draggable(cef_draggable_region_t *self, int* draggable) {
33 | *draggable = self->draggable;
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_extension.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_extension
11 |
12 | // get_identifier
13 | static cef_string_userfree_t cfx_extension_get_identifier(cef_extension_t* self) {
14 | return self->get_identifier(self);
15 | }
16 |
17 | // get_path
18 | static cef_string_userfree_t cfx_extension_get_path(cef_extension_t* self) {
19 | return self->get_path(self);
20 | }
21 |
22 | // get_manifest
23 | static cef_dictionary_value_t* cfx_extension_get_manifest(cef_extension_t* self) {
24 | return self->get_manifest(self);
25 | }
26 |
27 | // is_same
28 | static int cfx_extension_is_same(cef_extension_t* self, cef_extension_t* that) {
29 | if(that) ((cef_base_ref_counted_t*)that)->add_ref((cef_base_ref_counted_t*)that);
30 | return self->is_same(self, that);
31 | }
32 |
33 | // get_handler
34 | static cef_extension_handler_t* cfx_extension_get_handler(cef_extension_t* self) {
35 | return self->get_handler(self);
36 | }
37 |
38 | // get_loader_context
39 | static cef_request_context_t* cfx_extension_get_loader_context(cef_extension_t* self) {
40 | return self->get_loader_context(self);
41 | }
42 |
43 | // is_loaded
44 | static int cfx_extension_is_loaded(cef_extension_t* self) {
45 | return self->is_loaded(self);
46 | }
47 |
48 | // unload
49 | static void cfx_extension_unload(cef_extension_t* self) {
50 | self->unload(self);
51 | }
52 |
53 |
54 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_file_dialog_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_file_dialog_callback
11 |
12 | // cont
13 | static void cfx_file_dialog_callback_cont(cef_file_dialog_callback_t* self, int selected_accept_filter, cef_string_list_t file_paths) {
14 | self->cont(self, selected_accept_filter, file_paths);
15 | }
16 |
17 | // cancel
18 | static void cfx_file_dialog_callback_cancel(cef_file_dialog_callback_t* self) {
19 | self->cancel(self);
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_get_extension_resource_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_get_extension_resource_callback
11 |
12 | // cont
13 | static void cfx_get_extension_resource_callback_cont(cef_get_extension_resource_callback_t* self, cef_stream_reader_t* stream) {
14 | if(stream) ((cef_base_ref_counted_t*)stream)->add_ref((cef_base_ref_counted_t*)stream);
15 | self->cont(self, stream);
16 | }
17 |
18 | // cancel
19 | static void cfx_get_extension_resource_callback_cancel(cef_get_extension_resource_callback_t* self) {
20 | self->cancel(self);
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_insets.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_insets
11 |
12 | static cef_insets_t* cfx_insets_ctor() {
13 | return (cef_insets_t*)calloc(1, sizeof(cef_insets_t));
14 | }
15 |
16 | static void cfx_insets_dtor(cef_insets_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_insets_t->top
21 | static void cfx_insets_set_top(cef_insets_t *self, int top) {
22 | self->top = top;
23 | }
24 | static void cfx_insets_get_top(cef_insets_t *self, int* top) {
25 | *top = self->top;
26 | }
27 |
28 | // cef_insets_t->left
29 | static void cfx_insets_set_left(cef_insets_t *self, int left) {
30 | self->left = left;
31 | }
32 | static void cfx_insets_get_left(cef_insets_t *self, int* left) {
33 | *left = self->left;
34 | }
35 |
36 | // cef_insets_t->bottom
37 | static void cfx_insets_set_bottom(cef_insets_t *self, int bottom) {
38 | self->bottom = bottom;
39 | }
40 | static void cfx_insets_get_bottom(cef_insets_t *self, int* bottom) {
41 | *bottom = self->bottom;
42 | }
43 |
44 | // cef_insets_t->right
45 | static void cfx_insets_set_right(cef_insets_t *self, int right) {
46 | self->right = right;
47 | }
48 | static void cfx_insets_get_right(cef_insets_t *self, int* right) {
49 | *right = self->right;
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_jsdialog_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_jsdialog_callback
11 |
12 | // cont
13 | static void cfx_jsdialog_callback_cont(cef_jsdialog_callback_t* self, int success, char16 *user_input_str, int user_input_length) {
14 | cef_string_t user_input = { user_input_str, user_input_length, 0 };
15 | self->cont(self, success, &user_input);
16 | }
17 |
18 |
19 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_main_args_linux.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_main_args_linux
11 |
12 | #ifdef CFX_LINUX
13 |
14 | static cef_main_args_t* cfx_main_args_linux_ctor() {
15 | return (cef_main_args_t*)calloc(1, sizeof(cef_main_args_t));
16 | }
17 |
18 | static void cfx_main_args_linux_dtor(cef_main_args_t* self) {
19 | free(self);
20 | }
21 |
22 | // cef_main_args_t->argc
23 | static void cfx_main_args_linux_set_argc(cef_main_args_t *self, int argc) {
24 | self->argc = argc;
25 | }
26 | static void cfx_main_args_linux_get_argc(cef_main_args_t *self, int* argc) {
27 | *argc = self->argc;
28 | }
29 |
30 | // cef_main_args_t->argv
31 | static void cfx_main_args_linux_set_argv(cef_main_args_t *self, char** argv) {
32 | self->argv = argv;
33 | }
34 | static void cfx_main_args_linux_get_argv(cef_main_args_t *self, char*** argv) {
35 | *argv = self->argv;
36 | }
37 |
38 | #else //ifdef CFX_LINUX
39 | #define cfx_main_args_linux_ctor 0
40 | #define cfx_main_args_linux_dtor 0
41 | #define cfx_main_args_linux_set_argc 0
42 | #define cfx_main_args_linux_get_argc 0
43 | #define cfx_main_args_linux_set_argv 0
44 | #define cfx_main_args_linux_get_argv 0
45 | #endif //ifdef CFX_LINUX
46 |
47 |
48 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_main_args_windows.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_main_args_windows
11 |
12 | #ifdef CFX_WINDOWS
13 |
14 | static cef_main_args_t* cfx_main_args_windows_ctor() {
15 | return (cef_main_args_t*)calloc(1, sizeof(cef_main_args_t));
16 | }
17 |
18 | static void cfx_main_args_windows_dtor(cef_main_args_t* self) {
19 | free(self);
20 | }
21 |
22 | // cef_main_args_t->instance
23 | static void cfx_main_args_windows_set_instance(cef_main_args_t *self, HINSTANCE instance) {
24 | self->instance = instance;
25 | }
26 | static void cfx_main_args_windows_get_instance(cef_main_args_t *self, HINSTANCE* instance) {
27 | *instance = self->instance;
28 | }
29 |
30 | #else //ifdef CFX_WINDOWS
31 | #define cfx_main_args_windows_ctor 0
32 | #define cfx_main_args_windows_dtor 0
33 | #define cfx_main_args_windows_set_instance 0
34 | #define cfx_main_args_windows_get_instance 0
35 | #endif //ifdef CFX_WINDOWS
36 |
37 |
38 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_mouse_event.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_mouse_event
11 |
12 | static cef_mouse_event_t* cfx_mouse_event_ctor() {
13 | return (cef_mouse_event_t*)calloc(1, sizeof(cef_mouse_event_t));
14 | }
15 |
16 | static void cfx_mouse_event_dtor(cef_mouse_event_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_mouse_event_t->x
21 | static void cfx_mouse_event_set_x(cef_mouse_event_t *self, int x) {
22 | self->x = x;
23 | }
24 | static void cfx_mouse_event_get_x(cef_mouse_event_t *self, int* x) {
25 | *x = self->x;
26 | }
27 |
28 | // cef_mouse_event_t->y
29 | static void cfx_mouse_event_set_y(cef_mouse_event_t *self, int y) {
30 | self->y = y;
31 | }
32 | static void cfx_mouse_event_get_y(cef_mouse_event_t *self, int* y) {
33 | *y = self->y;
34 | }
35 |
36 | // cef_mouse_event_t->modifiers
37 | static void cfx_mouse_event_set_modifiers(cef_mouse_event_t *self, uint32 modifiers) {
38 | self->modifiers = modifiers;
39 | }
40 | static void cfx_mouse_event_get_modifiers(cef_mouse_event_t *self, uint32* modifiers) {
41 | *modifiers = self->modifiers;
42 | }
43 |
44 |
45 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_navigation_entry.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_navigation_entry
11 |
12 | // is_valid
13 | static int cfx_navigation_entry_is_valid(cef_navigation_entry_t* self) {
14 | return self->is_valid(self);
15 | }
16 |
17 | // get_url
18 | static cef_string_userfree_t cfx_navigation_entry_get_url(cef_navigation_entry_t* self) {
19 | return self->get_url(self);
20 | }
21 |
22 | // get_display_url
23 | static cef_string_userfree_t cfx_navigation_entry_get_display_url(cef_navigation_entry_t* self) {
24 | return self->get_display_url(self);
25 | }
26 |
27 | // get_original_url
28 | static cef_string_userfree_t cfx_navigation_entry_get_original_url(cef_navigation_entry_t* self) {
29 | return self->get_original_url(self);
30 | }
31 |
32 | // get_title
33 | static cef_string_userfree_t cfx_navigation_entry_get_title(cef_navigation_entry_t* self) {
34 | return self->get_title(self);
35 | }
36 |
37 | // get_transition_type
38 | static cef_transition_type_t cfx_navigation_entry_get_transition_type(cef_navigation_entry_t* self) {
39 | return self->get_transition_type(self);
40 | }
41 |
42 | // has_post_data
43 | static int cfx_navigation_entry_has_post_data(cef_navigation_entry_t* self) {
44 | return self->has_post_data(self);
45 | }
46 |
47 | // get_completion_time
48 | static cef_time_t* cfx_navigation_entry_get_completion_time(cef_navigation_entry_t* self) {
49 | cef_time_t *__retval = malloc(sizeof(cef_time_t));
50 | if(__retval) *__retval = self->get_completion_time(self);
51 | return __retval;
52 | }
53 |
54 | // get_http_status_code
55 | static int cfx_navigation_entry_get_http_status_code(cef_navigation_entry_t* self) {
56 | return self->get_http_status_code(self);
57 | }
58 |
59 | // get_sslstatus
60 | static cef_sslstatus_t* cfx_navigation_entry_get_sslstatus(cef_navigation_entry_t* self) {
61 | return self->get_sslstatus(self);
62 | }
63 |
64 |
65 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_point.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_point
11 |
12 | static cef_point_t* cfx_point_ctor() {
13 | return (cef_point_t*)calloc(1, sizeof(cef_point_t));
14 | }
15 |
16 | static void cfx_point_dtor(cef_point_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_point_t->x
21 | static void cfx_point_set_x(cef_point_t *self, int x) {
22 | self->x = x;
23 | }
24 | static void cfx_point_get_x(cef_point_t *self, int* x) {
25 | *x = self->x;
26 | }
27 |
28 | // cef_point_t->y
29 | static void cfx_point_set_y(cef_point_t *self, int y) {
30 | self->y = y;
31 | }
32 | static void cfx_point_get_y(cef_point_t *self, int* y) {
33 | *y = self->y;
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_post_data.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_post_data
11 |
12 | // CEF_EXPORT cef_post_data_t* cef_post_data_create();
13 | static cef_post_data_t* cfx_post_data_create() {
14 | return cef_post_data_create();
15 | }
16 | // is_read_only
17 | static int cfx_post_data_is_read_only(cef_post_data_t* self) {
18 | return self->is_read_only(self);
19 | }
20 |
21 | // has_excluded_elements
22 | static int cfx_post_data_has_excluded_elements(cef_post_data_t* self) {
23 | return self->has_excluded_elements(self);
24 | }
25 |
26 | // get_element_count
27 | static size_t cfx_post_data_get_element_count(cef_post_data_t* self) {
28 | return self->get_element_count(self);
29 | }
30 |
31 | // get_elements
32 | static void cfx_post_data_get_elements(cef_post_data_t* self, size_t elementsCount, cef_post_data_element_t** elements) {
33 | self->get_elements(self, &elementsCount, elements);
34 | }
35 |
36 | // remove_element
37 | static int cfx_post_data_remove_element(cef_post_data_t* self, cef_post_data_element_t* element) {
38 | if(element) ((cef_base_ref_counted_t*)element)->add_ref((cef_base_ref_counted_t*)element);
39 | return self->remove_element(self, element);
40 | }
41 |
42 | // add_element
43 | static int cfx_post_data_add_element(cef_post_data_t* self, cef_post_data_element_t* element) {
44 | if(element) ((cef_base_ref_counted_t*)element)->add_ref((cef_base_ref_counted_t*)element);
45 | return self->add_element(self, element);
46 | }
47 |
48 | // remove_elements
49 | static void cfx_post_data_remove_elements(cef_post_data_t* self) {
50 | self->remove_elements(self);
51 | }
52 |
53 |
54 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_post_data_element.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_post_data_element
11 |
12 | // CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create();
13 | static cef_post_data_element_t* cfx_post_data_element_create() {
14 | return cef_post_data_element_create();
15 | }
16 | // is_read_only
17 | static int cfx_post_data_element_is_read_only(cef_post_data_element_t* self) {
18 | return self->is_read_only(self);
19 | }
20 |
21 | // set_to_empty
22 | static void cfx_post_data_element_set_to_empty(cef_post_data_element_t* self) {
23 | self->set_to_empty(self);
24 | }
25 |
26 | // set_to_file
27 | static void cfx_post_data_element_set_to_file(cef_post_data_element_t* self, char16 *fileName_str, int fileName_length) {
28 | cef_string_t fileName = { fileName_str, fileName_length, 0 };
29 | self->set_to_file(self, &fileName);
30 | }
31 |
32 | // set_to_bytes
33 | static void cfx_post_data_element_set_to_bytes(cef_post_data_element_t* self, size_t size, const void* bytes) {
34 | self->set_to_bytes(self, size, bytes);
35 | }
36 |
37 | // get_type
38 | static cef_postdataelement_type_t cfx_post_data_element_get_type(cef_post_data_element_t* self) {
39 | return self->get_type(self);
40 | }
41 |
42 | // get_file
43 | static cef_string_userfree_t cfx_post_data_element_get_file(cef_post_data_element_t* self) {
44 | return self->get_file(self);
45 | }
46 |
47 | // get_bytes_count
48 | static size_t cfx_post_data_element_get_bytes_count(cef_post_data_element_t* self) {
49 | return self->get_bytes_count(self);
50 | }
51 |
52 | // get_bytes
53 | static size_t cfx_post_data_element_get_bytes(cef_post_data_element_t* self, size_t size, void* bytes) {
54 | return self->get_bytes(self, size, bytes);
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_print_dialog_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_print_dialog_callback
11 |
12 | // cont
13 | static void cfx_print_dialog_callback_cont(cef_print_dialog_callback_t* self, cef_print_settings_t* settings) {
14 | if(settings) ((cef_base_ref_counted_t*)settings)->add_ref((cef_base_ref_counted_t*)settings);
15 | self->cont(self, settings);
16 | }
17 |
18 | // cancel
19 | static void cfx_print_dialog_callback_cancel(cef_print_dialog_callback_t* self) {
20 | self->cancel(self);
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_print_job_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_print_job_callback
11 |
12 | // cont
13 | static void cfx_print_job_callback_cont(cef_print_job_callback_t* self) {
14 | self->cont(self);
15 | }
16 |
17 |
18 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_process_message.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_process_message
11 |
12 | // CEF_EXPORT cef_process_message_t* cef_process_message_create(const cef_string_t* name);
13 | static cef_process_message_t* cfx_process_message_create(char16 *name_str, int name_length) {
14 | cef_string_t name = { name_str, name_length, 0 };
15 | return cef_process_message_create(&name);
16 | }
17 | // is_valid
18 | static int cfx_process_message_is_valid(cef_process_message_t* self) {
19 | return self->is_valid(self);
20 | }
21 |
22 | // is_read_only
23 | static int cfx_process_message_is_read_only(cef_process_message_t* self) {
24 | return self->is_read_only(self);
25 | }
26 |
27 | // copy
28 | static cef_process_message_t* cfx_process_message_copy(cef_process_message_t* self) {
29 | return self->copy(self);
30 | }
31 |
32 | // get_name
33 | static cef_string_userfree_t cfx_process_message_get_name(cef_process_message_t* self) {
34 | return self->get_name(self);
35 | }
36 |
37 | // get_argument_list
38 | static cef_list_value_t* cfx_process_message_get_argument_list(cef_process_message_t* self) {
39 | return self->get_argument_list(self);
40 | }
41 |
42 |
43 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_range.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_range
11 |
12 | static cef_range_t* cfx_range_ctor() {
13 | return (cef_range_t*)calloc(1, sizeof(cef_range_t));
14 | }
15 |
16 | static void cfx_range_dtor(cef_range_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_range_t->from
21 | static void cfx_range_set_from(cef_range_t *self, int from) {
22 | self->from = from;
23 | }
24 | static void cfx_range_get_from(cef_range_t *self, int* from) {
25 | *from = self->from;
26 | }
27 |
28 | // cef_range_t->to
29 | static void cfx_range_set_to(cef_range_t *self, int to) {
30 | self->to = to;
31 | }
32 | static void cfx_range_get_to(cef_range_t *self, int* to) {
33 | *to = self->to;
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_rect.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_rect
11 |
12 | static cef_rect_t* cfx_rect_ctor() {
13 | return (cef_rect_t*)calloc(1, sizeof(cef_rect_t));
14 | }
15 |
16 | static void cfx_rect_dtor(cef_rect_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_rect_t->x
21 | static void cfx_rect_set_x(cef_rect_t *self, int x) {
22 | self->x = x;
23 | }
24 | static void cfx_rect_get_x(cef_rect_t *self, int* x) {
25 | *x = self->x;
26 | }
27 |
28 | // cef_rect_t->y
29 | static void cfx_rect_set_y(cef_rect_t *self, int y) {
30 | self->y = y;
31 | }
32 | static void cfx_rect_get_y(cef_rect_t *self, int* y) {
33 | *y = self->y;
34 | }
35 |
36 | // cef_rect_t->width
37 | static void cfx_rect_set_width(cef_rect_t *self, int width) {
38 | self->width = width;
39 | }
40 | static void cfx_rect_get_width(cef_rect_t *self, int* width) {
41 | *width = self->width;
42 | }
43 |
44 | // cef_rect_t->height
45 | static void cfx_rect_set_height(cef_rect_t *self, int height) {
46 | self->height = height;
47 | }
48 | static void cfx_rect_get_height(cef_rect_t *self, int* height) {
49 | *height = self->height;
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_request_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_request_callback
11 |
12 | // cont
13 | static void cfx_request_callback_cont(cef_request_callback_t* self, int allow) {
14 | self->cont(self, allow);
15 | }
16 |
17 | // cancel
18 | static void cfx_request_callback_cancel(cef_request_callback_t* self) {
19 | self->cancel(self);
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_resource_bundle.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_resource_bundle
11 |
12 | // CEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global();
13 | static cef_resource_bundle_t* cfx_resource_bundle_get_global() {
14 | return cef_resource_bundle_get_global();
15 | }
16 | // get_localized_string
17 | static cef_string_userfree_t cfx_resource_bundle_get_localized_string(cef_resource_bundle_t* self, int string_id) {
18 | return self->get_localized_string(self, string_id);
19 | }
20 |
21 | // get_data_resource
22 | static int cfx_resource_bundle_get_data_resource(cef_resource_bundle_t* self, int resource_id, void** data, size_t* data_size) {
23 | return self->get_data_resource(self, resource_id, data, data_size);
24 | }
25 |
26 | // get_data_resource_for_scale
27 | static int cfx_resource_bundle_get_data_resource_for_scale(cef_resource_bundle_t* self, int resource_id, cef_scale_factor_t scale_factor, void** data, size_t* data_size) {
28 | return self->get_data_resource_for_scale(self, resource_id, scale_factor, data, data_size);
29 | }
30 |
31 |
32 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_run_context_menu_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_run_context_menu_callback
11 |
12 | // cont
13 | static void cfx_run_context_menu_callback_cont(cef_run_context_menu_callback_t* self, int command_id, cef_event_flags_t event_flags) {
14 | self->cont(self, command_id, event_flags);
15 | }
16 |
17 | // cancel
18 | static void cfx_run_context_menu_callback_cancel(cef_run_context_menu_callback_t* self) {
19 | self->cancel(self);
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_scheme_registrar.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_scheme_registrar
11 |
12 | // add_custom_scheme
13 | static int cfx_scheme_registrar_add_custom_scheme(cef_scheme_registrar_t* self, char16 *scheme_name_str, int scheme_name_length, int is_standard, int is_local, int is_display_isolated, int is_secure, int is_cors_enabled, int is_csp_bypassing) {
14 | cef_string_t scheme_name = { scheme_name_str, scheme_name_length, 0 };
15 | return self->add_custom_scheme(self, &scheme_name, is_standard, is_local, is_display_isolated, is_secure, is_cors_enabled, is_csp_bypassing);
16 | }
17 |
18 |
19 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_select_client_certificate_callback.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_select_client_certificate_callback
11 |
12 | // select
13 | static void cfx_select_client_certificate_callback_select(cef_select_client_certificate_callback_t* self, cef_x509certificate_t* cert) {
14 | if(cert) ((cef_base_ref_counted_t*)cert)->add_ref((cef_base_ref_counted_t*)cert);
15 | self->select(self, cert);
16 | }
17 |
18 |
19 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_size.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_size
11 |
12 | static cef_size_t* cfx_size_ctor() {
13 | return (cef_size_t*)calloc(1, sizeof(cef_size_t));
14 | }
15 |
16 | static void cfx_size_dtor(cef_size_t* self) {
17 | free(self);
18 | }
19 |
20 | // cef_size_t->width
21 | static void cfx_size_set_width(cef_size_t *self, int width) {
22 | self->width = width;
23 | }
24 | static void cfx_size_get_width(cef_size_t *self, int* width) {
25 | *width = self->width;
26 | }
27 |
28 | // cef_size_t->height
29 | static void cfx_size_set_height(cef_size_t *self, int height) {
30 | self->height = height;
31 | }
32 | static void cfx_size_get_height(cef_size_t *self, int* height) {
33 | *height = self->height;
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_sslinfo.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_sslinfo
11 |
12 | // get_cert_status
13 | static cef_cert_status_t cfx_sslinfo_get_cert_status(cef_sslinfo_t* self) {
14 | return self->get_cert_status(self);
15 | }
16 |
17 | // get_x509certificate
18 | static cef_x509certificate_t* cfx_sslinfo_get_x509certificate(cef_sslinfo_t* self) {
19 | return self->get_x509certificate(self);
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_sslstatus.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_sslstatus
11 |
12 | // is_secure_connection
13 | static int cfx_sslstatus_is_secure_connection(cef_sslstatus_t* self) {
14 | return self->is_secure_connection(self);
15 | }
16 |
17 | // get_cert_status
18 | static cef_cert_status_t cfx_sslstatus_get_cert_status(cef_sslstatus_t* self) {
19 | return self->get_cert_status(self);
20 | }
21 |
22 | // get_sslversion
23 | static cef_ssl_version_t cfx_sslstatus_get_sslversion(cef_sslstatus_t* self) {
24 | return self->get_sslversion(self);
25 | }
26 |
27 | // get_content_status
28 | static cef_ssl_content_status_t cfx_sslstatus_get_content_status(cef_sslstatus_t* self) {
29 | return self->get_content_status(self);
30 | }
31 |
32 | // get_x509certificate
33 | static cef_x509certificate_t* cfx_sslstatus_get_x509certificate(cef_sslstatus_t* self) {
34 | return self->get_x509certificate(self);
35 | }
36 |
37 |
38 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_stream_reader.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_stream_reader
11 |
12 | // CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file(const cef_string_t* fileName);
13 | static cef_stream_reader_t* cfx_stream_reader_create_for_file(char16 *fileName_str, int fileName_length) {
14 | cef_string_t fileName = { fileName_str, fileName_length, 0 };
15 | return cef_stream_reader_create_for_file(&fileName);
16 | }
17 | // CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data, size_t size);
18 | static cef_stream_reader_t* cfx_stream_reader_create_for_data(void* data, size_t size) {
19 | return cef_stream_reader_create_for_data(data, size);
20 | }
21 | // CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(cef_read_handler_t* handler);
22 | static cef_stream_reader_t* cfx_stream_reader_create_for_handler(cef_read_handler_t* handler) {
23 | if(handler) ((cef_base_ref_counted_t*)handler)->add_ref((cef_base_ref_counted_t*)handler);
24 | return cef_stream_reader_create_for_handler(handler);
25 | }
26 | // read
27 | static size_t cfx_stream_reader_read(cef_stream_reader_t* self, void* ptr, size_t size, size_t n) {
28 | return self->read(self, ptr, size, n);
29 | }
30 |
31 | // seek
32 | static int cfx_stream_reader_seek(cef_stream_reader_t* self, int64 offset, int whence) {
33 | return self->seek(self, offset, whence);
34 | }
35 |
36 | // tell
37 | static int64 cfx_stream_reader_tell(cef_stream_reader_t* self) {
38 | return self->tell(self);
39 | }
40 |
41 | // eof
42 | static int cfx_stream_reader_eof(cef_stream_reader_t* self) {
43 | return self->eof(self);
44 | }
45 |
46 | // may_block
47 | static int cfx_stream_reader_may_block(cef_stream_reader_t* self) {
48 | return self->may_block(self);
49 | }
50 |
51 |
52 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_stream_writer.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_stream_writer
11 |
12 | // CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file(const cef_string_t* fileName);
13 | static cef_stream_writer_t* cfx_stream_writer_create_for_file(char16 *fileName_str, int fileName_length) {
14 | cef_string_t fileName = { fileName_str, fileName_length, 0 };
15 | return cef_stream_writer_create_for_file(&fileName);
16 | }
17 | // CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(cef_write_handler_t* handler);
18 | static cef_stream_writer_t* cfx_stream_writer_create_for_handler(cef_write_handler_t* handler) {
19 | if(handler) ((cef_base_ref_counted_t*)handler)->add_ref((cef_base_ref_counted_t*)handler);
20 | return cef_stream_writer_create_for_handler(handler);
21 | }
22 | // write
23 | static size_t cfx_stream_writer_write(cef_stream_writer_t* self, const void* ptr, size_t size, size_t n) {
24 | return self->write(self, ptr, size, n);
25 | }
26 |
27 | // seek
28 | static int cfx_stream_writer_seek(cef_stream_writer_t* self, int64 offset, int whence) {
29 | return self->seek(self, offset, whence);
30 | }
31 |
32 | // tell
33 | static int64 cfx_stream_writer_tell(cef_stream_writer_t* self) {
34 | return self->tell(self);
35 | }
36 |
37 | // flush
38 | static int cfx_stream_writer_flush(cef_stream_writer_t* self) {
39 | return self->flush(self);
40 | }
41 |
42 | // may_block
43 | static int cfx_stream_writer_may_block(cef_stream_writer_t* self) {
44 | return self->may_block(self);
45 | }
46 |
47 |
48 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_task_runner.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_task_runner
11 |
12 | // CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread();
13 | static cef_task_runner_t* cfx_task_runner_get_for_current_thread() {
14 | return cef_task_runner_get_for_current_thread();
15 | }
16 | // CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_thread(cef_thread_id_t threadId);
17 | static cef_task_runner_t* cfx_task_runner_get_for_thread(cef_thread_id_t threadId) {
18 | return cef_task_runner_get_for_thread(threadId);
19 | }
20 | // is_same
21 | static int cfx_task_runner_is_same(cef_task_runner_t* self, cef_task_runner_t* that) {
22 | if(that) ((cef_base_ref_counted_t*)that)->add_ref((cef_base_ref_counted_t*)that);
23 | return self->is_same(self, that);
24 | }
25 |
26 | // belongs_to_current_thread
27 | static int cfx_task_runner_belongs_to_current_thread(cef_task_runner_t* self) {
28 | return self->belongs_to_current_thread(self);
29 | }
30 |
31 | // belongs_to_thread
32 | static int cfx_task_runner_belongs_to_thread(cef_task_runner_t* self, cef_thread_id_t threadId) {
33 | return self->belongs_to_thread(self, threadId);
34 | }
35 |
36 | // post_task
37 | static int cfx_task_runner_post_task(cef_task_runner_t* self, cef_task_t* task) {
38 | if(task) ((cef_base_ref_counted_t*)task)->add_ref((cef_base_ref_counted_t*)task);
39 | return self->post_task(self, task);
40 | }
41 |
42 | // post_delayed_task
43 | static int cfx_task_runner_post_delayed_task(cef_task_runner_t* self, cef_task_t* task, int64 delay_ms) {
44 | if(task) ((cef_base_ref_counted_t*)task)->add_ref((cef_base_ref_counted_t*)task);
45 | return self->post_delayed_task(self, task, delay_ms);
46 | }
47 |
48 |
49 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_thread.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_thread
11 |
12 | // CEF_EXPORT cef_thread_t* cef_thread_create(const cef_string_t* display_name, cef_thread_priority_t priority, cef_message_loop_type_t message_loop_type, int stoppable, cef_com_init_mode_t com_init_mode);
13 | static cef_thread_t* cfx_thread_create(char16 *display_name_str, int display_name_length, cef_thread_priority_t priority, cef_message_loop_type_t message_loop_type, int stoppable, cef_com_init_mode_t com_init_mode) {
14 | cef_string_t display_name = { display_name_str, display_name_length, 0 };
15 | return cef_thread_create(&display_name, priority, message_loop_type, stoppable, com_init_mode);
16 | }
17 | // get_task_runner
18 | static cef_task_runner_t* cfx_thread_get_task_runner(cef_thread_t* self) {
19 | return self->get_task_runner(self);
20 | }
21 |
22 | // get_platform_thread_id
23 | static cef_platform_thread_id_t cfx_thread_get_platform_thread_id(cef_thread_t* self) {
24 | return self->get_platform_thread_id(self);
25 | }
26 |
27 | // stop
28 | static void cfx_thread_stop(cef_thread_t* self) {
29 | self->stop(self);
30 | }
31 |
32 | // is_running
33 | static int cfx_thread_is_running(cef_thread_t* self) {
34 | return self->is_running(self);
35 | }
36 |
37 |
38 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_urlrequest.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_urlrequest
11 |
12 | // CEF_EXPORT cef_urlrequest_t* cef_urlrequest_create(cef_request_t* request, cef_urlrequest_client_t* client, cef_request_context_t* request_context);
13 | static cef_urlrequest_t* cfx_urlrequest_create(cef_request_t* request, cef_urlrequest_client_t* client, cef_request_context_t* request_context) {
14 | if(request) ((cef_base_ref_counted_t*)request)->add_ref((cef_base_ref_counted_t*)request);
15 | if(client) ((cef_base_ref_counted_t*)client)->add_ref((cef_base_ref_counted_t*)client);
16 | if(request_context) ((cef_base_ref_counted_t*)request_context)->add_ref((cef_base_ref_counted_t*)request_context);
17 | return cef_urlrequest_create(request, client, request_context);
18 | }
19 | // get_request
20 | static cef_request_t* cfx_urlrequest_get_request(cef_urlrequest_t* self) {
21 | return self->get_request(self);
22 | }
23 |
24 | // get_client
25 | static cef_urlrequest_client_t* cfx_urlrequest_get_client(cef_urlrequest_t* self) {
26 | return self->get_client(self);
27 | }
28 |
29 | // get_request_status
30 | static cef_urlrequest_status_t cfx_urlrequest_get_request_status(cef_urlrequest_t* self) {
31 | return self->get_request_status(self);
32 | }
33 |
34 | // get_request_error
35 | static cef_errorcode_t cfx_urlrequest_get_request_error(cef_urlrequest_t* self) {
36 | return self->get_request_error(self);
37 | }
38 |
39 | // get_response
40 | static cef_response_t* cfx_urlrequest_get_response(cef_urlrequest_t* self) {
41 | return self->get_response(self);
42 | }
43 |
44 | // response_was_cached
45 | static int cfx_urlrequest_response_was_cached(cef_urlrequest_t* self) {
46 | return self->response_was_cached(self);
47 | }
48 |
49 | // cancel
50 | static void cfx_urlrequest_cancel(cef_urlrequest_t* self) {
51 | self->cancel(self);
52 | }
53 |
54 |
55 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_v8exception.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_v8exception
11 |
12 | // get_message
13 | static cef_string_userfree_t cfx_v8exception_get_message(cef_v8exception_t* self) {
14 | return self->get_message(self);
15 | }
16 |
17 | // get_source_line
18 | static cef_string_userfree_t cfx_v8exception_get_source_line(cef_v8exception_t* self) {
19 | return self->get_source_line(self);
20 | }
21 |
22 | // get_script_resource_name
23 | static cef_string_userfree_t cfx_v8exception_get_script_resource_name(cef_v8exception_t* self) {
24 | return self->get_script_resource_name(self);
25 | }
26 |
27 | // get_line_number
28 | static int cfx_v8exception_get_line_number(cef_v8exception_t* self) {
29 | return self->get_line_number(self);
30 | }
31 |
32 | // get_start_position
33 | static int cfx_v8exception_get_start_position(cef_v8exception_t* self) {
34 | return self->get_start_position(self);
35 | }
36 |
37 | // get_end_position
38 | static int cfx_v8exception_get_end_position(cef_v8exception_t* self) {
39 | return self->get_end_position(self);
40 | }
41 |
42 | // get_start_column
43 | static int cfx_v8exception_get_start_column(cef_v8exception_t* self) {
44 | return self->get_start_column(self);
45 | }
46 |
47 | // get_end_column
48 | static int cfx_v8exception_get_end_column(cef_v8exception_t* self) {
49 | return self->get_end_column(self);
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_v8stack_frame.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_v8stack_frame
11 |
12 | // is_valid
13 | static int cfx_v8stack_frame_is_valid(cef_v8stack_frame_t* self) {
14 | return self->is_valid(self);
15 | }
16 |
17 | // get_script_name
18 | static cef_string_userfree_t cfx_v8stack_frame_get_script_name(cef_v8stack_frame_t* self) {
19 | return self->get_script_name(self);
20 | }
21 |
22 | // get_script_name_or_source_url
23 | static cef_string_userfree_t cfx_v8stack_frame_get_script_name_or_source_url(cef_v8stack_frame_t* self) {
24 | return self->get_script_name_or_source_url(self);
25 | }
26 |
27 | // get_function_name
28 | static cef_string_userfree_t cfx_v8stack_frame_get_function_name(cef_v8stack_frame_t* self) {
29 | return self->get_function_name(self);
30 | }
31 |
32 | // get_line_number
33 | static int cfx_v8stack_frame_get_line_number(cef_v8stack_frame_t* self) {
34 | return self->get_line_number(self);
35 | }
36 |
37 | // get_column
38 | static int cfx_v8stack_frame_get_column(cef_v8stack_frame_t* self) {
39 | return self->get_column(self);
40 | }
41 |
42 | // is_eval
43 | static int cfx_v8stack_frame_is_eval(cef_v8stack_frame_t* self) {
44 | return self->is_eval(self);
45 | }
46 |
47 | // is_constructor
48 | static int cfx_v8stack_frame_is_constructor(cef_v8stack_frame_t* self) {
49 | return self->is_constructor(self);
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_v8stack_trace.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_v8stack_trace
11 |
12 | // CEF_EXPORT cef_v8stack_trace_t* cef_v8stack_trace_get_current(int frame_limit);
13 | static cef_v8stack_trace_t* cfx_v8stack_trace_get_current(int frame_limit) {
14 | return cef_v8stack_trace_get_current(frame_limit);
15 | }
16 | // is_valid
17 | static int cfx_v8stack_trace_is_valid(cef_v8stack_trace_t* self) {
18 | return self->is_valid(self);
19 | }
20 |
21 | // get_frame_count
22 | static int cfx_v8stack_trace_get_frame_count(cef_v8stack_trace_t* self) {
23 | return self->get_frame_count(self);
24 | }
25 |
26 | // get_frame
27 | static cef_v8stack_frame_t* cfx_v8stack_trace_get_frame(cef_v8stack_trace_t* self, int index) {
28 | return self->get_frame(self, index);
29 | }
30 |
31 |
32 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_waitable_event.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_waitable_event
11 |
12 | // CEF_EXPORT cef_waitable_event_t* cef_waitable_event_create(int automatic_reset, int initially_signaled);
13 | static cef_waitable_event_t* cfx_waitable_event_create(int automatic_reset, int initially_signaled) {
14 | return cef_waitable_event_create(automatic_reset, initially_signaled);
15 | }
16 | // reset
17 | static void cfx_waitable_event_reset(cef_waitable_event_t* self) {
18 | self->reset(self);
19 | }
20 |
21 | // signal
22 | static void cfx_waitable_event_signal(cef_waitable_event_t* self) {
23 | self->signal(self);
24 | }
25 |
26 | // is_signaled
27 | static int cfx_waitable_event_is_signaled(cef_waitable_event_t* self) {
28 | return self->is_signaled(self);
29 | }
30 |
31 | // wait
32 | static void cfx_waitable_event_wait(cef_waitable_event_t* self) {
33 | self->wait(self);
34 | }
35 |
36 | // timed_wait
37 | static int cfx_waitable_event_timed_wait(cef_waitable_event_t* self, int64 max_ms) {
38 | return self->timed_wait(self, max_ms);
39 | }
40 |
41 |
42 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_web_plugin_info.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_web_plugin_info
11 |
12 | // get_name
13 | static cef_string_userfree_t cfx_web_plugin_info_get_name(cef_web_plugin_info_t* self) {
14 | return self->get_name(self);
15 | }
16 |
17 | // get_path
18 | static cef_string_userfree_t cfx_web_plugin_info_get_path(cef_web_plugin_info_t* self) {
19 | return self->get_path(self);
20 | }
21 |
22 | // get_version
23 | static cef_string_userfree_t cfx_web_plugin_info_get_version(cef_web_plugin_info_t* self) {
24 | return self->get_version(self);
25 | }
26 |
27 | // get_description
28 | static cef_string_userfree_t cfx_web_plugin_info_get_description(cef_web_plugin_info_t* self) {
29 | return self->get_description(self);
30 | }
31 |
32 |
33 |
--------------------------------------------------------------------------------
/libcfx/Generated/cfx_x509cert_principal.c:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014-2017 Wolfgang Borgsmüller
2 | // All rights reserved.
3 | //
4 | // This software may be modified and distributed under the terms
5 | // of the BSD license. See the License.txt file for details.
6 |
7 | // Generated file. Do not edit.
8 |
9 |
10 | // cef_x509cert_principal
11 |
12 | // get_display_name
13 | static cef_string_userfree_t cfx_x509cert_principal_get_display_name(cef_x509cert_principal_t* self) {
14 | return self->get_display_name(self);
15 | }
16 |
17 | // get_common_name
18 | static cef_string_userfree_t cfx_x509cert_principal_get_common_name(cef_x509cert_principal_t* self) {
19 | return self->get_common_name(self);
20 | }
21 |
22 | // get_locality_name
23 | static cef_string_userfree_t cfx_x509cert_principal_get_locality_name(cef_x509cert_principal_t* self) {
24 | return self->get_locality_name(self);
25 | }
26 |
27 | // get_state_or_province_name
28 | static cef_string_userfree_t cfx_x509cert_principal_get_state_or_province_name(cef_x509cert_principal_t* self) {
29 | return self->get_state_or_province_name(self);
30 | }
31 |
32 | // get_country_name
33 | static cef_string_userfree_t cfx_x509cert_principal_get_country_name(cef_x509cert_principal_t* self) {
34 | return self->get_country_name(self);
35 | }
36 |
37 | // get_street_addresses
38 | static void cfx_x509cert_principal_get_street_addresses(cef_x509cert_principal_t* self, cef_string_list_t addresses) {
39 | self->get_street_addresses(self, addresses);
40 | }
41 |
42 | // get_organization_names
43 | static void cfx_x509cert_principal_get_organization_names(cef_x509cert_principal_t* self, cef_string_list_t names) {
44 | self->get_organization_names(self, names);
45 | }
46 |
47 | // get_organization_unit_names
48 | static void cfx_x509cert_principal_get_organization_unit_names(cef_x509cert_principal_t* self, cef_string_list_t names) {
49 | self->get_organization_unit_names(self, names);
50 | }
51 |
52 | // get_domain_components
53 | static void cfx_x509cert_principal_get_domain_components(cef_x509cert_principal_t* self, cef_string_list_t components) {
54 | self->get_domain_components(self, components);
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/linux/CfxGenerator.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CfxGenerator", "..\CfxGenerator\CfxGenerator.csproj", "{BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {BEC79EF6-997A-4F56-9CEF-F01AC28BDEF1}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(MonoDevelopProperties) = preSolution
18 | StartupItem = ..\CfxGenerator\CfxGenerator.csproj
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/linux/libcfx64.cproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.0
7 | 2.0
8 | {995EB518-A3F7-47AE-A3DA-C1E86EBBFD23}
9 |
10 |
11 |
12 | C
13 | Bin
14 |
15 |
16 | true
17 | ..\Build\Debug
18 | libcfx64
19 | SharedLibrary
20 | DEBUG MONODEVELOP CFX_LINUX
21 | .
22 |
23 |
24 | ${ProjectDir}/../libcfx/Generated
25 | ${ProjectDir}/../cef
26 |
27 |
28 | -std=c99
29 | -g
30 | -ggdb
31 |
32 | -ldl
33 | -g
34 | -ggdb
35 |
36 |
37 |
38 | ..\Build\Release
39 | libcfx64
40 | SharedLibrary
41 |
42 |
43 | ${ProjectDir}/../cef
44 | ${ProjectDir}/../libcfx/Generated
45 |
46 |
47 | 3
48 | -std=c99
49 | -g
50 | -ggdb
51 | MONODEVELOP CFX_LINUX
52 | .
53 | -ldl
54 | -g
55 | -ggdb
56 |
57 |
58 |
59 | libcfx64.c
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/linux/windowless:
--------------------------------------------------------------------------------
1 | LD_LIBRARY_PATH=../../cef/Release64 LD_PRELOAD=libcef.so exec mono Windowless.exe "$@"
2 |
--------------------------------------------------------------------------------