[metacity/cowbell] partial checkin: calc edges
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [metacity/cowbell] partial checkin: calc edges
- Date: Fri, 23 Oct 2009 16:04:50 +0000 (UTC)
commit 50593f20df7d4adf4575cde9e653d4dd79e40293
Author: Thomas Thurman <tthurman gnome org>
Date: Fri Oct 23 11:45:23 2009 -0400
partial checkin: calc edges
src/ui/theme.c | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index ba064ec..d215f2a 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -7,6 +7,10 @@
#include <ccss-cairo/ccss-cairo.h>
#include <gtk/gtk.h>
+/**
+ * Coordinates and sizes of part of the window.
+ * Only used within this file.
+ */
struct _CowbellArea {
/**
* Sizes of padding (except for the frame) plus
@@ -769,11 +773,31 @@ meta_theme_calc_geometry (MetaTheme *theme,
{
/* stub */
+ int i;
+
/* FIXME FIXME FIXME */
- /* This will cause leaks. We must provide a constructor and destructor fn. */
- g_free (fgeom->areas);
+ /* This will LEAK. We must provide a constructor and destructor fn. */
fgeom->areas = g_new0 (CowbellArea, CC_LAST);
+ /* First of all, we need to calculate the edges for each style. */
+ for (i=0; i<CC_LAST; i++)
+ {
+ /* We may want to do this inline if we end up not calling
+ * it from anywhere but here.
+ */
+ cowbell_get_edge_sizes (theme, type, flags,
+ i,
+ &(fgeom->areas->top_edge),
+ &(fgeom->areas->bottom_edge),
+ &(fgeom->areas->left_edge),
+ &(fgeom->areas->right_edge));
+ }
+
+
+ /****************************************************************/
+ /* Old stuff that needs rewriting is below here */
+ /****************************************************************/
+
/* see if we can write meta_theme_calc_geometry in terms of
* meta_theme_get_frame_borders
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]