commit 45e4f3a
Michael Forney
·
2014-02-16 23:18:39 +0000 UTC
parent 5c420fe
panel{,_manager}: Drop swc_ prefix for non-public structures/functions
5 files changed,
+22,
-25
+12,
-12
1@@ -36,7 +36,7 @@
2 #include <assert.h>
3 #include <stdlib.h>
4
5-struct swc_panel
6+struct panel
7 {
8 struct wl_resource * resource;
9
10@@ -51,7 +51,7 @@ struct swc_panel
11 bool docked;
12 };
13
14-static void update_position(struct swc_panel * panel)
15+static void update_position(struct panel * panel)
16 {
17 int32_t x, y;
18 struct swc_rectangle * screen = &panel->screen->base.geometry,
19@@ -85,7 +85,7 @@ static void dock(struct wl_client * client, struct wl_resource * resource,
20 uint32_t edge, struct wl_resource * output_resource,
21 uint32_t focus)
22 {
23- struct swc_panel * panel = wl_resource_get_user_data(resource);
24+ struct panel * panel = wl_resource_get_user_data(resource);
25 struct swc_output * output = output_resource
26 ? wl_resource_get_user_data(output_resource) : NULL;
27 struct screen * screen = output
28@@ -140,7 +140,7 @@ static void dock(struct wl_client * client, struct wl_resource * resource,
29 static void set_offset(struct wl_client * client, struct wl_resource * resource,
30 uint32_t offset)
31 {
32- struct swc_panel * panel = wl_resource_get_user_data(resource);
33+ struct panel * panel = wl_resource_get_user_data(resource);
34
35 panel->offset = offset;
36
37@@ -151,7 +151,7 @@ static void set_offset(struct wl_client * client, struct wl_resource * resource,
38 static void set_strut(struct wl_client * client, struct wl_resource * resource,
39 uint32_t size, uint32_t begin, uint32_t end)
40 {
41- struct swc_panel * panel = wl_resource_get_user_data(resource);
42+ struct panel * panel = wl_resource_get_user_data(resource);
43
44 panel->strut_size = size;
45
46@@ -169,7 +169,7 @@ static void modify(struct screen_modifier * modifier,
47 const struct swc_rectangle * geometry,
48 pixman_region32_t * usable)
49 {
50- struct swc_panel * panel = CONTAINER_OF(modifier, typeof(*panel), modifier);
51+ struct panel * panel = CONTAINER_OF(modifier, typeof(*panel), modifier);
52 pixman_box32_t box = {
53 .x1 = geometry->x, .y1 = geometry->y,
54 .x2 = geometry->x + geometry->width,
55@@ -207,7 +207,7 @@ static void modify(struct screen_modifier * modifier,
56
57 static void destroy_panel(struct wl_resource * resource)
58 {
59- struct swc_panel * panel = wl_resource_get_user_data(resource);
60+ struct panel * panel = wl_resource_get_user_data(resource);
61
62 if (panel->docked)
63 {
64@@ -222,7 +222,7 @@ static void destroy_panel(struct wl_resource * resource)
65
66 static void handle_view_event(struct wl_listener * listener, void * data)
67 {
68- struct swc_panel * panel;
69+ struct panel * panel;
70 struct swc_event * event = data;
71
72 panel = CONTAINER_OF(listener, typeof(*panel), view_listener);
73@@ -237,16 +237,16 @@ static void handle_view_event(struct wl_listener * listener, void * data)
74
75 static void handle_surface_destroy(struct wl_listener * listener, void * data)
76 {
77- struct swc_panel * panel;
78+ struct panel * panel;
79
80 panel = CONTAINER_OF(listener, typeof(*panel), surface_destroy_listener);
81 wl_resource_destroy(panel->resource);
82 }
83
84-struct swc_panel * swc_panel_new(struct wl_client * client, uint32_t id,
85- struct swc_surface * surface)
86+struct panel * panel_new(struct wl_client * client, uint32_t id,
87+ struct swc_surface * surface)
88 {
89- struct swc_panel * panel;
90+ struct panel * panel;
91
92 panel = malloc(sizeof *panel);
93
+2,
-2
1@@ -29,8 +29,8 @@
2 #include <stdbool.h>
3 #include <wayland-server.h>
4
5-struct swc_panel * swc_panel_new(struct wl_client * client, uint32_t id,
6- struct swc_surface * surface);
7+struct panel * panel_new(struct wl_client * client, uint32_t id,
8+ struct swc_surface * surface);
9
10 #endif
11
+3,
-6
1@@ -38,11 +38,8 @@ static void create_panel(struct wl_client * client,
2 struct wl_resource * surface_resource)
3 {
4 struct swc_surface * surface = wl_resource_get_user_data(surface_resource);
5- struct swc_panel * panel;
6
7- panel = swc_panel_new(client, id, surface);
8-
9- if (!panel)
10+ if (!panel_new(client, id, surface))
11 wl_client_post_no_memory(client);
12 }
13
14@@ -60,7 +57,7 @@ static void bind_panel_manager(struct wl_client * client, void * data,
15 NULL, NULL);
16 }
17
18-bool swc_panel_manager_initialize()
19+bool panel_manager_initialize()
20 {
21 panel_manager.global = wl_global_create(swc.display,
22 &swc_panel_manager_interface, 1,
23@@ -72,7 +69,7 @@ bool swc_panel_manager_initialize()
24 return true;
25 }
26
27-void swc_panel_manager_finalize()
28+void panel_manager_finalize()
29 {
30 wl_global_destroy(panel_manager.global);
31 }
+2,
-2
1@@ -26,8 +26,8 @@
2
3 #include <stdbool.h>
4
5-bool swc_panel_manager_initialize();
6-void swc_panel_manager_finalize();
7+bool panel_manager_initialize();
8+void panel_manager_finalize();
9
10 #endif
11
+3,
-3
1@@ -148,7 +148,7 @@ bool swc_initialize(struct wl_display * display,
2 goto error8;
3 }
4
5- if (!swc_panel_manager_initialize())
6+ if (!panel_manager_initialize())
7 {
8 ERROR("Could not initialize panel manager\n");
9 goto error9;
10@@ -168,7 +168,7 @@ bool swc_initialize(struct wl_display * display,
11
12 #ifdef ENABLE_XWAYLAND
13 error10:
14- swc_panel_manager_finalize();
15+ panel_manager_finalize();
16 #endif
17 error9:
18 swc_shell_finalize();
19@@ -198,7 +198,7 @@ void swc_finalize()
20 #ifdef ENABLE_XWAYLAND
21 swc_xserver_finalize();
22 #endif
23- swc_panel_manager_finalize();
24+ panel_manager_finalize();
25 swc_shell_finalize();
26 swc_seat_finalize();
27 swc_data_device_manager_finalize();