mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 12:09:40 +00:00
cleanup
This commit is contained in:
@@ -303,7 +303,7 @@ namespace WinForms
|
||||
|
||||
Object^ WebView::EvaluateScript(String^ script, TimeSpan timeout)
|
||||
{
|
||||
_browserCore->CheckBrowserInitialization();
|
||||
_browserCore->CheckBrowserInitialization();
|
||||
|
||||
CefRefPtr<CefBrowser> browser;
|
||||
if (TryGetCefBrowser(browser))
|
||||
@@ -327,9 +327,9 @@ namespace WinForms
|
||||
ConsoleMessage(this, gcnew ConsoleMessageEventArgs(message, source, line));
|
||||
}
|
||||
|
||||
void WebView::OnKeyEvent(int type, int code, int modifiers, bool isSystemKey)
|
||||
void WebView::OnKeyEvent(int type, int code, int modifiers, bool isSystemKey)
|
||||
{
|
||||
BrowserKeyEvent(this, gcnew BrowserKeyEventArgs(type, code, modifiers, isSystemKey));
|
||||
BrowserKey(this, gcnew BrowserKeyEventArgs(type, code, modifiers, isSystemKey));
|
||||
}
|
||||
|
||||
void WebView::OnFrameLoadStart()
|
||||
|
||||
@@ -45,8 +45,7 @@ namespace WinForms
|
||||
}
|
||||
|
||||
virtual event ConsoleMessageEventHandler^ ConsoleMessage;
|
||||
|
||||
virtual event KeyEventHandler^ BrowserKeyEvent;
|
||||
virtual event KeyEventHandler^ BrowserKey;
|
||||
|
||||
WebView()
|
||||
{
|
||||
@@ -179,6 +178,6 @@ namespace WinForms
|
||||
virtual void OnFrameLoadEnd();
|
||||
virtual void OnTakeFocus(bool next);
|
||||
virtual void OnConsoleMessage(String^ message, String^ source, int line);
|
||||
virtual void OnKeyEvent(int type, int code, int modifiers, bool isSystemKey);
|
||||
virtual void OnKeyEvent(int type, int code, int modifiers, bool isSystemKey);
|
||||
};
|
||||
}}
|
||||
@@ -534,9 +534,9 @@ namespace Wpf
|
||||
ConsoleMessage(this, gcnew ConsoleMessageEventArgs(message, source, line));
|
||||
}
|
||||
|
||||
void WebView::OnKeyEvent(int type, int code, int modifiers, bool isSystemKey)
|
||||
void WebView::OnKeyEvent(int type, int code, int modifiers, bool isSystemKey)
|
||||
{
|
||||
KeyEvent(this, gcnew BrowserKeyEventArgs(type, code, modifiers, isSystemKey));
|
||||
BrowserKey(this, gcnew BrowserKeyEventArgs(type, code, modifiers, isSystemKey));
|
||||
}
|
||||
|
||||
void WebView::OnFrameLoadStart()
|
||||
|
||||
@@ -82,8 +82,7 @@ namespace Wpf
|
||||
}
|
||||
|
||||
virtual event ConsoleMessageEventHandler^ ConsoleMessage;
|
||||
|
||||
virtual event KeyEventHandler^ KeyEvent;
|
||||
virtual event KeyEventHandler^ BrowserKey;
|
||||
|
||||
WebView()
|
||||
{
|
||||
@@ -216,7 +215,7 @@ namespace Wpf
|
||||
virtual void OnFrameLoadEnd();
|
||||
virtual void OnTakeFocus(bool next);
|
||||
virtual void OnConsoleMessage(String^ message, String^ source, int line);
|
||||
virtual void OnKeyEvent(int type, int code, int modifiers, bool isSystemKey);
|
||||
virtual void OnKeyEvent(int type, int code, int modifiers, bool isSystemKey);
|
||||
|
||||
virtual void OnApplyTemplate() override;
|
||||
virtual void SetCursor(CefCursorHandle cursor);
|
||||
|
||||
@@ -7,17 +7,15 @@ namespace CefSharp
|
||||
{
|
||||
public ref class BrowserKeyEventArgs : EventArgs
|
||||
{
|
||||
|
||||
int _type;
|
||||
int _code;
|
||||
int _modifiers;
|
||||
int _type;
|
||||
int _code;
|
||||
int _modifiers;
|
||||
bool _isSystemKey;
|
||||
|
||||
public:
|
||||
BrowserKeyEventArgs(int type, int code, int modifiers, bool isSystemKey)
|
||||
: _type(type), _code(code), _modifiers(modifiers), _isSystemKey(isSystemKey) {}
|
||||
|
||||
|
||||
property int Type { int get() { return _type; } }
|
||||
property int Code { int get() { return _code; } }
|
||||
property int Modifiers { int get() { return _modifiers; } }
|
||||
|
||||
@@ -274,6 +274,10 @@
|
||||
RelativePath=".\BrowserCore.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BrowserKeyEventArgs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BrowserSettings.h"
|
||||
>
|
||||
|
||||
@@ -86,11 +86,11 @@ namespace CefSharp
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ClientAdapter::OnKeyEvent(CefRefPtr<CefBrowser> browser, KeyEventType type, int code, int modifiers, bool isSystemKey, bool isAfterJavaScript)
|
||||
{
|
||||
_browserControl->OnKeyEvent(type, code, modifiers, isSystemKey);
|
||||
return false;
|
||||
_browserControl->OnKeyEvent(type, code, modifiers, isSystemKey);
|
||||
return false;
|
||||
}
|
||||
|
||||
void ClientAdapter::OnLoadStart(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame)
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CefSharp
|
||||
{
|
||||
public:
|
||||
event ConsoleMessageEventHandler^ ConsoleMessage;
|
||||
event KeyEventHandler^ BrowserKeyEvent;
|
||||
event KeyEventHandler^ BrowserKey;
|
||||
|
||||
property bool IsBrowserInitialized { bool get(); }
|
||||
property bool IsLoading { bool get(); }
|
||||
@@ -67,6 +67,6 @@ namespace CefSharp
|
||||
void OnFrameLoadEnd();
|
||||
void OnTakeFocus(bool next);
|
||||
void OnConsoleMessage(String^ message, String^ source, int line);
|
||||
void OnKeyEvent(int type, int code, int modifiers, bool isSystemKey);
|
||||
void OnKeyEvent(int type, int code, int modifiers, bool isSystemKey);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user