Commit graph

3807 commits

Author SHA1 Message Date
Antonius Riha
b06ff4fd15 gio: Improve the Run method API in GLib.Application
We don't need an argc parameter, but the program name is required.

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2015-05-10 17:46:32 +02:00
Bertrand Lorentz
3680a39323 build: Bump mono dependency to 3.2.8
Mono 3.2.8 was released way back in February 2014, and is now available
in most current distros.

With mono, we now only use the "mcs" unified compiler. This also allows
us to build on systems where the compatibility script "gmcs" is not
available.
2015-05-10 17:16:00 +02:00
Mikkel Kruse Johnsen
8bf4dc10d9 3.14.6 2015-01-20 10:26:02 +01:00
Mikkel Kruse Johnsen
9cb9715654 Don't use API 3.12.0.0 just yet 2014-11-06 09:28:59 +01:00
Mikkel Kruse Johnsen
4efdb7c3aa Seperate pkgconfig version from package version 2014-11-05 15:06:03 +01:00
Mikkel Kruse Johnsen
cfb2f3f862 Install cairo-api.xml 2014-11-05 14:43:53 +01:00
Mikkel Kruse Johnsen
d445b4943e Fix conditional in Makefile.am 2014-11-05 08:59:19 +01:00
Mikkel Kruse Johnsen
4c4e2a8754 Remove utf8 variant. Not used anymore on windows 2014-11-05 08:49:52 +01:00
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