Commit graph

722 commits

Author SHA1 Message Date
Andrés G. Aragoneses
74b6340d86 MSBuild: update some project files to account for recent changes 2013-08-23 23:56:23 +02:00
Jeffrey Stedfast
d3c1826c37 gtk: Handle a null Gdk.Event passed to CellRenderer.StartEditing()
Cherry-picked from the gtk-sharp-2.12 branch.
2013-08-18 18:32:21 +02:00
Andres G. Aragoneses
2e56a23e9f gtk: Track API changes (I- interface prefixes)
This includes changes to fix the build, and changes to custom code that
gets added to the generated code. I.e. TreeModel now becomes ITreeModel
2013-07-23 12:05:24 -05:00
Bertrand Lorentz
214532f684 Merge pull request #62 from knocte/automake_warnings
build: fix automake warning about preprocessor C flags
2013-07-23 09:37:18 -07:00
Andrés G. Aragoneses
10d3293d3f build: fix automake warning about preprocessor C flags
With automake version 1.13.2 (which comes in debian testing/jessie),
we were starting to get these warnings by default:

...
Running automake --foreign  ...
atk/glue/Makefile.am:16: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
gio/glue/Makefile.am:11: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
gtk/glue/Makefile.am:18: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
gtk/gui-thread-check/profiler/Makefile.am:8: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
pango/glue/Makefile.am:13: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
sample/opaquetest/Makefile.am:18: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
sample/valtest/Makefile.am:18: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Running autoconf ...
...

We simply follow the warning's recommendation of using AM_CPPFLAGS instead
(CPP meaning C PreProcessor, not C Plus Plus), as explained in
http://www.gnu.org/software/automake/manual/html_node/Program-Variables.html

The deprecation of INCLUDES has been very long there already (since 2002,
therefore Automake 1.7), and we already depend on automake 1.10.
2013-06-17 10:59:28 +02:00
Bertrand Lorentz
2d34ed8351 gtk: Remove unused P/Invoke in IconTheme
Now that it uses the Marshaller, IconTheme doesn't call g_strfreev
directly anymore.
2013-04-21 16:39:52 +02:00
Bertrand Lorentz
7160437532 gtk: Remove invalid FileChooserDialog constructor
The ..._new_with_backend native function has been removed, so the
corresponding constructor must be removed.
2013-04-21 16:19:10 +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
eb5e9c7b74 gtk: Remove TreeViewColumn.CellRenderers property (bxc#8593)
The corresponding native function is gone in GTK 3, replaced by
gtk_cell_layout_get_cells.
2013-04-21 13:50:48 +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
91474fe1f1 gtk: Mark the whole Style class as obsolete 2012-11-18 15:55:03 +01:00
Bertrand Lorentz
761cb09260 gui-thread-check: Replace COPYING with the correct license
As indicated in the source code, and confirmed by the original author,
the gui-thread-check is licensed under the GPL v2.
2012-11-15 21:14:45 +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
Rickard Edström
8e07e7d225 Add a SynchronizationContext implementation for GLib (bnc#621444)
Create a GLibSynchronizationContext that sends code to be run on the
GLib main loop, and set it as the current SynchronizationContext in
Gtk.Init().

When you use the await keyword to do a task asynchronously, by default
the awaiter will capture the current SynchronizationContext, and if
there was one, when the task completes it’ll Post the supplied
continuation back to that context, rather than running it on whatever
thread it wants.

This means that if you use the async/await keywords in your Gtk# app,
things will now work as expected with the GTK main thread. For example:

static async void DoWork () // called in the GTK main thread
{
    // Do some stuff with the UI...
    label.Text = "Starting Work";

    // Run something asynchronously, UI is not frozen
    int res = await DoLongOperation ();

    // Do some more UI stuff, it'll run on the GTK main thread
    label.Text = "Work done";
}

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2012-11-08 22:33:46 +01:00
Bertrand Lorentz
2edff869fd gui-thread-check: Fix some compilation warnings 2012-11-04 18:16:22 +01:00
Bertrand Lorentz
bd41e1150d Add the gui-thread-check profiler module by Lluis Sanchez
This is a mono profiler module that can be used to detect when GTK or
GDK methods are called from a thread which is not the main GUI thread.

Thanks to Andrés Aragoneses for doing the work to bring this into Gtk#.
2012-11-04 18:00:56 +01:00
Bertrand Lorentz
6850b343ca gtk: Switch to generic collections in some classes 2012-11-04 16:58:50 +01:00
Andres G. Aragoneses
38e920996a gui-thread-check: Remove stock INSTALL file
It didn't contain any gui-thread-check's specifics.
2012-11-04 00:43:08 +00:00
Andres G. Aragoneses
3af6df2a2c gui-thread-check: Remove NEWS file (it was empty) 2012-11-04 00:42:22 +00:00
Andres G. Aragoneses
d58243149d gui-thread-check: Merge README with gtk-sharp's 2012-11-04 00:42:01 +00:00
Andres G. Aragoneses
0ed390b201 gui-thread-check: Remove AUTHORS
Lluis is already included in AUTHORS file of gtk-sharp.
2012-11-04 00:41:20 +00:00
Andres G. Aragoneses
38770b8917 gui-thread-check: Merge config/build infrastructure with gtk-sharp 2012-11-04 00:32:09 +00:00
Andres G. Aragoneses
ab447d924a gui-thread-check: Remove bogus Makefile.in
This is regenerate at every build (from Makefile.am) so
there's no need to store it in the repo. It must have been
included by mistake during the move.
2012-11-04 00:27:00 +00:00
Andres G. Aragoneses
797382180b Moved gui-thread-check subfolder inside gtk subfolder.
It's just really a profiler module facility for GTK, so it's not
related to the rest of the libraries/APIs that are not GTK and live
here.
2012-11-03 23:06:02 +00: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
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
Michael Hutchinson
b5e0d297bb Fix resurrection cycles in container subclasses (bxc#3801) 2012-10-13 15:07:03 +02:00
Michael Hutchinson
3a044d6faf Fix stack overflow in subclasses of managed containers 2012-10-13 15:06:51 +02:00
Bertrand Lorentz
446f2e7c7a gtk: Fix a small issue in the previous commit to IconTheme
The native array has an extra NULL element, so we pass the length of the
managed array, which is the real length of the array.
2012-09-05 22:40:50 +02:00
Carlos Martín Nieto
9c54fd5ae7 gtk: Use the GLib marshaller in IconTheme.SearchPath
This makes the code 64-bit clean (instead of assuming that a pointer
fits in a Int32) and simplifies the code.

Although the GTK doc doesn't say so, the C code shows the array is NULL
terminated, so we should be OK here.

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2012-09-05 21:16:54 +02:00
Bertrand Lorentz
54f5025375 gtk: Remove commented-out code from Gtk.Style
Gdk.GC is gone for good, so there no point in keeping anything that was
using it.
2012-08-05 19:42:34 +02:00
Bertrand Lorentz
140cad141f gtk: Remove the custom code for ColorSelectionDialog
It has been obsolete for quite a while, and had a scary warning.
2012-08-05 19:33:52 +02:00
Bertrand Lorentz
0b155d2603 gtk: Remove the custom code for Table
It was commented out anyway, and the Table widget is deprecated.
2012-08-05 19:12:22 +02:00
Bertrand Lorentz
4bc7edb4b1 gtk: Add license header in TreeModelFilter.cs
Copyright information is based on the data from "git blame -w"
2012-08-05 19:06:18 +02:00
Bertrand Lorentz
a8e1e8fd7d gtk: Re-indent code that was moved inside partial classes
No real code change in this commit, just whitespace changes.
2012-08-05 17:24:05 +02:00
Bertrand Lorentz
a410d42975 gtk: Move all .custom files to partial classes
There are no real code changes in this commit, just a lot of file
renaming and boilerplate additions.

A few .custom files are just removed, because the corresponding class in
GTK is gone, so they were not really used anymore.

Some files need to be re-indented, but that will be done in a separate
commit, so that git can track the renamed files correctly and not be
confused by all the changes.
2012-08-05 16:32:41 +02: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
d9bef0d869 gtk: Fix creation of ComboBox and ComboBoxText subclasses with entry
When creating a subclass of ComboBox with an entry, the has-entry
property was not initialized, leading to a crash when trying to access
the entry.

For subclasses of ComboBoxText, two other properties were not
initialized, leading to Gtk-CRITICAL error messages.
2011-12-05 19:14:05 +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
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
b14746d856 Fix build of gtk# by avoiding colision introduced with properties for ginterface 2011-08-02 19:27:22 +02:00
Olivier Dufour
f0579eb53d parser: Add property support for ginterface 2011-08-01 21:18:02 +02:00
Mike Kestner
fe776b3a48 Merge pull request #21 from bl8/gtk-settings-props
Gtk.Settings: Add all properties as a fixup
2011-08-01 07:45:00 -07: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