Commit Graph

266 Commits

Author SHA1 Message Date
Mikkel Kruse Johnsen
8134f48a5a Generate 'rgba' property 2016-05-17 10:51:59 +02:00
Mikkel Kruse Johnsen
c1daeff0eb Made alias Symbol GdkRgba to GdkRGBA. This will provide properties of the type GdkRGBA in Gtk. 2016-05-17 08:59:19 +02:00
MIkkel Kruse Johnsen
28ba4876e3 Merge pull request #3 from orion75/gtk-sharp-3-14-branch
gtk: Fix return types for null_term_array* methods in AboutDialog
2015-12-02 10:40:51 +01:00
Mikkel Kruse Johnsen
a8d9a119d8 Update to Gtk 3.18.2
Had to change gapi2xml.pl to use the new properties method/macro in gtkwindow.c
- Issue, "invisible-chars" and "inner-border" is generated twice in gtkentry.c

Made patch to gwin32registrykey to use little endian by default. So Windows om ARM may fail.
2015-11-10 11:37:34 +01:00
Harol Alfonso Reina
4c65e70975 gtk: Fix return types for null_term_array* methods in AboutDialog
this corrects the properties Authors, Artists and Documenters
2015-11-06 13:46:10 -05:00
Mikkel Kruse Johnsen
e1cba4116a Rename RowActivated to ListRowActivated for ListBox 2015-09-04 12:08:06 +02:00
Mikkel Kruse Johnsen
95f59a7b5a Fix IScrollable and List class 2015-09-04 11:54:19 +02:00
nyx
eb227d8598 Removed CssProvider reference to unavailable interface GtkStyleProviderPrivate 2015-07-23 23:40:17 +03:00
Mikkel Kruse Johnsen
8bf4dc10d9 3.14.6 2015-01-20 10:26:02 +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
d33628d632 Updated to Gtk 3.12 2014-11-03 15:52:55 +01:00
Andrés G. Aragoneses
2967482762 Revert "gtk: Mark the Cairo.Context in Widget.Drawn as owned"
This reverts commit 21bfaa7a9d.

After fixing the memory leak when finalizing a Context object in the
previous commit, native crashes would happen when using a Gtk#-based
app. The reason is that this commit tried to fix the leak with the wrong
approach of marking the CairoContext as owned. This avoided the leak by
not incrementing the reference count, but now that the leak is fixed,
cairo_destroy is called one time too much.

The CairoContext passed in the Draw signal is not marked as
transfer-ownership=full in GObject-Introspection metadata. So unmarking
this as owned fixes the "potential double-free" assertion that was
causing the crash.
2013-11-03 17:01:34 +01:00
Bertrand Lorentz
fc9746013d gtk: Fix TreeView.GetTooltipContext method signature (bxc#14678)
The x and y parameters of gtk_tree_view_get_tooltip_context() are marked
as inout in the Gtk+ docs, so we need to mark them as ref.
2013-11-03 14:42:39 +01:00
Bertrand Lorentz
5f8e0953cf gtk: Use native function for GtkTextIter.Equals(GtkTextIter)
As GtkTextIter has no public properties, the default generated Equals
implementation would be "return true;". We now suppress that and with a
fix-up now use the native gtk_text_iter_equal to implement the Equals
method.
2013-10-10 16:28:37 +02:00
Bertrand Lorentz
f14eee3eb6 gtk: Fixup AccelMap.LookupEntry to have key as an out param (bxc#11367) 2013-04-21 14:39:18 +02:00
Bertrand Lorentz
253da2e05c Remove obsolete fix-ups for needs_ref attribute
The needs_ref attribute hasn't been used by the generator for quite some
time now.
2013-02-23 13:41:50 +01:00
Bertrand Lorentz
3b37e81b05 gtk: Fix-ups to set the scope of a few callbacks 2012-11-15 18:18:37 +01:00
Bertrand Lorentz
3cce546661 gtk: Fix return types for IterList* methods in WidgetPath 2012-11-15 14:07:35 +01:00
Bertrand Lorentz
6809865526 gtk: Make the Group property for Radio* widgets a properly typed array
The Group property for all the Radio* classes (RadioAction, RadioButton,
RadioMenuItem and RadioToolButton) was exposed as a GLib.SList,
with its elements untyped.

We now hide the various Group properties and have custom code to handle
them correctly.
2012-11-15 12:05:45 +01:00
Bertrand Lorentz
d8aa4ab275 gtk: Fix-up return type for some methods returning lists 2012-11-15 11:58:18 +01:00
Bertrand Lorentz
c312fb739c gtk: Move interface declaration from fix-up to custom code
As we now use partial classes for custom code, we can put additional
interface implementation declaration in the custom code, instead of
adding it through a fix-up.

Side-note: I thought about moving to IEnumerable<T>, but ListStore is a
list of objects anyway, and Container is an array of Widgets, so there
wouldn't be much benefit from type safety.
2012-11-03 17:50:05 +01:00
Bertrand Lorentz
c3b3036441 gtk: Fix return type of RecentChooser.GetUris
The native function returns a NULL-terminated array of strings, so add
this as a fix-up.
2012-11-02 19:48:02 +01:00
Mike Kestner
8a0d28372c Merge pull request #31 from bl8/cairo-fixes
Cairo fixes
2012-03-28 20:04:06 -07:00
Bertrand Lorentz
a804895ce6 Add fix-ups so that missing properties are generated
A few properties would not be generated, as a property with the same
name already exists in the Widget class. To resolve this, we mark the
corresponding accessors as new.
2011-12-10 14:53:47 +01:00
Bertrand Lorentz
21bfaa7a9d gtk: Mark the Cairo.Context in Widget.Drawn as owned
We shouldn't increase the reference count on the native cairo context
when we get it as a signal parameter, so we mark it as owned.
2011-12-04 22:39:52 +01:00
Bertrand Lorentz
7c61e2bdc0 Remove custom code for PrintContext.CairoContext
As Cairo.Context is now marked as an ownable, the accessor generated
for PrintContext.CairoContext will be equivalent to what was in the
custom code.
2011-12-04 22:39:52 +01:00
Olivier Dufour
b14746d856 Fix build of gtk# by avoiding colision introduced with properties for ginterface 2011-08-02 19:27:22 +02:00
Bertrand Lorentz
ecc2fa29fa Gtk.Settings: Add all properties as a fixup
In gtksettings.c, properties are installed using a custom function. So a
few properties were added as custom code. Move those as a fixup, and add
all the other properties too.

The only missing properties now are gtk-im-preedit-style and
gtk-im-status-style, because their type is hidden.
2011-07-31 15:29:48 +02:00
Mike Kestner
da1481b23d Mark Widget::draw as manually marshaled
* gtk/Gtk.metadata: Widget draw signal has a cairo_t param that is
    problematic to marshal as a GLib.Value.  Manually marshal it.
2011-07-28 17:16:28 -05:00
Bertrand Lorentz
a529ca3a94 Temporary quick fix for properties in interfaces without accessors
The interface parsing fix added a few properties on interfaces that have
no accessors. In this case, the code generated in the adapter for those
properties does not build: it tries to use (Get/Set)Property but they
don"t inherit from Glib.Object.

Hide those properties for now, until a proper fix is implemented. As
they were not available before, it's not that bad.
2011-07-08 20:12:07 +02:00
Bertrand Lorentz
139191f537 Fix naming collisions created by the interface parsing fix
The previous commit added several new signals in Gio.ActionGroup and
Gtk.GtkCellEditable that collide with method names. Do some rename
to fix this.
2011-07-08 20:12:07 +02:00
Bertrand Lorentz
a85ebc481f Remove opaque attr from Gtk.Border and fixup some StyleContext methods 2011-07-03 13:32:35 +02:00
Mike Kestner
ebc40cd400 Merge pull request #8 from bl8/update-samples
Update most remaining samples to the new APIs
2011-06-29 17:53:03 -07:00
Bertrand Lorentz
5568a568a7 Have Dialog.ActionArea return a ButtonBox instead of a HButtonBox
The action area is created as a GtkButtonBox, so casting it to a
GtkHButtonBox doesn't work. And GtkHButtonBox is going to be deprecated
in 3.2 anyway.
This fixes a crash when accessing Dialog.ActionArea. With this,
everything in sample/test seems to work OK.
2011-06-19 12:26:33 +02:00
Bertrand Lorentz
ef74b70ce6 Various return-type fix-ups in Gtk.metadata
Add element_type and ownership information for the return type of
various methods.
2011-06-12 22:15:51 +02:00
Mike Kestner
f3c7384701 Widget.GetPreferredSize out params
* gtk/Gtk.metadata: out params on Widget.SetPreferredSize
2011-06-05 20:33:18 -05:00
Mike Kestner
c6a3bf4b73 Fix TextBufferSerializeFunc signature
* generator/CallbackGen.cs: connect return value count parameters
* generator/ManagedCallString.cs: out count params aren't special
* generator/MethodBody.cs: don't finish hidden params
* generator/Parameters.cs: explicit IsCount setting support, with
    Parameters.GetCountParameter(name) interface. Clear IsCount
    values during validation if they have no associated array. Any
    remaining count params must be associated with a retval, so
    hide them.
* generator/ReturnValue.cs: support array_length_param attribute to
    associate a return value with a "count" param.  Use new helper
    methods to marshal these array retvals to IntPtr and back.
* glib/Marshaller.cs: support for byte[] marshaling to and from
    IntPtr using a count and type in the from native direction.
* gtk/Gtk.metadata: mark TextBufferSerializeFunc return type as
    an array with the length specific in the length param.
2011-04-28 18:38:07 -05:00
Mike Kestner
07cd515482 mark Render.IconPixbuf retval owned.
* gtk/Gtk.metadata: gtk_render_icon_pixbuf transfers ownership of the
     returned pixbuf so mark it owned.
2011-04-26 08:11:59 -05:00
Mike Kestner
0d315af7a6 Add the gtk_render_* methods to StyleContext
* gtk/Gtk.metadata: hide the Render class
* gtk/Makefile.am: build the new file
* gtk/StyleContext.cs: instance methods for the gtk_render_* api using
    the internal generated Render class.
2011-04-21 12:10:36 -05:00
Mike Kestner
9e5e8e5491 StyleContenxt and GdkRGBA property cleanup
* gtk/Gtk.metadata: properties of type GdkRGBA get converted to
   type="GdkRgba" by the parser name mangling.  Manual fix those
   and clean up the lists, ellipsis, and out param API in the new
   StyleContext object.
2011-04-21 10:49:39 -05:00
Mike Kestner
e79c46cdcb Cleanup remaining fixup mismatches in Gtk.
* gtk/Gtk.metadata: remove dead rules
2011-04-20 10:09:56 -05:00
Mike Kestner
713f7ae892 Remove some dead metadata rules.
* gtk/Gtk.metadata: remove mismatched rules from prior release
2011-04-18 10:14:15 -05:00
Mike Kestner
880c332174 Remove opaque attr from Gtk.Requisition
* gtk/Gtk.metadata: set opaque=false for GtkRequisition.
2011-04-15 13:40:24 -05:00
Andrés G. Aragoneses
3ee97db664 Gtk: Set param as "out" for Widget.GetRequisition in metadata.
This way it will be converted to a property as it was in Gtk# < 3.0
Fixes bug http://bugzilla.novell.com/687823.
2011-04-15 12:54:57 +02:00
Andrés G. Aragoneses
ae67076d76 Gtk: Set param as "out" for StyleContext.GetBackgroundColor.
Fixes bug http://bugzilla.novell.com/687551
2011-04-15 12:17:57 +02:00
Mike Kestner
cc32e0ef71 Fix TreeViewDemo build
* gtk/Gtk.metadata: mark GetContentArea return as a GtkBox* and
remove some unmatched fields on GtkDialog.
* sample/TreeViewDemo.cs: use Dialog.ContentArea instead of VBox.
2011-02-09 18:23:18 -06:00
Mike Kestner
34c0ecbcf7 The rest of the first pass.
*.*: Stubbing and tweaking and cajoling and disabling to get
the first successful build of 3.0 bindings.
2011-02-08 22:15:37 -06:00
Mike Kestner
cc18369e73 2010-05-10 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata: mark Widget.CreatePangoLayout retval as owned.
	[Fixes #604050]

svn path=/trunk/gtk-sharp/; revision=157087
2010-05-11 01:42:52 +00:00
Mike Kestner
536c3aca54 2009-11-30 Mike Kestner <mkestner@novell.com>
* generator/Method.cs: support win32_utf8_variant attribute on methods.
	* glib/*.cs: support win32 utf8 variant methods.
	* gtk/*.custom: support win32 utf8 variant methods.
	* gtk/Gtk.metadata: mark some win32_utf8_variant methods.
	  [Fixes #550961] Adapted from a patch by Tor Lillqvist.

svn path=/trunk/gtk-sharp/; revision=147113
2009-11-30 17:39:11 +00:00
Mike Kestner
e50ee63f0d 2009-09-16 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata: hide StatusIcon.GetGeometry for custom impl.
	* gtk/StatusIcon.custom: custom GetGeometry implementation to avoid
	marshaling exceptions on win32.  [Fixes #518169]

svn path=/trunk/gtk-sharp/; revision=142087
2009-09-17 00:54:38 +00:00