[monet/vala] An attempt at using vala for a GTK+ theme engine
- From: Thomas Wood <thos src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [monet/vala] An attempt at using vala for a GTK+ theme engine
- Date: Wed, 23 Dec 2009 14:47:30 +0000 (UTC)
commit eb1d3e71824bda88dc54b85456ec4f2e132d599d
Author: Thomas Wood <thos gnome org>
Date: Wed Dec 23 14:47:23 2009 +0000
An attempt at using vala for a GTK+ theme engine
Makefile.am | 2 +-
configure.ac | 5 +
monet-gtk/AUTHORS | 2 -
monet-gtk/COPYING | 481 -----------------------
monet-gtk/INSTALL | 229 -----------
monet-gtk/Makefile.am | 10 +-
monet-gtk/autogen.sh | 19 -
monet-gtk/configure.ac | 38 --
monet-gtk/git.mk | 182 ---------
monet-gtk/mn-gtk-main.vala | 33 ++
monet-gtk/mn-gtk-rcstyle.vala | 12 +
monet-gtk/mn-gtk-style.vala | 18 +
monet-gtk/src/Makefile.am | 17 -
monet-gtk/src/main.c | 61 ---
monet-gtk/src/rcstyle.c | 126 ------
monet-gtk/src/rcstyle.h | 54 ---
monet-gtk/src/style.c | 375 ------------------
monet-gtk/src/style.h | 46 ---
monet-gtk/test/Makefile.am | 118 ------
monet-gtk/test/exported | 25 --
monet-gtk/test/gtkrcs/buildin | 12 -
monet-gtk/test/gtkrcs/noop | 12 -
monet-gtk/test/runinx | 42 --
monet-gtk/test/torture | 62 ---
monet-gtk/test/torturetest.c | 706 ----------------------------------
monet-gtk/test/valgrind-suppressions | 57 ---
26 files changed, 75 insertions(+), 2669 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8f06f80..e11186b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = monet tests
+SUBDIRS = monet monet-gtk tests
-include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index ea34037..1c6d7cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,11 +19,16 @@ PKG_CHECK_MODULES(MONET, [cairo glib-2.0 gobject-2.0])
AC_SUBST(MONET_LIBS)
AC_SUBST(MONET_CFLAGS)
+PKG_CHECK_MODULES(GTK, [gtk+-2.0])
+AC_SUBST(GTK_LIBS)
+AC_SUBST(GTK_CFLAGS)
+
MONET_MAINTAINER_CFLAGS="-Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self -Wmissing-declarations -Wredundant-decls"
AC_SUBST(MONET_MAINTAINER_CFLAGS)
AC_OUTPUT([
Makefile
monet/Makefile
+monet-gtk/Makefile
tests/Makefile
])
diff --git a/monet-gtk/Makefile.am b/monet-gtk/Makefile.am
index 178a5e6..89349a9 100644
--- a/monet-gtk/Makefile.am
+++ b/monet-gtk/Makefile.am
@@ -1,6 +1,8 @@
-SUBDIRS = src test
+AM_CFLAGS = $(MONET_CFLAGS) $(MONET_MAINTAINER_CFLAGS) $(GTK_CFLAGS)
+VALAFLAGS=--pkg cairo --pkg gtk+-2.0 --vapidir=$(top_srcdir)/monet
-test: all
- cd test && $(MAKE) $(AM_MAKEFLAGS) test
+enginedir = $(libdir)/gtk-2.0/2.10.0/engines
--include $(top_srcdir)/git.mk
+engine_LTLIBRARIES = libmonet-gtk.la
+libmonet_gtk_la_SOURCES = mn-gtk-style.vala mn-gtk-rcstyle.vala mn-gtk-main.vala
+libmonet_gtk_la_LIBADD = $(MONET_LIBS) $(GTK_LIBS)
diff --git a/monet-gtk/mn-gtk-main.vala b/monet-gtk/mn-gtk-main.vala
new file mode 100644
index 0000000..abea8a5
--- /dev/null
+++ b/monet-gtk/mn-gtk-main.vala
@@ -0,0 +1,33 @@
+using Gtk;
+using GLib;
+
+
+namespace Theme
+{
+ [ModuleInit]
+ public void
+ init (GLib.TypeModule *module)
+ {
+ stdout.printf ("init\n");
+ var type = typeof (Monet.RcStyle);
+ stdout.printf (@"type == $type\n");
+ type = typeof (Monet.Style);
+ stdout.printf (@"type == $type\n");
+ }
+
+ public void
+ exit ()
+ {
+ }
+
+ public Gtk.RcStyle *
+ create_rc_style ()
+ {
+ Gtk.RcStyle style;
+
+ style = new Monet.RcStyle ();
+
+ stdout.printf ("create rc style %p\n", style);
+ return style;
+ }
+}
diff --git a/monet-gtk/mn-gtk-rcstyle.vala b/monet-gtk/mn-gtk-rcstyle.vala
new file mode 100644
index 0000000..a633f11
--- /dev/null
+++ b/monet-gtk/mn-gtk-rcstyle.vala
@@ -0,0 +1,12 @@
+using Gtk;
+
+namespace Monet
+{
+ public class RcStyle : Gtk.RcStyle
+ {
+ public Gtk.Style create_style ()
+ {
+ return new Monet.Style ();
+ }
+ }
+}
diff --git a/monet-gtk/mn-gtk-style.vala b/monet-gtk/mn-gtk-style.vala
new file mode 100644
index 0000000..270f87e
--- /dev/null
+++ b/monet-gtk/mn-gtk-style.vala
@@ -0,0 +1,18 @@
+using Gtk;
+using Gdk;
+
+namespace Monet
+{
+ public class Style : Gtk.Style
+ {
+ public void draw_box (Gtk.Window window,
+ Gtk.StateType state_type, Gtk.ShadowType shadow_type,
+ Gdk.Rectangle area, Gtk.Widget widget, string detail,
+ int x, int y, int width, int height)
+ {
+ stdout.printf ("draw_box");
+ }
+ }
+
+
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]