Commit graph

3899 commits

Author SHA1 Message Date
Mikkel Kruse Johnsen c851bdc837 Ignore gui-thread-check on windows 2014-11-05 08:49:09 +01:00
Mikkel Kruse Johnsen 54eb84c40c Int size on 64 bit 2014-11-05 08:48:24 +01:00
Mikkel Kruse Johnsen 9df74498ed Update to cairo API 1.12 2014-11-03 16:11:56 +01:00
Mikkel Kruse Johnsen 2baa86a03e Include cairo in gapi 2014-11-03 16:11:39 +01:00
Mikkel Kruse Johnsen 33722f0f15 Make samples able to compile 2014-11-03 15:53:22 +01:00
Mikkel Kruse Johnsen d33628d632 Updated to Gtk 3.12 2014-11-03 15:52:55 +01:00
Mikkel Kruse Johnsen 5fc657a39c Generator problems in GtkWidgetClass 2014-11-03 15:50:20 +01:00
Mikkel Kruse Johnsen 61c921e5b2 Mark deprecated functions as Obsolete 2014-11-03 15:48:39 +01:00
Master T 08f4ae2eb4 glib: Check for self-assignment of Opaque.Raw property
This avoids unnecessary work, and prevents the IntPtr from being
freed when assigned to itself.

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2014-09-21 16:13:31 +02:00
Antonius Riha b75e7c82b6 gtk: Fix Builder xml definition loading
Gtk.Builder crashes when AddFromString(string) is called with a string
that contains a BOM. Hence, if the buffer contains a BOM, just skip it.

This fixes the crash with the Gtk# 3 project template in MonoDevelop
(robpvn/MonoDevelopGtkSharp3Template).
2014-09-21 15:49:10 +02:00
Antonius Riha a281a85f9d gtk: Use the same behavior in Builder constructor overloads
Each overload needs to call Assembly.GetCallingAssembly () explicitly,
otherwise the calling assembly would end up being gtk-sharp.
2014-09-21 15:45:00 +02:00
Antonius Riha 2034648ec2 csproj: Fix assembly names and include *.dll.config in output
Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2014-09-21 15:07:38 +02:00
Stephan Sundermann 69ea133855 glib: In Value.Update, check if val is null before updating
Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2014-09-21 14:29:53 +02:00
Bertrand Lorentz 324fc7b0e3 build: Fix distcheck by adding VariantDemo.cs in the tarball 2014-08-10 19:59:45 +02:00
Bertrand Lorentz 9a72bb67ff build: Post-release version bump to 2.99.4
Better late than never.
2014-08-10 19:52:32 +02:00
Stephan Sundermann 8e0de299e4 generator: Set Owned to false when ownership of a parameter changes
This fixes an issue where unref would get called too often because the
ownership has changed when passing an instance to the native side.

See https://github.com/mono/gtk-sharp/pull/112 for more details.
2014-08-10 18:35:19 +02:00
Stephan Sundermann 961b9ef348 glib: Add binding for GBytes
This patch adds bindings for GBytes https://developer.gnome.org/glib/stable/glib-Byte-Arrays.html

The code was first generated using gobject-introspection and then
refactored. The new type is also added to the generator SymbolTable.
2014-08-10 18:20:32 +02:00
Bertrand Lorentz fe0be81892 build: Require GLib 2.32 or above
GLib 2.32 has been released in March 2012, so we can now require it a
build and run time. This allows us to remove GLib 2.31 conditionals,
mark the Thread.Init as obsolete, and remove all references to
libgthread.

Please note that the API exposed in glib and gio is still from 2.28, but
we will have some API additions in the future. First example is the next
commit, which brings GBytes, an addition in GLib 2.32.
2014-08-10 18:20:01 +02:00
Stephan Sundermann 280087e431 Value: Don't try to marshal if type has no StructLayout
If the StructLayout is not set, StructureToPtr will throw an exception.
In these cases the type is probably wrapped using a handle and thus
needs no update.
2014-08-10 15:36:40 +02:00
Stephan Sundermann 1fab57eeac Value: First try to invoke a constructor with IntPtr, bool
In Cairo there the default constructor does not take a ref to the native
object making the object invalid when trying to access it.

This commit changes the behaviour to search for another constructor that
takes an owner variable which is set to false when invoked to indicate
that the managed side should take a ref.
2014-08-10 15:33:50 +02:00
Bertrand Lorentz 7ea0c4afaf glib: Fix native GLib warnings when disposing SourceProxy objects
When an instance of SourceProxy was finalized, we would try to remove
the corresponding source, even if it was already removed. This now
causes native GLib to print out warnings because it can't find the
source ID.

Now Source.Remove only calls g_source_remove if we really had a handler
registered for the ID we're removing.
2014-07-05 16:16:58 +02:00
Bertrand Lorentz f5211acb74 glib: Have SourceProxy implement the Dispose pattern
Its 2 subclasses, IdleProxy and TimeoutProxy, were already implementing
it, so we factor this implementation into the base class.
2014-07-05 16:07:39 +02:00
Bertrand Lorentz 813f56e00a glib: Refactor Source, Idle and Timeout classes
Turn Source.source_handlers into a private generic Dictionary, and add
the necessary methods to allow Idle and Timeout to add and remove
entries from it.

This improves the encapsulation of the Source class, and factors
into it some code that was previously duplicated in Idle and Timeout.
2014-07-05 16:07:28 +02:00
Bertrand Lorentz 11920f2add glib: Re-organize code in Source for better readability
Move stuff around to have them in a reasonable order: fields, then
constructors, then destructor, then static methods, then instance stuff.
Also remove a commented out method, which would not be correct anyway.

No real code change here, just cosmetic changes.
2014-07-05 13:00:50 +02:00
Bertrand Lorentz 83b602320a Merge pull request #109 from bl8/master
Variant: Fix crash when casting a Variant to string
2014-06-17 21:34:04 +02:00
Xavier Claessens 9559f579e6 Variant: Fix crash when casting a Variant to string
If we don't pass NULL to the length argument it makes C
code write the length at random places in memory and bad
things happens.
2014-06-17 21:16:38 +02:00
Bertrand Lorentz a1636d306b Variant: Add a NewArray (Variant[] children) convenience method
This allows you to avoid ugly calls like "NewArray (null, some_array)"
when you want the child type to be determined by the first element of
the children array.

Also throw specific exceptions when both type and children parameters
would be null.
2014-06-13 13:10:48 +02:00
Bertrand Lorentz b605b42540 Variant: Small code formatting fix 2014-06-13 13:10:02 +02:00
Xavier Claessens c271fe235b VariantType: Fix typo 2014-06-12 16:57:42 -04:00
Xavier Claessens 4158bc99f8 Variant: Add Type property 2014-06-12 16:48:03 -04:00
Xavier Claessens dc0f50729a Variant: Add ToArray() and ToAsv() helpers 2014-06-12 16:08:36 -04:00
Xavier Claessens 4c72b23216 Add Variant sample 2014-06-12 13:22:44 -04:00
Xavier Claessens 893703018f Variant: Add wrapper to construct "a{sv}" variant 2014-06-12 13:22:44 -04:00
Xavier Claessens cef9b13d72 Variant: Add wrapper for g_variant_new_dict_entry() 2014-06-12 13:22:44 -04:00
Xavier Claessens 58fb7aa378 Variant: Add wrapper for g_variant_new_array() 2014-06-12 13:22:43 -04:00
Xavier Claessens 24f8cede19 Variant: Add wrapper for g_variant_new_tuple() 2014-06-12 13:22:43 -04:00
Xavier Claessens b5062a8c7d Variant: Add wrapper for g_variant_new_variant() 2014-06-12 13:22:43 -04:00
Xavier Claessens b357aaef84 Variant: Add wrapper for g_variant_new_strv() 2014-06-12 12:30:29 -04:00
Xavier Claessens c1fbe27b32 Variant: Add wrapper for g_variant_print() 2014-06-12 12:05:35 -04:00
Bertrand Lorentz bc40506cab Merge pull request #107 from xDarkice/ambiguousmatch
glib.Value: Make GetMethod more specific to avoid ambiguous matches
2014-06-10 18:32:06 +02:00
Stephan Sundermann 839a32d797 Value: Make GetMethod more specific to avoid ambigous matches
This patch prevents GetMethod from throwing an AmbiguousMatchException because several constructors were found.
2014-06-10 15:25:39 +02:00
Bertrand Lorentz 3c54b8d78e release: Fix indentation of NEWS 2014-06-06 15:48:07 +02:00
Bertrand Lorentz 9c2e74d826 release: Update NEWS for 2.99.3 release 2014-06-06 15:45:11 +02:00
Bertrand Lorentz 34400a254b cairo: Remove FormatStrideForWidth and PathExtents methods from Context
Those methods are not in Mono.Cairo, and are not necessary for Gtk#, so
I'm assuming they are not really needed.

The idea is to have the same API as Mono.Cairo shipped with mono, so if
you need those methods, get them first in Mono.Cairo available at
https://github.com/mono/mono

Also move the HasCurrentPoint property to its logical place in the
source, next to CurrentPoint.
2014-05-30 16:21:53 +02:00
Bertrand Lorentz ae624a0048 GtkDemo: Add demo for theming style classes
This also demonstrates the use of Gtk.Builder to load .ui files.

Also simplify handling of resources in GtkDemo build: we don't need to
make a distinction between images and other resources.
2014-05-30 14:42:32 +02:00
Bertrand Lorentz f6003f94a4 GtkDemo: Add a CssBasics demo to demonstrate CSS theming
The main difference with the C demo is that we can't use GResource, as
it's only in gio 2.32 and later, so '@import url("resource://...' won't
work. Instead, we use a separate CssProvider to apply reset.css.
2014-05-29 21:44:49 +02:00
Bertrand Lorentz c15a1d18b5 GtkDemo: Add a Spinner demo
As the other samples in GtkDemo, this is straight translation of the C
demos in the GTK+ source tree under demos/gtk-demo/.
2014-05-29 18:25:42 +02:00
Andrés G. Aragoneses e52ff66c9d .gitignore: add autotools' compile
Since automake 1.14, autotools now generate a symbolic link named
`compile` in the root of the repository when running, so let's include
it in .gitignore to achieve a clean `git status` after compiling (or
avoid breaking the build via `git clean -fd`).

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2014-05-29 17:34:22 +02:00
Stephan Sundermann f38daf0d49 glib: Add GVariant to fundamental types
GVariant is a fundamental type since 2.26, this commit adds it to the
fundamental type list and adds operators to construct and convert from
and to a GValue.

https://developer.gnome.org/gobject/stable/gobject-Type-Information.html#G-TYPE-VARIANT:CAPS

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2014-05-29 17:11:47 +02:00
Bertrand Lorentz b6e95af4a3 sample: Fix GtkDemo/DemoImages progressive update with recent gtk+ 2014-05-25 17:20:11 +02:00