From ed48e3ba2758bfe6af32d860a02e3e944da582d1 Mon Sep 17 00:00:00 2001 From: Richard Wilkes Date: Sat, 11 Jan 2020 10:25:11 -0800 Subject: [PATCH] Add GoLand prefs; address various linter issues --- .gitignore | 1 - .golangci.yml | 18 ++ .idea/.gitignore | 2 + .idea/cef.iml | 8 + .idea/codeStyles/Project.xml | 24 ++ .idea/codeStyles/codeStyleConfig.xml | 5 + .idea/copyright/Richard_Wilkes.xml | 7 + .idea/copyright/profiles_settings.xml | 7 + .idea/dictionaries/rich.xml | 3 + .idea/encodings.xml | 6 + .idea/go.imports.xml | 11 + .idea/inspectionProfiles/Project_Default.xml | 36 +++ .idea/misc.xml | 6 + .idea/modules.xml | 8 + .idea/vcs.xml | 13 + cef/App_gen.go | 12 +- cef/AudioHandler_gen.go | 30 +-- cef/BeforeDownloadCallback_gen.go | 12 +- cef/BinaryValue_gen.go | 6 +- cef/BrowserHost_gen.go | 106 ++++---- cef/BrowserProcessHandler_gen.go | 30 +-- cef/BrowserSettings_gen.go | 8 +- cef/BrowserViewDelegate_gen.go | 40 +-- cef/BrowserView_gen.go | 6 +- cef/Button_gen.go | 12 +- cef/Client_gen.go | 10 +- cef/CommandLine_gen.go | 12 +- cef/ContextMenuHandler_gen.go | 10 +- cef/ContextMenuParams_gen.go | 20 +- cef/CookieManager_gen.go | 50 ++-- cef/DeleteCookiesCallback_gen.go | 10 +- cef/DialogHandler_gen.go | 12 +- cef/DictionaryValue_gen.go | 6 +- cef/DisplayHandler_gen.go | 34 +-- cef/Display_gen.go | 4 +- cef/Domdocument_gen.go | 22 +- cef/DownloadHandler_gen.go | 22 +- cef/DownloadImageCallback_gen.go | 12 +- cef/DownloadItem_gen.go | 12 +- cef/DragData_gen.go | 66 ++--- cef/ExtensionHandler_gen.go | 44 ++-- cef/FileDialogCallback_gen.go | 10 +- cef/Frame_gen.go | 58 ++--- cef/Image_gen.go | 54 ++-- cef/JsdialogCallback_gen.go | 12 +- cef/JsdialogHandler_gen.go | 28 +-- cef/KeyboardHandler_gen.go | 20 +- cef/LabelButton_gen.go | 30 +-- cef/LifeSpanHandler_gen.go | 18 +- cef/LoadHandler_gen.go | 32 +-- cef/MenuButtonDelegate_gen.go | 14 +- cef/MenuButton_gen.go | 6 +- cef/MenuModelDelegate_gen.go | 72 +++--- cef/MenuModel_gen.go | 244 +++++++++---------- cef/NavigationEntry_gen.go | 16 +- cef/PDFPrintCallback_gen.go | 10 +- cef/PDFPrintSettings_gen.go | 8 +- cef/PrintHandler_gen.go | 46 ++-- cef/PrintSettings_gen.go | 12 +- cef/ReadHandler_gen.go | 10 +- cef/RegisterCdmCallback_gen.go | 12 +- cef/RenderHandler_gen.go | 82 +++---- cef/RenderProcessHandler_gen.go | 30 +-- cef/RequestContextHandler_gen.go | 40 +-- cef/RequestContext_gen.go | 88 +++---- cef/RequestHandler_gen.go | 82 +++---- cef/Request_gen.go | 58 ++--- cef/ResolveCallback_gen.go | 10 +- cef/ResourceBundleHandler_gen.go | 30 +-- cef/ResourceBundle_gen.go | 18 +- cef/ResourceHandler_gen.go | 52 ++-- cef/ResourceReadCallback_gen.go | 10 +- cef/ResourceRequestHandler_gen.go | 32 +-- cef/ResourceSkipCallback_gen.go | 10 +- cef/ResponseFilter_gen.go | 10 +- cef/Response_gen.go | 18 +- cef/RunContextMenuCallback_gen.go | 10 +- cef/RunFileDialogCallback_gen.go | 10 +- cef/SchemeHandlerFactory_gen.go | 12 +- cef/SchemeRegistrar_gen.go | 12 +- cef/ServerHandler_gen.go | 66 ++--- cef/Server_gen.go | 74 +++--- cef/Settings_gen.go | 8 +- cef/StreamReader_gen.go | 4 +- cef/TaskRunner_gen.go | 12 +- cef/Textfield_gen.go | 36 +-- cef/TouchEvent_gen.go | 8 +- cef/UrlrequestClient_gen.go | 10 +- cef/V8context_gen.go | 12 +- cef/V8stackFrame_gen.go | 4 +- cef/V8value_gen.go | 12 +- cef/View_gen.go | 38 +-- cef/WaitableEvent_gen.go | 6 +- cef/WindowDelegate_gen.go | 20 +- cef/Window_gen.go | 42 ++-- cef/enums_gen.go | 28 +-- cef/functions_gen.go | 186 +++++++------- go.mod | 2 +- go.sum | 19 +- internal/cefgen/enumdef.go | 33 +-- internal/cefgen/enumvalue.go | 2 +- internal/cefgen/funcdef.go | 4 +- internal/cefgen/name.go | 72 ++++++ internal/cefgen/structdef.go | 2 +- internal/cefgen/variable.go | 30 +-- internal/cmd/dist.go | 6 +- internal/cmd/install.go | 3 +- 107 files changed, 1504 insertions(+), 1324 deletions(-) delete mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/cef.iml create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/copyright/Richard_Wilkes.xml create mode 100644 .idea/copyright/profiles_settings.xml create mode 100644 .idea/dictionaries/rich.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/go.imports.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 internal/cefgen/name.go diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e8c35b1..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.dirtlock diff --git a/.golangci.yml b/.golangci.yml index 333b281..4e30004 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -28,12 +28,26 @@ linters-settings: - experimental disabled-checks: - sloppyReassign + - whyNoLint gofmt: simplify: true golint: min-confidence: 0.8 govet: check-shadowing: true + settings: + printf: + funcs: + - Errorf + - Warnf + - Infof + - Debugf + - Fatalf + - StartRootSpanf + - StartSubSpanf + - EndWithMsgf + - Newf + - NewWithCausef maligned: suggest-new: true misspell: @@ -108,3 +122,7 @@ issues: linters: - staticcheck text: "SA4000: identical expressions on the left and right side of the '==' operator" + - path: _gen\.go + linters: + - golint + text: "don't use underscores in Go names" diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..5c98b42 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml \ No newline at end of file diff --git a/.idea/cef.iml b/.idea/cef.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/cef.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..746fec1 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,24 @@ + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/Richard_Wilkes.xml b/.idea/copyright/Richard_Wilkes.xml new file mode 100644 index 0000000..ed3984e --- /dev/null +++ b/.idea/copyright/Richard_Wilkes.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..aa1d853 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/dictionaries/rich.xml b/.idea/dictionaries/rich.xml new file mode 100644 index 0000000..ca72c7e --- /dev/null +++ b/.idea/dictionaries/rich.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..c2bae49 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/go.imports.xml b/.idea/go.imports.xml new file mode 100644 index 0000000..cd7bd35 --- /dev/null +++ b/.idea/go.imports.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..4a80996 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..ac9eb49 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..029a1a8 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/cef/App_gen.go b/cef/App_gen.go index d9e17f3..e453149 100644 --- a/cef/App_gen.go +++ b/cef/App_gen.go @@ -16,7 +16,7 @@ import ( // AppProxy defines methods required for using App. type AppProxy interface { - OnBeforeCommandLineProcessing(self *App, process_type string, command_line *CommandLine) + OnBeforeCommandLineProcessing(self *App, processType string, commandLine *CommandLine) OnRegisterCustomSchemes(self *App, registrar *SchemeRegistrar) GetResourceBundleHandler(self *App) *ResourceBundleHandler GetBrowserProcessHandler(self *App) *BrowserProcessHandler @@ -70,17 +70,17 @@ func (d *App) Base() *BaseRefCounted { // before this function is called. Be cautious when using this function to // modify command-line arguments for non-browser processes as this may result // in undefined behavior including crashes. -func (d *App) OnBeforeCommandLineProcessing(process_type string, command_line *CommandLine) { - lookupAppProxy(d.Base()).OnBeforeCommandLineProcessing(d, process_type, command_line) +func (d *App) OnBeforeCommandLineProcessing(processType string, commandLine *CommandLine) { + lookupAppProxy(d.Base()).OnBeforeCommandLineProcessing(d, processType, commandLine) } //nolint:gocritic //export gocef_app_on_before_command_line_processing -func gocef_app_on_before_command_line_processing(self *C.cef_app_t, process_type *C.cef_string_t, command_line *C.cef_command_line_t) { +func gocef_app_on_before_command_line_processing(self *C.cef_app_t, processType *C.cef_string_t, commandLine *C.cef_command_line_t) { me__ := (*App)(self) proxy__ := lookupAppProxy(me__.Base()) - process_type_ := cefstrToString(process_type) - proxy__.OnBeforeCommandLineProcessing(me__, process_type_, (*CommandLine)(command_line)) + processType_ := cefstrToString(processType) + proxy__.OnBeforeCommandLineProcessing(me__, processType_, (*CommandLine)(commandLine)) } // OnRegisterCustomSchemes (on_register_custom_schemes) diff --git a/cef/AudioHandler_gen.go b/cef/AudioHandler_gen.go index c1e2b1b..9d8fcdb 100644 --- a/cef/AudioHandler_gen.go +++ b/cef/AudioHandler_gen.go @@ -16,9 +16,9 @@ import ( // AudioHandlerProxy defines methods required for using AudioHandler. type AudioHandlerProxy interface { - OnAudioStreamStarted(self *AudioHandler, browser *Browser, audio_stream_id, channels int32, channel_layout ChannelLayout, sample_rate, frames_per_buffer int32) - OnAudioStreamPacket(self *AudioHandler, browser *Browser, audio_stream_id int32, data **float32, frames int32, pts int64) - OnAudioStreamStopped(self *AudioHandler, browser *Browser, audio_stream_id int32) + OnAudioStreamStarted(self *AudioHandler, browser *Browser, audioStreamID, channels int32, channelLayout ChannelLayout, sampleRate, framesPerBuffer int32) + OnAudioStreamPacket(self *AudioHandler, browser *Browser, audioStreamID int32, data **float32, frames int32, pts int64) + OnAudioStreamStopped(self *AudioHandler, browser *Browser, audioStreamID int32) } // AudioHandler (cef_audio_handler_t from include/capi/cef_audio_handler_capi.h) @@ -67,16 +67,16 @@ func (d *AudioHandler) Base() *BaseRefCounted { // the layout of the channels and |sample_rate| is the stream sample rate. // |frames_per_buffer| is the maximum number of frames that will occur in the // PCM packet passed to OnAudioStreamPacket. -func (d *AudioHandler) OnAudioStreamStarted(browser *Browser, audio_stream_id, channels int32, channel_layout ChannelLayout, sample_rate, frames_per_buffer int32) { - lookupAudioHandlerProxy(d.Base()).OnAudioStreamStarted(d, browser, audio_stream_id, channels, channel_layout, sample_rate, frames_per_buffer) +func (d *AudioHandler) OnAudioStreamStarted(browser *Browser, audioStreamID, channels int32, channelLayout ChannelLayout, sampleRate, framesPerBuffer int32) { + lookupAudioHandlerProxy(d.Base()).OnAudioStreamStarted(d, browser, audioStreamID, channels, channelLayout, sampleRate, framesPerBuffer) } //nolint:gocritic //export gocef_audio_handler_on_audio_stream_started -func gocef_audio_handler_on_audio_stream_started(self *C.cef_audio_handler_t, browser *C.cef_browser_t, audio_stream_id C.int, channels C.int, channel_layout C.cef_channel_layout_t, sample_rate C.int, frames_per_buffer C.int) { +func gocef_audio_handler_on_audio_stream_started(self *C.cef_audio_handler_t, browser *C.cef_browser_t, audioStreamID C.int, channels C.int, channelLayout C.cef_channel_layout_t, sampleRate C.int, framesPerBuffer C.int) { me__ := (*AudioHandler)(self) proxy__ := lookupAudioHandlerProxy(me__.Base()) - proxy__.OnAudioStreamStarted(me__, (*Browser)(browser), int32(audio_stream_id), int32(channels), ChannelLayout(channel_layout), int32(sample_rate), int32(frames_per_buffer)) + proxy__.OnAudioStreamStarted(me__, (*Browser)(browser), int32(audioStreamID), int32(channels), ChannelLayout(channelLayout), int32(sampleRate), int32(framesPerBuffer)) } // OnAudioStreamPacket (on_audio_stream_packet) @@ -88,30 +88,30 @@ func gocef_audio_handler_on_audio_stream_started(self *C.cef_audio_handler_t, br // packet should be presented to the user. Based on |frames| and the // |channel_layout| value passed to OnAudioStreamStarted you can calculate the // size of the |data| array in bytes. -func (d *AudioHandler) OnAudioStreamPacket(browser *Browser, audio_stream_id int32, data **float32, frames int32, pts int64) { - lookupAudioHandlerProxy(d.Base()).OnAudioStreamPacket(d, browser, audio_stream_id, data, frames, pts) +func (d *AudioHandler) OnAudioStreamPacket(browser *Browser, audioStreamID int32, data **float32, frames int32, pts int64) { + lookupAudioHandlerProxy(d.Base()).OnAudioStreamPacket(d, browser, audioStreamID, data, frames, pts) } //nolint:gocritic //export gocef_audio_handler_on_audio_stream_packet -func gocef_audio_handler_on_audio_stream_packet(self *C.cef_audio_handler_t, browser *C.cef_browser_t, audio_stream_id C.int, data **C.float, frames C.int, pts C.int64) { +func gocef_audio_handler_on_audio_stream_packet(self *C.cef_audio_handler_t, browser *C.cef_browser_t, audioStreamID C.int, data **C.float, frames C.int, pts C.int64) { me__ := (*AudioHandler)(self) proxy__ := lookupAudioHandlerProxy(me__.Base()) - proxy__.OnAudioStreamPacket(me__, (*Browser)(browser), int32(audio_stream_id), (**float32)(unsafe.Pointer(data)), int32(frames), int64(pts)) + proxy__.OnAudioStreamPacket(me__, (*Browser)(browser), int32(audioStreamID), (**float32)(unsafe.Pointer(data)), int32(frames), int64(pts)) } // OnAudioStreamStopped (on_audio_stream_stopped) // Called when the stream identified by |audio_stream_id| has stopped. // OnAudioSteamStopped will always be called after OnAudioStreamStarted; both // functions may be called multiple times for the same stream. -func (d *AudioHandler) OnAudioStreamStopped(browser *Browser, audio_stream_id int32) { - lookupAudioHandlerProxy(d.Base()).OnAudioStreamStopped(d, browser, audio_stream_id) +func (d *AudioHandler) OnAudioStreamStopped(browser *Browser, audioStreamID int32) { + lookupAudioHandlerProxy(d.Base()).OnAudioStreamStopped(d, browser, audioStreamID) } //nolint:gocritic //export gocef_audio_handler_on_audio_stream_stopped -func gocef_audio_handler_on_audio_stream_stopped(self *C.cef_audio_handler_t, browser *C.cef_browser_t, audio_stream_id C.int) { +func gocef_audio_handler_on_audio_stream_stopped(self *C.cef_audio_handler_t, browser *C.cef_browser_t, audioStreamID C.int) { me__ := (*AudioHandler)(self) proxy__ := lookupAudioHandlerProxy(me__.Base()) - proxy__.OnAudioStreamStopped(me__, (*Browser)(browser), int32(audio_stream_id)) + proxy__.OnAudioStreamStopped(me__, (*Browser)(browser), int32(audioStreamID)) } diff --git a/cef/BeforeDownloadCallback_gen.go b/cef/BeforeDownloadCallback_gen.go index b6f4d6c..7c19f0f 100644 --- a/cef/BeforeDownloadCallback_gen.go +++ b/cef/BeforeDownloadCallback_gen.go @@ -16,7 +16,7 @@ import ( // BeforeDownloadCallbackProxy defines methods required for using BeforeDownloadCallback. type BeforeDownloadCallbackProxy interface { - Cont(self *BeforeDownloadCallback, download_path string, show_dialog int32) + Cont(self *BeforeDownloadCallback, downloadPath string, showDialog int32) } // BeforeDownloadCallback (cef_before_download_callback_t from include/capi/cef_download_handler_capi.h) @@ -60,15 +60,15 @@ func (d *BeforeDownloadCallback) Base() *BaseRefCounted { // for the download including the file name or leave blank to use the // suggested name and the default temp directory. Set |show_dialog| to true // (1) if you do wish to show the default "Save As" dialog. -func (d *BeforeDownloadCallback) Cont(download_path string, show_dialog int32) { - lookupBeforeDownloadCallbackProxy(d.Base()).Cont(d, download_path, show_dialog) +func (d *BeforeDownloadCallback) Cont(downloadPath string, showDialog int32) { + lookupBeforeDownloadCallbackProxy(d.Base()).Cont(d, downloadPath, showDialog) } //nolint:gocritic //export gocef_before_download_callback_cont -func gocef_before_download_callback_cont(self *C.cef_before_download_callback_t, download_path *C.cef_string_t, show_dialog C.int) { +func gocef_before_download_callback_cont(self *C.cef_before_download_callback_t, downloadPath *C.cef_string_t, showDialog C.int) { me__ := (*BeforeDownloadCallback)(self) proxy__ := lookupBeforeDownloadCallbackProxy(me__.Base()) - download_path_ := cefstrToString(download_path) - proxy__.Cont(me__, download_path_, int32(show_dialog)) + downloadPath_ := cefstrToString(downloadPath) + proxy__.Cont(me__, downloadPath_, int32(showDialog)) } diff --git a/cef/BinaryValue_gen.go b/cef/BinaryValue_gen.go index 7788bba..7612935 100644 --- a/cef/BinaryValue_gen.go +++ b/cef/BinaryValue_gen.go @@ -12,7 +12,7 @@ import ( // int gocef_binary_value_is_equal(cef_binary_value_t * self, cef_binary_value_t * that, int (CEF_CALLBACK *callback__)(cef_binary_value_t *, cef_binary_value_t *)) { return callback__(self, that); } // cef_binary_value_t * gocef_binary_value_copy(cef_binary_value_t * self, cef_binary_value_t * (CEF_CALLBACK *callback__)(cef_binary_value_t *)) { return callback__(self); } // size_t gocef_binary_value_get_size(cef_binary_value_t * self, size_t (CEF_CALLBACK *callback__)(cef_binary_value_t *)) { return callback__(self); } - // size_t gocef_binary_value_get_data(cef_binary_value_t * self, void * buffer, size_t buffer_size, size_t data_offset, size_t (CEF_CALLBACK *callback__)(cef_binary_value_t *, void *, size_t, size_t)) { return callback__(self, buffer, buffer_size, data_offset); } + // size_t gocef_binary_value_get_data(cef_binary_value_t * self, void * buffer, size_t bufferSize, size_t dataOffset, size_t (CEF_CALLBACK *callback__)(cef_binary_value_t *, void *, size_t, size_t)) { return callback__(self, buffer, bufferSize, dataOffset); } "C" ) @@ -74,6 +74,6 @@ func (d *BinaryValue) GetSize() uint64 { // GetData (get_data) // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at // the specified byte |data_offset|. Returns the number of bytes read. -func (d *BinaryValue) GetData(buffer unsafe.Pointer, buffer_size, data_offset uint64) uint64 { - return uint64(C.gocef_binary_value_get_data(d.toNative(), buffer, C.size_t(buffer_size), C.size_t(data_offset), d.get_data)) +func (d *BinaryValue) GetData(buffer unsafe.Pointer, bufferSize, dataOffset uint64) uint64 { + return uint64(C.gocef_binary_value_get_data(d.toNative(), buffer, C.size_t(bufferSize), C.size_t(dataOffset), d.get_data)) } diff --git a/cef/BrowserHost_gen.go b/cef/BrowserHost_gen.go index 808c993..ea03340 100644 --- a/cef/BrowserHost_gen.go +++ b/cef/BrowserHost_gen.go @@ -7,7 +7,7 @@ import "unsafe" import ( // #include "capi_gen.h" // cef_browser_t * gocef_browser_host_get_browser(cef_browser_host_t * self, cef_browser_t * (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } - // void gocef_browser_host_close_browser(cef_browser_host_t * self, int force_close, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, force_close); } + // void gocef_browser_host_close_browser(cef_browser_host_t * self, int forceClose, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, forceClose); } // int gocef_browser_host_try_close_browser(cef_browser_host_t * self, int (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // void gocef_browser_host_set_focus(cef_browser_host_t * self, int focus, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, focus); } // void * gocef_browser_host_get_window_handle(cef_browser_host_t * self, void * (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } @@ -17,17 +17,17 @@ import ( // cef_request_context_t * gocef_browser_host_get_request_context(cef_browser_host_t * self, cef_request_context_t * (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // double gocef_browser_host_get_zoom_level(cef_browser_host_t * self, double (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // void gocef_browser_host_set_zoom_level(cef_browser_host_t * self, double zoomLevel, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, double)) { return callback__(self, zoomLevel); } - // void gocef_browser_host_run_file_dialog(cef_browser_host_t * self, cef_file_dialog_mode_t mode, cef_string_t * title, cef_string_t * default_file_path, cef_string_list_t accept_filters, int selected_accept_filter, cef_run_file_dialog_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_file_dialog_mode_t, cef_string_t *, cef_string_t *, cef_string_list_t, int, cef_run_file_dialog_callback_t *)) { return callback__(self, mode, title, default_file_path, accept_filters, selected_accept_filter, callback); } - // void gocef_browser_host_start_download(cef_browser_host_t * self, cef_string_t * url, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *)) { return callback__(self, url); } - // void gocef_browser_host_download_image(cef_browser_host_t * self, cef_string_t * image_url, int is_favicon, uint32 max_image_size, int bypass_cache, cef_download_image_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *, int, uint32, int, cef_download_image_callback_t *)) { return callback__(self, image_url, is_favicon, max_image_size, bypass_cache, callback); } + // void gocef_browser_host_run_file_dialog(cef_browser_host_t * self, cef_file_dialog_mode_t mode, cef_string_t * title, cef_string_t * defaultFilePath, cef_string_list_t acceptFilters, int selectedAcceptFilter, cef_run_file_dialog_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_file_dialog_mode_t, cef_string_t *, cef_string_t *, cef_string_list_t, int, cef_run_file_dialog_callback_t *)) { return callback__(self, mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback); } + // void gocef_browser_host_start_download(cef_browser_host_t * self, cef_string_t * uRL, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *)) { return callback__(self, uRL); } + // void gocef_browser_host_download_image(cef_browser_host_t * self, cef_string_t * imageURL, int isFavicon, uint32 maxImageSize, int bypassCache, cef_download_image_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *, int, uint32, int, cef_download_image_callback_t *)) { return callback__(self, imageURL, isFavicon, maxImageSize, bypassCache, callback); } // void gocef_browser_host_print(cef_browser_host_t * self, void (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // void gocef_browser_host_print_to_pdf(cef_browser_host_t * self, cef_string_t * path, cef_pdf_print_settings_t * settings, cef_pdf_print_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *, cef_pdf_print_settings_t *, cef_pdf_print_callback_t *)) { return callback__(self, path, settings, callback); } // void gocef_browser_host_find(cef_browser_host_t * self, int identifier, cef_string_t * searchText, int forward, int matchCase, int findNext, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int, cef_string_t *, int, int, int)) { return callback__(self, identifier, searchText, forward, matchCase, findNext); } // void gocef_browser_host_stop_finding(cef_browser_host_t * self, int clearSelection, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, clearSelection); } - // void gocef_browser_host_show_dev_tools(cef_browser_host_t * self, cef_window_info_t * windowInfo, cef_client_t * client, cef_browser_settings_t * settings, cef_point_t * inspect_element_at, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_window_info_t *, cef_client_t *, cef_browser_settings_t *, cef_point_t *)) { return callback__(self, windowInfo, client, settings, inspect_element_at); } + // void gocef_browser_host_show_dev_tools(cef_browser_host_t * self, cef_window_info_t * windowInfo, cef_client_t * client, cef_browser_settings_t * settings, cef_point_t * inspectElementAt, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_window_info_t *, cef_client_t *, cef_browser_settings_t *, cef_point_t *)) { return callback__(self, windowInfo, client, settings, inspectElementAt); } // void gocef_browser_host_close_dev_tools(cef_browser_host_t * self, void (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // int gocef_browser_host_has_dev_tools(cef_browser_host_t * self, int (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } - // void gocef_browser_host_get_navigation_entries(cef_browser_host_t * self, cef_navigation_entry_visitor_t * visitor, int current_only, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_navigation_entry_visitor_t *, int)) { return callback__(self, visitor, current_only); } + // void gocef_browser_host_get_navigation_entries(cef_browser_host_t * self, cef_navigation_entry_visitor_t * visitor, int currentOnly, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_navigation_entry_visitor_t *, int)) { return callback__(self, visitor, currentOnly); } // void gocef_browser_host_set_mouse_cursor_change_disabled(cef_browser_host_t * self, int disabled, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, disabled); } // int gocef_browser_host_is_mouse_cursor_change_disabled(cef_browser_host_t * self, int (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // void gocef_browser_host_replace_misspelling(cef_browser_host_t * self, cef_string_t * word, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *)) { return callback__(self, word); } @@ -47,20 +47,20 @@ import ( // void gocef_browser_host_send_capture_lost_event(cef_browser_host_t * self, void (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // void gocef_browser_host_notify_move_or_resize_started(cef_browser_host_t * self, void (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // int gocef_browser_host_get_windowless_frame_rate(cef_browser_host_t * self, int (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } - // void gocef_browser_host_set_windowless_frame_rate(cef_browser_host_t * self, int frame_rate, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, frame_rate); } - // void gocef_browser_host_ime_set_composition(cef_browser_host_t * self, cef_string_t * text, size_t underlinesCount, cef_composition_underline_t * underlines, cef_range_t * replacement_range, cef_range_t * selection_range, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *, size_t, cef_composition_underline_t *, cef_range_t *, cef_range_t *)) { return callback__(self, text, underlinesCount, underlines, replacement_range, selection_range); } - // void gocef_browser_host_ime_commit_text(cef_browser_host_t * self, cef_string_t * text, cef_range_t * replacement_range, int relative_cursor_pos, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *, cef_range_t *, int)) { return callback__(self, text, replacement_range, relative_cursor_pos); } - // void gocef_browser_host_ime_finish_composing_text(cef_browser_host_t * self, int keep_selection, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, keep_selection); } + // void gocef_browser_host_set_windowless_frame_rate(cef_browser_host_t * self, int frameRate, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, frameRate); } + // void gocef_browser_host_ime_set_composition(cef_browser_host_t * self, cef_string_t * text, size_t underlinesCount, cef_composition_underline_t * underlines, cef_range_t * replacementRange, cef_range_t * selectionRange, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *, size_t, cef_composition_underline_t *, cef_range_t *, cef_range_t *)) { return callback__(self, text, underlinesCount, underlines, replacementRange, selectionRange); } + // void gocef_browser_host_ime_commit_text(cef_browser_host_t * self, cef_string_t * text, cef_range_t * replacementRange, int relativeCursorPos, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_string_t *, cef_range_t *, int)) { return callback__(self, text, replacementRange, relativeCursorPos); } + // void gocef_browser_host_ime_finish_composing_text(cef_browser_host_t * self, int keepSelection, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, keepSelection); } // void gocef_browser_host_ime_cancel_composition(cef_browser_host_t * self, void (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } - // void gocef_browser_host_drag_target_drag_enter(cef_browser_host_t * self, cef_drag_data_t * drag_data, cef_mouse_event_t * event, cef_drag_operations_mask_t allowed_ops, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_drag_data_t *, cef_mouse_event_t *, cef_drag_operations_mask_t)) { return callback__(self, drag_data, event, allowed_ops); } - // void gocef_browser_host_drag_target_drag_over(cef_browser_host_t * self, cef_mouse_event_t * event, cef_drag_operations_mask_t allowed_ops, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_mouse_event_t *, cef_drag_operations_mask_t)) { return callback__(self, event, allowed_ops); } + // void gocef_browser_host_drag_target_drag_enter(cef_browser_host_t * self, cef_drag_data_t * dragData, cef_mouse_event_t * event, cef_drag_operations_mask_t allowedOps, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_drag_data_t *, cef_mouse_event_t *, cef_drag_operations_mask_t)) { return callback__(self, dragData, event, allowedOps); } + // void gocef_browser_host_drag_target_drag_over(cef_browser_host_t * self, cef_mouse_event_t * event, cef_drag_operations_mask_t allowedOps, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_mouse_event_t *, cef_drag_operations_mask_t)) { return callback__(self, event, allowedOps); } // void gocef_browser_host_drag_target_drag_leave(cef_browser_host_t * self, void (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // void gocef_browser_host_drag_target_drop(cef_browser_host_t * self, cef_mouse_event_t * event, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_mouse_event_t *)) { return callback__(self, event); } // void gocef_browser_host_drag_source_ended_at(cef_browser_host_t * self, int x, int y, cef_drag_operations_mask_t op, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int, int, cef_drag_operations_mask_t)) { return callback__(self, x, y, op); } // void gocef_browser_host_drag_source_system_drag_ended(cef_browser_host_t * self, void (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // cef_navigation_entry_t * gocef_browser_host_get_visible_navigation_entry(cef_browser_host_t * self, cef_navigation_entry_t * (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } - // void gocef_browser_host_set_accessibility_state(cef_browser_host_t * self, cef_state_t accessibility_state, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_state_t)) { return callback__(self, accessibility_state); } - // void gocef_browser_host_set_auto_resize_enabled(cef_browser_host_t * self, int enabled, cef_size_t * min_size, cef_size_t * max_size, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int, cef_size_t *, cef_size_t *)) { return callback__(self, enabled, min_size, max_size); } + // void gocef_browser_host_set_accessibility_state(cef_browser_host_t * self, cef_state_t accessibilityState, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, cef_state_t)) { return callback__(self, accessibilityState); } + // void gocef_browser_host_set_auto_resize_enabled(cef_browser_host_t * self, int enabled, cef_size_t * minSize, cef_size_t * maxSize, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int, cef_size_t *, cef_size_t *)) { return callback__(self, enabled, minSize, maxSize); } // cef_extension_t * gocef_browser_host_get_extension(cef_browser_host_t * self, cef_extension_t * (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // int gocef_browser_host_is_background_host(cef_browser_host_t * self, int (CEF_CALLBACK *callback__)(cef_browser_host_t *)) { return callback__(self); } // void gocef_browser_host_set_audio_muted(cef_browser_host_t * self, int mute, void (CEF_CALLBACK *callback__)(cef_browser_host_t *, int)) { return callback__(self, mute); } @@ -100,8 +100,8 @@ func (d *BrowserHost) GetBrowser() *Browser { // the event handler allows the close or if |force_close| is true (1). See // cef_life_span_handler_t::do_close() documentation for additional usage // information. -func (d *BrowserHost) CloseBrowser(force_close int32) { - C.gocef_browser_host_close_browser(d.toNative(), C.int(force_close), d.close_browser) +func (d *BrowserHost) CloseBrowser(forceClose int32) { + C.gocef_browser_host_close_browser(d.toNative(), C.int(forceClose), d.close_browser) } // TryCloseBrowser (try_close_browser) @@ -186,29 +186,29 @@ func (d *BrowserHost) SetZoomLevel(zoomLevel float64) { // selected by default. |callback| will be executed after the dialog is // dismissed or immediately if another dialog is already pending. The dialog // will be initiated asynchronously on the UI thread. -func (d *BrowserHost) RunFileDialog(mode FileDialogMode, title, default_file_path string, accept_filters StringList, selected_accept_filter int32, callback *RunFileDialogCallback) { +func (d *BrowserHost) RunFileDialog(mode FileDialogMode, title, defaultFilePath string, acceptFilters StringList, selectedAcceptFilter int32, callback *RunFileDialogCallback) { title_ := C.cef_string_userfree_alloc() setCEFStr(title, title_) defer func() { C.cef_string_userfree_free(title_) }() - default_file_path_ := C.cef_string_userfree_alloc() - setCEFStr(default_file_path, default_file_path_) + defaultFilePath_ := C.cef_string_userfree_alloc() + setCEFStr(defaultFilePath, defaultFilePath_) defer func() { - C.cef_string_userfree_free(default_file_path_) + C.cef_string_userfree_free(defaultFilePath_) }() - C.gocef_browser_host_run_file_dialog(d.toNative(), C.cef_file_dialog_mode_t(mode), (*C.cef_string_t)(title_), (*C.cef_string_t)(default_file_path_), C.cef_string_list_t(accept_filters), C.int(selected_accept_filter), callback.toNative(), d.run_file_dialog) + C.gocef_browser_host_run_file_dialog(d.toNative(), C.cef_file_dialog_mode_t(mode), (*C.cef_string_t)(title_), (*C.cef_string_t)(defaultFilePath_), C.cef_string_list_t(acceptFilters), C.int(selectedAcceptFilter), callback.toNative(), d.run_file_dialog) } // StartDownload (start_download) // Download the file at |url| using cef_download_handler_t. -func (d *BrowserHost) StartDownload(url string) { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *BrowserHost) StartDownload(uRL string) { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - C.gocef_browser_host_start_download(d.toNative(), (*C.cef_string_t)(url_), d.start_download) + C.gocef_browser_host_start_download(d.toNative(), (*C.cef_string_t)(uRL_), d.start_download) } // DownloadImage (download_image) @@ -222,13 +222,13 @@ func (d *BrowserHost) StartDownload(url string) { // to |max_image_size| and is the only result. A |max_image_size| of 0 means // unlimited. If |bypass_cache| is true (1) then |image_url| is requested from // the server even if it is present in the browser cache. -func (d *BrowserHost) DownloadImage(image_url string, is_favicon int32, max_image_size uint32, bypass_cache int32, callback *DownloadImageCallback) { - image_url_ := C.cef_string_userfree_alloc() - setCEFStr(image_url, image_url_) +func (d *BrowserHost) DownloadImage(imageURL string, isFavicon int32, maxImageSize uint32, bypassCache int32, callback *DownloadImageCallback) { + imageURL_ := C.cef_string_userfree_alloc() + setCEFStr(imageURL, imageURL_) defer func() { - C.cef_string_userfree_free(image_url_) + C.cef_string_userfree_free(imageURL_) }() - C.gocef_browser_host_download_image(d.toNative(), (*C.cef_string_t)(image_url_), C.int(is_favicon), C.uint32(max_image_size), C.int(bypass_cache), callback.toNative(), d.download_image) + C.gocef_browser_host_download_image(d.toNative(), (*C.cef_string_t)(imageURL_), C.int(isFavicon), C.uint32(maxImageSize), C.int(bypassCache), callback.toNative(), d.download_image) } // Print (print) @@ -237,12 +237,12 @@ func (d *BrowserHost) Print() { C.gocef_browser_host_print(d.toNative(), d.print) } -// PrintToPdf (print_to_pdf) +// PrintToPDF (print_to_pdf) // Print the current browser contents to the PDF file specified by |path| and // execute |callback| on completion. The caller is responsible for deleting // |path| when done. For PDF printing to work on Linux you must implement the // cef_print_handler_t::GetPdfPaperSize function. -func (d *BrowserHost) PrintToPdf(path string, settings *PDFPrintSettings, callback *PDFPrintCallback) { +func (d *BrowserHost) PrintToPDF(path string, settings *PDFPrintSettings, callback *PDFPrintCallback) { path_ := C.cef_string_userfree_alloc() setCEFStr(path, path_) defer func() { @@ -284,8 +284,8 @@ func (d *BrowserHost) StopFinding(clearSelection int32) { // is non-NULL then the element at the specified (x,y) location will be // inspected. The |windowInfo| parameter will be ignored if this browser is // wrapped in a cef_browser_view_t. -func (d *BrowserHost) ShowDevTools(windowInfo *WindowInfo, client *Client, settings *BrowserSettings, inspect_element_at *Point) { - C.gocef_browser_host_show_dev_tools(d.toNative(), windowInfo.toNative(&C.cef_window_info_t{}), client.toNative(), settings.toNative(&C.cef_browser_settings_t{}), inspect_element_at.toNative(&C.cef_point_t{}), d.show_dev_tools) +func (d *BrowserHost) ShowDevTools(windowInfo *WindowInfo, client *Client, settings *BrowserSettings, inspectElementAt *Point) { + C.gocef_browser_host_show_dev_tools(d.toNative(), windowInfo.toNative(&C.cef_window_info_t{}), client.toNative(), settings.toNative(&C.cef_browser_settings_t{}), inspectElementAt.toNative(&C.cef_point_t{}), d.show_dev_tools) } // CloseDevTools (close_dev_tools) @@ -306,8 +306,8 @@ func (d *BrowserHost) HasDevTools() int32 { // specified visitor. If |current_only| is true (1) only the current // navigation entry will be sent, otherwise all navigation entries will be // sent. -func (d *BrowserHost) GetNavigationEntries(visitor *NavigationEntryVisitor, current_only int32) { - C.gocef_browser_host_get_navigation_entries(d.toNative(), visitor.toNative(), C.int(current_only), d.get_navigation_entries) +func (d *BrowserHost) GetNavigationEntries(visitor *NavigationEntryVisitor, currentOnly int32) { + C.gocef_browser_host_get_navigation_entries(d.toNative(), visitor.toNative(), C.int(currentOnly), d.get_navigation_entries) } // SetMouseCursorChangeDisabled (set_mouse_cursor_change_disabled) @@ -465,8 +465,8 @@ func (d *BrowserHost) GetWindowlessFrameRate() int32 { // lower if the browser cannot generate frames at the requested rate. The // minimum value is 1 and the maximum value is 60 (default 30). Can also be // set at browser creation via cef_browser_tSettings.windowless_frame_rate. -func (d *BrowserHost) SetWindowlessFrameRate(frame_rate int32) { - C.gocef_browser_host_set_windowless_frame_rate(d.toNative(), C.int(frame_rate), d.set_windowless_frame_rate) +func (d *BrowserHost) SetWindowlessFrameRate(frameRate int32) { + C.gocef_browser_host_set_windowless_frame_rate(d.toNative(), C.int(frameRate), d.set_windowless_frame_rate) } // ImeSetComposition (ime_set_composition) @@ -491,13 +491,13 @@ func (d *BrowserHost) SetWindowlessFrameRate(frame_rate int32) { // C. insertText of NSTextInput is called (on Mac). // // This function is only used when window rendering is disabled. -func (d *BrowserHost) ImeSetComposition(text string, underlinesCount uint64, underlines *CompositionUnderline, replacement_range, selection_range *Range) { +func (d *BrowserHost) ImeSetComposition(text string, underlinesCount uint64, underlines *CompositionUnderline, replacementRange, selectionRange *Range) { text_ := C.cef_string_userfree_alloc() setCEFStr(text, text_) defer func() { C.cef_string_userfree_free(text_) }() - C.gocef_browser_host_ime_set_composition(d.toNative(), (*C.cef_string_t)(text_), C.size_t(underlinesCount), underlines.toNative(&C.cef_composition_underline_t{}), replacement_range.toNative(&C.cef_range_t{}), selection_range.toNative(&C.cef_range_t{}), d.ime_set_composition) + C.gocef_browser_host_ime_set_composition(d.toNative(), (*C.cef_string_t)(text_), C.size_t(underlinesCount), underlines.toNative(&C.cef_composition_underline_t{}), replacementRange.toNative(&C.cef_range_t{}), selectionRange.toNative(&C.cef_range_t{}), d.ime_set_composition) } // ImeCommitText (ime_commit_text) @@ -508,13 +508,13 @@ func (d *BrowserHost) ImeSetComposition(text string, underlinesCount uint64, und // comments on ImeSetComposition for usage. The |replacement_range| and // |relative_cursor_pos| values are only used on OS X. This function is only // used when window rendering is disabled. -func (d *BrowserHost) ImeCommitText(text string, replacement_range *Range, relative_cursor_pos int32) { +func (d *BrowserHost) ImeCommitText(text string, replacementRange *Range, relativeCursorPos int32) { text_ := C.cef_string_userfree_alloc() setCEFStr(text, text_) defer func() { C.cef_string_userfree_free(text_) }() - C.gocef_browser_host_ime_commit_text(d.toNative(), (*C.cef_string_t)(text_), replacement_range.toNative(&C.cef_range_t{}), C.int(relative_cursor_pos), d.ime_commit_text) + C.gocef_browser_host_ime_commit_text(d.toNative(), (*C.cef_string_t)(text_), replacementRange.toNative(&C.cef_range_t{}), C.int(relativeCursorPos), d.ime_commit_text) } // ImeFinishComposingText (ime_finish_composing_text) @@ -522,8 +522,8 @@ func (d *BrowserHost) ImeCommitText(text string, replacement_range *Range, relat // contents. If |keep_selection| is false (0) the current selection, if any, // will be discarded. See comments on ImeSetComposition for usage. This // function is only used when window rendering is disabled. -func (d *BrowserHost) ImeFinishComposingText(keep_selection int32) { - C.gocef_browser_host_ime_finish_composing_text(d.toNative(), C.int(keep_selection), d.ime_finish_composing_text) +func (d *BrowserHost) ImeFinishComposingText(keepSelection int32) { + C.gocef_browser_host_ime_finish_composing_text(d.toNative(), C.int(keepSelection), d.ime_finish_composing_text) } // ImeCancelComposition (ime_cancel_composition) @@ -542,8 +542,8 @@ func (d *BrowserHost) ImeCancelComposition() { // cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from // cef_render_handler_t::StartDragging). This function is only used when // window rendering is disabled. -func (d *BrowserHost) DragTargetDragEnter(drag_data *DragData, event *MouseEvent, allowed_ops DragOperationsMask) { - C.gocef_browser_host_drag_target_drag_enter(d.toNative(), drag_data.toNative(), event.toNative(&C.cef_mouse_event_t{}), C.cef_drag_operations_mask_t(allowed_ops), d.drag_target_drag_enter) +func (d *BrowserHost) DragTargetDragEnter(dragData *DragData, event *MouseEvent, allowedOps DragOperationsMask) { + C.gocef_browser_host_drag_target_drag_enter(d.toNative(), dragData.toNative(), event.toNative(&C.cef_mouse_event_t{}), C.cef_drag_operations_mask_t(allowedOps), d.drag_target_drag_enter) } // DragTargetDragOver (drag_target_drag_over) @@ -551,8 +551,8 @@ func (d *BrowserHost) DragTargetDragEnter(drag_data *DragData, event *MouseEvent // a drag operation (after calling DragTargetDragEnter and before calling // DragTargetDragLeave/DragTargetDrop). This function is only used when window // rendering is disabled. -func (d *BrowserHost) DragTargetDragOver(event *MouseEvent, allowed_ops DragOperationsMask) { - C.gocef_browser_host_drag_target_drag_over(d.toNative(), event.toNative(&C.cef_mouse_event_t{}), C.cef_drag_operations_mask_t(allowed_ops), d.drag_target_drag_over) +func (d *BrowserHost) DragTargetDragOver(event *MouseEvent, allowedOps DragOperationsMask) { + C.gocef_browser_host_drag_target_drag_over(d.toNative(), event.toNative(&C.cef_mouse_event_t{}), C.cef_drag_operations_mask_t(allowedOps), d.drag_target_drag_over) } // DragTargetDragLeave (drag_target_drag_leave) @@ -627,16 +627,16 @@ func (d *BrowserHost) GetVisibleNavigationEntry() *NavigationEntry { // events are passed to CefAccessibiltyHandler, but platform accessibility // objects are not created. The client may implement platform accessibility // objects using CefAccessibiltyHandler callbacks if desired. -func (d *BrowserHost) SetAccessibilityState(accessibility_state State) { - C.gocef_browser_host_set_accessibility_state(d.toNative(), C.cef_state_t(accessibility_state), d.set_accessibility_state) +func (d *BrowserHost) SetAccessibilityState(accessibilityState State) { + C.gocef_browser_host_set_accessibility_state(d.toNative(), C.cef_state_t(accessibilityState), d.set_accessibility_state) } // SetAutoResizeEnabled (set_auto_resize_enabled) // Enable notifications of auto resize via // cef_display_handler_t::OnAutoResize. Notifications are disabled by default. // |min_size| and |max_size| define the range of allowed sizes. -func (d *BrowserHost) SetAutoResizeEnabled(enabled int32, min_size, max_size *Size) { - C.gocef_browser_host_set_auto_resize_enabled(d.toNative(), C.int(enabled), min_size.toNative(&C.cef_size_t{}), max_size.toNative(&C.cef_size_t{}), d.set_auto_resize_enabled) +func (d *BrowserHost) SetAutoResizeEnabled(enabled int32, minSize, maxSize *Size) { + C.gocef_browser_host_set_auto_resize_enabled(d.toNative(), C.int(enabled), minSize.toNative(&C.cef_size_t{}), maxSize.toNative(&C.cef_size_t{}), d.set_auto_resize_enabled) } // GetExtension (get_extension) diff --git a/cef/BrowserProcessHandler_gen.go b/cef/BrowserProcessHandler_gen.go index ba10187..36496fd 100644 --- a/cef/BrowserProcessHandler_gen.go +++ b/cef/BrowserProcessHandler_gen.go @@ -17,10 +17,10 @@ import ( // BrowserProcessHandlerProxy defines methods required for using BrowserProcessHandler. type BrowserProcessHandlerProxy interface { OnContextInitialized(self *BrowserProcessHandler) - OnBeforeChildProcessLaunch(self *BrowserProcessHandler, command_line *CommandLine) - OnRenderProcessThreadCreated(self *BrowserProcessHandler, extra_info *ListValue) + OnBeforeChildProcessLaunch(self *BrowserProcessHandler, commandLine *CommandLine) + OnRenderProcessThreadCreated(self *BrowserProcessHandler, extraInfo *ListValue) GetPrintHandler(self *BrowserProcessHandler) *PrintHandler - OnScheduleMessagePumpWork(self *BrowserProcessHandler, delay_ms int64) + OnScheduleMessagePumpWork(self *BrowserProcessHandler, delayMs int64) } // BrowserProcessHandler (cef_browser_process_handler_t from include/capi/cef_browser_process_handler_capi.h) @@ -82,16 +82,16 @@ func gocef_browser_process_handler_on_context_initialized(self *C.cef_browser_pr // process IO thread when launching a GPU or plugin process. Provides an // opportunity to modify the child process command line. Do not keep a // reference to |command_line| outside of this function. -func (d *BrowserProcessHandler) OnBeforeChildProcessLaunch(command_line *CommandLine) { - lookupBrowserProcessHandlerProxy(d.Base()).OnBeforeChildProcessLaunch(d, command_line) +func (d *BrowserProcessHandler) OnBeforeChildProcessLaunch(commandLine *CommandLine) { + lookupBrowserProcessHandlerProxy(d.Base()).OnBeforeChildProcessLaunch(d, commandLine) } //nolint:gocritic //export gocef_browser_process_handler_on_before_child_process_launch -func gocef_browser_process_handler_on_before_child_process_launch(self *C.cef_browser_process_handler_t, command_line *C.cef_command_line_t) { +func gocef_browser_process_handler_on_before_child_process_launch(self *C.cef_browser_process_handler_t, commandLine *C.cef_command_line_t) { me__ := (*BrowserProcessHandler)(self) proxy__ := lookupBrowserProcessHandlerProxy(me__.Base()) - proxy__.OnBeforeChildProcessLaunch(me__, (*CommandLine)(command_line)) + proxy__.OnBeforeChildProcessLaunch(me__, (*CommandLine)(commandLine)) } // OnRenderProcessThreadCreated (on_render_process_thread_created) @@ -100,16 +100,16 @@ func gocef_browser_process_handler_on_before_child_process_launch(self *C.cef_br // information that will be passed to // cef_render_process_handler_t::on_render_thread_created() in the render // process. Do not keep a reference to |extra_info| outside of this function. -func (d *BrowserProcessHandler) OnRenderProcessThreadCreated(extra_info *ListValue) { - lookupBrowserProcessHandlerProxy(d.Base()).OnRenderProcessThreadCreated(d, extra_info) +func (d *BrowserProcessHandler) OnRenderProcessThreadCreated(extraInfo *ListValue) { + lookupBrowserProcessHandlerProxy(d.Base()).OnRenderProcessThreadCreated(d, extraInfo) } //nolint:gocritic //export gocef_browser_process_handler_on_render_process_thread_created -func gocef_browser_process_handler_on_render_process_thread_created(self *C.cef_browser_process_handler_t, extra_info *C.cef_list_value_t) { +func gocef_browser_process_handler_on_render_process_thread_created(self *C.cef_browser_process_handler_t, extraInfo *C.cef_list_value_t) { me__ := (*BrowserProcessHandler)(self) proxy__ := lookupBrowserProcessHandlerProxy(me__.Base()) - proxy__.OnRenderProcessThreadCreated(me__, (*ListValue)(extra_info)) + proxy__.OnRenderProcessThreadCreated(me__, (*ListValue)(extraInfo)) } // GetPrintHandler (get_print_handler) @@ -139,14 +139,14 @@ func gocef_browser_process_handler_get_print_handler(self *C.cef_browser_process // |delay_ms| is > 0 then the call should be scheduled to happen after the // specified delay and any currently pending scheduled call should be // cancelled. -func (d *BrowserProcessHandler) OnScheduleMessagePumpWork(delay_ms int64) { - lookupBrowserProcessHandlerProxy(d.Base()).OnScheduleMessagePumpWork(d, delay_ms) +func (d *BrowserProcessHandler) OnScheduleMessagePumpWork(delayMs int64) { + lookupBrowserProcessHandlerProxy(d.Base()).OnScheduleMessagePumpWork(d, delayMs) } //nolint:gocritic //export gocef_browser_process_handler_on_schedule_message_pump_work -func gocef_browser_process_handler_on_schedule_message_pump_work(self *C.cef_browser_process_handler_t, delay_ms C.int64) { +func gocef_browser_process_handler_on_schedule_message_pump_work(self *C.cef_browser_process_handler_t, delayMs C.int64) { me__ := (*BrowserProcessHandler)(self) proxy__ := lookupBrowserProcessHandlerProxy(me__.Base()) - proxy__.OnScheduleMessagePumpWork(me__, int64(delay_ms)) + proxy__.OnScheduleMessagePumpWork(me__, int64(delayMs)) } diff --git a/cef/BrowserSettings_gen.go b/cef/BrowserSettings_gen.go index 78b550a..87dc6d1 100644 --- a/cef/BrowserSettings_gen.go +++ b/cef/BrowserSettings_gen.go @@ -67,12 +67,12 @@ type BrowserSettings struct { // Controls whether JavaScript can access the clipboard. Also configurable // using the "disable-javascript-access-clipboard" command-line switch. JavascriptAccessClipboard State - // JavascriptDomPaste (javascript_dom_paste) + // JavascriptDOMPaste (javascript_dom_paste) // Controls whether DOM pasting is supported in the editor via // execCommand("paste"). The |javascript_access_clipboard| setting must also // be enabled. Also configurable using the "disable-javascript-dom-paste" // command-line switch. - JavascriptDomPaste State + JavascriptDOMPaste State // Plugins (plugins) // Controls whether any plugins will be loaded. Also configurable using the // "disable-plugins" command-line switch. @@ -172,7 +172,7 @@ func (d *BrowserSettings) toNative(native *C.cef_browser_settings_t) *C.cef_brow native.javascript = C.cef_state_t(d.Javascript) native.javascript_close_windows = C.cef_state_t(d.JavascriptCloseWindows) native.javascript_access_clipboard = C.cef_state_t(d.JavascriptAccessClipboard) - native.javascript_dom_paste = C.cef_state_t(d.JavascriptDomPaste) + native.javascript_dom_paste = C.cef_state_t(d.JavascriptDOMPaste) native.plugins = C.cef_state_t(d.Plugins) native.universal_access_from_file_urls = C.cef_state_t(d.UniversalAccessFromFileUrls) native.file_access_from_file_urls = C.cef_state_t(d.FileAccessFromFileUrls) @@ -217,7 +217,7 @@ func (n *C.cef_browser_settings_t) intoGo(d *BrowserSettings) { d.Javascript = State(n.javascript) d.JavascriptCloseWindows = State(n.javascript_close_windows) d.JavascriptAccessClipboard = State(n.javascript_access_clipboard) - d.JavascriptDomPaste = State(n.javascript_dom_paste) + d.JavascriptDOMPaste = State(n.javascript_dom_paste) d.Plugins = State(n.plugins) d.UniversalAccessFromFileUrls = State(n.universal_access_from_file_urls) d.FileAccessFromFileUrls = State(n.file_access_from_file_urls) diff --git a/cef/BrowserViewDelegate_gen.go b/cef/BrowserViewDelegate_gen.go index 4b0b8b6..d7c1e2b 100644 --- a/cef/BrowserViewDelegate_gen.go +++ b/cef/BrowserViewDelegate_gen.go @@ -16,10 +16,10 @@ import ( // BrowserViewDelegateProxy defines methods required for using BrowserViewDelegate. type BrowserViewDelegateProxy interface { - OnBrowserCreated(self *BrowserViewDelegate, browser_view *BrowserView, browser *Browser) - OnBrowserDestroyed(self *BrowserViewDelegate, browser_view *BrowserView, browser *Browser) - GetDelegateForPopupBrowserView(self *BrowserViewDelegate, browser_view *BrowserView, settings *BrowserSettings, client *Client, is_devtools int32) *BrowserViewDelegate - OnPopupBrowserViewCreated(self *BrowserViewDelegate, browser_view, popup_browser_view *BrowserView, is_devtools int32) int32 + OnBrowserCreated(self *BrowserViewDelegate, browserView *BrowserView, browser *Browser) + OnBrowserDestroyed(self *BrowserViewDelegate, browserView *BrowserView, browser *Browser) + GetDelegateForPopupBrowserView(self *BrowserViewDelegate, browserView *BrowserView, settings *BrowserSettings, client *Client, isDevtools int32) *BrowserViewDelegate + OnPopupBrowserViewCreated(self *BrowserViewDelegate, browserView, popupBrowserView *BrowserView, isDevtools int32) int32 } // BrowserViewDelegate (cef_browser_view_delegate_t from include/capi/views/cef_browser_view_delegate_capi.h) @@ -65,16 +65,16 @@ func (d *BrowserViewDelegate) Base() *ViewDelegate { // function will be called after cef_life_span_handler_t::on_after_created() // is called for |browser| and before on_popup_browser_view_created() is // called for |browser|'s parent delegate if |browser| is a popup. -func (d *BrowserViewDelegate) OnBrowserCreated(browser_view *BrowserView, browser *Browser) { - lookupBrowserViewDelegateProxy(d.Base().Base()).OnBrowserCreated(d, browser_view, browser) +func (d *BrowserViewDelegate) OnBrowserCreated(browserView *BrowserView, browser *Browser) { + lookupBrowserViewDelegateProxy(d.Base().Base()).OnBrowserCreated(d, browserView, browser) } //nolint:gocritic //export gocef_browser_view_delegate_on_browser_created -func gocef_browser_view_delegate_on_browser_created(self *C.cef_browser_view_delegate_t, browser_view *C.cef_browser_view_t, browser *C.cef_browser_t) { +func gocef_browser_view_delegate_on_browser_created(self *C.cef_browser_view_delegate_t, browserView *C.cef_browser_view_t, browser *C.cef_browser_t) { me__ := (*BrowserViewDelegate)(self) proxy__ := lookupBrowserViewDelegateProxy(me__.Base().Base()) - proxy__.OnBrowserCreated(me__, (*BrowserView)(browser_view), (*Browser)(browser)) + proxy__.OnBrowserCreated(me__, (*BrowserView)(browserView), (*Browser)(browser)) } // OnBrowserDestroyed (on_browser_destroyed) @@ -82,16 +82,16 @@ func gocef_browser_view_delegate_on_browser_created(self *C.cef_browser_view_del // all references to |browser| and do not attempt to execute any functions on // |browser| after this callback returns. This function will be called before // cef_life_span_handler_t::on_before_close() is called for |browser|. -func (d *BrowserViewDelegate) OnBrowserDestroyed(browser_view *BrowserView, browser *Browser) { - lookupBrowserViewDelegateProxy(d.Base().Base()).OnBrowserDestroyed(d, browser_view, browser) +func (d *BrowserViewDelegate) OnBrowserDestroyed(browserView *BrowserView, browser *Browser) { + lookupBrowserViewDelegateProxy(d.Base().Base()).OnBrowserDestroyed(d, browserView, browser) } //nolint:gocritic //export gocef_browser_view_delegate_on_browser_destroyed -func gocef_browser_view_delegate_on_browser_destroyed(self *C.cef_browser_view_delegate_t, browser_view *C.cef_browser_view_t, browser *C.cef_browser_t) { +func gocef_browser_view_delegate_on_browser_destroyed(self *C.cef_browser_view_delegate_t, browserView *C.cef_browser_view_t, browser *C.cef_browser_t) { me__ := (*BrowserViewDelegate)(self) proxy__ := lookupBrowserViewDelegateProxy(me__.Base().Base()) - proxy__.OnBrowserDestroyed(me__, (*BrowserView)(browser_view), (*Browser)(browser)) + proxy__.OnBrowserDestroyed(me__, (*BrowserView)(browserView), (*Browser)(browser)) } // GetDelegateForPopupBrowserView (get_delegate_for_popup_browser_view) @@ -100,17 +100,17 @@ func gocef_browser_view_delegate_on_browser_destroyed(self *C.cef_browser_view_d // cef_life_span_handler_t::on_before_popup(). |is_devtools| will be true (1) // if the popup will be a DevTools browser. Return the delegate that will be // used for the new popup BrowserView. -func (d *BrowserViewDelegate) GetDelegateForPopupBrowserView(browser_view *BrowserView, settings *BrowserSettings, client *Client, is_devtools int32) *BrowserViewDelegate { - return lookupBrowserViewDelegateProxy(d.Base().Base()).GetDelegateForPopupBrowserView(d, browser_view, settings, client, is_devtools) +func (d *BrowserViewDelegate) GetDelegateForPopupBrowserView(browserView *BrowserView, settings *BrowserSettings, client *Client, isDevtools int32) *BrowserViewDelegate { + return lookupBrowserViewDelegateProxy(d.Base().Base()).GetDelegateForPopupBrowserView(d, browserView, settings, client, isDevtools) } //nolint:gocritic //export gocef_browser_view_delegate_get_delegate_for_popup_browser_view -func gocef_browser_view_delegate_get_delegate_for_popup_browser_view(self *C.cef_browser_view_delegate_t, browser_view *C.cef_browser_view_t, settings *C.cef_browser_settings_t, client *C.cef_client_t, is_devtools C.int) *C.cef_browser_view_delegate_t { +func gocef_browser_view_delegate_get_delegate_for_popup_browser_view(self *C.cef_browser_view_delegate_t, browserView *C.cef_browser_view_t, settings *C.cef_browser_settings_t, client *C.cef_client_t, isDevtools C.int) *C.cef_browser_view_delegate_t { me__ := (*BrowserViewDelegate)(self) proxy__ := lookupBrowserViewDelegateProxy(me__.Base().Base()) settings_ := settings.toGo() - return (proxy__.GetDelegateForPopupBrowserView(me__, (*BrowserView)(browser_view), settings_, (*Client)(client), int32(is_devtools))).toNative() + return (proxy__.GetDelegateForPopupBrowserView(me__, (*BrowserView)(browserView), settings_, (*Client)(client), int32(isDevtools))).toNative() } // OnPopupBrowserViewCreated (on_popup_browser_view_created) @@ -121,14 +121,14 @@ func gocef_browser_view_delegate_get_delegate_for_popup_browser_view(self *C.cef // browser. Optionally add |popup_browser_view| to the views hierarchy // yourself and return true (1). Otherwise return false (0) and a default // cef_window_t will be created for the popup. -func (d *BrowserViewDelegate) OnPopupBrowserViewCreated(browser_view, popup_browser_view *BrowserView, is_devtools int32) int32 { - return lookupBrowserViewDelegateProxy(d.Base().Base()).OnPopupBrowserViewCreated(d, browser_view, popup_browser_view, is_devtools) +func (d *BrowserViewDelegate) OnPopupBrowserViewCreated(browserView, popupBrowserView *BrowserView, isDevtools int32) int32 { + return lookupBrowserViewDelegateProxy(d.Base().Base()).OnPopupBrowserViewCreated(d, browserView, popupBrowserView, isDevtools) } //nolint:gocritic //export gocef_browser_view_delegate_on_popup_browser_view_created -func gocef_browser_view_delegate_on_popup_browser_view_created(self *C.cef_browser_view_delegate_t, browser_view *C.cef_browser_view_t, popup_browser_view *C.cef_browser_view_t, is_devtools C.int) C.int { +func gocef_browser_view_delegate_on_popup_browser_view_created(self *C.cef_browser_view_delegate_t, browserView *C.cef_browser_view_t, popupBrowserView *C.cef_browser_view_t, isDevtools C.int) C.int { me__ := (*BrowserViewDelegate)(self) proxy__ := lookupBrowserViewDelegateProxy(me__.Base().Base()) - return C.int(proxy__.OnPopupBrowserViewCreated(me__, (*BrowserView)(browser_view), (*BrowserView)(popup_browser_view), int32(is_devtools))) + return C.int(proxy__.OnPopupBrowserViewCreated(me__, (*BrowserView)(browserView), (*BrowserView)(popupBrowserView), int32(isDevtools))) } diff --git a/cef/BrowserView_gen.go b/cef/BrowserView_gen.go index 16db5b7..4c1e9f8 100644 --- a/cef/BrowserView_gen.go +++ b/cef/BrowserView_gen.go @@ -5,7 +5,7 @@ package cef import ( // #include "capi_gen.h" // cef_browser_t * gocef_browser_view_get_browser(cef_browser_view_t * self, cef_browser_t * (CEF_CALLBACK *callback__)(cef_browser_view_t *)) { return callback__(self); } - // void gocef_browser_view_set_prefer_accelerators(cef_browser_view_t * self, int prefer_accelerators, void (CEF_CALLBACK *callback__)(cef_browser_view_t *, int)) { return callback__(self, prefer_accelerators); } + // void gocef_browser_view_set_prefer_accelerators(cef_browser_view_t * self, int preferAccelerators, void (CEF_CALLBACK *callback__)(cef_browser_view_t *, int)) { return callback__(self, preferAccelerators); } "C" ) @@ -39,6 +39,6 @@ func (d *BrowserView) GetBrowser() *Browser { // If |prefer_accelerators| is false (0) then the matching accelerator will // only be triggered if the event is not handled by web content or by // cef_keyboard_handler_t. The default value is false (0). -func (d *BrowserView) SetPreferAccelerators(prefer_accelerators int32) { - C.gocef_browser_view_set_prefer_accelerators(d.toNative(), C.int(prefer_accelerators), d.set_prefer_accelerators) +func (d *BrowserView) SetPreferAccelerators(preferAccelerators int32) { + C.gocef_browser_view_set_prefer_accelerators(d.toNative(), C.int(preferAccelerators), d.set_prefer_accelerators) } diff --git a/cef/Button_gen.go b/cef/Button_gen.go index c18fe80..da7fa01 100644 --- a/cef/Button_gen.go +++ b/cef/Button_gen.go @@ -8,7 +8,7 @@ import ( // void gocef_button_set_state(cef_button_t * self, cef_button_state_t state, void (CEF_CALLBACK *callback__)(cef_button_t *, cef_button_state_t)) { return callback__(self, state); } // cef_button_state_t gocef_button_get_state(cef_button_t * self, cef_button_state_t (CEF_CALLBACK *callback__)(cef_button_t *)) { return callback__(self); } // void gocef_button_set_ink_drop_enabled(cef_button_t * self, int enabled, void (CEF_CALLBACK *callback__)(cef_button_t *, int)) { return callback__(self, enabled); } - // void gocef_button_set_tooltip_text(cef_button_t * self, cef_string_t * tooltip_text, void (CEF_CALLBACK *callback__)(cef_button_t *, cef_string_t *)) { return callback__(self, tooltip_text); } + // void gocef_button_set_tooltip_text(cef_button_t * self, cef_string_t * tooltipText, void (CEF_CALLBACK *callback__)(cef_button_t *, cef_string_t *)) { return callback__(self, tooltipText); } // void gocef_button_set_accessible_name(cef_button_t * self, cef_string_t * name, void (CEF_CALLBACK *callback__)(cef_button_t *, cef_string_t *)) { return callback__(self, name); } "C" ) @@ -56,13 +56,13 @@ func (d *Button) SetInkDropEnabled(enabled int32) { // SetTooltipText (set_tooltip_text) // Sets the tooltip text that will be displayed when the user hovers the mouse // cursor over the Button. -func (d *Button) SetTooltipText(tooltip_text string) { - tooltip_text_ := C.cef_string_userfree_alloc() - setCEFStr(tooltip_text, tooltip_text_) +func (d *Button) SetTooltipText(tooltipText string) { + tooltipText_ := C.cef_string_userfree_alloc() + setCEFStr(tooltipText, tooltipText_) defer func() { - C.cef_string_userfree_free(tooltip_text_) + C.cef_string_userfree_free(tooltipText_) }() - C.gocef_button_set_tooltip_text(d.toNative(), (*C.cef_string_t)(tooltip_text_), d.set_tooltip_text) + C.gocef_button_set_tooltip_text(d.toNative(), (*C.cef_string_t)(tooltipText_), d.set_tooltip_text) } // SetAccessibleName (set_accessible_name) diff --git a/cef/Client_gen.go b/cef/Client_gen.go index 664f04f..d19ce80 100644 --- a/cef/Client_gen.go +++ b/cef/Client_gen.go @@ -30,7 +30,7 @@ type ClientProxy interface { GetLoadHandler(self *Client) *LoadHandler GetRenderHandler(self *Client) *RenderHandler GetRequestHandler(self *Client) *RequestHandler - OnProcessMessageReceived(self *Client, browser *Browser, frame *Frame, source_process ProcessID, message *ProcessMessage) int32 + OnProcessMessageReceived(self *Client, browser *Browser, frame *Frame, sourceProcess ProcessID, message *ProcessMessage) int32 } // Client (cef_client_t from include/capi/cef_client_capi.h) @@ -273,14 +273,14 @@ func gocef_client_get_request_handler(self *C.cef_client_t) *C.cef_request_handl // Called when a new message is received from a different process. Return true // (1) if the message was handled or false (0) otherwise. Do not keep a // reference to or attempt to access the message outside of this callback. -func (d *Client) OnProcessMessageReceived(browser *Browser, frame *Frame, source_process ProcessID, message *ProcessMessage) int32 { - return lookupClientProxy(d.Base()).OnProcessMessageReceived(d, browser, frame, source_process, message) +func (d *Client) OnProcessMessageReceived(browser *Browser, frame *Frame, sourceProcess ProcessID, message *ProcessMessage) int32 { + return lookupClientProxy(d.Base()).OnProcessMessageReceived(d, browser, frame, sourceProcess, message) } //nolint:gocritic //export gocef_client_on_process_message_received -func gocef_client_on_process_message_received(self *C.cef_client_t, browser *C.cef_browser_t, frame *C.cef_frame_t, source_process C.cef_process_id_t, message *C.cef_process_message_t) C.int { +func gocef_client_on_process_message_received(self *C.cef_client_t, browser *C.cef_browser_t, frame *C.cef_frame_t, sourceProcess C.cef_process_id_t, message *C.cef_process_message_t) C.int { me__ := (*Client)(self) proxy__ := lookupClientProxy(me__.Base()) - return C.int(proxy__.OnProcessMessageReceived(me__, (*Browser)(browser), (*Frame)(frame), ProcessID(source_process), (*ProcessMessage)(message))) + return C.int(proxy__.OnProcessMessageReceived(me__, (*Browser)(browser), (*Frame)(frame), ProcessID(sourceProcess), (*ProcessMessage)(message))) } diff --git a/cef/CommandLine_gen.go b/cef/CommandLine_gen.go index a185f93..9adfe72 100644 --- a/cef/CommandLine_gen.go +++ b/cef/CommandLine_gen.go @@ -10,7 +10,7 @@ import ( // int gocef_command_line_is_read_only(cef_command_line_t * self, int (CEF_CALLBACK *callback__)(cef_command_line_t *)) { return callback__(self); } // cef_command_line_t * gocef_command_line_copy(cef_command_line_t * self, cef_command_line_t * (CEF_CALLBACK *callback__)(cef_command_line_t *)) { return callback__(self); } // void gocef_command_line_init_from_argv(cef_command_line_t * self, int argc, char ** argv, void (CEF_CALLBACK *callback__)(cef_command_line_t *, int, char **)) { return callback__(self, argc, argv); } - // void gocef_command_line_init_from_string(cef_command_line_t * self, cef_string_t * command_line, void (CEF_CALLBACK *callback__)(cef_command_line_t *, cef_string_t *)) { return callback__(self, command_line); } + // void gocef_command_line_init_from_string(cef_command_line_t * self, cef_string_t * commandLine, void (CEF_CALLBACK *callback__)(cef_command_line_t *, cef_string_t *)) { return callback__(self, commandLine); } // void gocef_command_line_reset(cef_command_line_t * self, void (CEF_CALLBACK *callback__)(cef_command_line_t *)) { return callback__(self); } // void gocef_command_line_get_argv(cef_command_line_t * self, cef_string_list_t argv, void (CEF_CALLBACK *callback__)(cef_command_line_t *, cef_string_list_t)) { return callback__(self, argv); } // cef_string_userfree_t gocef_command_line_get_command_line_string(cef_command_line_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_command_line_t *)) { return callback__(self); } @@ -86,13 +86,13 @@ func (d *CommandLine) InitFromArgv(argc int32, argv []string) { // InitFromString (init_from_string) // Initialize the command line with the string returned by calling // GetCommandLineW(). This function is only supported on Windows. -func (d *CommandLine) InitFromString(command_line string) { - command_line_ := C.cef_string_userfree_alloc() - setCEFStr(command_line, command_line_) +func (d *CommandLine) InitFromString(commandLine string) { + commandLine_ := C.cef_string_userfree_alloc() + setCEFStr(commandLine, commandLine_) defer func() { - C.cef_string_userfree_free(command_line_) + C.cef_string_userfree_free(commandLine_) }() - C.gocef_command_line_init_from_string(d.toNative(), (*C.cef_string_t)(command_line_), d.init_from_string) + C.gocef_command_line_init_from_string(d.toNative(), (*C.cef_string_t)(commandLine_), d.init_from_string) } // Reset (reset) diff --git a/cef/ContextMenuHandler_gen.go b/cef/ContextMenuHandler_gen.go index d38f516..c4abb53 100644 --- a/cef/ContextMenuHandler_gen.go +++ b/cef/ContextMenuHandler_gen.go @@ -18,7 +18,7 @@ import ( type ContextMenuHandlerProxy interface { OnBeforeContextMenu(self *ContextMenuHandler, browser *Browser, frame *Frame, params *ContextMenuParams, model *MenuModel) RunContextMenu(self *ContextMenuHandler, browser *Browser, frame *Frame, params *ContextMenuParams, model *MenuModel, callback *RunContextMenuCallback) int32 - OnContextMenuCommand(self *ContextMenuHandler, browser *Browser, frame *Frame, params *ContextMenuParams, command_id int32, event_flags EventFlags) int32 + OnContextMenuCommand(self *ContextMenuHandler, browser *Browser, frame *Frame, params *ContextMenuParams, commandID int32, eventFlags EventFlags) int32 OnContextMenuDismissed(self *ContextMenuHandler, browser *Browser, frame *Frame) } @@ -104,16 +104,16 @@ func gocef_context_menu_handler_run_context_menu(self *C.cef_context_menu_handle // MENU_ID_USER_LAST. |params| will have the same values as what was passed to // on_before_context_menu(). Do not keep a reference to |params| outside of // this callback. -func (d *ContextMenuHandler) OnContextMenuCommand(browser *Browser, frame *Frame, params *ContextMenuParams, command_id int32, event_flags EventFlags) int32 { - return lookupContextMenuHandlerProxy(d.Base()).OnContextMenuCommand(d, browser, frame, params, command_id, event_flags) +func (d *ContextMenuHandler) OnContextMenuCommand(browser *Browser, frame *Frame, params *ContextMenuParams, commandID int32, eventFlags EventFlags) int32 { + return lookupContextMenuHandlerProxy(d.Base()).OnContextMenuCommand(d, browser, frame, params, commandID, eventFlags) } //nolint:gocritic //export gocef_context_menu_handler_on_context_menu_command -func gocef_context_menu_handler_on_context_menu_command(self *C.cef_context_menu_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, params *C.cef_context_menu_params_t, command_id C.int, event_flags C.cef_event_flags_t) C.int { +func gocef_context_menu_handler_on_context_menu_command(self *C.cef_context_menu_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, params *C.cef_context_menu_params_t, commandID C.int, eventFlags C.cef_event_flags_t) C.int { me__ := (*ContextMenuHandler)(self) proxy__ := lookupContextMenuHandlerProxy(me__.Base()) - return C.int(proxy__.OnContextMenuCommand(me__, (*Browser)(browser), (*Frame)(frame), (*ContextMenuParams)(params), int32(command_id), EventFlags(event_flags))) + return C.int(proxy__.OnContextMenuCommand(me__, (*Browser)(browser), (*Frame)(frame), (*ContextMenuParams)(params), int32(commandID), EventFlags(eventFlags))) } // OnContextMenuDismissed (on_context_menu_dismissed) diff --git a/cef/ContextMenuParams_gen.go b/cef/ContextMenuParams_gen.go index 14df469..87916c1 100644 --- a/cef/ContextMenuParams_gen.go +++ b/cef/ContextMenuParams_gen.go @@ -64,27 +64,27 @@ func (d *ContextMenuParams) GetTypeFlags() ContextMenuTypeFlags { return ContextMenuTypeFlags(C.gocef_context_menu_params_get_type_flags(d.toNative(), d.get_type_flags)) } -// GetLinkUrl (get_link_url) +// GetLinkURL (get_link_url) // Returns the URL of the link, if any, that encloses the node that the // context menu was invoked on. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *ContextMenuParams) GetLinkUrl() string { +func (d *ContextMenuParams) GetLinkURL() string { return cefuserfreestrToString(C.gocef_context_menu_params_get_link_url(d.toNative(), d.get_link_url)) } -// GetUnfilteredLinkUrl (get_unfiltered_link_url) +// GetUnfilteredLinkURL (get_unfiltered_link_url) // Returns the link URL, if any, to be used ONLY for "copy link address". We // don't validate this field in the frontend process. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *ContextMenuParams) GetUnfilteredLinkUrl() string { +func (d *ContextMenuParams) GetUnfilteredLinkURL() string { return cefuserfreestrToString(C.gocef_context_menu_params_get_unfiltered_link_url(d.toNative(), d.get_unfiltered_link_url)) } -// GetSourceUrl (get_source_url) +// GetSourceURL (get_source_url) // Returns the source URL, if any, for the element that the context menu was // invoked on. Example of elements with source URLs are img, audio, and video. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *ContextMenuParams) GetSourceUrl() string { +func (d *ContextMenuParams) GetSourceURL() string { return cefuserfreestrToString(C.gocef_context_menu_params_get_source_url(d.toNative(), d.get_source_url)) } @@ -103,17 +103,17 @@ func (d *ContextMenuParams) GetTitleText() string { return cefuserfreestrToString(C.gocef_context_menu_params_get_title_text(d.toNative(), d.get_title_text)) } -// GetPageUrl (get_page_url) +// GetPageURL (get_page_url) // Returns the URL of the top level page that the context menu was invoked on. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *ContextMenuParams) GetPageUrl() string { +func (d *ContextMenuParams) GetPageURL() string { return cefuserfreestrToString(C.gocef_context_menu_params_get_page_url(d.toNative(), d.get_page_url)) } -// GetFrameUrl (get_frame_url) +// GetFrameURL (get_frame_url) // Returns the URL of the subframe that the context menu was invoked on. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *ContextMenuParams) GetFrameUrl() string { +func (d *ContextMenuParams) GetFrameURL() string { return cefuserfreestrToString(C.gocef_context_menu_params_get_frame_url(d.toNative(), d.get_frame_url)) } diff --git a/cef/CookieManager_gen.go b/cef/CookieManager_gen.go index 78209b7..72a9bb8 100644 --- a/cef/CookieManager_gen.go +++ b/cef/CookieManager_gen.go @@ -4,11 +4,11 @@ package cef import ( // #include "capi_gen.h" - // void gocef_cookie_manager_set_supported_schemes(cef_cookie_manager_t * self, cef_string_list_t schemes, int include_defaults, cef_completion_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_string_list_t, int, cef_completion_callback_t *)) { return callback__(self, schemes, include_defaults, callback); } + // void gocef_cookie_manager_set_supported_schemes(cef_cookie_manager_t * self, cef_string_list_t schemes, int includeDefaults, cef_completion_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_string_list_t, int, cef_completion_callback_t *)) { return callback__(self, schemes, includeDefaults, callback); } // int gocef_cookie_manager_visit_all_cookies(cef_cookie_manager_t * self, cef_cookie_visitor_t * visitor, int (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_cookie_visitor_t *)) { return callback__(self, visitor); } - // int gocef_cookie_manager_visit_url_cookies(cef_cookie_manager_t * self, cef_string_t * url, int includeHttpOnly, cef_cookie_visitor_t * visitor, int (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_string_t *, int, cef_cookie_visitor_t *)) { return callback__(self, url, includeHttpOnly, visitor); } - // int gocef_cookie_manager_set_cookie(cef_cookie_manager_t * self, cef_string_t * url, cef_cookie_t * cookie, cef_set_cookie_callback_t * callback, int (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_string_t *, cef_cookie_t *, cef_set_cookie_callback_t *)) { return callback__(self, url, cookie, callback); } - // int gocef_cookie_manager_delete_cookies(cef_cookie_manager_t * self, cef_string_t * url, cef_string_t * cookie_name, cef_delete_cookies_callback_t * callback, int (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_string_t *, cef_string_t *, cef_delete_cookies_callback_t *)) { return callback__(self, url, cookie_name, callback); } + // int gocef_cookie_manager_visit_url_cookies(cef_cookie_manager_t * self, cef_string_t * uRL, int includeHTTPOnly, cef_cookie_visitor_t * visitor, int (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_string_t *, int, cef_cookie_visitor_t *)) { return callback__(self, uRL, includeHTTPOnly, visitor); } + // int gocef_cookie_manager_set_cookie(cef_cookie_manager_t * self, cef_string_t * uRL, cef_cookie_t * cookie, cef_set_cookie_callback_t * callback, int (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_string_t *, cef_cookie_t *, cef_set_cookie_callback_t *)) { return callback__(self, uRL, cookie, callback); } + // int gocef_cookie_manager_delete_cookies(cef_cookie_manager_t * self, cef_string_t * uRL, cef_string_t * cookieName, cef_delete_cookies_callback_t * callback, int (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_string_t *, cef_string_t *, cef_delete_cookies_callback_t *)) { return callback__(self, uRL, cookieName, callback); } // int gocef_cookie_manager_flush_store(cef_cookie_manager_t * self, cef_completion_callback_t * callback, int (CEF_CALLBACK *callback__)(cef_cookie_manager_t *, cef_completion_callback_t *)) { return callback__(self, callback); } "C" ) @@ -36,8 +36,8 @@ func (d *CookieManager) Base() *BaseRefCounted { // cookies for this manager. If |callback| is non-NULL it will be executed // asnychronously on the UI thread after the change has been applied. Must be // called before any cookies are accessed. -func (d *CookieManager) SetSupportedSchemes(schemes StringList, include_defaults int32, callback *CompletionCallback) { - C.gocef_cookie_manager_set_supported_schemes(d.toNative(), C.cef_string_list_t(schemes), C.int(include_defaults), callback.toNative(), d.set_supported_schemes) +func (d *CookieManager) SetSupportedSchemes(schemes StringList, includeDefaults int32, callback *CompletionCallback) { + C.gocef_cookie_manager_set_supported_schemes(d.toNative(), C.cef_string_list_t(schemes), C.int(includeDefaults), callback.toNative(), d.set_supported_schemes) } // VisitAllCookies (visit_all_cookies) @@ -48,19 +48,19 @@ func (d *CookieManager) VisitAllCookies(visitor *CookieVisitor) int32 { return int32(C.gocef_cookie_manager_visit_all_cookies(d.toNative(), visitor.toNative(), d.visit_all_cookies)) } -// VisitUrlCookies (visit_url_cookies) +// VisitURLCookies (visit_url_cookies) // Visit a subset of cookies on the UI thread. The results are filtered by the // given url scheme, host, domain and path. If |includeHttpOnly| is true (1) // HTTP-only cookies will also be included in the results. The returned // cookies are ordered by longest path, then by earliest creation date. // Returns false (0) if cookies cannot be accessed. -func (d *CookieManager) VisitUrlCookies(url string, includeHttpOnly int32, visitor *CookieVisitor) int32 { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *CookieManager) VisitURLCookies(uRL string, includeHTTPOnly int32, visitor *CookieVisitor) int32 { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - return int32(C.gocef_cookie_manager_visit_url_cookies(d.toNative(), (*C.cef_string_t)(url_), C.int(includeHttpOnly), visitor.toNative(), d.visit_url_cookies)) + return int32(C.gocef_cookie_manager_visit_url_cookies(d.toNative(), (*C.cef_string_t)(uRL_), C.int(includeHTTPOnly), visitor.toNative(), d.visit_url_cookies)) } // SetCookie (set_cookie) @@ -71,13 +71,13 @@ func (d *CookieManager) VisitUrlCookies(url string, includeHttpOnly int32, visit // such characters are found. If |callback| is non-NULL it will be executed // asnychronously on the UI thread after the cookie has been set. Returns // false (0) if an invalid URL is specified or if cookies cannot be accessed. -func (d *CookieManager) SetCookie(url string, cookie *Cookie, callback *SetCookieCallback) int32 { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *CookieManager) SetCookie(uRL string, cookie *Cookie, callback *SetCookieCallback) int32 { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - return int32(C.gocef_cookie_manager_set_cookie(d.toNative(), (*C.cef_string_t)(url_), cookie.toNative(&C.cef_cookie_t{}), callback.toNative(), d.set_cookie)) + return int32(C.gocef_cookie_manager_set_cookie(d.toNative(), (*C.cef_string_t)(uRL_), cookie.toNative(&C.cef_cookie_t{}), callback.toNative(), d.set_cookie)) } // DeleteCookies (delete_cookies) @@ -90,18 +90,18 @@ func (d *CookieManager) SetCookie(url string, cookie *Cookie, callback *SetCooki // have been deleted. Returns false (0) if a non-NULL invalid URL is specified // or if cookies cannot be accessed. Cookies can alternately be deleted using // the Visit*Cookies() functions. -func (d *CookieManager) DeleteCookies(url, cookie_name string, callback *DeleteCookiesCallback) int32 { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *CookieManager) DeleteCookies(uRL, cookieName string, callback *DeleteCookiesCallback) int32 { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - cookie_name_ := C.cef_string_userfree_alloc() - setCEFStr(cookie_name, cookie_name_) + cookieName_ := C.cef_string_userfree_alloc() + setCEFStr(cookieName, cookieName_) defer func() { - C.cef_string_userfree_free(cookie_name_) + C.cef_string_userfree_free(cookieName_) }() - return int32(C.gocef_cookie_manager_delete_cookies(d.toNative(), (*C.cef_string_t)(url_), (*C.cef_string_t)(cookie_name_), callback.toNative(), d.delete_cookies)) + return int32(C.gocef_cookie_manager_delete_cookies(d.toNative(), (*C.cef_string_t)(uRL_), (*C.cef_string_t)(cookieName_), callback.toNative(), d.delete_cookies)) } // FlushStore (flush_store) diff --git a/cef/DeleteCookiesCallback_gen.go b/cef/DeleteCookiesCallback_gen.go index a4fb6cc..edc5a8c 100644 --- a/cef/DeleteCookiesCallback_gen.go +++ b/cef/DeleteCookiesCallback_gen.go @@ -16,7 +16,7 @@ import ( // DeleteCookiesCallbackProxy defines methods required for using DeleteCookiesCallback. type DeleteCookiesCallbackProxy interface { - OnComplete(self *DeleteCookiesCallback, num_deleted int32) + OnComplete(self *DeleteCookiesCallback, numDeleted int32) } // DeleteCookiesCallback (cef_delete_cookies_callback_t from include/capi/cef_cookie_capi.h) @@ -59,14 +59,14 @@ func (d *DeleteCookiesCallback) Base() *BaseRefCounted { // OnComplete (on_complete) // Method that will be called upon completion. |num_deleted| will be the // number of cookies that were deleted. -func (d *DeleteCookiesCallback) OnComplete(num_deleted int32) { - lookupDeleteCookiesCallbackProxy(d.Base()).OnComplete(d, num_deleted) +func (d *DeleteCookiesCallback) OnComplete(numDeleted int32) { + lookupDeleteCookiesCallbackProxy(d.Base()).OnComplete(d, numDeleted) } //nolint:gocritic //export gocef_delete_cookies_callback_on_complete -func gocef_delete_cookies_callback_on_complete(self *C.cef_delete_cookies_callback_t, num_deleted C.int) { +func gocef_delete_cookies_callback_on_complete(self *C.cef_delete_cookies_callback_t, numDeleted C.int) { me__ := (*DeleteCookiesCallback)(self) proxy__ := lookupDeleteCookiesCallbackProxy(me__.Base()) - proxy__.OnComplete(me__, int32(num_deleted)) + proxy__.OnComplete(me__, int32(numDeleted)) } diff --git a/cef/DialogHandler_gen.go b/cef/DialogHandler_gen.go index 94ac40c..b53da7a 100644 --- a/cef/DialogHandler_gen.go +++ b/cef/DialogHandler_gen.go @@ -16,7 +16,7 @@ import ( // DialogHandlerProxy defines methods required for using DialogHandler. type DialogHandlerProxy interface { - OnFileDialog(self *DialogHandler, browser *Browser, mode FileDialogMode, title, default_file_path string, accept_filters StringList, selected_accept_filter int32, callback *FileDialogCallback) int32 + OnFileDialog(self *DialogHandler, browser *Browser, mode FileDialogMode, title, defaultFilePath string, acceptFilters StringList, selectedAcceptFilter int32, callback *FileDialogCallback) int32 } // DialogHandler (cef_dialog_handler_t from include/capi/cef_dialog_handler_capi.h) @@ -70,16 +70,16 @@ func (d *DialogHandler) Base() *BaseRefCounted { // the filter that should be selected by default. To display a custom dialog // return true (1) and execute |callback| either inline or at a later time. To // display the default dialog return false (0). -func (d *DialogHandler) OnFileDialog(browser *Browser, mode FileDialogMode, title, default_file_path string, accept_filters StringList, selected_accept_filter int32, callback *FileDialogCallback) int32 { - return lookupDialogHandlerProxy(d.Base()).OnFileDialog(d, browser, mode, title, default_file_path, accept_filters, selected_accept_filter, callback) +func (d *DialogHandler) OnFileDialog(browser *Browser, mode FileDialogMode, title, defaultFilePath string, acceptFilters StringList, selectedAcceptFilter int32, callback *FileDialogCallback) int32 { + return lookupDialogHandlerProxy(d.Base()).OnFileDialog(d, browser, mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback) } //nolint:gocritic //export gocef_dialog_handler_on_file_dialog -func gocef_dialog_handler_on_file_dialog(self *C.cef_dialog_handler_t, browser *C.cef_browser_t, mode C.cef_file_dialog_mode_t, title *C.cef_string_t, default_file_path *C.cef_string_t, accept_filters C.cef_string_list_t, selected_accept_filter C.int, callback *C.cef_file_dialog_callback_t) C.int { +func gocef_dialog_handler_on_file_dialog(self *C.cef_dialog_handler_t, browser *C.cef_browser_t, mode C.cef_file_dialog_mode_t, title *C.cef_string_t, defaultFilePath *C.cef_string_t, acceptFilters C.cef_string_list_t, selectedAcceptFilter C.int, callback *C.cef_file_dialog_callback_t) C.int { me__ := (*DialogHandler)(self) proxy__ := lookupDialogHandlerProxy(me__.Base()) title_ := cefstrToString(title) - default_file_path_ := cefstrToString(default_file_path) - return C.int(proxy__.OnFileDialog(me__, (*Browser)(browser), FileDialogMode(mode), title_, default_file_path_, StringList(accept_filters), int32(selected_accept_filter), (*FileDialogCallback)(callback))) + defaultFilePath_ := cefstrToString(defaultFilePath) + return C.int(proxy__.OnFileDialog(me__, (*Browser)(browser), FileDialogMode(mode), title_, defaultFilePath_, StringList(acceptFilters), int32(selectedAcceptFilter), (*FileDialogCallback)(callback))) } diff --git a/cef/DictionaryValue_gen.go b/cef/DictionaryValue_gen.go index e0e01d8..c732f2c 100644 --- a/cef/DictionaryValue_gen.go +++ b/cef/DictionaryValue_gen.go @@ -9,7 +9,7 @@ import ( // int gocef_dictionary_value_is_read_only(cef_dictionary_value_t * self, int (CEF_CALLBACK *callback__)(cef_dictionary_value_t *)) { return callback__(self); } // int gocef_dictionary_value_is_same(cef_dictionary_value_t * self, cef_dictionary_value_t * that, int (CEF_CALLBACK *callback__)(cef_dictionary_value_t *, cef_dictionary_value_t *)) { return callback__(self, that); } // int gocef_dictionary_value_is_equal(cef_dictionary_value_t * self, cef_dictionary_value_t * that, int (CEF_CALLBACK *callback__)(cef_dictionary_value_t *, cef_dictionary_value_t *)) { return callback__(self, that); } - // cef_dictionary_value_t * gocef_dictionary_value_copy(cef_dictionary_value_t * self, int exclude_empty_children, cef_dictionary_value_t * (CEF_CALLBACK *callback__)(cef_dictionary_value_t *, int)) { return callback__(self, exclude_empty_children); } + // cef_dictionary_value_t * gocef_dictionary_value_copy(cef_dictionary_value_t * self, int excludeEmptyChildren, cef_dictionary_value_t * (CEF_CALLBACK *callback__)(cef_dictionary_value_t *, int)) { return callback__(self, excludeEmptyChildren); } // size_t gocef_dictionary_value_get_size(cef_dictionary_value_t * self, size_t (CEF_CALLBACK *callback__)(cef_dictionary_value_t *)) { return callback__(self); } // int gocef_dictionary_value_clear(cef_dictionary_value_t * self, int (CEF_CALLBACK *callback__)(cef_dictionary_value_t *)) { return callback__(self); } // int gocef_dictionary_value_has_key(cef_dictionary_value_t * self, cef_string_t * key, int (CEF_CALLBACK *callback__)(cef_dictionary_value_t *, cef_string_t *)) { return callback__(self, key); } @@ -91,8 +91,8 @@ func (d *DictionaryValue) IsEqual(that *DictionaryValue) int32 { // Copy (copy) // Returns a writable copy of this object. If |exclude_NULL_children| is true // (1) any NULL dictionaries or lists will be excluded from the copy. -func (d *DictionaryValue) Copy(exclude_empty_children int32) *DictionaryValue { - return (*DictionaryValue)(C.gocef_dictionary_value_copy(d.toNative(), C.int(exclude_empty_children), d.copy)) +func (d *DictionaryValue) Copy(excludeEmptyChildren int32) *DictionaryValue { + return (*DictionaryValue)(C.gocef_dictionary_value_copy(d.toNative(), C.int(excludeEmptyChildren), d.copy)) } // GetSize (get_size) diff --git a/cef/DisplayHandler_gen.go b/cef/DisplayHandler_gen.go index d225505..a22c6e6 100644 --- a/cef/DisplayHandler_gen.go +++ b/cef/DisplayHandler_gen.go @@ -16,14 +16,14 @@ import ( // DisplayHandlerProxy defines methods required for using DisplayHandler. type DisplayHandlerProxy interface { - OnAddressChange(self *DisplayHandler, browser *Browser, frame *Frame, url string) + OnAddressChange(self *DisplayHandler, browser *Browser, frame *Frame, uRL string) OnTitleChange(self *DisplayHandler, browser *Browser, title string) - OnFaviconUrlchange(self *DisplayHandler, browser *Browser, icon_urls StringList) + OnFaviconUrlchange(self *DisplayHandler, browser *Browser, iconUrls StringList) OnFullscreenModeChange(self *DisplayHandler, browser *Browser, fullscreen int32) OnTooltip(self *DisplayHandler, browser *Browser, text *string) int32 OnStatusMessage(self *DisplayHandler, browser *Browser, value string) OnConsoleMessage(self *DisplayHandler, browser *Browser, level LogSeverity, message, source string, line int32) int32 - OnAutoResize(self *DisplayHandler, browser *Browser, new_size *Size) int32 + OnAutoResize(self *DisplayHandler, browser *Browser, newSize *Size) int32 OnLoadingProgressChange(self *DisplayHandler, browser *Browser, progress float64) } @@ -66,17 +66,17 @@ func (d *DisplayHandler) Base() *BaseRefCounted { // OnAddressChange (on_address_change) // Called when a frame's address has changed. -func (d *DisplayHandler) OnAddressChange(browser *Browser, frame *Frame, url string) { - lookupDisplayHandlerProxy(d.Base()).OnAddressChange(d, browser, frame, url) +func (d *DisplayHandler) OnAddressChange(browser *Browser, frame *Frame, uRL string) { + lookupDisplayHandlerProxy(d.Base()).OnAddressChange(d, browser, frame, uRL) } //nolint:gocritic //export gocef_display_handler_on_address_change -func gocef_display_handler_on_address_change(self *C.cef_display_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, url *C.cef_string_t) { +func gocef_display_handler_on_address_change(self *C.cef_display_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, uRL *C.cef_string_t) { me__ := (*DisplayHandler)(self) proxy__ := lookupDisplayHandlerProxy(me__.Base()) - url_ := cefstrToString(url) - proxy__.OnAddressChange(me__, (*Browser)(browser), (*Frame)(frame), url_) + uRL_ := cefstrToString(uRL) + proxy__.OnAddressChange(me__, (*Browser)(browser), (*Frame)(frame), uRL_) } // OnTitleChange (on_title_change) @@ -96,16 +96,16 @@ func gocef_display_handler_on_title_change(self *C.cef_display_handler_t, browse // OnFaviconUrlchange (on_favicon_urlchange) // Called when the page icon changes. -func (d *DisplayHandler) OnFaviconUrlchange(browser *Browser, icon_urls StringList) { - lookupDisplayHandlerProxy(d.Base()).OnFaviconUrlchange(d, browser, icon_urls) +func (d *DisplayHandler) OnFaviconUrlchange(browser *Browser, iconUrls StringList) { + lookupDisplayHandlerProxy(d.Base()).OnFaviconUrlchange(d, browser, iconUrls) } //nolint:gocritic //export gocef_display_handler_on_favicon_urlchange -func gocef_display_handler_on_favicon_urlchange(self *C.cef_display_handler_t, browser *C.cef_browser_t, icon_urls C.cef_string_list_t) { +func gocef_display_handler_on_favicon_urlchange(self *C.cef_display_handler_t, browser *C.cef_browser_t, iconUrls C.cef_string_list_t) { me__ := (*DisplayHandler)(self) proxy__ := lookupDisplayHandlerProxy(me__.Base()) - proxy__.OnFaviconUrlchange(me__, (*Browser)(browser), StringList(icon_urls)) + proxy__.OnFaviconUrlchange(me__, (*Browser)(browser), StringList(iconUrls)) } // OnFullscreenModeChange (on_fullscreen_mode_change) @@ -184,17 +184,17 @@ func gocef_display_handler_on_console_message(self *C.cef_display_handler_t, bro // cef_browser_host_t::SetAutoResizeEnabled and the contents have auto- // resized. |new_size| will be the desired size in view coordinates. Return // true (1) if the resize was handled or false (0) for default handling. -func (d *DisplayHandler) OnAutoResize(browser *Browser, new_size *Size) int32 { - return lookupDisplayHandlerProxy(d.Base()).OnAutoResize(d, browser, new_size) +func (d *DisplayHandler) OnAutoResize(browser *Browser, newSize *Size) int32 { + return lookupDisplayHandlerProxy(d.Base()).OnAutoResize(d, browser, newSize) } //nolint:gocritic //export gocef_display_handler_on_auto_resize -func gocef_display_handler_on_auto_resize(self *C.cef_display_handler_t, browser *C.cef_browser_t, new_size *C.cef_size_t) C.int { +func gocef_display_handler_on_auto_resize(self *C.cef_display_handler_t, browser *C.cef_browser_t, newSize *C.cef_size_t) C.int { me__ := (*DisplayHandler)(self) proxy__ := lookupDisplayHandlerProxy(me__.Base()) - new_size_ := new_size.toGo() - return C.int(proxy__.OnAutoResize(me__, (*Browser)(browser), new_size_)) + newSize_ := newSize.toGo() + return C.int(proxy__.OnAutoResize(me__, (*Browser)(browser), newSize_)) } // OnLoadingProgressChange (on_loading_progress_change) diff --git a/cef/Display_gen.go b/cef/Display_gen.go index 14e1cee..1c5e1c3 100644 --- a/cef/Display_gen.go +++ b/cef/Display_gen.go @@ -33,9 +33,9 @@ func (d *Display) Base() *BaseRefCounted { return (*BaseRefCounted)(&d.base) } -// GetId (get_id) +// GetID (get_id) // Returns the unique identifier for this Display. -func (d *Display) GetId() int64 { +func (d *Display) GetID() int64 { return int64(C.gocef_display_get_id(d.toNative(), d.get_id)) } diff --git a/cef/Domdocument_gen.go b/cef/Domdocument_gen.go index 5e89622..97c1ec8 100644 --- a/cef/Domdocument_gen.go +++ b/cef/Domdocument_gen.go @@ -9,7 +9,7 @@ import ( // cef_domnode_t * gocef_domdocument_get_body(cef_domdocument_t * self, cef_domnode_t * (CEF_CALLBACK *callback__)(cef_domdocument_t *)) { return callback__(self); } // cef_domnode_t * gocef_domdocument_get_head(cef_domdocument_t * self, cef_domnode_t * (CEF_CALLBACK *callback__)(cef_domdocument_t *)) { return callback__(self); } // cef_string_userfree_t gocef_domdocument_get_title(cef_domdocument_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_domdocument_t *)) { return callback__(self); } - // cef_domnode_t * gocef_domdocument_get_element_by_id(cef_domdocument_t * self, cef_string_t * id, cef_domnode_t * (CEF_CALLBACK *callback__)(cef_domdocument_t *, cef_string_t *)) { return callback__(self, id); } + // cef_domnode_t * gocef_domdocument_get_element_by_id(cef_domdocument_t * self, cef_string_t * iD, cef_domnode_t * (CEF_CALLBACK *callback__)(cef_domdocument_t *, cef_string_t *)) { return callback__(self, iD); } // cef_domnode_t * gocef_domdocument_get_focused_node(cef_domdocument_t * self, cef_domnode_t * (CEF_CALLBACK *callback__)(cef_domdocument_t *)) { return callback__(self); } // int gocef_domdocument_has_selection(cef_domdocument_t * self, int (CEF_CALLBACK *callback__)(cef_domdocument_t *)) { return callback__(self); } // int gocef_domdocument_get_selection_start_offset(cef_domdocument_t * self, int (CEF_CALLBACK *callback__)(cef_domdocument_t *)) { return callback__(self); } @@ -67,15 +67,15 @@ func (d *Domdocument) GetTitle() string { return cefuserfreestrToString(C.gocef_domdocument_get_title(d.toNative(), d.get_title)) } -// GetElementById (get_element_by_id) +// GetElementByID (get_element_by_id) // Returns the document element with the specified ID value. -func (d *Domdocument) GetElementById(id string) *Domnode { - id_ := C.cef_string_userfree_alloc() - setCEFStr(id, id_) +func (d *Domdocument) GetElementByID(iD string) *Domnode { + iD_ := C.cef_string_userfree_alloc() + setCEFStr(iD, iD_) defer func() { - C.cef_string_userfree_free(id_) + C.cef_string_userfree_free(iD_) }() - return (*Domnode)(C.gocef_domdocument_get_element_by_id(d.toNative(), (*C.cef_string_t)(id_), d.get_element_by_id)) + return (*Domnode)(C.gocef_domdocument_get_element_by_id(d.toNative(), (*C.cef_string_t)(iD_), d.get_element_by_id)) } // GetFocusedNode (get_focused_node) @@ -116,18 +116,18 @@ func (d *Domdocument) GetSelectionAsText() string { return cefuserfreestrToString(C.gocef_domdocument_get_selection_as_text(d.toNative(), d.get_selection_as_text)) } -// GetBaseUrl (get_base_url) +// GetBaseURL (get_base_url) // Returns the base URL for the document. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *Domdocument) GetBaseUrl() string { +func (d *Domdocument) GetBaseURL() string { return cefuserfreestrToString(C.gocef_domdocument_get_base_url(d.toNative(), d.get_base_url)) } -// GetCompleteUrl (get_complete_url) +// GetCompleteURL (get_complete_url) // Returns a complete URL based on the document base URL and the specified // partial URL. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *Domdocument) GetCompleteUrl(partialURL string) string { +func (d *Domdocument) GetCompleteURL(partialURL string) string { partialURL_ := C.cef_string_userfree_alloc() setCEFStr(partialURL, partialURL_) defer func() { diff --git a/cef/DownloadHandler_gen.go b/cef/DownloadHandler_gen.go index 6b5d07d..6c824b9 100644 --- a/cef/DownloadHandler_gen.go +++ b/cef/DownloadHandler_gen.go @@ -16,8 +16,8 @@ import ( // DownloadHandlerProxy defines methods required for using DownloadHandler. type DownloadHandlerProxy interface { - OnBeforeDownload(self *DownloadHandler, browser *Browser, download_item *DownloadItem, suggested_name string, callback *BeforeDownloadCallback) - OnDownloadUpdated(self *DownloadHandler, browser *Browser, download_item *DownloadItem, callback *DownloadItemCallback) + OnBeforeDownload(self *DownloadHandler, browser *Browser, downloadItem *DownloadItem, suggestedName string, callback *BeforeDownloadCallback) + OnDownloadUpdated(self *DownloadHandler, browser *Browser, downloadItem *DownloadItem, callback *DownloadItemCallback) } // DownloadHandler (cef_download_handler_t from include/capi/cef_download_handler_capi.h) @@ -63,17 +63,17 @@ func (d *DownloadHandler) Base() *BaseRefCounted { // |callback| either asynchronously or in this function to continue the // download if desired. Do not keep a reference to |download_item| outside of // this function. -func (d *DownloadHandler) OnBeforeDownload(browser *Browser, download_item *DownloadItem, suggested_name string, callback *BeforeDownloadCallback) { - lookupDownloadHandlerProxy(d.Base()).OnBeforeDownload(d, browser, download_item, suggested_name, callback) +func (d *DownloadHandler) OnBeforeDownload(browser *Browser, downloadItem *DownloadItem, suggestedName string, callback *BeforeDownloadCallback) { + lookupDownloadHandlerProxy(d.Base()).OnBeforeDownload(d, browser, downloadItem, suggestedName, callback) } //nolint:gocritic //export gocef_download_handler_on_before_download -func gocef_download_handler_on_before_download(self *C.cef_download_handler_t, browser *C.cef_browser_t, download_item *C.cef_download_item_t, suggested_name *C.cef_string_t, callback *C.cef_before_download_callback_t) { +func gocef_download_handler_on_before_download(self *C.cef_download_handler_t, browser *C.cef_browser_t, downloadItem *C.cef_download_item_t, suggestedName *C.cef_string_t, callback *C.cef_before_download_callback_t) { me__ := (*DownloadHandler)(self) proxy__ := lookupDownloadHandlerProxy(me__.Base()) - suggested_name_ := cefstrToString(suggested_name) - proxy__.OnBeforeDownload(me__, (*Browser)(browser), (*DownloadItem)(download_item), suggested_name_, (*BeforeDownloadCallback)(callback)) + suggestedName_ := cefstrToString(suggestedName) + proxy__.OnBeforeDownload(me__, (*Browser)(browser), (*DownloadItem)(downloadItem), suggestedName_, (*BeforeDownloadCallback)(callback)) } // OnDownloadUpdated (on_download_updated) @@ -82,14 +82,14 @@ func gocef_download_handler_on_before_download(self *C.cef_download_handler_t, b // Execute |callback| either asynchronously or in this function to cancel the // download if desired. Do not keep a reference to |download_item| outside of // this function. -func (d *DownloadHandler) OnDownloadUpdated(browser *Browser, download_item *DownloadItem, callback *DownloadItemCallback) { - lookupDownloadHandlerProxy(d.Base()).OnDownloadUpdated(d, browser, download_item, callback) +func (d *DownloadHandler) OnDownloadUpdated(browser *Browser, downloadItem *DownloadItem, callback *DownloadItemCallback) { + lookupDownloadHandlerProxy(d.Base()).OnDownloadUpdated(d, browser, downloadItem, callback) } //nolint:gocritic //export gocef_download_handler_on_download_updated -func gocef_download_handler_on_download_updated(self *C.cef_download_handler_t, browser *C.cef_browser_t, download_item *C.cef_download_item_t, callback *C.cef_download_item_callback_t) { +func gocef_download_handler_on_download_updated(self *C.cef_download_handler_t, browser *C.cef_browser_t, downloadItem *C.cef_download_item_t, callback *C.cef_download_item_callback_t) { me__ := (*DownloadHandler)(self) proxy__ := lookupDownloadHandlerProxy(me__.Base()) - proxy__.OnDownloadUpdated(me__, (*Browser)(browser), (*DownloadItem)(download_item), (*DownloadItemCallback)(callback)) + proxy__.OnDownloadUpdated(me__, (*Browser)(browser), (*DownloadItem)(downloadItem), (*DownloadItemCallback)(callback)) } diff --git a/cef/DownloadImageCallback_gen.go b/cef/DownloadImageCallback_gen.go index fd5c40f..1494bc7 100644 --- a/cef/DownloadImageCallback_gen.go +++ b/cef/DownloadImageCallback_gen.go @@ -16,7 +16,7 @@ import ( // DownloadImageCallbackProxy defines methods required for using DownloadImageCallback. type DownloadImageCallbackProxy interface { - OnDownloadImageFinished(self *DownloadImageCallback, image_url string, http_status_code int32, image *Image) + OnDownloadImageFinished(self *DownloadImageCallback, imageURL string, hTTPStatusCode int32, image *Image) } // DownloadImageCallback (cef_download_image_callback_t from include/capi/cef_browser_capi.h) @@ -61,15 +61,15 @@ func (d *DownloadImageCallback) Base() *BaseRefCounted { // |image_url| is the URL that was downloaded and |http_status_code| is the // resulting HTTP status code. |image| is the resulting image, possibly at // multiple scale factors, or NULL if the download failed. -func (d *DownloadImageCallback) OnDownloadImageFinished(image_url string, http_status_code int32, image *Image) { - lookupDownloadImageCallbackProxy(d.Base()).OnDownloadImageFinished(d, image_url, http_status_code, image) +func (d *DownloadImageCallback) OnDownloadImageFinished(imageURL string, hTTPStatusCode int32, image *Image) { + lookupDownloadImageCallbackProxy(d.Base()).OnDownloadImageFinished(d, imageURL, hTTPStatusCode, image) } //nolint:gocritic //export gocef_download_image_callback_on_download_image_finished -func gocef_download_image_callback_on_download_image_finished(self *C.cef_download_image_callback_t, image_url *C.cef_string_t, http_status_code C.int, image *C.cef_image_t) { +func gocef_download_image_callback_on_download_image_finished(self *C.cef_download_image_callback_t, imageURL *C.cef_string_t, hTTPStatusCode C.int, image *C.cef_image_t) { me__ := (*DownloadImageCallback)(self) proxy__ := lookupDownloadImageCallbackProxy(me__.Base()) - image_url_ := cefstrToString(image_url) - proxy__.OnDownloadImageFinished(me__, image_url_, int32(http_status_code), (*Image)(image)) + imageURL_ := cefstrToString(imageURL) + proxy__.OnDownloadImageFinished(me__, imageURL_, int32(hTTPStatusCode), (*Image)(image)) } diff --git a/cef/DownloadItem_gen.go b/cef/DownloadItem_gen.go index 1694a10..7ceebe7 100644 --- a/cef/DownloadItem_gen.go +++ b/cef/DownloadItem_gen.go @@ -113,23 +113,23 @@ func (d *DownloadItem) GetFullPath() string { return cefuserfreestrToString(C.gocef_download_item_get_full_path(d.toNative(), d.get_full_path)) } -// GetId (get_id) +// GetID (get_id) // Returns the unique identifier for this download. -func (d *DownloadItem) GetId() uint32 { +func (d *DownloadItem) GetID() uint32 { return uint32(C.gocef_download_item_get_id(d.toNative(), d.get_id)) } -// GetUrl (get_url) +// GetURL (get_url) // Returns the URL. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *DownloadItem) GetUrl() string { +func (d *DownloadItem) GetURL() string { return cefuserfreestrToString(C.gocef_download_item_get_url(d.toNative(), d.get_url)) } -// GetOriginalUrl (get_original_url) +// GetOriginalURL (get_original_url) // Returns the original URL before any redirections. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *DownloadItem) GetOriginalUrl() string { +func (d *DownloadItem) GetOriginalURL() string { return cefuserfreestrToString(C.gocef_download_item_get_original_url(d.toNative(), d.get_original_url)) } diff --git a/cef/DragData_gen.go b/cef/DragData_gen.go index 76830e3..a31c6b9 100644 --- a/cef/DragData_gen.go +++ b/cef/DragData_gen.go @@ -18,14 +18,14 @@ import ( // cef_string_userfree_t gocef_drag_data_get_file_name(cef_drag_data_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_drag_data_t *)) { return callback__(self); } // size_t gocef_drag_data_get_file_contents(cef_drag_data_t * self, cef_stream_writer_t * writer, size_t (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_stream_writer_t *)) { return callback__(self, writer); } // int gocef_drag_data_get_file_names(cef_drag_data_t * self, cef_string_list_t names, int (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_list_t)) { return callback__(self, names); } - // void gocef_drag_data_set_link_url(cef_drag_data_t * self, cef_string_t * url, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, url); } + // void gocef_drag_data_set_link_url(cef_drag_data_t * self, cef_string_t * uRL, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, uRL); } // void gocef_drag_data_set_link_title(cef_drag_data_t * self, cef_string_t * title, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, title); } // void gocef_drag_data_set_link_metadata(cef_drag_data_t * self, cef_string_t * data, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, data); } // void gocef_drag_data_set_fragment_text(cef_drag_data_t * self, cef_string_t * text, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, text); } - // void gocef_drag_data_set_fragment_html(cef_drag_data_t * self, cef_string_t * html, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, html); } - // void gocef_drag_data_set_fragment_base_url(cef_drag_data_t * self, cef_string_t * base_url, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, base_url); } + // void gocef_drag_data_set_fragment_html(cef_drag_data_t * self, cef_string_t * hTML, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, hTML); } + // void gocef_drag_data_set_fragment_base_url(cef_drag_data_t * self, cef_string_t * baseURL, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *)) { return callback__(self, baseURL); } // void gocef_drag_data_reset_file_contents(cef_drag_data_t * self, void (CEF_CALLBACK *callback__)(cef_drag_data_t *)) { return callback__(self); } - // void gocef_drag_data_add_file(cef_drag_data_t * self, cef_string_t * path, cef_string_t * display_name, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *, cef_string_t *)) { return callback__(self, path, display_name); } + // void gocef_drag_data_add_file(cef_drag_data_t * self, cef_string_t * path, cef_string_t * displayName, void (CEF_CALLBACK *callback__)(cef_drag_data_t *, cef_string_t *, cef_string_t *)) { return callback__(self, path, displayName); } // cef_image_t * gocef_drag_data_get_image(cef_drag_data_t * self, cef_image_t * (CEF_CALLBACK *callback__)(cef_drag_data_t *)) { return callback__(self); } // cef_point_t gocef_drag_data_get_image_hotspot(cef_drag_data_t * self, cef_point_t (CEF_CALLBACK *callback__)(cef_drag_data_t *)) { return callback__(self); } // int gocef_drag_data_has_image(cef_drag_data_t * self, int (CEF_CALLBACK *callback__)(cef_drag_data_t *)) { return callback__(self); } @@ -77,10 +77,10 @@ func (d *DragData) IsFile() int32 { return int32(C.gocef_drag_data_is_file(d.toNative(), d.is_file)) } -// GetLinkUrl (get_link_url) +// GetLinkURL (get_link_url) // Return the link URL that is being dragged. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *DragData) GetLinkUrl() string { +func (d *DragData) GetLinkURL() string { return cefuserfreestrToString(C.gocef_drag_data_get_link_url(d.toNative(), d.get_link_url)) } @@ -105,18 +105,18 @@ func (d *DragData) GetFragmentText() string { return cefuserfreestrToString(C.gocef_drag_data_get_fragment_text(d.toNative(), d.get_fragment_text)) } -// GetFragmentHtml (get_fragment_html) +// GetFragmentHTML (get_fragment_html) // Return the text/html fragment that is being dragged. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *DragData) GetFragmentHtml() string { +func (d *DragData) GetFragmentHTML() string { return cefuserfreestrToString(C.gocef_drag_data_get_fragment_html(d.toNative(), d.get_fragment_html)) } -// GetFragmentBaseUrl (get_fragment_base_url) +// GetFragmentBaseURL (get_fragment_base_url) // Return the base URL that the fragment came from. This value is used for // resolving relative URLs and may be NULL. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *DragData) GetFragmentBaseUrl() string { +func (d *DragData) GetFragmentBaseURL() string { return cefuserfreestrToString(C.gocef_drag_data_get_fragment_base_url(d.toNative(), d.get_fragment_base_url)) } @@ -143,15 +143,15 @@ func (d *DragData) GetFileNames(names StringList) int32 { return int32(C.gocef_drag_data_get_file_names(d.toNative(), C.cef_string_list_t(names), d.get_file_names)) } -// SetLinkUrl (set_link_url) +// SetLinkURL (set_link_url) // Set the link URL that is being dragged. -func (d *DragData) SetLinkUrl(url string) { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *DragData) SetLinkURL(uRL string) { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - C.gocef_drag_data_set_link_url(d.toNative(), (*C.cef_string_t)(url_), d.set_link_url) + C.gocef_drag_data_set_link_url(d.toNative(), (*C.cef_string_t)(uRL_), d.set_link_url) } // SetLinkTitle (set_link_title) @@ -187,26 +187,26 @@ func (d *DragData) SetFragmentText(text string) { C.gocef_drag_data_set_fragment_text(d.toNative(), (*C.cef_string_t)(text_), d.set_fragment_text) } -// SetFragmentHtml (set_fragment_html) +// SetFragmentHTML (set_fragment_html) // Set the text/html fragment that is being dragged. -func (d *DragData) SetFragmentHtml(html string) { - html_ := C.cef_string_userfree_alloc() - setCEFStr(html, html_) +func (d *DragData) SetFragmentHTML(hTML string) { + hTML_ := C.cef_string_userfree_alloc() + setCEFStr(hTML, hTML_) defer func() { - C.cef_string_userfree_free(html_) + C.cef_string_userfree_free(hTML_) }() - C.gocef_drag_data_set_fragment_html(d.toNative(), (*C.cef_string_t)(html_), d.set_fragment_html) + C.gocef_drag_data_set_fragment_html(d.toNative(), (*C.cef_string_t)(hTML_), d.set_fragment_html) } -// SetFragmentBaseUrl (set_fragment_base_url) +// SetFragmentBaseURL (set_fragment_base_url) // Set the base URL that the fragment came from. -func (d *DragData) SetFragmentBaseUrl(base_url string) { - base_url_ := C.cef_string_userfree_alloc() - setCEFStr(base_url, base_url_) +func (d *DragData) SetFragmentBaseURL(baseURL string) { + baseURL_ := C.cef_string_userfree_alloc() + setCEFStr(baseURL, baseURL_) defer func() { - C.cef_string_userfree_free(base_url_) + C.cef_string_userfree_free(baseURL_) }() - C.gocef_drag_data_set_fragment_base_url(d.toNative(), (*C.cef_string_t)(base_url_), d.set_fragment_base_url) + C.gocef_drag_data_set_fragment_base_url(d.toNative(), (*C.cef_string_t)(baseURL_), d.set_fragment_base_url) } // ResetFileContents (reset_file_contents) @@ -219,18 +219,18 @@ func (d *DragData) ResetFileContents() { // AddFile (add_file) // Add a file that is being dragged into the webview. -func (d *DragData) AddFile(path, display_name string) { +func (d *DragData) AddFile(path, displayName string) { path_ := C.cef_string_userfree_alloc() setCEFStr(path, path_) defer func() { C.cef_string_userfree_free(path_) }() - display_name_ := C.cef_string_userfree_alloc() - setCEFStr(display_name, display_name_) + displayName_ := C.cef_string_userfree_alloc() + setCEFStr(displayName, displayName_) defer func() { - C.cef_string_userfree_free(display_name_) + C.cef_string_userfree_free(displayName_) }() - C.gocef_drag_data_add_file(d.toNative(), (*C.cef_string_t)(path_), (*C.cef_string_t)(display_name_), d.add_file) + C.gocef_drag_data_add_file(d.toNative(), (*C.cef_string_t)(path_), (*C.cef_string_t)(displayName_), d.add_file) } // GetImage (get_image) diff --git a/cef/ExtensionHandler_gen.go b/cef/ExtensionHandler_gen.go index 882f000..cc8a95e 100644 --- a/cef/ExtensionHandler_gen.go +++ b/cef/ExtensionHandler_gen.go @@ -19,10 +19,10 @@ type ExtensionHandlerProxy interface { OnExtensionLoadFailed(self *ExtensionHandler, result Errorcode) OnExtensionLoaded(self *ExtensionHandler, extension *Extension) OnExtensionUnloaded(self *ExtensionHandler, extension *Extension) - OnBeforeBackgroundBrowser(self *ExtensionHandler, extension *Extension, url string, client **Client, settings *BrowserSettings) int32 - OnBeforeBrowser(self *ExtensionHandler, extension *Extension, browser, active_browser *Browser, index int32, url string, active int32, windowInfo *WindowInfo, client **Client, settings *BrowserSettings) int32 - GetActiveBrowser(self *ExtensionHandler, extension *Extension, browser *Browser, include_incognito int32) *Browser - CanAccessBrowser(self *ExtensionHandler, extension *Extension, browser *Browser, include_incognito int32, target_browser *Browser) int32 + OnBeforeBackgroundBrowser(self *ExtensionHandler, extension *Extension, uRL string, client **Client, settings *BrowserSettings) int32 + OnBeforeBrowser(self *ExtensionHandler, extension *Extension, browser, activeBrowser *Browser, index int32, uRL string, active int32, windowInfo *WindowInfo, client **Client, settings *BrowserSettings) int32 + GetActiveBrowser(self *ExtensionHandler, extension *Extension, browser *Browser, includeIncognito int32) *Browser + CanAccessBrowser(self *ExtensionHandler, extension *Extension, browser *Browser, includeIncognito int32, targetBrowser *Browser) int32 GetExtensionResource(self *ExtensionHandler, extension *Extension, browser *Browser, file string, callback *GetExtensionResourceCallback) int32 } @@ -122,20 +122,20 @@ func gocef_extension_handler_on_extension_unloaded(self *C.cef_extension_handler // cef_browser_host_t::IsBackgroundHost will return true (1) for the resulting // browser. See https://developer.chrome.com/extensions/event_pages for more // information about extension background script usage. -func (d *ExtensionHandler) OnBeforeBackgroundBrowser(extension *Extension, url string, client **Client, settings *BrowserSettings) int32 { - return lookupExtensionHandlerProxy(d.Base()).OnBeforeBackgroundBrowser(d, extension, url, client, settings) +func (d *ExtensionHandler) OnBeforeBackgroundBrowser(extension *Extension, uRL string, client **Client, settings *BrowserSettings) int32 { + return lookupExtensionHandlerProxy(d.Base()).OnBeforeBackgroundBrowser(d, extension, uRL, client, settings) } //nolint:gocritic //export gocef_extension_handler_on_before_background_browser -func gocef_extension_handler_on_before_background_browser(self *C.cef_extension_handler_t, extension *C.cef_extension_t, url *C.cef_string_t, client **C.cef_client_t, settings *C.cef_browser_settings_t) C.int { +func gocef_extension_handler_on_before_background_browser(self *C.cef_extension_handler_t, extension *C.cef_extension_t, uRL *C.cef_string_t, client **C.cef_client_t, settings *C.cef_browser_settings_t) C.int { me__ := (*ExtensionHandler)(self) proxy__ := lookupExtensionHandlerProxy(me__.Base()) - url_ := cefstrToString(url) + uRL_ := cefstrToString(uRL) client_ := (*Client)(*client) client__p := &client_ settings_ := settings.toGo() - return C.int(proxy__.OnBeforeBackgroundBrowser(me__, (*Extension)(extension), url_, client__p, settings_)) + return C.int(proxy__.OnBeforeBackgroundBrowser(me__, (*Extension)(extension), uRL_, client__p, settings_)) } // OnBeforeBrowser (on_before_browser) @@ -152,21 +152,21 @@ func gocef_extension_handler_on_before_background_browser(self *C.cef_extension_ // indicated by a call to cef_life_span_handler_t::OnAfterCreated. Any // modifications to |windowInfo| will be ignored if |active_browser| is // wrapped in a cef_browser_view_t. -func (d *ExtensionHandler) OnBeforeBrowser(extension *Extension, browser, active_browser *Browser, index int32, url string, active int32, windowInfo *WindowInfo, client **Client, settings *BrowserSettings) int32 { - return lookupExtensionHandlerProxy(d.Base()).OnBeforeBrowser(d, extension, browser, active_browser, index, url, active, windowInfo, client, settings) +func (d *ExtensionHandler) OnBeforeBrowser(extension *Extension, browser, activeBrowser *Browser, index int32, uRL string, active int32, windowInfo *WindowInfo, client **Client, settings *BrowserSettings) int32 { + return lookupExtensionHandlerProxy(d.Base()).OnBeforeBrowser(d, extension, browser, activeBrowser, index, uRL, active, windowInfo, client, settings) } //nolint:gocritic //export gocef_extension_handler_on_before_browser -func gocef_extension_handler_on_before_browser(self *C.cef_extension_handler_t, extension *C.cef_extension_t, browser *C.cef_browser_t, active_browser *C.cef_browser_t, index C.int, url *C.cef_string_t, active C.int, windowInfo *C.cef_window_info_t, client **C.cef_client_t, settings *C.cef_browser_settings_t) C.int { +func gocef_extension_handler_on_before_browser(self *C.cef_extension_handler_t, extension *C.cef_extension_t, browser *C.cef_browser_t, activeBrowser *C.cef_browser_t, index C.int, uRL *C.cef_string_t, active C.int, windowInfo *C.cef_window_info_t, client **C.cef_client_t, settings *C.cef_browser_settings_t) C.int { me__ := (*ExtensionHandler)(self) proxy__ := lookupExtensionHandlerProxy(me__.Base()) - url_ := cefstrToString(url) + uRL_ := cefstrToString(uRL) windowInfo_ := windowInfo.toGo() client_ := (*Client)(*client) client__p := &client_ settings_ := settings.toGo() - return C.int(proxy__.OnBeforeBrowser(me__, (*Extension)(extension), (*Browser)(browser), (*Browser)(active_browser), int32(index), url_, int32(active), windowInfo_, client__p, settings_)) + return C.int(proxy__.OnBeforeBrowser(me__, (*Extension)(extension), (*Browser)(browser), (*Browser)(activeBrowser), int32(index), uRL_, int32(active), windowInfo_, client__p, settings_)) } // GetActiveBrowser (get_active_browser) @@ -177,16 +177,16 @@ func gocef_extension_handler_on_before_browser(self *C.cef_extension_handler_t, // the same cef_request_tContext as |browser|. Incognito browsers should not // be considered unless the source extension has incognito access enabled, in // which case |include_incognito| will be true (1). -func (d *ExtensionHandler) GetActiveBrowser(extension *Extension, browser *Browser, include_incognito int32) *Browser { - return lookupExtensionHandlerProxy(d.Base()).GetActiveBrowser(d, extension, browser, include_incognito) +func (d *ExtensionHandler) GetActiveBrowser(extension *Extension, browser *Browser, includeIncognito int32) *Browser { + return lookupExtensionHandlerProxy(d.Base()).GetActiveBrowser(d, extension, browser, includeIncognito) } //nolint:gocritic //export gocef_extension_handler_get_active_browser -func gocef_extension_handler_get_active_browser(self *C.cef_extension_handler_t, extension *C.cef_extension_t, browser *C.cef_browser_t, include_incognito C.int) *C.cef_browser_t { +func gocef_extension_handler_get_active_browser(self *C.cef_extension_handler_t, extension *C.cef_extension_t, browser *C.cef_browser_t, includeIncognito C.int) *C.cef_browser_t { me__ := (*ExtensionHandler)(self) proxy__ := lookupExtensionHandlerProxy(me__.Base()) - return (proxy__.GetActiveBrowser(me__, (*Extension)(extension), (*Browser)(browser), int32(include_incognito))).toNative() + return (proxy__.GetActiveBrowser(me__, (*Extension)(extension), (*Browser)(browser), int32(includeIncognito))).toNative() } // CanAccessBrowser (can_access_browser) @@ -196,16 +196,16 @@ func gocef_extension_handler_get_active_browser(self *C.cef_extension_handler_t, // to allow access of false (0) to deny access. Access to incognito browsers // should not be allowed unless the source extension has incognito access // enabled, in which case |include_incognito| will be true (1). -func (d *ExtensionHandler) CanAccessBrowser(extension *Extension, browser *Browser, include_incognito int32, target_browser *Browser) int32 { - return lookupExtensionHandlerProxy(d.Base()).CanAccessBrowser(d, extension, browser, include_incognito, target_browser) +func (d *ExtensionHandler) CanAccessBrowser(extension *Extension, browser *Browser, includeIncognito int32, targetBrowser *Browser) int32 { + return lookupExtensionHandlerProxy(d.Base()).CanAccessBrowser(d, extension, browser, includeIncognito, targetBrowser) } //nolint:gocritic //export gocef_extension_handler_can_access_browser -func gocef_extension_handler_can_access_browser(self *C.cef_extension_handler_t, extension *C.cef_extension_t, browser *C.cef_browser_t, include_incognito C.int, target_browser *C.cef_browser_t) C.int { +func gocef_extension_handler_can_access_browser(self *C.cef_extension_handler_t, extension *C.cef_extension_t, browser *C.cef_browser_t, includeIncognito C.int, targetBrowser *C.cef_browser_t) C.int { me__ := (*ExtensionHandler)(self) proxy__ := lookupExtensionHandlerProxy(me__.Base()) - return C.int(proxy__.CanAccessBrowser(me__, (*Extension)(extension), (*Browser)(browser), int32(include_incognito), (*Browser)(target_browser))) + return C.int(proxy__.CanAccessBrowser(me__, (*Extension)(extension), (*Browser)(browser), int32(includeIncognito), (*Browser)(targetBrowser))) } // GetExtensionResource (get_extension_resource) diff --git a/cef/FileDialogCallback_gen.go b/cef/FileDialogCallback_gen.go index 4a9aa85..df82500 100644 --- a/cef/FileDialogCallback_gen.go +++ b/cef/FileDialogCallback_gen.go @@ -16,7 +16,7 @@ import ( // FileDialogCallbackProxy defines methods required for using FileDialogCallback. type FileDialogCallbackProxy interface { - Cont(self *FileDialogCallback, selected_accept_filter int32, file_paths StringList) + Cont(self *FileDialogCallback, selectedAcceptFilter int32, filePaths StringList) Cancel(self *FileDialogCallback) } @@ -62,16 +62,16 @@ func (d *FileDialogCallback) Base() *BaseRefCounted { // cef_dialog_handler_t::OnFileDialog. |file_paths| should be a single value // or a list of values depending on the dialog mode. An NULL |file_paths| // value is treated the same as calling cancel(). -func (d *FileDialogCallback) Cont(selected_accept_filter int32, file_paths StringList) { - lookupFileDialogCallbackProxy(d.Base()).Cont(d, selected_accept_filter, file_paths) +func (d *FileDialogCallback) Cont(selectedAcceptFilter int32, filePaths StringList) { + lookupFileDialogCallbackProxy(d.Base()).Cont(d, selectedAcceptFilter, filePaths) } //nolint:gocritic //export gocef_file_dialog_callback_cont -func gocef_file_dialog_callback_cont(self *C.cef_file_dialog_callback_t, selected_accept_filter C.int, file_paths C.cef_string_list_t) { +func gocef_file_dialog_callback_cont(self *C.cef_file_dialog_callback_t, selectedAcceptFilter C.int, filePaths C.cef_string_list_t) { me__ := (*FileDialogCallback)(self) proxy__ := lookupFileDialogCallbackProxy(me__.Base()) - proxy__.Cont(me__, int32(selected_accept_filter), StringList(file_paths)) + proxy__.Cont(me__, int32(selectedAcceptFilter), StringList(filePaths)) } // Cancel (cancel) diff --git a/cef/Frame_gen.go b/cef/Frame_gen.go index 0232f1e..9ac9e41 100644 --- a/cef/Frame_gen.go +++ b/cef/Frame_gen.go @@ -16,9 +16,9 @@ import ( // void gocef_frame_get_source(cef_frame_t * self, cef_string_visitor_t * visitor, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_string_visitor_t *)) { return callback__(self, visitor); } // void gocef_frame_get_text(cef_frame_t * self, cef_string_visitor_t * visitor, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_string_visitor_t *)) { return callback__(self, visitor); } // void gocef_frame_load_request(cef_frame_t * self, cef_request_t * request, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_request_t *)) { return callback__(self, request); } - // void gocef_frame_load_url(cef_frame_t * self, cef_string_t * url, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_string_t *)) { return callback__(self, url); } - // void gocef_frame_load_string(cef_frame_t * self, cef_string_t * string_val, cef_string_t * url, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_string_t *, cef_string_t *)) { return callback__(self, string_val, url); } - // void gocef_frame_execute_java_script(cef_frame_t * self, cef_string_t * code, cef_string_t * script_url, int start_line, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_string_t *, cef_string_t *, int)) { return callback__(self, code, script_url, start_line); } + // void gocef_frame_load_url(cef_frame_t * self, cef_string_t * uRL, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_string_t *)) { return callback__(self, uRL); } + // void gocef_frame_load_string(cef_frame_t * self, cef_string_t * stringVal, cef_string_t * uRL, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_string_t *, cef_string_t *)) { return callback__(self, stringVal, uRL); } + // void gocef_frame_execute_java_script(cef_frame_t * self, cef_string_t * code, cef_string_t * scriptURL, int startLine, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_string_t *, cef_string_t *, int)) { return callback__(self, code, scriptURL, startLine); } // int gocef_frame_is_main(cef_frame_t * self, int (CEF_CALLBACK *callback__)(cef_frame_t *)) { return callback__(self); } // int gocef_frame_is_focused(cef_frame_t * self, int (CEF_CALLBACK *callback__)(cef_frame_t *)) { return callback__(self); } // cef_string_userfree_t gocef_frame_get_name(cef_frame_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_frame_t *)) { return callback__(self); } @@ -29,7 +29,7 @@ import ( // cef_v8context_t * gocef_frame_get_v8context(cef_frame_t * self, cef_v8context_t * (CEF_CALLBACK *callback__)(cef_frame_t *)) { return callback__(self); } // void gocef_frame_visit_dom(cef_frame_t * self, cef_domvisitor_t * visitor, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_domvisitor_t *)) { return callback__(self, visitor); } // cef_urlrequest_t * gocef_frame_create_urlrequest(cef_frame_t * self, cef_request_t * request, cef_urlrequest_client_t * client, cef_urlrequest_t * (CEF_CALLBACK *callback__)(cef_frame_t *, cef_request_t *, cef_urlrequest_client_t *)) { return callback__(self, request, client); } - // void gocef_frame_send_process_message(cef_frame_t * self, cef_process_id_t target_process, cef_process_message_t * message, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_process_id_t, cef_process_message_t *)) { return callback__(self, target_process, message); } + // void gocef_frame_send_process_message(cef_frame_t * self, cef_process_id_t targetProcess, cef_process_message_t * message, void (CEF_CALLBACK *callback__)(cef_frame_t *, cef_process_id_t, cef_process_message_t *)) { return callback__(self, targetProcess, message); } "C" ) @@ -126,33 +126,33 @@ func (d *Frame) LoadRequest(request *Request) { C.gocef_frame_load_request(d.toNative(), request.toNative(), d.load_request) } -// LoadUrl (load_url) +// LoadURL (load_url) // Load the specified |url|. -func (d *Frame) LoadUrl(url string) { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *Frame) LoadURL(uRL string) { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - C.gocef_frame_load_url(d.toNative(), (*C.cef_string_t)(url_), d.load_url) + C.gocef_frame_load_url(d.toNative(), (*C.cef_string_t)(uRL_), d.load_url) } // LoadString (load_string) // Load the contents of |string_val| with the specified dummy |url|. |url| // should have a standard scheme (for example, http scheme) or behaviors like // link clicks and web security restrictions may not behave as expected. -func (d *Frame) LoadString(string_val, url string) { - string_val_ := C.cef_string_userfree_alloc() - setCEFStr(string_val, string_val_) +func (d *Frame) LoadString(stringVal, uRL string) { + stringVal_ := C.cef_string_userfree_alloc() + setCEFStr(stringVal, stringVal_) defer func() { - C.cef_string_userfree_free(string_val_) + C.cef_string_userfree_free(stringVal_) }() - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - C.gocef_frame_load_string(d.toNative(), (*C.cef_string_t)(string_val_), (*C.cef_string_t)(url_), d.load_string) + C.gocef_frame_load_string(d.toNative(), (*C.cef_string_t)(stringVal_), (*C.cef_string_t)(uRL_), d.load_string) } // ExecuteJavaScript (execute_java_script) @@ -161,18 +161,18 @@ func (d *Frame) LoadString(string_val, url string) { // renderer may request this URL to show the developer the source of the // error. The |start_line| parameter is the base line number to use for error // reporting. -func (d *Frame) ExecuteJavaScript(code, script_url string, start_line int32) { +func (d *Frame) ExecuteJavaScript(code, scriptURL string, startLine int32) { code_ := C.cef_string_userfree_alloc() setCEFStr(code, code_) defer func() { C.cef_string_userfree_free(code_) }() - script_url_ := C.cef_string_userfree_alloc() - setCEFStr(script_url, script_url_) + scriptURL_ := C.cef_string_userfree_alloc() + setCEFStr(scriptURL, scriptURL_) defer func() { - C.cef_string_userfree_free(script_url_) + C.cef_string_userfree_free(scriptURL_) }() - C.gocef_frame_execute_java_script(d.toNative(), (*C.cef_string_t)(code_), (*C.cef_string_t)(script_url_), C.int(start_line), d.execute_java_script) + C.gocef_frame_execute_java_script(d.toNative(), (*C.cef_string_t)(code_), (*C.cef_string_t)(scriptURL_), C.int(startLine), d.execute_java_script) } // IsMain (is_main) @@ -212,10 +212,10 @@ func (d *Frame) GetParent() *Frame { return (*Frame)(C.gocef_frame_get_parent(d.toNative(), d.get_parent)) } -// GetUrl (get_url) +// GetURL (get_url) // Returns the URL currently loaded in this frame. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *Frame) GetUrl() string { +func (d *Frame) GetURL() string { return cefuserfreestrToString(C.gocef_frame_get_url(d.toNative(), d.get_url)) } @@ -232,10 +232,10 @@ func (d *Frame) GetV8context() *V8context { return (*V8context)(C.gocef_frame_get_v8context(d.toNative(), d.get_v8context)) } -// VisitDom (visit_dom) +// VisitDOM (visit_dom) // Visit the DOM document. This function can only be called from the render // process. -func (d *Frame) VisitDom(visitor *Domvisitor) { +func (d *Frame) VisitDOM(visitor *Domvisitor) { C.gocef_frame_visit_dom(d.toNative(), visitor.toNative(), d.visit_dom) } @@ -269,6 +269,6 @@ func (d *Frame) CreateUrlrequest(request *Request, client *UrlrequestClient) *Ur // guaranteed in all cases (for example, if the browser is closing, // navigating, or if the target process crashes). Send an ACK message back // from the target process if confirmation is required. -func (d *Frame) SendProcessMessage(target_process ProcessID, message *ProcessMessage) { - C.gocef_frame_send_process_message(d.toNative(), C.cef_process_id_t(target_process), message.toNative(), d.send_process_message) +func (d *Frame) SendProcessMessage(targetProcess ProcessID, message *ProcessMessage) { + C.gocef_frame_send_process_message(d.toNative(), C.cef_process_id_t(targetProcess), message.toNative(), d.send_process_message) } diff --git a/cef/Image_gen.go b/cef/Image_gen.go index ab54f33..55e1920 100644 --- a/cef/Image_gen.go +++ b/cef/Image_gen.go @@ -8,17 +8,17 @@ import ( // #include "capi_gen.h" // int gocef_image_is_empty(cef_image_t * self, int (CEF_CALLBACK *callback__)(cef_image_t *)) { return callback__(self); } // int gocef_image_is_same(cef_image_t * self, cef_image_t * that, int (CEF_CALLBACK *callback__)(cef_image_t *, cef_image_t *)) { return callback__(self, that); } - // int gocef_image_add_bitmap(cef_image_t * self, float scale_factor, int pixel_width, int pixel_height, cef_color_type_t color_type, cef_alpha_type_t alpha_type, void * pixel_data, size_t pixel_data_size, int (CEF_CALLBACK *callback__)(cef_image_t *, float, int, int, cef_color_type_t, cef_alpha_type_t, void *, size_t)) { return callback__(self, scale_factor, pixel_width, pixel_height, color_type, alpha_type, pixel_data, pixel_data_size); } - // int gocef_image_add_png(cef_image_t * self, float scale_factor, void * png_data, size_t png_data_size, int (CEF_CALLBACK *callback__)(cef_image_t *, float, void *, size_t)) { return callback__(self, scale_factor, png_data, png_data_size); } - // int gocef_image_add_jpeg(cef_image_t * self, float scale_factor, void * jpeg_data, size_t jpeg_data_size, int (CEF_CALLBACK *callback__)(cef_image_t *, float, void *, size_t)) { return callback__(self, scale_factor, jpeg_data, jpeg_data_size); } + // int gocef_image_add_bitmap(cef_image_t * self, float scaleFactor, int pixelWidth, int pixelHeight, cef_color_type_t colorType, cef_alpha_type_t alphaType, void * pixelData, size_t pixelDataSize, int (CEF_CALLBACK *callback__)(cef_image_t *, float, int, int, cef_color_type_t, cef_alpha_type_t, void *, size_t)) { return callback__(self, scaleFactor, pixelWidth, pixelHeight, colorType, alphaType, pixelData, pixelDataSize); } + // int gocef_image_add_png(cef_image_t * self, float scaleFactor, void * pngData, size_t pngDataSize, int (CEF_CALLBACK *callback__)(cef_image_t *, float, void *, size_t)) { return callback__(self, scaleFactor, pngData, pngDataSize); } + // int gocef_image_add_jpeg(cef_image_t * self, float scaleFactor, void * jpegData, size_t jpegDataSize, int (CEF_CALLBACK *callback__)(cef_image_t *, float, void *, size_t)) { return callback__(self, scaleFactor, jpegData, jpegDataSize); } // size_t gocef_image_get_width(cef_image_t * self, size_t (CEF_CALLBACK *callback__)(cef_image_t *)) { return callback__(self); } // size_t gocef_image_get_height(cef_image_t * self, size_t (CEF_CALLBACK *callback__)(cef_image_t *)) { return callback__(self); } - // int gocef_image_has_representation(cef_image_t * self, float scale_factor, int (CEF_CALLBACK *callback__)(cef_image_t *, float)) { return callback__(self, scale_factor); } - // int gocef_image_remove_representation(cef_image_t * self, float scale_factor, int (CEF_CALLBACK *callback__)(cef_image_t *, float)) { return callback__(self, scale_factor); } - // int gocef_image_get_representation_info(cef_image_t * self, float scale_factor, float * actual_scale_factor, int * pixel_width, int * pixel_height, int (CEF_CALLBACK *callback__)(cef_image_t *, float, float *, int *, int *)) { return callback__(self, scale_factor, actual_scale_factor, pixel_width, pixel_height); } - // cef_binary_value_t * gocef_image_get_as_bitmap(cef_image_t * self, float scale_factor, cef_color_type_t color_type, cef_alpha_type_t alpha_type, int * pixel_width, int * pixel_height, cef_binary_value_t * (CEF_CALLBACK *callback__)(cef_image_t *, float, cef_color_type_t, cef_alpha_type_t, int *, int *)) { return callback__(self, scale_factor, color_type, alpha_type, pixel_width, pixel_height); } - // cef_binary_value_t * gocef_image_get_as_png(cef_image_t * self, float scale_factor, int with_transparency, int * pixel_width, int * pixel_height, cef_binary_value_t * (CEF_CALLBACK *callback__)(cef_image_t *, float, int, int *, int *)) { return callback__(self, scale_factor, with_transparency, pixel_width, pixel_height); } - // cef_binary_value_t * gocef_image_get_as_jpeg(cef_image_t * self, float scale_factor, int quality, int * pixel_width, int * pixel_height, cef_binary_value_t * (CEF_CALLBACK *callback__)(cef_image_t *, float, int, int *, int *)) { return callback__(self, scale_factor, quality, pixel_width, pixel_height); } + // int gocef_image_has_representation(cef_image_t * self, float scaleFactor, int (CEF_CALLBACK *callback__)(cef_image_t *, float)) { return callback__(self, scaleFactor); } + // int gocef_image_remove_representation(cef_image_t * self, float scaleFactor, int (CEF_CALLBACK *callback__)(cef_image_t *, float)) { return callback__(self, scaleFactor); } + // int gocef_image_get_representation_info(cef_image_t * self, float scaleFactor, float * actualScaleFactor, int * pixelWidth, int * pixelHeight, int (CEF_CALLBACK *callback__)(cef_image_t *, float, float *, int *, int *)) { return callback__(self, scaleFactor, actualScaleFactor, pixelWidth, pixelHeight); } + // cef_binary_value_t * gocef_image_get_as_bitmap(cef_image_t * self, float scaleFactor, cef_color_type_t colorType, cef_alpha_type_t alphaType, int * pixelWidth, int * pixelHeight, cef_binary_value_t * (CEF_CALLBACK *callback__)(cef_image_t *, float, cef_color_type_t, cef_alpha_type_t, int *, int *)) { return callback__(self, scaleFactor, colorType, alphaType, pixelWidth, pixelHeight); } + // cef_binary_value_t * gocef_image_get_as_png(cef_image_t * self, float scaleFactor, int withTransparency, int * pixelWidth, int * pixelHeight, cef_binary_value_t * (CEF_CALLBACK *callback__)(cef_image_t *, float, int, int *, int *)) { return callback__(self, scaleFactor, withTransparency, pixelWidth, pixelHeight); } + // cef_binary_value_t * gocef_image_get_as_jpeg(cef_image_t * self, float scaleFactor, int quality, int * pixelWidth, int * pixelHeight, cef_binary_value_t * (CEF_CALLBACK *callback__)(cef_image_t *, float, int, int *, int *)) { return callback__(self, scaleFactor, quality, pixelWidth, pixelHeight); } "C" ) @@ -60,24 +60,24 @@ func (d *Image) IsSame(that *Image) int32 { // representation size in pixel coordinates. |pixel_data| is the array of // pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size. // |color_type| and |alpha_type| values specify the pixel format. -func (d *Image) AddBitmap(scale_factor float32, pixel_width, pixel_height int32, color_type ColorType, alpha_type AlphaType, pixel_data unsafe.Pointer, pixel_data_size uint64) int32 { - return int32(C.gocef_image_add_bitmap(d.toNative(), C.float(scale_factor), C.int(pixel_width), C.int(pixel_height), C.cef_color_type_t(color_type), C.cef_alpha_type_t(alpha_type), pixel_data, C.size_t(pixel_data_size), d.add_bitmap)) +func (d *Image) AddBitmap(scaleFactor float32, pixelWidth, pixelHeight int32, colorType ColorType, alphaType AlphaType, pixelData unsafe.Pointer, pixelDataSize uint64) int32 { + return int32(C.gocef_image_add_bitmap(d.toNative(), C.float(scaleFactor), C.int(pixelWidth), C.int(pixelHeight), C.cef_color_type_t(colorType), C.cef_alpha_type_t(alphaType), pixelData, C.size_t(pixelDataSize), d.add_bitmap)) } // AddPng (add_png) // Add a PNG image representation for |scale_factor|. |png_data| is the image // data of size |png_data_size|. Any alpha transparency in the PNG data will // be maintained. -func (d *Image) AddPng(scale_factor float32, png_data unsafe.Pointer, png_data_size uint64) int32 { - return int32(C.gocef_image_add_png(d.toNative(), C.float(scale_factor), png_data, C.size_t(png_data_size), d.add_png)) +func (d *Image) AddPng(scaleFactor float32, pngData unsafe.Pointer, pngDataSize uint64) int32 { + return int32(C.gocef_image_add_png(d.toNative(), C.float(scaleFactor), pngData, C.size_t(pngDataSize), d.add_png)) } // AddJpeg (add_jpeg) // Create a JPEG image representation for |scale_factor|. |jpeg_data| is the // image data of size |jpeg_data_size|. The JPEG format does not support // transparency so the alpha byte will be set to 0xFF for all pixels. -func (d *Image) AddJpeg(scale_factor float32, jpeg_data unsafe.Pointer, jpeg_data_size uint64) int32 { - return int32(C.gocef_image_add_jpeg(d.toNative(), C.float(scale_factor), jpeg_data, C.size_t(jpeg_data_size), d.add_jpeg)) +func (d *Image) AddJpeg(scaleFactor float32, jpegData unsafe.Pointer, jpegDataSize uint64) int32 { + return int32(C.gocef_image_add_jpeg(d.toNative(), C.float(scaleFactor), jpegData, C.size_t(jpegDataSize), d.add_jpeg)) } // GetWidth (get_width) @@ -95,14 +95,14 @@ func (d *Image) GetHeight() uint64 { // HasRepresentation (has_representation) // Returns true (1) if this image contains a representation for // |scale_factor|. -func (d *Image) HasRepresentation(scale_factor float32) int32 { - return int32(C.gocef_image_has_representation(d.toNative(), C.float(scale_factor), d.has_representation)) +func (d *Image) HasRepresentation(scaleFactor float32) int32 { + return int32(C.gocef_image_has_representation(d.toNative(), C.float(scaleFactor), d.has_representation)) } // RemoveRepresentation (remove_representation) // Removes the representation for |scale_factor|. Returns true (1) on success. -func (d *Image) RemoveRepresentation(scale_factor float32) int32 { - return int32(C.gocef_image_remove_representation(d.toNative(), C.float(scale_factor), d.remove_representation)) +func (d *Image) RemoveRepresentation(scaleFactor float32) int32 { + return int32(C.gocef_image_remove_representation(d.toNative(), C.float(scaleFactor), d.remove_representation)) } // GetRepresentationInfo (get_representation_info) @@ -110,8 +110,8 @@ func (d *Image) RemoveRepresentation(scale_factor float32) int32 { // |scale_factor|. |actual_scale_factor| is the actual scale factor for the // representation. |pixel_width| and |pixel_height| are the representation // size in pixel coordinates. Returns true (1) on success. -func (d *Image) GetRepresentationInfo(scale_factor float32, actual_scale_factor *float32, pixel_width, pixel_height *int32) int32 { - return int32(C.gocef_image_get_representation_info(d.toNative(), C.float(scale_factor), (*C.float)(actual_scale_factor), (*C.int)(pixel_width), (*C.int)(pixel_height), d.get_representation_info)) +func (d *Image) GetRepresentationInfo(scaleFactor float32, actualScaleFactor *float32, pixelWidth, pixelHeight *int32) int32 { + return int32(C.gocef_image_get_representation_info(d.toNative(), C.float(scaleFactor), (*C.float)(actualScaleFactor), (*C.int)(pixelWidth), (*C.int)(pixelHeight), d.get_representation_info)) } // GetAsBitmap (get_as_bitmap) @@ -121,8 +121,8 @@ func (d *Image) GetRepresentationInfo(scale_factor float32, actual_scale_factor // |pixel_height| are the output representation size in pixel coordinates. // Returns a cef_binary_value_t containing the pixel data on success or NULL // on failure. -func (d *Image) GetAsBitmap(scale_factor float32, color_type ColorType, alpha_type AlphaType, pixel_width, pixel_height *int32) *BinaryValue { - return (*BinaryValue)(C.gocef_image_get_as_bitmap(d.toNative(), C.float(scale_factor), C.cef_color_type_t(color_type), C.cef_alpha_type_t(alpha_type), (*C.int)(pixel_width), (*C.int)(pixel_height), d.get_as_bitmap)) +func (d *Image) GetAsBitmap(scaleFactor float32, colorType ColorType, alphaType AlphaType, pixelWidth, pixelHeight *int32) *BinaryValue { + return (*BinaryValue)(C.gocef_image_get_as_bitmap(d.toNative(), C.float(scaleFactor), C.cef_color_type_t(colorType), C.cef_alpha_type_t(alphaType), (*C.int)(pixelWidth), (*C.int)(pixelHeight), d.get_as_bitmap)) } // GetAsPng (get_as_png) @@ -132,8 +132,8 @@ func (d *Image) GetAsBitmap(scale_factor float32, color_type ColorType, alpha_ty // the output representation size in pixel coordinates. Returns a // cef_binary_value_t containing the PNG image data on success or NULL on // failure. -func (d *Image) GetAsPng(scale_factor float32, with_transparency int32, pixel_width, pixel_height *int32) *BinaryValue { - return (*BinaryValue)(C.gocef_image_get_as_png(d.toNative(), C.float(scale_factor), C.int(with_transparency), (*C.int)(pixel_width), (*C.int)(pixel_height), d.get_as_png)) +func (d *Image) GetAsPng(scaleFactor float32, withTransparency int32, pixelWidth, pixelHeight *int32) *BinaryValue { + return (*BinaryValue)(C.gocef_image_get_as_png(d.toNative(), C.float(scaleFactor), C.int(withTransparency), (*C.int)(pixelWidth), (*C.int)(pixelHeight), d.get_as_png)) } // GetAsJpeg (get_as_jpeg) @@ -144,6 +144,6 @@ func (d *Image) GetAsPng(scale_factor float32, with_transparency int32, pixel_wi // the output representation size in pixel coordinates. Returns a // cef_binary_value_t containing the JPEG image data on success or NULL on // failure. -func (d *Image) GetAsJpeg(scale_factor float32, quality int32, pixel_width, pixel_height *int32) *BinaryValue { - return (*BinaryValue)(C.gocef_image_get_as_jpeg(d.toNative(), C.float(scale_factor), C.int(quality), (*C.int)(pixel_width), (*C.int)(pixel_height), d.get_as_jpeg)) +func (d *Image) GetAsJpeg(scaleFactor float32, quality int32, pixelWidth, pixelHeight *int32) *BinaryValue { + return (*BinaryValue)(C.gocef_image_get_as_jpeg(d.toNative(), C.float(scaleFactor), C.int(quality), (*C.int)(pixelWidth), (*C.int)(pixelHeight), d.get_as_jpeg)) } diff --git a/cef/JsdialogCallback_gen.go b/cef/JsdialogCallback_gen.go index bc41663..a74edc6 100644 --- a/cef/JsdialogCallback_gen.go +++ b/cef/JsdialogCallback_gen.go @@ -16,7 +16,7 @@ import ( // JsdialogCallbackProxy defines methods required for using JsdialogCallback. type JsdialogCallbackProxy interface { - Cont(self *JsdialogCallback, success int32, user_input string) + Cont(self *JsdialogCallback, success int32, userInput string) } // JsdialogCallback (cef_jsdialog_callback_t from include/capi/cef_jsdialog_handler_capi.h) @@ -59,15 +59,15 @@ func (d *JsdialogCallback) Base() *BaseRefCounted { // Cont (cont) // Continue the JS dialog request. Set |success| to true (1) if the OK button // was pressed. The |user_input| value should be specified for prompt dialogs. -func (d *JsdialogCallback) Cont(success int32, user_input string) { - lookupJsdialogCallbackProxy(d.Base()).Cont(d, success, user_input) +func (d *JsdialogCallback) Cont(success int32, userInput string) { + lookupJsdialogCallbackProxy(d.Base()).Cont(d, success, userInput) } //nolint:gocritic //export gocef_jsdialog_callback_cont -func gocef_jsdialog_callback_cont(self *C.cef_jsdialog_callback_t, success C.int, user_input *C.cef_string_t) { +func gocef_jsdialog_callback_cont(self *C.cef_jsdialog_callback_t, success C.int, userInput *C.cef_string_t) { me__ := (*JsdialogCallback)(self) proxy__ := lookupJsdialogCallbackProxy(me__.Base()) - user_input_ := cefstrToString(user_input) - proxy__.Cont(me__, int32(success), user_input_) + userInput_ := cefstrToString(userInput) + proxy__.Cont(me__, int32(success), userInput_) } diff --git a/cef/JsdialogHandler_gen.go b/cef/JsdialogHandler_gen.go index ff42915..a63fba8 100644 --- a/cef/JsdialogHandler_gen.go +++ b/cef/JsdialogHandler_gen.go @@ -16,8 +16,8 @@ import ( // JsdialogHandlerProxy defines methods required for using JsdialogHandler. type JsdialogHandlerProxy interface { - OnJsdialog(self *JsdialogHandler, browser *Browser, origin_url string, dialog_type JsdialogType, message_text, default_prompt_text string, callback *JsdialogCallback, suppress_message *int32) int32 - OnBeforeUnloadDialog(self *JsdialogHandler, browser *Browser, message_text string, is_reload int32, callback *JsdialogCallback) int32 + OnJsdialog(self *JsdialogHandler, browser *Browser, originURL string, dialogType JsdialogType, messageText, defaultPromptText string, callback *JsdialogCallback, suppressMessage *int32) int32 + OnBeforeUnloadDialog(self *JsdialogHandler, browser *Browser, messageText string, isReload int32, callback *JsdialogCallback) int32 OnResetDialogState(self *JsdialogHandler, browser *Browser) OnDialogClosed(self *JsdialogHandler, browser *Browser) } @@ -75,19 +75,19 @@ func (d *JsdialogHandler) Base() *BaseRefCounted { // Custom dialogs may be either modal or modeless. If a custom dialog is used // the application must execute |callback| once the custom dialog is // dismissed. -func (d *JsdialogHandler) OnJsdialog(browser *Browser, origin_url string, dialog_type JsdialogType, message_text, default_prompt_text string, callback *JsdialogCallback, suppress_message *int32) int32 { - return lookupJsdialogHandlerProxy(d.Base()).OnJsdialog(d, browser, origin_url, dialog_type, message_text, default_prompt_text, callback, suppress_message) +func (d *JsdialogHandler) OnJsdialog(browser *Browser, originURL string, dialogType JsdialogType, messageText, defaultPromptText string, callback *JsdialogCallback, suppressMessage *int32) int32 { + return lookupJsdialogHandlerProxy(d.Base()).OnJsdialog(d, browser, originURL, dialogType, messageText, defaultPromptText, callback, suppressMessage) } //nolint:gocritic //export gocef_jsdialog_handler_on_jsdialog -func gocef_jsdialog_handler_on_jsdialog(self *C.cef_jsdialog_handler_t, browser *C.cef_browser_t, origin_url *C.cef_string_t, dialog_type C.cef_jsdialog_type_t, message_text *C.cef_string_t, default_prompt_text *C.cef_string_t, callback *C.cef_jsdialog_callback_t, suppress_message *C.int) C.int { +func gocef_jsdialog_handler_on_jsdialog(self *C.cef_jsdialog_handler_t, browser *C.cef_browser_t, originURL *C.cef_string_t, dialogType C.cef_jsdialog_type_t, messageText *C.cef_string_t, defaultPromptText *C.cef_string_t, callback *C.cef_jsdialog_callback_t, suppressMessage *C.int) C.int { me__ := (*JsdialogHandler)(self) proxy__ := lookupJsdialogHandlerProxy(me__.Base()) - origin_url_ := cefstrToString(origin_url) - message_text_ := cefstrToString(message_text) - default_prompt_text_ := cefstrToString(default_prompt_text) - return C.int(proxy__.OnJsdialog(me__, (*Browser)(browser), origin_url_, JsdialogType(dialog_type), message_text_, default_prompt_text_, (*JsdialogCallback)(callback), (*int32)(suppress_message))) + originURL_ := cefstrToString(originURL) + messageText_ := cefstrToString(messageText) + defaultPromptText_ := cefstrToString(defaultPromptText) + return C.int(proxy__.OnJsdialog(me__, (*Browser)(browser), originURL_, JsdialogType(dialogType), messageText_, defaultPromptText_, (*JsdialogCallback)(callback), (*int32)(suppressMessage))) } // OnBeforeUnloadDialog (on_before_unload_dialog) @@ -97,17 +97,17 @@ func gocef_jsdialog_handler_on_jsdialog(self *C.cef_jsdialog_handler_t, browser // immediately. Custom dialogs may be either modal or modeless. If a custom // dialog is used the application must execute |callback| once the custom // dialog is dismissed. -func (d *JsdialogHandler) OnBeforeUnloadDialog(browser *Browser, message_text string, is_reload int32, callback *JsdialogCallback) int32 { - return lookupJsdialogHandlerProxy(d.Base()).OnBeforeUnloadDialog(d, browser, message_text, is_reload, callback) +func (d *JsdialogHandler) OnBeforeUnloadDialog(browser *Browser, messageText string, isReload int32, callback *JsdialogCallback) int32 { + return lookupJsdialogHandlerProxy(d.Base()).OnBeforeUnloadDialog(d, browser, messageText, isReload, callback) } //nolint:gocritic //export gocef_jsdialog_handler_on_before_unload_dialog -func gocef_jsdialog_handler_on_before_unload_dialog(self *C.cef_jsdialog_handler_t, browser *C.cef_browser_t, message_text *C.cef_string_t, is_reload C.int, callback *C.cef_jsdialog_callback_t) C.int { +func gocef_jsdialog_handler_on_before_unload_dialog(self *C.cef_jsdialog_handler_t, browser *C.cef_browser_t, messageText *C.cef_string_t, isReload C.int, callback *C.cef_jsdialog_callback_t) C.int { me__ := (*JsdialogHandler)(self) proxy__ := lookupJsdialogHandlerProxy(me__.Base()) - message_text_ := cefstrToString(message_text) - return C.int(proxy__.OnBeforeUnloadDialog(me__, (*Browser)(browser), message_text_, int32(is_reload), (*JsdialogCallback)(callback))) + messageText_ := cefstrToString(messageText) + return C.int(proxy__.OnBeforeUnloadDialog(me__, (*Browser)(browser), messageText_, int32(isReload), (*JsdialogCallback)(callback))) } // OnResetDialogState (on_reset_dialog_state) diff --git a/cef/KeyboardHandler_gen.go b/cef/KeyboardHandler_gen.go index 2347918..8a15e1c 100644 --- a/cef/KeyboardHandler_gen.go +++ b/cef/KeyboardHandler_gen.go @@ -16,8 +16,8 @@ import ( // KeyboardHandlerProxy defines methods required for using KeyboardHandler. type KeyboardHandlerProxy interface { - OnPreKeyEvent(self *KeyboardHandler, browser *Browser, event *KeyEvent, os_event unsafe.Pointer, is_keyboard_shortcut *int32) int32 - OnKeyEvent(self *KeyboardHandler, browser *Browser, event *KeyEvent, os_event unsafe.Pointer) int32 + OnPreKeyEvent(self *KeyboardHandler, browser *Browser, event *KeyEvent, osEvent unsafe.Pointer, isKeyboardShortcut *int32) int32 + OnKeyEvent(self *KeyboardHandler, browser *Browser, event *KeyEvent, osEvent unsafe.Pointer) int32 } // KeyboardHandler (cef_keyboard_handler_t from include/capi/cef_keyboard_handler_capi.h) @@ -63,17 +63,17 @@ func (d *KeyboardHandler) Base() *BaseRefCounted { // event message, if any. Return true (1) if the event was handled or false // (0) otherwise. If the event will be handled in on_key_event() as a keyboard // shortcut set |is_keyboard_shortcut| to true (1) and return false (0). -func (d *KeyboardHandler) OnPreKeyEvent(browser *Browser, event *KeyEvent, os_event unsafe.Pointer, is_keyboard_shortcut *int32) int32 { - return lookupKeyboardHandlerProxy(d.Base()).OnPreKeyEvent(d, browser, event, os_event, is_keyboard_shortcut) +func (d *KeyboardHandler) OnPreKeyEvent(browser *Browser, event *KeyEvent, osEvent unsafe.Pointer, isKeyboardShortcut *int32) int32 { + return lookupKeyboardHandlerProxy(d.Base()).OnPreKeyEvent(d, browser, event, osEvent, isKeyboardShortcut) } //nolint:gocritic //export gocef_keyboard_handler_on_pre_key_event -func gocef_keyboard_handler_on_pre_key_event(self *C.cef_keyboard_handler_t, browser *C.cef_browser_t, event *C.cef_key_event_t, os_event unsafe.Pointer, is_keyboard_shortcut *C.int) C.int { +func gocef_keyboard_handler_on_pre_key_event(self *C.cef_keyboard_handler_t, browser *C.cef_browser_t, event *C.cef_key_event_t, osEvent unsafe.Pointer, isKeyboardShortcut *C.int) C.int { me__ := (*KeyboardHandler)(self) proxy__ := lookupKeyboardHandlerProxy(me__.Base()) event_ := event.toGo() - return C.int(proxy__.OnPreKeyEvent(me__, (*Browser)(browser), event_, os_event, (*int32)(is_keyboard_shortcut))) + return C.int(proxy__.OnPreKeyEvent(me__, (*Browser)(browser), event_, osEvent, (*int32)(isKeyboardShortcut))) } // OnKeyEvent (on_key_event) @@ -81,15 +81,15 @@ func gocef_keyboard_handler_on_pre_key_event(self *C.cef_keyboard_handler_t, bro // handle the event. |event| contains information about the keyboard event. // |os_event| is the operating system event message, if any. Return true (1) // if the keyboard event was handled or false (0) otherwise. -func (d *KeyboardHandler) OnKeyEvent(browser *Browser, event *KeyEvent, os_event unsafe.Pointer) int32 { - return lookupKeyboardHandlerProxy(d.Base()).OnKeyEvent(d, browser, event, os_event) +func (d *KeyboardHandler) OnKeyEvent(browser *Browser, event *KeyEvent, osEvent unsafe.Pointer) int32 { + return lookupKeyboardHandlerProxy(d.Base()).OnKeyEvent(d, browser, event, osEvent) } //nolint:gocritic //export gocef_keyboard_handler_on_key_event -func gocef_keyboard_handler_on_key_event(self *C.cef_keyboard_handler_t, browser *C.cef_browser_t, event *C.cef_key_event_t, os_event unsafe.Pointer) C.int { +func gocef_keyboard_handler_on_key_event(self *C.cef_keyboard_handler_t, browser *C.cef_browser_t, event *C.cef_key_event_t, osEvent unsafe.Pointer) C.int { me__ := (*KeyboardHandler)(self) proxy__ := lookupKeyboardHandlerProxy(me__.Base()) event_ := event.toGo() - return C.int(proxy__.OnKeyEvent(me__, (*Browser)(browser), event_, os_event)) + return C.int(proxy__.OnKeyEvent(me__, (*Browser)(browser), event_, osEvent)) } diff --git a/cef/LabelButton_gen.go b/cef/LabelButton_gen.go index 8d3778b..19b3936 100644 --- a/cef/LabelButton_gen.go +++ b/cef/LabelButton_gen.go @@ -7,11 +7,11 @@ import ( // cef_menu_button_t * gocef_label_button_as_menu_button(cef_label_button_t * self, cef_menu_button_t * (CEF_CALLBACK *callback__)(cef_label_button_t *)) { return callback__(self); } // void gocef_label_button_set_text(cef_label_button_t * self, cef_string_t * text, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_string_t *)) { return callback__(self, text); } // cef_string_userfree_t gocef_label_button_get_text(cef_label_button_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_label_button_t *)) { return callback__(self); } - // void gocef_label_button_set_image(cef_label_button_t * self, cef_button_state_t button_state, cef_image_t * image, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_button_state_t, cef_image_t *)) { return callback__(self, button_state, image); } - // cef_image_t * gocef_label_button_get_image(cef_label_button_t * self, cef_button_state_t button_state, cef_image_t * (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_button_state_t)) { return callback__(self, button_state); } - // void gocef_label_button_set_text_color(cef_label_button_t * self, cef_button_state_t for_state, cef_color_t color, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_button_state_t, cef_color_t)) { return callback__(self, for_state, color); } + // void gocef_label_button_set_image(cef_label_button_t * self, cef_button_state_t buttonState, cef_image_t * image, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_button_state_t, cef_image_t *)) { return callback__(self, buttonState, image); } + // cef_image_t * gocef_label_button_get_image(cef_label_button_t * self, cef_button_state_t buttonState, cef_image_t * (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_button_state_t)) { return callback__(self, buttonState); } + // void gocef_label_button_set_text_color(cef_label_button_t * self, cef_button_state_t forState, cef_color_t color, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_button_state_t, cef_color_t)) { return callback__(self, forState, color); } // void gocef_label_button_set_enabled_text_colors(cef_label_button_t * self, cef_color_t color, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_color_t)) { return callback__(self, color); } - // void gocef_label_button_set_font_list(cef_label_button_t * self, cef_string_t * font_list, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_string_t *)) { return callback__(self, font_list); } + // void gocef_label_button_set_font_list(cef_label_button_t * self, cef_string_t * fontList, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_string_t *)) { return callback__(self, fontList); } // void gocef_label_button_set_horizontal_alignment(cef_label_button_t * self, cef_horizontal_alignment_t alignment, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_horizontal_alignment_t)) { return callback__(self, alignment); } // void gocef_label_button_set_minimum_size(cef_label_button_t * self, cef_size_t * size, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_size_t *)) { return callback__(self, size); } // void gocef_label_button_set_maximum_size(cef_label_button_t * self, cef_size_t * size, void (CEF_CALLBACK *callback__)(cef_label_button_t *, cef_size_t *)) { return callback__(self, size); } @@ -63,21 +63,21 @@ func (d *LabelButton) GetText() string { // Sets the image shown for |button_state|. When this Button is drawn if no // image exists for the current state then the image for // CEF_BUTTON_STATE_NORMAL, if any, will be shown. -func (d *LabelButton) SetImage(button_state ButtonState, image *Image) { - C.gocef_label_button_set_image(d.toNative(), C.cef_button_state_t(button_state), image.toNative(), d.set_image) +func (d *LabelButton) SetImage(buttonState ButtonState, image *Image) { + C.gocef_label_button_set_image(d.toNative(), C.cef_button_state_t(buttonState), image.toNative(), d.set_image) } // GetImage (get_image) // Returns the image shown for |button_state|. If no image exists for that // state then the image for CEF_BUTTON_STATE_NORMAL will be returned. -func (d *LabelButton) GetImage(button_state ButtonState) *Image { - return (*Image)(C.gocef_label_button_get_image(d.toNative(), C.cef_button_state_t(button_state), d.get_image)) +func (d *LabelButton) GetImage(buttonState ButtonState) *Image { + return (*Image)(C.gocef_label_button_get_image(d.toNative(), C.cef_button_state_t(buttonState), d.get_image)) } // SetTextColor (set_text_color) // Sets the text color shown for the specified button |for_state| to |color|. -func (d *LabelButton) SetTextColor(for_state ButtonState, color Color) { - C.gocef_label_button_set_text_color(d.toNative(), C.cef_button_state_t(for_state), C.cef_color_t(color), d.set_text_color) +func (d *LabelButton) SetTextColor(forState ButtonState, color Color) { + C.gocef_label_button_set_text_color(d.toNative(), C.cef_button_state_t(forState), C.cef_color_t(color), d.set_text_color) } // SetEnabledTextColors (set_enabled_text_colors) @@ -95,13 +95,13 @@ func (d *LabelButton) SetEnabledTextColors(color Color) { // // Here are examples of valid font description strings: - "Arial, Helvetica, // Bold Italic 14px" - "Arial, 14px" -func (d *LabelButton) SetFontList(font_list string) { - font_list_ := C.cef_string_userfree_alloc() - setCEFStr(font_list, font_list_) +func (d *LabelButton) SetFontList(fontList string) { + fontList_ := C.cef_string_userfree_alloc() + setCEFStr(fontList, fontList_) defer func() { - C.cef_string_userfree_free(font_list_) + C.cef_string_userfree_free(fontList_) }() - C.gocef_label_button_set_font_list(d.toNative(), (*C.cef_string_t)(font_list_), d.set_font_list) + C.gocef_label_button_set_font_list(d.toNative(), (*C.cef_string_t)(fontList_), d.set_font_list) } // SetHorizontalAlignment (set_horizontal_alignment) diff --git a/cef/LifeSpanHandler_gen.go b/cef/LifeSpanHandler_gen.go index 16ba331..32a0ea7 100644 --- a/cef/LifeSpanHandler_gen.go +++ b/cef/LifeSpanHandler_gen.go @@ -16,7 +16,7 @@ import ( // LifeSpanHandlerProxy defines methods required for using LifeSpanHandler. type LifeSpanHandlerProxy interface { - OnBeforePopup(self *LifeSpanHandler, browser *Browser, frame *Frame, target_url, target_frame_name string, target_disposition WindowOpenDisposition, user_gesture int32, popupFeatures *PopupFeatures, windowInfo *WindowInfo, client **Client, settings *BrowserSettings, extra_info **DictionaryValue, no_javascript_access *int32) int32 + OnBeforePopup(self *LifeSpanHandler, browser *Browser, frame *Frame, targetURL, targetFrameName string, targetDisposition WindowOpenDisposition, userGesture int32, popupFeatures *PopupFeatures, windowInfo *WindowInfo, client **Client, settings *BrowserSettings, extraInfo **DictionaryValue, noJavascriptAccess *int32) int32 OnAfterCreated(self *LifeSpanHandler, browser *Browser) DoClose(self *LifeSpanHandler, browser *Browser) int32 OnBeforeClose(self *LifeSpanHandler, browser *Browser) @@ -84,25 +84,25 @@ func (d *LifeSpanHandler) Base() *BaseRefCounted { // |extra_info| parameter provides an opportunity to specify extra information // specific to the created popup browser that will be passed to // cef_render_process_handler_t::on_browser_created() in the render process. -func (d *LifeSpanHandler) OnBeforePopup(browser *Browser, frame *Frame, target_url, target_frame_name string, target_disposition WindowOpenDisposition, user_gesture int32, popupFeatures *PopupFeatures, windowInfo *WindowInfo, client **Client, settings *BrowserSettings, extra_info **DictionaryValue, no_javascript_access *int32) int32 { - return lookupLifeSpanHandlerProxy(d.Base()).OnBeforePopup(d, browser, frame, target_url, target_frame_name, target_disposition, user_gesture, popupFeatures, windowInfo, client, settings, extra_info, no_javascript_access) +func (d *LifeSpanHandler) OnBeforePopup(browser *Browser, frame *Frame, targetURL, targetFrameName string, targetDisposition WindowOpenDisposition, userGesture int32, popupFeatures *PopupFeatures, windowInfo *WindowInfo, client **Client, settings *BrowserSettings, extraInfo **DictionaryValue, noJavascriptAccess *int32) int32 { + return lookupLifeSpanHandlerProxy(d.Base()).OnBeforePopup(d, browser, frame, targetURL, targetFrameName, targetDisposition, userGesture, popupFeatures, windowInfo, client, settings, extraInfo, noJavascriptAccess) } //nolint:gocritic //export gocef_life_span_handler_on_before_popup -func gocef_life_span_handler_on_before_popup(self *C.cef_life_span_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, target_url *C.cef_string_t, target_frame_name *C.cef_string_t, target_disposition C.cef_window_open_disposition_t, user_gesture C.int, popupFeatures *C.cef_popup_features_t, windowInfo *C.cef_window_info_t, client **C.cef_client_t, settings *C.cef_browser_settings_t, extra_info **C.cef_dictionary_value_t, no_javascript_access *C.int) C.int { +func gocef_life_span_handler_on_before_popup(self *C.cef_life_span_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, targetURL *C.cef_string_t, targetFrameName *C.cef_string_t, targetDisposition C.cef_window_open_disposition_t, userGesture C.int, popupFeatures *C.cef_popup_features_t, windowInfo *C.cef_window_info_t, client **C.cef_client_t, settings *C.cef_browser_settings_t, extraInfo **C.cef_dictionary_value_t, noJavascriptAccess *C.int) C.int { me__ := (*LifeSpanHandler)(self) proxy__ := lookupLifeSpanHandlerProxy(me__.Base()) - target_url_ := cefstrToString(target_url) - target_frame_name_ := cefstrToString(target_frame_name) + targetURL_ := cefstrToString(targetURL) + targetFrameName_ := cefstrToString(targetFrameName) popupFeatures_ := popupFeatures.toGo() windowInfo_ := windowInfo.toGo() client_ := (*Client)(*client) client__p := &client_ settings_ := settings.toGo() - extra_info_ := (*DictionaryValue)(*extra_info) - extra_info__p := &extra_info_ - return C.int(proxy__.OnBeforePopup(me__, (*Browser)(browser), (*Frame)(frame), target_url_, target_frame_name_, WindowOpenDisposition(target_disposition), int32(user_gesture), popupFeatures_, windowInfo_, client__p, settings_, extra_info__p, (*int32)(no_javascript_access))) + extraInfo_ := (*DictionaryValue)(*extraInfo) + extraInfo__p := &extraInfo_ + return C.int(proxy__.OnBeforePopup(me__, (*Browser)(browser), (*Frame)(frame), targetURL_, targetFrameName_, WindowOpenDisposition(targetDisposition), int32(userGesture), popupFeatures_, windowInfo_, client__p, settings_, extraInfo__p, (*int32)(noJavascriptAccess))) } // OnAfterCreated (on_after_created) diff --git a/cef/LoadHandler_gen.go b/cef/LoadHandler_gen.go index c4cf300..bebf432 100644 --- a/cef/LoadHandler_gen.go +++ b/cef/LoadHandler_gen.go @@ -17,9 +17,9 @@ import ( // LoadHandlerProxy defines methods required for using LoadHandler. type LoadHandlerProxy interface { OnLoadingStateChange(self *LoadHandler, browser *Browser, isLoading, canGoBack, canGoForward int32) - OnLoadStart(self *LoadHandler, browser *Browser, frame *Frame, transition_type TransitionType) - OnLoadEnd(self *LoadHandler, browser *Browser, frame *Frame, httpStatusCode int32) - OnLoadError(self *LoadHandler, browser *Browser, frame *Frame, errorCode Errorcode, errorText, failedUrl string) + OnLoadStart(self *LoadHandler, browser *Browser, frame *Frame, transitionType TransitionType) + OnLoadEnd(self *LoadHandler, browser *Browser, frame *Frame, hTTPStatusCode int32) + OnLoadError(self *LoadHandler, browser *Browser, frame *Frame, errorCode Errorcode, errorText, failedURL string) } // LoadHandler (cef_load_handler_t from include/capi/cef_load_handler_capi.h) @@ -89,16 +89,16 @@ func gocef_load_handler_on_loading_state_change(self *C.cef_load_handler_t, brow // called for same page navigations (fragments, history state, etc.) or for // navigations that fail or are canceled before commit. For notification of // overall browser load status use OnLoadingStateChange instead. -func (d *LoadHandler) OnLoadStart(browser *Browser, frame *Frame, transition_type TransitionType) { - lookupLoadHandlerProxy(d.Base()).OnLoadStart(d, browser, frame, transition_type) +func (d *LoadHandler) OnLoadStart(browser *Browser, frame *Frame, transitionType TransitionType) { + lookupLoadHandlerProxy(d.Base()).OnLoadStart(d, browser, frame, transitionType) } //nolint:gocritic //export gocef_load_handler_on_load_start -func gocef_load_handler_on_load_start(self *C.cef_load_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, transition_type C.cef_transition_type_t) { +func gocef_load_handler_on_load_start(self *C.cef_load_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, transitionType C.cef_transition_type_t) { me__ := (*LoadHandler)(self) proxy__ := lookupLoadHandlerProxy(me__.Base()) - proxy__.OnLoadStart(me__, (*Browser)(browser), (*Frame)(frame), TransitionType(transition_type)) + proxy__.OnLoadStart(me__, (*Browser)(browser), (*Frame)(frame), TransitionType(transitionType)) } // OnLoadEnd (on_load_end) @@ -110,16 +110,16 @@ func gocef_load_handler_on_load_start(self *C.cef_load_handler_t, browser *C.cef // state, etc.) or for navigations that fail or are canceled before commit. // For notification of overall browser load status use OnLoadingStateChange // instead. -func (d *LoadHandler) OnLoadEnd(browser *Browser, frame *Frame, httpStatusCode int32) { - lookupLoadHandlerProxy(d.Base()).OnLoadEnd(d, browser, frame, httpStatusCode) +func (d *LoadHandler) OnLoadEnd(browser *Browser, frame *Frame, hTTPStatusCode int32) { + lookupLoadHandlerProxy(d.Base()).OnLoadEnd(d, browser, frame, hTTPStatusCode) } //nolint:gocritic //export gocef_load_handler_on_load_end -func gocef_load_handler_on_load_end(self *C.cef_load_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, httpStatusCode C.int) { +func gocef_load_handler_on_load_end(self *C.cef_load_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, hTTPStatusCode C.int) { me__ := (*LoadHandler)(self) proxy__ := lookupLoadHandlerProxy(me__.Base()) - proxy__.OnLoadEnd(me__, (*Browser)(browser), (*Frame)(frame), int32(httpStatusCode)) + proxy__.OnLoadEnd(me__, (*Browser)(browser), (*Frame)(frame), int32(hTTPStatusCode)) } // OnLoadError (on_load_error) @@ -128,16 +128,16 @@ func gocef_load_handler_on_load_end(self *C.cef_load_handler_t, browser *C.cef_b // after commit. |errorCode| is the error code number, |errorText| is the // error text and |failedUrl| is the URL that failed to load. See // net\base\net_error_list.h for complete descriptions of the error codes. -func (d *LoadHandler) OnLoadError(browser *Browser, frame *Frame, errorCode Errorcode, errorText, failedUrl string) { - lookupLoadHandlerProxy(d.Base()).OnLoadError(d, browser, frame, errorCode, errorText, failedUrl) +func (d *LoadHandler) OnLoadError(browser *Browser, frame *Frame, errorCode Errorcode, errorText, failedURL string) { + lookupLoadHandlerProxy(d.Base()).OnLoadError(d, browser, frame, errorCode, errorText, failedURL) } //nolint:gocritic //export gocef_load_handler_on_load_error -func gocef_load_handler_on_load_error(self *C.cef_load_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, errorCode C.cef_errorcode_t, errorText *C.cef_string_t, failedUrl *C.cef_string_t) { +func gocef_load_handler_on_load_error(self *C.cef_load_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, errorCode C.cef_errorcode_t, errorText *C.cef_string_t, failedURL *C.cef_string_t) { me__ := (*LoadHandler)(self) proxy__ := lookupLoadHandlerProxy(me__.Base()) errorText_ := cefstrToString(errorText) - failedUrl_ := cefstrToString(failedUrl) - proxy__.OnLoadError(me__, (*Browser)(browser), (*Frame)(frame), Errorcode(errorCode), errorText_, failedUrl_) + failedURL_ := cefstrToString(failedURL) + proxy__.OnLoadError(me__, (*Browser)(browser), (*Frame)(frame), Errorcode(errorCode), errorText_, failedURL_) } diff --git a/cef/MenuButtonDelegate_gen.go b/cef/MenuButtonDelegate_gen.go index 76782c8..ef33409 100644 --- a/cef/MenuButtonDelegate_gen.go +++ b/cef/MenuButtonDelegate_gen.go @@ -16,7 +16,7 @@ import ( // MenuButtonDelegateProxy defines methods required for using MenuButtonDelegate. type MenuButtonDelegateProxy interface { - OnMenuButtonPressed(self *MenuButtonDelegate, menu_button *MenuButton, screen_point *Point, button_pressed_lock *MenuButtonPressedLock) + OnMenuButtonPressed(self *MenuButtonDelegate, menuButton *MenuButton, screenPoint *Point, buttonPressedLock *MenuButtonPressedLock) } // MenuButtonDelegate (cef_menu_button_delegate_t from include/capi/views/cef_menu_button_delegate_capi.h) @@ -62,16 +62,16 @@ func (d *MenuButtonDelegate) Base() *ButtonDelegate { // show a popup menu at |screen_point|. When showing a custom popup such as a // window keep a reference to |button_pressed_lock| until the popup is hidden // to maintain the pressed button state. -func (d *MenuButtonDelegate) OnMenuButtonPressed(menu_button *MenuButton, screen_point *Point, button_pressed_lock *MenuButtonPressedLock) { - lookupMenuButtonDelegateProxy(d.Base().Base().Base()).OnMenuButtonPressed(d, menu_button, screen_point, button_pressed_lock) +func (d *MenuButtonDelegate) OnMenuButtonPressed(menuButton *MenuButton, screenPoint *Point, buttonPressedLock *MenuButtonPressedLock) { + lookupMenuButtonDelegateProxy(d.Base().Base().Base()).OnMenuButtonPressed(d, menuButton, screenPoint, buttonPressedLock) } //nolint:gocritic //export gocef_menu_button_delegate_on_menu_button_pressed -func gocef_menu_button_delegate_on_menu_button_pressed(self *C.cef_menu_button_delegate_t, menu_button *C.cef_menu_button_t, screen_point *C.cef_point_t, button_pressed_lock *C.cef_menu_button_pressed_lock_t) { +func gocef_menu_button_delegate_on_menu_button_pressed(self *C.cef_menu_button_delegate_t, menuButton *C.cef_menu_button_t, screenPoint *C.cef_point_t, buttonPressedLock *C.cef_menu_button_pressed_lock_t) { me__ := (*MenuButtonDelegate)(self) proxy__ := lookupMenuButtonDelegateProxy(me__.Base().Base().Base()) - screen_point_ := screen_point.toGo() - button_pressed_lock_ := button_pressed_lock.toGo() - proxy__.OnMenuButtonPressed(me__, (*MenuButton)(menu_button), screen_point_, button_pressed_lock_) + screenPoint_ := screenPoint.toGo() + buttonPressedLock_ := buttonPressedLock.toGo() + proxy__.OnMenuButtonPressed(me__, (*MenuButton)(menuButton), screenPoint_, buttonPressedLock_) } diff --git a/cef/MenuButton_gen.go b/cef/MenuButton_gen.go index 5191459..e133df6 100644 --- a/cef/MenuButton_gen.go +++ b/cef/MenuButton_gen.go @@ -4,7 +4,7 @@ package cef import ( // #include "capi_gen.h" - // void gocef_menu_button_show_menu(cef_menu_button_t * self, cef_menu_model_t * menu_model, cef_point_t * screen_point, cef_menu_anchor_position_t anchor_position, void (CEF_CALLBACK *callback__)(cef_menu_button_t *, cef_menu_model_t *, cef_point_t *, cef_menu_anchor_position_t)) { return callback__(self, menu_model, screen_point, anchor_position); } + // void gocef_menu_button_show_menu(cef_menu_button_t * self, cef_menu_model_t * menuModel, cef_point_t * screenPoint, cef_menu_anchor_position_t anchorPosition, void (CEF_CALLBACK *callback__)(cef_menu_button_t *, cef_menu_model_t *, cef_point_t *, cef_menu_anchor_position_t)) { return callback__(self, menuModel, screenPoint, anchorPosition); } // void gocef_menu_button_trigger_menu(cef_menu_button_t * self, void (CEF_CALLBACK *callback__)(cef_menu_button_t *)) { return callback__(self); } "C" ) @@ -31,8 +31,8 @@ func (d *MenuButton) Base() *LabelButton { // position in screen coordinates. |anchor_position| specifies how the menu // will be anchored relative to |screen_point|. This function should be called // from cef_menu_button_delegate_t::on_menu_button_pressed(). -func (d *MenuButton) ShowMenu(menu_model *MenuModel, screen_point *Point, anchor_position MenuAnchorPosition) { - C.gocef_menu_button_show_menu(d.toNative(), menu_model.toNative(), screen_point.toNative(&C.cef_point_t{}), C.cef_menu_anchor_position_t(anchor_position), d.show_menu) +func (d *MenuButton) ShowMenu(menuModel *MenuModel, screenPoint *Point, anchorPosition MenuAnchorPosition) { + C.gocef_menu_button_show_menu(d.toNative(), menuModel.toNative(), screenPoint.toNative(&C.cef_point_t{}), C.cef_menu_anchor_position_t(anchorPosition), d.show_menu) } // TriggerMenu (trigger_menu) diff --git a/cef/MenuModelDelegate_gen.go b/cef/MenuModelDelegate_gen.go index 50ead32..ae0a4d6 100644 --- a/cef/MenuModelDelegate_gen.go +++ b/cef/MenuModelDelegate_gen.go @@ -16,13 +16,13 @@ import ( // MenuModelDelegateProxy defines methods required for using MenuModelDelegate. type MenuModelDelegateProxy interface { - ExecuteCommand(self *MenuModelDelegate, menu_model *MenuModel, command_id int32, event_flags EventFlags) - MouseOutsideMenu(self *MenuModelDelegate, menu_model *MenuModel, screen_point *Point) - UnhandledOpenSubmenu(self *MenuModelDelegate, menu_model *MenuModel, is_rtl int32) - UnhandledCloseSubmenu(self *MenuModelDelegate, menu_model *MenuModel, is_rtl int32) - MenuWillShow(self *MenuModelDelegate, menu_model *MenuModel) - MenuClosed(self *MenuModelDelegate, menu_model *MenuModel) - FormatLabel(self *MenuModelDelegate, menu_model *MenuModel, label *string) int32 + ExecuteCommand(self *MenuModelDelegate, menuModel *MenuModel, commandID int32, eventFlags EventFlags) + MouseOutsideMenu(self *MenuModelDelegate, menuModel *MenuModel, screenPoint *Point) + UnhandledOpenSubmenu(self *MenuModelDelegate, menuModel *MenuModel, isRtl int32) + UnhandledCloseSubmenu(self *MenuModelDelegate, menuModel *MenuModel, isRtl int32) + MenuWillShow(self *MenuModelDelegate, menuModel *MenuModel) + MenuClosed(self *MenuModelDelegate, menuModel *MenuModel) + FormatLabel(self *MenuModelDelegate, menuModel *MenuModel, label *string) int32 } // MenuModelDelegate (cef_menu_model_delegate_t from include/capi/cef_menu_model_delegate_capi.h) @@ -66,104 +66,104 @@ func (d *MenuModelDelegate) Base() *BaseRefCounted { // ExecuteCommand (execute_command) // Perform the action associated with the specified |command_id| and optional // |event_flags|. -func (d *MenuModelDelegate) ExecuteCommand(menu_model *MenuModel, command_id int32, event_flags EventFlags) { - lookupMenuModelDelegateProxy(d.Base()).ExecuteCommand(d, menu_model, command_id, event_flags) +func (d *MenuModelDelegate) ExecuteCommand(menuModel *MenuModel, commandID int32, eventFlags EventFlags) { + lookupMenuModelDelegateProxy(d.Base()).ExecuteCommand(d, menuModel, commandID, eventFlags) } //nolint:gocritic //export gocef_menu_model_delegate_execute_command -func gocef_menu_model_delegate_execute_command(self *C.cef_menu_model_delegate_t, menu_model *C.cef_menu_model_t, command_id C.int, event_flags C.cef_event_flags_t) { +func gocef_menu_model_delegate_execute_command(self *C.cef_menu_model_delegate_t, menuModel *C.cef_menu_model_t, commandID C.int, eventFlags C.cef_event_flags_t) { me__ := (*MenuModelDelegate)(self) proxy__ := lookupMenuModelDelegateProxy(me__.Base()) - proxy__.ExecuteCommand(me__, (*MenuModel)(menu_model), int32(command_id), EventFlags(event_flags)) + proxy__.ExecuteCommand(me__, (*MenuModel)(menuModel), int32(commandID), EventFlags(eventFlags)) } // MouseOutsideMenu (mouse_outside_menu) // Called when the user moves the mouse outside the menu and over the owning // window. -func (d *MenuModelDelegate) MouseOutsideMenu(menu_model *MenuModel, screen_point *Point) { - lookupMenuModelDelegateProxy(d.Base()).MouseOutsideMenu(d, menu_model, screen_point) +func (d *MenuModelDelegate) MouseOutsideMenu(menuModel *MenuModel, screenPoint *Point) { + lookupMenuModelDelegateProxy(d.Base()).MouseOutsideMenu(d, menuModel, screenPoint) } //nolint:gocritic //export gocef_menu_model_delegate_mouse_outside_menu -func gocef_menu_model_delegate_mouse_outside_menu(self *C.cef_menu_model_delegate_t, menu_model *C.cef_menu_model_t, screen_point *C.cef_point_t) { +func gocef_menu_model_delegate_mouse_outside_menu(self *C.cef_menu_model_delegate_t, menuModel *C.cef_menu_model_t, screenPoint *C.cef_point_t) { me__ := (*MenuModelDelegate)(self) proxy__ := lookupMenuModelDelegateProxy(me__.Base()) - screen_point_ := screen_point.toGo() - proxy__.MouseOutsideMenu(me__, (*MenuModel)(menu_model), screen_point_) + screenPoint_ := screenPoint.toGo() + proxy__.MouseOutsideMenu(me__, (*MenuModel)(menuModel), screenPoint_) } // UnhandledOpenSubmenu (unhandled_open_submenu) // Called on unhandled open submenu keyboard commands. |is_rtl| will be true // (1) if the menu is displaying a right-to-left language. -func (d *MenuModelDelegate) UnhandledOpenSubmenu(menu_model *MenuModel, is_rtl int32) { - lookupMenuModelDelegateProxy(d.Base()).UnhandledOpenSubmenu(d, menu_model, is_rtl) +func (d *MenuModelDelegate) UnhandledOpenSubmenu(menuModel *MenuModel, isRtl int32) { + lookupMenuModelDelegateProxy(d.Base()).UnhandledOpenSubmenu(d, menuModel, isRtl) } //nolint:gocritic //export gocef_menu_model_delegate_unhandled_open_submenu -func gocef_menu_model_delegate_unhandled_open_submenu(self *C.cef_menu_model_delegate_t, menu_model *C.cef_menu_model_t, is_rtl C.int) { +func gocef_menu_model_delegate_unhandled_open_submenu(self *C.cef_menu_model_delegate_t, menuModel *C.cef_menu_model_t, isRtl C.int) { me__ := (*MenuModelDelegate)(self) proxy__ := lookupMenuModelDelegateProxy(me__.Base()) - proxy__.UnhandledOpenSubmenu(me__, (*MenuModel)(menu_model), int32(is_rtl)) + proxy__.UnhandledOpenSubmenu(me__, (*MenuModel)(menuModel), int32(isRtl)) } // UnhandledCloseSubmenu (unhandled_close_submenu) // Called on unhandled close submenu keyboard commands. |is_rtl| will be true // (1) if the menu is displaying a right-to-left language. -func (d *MenuModelDelegate) UnhandledCloseSubmenu(menu_model *MenuModel, is_rtl int32) { - lookupMenuModelDelegateProxy(d.Base()).UnhandledCloseSubmenu(d, menu_model, is_rtl) +func (d *MenuModelDelegate) UnhandledCloseSubmenu(menuModel *MenuModel, isRtl int32) { + lookupMenuModelDelegateProxy(d.Base()).UnhandledCloseSubmenu(d, menuModel, isRtl) } //nolint:gocritic //export gocef_menu_model_delegate_unhandled_close_submenu -func gocef_menu_model_delegate_unhandled_close_submenu(self *C.cef_menu_model_delegate_t, menu_model *C.cef_menu_model_t, is_rtl C.int) { +func gocef_menu_model_delegate_unhandled_close_submenu(self *C.cef_menu_model_delegate_t, menuModel *C.cef_menu_model_t, isRtl C.int) { me__ := (*MenuModelDelegate)(self) proxy__ := lookupMenuModelDelegateProxy(me__.Base()) - proxy__.UnhandledCloseSubmenu(me__, (*MenuModel)(menu_model), int32(is_rtl)) + proxy__.UnhandledCloseSubmenu(me__, (*MenuModel)(menuModel), int32(isRtl)) } // MenuWillShow (menu_will_show) // The menu is about to show. -func (d *MenuModelDelegate) MenuWillShow(menu_model *MenuModel) { - lookupMenuModelDelegateProxy(d.Base()).MenuWillShow(d, menu_model) +func (d *MenuModelDelegate) MenuWillShow(menuModel *MenuModel) { + lookupMenuModelDelegateProxy(d.Base()).MenuWillShow(d, menuModel) } //nolint:gocritic //export gocef_menu_model_delegate_menu_will_show -func gocef_menu_model_delegate_menu_will_show(self *C.cef_menu_model_delegate_t, menu_model *C.cef_menu_model_t) { +func gocef_menu_model_delegate_menu_will_show(self *C.cef_menu_model_delegate_t, menuModel *C.cef_menu_model_t) { me__ := (*MenuModelDelegate)(self) proxy__ := lookupMenuModelDelegateProxy(me__.Base()) - proxy__.MenuWillShow(me__, (*MenuModel)(menu_model)) + proxy__.MenuWillShow(me__, (*MenuModel)(menuModel)) } // MenuClosed (menu_closed) // The menu has closed. -func (d *MenuModelDelegate) MenuClosed(menu_model *MenuModel) { - lookupMenuModelDelegateProxy(d.Base()).MenuClosed(d, menu_model) +func (d *MenuModelDelegate) MenuClosed(menuModel *MenuModel) { + lookupMenuModelDelegateProxy(d.Base()).MenuClosed(d, menuModel) } //nolint:gocritic //export gocef_menu_model_delegate_menu_closed -func gocef_menu_model_delegate_menu_closed(self *C.cef_menu_model_delegate_t, menu_model *C.cef_menu_model_t) { +func gocef_menu_model_delegate_menu_closed(self *C.cef_menu_model_delegate_t, menuModel *C.cef_menu_model_t) { me__ := (*MenuModelDelegate)(self) proxy__ := lookupMenuModelDelegateProxy(me__.Base()) - proxy__.MenuClosed(me__, (*MenuModel)(menu_model)) + proxy__.MenuClosed(me__, (*MenuModel)(menuModel)) } // FormatLabel (format_label) // Optionally modify a menu item label. Return true (1) if |label| was // modified. -func (d *MenuModelDelegate) FormatLabel(menu_model *MenuModel, label *string) int32 { - return lookupMenuModelDelegateProxy(d.Base()).FormatLabel(d, menu_model, label) +func (d *MenuModelDelegate) FormatLabel(menuModel *MenuModel, label *string) int32 { + return lookupMenuModelDelegateProxy(d.Base()).FormatLabel(d, menuModel, label) } //nolint:gocritic //export gocef_menu_model_delegate_format_label -func gocef_menu_model_delegate_format_label(self *C.cef_menu_model_delegate_t, menu_model *C.cef_menu_model_t, label *C.cef_string_t) C.int { +func gocef_menu_model_delegate_format_label(self *C.cef_menu_model_delegate_t, menuModel *C.cef_menu_model_t, label *C.cef_string_t) C.int { me__ := (*MenuModelDelegate)(self) proxy__ := lookupMenuModelDelegateProxy(me__.Base()) label_ := cefstrToString(label) - return C.int(proxy__.FormatLabel(me__, (*MenuModel)(menu_model), &label_)) + return C.int(proxy__.FormatLabel(me__, (*MenuModel)(menuModel), &label_)) } diff --git a/cef/MenuModel_gen.go b/cef/MenuModel_gen.go index 2b896a3..72c6fc5 100644 --- a/cef/MenuModel_gen.go +++ b/cef/MenuModel_gen.go @@ -8,58 +8,58 @@ import ( // int gocef_menu_model_clear(cef_menu_model_t * self, int (CEF_CALLBACK *callback__)(cef_menu_model_t *)) { return callback__(self); } // int gocef_menu_model_get_count(cef_menu_model_t * self, int (CEF_CALLBACK *callback__)(cef_menu_model_t *)) { return callback__(self); } // int gocef_menu_model_add_separator(cef_menu_model_t * self, int (CEF_CALLBACK *callback__)(cef_menu_model_t *)) { return callback__(self); } - // int gocef_menu_model_add_item(cef_menu_model_t * self, int command_id, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, command_id, label); } - // int gocef_menu_model_add_check_item(cef_menu_model_t * self, int command_id, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, command_id, label); } - // int gocef_menu_model_add_radio_item(cef_menu_model_t * self, int command_id, cef_string_t * label, int group_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *, int)) { return callback__(self, command_id, label, group_id); } - // cef_menu_model_t * gocef_menu_model_add_sub_menu(cef_menu_model_t * self, int command_id, cef_string_t * label, cef_menu_model_t * (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, command_id, label); } + // int gocef_menu_model_add_item(cef_menu_model_t * self, int commandID, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, commandID, label); } + // int gocef_menu_model_add_check_item(cef_menu_model_t * self, int commandID, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, commandID, label); } + // int gocef_menu_model_add_radio_item(cef_menu_model_t * self, int commandID, cef_string_t * label, int groupID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *, int)) { return callback__(self, commandID, label, groupID); } + // cef_menu_model_t * gocef_menu_model_add_sub_menu(cef_menu_model_t * self, int commandID, cef_string_t * label, cef_menu_model_t * (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, commandID, label); } // int gocef_menu_model_insert_separator_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_insert_item_at(cef_menu_model_t * self, int index, int command_id, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, cef_string_t *)) { return callback__(self, index, command_id, label); } - // int gocef_menu_model_insert_check_item_at(cef_menu_model_t * self, int index, int command_id, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, cef_string_t *)) { return callback__(self, index, command_id, label); } - // int gocef_menu_model_insert_radio_item_at(cef_menu_model_t * self, int index, int command_id, cef_string_t * label, int group_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, cef_string_t *, int)) { return callback__(self, index, command_id, label, group_id); } - // cef_menu_model_t * gocef_menu_model_insert_sub_menu_at(cef_menu_model_t * self, int index, int command_id, cef_string_t * label, cef_menu_model_t * (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, cef_string_t *)) { return callback__(self, index, command_id, label); } - // int gocef_menu_model_remove(cef_menu_model_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_insert_item_at(cef_menu_model_t * self, int index, int commandID, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, cef_string_t *)) { return callback__(self, index, commandID, label); } + // int gocef_menu_model_insert_check_item_at(cef_menu_model_t * self, int index, int commandID, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, cef_string_t *)) { return callback__(self, index, commandID, label); } + // int gocef_menu_model_insert_radio_item_at(cef_menu_model_t * self, int index, int commandID, cef_string_t * label, int groupID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, cef_string_t *, int)) { return callback__(self, index, commandID, label, groupID); } + // cef_menu_model_t * gocef_menu_model_insert_sub_menu_at(cef_menu_model_t * self, int index, int commandID, cef_string_t * label, cef_menu_model_t * (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, cef_string_t *)) { return callback__(self, index, commandID, label); } + // int gocef_menu_model_remove(cef_menu_model_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // int gocef_menu_model_remove_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_get_index_of(cef_menu_model_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_get_index_of(cef_menu_model_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // int gocef_menu_model_get_command_id_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_set_command_id_at(cef_menu_model_t * self, int index, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, index, command_id); } - // cef_string_userfree_t gocef_menu_model_get_label(cef_menu_model_t * self, int command_id, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_set_command_id_at(cef_menu_model_t * self, int index, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, index, commandID); } + // cef_string_userfree_t gocef_menu_model_get_label(cef_menu_model_t * self, int commandID, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // cef_string_userfree_t gocef_menu_model_get_label_at(cef_menu_model_t * self, int index, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_set_label(cef_menu_model_t * self, int command_id, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, command_id, label); } + // int gocef_menu_model_set_label(cef_menu_model_t * self, int commandID, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, commandID, label); } // int gocef_menu_model_set_label_at(cef_menu_model_t * self, int index, cef_string_t * label, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, index, label); } - // cef_menu_item_type_t gocef_menu_model_get_type(cef_menu_model_t * self, int command_id, cef_menu_item_type_t (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // cef_menu_item_type_t gocef_menu_model_get_type(cef_menu_model_t * self, int commandID, cef_menu_item_type_t (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // cef_menu_item_type_t gocef_menu_model_get_type_at(cef_menu_model_t * self, int index, cef_menu_item_type_t (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_get_group_id(cef_menu_model_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_get_group_id(cef_menu_model_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // int gocef_menu_model_get_group_id_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_set_group_id(cef_menu_model_t * self, int command_id, int group_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, command_id, group_id); } - // int gocef_menu_model_set_group_id_at(cef_menu_model_t * self, int index, int group_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, index, group_id); } - // cef_menu_model_t * gocef_menu_model_get_sub_menu(cef_menu_model_t * self, int command_id, cef_menu_model_t * (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_set_group_id(cef_menu_model_t * self, int commandID, int groupID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, commandID, groupID); } + // int gocef_menu_model_set_group_id_at(cef_menu_model_t * self, int index, int groupID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, index, groupID); } + // cef_menu_model_t * gocef_menu_model_get_sub_menu(cef_menu_model_t * self, int commandID, cef_menu_model_t * (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // cef_menu_model_t * gocef_menu_model_get_sub_menu_at(cef_menu_model_t * self, int index, cef_menu_model_t * (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_is_visible(cef_menu_model_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_is_visible(cef_menu_model_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // int gocef_menu_model_is_visible_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_set_visible(cef_menu_model_t * self, int command_id, int visible, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, command_id, visible); } + // int gocef_menu_model_set_visible(cef_menu_model_t * self, int commandID, int visible, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, commandID, visible); } // int gocef_menu_model_set_visible_at(cef_menu_model_t * self, int index, int visible, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, index, visible); } - // int gocef_menu_model_is_enabled(cef_menu_model_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_is_enabled(cef_menu_model_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // int gocef_menu_model_is_enabled_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_set_enabled(cef_menu_model_t * self, int command_id, int enabled, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, command_id, enabled); } + // int gocef_menu_model_set_enabled(cef_menu_model_t * self, int commandID, int enabled, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, commandID, enabled); } // int gocef_menu_model_set_enabled_at(cef_menu_model_t * self, int index, int enabled, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, index, enabled); } - // int gocef_menu_model_is_checked(cef_menu_model_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_is_checked(cef_menu_model_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // int gocef_menu_model_is_checked_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_set_checked(cef_menu_model_t * self, int command_id, int checked, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, command_id, checked); } + // int gocef_menu_model_set_checked(cef_menu_model_t * self, int commandID, int checked, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, commandID, checked); } // int gocef_menu_model_set_checked_at(cef_menu_model_t * self, int index, int checked, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int)) { return callback__(self, index, checked); } - // int gocef_menu_model_has_accelerator(cef_menu_model_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_has_accelerator(cef_menu_model_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // int gocef_menu_model_has_accelerator_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_set_accelerator(cef_menu_model_t * self, int command_id, int key_code, int shift_pressed, int ctrl_pressed, int alt_pressed, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, int, int, int)) { return callback__(self, command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed); } - // int gocef_menu_model_set_accelerator_at(cef_menu_model_t * self, int index, int key_code, int shift_pressed, int ctrl_pressed, int alt_pressed, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, int, int, int)) { return callback__(self, index, key_code, shift_pressed, ctrl_pressed, alt_pressed); } - // int gocef_menu_model_remove_accelerator(cef_menu_model_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, command_id); } + // int gocef_menu_model_set_accelerator(cef_menu_model_t * self, int commandID, int keyCode, int shiftPressed, int ctrlPressed, int altPressed, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, int, int, int)) { return callback__(self, commandID, keyCode, shiftPressed, ctrlPressed, altPressed); } + // int gocef_menu_model_set_accelerator_at(cef_menu_model_t * self, int index, int keyCode, int shiftPressed, int ctrlPressed, int altPressed, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int, int, int, int)) { return callback__(self, index, keyCode, shiftPressed, ctrlPressed, altPressed); } + // int gocef_menu_model_remove_accelerator(cef_menu_model_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, commandID); } // int gocef_menu_model_remove_accelerator_at(cef_menu_model_t * self, int index, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int)) { return callback__(self, index); } - // int gocef_menu_model_get_accelerator(cef_menu_model_t * self, int command_id, int * key_code, int * shift_pressed, int * ctrl_pressed, int * alt_pressed, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int *, int *, int *, int *)) { return callback__(self, command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed); } - // int gocef_menu_model_get_accelerator_at(cef_menu_model_t * self, int index, int * key_code, int * shift_pressed, int * ctrl_pressed, int * alt_pressed, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int *, int *, int *, int *)) { return callback__(self, index, key_code, shift_pressed, ctrl_pressed, alt_pressed); } - // int gocef_menu_model_set_color(cef_menu_model_t * self, int command_id, cef_menu_color_type_t color_type, cef_color_t color, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_menu_color_type_t, cef_color_t)) { return callback__(self, command_id, color_type, color); } - // int gocef_menu_model_set_color_at(cef_menu_model_t * self, int index, cef_menu_color_type_t color_type, cef_color_t color, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_menu_color_type_t, cef_color_t)) { return callback__(self, index, color_type, color); } - // int gocef_menu_model_get_color(cef_menu_model_t * self, int command_id, cef_menu_color_type_t color_type, cef_color_t * color, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_menu_color_type_t, cef_color_t *)) { return callback__(self, command_id, color_type, color); } - // int gocef_menu_model_get_color_at(cef_menu_model_t * self, int index, cef_menu_color_type_t color_type, cef_color_t * color, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_menu_color_type_t, cef_color_t *)) { return callback__(self, index, color_type, color); } - // int gocef_menu_model_set_font_list(cef_menu_model_t * self, int command_id, cef_string_t * font_list, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, command_id, font_list); } - // int gocef_menu_model_set_font_list_at(cef_menu_model_t * self, int index, cef_string_t * font_list, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, index, font_list); } + // int gocef_menu_model_get_accelerator(cef_menu_model_t * self, int commandID, int * keyCode, int * shiftPressed, int * ctrlPressed, int * altPressed, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int *, int *, int *, int *)) { return callback__(self, commandID, keyCode, shiftPressed, ctrlPressed, altPressed); } + // int gocef_menu_model_get_accelerator_at(cef_menu_model_t * self, int index, int * keyCode, int * shiftPressed, int * ctrlPressed, int * altPressed, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, int *, int *, int *, int *)) { return callback__(self, index, keyCode, shiftPressed, ctrlPressed, altPressed); } + // int gocef_menu_model_set_color(cef_menu_model_t * self, int commandID, cef_menu_color_type_t colorType, cef_color_t color, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_menu_color_type_t, cef_color_t)) { return callback__(self, commandID, colorType, color); } + // int gocef_menu_model_set_color_at(cef_menu_model_t * self, int index, cef_menu_color_type_t colorType, cef_color_t color, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_menu_color_type_t, cef_color_t)) { return callback__(self, index, colorType, color); } + // int gocef_menu_model_get_color(cef_menu_model_t * self, int commandID, cef_menu_color_type_t colorType, cef_color_t * color, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_menu_color_type_t, cef_color_t *)) { return callback__(self, commandID, colorType, color); } + // int gocef_menu_model_get_color_at(cef_menu_model_t * self, int index, cef_menu_color_type_t colorType, cef_color_t * color, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_menu_color_type_t, cef_color_t *)) { return callback__(self, index, colorType, color); } + // int gocef_menu_model_set_font_list(cef_menu_model_t * self, int commandID, cef_string_t * fontList, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, commandID, fontList); } + // int gocef_menu_model_set_font_list_at(cef_menu_model_t * self, int index, cef_string_t * fontList, int (CEF_CALLBACK *callback__)(cef_menu_model_t *, int, cef_string_t *)) { return callback__(self, index, fontList); } "C" ) @@ -106,47 +106,47 @@ func (d *MenuModel) AddSeparator() int32 { // AddItem (add_item) // Add an item to the menu. Returns true (1) on success. -func (d *MenuModel) AddItem(command_id int32, label string) int32 { +func (d *MenuModel) AddItem(commandID int32, label string) int32 { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return int32(C.gocef_menu_model_add_item(d.toNative(), C.int(command_id), (*C.cef_string_t)(label_), d.add_item)) + return int32(C.gocef_menu_model_add_item(d.toNative(), C.int(commandID), (*C.cef_string_t)(label_), d.add_item)) } // AddCheckItem (add_check_item) // Add a check item to the menu. Returns true (1) on success. -func (d *MenuModel) AddCheckItem(command_id int32, label string) int32 { +func (d *MenuModel) AddCheckItem(commandID int32, label string) int32 { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return int32(C.gocef_menu_model_add_check_item(d.toNative(), C.int(command_id), (*C.cef_string_t)(label_), d.add_check_item)) + return int32(C.gocef_menu_model_add_check_item(d.toNative(), C.int(commandID), (*C.cef_string_t)(label_), d.add_check_item)) } // AddRadioItem (add_radio_item) // Add a radio item to the menu. Only a single item with the specified // |group_id| can be checked at a time. Returns true (1) on success. -func (d *MenuModel) AddRadioItem(command_id int32, label string, group_id int32) int32 { +func (d *MenuModel) AddRadioItem(commandID int32, label string, groupID int32) int32 { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return int32(C.gocef_menu_model_add_radio_item(d.toNative(), C.int(command_id), (*C.cef_string_t)(label_), C.int(group_id), d.add_radio_item)) + return int32(C.gocef_menu_model_add_radio_item(d.toNative(), C.int(commandID), (*C.cef_string_t)(label_), C.int(groupID), d.add_radio_item)) } // AddSubMenu (add_sub_menu) // Add a sub-menu to the menu. The new sub-menu is returned. -func (d *MenuModel) AddSubMenu(command_id int32, label string) *MenuModel { +func (d *MenuModel) AddSubMenu(commandID int32, label string) *MenuModel { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return (*MenuModel)(C.gocef_menu_model_add_sub_menu(d.toNative(), C.int(command_id), (*C.cef_string_t)(label_), d.add_sub_menu)) + return (*MenuModel)(C.gocef_menu_model_add_sub_menu(d.toNative(), C.int(commandID), (*C.cef_string_t)(label_), d.add_sub_menu)) } // InsertSeparatorAt (insert_separator_at) @@ -159,57 +159,57 @@ func (d *MenuModel) InsertSeparatorAt(index int32) int32 { // InsertItemAt (insert_item_at) // Insert an item in the menu at the specified |index|. Returns true (1) on // success. -func (d *MenuModel) InsertItemAt(index, command_id int32, label string) int32 { +func (d *MenuModel) InsertItemAt(index, commandID int32, label string) int32 { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return int32(C.gocef_menu_model_insert_item_at(d.toNative(), C.int(index), C.int(command_id), (*C.cef_string_t)(label_), d.insert_item_at)) + return int32(C.gocef_menu_model_insert_item_at(d.toNative(), C.int(index), C.int(commandID), (*C.cef_string_t)(label_), d.insert_item_at)) } // InsertCheckItemAt (insert_check_item_at) // Insert a check item in the menu at the specified |index|. Returns true (1) // on success. -func (d *MenuModel) InsertCheckItemAt(index, command_id int32, label string) int32 { +func (d *MenuModel) InsertCheckItemAt(index, commandID int32, label string) int32 { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return int32(C.gocef_menu_model_insert_check_item_at(d.toNative(), C.int(index), C.int(command_id), (*C.cef_string_t)(label_), d.insert_check_item_at)) + return int32(C.gocef_menu_model_insert_check_item_at(d.toNative(), C.int(index), C.int(commandID), (*C.cef_string_t)(label_), d.insert_check_item_at)) } // InsertRadioItemAt (insert_radio_item_at) // Insert a radio item in the menu at the specified |index|. Only a single // item with the specified |group_id| can be checked at a time. Returns true // (1) on success. -func (d *MenuModel) InsertRadioItemAt(index, command_id int32, label string, group_id int32) int32 { +func (d *MenuModel) InsertRadioItemAt(index, commandID int32, label string, groupID int32) int32 { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return int32(C.gocef_menu_model_insert_radio_item_at(d.toNative(), C.int(index), C.int(command_id), (*C.cef_string_t)(label_), C.int(group_id), d.insert_radio_item_at)) + return int32(C.gocef_menu_model_insert_radio_item_at(d.toNative(), C.int(index), C.int(commandID), (*C.cef_string_t)(label_), C.int(groupID), d.insert_radio_item_at)) } // InsertSubMenuAt (insert_sub_menu_at) // Insert a sub-menu in the menu at the specified |index|. The new sub-menu is // returned. -func (d *MenuModel) InsertSubMenuAt(index, command_id int32, label string) *MenuModel { +func (d *MenuModel) InsertSubMenuAt(index, commandID int32, label string) *MenuModel { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return (*MenuModel)(C.gocef_menu_model_insert_sub_menu_at(d.toNative(), C.int(index), C.int(command_id), (*C.cef_string_t)(label_), d.insert_sub_menu_at)) + return (*MenuModel)(C.gocef_menu_model_insert_sub_menu_at(d.toNative(), C.int(index), C.int(commandID), (*C.cef_string_t)(label_), d.insert_sub_menu_at)) } // Remove (remove) // Removes the item with the specified |command_id|. Returns true (1) on // success. -func (d *MenuModel) Remove(command_id int32) int32 { - return int32(C.gocef_menu_model_remove(d.toNative(), C.int(command_id), d.remove)) +func (d *MenuModel) Remove(commandID int32) int32 { + return int32(C.gocef_menu_model_remove(d.toNative(), C.int(commandID), d.remove)) } // RemoveAt (remove_at) @@ -221,28 +221,28 @@ func (d *MenuModel) RemoveAt(index int32) int32 { // GetIndexOf (get_index_of) // Returns the index associated with the specified |command_id| or -1 if not // found due to the command id not existing in the menu. -func (d *MenuModel) GetIndexOf(command_id int32) int32 { - return int32(C.gocef_menu_model_get_index_of(d.toNative(), C.int(command_id), d.get_index_of)) +func (d *MenuModel) GetIndexOf(commandID int32) int32 { + return int32(C.gocef_menu_model_get_index_of(d.toNative(), C.int(commandID), d.get_index_of)) } -// GetCommandIdAt (get_command_id_at) +// GetCommandIDAt (get_command_id_at) // Returns the command id at the specified |index| or -1 if not found due to // invalid range or the index being a separator. -func (d *MenuModel) GetCommandIdAt(index int32) int32 { +func (d *MenuModel) GetCommandIDAt(index int32) int32 { return int32(C.gocef_menu_model_get_command_id_at(d.toNative(), C.int(index), d.get_command_id_at)) } -// SetCommandIdAt (set_command_id_at) +// SetCommandIDAt (set_command_id_at) // Sets the command id at the specified |index|. Returns true (1) on success. -func (d *MenuModel) SetCommandIdAt(index, command_id int32) int32 { - return int32(C.gocef_menu_model_set_command_id_at(d.toNative(), C.int(index), C.int(command_id), d.set_command_id_at)) +func (d *MenuModel) SetCommandIDAt(index, commandID int32) int32 { + return int32(C.gocef_menu_model_set_command_id_at(d.toNative(), C.int(index), C.int(commandID), d.set_command_id_at)) } // GetLabel (get_label) // Returns the label for the specified |command_id| or NULL if not found. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *MenuModel) GetLabel(command_id int32) string { - return cefuserfreestrToString(C.gocef_menu_model_get_label(d.toNative(), C.int(command_id), d.get_label)) +func (d *MenuModel) GetLabel(commandID int32) string { + return cefuserfreestrToString(C.gocef_menu_model_get_label(d.toNative(), C.int(commandID), d.get_label)) } // GetLabelAt (get_label_at) @@ -255,13 +255,13 @@ func (d *MenuModel) GetLabelAt(index int32) string { // SetLabel (set_label) // Sets the label for the specified |command_id|. Returns true (1) on success. -func (d *MenuModel) SetLabel(command_id int32, label string) int32 { +func (d *MenuModel) SetLabel(commandID int32, label string) int32 { label_ := C.cef_string_userfree_alloc() setCEFStr(label, label_) defer func() { C.cef_string_userfree_free(label_) }() - return int32(C.gocef_menu_model_set_label(d.toNative(), C.int(command_id), (*C.cef_string_t)(label_), d.set_label)) + return int32(C.gocef_menu_model_set_label(d.toNative(), C.int(commandID), (*C.cef_string_t)(label_), d.set_label)) } // SetLabelAt (set_label_at) @@ -277,8 +277,8 @@ func (d *MenuModel) SetLabelAt(index int32, label string) int32 { // GetType (get_type) // Returns the item type for the specified |command_id|. -func (d *MenuModel) GetType(command_id int32) MenuItemType { - return MenuItemType(C.gocef_menu_model_get_type(d.toNative(), C.int(command_id), d.get_type)) +func (d *MenuModel) GetType(commandID int32) MenuItemType { + return MenuItemType(C.gocef_menu_model_get_type(d.toNative(), C.int(commandID), d.get_type)) } // GetTypeAt (get_type_at) @@ -287,35 +287,35 @@ func (d *MenuModel) GetTypeAt(index int32) MenuItemType { return MenuItemType(C.gocef_menu_model_get_type_at(d.toNative(), C.int(index), d.get_type_at)) } -// GetGroupId (get_group_id) +// GetGroupID (get_group_id) // Returns the group id for the specified |command_id| or -1 if invalid. -func (d *MenuModel) GetGroupId(command_id int32) int32 { - return int32(C.gocef_menu_model_get_group_id(d.toNative(), C.int(command_id), d.get_group_id)) +func (d *MenuModel) GetGroupID(commandID int32) int32 { + return int32(C.gocef_menu_model_get_group_id(d.toNative(), C.int(commandID), d.get_group_id)) } -// GetGroupIdAt (get_group_id_at) +// GetGroupIDAt (get_group_id_at) // Returns the group id at the specified |index| or -1 if invalid. -func (d *MenuModel) GetGroupIdAt(index int32) int32 { +func (d *MenuModel) GetGroupIDAt(index int32) int32 { return int32(C.gocef_menu_model_get_group_id_at(d.toNative(), C.int(index), d.get_group_id_at)) } -// SetGroupId (set_group_id) +// SetGroupID (set_group_id) // Sets the group id for the specified |command_id|. Returns true (1) on // success. -func (d *MenuModel) SetGroupId(command_id, group_id int32) int32 { - return int32(C.gocef_menu_model_set_group_id(d.toNative(), C.int(command_id), C.int(group_id), d.set_group_id)) +func (d *MenuModel) SetGroupID(commandID, groupID int32) int32 { + return int32(C.gocef_menu_model_set_group_id(d.toNative(), C.int(commandID), C.int(groupID), d.set_group_id)) } -// SetGroupIdAt (set_group_id_at) +// SetGroupIDAt (set_group_id_at) // Sets the group id at the specified |index|. Returns true (1) on success. -func (d *MenuModel) SetGroupIdAt(index, group_id int32) int32 { - return int32(C.gocef_menu_model_set_group_id_at(d.toNative(), C.int(index), C.int(group_id), d.set_group_id_at)) +func (d *MenuModel) SetGroupIDAt(index, groupID int32) int32 { + return int32(C.gocef_menu_model_set_group_id_at(d.toNative(), C.int(index), C.int(groupID), d.set_group_id_at)) } // GetSubMenu (get_sub_menu) // Returns the submenu for the specified |command_id| or NULL if invalid. -func (d *MenuModel) GetSubMenu(command_id int32) *MenuModel { - return (*MenuModel)(C.gocef_menu_model_get_sub_menu(d.toNative(), C.int(command_id), d.get_sub_menu)) +func (d *MenuModel) GetSubMenu(commandID int32) *MenuModel { + return (*MenuModel)(C.gocef_menu_model_get_sub_menu(d.toNative(), C.int(commandID), d.get_sub_menu)) } // GetSubMenuAt (get_sub_menu_at) @@ -326,8 +326,8 @@ func (d *MenuModel) GetSubMenuAt(index int32) *MenuModel { // IsVisible (is_visible) // Returns true (1) if the specified |command_id| is visible. -func (d *MenuModel) IsVisible(command_id int32) int32 { - return int32(C.gocef_menu_model_is_visible(d.toNative(), C.int(command_id), d.is_visible)) +func (d *MenuModel) IsVisible(commandID int32) int32 { + return int32(C.gocef_menu_model_is_visible(d.toNative(), C.int(commandID), d.is_visible)) } // IsVisibleAt (is_visible_at) @@ -339,8 +339,8 @@ func (d *MenuModel) IsVisibleAt(index int32) int32 { // SetVisible (set_visible) // Change the visibility of the specified |command_id|. Returns true (1) on // success. -func (d *MenuModel) SetVisible(command_id, visible int32) int32 { - return int32(C.gocef_menu_model_set_visible(d.toNative(), C.int(command_id), C.int(visible), d.set_visible)) +func (d *MenuModel) SetVisible(commandID, visible int32) int32 { + return int32(C.gocef_menu_model_set_visible(d.toNative(), C.int(commandID), C.int(visible), d.set_visible)) } // SetVisibleAt (set_visible_at) @@ -352,8 +352,8 @@ func (d *MenuModel) SetVisibleAt(index, visible int32) int32 { // IsEnabled (is_enabled) // Returns true (1) if the specified |command_id| is enabled. -func (d *MenuModel) IsEnabled(command_id int32) int32 { - return int32(C.gocef_menu_model_is_enabled(d.toNative(), C.int(command_id), d.is_enabled)) +func (d *MenuModel) IsEnabled(commandID int32) int32 { + return int32(C.gocef_menu_model_is_enabled(d.toNative(), C.int(commandID), d.is_enabled)) } // IsEnabledAt (is_enabled_at) @@ -365,8 +365,8 @@ func (d *MenuModel) IsEnabledAt(index int32) int32 { // SetEnabled (set_enabled) // Change the enabled status of the specified |command_id|. Returns true (1) // on success. -func (d *MenuModel) SetEnabled(command_id, enabled int32) int32 { - return int32(C.gocef_menu_model_set_enabled(d.toNative(), C.int(command_id), C.int(enabled), d.set_enabled)) +func (d *MenuModel) SetEnabled(commandID, enabled int32) int32 { + return int32(C.gocef_menu_model_set_enabled(d.toNative(), C.int(commandID), C.int(enabled), d.set_enabled)) } // SetEnabledAt (set_enabled_at) @@ -379,8 +379,8 @@ func (d *MenuModel) SetEnabledAt(index, enabled int32) int32 { // IsChecked (is_checked) // Returns true (1) if the specified |command_id| is checked. Only applies to // check and radio items. -func (d *MenuModel) IsChecked(command_id int32) int32 { - return int32(C.gocef_menu_model_is_checked(d.toNative(), C.int(command_id), d.is_checked)) +func (d *MenuModel) IsChecked(commandID int32) int32 { + return int32(C.gocef_menu_model_is_checked(d.toNative(), C.int(commandID), d.is_checked)) } // IsCheckedAt (is_checked_at) @@ -393,8 +393,8 @@ func (d *MenuModel) IsCheckedAt(index int32) int32 { // SetChecked (set_checked) // Check the specified |command_id|. Only applies to check and radio items. // Returns true (1) on success. -func (d *MenuModel) SetChecked(command_id, checked int32) int32 { - return int32(C.gocef_menu_model_set_checked(d.toNative(), C.int(command_id), C.int(checked), d.set_checked)) +func (d *MenuModel) SetChecked(commandID, checked int32) int32 { + return int32(C.gocef_menu_model_set_checked(d.toNative(), C.int(commandID), C.int(checked), d.set_checked)) } // SetCheckedAt (set_checked_at) @@ -407,8 +407,8 @@ func (d *MenuModel) SetCheckedAt(index, checked int32) int32 { // HasAccelerator (has_accelerator) // Returns true (1) if the specified |command_id| has a keyboard accelerator // assigned. -func (d *MenuModel) HasAccelerator(command_id int32) int32 { - return int32(C.gocef_menu_model_has_accelerator(d.toNative(), C.int(command_id), d.has_accelerator)) +func (d *MenuModel) HasAccelerator(commandID int32) int32 { + return int32(C.gocef_menu_model_has_accelerator(d.toNative(), C.int(commandID), d.has_accelerator)) } // HasAcceleratorAt (has_accelerator_at) @@ -421,22 +421,22 @@ func (d *MenuModel) HasAcceleratorAt(index int32) int32 { // SetAccelerator (set_accelerator) // Set the keyboard accelerator for the specified |command_id|. |key_code| can // be any virtual key or character value. Returns true (1) on success. -func (d *MenuModel) SetAccelerator(command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed int32) int32 { - return int32(C.gocef_menu_model_set_accelerator(d.toNative(), C.int(command_id), C.int(key_code), C.int(shift_pressed), C.int(ctrl_pressed), C.int(alt_pressed), d.set_accelerator)) +func (d *MenuModel) SetAccelerator(commandID, keyCode, shiftPressed, ctrlPressed, altPressed int32) int32 { + return int32(C.gocef_menu_model_set_accelerator(d.toNative(), C.int(commandID), C.int(keyCode), C.int(shiftPressed), C.int(ctrlPressed), C.int(altPressed), d.set_accelerator)) } // SetAcceleratorAt (set_accelerator_at) // Set the keyboard accelerator at the specified |index|. |key_code| can be // any virtual key or character value. Returns true (1) on success. -func (d *MenuModel) SetAcceleratorAt(index, key_code, shift_pressed, ctrl_pressed, alt_pressed int32) int32 { - return int32(C.gocef_menu_model_set_accelerator_at(d.toNative(), C.int(index), C.int(key_code), C.int(shift_pressed), C.int(ctrl_pressed), C.int(alt_pressed), d.set_accelerator_at)) +func (d *MenuModel) SetAcceleratorAt(index, keyCode, shiftPressed, ctrlPressed, altPressed int32) int32 { + return int32(C.gocef_menu_model_set_accelerator_at(d.toNative(), C.int(index), C.int(keyCode), C.int(shiftPressed), C.int(ctrlPressed), C.int(altPressed), d.set_accelerator_at)) } // RemoveAccelerator (remove_accelerator) // Remove the keyboard accelerator for the specified |command_id|. Returns // true (1) on success. -func (d *MenuModel) RemoveAccelerator(command_id int32) int32 { - return int32(C.gocef_menu_model_remove_accelerator(d.toNative(), C.int(command_id), d.remove_accelerator)) +func (d *MenuModel) RemoveAccelerator(commandID int32) int32 { + return int32(C.gocef_menu_model_remove_accelerator(d.toNative(), C.int(commandID), d.remove_accelerator)) } // RemoveAcceleratorAt (remove_accelerator_at) @@ -449,15 +449,15 @@ func (d *MenuModel) RemoveAcceleratorAt(index int32) int32 { // GetAccelerator (get_accelerator) // Retrieves the keyboard accelerator for the specified |command_id|. Returns // true (1) on success. -func (d *MenuModel) GetAccelerator(command_id int32, key_code, shift_pressed, ctrl_pressed, alt_pressed *int32) int32 { - return int32(C.gocef_menu_model_get_accelerator(d.toNative(), C.int(command_id), (*C.int)(key_code), (*C.int)(shift_pressed), (*C.int)(ctrl_pressed), (*C.int)(alt_pressed), d.get_accelerator)) +func (d *MenuModel) GetAccelerator(commandID int32, keyCode, shiftPressed, ctrlPressed, altPressed *int32) int32 { + return int32(C.gocef_menu_model_get_accelerator(d.toNative(), C.int(commandID), (*C.int)(keyCode), (*C.int)(shiftPressed), (*C.int)(ctrlPressed), (*C.int)(altPressed), d.get_accelerator)) } // GetAcceleratorAt (get_accelerator_at) // Retrieves the keyboard accelerator for the specified |index|. Returns true // (1) on success. -func (d *MenuModel) GetAcceleratorAt(index int32, key_code, shift_pressed, ctrl_pressed, alt_pressed *int32) int32 { - return int32(C.gocef_menu_model_get_accelerator_at(d.toNative(), C.int(index), (*C.int)(key_code), (*C.int)(shift_pressed), (*C.int)(ctrl_pressed), (*C.int)(alt_pressed), d.get_accelerator_at)) +func (d *MenuModel) GetAcceleratorAt(index int32, keyCode, shiftPressed, ctrlPressed, altPressed *int32) int32 { + return int32(C.gocef_menu_model_get_accelerator_at(d.toNative(), C.int(index), (*C.int)(keyCode), (*C.int)(shiftPressed), (*C.int)(ctrlPressed), (*C.int)(altPressed), d.get_accelerator_at)) } // SetColor (set_color) @@ -465,8 +465,8 @@ func (d *MenuModel) GetAcceleratorAt(index int32, key_code, shift_pressed, ctrl_ // Specify a |color| value of 0 to remove the explicit color. If no explicit // color or default color is set for |color_type| then the system color will // be used. Returns true (1) on success. -func (d *MenuModel) SetColor(command_id int32, color_type MenuColorType, color Color) int32 { - return int32(C.gocef_menu_model_set_color(d.toNative(), C.int(command_id), C.cef_menu_color_type_t(color_type), C.cef_color_t(color), d.set_color)) +func (d *MenuModel) SetColor(commandID int32, colorType MenuColorType, color Color) int32 { + return int32(C.gocef_menu_model_set_color(d.toNative(), C.int(commandID), C.cef_menu_color_type_t(colorType), C.cef_color_t(color), d.set_color)) } // SetColorAt (set_color_at) @@ -475,16 +475,16 @@ func (d *MenuModel) SetColor(command_id int32, color_type MenuColorType, color C // of -1 to set the default color for items that do not have an explicit color // set. If no explicit color or default color is set for |color_type| then the // system color will be used. Returns true (1) on success. -func (d *MenuModel) SetColorAt(index int32, color_type MenuColorType, color Color) int32 { - return int32(C.gocef_menu_model_set_color_at(d.toNative(), C.int(index), C.cef_menu_color_type_t(color_type), C.cef_color_t(color), d.set_color_at)) +func (d *MenuModel) SetColorAt(index int32, colorType MenuColorType, color Color) int32 { + return int32(C.gocef_menu_model_set_color_at(d.toNative(), C.int(index), C.cef_menu_color_type_t(colorType), C.cef_color_t(color), d.set_color_at)) } // GetColor (get_color) // Returns in |color| the color that was explicitly set for |command_id| and // |color_type|. If a color was not set then 0 will be returned in |color|. // Returns true (1) on success. -func (d *MenuModel) GetColor(command_id int32, color_type MenuColorType, color *Color) int32 { - return int32(C.gocef_menu_model_get_color(d.toNative(), C.int(command_id), C.cef_menu_color_type_t(color_type), (*C.cef_color_t)(color), d.get_color)) +func (d *MenuModel) GetColor(commandID int32, colorType MenuColorType, color *Color) int32 { + return int32(C.gocef_menu_model_get_color(d.toNative(), C.int(commandID), C.cef_menu_color_type_t(colorType), (*C.cef_color_t)(color), d.get_color)) } // GetColorAt (get_color_at) @@ -492,8 +492,8 @@ func (d *MenuModel) GetColor(command_id int32, color_type MenuColorType, color * // |color_type|. Specify an |index| value of -1 to return the default color in // |color|. If a color was not set then 0 will be returned in |color|. Returns // true (1) on success. -func (d *MenuModel) GetColorAt(index int32, color_type MenuColorType, color *Color) int32 { - return int32(C.gocef_menu_model_get_color_at(d.toNative(), C.int(index), C.cef_menu_color_type_t(color_type), (*C.cef_color_t)(color), d.get_color_at)) +func (d *MenuModel) GetColorAt(index int32, colorType MenuColorType, color *Color) int32 { + return int32(C.gocef_menu_model_get_color_at(d.toNative(), C.int(index), C.cef_menu_color_type_t(colorType), (*C.cef_color_t)(color), d.get_color_at)) } // SetFontList (set_font_list) @@ -507,13 +507,13 @@ func (d *MenuModel) GetColorAt(index int32, color_type MenuColorType, color *Col // // Here are examples of valid font description strings: - "Arial, Helvetica, // Bold Italic 14px" - "Arial, 14px" -func (d *MenuModel) SetFontList(command_id int32, font_list string) int32 { - font_list_ := C.cef_string_userfree_alloc() - setCEFStr(font_list, font_list_) +func (d *MenuModel) SetFontList(commandID int32, fontList string) int32 { + fontList_ := C.cef_string_userfree_alloc() + setCEFStr(fontList, fontList_) defer func() { - C.cef_string_userfree_free(font_list_) + C.cef_string_userfree_free(fontList_) }() - return int32(C.gocef_menu_model_set_font_list(d.toNative(), C.int(command_id), (*C.cef_string_t)(font_list_), d.set_font_list)) + return int32(C.gocef_menu_model_set_font_list(d.toNative(), C.int(commandID), (*C.cef_string_t)(fontList_), d.set_font_list)) } // SetFontListAt (set_font_list_at) @@ -528,11 +528,11 @@ func (d *MenuModel) SetFontList(command_id int32, font_list string) int32 { // // Here are examples of valid font description strings: - "Arial, Helvetica, // Bold Italic 14px" - "Arial, 14px" -func (d *MenuModel) SetFontListAt(index int32, font_list string) int32 { - font_list_ := C.cef_string_userfree_alloc() - setCEFStr(font_list, font_list_) +func (d *MenuModel) SetFontListAt(index int32, fontList string) int32 { + fontList_ := C.cef_string_userfree_alloc() + setCEFStr(fontList, fontList_) defer func() { - C.cef_string_userfree_free(font_list_) + C.cef_string_userfree_free(fontList_) }() - return int32(C.gocef_menu_model_set_font_list_at(d.toNative(), C.int(index), (*C.cef_string_t)(font_list_), d.set_font_list_at)) + return int32(C.gocef_menu_model_set_font_list_at(d.toNative(), C.int(index), (*C.cef_string_t)(fontList_), d.set_font_list_at)) } diff --git a/cef/NavigationEntry_gen.go b/cef/NavigationEntry_gen.go index 61fe345..badf66a 100644 --- a/cef/NavigationEntry_gen.go +++ b/cef/NavigationEntry_gen.go @@ -38,25 +38,25 @@ func (d *NavigationEntry) IsValid() int32 { return int32(C.gocef_navigation_entry_is_valid(d.toNative(), d.is_valid)) } -// GetUrl (get_url) +// GetURL (get_url) // Returns the actual URL of the page. For some pages this may be data: URL or // similar. Use get_display_url() to return a display-friendly version. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *NavigationEntry) GetUrl() string { +func (d *NavigationEntry) GetURL() string { return cefuserfreestrToString(C.gocef_navigation_entry_get_url(d.toNative(), d.get_url)) } -// GetDisplayUrl (get_display_url) +// GetDisplayURL (get_display_url) // Returns a display-friendly version of the URL. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *NavigationEntry) GetDisplayUrl() string { +func (d *NavigationEntry) GetDisplayURL() string { return cefuserfreestrToString(C.gocef_navigation_entry_get_display_url(d.toNative(), d.get_display_url)) } -// GetOriginalUrl (get_original_url) +// GetOriginalURL (get_original_url) // Returns the original URL that was entered by the user before any redirects. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *NavigationEntry) GetOriginalUrl() string { +func (d *NavigationEntry) GetOriginalURL() string { return cefuserfreestrToString(C.gocef_navigation_entry_get_original_url(d.toNative(), d.get_original_url)) } @@ -91,11 +91,11 @@ func (d *NavigationEntry) GetCompletionTime() Time { return result__ } -// GetHttpStatusCode (get_http_status_code) +// GetHTTPStatusCode (get_http_status_code) // Returns the HTTP status code for the last known successful navigation // response. May be 0 if the response has not yet been received or if the // navigation has not yet completed. -func (d *NavigationEntry) GetHttpStatusCode() int32 { +func (d *NavigationEntry) GetHTTPStatusCode() int32 { return int32(C.gocef_navigation_entry_get_http_status_code(d.toNative(), d.get_http_status_code)) } diff --git a/cef/PDFPrintCallback_gen.go b/cef/PDFPrintCallback_gen.go index 669a5b2..09816d1 100644 --- a/cef/PDFPrintCallback_gen.go +++ b/cef/PDFPrintCallback_gen.go @@ -16,7 +16,7 @@ import ( // PDFPrintCallbackProxy defines methods required for using PDFPrintCallback. type PDFPrintCallbackProxy interface { - OnPdfPrintFinished(self *PDFPrintCallback, path string, ok int32) + OnPDFPrintFinished(self *PDFPrintCallback, path string, ok int32) } // PDFPrintCallback (cef_pdf_print_callback_t from include/capi/cef_browser_capi.h) @@ -56,12 +56,12 @@ func (d *PDFPrintCallback) Base() *BaseRefCounted { return (*BaseRefCounted)(&d.base) } -// OnPdfPrintFinished (on_pdf_print_finished) +// OnPDFPrintFinished (on_pdf_print_finished) // Method that will be executed when the PDF printing has completed. |path| is // the output path. |ok| will be true (1) if the printing completed // successfully or false (0) otherwise. -func (d *PDFPrintCallback) OnPdfPrintFinished(path string, ok int32) { - lookupPDFPrintCallbackProxy(d.Base()).OnPdfPrintFinished(d, path, ok) +func (d *PDFPrintCallback) OnPDFPrintFinished(path string, ok int32) { + lookupPDFPrintCallbackProxy(d.Base()).OnPDFPrintFinished(d, path, ok) } //nolint:gocritic @@ -70,5 +70,5 @@ func gocef_pdf_print_callback_on_pdf_print_finished(self *C.cef_pdf_print_callba me__ := (*PDFPrintCallback)(self) proxy__ := lookupPDFPrintCallbackProxy(me__.Base()) path_ := cefstrToString(path) - proxy__.OnPdfPrintFinished(me__, path_, int32(ok)) + proxy__.OnPDFPrintFinished(me__, path_, int32(ok)) } diff --git a/cef/PDFPrintSettings_gen.go b/cef/PDFPrintSettings_gen.go index 8c120ae..1fe77e9 100644 --- a/cef/PDFPrintSettings_gen.go +++ b/cef/PDFPrintSettings_gen.go @@ -14,10 +14,10 @@ type PDFPrintSettings struct { // Page title to display in the header. Only used if |header_footer_enabled| // is set to true (1). HeaderFooterTitle string - // HeaderFooterUrl (header_footer_url) + // HeaderFooterURL (header_footer_url) // URL to display in the footer. Only used if |header_footer_enabled| is set // to true (1). - HeaderFooterUrl string + HeaderFooterURL string // PageWidth (page_width) // Output page size in microns. If either of these values is less than or // equal to zero then the default paper size (A4) will be used. @@ -68,7 +68,7 @@ func (d *PDFPrintSettings) toNative(native *C.cef_pdf_print_settings_t) *C.cef_p return nil } setCEFStr(d.HeaderFooterTitle, &native.header_footer_title) - setCEFStr(d.HeaderFooterUrl, &native.header_footer_url) + setCEFStr(d.HeaderFooterURL, &native.header_footer_url) native.page_width = C.int(d.PageWidth) native.page_height = C.int(d.PageHeight) native.scale_factor = C.int(d.ScaleFactor) @@ -95,7 +95,7 @@ func (n *C.cef_pdf_print_settings_t) toGo() *PDFPrintSettings { func (n *C.cef_pdf_print_settings_t) intoGo(d *PDFPrintSettings) { d.HeaderFooterTitle = cefstrToString(&n.header_footer_title) - d.HeaderFooterUrl = cefstrToString(&n.header_footer_url) + d.HeaderFooterURL = cefstrToString(&n.header_footer_url) d.PageWidth = int32(n.page_width) d.PageHeight = int32(n.page_height) d.ScaleFactor = int32(n.scale_factor) diff --git a/cef/PrintHandler_gen.go b/cef/PrintHandler_gen.go index 0c884ba..89730a6 100644 --- a/cef/PrintHandler_gen.go +++ b/cef/PrintHandler_gen.go @@ -17,11 +17,11 @@ import ( // PrintHandlerProxy defines methods required for using PrintHandler. type PrintHandlerProxy interface { OnPrintStart(self *PrintHandler, browser *Browser) - OnPrintSettings(self *PrintHandler, browser *Browser, settings *PrintSettings, get_defaults int32) - OnPrintDialog(self *PrintHandler, browser *Browser, has_selection int32, callback *PrintDialogCallback) int32 - OnPrintJob(self *PrintHandler, browser *Browser, document_name, pdf_file_path string, callback *PrintJobCallback) int32 + OnPrintSettings(self *PrintHandler, browser *Browser, settings *PrintSettings, getDefaults int32) + OnPrintDialog(self *PrintHandler, browser *Browser, hasSelection int32, callback *PrintDialogCallback) int32 + OnPrintJob(self *PrintHandler, browser *Browser, documentName, pDFFilePath string, callback *PrintJobCallback) int32 OnPrintReset(self *PrintHandler, browser *Browser) - GetPdfPaperSize(self *PrintHandler, device_units_per_inch int32) Size + GetPDFPaperSize(self *PrintHandler, deviceUnitsPerInch int32) Size } // PrintHandler (cef_print_handler_t from include/capi/cef_print_handler_capi.h) @@ -83,50 +83,50 @@ func gocef_print_handler_on_print_start(self *C.cef_print_handler_t, browser *C. // Synchronize |settings| with client state. If |get_defaults| is true (1) // then populate |settings| with the default print settings. Do not keep a // reference to |settings| outside of this callback. -func (d *PrintHandler) OnPrintSettings(browser *Browser, settings *PrintSettings, get_defaults int32) { - lookupPrintHandlerProxy(d.Base()).OnPrintSettings(d, browser, settings, get_defaults) +func (d *PrintHandler) OnPrintSettings(browser *Browser, settings *PrintSettings, getDefaults int32) { + lookupPrintHandlerProxy(d.Base()).OnPrintSettings(d, browser, settings, getDefaults) } //nolint:gocritic //export gocef_print_handler_on_print_settings -func gocef_print_handler_on_print_settings(self *C.cef_print_handler_t, browser *C.cef_browser_t, settings *C.cef_print_settings_t, get_defaults C.int) { +func gocef_print_handler_on_print_settings(self *C.cef_print_handler_t, browser *C.cef_browser_t, settings *C.cef_print_settings_t, getDefaults C.int) { me__ := (*PrintHandler)(self) proxy__ := lookupPrintHandlerProxy(me__.Base()) - proxy__.OnPrintSettings(me__, (*Browser)(browser), (*PrintSettings)(settings), int32(get_defaults)) + proxy__.OnPrintSettings(me__, (*Browser)(browser), (*PrintSettings)(settings), int32(getDefaults)) } // OnPrintDialog (on_print_dialog) // Show the print dialog. Execute |callback| once the dialog is dismissed. // Return true (1) if the dialog will be displayed or false (0) to cancel the // printing immediately. -func (d *PrintHandler) OnPrintDialog(browser *Browser, has_selection int32, callback *PrintDialogCallback) int32 { - return lookupPrintHandlerProxy(d.Base()).OnPrintDialog(d, browser, has_selection, callback) +func (d *PrintHandler) OnPrintDialog(browser *Browser, hasSelection int32, callback *PrintDialogCallback) int32 { + return lookupPrintHandlerProxy(d.Base()).OnPrintDialog(d, browser, hasSelection, callback) } //nolint:gocritic //export gocef_print_handler_on_print_dialog -func gocef_print_handler_on_print_dialog(self *C.cef_print_handler_t, browser *C.cef_browser_t, has_selection C.int, callback *C.cef_print_dialog_callback_t) C.int { +func gocef_print_handler_on_print_dialog(self *C.cef_print_handler_t, browser *C.cef_browser_t, hasSelection C.int, callback *C.cef_print_dialog_callback_t) C.int { me__ := (*PrintHandler)(self) proxy__ := lookupPrintHandlerProxy(me__.Base()) - return C.int(proxy__.OnPrintDialog(me__, (*Browser)(browser), int32(has_selection), (*PrintDialogCallback)(callback))) + return C.int(proxy__.OnPrintDialog(me__, (*Browser)(browser), int32(hasSelection), (*PrintDialogCallback)(callback))) } // OnPrintJob (on_print_job) // Send the print job to the printer. Execute |callback| once the job is // completed. Return true (1) if the job will proceed or false (0) to cancel // the job immediately. -func (d *PrintHandler) OnPrintJob(browser *Browser, document_name, pdf_file_path string, callback *PrintJobCallback) int32 { - return lookupPrintHandlerProxy(d.Base()).OnPrintJob(d, browser, document_name, pdf_file_path, callback) +func (d *PrintHandler) OnPrintJob(browser *Browser, documentName, pDFFilePath string, callback *PrintJobCallback) int32 { + return lookupPrintHandlerProxy(d.Base()).OnPrintJob(d, browser, documentName, pDFFilePath, callback) } //nolint:gocritic //export gocef_print_handler_on_print_job -func gocef_print_handler_on_print_job(self *C.cef_print_handler_t, browser *C.cef_browser_t, document_name *C.cef_string_t, pdf_file_path *C.cef_string_t, callback *C.cef_print_job_callback_t) C.int { +func gocef_print_handler_on_print_job(self *C.cef_print_handler_t, browser *C.cef_browser_t, documentName *C.cef_string_t, pDFFilePath *C.cef_string_t, callback *C.cef_print_job_callback_t) C.int { me__ := (*PrintHandler)(self) proxy__ := lookupPrintHandlerProxy(me__.Base()) - document_name_ := cefstrToString(document_name) - pdf_file_path_ := cefstrToString(pdf_file_path) - return C.int(proxy__.OnPrintJob(me__, (*Browser)(browser), document_name_, pdf_file_path_, (*PrintJobCallback)(callback))) + documentName_ := cefstrToString(documentName) + pDFFilePath_ := cefstrToString(pDFFilePath) + return C.int(proxy__.OnPrintJob(me__, (*Browser)(browser), documentName_, pDFFilePath_, (*PrintJobCallback)(callback))) } // OnPrintReset (on_print_reset) @@ -143,19 +143,19 @@ func gocef_print_handler_on_print_reset(self *C.cef_print_handler_t, browser *C. proxy__.OnPrintReset(me__, (*Browser)(browser)) } -// GetPdfPaperSize (get_pdf_paper_size) +// GetPDFPaperSize (get_pdf_paper_size) // Return the PDF paper size in device units. Used in combination with // cef_browser_host_t::print_to_pdf(). -func (d *PrintHandler) GetPdfPaperSize(device_units_per_inch int32) Size { - return lookupPrintHandlerProxy(d.Base()).GetPdfPaperSize(d, device_units_per_inch) +func (d *PrintHandler) GetPDFPaperSize(deviceUnitsPerInch int32) Size { + return lookupPrintHandlerProxy(d.Base()).GetPDFPaperSize(d, deviceUnitsPerInch) } //nolint:gocritic //export gocef_print_handler_get_pdf_paper_size -func gocef_print_handler_get_pdf_paper_size(self *C.cef_print_handler_t, device_units_per_inch C.int) C.cef_size_t { +func gocef_print_handler_get_pdf_paper_size(self *C.cef_print_handler_t, deviceUnitsPerInch C.int) C.cef_size_t { me__ := (*PrintHandler)(self) proxy__ := lookupPrintHandlerProxy(me__.Base()) - call__ := proxy__.GetPdfPaperSize(me__, int32(device_units_per_inch)) + call__ := proxy__.GetPDFPaperSize(me__, int32(deviceUnitsPerInch)) var result__ C.cef_size_t call__.toNative(&result__) return result__ diff --git a/cef/PrintSettings_gen.go b/cef/PrintSettings_gen.go index 8d9fe2c..97de992 100644 --- a/cef/PrintSettings_gen.go +++ b/cef/PrintSettings_gen.go @@ -9,7 +9,7 @@ import ( // cef_print_settings_t * gocef_print_settings_copy(cef_print_settings_t * self, cef_print_settings_t * (CEF_CALLBACK *callback__)(cef_print_settings_t *)) { return callback__(self); } // void gocef_print_settings_set_orientation(cef_print_settings_t * self, int landscape, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, int)) { return callback__(self, landscape); } // int gocef_print_settings_is_landscape(cef_print_settings_t * self, int (CEF_CALLBACK *callback__)(cef_print_settings_t *)) { return callback__(self); } - // void gocef_print_settings_set_printer_printable_area(cef_print_settings_t * self, cef_size_t * physical_size_device_units, cef_rect_t * printable_area_device_units, int landscape_needs_flip, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, cef_size_t *, cef_rect_t *, int)) { return callback__(self, physical_size_device_units, printable_area_device_units, landscape_needs_flip); } + // void gocef_print_settings_set_printer_printable_area(cef_print_settings_t * self, cef_size_t * physicalSizeDeviceUnits, cef_rect_t * printableAreaDeviceUnits, int landscapeNeedsFlip, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, cef_size_t *, cef_rect_t *, int)) { return callback__(self, physicalSizeDeviceUnits, printableAreaDeviceUnits, landscapeNeedsFlip); } // void gocef_print_settings_set_device_name(cef_print_settings_t * self, cef_string_t * name, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, cef_string_t *)) { return callback__(self, name); } // cef_string_userfree_t gocef_print_settings_get_device_name(cef_print_settings_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_print_settings_t *)) { return callback__(self); } // void gocef_print_settings_set_dpi(cef_print_settings_t * self, int dpi, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, int)) { return callback__(self, dpi); } @@ -17,7 +17,7 @@ import ( // void gocef_print_settings_set_page_ranges(cef_print_settings_t * self, size_t rangesCount, cef_range_t * ranges, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, size_t, cef_range_t *)) { return callback__(self, rangesCount, ranges); } // size_t gocef_print_settings_get_page_ranges_count(cef_print_settings_t * self, size_t (CEF_CALLBACK *callback__)(cef_print_settings_t *)) { return callback__(self); } // void gocef_print_settings_get_page_ranges(cef_print_settings_t * self, size_t * rangesCount, cef_range_t * ranges, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, size_t *, cef_range_t *)) { return callback__(self, rangesCount, ranges); } - // void gocef_print_settings_set_selection_only(cef_print_settings_t * self, int selection_only, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, int)) { return callback__(self, selection_only); } + // void gocef_print_settings_set_selection_only(cef_print_settings_t * self, int selectionOnly, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, int)) { return callback__(self, selectionOnly); } // int gocef_print_settings_is_selection_only(cef_print_settings_t * self, int (CEF_CALLBACK *callback__)(cef_print_settings_t *)) { return callback__(self); } // void gocef_print_settings_set_collate(cef_print_settings_t * self, int collate, void (CEF_CALLBACK *callback__)(cef_print_settings_t *, int)) { return callback__(self, collate); } // int gocef_print_settings_will_collate(cef_print_settings_t * self, int (CEF_CALLBACK *callback__)(cef_print_settings_t *)) { return callback__(self); } @@ -80,8 +80,8 @@ func (d *PrintSettings) IsLandscape() int32 { // Set the printer printable area in device units. Some platforms already // provide flipped area. Set |landscape_needs_flip| to false (0) on those // platforms to avoid double flipping. -func (d *PrintSettings) SetPrinterPrintableArea(physical_size_device_units *Size, printable_area_device_units *Rect, landscape_needs_flip int32) { - C.gocef_print_settings_set_printer_printable_area(d.toNative(), physical_size_device_units.toNative(&C.cef_size_t{}), printable_area_device_units.toNative(&C.cef_rect_t{}), C.int(landscape_needs_flip), d.set_printer_printable_area) +func (d *PrintSettings) SetPrinterPrintableArea(physicalSizeDeviceUnits *Size, printableAreaDeviceUnits *Rect, landscapeNeedsFlip int32) { + C.gocef_print_settings_set_printer_printable_area(d.toNative(), physicalSizeDeviceUnits.toNative(&C.cef_size_t{}), printableAreaDeviceUnits.toNative(&C.cef_rect_t{}), C.int(landscapeNeedsFlip), d.set_printer_printable_area) } // SetDeviceName (set_device_name) @@ -134,8 +134,8 @@ func (d *PrintSettings) GetPageRanges(rangesCount *uint64, ranges *Range) { // SetSelectionOnly (set_selection_only) // Set whether only the selection will be printed. -func (d *PrintSettings) SetSelectionOnly(selection_only int32) { - C.gocef_print_settings_set_selection_only(d.toNative(), C.int(selection_only), d.set_selection_only) +func (d *PrintSettings) SetSelectionOnly(selectionOnly int32) { + C.gocef_print_settings_set_selection_only(d.toNative(), C.int(selectionOnly), d.set_selection_only) } // IsSelectionOnly (is_selection_only) diff --git a/cef/ReadHandler_gen.go b/cef/ReadHandler_gen.go index 086825f..e1644a3 100644 --- a/cef/ReadHandler_gen.go +++ b/cef/ReadHandler_gen.go @@ -19,7 +19,7 @@ type ReadHandlerProxy interface { Read(self *ReadHandler, ptr unsafe.Pointer, size, n uint64) uint64 Seek(self *ReadHandler, offset int64, whence int32) int32 Tell(self *ReadHandler) int64 - Eof(self *ReadHandler) int32 + EOF(self *ReadHandler) int32 MayBlock(self *ReadHandler) int32 } @@ -103,10 +103,10 @@ func gocef_read_handler_tell(self *C.cef_read_handler_t) C.int64 { return C.int64(proxy__.Tell(me__)) } -// Eof (eof) +// EOF (eof) // Return non-zero if at end of file. -func (d *ReadHandler) Eof() int32 { - return lookupReadHandlerProxy(d.Base()).Eof(d) +func (d *ReadHandler) EOF() int32 { + return lookupReadHandlerProxy(d.Base()).EOF(d) } //nolint:gocritic @@ -114,7 +114,7 @@ func (d *ReadHandler) Eof() int32 { func gocef_read_handler_eof(self *C.cef_read_handler_t) C.int { me__ := (*ReadHandler)(self) proxy__ := lookupReadHandlerProxy(me__.Base()) - return C.int(proxy__.Eof(me__)) + return C.int(proxy__.EOF(me__)) } // MayBlock (may_block) diff --git a/cef/RegisterCdmCallback_gen.go b/cef/RegisterCdmCallback_gen.go index 4283711..64ae14a 100644 --- a/cef/RegisterCdmCallback_gen.go +++ b/cef/RegisterCdmCallback_gen.go @@ -16,7 +16,7 @@ import ( // RegisterCdmCallbackProxy defines methods required for using RegisterCdmCallback. type RegisterCdmCallbackProxy interface { - OnCdmRegistrationComplete(self *RegisterCdmCallback, result CdmRegistrationError, error_message string) + OnCdmRegistrationComplete(self *RegisterCdmCallback, result CdmRegistrationError, errorMessage string) } // RegisterCdmCallback (cef_register_cdm_callback_t from include/capi/cef_web_plugin_capi.h) @@ -62,15 +62,15 @@ func (d *RegisterCdmCallback) Base() *BaseRefCounted { // be CEF_CDM_REGISTRATION_ERROR_NONE if registration completed successfully. // Otherwise, |result| and |error_message| will contain additional information // about why registration failed. -func (d *RegisterCdmCallback) OnCdmRegistrationComplete(result CdmRegistrationError, error_message string) { - lookupRegisterCdmCallbackProxy(d.Base()).OnCdmRegistrationComplete(d, result, error_message) +func (d *RegisterCdmCallback) OnCdmRegistrationComplete(result CdmRegistrationError, errorMessage string) { + lookupRegisterCdmCallbackProxy(d.Base()).OnCdmRegistrationComplete(d, result, errorMessage) } //nolint:gocritic //export gocef_register_cdm_callback_on_cdm_registration_complete -func gocef_register_cdm_callback_on_cdm_registration_complete(self *C.cef_register_cdm_callback_t, result C.cef_cdm_registration_error_t, error_message *C.cef_string_t) { +func gocef_register_cdm_callback_on_cdm_registration_complete(self *C.cef_register_cdm_callback_t, result C.cef_cdm_registration_error_t, errorMessage *C.cef_string_t) { me__ := (*RegisterCdmCallback)(self) proxy__ := lookupRegisterCdmCallbackProxy(me__.Base()) - error_message_ := cefstrToString(error_message) - proxy__.OnCdmRegistrationComplete(me__, CdmRegistrationError(result), error_message_) + errorMessage_ := cefstrToString(errorMessage) + proxy__.OnCdmRegistrationComplete(me__, CdmRegistrationError(result), errorMessage_) } diff --git a/cef/RenderHandler_gen.go b/cef/RenderHandler_gen.go index 1f62a3e..8afe0e6 100644 --- a/cef/RenderHandler_gen.go +++ b/cef/RenderHandler_gen.go @@ -20,18 +20,18 @@ type RenderHandlerProxy interface { GetRootScreenRect(self *RenderHandler, browser *Browser, rect *Rect) int32 GetViewRect(self *RenderHandler, browser *Browser, rect *Rect) GetScreenPoint(self *RenderHandler, browser *Browser, viewX, viewY int32, screenX, screenY *int32) int32 - GetScreenInfo(self *RenderHandler, browser *Browser, screen_info *ScreenInfo) int32 + GetScreenInfo(self *RenderHandler, browser *Browser, screenInfo *ScreenInfo) int32 OnPopupShow(self *RenderHandler, browser *Browser, show int32) OnPopupSize(self *RenderHandler, browser *Browser, rect *Rect) OnPaint(self *RenderHandler, browser *Browser, type_r PaintElementType, dirtyRectsCount uint64, dirtyRects *Rect, buffer unsafe.Pointer, width, height int32) - OnAcceleratedPaint(self *RenderHandler, browser *Browser, type_r PaintElementType, dirtyRectsCount uint64, dirtyRects *Rect, shared_handle unsafe.Pointer) - OnCursorChange(self *RenderHandler, browser *Browser, cursor unsafe.Pointer, type_r CursorType, custom_cursor_info *CursorInfo) - StartDragging(self *RenderHandler, browser *Browser, drag_data *DragData, allowed_ops DragOperationsMask, x, y int32) int32 + OnAcceleratedPaint(self *RenderHandler, browser *Browser, type_r PaintElementType, dirtyRectsCount uint64, dirtyRects *Rect, sharedHandle unsafe.Pointer) + OnCursorChange(self *RenderHandler, browser *Browser, cursor unsafe.Pointer, type_r CursorType, customCursorInfo *CursorInfo) + StartDragging(self *RenderHandler, browser *Browser, dragData *DragData, allowedOps DragOperationsMask, x, y int32) int32 UpdateDragCursor(self *RenderHandler, browser *Browser, operation DragOperationsMask) OnScrollOffsetChanged(self *RenderHandler, browser *Browser, x, y float64) - OnImeCompositionRangeChanged(self *RenderHandler, browser *Browser, selected_range *Range, character_boundsCount uint64, character_bounds *Rect) - OnTextSelectionChanged(self *RenderHandler, browser *Browser, selected_text string, selected_range *Range) - OnVirtualKeyboardRequested(self *RenderHandler, browser *Browser, input_mode TextInputMode) + OnImeCompositionRangeChanged(self *RenderHandler, browser *Browser, selectedRange *Range, characterBoundsCount uint64, characterBounds *Rect) + OnTextSelectionChanged(self *RenderHandler, browser *Browser, selectedText string, selectedRange *Range) + OnVirtualKeyboardRequested(self *RenderHandler, browser *Browser, inputMode TextInputMode) } // RenderHandler (cef_render_handler_t from include/capi/cef_render_handler_capi.h) @@ -142,17 +142,17 @@ func gocef_render_handler_get_screen_point(self *C.cef_render_handler_t, browser // If the screen info rectangle is left NULL the rectangle from GetViewRect // will be used. If the rectangle is still NULL or invalid popups may not be // drawn correctly. -func (d *RenderHandler) GetScreenInfo(browser *Browser, screen_info *ScreenInfo) int32 { - return lookupRenderHandlerProxy(d.Base()).GetScreenInfo(d, browser, screen_info) +func (d *RenderHandler) GetScreenInfo(browser *Browser, screenInfo *ScreenInfo) int32 { + return lookupRenderHandlerProxy(d.Base()).GetScreenInfo(d, browser, screenInfo) } //nolint:gocritic //export gocef_render_handler_get_screen_info -func gocef_render_handler_get_screen_info(self *C.cef_render_handler_t, browser *C.cef_browser_t, screen_info *C.cef_screen_info_t) C.int { +func gocef_render_handler_get_screen_info(self *C.cef_render_handler_t, browser *C.cef_browser_t, screenInfo *C.cef_screen_info_t) C.int { me__ := (*RenderHandler)(self) proxy__ := lookupRenderHandlerProxy(me__.Base()) - screen_info_ := screen_info.toGo() - return C.int(proxy__.GetScreenInfo(me__, (*Browser)(browser), screen_info_)) + screenInfo_ := screenInfo.toGo() + return C.int(proxy__.GetScreenInfo(me__, (*Browser)(browser), screenInfo_)) } // OnPopupShow (on_popup_show) @@ -217,33 +217,33 @@ func gocef_render_handler_on_paint(self *C.cef_render_handler_t, browser *C.cef_ // can be accessed via ID3D11Device using the OpenSharedResource function. // This function is only called when cef_window_tInfo::shared_texture_enabled // is set to true (1), and is currently only supported on Windows. -func (d *RenderHandler) OnAcceleratedPaint(browser *Browser, type_r PaintElementType, dirtyRectsCount uint64, dirtyRects *Rect, shared_handle unsafe.Pointer) { - lookupRenderHandlerProxy(d.Base()).OnAcceleratedPaint(d, browser, type_r, dirtyRectsCount, dirtyRects, shared_handle) +func (d *RenderHandler) OnAcceleratedPaint(browser *Browser, type_r PaintElementType, dirtyRectsCount uint64, dirtyRects *Rect, sharedHandle unsafe.Pointer) { + lookupRenderHandlerProxy(d.Base()).OnAcceleratedPaint(d, browser, type_r, dirtyRectsCount, dirtyRects, sharedHandle) } //nolint:gocritic //export gocef_render_handler_on_accelerated_paint -func gocef_render_handler_on_accelerated_paint(self *C.cef_render_handler_t, browser *C.cef_browser_t, type_r C.cef_paint_element_type_t, dirtyRectsCount C.size_t, dirtyRects *C.cef_rect_t, shared_handle unsafe.Pointer) { +func gocef_render_handler_on_accelerated_paint(self *C.cef_render_handler_t, browser *C.cef_browser_t, type_r C.cef_paint_element_type_t, dirtyRectsCount C.size_t, dirtyRects *C.cef_rect_t, sharedHandle unsafe.Pointer) { me__ := (*RenderHandler)(self) proxy__ := lookupRenderHandlerProxy(me__.Base()) dirtyRects_ := dirtyRects.toGo() - proxy__.OnAcceleratedPaint(me__, (*Browser)(browser), PaintElementType(type_r), uint64(dirtyRectsCount), dirtyRects_, shared_handle) + proxy__.OnAcceleratedPaint(me__, (*Browser)(browser), PaintElementType(type_r), uint64(dirtyRectsCount), dirtyRects_, sharedHandle) } // OnCursorChange (on_cursor_change) // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then // |custom_cursor_info| will be populated with the custom cursor information. -func (d *RenderHandler) OnCursorChange(browser *Browser, cursor unsafe.Pointer, type_r CursorType, custom_cursor_info *CursorInfo) { - lookupRenderHandlerProxy(d.Base()).OnCursorChange(d, browser, cursor, type_r, custom_cursor_info) +func (d *RenderHandler) OnCursorChange(browser *Browser, cursor unsafe.Pointer, type_r CursorType, customCursorInfo *CursorInfo) { + lookupRenderHandlerProxy(d.Base()).OnCursorChange(d, browser, cursor, type_r, customCursorInfo) } //nolint:gocritic //export gocef_render_handler_on_cursor_change -func gocef_render_handler_on_cursor_change(self *C.cef_render_handler_t, browser *C.cef_browser_t, cursor unsafe.Pointer, type_r C.cef_cursor_type_t, custom_cursor_info *C.cef_cursor_info_t) { +func gocef_render_handler_on_cursor_change(self *C.cef_render_handler_t, browser *C.cef_browser_t, cursor unsafe.Pointer, type_r C.cef_cursor_type_t, customCursorInfo *C.cef_cursor_info_t) { me__ := (*RenderHandler)(self) proxy__ := lookupRenderHandlerProxy(me__.Base()) - custom_cursor_info_ := custom_cursor_info.toGo() - proxy__.OnCursorChange(me__, (*Browser)(browser), cursor, CursorType(type_r), custom_cursor_info_) + customCursorInfo_ := customCursorInfo.toGo() + proxy__.OnCursorChange(me__, (*Browser)(browser), cursor, CursorType(type_r), customCursorInfo_) } // StartDragging (start_dragging) @@ -259,16 +259,16 @@ func gocef_render_handler_on_cursor_change(self *C.cef_render_handler_t, browser // cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either // synchronously or asynchronously to inform the web view that the drag // operation has ended. -func (d *RenderHandler) StartDragging(browser *Browser, drag_data *DragData, allowed_ops DragOperationsMask, x, y int32) int32 { - return lookupRenderHandlerProxy(d.Base()).StartDragging(d, browser, drag_data, allowed_ops, x, y) +func (d *RenderHandler) StartDragging(browser *Browser, dragData *DragData, allowedOps DragOperationsMask, x, y int32) int32 { + return lookupRenderHandlerProxy(d.Base()).StartDragging(d, browser, dragData, allowedOps, x, y) } //nolint:gocritic //export gocef_render_handler_start_dragging -func gocef_render_handler_start_dragging(self *C.cef_render_handler_t, browser *C.cef_browser_t, drag_data *C.cef_drag_data_t, allowed_ops C.cef_drag_operations_mask_t, x C.int, y C.int) C.int { +func gocef_render_handler_start_dragging(self *C.cef_render_handler_t, browser *C.cef_browser_t, dragData *C.cef_drag_data_t, allowedOps C.cef_drag_operations_mask_t, x C.int, y C.int) C.int { me__ := (*RenderHandler)(self) proxy__ := lookupRenderHandlerProxy(me__.Base()) - return C.int(proxy__.StartDragging(me__, (*Browser)(browser), (*DragData)(drag_data), DragOperationsMask(allowed_ops), int32(x), int32(y))) + return C.int(proxy__.StartDragging(me__, (*Browser)(browser), (*DragData)(dragData), DragOperationsMask(allowedOps), int32(x), int32(y))) } // UpdateDragCursor (update_drag_cursor) @@ -305,36 +305,36 @@ func gocef_render_handler_on_scroll_offset_changed(self *C.cef_render_handler_t, // Called when the IME composition range has changed. |selected_range| is the // range of characters that have been selected. |character_bounds| is the // bounds of each character in view coordinates. -func (d *RenderHandler) OnImeCompositionRangeChanged(browser *Browser, selected_range *Range, character_boundsCount uint64, character_bounds *Rect) { - lookupRenderHandlerProxy(d.Base()).OnImeCompositionRangeChanged(d, browser, selected_range, character_boundsCount, character_bounds) +func (d *RenderHandler) OnImeCompositionRangeChanged(browser *Browser, selectedRange *Range, characterBoundsCount uint64, characterBounds *Rect) { + lookupRenderHandlerProxy(d.Base()).OnImeCompositionRangeChanged(d, browser, selectedRange, characterBoundsCount, characterBounds) } //nolint:gocritic //export gocef_render_handler_on_ime_composition_range_changed -func gocef_render_handler_on_ime_composition_range_changed(self *C.cef_render_handler_t, browser *C.cef_browser_t, selected_range *C.cef_range_t, character_boundsCount C.size_t, character_bounds *C.cef_rect_t) { +func gocef_render_handler_on_ime_composition_range_changed(self *C.cef_render_handler_t, browser *C.cef_browser_t, selectedRange *C.cef_range_t, characterBoundsCount C.size_t, characterBounds *C.cef_rect_t) { me__ := (*RenderHandler)(self) proxy__ := lookupRenderHandlerProxy(me__.Base()) - selected_range_ := selected_range.toGo() - character_bounds_ := character_bounds.toGo() - proxy__.OnImeCompositionRangeChanged(me__, (*Browser)(browser), selected_range_, uint64(character_boundsCount), character_bounds_) + selectedRange_ := selectedRange.toGo() + characterBounds_ := characterBounds.toGo() + proxy__.OnImeCompositionRangeChanged(me__, (*Browser)(browser), selectedRange_, uint64(characterBoundsCount), characterBounds_) } // OnTextSelectionChanged (on_text_selection_changed) // Called when text selection has changed for the specified |browser|. // |selected_text| is the currently selected text and |selected_range| is the // character range. -func (d *RenderHandler) OnTextSelectionChanged(browser *Browser, selected_text string, selected_range *Range) { - lookupRenderHandlerProxy(d.Base()).OnTextSelectionChanged(d, browser, selected_text, selected_range) +func (d *RenderHandler) OnTextSelectionChanged(browser *Browser, selectedText string, selectedRange *Range) { + lookupRenderHandlerProxy(d.Base()).OnTextSelectionChanged(d, browser, selectedText, selectedRange) } //nolint:gocritic //export gocef_render_handler_on_text_selection_changed -func gocef_render_handler_on_text_selection_changed(self *C.cef_render_handler_t, browser *C.cef_browser_t, selected_text *C.cef_string_t, selected_range *C.cef_range_t) { +func gocef_render_handler_on_text_selection_changed(self *C.cef_render_handler_t, browser *C.cef_browser_t, selectedText *C.cef_string_t, selectedRange *C.cef_range_t) { me__ := (*RenderHandler)(self) proxy__ := lookupRenderHandlerProxy(me__.Base()) - selected_text_ := cefstrToString(selected_text) - selected_range_ := selected_range.toGo() - proxy__.OnTextSelectionChanged(me__, (*Browser)(browser), selected_text_, selected_range_) + selectedText_ := cefstrToString(selectedText) + selectedRange_ := selectedRange.toGo() + proxy__.OnTextSelectionChanged(me__, (*Browser)(browser), selectedText_, selectedRange_) } // OnVirtualKeyboardRequested (on_virtual_keyboard_requested) @@ -342,14 +342,14 @@ func gocef_render_handler_on_text_selection_changed(self *C.cef_render_handler_t // specified |browser|. |input_mode| specifies what kind of keyboard should be // opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing keyboard // for this browser should be hidden. -func (d *RenderHandler) OnVirtualKeyboardRequested(browser *Browser, input_mode TextInputMode) { - lookupRenderHandlerProxy(d.Base()).OnVirtualKeyboardRequested(d, browser, input_mode) +func (d *RenderHandler) OnVirtualKeyboardRequested(browser *Browser, inputMode TextInputMode) { + lookupRenderHandlerProxy(d.Base()).OnVirtualKeyboardRequested(d, browser, inputMode) } //nolint:gocritic //export gocef_render_handler_on_virtual_keyboard_requested -func gocef_render_handler_on_virtual_keyboard_requested(self *C.cef_render_handler_t, browser *C.cef_browser_t, input_mode C.cef_text_input_mode_t) { +func gocef_render_handler_on_virtual_keyboard_requested(self *C.cef_render_handler_t, browser *C.cef_browser_t, inputMode C.cef_text_input_mode_t) { me__ := (*RenderHandler)(self) proxy__ := lookupRenderHandlerProxy(me__.Base()) - proxy__.OnVirtualKeyboardRequested(me__, (*Browser)(browser), TextInputMode(input_mode)) + proxy__.OnVirtualKeyboardRequested(me__, (*Browser)(browser), TextInputMode(inputMode)) } diff --git a/cef/RenderProcessHandler_gen.go b/cef/RenderProcessHandler_gen.go index e72cb28..26f0f7e 100644 --- a/cef/RenderProcessHandler_gen.go +++ b/cef/RenderProcessHandler_gen.go @@ -16,16 +16,16 @@ import ( // RenderProcessHandlerProxy defines methods required for using RenderProcessHandler. type RenderProcessHandlerProxy interface { - OnRenderThreadCreated(self *RenderProcessHandler, extra_info *ListValue) + OnRenderThreadCreated(self *RenderProcessHandler, extraInfo *ListValue) OnWebKitInitialized(self *RenderProcessHandler) - OnBrowserCreated(self *RenderProcessHandler, browser *Browser, extra_info *DictionaryValue) + OnBrowserCreated(self *RenderProcessHandler, browser *Browser, extraInfo *DictionaryValue) OnBrowserDestroyed(self *RenderProcessHandler, browser *Browser) GetLoadHandler(self *RenderProcessHandler) *LoadHandler OnContextCreated(self *RenderProcessHandler, browser *Browser, frame *Frame, context *V8context) OnContextReleased(self *RenderProcessHandler, browser *Browser, frame *Frame, context *V8context) OnUncaughtException(self *RenderProcessHandler, browser *Browser, frame *Frame, context *V8context, exception *V8exception, stackTrace *V8stackTrace) OnFocusedNodeChanged(self *RenderProcessHandler, browser *Browser, frame *Frame, node *Domnode) - OnProcessMessageReceived(self *RenderProcessHandler, browser *Browser, frame *Frame, source_process ProcessID, message *ProcessMessage) int32 + OnProcessMessageReceived(self *RenderProcessHandler, browser *Browser, frame *Frame, sourceProcess ProcessID, message *ProcessMessage) int32 } // RenderProcessHandler (cef_render_process_handler_t from include/capi/cef_render_process_handler_capi.h) @@ -71,16 +71,16 @@ func (d *RenderProcessHandler) Base() *BaseRefCounted { // is a read-only value originating from // cef_browser_process_handler_t::on_render_process_thread_created(). Do not // keep a reference to |extra_info| outside of this function. -func (d *RenderProcessHandler) OnRenderThreadCreated(extra_info *ListValue) { - lookupRenderProcessHandlerProxy(d.Base()).OnRenderThreadCreated(d, extra_info) +func (d *RenderProcessHandler) OnRenderThreadCreated(extraInfo *ListValue) { + lookupRenderProcessHandlerProxy(d.Base()).OnRenderThreadCreated(d, extraInfo) } //nolint:gocritic //export gocef_render_process_handler_on_render_thread_created -func gocef_render_process_handler_on_render_thread_created(self *C.cef_render_process_handler_t, extra_info *C.cef_list_value_t) { +func gocef_render_process_handler_on_render_thread_created(self *C.cef_render_process_handler_t, extraInfo *C.cef_list_value_t) { me__ := (*RenderProcessHandler)(self) proxy__ := lookupRenderProcessHandlerProxy(me__.Base()) - proxy__.OnRenderThreadCreated(me__, (*ListValue)(extra_info)) + proxy__.OnRenderThreadCreated(me__, (*ListValue)(extraInfo)) } // OnWebKitInitialized (on_web_kit_initialized) @@ -105,16 +105,16 @@ func gocef_render_process_handler_on_web_kit_initialized(self *C.cef_render_proc // cef_browser_host_t::cef_browser_host_create_browser_sync(), // cef_life_span_handler_t::on_before_popup() or // cef_browser_view_t::cef_browser_view_create(). -func (d *RenderProcessHandler) OnBrowserCreated(browser *Browser, extra_info *DictionaryValue) { - lookupRenderProcessHandlerProxy(d.Base()).OnBrowserCreated(d, browser, extra_info) +func (d *RenderProcessHandler) OnBrowserCreated(browser *Browser, extraInfo *DictionaryValue) { + lookupRenderProcessHandlerProxy(d.Base()).OnBrowserCreated(d, browser, extraInfo) } //nolint:gocritic //export gocef_render_process_handler_on_browser_created -func gocef_render_process_handler_on_browser_created(self *C.cef_render_process_handler_t, browser *C.cef_browser_t, extra_info *C.cef_dictionary_value_t) { +func gocef_render_process_handler_on_browser_created(self *C.cef_render_process_handler_t, browser *C.cef_browser_t, extraInfo *C.cef_dictionary_value_t) { me__ := (*RenderProcessHandler)(self) proxy__ := lookupRenderProcessHandlerProxy(me__.Base()) - proxy__.OnBrowserCreated(me__, (*Browser)(browser), (*DictionaryValue)(extra_info)) + proxy__.OnBrowserCreated(me__, (*Browser)(browser), (*DictionaryValue)(extraInfo)) } // OnBrowserDestroyed (on_browser_destroyed) @@ -218,14 +218,14 @@ func gocef_render_process_handler_on_focused_node_changed(self *C.cef_render_pro // Called when a new message is received from a different process. Return true // (1) if the message was handled or false (0) otherwise. Do not keep a // reference to or attempt to access the message outside of this callback. -func (d *RenderProcessHandler) OnProcessMessageReceived(browser *Browser, frame *Frame, source_process ProcessID, message *ProcessMessage) int32 { - return lookupRenderProcessHandlerProxy(d.Base()).OnProcessMessageReceived(d, browser, frame, source_process, message) +func (d *RenderProcessHandler) OnProcessMessageReceived(browser *Browser, frame *Frame, sourceProcess ProcessID, message *ProcessMessage) int32 { + return lookupRenderProcessHandlerProxy(d.Base()).OnProcessMessageReceived(d, browser, frame, sourceProcess, message) } //nolint:gocritic //export gocef_render_process_handler_on_process_message_received -func gocef_render_process_handler_on_process_message_received(self *C.cef_render_process_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, source_process C.cef_process_id_t, message *C.cef_process_message_t) C.int { +func gocef_render_process_handler_on_process_message_received(self *C.cef_render_process_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, sourceProcess C.cef_process_id_t, message *C.cef_process_message_t) C.int { me__ := (*RenderProcessHandler)(self) proxy__ := lookupRenderProcessHandlerProxy(me__.Base()) - return C.int(proxy__.OnProcessMessageReceived(me__, (*Browser)(browser), (*Frame)(frame), ProcessID(source_process), (*ProcessMessage)(message))) + return C.int(proxy__.OnProcessMessageReceived(me__, (*Browser)(browser), (*Frame)(frame), ProcessID(sourceProcess), (*ProcessMessage)(message))) } diff --git a/cef/RequestContextHandler_gen.go b/cef/RequestContextHandler_gen.go index ce0a5c4..c5058d2 100644 --- a/cef/RequestContextHandler_gen.go +++ b/cef/RequestContextHandler_gen.go @@ -16,9 +16,9 @@ import ( // RequestContextHandlerProxy defines methods required for using RequestContextHandler. type RequestContextHandlerProxy interface { - OnRequestContextInitialized(self *RequestContextHandler, request_context *RequestContext) - OnBeforePluginLoad(self *RequestContextHandler, mime_type, plugin_url string, is_main_frame int32, top_origin_url string, plugin_info *WebPluginInfo, plugin_policy *PluginPolicy) int32 - GetResourceRequestHandler(self *RequestContextHandler, browser *Browser, frame *Frame, request *Request, is_navigation, is_download int32, request_initiator string, disable_default_handling *int32) *ResourceRequestHandler + OnRequestContextInitialized(self *RequestContextHandler, requestContext *RequestContext) + OnBeforePluginLoad(self *RequestContextHandler, mimeType, pluginURL string, isMainFrame int32, topOriginURL string, pluginInfo *WebPluginInfo, pluginPolicy *PluginPolicy) int32 + GetResourceRequestHandler(self *RequestContextHandler, browser *Browser, frame *Frame, request *Request, isNavigation, isDownload int32, requestInitiator string, disableDefaultHandling *int32) *ResourceRequestHandler } // RequestContextHandler (cef_request_context_handler_t from include/capi/cef_request_context_handler_capi.h) @@ -62,16 +62,16 @@ func (d *RequestContextHandler) Base() *BaseRefCounted { // OnRequestContextInitialized (on_request_context_initialized) // Called on the browser process UI thread immediately after the request // context has been initialized. -func (d *RequestContextHandler) OnRequestContextInitialized(request_context *RequestContext) { - lookupRequestContextHandlerProxy(d.Base()).OnRequestContextInitialized(d, request_context) +func (d *RequestContextHandler) OnRequestContextInitialized(requestContext *RequestContext) { + lookupRequestContextHandlerProxy(d.Base()).OnRequestContextInitialized(d, requestContext) } //nolint:gocritic //export gocef_request_context_handler_on_request_context_initialized -func gocef_request_context_handler_on_request_context_initialized(self *C.cef_request_context_handler_t, request_context *C.cef_request_context_t) { +func gocef_request_context_handler_on_request_context_initialized(self *C.cef_request_context_handler_t, requestContext *C.cef_request_context_t) { me__ := (*RequestContextHandler)(self) proxy__ := lookupRequestContextHandlerProxy(me__.Base()) - proxy__.OnRequestContextInitialized(me__, (*RequestContext)(request_context)) + proxy__.OnRequestContextInitialized(me__, (*RequestContext)(requestContext)) } // OnBeforePluginLoad (on_before_plugin_load) @@ -92,20 +92,20 @@ func gocef_request_context_handler_on_request_context_initialized(self *C.cef_re // |top_origin_url| is NULL. To purge the plugin list cache and potentially // trigger new calls to this function call // cef_request_tContext::PurgePluginListCache. -func (d *RequestContextHandler) OnBeforePluginLoad(mime_type, plugin_url string, is_main_frame int32, top_origin_url string, plugin_info *WebPluginInfo, plugin_policy *PluginPolicy) int32 { - return lookupRequestContextHandlerProxy(d.Base()).OnBeforePluginLoad(d, mime_type, plugin_url, is_main_frame, top_origin_url, plugin_info, plugin_policy) +func (d *RequestContextHandler) OnBeforePluginLoad(mimeType, pluginURL string, isMainFrame int32, topOriginURL string, pluginInfo *WebPluginInfo, pluginPolicy *PluginPolicy) int32 { + return lookupRequestContextHandlerProxy(d.Base()).OnBeforePluginLoad(d, mimeType, pluginURL, isMainFrame, topOriginURL, pluginInfo, pluginPolicy) } //nolint:gocritic //export gocef_request_context_handler_on_before_plugin_load -func gocef_request_context_handler_on_before_plugin_load(self *C.cef_request_context_handler_t, mime_type *C.cef_string_t, plugin_url *C.cef_string_t, is_main_frame C.int, top_origin_url *C.cef_string_t, plugin_info *C.cef_web_plugin_info_t, plugin_policy *C.cef_plugin_policy_t) C.int { +func gocef_request_context_handler_on_before_plugin_load(self *C.cef_request_context_handler_t, mimeType *C.cef_string_t, pluginURL *C.cef_string_t, isMainFrame C.int, topOriginURL *C.cef_string_t, pluginInfo *C.cef_web_plugin_info_t, pluginPolicy *C.cef_plugin_policy_t) C.int { me__ := (*RequestContextHandler)(self) proxy__ := lookupRequestContextHandlerProxy(me__.Base()) - mime_type_ := cefstrToString(mime_type) - plugin_url_ := cefstrToString(plugin_url) - top_origin_url_ := cefstrToString(top_origin_url) - plugin_policy_ := PluginPolicy(*plugin_policy) - return C.int(proxy__.OnBeforePluginLoad(me__, mime_type_, plugin_url_, int32(is_main_frame), top_origin_url_, (*WebPluginInfo)(plugin_info), &plugin_policy_)) + mimeType_ := cefstrToString(mimeType) + pluginURL_ := cefstrToString(pluginURL) + topOriginURL_ := cefstrToString(topOriginURL) + pluginPolicy_ := PluginPolicy(*pluginPolicy) + return C.int(proxy__.OnBeforePluginLoad(me__, mimeType_, pluginURL_, int32(isMainFrame), topOriginURL_, (*WebPluginInfo)(pluginInfo), &pluginPolicy_)) } // GetResourceRequestHandler (get_resource_request_handler) @@ -125,15 +125,15 @@ func gocef_request_context_handler_on_before_plugin_load(self *C.cef_request_con // the client associated with |browser| returns a non-NULL value from // cef_request_tHandler::GetResourceRequestHandler for the same request // (identified by cef_request_t::GetIdentifier). -func (d *RequestContextHandler) GetResourceRequestHandler(browser *Browser, frame *Frame, request *Request, is_navigation, is_download int32, request_initiator string, disable_default_handling *int32) *ResourceRequestHandler { - return lookupRequestContextHandlerProxy(d.Base()).GetResourceRequestHandler(d, browser, frame, request, is_navigation, is_download, request_initiator, disable_default_handling) +func (d *RequestContextHandler) GetResourceRequestHandler(browser *Browser, frame *Frame, request *Request, isNavigation, isDownload int32, requestInitiator string, disableDefaultHandling *int32) *ResourceRequestHandler { + return lookupRequestContextHandlerProxy(d.Base()).GetResourceRequestHandler(d, browser, frame, request, isNavigation, isDownload, requestInitiator, disableDefaultHandling) } //nolint:gocritic //export gocef_request_context_handler_get_resource_request_handler -func gocef_request_context_handler_get_resource_request_handler(self *C.cef_request_context_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, is_navigation C.int, is_download C.int, request_initiator *C.cef_string_t, disable_default_handling *C.int) *C.cef_resource_request_handler_t { +func gocef_request_context_handler_get_resource_request_handler(self *C.cef_request_context_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, isNavigation C.int, isDownload C.int, requestInitiator *C.cef_string_t, disableDefaultHandling *C.int) *C.cef_resource_request_handler_t { me__ := (*RequestContextHandler)(self) proxy__ := lookupRequestContextHandlerProxy(me__.Base()) - request_initiator_ := cefstrToString(request_initiator) - return (proxy__.GetResourceRequestHandler(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), int32(is_navigation), int32(is_download), request_initiator_, (*int32)(disable_default_handling))).toNative() + requestInitiator_ := cefstrToString(requestInitiator) + return (proxy__.GetResourceRequestHandler(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), int32(isNavigation), int32(isDownload), requestInitiator_, (*int32)(disableDefaultHandling))).toNative() } diff --git a/cef/RequestContext_gen.go b/cef/RequestContext_gen.go index d79710a..8ae4d45 100644 --- a/cef/RequestContext_gen.go +++ b/cef/RequestContext_gen.go @@ -10,23 +10,23 @@ import ( // cef_request_context_handler_t * gocef_request_context_get_handler(cef_request_context_t * self, cef_request_context_handler_t * (CEF_CALLBACK *callback__)(cef_request_context_t *)) { return callback__(self); } // cef_string_userfree_t gocef_request_context_get_cache_path(cef_request_context_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_request_context_t *)) { return callback__(self); } // cef_cookie_manager_t * gocef_request_context_get_cookie_manager(cef_request_context_t * self, cef_completion_callback_t * callback, cef_cookie_manager_t * (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_completion_callback_t *)) { return callback__(self, callback); } - // int gocef_request_context_register_scheme_handler_factory(cef_request_context_t * self, cef_string_t * scheme_name, cef_string_t * domain_name, cef_scheme_handler_factory_t * factory, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_string_t *, cef_scheme_handler_factory_t *)) { return callback__(self, scheme_name, domain_name, factory); } + // int gocef_request_context_register_scheme_handler_factory(cef_request_context_t * self, cef_string_t * schemeName, cef_string_t * domainName, cef_scheme_handler_factory_t * factory, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_string_t *, cef_scheme_handler_factory_t *)) { return callback__(self, schemeName, domainName, factory); } // int gocef_request_context_clear_scheme_handler_factories(cef_request_context_t * self, int (CEF_CALLBACK *callback__)(cef_request_context_t *)) { return callback__(self); } - // void gocef_request_context_purge_plugin_list_cache(cef_request_context_t * self, int reload_pages, void (CEF_CALLBACK *callback__)(cef_request_context_t *, int)) { return callback__(self, reload_pages); } + // void gocef_request_context_purge_plugin_list_cache(cef_request_context_t * self, int reloadPages, void (CEF_CALLBACK *callback__)(cef_request_context_t *, int)) { return callback__(self, reloadPages); } // int gocef_request_context_has_preference(cef_request_context_t * self, cef_string_t * name, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, name); } // cef_value_t * gocef_request_context_get_preference(cef_request_context_t * self, cef_string_t * name, cef_value_t * (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, name); } - // cef_dictionary_value_t * gocef_request_context_get_all_preferences(cef_request_context_t * self, int include_defaults, cef_dictionary_value_t * (CEF_CALLBACK *callback__)(cef_request_context_t *, int)) { return callback__(self, include_defaults); } + // cef_dictionary_value_t * gocef_request_context_get_all_preferences(cef_request_context_t * self, int includeDefaults, cef_dictionary_value_t * (CEF_CALLBACK *callback__)(cef_request_context_t *, int)) { return callback__(self, includeDefaults); } // int gocef_request_context_can_set_preference(cef_request_context_t * self, cef_string_t * name, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, name); } // int gocef_request_context_set_preference(cef_request_context_t * self, cef_string_t * name, cef_value_t * value, cef_string_t * error_r, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_value_t *, cef_string_t *)) { return callback__(self, name, value, error_r); } // void gocef_request_context_clear_certificate_exceptions(cef_request_context_t * self, cef_completion_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_completion_callback_t *)) { return callback__(self, callback); } // void gocef_request_context_clear_http_auth_credentials(cef_request_context_t * self, cef_completion_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_completion_callback_t *)) { return callback__(self, callback); } // void gocef_request_context_close_all_connections(cef_request_context_t * self, cef_completion_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_completion_callback_t *)) { return callback__(self, callback); } // void gocef_request_context_resolve_host(cef_request_context_t * self, cef_string_t * origin, cef_resolve_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_resolve_callback_t *)) { return callback__(self, origin, callback); } - // void gocef_request_context_load_extension(cef_request_context_t * self, cef_string_t * root_directory, cef_dictionary_value_t * manifest, cef_extension_handler_t * handler, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_dictionary_value_t *, cef_extension_handler_t *)) { return callback__(self, root_directory, manifest, handler); } - // int gocef_request_context_did_load_extension(cef_request_context_t * self, cef_string_t * extension_id, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, extension_id); } - // int gocef_request_context_has_extension(cef_request_context_t * self, cef_string_t * extension_id, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, extension_id); } - // int gocef_request_context_get_extensions(cef_request_context_t * self, cef_string_list_t extension_ids, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_list_t)) { return callback__(self, extension_ids); } - // cef_extension_t * gocef_request_context_get_extension(cef_request_context_t * self, cef_string_t * extension_id, cef_extension_t * (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, extension_id); } + // void gocef_request_context_load_extension(cef_request_context_t * self, cef_string_t * rootDirectory, cef_dictionary_value_t * manifest, cef_extension_handler_t * handler, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_dictionary_value_t *, cef_extension_handler_t *)) { return callback__(self, rootDirectory, manifest, handler); } + // int gocef_request_context_did_load_extension(cef_request_context_t * self, cef_string_t * extensionID, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, extensionID); } + // int gocef_request_context_has_extension(cef_request_context_t * self, cef_string_t * extensionID, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, extensionID); } + // int gocef_request_context_get_extensions(cef_request_context_t * self, cef_string_list_t extensionIds, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_list_t)) { return callback__(self, extensionIds); } + // cef_extension_t * gocef_request_context_get_extension(cef_request_context_t * self, cef_string_t * extensionID, cef_extension_t * (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, extensionID); } "C" ) @@ -113,18 +113,18 @@ func (d *RequestContext) GetCookieManager(callback *CompletionCallback) *CookieM // change or remove the factory that matches the specified |scheme_name| and // optional |domain_name|. Returns false (0) if an error occurs. This function // may be called on any thread in the browser process. -func (d *RequestContext) RegisterSchemeHandlerFactory(scheme_name, domain_name string, factory *SchemeHandlerFactory) int32 { - scheme_name_ := C.cef_string_userfree_alloc() - setCEFStr(scheme_name, scheme_name_) +func (d *RequestContext) RegisterSchemeHandlerFactory(schemeName, domainName string, factory *SchemeHandlerFactory) int32 { + schemeName_ := C.cef_string_userfree_alloc() + setCEFStr(schemeName, schemeName_) defer func() { - C.cef_string_userfree_free(scheme_name_) + C.cef_string_userfree_free(schemeName_) }() - domain_name_ := C.cef_string_userfree_alloc() - setCEFStr(domain_name, domain_name_) + domainName_ := C.cef_string_userfree_alloc() + setCEFStr(domainName, domainName_) defer func() { - C.cef_string_userfree_free(domain_name_) + C.cef_string_userfree_free(domainName_) }() - return int32(C.gocef_request_context_register_scheme_handler_factory(d.toNative(), (*C.cef_string_t)(scheme_name_), (*C.cef_string_t)(domain_name_), factory.toNative(), d.register_scheme_handler_factory)) + return int32(C.gocef_request_context_register_scheme_handler_factory(d.toNative(), (*C.cef_string_t)(schemeName_), (*C.cef_string_t)(domainName_), factory.toNative(), d.register_scheme_handler_factory)) } // ClearSchemeHandlerFactories (clear_scheme_handler_factories) @@ -140,8 +140,8 @@ func (d *RequestContext) ClearSchemeHandlerFactories() int32 { // reload all pages with plugins. // cef_request_tContextHandler::OnBeforePluginLoad may be called to rebuild // the plugin list cache. -func (d *RequestContext) PurgePluginListCache(reload_pages int32) { - C.gocef_request_context_purge_plugin_list_cache(d.toNative(), C.int(reload_pages), d.purge_plugin_list_cache) +func (d *RequestContext) PurgePluginListCache(reloadPages int32) { + C.gocef_request_context_purge_plugin_list_cache(d.toNative(), C.int(reloadPages), d.purge_plugin_list_cache) } // HasPreference (has_preference) @@ -178,8 +178,8 @@ func (d *RequestContext) GetPreference(name string) *Value { // modifications to the returned object will not modify the underlying // preference values. This function must be called on the browser process UI // thread. -func (d *RequestContext) GetAllPreferences(include_defaults int32) *DictionaryValue { - return (*DictionaryValue)(C.gocef_request_context_get_all_preferences(d.toNative(), C.int(include_defaults), d.get_all_preferences)) +func (d *RequestContext) GetAllPreferences(includeDefaults int32) *DictionaryValue { + return (*DictionaryValue)(C.gocef_request_context_get_all_preferences(d.toNative(), C.int(includeDefaults), d.get_all_preferences)) } // CanSetPreference (can_set_preference) @@ -228,11 +228,11 @@ func (d *RequestContext) ClearCertificateExceptions(callback *CompletionCallback C.gocef_request_context_clear_certificate_exceptions(d.toNative(), callback.toNative(), d.clear_certificate_exceptions) } -// ClearHttpAuthCredentials (clear_http_auth_credentials) +// ClearHTTPAuthCredentials (clear_http_auth_credentials) // Clears all HTTP authentication credentials that were added as part of // handling GetAuthCredentials. If |callback| is non-NULL it will be executed // on the UI thread after completion. -func (d *RequestContext) ClearHttpAuthCredentials(callback *CompletionCallback) { +func (d *RequestContext) ClearHTTPAuthCredentials(callback *CompletionCallback) { C.gocef_request_context_clear_http_auth_credentials(d.toNative(), callback.toNative(), d.clear_http_auth_credentials) } @@ -304,13 +304,13 @@ func (d *RequestContext) ResolveHost(origin string, callback *ResolveCallback) { // // See https://developer.chrome.com/extensions for extension implementation // and usage documentation. -func (d *RequestContext) LoadExtension(root_directory string, manifest *DictionaryValue, handler *ExtensionHandler) { - root_directory_ := C.cef_string_userfree_alloc() - setCEFStr(root_directory, root_directory_) +func (d *RequestContext) LoadExtension(rootDirectory string, manifest *DictionaryValue, handler *ExtensionHandler) { + rootDirectory_ := C.cef_string_userfree_alloc() + setCEFStr(rootDirectory, rootDirectory_) defer func() { - C.cef_string_userfree_free(root_directory_) + C.cef_string_userfree_free(rootDirectory_) }() - C.gocef_request_context_load_extension(d.toNative(), (*C.cef_string_t)(root_directory_), manifest.toNative(), handler.toNative(), d.load_extension) + C.gocef_request_context_load_extension(d.toNative(), (*C.cef_string_t)(rootDirectory_), manifest.toNative(), handler.toNative(), d.load_extension) } // DidLoadExtension (did_load_extension) @@ -318,13 +318,13 @@ func (d *RequestContext) LoadExtension(root_directory string, manifest *Dictiona // by |extension_id|. Other contexts sharing the same storage will also have // access to the extension (see HasExtension). This function must be called on // the browser process UI thread. -func (d *RequestContext) DidLoadExtension(extension_id string) int32 { - extension_id_ := C.cef_string_userfree_alloc() - setCEFStr(extension_id, extension_id_) +func (d *RequestContext) DidLoadExtension(extensionID string) int32 { + extensionID_ := C.cef_string_userfree_alloc() + setCEFStr(extensionID, extensionID_) defer func() { - C.cef_string_userfree_free(extension_id_) + C.cef_string_userfree_free(extensionID_) }() - return int32(C.gocef_request_context_did_load_extension(d.toNative(), (*C.cef_string_t)(extension_id_), d.did_load_extension)) + return int32(C.gocef_request_context_did_load_extension(d.toNative(), (*C.cef_string_t)(extensionID_), d.did_load_extension)) } // HasExtension (has_extension) @@ -332,13 +332,13 @@ func (d *RequestContext) DidLoadExtension(extension_id string) int32 { // |extension_id|. This may not be the context that was used to load the // extension (see DidLoadExtension). This function must be called on the // browser process UI thread. -func (d *RequestContext) HasExtension(extension_id string) int32 { - extension_id_ := C.cef_string_userfree_alloc() - setCEFStr(extension_id, extension_id_) +func (d *RequestContext) HasExtension(extensionID string) int32 { + extensionID_ := C.cef_string_userfree_alloc() + setCEFStr(extensionID, extensionID_) defer func() { - C.cef_string_userfree_free(extension_id_) + C.cef_string_userfree_free(extensionID_) }() - return int32(C.gocef_request_context_has_extension(d.toNative(), (*C.cef_string_t)(extension_id_), d.has_extension)) + return int32(C.gocef_request_context_has_extension(d.toNative(), (*C.cef_string_t)(extensionID_), d.has_extension)) } // GetExtensions (get_extensions) @@ -346,19 +346,19 @@ func (d *RequestContext) HasExtension(extension_id string) int32 { // HasExtension). |extension_ids| will be populated with the list of extension // ID values. Returns true (1) on success. This function must be called on the // browser process UI thread. -func (d *RequestContext) GetExtensions(extension_ids StringList) int32 { - return int32(C.gocef_request_context_get_extensions(d.toNative(), C.cef_string_list_t(extension_ids), d.get_extensions)) +func (d *RequestContext) GetExtensions(extensionIds StringList) int32 { + return int32(C.gocef_request_context_get_extensions(d.toNative(), C.cef_string_list_t(extensionIds), d.get_extensions)) } // GetExtension (get_extension) // Returns the extension matching |extension_id| or NULL if no matching // extension is accessible in this context (see HasExtension). This function // must be called on the browser process UI thread. -func (d *RequestContext) GetExtension(extension_id string) *Extension { - extension_id_ := C.cef_string_userfree_alloc() - setCEFStr(extension_id, extension_id_) +func (d *RequestContext) GetExtension(extensionID string) *Extension { + extensionID_ := C.cef_string_userfree_alloc() + setCEFStr(extensionID, extensionID_) defer func() { - C.cef_string_userfree_free(extension_id_) + C.cef_string_userfree_free(extensionID_) }() - return (*Extension)(C.gocef_request_context_get_extension(d.toNative(), (*C.cef_string_t)(extension_id_), d.get_extension)) + return (*Extension)(C.gocef_request_context_get_extension(d.toNative(), (*C.cef_string_t)(extensionID_), d.get_extension)) } diff --git a/cef/RequestHandler_gen.go b/cef/RequestHandler_gen.go index fc1892d..9a9e398 100644 --- a/cef/RequestHandler_gen.go +++ b/cef/RequestHandler_gen.go @@ -16,14 +16,14 @@ import ( // RequestHandlerProxy defines methods required for using RequestHandler. type RequestHandlerProxy interface { - OnBeforeBrowse(self *RequestHandler, browser *Browser, frame *Frame, request *Request, user_gesture, is_redirect int32) int32 - OnOpenUrlfromTab(self *RequestHandler, browser *Browser, frame *Frame, target_url string, target_disposition WindowOpenDisposition, user_gesture int32) int32 - GetResourceRequestHandler(self *RequestHandler, browser *Browser, frame *Frame, request *Request, is_navigation, is_download int32, request_initiator string, disable_default_handling *int32) *ResourceRequestHandler - GetAuthCredentials(self *RequestHandler, browser *Browser, origin_url string, isProxy int32, host string, port int32, realm, scheme string, callback *AuthCallback) int32 - OnQuotaRequest(self *RequestHandler, browser *Browser, origin_url string, new_size int64, callback *RequestCallback) int32 - OnCertificateError(self *RequestHandler, browser *Browser, cert_error Errorcode, request_url string, ssl_info *Sslinfo, callback *RequestCallback) int32 + OnBeforeBrowse(self *RequestHandler, browser *Browser, frame *Frame, request *Request, userGesture, isRedirect int32) int32 + OnOpenUrlfromTab(self *RequestHandler, browser *Browser, frame *Frame, targetURL string, targetDisposition WindowOpenDisposition, userGesture int32) int32 + GetResourceRequestHandler(self *RequestHandler, browser *Browser, frame *Frame, request *Request, isNavigation, isDownload int32, requestInitiator string, disableDefaultHandling *int32) *ResourceRequestHandler + GetAuthCredentials(self *RequestHandler, browser *Browser, originURL string, isProxy int32, host string, port int32, realm, scheme string, callback *AuthCallback) int32 + OnQuotaRequest(self *RequestHandler, browser *Browser, originURL string, newSize int64, callback *RequestCallback) int32 + OnCertificateError(self *RequestHandler, browser *Browser, certError Errorcode, requestURL string, sSLInfo *Sslinfo, callback *RequestCallback) int32 OnSelectClientCertificate(self *RequestHandler, browser *Browser, isProxy int32, host string, port int32, certificatesCount uint64, certificates **X509certificate, callback *SelectClientCertificateCallback) int32 - OnPluginCrashed(self *RequestHandler, browser *Browser, plugin_path string) + OnPluginCrashed(self *RequestHandler, browser *Browser, pluginPath string) OnRenderViewReady(self *RequestHandler, browser *Browser) OnRenderProcessTerminated(self *RequestHandler, browser *Browser, status TerminationStatus) } @@ -76,16 +76,16 @@ func (d *RequestHandler) Base() *BaseRefCounted { // ERR_ABORTED. The |user_gesture| value will be true (1) if the browser // navigated via explicit user gesture (e.g. clicking a link) or false (0) if // it navigated automatically (e.g. via the DomContentLoaded event). -func (d *RequestHandler) OnBeforeBrowse(browser *Browser, frame *Frame, request *Request, user_gesture, is_redirect int32) int32 { - return lookupRequestHandlerProxy(d.Base()).OnBeforeBrowse(d, browser, frame, request, user_gesture, is_redirect) +func (d *RequestHandler) OnBeforeBrowse(browser *Browser, frame *Frame, request *Request, userGesture, isRedirect int32) int32 { + return lookupRequestHandlerProxy(d.Base()).OnBeforeBrowse(d, browser, frame, request, userGesture, isRedirect) } //nolint:gocritic //export gocef_request_handler_on_before_browse -func gocef_request_handler_on_before_browse(self *C.cef_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, user_gesture C.int, is_redirect C.int) C.int { +func gocef_request_handler_on_before_browse(self *C.cef_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, userGesture C.int, isRedirect C.int) C.int { me__ := (*RequestHandler)(self) proxy__ := lookupRequestHandlerProxy(me__.Base()) - return C.int(proxy__.OnBeforeBrowse(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), int32(user_gesture), int32(is_redirect))) + return C.int(proxy__.OnBeforeBrowse(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), int32(userGesture), int32(isRedirect))) } // OnOpenUrlfromTab (on_open_urlfrom_tab) @@ -103,17 +103,17 @@ func gocef_request_handler_on_before_browse(self *C.cef_request_handler_t, brows // it navigated automatically (e.g. via the DomContentLoaded event). Return // true (1) to cancel the navigation or false (0) to allow the navigation to // proceed in the source browser's top-level frame. -func (d *RequestHandler) OnOpenUrlfromTab(browser *Browser, frame *Frame, target_url string, target_disposition WindowOpenDisposition, user_gesture int32) int32 { - return lookupRequestHandlerProxy(d.Base()).OnOpenUrlfromTab(d, browser, frame, target_url, target_disposition, user_gesture) +func (d *RequestHandler) OnOpenUrlfromTab(browser *Browser, frame *Frame, targetURL string, targetDisposition WindowOpenDisposition, userGesture int32) int32 { + return lookupRequestHandlerProxy(d.Base()).OnOpenUrlfromTab(d, browser, frame, targetURL, targetDisposition, userGesture) } //nolint:gocritic //export gocef_request_handler_on_open_urlfrom_tab -func gocef_request_handler_on_open_urlfrom_tab(self *C.cef_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, target_url *C.cef_string_t, target_disposition C.cef_window_open_disposition_t, user_gesture C.int) C.int { +func gocef_request_handler_on_open_urlfrom_tab(self *C.cef_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, targetURL *C.cef_string_t, targetDisposition C.cef_window_open_disposition_t, userGesture C.int) C.int { me__ := (*RequestHandler)(self) proxy__ := lookupRequestHandlerProxy(me__.Base()) - target_url_ := cefstrToString(target_url) - return C.int(proxy__.OnOpenUrlfromTab(me__, (*Browser)(browser), (*Frame)(frame), target_url_, WindowOpenDisposition(target_disposition), int32(user_gesture))) + targetURL_ := cefstrToString(targetURL) + return C.int(proxy__.OnOpenUrlfromTab(me__, (*Browser)(browser), (*Frame)(frame), targetURL_, WindowOpenDisposition(targetDisposition), int32(userGesture))) } // GetResourceRequestHandler (get_resource_request_handler) @@ -131,17 +131,17 @@ func gocef_request_handler_on_open_urlfrom_tab(self *C.cef_request_handler_t, br // cef_resource_request_handler_t object. If this callback returns NULL the // same function will be called on the associated cef_request_tContextHandler, // if any. -func (d *RequestHandler) GetResourceRequestHandler(browser *Browser, frame *Frame, request *Request, is_navigation, is_download int32, request_initiator string, disable_default_handling *int32) *ResourceRequestHandler { - return lookupRequestHandlerProxy(d.Base()).GetResourceRequestHandler(d, browser, frame, request, is_navigation, is_download, request_initiator, disable_default_handling) +func (d *RequestHandler) GetResourceRequestHandler(browser *Browser, frame *Frame, request *Request, isNavigation, isDownload int32, requestInitiator string, disableDefaultHandling *int32) *ResourceRequestHandler { + return lookupRequestHandlerProxy(d.Base()).GetResourceRequestHandler(d, browser, frame, request, isNavigation, isDownload, requestInitiator, disableDefaultHandling) } //nolint:gocritic //export gocef_request_handler_get_resource_request_handler -func gocef_request_handler_get_resource_request_handler(self *C.cef_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, is_navigation C.int, is_download C.int, request_initiator *C.cef_string_t, disable_default_handling *C.int) *C.cef_resource_request_handler_t { +func gocef_request_handler_get_resource_request_handler(self *C.cef_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, isNavigation C.int, isDownload C.int, requestInitiator *C.cef_string_t, disableDefaultHandling *C.int) *C.cef_resource_request_handler_t { me__ := (*RequestHandler)(self) proxy__ := lookupRequestHandlerProxy(me__.Base()) - request_initiator_ := cefstrToString(request_initiator) - return (proxy__.GetResourceRequestHandler(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), int32(is_navigation), int32(is_download), request_initiator_, (*int32)(disable_default_handling))).toNative() + requestInitiator_ := cefstrToString(requestInitiator) + return (proxy__.GetResourceRequestHandler(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), int32(isNavigation), int32(isDownload), requestInitiator_, (*int32)(disableDefaultHandling))).toNative() } // GetAuthCredentials (get_auth_credentials) @@ -155,20 +155,20 @@ func gocef_request_handler_get_resource_request_handler(self *C.cef_request_hand // cef_auth_callback_t::cont() either in this function or at a later time when // the authentication information is available. Return false (0) to cancel the // request immediately. -func (d *RequestHandler) GetAuthCredentials(browser *Browser, origin_url string, isProxy int32, host string, port int32, realm, scheme string, callback *AuthCallback) int32 { - return lookupRequestHandlerProxy(d.Base()).GetAuthCredentials(d, browser, origin_url, isProxy, host, port, realm, scheme, callback) +func (d *RequestHandler) GetAuthCredentials(browser *Browser, originURL string, isProxy int32, host string, port int32, realm, scheme string, callback *AuthCallback) int32 { + return lookupRequestHandlerProxy(d.Base()).GetAuthCredentials(d, browser, originURL, isProxy, host, port, realm, scheme, callback) } //nolint:gocritic //export gocef_request_handler_get_auth_credentials -func gocef_request_handler_get_auth_credentials(self *C.cef_request_handler_t, browser *C.cef_browser_t, origin_url *C.cef_string_t, isProxy C.int, host *C.cef_string_t, port C.int, realm *C.cef_string_t, scheme *C.cef_string_t, callback *C.cef_auth_callback_t) C.int { +func gocef_request_handler_get_auth_credentials(self *C.cef_request_handler_t, browser *C.cef_browser_t, originURL *C.cef_string_t, isProxy C.int, host *C.cef_string_t, port C.int, realm *C.cef_string_t, scheme *C.cef_string_t, callback *C.cef_auth_callback_t) C.int { me__ := (*RequestHandler)(self) proxy__ := lookupRequestHandlerProxy(me__.Base()) - origin_url_ := cefstrToString(origin_url) + originURL_ := cefstrToString(originURL) host_ := cefstrToString(host) realm_ := cefstrToString(realm) scheme_ := cefstrToString(scheme) - return C.int(proxy__.GetAuthCredentials(me__, (*Browser)(browser), origin_url_, int32(isProxy), host_, int32(port), realm_, scheme_, (*AuthCallback)(callback))) + return C.int(proxy__.GetAuthCredentials(me__, (*Browser)(browser), originURL_, int32(isProxy), host_, int32(port), realm_, scheme_, (*AuthCallback)(callback))) } // OnQuotaRequest (on_quota_request) @@ -179,17 +179,17 @@ func gocef_request_handler_get_auth_credentials(self *C.cef_request_handler_t, b // cef_request_tCallback::cont() either in this function or at a later time to // grant or deny the request. Return false (0) to cancel the request // immediately. -func (d *RequestHandler) OnQuotaRequest(browser *Browser, origin_url string, new_size int64, callback *RequestCallback) int32 { - return lookupRequestHandlerProxy(d.Base()).OnQuotaRequest(d, browser, origin_url, new_size, callback) +func (d *RequestHandler) OnQuotaRequest(browser *Browser, originURL string, newSize int64, callback *RequestCallback) int32 { + return lookupRequestHandlerProxy(d.Base()).OnQuotaRequest(d, browser, originURL, newSize, callback) } //nolint:gocritic //export gocef_request_handler_on_quota_request -func gocef_request_handler_on_quota_request(self *C.cef_request_handler_t, browser *C.cef_browser_t, origin_url *C.cef_string_t, new_size C.int64, callback *C.cef_request_callback_t) C.int { +func gocef_request_handler_on_quota_request(self *C.cef_request_handler_t, browser *C.cef_browser_t, originURL *C.cef_string_t, newSize C.int64, callback *C.cef_request_callback_t) C.int { me__ := (*RequestHandler)(self) proxy__ := lookupRequestHandlerProxy(me__.Base()) - origin_url_ := cefstrToString(origin_url) - return C.int(proxy__.OnQuotaRequest(me__, (*Browser)(browser), origin_url_, int64(new_size), (*RequestCallback)(callback))) + originURL_ := cefstrToString(originURL) + return C.int(proxy__.OnQuotaRequest(me__, (*Browser)(browser), originURL_, int64(newSize), (*RequestCallback)(callback))) } // OnCertificateError (on_certificate_error) @@ -199,17 +199,17 @@ func gocef_request_handler_on_quota_request(self *C.cef_request_handler_t, brows // Return false (0) to cancel the request immediately. If // CefSettings.ignore_certificate_errors is set all invalid certificates will // be accepted without calling this function. -func (d *RequestHandler) OnCertificateError(browser *Browser, cert_error Errorcode, request_url string, ssl_info *Sslinfo, callback *RequestCallback) int32 { - return lookupRequestHandlerProxy(d.Base()).OnCertificateError(d, browser, cert_error, request_url, ssl_info, callback) +func (d *RequestHandler) OnCertificateError(browser *Browser, certError Errorcode, requestURL string, sSLInfo *Sslinfo, callback *RequestCallback) int32 { + return lookupRequestHandlerProxy(d.Base()).OnCertificateError(d, browser, certError, requestURL, sSLInfo, callback) } //nolint:gocritic //export gocef_request_handler_on_certificate_error -func gocef_request_handler_on_certificate_error(self *C.cef_request_handler_t, browser *C.cef_browser_t, cert_error C.cef_errorcode_t, request_url *C.cef_string_t, ssl_info *C.cef_sslinfo_t, callback *C.cef_request_callback_t) C.int { +func gocef_request_handler_on_certificate_error(self *C.cef_request_handler_t, browser *C.cef_browser_t, certError C.cef_errorcode_t, requestURL *C.cef_string_t, sSLInfo *C.cef_sslinfo_t, callback *C.cef_request_callback_t) C.int { me__ := (*RequestHandler)(self) proxy__ := lookupRequestHandlerProxy(me__.Base()) - request_url_ := cefstrToString(request_url) - return C.int(proxy__.OnCertificateError(me__, (*Browser)(browser), Errorcode(cert_error), request_url_, (*Sslinfo)(ssl_info), (*RequestCallback)(callback))) + requestURL_ := cefstrToString(requestURL) + return C.int(proxy__.OnCertificateError(me__, (*Browser)(browser), Errorcode(certError), requestURL_, (*Sslinfo)(sSLInfo), (*RequestCallback)(callback))) } // OnSelectClientCertificate (on_select_client_certificate) @@ -242,17 +242,17 @@ func gocef_request_handler_on_select_client_certificate(self *C.cef_request_hand // OnPluginCrashed (on_plugin_crashed) // Called on the browser process UI thread when a plugin has crashed. // |plugin_path| is the path of the plugin that crashed. -func (d *RequestHandler) OnPluginCrashed(browser *Browser, plugin_path string) { - lookupRequestHandlerProxy(d.Base()).OnPluginCrashed(d, browser, plugin_path) +func (d *RequestHandler) OnPluginCrashed(browser *Browser, pluginPath string) { + lookupRequestHandlerProxy(d.Base()).OnPluginCrashed(d, browser, pluginPath) } //nolint:gocritic //export gocef_request_handler_on_plugin_crashed -func gocef_request_handler_on_plugin_crashed(self *C.cef_request_handler_t, browser *C.cef_browser_t, plugin_path *C.cef_string_t) { +func gocef_request_handler_on_plugin_crashed(self *C.cef_request_handler_t, browser *C.cef_browser_t, pluginPath *C.cef_string_t) { me__ := (*RequestHandler)(self) proxy__ := lookupRequestHandlerProxy(me__.Base()) - plugin_path_ := cefstrToString(plugin_path) - proxy__.OnPluginCrashed(me__, (*Browser)(browser), plugin_path_) + pluginPath_ := cefstrToString(pluginPath) + proxy__.OnPluginCrashed(me__, (*Browser)(browser), pluginPath_) } // OnRenderViewReady (on_render_view_ready) diff --git a/cef/Request_gen.go b/cef/Request_gen.go index c941d5c..c9dfb6b 100644 --- a/cef/Request_gen.go +++ b/cef/Request_gen.go @@ -6,10 +6,10 @@ import ( // #include "capi_gen.h" // int gocef_request_is_read_only(cef_request_t * self, int (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } // cef_string_userfree_t gocef_request_get_url(cef_request_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } - // void gocef_request_set_url(cef_request_t * self, cef_string_t * url, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *)) { return callback__(self, url); } + // void gocef_request_set_url(cef_request_t * self, cef_string_t * uRL, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *)) { return callback__(self, uRL); } // cef_string_userfree_t gocef_request_get_method(cef_request_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } // void gocef_request_set_method(cef_request_t * self, cef_string_t * method, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *)) { return callback__(self, method); } - // void gocef_request_set_referrer(cef_request_t * self, cef_string_t * referrer_url, cef_referrer_policy_t policy, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *, cef_referrer_policy_t)) { return callback__(self, referrer_url, policy); } + // void gocef_request_set_referrer(cef_request_t * self, cef_string_t * referrerURL, cef_referrer_policy_t policy, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *, cef_referrer_policy_t)) { return callback__(self, referrerURL, policy); } // cef_string_userfree_t gocef_request_get_referrer_url(cef_request_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } // cef_referrer_policy_t gocef_request_get_referrer_policy(cef_request_t * self, cef_referrer_policy_t (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } // cef_post_data_t * gocef_request_get_post_data(cef_request_t * self, cef_post_data_t * (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } @@ -18,11 +18,11 @@ import ( // void gocef_request_set_header_map(cef_request_t * self, cef_string_multimap_t headerMap, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_multimap_t)) { return callback__(self, headerMap); } // cef_string_userfree_t gocef_request_get_header_by_name(cef_request_t * self, cef_string_t * name, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *)) { return callback__(self, name); } // void gocef_request_set_header_by_name(cef_request_t * self, cef_string_t * name, cef_string_t * value, int overwrite, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *, cef_string_t *, int)) { return callback__(self, name, value, overwrite); } - // void gocef_request_set(cef_request_t * self, cef_string_t * url, cef_string_t * method, cef_post_data_t * postData, cef_string_multimap_t headerMap, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *, cef_string_t *, cef_post_data_t *, cef_string_multimap_t)) { return callback__(self, url, method, postData, headerMap); } + // void gocef_request_set(cef_request_t * self, cef_string_t * uRL, cef_string_t * method, cef_post_data_t * postData, cef_string_multimap_t headerMap, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *, cef_string_t *, cef_post_data_t *, cef_string_multimap_t)) { return callback__(self, uRL, method, postData, headerMap); } // int gocef_request_get_flags(cef_request_t * self, int (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } // void gocef_request_set_flags(cef_request_t * self, int flags, void (CEF_CALLBACK *callback__)(cef_request_t *, int)) { return callback__(self, flags); } // cef_string_userfree_t gocef_request_get_first_party_for_cookies(cef_request_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } - // void gocef_request_set_first_party_for_cookies(cef_request_t * self, cef_string_t * url, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *)) { return callback__(self, url); } + // void gocef_request_set_first_party_for_cookies(cef_request_t * self, cef_string_t * uRL, void (CEF_CALLBACK *callback__)(cef_request_t *, cef_string_t *)) { return callback__(self, uRL); } // cef_resource_type_t gocef_request_get_resource_type(cef_request_t * self, cef_resource_type_t (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } // cef_transition_type_t gocef_request_get_transition_type(cef_request_t * self, cef_transition_type_t (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } // uint64 gocef_request_get_identifier(cef_request_t * self, uint64 (CEF_CALLBACK *callback__)(cef_request_t *)) { return callback__(self); } @@ -50,22 +50,22 @@ func (d *Request) IsReadOnly() int32 { return int32(C.gocef_request_is_read_only(d.toNative(), d.is_read_only)) } -// GetUrl (get_url) +// GetURL (get_url) // Get the fully qualified URL. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *Request) GetUrl() string { +func (d *Request) GetURL() string { return cefuserfreestrToString(C.gocef_request_get_url(d.toNative(), d.get_url)) } -// SetUrl (set_url) +// SetURL (set_url) // Set the fully qualified URL. -func (d *Request) SetUrl(url string) { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *Request) SetURL(uRL string) { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - C.gocef_request_set_url(d.toNative(), (*C.cef_string_t)(url_), d.set_url) + C.gocef_request_set_url(d.toNative(), (*C.cef_string_t)(uRL_), d.set_url) } // GetMethod (get_method) @@ -91,19 +91,19 @@ func (d *Request) SetMethod(method string) { // Set the referrer URL and policy. If non-NULL the referrer URL must be fully // qualified with an HTTP or HTTPS scheme component. Any username, password or // ref component will be removed. -func (d *Request) SetReferrer(referrer_url string, policy ReferrerPolicy) { - referrer_url_ := C.cef_string_userfree_alloc() - setCEFStr(referrer_url, referrer_url_) +func (d *Request) SetReferrer(referrerURL string, policy ReferrerPolicy) { + referrerURL_ := C.cef_string_userfree_alloc() + setCEFStr(referrerURL, referrerURL_) defer func() { - C.cef_string_userfree_free(referrer_url_) + C.cef_string_userfree_free(referrerURL_) }() - C.gocef_request_set_referrer(d.toNative(), (*C.cef_string_t)(referrer_url_), C.cef_referrer_policy_t(policy), d.set_referrer) + C.gocef_request_set_referrer(d.toNative(), (*C.cef_string_t)(referrerURL_), C.cef_referrer_policy_t(policy), d.set_referrer) } -// GetReferrerUrl (get_referrer_url) +// GetReferrerURL (get_referrer_url) // Get the referrer URL. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *Request) GetReferrerUrl() string { +func (d *Request) GetReferrerURL() string { return cefuserfreestrToString(C.gocef_request_get_referrer_url(d.toNative(), d.get_referrer_url)) } @@ -173,18 +173,18 @@ func (d *Request) SetHeaderByName(name, value string, overwrite int32) { // Set (set) // Set all values at one time. -func (d *Request) Set(url, method string, postData *PostData, headerMap StringMultimap) { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *Request) Set(uRL, method string, postData *PostData, headerMap StringMultimap) { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() method_ := C.cef_string_userfree_alloc() setCEFStr(method, method_) defer func() { C.cef_string_userfree_free(method_) }() - C.gocef_request_set(d.toNative(), (*C.cef_string_t)(url_), (*C.cef_string_t)(method_), postData.toNative(), C.cef_string_multimap_t(headerMap), d.set) + C.gocef_request_set(d.toNative(), (*C.cef_string_t)(uRL_), (*C.cef_string_t)(method_), postData.toNative(), C.cef_string_multimap_t(headerMap), d.set) } // GetFlags (get_flags) @@ -212,13 +212,13 @@ func (d *Request) GetFirstPartyForCookies() string { // SetFirstPartyForCookies (set_first_party_for_cookies) // Set the URL to the first party for cookies used in combination with // cef_urlrequest_t. -func (d *Request) SetFirstPartyForCookies(url string) { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *Request) SetFirstPartyForCookies(uRL string) { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - C.gocef_request_set_first_party_for_cookies(d.toNative(), (*C.cef_string_t)(url_), d.set_first_party_for_cookies) + C.gocef_request_set_first_party_for_cookies(d.toNative(), (*C.cef_string_t)(uRL_), d.set_first_party_for_cookies) } // GetResourceType (get_resource_type) diff --git a/cef/ResolveCallback_gen.go b/cef/ResolveCallback_gen.go index 253fc24..828fd59 100644 --- a/cef/ResolveCallback_gen.go +++ b/cef/ResolveCallback_gen.go @@ -16,7 +16,7 @@ import ( // ResolveCallbackProxy defines methods required for using ResolveCallback. type ResolveCallbackProxy interface { - OnResolveCompleted(self *ResolveCallback, result Errorcode, resolved_ips StringList) + OnResolveCompleted(self *ResolveCallback, result Errorcode, resolvedIps StringList) } // ResolveCallback (cef_resolve_callback_t from include/capi/cef_request_context_capi.h) @@ -59,14 +59,14 @@ func (d *ResolveCallback) Base() *BaseRefCounted { // Called on the UI thread after the ResolveHost request has completed. // |result| will be the result code. |resolved_ips| will be the list of // resolved IP addresses or NULL if the resolution failed. -func (d *ResolveCallback) OnResolveCompleted(result Errorcode, resolved_ips StringList) { - lookupResolveCallbackProxy(d.Base()).OnResolveCompleted(d, result, resolved_ips) +func (d *ResolveCallback) OnResolveCompleted(result Errorcode, resolvedIps StringList) { + lookupResolveCallbackProxy(d.Base()).OnResolveCompleted(d, result, resolvedIps) } //nolint:gocritic //export gocef_resolve_callback_on_resolve_completed -func gocef_resolve_callback_on_resolve_completed(self *C.cef_resolve_callback_t, result C.cef_errorcode_t, resolved_ips C.cef_string_list_t) { +func gocef_resolve_callback_on_resolve_completed(self *C.cef_resolve_callback_t, result C.cef_errorcode_t, resolvedIps C.cef_string_list_t) { me__ := (*ResolveCallback)(self) proxy__ := lookupResolveCallbackProxy(me__.Base()) - proxy__.OnResolveCompleted(me__, Errorcode(result), StringList(resolved_ips)) + proxy__.OnResolveCompleted(me__, Errorcode(result), StringList(resolvedIps)) } diff --git a/cef/ResourceBundleHandler_gen.go b/cef/ResourceBundleHandler_gen.go index 1c0cb32..6b4c7d1 100644 --- a/cef/ResourceBundleHandler_gen.go +++ b/cef/ResourceBundleHandler_gen.go @@ -16,9 +16,9 @@ import ( // ResourceBundleHandlerProxy defines methods required for using ResourceBundleHandler. type ResourceBundleHandlerProxy interface { - GetLocalizedString(self *ResourceBundleHandler, string_id int32, string_r *string) int32 - GetDataResource(self *ResourceBundleHandler, resource_id int32, data *unsafe.Pointer, data_size *uint64) int32 - GetDataResourceForScale(self *ResourceBundleHandler, resource_id int32, scale_factor ScaleFactor, data *unsafe.Pointer, data_size *uint64) int32 + GetLocalizedString(self *ResourceBundleHandler, stringID int32, string_r *string) int32 + GetDataResource(self *ResourceBundleHandler, resourceID int32, data *unsafe.Pointer, dataSize *uint64) int32 + GetDataResourceForScale(self *ResourceBundleHandler, resourceID int32, scaleFactor ScaleFactor, data *unsafe.Pointer, dataSize *uint64) int32 } // ResourceBundleHandler (cef_resource_bundle_handler_t from include/capi/cef_resource_bundle_handler_capi.h) @@ -64,17 +64,17 @@ func (d *ResourceBundleHandler) Base() *BaseRefCounted { // To provide the translation set |string| to the translation string and // return true (1). To use the default translation return false (0). Include // cef_pack_strings.h for a listing of valid string ID values. -func (d *ResourceBundleHandler) GetLocalizedString(string_id int32, string_r *string) int32 { - return lookupResourceBundleHandlerProxy(d.Base()).GetLocalizedString(d, string_id, string_r) +func (d *ResourceBundleHandler) GetLocalizedString(stringID int32, string_r *string) int32 { + return lookupResourceBundleHandlerProxy(d.Base()).GetLocalizedString(d, stringID, string_r) } //nolint:gocritic //export gocef_resource_bundle_handler_get_localized_string -func gocef_resource_bundle_handler_get_localized_string(self *C.cef_resource_bundle_handler_t, string_id C.int, string_r *C.cef_string_t) C.int { +func gocef_resource_bundle_handler_get_localized_string(self *C.cef_resource_bundle_handler_t, stringID C.int, string_r *C.cef_string_t) C.int { me__ := (*ResourceBundleHandler)(self) proxy__ := lookupResourceBundleHandlerProxy(me__.Base()) string_r_ := cefstrToString(string_r) - return C.int(proxy__.GetLocalizedString(me__, int32(string_id), &string_r_)) + return C.int(proxy__.GetLocalizedString(me__, int32(stringID), &string_r_)) } // GetDataResource (get_data_resource) @@ -84,16 +84,16 @@ func gocef_resource_bundle_handler_get_localized_string(self *C.cef_resource_bun // return false (0). The resource data will not be copied and must remain // resident in memory. Include cef_pack_resources.h for a listing of valid // resource ID values. -func (d *ResourceBundleHandler) GetDataResource(resource_id int32, data *unsafe.Pointer, data_size *uint64) int32 { - return lookupResourceBundleHandlerProxy(d.Base()).GetDataResource(d, resource_id, data, data_size) +func (d *ResourceBundleHandler) GetDataResource(resourceID int32, data *unsafe.Pointer, dataSize *uint64) int32 { + return lookupResourceBundleHandlerProxy(d.Base()).GetDataResource(d, resourceID, data, dataSize) } //nolint:gocritic //export gocef_resource_bundle_handler_get_data_resource -func gocef_resource_bundle_handler_get_data_resource(self *C.cef_resource_bundle_handler_t, resource_id C.int, data *unsafe.Pointer, data_size *C.size_t) C.int { +func gocef_resource_bundle_handler_get_data_resource(self *C.cef_resource_bundle_handler_t, resourceID C.int, data *unsafe.Pointer, dataSize *C.size_t) C.int { me__ := (*ResourceBundleHandler)(self) proxy__ := lookupResourceBundleHandlerProxy(me__.Base()) - return C.int(proxy__.GetDataResource(me__, int32(resource_id), data, (*uint64)(data_size))) + return C.int(proxy__.GetDataResource(me__, int32(resourceID), data, (*uint64)(dataSize))) } // GetDataResourceForScale (get_data_resource_for_scale) @@ -103,14 +103,14 @@ func gocef_resource_bundle_handler_get_data_resource(self *C.cef_resource_bundle // To use the default resource data return false (0). The resource data will // not be copied and must remain resident in memory. Include // cef_pack_resources.h for a listing of valid resource ID values. -func (d *ResourceBundleHandler) GetDataResourceForScale(resource_id int32, scale_factor ScaleFactor, data *unsafe.Pointer, data_size *uint64) int32 { - return lookupResourceBundleHandlerProxy(d.Base()).GetDataResourceForScale(d, resource_id, scale_factor, data, data_size) +func (d *ResourceBundleHandler) GetDataResourceForScale(resourceID int32, scaleFactor ScaleFactor, data *unsafe.Pointer, dataSize *uint64) int32 { + return lookupResourceBundleHandlerProxy(d.Base()).GetDataResourceForScale(d, resourceID, scaleFactor, data, dataSize) } //nolint:gocritic //export gocef_resource_bundle_handler_get_data_resource_for_scale -func gocef_resource_bundle_handler_get_data_resource_for_scale(self *C.cef_resource_bundle_handler_t, resource_id C.int, scale_factor C.cef_scale_factor_t, data *unsafe.Pointer, data_size *C.size_t) C.int { +func gocef_resource_bundle_handler_get_data_resource_for_scale(self *C.cef_resource_bundle_handler_t, resourceID C.int, scaleFactor C.cef_scale_factor_t, data *unsafe.Pointer, dataSize *C.size_t) C.int { me__ := (*ResourceBundleHandler)(self) proxy__ := lookupResourceBundleHandlerProxy(me__.Base()) - return C.int(proxy__.GetDataResourceForScale(me__, int32(resource_id), ScaleFactor(scale_factor), data, (*uint64)(data_size))) + return C.int(proxy__.GetDataResourceForScale(me__, int32(resourceID), ScaleFactor(scaleFactor), data, (*uint64)(dataSize))) } diff --git a/cef/ResourceBundle_gen.go b/cef/ResourceBundle_gen.go index d0704cc..9b706b4 100644 --- a/cef/ResourceBundle_gen.go +++ b/cef/ResourceBundle_gen.go @@ -6,9 +6,9 @@ import "unsafe" import ( // #include "capi_gen.h" - // cef_string_userfree_t gocef_resource_bundle_get_localized_string(cef_resource_bundle_t * self, int string_id, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_resource_bundle_t *, int)) { return callback__(self, string_id); } - // int gocef_resource_bundle_get_data_resource(cef_resource_bundle_t * self, int resource_id, void ** data, size_t * data_size, int (CEF_CALLBACK *callback__)(cef_resource_bundle_t *, int, void **, size_t *)) { return callback__(self, resource_id, data, data_size); } - // int gocef_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, int (CEF_CALLBACK *callback__)(cef_resource_bundle_t *, int, cef_scale_factor_t, void **, size_t *)) { return callback__(self, resource_id, scale_factor, data, data_size); } + // cef_string_userfree_t gocef_resource_bundle_get_localized_string(cef_resource_bundle_t * self, int stringID, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_resource_bundle_t *, int)) { return callback__(self, stringID); } + // int gocef_resource_bundle_get_data_resource(cef_resource_bundle_t * self, int resourceID, void ** data, size_t * dataSize, int (CEF_CALLBACK *callback__)(cef_resource_bundle_t *, int, void **, size_t *)) { return callback__(self, resourceID, data, dataSize); } + // int gocef_resource_bundle_get_data_resource_for_scale(cef_resource_bundle_t * self, int resourceID, cef_scale_factor_t scaleFactor, void ** data, size_t * dataSize, int (CEF_CALLBACK *callback__)(cef_resource_bundle_t *, int, cef_scale_factor_t, void **, size_t *)) { return callback__(self, resourceID, scaleFactor, data, dataSize); } "C" ) @@ -35,8 +35,8 @@ func (d *ResourceBundle) Base() *BaseRefCounted { // string if the value is not found. Include cef_pack_strings.h for a listing // of valid string ID values. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *ResourceBundle) GetLocalizedString(string_id int32) string { - return cefuserfreestrToString(C.gocef_resource_bundle_get_localized_string(d.toNative(), C.int(string_id), d.get_localized_string)) +func (d *ResourceBundle) GetLocalizedString(stringID int32) string { + return cefuserfreestrToString(C.gocef_resource_bundle_get_localized_string(d.toNative(), C.int(stringID), d.get_localized_string)) } // GetDataResource (get_data_resource) @@ -46,8 +46,8 @@ func (d *ResourceBundle) GetLocalizedString(string_id int32) string { // will return false (0). The returned |data| pointer will remain resident in // memory and should not be freed. Include cef_pack_resources.h for a listing // of valid resource ID values. -func (d *ResourceBundle) GetDataResource(resource_id int32, data *unsafe.Pointer, data_size *uint64) int32 { - return int32(C.gocef_resource_bundle_get_data_resource(d.toNative(), C.int(resource_id), data, (*C.size_t)(data_size), d.get_data_resource)) +func (d *ResourceBundle) GetDataResource(resourceID int32, data *unsafe.Pointer, dataSize *uint64) int32 { + return int32(C.gocef_resource_bundle_get_data_resource(d.toNative(), C.int(resourceID), data, (*C.size_t)(dataSize), d.get_data_resource)) } // GetDataResourceForScale (get_data_resource_for_scale) @@ -59,6 +59,6 @@ func (d *ResourceBundle) GetDataResource(resource_id int32, data *unsafe.Pointer // return false (0). The returned |data| pointer will remain resident in // memory and should not be freed. Include cef_pack_resources.h for a listing // of valid resource ID values. -func (d *ResourceBundle) GetDataResourceForScale(resource_id int32, scale_factor ScaleFactor, data *unsafe.Pointer, data_size *uint64) int32 { - return int32(C.gocef_resource_bundle_get_data_resource_for_scale(d.toNative(), C.int(resource_id), C.cef_scale_factor_t(scale_factor), data, (*C.size_t)(data_size), d.get_data_resource_for_scale)) +func (d *ResourceBundle) GetDataResourceForScale(resourceID int32, scaleFactor ScaleFactor, data *unsafe.Pointer, dataSize *uint64) int32 { + return int32(C.gocef_resource_bundle_get_data_resource_for_scale(d.toNative(), C.int(resourceID), C.cef_scale_factor_t(scaleFactor), data, (*C.size_t)(dataSize), d.get_data_resource_for_scale)) } diff --git a/cef/ResourceHandler_gen.go b/cef/ResourceHandler_gen.go index d6c2962..79efe05 100644 --- a/cef/ResourceHandler_gen.go +++ b/cef/ResourceHandler_gen.go @@ -16,12 +16,12 @@ import ( // ResourceHandlerProxy defines methods required for using ResourceHandler. type ResourceHandlerProxy interface { - Open(self *ResourceHandler, request *Request, handle_request *int32, callback *Callback) int32 + Open(self *ResourceHandler, request *Request, handleRequest *int32, callback *Callback) int32 ProcessRequest(self *ResourceHandler, request *Request, callback *Callback) int32 - GetResponseHeaders(self *ResourceHandler, response *Response, response_length *int64, redirectUrl *string) - Skip(self *ResourceHandler, bytes_to_skip int64, bytes_skipped *int64, callback *ResourceSkipCallback) int32 - Read(self *ResourceHandler, data_out unsafe.Pointer, bytes_to_read int32, bytes_read *int32, callback *ResourceReadCallback) int32 - ReadResponse(self *ResourceHandler, data_out unsafe.Pointer, bytes_to_read int32, bytes_read *int32, callback *Callback) int32 + GetResponseHeaders(self *ResourceHandler, response *Response, responseLength *int64, redirectURL *string) + Skip(self *ResourceHandler, bytesToSkip int64, bytesSkipped *int64, callback *ResourceSkipCallback) int32 + Read(self *ResourceHandler, dataOut unsafe.Pointer, bytesToRead int32, bytesRead *int32, callback *ResourceReadCallback) int32 + ReadResponse(self *ResourceHandler, dataOut unsafe.Pointer, bytesToRead int32, bytesRead *int32, callback *Callback) int32 Cancel(self *ResourceHandler) } @@ -71,16 +71,16 @@ func (d *ResourceHandler) Base() *BaseRefCounted { // called in sequence but not from a dedicated thread. For backwards // compatibility set |handle_request| to false (0) and return false (0) and // the ProcessRequest function will be called. -func (d *ResourceHandler) Open(request *Request, handle_request *int32, callback *Callback) int32 { - return lookupResourceHandlerProxy(d.Base()).Open(d, request, handle_request, callback) +func (d *ResourceHandler) Open(request *Request, handleRequest *int32, callback *Callback) int32 { + return lookupResourceHandlerProxy(d.Base()).Open(d, request, handleRequest, callback) } //nolint:gocritic //export gocef_resource_handler_open -func gocef_resource_handler_open(self *C.cef_resource_handler_t, request *C.cef_request_t, handle_request *C.int, callback *C.cef_callback_t) C.int { +func gocef_resource_handler_open(self *C.cef_resource_handler_t, request *C.cef_request_t, handleRequest *C.int, callback *C.cef_callback_t) C.int { me__ := (*ResourceHandler)(self) proxy__ := lookupResourceHandlerProxy(me__.Base()) - return C.int(proxy__.Open(me__, (*Request)(request), (*int32)(handle_request), (*Callback)(callback))) + return C.int(proxy__.Open(me__, (*Request)(request), (*int32)(handleRequest), (*Callback)(callback))) } // ProcessRequest (process_request) @@ -117,17 +117,17 @@ func gocef_resource_handler_process_request(self *C.cef_resource_handler_t, requ // set a relative or fully qualified URL as the Location header value. If an // error occured while setting up the request you can call set_error() on // |response| to indicate the error condition. -func (d *ResourceHandler) GetResponseHeaders(response *Response, response_length *int64, redirectUrl *string) { - lookupResourceHandlerProxy(d.Base()).GetResponseHeaders(d, response, response_length, redirectUrl) +func (d *ResourceHandler) GetResponseHeaders(response *Response, responseLength *int64, redirectURL *string) { + lookupResourceHandlerProxy(d.Base()).GetResponseHeaders(d, response, responseLength, redirectURL) } //nolint:gocritic //export gocef_resource_handler_get_response_headers -func gocef_resource_handler_get_response_headers(self *C.cef_resource_handler_t, response *C.cef_response_t, response_length *C.int64, redirectUrl *C.cef_string_t) { +func gocef_resource_handler_get_response_headers(self *C.cef_resource_handler_t, response *C.cef_response_t, responseLength *C.int64, redirectURL *C.cef_string_t) { me__ := (*ResourceHandler)(self) proxy__ := lookupResourceHandlerProxy(me__.Base()) - redirectUrl_ := cefstrToString(redirectUrl) - proxy__.GetResponseHeaders(me__, (*Response)(response), (*int64)(response_length), &redirectUrl_) + redirectURL_ := cefstrToString(redirectURL) + proxy__.GetResponseHeaders(me__, (*Response)(response), (*int64)(responseLength), &redirectURL_) } // Skip (skip) @@ -138,16 +138,16 @@ func gocef_resource_handler_get_response_headers(self *C.cef_resource_handler_t, // execute |callback| when the data is available. To indicate failure set // |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This // function will be called in sequence but not from a dedicated thread. -func (d *ResourceHandler) Skip(bytes_to_skip int64, bytes_skipped *int64, callback *ResourceSkipCallback) int32 { - return lookupResourceHandlerProxy(d.Base()).Skip(d, bytes_to_skip, bytes_skipped, callback) +func (d *ResourceHandler) Skip(bytesToSkip int64, bytesSkipped *int64, callback *ResourceSkipCallback) int32 { + return lookupResourceHandlerProxy(d.Base()).Skip(d, bytesToSkip, bytesSkipped, callback) } //nolint:gocritic //export gocef_resource_handler_skip -func gocef_resource_handler_skip(self *C.cef_resource_handler_t, bytes_to_skip C.int64, bytes_skipped *C.int64, callback *C.cef_resource_skip_callback_t) C.int { +func gocef_resource_handler_skip(self *C.cef_resource_handler_t, bytesToSkip C.int64, bytesSkipped *C.int64, callback *C.cef_resource_skip_callback_t) C.int { me__ := (*ResourceHandler)(self) proxy__ := lookupResourceHandlerProxy(me__.Base()) - return C.int(proxy__.Skip(me__, int64(bytes_to_skip), (*int64)(bytes_skipped), (*ResourceSkipCallback)(callback))) + return C.int(proxy__.Skip(me__, int64(bytesToSkip), (*int64)(bytesSkipped), (*ResourceSkipCallback)(callback))) } // Read (read) @@ -162,16 +162,16 @@ func gocef_resource_handler_skip(self *C.cef_resource_handler_t, bytes_to_skip C // in sequence but not from a dedicated thread. For backwards compatibility // set |bytes_read| to -1 and return false (0) and the ReadResponse function // will be called. -func (d *ResourceHandler) Read(data_out unsafe.Pointer, bytes_to_read int32, bytes_read *int32, callback *ResourceReadCallback) int32 { - return lookupResourceHandlerProxy(d.Base()).Read(d, data_out, bytes_to_read, bytes_read, callback) +func (d *ResourceHandler) Read(dataOut unsafe.Pointer, bytesToRead int32, bytesRead *int32, callback *ResourceReadCallback) int32 { + return lookupResourceHandlerProxy(d.Base()).Read(d, dataOut, bytesToRead, bytesRead, callback) } //nolint:gocritic //export gocef_resource_handler_read -func gocef_resource_handler_read(self *C.cef_resource_handler_t, data_out unsafe.Pointer, bytes_to_read C.int, bytes_read *C.int, callback *C.cef_resource_read_callback_t) C.int { +func gocef_resource_handler_read(self *C.cef_resource_handler_t, dataOut unsafe.Pointer, bytesToRead C.int, bytesRead *C.int, callback *C.cef_resource_read_callback_t) C.int { me__ := (*ResourceHandler)(self) proxy__ := lookupResourceHandlerProxy(me__.Base()) - return C.int(proxy__.Read(me__, data_out, int32(bytes_to_read), (*int32)(bytes_read), (*ResourceReadCallback)(callback))) + return C.int(proxy__.Read(me__, dataOut, int32(bytesToRead), (*int32)(bytesRead), (*ResourceReadCallback)(callback))) } // ReadResponse (read_response) @@ -182,16 +182,16 @@ func gocef_resource_handler_read(self *C.cef_resource_handler_t, data_out unsafe // data is available. To indicate response completion return false (0). // // WARNING: This function is deprecated. Use Skip and Read instead. -func (d *ResourceHandler) ReadResponse(data_out unsafe.Pointer, bytes_to_read int32, bytes_read *int32, callback *Callback) int32 { - return lookupResourceHandlerProxy(d.Base()).ReadResponse(d, data_out, bytes_to_read, bytes_read, callback) +func (d *ResourceHandler) ReadResponse(dataOut unsafe.Pointer, bytesToRead int32, bytesRead *int32, callback *Callback) int32 { + return lookupResourceHandlerProxy(d.Base()).ReadResponse(d, dataOut, bytesToRead, bytesRead, callback) } //nolint:gocritic //export gocef_resource_handler_read_response -func gocef_resource_handler_read_response(self *C.cef_resource_handler_t, data_out unsafe.Pointer, bytes_to_read C.int, bytes_read *C.int, callback *C.cef_callback_t) C.int { +func gocef_resource_handler_read_response(self *C.cef_resource_handler_t, dataOut unsafe.Pointer, bytesToRead C.int, bytesRead *C.int, callback *C.cef_callback_t) C.int { me__ := (*ResourceHandler)(self) proxy__ := lookupResourceHandlerProxy(me__.Base()) - return C.int(proxy__.ReadResponse(me__, data_out, int32(bytes_to_read), (*int32)(bytes_read), (*Callback)(callback))) + return C.int(proxy__.ReadResponse(me__, dataOut, int32(bytesToRead), (*int32)(bytesRead), (*Callback)(callback))) } // Cancel (cancel) diff --git a/cef/ResourceReadCallback_gen.go b/cef/ResourceReadCallback_gen.go index 4d330e7..b278f22 100644 --- a/cef/ResourceReadCallback_gen.go +++ b/cef/ResourceReadCallback_gen.go @@ -16,7 +16,7 @@ import ( // ResourceReadCallbackProxy defines methods required for using ResourceReadCallback. type ResourceReadCallbackProxy interface { - Cont(self *ResourceReadCallback, bytes_read int32) + Cont(self *ResourceReadCallback, bytesRead int32) } // ResourceReadCallback (cef_resource_read_callback_t from include/capi/cef_resource_handler_capi.h) @@ -61,14 +61,14 @@ func (d *ResourceReadCallback) Base() *BaseRefCounted { // be called again until the request is complete (based on either the result // or the expected content length). If |bytes_read| < 0 then the request will // fail and the |bytes_read| value will be treated as the error code. -func (d *ResourceReadCallback) Cont(bytes_read int32) { - lookupResourceReadCallbackProxy(d.Base()).Cont(d, bytes_read) +func (d *ResourceReadCallback) Cont(bytesRead int32) { + lookupResourceReadCallbackProxy(d.Base()).Cont(d, bytesRead) } //nolint:gocritic //export gocef_resource_read_callback_cont -func gocef_resource_read_callback_cont(self *C.cef_resource_read_callback_t, bytes_read C.int) { +func gocef_resource_read_callback_cont(self *C.cef_resource_read_callback_t, bytesRead C.int) { me__ := (*ResourceReadCallback)(self) proxy__ := lookupResourceReadCallbackProxy(me__.Base()) - proxy__.Cont(me__, int32(bytes_read)) + proxy__.Cont(me__, int32(bytesRead)) } diff --git a/cef/ResourceRequestHandler_gen.go b/cef/ResourceRequestHandler_gen.go index 3b2182c..f3c3c42 100644 --- a/cef/ResourceRequestHandler_gen.go +++ b/cef/ResourceRequestHandler_gen.go @@ -19,11 +19,11 @@ type ResourceRequestHandlerProxy interface { GetCookieAccessFilter(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request) *CookieAccessFilter OnBeforeResourceLoad(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, callback *RequestCallback) ReturnValue GetResourceHandler(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request) *ResourceHandler - OnResourceRedirect(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, response *Response, new_url *string) + OnResourceRedirect(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, response *Response, newURL *string) OnResourceResponse(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, response *Response) int32 GetResourceResponseFilter(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, response *Response) *ResponseFilter - OnResourceLoadComplete(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, response *Response, status UrlrequestStatus, received_content_length int64) - OnProtocolExecution(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, allow_os_execution *int32) + OnResourceLoadComplete(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, response *Response, status UrlrequestStatus, receivedContentLength int64) + OnProtocolExecution(self *ResourceRequestHandler, browser *Browser, frame *Frame, request *Request, allowOsExecution *int32) } // ResourceRequestHandler (cef_resource_request_handler_t from include/capi/cef_resource_request_handler_capi.h) @@ -133,17 +133,17 @@ func gocef_resource_request_handler_get_resource_handler(self *C.cef_resource_re // resulted in the redirect. The |new_url| parameter will contain the new URL // and can be changed if desired. The |request| and |response| objects cannot // be modified in this callback. -func (d *ResourceRequestHandler) OnResourceRedirect(browser *Browser, frame *Frame, request *Request, response *Response, new_url *string) { - lookupResourceRequestHandlerProxy(d.Base()).OnResourceRedirect(d, browser, frame, request, response, new_url) +func (d *ResourceRequestHandler) OnResourceRedirect(browser *Browser, frame *Frame, request *Request, response *Response, newURL *string) { + lookupResourceRequestHandlerProxy(d.Base()).OnResourceRedirect(d, browser, frame, request, response, newURL) } //nolint:gocritic //export gocef_resource_request_handler_on_resource_redirect -func gocef_resource_request_handler_on_resource_redirect(self *C.cef_resource_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, response *C.cef_response_t, new_url *C.cef_string_t) { +func gocef_resource_request_handler_on_resource_redirect(self *C.cef_resource_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, response *C.cef_response_t, newURL *C.cef_string_t) { me__ := (*ResourceRequestHandler)(self) proxy__ := lookupResourceRequestHandlerProxy(me__.Base()) - new_url_ := cefstrToString(new_url) - proxy__.OnResourceRedirect(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), (*Response)(response), &new_url_) + newURL_ := cefstrToString(newURL) + proxy__.OnResourceRedirect(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), (*Response)(response), &newURL_) } // OnResourceResponse (on_resource_response) @@ -203,16 +203,16 @@ func gocef_resource_request_handler_get_resource_response_filter(self *C.cef_res // this situation, and care should be taken not to call |browser| or |frame| // functions that modify state (like LoadURL, SendProcessMessage, etc.) if the // frame is invalid. -func (d *ResourceRequestHandler) OnResourceLoadComplete(browser *Browser, frame *Frame, request *Request, response *Response, status UrlrequestStatus, received_content_length int64) { - lookupResourceRequestHandlerProxy(d.Base()).OnResourceLoadComplete(d, browser, frame, request, response, status, received_content_length) +func (d *ResourceRequestHandler) OnResourceLoadComplete(browser *Browser, frame *Frame, request *Request, response *Response, status UrlrequestStatus, receivedContentLength int64) { + lookupResourceRequestHandlerProxy(d.Base()).OnResourceLoadComplete(d, browser, frame, request, response, status, receivedContentLength) } //nolint:gocritic //export gocef_resource_request_handler_on_resource_load_complete -func gocef_resource_request_handler_on_resource_load_complete(self *C.cef_resource_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, response *C.cef_response_t, status C.cef_urlrequest_status_t, received_content_length C.int64) { +func gocef_resource_request_handler_on_resource_load_complete(self *C.cef_resource_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, response *C.cef_response_t, status C.cef_urlrequest_status_t, receivedContentLength C.int64) { me__ := (*ResourceRequestHandler)(self) proxy__ := lookupResourceRequestHandlerProxy(me__.Base()) - proxy__.OnResourceLoadComplete(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), (*Response)(response), UrlrequestStatus(status), int64(received_content_length)) + proxy__.OnResourceLoadComplete(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), (*Response)(response), UrlrequestStatus(status), int64(receivedContentLength)) } // OnProtocolExecution (on_protocol_execution) @@ -224,14 +224,14 @@ func gocef_resource_request_handler_on_resource_load_complete(self *C.cef_resour // registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD USE // THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL // ANALYSIS BEFORE ALLOWING OS EXECUTION. -func (d *ResourceRequestHandler) OnProtocolExecution(browser *Browser, frame *Frame, request *Request, allow_os_execution *int32) { - lookupResourceRequestHandlerProxy(d.Base()).OnProtocolExecution(d, browser, frame, request, allow_os_execution) +func (d *ResourceRequestHandler) OnProtocolExecution(browser *Browser, frame *Frame, request *Request, allowOsExecution *int32) { + lookupResourceRequestHandlerProxy(d.Base()).OnProtocolExecution(d, browser, frame, request, allowOsExecution) } //nolint:gocritic //export gocef_resource_request_handler_on_protocol_execution -func gocef_resource_request_handler_on_protocol_execution(self *C.cef_resource_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, allow_os_execution *C.int) { +func gocef_resource_request_handler_on_protocol_execution(self *C.cef_resource_request_handler_t, browser *C.cef_browser_t, frame *C.cef_frame_t, request *C.cef_request_t, allowOsExecution *C.int) { me__ := (*ResourceRequestHandler)(self) proxy__ := lookupResourceRequestHandlerProxy(me__.Base()) - proxy__.OnProtocolExecution(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), (*int32)(allow_os_execution)) + proxy__.OnProtocolExecution(me__, (*Browser)(browser), (*Frame)(frame), (*Request)(request), (*int32)(allowOsExecution)) } diff --git a/cef/ResourceSkipCallback_gen.go b/cef/ResourceSkipCallback_gen.go index 071cd78..ae7132b 100644 --- a/cef/ResourceSkipCallback_gen.go +++ b/cef/ResourceSkipCallback_gen.go @@ -16,7 +16,7 @@ import ( // ResourceSkipCallbackProxy defines methods required for using ResourceSkipCallback. type ResourceSkipCallbackProxy interface { - Cont(self *ResourceSkipCallback, bytes_skipped int64) + Cont(self *ResourceSkipCallback, bytesSkipped int64) } // ResourceSkipCallback (cef_resource_skip_callback_t from include/capi/cef_resource_handler_capi.h) @@ -60,14 +60,14 @@ func (d *ResourceSkipCallback) Base() *BaseRefCounted { // then either skip() will be called again until the requested number of bytes // have been skipped or the request will proceed. If |bytes_skipped| <= 0 the // request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE. -func (d *ResourceSkipCallback) Cont(bytes_skipped int64) { - lookupResourceSkipCallbackProxy(d.Base()).Cont(d, bytes_skipped) +func (d *ResourceSkipCallback) Cont(bytesSkipped int64) { + lookupResourceSkipCallbackProxy(d.Base()).Cont(d, bytesSkipped) } //nolint:gocritic //export gocef_resource_skip_callback_cont -func gocef_resource_skip_callback_cont(self *C.cef_resource_skip_callback_t, bytes_skipped C.int64) { +func gocef_resource_skip_callback_cont(self *C.cef_resource_skip_callback_t, bytesSkipped C.int64) { me__ := (*ResourceSkipCallback)(self) proxy__ := lookupResourceSkipCallbackProxy(me__.Base()) - proxy__.Cont(me__, int64(bytes_skipped)) + proxy__.Cont(me__, int64(bytesSkipped)) } diff --git a/cef/ResponseFilter_gen.go b/cef/ResponseFilter_gen.go index 07d8dd5..6789e69 100644 --- a/cef/ResponseFilter_gen.go +++ b/cef/ResponseFilter_gen.go @@ -17,7 +17,7 @@ import ( // ResponseFilterProxy defines methods required for using ResponseFilter. type ResponseFilterProxy interface { InitFilter(self *ResponseFilter) int32 - Filter(self *ResponseFilter, data_in unsafe.Pointer, data_in_size uint64, data_in_read *uint64, data_out unsafe.Pointer, data_out_size uint64, data_out_written *uint64) ResponseFilterStatus + Filter(self *ResponseFilter, dataIn unsafe.Pointer, dataInSize uint64, dataInRead *uint64, dataOut unsafe.Pointer, dataOutSize uint64, dataOutWritten *uint64) ResponseFilterStatus } // ResponseFilter (cef_response_filter_t from include/capi/cef_response_filter_capi.h) @@ -102,14 +102,14 @@ func gocef_response_filter_init_filter(self *C.cef_response_filter_t) C.int { // B. The user returns RESPONSE_FILTER_ERROR to indicate an error. // // Do not keep a reference to the buffers passed to this function. -func (d *ResponseFilter) Filter(data_in unsafe.Pointer, data_in_size uint64, data_in_read *uint64, data_out unsafe.Pointer, data_out_size uint64, data_out_written *uint64) ResponseFilterStatus { - return lookupResponseFilterProxy(d.Base()).Filter(d, data_in, data_in_size, data_in_read, data_out, data_out_size, data_out_written) +func (d *ResponseFilter) Filter(dataIn unsafe.Pointer, dataInSize uint64, dataInRead *uint64, dataOut unsafe.Pointer, dataOutSize uint64, dataOutWritten *uint64) ResponseFilterStatus { + return lookupResponseFilterProxy(d.Base()).Filter(d, dataIn, dataInSize, dataInRead, dataOut, dataOutSize, dataOutWritten) } //nolint:gocritic //export gocef_response_filter_filter -func gocef_response_filter_filter(self *C.cef_response_filter_t, data_in unsafe.Pointer, data_in_size C.size_t, data_in_read *C.size_t, data_out unsafe.Pointer, data_out_size C.size_t, data_out_written *C.size_t) C.cef_response_filter_status_t { +func gocef_response_filter_filter(self *C.cef_response_filter_t, dataIn unsafe.Pointer, dataInSize C.size_t, dataInRead *C.size_t, dataOut unsafe.Pointer, dataOutSize C.size_t, dataOutWritten *C.size_t) C.cef_response_filter_status_t { me__ := (*ResponseFilter)(self) proxy__ := lookupResponseFilterProxy(me__.Base()) - return C.cef_response_filter_status_t(proxy__.Filter(me__, data_in, uint64(data_in_size), (*uint64)(data_in_read), data_out, uint64(data_out_size), (*uint64)(data_out_written))) + return C.cef_response_filter_status_t(proxy__.Filter(me__, dataIn, uint64(dataInSize), (*uint64)(dataInRead), dataOut, uint64(dataOutSize), (*uint64)(dataOutWritten))) } diff --git a/cef/Response_gen.go b/cef/Response_gen.go index b42e61d..b61c736 100644 --- a/cef/Response_gen.go +++ b/cef/Response_gen.go @@ -19,7 +19,7 @@ import ( // void gocef_response_get_header_map(cef_response_t * self, cef_string_multimap_t headerMap, void (CEF_CALLBACK *callback__)(cef_response_t *, cef_string_multimap_t)) { return callback__(self, headerMap); } // void gocef_response_set_header_map(cef_response_t * self, cef_string_multimap_t headerMap, void (CEF_CALLBACK *callback__)(cef_response_t *, cef_string_multimap_t)) { return callback__(self, headerMap); } // cef_string_userfree_t gocef_response_get_url(cef_response_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_response_t *)) { return callback__(self); } - // void gocef_response_set_url(cef_response_t * self, cef_string_t * url, void (CEF_CALLBACK *callback__)(cef_response_t *, cef_string_t *)) { return callback__(self, url); } + // void gocef_response_set_url(cef_response_t * self, cef_string_t * uRL, void (CEF_CALLBACK *callback__)(cef_response_t *, cef_string_t *)) { return callback__(self, uRL); } "C" ) @@ -147,20 +147,20 @@ func (d *Response) SetHeaderMap(headerMap StringMultimap) { C.gocef_response_set_header_map(d.toNative(), C.cef_string_multimap_t(headerMap), d.set_header_map) } -// GetUrl (get_url) +// GetURL (get_url) // Get the resolved URL after redirects or changed as a result of HSTS. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *Response) GetUrl() string { +func (d *Response) GetURL() string { return cefuserfreestrToString(C.gocef_response_get_url(d.toNative(), d.get_url)) } -// SetUrl (set_url) +// SetURL (set_url) // Set the resolved URL after redirects or changed as a result of HSTS. -func (d *Response) SetUrl(url string) { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func (d *Response) SetURL(uRL string) { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - C.gocef_response_set_url(d.toNative(), (*C.cef_string_t)(url_), d.set_url) + C.gocef_response_set_url(d.toNative(), (*C.cef_string_t)(uRL_), d.set_url) } diff --git a/cef/RunContextMenuCallback_gen.go b/cef/RunContextMenuCallback_gen.go index b977fe1..139a153 100644 --- a/cef/RunContextMenuCallback_gen.go +++ b/cef/RunContextMenuCallback_gen.go @@ -16,7 +16,7 @@ import ( // RunContextMenuCallbackProxy defines methods required for using RunContextMenuCallback. type RunContextMenuCallbackProxy interface { - Cont(self *RunContextMenuCallback, command_id int32, event_flags EventFlags) + Cont(self *RunContextMenuCallback, commandID int32, eventFlags EventFlags) Cancel(self *RunContextMenuCallback) } @@ -59,16 +59,16 @@ func (d *RunContextMenuCallback) Base() *BaseRefCounted { // Cont (cont) // Complete context menu display by selecting the specified |command_id| and // |event_flags|. -func (d *RunContextMenuCallback) Cont(command_id int32, event_flags EventFlags) { - lookupRunContextMenuCallbackProxy(d.Base()).Cont(d, command_id, event_flags) +func (d *RunContextMenuCallback) Cont(commandID int32, eventFlags EventFlags) { + lookupRunContextMenuCallbackProxy(d.Base()).Cont(d, commandID, eventFlags) } //nolint:gocritic //export gocef_run_context_menu_callback_cont -func gocef_run_context_menu_callback_cont(self *C.cef_run_context_menu_callback_t, command_id C.int, event_flags C.cef_event_flags_t) { +func gocef_run_context_menu_callback_cont(self *C.cef_run_context_menu_callback_t, commandID C.int, eventFlags C.cef_event_flags_t) { me__ := (*RunContextMenuCallback)(self) proxy__ := lookupRunContextMenuCallbackProxy(me__.Base()) - proxy__.Cont(me__, int32(command_id), EventFlags(event_flags)) + proxy__.Cont(me__, int32(commandID), EventFlags(eventFlags)) } // Cancel (cancel) diff --git a/cef/RunFileDialogCallback_gen.go b/cef/RunFileDialogCallback_gen.go index d4f7910..ce28894 100644 --- a/cef/RunFileDialogCallback_gen.go +++ b/cef/RunFileDialogCallback_gen.go @@ -16,7 +16,7 @@ import ( // RunFileDialogCallbackProxy defines methods required for using RunFileDialogCallback. type RunFileDialogCallbackProxy interface { - OnFileDialogDismissed(self *RunFileDialogCallback, selected_accept_filter int32, file_paths StringList) + OnFileDialogDismissed(self *RunFileDialogCallback, selectedAcceptFilter int32, filePaths StringList) } // RunFileDialogCallback (cef_run_file_dialog_callback_t from include/capi/cef_browser_capi.h) @@ -62,14 +62,14 @@ func (d *RunFileDialogCallback) Base() *BaseRefCounted { // the accept filters array passed to cef_browser_host_t::RunFileDialog. // |file_paths| will be a single value or a list of values depending on the // dialog mode. If the selection was cancelled |file_paths| will be NULL. -func (d *RunFileDialogCallback) OnFileDialogDismissed(selected_accept_filter int32, file_paths StringList) { - lookupRunFileDialogCallbackProxy(d.Base()).OnFileDialogDismissed(d, selected_accept_filter, file_paths) +func (d *RunFileDialogCallback) OnFileDialogDismissed(selectedAcceptFilter int32, filePaths StringList) { + lookupRunFileDialogCallbackProxy(d.Base()).OnFileDialogDismissed(d, selectedAcceptFilter, filePaths) } //nolint:gocritic //export gocef_run_file_dialog_callback_on_file_dialog_dismissed -func gocef_run_file_dialog_callback_on_file_dialog_dismissed(self *C.cef_run_file_dialog_callback_t, selected_accept_filter C.int, file_paths C.cef_string_list_t) { +func gocef_run_file_dialog_callback_on_file_dialog_dismissed(self *C.cef_run_file_dialog_callback_t, selectedAcceptFilter C.int, filePaths C.cef_string_list_t) { me__ := (*RunFileDialogCallback)(self) proxy__ := lookupRunFileDialogCallbackProxy(me__.Base()) - proxy__.OnFileDialogDismissed(me__, int32(selected_accept_filter), StringList(file_paths)) + proxy__.OnFileDialogDismissed(me__, int32(selectedAcceptFilter), StringList(filePaths)) } diff --git a/cef/SchemeHandlerFactory_gen.go b/cef/SchemeHandlerFactory_gen.go index de98bfb..973ba54 100644 --- a/cef/SchemeHandlerFactory_gen.go +++ b/cef/SchemeHandlerFactory_gen.go @@ -4,7 +4,7 @@ package cef import ( // #include "capi_gen.h" - // cef_resource_handler_t * gocef_scheme_handler_factory_create(cef_scheme_handler_factory_t * self, cef_browser_t * browser, cef_frame_t * frame, cef_string_t * scheme_name, cef_request_t * request, cef_resource_handler_t * (CEF_CALLBACK *callback__)(cef_scheme_handler_factory_t *, cef_browser_t *, cef_frame_t *, cef_string_t *, cef_request_t *)) { return callback__(self, browser, frame, scheme_name, request); } + // cef_resource_handler_t * gocef_scheme_handler_factory_create(cef_scheme_handler_factory_t * self, cef_browser_t * browser, cef_frame_t * frame, cef_string_t * schemeName, cef_request_t * request, cef_resource_handler_t * (CEF_CALLBACK *callback__)(cef_scheme_handler_factory_t *, cef_browser_t *, cef_frame_t *, cef_string_t *, cef_request_t *)) { return callback__(self, browser, frame, schemeName, request); } "C" ) @@ -31,11 +31,11 @@ func (d *SchemeHandlerFactory) Base() *BaseRefCounted { // request or NULL if the request did not originate from a browser window (for // example, if the request came from cef_urlrequest_t). The |request| object // passed to this function cannot be modified. -func (d *SchemeHandlerFactory) Create(browser *Browser, frame *Frame, scheme_name string, request *Request) *ResourceHandler { - scheme_name_ := C.cef_string_userfree_alloc() - setCEFStr(scheme_name, scheme_name_) +func (d *SchemeHandlerFactory) Create(browser *Browser, frame *Frame, schemeName string, request *Request) *ResourceHandler { + schemeName_ := C.cef_string_userfree_alloc() + setCEFStr(schemeName, schemeName_) defer func() { - C.cef_string_userfree_free(scheme_name_) + C.cef_string_userfree_free(schemeName_) }() - return (*ResourceHandler)(C.gocef_scheme_handler_factory_create(d.toNative(), browser.toNative(), frame.toNative(), (*C.cef_string_t)(scheme_name_), request.toNative(), d.create)) + return (*ResourceHandler)(C.gocef_scheme_handler_factory_create(d.toNative(), browser.toNative(), frame.toNative(), (*C.cef_string_t)(schemeName_), request.toNative(), d.create)) } diff --git a/cef/SchemeRegistrar_gen.go b/cef/SchemeRegistrar_gen.go index e0ae8fb..d5fdefb 100644 --- a/cef/SchemeRegistrar_gen.go +++ b/cef/SchemeRegistrar_gen.go @@ -4,7 +4,7 @@ package cef import ( // #include "capi_gen.h" - // int gocef_scheme_registrar_add_custom_scheme(cef_scheme_registrar_t * self, cef_string_t * scheme_name, int options, int (CEF_CALLBACK *callback__)(cef_scheme_registrar_t *, cef_string_t *, int)) { return callback__(self, scheme_name, options); } + // int gocef_scheme_registrar_add_custom_scheme(cef_scheme_registrar_t * self, cef_string_t * schemeName, int options, int (CEF_CALLBACK *callback__)(cef_scheme_registrar_t *, cef_string_t *, int)) { return callback__(self, schemeName, options); } "C" ) @@ -31,11 +31,11 @@ func (d *SchemeRegistrar) Base() *BaseScoped { // This function may be called on any thread. It should only be called once // per unique |scheme_name| value. If |scheme_name| is already registered or // if an error occurs this function will return false (0). -func (d *SchemeRegistrar) AddCustomScheme(scheme_name string, options int32) int32 { - scheme_name_ := C.cef_string_userfree_alloc() - setCEFStr(scheme_name, scheme_name_) +func (d *SchemeRegistrar) AddCustomScheme(schemeName string, options int32) int32 { + schemeName_ := C.cef_string_userfree_alloc() + setCEFStr(schemeName, schemeName_) defer func() { - C.cef_string_userfree_free(scheme_name_) + C.cef_string_userfree_free(schemeName_) }() - return int32(C.gocef_scheme_registrar_add_custom_scheme(d.toNative(), (*C.cef_string_t)(scheme_name_), C.int(options), d.add_custom_scheme)) + return int32(C.gocef_scheme_registrar_add_custom_scheme(d.toNative(), (*C.cef_string_t)(schemeName_), C.int(options), d.add_custom_scheme)) } diff --git a/cef/ServerHandler_gen.go b/cef/ServerHandler_gen.go index 5d92f2c..f19bce7 100644 --- a/cef/ServerHandler_gen.go +++ b/cef/ServerHandler_gen.go @@ -18,12 +18,12 @@ import ( type ServerHandlerProxy interface { OnServerCreated(self *ServerHandler, server *Server) OnServerDestroyed(self *ServerHandler, server *Server) - OnClientConnected(self *ServerHandler, server *Server, connection_id int32) - OnClientDisconnected(self *ServerHandler, server *Server, connection_id int32) - OnHttpRequest(self *ServerHandler, server *Server, connection_id int32, client_address string, request *Request) - OnWebSocketRequest(self *ServerHandler, server *Server, connection_id int32, client_address string, request *Request, callback *Callback) - OnWebSocketConnected(self *ServerHandler, server *Server, connection_id int32) - OnWebSocketMessage(self *ServerHandler, server *Server, connection_id int32, data unsafe.Pointer, data_size uint64) + OnClientConnected(self *ServerHandler, server *Server, connectionID int32) + OnClientDisconnected(self *ServerHandler, server *Server, connectionID int32) + OnHTTPRequest(self *ServerHandler, server *Server, connectionID int32, clientAddress string, request *Request) + OnWebSocketRequest(self *ServerHandler, server *Server, connectionID int32, clientAddress string, request *Request, callback *Callback) + OnWebSocketConnected(self *ServerHandler, server *Server, connectionID int32) + OnWebSocketMessage(self *ServerHandler, server *Server, connectionID int32, data unsafe.Pointer, dataSize uint64) } // ServerHandler (cef_server_handler_t from include/capi/cef_server_capi.h) @@ -106,16 +106,16 @@ func gocef_server_handler_on_server_destroyed(self *C.cef_server_handler_t, serv // Called when a client connects to |server|. |connection_id| uniquely // identifies the connection. Each call to this function will have a matching // call to OnClientDisconnected. -func (d *ServerHandler) OnClientConnected(server *Server, connection_id int32) { - lookupServerHandlerProxy(d.Base()).OnClientConnected(d, server, connection_id) +func (d *ServerHandler) OnClientConnected(server *Server, connectionID int32) { + lookupServerHandlerProxy(d.Base()).OnClientConnected(d, server, connectionID) } //nolint:gocritic //export gocef_server_handler_on_client_connected -func gocef_server_handler_on_client_connected(self *C.cef_server_handler_t, server *C.cef_server_t, connection_id C.int) { +func gocef_server_handler_on_client_connected(self *C.cef_server_handler_t, server *C.cef_server_t, connectionID C.int) { me__ := (*ServerHandler)(self) proxy__ := lookupServerHandlerProxy(me__.Base()) - proxy__.OnClientConnected(me__, (*Server)(server), int32(connection_id)) + proxy__.OnClientConnected(me__, (*Server)(server), int32(connectionID)) } // OnClientDisconnected (on_client_disconnected) @@ -126,35 +126,35 @@ func gocef_server_handler_on_client_connected(self *C.cef_server_handler_t, serv // originate from either the client or the server. For example, the server // will disconnect automatically after a cef_server_t::SendHttpXXXResponse // function is called. -func (d *ServerHandler) OnClientDisconnected(server *Server, connection_id int32) { - lookupServerHandlerProxy(d.Base()).OnClientDisconnected(d, server, connection_id) +func (d *ServerHandler) OnClientDisconnected(server *Server, connectionID int32) { + lookupServerHandlerProxy(d.Base()).OnClientDisconnected(d, server, connectionID) } //nolint:gocritic //export gocef_server_handler_on_client_disconnected -func gocef_server_handler_on_client_disconnected(self *C.cef_server_handler_t, server *C.cef_server_t, connection_id C.int) { +func gocef_server_handler_on_client_disconnected(self *C.cef_server_handler_t, server *C.cef_server_t, connectionID C.int) { me__ := (*ServerHandler)(self) proxy__ := lookupServerHandlerProxy(me__.Base()) - proxy__.OnClientDisconnected(me__, (*Server)(server), int32(connection_id)) + proxy__.OnClientDisconnected(me__, (*Server)(server), int32(connectionID)) } -// OnHttpRequest (on_http_request) +// OnHTTPRequest (on_http_request) // Called when |server| receives an HTTP request. |connection_id| uniquely // identifies the connection, |client_address| is the requesting IPv4 or IPv6 // client address including port number, and |request| contains the request // contents (URL, function, headers and optional POST data). Call cef_server_t // functions either synchronously or asynchronusly to send a response. -func (d *ServerHandler) OnHttpRequest(server *Server, connection_id int32, client_address string, request *Request) { - lookupServerHandlerProxy(d.Base()).OnHttpRequest(d, server, connection_id, client_address, request) +func (d *ServerHandler) OnHTTPRequest(server *Server, connectionID int32, clientAddress string, request *Request) { + lookupServerHandlerProxy(d.Base()).OnHTTPRequest(d, server, connectionID, clientAddress, request) } //nolint:gocritic //export gocef_server_handler_on_http_request -func gocef_server_handler_on_http_request(self *C.cef_server_handler_t, server *C.cef_server_t, connection_id C.int, client_address *C.cef_string_t, request *C.cef_request_t) { +func gocef_server_handler_on_http_request(self *C.cef_server_handler_t, server *C.cef_server_t, connectionID C.int, clientAddress *C.cef_string_t, request *C.cef_request_t) { me__ := (*ServerHandler)(self) proxy__ := lookupServerHandlerProxy(me__.Base()) - client_address_ := cefstrToString(client_address) - proxy__.OnHttpRequest(me__, (*Server)(server), int32(connection_id), client_address_, (*Request)(request)) + clientAddress_ := cefstrToString(clientAddress) + proxy__.OnHTTPRequest(me__, (*Server)(server), int32(connectionID), clientAddress_, (*Request)(request)) } // OnWebSocketRequest (on_web_socket_request) @@ -170,33 +170,33 @@ func gocef_server_handler_on_http_request(self *C.cef_server_handler_t, server * // called. Call the cef_server_t::SendWebSocketMessage function after // receiving the OnWebSocketConnected callback to respond with WebSocket // messages. -func (d *ServerHandler) OnWebSocketRequest(server *Server, connection_id int32, client_address string, request *Request, callback *Callback) { - lookupServerHandlerProxy(d.Base()).OnWebSocketRequest(d, server, connection_id, client_address, request, callback) +func (d *ServerHandler) OnWebSocketRequest(server *Server, connectionID int32, clientAddress string, request *Request, callback *Callback) { + lookupServerHandlerProxy(d.Base()).OnWebSocketRequest(d, server, connectionID, clientAddress, request, callback) } //nolint:gocritic //export gocef_server_handler_on_web_socket_request -func gocef_server_handler_on_web_socket_request(self *C.cef_server_handler_t, server *C.cef_server_t, connection_id C.int, client_address *C.cef_string_t, request *C.cef_request_t, callback *C.cef_callback_t) { +func gocef_server_handler_on_web_socket_request(self *C.cef_server_handler_t, server *C.cef_server_t, connectionID C.int, clientAddress *C.cef_string_t, request *C.cef_request_t, callback *C.cef_callback_t) { me__ := (*ServerHandler)(self) proxy__ := lookupServerHandlerProxy(me__.Base()) - client_address_ := cefstrToString(client_address) - proxy__.OnWebSocketRequest(me__, (*Server)(server), int32(connection_id), client_address_, (*Request)(request), (*Callback)(callback)) + clientAddress_ := cefstrToString(clientAddress) + proxy__.OnWebSocketRequest(me__, (*Server)(server), int32(connectionID), clientAddress_, (*Request)(request), (*Callback)(callback)) } // OnWebSocketConnected (on_web_socket_connected) // Called after the client has accepted the WebSocket connection for |server| // and |connection_id| via the OnWebSocketRequest callback. See // OnWebSocketRequest documentation for intended usage. -func (d *ServerHandler) OnWebSocketConnected(server *Server, connection_id int32) { - lookupServerHandlerProxy(d.Base()).OnWebSocketConnected(d, server, connection_id) +func (d *ServerHandler) OnWebSocketConnected(server *Server, connectionID int32) { + lookupServerHandlerProxy(d.Base()).OnWebSocketConnected(d, server, connectionID) } //nolint:gocritic //export gocef_server_handler_on_web_socket_connected -func gocef_server_handler_on_web_socket_connected(self *C.cef_server_handler_t, server *C.cef_server_t, connection_id C.int) { +func gocef_server_handler_on_web_socket_connected(self *C.cef_server_handler_t, server *C.cef_server_t, connectionID C.int) { me__ := (*ServerHandler)(self) proxy__ := lookupServerHandlerProxy(me__.Base()) - proxy__.OnWebSocketConnected(me__, (*Server)(server), int32(connection_id)) + proxy__.OnWebSocketConnected(me__, (*Server)(server), int32(connectionID)) } // OnWebSocketMessage (on_web_socket_message) @@ -205,14 +205,14 @@ func gocef_server_handler_on_web_socket_connected(self *C.cef_server_handler_t, // |data_size| is the size of |data| in bytes. Do not keep a reference to // |data| outside of this function. See OnWebSocketRequest documentation for // intended usage. -func (d *ServerHandler) OnWebSocketMessage(server *Server, connection_id int32, data unsafe.Pointer, data_size uint64) { - lookupServerHandlerProxy(d.Base()).OnWebSocketMessage(d, server, connection_id, data, data_size) +func (d *ServerHandler) OnWebSocketMessage(server *Server, connectionID int32, data unsafe.Pointer, dataSize uint64) { + lookupServerHandlerProxy(d.Base()).OnWebSocketMessage(d, server, connectionID, data, dataSize) } //nolint:gocritic //export gocef_server_handler_on_web_socket_message -func gocef_server_handler_on_web_socket_message(self *C.cef_server_handler_t, server *C.cef_server_t, connection_id C.int, data unsafe.Pointer, data_size C.size_t) { +func gocef_server_handler_on_web_socket_message(self *C.cef_server_handler_t, server *C.cef_server_t, connectionID C.int, data unsafe.Pointer, dataSize C.size_t) { me__ := (*ServerHandler)(self) proxy__ := lookupServerHandlerProxy(me__.Base()) - proxy__.OnWebSocketMessage(me__, (*Server)(server), int32(connection_id), data, uint64(data_size)) + proxy__.OnWebSocketMessage(me__, (*Server)(server), int32(connectionID), data, uint64(dataSize)) } diff --git a/cef/Server_gen.go b/cef/Server_gen.go index 7a4b66e..59b03d1 100644 --- a/cef/Server_gen.go +++ b/cef/Server_gen.go @@ -11,14 +11,14 @@ import ( // int gocef_server_is_running(cef_server_t * self, int (CEF_CALLBACK *callback__)(cef_server_t *)) { return callback__(self); } // cef_string_userfree_t gocef_server_get_address(cef_server_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_server_t *)) { return callback__(self); } // int gocef_server_has_connection(cef_server_t * self, int (CEF_CALLBACK *callback__)(cef_server_t *)) { return callback__(self); } - // int gocef_server_is_valid_connection(cef_server_t * self, int connection_id, int (CEF_CALLBACK *callback__)(cef_server_t *, int)) { return callback__(self, connection_id); } - // void gocef_server_send_http200response(cef_server_t * self, int connection_id, cef_string_t * content_type, void * data, size_t data_size, void (CEF_CALLBACK *callback__)(cef_server_t *, int, cef_string_t *, void *, size_t)) { return callback__(self, connection_id, content_type, data, data_size); } - // void gocef_server_send_http404response(cef_server_t * self, int connection_id, void (CEF_CALLBACK *callback__)(cef_server_t *, int)) { return callback__(self, connection_id); } - // void gocef_server_send_http500response(cef_server_t * self, int connection_id, cef_string_t * error_message, void (CEF_CALLBACK *callback__)(cef_server_t *, int, cef_string_t *)) { return callback__(self, connection_id, error_message); } - // void gocef_server_send_http_response(cef_server_t * self, int connection_id, int response_code, cef_string_t * content_type, int64 content_length, cef_string_multimap_t extra_headers, void (CEF_CALLBACK *callback__)(cef_server_t *, int, int, cef_string_t *, int64, cef_string_multimap_t)) { return callback__(self, connection_id, response_code, content_type, content_length, extra_headers); } - // void gocef_server_send_raw_data(cef_server_t * self, int connection_id, void * data, size_t data_size, void (CEF_CALLBACK *callback__)(cef_server_t *, int, void *, size_t)) { return callback__(self, connection_id, data, data_size); } - // void gocef_server_close_connection(cef_server_t * self, int connection_id, void (CEF_CALLBACK *callback__)(cef_server_t *, int)) { return callback__(self, connection_id); } - // void gocef_server_send_web_socket_message(cef_server_t * self, int connection_id, void * data, size_t data_size, void (CEF_CALLBACK *callback__)(cef_server_t *, int, void *, size_t)) { return callback__(self, connection_id, data, data_size); } + // int gocef_server_is_valid_connection(cef_server_t * self, int connectionID, int (CEF_CALLBACK *callback__)(cef_server_t *, int)) { return callback__(self, connectionID); } + // void gocef_server_send_http200response(cef_server_t * self, int connectionID, cef_string_t * contentType, void * data, size_t dataSize, void (CEF_CALLBACK *callback__)(cef_server_t *, int, cef_string_t *, void *, size_t)) { return callback__(self, connectionID, contentType, data, dataSize); } + // void gocef_server_send_http404response(cef_server_t * self, int connectionID, void (CEF_CALLBACK *callback__)(cef_server_t *, int)) { return callback__(self, connectionID); } + // void gocef_server_send_http500response(cef_server_t * self, int connectionID, cef_string_t * errorMessage, void (CEF_CALLBACK *callback__)(cef_server_t *, int, cef_string_t *)) { return callback__(self, connectionID, errorMessage); } + // void gocef_server_send_http_response(cef_server_t * self, int connectionID, int responseCode, cef_string_t * contentType, int64 contentLength, cef_string_multimap_t extraHeaders, void (CEF_CALLBACK *callback__)(cef_server_t *, int, int, cef_string_t *, int64, cef_string_multimap_t)) { return callback__(self, connectionID, responseCode, contentType, contentLength, extraHeaders); } + // void gocef_server_send_raw_data(cef_server_t * self, int connectionID, void * data, size_t dataSize, void (CEF_CALLBACK *callback__)(cef_server_t *, int, void *, size_t)) { return callback__(self, connectionID, data, dataSize); } + // void gocef_server_close_connection(cef_server_t * self, int connectionID, void (CEF_CALLBACK *callback__)(cef_server_t *, int)) { return callback__(self, connectionID); } + // void gocef_server_send_web_socket_message(cef_server_t * self, int connectionID, void * data, size_t dataSize, void (CEF_CALLBACK *callback__)(cef_server_t *, int, void *, size_t)) { return callback__(self, connectionID, data, dataSize); } "C" ) @@ -80,48 +80,48 @@ func (d *Server) HasConnection() int32 { // IsValidConnection (is_valid_connection) // Returns true (1) if |connection_id| represents a valid connection. This // function must be called on the dedicated server thread. -func (d *Server) IsValidConnection(connection_id int32) int32 { - return int32(C.gocef_server_is_valid_connection(d.toNative(), C.int(connection_id), d.is_valid_connection)) +func (d *Server) IsValidConnection(connectionID int32) int32 { + return int32(C.gocef_server_is_valid_connection(d.toNative(), C.int(connectionID), d.is_valid_connection)) } -// SendHttp200response (send_http200response) +// SendHTTP200Response (send_http200response) // Send an HTTP 200 "OK" response to the connection identified by // |connection_id|. |content_type| is the response content type (e.g. // "text/html"), |data| is the response content, and |data_size| is the size // of |data| in bytes. The contents of |data| will be copied. The connection // will be closed automatically after the response is sent. -func (d *Server) SendHttp200response(connection_id int32, content_type string, data unsafe.Pointer, data_size uint64) { - content_type_ := C.cef_string_userfree_alloc() - setCEFStr(content_type, content_type_) +func (d *Server) SendHTTP200Response(connectionID int32, contentType string, data unsafe.Pointer, dataSize uint64) { + contentType_ := C.cef_string_userfree_alloc() + setCEFStr(contentType, contentType_) defer func() { - C.cef_string_userfree_free(content_type_) + C.cef_string_userfree_free(contentType_) }() - C.gocef_server_send_http200response(d.toNative(), C.int(connection_id), (*C.cef_string_t)(content_type_), data, C.size_t(data_size), d.send_http200response) + C.gocef_server_send_http200response(d.toNative(), C.int(connectionID), (*C.cef_string_t)(contentType_), data, C.size_t(dataSize), d.send_http200response) } -// SendHttp404response (send_http404response) +// SendHTTP404Response (send_http404response) // Send an HTTP 404 "Not Found" response to the connection identified by // |connection_id|. The connection will be closed automatically after the // response is sent. -func (d *Server) SendHttp404response(connection_id int32) { - C.gocef_server_send_http404response(d.toNative(), C.int(connection_id), d.send_http404response) +func (d *Server) SendHTTP404Response(connectionID int32) { + C.gocef_server_send_http404response(d.toNative(), C.int(connectionID), d.send_http404response) } -// SendHttp500response (send_http500response) +// SendHTTP500Response (send_http500response) // Send an HTTP 500 "Internal Server Error" response to the connection // identified by |connection_id|. |error_message| is the associated error // message. The connection will be closed automatically after the response is // sent. -func (d *Server) SendHttp500response(connection_id int32, error_message string) { - error_message_ := C.cef_string_userfree_alloc() - setCEFStr(error_message, error_message_) +func (d *Server) SendHTTP500Response(connectionID int32, errorMessage string) { + errorMessage_ := C.cef_string_userfree_alloc() + setCEFStr(errorMessage, errorMessage_) defer func() { - C.cef_string_userfree_free(error_message_) + C.cef_string_userfree_free(errorMessage_) }() - C.gocef_server_send_http500response(d.toNative(), C.int(connection_id), (*C.cef_string_t)(error_message_), d.send_http500response) + C.gocef_server_send_http500response(d.toNative(), C.int(connectionID), (*C.cef_string_t)(errorMessage_), d.send_http500response) } -// SendHttpResponse (send_http_response) +// SendHTTPResponse (send_http_response) // Send a custom HTTP response to the connection identified by // |connection_id|. |response_code| is the HTTP response code sent in the // status line (e.g. 200), |content_type| is the response content type sent as @@ -134,13 +134,13 @@ func (d *Server) SendHttp500response(connection_id int32, error_message string) // the client will continue reading until the connection is closed. Use the // SendRawData function to send the content, if applicable, and call // CloseConnection after all content has been sent. -func (d *Server) SendHttpResponse(connection_id, response_code int32, content_type string, content_length int64, extra_headers StringMultimap) { - content_type_ := C.cef_string_userfree_alloc() - setCEFStr(content_type, content_type_) +func (d *Server) SendHTTPResponse(connectionID, responseCode int32, contentType string, contentLength int64, extraHeaders StringMultimap) { + contentType_ := C.cef_string_userfree_alloc() + setCEFStr(contentType, contentType_) defer func() { - C.cef_string_userfree_free(content_type_) + C.cef_string_userfree_free(contentType_) }() - C.gocef_server_send_http_response(d.toNative(), C.int(connection_id), C.int(response_code), (*C.cef_string_t)(content_type_), C.int64(content_length), C.cef_string_multimap_t(extra_headers), d.send_http_response) + C.gocef_server_send_http_response(d.toNative(), C.int(connectionID), C.int(responseCode), (*C.cef_string_t)(contentType_), C.int64(contentLength), C.cef_string_multimap_t(extraHeaders), d.send_http_response) } // SendRawData (send_raw_data) @@ -150,15 +150,15 @@ func (d *Server) SendHttpResponse(connection_id, response_code int32, content_ty // internally so the client should be careful to send the amount indicated by // the "Content-Length" header, if specified. See SendHttpResponse // documentation for intended usage. -func (d *Server) SendRawData(connection_id int32, data unsafe.Pointer, data_size uint64) { - C.gocef_server_send_raw_data(d.toNative(), C.int(connection_id), data, C.size_t(data_size), d.send_raw_data) +func (d *Server) SendRawData(connectionID int32, data unsafe.Pointer, dataSize uint64) { + C.gocef_server_send_raw_data(d.toNative(), C.int(connectionID), data, C.size_t(dataSize), d.send_raw_data) } // CloseConnection (close_connection) // Close the connection identified by |connection_id|. See SendHttpResponse // documentation for intended usage. -func (d *Server) CloseConnection(connection_id int32) { - C.gocef_server_close_connection(d.toNative(), C.int(connection_id), d.close_connection) +func (d *Server) CloseConnection(connectionID int32) { + C.gocef_server_close_connection(d.toNative(), C.int(connectionID), d.close_connection) } // SendWebSocketMessage (send_web_socket_message) @@ -166,6 +166,6 @@ func (d *Server) CloseConnection(connection_id int32) { // |data| is the response content and |data_size| is the size of |data| in // bytes. The contents of |data| will be copied. See // cef_server_handler_t::OnWebSocketRequest documentation for intended usage. -func (d *Server) SendWebSocketMessage(connection_id int32, data unsafe.Pointer, data_size uint64) { - C.gocef_server_send_web_socket_message(d.toNative(), C.int(connection_id), data, C.size_t(data_size), d.send_web_socket_message) +func (d *Server) SendWebSocketMessage(connectionID int32, data unsafe.Pointer, dataSize uint64) { + C.gocef_server_send_web_socket_message(d.toNative(), C.int(connectionID), data, C.size_t(dataSize), d.send_web_socket_message) } diff --git a/cef/Settings_gen.go b/cef/Settings_gen.go index 8eaf47e..361c96f 100644 --- a/cef/Settings_gen.go +++ b/cef/Settings_gen.go @@ -228,12 +228,12 @@ type Settings struct { // for individual CefRequestContext instances via the // CefRequestContextSettings.accept_language_list value. AcceptLanguageList string - // ApplicationClientIdForFileScanning (application_client_id_for_file_scanning) + // ApplicationClientIDForFileScanning (application_client_id_for_file_scanning) // GUID string used for identifying the application. This is passed to the // system AV function for scanning downloaded files. By default, the GUID // will be an empty string and the file will be treated as an untrusted // file when the GUID is empty. - ApplicationClientIdForFileScanning string + ApplicationClientIDForFileScanning string } // NewSettings creates a new Settings. @@ -282,7 +282,7 @@ func (d *Settings) toNative(native *C.cef_settings_t) *C.cef_settings_t { native.enable_net_security_expiration = C.int(d.EnableNetSecurityExpiration) native.background_color = C.cef_color_t(d.BackgroundColor) setCEFStr(d.AcceptLanguageList, &native.accept_language_list) - setCEFStr(d.ApplicationClientIdForFileScanning, &native.application_client_id_for_file_scanning) + setCEFStr(d.ApplicationClientIDForFileScanning, &native.application_client_id_for_file_scanning) return native } @@ -325,5 +325,5 @@ func (n *C.cef_settings_t) intoGo(d *Settings) { d.EnableNetSecurityExpiration = int32(n.enable_net_security_expiration) d.BackgroundColor = Color(n.background_color) d.AcceptLanguageList = cefstrToString(&n.accept_language_list) - d.ApplicationClientIdForFileScanning = cefstrToString(&n.application_client_id_for_file_scanning) + d.ApplicationClientIDForFileScanning = cefstrToString(&n.application_client_id_for_file_scanning) } diff --git a/cef/StreamReader_gen.go b/cef/StreamReader_gen.go index 4b8ee04..e91171e 100644 --- a/cef/StreamReader_gen.go +++ b/cef/StreamReader_gen.go @@ -48,9 +48,9 @@ func (d *StreamReader) Tell() int64 { return int64(C.gocef_stream_reader_tell(d.toNative(), d.tell)) } -// Eof (eof) +// EOF (eof) // Return non-zero if at end of file. -func (d *StreamReader) Eof() int32 { +func (d *StreamReader) EOF() int32 { return int32(C.gocef_stream_reader_eof(d.toNative(), d.eof)) } diff --git a/cef/TaskRunner_gen.go b/cef/TaskRunner_gen.go index 9f52bdc..91f7459 100644 --- a/cef/TaskRunner_gen.go +++ b/cef/TaskRunner_gen.go @@ -6,9 +6,9 @@ import ( // #include "capi_gen.h" // int gocef_task_runner_is_same(cef_task_runner_t * self, cef_task_runner_t * that, int (CEF_CALLBACK *callback__)(cef_task_runner_t *, cef_task_runner_t *)) { return callback__(self, that); } // int gocef_task_runner_belongs_to_current_thread(cef_task_runner_t * self, int (CEF_CALLBACK *callback__)(cef_task_runner_t *)) { return callback__(self); } - // int gocef_task_runner_belongs_to_thread(cef_task_runner_t * self, cef_thread_id_t threadId, int (CEF_CALLBACK *callback__)(cef_task_runner_t *, cef_thread_id_t)) { return callback__(self, threadId); } + // int gocef_task_runner_belongs_to_thread(cef_task_runner_t * self, cef_thread_id_t threadID, int (CEF_CALLBACK *callback__)(cef_task_runner_t *, cef_thread_id_t)) { return callback__(self, threadID); } // int gocef_task_runner_post_task(cef_task_runner_t * self, cef_task_t * task, int (CEF_CALLBACK *callback__)(cef_task_runner_t *, cef_task_t *)) { return callback__(self, task); } - // int gocef_task_runner_post_delayed_task(cef_task_runner_t * self, cef_task_t * task, int64 delay_ms, int (CEF_CALLBACK *callback__)(cef_task_runner_t *, cef_task_t *, int64)) { return callback__(self, task, delay_ms); } + // int gocef_task_runner_post_delayed_task(cef_task_runner_t * self, cef_task_t * task, int64 delayMs, int (CEF_CALLBACK *callback__)(cef_task_runner_t *, cef_task_t *, int64)) { return callback__(self, task, delayMs); } "C" ) @@ -47,8 +47,8 @@ func (d *TaskRunner) BelongsToCurrentThread() int32 { // BelongsToThread (belongs_to_thread) // Returns true (1) if this task runner is for the specified CEF thread. -func (d *TaskRunner) BelongsToThread(threadId ThreadID) int32 { - return int32(C.gocef_task_runner_belongs_to_thread(d.toNative(), C.cef_thread_id_t(threadId), d.belongs_to_thread)) +func (d *TaskRunner) BelongsToThread(threadID ThreadID) int32 { + return int32(C.gocef_task_runner_belongs_to_thread(d.toNative(), C.cef_thread_id_t(threadID), d.belongs_to_thread)) } // PostTask (post_task) @@ -63,6 +63,6 @@ func (d *TaskRunner) PostTask(task *Task) int32 { // runner. Execution will occur asynchronously. Delayed tasks are not // supported on V8 WebWorker threads and will be executed without the // specified delay. -func (d *TaskRunner) PostDelayedTask(task *Task, delay_ms int64) int32 { - return int32(C.gocef_task_runner_post_delayed_task(d.toNative(), task.toNative(), C.int64(delay_ms), d.post_delayed_task)) +func (d *TaskRunner) PostDelayedTask(task *Task, delayMs int64) int32 { + return int32(C.gocef_task_runner_post_delayed_task(d.toNative(), task.toNative(), C.int64(delayMs), d.post_delayed_task)) } diff --git a/cef/Textfield_gen.go b/cef/Textfield_gen.go index 44b81c2..fff4613 100644 --- a/cef/Textfield_gen.go +++ b/cef/Textfield_gen.go @@ -4,9 +4,9 @@ package cef import ( // #include "capi_gen.h" - // void gocef_textfield_set_password_input(cef_textfield_t * self, int password_input, void (CEF_CALLBACK *callback__)(cef_textfield_t *, int)) { return callback__(self, password_input); } + // void gocef_textfield_set_password_input(cef_textfield_t * self, int passwordInput, void (CEF_CALLBACK *callback__)(cef_textfield_t *, int)) { return callback__(self, passwordInput); } // int gocef_textfield_is_password_input(cef_textfield_t * self, int (CEF_CALLBACK *callback__)(cef_textfield_t *)) { return callback__(self); } - // void gocef_textfield_set_read_only(cef_textfield_t * self, int read_only, void (CEF_CALLBACK *callback__)(cef_textfield_t *, int)) { return callback__(self, read_only); } + // void gocef_textfield_set_read_only(cef_textfield_t * self, int readOnly, void (CEF_CALLBACK *callback__)(cef_textfield_t *, int)) { return callback__(self, readOnly); } // int gocef_textfield_is_read_only(cef_textfield_t * self, int (CEF_CALLBACK *callback__)(cef_textfield_t *)) { return callback__(self); } // cef_string_userfree_t gocef_textfield_get_text(cef_textfield_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_textfield_t *)) { return callback__(self); } // void gocef_textfield_set_text(cef_textfield_t * self, cef_string_t * text, void (CEF_CALLBACK *callback__)(cef_textfield_t *, cef_string_t *)) { return callback__(self, text); } @@ -25,11 +25,11 @@ import ( // cef_color_t gocef_textfield_get_selection_text_color(cef_textfield_t * self, cef_color_t (CEF_CALLBACK *callback__)(cef_textfield_t *)) { return callback__(self); } // void gocef_textfield_set_selection_background_color(cef_textfield_t * self, cef_color_t color, void (CEF_CALLBACK *callback__)(cef_textfield_t *, cef_color_t)) { return callback__(self, color); } // cef_color_t gocef_textfield_get_selection_background_color(cef_textfield_t * self, cef_color_t (CEF_CALLBACK *callback__)(cef_textfield_t *)) { return callback__(self); } - // void gocef_textfield_set_font_list(cef_textfield_t * self, cef_string_t * font_list, void (CEF_CALLBACK *callback__)(cef_textfield_t *, cef_string_t *)) { return callback__(self, font_list); } + // void gocef_textfield_set_font_list(cef_textfield_t * self, cef_string_t * fontList, void (CEF_CALLBACK *callback__)(cef_textfield_t *, cef_string_t *)) { return callback__(self, fontList); } // void gocef_textfield_apply_text_color(cef_textfield_t * self, cef_color_t color, cef_range_t * range_r, void (CEF_CALLBACK *callback__)(cef_textfield_t *, cef_color_t, cef_range_t *)) { return callback__(self, color, range_r); } // void gocef_textfield_apply_text_style(cef_textfield_t * self, cef_text_style_t style, int add, cef_range_t * range_r, void (CEF_CALLBACK *callback__)(cef_textfield_t *, cef_text_style_t, int, cef_range_t *)) { return callback__(self, style, add, range_r); } - // int gocef_textfield_is_command_enabled(cef_textfield_t * self, int command_id, int (CEF_CALLBACK *callback__)(cef_textfield_t *, int)) { return callback__(self, command_id); } - // void gocef_textfield_execute_command(cef_textfield_t * self, int command_id, void (CEF_CALLBACK *callback__)(cef_textfield_t *, int)) { return callback__(self, command_id); } + // int gocef_textfield_is_command_enabled(cef_textfield_t * self, int commandID, int (CEF_CALLBACK *callback__)(cef_textfield_t *, int)) { return callback__(self, commandID); } + // void gocef_textfield_execute_command(cef_textfield_t * self, int commandID, void (CEF_CALLBACK *callback__)(cef_textfield_t *, int)) { return callback__(self, commandID); } // void gocef_textfield_clear_edit_history(cef_textfield_t * self, void (CEF_CALLBACK *callback__)(cef_textfield_t *)) { return callback__(self); } // void gocef_textfield_set_placeholder_text(cef_textfield_t * self, cef_string_t * text, void (CEF_CALLBACK *callback__)(cef_textfield_t *, cef_string_t *)) { return callback__(self, text); } // cef_string_userfree_t gocef_textfield_get_placeholder_text(cef_textfield_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_textfield_t *)) { return callback__(self); } @@ -56,8 +56,8 @@ func (d *Textfield) Base() *View { // SetPasswordInput (set_password_input) // Sets whether the text will be displayed as asterisks. -func (d *Textfield) SetPasswordInput(password_input int32) { - C.gocef_textfield_set_password_input(d.toNative(), C.int(password_input), d.set_password_input) +func (d *Textfield) SetPasswordInput(passwordInput int32) { + C.gocef_textfield_set_password_input(d.toNative(), C.int(passwordInput), d.set_password_input) } // IsPasswordInput (is_password_input) @@ -68,8 +68,8 @@ func (d *Textfield) IsPasswordInput() int32 { // SetReadOnly (set_read_only) // Sets whether the text will read-only. -func (d *Textfield) SetReadOnly(read_only int32) { - C.gocef_textfield_set_read_only(d.toNative(), C.int(read_only), d.set_read_only) +func (d *Textfield) SetReadOnly(readOnly int32) { + C.gocef_textfield_set_read_only(d.toNative(), C.int(readOnly), d.set_read_only) } // IsReadOnly (is_read_only) @@ -212,13 +212,13 @@ func (d *Textfield) GetSelectionBackgroundColor() Color { // // Here are examples of valid font description strings: - "Arial, Helvetica, // Bold Italic 14px" - "Arial, 14px" -func (d *Textfield) SetFontList(font_list string) { - font_list_ := C.cef_string_userfree_alloc() - setCEFStr(font_list, font_list_) +func (d *Textfield) SetFontList(fontList string) { + fontList_ := C.cef_string_userfree_alloc() + setCEFStr(fontList, fontList_) defer func() { - C.cef_string_userfree_free(font_list_) + C.cef_string_userfree_free(fontList_) }() - C.gocef_textfield_set_font_list(d.toNative(), (*C.cef_string_t)(font_list_), d.set_font_list) + C.gocef_textfield_set_font_list(d.toNative(), (*C.cef_string_t)(fontList_), d.set_font_list) } // ApplyTextColor (apply_text_color) @@ -241,8 +241,8 @@ func (d *Textfield) ApplyTextStyle(style TextStyle, add int32, range_r *Range) { // IsCommandEnabled (is_command_enabled) // Returns true (1) if the action associated with the specified command id is // enabled. See additional comments on execute_command(). -func (d *Textfield) IsCommandEnabled(command_id int32) int32 { - return int32(C.gocef_textfield_is_command_enabled(d.toNative(), C.int(command_id), d.is_command_enabled)) +func (d *Textfield) IsCommandEnabled(commandID int32) int32 { + return int32(C.gocef_textfield_is_command_enabled(d.toNative(), C.int(commandID), d.is_command_enabled)) } // ExecuteCommand (execute_command) @@ -250,8 +250,8 @@ func (d *Textfield) IsCommandEnabled(command_id int32) int32 { // include IDS_APP_UNDO, IDS_APP_REDO, IDS_APP_CUT, IDS_APP_COPY, // IDS_APP_PASTE, IDS_APP_DELETE, IDS_APP_SELECT_ALL, IDS_DELETE_* and // IDS_MOVE_*. See include/cef_pack_strings.h for definitions. -func (d *Textfield) ExecuteCommand(command_id int32) { - C.gocef_textfield_execute_command(d.toNative(), C.int(command_id), d.execute_command) +func (d *Textfield) ExecuteCommand(commandID int32) { + C.gocef_textfield_execute_command(d.toNative(), C.int(commandID), d.execute_command) } // ClearEditHistory (clear_edit_history) diff --git a/cef/TouchEvent_gen.go b/cef/TouchEvent_gen.go index 4c24fc9..cbc650d 100644 --- a/cef/TouchEvent_gen.go +++ b/cef/TouchEvent_gen.go @@ -10,11 +10,11 @@ import ( // TouchEvent (cef_touch_event_t from include/internal/cef_types.h) // Structure representing touch event information. type TouchEvent struct { - // Id (id) + // ID (id) // Id of a touch point. Must be unique per touch, can be any number except -1. // Note that a maximum of 16 concurrent touches will be tracked; touches // beyond that will be ignored. - Id int32 + ID int32 // X (x) // X coordinate relative to the left side of the view. X float32 @@ -58,7 +58,7 @@ func (d *TouchEvent) toNative(native *C.cef_touch_event_t) *C.cef_touch_event_t if d == nil { return nil } - native.id = C.int(d.Id) + native.id = C.int(d.ID) native.x = C.float(d.X) native.y = C.float(d.Y) native.radius_x = C.float(d.RadiusX) @@ -81,7 +81,7 @@ func (n *C.cef_touch_event_t) toGo() *TouchEvent { } func (n *C.cef_touch_event_t) intoGo(d *TouchEvent) { - d.Id = int32(n.id) + d.ID = int32(n.id) d.X = float32(n.x) d.Y = float32(n.y) d.RadiusX = float32(n.radius_x) diff --git a/cef/UrlrequestClient_gen.go b/cef/UrlrequestClient_gen.go index aeaa36c..e631eec 100644 --- a/cef/UrlrequestClient_gen.go +++ b/cef/UrlrequestClient_gen.go @@ -19,7 +19,7 @@ type UrlrequestClientProxy interface { OnRequestComplete(self *UrlrequestClient, request *Urlrequest) OnUploadProgress(self *UrlrequestClient, request *Urlrequest, current, total int64) OnDownloadProgress(self *UrlrequestClient, request *Urlrequest, current, total int64) - OnDownloadData(self *UrlrequestClient, request *Urlrequest, data unsafe.Pointer, data_length uint64) + OnDownloadData(self *UrlrequestClient, request *Urlrequest, data unsafe.Pointer, dataLength uint64) GetAuthCredentials(self *UrlrequestClient, isProxy int32, host string, port int32, realm, scheme string, callback *AuthCallback) int32 } @@ -114,16 +114,16 @@ func gocef_urlrequest_client_on_download_progress(self *C.cef_urlrequest_client_ // Called when some part of the response is read. |data| contains the current // bytes received since the last call. This function will not be called if the // UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. -func (d *UrlrequestClient) OnDownloadData(request *Urlrequest, data unsafe.Pointer, data_length uint64) { - lookupUrlrequestClientProxy(d.Base()).OnDownloadData(d, request, data, data_length) +func (d *UrlrequestClient) OnDownloadData(request *Urlrequest, data unsafe.Pointer, dataLength uint64) { + lookupUrlrequestClientProxy(d.Base()).OnDownloadData(d, request, data, dataLength) } //nolint:gocritic //export gocef_urlrequest_client_on_download_data -func gocef_urlrequest_client_on_download_data(self *C.cef_urlrequest_client_t, request *C.cef_urlrequest_t, data unsafe.Pointer, data_length C.size_t) { +func gocef_urlrequest_client_on_download_data(self *C.cef_urlrequest_client_t, request *C.cef_urlrequest_t, data unsafe.Pointer, dataLength C.size_t) { me__ := (*UrlrequestClient)(self) proxy__ := lookupUrlrequestClientProxy(me__.Base()) - proxy__.OnDownloadData(me__, (*Urlrequest)(request), data, uint64(data_length)) + proxy__.OnDownloadData(me__, (*Urlrequest)(request), data, uint64(dataLength)) } // GetAuthCredentials (get_auth_credentials) diff --git a/cef/V8context_gen.go b/cef/V8context_gen.go index 5b9a184..0f8ede3 100644 --- a/cef/V8context_gen.go +++ b/cef/V8context_gen.go @@ -12,7 +12,7 @@ import ( // int gocef_v8context_enter(cef_v8context_t * self, int (CEF_CALLBACK *callback__)(cef_v8context_t *)) { return callback__(self); } // int gocef_v8context_exit(cef_v8context_t * self, int (CEF_CALLBACK *callback__)(cef_v8context_t *)) { return callback__(self); } // int gocef_v8context_is_same(cef_v8context_t * self, cef_v8context_t * that, int (CEF_CALLBACK *callback__)(cef_v8context_t *, cef_v8context_t *)) { return callback__(self, that); } - // int gocef_v8context_eval(cef_v8context_t * self, cef_string_t * code, cef_string_t * script_url, int start_line, cef_v8value_t ** retval, cef_v8exception_t ** exception, int (CEF_CALLBACK *callback__)(cef_v8context_t *, cef_string_t *, cef_string_t *, int, cef_v8value_t **, cef_v8exception_t **)) { return callback__(self, code, script_url, start_line, retval, exception); } + // int gocef_v8context_eval(cef_v8context_t * self, cef_string_t * code, cef_string_t * scriptURL, int startLine, cef_v8value_t ** retval, cef_v8exception_t ** exception, int (CEF_CALLBACK *callback__)(cef_v8context_t *, cef_string_t *, cef_string_t *, int, cef_v8value_t **, cef_v8exception_t **)) { return callback__(self, code, scriptURL, startLine, retval, exception); } "C" ) @@ -102,18 +102,18 @@ func (d *V8context) IsSame(that *V8context) int32 { // On success |retval| will be set to the return value, if any, and the // function will return true (1). On failure |exception| will be set to the // exception, if any, and the function will return false (0). -func (d *V8context) Eval(code, script_url string, start_line int32, retval **V8value, exception **V8exception) int32 { +func (d *V8context) Eval(code, scriptURL string, startLine int32, retval **V8value, exception **V8exception) int32 { code_ := C.cef_string_userfree_alloc() setCEFStr(code, code_) defer func() { C.cef_string_userfree_free(code_) }() - script_url_ := C.cef_string_userfree_alloc() - setCEFStr(script_url, script_url_) + scriptURL_ := C.cef_string_userfree_alloc() + setCEFStr(scriptURL, scriptURL_) defer func() { - C.cef_string_userfree_free(script_url_) + C.cef_string_userfree_free(scriptURL_) }() retval_ := (*retval).toNative() exception_ := (*exception).toNative() - return int32(C.gocef_v8context_eval(d.toNative(), (*C.cef_string_t)(code_), (*C.cef_string_t)(script_url_), C.int(start_line), &retval_, &exception_, d.eval)) + return int32(C.gocef_v8context_eval(d.toNative(), (*C.cef_string_t)(code_), (*C.cef_string_t)(scriptURL_), C.int(startLine), &retval_, &exception_, d.eval)) } diff --git a/cef/V8stackFrame_gen.go b/cef/V8stackFrame_gen.go index a2f2a57..744530a 100644 --- a/cef/V8stackFrame_gen.go +++ b/cef/V8stackFrame_gen.go @@ -48,12 +48,12 @@ func (d *V8stackFrame) GetScriptName() string { return cefuserfreestrToString(C.gocef_v8stack_frame_get_script_name(d.toNative(), d.get_script_name)) } -// GetScriptNameOrSourceUrl (get_script_name_or_source_url) +// GetScriptNameOrSourceURL (get_script_name_or_source_url) // Returns the name of the resource script that contains the function or the // sourceURL value if the script name is undefined and its source ends with a // "//@ sourceURL=..." string. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *V8stackFrame) GetScriptNameOrSourceUrl() string { +func (d *V8stackFrame) GetScriptNameOrSourceURL() string { return cefuserfreestrToString(C.gocef_v8stack_frame_get_script_name_or_source_url(d.toNative(), d.get_script_name_or_source_url)) } diff --git a/cef/V8value_gen.go b/cef/V8value_gen.go index d28923a..1c0155d 100644 --- a/cef/V8value_gen.go +++ b/cef/V8value_gen.go @@ -40,10 +40,10 @@ import ( // int gocef_v8value_set_value_byindex(cef_v8value_t * self, int index, cef_v8value_t * value, int (CEF_CALLBACK *callback__)(cef_v8value_t *, int, cef_v8value_t *)) { return callback__(self, index, value); } // int gocef_v8value_set_value_byaccessor(cef_v8value_t * self, cef_string_t * key, cef_v8_accesscontrol_t settings, cef_v8_propertyattribute_t attribute, int (CEF_CALLBACK *callback__)(cef_v8value_t *, cef_string_t *, cef_v8_accesscontrol_t, cef_v8_propertyattribute_t)) { return callback__(self, key, settings, attribute); } // int gocef_v8value_get_keys(cef_v8value_t * self, cef_string_list_t keys, int (CEF_CALLBACK *callback__)(cef_v8value_t *, cef_string_list_t)) { return callback__(self, keys); } - // int gocef_v8value_set_user_data(cef_v8value_t * self, cef_base_ref_counted_t * user_data, int (CEF_CALLBACK *callback__)(cef_v8value_t *, cef_base_ref_counted_t *)) { return callback__(self, user_data); } + // int gocef_v8value_set_user_data(cef_v8value_t * self, cef_base_ref_counted_t * userData, int (CEF_CALLBACK *callback__)(cef_v8value_t *, cef_base_ref_counted_t *)) { return callback__(self, userData); } // cef_base_ref_counted_t * gocef_v8value_get_user_data(cef_v8value_t * self, cef_base_ref_counted_t * (CEF_CALLBACK *callback__)(cef_v8value_t *)) { return callback__(self); } // int gocef_v8value_get_externally_allocated_memory(cef_v8value_t * self, int (CEF_CALLBACK *callback__)(cef_v8value_t *)) { return callback__(self); } - // int gocef_v8value_adjust_externally_allocated_memory(cef_v8value_t * self, int change_in_bytes, int (CEF_CALLBACK *callback__)(cef_v8value_t *, int)) { return callback__(self, change_in_bytes); } + // int gocef_v8value_adjust_externally_allocated_memory(cef_v8value_t * self, int changeInBytes, int (CEF_CALLBACK *callback__)(cef_v8value_t *, int)) { return callback__(self, changeInBytes); } // int gocef_v8value_get_array_length(cef_v8value_t * self, int (CEF_CALLBACK *callback__)(cef_v8value_t *)) { return callback__(self); } // cef_v8array_buffer_release_callback_t * gocef_v8value_get_array_buffer_release_callback(cef_v8value_t * self, cef_v8array_buffer_release_callback_t * (CEF_CALLBACK *callback__)(cef_v8value_t *)) { return callback__(self); } // int gocef_v8value_neuter_array_buffer(cef_v8value_t * self, int (CEF_CALLBACK *callback__)(cef_v8value_t *)) { return callback__(self); } @@ -350,8 +350,8 @@ func (d *V8value) GetKeys(keys StringList) int32 { // Sets the user data for this object and returns true (1) on success. Returns // false (0) if this function is called incorrectly. This function can only be // called on user created objects. -func (d *V8value) SetUserData(user_data *BaseRefCounted) int32 { - return int32(C.gocef_v8value_set_user_data(d.toNative(), user_data.toNative(), d.set_user_data)) +func (d *V8value) SetUserData(userData *BaseRefCounted) int32 { + return int32(C.gocef_v8value_set_user_data(d.toNative(), userData.toNative(), d.set_user_data)) } // GetUserData (get_user_data) @@ -377,8 +377,8 @@ func (d *V8value) GetExternallyAllocatedMemory() int32 { // |change_in_bytes| specifies the number of bytes to adjust by. This function // returns the number of bytes associated with the object after the // adjustment. This function can only be called on user created objects. -func (d *V8value) AdjustExternallyAllocatedMemory(change_in_bytes int32) int32 { - return int32(C.gocef_v8value_adjust_externally_allocated_memory(d.toNative(), C.int(change_in_bytes), d.adjust_externally_allocated_memory)) +func (d *V8value) AdjustExternallyAllocatedMemory(changeInBytes int32) int32 { + return int32(C.gocef_v8value_adjust_externally_allocated_memory(d.toNative(), C.int(changeInBytes), d.adjust_externally_allocated_memory)) } // GetArrayLength (get_array_length) diff --git a/cef/View_gen.go b/cef/View_gen.go index 775e06d..df17962 100644 --- a/cef/View_gen.go +++ b/cef/View_gen.go @@ -10,18 +10,18 @@ import ( // cef_scroll_view_t * gocef_view_as_scroll_view(cef_view_t * self, cef_scroll_view_t * (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } // cef_textfield_t * gocef_view_as_textfield(cef_view_t * self, cef_textfield_t * (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } // cef_string_userfree_t gocef_view_get_type_string(cef_view_t * self, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } - // cef_string_userfree_t gocef_view_to_string(cef_view_t * self, int include_children, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_view_t *, int)) { return callback__(self, include_children); } + // cef_string_userfree_t gocef_view_to_string(cef_view_t * self, int includeChildren, cef_string_userfree_t (CEF_CALLBACK *callback__)(cef_view_t *, int)) { return callback__(self, includeChildren); } // int gocef_view_is_valid(cef_view_t * self, int (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } // int gocef_view_is_attached(cef_view_t * self, int (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } // int gocef_view_is_same(cef_view_t * self, cef_view_t * that, int (CEF_CALLBACK *callback__)(cef_view_t *, cef_view_t *)) { return callback__(self, that); } // cef_view_delegate_t * gocef_view_get_delegate(cef_view_t * self, cef_view_delegate_t * (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } // cef_window_t * gocef_view_get_window(cef_view_t * self, cef_window_t * (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } // int gocef_view_get_id(cef_view_t * self, int (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } - // void gocef_view_set_id(cef_view_t * self, int id, void (CEF_CALLBACK *callback__)(cef_view_t *, int)) { return callback__(self, id); } + // void gocef_view_set_id(cef_view_t * self, int iD, void (CEF_CALLBACK *callback__)(cef_view_t *, int)) { return callback__(self, iD); } // int gocef_view_get_group_id(cef_view_t * self, int (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } - // void gocef_view_set_group_id(cef_view_t * self, int group_id, void (CEF_CALLBACK *callback__)(cef_view_t *, int)) { return callback__(self, group_id); } + // void gocef_view_set_group_id(cef_view_t * self, int groupID, void (CEF_CALLBACK *callback__)(cef_view_t *, int)) { return callback__(self, groupID); } // cef_view_t * gocef_view_get_parent_view(cef_view_t * self, cef_view_t * (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } - // cef_view_t * gocef_view_get_view_for_id(cef_view_t * self, int id, cef_view_t * (CEF_CALLBACK *callback__)(cef_view_t *, int)) { return callback__(self, id); } + // cef_view_t * gocef_view_get_view_for_id(cef_view_t * self, int iD, cef_view_t * (CEF_CALLBACK *callback__)(cef_view_t *, int)) { return callback__(self, iD); } // void gocef_view_set_bounds(cef_view_t * self, cef_rect_t * bounds, void (CEF_CALLBACK *callback__)(cef_view_t *, cef_rect_t *)) { return callback__(self, bounds); } // cef_rect_t gocef_view_get_bounds(cef_view_t * self, cef_rect_t (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } // cef_rect_t gocef_view_get_bounds_in_screen(cef_view_t * self, cef_rect_t (CEF_CALLBACK *callback__)(cef_view_t *)) { return callback__(self); } @@ -116,8 +116,8 @@ func (d *View) GetTypeString() string { // (1) any child Views will also be included. Used primarily for testing // purposes. // The resulting string must be freed by calling cef_string_userfree_free(). -func (d *View) ToString(include_children int32) string { - return cefuserfreestrToString(C.gocef_view_to_string(d.toNative(), C.int(include_children), d.to_string)) +func (d *View) ToString(includeChildren int32) string { + return cefuserfreestrToString(C.gocef_view_to_string(d.toNative(), C.int(includeChildren), d.to_string)) } // IsValid (is_valid) @@ -151,31 +151,31 @@ func (d *View) GetWindow() *Window { return (*Window)(C.gocef_view_get_window(d.toNative(), d.get_window)) } -// GetId (get_id) +// GetID (get_id) // Returns the ID for this View. -func (d *View) GetId() int32 { +func (d *View) GetID() int32 { return int32(C.gocef_view_get_id(d.toNative(), d.get_id)) } -// SetId (set_id) +// SetID (set_id) // Sets the ID for this View. ID should be unique within the subtree that you // intend to search for it. 0 is the default ID for views. -func (d *View) SetId(id int32) { - C.gocef_view_set_id(d.toNative(), C.int(id), d.set_id) +func (d *View) SetID(iD int32) { + C.gocef_view_set_id(d.toNative(), C.int(iD), d.set_id) } -// GetGroupId (get_group_id) +// GetGroupID (get_group_id) // Returns the group id of this View, or -1 if not set. -func (d *View) GetGroupId() int32 { +func (d *View) GetGroupID() int32 { return int32(C.gocef_view_get_group_id(d.toNative(), d.get_group_id)) } -// SetGroupId (set_group_id) +// SetGroupID (set_group_id) // A group id is used to tag Views which are part of the same logical group. // Focus can be moved between views with the same group using the arrow keys. // The group id is immutable once it's set. -func (d *View) SetGroupId(group_id int32) { - C.gocef_view_set_group_id(d.toNative(), C.int(group_id), d.set_group_id) +func (d *View) SetGroupID(groupID int32) { + C.gocef_view_set_group_id(d.toNative(), C.int(groupID), d.set_group_id) } // GetParentView (get_parent_view) @@ -184,12 +184,12 @@ func (d *View) GetParentView() *View { return (*View)(C.gocef_view_get_parent_view(d.toNative(), d.get_parent_view)) } -// GetViewForId (get_view_for_id) +// GetViewForID (get_view_for_id) // Recursively descends the view tree starting at this View, and returns the // first child that it encounters with the given ID. Returns NULL if no // matching child view is found. -func (d *View) GetViewForId(id int32) *View { - return (*View)(C.gocef_view_get_view_for_id(d.toNative(), C.int(id), d.get_view_for_id)) +func (d *View) GetViewForID(iD int32) *View { + return (*View)(C.gocef_view_get_view_for_id(d.toNative(), C.int(iD), d.get_view_for_id)) } // SetBounds (set_bounds) diff --git a/cef/WaitableEvent_gen.go b/cef/WaitableEvent_gen.go index 2574351..7dfd96e 100644 --- a/cef/WaitableEvent_gen.go +++ b/cef/WaitableEvent_gen.go @@ -8,7 +8,7 @@ import ( // void gocef_waitable_event_signal(cef_waitable_event_t * self, void (CEF_CALLBACK *callback__)(cef_waitable_event_t *)) { return callback__(self); } // int gocef_waitable_event_is_signaled(cef_waitable_event_t * self, int (CEF_CALLBACK *callback__)(cef_waitable_event_t *)) { return callback__(self); } // void gocef_waitable_event_wait(cef_waitable_event_t * self, void (CEF_CALLBACK *callback__)(cef_waitable_event_t *)) { return callback__(self); } - // int gocef_waitable_event_timed_wait(cef_waitable_event_t * self, int64 max_ms, int (CEF_CALLBACK *callback__)(cef_waitable_event_t *, int64)) { return callback__(self, max_ms); } + // int gocef_waitable_event_timed_wait(cef_waitable_event_t * self, int64 maxMs, int (CEF_CALLBACK *callback__)(cef_waitable_event_t *, int64)) { return callback__(self, maxMs); } "C" ) @@ -69,6 +69,6 @@ func (d *WaitableEvent) Wait() { // necessarily mean that |max_ms| was exceeded. This function will not return // until after the call to signal() has completed. This function cannot be // called on the browser process UI or IO threads. -func (d *WaitableEvent) TimedWait(max_ms int64) int32 { - return int32(C.gocef_waitable_event_timed_wait(d.toNative(), C.int64(max_ms), d.timed_wait)) +func (d *WaitableEvent) TimedWait(maxMs int64) int32 { + return int32(C.gocef_waitable_event_timed_wait(d.toNative(), C.int64(maxMs), d.timed_wait)) } diff --git a/cef/WindowDelegate_gen.go b/cef/WindowDelegate_gen.go index 0a992d3..ac82b95 100644 --- a/cef/WindowDelegate_gen.go +++ b/cef/WindowDelegate_gen.go @@ -18,13 +18,13 @@ import ( type WindowDelegateProxy interface { OnWindowCreated(self *WindowDelegate, window *Window) OnWindowDestroyed(self *WindowDelegate, window *Window) - GetParentWindow(self *WindowDelegate, window *Window, is_menu, can_activate_menu *int32) *Window + GetParentWindow(self *WindowDelegate, window *Window, isMenu, canActivateMenu *int32) *Window IsFrameless(self *WindowDelegate, window *Window) int32 CanResize(self *WindowDelegate, window *Window) int32 CanMaximize(self *WindowDelegate, window *Window) int32 CanMinimize(self *WindowDelegate, window *Window) int32 CanClose(self *WindowDelegate, window *Window) int32 - OnAccelerator(self *WindowDelegate, window *Window, command_id int32) int32 + OnAccelerator(self *WindowDelegate, window *Window, commandID int32) int32 OnKeyEvent(self *WindowDelegate, window *Window, event *KeyEvent) int32 } @@ -103,16 +103,16 @@ func gocef_window_delegate_on_window_destroyed(self *C.cef_window_delegate_t, wi // not be clipped to the parent window bounds. Set |can_activate_menu| to // false (0) if |is_menu| is true (1) and |window| should not be activated // (given keyboard focus) when displayed. -func (d *WindowDelegate) GetParentWindow(window *Window, is_menu, can_activate_menu *int32) *Window { - return lookupWindowDelegateProxy(d.Base().Base.Base()).GetParentWindow(d, window, is_menu, can_activate_menu) +func (d *WindowDelegate) GetParentWindow(window *Window, isMenu, canActivateMenu *int32) *Window { + return lookupWindowDelegateProxy(d.Base().Base.Base()).GetParentWindow(d, window, isMenu, canActivateMenu) } //nolint:gocritic //export gocef_window_delegate_get_parent_window -func gocef_window_delegate_get_parent_window(self *C.cef_window_delegate_t, window *C.cef_window_t, is_menu *C.int, can_activate_menu *C.int) *C.cef_window_t { +func gocef_window_delegate_get_parent_window(self *C.cef_window_delegate_t, window *C.cef_window_t, isMenu *C.int, canActivateMenu *C.int) *C.cef_window_t { me__ := (*WindowDelegate)(self) proxy__ := lookupWindowDelegateProxy(me__.Base().Base.Base()) - return (proxy__.GetParentWindow(me__, (*Window)(window), (*int32)(is_menu), (*int32)(can_activate_menu))).toNative() + return (proxy__.GetParentWindow(me__, (*Window)(window), (*int32)(isMenu), (*int32)(canActivateMenu))).toNative() } // IsFrameless (is_frameless) @@ -192,16 +192,16 @@ func gocef_window_delegate_can_close(self *C.cef_window_delegate_t, window *C.ce // Called when a keyboard accelerator registered with // cef_window_t::SetAccelerator is triggered. Return true (1) if the // accelerator was handled or false (0) otherwise. -func (d *WindowDelegate) OnAccelerator(window *Window, command_id int32) int32 { - return lookupWindowDelegateProxy(d.Base().Base.Base()).OnAccelerator(d, window, command_id) +func (d *WindowDelegate) OnAccelerator(window *Window, commandID int32) int32 { + return lookupWindowDelegateProxy(d.Base().Base.Base()).OnAccelerator(d, window, commandID) } //nolint:gocritic //export gocef_window_delegate_on_accelerator -func gocef_window_delegate_on_accelerator(self *C.cef_window_delegate_t, window *C.cef_window_t, command_id C.int) C.int { +func gocef_window_delegate_on_accelerator(self *C.cef_window_delegate_t, window *C.cef_window_t, commandID C.int) C.int { me__ := (*WindowDelegate)(self) proxy__ := lookupWindowDelegateProxy(me__.Base().Base.Base()) - return C.int(proxy__.OnAccelerator(me__, (*Window)(window), int32(command_id))) + return C.int(proxy__.OnAccelerator(me__, (*Window)(window), int32(commandID))) } // OnKeyEvent (on_key_event) diff --git a/cef/Window_gen.go b/cef/Window_gen.go index 8a02ea5..c6b111d 100644 --- a/cef/Window_gen.go +++ b/cef/Window_gen.go @@ -15,7 +15,7 @@ import ( // void gocef_window_deactivate(cef_window_t * self, void (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } // int gocef_window_is_active(cef_window_t * self, int (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } // void gocef_window_bring_to_top(cef_window_t * self, void (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } - // void gocef_window_set_always_on_top(cef_window_t * self, int on_top, void (CEF_CALLBACK *callback__)(cef_window_t *, int)) { return callback__(self, on_top); } + // void gocef_window_set_always_on_top(cef_window_t * self, int onTop, void (CEF_CALLBACK *callback__)(cef_window_t *, int)) { return callback__(self, onTop); } // int gocef_window_is_always_on_top(cef_window_t * self, int (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } // void gocef_window_maximize(cef_window_t * self, void (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } // void gocef_window_minimize(cef_window_t * self, void (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } @@ -30,17 +30,17 @@ import ( // cef_image_t * gocef_window_get_window_icon(cef_window_t * self, cef_image_t * (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } // void gocef_window_set_window_app_icon(cef_window_t * self, cef_image_t * image, void (CEF_CALLBACK *callback__)(cef_window_t *, cef_image_t *)) { return callback__(self, image); } // cef_image_t * gocef_window_get_window_app_icon(cef_window_t * self, cef_image_t * (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } - // void gocef_window_show_menu(cef_window_t * self, cef_menu_model_t * menu_model, cef_point_t * screen_point, cef_menu_anchor_position_t anchor_position, void (CEF_CALLBACK *callback__)(cef_window_t *, cef_menu_model_t *, cef_point_t *, cef_menu_anchor_position_t)) { return callback__(self, menu_model, screen_point, anchor_position); } + // void gocef_window_show_menu(cef_window_t * self, cef_menu_model_t * menuModel, cef_point_t * screenPoint, cef_menu_anchor_position_t anchorPosition, void (CEF_CALLBACK *callback__)(cef_window_t *, cef_menu_model_t *, cef_point_t *, cef_menu_anchor_position_t)) { return callback__(self, menuModel, screenPoint, anchorPosition); } // void gocef_window_cancel_menu(cef_window_t * self, void (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } // cef_display_t * gocef_window_get_display(cef_window_t * self, cef_display_t * (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } // cef_rect_t gocef_window_get_client_area_bounds_in_screen(cef_window_t * self, cef_rect_t (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } // void gocef_window_set_draggable_regions(cef_window_t * self, size_t regionsCount, cef_draggable_region_t * regions, void (CEF_CALLBACK *callback__)(cef_window_t *, size_t, cef_draggable_region_t *)) { return callback__(self, regionsCount, regions); } // void * gocef_window_get_window_handle(cef_window_t * self, void * (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } - // void gocef_window_send_key_press(cef_window_t * self, int key_code, uint32 event_flags, void (CEF_CALLBACK *callback__)(cef_window_t *, int, uint32)) { return callback__(self, key_code, event_flags); } - // void gocef_window_send_mouse_move(cef_window_t * self, int screen_x, int screen_y, void (CEF_CALLBACK *callback__)(cef_window_t *, int, int)) { return callback__(self, screen_x, screen_y); } - // void gocef_window_send_mouse_events(cef_window_t * self, cef_mouse_button_type_t button, int mouse_down, int mouse_up, void (CEF_CALLBACK *callback__)(cef_window_t *, cef_mouse_button_type_t, int, int)) { return callback__(self, button, mouse_down, mouse_up); } - // void gocef_window_set_accelerator(cef_window_t * self, int command_id, int key_code, int shift_pressed, int ctrl_pressed, int alt_pressed, void (CEF_CALLBACK *callback__)(cef_window_t *, int, int, int, int, int)) { return callback__(self, command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed); } - // void gocef_window_remove_accelerator(cef_window_t * self, int command_id, void (CEF_CALLBACK *callback__)(cef_window_t *, int)) { return callback__(self, command_id); } + // void gocef_window_send_key_press(cef_window_t * self, int keyCode, uint32 eventFlags, void (CEF_CALLBACK *callback__)(cef_window_t *, int, uint32)) { return callback__(self, keyCode, eventFlags); } + // void gocef_window_send_mouse_move(cef_window_t * self, int screenX, int screenY, void (CEF_CALLBACK *callback__)(cef_window_t *, int, int)) { return callback__(self, screenX, screenY); } + // void gocef_window_send_mouse_events(cef_window_t * self, cef_mouse_button_type_t button, int mouseDown, int mouseUp, void (CEF_CALLBACK *callback__)(cef_window_t *, cef_mouse_button_type_t, int, int)) { return callback__(self, button, mouseDown, mouseUp); } + // void gocef_window_set_accelerator(cef_window_t * self, int commandID, int keyCode, int shiftPressed, int ctrlPressed, int altPressed, void (CEF_CALLBACK *callback__)(cef_window_t *, int, int, int, int, int)) { return callback__(self, commandID, keyCode, shiftPressed, ctrlPressed, altPressed); } + // void gocef_window_remove_accelerator(cef_window_t * self, int commandID, void (CEF_CALLBACK *callback__)(cef_window_t *, int)) { return callback__(self, commandID); } // void gocef_window_remove_all_accelerators(cef_window_t * self, void (CEF_CALLBACK *callback__)(cef_window_t *)) { return callback__(self); } "C" ) @@ -120,8 +120,8 @@ func (d *Window) BringToTop() { // SetAlwaysOnTop (set_always_on_top) // Set the Window to be on top of other Windows in the Windowing system. -func (d *Window) SetAlwaysOnTop(on_top int32) { - C.gocef_window_set_always_on_top(d.toNative(), C.int(on_top), d.set_always_on_top) +func (d *Window) SetAlwaysOnTop(onTop int32) { + C.gocef_window_set_always_on_top(d.toNative(), C.int(onTop), d.set_always_on_top) } // IsAlwaysOnTop (is_always_on_top) @@ -223,8 +223,8 @@ func (d *Window) GetWindowAppIcon() *Image { // Show a menu with contents |menu_model|. |screen_point| specifies the menu // position in screen coordinates. |anchor_position| specifies how the menu // will be anchored relative to |screen_point|. -func (d *Window) ShowMenu(menu_model *MenuModel, screen_point *Point, anchor_position MenuAnchorPosition) { - C.gocef_window_show_menu(d.toNative(), menu_model.toNative(), screen_point.toNative(&C.cef_point_t{}), C.cef_menu_anchor_position_t(anchor_position), d.show_menu) +func (d *Window) ShowMenu(menuModel *MenuModel, screenPoint *Point, anchorPosition MenuAnchorPosition) { + C.gocef_window_show_menu(d.toNative(), menuModel.toNative(), screenPoint.toNative(&C.cef_point_t{}), C.cef_menu_anchor_position_t(anchorPosition), d.show_menu) } // CancelMenu (cancel_menu) @@ -271,16 +271,16 @@ func (d *Window) GetWindowHandle() unsafe.Pointer { // |event_flags| is some combination of EVENTFLAG_SHIFT_DOWN, // EVENTFLAG_CONTROL_DOWN and/or EVENTFLAG_ALT_DOWN. This function is exposed // primarily for testing purposes. -func (d *Window) SendKeyPress(key_code int32, event_flags uint32) { - C.gocef_window_send_key_press(d.toNative(), C.int(key_code), C.uint32(event_flags), d.send_key_press) +func (d *Window) SendKeyPress(keyCode int32, eventFlags uint32) { + C.gocef_window_send_key_press(d.toNative(), C.int(keyCode), C.uint32(eventFlags), d.send_key_press) } // SendMouseMove (send_mouse_move) // Simulate a mouse move. The mouse cursor will be moved to the specified // (screen_x, screen_y) position. This function is exposed primarily for // testing purposes. -func (d *Window) SendMouseMove(screen_x, screen_y int32) { - C.gocef_window_send_mouse_move(d.toNative(), C.int(screen_x), C.int(screen_y), d.send_mouse_move) +func (d *Window) SendMouseMove(screenX, screenY int32) { + C.gocef_window_send_mouse_move(d.toNative(), C.int(screenX), C.int(screenY), d.send_mouse_move) } // SendMouseEvents (send_mouse_events) @@ -291,8 +291,8 @@ func (d *Window) SendMouseMove(screen_x, screen_y int32) { // clicking the mouse button). The events will be sent using the current // cursor position so make sure to call send_mouse_move() first to position // the mouse. This function is exposed primarily for testing purposes. -func (d *Window) SendMouseEvents(button MouseButtonType, mouse_down, mouse_up int32) { - C.gocef_window_send_mouse_events(d.toNative(), C.cef_mouse_button_type_t(button), C.int(mouse_down), C.int(mouse_up), d.send_mouse_events) +func (d *Window) SendMouseEvents(button MouseButtonType, mouseDown, mouseUp int32) { + C.gocef_window_send_mouse_events(d.toNative(), C.cef_mouse_button_type_t(button), C.int(mouseDown), C.int(mouseUp), d.send_mouse_events) } // SetAccelerator (set_accelerator) @@ -300,14 +300,14 @@ func (d *Window) SendMouseEvents(button MouseButtonType, mouse_down, mouse_up in // be any virtual key or character value. cef_window_delegate_t::OnAccelerator // will be called if the keyboard combination is triggered while this window // has focus. -func (d *Window) SetAccelerator(command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed int32) { - C.gocef_window_set_accelerator(d.toNative(), C.int(command_id), C.int(key_code), C.int(shift_pressed), C.int(ctrl_pressed), C.int(alt_pressed), d.set_accelerator) +func (d *Window) SetAccelerator(commandID, keyCode, shiftPressed, ctrlPressed, altPressed int32) { + C.gocef_window_set_accelerator(d.toNative(), C.int(commandID), C.int(keyCode), C.int(shiftPressed), C.int(ctrlPressed), C.int(altPressed), d.set_accelerator) } // RemoveAccelerator (remove_accelerator) // Remove the keyboard accelerator for the specified |command_id|. -func (d *Window) RemoveAccelerator(command_id int32) { - C.gocef_window_remove_accelerator(d.toNative(), C.int(command_id), d.remove_accelerator) +func (d *Window) RemoveAccelerator(commandID int32) { + C.gocef_window_remove_accelerator(d.toNative(), C.int(commandID), d.remove_accelerator) } // RemoveAllAccelerators (remove_all_accelerators) diff --git a/cef/enums_gen.go b/cef/enums_gen.go index cb2ae38..e3e820b 100644 --- a/cef/enums_gen.go +++ b/cef/enums_gen.go @@ -525,7 +525,7 @@ const ( ErrUploadStreamRewindNotSupported Errorcode = 25 // ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED ErrContextShutDown Errorcode = 26 // ERR_CONTEXT_SHUT_DOWN ErrBlockedByResponse Errorcode = 27 // ERR_BLOCKED_BY_RESPONSE - ErrBlockedByXssAuditor Errorcode = 28 // ERR_BLOCKED_BY_XSS_AUDITOR + ErrBlockedByXSSAuditor Errorcode = 28 // ERR_BLOCKED_BY_XSS_AUDITOR ErrCleartextNotPermitted Errorcode = 29 // ERR_CLEARTEXT_NOT_PERMITTED ErrConnectionClosed Errorcode = 30 // ERR_CONNECTION_CLOSED ErrConnectionReset Errorcode = 31 // ERR_CONNECTION_RESET @@ -565,7 +565,7 @@ const ( ErrNameResolutionFailed Errorcode = 65 // ERR_NAME_RESOLUTION_FAILED ErrNetworkAccessDenied Errorcode = 66 // ERR_NETWORK_ACCESS_DENIED ErrTemporarilyThrottled Errorcode = 67 // ERR_TEMPORARILY_THROTTLED - ErrHttpsProxyTunnelResponseRedirect Errorcode = 68 // ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT + ErrHTTPSProxyTunnelResponseRedirect Errorcode = 68 // ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT ErrSSLClientAuthSignatureFailed Errorcode = 69 // ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED ErrMsgTooBig Errorcode = 70 // ERR_MSG_TOO_BIG ErrWsProtocolError Errorcode = 71 // ERR_WS_PROTOCOL_ERROR @@ -597,7 +597,7 @@ const ( ErrSSLClientAuthNoCommonAlgorithms Errorcode = 97 // ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS ErrEarlyDataRejected Errorcode = 98 // ERR_EARLY_DATA_REJECTED ErrWrongVersionOnEarlyData Errorcode = 99 // ERR_WRONG_VERSION_ON_EARLY_DATA - ErrTls13DowngradeDetected Errorcode = 100 // ERR_TLS13_DOWNGRADE_DETECTED + ErrTLS13DowngradeDetected Errorcode = 100 // ERR_TLS13_DOWNGRADE_DETECTED ErrSSLKeyUsageIncompatible Errorcode = 101 // ERR_SSL_KEY_USAGE_INCOMPATIBLE ErrCertCommonNameInvalid Errorcode = 102 // ERR_CERT_COMMON_NAME_INVALID ErrCertDateInvalid Errorcode = 103 // ERR_CERT_DATE_INVALID @@ -714,14 +714,14 @@ const ( ErrPrivateKeyExportFailed Errorcode = 214 // ERR_PRIVATE_KEY_EXPORT_FAILED ErrSelfSignedCertGenerationFailed Errorcode = 215 // ERR_SELF_SIGNED_CERT_GENERATION_FAILED ErrCertDatabaseChanged Errorcode = 216 // ERR_CERT_DATABASE_CHANGED - ErrDnsMalformedResponse Errorcode = 217 // ERR_DNS_MALFORMED_RESPONSE - ErrDnsServerRequiresTcp Errorcode = 218 // ERR_DNS_SERVER_REQUIRES_TCP - ErrDnsServerFailed Errorcode = 219 // ERR_DNS_SERVER_FAILED - ErrDnsTimedOut Errorcode = 220 // ERR_DNS_TIMED_OUT - ErrDnsCacheMiss Errorcode = 221 // ERR_DNS_CACHE_MISS - ErrDnsSearchEmpty Errorcode = 222 // ERR_DNS_SEARCH_EMPTY - ErrDnsSortError Errorcode = 223 // ERR_DNS_SORT_ERROR - ErrDnsHTTPFailed Errorcode = 224 // ERR_DNS_HTTP_FAILED + ErrDNSMalformedResponse Errorcode = 217 // ERR_DNS_MALFORMED_RESPONSE + ErrDNSServerRequiresTCP Errorcode = 218 // ERR_DNS_SERVER_REQUIRES_TCP + ErrDNSServerFailed Errorcode = 219 // ERR_DNS_SERVER_FAILED + ErrDNSTimedOut Errorcode = 220 // ERR_DNS_TIMED_OUT + ErrDNSCacheMiss Errorcode = 221 // ERR_DNS_CACHE_MISS + ErrDNSSearchEmpty Errorcode = 222 // ERR_DNS_SEARCH_EMPTY + ErrDNSSortError Errorcode = 223 // ERR_DNS_SORT_ERROR + ErrDNSHTTPFailed Errorcode = 224 // ERR_DNS_HTTP_FAILED ) // EventFlags (cef_event_flags_t from include/internal/cef_types.h) @@ -1795,9 +1795,9 @@ type XMLEncodingType int // Possible values for XMLEncodingType const ( XMLEncodingNone XMLEncodingType = 0 // XML_ENCODING_NONE - XMLEncodingUtf8 XMLEncodingType = 1 // XML_ENCODING_UTF8 - XMLEncodingUtf16le XMLEncodingType = 2 // XML_ENCODING_UTF16LE - XMLEncodingUtf16be XMLEncodingType = 3 // XML_ENCODING_UTF16BE + XMLEncodingUTF8 XMLEncodingType = 1 // XML_ENCODING_UTF8 + XMLEncodingUTF16LE XMLEncodingType = 2 // XML_ENCODING_UTF16LE + XMLEncodingUTF16BE XMLEncodingType = 3 // XML_ENCODING_UTF16BE XMLEncodingASCII XMLEncodingType = 4 // XML_ENCODING_ASCII ) diff --git a/cef/functions_gen.go b/cef/functions_gen.go index 9145e12..24d6661 100644 --- a/cef/functions_gen.go +++ b/cef/functions_gen.go @@ -44,30 +44,30 @@ import ( // // This function may be called on any thread. Returns false (0) if // |source_origin| is invalid or the whitelist cannot be accessed. -func AddCrossOriginWhitelistEntry(source_origin, target_protocol, target_domain string, allow_target_subdomains int32) int32 { - source_origin_ := C.cef_string_userfree_alloc() - setCEFStr(source_origin, source_origin_) +func AddCrossOriginWhitelistEntry(sourceOrigin, targetProtocol, targetDomain string, allowTargetSubdomains int32) int32 { + sourceOrigin_ := C.cef_string_userfree_alloc() + setCEFStr(sourceOrigin, sourceOrigin_) defer func() { - C.cef_string_userfree_free(source_origin_) + C.cef_string_userfree_free(sourceOrigin_) }() - target_protocol_ := C.cef_string_userfree_alloc() - setCEFStr(target_protocol, target_protocol_) + targetProtocol_ := C.cef_string_userfree_alloc() + setCEFStr(targetProtocol, targetProtocol_) defer func() { - C.cef_string_userfree_free(target_protocol_) + C.cef_string_userfree_free(targetProtocol_) }() - target_domain_ := C.cef_string_userfree_alloc() - setCEFStr(target_domain, target_domain_) + targetDomain_ := C.cef_string_userfree_alloc() + setCEFStr(targetDomain, targetDomain_) defer func() { - C.cef_string_userfree_free(target_domain_) + C.cef_string_userfree_free(targetDomain_) }() - return int32(C.cef_add_cross_origin_whitelist_entry((*C.cef_string_t)(source_origin_), (*C.cef_string_t)(target_protocol_), (*C.cef_string_t)(target_domain_), C.int(allow_target_subdomains))) + return int32(C.cef_add_cross_origin_whitelist_entry((*C.cef_string_t)(sourceOrigin_), (*C.cef_string_t)(targetProtocol_), (*C.cef_string_t)(targetDomain_), C.int(allowTargetSubdomains))) } // BinaryValueCreate (cef_binary_value_create from include/capi/cef_values_capi.h) // Creates a new object that is not owned by any other object. The specified // |data| will be copied. -func BinaryValueCreate(data unsafe.Pointer, data_size uint64) *BinaryValue { - return (*BinaryValue)(C.cef_binary_value_create(data, C.size_t(data_size))) +func BinaryValueCreate(data unsafe.Pointer, dataSize uint64) *BinaryValue { + return (*BinaryValue)(C.cef_binary_value_create(data, C.size_t(dataSize))) } // BrowserHostCreateBrowser (cef_browser_host_create_browser from include/capi/cef_browser_capi.h) @@ -79,13 +79,13 @@ func BinaryValueCreate(data unsafe.Pointer, data_size uint64) *BinaryValue { // opportunity to specify extra information specific to the created browser that // will be passed to cef_render_process_handler_t::on_browser_created() in the // render process. -func BrowserHostCreateBrowser(windowInfo *WindowInfo, client *Client, url string, settings *BrowserSettings, extra_info *DictionaryValue, request_context *RequestContext) int32 { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func BrowserHostCreateBrowser(windowInfo *WindowInfo, client *Client, uRL string, settings *BrowserSettings, extraInfo *DictionaryValue, requestContext *RequestContext) int32 { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - return int32(C.cef_browser_host_create_browser(windowInfo.toNative(&C.cef_window_info_t{}), client.toNative(), (*C.cef_string_t)(url_), settings.toNative(&C.cef_browser_settings_t{}), extra_info.toNative(), request_context.toNative())) + return int32(C.cef_browser_host_create_browser(windowInfo.toNative(&C.cef_window_info_t{}), client.toNative(), (*C.cef_string_t)(uRL_), settings.toNative(&C.cef_browser_settings_t{}), extraInfo.toNative(), requestContext.toNative())) } // BrowserHostCreateBrowserSync (cef_browser_host_create_browser_sync from include/capi/cef_browser_capi.h) @@ -95,13 +95,13 @@ func BrowserHostCreateBrowser(windowInfo *WindowInfo, client *Client, url string // optional |extra_info| parameter provides an opportunity to specify extra // information specific to the created browser that will be passed to // cef_render_process_handler_t::on_browser_created() in the render process. -func BrowserHostCreateBrowserSync(windowInfo *WindowInfo, client *Client, url string, settings *BrowserSettings, extra_info *DictionaryValue, request_context *RequestContext) *Browser { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func BrowserHostCreateBrowserSync(windowInfo *WindowInfo, client *Client, uRL string, settings *BrowserSettings, extraInfo *DictionaryValue, requestContext *RequestContext) *Browser { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() - return (*Browser)(C.cef_browser_host_create_browser_sync(windowInfo.toNative(&C.cef_window_info_t{}), client.toNative(), (*C.cef_string_t)(url_), settings.toNative(&C.cef_browser_settings_t{}), extra_info.toNative(), request_context.toNative())) + return (*Browser)(C.cef_browser_host_create_browser_sync(windowInfo.toNative(&C.cef_window_info_t{}), client.toNative(), (*C.cef_string_t)(uRL_), settings.toNative(&C.cef_browser_settings_t{}), extraInfo.toNative(), requestContext.toNative())) } // BrowserViewCreate (cef_browser_view_create from include/capi/views/cef_browser_view_capi.h) @@ -110,17 +110,17 @@ func BrowserHostCreateBrowserSync(windowInfo *WindowInfo, client *Client, url st // parameter provides an opportunity to specify extra information specific to // the created browser that will be passed to // cef_render_process_handler_t::on_browser_created() in the render process. -func BrowserViewCreate(client *Client, url string, settings *BrowserSettings, extra_info *DictionaryValue, request_context *RequestContext, delegate *BrowserViewDelegate) *BrowserView { - url_ := C.cef_string_userfree_alloc() - setCEFStr(url, url_) +func BrowserViewCreate(client *Client, uRL string, settings *BrowserSettings, extraInfo *DictionaryValue, requestContext *RequestContext, delegate *BrowserViewDelegate) *BrowserView { + uRL_ := C.cef_string_userfree_alloc() + setCEFStr(uRL, uRL_) defer func() { - C.cef_string_userfree_free(url_) + C.cef_string_userfree_free(uRL_) }() var delegate_ *C.cef_browser_view_delegate_t if delegate != nil { delegate_ = delegate.toNative() } - return (*BrowserView)(C.cef_browser_view_create(client.toNative(), (*C.cef_string_t)(url_), settings.toNative(&C.cef_browser_settings_t{}), extra_info.toNative(), request_context.toNative(), delegate_)) + return (*BrowserView)(C.cef_browser_view_create(client.toNative(), (*C.cef_string_t)(uRL_), settings.toNative(&C.cef_browser_settings_t{}), extraInfo.toNative(), requestContext.toNative(), delegate_)) } // BrowserViewGetForBrowser (cef_browser_view_get_for_browser from include/capi/views/cef_browser_view_capi.h) @@ -180,8 +180,8 @@ func CreateContextShared(other *RequestContext, handler *RequestContextHandler) // CurrentlyOn (cef_currently_on from include/capi/cef_task_capi.h) // Returns true (1) if called on the specified thread. Equivalent to using // cef_task_tRunner::GetForThread(threadId)->belongs_to_current_thread(). -func CurrentlyOn(threadId ThreadID) int32 { - return int32(C.cef_currently_on(C.cef_thread_id_t(threadId))) +func CurrentlyOn(threadID ThreadID) int32 { + return int32(C.cef_currently_on(C.cef_thread_id_t(threadID))) } // DictionaryValueCreate (cef_dictionary_value_create from include/capi/cef_values_capi.h) @@ -209,15 +209,15 @@ func DisplayGetCount() uint64 { // Returns the Display that most closely intersects |bounds|. Set // |input_pixel_coords| to true (1) if |bounds| is in pixel coordinates instead // of density independent pixels (DIP). -func DisplayGetMatchingBounds(bounds *Rect, input_pixel_coords int32) *Display { - return (*Display)(C.cef_display_get_matching_bounds(bounds.toNative(&C.cef_rect_t{}), C.int(input_pixel_coords))) +func DisplayGetMatchingBounds(bounds *Rect, inputPixelCoords int32) *Display { + return (*Display)(C.cef_display_get_matching_bounds(bounds.toNative(&C.cef_rect_t{}), C.int(inputPixelCoords))) } // DisplayGetNearestPoint (cef_display_get_nearest_point from include/capi/views/cef_display_capi.h) // Returns the Display nearest |point|. Set |input_pixel_coords| to true (1) if // |point| is in pixel coordinates instead of density independent pixels (DIP). -func DisplayGetNearestPoint(point *Point, input_pixel_coords int32) *Display { - return (*Display)(C.cef_display_get_nearest_point(point.toNative(&C.cef_point_t{}), C.int(input_pixel_coords))) +func DisplayGetNearestPoint(point *Point, inputPixelCoords int32) *Display { + return (*Display)(C.cef_display_get_nearest_point(point.toNative(&C.cef_point_t{}), C.int(inputPixelCoords))) } // DisplayGetPrimary (cef_display_get_primary from include/capi/views/cef_display_capi.h) @@ -269,8 +269,8 @@ func EnableHighdpiSupport() { // the process exit code. The |application| parameter may be NULL. The // |windows_sandbox_info| parameter is only used on Windows and may be NULL (see // cef_sandbox_win.h for details). -func ExecuteProcess(args *MainArgs, application *App, windows_sandbox_info unsafe.Pointer) int32 { - return int32(C.cef_execute_process(args.toNative(&C.cef_main_args_t{}), application.toNative(), windows_sandbox_info)) +func ExecuteProcess(args *MainArgs, application *App, windowsSandboxInfo unsafe.Pointer) int32 { + return int32(C.cef_execute_process(args.toNative(&C.cef_main_args_t{}), application.toNative(), windowsSandboxInfo)) } // ImageCreate (cef_image_create from include/capi/cef_image_capi.h) @@ -286,8 +286,8 @@ func ImageCreate() *Image { // value of true (1) indicates that it succeeded and false (0) indicates that it // failed. The |windows_sandbox_info| parameter is only used on Windows and may // be NULL (see cef_sandbox_win.h for details). -func Initialize(args *MainArgs, settings *Settings, application *App, windows_sandbox_info unsafe.Pointer) int32 { - return int32(C.cef_initialize(args.toNative(&C.cef_main_args_t{}), settings.toNative(&C.cef_settings_t{}), application.toNative(), windows_sandbox_info)) +func Initialize(args *MainArgs, settings *Settings, application *App, windowsSandboxInfo unsafe.Pointer) int32 { + return int32(C.cef_initialize(args.toNative(&C.cef_main_args_t{}), settings.toNative(&C.cef_settings_t{}), application.toNative(), windowsSandboxInfo)) } // IsCertStatusError (cef_is_cert_status_error from include/capi/cef_ssl_info_capi.h) @@ -395,15 +395,15 @@ func PostDataElementCreate() *PostDataElement { // Post a task for delayed execution on the specified thread. Equivalent to // using cef_task_tRunner::GetForThread(threadId)->PostDelayedTask(task, // delay_ms). -func PostDelayedTask(threadId ThreadID, task *Task, delay_ms int64) int32 { - return int32(C.cef_post_delayed_task(C.cef_thread_id_t(threadId), task.toNative(), C.int64(delay_ms))) +func PostDelayedTask(threadID ThreadID, task *Task, delayMs int64) int32 { + return int32(C.cef_post_delayed_task(C.cef_thread_id_t(threadID), task.toNative(), C.int64(delayMs))) } // PostTask (cef_post_task from include/capi/cef_task_capi.h) // Post a task for execution on the specified thread. Equivalent to using // cef_task_tRunner::GetForThread(threadId)->PostTask(task). -func PostTask(threadId ThreadID, task *Task) int32 { - return int32(C.cef_post_task(C.cef_thread_id_t(threadId), task.toNative())) +func PostTask(threadID ThreadID, task *Task) int32 { + return int32(C.cef_post_task(C.cef_thread_id_t(threadID), task.toNative())) } // PrintSettingsCreate (cef_print_settings_create from include/capi/cef_print_settings_capi.h) @@ -494,18 +494,18 @@ func RefreshWebPlugins() { // // Call another function. // example.test.increment(); // -func RegisterExtension(extension_name, javascript_code string, handler *V8handler) int32 { - extension_name_ := C.cef_string_userfree_alloc() - setCEFStr(extension_name, extension_name_) +func RegisterExtension(extensionName, javascriptCode string, handler *V8handler) int32 { + extensionName_ := C.cef_string_userfree_alloc() + setCEFStr(extensionName, extensionName_) defer func() { - C.cef_string_userfree_free(extension_name_) + C.cef_string_userfree_free(extensionName_) }() - javascript_code_ := C.cef_string_userfree_alloc() - setCEFStr(javascript_code, javascript_code_) + javascriptCode_ := C.cef_string_userfree_alloc() + setCEFStr(javascriptCode, javascriptCode_) defer func() { - C.cef_string_userfree_free(javascript_code_) + C.cef_string_userfree_free(javascriptCode_) }() - return int32(C.cef_register_extension((*C.cef_string_t)(extension_name_), (*C.cef_string_t)(javascript_code_), handler.toNative())) + return int32(C.cef_register_extension((*C.cef_string_t)(extensionName_), (*C.cef_string_t)(javascriptCode_), handler.toNative())) } // RegisterSchemeHandlerFactory (cef_register_scheme_handler_factory from include/capi/cef_scheme_capi.h) @@ -522,18 +522,18 @@ func RegisterExtension(extension_name, javascript_code string, handler *V8handle // browser process. Using this function is equivalent to calling cef_request_tCo // ntext::cef_request_context_get_global_context()->register_scheme_handler_fact // ory(). -func RegisterSchemeHandlerFactory(scheme_name, domain_name string, factory *SchemeHandlerFactory) int32 { - scheme_name_ := C.cef_string_userfree_alloc() - setCEFStr(scheme_name, scheme_name_) +func RegisterSchemeHandlerFactory(schemeName, domainName string, factory *SchemeHandlerFactory) int32 { + schemeName_ := C.cef_string_userfree_alloc() + setCEFStr(schemeName, schemeName_) defer func() { - C.cef_string_userfree_free(scheme_name_) + C.cef_string_userfree_free(schemeName_) }() - domain_name_ := C.cef_string_userfree_alloc() - setCEFStr(domain_name, domain_name_) + domainName_ := C.cef_string_userfree_alloc() + setCEFStr(domainName, domainName_) defer func() { - C.cef_string_userfree_free(domain_name_) + C.cef_string_userfree_free(domainName_) }() - return int32(C.cef_register_scheme_handler_factory((*C.cef_string_t)(scheme_name_), (*C.cef_string_t)(domain_name_), factory.toNative())) + return int32(C.cef_register_scheme_handler_factory((*C.cef_string_t)(schemeName_), (*C.cef_string_t)(domainName_), factory.toNative())) } // RegisterWebPluginCrash (cef_register_web_plugin_crash from include/capi/cef_web_plugin_capi.h) @@ -601,23 +601,23 @@ func RegisterWidevineCdm(path string, callback *RegisterCdmCallback) { // RemoveCrossOriginWhitelistEntry (cef_remove_cross_origin_whitelist_entry from include/capi/cef_origin_whitelist_capi.h) // Remove an entry from the cross-origin access whitelist. Returns false (0) if // |source_origin| is invalid or the whitelist cannot be accessed. -func RemoveCrossOriginWhitelistEntry(source_origin, target_protocol, target_domain string, allow_target_subdomains int32) int32 { - source_origin_ := C.cef_string_userfree_alloc() - setCEFStr(source_origin, source_origin_) +func RemoveCrossOriginWhitelistEntry(sourceOrigin, targetProtocol, targetDomain string, allowTargetSubdomains int32) int32 { + sourceOrigin_ := C.cef_string_userfree_alloc() + setCEFStr(sourceOrigin, sourceOrigin_) defer func() { - C.cef_string_userfree_free(source_origin_) + C.cef_string_userfree_free(sourceOrigin_) }() - target_protocol_ := C.cef_string_userfree_alloc() - setCEFStr(target_protocol, target_protocol_) + targetProtocol_ := C.cef_string_userfree_alloc() + setCEFStr(targetProtocol, targetProtocol_) defer func() { - C.cef_string_userfree_free(target_protocol_) + C.cef_string_userfree_free(targetProtocol_) }() - target_domain_ := C.cef_string_userfree_alloc() - setCEFStr(target_domain, target_domain_) + targetDomain_ := C.cef_string_userfree_alloc() + setCEFStr(targetDomain, targetDomain_) defer func() { - C.cef_string_userfree_free(target_domain_) + C.cef_string_userfree_free(targetDomain_) }() - return int32(C.cef_remove_cross_origin_whitelist_entry((*C.cef_string_t)(source_origin_), (*C.cef_string_t)(target_protocol_), (*C.cef_string_t)(target_domain_), C.int(allow_target_subdomains))) + return int32(C.cef_remove_cross_origin_whitelist_entry((*C.cef_string_t)(sourceOrigin_), (*C.cef_string_t)(targetProtocol_), (*C.cef_string_t)(targetDomain_), C.int(allowTargetSubdomains))) } // RequestContextCreateContext (cef_request_context_create_context from include/capi/cef_request_context_capi.h) @@ -913,7 +913,7 @@ func StringMultimapClear(map_r StringMultimap) { // StringMultimapEnumerate (cef_string_multimap_enumerate from include/internal/cef_string_multimap.h) // Return the value_index-th value with the specified key. -func StringMultimapEnumerate(map_r StringMultimap, key string, value_index uint64, value *string) int32 { +func StringMultimapEnumerate(map_r StringMultimap, key string, valueIndex uint64, value *string) int32 { key_ := C.cef_string_userfree_alloc() setCEFStr(key, key_) defer func() { @@ -925,7 +925,7 @@ func StringMultimapEnumerate(map_r StringMultimap, key string, value_index uint6 *value = cefstrToString(value_) C.cef_string_userfree_free(value_) }() - return int32(C.cef_string_multimap_enumerate(C.cef_string_multimap_t(map_r), (*C.cef_string_t)(key_), C.size_t(value_index), (*C.cef_string_t)(value_))) + return int32(C.cef_string_multimap_enumerate(C.cef_string_multimap_t(map_r), (*C.cef_string_t)(key_), C.size_t(valueIndex), (*C.cef_string_t)(value_))) } // StringMultimapFindCount (cef_string_multimap_find_count from include/internal/cef_string_multimap.h) @@ -985,8 +985,8 @@ func TaskRunnerGetForCurrentThread() *TaskRunner { // TaskRunnerGetForThread (cef_task_runner_get_for_thread from include/capi/cef_task_capi.h) // Returns the task runner for the specified CEF thread. -func TaskRunnerGetForThread(threadId ThreadID) *TaskRunner { - return (*TaskRunner)(C.cef_task_runner_get_for_thread(C.cef_thread_id_t(threadId))) +func TaskRunnerGetForThread(threadID ThreadID) *TaskRunner { + return (*TaskRunner)(C.cef_task_runner_get_for_thread(C.cef_thread_id_t(threadID))) } // TextfieldCreate (cef_textfield_create from include/capi/views/cef_textfield_capi.h) @@ -1002,25 +1002,25 @@ func TextfieldCreate(delegate *TextfieldDelegate) *Textfield { // TimeDelta (cef_time_delta from include/internal/cef_time.h) // Retrieve the delta in milliseconds between two time values. // -func TimeDelta(cef_time1, cef_time2 *Time, delta *int64) int32 { - return int32(C.cef_time_delta(cef_time1.toNative(&C.cef_time_t{}), cef_time2.toNative(&C.cef_time_t{}), (*C.longlong)(delta))) +func TimeDelta(cefTime1, cefTime2 *Time, delta *int64) int32 { + return int32(C.cef_time_delta(cefTime1.toNative(&C.cef_time_t{}), cefTime2.toNative(&C.cef_time_t{}), (*C.longlong)(delta))) } // TimeFromDoublet (cef_time_from_doublet from include/internal/cef_time.h) -func TimeFromDoublet(time float64, cef_time *Time) int32 { - return int32(C.cef_time_from_doublet(C.double(time), cef_time.toNative(&C.cef_time_t{}))) +func TimeFromDoublet(time float64, cefTime *Time) int32 { + return int32(C.cef_time_from_doublet(C.double(time), cefTime.toNative(&C.cef_time_t{}))) } // TimeFromTimet (cef_time_from_timet from include/internal/cef_time.h) -func TimeFromTimet(time int64, cef_time *Time) int32 { - return int32(C.cef_time_from_timet(C.time_t(time), cef_time.toNative(&C.cef_time_t{}))) +func TimeFromTimet(time int64, cefTime *Time) int32 { + return int32(C.cef_time_from_timet(C.time_t(time), cefTime.toNative(&C.cef_time_t{}))) } // TimeNow (cef_time_now from include/internal/cef_time.h) // Retrieve the current system time. // -func TimeNow(cef_time *Time) int32 { - return int32(C.cef_time_now(cef_time.toNative(&C.cef_time_t{}))) +func TimeNow(cefTime *Time) int32 { + return int32(C.cef_time_now(cefTime.toNative(&C.cef_time_t{}))) } // TimeToDoublet (cef_time_to_doublet from include/internal/cef_time.h) @@ -1028,15 +1028,15 @@ func TimeNow(cef_time *Time) int32 { // epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0 // means "not initialized". Returns true (1) on success and false (0) on // failure. -func TimeToDoublet(cef_time *Time, time *float64) int32 { - return int32(C.cef_time_to_doublet(cef_time.toNative(&C.cef_time_t{}), (*C.double)(time))) +func TimeToDoublet(cefTime *Time, time *float64) int32 { + return int32(C.cef_time_to_doublet(cefTime.toNative(&C.cef_time_t{}), (*C.double)(time))) } // TimeToTimet (cef_time_to_timet from include/internal/cef_time.h) // Converts cef_time_t to/from time_t. Returns true (1) on success and false (0) // on failure. -func TimeToTimet(cef_time *Time, time *int64) int32 { - return int32(C.cef_time_to_timet(cef_time.toNative(&C.cef_time_t{}), (*C.time_t)(time))) +func TimeToTimet(cefTime *Time, time *int64) int32 { + return int32(C.cef_time_to_timet(cefTime.toNative(&C.cef_time_t{}), (*C.time_t)(time))) } // UnregisterInternalWebPlugin (cef_unregister_internal_web_plugin from include/capi/cef_web_plugin_capi.h) @@ -1072,8 +1072,8 @@ func UnregisterInternalWebPlugin(path string) { // - The |request_context| parameter must be NULL. // // The |request| object will be marked as read-only after calling this function. -func UrlrequestCreate(request *Request, client *UrlrequestClient, request_context *RequestContext) *Urlrequest { - return (*Urlrequest)(C.cef_urlrequest_create(request.toNative(), client.toNative(), request_context.toNative())) +func UrlrequestCreate(request *Request, client *UrlrequestClient, requestContext *RequestContext) *Urlrequest { + return (*Urlrequest)(C.cef_urlrequest_create(request.toNative(), client.toNative(), requestContext.toNative())) } // V8contextGetCurrentContext (cef_v8context_get_current_context from include/capi/cef_v8_capi.h) @@ -1097,8 +1097,8 @@ func V8contextInContext() int32 { // V8stackTraceGetCurrent (cef_v8stack_trace_get_current from include/capi/cef_v8_capi.h) // Returns the stack trace for the currently active context. |frame_limit| is // the maximum number of frames that will be captured. -func V8stackTraceGetCurrent(frame_limit int32) *V8stackTrace { - return (*V8stackTrace)(C.cef_v8stack_trace_get_current(C.int(frame_limit))) +func V8stackTraceGetCurrent(frameLimit int32) *V8stackTrace { + return (*V8stackTrace)(C.cef_v8stack_trace_get_current(C.int(frameLimit))) } // V8valueCreateArray (cef_v8value_create_array from include/capi/cef_v8_capi.h) @@ -1121,8 +1121,8 @@ func V8valueCreateArray(length int32) *V8value { // cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, // or in combination with calling enter() and exit() on a stored cef_v8context_t // reference. -func V8valueCreateArrayBuffer(buffer unsafe.Pointer, length uint64, release_callback *V8arrayBufferReleaseCallback) *V8value { - return (*V8value)(C.cef_v8value_create_array_buffer(buffer, C.size_t(length), release_callback.toNative())) +func V8valueCreateArrayBuffer(buffer unsafe.Pointer, length uint64, releaseCallback *V8arrayBufferReleaseCallback) *V8value { + return (*V8value)(C.cef_v8value_create_array_buffer(buffer, C.size_t(length), releaseCallback.toNative())) } // V8valueCreateBool (cef_v8value_create_bool from include/capi/cef_v8_capi.h) @@ -1224,8 +1224,8 @@ func VisitWebPluginInfo(visitor *WebPluginInfoVisitor) { // been released; otherwise, the state remains signaled until reset() is called // manually. If |initially_signaled| is true (1) then the event will start in // the signaled state. -func WaitableEventCreate(automatic_reset, initially_signaled int32) *WaitableEvent { - return (*WaitableEvent)(C.cef_waitable_event_create(C.int(automatic_reset), C.int(initially_signaled))) +func WaitableEventCreate(automaticReset, initiallySignaled int32) *WaitableEvent { + return (*WaitableEvent)(C.cef_waitable_event_create(C.int(automaticReset), C.int(initiallySignaled))) } // WindowCreateTopLevel (cef_window_create_top_level from include/capi/views/cef_window_capi.h) diff --git a/go.mod b/go.mod index f05970d..7796afc 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/richardwilkes/cef go 1.13 -require github.com/richardwilkes/toolbox v1.12.0 +require github.com/richardwilkes/toolbox v1.24.0 diff --git a/go.sum b/go.sum index 3b3a5fa..ad0fe61 100644 --- a/go.sum +++ b/go.sum @@ -6,21 +6,16 @@ github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942 h1:A7GG7zcGjl3jqAqGPmcNjd github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/richardwilkes/toolbox v1.9.3 h1:G9muaw+Ck30Md2PPiEDiemMMmN2yMaB4G67ViZEW6mw= -github.com/richardwilkes/toolbox v1.9.3/go.mod h1:lmtR34kHPv+/xe9ctPnnEuBrBE2ViIcFNSzOCMbHKWo= -github.com/richardwilkes/toolbox v1.11.0 h1:VBF/o3tj5jSfX7oiC0vQFrFjOvaY81O6bAA/RatL97c= -github.com/richardwilkes/toolbox v1.11.0/go.mod h1:ZUs/21ySApPLS/ZIlNhCQ42nBOrSxlwP+9TUzizlq/c= -github.com/richardwilkes/toolbox v1.12.0 h1:dGxzOJ47zi7LegvkPoZCZJZDOKSzEUii/793SOrbnXI= -github.com/richardwilkes/toolbox v1.12.0/go.mod h1:1JkSR/OTdnDZmhE4RtQVMWOII+5yGnEP3g247IQu3PE= +github.com/richardwilkes/toolbox v1.24.0 h1:T2zGn4qnkuoTE8S8cbbWUzbolPsHT/Fgoh09HsRIGj8= +github.com/richardwilkes/toolbox v1.24.0/go.mod h1:yOuzWx4rgI1Dc6YSHGom//gPDp4PCXj/CJx3ZNlMTzI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200102141924-c96a22e43c9c h1:OYFUffxXPezb7BVTx9AaD4Vl0qtxmklBIkwCKH1YwDY= +golang.org/x/sys v0.0.0-20200102141924-c96a22e43c9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/cefgen/enumdef.go b/internal/cefgen/enumdef.go index 4c57265..59f1a6b 100644 --- a/internal/cefgen/enumdef.go +++ b/internal/cefgen/enumdef.go @@ -38,35 +38,6 @@ func (e *enumDef) Type() string { return "int" } -var nameExceptions = []string{ - "ascii", "com", "ct", "dom", "html", "http", "id", "io", "json", "js", - "pdf", "ssl", "ssl2", "ssl3", "st", "tid", "tls", "tls1", "tp", "ts", - "tt", "ui", "uri", "url", "v8", "x509", "xml", -} - -func translateConstantName(in string) string { - in = strings.TrimPrefix(strings.TrimSpace(in), "CEF_") - in = strings.ToLower(in) - for _, s := range nameExceptions { - upper := strings.ToUpper(s) - if strings.HasPrefix(in, s+"_") { - in = upper + "_" + in[len(s)+1:] - } - if strings.HasSuffix(in, "_"+s) { - in = in[:len(in)-(1+len(s))] + "_" + upper - } - for { - if i := strings.Index(in, "_"+s+"_"); i == -1 { - break - } else { - in = in[:i+1] + upper + in[i+1+len(s):] - } - } - } - in = txt.ToCamelCase(in) - return in -} - func processTypedefDeclEnumDecl(curBlock, prevBlock []lineInfo) { if i := strings.Index(curBlock[0].Line, "'enum cef_"); i != -1 { name := curBlock[0].Line[i+5:] @@ -124,8 +95,8 @@ func processTypedefDeclEnumDecl(curBlock, prevBlock []lineInfo) { if comma := strings.IndexAny(v[ecol-scol:], ", "); comma != -1 { v = v[:comma+ecol-scol] } - if strings.Contains(line, "-DeclRefExpr ") { - v = translateConstantName(v) + if strings.Contains(line, "-DeclRefExpr ") || (v[0] < '0' || v[0] > '9') { + v = translateName(v) } edef.Values[len(edef.Values)-1].setValue(v) } diff --git a/internal/cefgen/enumvalue.go b/internal/cefgen/enumvalue.go index e659999..26767fd 100644 --- a/internal/cefgen/enumvalue.go +++ b/internal/cefgen/enumvalue.go @@ -16,7 +16,7 @@ type enumValue struct { func newEnumValue(name, value string, pos position) *enumValue { e := &enumValue{ Name: name, - GoName: translateConstantName(name), + GoName: translateName(name), Position: pos, } e.setValue(value) diff --git a/internal/cefgen/funcdef.go b/internal/cefgen/funcdef.go index f8038a8..aed00be 100644 --- a/internal/cefgen/funcdef.go +++ b/internal/cefgen/funcdef.go @@ -101,7 +101,7 @@ for i, one := range %[1]s { fmt.Fprintf(&buffer, "var delegate_ %sC.%s\n", p.Ptrs, p.BaseType) buffer.WriteString("if delegate != nil {\n") buffer.WriteString("delegate_ = delegate.toNative(") - if sdef, exists := sdefsMap[p.BaseType]; exists && !sdef.isClassEquivalent() { + if sdef, exists2 := sdefsMap[p.BaseType]; exists2 && !sdef.isClassEquivalent() { fmt.Fprintf(&buffer, "&C.%s{}", p.BaseType) } buffer.WriteString(")\n") @@ -197,7 +197,7 @@ func processFunctionDecl(block []lineInfo) { if _, exclude := fdefsMap[name]; !exclude { fdef := &funcDef{ Name: name, - GoName: translateConstantName(name[4:]), + GoName: translateName(name[4:]), Return: newCVar("result", result[0][2], block[0].Position), Position: block[0].Position, } diff --git a/internal/cefgen/name.go b/internal/cefgen/name.go new file mode 100644 index 0000000..20a0c82 --- /dev/null +++ b/internal/cefgen/name.go @@ -0,0 +1,72 @@ +// Copyright ©2018-2020 by Richard A. Wilkes. All rights reserved. +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, version 2.0. If a copy of the MPL was not distributed with +// this file, You can obtain one at http://mozilla.org/MPL/2.0/. +// +// This Source Code Form is "Incompatible With Secondary Licenses", as +// defined by the Mozilla Public License, version 2.0. + +package main + +import ( + "strings" + + "github.com/richardwilkes/toolbox/txt" +) + +var ( + nameExceptions = []string{ + "acl", "api", "ascii", "com", "cpu", "css", "ct", "dns", "dom", "eof", + "guid", "html", "http", "http11", "http200", "http404", "http500", + "https", "id", "io", "ip", "js", "json", "lhs", "pdf", "qps", "ram", + "rhs", "rpc", "sla", "smtp", "sql", "ssh", "ssl", "ssl2", "ssl3", + "st", "tcp", "tid", "tls", "tls1", "tls13", "tp", "ts", "tt", "ttl", + "udp", "ui", "uid", "uuid", "uri", "url", "utf16", "utf16le", + "utf16be", "utf8", "v8", "vm", "x509", "xml", "xmpp", "xsrf", "xss", + } + paramRenames = []string{ + "chan", "defer", "error", "fallthrough", "func", "go", "import", + "interface", "map", "package", "range", "select", "string", "type", + "var", + } +) + +func translateName(in string) string { + in = strings.TrimPrefix(strings.TrimSpace(in), "CEF_") + if strings.HasSuffix(in, "response") { + in = strings.TrimSuffix(in, "response") + "_response" + } + in = strings.ToLower(txt.ToSnakeCase(in)) + for _, s := range nameExceptions { + if s == in { + in = strings.ToUpper(s) + break + } + upper := strings.ToUpper(s) + if strings.HasPrefix(in, s+"_") { + in = upper + "_" + in[len(s)+1:] + } + if strings.HasSuffix(in, "_"+s) { + in = in[:len(in)-(1+len(s))] + "_" + upper + } + for { + if i := strings.Index(in, "_"+s+"_"); i == -1 { + break + } else { + in = in[:i+1] + upper + in[i+1+len(s):] + } + } + } + in = txt.ToCamelCase(in) + return in +} + +func adjustedParamName(name string) string { + for _, one := range paramRenames { + if name == one { + return name + "_r" + } + } + return txt.FirstToLower(translateName(name)) +} diff --git a/internal/cefgen/structdef.go b/internal/cefgen/structdef.go index 515683d..cf4a29a 100644 --- a/internal/cefgen/structdef.go +++ b/internal/cefgen/structdef.go @@ -79,7 +79,7 @@ func (s *structDef) Trampolines() []string { func translateStructTypeName(name string) string { if strings.HasPrefix(name, "cef_") && strings.HasSuffix(name, "_t") { - name = translateConstantName(name[4 : len(name)-2]) + name = translateName(name[4 : len(name)-2]) } return name } diff --git a/internal/cefgen/variable.go b/internal/cefgen/variable.go index 08d229d..96d37e5 100644 --- a/internal/cefgen/variable.go +++ b/internal/cefgen/variable.go @@ -19,10 +19,7 @@ const ( stringPtrGoType = "*string" ) -var ( - cNamesToPrefixForAccess = []string{"range", "type"} - paramRenames = []string{"chan", "defer", "error", "fallthrough", "func", "go", "import", "interface", "map", "package", "range", "select", "string", "type", "var"} -) +var cNamesToPrefixForAccess = []string{"range", "type"} type variable struct { Name string @@ -41,7 +38,7 @@ func newCVar(name, typeInfo string, pos position) *variable { name = strings.TrimSpace(name) v := &variable{ Name: name, - GoName: txt.ToCamelCase(name), + GoName: translateName(name), } for _, one := range cNamesToPrefixForAccess { if one == name { @@ -64,8 +61,8 @@ func newCVar(name, typeInfo string, pos position) *variable { jot.Fatal(1, errs.Newf("Extracted param names (%v) don't match params (%v) for %s: %v", paramNames, paramList, name, pos)) } typeInfo = strings.TrimSpace(typeInfo[:fp]) - for i, param := range paramList { - one := newCVar(paramNames[i], param, pos) + for i, p := range paramList { + one := newCVar(paramNames[i], p, pos) if one.NeedUnsafe { v.NeedUnsafe = true } @@ -154,10 +151,10 @@ func extractParameterNames(pos position) []string { if i = strings.Index(line, ")"); i != -1 { var params []string line = txt.CollapseSpaces(strings.TrimSpace(line[:i])) - for j, param := range strings.Split(line, ",") { - param = strings.TrimSpace(param) - if i = strings.LastIndex(param, " "); i != -1 { - params = append(params, adjustedParamName(param[i+1:])) + for j, p := range strings.Split(line, ",") { + p = strings.TrimSpace(p) + if i = strings.LastIndex(p, " "); i != -1 { + params = append(params, adjustedParamName(p[i+1:])) } else { jot.Fatal(1, errs.Newf("Unable to extract parameter name %d from: %s", j, line)) } @@ -170,15 +167,6 @@ func extractParameterNames(pos position) []string { return nil } -func adjustedParamName(name string) string { - for _, one := range paramRenames { - if name == one { - return name + "_r" - } - } - return name -} - func (v *variable) paramGoType() string { if !v.HadConst && v.GoType == "string" { return stringPtrGoType @@ -202,7 +190,7 @@ func (v *variable) transformCToGo(w io.Writer) string { return fmt.Sprintf("%s_", v.Name) } } else { - _, exists := edefsMap[v.BaseType] + _, exists = edefsMap[v.BaseType] switch { case exists: switch v.Ptrs { diff --git a/internal/cmd/dist.go b/internal/cmd/dist.go index a6bed60..2d8a1d7 100644 --- a/internal/cmd/dist.go +++ b/internal/cmd/dist.go @@ -82,7 +82,7 @@ func (d *dist) Run(cl *cmdline.CmdLine, args []string) error { case toolbox.LinuxOS, toolbox.WindowsOS: d.distNotMacOS() default: - return fmt.Errorf("Unhandled OS: %s", runtime.GOOS) + return fmt.Errorf("unhandled OS: %s", runtime.GOOS) } return nil } @@ -98,7 +98,7 @@ func (d *dist) distMacOS() { createDir(helperAppBundleMacOSDir, 0755) //nolint:gocritic createDir(path.Join(helperAppBundleContentsDir, "Frameworks"), 0755) //nolint:gocritic releaseDir := path.Join(installPrefix, "Release") - cc := exec.Command("cc", "-I", installPrefix, path.Join(installPrefix, "helper", "helper.c"), "-F", releaseDir, "-framework", "Chromium Embedded Framework", "-o", path.Join(helperAppBundleMacOSDir, d.exeName+" Helper")) + cc := exec.Command("cc", "-I", installPrefix, path.Join(installPrefix, "helper", "helper.c"), "-F", releaseDir, "-framework", "Chromium Embedded Framework", "-o", path.Join(helperAppBundleMacOSDir, d.exeName+" Helper")) //nolint:gosec if result, err := cc.CombinedOutput(); err != nil { fmt.Println("Failed to compile the helper.") fmt.Println(err) @@ -204,7 +204,7 @@ func copyDirContents(srcdir, dstdir string) { } for _, one := range list { name := one.Name() - if err := fs.Copy(path.Join(srcdir, name), path.Join(dstdir, name)); err != nil { + if err = fs.Copy(path.Join(srcdir, name), path.Join(dstdir, name)); err != nil { fmt.Println(err) atexit.Exit(1) } diff --git a/internal/cmd/install.go b/internal/cmd/install.go index 86381b0..9327d73 100644 --- a/internal/cmd/install.go +++ b/internal/cmd/install.go @@ -163,7 +163,8 @@ func (c *install) untar(in io.Reader) { case tar.TypeDir: createDir(name, os.FileMode(h.Mode|0555)) case tar.TypeReg: - buffer, err := ioutil.ReadAll(r) + var buffer []byte + buffer, err = ioutil.ReadAll(r) checkFileError(err, "read archive data for", name) if name == path.Join(installPrefix, "include/capi/cef_resource_request_handler_capi.h") { const includeToRemove = `#include "include/internal/cef_types_wrappers.h"`