commit b7ea96afb30668d20ee2ee00f0ea785dbc02a8a8
parent a36513f9e19423d0dd39e9a71e550cac989a4b1f
Author: Michael Forney <mforney@mforney.org>
Date: Fri, 17 Jan 2014 17:32:15 -0800
Use swc_rectangle instead of pixman_rectangle32_t
Diffstat:
4 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/libswc/compositor.c b/libswc/compositor.c
@@ -49,7 +49,7 @@ struct view
struct render_target
{
struct wld_buffer * buffer;
- pixman_rectangle32_t geometry;
+ struct swc_rectangle geometry;
};
static void repaint_surface(struct render_target * target,
diff --git a/libswc/output.h b/libswc/output.h
@@ -17,7 +17,7 @@ struct swc_output
uint32_t id;
/* The geometry of this output */
- pixman_rectangle32_t geometry;
+ struct swc_rectangle geometry;
uint32_t physical_width, physical_height;
struct wl_array modes;
diff --git a/libswc/surface.h b/libswc/surface.h
@@ -24,7 +24,8 @@
#ifndef SWC_SURFACE_H
#define SWC_SURFACE_H
-#include <stdbool.h>
+#include "swc.h"
+
#include <wayland-server.h>
#include <pixman.h>
@@ -90,7 +91,7 @@ struct swc_surface
void * view_state;
uint32_t outputs;
- pixman_rectangle32_t geometry;
+ struct swc_rectangle geometry;
struct wl_signal event_signal;
struct wl_list link;
diff --git a/libswc/util.h b/libswc/util.h
@@ -1,6 +1,8 @@
#ifndef SWC_UTIL_H
#define SWC_UTIL_H
+#include "swc.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
@@ -59,14 +61,14 @@ static inline uint32_t swc_time()
extern pixman_box32_t infinite_extents;
static inline bool swc_rectangle_contains_point
- (const pixman_rectangle32_t * rectangle, int32_t x, int32_t y)
+ (const struct swc_rectangle * rectangle, int32_t x, int32_t y)
{
return x > rectangle->x && x < rectangle->x + rectangle->width
&& y > rectangle->y && y < rectangle->y + rectangle->height;
}
static inline bool swc_rectangle_overlap
- (const pixman_rectangle32_t * r1, const pixman_rectangle32_t * r2)
+ (const struct swc_rectangle * r1, const struct swc_rectangle * r2)
{
return (MAX(r1->x + r1->width, r2->x + r2->width) - MIN(r1->x, r2->x)
< r1->width + r2->width)