Commit graph

305 commits

Author SHA1 Message Date
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
Bertrand Lorentz
30f758d984 gdk: Fix dll name and use a const for all DllImports in custom code
In Windows builds of GTK+ 3.x, the dll filename for GDK is
libgdk-3-0.dll.

We use this opportunity to use a common const in the DllImport for all
custom code.
2014-05-04 17:30:26 +02:00
Marcin Kolny
dee590926a build: Add a pkg-config file for gdk-sharp-3.0
This allows consumers to specifically require gdk-sharp-3.0 without
having to pull in the full gtk-sharp-3.0.

Closes issue #101.

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2014-04-21 21:36:57 +02:00
Stephan Sundermann
a74534e835 generator: Create a directory for each namespace
When dealing with several namespaces there might be classes with the same name
(especially Global which is autogenerated in g-i based bindings). On generation
the file would be overriden by the last occurence in the xml. To encounter
this every namespace has it's own directory now. This also improves structure
a lot when dealing with big libraries.

Also do the necessary adaption for the build and the csproj files.
2014-03-01 21:16:54 +01:00
Bertrand Lorentz
32d10bd319 Use GLib.Marshaller.Free instead of calling g_free directly
Using the GLib.Marshaller.Free method means we don't need to have the
g_free function definition duplicated all over the place.
2013-11-17 16:20:02 +01:00
Andrés G. Aragoneses
10546e2ffa MSBuild: fix the solution build (except audit and sample projects)
This commit makes it possible to build any project of the gtk-sharp.sln
from an IDE (except audit and sample projects, which require a bit more
work).

This doesn't mean that autotools is deprecated, but just that it is more
comfortable to use an IDE when working on gtk-sharp because it will
offer better auto-completion, and will stop highlight misleading
semantic errors, from now on.
2013-11-02 15:48:58 +01:00
Andrés G. Aragoneses
6f2d80eab0 gdk: enable Unsafe in MSBuild 2013-10-22 12:33:06 +02:00
Bertrand Lorentz
b2fb84d14b Clean up .gitignore files 2013-10-13 18:38:33 +02:00
Andrés G. Aragoneses
872e0edfdd MSBuild: remove AssemblyInfo.cs where it's not present
The only autogenerated AssemblyInfo files are in cairo and in
gtk-sharp's root, not inside other libraries like atk, glib, etc.
Removing them will make MonoDevelop stop rendering a red element
underneath each project.
2013-09-24 01:24:39 +02:00
Andrés G. Aragoneses
9016c304de MSBuild: change some projects to Library type, not Executable
Even though gtk-sharp cannot be built via MSBuild (yet?), it's better
to make the .csproj reflect more closely what you get with the normal
build.
2013-09-24 01:24:33 +02:00
Alan McGovern
100696b5c1 gdk: It is valid to pass a null gdk_event sometimes
For example gtk_drag_start allows a null Gdk.Event so we need to marshal
it to IntPtr.Zero instead of throwing a NullReferenceException

Cherry-picked from the gtk-sharp-2.12 branch.
2013-08-18 18:32:05 +02:00
Michael Hutchinson
38d1a3f13e cairo: Introduce the concept of reference ownership
Also:
  * improving naming consistency
  * obsolete old/broken stuff
  * clean up tabs/space mix

NOTE: this removes the wrapper caches for Pattern and Surface as
there was no reliable way to clear them.

This is a merge from changes in Mono.Cairo in mono 3.2.
2013-07-26 17:43:11 -05:00
Bertrand Lorentz
05f67db2ee gdk: Hide Global.TextPropertyToUtf8ListForDisplay method
It is implemented manually in TextProperty.ToStringListForDisplay.
2013-04-21 16:54:48 +02:00
Bertrand Lorentz
5e3b720408 gdk: Remove invalid method and P/Invoke in TextProperty
The native functions gdk_free_text_list and
gdk_text_property_to_utf8_list are gone, and we now need to use StrFreeV
to free the native string list.
2013-04-21 16:50:37 +02:00
Bertrand Lorentz
bc0aee1328 gdk: Remove invalid Global.DevicesList method
The native function gdk_devices_list is gone, device handling is now
handled through DeviceManager.
2013-04-21 16:42: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
6ecd2d01f9 gdk: Use a Dictionary to hold the filter functions in Window class 2012-11-04 16:58:49 +01:00
Bertrand Lorentz
608a760d45 gdk: Add reference to the GLib project in the .csproj 2012-11-04 16:58:49 +01:00
Bertrand Lorentz
47f3ca6ee5 gdk: Remove AddClientMessageFilter method from Gdk.Display and Global
The native function gdk_display_add_client_message_filter is gone from
GDK.

You can use Gdk.Window.AddFilter as a replacement.
2012-11-04 16:58:49 +01:00
Bertrand Lorentz
60612071c1 Add a MonoDevelop solution and projects for browsing the codebase
This is just to be able to use MonoDevelop to browse the codebase, both
custom and generated code. It is NOT intended to be used to build
anything.
2012-10-13 16:44:10 +02:00
Bertrand Lorentz
64a79b5621 gdk: Re-enable code using Device.NumAxes
As the Device.NumAxes is back now, we can re-enable the pieces of code
that were disabled during the inital port.
2012-07-02 11:23:29 -04:00
Bertrand Lorentz
15486fda75 gdk: Delete the commented out Window.ClearArea method
All the gdk_window_clear* methods were removed in GTK+ 3.0, so we can
remove the custom code that was ifdef'd out in the initial port.
2012-07-02 11:23:19 -04:00
Bertrand Lorentz
d2a93817a1 gdk: Move all .custom files to partial classes 2012-07-02 11:12:25 -04:00
Bertrand Lorentz
b79ac26063 gdk: Rename the Device.NAxes property to NumAxes
We had a NumAxes property in 2.12, coming from a field. It's now a
property called n-axes, with an accessor function, so we need to rename
both.
2012-07-02 10:43:28 -04:00
Mike Kestner
645815d478 Fix Pixdata buffer leak.
Patch provided by Antonio on gtk-sharp-list.
2012-04-22 11:47:28 -05:00
Bertrand Lorentz
ed9a01f5c2 gdk: Add a dllmap for libgio-2.0-0.dll
As Gdk.Pixbuf uses two functions from libgio, we need a dllmap for that
in gdk-sharp.dll.config.
2011-12-04 20:48:22 +01:00
Mike Kestner
aae2b05300 Implement IEquatable<T> on structs.
* gdk/Gdk.metadata: suppress Color.GetHashCode().
* gdk/Point.custom: remove generated methods.
* generator/StructBase.cs: Generate Equals(T), Equals(object), and GetHashCode.
* generator/StructField.cs: helper property for equality testing.
* gtk/TreeIter.custom: remove generated methods.
2011-10-07 21:55:26 -05:00
Olivier Dufour
2c83126846 Fix NRE in Gdk.Window.SetBackgroundPattern
If we set it to null background is set to parent brackground.
So we must handle null case and sent it to native.
2011-09-01 21:25:25 +02:00
Bertrand Lorentz
96a1f100c7 gdk: Fix up WindowWindowClass enum value names
WindowClass was renamed to WindowWindowClass so the fix ups were
incorrectly dropped.
2011-07-16 16:03:35 +02:00
Bertrand Lorentz
6e3ad5f7e3 gdk: Various fixups in Gdk.metadata
Unhide GdkDevice.GetState and hide the GdkColorInfo and GdkDeviceKey
private structs.

Specify the return types for several methods in GdkScreen, GdkDevice and
GdkDeviceManager.
2011-07-03 16:44:16 +02:00
Bertrand Lorentz
d17d94f07e gdk: Kill libgdksharpglue
The only remaining bits in gdk/glue were 2 obsolete functions, which
were not really used.

Also clean up Device.custom to remove obsolete bits, including
references to libgdksharpglue.
2011-07-03 16:44:16 +02:00
Bertrand Lorentz
3ff334d0cc gdk: Add explicit conversion to and from GLib.Value for Rectangle
This allows the valtest sample to compile and work.
2011-06-18 19:21:38 +02:00
Andrés G. Aragoneses
db40040fdc Gdk: Transform the out param of Rectangle.Union() to a return value.
Not only this is prettier but it's also aligned with the 2.12.x API.
2011-04-15 17:31:35 +02:00
Mike Kestner
571bd01356 Fix crashes in Gdk.Pixbuf.Savev
Patch from Bertrand Lorentz <bertrand.lorentz@gmail.com>

* gdk/Gdk.metadata: hide gdk_pixbuf_savev
* gdk/Pixbuf.custom: manually implement Savev to NullTerm the string[]
    parameters.

[Fixes #681111]
2011-04-06 11:01:39 -05:00
Mike Kestner
6be0718ff2 Simplified Signal handling
* gdk/Display.custom: rework signal connection
* gdk/Window.custom: rework signal connection
* generator/Signal.cs: generate for new API.
* glib/Object.cs: add (Add|Remove)SignalHandler methods and use
them for the Notify connections.  Move to generic collections for
everything but the Data hash.
* glib/Signal.cs: kill Lookup methods and add delegate fields
* glib/ToggleRef.cs: remove Signals hash, it doesn't belong here.
* gtk/Clipboard.custom: rework signal connection
* gtk/ListStore.custom: rework signal connection
* gtk/TextView.custom: remove obsolete signal
* gtk/TreeModelAdapter.custom: rework signal connection
* gtk/TreeModelFilter.custom: rework signal connection
* gtk/TreeModelSort.custom: rework signal connection
* gtk/TreeStore.custom: rework signal connection
* gtk/Widget.custom: rework signal connection
* gtk/Window.custom: remove obsolete signal
2011-03-24 18:33:24 -05:00
Mike Kestner
0a094c2662 Cleanup the Gdk build.
* gdk/Colormap.custom: kill dead code
* gdk/DeviceAxis.custom: kill dead code
* gdk/EdgeTable.custom: kill dead code
* gdk/Event.cs: remove dead ClientEvent mapping
* gdk/EventClient.cs: kill dead code
* gdk/GCValues.custom: kill dead code
* gdk/Gdk.metadata: remove a bunch of dead markup and add some new
* gdk/Input.custom: kill dead code
* gdk/Makefile.am: remove dead files
* gdk/PangoAttrEmbossColor.custom: kill dead code
* gdk/PangoAttrEmbossed.custom: kill dead code
* gdk/PangoAttrStipple.custom: kill dead code
* gdk/Region.custom: kill dead code
* gdk/RgbCmap.custom: kill dead code
* gdk/Window.custom: kill dead code
2011-02-18 22:00:34 -06:00
Mike Kestner
27b71b1982 Get Scribble sample working.
* cairo/cairo-api.xml: add the Content enum type and fix surface symbol.
* gdk/gdk-sharp.dll.config.in: s/3.0/3/ on the so name.
* sample/Makefile.am: enable scribble.exe build
* sample/Scribble.cs: rewrite for new API, specifically replace pixmap
drawing usage with cairo, and use OnDrawn in place of OnExposeEvent.
Also Made it a subclass of DrawingArea instead of handling events.
2011-02-15 10:19:07 -06:00
Mike Kestner
3ed7e0901e Update to Gtk+ 3.0.0 API.
* configure.ac: require gtk+-3.0.0 and glib-2.28.0
* gdk/gdk-api.raw: reparse
* gdk/gdk-symbols.xml: add alias for Window (XID) to gulong
* gtk/Plug.custom: update custom ctors to ulong XID versions.
* gtk/gtk-api.raw: reparse
* gtk/gtk-sharp.dll.config.in: change dllname remap to match 3.0.0 so.
* sources/.gitignore: fix glib and gtk+ dirs
* sources/Makefile.am: update to gtk+ 3.0.0
* sources/sources.xml: update to gtk+ 3.0.0
2011-02-12 15:30:20 -06:00
Mike Kestner
70d1b232f2 DllImport updates for gdk. 2011-02-10 21:16:05 -06:00
Mike Kestner
3d8c4e25fd Kill some unneeded #if GTK_SHARP_N checks
* gdk/Event.cs
* glib/Format.cs
* gtk/Builder.custom
* gtk/IconTheme.custom
* pango/Attribute.cs
Remove versioned code since it's all there in 3.0.
2011-02-09 10:28:31 -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
7d70a4313a Reparse and fix build for G_DEFINE_BOXED_TYPE
* gdk/PixbufFormat.custom: kill redundant Obsolete prop.
* gdk/Makefile.am: remove file.
* gdk/gdk-api.raw: reparse
* gio/Gio.metadata: hide a couple opaque fields.
* gio/gio-api.raw: reparse
2011-01-31 10:57:06 -06:00
Mike Kestner
955cdcf123 Update Gdk to the 2.99 API
* cairo/Surface.cs: expose LookupSurface
* cairo/cairo-api.xml: add surface mapping
* gdk/*: updates and hobbling to get gdk building.  lots of work
to come.
2011-01-30 22:49:15 -06:00
Mike Kestner
f6d11d67b6 Cairo# 1.10.0 assembly.
* configure.ac: drop cairo conditionality
* cairo/AssemblyInfo.cs: set version to 1.10.0.0
* cairo/Makefile.am: unconditional build and add Region.cs
* cairo/cairo-api.xml: initial type exposure.
* pango/Makefile.am: use cairo-sharp.dll and cairo-api.xml
* pango/Pango.metadata: drop explicit symbol additions.
* gdk/Gdk.metadata: drop explicit symbol additions.
* gdk/Makefile.am: use cairo-sharp.dll and cairo-api.xml
* gtk/Makefile.am: use cairo-sharp.dll and cairo-api.xml
* sample/Makefile.am: use cairo-sharp.dll
* sample/GtkDemo/Makefile.am: use cairo-sharp.dll

This is an initial stab at a 1.10 binding.  It will probably take
more based on the number of errors still coming out of the Gdk
build.
2011-01-30 17:00:03 -06:00
Mike Kestner
fe2d4c311a Flatten the bootstrap and remove glade-sharp
2010-11-21  Mike Kestner  <mkestner@novell.com>

	* removed the glade dir from the build since libglade is
	no longer supported in gnome3.  removed the gapi2-compat stuff
	since it doesn't make much sense now.  Removed the bootstrap
	mechanism since we are unlikely to be releasing multiple API
	versions from the same tree going forward.  The build is now a
	straight autogen.sh like most autotools projects.
2010-11-21 21:18:06 -06:00
Mike Kestner
e2ee3523de 2010-03-25 Mike Kestner <mkestner@novell.com>
* gdk/Rectangle.custom: off-by-one in Right/Bottom. [Fixes #591148]

svn path=/trunk/gtk-sharp/; revision=154205
2010-03-25 15:57:47 +00:00
Christian Hoff
7b752d233c 2009-09-03 Christian Hoff <christian_hoff@gmx.net>
* glib/Global.cs: Kill the calling convention field again.
	It breaks GLib 2.x compatibility in the generator and there is
	probably no need to make the calling convention configurable.
	* .cs, *.custom: Hardcode Cdecl calling convention instead of
	using GLib's field.

svn path=/trunk/gtk-sharp/; revision=141283
2009-09-03 19:50:53 +00:00
Christian Hoff
58e97c087a 2009-09-02 Christian Hoff <christian_hoff@gmx.net>
* glib/Global.cs: Add a public constant field specifying the
	calling convention used by GLib and depending libraries.
	By now it's hardcoded to Cdecl as every non-Win32 runtime
	should ignore this attribute.
	* *.cs, *.custom: Use GLib.Global.CallingConvention for both
	pinvokes and callbacks. Plugs a stack leak on Win32. All
	pinvokes defaulted to StdCall and thus the stack was never
	cleaned up.

svn path=/trunk/gtk-sharp/; revision=141175
2009-09-02 20:17:37 +00:00
Christian Hoff
1e97a1046f 2009-08-30 Christian Hoff <christian_hoff@gmx.net>
Complete the major version jump. Gtk# 3 and 2 are now both
	installable within the same prefix.

	* */glue/Makefile.am: Produce *sharpglue-3 gluelibs.
	* *.custom, *.cs: pinvoke the new glue library.
	* *-2.0.pc.in: Rename to *-3.0.pc.in.

svn path=/trunk/gtk-sharp/; revision=140941
2009-08-30 20:06:33 +00:00
Christian Hoff
b244c750d3 2009-08-12 Christian Hoff <christian_hoff@gmx.net>
* configure.in.in: Detect GDK backend.
	* */*.dll.config.in: Link against the libs of the correct GDK backend
	instead of using x11 on Linux/win32 on Windows.
	Patch by Christian Hergert.	[Fixes 527840]

svn path=/trunk/gtk-sharp/; revision=139750
2009-08-12 08:24:32 +00:00