Commit graph

289 commits

Author SHA1 Message Date
dmg f857cd7edf GapiCodegen: added support for deprecated constructors
Also added deprecation to manual constructors
2022-07-22 22:29:01 +03:00
dmg 931c15fed2 Fixed Pango+Cairo memory leak 2022-07-20 21:25:40 +03:00
zii-dmg b3acad8d3e
Fixed g_content_type_guess array parameter (#360) 2022-07-16 17:57:49 +02:00
zii-dmg ef3f9af525
Small not important API fixes (#329)
* SelectionBoxAlpha property is now generated.
* GtkRangeClass has correct ABI fields names.
* ColorHash is not generated but has correct type and already exists in manual code.
2022-06-15 13:22:58 +02:00
Mike c6112e72d2
Unhide EventHelper.HandlerSet method (#341) 2022-06-15 13:22:26 +02:00
lytico 0484f9fe58
GtkSharp-api.xml: fix TouchEvent event-type (#357) 2022-06-15 13:21:05 +02:00
Trung Nguyen 60376ae510
feat: GtkSharp net6 workload (#351)
* feat: GtkSharp net6 workload

* feat(Workload): GtkSharp template packs

* chore: Support .NET SDK 6.0.300

And also changed the build script to target SDK bands.

* build: Workload install and uninstall targets
2022-05-29 10:55:50 +02:00
Sebastien Pouliot fd3eb0c839 Add FileChooserDialog to samples app
This shows the original issue on macOS/arm64 (if the rest of the PR is
not applied)

```
GLib.GException: Invalid byte sequence in conversion input
   at GLib.Marshaller.FilenamePtrToString(IntPtr ptr) in /Users/poupou/git/external/GtkSharp/Source/Libs/GLibSharp/Marshaller.cs:line 62
   at GLib.Marshaller.FilenamePtrToStringGFree(IntPtr ptr) in /Users/poupou/git/external/GtkSharp/Source/Libs/GLibSharp/Marshaller.cs:line 68
   at Gtk.FileChooserDialog.get_Filename() in /Users/poupou/git/external/GtkSharp/Source/Libs/GtkSharp/Generated/Gtk/FileChooserDialog.cs:line 222
   at Samples.FileChooserDialogDemo.OnPressed() in /Users/poupou/git/external/GtkSharp/Source/Samples/Sections/Dialogs/FileChooserDialogSection.cs:line 28
   at Gtk.Button.Pressed_cb(IntPtr inst) in /Users/poupou/git/external/GtkSharp/Source/Libs/GtkSharp/Generated/Gtk/Button.cs:line 388
   at GLib.ExceptionManager.RaiseUnhandledException(Exception e, Boolean is_terminal) in /Users/poupou/git/external/GtkSharp/Source/Libs/GLibSharp/ExceptionManager.cs:line 58
   at Gtk.Button.Pressed_cb(IntPtr inst) in /Users/poupou/git/external/GtkSharp/Source/Libs/GtkSharp/Generated/Gtk/Button.cs:line 388
   at Gtk.Application.Run() in /Users/poupou/git/external/GtkSharp/Source/Libs/GtkSharp/Application.cs:line 115
   at Samples.Program.Main(String[] args) in /Users/poupou/git/external/GtkSharp/Source/Samples/Program.cs:line 44
```
2022-04-24 11:18:36 -04:00
Sebastien Pouliot 7391aac88d [glib] Fix g_filename_to_utf8 signature for 64 bits platforms 2022-04-22 21:01:12 -04:00
Sebastien Pouliot 75a3c2b652 [glib] Fix g_filename_from_utf8 signature for 64 bits platforms
Fixes https://github.com/GtkSharp/GtkSharp/issues/345
2022-04-22 15:41:14 -04:00
Sebastien Pouliot 411252bdf7 Fix loading native libraries on macOS (arm64) using homebrew installed gtk+3
brew used to install libraries under `/usr/local/` and GtkSharp still
expect this location.

7995f132e1/Source/Libs/Shared/GLibrary.cs (L55)

This fix will lookup the new library location `/opt/homebrew/lib/` if the
default ones (OS) or the `/usr/local/lib` could not load the libraries.

Reference: https://github.com/unoplatform/uno/issues/8296#issuecomment-1100435406

Fixes https://github.com/GtkSharp/GtkSharp/issues/249
2022-04-17 13:47:39 -04:00
zii-dmg e48e6e0380
Fix loading of resources if jit inlines method (#328)
Added no inlining attribute for methods with Assembly.GetCallingAssembly() so caller assembly is correct if jit want to inline.
See https://github.com/picoe/Eto/pull/2049.
2022-01-27 21:49:41 +01:00
zii-dmg 0c5bd3f471
Fixed glib source double removal (#327)
Fixed glib source double removal then using Source.Remove (Timeout.Remove, Idle.Remove).
I don't know if fix is correct or safe, but it solves problem that you can test in TimerDemo section from samples.

Repro:
If on Windows you should enable console in samples: <OutputType>Exe</OutputType>
Go to TimerDemo section and press buttons:

1. Add timer
2. Remove timer by handler
3. GC - no error in console

1. Add timer
2. Remove timer
3. GC - error in console "GLib-CRITICAL **: 20:29:41.579: Source ID 123 was not found when attempting to remove it"
2022-01-27 21:49:10 +01:00
Andrii Kurdiumov 50b87a49d4
Fix bunch of warnings from code analysis (#321)
Warnings produced complain that re-throw did not properly capture stack trace.
Given that these rethrow just to please compiler, I think it is better fix that.
2022-01-26 21:17:28 +01:00
Harry 4710fa1d06
Upgrade CAKE build system (#325)
* Upgrade CAKE build system

* fix paths
2022-01-26 21:15:32 +01:00
Andrii Kurdiumov b9826da789
Reduce usage of Type (#323)
Replace parts of marshaller responsible for lists/arrays with
AOT-friendly logic. Use generics where possible
2022-01-26 21:15:18 +01:00
zii-dmg c362ad1468
FileChooserNative: allow null parent, free memory (#322)
* FileChooserNative: allow null parent, free memory

Also make consistent whitespaces, new lines.

* Re-run checks
2022-01-26 21:08:42 +01:00
Andrii Kurdiumov 0b3795eb87
Disable loading of additional assemblies in AOT context (#314)
* Disable loading of additional assemblies in AOT context

AOT does not supports `Assembly.Load` and `Assembly.GetReferencedAssemblies()` when running AOT.
I opt-out of code which try to find type. In AOT context this means that you rely on dynamic type loading and you have issues anyway.

* Fix compilation errors
2022-01-26 17:52:54 +01:00
Harry 42ceb1c0d1
Multitarget with .net6.0 and .netstandard2.0 (#318) 2022-01-26 13:24:28 +01:00
zii-dmg bc5674ae06
Generalized Idle and Timeout, fixed Timeout.Add (#289)
Idle.Add, Idle.AddSeconds, Timeout.Add, Timeout.AddSeconds methods overloads are generalized:
* no priority (for default priority)
* enum priority (for standard priorities)
* int priority (for custom priority)
* overloads call main method with int priority

Fixed leak in Timeout.Add(priority): method was not using userData and DestroyHelper.NotifyHandler.
2022-01-25 19:58:52 +01:00
zii-dmg 0ec20fa7cd
Marked more style properties and extended xsd schema (#295)
Xsd for fewer generation warnings.
2022-01-25 19:57:13 +01:00
Andrii Kurdiumov 723fef9d8d
Use Marshal.GetFunctionPointerForDelegate<T> (#301)
This make code more trim friendly

Improve #300
2022-01-25 19:46:06 +01:00
dmg afc7ab450b Fixed containers child properties
* Fixed marshaling for reading child properties.
* Enabled child properties for Box, Grid, Stack in api xml.
* Added sample/test for using child properties (ChildPropertiesSection).
2022-01-25 19:41:30 +01:00
dmg 7ff80bcc8f Fixed sample for ListStore spinner
Spinner was not spining - should use SetValue, not SetValues.
Also fixed sln - VS2019 not want to open sln by double click in explorer - added empty line.
Also fixed sample project - VS2019 not showing all sources.
2022-01-25 19:41:09 +01:00
Cameron White 941fdb7e46 Implement Gdk.Pixbuf.SaveToStream() and SaveToStreamv()
This matches the other saving-related methods for Gdk.Pixbuf

- `gdk_pixbuf_save_to_stream` was skipped for the auto-generated bindings (with the warning "Ellipsis parameter: hide and bind manually")

- `gdk_pixbuf_save_to_streamv` was in the generated bindings, but incorrect: the `option_keys` and `option_values` arguments had type `string` rather than `string[]`
2022-01-25 19:33:31 +01:00
Andrii Kurdiumov 84f337b046
Update to .NET 6 (#315)
* Update to .NET 6

I update not only samples, but also codegen tools, because .NET 5 is not LTS and in 4 month would be out

Closes #306

* Add .NET 6.0 support to actual templates

* Dont forget about FSharp and VB.NET

* Revert choice option in parameters
2022-01-25 19:24:27 +01:00
lytico ff3c53f6c5 WebkitGtkSharp-symbols.xml: resolve GDateTime / GQuark 2022-01-11 15:24:53 +01:00
lytico 0281d7a353 WebkitGtkSharp: fix some symbols 2022-01-11 15:24:53 +01:00
Igor Vornovskii 1add3d8868 Implemented Editable Cells from gtk3-demo 2022-01-11 15:11:08 +01:00
Igor Vornovskii e82b07ede1 Implemented List Store from gtk3-demo 2022-01-11 15:11:08 +01:00
zii-dmg 73fd05d517
Fixed Pango.AttrList.Change (#288)
pango_attr_list_change takes ownership of attribute so we make copy (as in existing pango_attr_list_insert).
2021-10-15 16:29:47 +02:00
Andrii Kurdiumov 24392d01ea Make usage of Marshal.OffsetOf AOT friendly 2021-08-15 20:27:58 +06:00
lytico 116762af89
Merge pull request #261 from kant2002/kant/nativeaot-freidnly
Make Marshal.SizeOf AOT friendly
2021-07-24 02:14:50 +02:00
Andrii Kurdiumov 64f3f78c0f Address PR feedback 2021-07-22 19:40:38 +06:00
Andrii Kurdiumov 1b73bc8042 Address PR feedback 2021-07-21 00:38:34 +06:00
Andrii Kurdiumov 2c54a7824c Update based on PR feedback 2021-07-21 00:24:49 +06:00
lytico 69531abb9c Samples.csproj: WebviewSection: check for WebKit.Global.IsSupported 2021-07-20 01:52:18 +02:00
lytico e4b774da5f Webkit: merge changes & add WebKit.Global.IsSupported 2021-07-20 01:51:36 +02:00
lytico b2a5d08dd9 Merge remote-tracking branch 'origin/develop' into lytico/issues/269_GLibrary_issupported
# Conflicts:
#	Source/Libs/Shared/GLibrary.cs
2021-07-20 01:37:56 +02:00
lytico b56ef3b246
Merge pull request #271 from lytico/lytico/webkit2
Webkit2 -Support
2021-07-20 01:31:41 +02:00
lytico 48e2c06649 Samples.csproj: WebviewSection.cs: track api changes for WebView2 2021-07-20 01:24:53 +02:00
lytico c1b43bf0db WebkitGtkSharp: comment Atk.ImplementorIface,GtkBuildable, add WebKitAuthenticationRequest for GetCanSaveCredentials, ListTextFields 2021-07-20 01:18:10 +02:00
lytico f6c69f8632 GLibrary.cs Library.Webkit: use .37 2021-07-19 23:16:31 +02:00
lytico 96ad592ac1 GLibrary.cs Library.Webkit: cut the 0 in libwebkit2gtk-4.0.so 2021-07-19 23:02:48 +02:00
lytico 79097f669f Webkit: use WebkitGtkSharp-api.xml from WebKit2-4.0.gir & change lib to libwebkit2gtk-4.0.so 2021-07-19 22:12:43 +02:00
lytico 882140fd9d introduce IsSupported in <namespace>.Global 2021-07-19 20:13:14 +02:00
lytico 6b4cf555e0 GLibrary.cs: introduce IsSupported 2021-07-19 19:24:17 +02:00
lytico 6d40ae2437 Samples.csproj: add WebkitGtkSharp - sample 2021-07-19 18:11:36 +02:00
lytico 4790ecaa9b introduce WebkitGtkSharp 2021-07-19 18:11:04 +02:00
dmg fbe180d742 Added Cairo.Path properties
New properties on Path is lazy evaluated. Only reading is supported.
2021-07-17 17:05:21 +03:00