[PATCH weston 1/4] Rename frame_create and frame_set_child_size with a window_ prefix

Jason Ekstrand jason at jlekstrand.net
Mon Oct 14 02:08:38 CEST 2013


This is to avoid a collision with an actual frame structure.

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 clients/clickdot.c      |  2 +-
 clients/cliptest.c      |  2 +-
 clients/desktop-shell.c |  2 +-
 clients/dnd.c           |  4 ++--
 clients/eventdemo.c     |  2 +-
 clients/image.c         |  2 +-
 clients/nested.c        |  2 +-
 clients/resizor.c       |  2 +-
 clients/subsurfaces.c   |  2 +-
 clients/terminal.c      |  4 ++--
 clients/window.c        | 11 ++++++-----
 clients/window.h        |  5 +++--
 12 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/clients/clickdot.c b/clients/clickdot.c
index aebe4db..c300fa5 100644
--- a/clients/clickdot.c
+++ b/clients/clickdot.c
@@ -249,7 +249,7 @@ clickdot_create(struct display *display)
 
 	clickdot = xzalloc(sizeof *clickdot);
 	clickdot->window = window_create(display);
-	clickdot->widget = frame_create(clickdot->window, clickdot);
+	clickdot->widget = window_frame_create(clickdot->window, clickdot);
 	window_set_title(clickdot->window, "Wayland ClickDot");
 	clickdot->display = display;
 	clickdot->buffer = NULL;
diff --git a/clients/cliptest.c b/clients/cliptest.c
index 4b77808..89c3ca7 100644
--- a/clients/cliptest.c
+++ b/clients/cliptest.c
@@ -798,7 +798,7 @@ cliptest_create(struct display *display)
 	geometry_init(&cliptest->ui.geometry);
 
 	cliptest->window = window_create(display);
-	cliptest->widget = frame_create(cliptest->window, cliptest);
+	cliptest->widget = window_frame_create(cliptest->window, cliptest);
 	window_set_title(cliptest->window, "cliptest");
 	cliptest->display = display;
 
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 599c0a5..8c97104 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -896,7 +896,7 @@ unlock_dialog_create(struct desktop *desktop)
 	dialog = xzalloc(sizeof *dialog);
 
 	dialog->window = window_create_custom(display);
-	dialog->widget = frame_create(dialog->window, dialog);
+	dialog->widget = window_frame_create(dialog->window, dialog);
 	window_set_title(dialog->window, "Unlock your desktop");
 
 	window_set_user_data(dialog->window, dialog);
diff --git a/clients/dnd.c b/clients/dnd.c
index 19cc243..cb8c00c 100644
--- a/clients/dnd.c
+++ b/clients/dnd.c
@@ -589,7 +589,7 @@ dnd_create(struct display *display)
 
 	dnd = xzalloc(sizeof *dnd);
 	dnd->window = window_create(display);
-	dnd->widget = frame_create(dnd->window, dnd);
+	dnd->widget = window_frame_create(dnd->window, dnd);
 	window_set_title(dnd->window, "Wayland Drag and Drop Demo");
 
 	dnd->display = display;
@@ -618,7 +618,7 @@ dnd_create(struct display *display)
 	width = 4 * (item_width + item_padding) + item_padding;
 	height = 4 * (item_height + item_padding) + item_padding;
 
-	frame_set_child_size(dnd->widget, width, height);
+	window_frame_set_child_size(dnd->widget, width, height);
 
 	return dnd;
 }
diff --git a/clients/eventdemo.c b/clients/eventdemo.c
index 05ad5dc..029b1d8 100644
--- a/clients/eventdemo.c
+++ b/clients/eventdemo.c
@@ -307,7 +307,7 @@ eventdemo_create(struct display *d)
 		 */
 		e->widget = window_add_widget(e->window, e);
 	} else {
-		e->widget = frame_create(e->window, e);
+		e->widget = window_frame_create(e->window, e);
 		window_set_title(e->window, title);
 	}
 	e->display = d;
diff --git a/clients/image.c b/clients/image.c
index 4d3f3b8..c73d0c0 100644
--- a/clients/image.c
+++ b/clients/image.c
@@ -378,7 +378,7 @@ image_create(struct display *display, const char *filename,
 	}
 
 	image->window = window_create(display);
-	image->widget = frame_create(image->window, image);
+	image->widget = window_frame_create(image->window, image);
 	window_set_title(image->window, title);
 	image->display = display;
 	image->image_counter = image_counter;
diff --git a/clients/nested.c b/clients/nested.c
index 67938c0..2361f14 100644
--- a/clients/nested.c
+++ b/clients/nested.c
@@ -578,7 +578,7 @@ nested_create(struct display *display)
 		return nested;
 
 	nested->window = window_create(display);
-	nested->widget = frame_create(nested->window, nested);
+	nested->widget = window_frame_create(nested->window, nested);
 	window_set_title(nested->window, "Wayland Nested");
 	nested->display = display;
 
diff --git a/clients/resizor.c b/clients/resizor.c
index 68e4bf9..0f98d0b 100644
--- a/clients/resizor.c
+++ b/clients/resizor.c
@@ -235,7 +235,7 @@ resizor_create(struct display *display)
 
 	resizor = xzalloc(sizeof *resizor);
 	resizor->window = window_create(display);
-	resizor->widget = frame_create(resizor->window, resizor);
+	resizor->widget = window_frame_create(resizor->window, resizor);
 	window_set_title(resizor->window, "Wayland Resizor");
 	resizor->display = display;
 
diff --git a/clients/subsurfaces.c b/clients/subsurfaces.c
index 101ff17..0f11009 100644
--- a/clients/subsurfaces.c
+++ b/clients/subsurfaces.c
@@ -722,7 +722,7 @@ demoapp_create(struct display *display)
 	display_set_user_data(app->display, app);
 
 	app->window = window_create(app->display);
-	app->widget = frame_create(app->window, app);
+	app->widget = window_frame_create(app->window, app);
 	window_set_title(app->window, "Wayland Sub-surface Demo");
 
 	window_set_key_handler(app->window, key_handler);
diff --git a/clients/terminal.c b/clients/terminal.c
index cec1d67..38abe50 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -840,7 +840,7 @@ terminal_resize(struct terminal *terminal, int columns, int rows)
 	width = columns * terminal->average_width + m;
 	height = rows * terminal->extents.height + m;
 
-	frame_set_child_size(terminal->widget, width, height);
+	window_frame_set_child_size(terminal->widget, width, height);
 }
 
 struct color_scheme DEFAULT_COLORS = {
@@ -2652,7 +2652,7 @@ terminal_create(struct display *display)
 	terminal->margin_top = 0;
 	terminal->margin_bottom = -1;
 	terminal->window = window_create(display);
-	terminal->widget = frame_create(terminal->window, terminal);
+	terminal->widget = window_frame_create(terminal->window, terminal);
 	window_set_title(terminal->window, "Wayland Terminal");
 	widget_set_transparent(terminal->widget, 0);
 
diff --git a/clients/window.c b/clients/window.c
index 5b20da5..9fa1d52 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1513,7 +1513,7 @@ window_get_output_scale(struct window *window)
 	return scale;
 }
 
-static void frame_destroy(struct frame *frame);
+static void window_frame_destroy(struct frame *frame);
 
 static void
 surface_destroy(struct surface *surface)
@@ -1567,7 +1567,7 @@ window_destroy(struct window *window)
 	}
 
 	if (window->frame)
-		frame_destroy(window->frame);
+		window_frame_destroy(window->frame);
 
 	if (window->shell_surface)
 		wl_shell_surface_destroy(window->shell_surface);
@@ -2705,7 +2705,7 @@ frame_touch_down_handler(struct widget *widget, struct input *input,
 }
 
 struct widget *
-frame_create(struct window *window, void *data)
+window_frame_create(struct window *window, void *data)
 {
 	struct frame *frame;
 
@@ -2741,7 +2741,8 @@ frame_create(struct window *window, void *data)
 }
 
 void
-frame_set_child_size(struct widget *widget, int child_width, int child_height)
+window_frame_set_child_size(struct widget *widget, int child_width,
+			    int child_height)
 {
 	struct display *display = widget->window->display;
 	struct theme *t = display->theme;
@@ -2765,7 +2766,7 @@ frame_set_child_size(struct widget *widget, int child_width, int child_height)
 }
 
 static void
-frame_destroy(struct frame *frame)
+window_frame_destroy(struct frame *frame)
 {
 	struct frame_button *button, *tmp;
 
diff --git a/clients/window.h b/clients/window.h
index 4427ab5..6c2275b 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -508,10 +508,11 @@ void
 widget_schedule_redraw(struct widget *widget);
 
 struct widget *
-frame_create(struct window *window, void *data);
+window_frame_create(struct window *window, void *data);
 
 void
-frame_set_child_size(struct widget *widget, int child_width, int child_height);
+window_frame_set_child_size(struct widget *widget, int child_width,
+			    int child_height);
 
 void
 input_set_pointer_image(struct input *input, int pointer);
-- 
1.8.3.1



More information about the wayland-devel mailing list