[gtk+/client-side-decorations] Use GdkRectangle instead of MetaRectangle
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/client-side-decorations] Use GdkRectangle instead of MetaRectangle
- Date: Wed, 23 Jun 2010 21:14:07 +0000 (UTC)
commit a56ab0ab98eac240237b309e0320073179be1d0e
Author: Federico Mena Quintero <federico novell com>
Date: Thu Jun 10 15:10:46 2010 -0500
Use GdkRectangle instead of MetaRectangle
Both use int x/y/width/height anyway. We'll add whatever
meta_rectangle_*() functions are missing in GTK+ for
the theming code to work.
gtk/theme.c | 30 +++++++++++++++---------------
gtk/theme.h | 11 +++++------
2 files changed, 20 insertions(+), 21 deletions(-)
---
diff --git a/gtk/theme.c b/gtk/theme.c
index 3e90f4c..d6f8f8d 100644
--- a/gtk/theme.c
+++ b/gtk/theme.c
@@ -3440,7 +3440,7 @@ draw_op_as_pixbuf (const MetaDrawOp *op,
static void
fill_env (MetaPositionExprEnv *env,
const MetaDrawInfo *info,
- MetaRectangle logical_region)
+ GdkRectangle logical_region)
{
/* FIXME this stuff could be raised into draw_op_list_draw() probably
*/
@@ -3483,7 +3483,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
GdkDrawable *drawable,
const GdkRectangle *clip,
const MetaDrawInfo *info,
- MetaRectangle rect,
+ GdkRectangle rect,
MetaPositionExprEnv *env)
{
GdkGC *gc;
@@ -3820,7 +3820,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
case META_DRAW_OP_LIST:
{
- MetaRectangle d_rect;
+ GdkRectangle d_rect;
d_rect.x = parse_x_position_unchecked (op->data.op_list.x, env);
d_rect.y = parse_y_position_unchecked (op->data.op_list.y, env);
@@ -3829,7 +3829,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
meta_draw_op_list_draw_with_style (op->data.op_list.op_list,
style_gtk, widget, drawable, clip, info,
- d_rect);
+ d_rect);
}
break;
@@ -3838,7 +3838,7 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
int rx, ry, rwidth, rheight;
int tile_xoffset, tile_yoffset;
GdkRectangle new_clip;
- MetaRectangle tile;
+ GdkRectangle tile;
rx = parse_x_position_unchecked (op->data.tile.x, env);
ry = parse_y_position_unchecked (op->data.tile.y, env);
@@ -3891,7 +3891,7 @@ meta_draw_op_draw_with_style (const MetaDrawOp *op,
GdkDrawable *drawable,
const GdkRectangle *clip,
const MetaDrawInfo *info,
- MetaRectangle logical_region)
+ GdkRectangle logical_region)
{
MetaPositionExprEnv env;
@@ -3971,7 +3971,7 @@ meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
GdkDrawable *drawable,
const GdkRectangle *clip,
const MetaDrawInfo *info,
- MetaRectangle rect)
+ GdkRectangle rect)
{
int i;
GdkRectangle active_clip;
@@ -4040,7 +4040,7 @@ meta_draw_op_list_draw (const MetaDrawOpList *op_list,
GdkDrawable *drawable,
const GdkRectangle *clip,
const MetaDrawInfo *info,
- MetaRectangle rect)
+ GdkRectangle rect)
{
meta_draw_op_list_draw_with_style (op_list, gtk_widget_get_style (widget), widget,
@@ -4525,7 +4525,7 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
if (op_list)
{
- MetaRectangle m_rect;
+ GdkRectangle m_rect;
m_rect = meta_rect (rect.x, rect.y, rect.width, rect.height);
meta_draw_op_list_draw_with_style (op_list,
style_gtk,
@@ -4567,16 +4567,16 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
if (op_list)
{
- MetaRectangle m_rect;
+ GdkRectangle m_rect;
m_rect = meta_rect (rect.x, rect.y,
rect.width, rect.height);
meta_draw_op_list_draw_with_style (op_list,
style_gtk,
- widget,
- drawable,
- &combined_clip,
- &draw_info,
- m_rect);
+ widget,
+ drawable,
+ &combined_clip,
+ &draw_info,
+ m_rect);
}
}
diff --git a/gtk/theme.h b/gtk/theme.h
index e9369b1..0508595 100644
--- a/gtk/theme.h
+++ b/gtk/theme.h
@@ -24,7 +24,6 @@
#ifndef META_THEME_H
#define META_THEME_H
-#include "boxes.h"
#include "gradient.h"
#include "common.h"
#include <gtk/gtk.h>
@@ -826,7 +825,7 @@ struct _MetaTheme
struct _MetaPositionExprEnv
{
- MetaRectangle rect;
+ GdkRectangle rect;
/* size of an object being drawn, if it has a natural size */
int object_width;
int object_height;
@@ -904,7 +903,7 @@ void meta_draw_op_draw (const MetaDrawOp *op,
const GdkRectangle *clip,
const MetaDrawInfo *info,
/* logical region being drawn */
- MetaRectangle logical_region);
+ GdkRectangle logical_region);
void meta_draw_op_draw_with_style (const MetaDrawOp *op,
GtkStyle *style_gtk,
@@ -913,7 +912,7 @@ void meta_draw_op_draw_with_style (const MetaDrawOp *op,
const GdkRectangle *clip,
const MetaDrawInfo *info,
/* logical region being drawn */
- MetaRectangle logical_region);
+ GdkRectangle logical_region);
MetaDrawOpList* meta_draw_op_list_new (int n_preallocs);
void meta_draw_op_list_ref (MetaDrawOpList *op_list);
@@ -923,14 +922,14 @@ void meta_draw_op_list_draw (const MetaDrawOpList *op_list,
GdkDrawable *drawable,
const GdkRectangle *clip,
const MetaDrawInfo *info,
- MetaRectangle rect);
+ GdkRectangle rect);
void meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list,
GtkStyle *style_gtk,
GtkWidget *widget,
GdkDrawable *drawable,
const GdkRectangle *clip,
const MetaDrawInfo *info,
- MetaRectangle rect);
+ GdkRectangle rect);
void meta_draw_op_list_append (MetaDrawOpList *op_list,
MetaDrawOp *op);
gboolean meta_draw_op_list_validate (MetaDrawOpList *op_list,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]