internal static cef_context_menu_handler_t* Alloc() { var ptr = (cef_context_menu_handler_t*)Marshal.AllocHGlobal(_sizeof); *ptr = new cef_context_menu_handler_t(); ptr->_base._size = (UIntPtr)_sizeof; return ptr; }
internal static cef_context_menu_handler_t *Alloc() { var ptr = (cef_context_menu_handler_t *)Marshal.AllocHGlobal(_sizeof); *ptr = new cef_context_menu_handler_t(); ptr->_base._size = (UIntPtr)_sizeof; return(ptr); }
private void on_context_menu_dismissed(cef_context_menu_handler_t* self, cef_browser_t* browser, cef_frame_t* frame) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); OnContextMenuDismissed(mBrowser, mFrame); }
private int release(cef_context_menu_handler_t* self) { lock (SyncRoot) { var result = --_refct; if (result == 0) { lock (_roots) { _roots.Remove((IntPtr)_self); } } return result; } }
private int add_ref(cef_context_menu_handler_t* self) { lock (SyncRoot) { var result = ++_refct; if (result == 1) { lock (_roots) { _roots.Add((IntPtr)_self, this); } } return result; } }
private int on_context_menu_command(cef_context_menu_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_context_menu_params_t* @params, int command_id, CefEventFlags event_flags) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mState = CefContextMenuParams.FromNative(@params); var result = OnContextMenuCommand(mBrowser, mFrame, mState, command_id, event_flags); mState.Dispose(); return result ? 1 : 0; }
private void on_before_context_menu(cef_context_menu_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_context_menu_params_t* @params, cef_menu_model_t* model) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mState = CefContextMenuParams.FromNative(@params); var mModel = CefMenuModel.FromNative(model); OnBeforeContextMenu(mBrowser, mFrame, mState, mModel); mState.Dispose(); mModel.Dispose(); }
internal static void Free(cef_context_menu_handler_t* ptr) { Marshal.FreeHGlobal((IntPtr)ptr); }
private void CheckSelf(cef_context_menu_handler_t* self) { if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); }
private int get_refct(cef_context_menu_handler_t* self) { return _refct; }