Граф коммитов

34 Коммитов

Автор SHA1 Сообщение Дата
Aaron Bockover c6179c2317 Fully bind MaigreRcStyle as well
Does the same thing to MaigreRcStyle as the previous commit did
to MaigreStyle. Also added back a ThemeModule static class with
Init and Exit methods.
2010-11-10 17:17:54 -05:00
Aaron Bockover 839f7b3cda Make Maigre.Style a Gtk.Style at the managed level
Properly matched the managed binding at the class and object level
to MaigreStyle (native) and Maigre.Style (managed). When the native
class_init is called, the class is also configured statically on
the managed side. When the native init is called, the object is
configured on the managed side.

The GType is now configured on the managed class, so it can be
a full binding. Essentially Maigre.Style complements the only partial
binding of the stock Gtk.Style, but is fully compatible now in
existing managed code.
2010-11-10 16:05:11 -05:00
Aaron Bockover 7a59e46460 Make template inputs depend on the generator 2010-11-10 13:53:24 -05:00
Aaron Bockover 182040a26e Marshal GdkWindow as Gdk.Drawable
In some cases the actual GObject being passed to the theme is a
GdkPixmap, and so an InvalidCastException may be raised. GdkDrawable
is the parent class of GdkWindow and GdkPixmap.
2010-11-10 13:47:23 -05:00
Aaron Bockover afe34dec41 Set the name of the Maigre Mono domain 2010-11-10 13:46:56 -05:00
Aaron Bockover f53a33e90b Run twf if it's available 2010-11-10 13:46:37 -05:00
Aaron Bockover 461797eb7b Fixed Gdk.Rectangle marshalling typo. Sigh 2010-11-10 01:09:53 -05:00
Aaron Bockover 6864c33392 Fixed MONO_LIBS typo against 2.8 2010-11-10 00:34:30 -05:00
Aaron Bockover e0a6e95db1 Support building on Mono 2.8 and check for mako 2010-11-10 00:29:16 -05:00
Aaron Bockover 76b2ad0ca2 Added back the run target 2010-11-09 23:29:28 -05:00
Aaron Bockover 94c0d9033d Updated .gitignore 2010-11-09 23:18:28 -05:00
Aaron Bockover c19f86997e Fixed MD Makefile syncing 2010-11-09 23:18:04 -05:00
Aaron Bockover d1238e3da7 The build now distchecks 2010-11-09 23:13:22 -05:00
Aaron Bockover 8efa4a80a1 More build fixups and mako managed template 2010-11-09 22:57:07 -05:00
Aaron Bockover f5efb8710b Added maigre-style.c.in - a mako template 2010-11-09 16:57:43 -05:00
Aaron Bockover c8a301545d Partially ported to automake 2010-11-09 16:57:15 -05:00
Aaron Bockover 1372fd796d Use mako template engine for codegen 2010-11-09 16:50:04 -05:00
Aaron Bockover 8eff5fef85 Added a lame configure script 2010-11-09 15:10:41 -05:00
Aaron Bockover 59e66a425b Do a little button and focus drawing 2010-11-09 03:55:25 -05:00
Aaron Bockover b2f06cdbd9 Updated README 2010-11-09 03:33:10 -05:00
Aaron Bockover a5215f477e Updated README 2010-11-09 03:32:27 -05:00
Aaron Bockover 0c1f35e686 Properly support calling into parent draw methods
The way I was allowing for parent draw method invocation was incorrect,
since a call to base.DrawFoo on the managed side would not invoke
parent->draw_foo on the native side until the managed this.DrawFoo
returned.

Calls to base.DrawFoo now immediately invoke parent->draw_foo as
expected.

I also cleaned up the code formatting in the generator, building on the
textwrap module.
2010-11-09 03:29:47 -05:00
Aaron Bockover 3de3344a78 Restructured the code generator
Defined actual classes for the parser, methods, arguments, and
native+managed generators. These classes have a number of utilities
useful for generation. The previous code generator iteration was a
sloppy unreadable tangled mess, and I need to do delegate generation
now. Doing that without a reorg would have made me cry.
2010-11-09 01:30:41 -05:00
Aaron Bockover 638d911ccd Re-enabled ModuleInit/ModuleExit methods 2010-11-08 17:07:00 -05:00
Aaron Bockover db20e13bf7 Updated README 2010-11-08 17:06:39 -05:00
Aaron Bockover e8cc8ac7e2 More simplification through code generation
Moved the maigre-codegen project to be a plain generic MD project
2010-11-08 16:48:01 -05:00
Aaron Bockover 2a08e87010 Cleaned/reorged build
Moved libmaigre/maigre-gtk-style-generator to its own project,
maigre-codegen. Fixed up some makefile targets and integration.
2010-11-08 15:50:58 -05:00
Aaron Bockover 62590b85d8 Big honkin' redesign of Maigre
The binding generator now fully generates the native and managed side of
the GtkStyle implementation. All methods and properties are fully
automatically defined and bound on both sides.

On the managed side, the Maigre.Theme class is now an abstract class,
and new themes should subclass it. If one wishes to override a drawing
function, which are now proper virtual methods on Maigre.Theme, then the
method will be invoked for drawing. If a drawing method is not
overridden, the base GtkStyle drawing call will be made. Additionally
calling base.DrawFoo from the managed side will invoke the GtkStyle
parent method if desired.

All drawing arguments are presented as properties directly on the theme
object and are cleared and updated before each Draw call. Properties
that are not applicable to the current draw call will contain a default
value (e.g. null).

This implementation is much safer, since it's fully generated directly
from gtkstyle.h, smaller because there is less manual code, faster
because the native drawing context is blitted and directly marshalled
from native to managed (no more field_set calls), and properly object
oriented.
2010-11-08 14:52:16 -05:00
Aaron Bockover c0e166058b Added .gitignore 2010-11-07 14:04:26 -05:00
Aaron Bockover 800dc22a3a Proper Makefiles, MD integration, Cairo
Added Cairo extension methods/classes, organized the project a little
more, and added Makefile build support that integrates with the MD
projects.
2010-11-07 14:02:03 -05:00
Aaron Bockover 2ba270e4c1 Marshal arguments into a DrawContext structure
All Draw methods now take a single argument, DrawContext. This structure
contains properties for all possible Draw methods. Only properties valid
to the current Draw method will be set to non-default values.
2010-11-06 17:12:57 -04:00
Aaron Bockover 0cd59b45d0 Added README and COPYING 2010-11-05 17:47:16 -04:00
Aaron Bockover e482520015 Cleaned up 2010-11-05 17:39:22 -04:00
Aaron Bockover 574bf8f655 Initial Maigre import 2010-11-05 17:24:39 -04:00