Commit Graph

464 Commits

Author SHA1 Message Date
Thibault Saunier
c7205a135d Do not use glue for GIO 2017-09-02 11:19:34 -03:00
Thibault Saunier
74a4cf71e3 meson: Build valtest 2017-09-02 11:19:34 -03:00
Thibault Saunier
4f388c6ef7 Add meson build definitions (#30) 2017-08-24 15:21:41 +02:00
Mikkel Kruse Johnsen
36b6b713e6 Updated to Gtk+ 3.20.4 2016-05-11 09:50:01 +02:00
MIkkel Kruse Johnsen
62b9345c7f Merge pull request #2 from orion75/gtk-sharp-3-14-branch
Gtk sharp 3 14 branch
2015-10-30 08:23:19 +01:00
Harol Alfonso Reina Herrera
751a5ceed5 Update References file's in csproj 2015-10-29 10:10:23 -05:00
Antonius Riha
d98f6c3421 csproj ToolsVersion to 4.0 2015-10-29 08:48:49 -05:00
Mikkel Kruse Johnsen
e34a6d7606 Return false if no border set 2015-09-04 13:21:17 +02:00
Mikkel Kruse Johnsen
95f59a7b5a Fix IScrollable and List class 2015-09-04 11:54:19 +02:00
Mikkel Kruse Johnsen
120b3ce9cd Merge remote-tracking branch 'upstream/master' 2015-07-24 07:42:55 +02:00
Stephan Sundermann
89b2dae6d8 sample: Fix compilation of opaque and val tests on osx
Using regular expressions for targets is not supported, that's why now a
generated-stamp is used to determine whether the files have been
generated. This bug might not be related to osx but newer automake
versions at least >= 1.14.1
2015-05-25 17:11:47 +02:00
Mikkel Kruse Johnsen
33722f0f15 Make samples able to compile 2014-11-03 15:53:22 +01:00
Bertrand Lorentz
324fc7b0e3 build: Fix distcheck by adding VariantDemo.cs in the tarball 2014-08-10 19:59:45 +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
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
Bertrand Lorentz
ae624a0048 GtkDemo: Add demo for theming style classes
This also demonstrates the use of Gtk.Builder to load .ui files.

Also simplify handling of resources in GtkDemo build: we don't need to
make a distinction between images and other resources.
2014-05-30 14:42:32 +02:00
Bertrand Lorentz
f6003f94a4 GtkDemo: Add a CssBasics demo to demonstrate CSS theming
The main difference with the C demo is that we can't use GResource, as
it's only in gio 2.32 and later, so '@import url("resource://...' won't
work. Instead, we use a separate CssProvider to apply reset.css.
2014-05-29 21:44:49 +02:00
Bertrand Lorentz
c15a1d18b5 GtkDemo: Add a Spinner demo
As the other samples in GtkDemo, this is straight translation of the C
demos in the GTK+ source tree under demos/gtk-demo/.
2014-05-29 18:25:42 +02:00
Bertrand Lorentz
b6e95af4a3 sample: Fix GtkDemo/DemoImages progressive update with recent gtk+ 2014-05-25 17:20:11 +02:00
Bertrand Lorentz
233614e18b sample: Fix GtkDemo/DemoImages.cs on Windows
Calling .PeekChar on a binary stream can cause an ArgumentException
because it tries to decode the byte.
2014-05-24 17:25:42 +02:00
Bertrand Lorentz
a6c9634748 build: Fix opaquetest build on Windows
Create 2 makefile variable to facilitate build on Windows:
GENERATED_SOURCES_FILES to match files created by the code generator,
and GENERATED_SOURCES_OPTION for the corresponding option to be passed
to the compiler.

Also adapt the makefile for the valtest sample to use these variables.
2014-05-24 17:25:39 +02:00
Bertrand Lorentz
80485a464d build: Fix Makefile of valtest and opaquetest samples
Some parts were not taking into account the fact that the generated code
is now in a subfolder.
2014-04-21 16:24:08 +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
2fcd276b9c build: Fix compiler parameters in gio and gtk-gio samples
Having parameters starting with a forward slash seems to break when
building with MinGW on Windows. So we use a dash to be consistent with
other Makefiles.

Also use the CSFLAGS variable in the sample/gio Makefile, instead of
hardcoding the debug flag.
2014-02-23 16:36:03 +01:00
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