* Add Impl for SaveFilePickerWithResultAsync API (#19783)
* Add new SaveFilePickerWithResultAsync API to the base
* Add SaveFilePickerWithResultAsync stub impl
* Control Catalog SaveFilePickerWithResultAsync sample with XML and JSON types
* Make SaveFilePickerResult a struct
* Add managed picker implementation
* Make SaveFilePickerResult a readonly struct
* Windows implementation of SaveFilePickerWithResultAsync
* Test impl for dbus
* Reuse the file type object (FTO) so StorageFile consumer can match exactly the right FTO when receiving the SaveFilePicker's result.
* Add Gtk impl
* Avalonia.Native: surface selected save dialog filters
* macOS: report selected NSSavePanel filter
* Modify the conditional in case there's duplicate descriptions of FTO's in DBusSystemDialog.cs
* Instantiate FPFT as fallback
* Pass the mime/pattern to instantiated FPFT
* Update API diff
* Fix review comments
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
(cherry picked from commit 2c540873ec)
* api diff update
* dummy up tizen
* [OSX] Implemented IOSurface/MTLSharedEvent interop APIs
* Bump Xcode?
* Xcode?
* APIDiff
* Use different XCode versions because of how awesome appium is
* A hack for crapium
* Replace SkiaMetalApi usages
* Update API suppressions
---------
Co-authored-by: Timothy Miller <innerlogic4321@gmail.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
(cherry picked from commit 22c4c630ce)
* Implemented IClipboard.TryGetInProcessDataObjectAsync for X11
* [Win32] Implemented TryGetInProcessDataObjectAsync
* Rest of the platforms
* Run `nuke ValidateApiDiff`
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* fix accelerator behavior for menu items and labels
* add elements with matching accelerator to test cycling in sub menus
* Add AccessKeyHandler tests for accelerators with more than one match
* Implement accelerator behavior based on WPF handling
* Remove commented code
* Remove OnAccessKey override => handled by DefaultMenuInteractionHandler
* remove obsolete test
* handle OnAccessKeyPressed for selected tab item
* fix unit tests
* use AccessKeyEvent instead of AccessKeyPressedEvent in unit tests
* navigate menu with and without ALT key
* Revert formatting changes in Tests
* Fix AccessKeyHandler comments
* move private types to bottom
* Remove lock statements, optimize removal of AccessKeyRegistrations
* remove call to Dispatcher.UIThread.Post
* simplifiy AccessKeyHandler.SortByHierarchy
* remove unnecessary method AccessKeyHandler.GetTargetsForSender
* regenerate API suppression file
* revert unneeded changes in MenuPage.axaml
* correct formatting changes
* do not sort by hierarchy if too few targets
* make AccessKeyEventArgs internal
* make AccessKeyPressedEventArgs internal
---------
Co-authored-by: Hans Docsek <hans.docsek@gmail.com>
* Move automation interfaces to the Avalonia.Win32.Automation with DisableRuntimeMarshalling and use [GeneratedComInterface] marshalling
* Various fixes for the new windows accessibility
* Numerge Avalonia.Win32.Automation into Avalonia.Win32
* Suppress Avalonia.Win32 API warnings, these interfaces never were part of the public API
* Fix IRawElementProviderSimple2 definition on legacy COM interop
* Some changes after review
* More consistent COM method names
* Fix folder hierarchy
* Rewrite SafeArrayMarshaller to use arrays as managed type
* Add ManagedObjectWrapper where's possible
* Throw an exception for unsupported SafeArrayRef scenario
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Show Avalonia context menu and toolip...
In native text box in integration test app. Only implemented for win32 right now.
This is to test the two popup behaviors required for native controls:
- The context menu needs focus to be transferred to Avalonia
- The ToolTip must not transfer focus to Avalonia
* Added Popup.TakesFocusFromNativeControl.
By default, if a popup is shown when a native control is focused, focus is transferred back to Avalonia in order for the popup to receive input. If this property is set to false, then the shown popup will not receive input until it receives an interaction which explicitly focuses the popup, such as a mouse click.
The effect of this property can be seen in the Embedding tag of the IntegrationTestApp: hovering over the native text box shows an Avalonia `ToolTip` which does not steal focus from the native text box. Right-clicking to open an Avalonia `ContextMenu` does steal focus so the menu items can be selected using the arrow keys.
Currently only implemented on a win32.
* Show tooltip and context menu on macOS.
* Implement TakeFocus on macOS.
* Add integration tests.
Only tested on win32 so far.
* Integration tests won't work on macOS.
As can be expected at this point, really.
* Update API diff.
* Implement AvaloniaObject on ResourceProvider
* ColorPaletteResources and ColorPaletteResourcesCollection should inherit ResourceProvider
* Use ResourceProvider in tests too
* Adjust API diff
---------
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
* Mark RenderWorker as internal
* Add remaining Fonts.Tables types as internal
* Mark new diagnostic APIs as a PrivateAPI
* Restore old GetStyleDiagnostics APIs, but mark them with [PrivateApi], avoiding breaking changes
* Add CustomPopupPlacement API
* Add Placement="Custom" support for Flyout, ToolTip and ContextMenu controls as well
* Adjust some API changes
* Add Avalonia.Controls.Primitives.IPopupHost.ConfigurePosition breaking change
* Extract new types into separated files
* Fix build after merge conflict
* Adjust nupkg.xml
* Dispose property subscriptions after popup is closed, avoiding flickering
* Adjust API to be more future proof and add new parameters.
* Add new ContextRequestedEventArgs overload while I am on it
* Bump DBus stack
- Use new Variant system
* Fix merge issues
* Intentionally break the DBus spec
* Dispose DBus connection and signal watchers
* Bump Tmds,DBus.Protocol
* Dispose DBus objects correctly
* Use PathHandler for DBus objects
* Revert to old initialization
* Bump DBus packages
* Fix global menu
* Add comment about wrapped variants
* Bump Tmds.DBus.SourceGenerator
* Update api baseline
* Bump Tmds.DBus stack
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Android screen implementation, using Display API (with some fallbacks)
* Browser screen implementation, aditionally add JSObjectPlatformHandle
* iOS screens API implementation with UIScreenPlatformHandle
* Tizen screens implementation, pretty limited but should be better than nothing
* Reduce some API changes to make them more portable in the future
* Update api suppression
* Added Compositor.CreateCompositionVisualSnapshot API
* Hurr durr api compat in [Unstable] interface
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Draft new API
* Push reusable ScreensBaseImpl implementation
* Fix tests and stubs
* Update ScreensPage sample to work on mobile + show new APIs
* Reimplement Windows ScreensImpl, reuse existing screens in other places of backend, use Microsoft.Windows.CsWin32 for interop
* Make X11 project buildable, don't utilize new APIs yet
* Reimplement macOS Screens API, differenciate screens by CGDirectDisplayID
* Fix build
* Adjust breaking changes file (none affect users)
* Fix missing macOS Screen.DisplayName
* Add more tests + fix screen removal
* Add screens integration tests
* Use hash set with comparer when removing screens
* Make screenimpl safer on macOS as per review
* Replace UnmanagedCallersOnly usage with source generated EnumDisplayMonitors
* Remove unused dllimport
* Only implement GetHashCode and Equals on PlatformScreen subclass, without changing base Screen
* Replace "Active Styles" dev tools analysis with "Active Value Frames"
* Remove old diagnostic methods from public API (breaking change)
* Show full style selectors
* Avoid unnecessary value setters by checking if color was actually changed
* Run UpdateStyles from the dispatcher to fix flickering issue
* Fix build
* Add Close and ClearAll api for INotificationManager
* Remove notification card item on close
* Make _notificationCards readonly
* Clear _notificationCards when detached from visual tree
* Update Avalonia.nupkg.xml
* Use cancellationToken = default instead of null
* Rename ClearAll to CloseAll for consistency with Close method naming
* Remove cancellationToken param from Show method for better compatibility
* Update Avalonia.nupkg.xml
---------
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
* Update .NET runtime TypeScript definitions
* Get splash screen by classname instead of ID
* Minimize css usage
* Move insets css properties to JS file
* Refactor browser surface handling, re-enable software renderer, allow fallback render modes
* Extract render timer from the surface, try to reuse compositor instance between avalonia views
* ControlCatalog: Make it possible to set some browser properties (like render mode) from URI arguments
* Rename AppBundle folder to wwwroot
* Extract ITextInputMethodImpl into a BrowserTopLevelImpl
* Extract input into BrowserInputHandler
* Make default surface size 1,1 to match other backends
* Reformat code that I touched (for the most part)
* Why this method even was in public API
* Add .NET 8 target to packable projects
* Update test projects
* Update sample projects to target .NET 8
* Update main Avalonia package to target .NET 8 as well
* Remove MSBuildEnableWorkloadResolver hack and some minor change
* Use net8.0 in nuke build as well
* Pin 8.0.0 SDK
* Adjust API validation
* Pin a valid version
* Remove net461 target from Avalonia package
* Remove unused net6.0 target from Avalonia.Designer.HostApp
* Adjust API diff
* Update ControlCatalog.Android.csproj
* Remove MSBuildEnableWorkloadResolver
* Fix Browser issues on .NET 8
* Fix .NET 8 error
* Fix merge conflicts
* Replace explicit TFMs in .csproj files with a centralized registry
* Fix merge conflict
* Fix AvsLegacyWindowsTargetFrameworks and add hacks for the tests
* Update XCode project CommandLineArgument
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
* Fixed relative mapping mode for brushes (skia only, pending radial)
* Implemented separate RadiusX/RadiusY with proper mapping modes for RadialGradientBrush
* tests for conic brush
* Added tests for geometry drawing
* Updated DrawingBrush test image since it now matches WPF
* Update obsolete property usage
* Fixed D2D, updated radial test with D2D results that actually match WPF ones
* Fixed RadiusX/Y for radial gradients with non-centered origin
* Updated obsolete property usage
* Code cleanup
* Typo
* ApiDiff suppression
* Removed files for skipped test
* More info in obsoletion warning
* clarify
---------
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
* Remove Console support in DevTools
* Adjust breaking changes
* And remove Microsoft.CodeAnalysis
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>