Commit Graph

28 Commits

Author SHA1 Message Date
Fabian van der Veen 8cbd572f98 WPF - Send keyboard modifiers along with drag events (#4287)
Fixes #4286
2022-10-29 09:26:42 +10:00
Alex Maitland dce81299fe WPF - Remove EmbeddedCursor workaround
Bug was fixed upstream and now no longer required.

Related issue #4021
2022-05-05 12:40:55 +10:00
Alex Maitland 452edca0ec WPF - Update EmbeddedCursor Res Ids
This is no longer actually being used and will be removed in the next version
as manually keeping the Id's up to date is unnecessary work.
2022-04-21 09:39:50 +10:00
Alex Maitland df562dd251 WPF - Workaround for Cursors not loading correctly
- For cursors that are embedded in libcef.dll the OnCursorChange method is passing
 in IntPtr.Zero so we're unable to load the cursor.
 This commit adds a manual mapping of CursorType to resource Id and loads the cursors manually
- Adds a basic test to assert the cursors load, should validate if the resource ids change

This needs to be fixed upstream https://bitbucket.org/chromiumembedded/cef/issues/3270/osr-pan-icon-missing-when-pressing-the

Test url https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#values

Issue #4021
2022-04-04 14:45:27 +10:00
Alex Maitland 27816d54b8 Core - Change from using GetBrowser() method to BrowserHost
- BrowserHost will return null if not set where GetBrowser() will throw an exception
2022-01-05 10:14:24 +10:00
Andrew Smith bfa8ccf24c WPF - IME Only use GCS_CURSORPOS if an adjacent character is new input (#3846)
* Change Wpf IME handling to only use the cursor pos when an adjacent character is new input

* Meant to change both character before and after

* Ensure the cursor pos is > 0 when checking the character before
2021-10-11 10:16:07 +10:00
Alex Maitland aabdb68e99 WPF - Pass 0 to SendKeyEvent as lparam instead of modifiers
Resolves #3462
2021-04-01 17:17:40 +10:00
Alex Maitland 8a367fbdc4 Refactor CefSharp.Core into CefSharp.Core.Runtime (#3311)
* Net Core - Rename CefSharp.Core.dll to CefSharp.Core.Runtime.dll

Partial rename, only Net Core, folder not renamed

* Net Core - Rename CefSharp.Core.RefAssembly to CefSharp.Core.netcore

Remove GenApi

* Core - Rename CefDragDataWrapper to DragData

Move into CefSharp.Core namespace

* WinForms/WPF/OffScreen - Migrate from GitLink command line to Nuget package

* Net Core - Refactor to have CefSharp.Core.dll contain only public Api

* Net Core - Remove CefSharp.Core.RefAssembly

* Net Core - Change CefSharp.Core.netcore output folder

* Net Core - Restructure nuget packages

* Net Core - Add Cefsharp.Core.Runtime.RefAssembly

* Net Core - Hide CLI/C++ classes from intellisense

Make sure users don't attempt to load them directly

* Rename CefSharp.Core to CefSharp.Core.Runtime

* Core - Restructure Net 4.5.2 packages to use CefSharp.Core.dll anycpu variant

Attempt to load CefSharp.Core.Runtime at runtime rather than having to use msbuild to copy the correct version

* Rename CefSharp.Core.netcore to CefSharp.Core

* WPF/WinForms/OffScreen - Change from x86/64 to AnyCPU

As they are all managed assemblies they can target AnyCPU.
Includes CefSharp.dll

* Convert RequestContextBuilder from C++ to C#

Now part of the CefSharp.Core PublicApi

* Update version number to 87.1.11

* Migrate more of the public Api to C#

* Net Core - Basic restructure complete

* Net Core - ModuleInitializer (Doesn't work yet)

* Remove direct references to BrowserSettings

* Net Core - ModuleInitializer load CefShar.Core.Runtime.dl

* Net Core - Load libcef.dll via CLR Module initializer

If no RID is specified then we can load libcef.dll using the module initializer

* Add version to CefSharp.Core

* Remove dependency on CefSharp.Core.Runtime
Rewrite common targets

* AnyCPU app.config transform

Improve AnyCPU support

* Improve Net Core 3 support
Only delete CefSharp.Core.Runtime.dll when AnyCPU

* Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = NetCore

* Fix Typos

Based on #3306

* Net Core - Rename CefSharp.Core.Runtime RefAssembly source file

* Net Full - Generate CefSharp.Core.Runtime Ref Assembly

For now the powershell build script generates the .cs file based on a x86 release build.ps1
It's not possible to directly install GenApi as it requires a Sdk style project

* Net Core - Old packages copy files to required folders

* Test - Install newer .Net Compiler and set Lang Version to 7.3

* Net Core - Exclude Net 452 Runtime generated reference source

* Core - Add Refactoring TODO

* Ref Assembly - Generate source as part of build

- Move ref assembly source generate into GenerateRefAssemblySource.ps1
- Call before project build

Runs locally, see if Appveyor has a problem with the powershell script execution

* Core - Add more factory methods to create instances of managed wrappers

* Net Core - Make Initialzier properties internal

Not quite sure what the public API should look like as yet, so making internal for now.
2020-12-16 10:47:34 +10:00
amaitland f11785e44b Core - Fix some compiler warnings 2020-08-18 18:08:09 +10:00
amaitland a0d90788aa WPF - IME change background colour to transparent
Follow on to #3143
2020-07-23 15:23:29 +10:00
Konstantin Preißer 5e89f71a44 Add new projects targeting .NET Core 3.1 (#3181)
* Add .NET Core 3.1 projects for CefSharp, CefSharp.Core, CefSharp.BrowserSubprocess.Core, CefSharp.WinForms, CefSharp.Wpf, CefSharp.OffScreen.

Contributes to CefSharp#2796

* - Remove dependencies to "opengl32.lib" and "glu32.lib" which aren't available for ARM64 and don't seem to be needed.
- Clean up project files.

* Switch project CefSharp.netcore.csproj to AnyCPU as it doesn't require different builds for each platform.

* Remove WindowsTargetPlatformVersion property as that is declared in CefSharp.props.

* Use "bin.netcore" and "obj.netcore" as [intermediate] output path for the .NET Core projects, to allow side-by-side builds with the .NET Framework projects.

* Output documentation files.

* Add CefSharp.Example.netcore and CefSharp.WinForms.Example.netcore.

* Follow-up: Remove properties from the example projects that are also not used in the corresponding .NET Framework projects.
2020-07-23 15:21:14 +10:00
Roh yeon jin f9acbdfde5 WPF - IME Transparent Text Background (#3143)
* The background color of ime text has been changed to transparent.

* added static methods on imehandler for set background color or underline color through wpfimekeyboardhandler constructor.

* changed codes for a pull request

* removed unused a method

* clean up codes

Co-authored-by: 노연진(Roh Yeonjin)(nyjin) <nyjin@ncsoft.com>
2020-07-23 15:01:25 +10:00
amaitland 4a7625938c WPF - Improve GetModifiers(KeyEventArgs e) performance
Only get KeyboardDevice.Modifiers once as it's not a stored value, it's calculated
every call.
2020-05-21 20:16:44 +10:00
Alex Maitland 002edfb058 WPF - Add IME Support (#2757)
* WPF - Add initial IME implementation

* WPF - WpfImeKeyboardHandler handler code cleanup

- Restructure ImeHandler to be a static class as it really didn't maintain any state, now hwnd is passed in as param
- Renamed many of the methods to Ime for consistency (IME in all caps doesn't patch the naming convention used)
- The WpfIMEKeyboardHandler implementation is pretty much self contained now, only a single reference in ChromiumWebBrowser
also moved into Experimental folder/namespace
2019-05-04 12:32:38 +10:00
amaitland 3d14f19867 WPF - Add Experimental ChromiumWebBrowserWithTouchSupport
Based on #2745

Original author https://github.com/GSonofNun
2019-04-26 08:14:45 +10:00
João Neves 6692749728 WPF - Implement UpdateDragCursor (#2691)
* Close cefsharp subprocess if main process dies

* Implemented UpdateDragCursor

* Fixed braces position

* Added license header

* Fixed cursor flickering

* Added test

* Fixed build

* Fixed move cursor

* Fixed braces

* Simplified solution

* Fixed dropping Link effect

* Fixed encoding + Removed leftovers
2019-04-05 11:58:27 +10:00
amaitland a1ccca77b8 WPF - Keyboard handlers make Dispose/Setup methods virtual
Allows for extension of the existing keyboard handler
2018-12-27 21:45:03 +10:00
amaitland a10a5ef897 WPF - ChromiumWebBrowser.GetScreenInfo provide Rect and AvailableRect
Get monitor info based on handle (hwnd).

It's unclear if the coordinates need to be dpi scaled, revisit later if they do
2018-10-29 20:13:02 +10:00
Chris 30ee538ce0 Added EditorConfig (#2514) 2018-09-17 00:46:21 +02:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland a2451960d3 WPF IWpfKeyboardHandler Changes
- Make public so users can implement their own handler (the OSR IME patch can be rewritten as a IWpfKeyboardHandler)
- Formatting for consistency
- Make methods virtual

Follow up to #2056
2018-01-18 16:28:53 +10:00
João Neves a845e75432 Prevent accelerator keys to work when typing text (#2056)
* Call correct base method and handle text input in case event wasn't handled
* Removed SourceHook method
* Added previous keyboard handling logic and ability to use it through a property
2018-01-18 16:25:24 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland afe758eb51 Use GhostDoc to generate bulk xml documentation - it's not perfect at least a lot of the interface doco has been copied into the
ChromiumWebBrowser instance classes
2016-06-15 13:44:16 +10:00
Per Lundberg 5ad36a1778 Added support for drag & drop from input fields
There was a problem with the previous implementation. It worked correctly for many use cases:

- Dragging from a web app to a WPF control.
- Dragging from a WPF control to a web app.
- Dragging _html content_ from a web app to an input field

**But**: when dragging text from one input field to another, the text would vanish (!) when you drop it.

We debugged this here quite extensively. It turned out that if you have _set_ the `FragmentHtml` (even though you've set it to an empty string), it behaves like this. The solution is to avoid setting it if it is empty.
2016-01-29 09:26:27 +02:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland 93529cc845 Untabify 2015-07-28 11:16:02 +10:00
amaitland 4a70afeca3 WPF control - move some of the mapping methods into extensions, they could potentially be reused 2015-07-27 11:58:14 +10:00