mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
implement IKeyboardInputSink
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Wpf
|
||||
IntPtr WebView::SourceHook(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam, bool% handled)
|
||||
{
|
||||
handled = false;
|
||||
|
||||
|
||||
switch(message)
|
||||
{
|
||||
case WM_KEYDOWN:
|
||||
|
||||
+39
-1
@@ -22,7 +22,8 @@ namespace CefSharp
|
||||
namespace Wpf
|
||||
{
|
||||
[TemplatePart(Name="PART_Browser", Type=Image::typeid)]
|
||||
public ref class WebView sealed : public ContentControl, IRenderWebBrowser
|
||||
public ref class WebView sealed : public ContentControl,
|
||||
IRenderWebBrowser, IKeyboardInputSink
|
||||
{
|
||||
private:
|
||||
delegate void ActionDelegate();
|
||||
@@ -184,5 +185,42 @@ namespace Wpf
|
||||
virtual void OnApplyTemplate() override;
|
||||
virtual void SetCursor(CefCursorHandle cursor);
|
||||
virtual void SetBuffer(int width, int height, const void* buffer);
|
||||
|
||||
// IKeyboadInputSink
|
||||
virtual property IKeyboardInputSite^ KeyboardInputSite
|
||||
{
|
||||
IKeyboardInputSite^ get() { return nullptr; }
|
||||
void set(IKeyboardInputSite^ site) { }
|
||||
}
|
||||
|
||||
virtual bool HasFocusWithin()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool OnMnemonic(System::Windows::Interop::MSG% msg, System::Windows::Input::ModifierKeys modifiers)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool TranslateAccelerator(System::Windows::Interop::MSG% msg, System::Windows::Input::ModifierKeys modifiers)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool TranslateChar(System::Windows::Interop::MSG% msg, System::Windows::Input::ModifierKeys modifiers)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual IKeyboardInputSite^ RegisterKeyboardInputSink(IKeyboardInputSink^ sink)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual bool TabInto(TraversalRequest^ request)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}}
|
||||
Reference in New Issue
Block a user