Commit Graph

437 Commits

Author SHA1 Message Date
Bertrand Lorentz
cf7aa5222e sample: Fix leak in Scribble sample when resizing the window 2013-12-01 16:06:50 +01:00
Bertrand Lorentz
694357cc5b build: Fix typo in sample/Makefile.am 2013-11-24 16:46:13 +01:00
Bertrand Lorentz
21b081b6a9 sample: Add sample that uses only cairo and writes image files
The sample writes the same PNG file over and over, with some pauses in
between iterations. Some indicative numbers are written to the console,
to help track performance and memory usage.

Feel free to add more elaborate drawing to this sample, to exercise more
of the cairo API.
2013-11-24 15:22:05 +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
Bertrand Lorentz
2d83fb3073 Move the fixup tool from the parser to the generator folder
The parser will be going away at some point in the future, but we
will still need the fixup step. And the fixup step is really more
of a preliminary step for the generator anyway.
2013-10-13 17:04:56 +02:00
Bertrand Lorentz
fb1b607e81 Add some missing files in sample.csproj 2013-09-22 16:44:26 +02:00
Bertrand Lorentz
4c08527389 sample: Update description of DemoDrawingArea GtkDemo sample 2013-09-22 16:43:43 +02:00
Andrés G. Aragoneses
26c7ef4cd9 sample: fix CustomScrollable sample to prevent too high Upper values
Upper values having higher values than PageSize or PageIncrement cause
rendering issues. This commit is a small adaptation of a fix from one
of the edge cases pointed out in this commit in hyena:
https://git.gnome.org/browse/hyena/commit/?h=gtk3&id=0745bfb75809886925dfa49a57c79e5f71565d08
2013-08-30 22:00:47 +02:00
Bertrand Lorentz
ebc5c048b4 Update Cairo samples for the latest API changes 2013-07-26 17:43:27 -05:00
Andres G. Aragoneses
99e4257a9f samples: Track API changes (I- interface prefixes)
This includes changes to fix the build.
2013-07-23 12:05:24 -05: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
7180011c22 Add and use gapi.xsd to validate GAPI XML files
The structure of a GAPI XML file is now defined by the XML schema in
gapi.xsd.

This XSD is now used by the generator to do a first sanity check on an
XML file before trying to generate code from it. Each generatable object
still does its own validation.

The XSD can also be seen as a documentation of the GAPI XML format, and
can be used by third-parties that produce GAPI XML to validate their
output.
2013-02-23 14:32:04 +01:00
Bertrand Lorentz
629a34aa4f generator: Improve handling of command-line parameters
Bundle Options.cs from the Mono source tree, and use it to parse the
command-line options for gapi-codegen. This gives us clearer code,
descriptions for each option, and a nice "--help" output.

This does not change the options syntax, except that -I|--include needs
to specified for each file to include. Two Makefiles in sample/ are
updated for that change.
2012-11-25 15:05:17 +01:00
Bertrand Lorentz
de6b6029ec sample: Fix crashes in TreeModelDemo 2012-11-17 17:53:40 +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
2bbee634d0 sample: Add AsyncSample to showcase GLibSynchronizationContext
Add a sample to illustrate the point of having a
GLibSynchronizationContext, but with the async/await code ifdef'ed out
because we don't require Mono 3.0 for now. Instead, provide a crude
equivalent of what would be generated by the compiler, to show that it
works.
2012-11-08 22:39:30 +01:00
Bertrand Lorentz
c65107a0c2 sample: Fix compilation warning in DemoHyperText 2012-11-04 18:25:08 +01:00
Bertrand Lorentz
8db4e785aa Update samples to use generic collections 2012-11-04 16:58:39 +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
2297695fd2 sample: Make the CustomScrollableWidget sample more elaborate
Make the custom widget a generic class, and add and use a derived class.
Also add a second instance of the custom widget, to better test the
interface properties support.
2011-12-03 16:41:21 +01:00
Olivier Dufour
37d15305a3 GInterface: Add properties support 2011-11-20 19:41:56 +01:00
Bertrand Lorentz
6e6d448cf2 DemoDrawingArea: Fix sample to actually do some drawing 2011-07-29 18:10:58 +02:00
Bertrand Lorentz
b2931f22c3 DemoColorSelection: Remove Drawn callback and preserve selected color
The drawing area is automatically cleared to the background color, so we
don't need a Drawn callback to do it ourselves.

Preserve the color selected in the color selection dialog, so that it's
pre-selected the next time the dialog is opened.
2011-07-29 18:10:36 +02:00
Mike Kestner
9e29be27d7 Add some missing references to samples 2011-07-18 10:40:12 -05:00
Bertrand Lorentz
bef589e836 gtk: Facilitate use of ComboBox and ComboBoxText with an Entry
Add ComboBox[Text] (bool with_entry) protected constructors to allow
subclasses with an Entry.
Add an Entry property for easy access to the Entry child widget.

Also remove the unused gtk/ComboBoxEntry.custom.
2011-07-16 15:45:30 +02:00
Mike Kestner
59e38f55dc Merge pull request #10 from bl8/various-fixes
Various build fixes, fixups and clean ups
2011-07-04 10:17:52 -07:00
Bertrand Lorentz
5c98eee787 build: add missing sample source in the tarball 2011-07-03 16:44:15 +02:00
Bertrand Lorentz
2656a5220c sample: Update CustomWidget sample and add it to the build 2011-07-03 13:32:35 +02:00
Bertrand Lorentz
75f9a8acb7 sample: Update CustomCellRenderer and add it to the build
The progress bar rendered by the CustomCellRenderer might not be visible
because of a bug in the default theme in GNOME 3. Applying the following
patch fixes that :
http://git.gnome.org/browse/gnome-themes-standard/commit/?id=756f2ea3
2011-07-03 13:32:35 +02:00
Bertrand Lorentz
c9a8500eac sample: Update TestDnd and add it to the build 2011-07-03 13:32:26 +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
505fc5ff0b sample: re-enable all samples in the build 2011-06-18 19:25:53 +02:00
Bertrand Lorentz
6811075122 sample: Update the "test" samples to the new APIs
Accessing Dialog.ActionArea triggers a crash, so some samples fail
because of that.
2011-06-18 19:23:53 +02:00
Bertrand Lorentz
6300effd3a sample: Fix gtk include in valobj.h 2011-06-18 19:21:38 +02:00
Bertrand Lorentz
58cd79d804 sample: Update valobj and opaque API definitions 2011-06-18 19:21:38 +02:00
Bertrand Lorentz
29716c8633 sample: Fix Makefile.am in valtest and opaque samples 2011-06-18 19:21:38 +02:00
Bertrand Lorentz
3a2f01c534 sample: Port all existing GtkDemo samples to the new APIs
The following samples crash because of an issue with the new Drawn
handler: ColorSelection, DrawingArea and Pixbuf.
The rest seem to work OK.
2011-06-18 19:21:21 +02:00
Bertrand Lorentz
c0c89957cb Update PolarFixed sample to remove obsolete warnings 2011-06-12 20:27:17 +02:00
Mike Kestner
5e6bd92b73 Fix NativeInstantiation sample/test
* sample/NativeInstantiationTest.cs: pinvoke the correct soname.
2011-02-15 10:27:54 -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
d757f1b63a Update the CairoSample.
* sample/CairoSample.cs: bring the code closer to current practice
and update the OnDrawn override to use AllocatedWidth and Height.
Sample now runs cleanly, though with a couple of cairo-sharp bitches
when finalizers run on contexts.
2011-02-12 16:31:50 -06:00
Mike Kestner
86e4b4c170 Update CairoSample to API 3.0
* sample/CairoSample.cs: replace OnExposeEvent with OnDrawn.
* sample/Makefile.am: include cairo-sample.exe in TARGETS.
2011-02-10 21:16:05 -06:00
Mike Kestner
c09e82a09f More sample build fixes.
* Makefile.am: reenable samples.
* sample/Actions.cs: s/Item/MenuItem, Item is dead.
* sample/NativeInstantiationTest.cs: fix dllimport, still crashes.
* sample/PolarFixed.cs: Fix size negotiation API usage, still crashes.
* sample/TreeModelDemo.cs: add ItemPrevious, still crashes.
* sample/Makefile.am: comment out some samples that don't build.
2011-02-09 20:05:37 -06:00
Mike Kestner
ace9176d4a Update NodeViewDemo to new API.
* sample/NodeViewDemo.cs: s/VBox/ContentArea again.
2011-02-09 19:29:44 -06: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
ac0b42f717 Kill Size sample
* sample/Size.cs: kill.  was a bug repro sample back in the early
days of broken struct marshaling.  No longer even demonstrates
proper size negotiation with 3.0 and other samples will, like
polarfixed.exe.
* sample/Makefile.am: remove size.exe
2011-02-09 18:12:07 -06:00
Mike Kestner
e8250641d6 Remove [IgnoreClassInitializers] usage.
* Subclass.cs: kill a no longer needed ignore attr.
2011-02-09 17:10:38 -06:00
Mike Kestner
96c8904219 Kill the glade samples.
* sample/Glade*.cs: remove
* sample/test.glade: remove
* sample/Makefile.am: remove glade files from dist and comment out SUDIRS
temporarily.
2011-02-09 16:58:50 -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
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