[gthumb] replace GdkRectanle with cairo_rectangle_int_t
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] replace GdkRectanle with cairo_rectangle_int_t
- Date: Tue, 25 Oct 2011 14:53:24 +0000 (UTC)
commit 47c212c72d2cefc68772ed9bc95348ab50fb651b
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Oct 16 11:32:42 2011 +0200
replace GdkRectanle with cairo_rectangle_int_t
.../contact_sheet/gth-contact-sheet-creator.c | 10 +-
extensions/contact_sheet/gth-contact-sheet-theme.c | 10 +-
extensions/contact_sheet/gth-contact-sheet-theme.h | 4 +-
extensions/file_tools/cairo-rotate.c | 2 +-
extensions/file_tools/cairo-rotate.h | 2 +-
extensions/file_tools/gth-file-tool-crop.c | 4 +-
extensions/file_tools/gth-file-tool-rotate.c | 2 +-
extensions/file_tools/gth-image-line-tool.c | 4 +-
extensions/file_tools/gth-image-rotator.c | 20 ++--
extensions/file_tools/gth-image-rotator.h | 2 +-
gthumb/cairo-utils.c | 2 +-
gthumb/cairo-utils.h | 2 +-
gthumb/gth-cell-renderer-thumbnail.c | 16 ++--
gthumb/gth-image-navigator.c | 2 +-
gthumb/gth-image-selector.c | 90 ++++++++++----------
gthumb/gth-image-selector.h | 4 +-
gthumb/gth-image-viewer.c | 14 ++--
gthumb/gth-image-viewer.h | 6 +-
gthumb/gth-menu-button.c | 2 +-
gthumb/gth-time-selector.c | 4 +-
gthumb/gth-toggle-menu-tool-button.c | 2 +-
gthumb/gtk-utils.c | 2 +-
22 files changed, 103 insertions(+), 103 deletions(-)
---
diff --git a/extensions/contact_sheet/gth-contact-sheet-creator.c b/extensions/contact_sheet/gth-contact-sheet-creator.c
index ab97d4d..5cd0dcb 100644
--- a/extensions/contact_sheet/gth-contact-sheet-creator.c
+++ b/extensions/contact_sheet/gth-contact-sheet-creator.c
@@ -544,8 +544,8 @@ paint_footer (GthContactSheetCreator *self,
static void
paint_frame (GthContactSheetCreator *self,
- GdkRectangle *frame_rect,
- GdkRectangle *image_rect,
+ cairo_rectangle_int_t *frame_rect,
+ cairo_rectangle_int_t *image_rect,
GthFileData *file_data)
{
gth_contact_sheet_theme_paint_frame (self->priv->theme, self->priv->cr, frame_rect, image_rect);
@@ -589,7 +589,7 @@ paint_frame (GthContactSheetCreator *self,
static void
paint_image (GthContactSheetCreator *self,
- GdkRectangle *image_rect,
+ cairo_rectangle_int_t *image_rect,
GdkPixbuf *image)
{
cairo_save (self->priv->cr);
@@ -705,7 +705,7 @@ export (GthContactSheetCreator *self)
ItemData *row_item = scan_row->data;
int frame_width;
int frame_height;
- GdkRectangle frame_rect;
+ cairo_rectangle_int_t frame_rect;
int text_y;
int i;
@@ -721,7 +721,7 @@ export (GthContactSheetCreator *self)
if (row_item->thumbnail != NULL) {
int thumbnail_width;
int thumbnail_height;
- GdkRectangle image_rect;
+ cairo_rectangle_int_t image_rect;
thumbnail_width = gdk_pixbuf_get_width (row_item->thumbnail);
thumbnail_height = gdk_pixbuf_get_height (row_item->thumbnail);
diff --git a/extensions/contact_sheet/gth-contact-sheet-theme.c b/extensions/contact_sheet/gth-contact-sheet-theme.c
index d307356..2d411ba 100644
--- a/extensions/contact_sheet/gth-contact-sheet-theme.c
+++ b/extensions/contact_sheet/gth-contact-sheet-theme.c
@@ -277,8 +277,8 @@ gth_contact_sheet_theme_paint_background (GthContactSheetTheme *theme,
void
gth_contact_sheet_theme_paint_frame (GthContactSheetTheme *theme,
cairo_t *cr,
- GdkRectangle *frame_rect,
- GdkRectangle *image_rect)
+ cairo_rectangle_int_t *frame_rect,
+ cairo_rectangle_int_t *image_rect)
{
int width;
@@ -487,10 +487,10 @@ paint_text (GthContactSheetTheme *theme,
static void
paint_thumbnail (GthContactSheetTheme *theme,
cairo_t *cr,
- GdkRectangle *image_rect,
+ cairo_rectangle_int_t *image_rect,
double font_scale)
{
- GdkRectangle frame_rect;
+ cairo_rectangle_int_t frame_rect;
/* frame */
@@ -537,7 +537,7 @@ gth_contact_sheet_theme_paint_preview (GthContactSheetTheme *theme,
int height)
{
double font_scale;
- GdkRectangle image_rect;
+ cairo_rectangle_int_t image_rect;
if (height < 200)
font_scale = height / 200.0;
diff --git a/extensions/contact_sheet/gth-contact-sheet-theme.h b/extensions/contact_sheet/gth-contact-sheet-theme.h
index 3631710..076c3ca 100644
--- a/extensions/contact_sheet/gth-contact-sheet-theme.h
+++ b/extensions/contact_sheet/gth-contact-sheet-theme.h
@@ -92,8 +92,8 @@ void gth_contact_sheet_theme_paint_background (GthContactShee
int height);
void gth_contact_sheet_theme_paint_frame (GthContactSheetTheme *theme,
cairo_t *cr,
- GdkRectangle *frame_rect,
- GdkRectangle *image_rect);
+ cairo_rectangle_int_t *frame_rect,
+ cairo_rectangle_int_t *image_rect);
void gth_contact_sheet_theme_paint_preview (GthContactSheetTheme *theme,
cairo_t *cr,
int width,
diff --git a/extensions/file_tools/cairo-rotate.c b/extensions/file_tools/cairo-rotate.c
index 350c6c1..373a8e9 100644
--- a/extensions/file_tools/cairo-rotate.c
+++ b/extensions/file_tools/cairo-rotate.c
@@ -89,7 +89,7 @@ _cairo_image_surface_rotate_get_cropping_region (cairo_surface_t *image,
double angle,
double p1,
double p2,
- GdkRectangle *region)
+ cairo_rectangle_int_t *region)
{
double angle_rad;
double cos_angle, sin_angle;
diff --git a/extensions/file_tools/cairo-rotate.h b/extensions/file_tools/cairo-rotate.h
index a22fda5..8ed6004 100644
--- a/extensions/file_tools/cairo-rotate.h
+++ b/extensions/file_tools/cairo-rotate.h
@@ -36,7 +36,7 @@ void _cairo_image_surface_rotate_get_cropping_region (cairo_su
double angle,
double p1,
double p2,
- GdkRectangle *region);
+ cairo_rectangle_int_t *region);
double _cairo_image_surface_rotate_get_align_angle (gboolean vertical,
GdkPoint *p1,
GdkPoint *p2);
diff --git a/extensions/file_tools/gth-file-tool-crop.c b/extensions/file_tools/gth-file-tool-crop.c
index d24180a..587d5a5 100644
--- a/extensions/file_tools/gth-file-tool-crop.c
+++ b/extensions/file_tools/gth-file-tool-crop.c
@@ -76,7 +76,7 @@ static void
crop_button_clicked_cb (GtkButton *button,
GthFileToolCrop *self)
{
- GdkRectangle selection;
+ cairo_rectangle_int_t selection;
GtkWidget *window;
GtkWidget *viewer_page;
GtkWidget *viewer;
@@ -156,7 +156,7 @@ static void
selector_selection_changed_cb (GthImageSelector *selector,
GthFileToolCrop *self)
{
- GdkRectangle selection;
+ cairo_rectangle_int_t selection;
int min, max;
gth_image_selector_get_selection (selector, &selection);
diff --git a/extensions/file_tools/gth-file-tool-rotate.c b/extensions/file_tools/gth-file-tool-rotate.c
index 93f9d62..b1edd16 100644
--- a/extensions/file_tools/gth-file-tool-rotate.c
+++ b/extensions/file_tools/gth-file-tool-rotate.c
@@ -47,7 +47,7 @@ struct _GthFileToolRotatePrivate {
GtkAdjustment *crop_p2_adj;
gboolean crop_enabled;
double crop_p1_plus_p2;
- GdkRectangle crop_region;
+ cairo_rectangle_int_t crop_region;
GthImageViewerTool *alignment;
GthImageViewerTool *rotator;
};
diff --git a/extensions/file_tools/gth-image-line-tool.c b/extensions/file_tools/gth-image-line-tool.c
index 616a74a..7a383b2 100644
--- a/extensions/file_tools/gth-image-line-tool.c
+++ b/extensions/file_tools/gth-image-line-tool.c
@@ -54,9 +54,9 @@ struct _GthImageLineToolPrivate {
int original_height;
double preview_zoom;
cairo_surface_t *preview_image;
- GdkRectangle preview_image_area;
+ cairo_rectangle_int_t preview_image_area;
GdkPoint preview_center;
- GdkRectangle clip_area;
+ cairo_rectangle_int_t clip_area;
cairo_matrix_t matrix;
gboolean first_point_set;
GthFit original_fit_mode;
diff --git a/extensions/file_tools/gth-image-rotator.c b/extensions/file_tools/gth-image-rotator.c
index cf81938..ed94e9f 100644
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@ -55,7 +55,7 @@ struct _GthImageRotatorPrivate {
double angle;
cairo_color_t background_color;
gboolean enable_crop;
- GdkRectangle crop_region;
+ cairo_rectangle_int_t crop_region;
GthGridType grid_type;
GthTransformResize resize;
@@ -65,9 +65,9 @@ struct _GthImageRotatorPrivate {
int original_height;
double preview_zoom;
cairo_surface_t *preview_image;
- GdkRectangle preview_image_area;
+ cairo_rectangle_int_t preview_image_area;
GdkPoint preview_center;
- GdkRectangle clip_area;
+ cairo_rectangle_int_t clip_area;
cairo_matrix_t matrix;
gboolean dragging;
double angle_before_dragging;
@@ -139,8 +139,8 @@ _cairo_matrix_transform_point (cairo_matrix_t *matrix,
static void
gth_transform_resize (cairo_matrix_t *matrix,
GthTransformResize resize,
- GdkRectangle *original,
- GdkRectangle *boundary)
+ cairo_rectangle_int_t *original,
+ cairo_rectangle_int_t *boundary)
{
int x1, y1, x2, y2;
@@ -294,7 +294,7 @@ paint_darker_background (GthImageRotator *self,
GdkEventExpose *event,
cairo_t *cr)
{
- GdkRectangle crop_region;
+ cairo_rectangle_int_t crop_region;
cairo_save (cr);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.5);
@@ -349,7 +349,7 @@ paint_grid (GthImageRotator *self,
GdkEventExpose *event,
cairo_t *cr)
{
- GdkRectangle grid;
+ cairo_rectangle_int_t grid;
cairo_save (cr);
@@ -827,7 +827,7 @@ gth_image_rotator_get_resize (GthImageRotator *self)
void
gth_image_rotator_set_crop_region (GthImageRotator *self,
- GdkRectangle *region)
+ cairo_rectangle_int_t *region)
{
self->priv->enable_crop = (region != NULL);
if (region != NULL)
@@ -866,8 +866,8 @@ gth_image_rotator_get_result_fast (GthImageRotator *self)
{
double tx, ty;
cairo_matrix_t matrix;
- GdkRectangle image_area;
- GdkRectangle clip_area;
+ cairo_rectangle_int_t image_area;
+ cairo_rectangle_int_t clip_area;
cairo_surface_t *output;
cairo_t *cr;
diff --git a/extensions/file_tools/gth-image-rotator.h b/extensions/file_tools/gth-image-rotator.h
index b1c1f45..89fd599 100644
--- a/extensions/file_tools/gth-image-rotator.h
+++ b/extensions/file_tools/gth-image-rotator.h
@@ -83,7 +83,7 @@ void gth_image_rotator_set_resize (GthImageRotator *
GthTransformResize resize);
GthTransformResize gth_image_rotator_get_resize (GthImageRotator *self);
void gth_image_rotator_set_crop_region (GthImageRotator *self,
- GdkRectangle *region);
+ cairo_rectangle_int_t *region);
void gth_image_rotator_set_background (GthImageRotator *self,
cairo_color_t *color);
void gth_image_rotator_get_background (GthImageRotator *self,
diff --git a/gthumb/cairo-utils.c b/gthumb/cairo-utils.c
index 8ea89f9..702fa72 100644
--- a/gthumb/cairo-utils.c
+++ b/gthumb/cairo-utils.c
@@ -767,7 +767,7 @@ _cairo_draw_slide (cairo_t *cr,
void
_cairo_paint_grid (cairo_t *cr,
- GdkRectangle *rectangle,
+ cairo_rectangle_int_t *rectangle,
GthGridType grid_type)
{
double ux, uy;
diff --git a/gthumb/cairo-utils.h b/gthumb/cairo-utils.h
index 79d4699..85a7964 100644
--- a/gthumb/cairo-utils.h
+++ b/gthumb/cairo-utils.h
@@ -208,7 +208,7 @@ void _cairo_draw_slide (cairo_t *
GdkColor *frame_color,
gboolean draw_inner_border);
void _cairo_paint_grid (cairo_t *cr,
- GdkRectangle *rectangle,
+ cairo_rectangle_int_t *rectangle,
GthGridType grid_type);
#endif /* CAIRO_UTILS_H */
diff --git a/gthumb/gth-cell-renderer-thumbnail.c b/gthumb/gth-cell-renderer-thumbnail.c
index 5b95f68..8c01e83 100644
--- a/gthumb/gth-cell-renderer-thumbnail.c
+++ b/gthumb/gth-cell-renderer-thumbnail.c
@@ -159,7 +159,7 @@ gth_cell_renderer_thumbnail_set_property (GObject *object,
static void
gth_cell_renderer_thumbnail_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *cell_area,
+ cairo_rectangle_int_t *cell_area,
int *x_offset,
int *y_offset,
int *width,
@@ -228,17 +228,17 @@ static void
gth_cell_renderer_thumbnail_render (GtkCellRenderer *cell,
GdkWindow *window,
GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
+ cairo_rectangle_int_t *background_area,
+ cairo_rectangle_int_t *cell_area,
+ cairo_rectangle_int_t *expose_area,
GtkCellRendererState flags)
{
GthCellRendererThumbnail *self;
GtkStyle *style;
GtkStateType state;
- GdkRectangle thumb_rect;
- GdkRectangle draw_rect;
- GdkRectangle image_rect;
+ cairo_rectangle_int_t thumb_rect;
+ cairo_rectangle_int_t draw_rect;
+ cairo_rectangle_int_t image_rect;
cairo_t *cr;
GdkPixbuf *pixbuf;
int xpad;
@@ -309,7 +309,7 @@ gth_cell_renderer_thumbnail_render (GtkCellRenderer *cell,
/* ...else draw a frame with a drop-shadow effect */
- GdkRectangle frame_rect;
+ cairo_rectangle_int_t frame_rect;
if (state == GTK_STATE_ACTIVE)
state = GTK_STATE_SELECTED;
diff --git a/gthumb/gth-image-navigator.c b/gthumb/gth-image-navigator.c
index f2bc584..f8d9cc3 100644
--- a/gthumb/gth-image-navigator.c
+++ b/gthumb/gth-image-navigator.c
@@ -104,7 +104,7 @@ typedef struct {
int image_width, image_height;
int window_max_width, window_max_height;
int popup_x, popup_y, popup_width, popup_height;
- GdkRectangle visible_area;
+ cairo_rectangle_int_t visible_area;
double zoom_factor;
} NavigatorPopup;
diff --git a/gthumb/gth-image-selector.c b/gthumb/gth-image-selector.c
index a55a2cb..e85d8db 100644
--- a/gthumb/gth-image-selector.c
+++ b/gthumb/gth-image-selector.c
@@ -38,7 +38,7 @@
typedef struct {
int ref_count;
int id;
- GdkRectangle area;
+ cairo_rectangle_int_t area;
GdkCursor *cursor;
} EventArea;
@@ -194,7 +194,7 @@ struct _GthImageSelectorPrivate {
GthSelectorType type;
cairo_surface_t *surface;
- GdkRectangle surface_area;
+ cairo_rectangle_int_t surface_area;
gboolean use_ratio;
double ratio;
@@ -204,9 +204,9 @@ struct _GthImageSelectorPrivate {
gboolean bind_dimensions;
int bind_factor;
- GdkRectangle drag_start_selection_area;
- GdkRectangle selection_area;
- GdkRectangle selection;
+ cairo_rectangle_int_t drag_start_selection_area;
+ cairo_rectangle_int_t selection_area;
+ cairo_rectangle_int_t selection;
GdkCursor *default_cursor;
GdkCursor *current_cursor;
@@ -225,7 +225,7 @@ struct _GthImageSelectorPrivate {
static gboolean
point_in_rectangle (int x,
int y,
- GdkRectangle rect)
+ cairo_rectangle_int_t rect)
{
return ((x >= rect.x)
&& (x <= rect.x + rect.width)
@@ -235,8 +235,8 @@ point_in_rectangle (int x,
static gboolean
-rectangle_in_rectangle (GdkRectangle r1,
- GdkRectangle r2)
+rectangle_in_rectangle (cairo_rectangle_int_t r1,
+ cairo_rectangle_int_t r2)
{
return (point_in_rectangle (r1.x, r1.y, r2)
&& point_in_rectangle (r1.x + r1.width,
@@ -246,8 +246,8 @@ rectangle_in_rectangle (GdkRectangle r1,
static gboolean
-rectangle_equal (GdkRectangle r1,
- GdkRectangle r2)
+rectangle_equal (cairo_rectangle_int_t r1,
+ cairo_rectangle_int_t r2)
{
return ((r1.x == r2.x)
&& (r1.y == r2.y)
@@ -266,8 +266,8 @@ real_to_selector (GthImageSelector *self,
static void
convert_to_selection_area (GthImageSelector *self,
- GdkRectangle real_area,
- GdkRectangle *selection_area)
+ cairo_rectangle_int_t real_area,
+ cairo_rectangle_int_t *selection_area)
{
selection_area->x = real_to_selector (self, real_area.x);
selection_area->y = real_to_selector (self, real_area.y);
@@ -308,7 +308,7 @@ get_event_area_from_position (GthImageSelector *self,
for (scan = self->priv->event_list; scan; scan = scan->next) {
EventArea *event_area = scan->data;
- GdkRectangle widget_area;
+ cairo_rectangle_int_t widget_area;
widget_area = event_area->area;
widget_area.x += self->priv->viewer->image_area.x;
@@ -425,7 +425,7 @@ update_event_areas (GthImageSelector *self)
static void
queue_draw (GthImageSelector *self,
- GdkRectangle area)
+ cairo_rectangle_int_t area)
{
if (! gtk_widget_get_realized (GTK_WIDGET (self->priv->viewer)))
return;
@@ -448,11 +448,11 @@ selection_changed (GthImageSelector *self)
static void
set_selection_area (GthImageSelector *self,
- GdkRectangle new_selection,
+ cairo_rectangle_int_t new_selection,
gboolean force_update)
{
- GdkRectangle old_selection_area;
- GdkRectangle dirty_region;
+ cairo_rectangle_int_t old_selection_area;
+ cairo_rectangle_int_t dirty_region;
if (! force_update && rectangle_equal (self->priv->selection_area, new_selection))
return;
@@ -468,10 +468,10 @@ set_selection_area (GthImageSelector *self,
static void
set_selection (GthImageSelector *self,
- GdkRectangle new_selection,
+ cairo_rectangle_int_t new_selection,
gboolean force_update)
{
- GdkRectangle new_area;
+ cairo_rectangle_int_t new_area;
if (! force_update && rectangle_equal (self->priv->selection, new_selection))
return;
@@ -485,7 +485,7 @@ set_selection (GthImageSelector *self,
static void
init_selection (GthImageSelector *self)
{
- GdkRectangle area;
+ cairo_rectangle_int_t area;
/*
if (! self->priv->use_ratio) {
@@ -613,7 +613,7 @@ paint_background (GthImageSelector *self,
/* make the background darker */
{
- GdkRectangle *rects;
+ cairo_rectangle_int_t *rects;
int n_rects;
int i;
@@ -622,7 +622,7 @@ paint_background (GthImageSelector *self,
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.5);
gdk_region_get_rectangles (event->region, &rects, &n_rects);
for (i = 0; i < n_rects; i++) {
- GdkRectangle paint_area;
+ cairo_rectangle_int_t paint_area;
if (gdk_rectangle_intersect (&self->priv->viewer->image_area, &rects[i], &paint_area))
cairo_rectangle (cr, paint_area.x, paint_area.y, paint_area.width, paint_area.height);
@@ -639,7 +639,7 @@ paint_selection (GthImageSelector *self,
GdkEventExpose *event,
cairo_t *cr)
{
- GdkRectangle selection_area;
+ cairo_rectangle_int_t selection_area;
selection_area = self->priv->selection_area;
selection_area.x += self->priv->viewer->image_area.x - self->priv->viewer->x_offset;
@@ -733,8 +733,8 @@ selector_to_real (GthImageSelector *self,
static void
convert_to_real_selection (GthImageSelector *self,
- GdkRectangle selection_area,
- GdkRectangle *real_area)
+ cairo_rectangle_int_t selection_area,
+ cairo_rectangle_int_t *real_area)
{
real_area->x = selector_to_real (self, selection_area.x);
real_area->y = selector_to_real (self, selection_area.y);
@@ -794,8 +794,8 @@ gth_image_selector_button_release (GthImageViewerTool *base,
static void
-grow_upward (GdkRectangle *bound,
- GdkRectangle *r,
+grow_upward (cairo_rectangle_int_t *bound,
+ cairo_rectangle_int_t *r,
int dy,
gboolean check)
{
@@ -807,8 +807,8 @@ grow_upward (GdkRectangle *bound,
static void
-grow_downward (GdkRectangle *bound,
- GdkRectangle *r,
+grow_downward (cairo_rectangle_int_t *bound,
+ cairo_rectangle_int_t *r,
int dy,
gboolean check)
{
@@ -819,8 +819,8 @@ grow_downward (GdkRectangle *bound,
static void
-grow_leftward (GdkRectangle *bound,
- GdkRectangle *r,
+grow_leftward (cairo_rectangle_int_t *bound,
+ cairo_rectangle_int_t *r,
int dx,
gboolean check)
{
@@ -832,8 +832,8 @@ grow_leftward (GdkRectangle *bound,
static void
-grow_rightward (GdkRectangle *bound,
- GdkRectangle *r,
+grow_rightward (cairo_rectangle_int_t *bound,
+ cairo_rectangle_int_t *r,
int dx,
gboolean check)
{
@@ -880,7 +880,7 @@ bind_dimension (int dimension,
static gboolean
check_and_set_new_selection (GthImageSelector *self,
- GdkRectangle new_selection)
+ cairo_rectangle_int_t new_selection)
{
new_selection.width = MAX (0, new_selection.width);
new_selection.height = MAX (0, new_selection.height);
@@ -941,7 +941,7 @@ gth_image_selector_button_press (GthImageViewerTool *base,
y = event->y + self->priv->viewer->y_offset;
if (self->priv->current_area == NULL) {
- GdkRectangle new_selection;
+ cairo_rectangle_int_t new_selection;
new_selection.x = selector_to_real (self, x - self->priv->viewer->image_area.x);
new_selection.y = selector_to_real (self, y - self->priv->viewer->image_area.y);
@@ -979,7 +979,7 @@ update_mouse_selection (GthImageSelector *self)
{
gboolean check = ! self->priv->use_ratio;
int dx, dy;
- GdkRectangle new_selection, tmp;
+ cairo_rectangle_int_t new_selection, tmp;
int semiplane;
GthEventAreaType area_type = self->priv->current_area->id;
EventArea *event_area;
@@ -1492,7 +1492,7 @@ static void
gth_image_selector_zoom_changed (GthImageViewerTool *base)
{
GthImageSelector *self = GTH_IMAGE_SELECTOR (base);
- GdkRectangle selection;
+ cairo_rectangle_int_t selection;
gth_image_selector_get_selection (self, &selection);
set_selection (self, selection, TRUE);
@@ -1656,7 +1656,7 @@ gboolean
gth_image_selector_set_selection_x (GthImageSelector *self,
int x)
{
- GdkRectangle new_selection;
+ cairo_rectangle_int_t new_selection;
new_selection = self->priv->selection;
new_selection.x = x;
@@ -1668,7 +1668,7 @@ gboolean
gth_image_selector_set_selection_y (GthImageSelector *self,
int y)
{
- GdkRectangle new_selection;
+ cairo_rectangle_int_t new_selection;
new_selection = self->priv->selection;
new_selection.y = y;
@@ -1681,7 +1681,7 @@ gth_image_selector_set_selection_pos (GthImageSelector *self,
int x,
int y)
{
- GdkRectangle new_selection;
+ cairo_rectangle_int_t new_selection;
new_selection = self->priv->selection;
new_selection.x = x;
@@ -1694,7 +1694,7 @@ gboolean
gth_image_selector_set_selection_width (GthImageSelector *self,
int width)
{
- GdkRectangle new_selection;
+ cairo_rectangle_int_t new_selection;
new_selection = self->priv->selection;
new_selection.width = width;
@@ -1708,7 +1708,7 @@ gboolean
gth_image_selector_set_selection_height (GthImageSelector *self,
int height)
{
- GdkRectangle new_selection;
+ cairo_rectangle_int_t new_selection;
new_selection = self->priv->selection;
new_selection.height = height;
@@ -1720,7 +1720,7 @@ gth_image_selector_set_selection_height (GthImageSelector *self,
void
gth_image_selector_set_selection (GthImageSelector *self,
- GdkRectangle selection)
+ cairo_rectangle_int_t selection)
{
set_selection (self, selection, FALSE);
}
@@ -1728,7 +1728,7 @@ gth_image_selector_set_selection (GthImageSelector *self,
void
gth_image_selector_get_selection (GthImageSelector *self,
- GdkRectangle *selection)
+ cairo_rectangle_int_t *selection)
{
selection->x = MAX (self->priv->selection.x, 0);
selection->y = MAX (self->priv->selection.y, 0);
@@ -1846,7 +1846,7 @@ gth_image_selector_bind_dimensions (GthImageSelector *self,
void
gth_image_selector_center (GthImageSelector *self)
{
- GdkRectangle new_selection;
+ cairo_rectangle_int_t new_selection;
new_selection = self->priv->selection;
new_selection.x = (self->priv->surface_area.width - new_selection.width) / 2;
diff --git a/gthumb/gth-image-selector.h b/gthumb/gth-image-selector.h
index bf59ad1..f7072e7 100644
--- a/gthumb/gth-image-selector.h
+++ b/gthumb/gth-image-selector.h
@@ -81,9 +81,9 @@ gboolean gth_image_selector_set_selection_width (GthImageSelector
gboolean gth_image_selector_set_selection_height (GthImageSelector *selector,
int height);
void gth_image_selector_set_selection (GthImageSelector *selector,
- GdkRectangle selection);
+ cairo_rectangle_int_t selection);
void gth_image_selector_get_selection (GthImageSelector *selector,
- GdkRectangle *selection);
+ cairo_rectangle_int_t *selection);
void gth_image_selector_set_ratio (GthImageSelector *selector,
gboolean use_ratio,
double ratio,
diff --git a/gthumb/gth-image-viewer.c b/gthumb/gth-image-viewer.c
index 0f9ed46..74bf852 100644
--- a/gthumb/gth-image-viewer.c
+++ b/gthumb/gth-image-viewer.c
@@ -864,7 +864,7 @@ scroll_to (GthImageViewer *self,
self->y_offset = *y_offset;
if (self->priv->painters != NULL) {
- GdkRectangle area;
+ cairo_rectangle_int_t area;
area.x = 0;
area.y = 0;
@@ -879,7 +879,7 @@ scroll_to (GthImageViewer *self,
/* move without invalidating the frame */
{
- GdkRectangle area;
+ cairo_rectangle_int_t area;
GdkRegion *region;
area.x = (delta_x < 0) ? self->priv->frame_border : self->priv->frame_border + delta_x;
@@ -896,7 +896,7 @@ scroll_to (GthImageViewer *self,
{
GdkRegion *region;
- GdkRectangle area;
+ cairo_rectangle_int_t area;
region = gdk_region_new ();
@@ -2529,11 +2529,11 @@ gth_image_viewer_paint_region (GthImageViewer *self,
cairo_surface_t *surface,
int src_x,
int src_y,
- GdkRectangle *pixbuf_area,
+ cairo_rectangle_int_t *pixbuf_area,
GdkRegion *region,
cairo_filter_t filter)
{
- GdkRectangle *rects;
+ cairo_rectangle_int_t *rects;
int n_rects;
int i;
@@ -2544,7 +2544,7 @@ gth_image_viewer_paint_region (GthImageViewer *self,
gdk_region_get_rectangles (region, &rects, &n_rects);
for (i = 0; i < n_rects; i++) {
- GdkRectangle paint_area;
+ cairo_rectangle_int_t paint_area;
if (gdk_rectangle_intersect (pixbuf_area, &rects[i], &paint_area))
gth_image_viewer_paint (self,
@@ -2735,7 +2735,7 @@ gth_image_viewer_apply_painters (GthImageViewer *self,
void
gth_image_viewer_crop_area (GthImageViewer *self,
- GdkRectangle *area)
+ cairo_rectangle_int_t *area)
{
GtkWidget *widget = GTK_WIDGET (self);
GtkAllocation allocation;
diff --git a/gthumb/gth-image-viewer.h b/gthumb/gth-image-viewer.h
index 1d13999..ef951bd 100644
--- a/gthumb/gth-image-viewer.h
+++ b/gthumb/gth-image-viewer.h
@@ -105,7 +105,7 @@ struct _GthImageViewer
/*< protected, used by the tools >*/
- GdkRectangle image_area;
+ cairo_rectangle_int_t image_area;
int x_offset; /* Scroll offsets. */
int y_offset;
gboolean pressed;
@@ -310,7 +310,7 @@ void gth_image_viewer_paint_region (GthImageViewer *vi
cairo_surface_t *surface,
int src_x,
int src_y,
- GdkRectangle *pixbuf_area,
+ cairo_rectangle_int_t *pixbuf_area,
GdkRegion *region,
cairo_filter_t filter);
void gth_image_viewer_paint_background (GthImageViewer *self,
@@ -319,7 +319,7 @@ void gth_image_viewer_apply_painters (GthImageViewer *im
GdkEventExpose *event,
cairo_t *cr);
void gth_image_viewer_crop_area (GthImageViewer *viewer,
- GdkRectangle *area);
+ cairo_rectangle_int_t *area);
G_END_DECLS
diff --git a/gthumb/gth-menu-button.c b/gthumb/gth-menu-button.c
index 924ec93..44490dd 100644
--- a/gthumb/gth-menu-button.c
+++ b/gthumb/gth-menu-button.c
@@ -146,7 +146,7 @@ menu_position_func (GtkMenu *menu,
GtkWidget *widget = GTK_WIDGET (self);
GtkRequisition menu_req;
GtkTextDirection direction;
- GdkRectangle monitor;
+ cairo_rectangle_int_t monitor;
int monitor_num;
GdkScreen *screen;
GtkAllocation allocation;
diff --git a/gthumb/gth-time-selector.c b/gthumb/gth-time-selector.c
index b41e55d..850c8f1 100644
--- a/gthumb/gth-time-selector.c
+++ b/gthumb/gth-time-selector.c
@@ -124,7 +124,7 @@ show_calendar_popup (GthTimeSelector *self)
int selector_height;
GdkScreen *screen;
gint monitor_num;
- GdkRectangle monitor;
+ cairo_rectangle_int_t monitor;
gtk_widget_size_request (self->priv->popup_box, &popup_req);
@@ -339,7 +339,7 @@ calendar_popup_button_press_event_cb (GtkWidget *widget,
gpointer user_data)
{
GthTimeSelector *self = user_data;
- GdkRectangle popup_area;
+ cairo_rectangle_int_t popup_area;
gdk_window_get_geometry (gtk_widget_get_window (self->priv->calendar_popup),
&popup_area.x,
diff --git a/gthumb/gth-toggle-menu-tool-button.c b/gthumb/gth-toggle-menu-tool-button.c
index 3445ccf..7bbde1a 100644
--- a/gthumb/gth-toggle-menu-tool-button.c
+++ b/gthumb/gth-toggle-menu-tool-button.c
@@ -460,7 +460,7 @@ menu_position_func (GtkMenu *menu,
GtkRequisition menu_req;
GtkOrientation orientation;
GtkTextDirection direction;
- GdkRectangle monitor;
+ cairo_rectangle_int_t monitor;
int monitor_num;
GdkScreen *screen;
GtkAllocation allocation;
diff --git a/gthumb/gtk-utils.c b/gthumb/gtk-utils.c
index 58047f2..57d64e7 100644
--- a/gthumb/gtk-utils.c
+++ b/gthumb/gtk-utils.c
@@ -901,7 +901,7 @@ _gtk_widget_get_screen_size (GtkWidget *widget,
int *height)
{
GdkScreen *screen;
- GdkRectangle geometry;
+ cairo_rectangle_int_t geometry;
screen = gtk_widget_get_screen (widget);
gdk_screen_get_monitor_geometry (screen,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]