[metacity/cowbell] add basic stuff from copper and got it compiling



commit 29e245b6decf4170ae3464df6f0eea19a02473be
Author: Thomas Thurman <tthurman gnome org>
Date:   Sat Oct 17 00:42:56 2009 -0400

    add basic stuff from copper and got it compiling

 configure.in   |    2 +-
 src/ui/theme.c |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index a6fe616..1004730 100644
--- a/configure.in
+++ b/configure.in
@@ -107,7 +107,7 @@ if test "x$GCC" = "xyes"; then
 fi
 changequote([,])dnl
 
-METACITY_PC_MODULES='gtk+-2.0 >= 2.10.0 pango >= 1.2.0 libcanberra-gtk'
+METACITY_PC_MODULES='gtk+-2.0 >= 2.10.0 pango >= 1.2.0 libcanberra-gtk gtk+-2.0 libccss-cairo-1'
 
 AC_ARG_ENABLE(gconf,
   AC_HELP_STRING([--disable-gconf],
diff --git a/src/ui/theme.c b/src/ui/theme.c
index ab0ab4f..79b3436 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -1,6 +1,11 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
 #include "theme.h"
+#include <string.h>
+#include <stdlib.h>
+#include <cairo.h>
+#include <ccss-cairo/ccss-cairo.h>
+#include <gtk/gtk.h>
 
 struct _MetaTheme {
   gboolean dummy;
@@ -8,6 +13,54 @@ struct _MetaTheme {
 
 MetaTheme the_theme;
 
+/****************************************************************/
+
+/* Our little hierarchy */
+typedef enum _CopperClasses {
+  CC_FRAME,
+  CC_CONTENT, CC_TITLEBAR,
+  CC_MENU, CC_TITLE, CC_MINIMIZE, CC_MAXIMIZE, CC_CLOSE,
+  CC_FILLER,
+  CC_LAST
+} CopperClasses;
+
+char *names[] =
+  {
+    "frame",
+    "area", "area",
+    "button", "title", "button", "button", "button",
+    "area",
+    "last"
+  };
+
+CopperClasses parents[] =
+  {
+    CC_LAST,
+    CC_FRAME, CC_FRAME,
+    CC_TITLEBAR, CC_TITLEBAR, CC_TITLEBAR, CC_TITLEBAR, CC_TITLEBAR,
+    CC_TITLEBAR,
+    CC_LAST
+  };
+
+char *copper_classnames[] =
+  {
+    NULL,
+    "content", "titlebar",
+    "menu", NULL, "minimize", "maximize", "close",
+    "filler",
+    NULL
+  };
+
+typedef struct
+{
+  ccss_node_t basic;
+  CopperClasses copper_class;
+} CopperNode;
+
+CopperNode copper_nodes[CC_LAST];
+
+/****************************************************************/
+
 MetaTheme*
 meta_theme_get_current (void)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]