swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit f3b469184238cec1e7e0c86229e8944bc59ff339
parent c518ef4b88826be437b85538b65d6959860612e7
Author: Michael Forney <mforney@mforney.org>
Date:   Wed, 19 Feb 2014 15:44:23 -0800

cursor_plane: Drop swc_ prefix for non-public structures/functions

Diffstat:
Mlibswc/cursor_plane.c | 12++++++------
Mlibswc/cursor_plane.h | 8++++----
Mlibswc/screen.c | 12++++++------
Mlibswc/screen.h | 4++--
4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/libswc/cursor_plane.c b/libswc/cursor_plane.c @@ -40,7 +40,7 @@ static bool update(struct swc_view * view) static bool attach(struct swc_view * view, struct wld_buffer * buffer) { - struct swc_cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view); + struct cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view); if (buffer) { @@ -75,7 +75,7 @@ static bool attach(struct swc_view * view, struct wld_buffer * buffer) static bool move(struct swc_view * view, int32_t x, int32_t y) { - struct swc_cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view); + struct cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view); if (drmModeMoveCursor(swc.drm->fd, plane->crtc, x - plane->origin->x, y - plane->origin->y) != 0) @@ -98,7 +98,7 @@ static const struct swc_view_impl view_impl = { static void handle_launch_event(struct wl_listener * listener, void * data) { struct swc_event * event = data; - struct swc_cursor_plane * plane + struct cursor_plane * plane = CONTAINER_OF(listener, typeof(*plane), launch_listener); switch (event->type) @@ -110,8 +110,8 @@ static void handle_launch_event(struct wl_listener * listener, void * data) } } -bool swc_cursor_plane_initialize(struct swc_cursor_plane * plane, uint32_t crtc, - const struct swc_rectangle * origin) +bool cursor_plane_initialize(struct cursor_plane * plane, uint32_t crtc, + const struct swc_rectangle * origin) { if (drmModeSetCursor(swc.drm->fd, crtc, 0, 0, 0) != 0) return false; @@ -125,7 +125,7 @@ bool swc_cursor_plane_initialize(struct swc_cursor_plane * plane, uint32_t crtc, return true; } -void swc_cursor_plane_finalize(struct swc_cursor_plane * plane) +void cursor_plane_finalize(struct cursor_plane * plane) { drmModeSetCursor(swc.drm->fd, plane->crtc, 0, 0, 0); } diff --git a/libswc/cursor_plane.h b/libswc/cursor_plane.h @@ -26,7 +26,7 @@ #include "view.h" -struct swc_cursor_plane +struct cursor_plane { struct swc_view view; const struct swc_rectangle * origin; @@ -34,10 +34,10 @@ struct swc_cursor_plane struct wl_listener launch_listener; }; -bool swc_cursor_plane_initialize(struct swc_cursor_plane * plane, uint32_t crtc, - const struct swc_rectangle * origin); +bool cursor_plane_initialize(struct cursor_plane * plane, uint32_t crtc, + const struct swc_rectangle * origin); -void swc_cursor_plane_finalize(struct swc_cursor_plane * plane); +void cursor_plane_finalize(struct cursor_plane * plane); #endif diff --git a/libswc/screen.c b/libswc/screen.c @@ -72,16 +72,16 @@ struct screen * screen_new(uint32_t crtc, struct swc_output * output) wl_list_insert(&screen->outputs, &output->link); wl_list_init(&screen->modifiers); - if (!swc_framebuffer_plane_initialize(&screen->planes.framebuffer, crtc, - output->preferred_mode, - &output->connector, 1)) + if (!framebuffer_plane_initialize(&screen->planes.framebuffer, crtc, + output->preferred_mode, + &output->connector, 1)) { ERROR("Failed to initialize framebuffer plane\n"); goto error1; } - if (!swc_cursor_plane_initialize(&screen->planes.cursor, crtc, - &screen->base.geometry)) + if (!cursor_plane_initialize(&screen->planes.cursor, crtc, + &screen->base.geometry)) { ERROR("Failed to initialize cursor plane\n"); goto error2; @@ -110,7 +110,7 @@ void screen_destroy(struct screen * screen) wl_list_for_each_safe(output, next, &screen->outputs, link) swc_output_destroy(output); framebuffer_plane_finalize(&screen->planes.framebuffer); - swc_cursor_plane_finalize(&screen->planes.cursor); + cursor_plane_finalize(&screen->planes.cursor); free(screen); } diff --git a/libswc/screen.h b/libswc/screen.h @@ -54,8 +54,8 @@ struct screen struct { - struct swc_framebuffer_plane framebuffer; - struct swc_cursor_plane cursor; + struct framebuffer_plane framebuffer; + struct cursor_plane cursor; } planes; struct wl_list outputs;