[PATCH 1/5] compositor: make functions static
Tiago Vignatti
tiago.vignatti at intel.com
Thu Feb 9 09:06:52 PST 2012
From: Tiago Vignatti <vignatti at freedesktop.org>
I know it's hard to figure out what the shells or backends will be using as
internal API at this point but we can try to minimize the amount of WL_EXPORT
being used anyway.
Signed-off-by: Tiago Vignatti <vignatti at freedesktop.org>
---
src/compositor.c | 42 +++++++++++++++++++++---------------------
src/compositor.h | 14 --------------
2 files changed, 21 insertions(+), 35 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 1545990..f4d6636 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -392,7 +392,7 @@ weston_surface_from_global(struct weston_surface *surface,
*sy = floorf(syf);
}
-WL_EXPORT void
+static void
weston_surface_damage_rectangle(struct weston_surface *surface,
int32_t sx, int32_t sy,
int32_t width, int32_t height)
@@ -426,7 +426,7 @@ weston_surface_damage(struct weston_surface *surface)
weston_compositor_schedule_repaint(surface->compositor);
}
-WL_EXPORT void
+static void
weston_surface_damage_below(struct weston_surface *surface)
{
struct weston_surface *below;
@@ -498,7 +498,25 @@ weston_compositor_get_time(void)
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}
-WL_EXPORT void
+static struct weston_surface *
+weston_compositor_pick_surface(struct weston_compositor *compositor,
+ int32_t x, int32_t y, int32_t *sx, int32_t *sy)
+{
+ struct weston_surface *surface;
+
+ wl_list_for_each(surface, &compositor->surface_list, link) {
+ if (surface->surface.resource.client == NULL)
+ continue;
+ weston_surface_from_global(surface, x, y, sx, sy);
+ if (0 <= *sx && *sx < surface->geometry.width &&
+ 0 <= *sy && *sy < surface->geometry.height)
+ return surface;
+ }
+
+ return NULL;
+}
+
+static void
weston_device_repick(struct wl_input_device *device, uint32_t time)
{
struct weston_input_device *wd = (struct weston_input_device *) device;
@@ -1217,24 +1235,6 @@ const static struct wl_compositor_interface compositor_interface = {
compositor_create_surface,
};
-WL_EXPORT struct weston_surface *
-weston_compositor_pick_surface(struct weston_compositor *compositor,
- int32_t x, int32_t y, int32_t *sx, int32_t *sy)
-{
- struct weston_surface *surface;
-
- wl_list_for_each(surface, &compositor->surface_list, link) {
- if (surface->surface.resource.client == NULL)
- continue;
- weston_surface_from_global(surface, x, y, sx, sy);
- if (0 <= *sx && *sx < surface->geometry.width &&
- 0 <= *sy && *sy < surface->geometry.height)
- return surface;
- }
-
- return NULL;
-}
-
WL_EXPORT void
weston_compositor_wake(struct weston_compositor *compositor)
{
diff --git a/src/compositor.h b/src/compositor.h
index 80b848d..04142eb 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -311,9 +311,6 @@ weston_surface_from_global(struct weston_surface *surface,
int32_t x, int32_t y, int32_t *sx, int32_t *sy);
void
-weston_device_repick(struct wl_input_device *device, uint32_t time);
-
-void
weston_spring_init(struct weston_spring *spring,
double k, double current, double target);
void
@@ -356,9 +353,6 @@ void
weston_output_finish_frame(struct weston_output *output, int msecs);
void
weston_output_damage(struct weston_output *output);
-struct weston_surface *
-weston_compositor_pick_surface(struct weston_compositor *compositor,
- int32_t x, int32_t y, int32_t *sx, int32_t *sy);
void
weston_compositor_repick(struct weston_compositor *compositor);
void
@@ -411,14 +405,6 @@ void
weston_surface_damage(struct weston_surface *surface);
void
-weston_surface_damage_below(struct weston_surface *surface);
-
-void
-weston_surface_damage_rectangle(struct weston_surface *surface,
- int32_t x, int32_t y,
- int32_t width, int32_t height);
-
-void
weston_buffer_post_release(struct wl_buffer *buffer);
uint32_t
--
1.7.5.4
More information about the wayland-devel
mailing list