commit f3b4691

Michael Forney  ·  2014-02-19 23:44:23 +0000 UTC
parent c518ef4
cursor_plane: Drop swc_ prefix for non-public structures/functions
4 files changed,  +18, -18
+6, -6
 1@@ -40,7 +40,7 @@ static bool update(struct swc_view * view)
 2 
 3 static bool attach(struct swc_view * view, struct wld_buffer * buffer)
 4 {
 5-    struct swc_cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view);
 6+    struct cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view);
 7 
 8     if (buffer)
 9     {
10@@ -75,7 +75,7 @@ static bool attach(struct swc_view * view, struct wld_buffer * buffer)
11 
12 static bool move(struct swc_view * view, int32_t x, int32_t y)
13 {
14-    struct swc_cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view);
15+    struct cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view);
16 
17     if (drmModeMoveCursor(swc.drm->fd, plane->crtc,
18                           x - plane->origin->x, y - plane->origin->y) != 0)
19@@ -98,7 +98,7 @@ static const struct swc_view_impl view_impl = {
20 static void handle_launch_event(struct wl_listener * listener, void * data)
21 {
22     struct swc_event * event = data;
23-    struct swc_cursor_plane * plane
24+    struct cursor_plane * plane
25         = CONTAINER_OF(listener, typeof(*plane), launch_listener);
26 
27     switch (event->type)
28@@ -110,8 +110,8 @@ static void handle_launch_event(struct wl_listener * listener, void * data)
29     }
30 }
31 
32-bool swc_cursor_plane_initialize(struct swc_cursor_plane * plane, uint32_t crtc,
33-                                 const struct swc_rectangle * origin)
34+bool cursor_plane_initialize(struct cursor_plane * plane, uint32_t crtc,
35+                             const struct swc_rectangle * origin)
36 {
37     if (drmModeSetCursor(swc.drm->fd, crtc, 0, 0, 0) != 0)
38         return false;
39@@ -125,7 +125,7 @@ bool swc_cursor_plane_initialize(struct swc_cursor_plane * plane, uint32_t crtc,
40     return true;
41 }
42 
43-void swc_cursor_plane_finalize(struct swc_cursor_plane * plane)
44+void cursor_plane_finalize(struct cursor_plane * plane)
45 {
46     drmModeSetCursor(swc.drm->fd, plane->crtc, 0, 0, 0);
47 }
+4, -4
 1@@ -26,7 +26,7 @@
 2 
 3 #include "view.h"
 4 
 5-struct swc_cursor_plane
 6+struct cursor_plane
 7 {
 8     struct swc_view view;
 9     const struct swc_rectangle * origin;
10@@ -34,10 +34,10 @@ struct swc_cursor_plane
11     struct wl_listener launch_listener;
12 };
13 
14-bool swc_cursor_plane_initialize(struct swc_cursor_plane * plane, uint32_t crtc,
15-                                 const struct swc_rectangle * origin);
16+bool cursor_plane_initialize(struct cursor_plane * plane, uint32_t crtc,
17+                             const struct swc_rectangle * origin);
18 
19-void swc_cursor_plane_finalize(struct swc_cursor_plane * plane);
20+void cursor_plane_finalize(struct cursor_plane * plane);
21 
22 #endif
23 
+6, -6
 1@@ -72,16 +72,16 @@ struct screen * screen_new(uint32_t crtc, struct swc_output * output)
 2     wl_list_insert(&screen->outputs, &output->link);
 3     wl_list_init(&screen->modifiers);
 4 
 5-    if (!swc_framebuffer_plane_initialize(&screen->planes.framebuffer, crtc,
 6-                                          output->preferred_mode,
 7-                                          &output->connector, 1))
 8+    if (!framebuffer_plane_initialize(&screen->planes.framebuffer, crtc,
 9+                                      output->preferred_mode,
10+                                      &output->connector, 1))
11     {
12         ERROR("Failed to initialize framebuffer plane\n");
13         goto error1;
14     }
15 
16-    if (!swc_cursor_plane_initialize(&screen->planes.cursor, crtc,
17-                                     &screen->base.geometry))
18+    if (!cursor_plane_initialize(&screen->planes.cursor, crtc,
19+                                 &screen->base.geometry))
20     {
21         ERROR("Failed to initialize cursor plane\n");
22         goto error2;
23@@ -110,7 +110,7 @@ void screen_destroy(struct screen * screen)
24     wl_list_for_each_safe(output, next, &screen->outputs, link)
25         swc_output_destroy(output);
26     framebuffer_plane_finalize(&screen->planes.framebuffer);
27-    swc_cursor_plane_finalize(&screen->planes.cursor);
28+    cursor_plane_finalize(&screen->planes.cursor);
29     free(screen);
30 }
31 
+2, -2
 1@@ -54,8 +54,8 @@ struct screen
 2 
 3     struct
 4     {
 5-        struct swc_framebuffer_plane framebuffer;
 6-        struct swc_cursor_plane cursor;
 7+        struct framebuffer_plane framebuffer;
 8+        struct cursor_plane cursor;
 9     } planes;
10 
11     struct wl_list outputs;