Rename frame_create and frame_set_child_size with a window_ prefix

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

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
dev
Jason Ekstrand 11 years ago committed by Kristian Høgsberg
parent bcfd07b70a
commit ee7fefcffc
  1. 2
      clients/clickdot.c
  2. 2
      clients/cliptest.c
  3. 2
      clients/desktop-shell.c
  4. 4
      clients/dnd.c
  5. 2
      clients/editor.c
  6. 2
      clients/eventdemo.c
  7. 2
      clients/image.c
  8. 2
      clients/nested.c
  9. 2
      clients/resizor.c
  10. 2
      clients/subsurfaces.c
  11. 4
      clients/terminal.c
  12. 11
      clients/window.c
  13. 5
      clients/window.h

@ -249,7 +249,7 @@ clickdot_create(struct display *display)
clickdot = xzalloc(sizeof *clickdot); clickdot = xzalloc(sizeof *clickdot);
clickdot->window = window_create(display); 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"); window_set_title(clickdot->window, "Wayland ClickDot");
clickdot->display = display; clickdot->display = display;
clickdot->buffer = NULL; clickdot->buffer = NULL;

@ -798,7 +798,7 @@ cliptest_create(struct display *display)
geometry_init(&cliptest->ui.geometry); geometry_init(&cliptest->ui.geometry);
cliptest->window = window_create(display); 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"); window_set_title(cliptest->window, "cliptest");
cliptest->display = display; cliptest->display = display;

@ -896,7 +896,7 @@ unlock_dialog_create(struct desktop *desktop)
dialog = xzalloc(sizeof *dialog); dialog = xzalloc(sizeof *dialog);
dialog->window = window_create_custom(display); 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_title(dialog->window, "Unlock your desktop");
window_set_user_data(dialog->window, dialog); window_set_user_data(dialog->window, dialog);

@ -589,7 +589,7 @@ dnd_create(struct display *display)
dnd = xzalloc(sizeof *dnd); dnd = xzalloc(sizeof *dnd);
dnd->window = window_create(display); 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"); window_set_title(dnd->window, "Wayland Drag and Drop Demo");
dnd->display = display; dnd->display = display;
@ -618,7 +618,7 @@ dnd_create(struct display *display)
width = 4 * (item_width + item_padding) + item_padding; width = 4 * (item_width + item_padding) + item_padding;
height = 4 * (item_height + 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; return dnd;
} }

@ -1221,7 +1221,7 @@ main(int argc, char *argv[])
display_set_global_handler(editor.display, global_handler); display_set_global_handler(editor.display, global_handler);
editor.window = window_create(editor.display); editor.window = window_create(editor.display);
editor.widget = frame_create(editor.window, &editor); editor.widget = window_frame_create(editor.window, &editor);
editor.entry = text_entry_create(&editor, "Entry"); editor.entry = text_entry_create(&editor, "Entry");
editor.entry->click_to_show = click_to_show; editor.entry->click_to_show = click_to_show;

@ -307,7 +307,7 @@ eventdemo_create(struct display *d)
*/ */
e->widget = window_add_widget(e->window, e); e->widget = window_add_widget(e->window, e);
} else { } else {
e->widget = frame_create(e->window, e); e->widget = window_frame_create(e->window, e);
window_set_title(e->window, title); window_set_title(e->window, title);
} }
e->display = d; e->display = d;

@ -378,7 +378,7 @@ image_create(struct display *display, const char *filename,
} }
image->window = window_create(display); 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); window_set_title(image->window, title);
image->display = display; image->display = display;
image->image_counter = image_counter; image->image_counter = image_counter;

@ -583,7 +583,7 @@ nested_create(struct display *display)
return nested; return nested;
nested->window = window_create(display); 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"); window_set_title(nested->window, "Wayland Nested");
nested->display = display; nested->display = display;

@ -235,7 +235,7 @@ resizor_create(struct display *display)
resizor = xzalloc(sizeof *resizor); resizor = xzalloc(sizeof *resizor);
resizor->window = window_create(display); 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"); window_set_title(resizor->window, "Wayland Resizor");
resizor->display = display; resizor->display = display;

@ -722,7 +722,7 @@ demoapp_create(struct display *display)
display_set_user_data(app->display, app); display_set_user_data(app->display, app);
app->window = window_create(app->display); 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_title(app->window, "Wayland Sub-surface Demo");
window_set_key_handler(app->window, key_handler); window_set_key_handler(app->window, key_handler);

@ -840,7 +840,7 @@ terminal_resize(struct terminal *terminal, int columns, int rows)
width = columns * terminal->average_width + m; width = columns * terminal->average_width + m;
height = rows * terminal->extents.height + 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 = { struct color_scheme DEFAULT_COLORS = {
@ -2652,7 +2652,7 @@ terminal_create(struct display *display)
terminal->margin_top = 0; terminal->margin_top = 0;
terminal->margin_bottom = -1; terminal->margin_bottom = -1;
terminal->window = window_create(display); 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"); window_set_title(terminal->window, "Wayland Terminal");
widget_set_transparent(terminal->widget, 0); widget_set_transparent(terminal->widget, 0);

@ -1514,7 +1514,7 @@ window_get_output_scale(struct window *window)
return scale; return scale;
} }
static void frame_destroy(struct frame *frame); static void window_frame_destroy(struct frame *frame);
static void static void
surface_destroy(struct surface *surface) surface_destroy(struct surface *surface)
@ -1568,7 +1568,7 @@ window_destroy(struct window *window)
} }
if (window->frame) if (window->frame)
frame_destroy(window->frame); window_frame_destroy(window->frame);
if (window->shell_surface) if (window->shell_surface)
wl_shell_surface_destroy(window->shell_surface); wl_shell_surface_destroy(window->shell_surface);
@ -2706,7 +2706,7 @@ frame_touch_down_handler(struct widget *widget, struct input *input,
} }
struct widget * struct widget *
frame_create(struct window *window, void *data) window_frame_create(struct window *window, void *data)
{ {
struct frame *frame; struct frame *frame;
@ -2742,7 +2742,8 @@ frame_create(struct window *window, void *data)
} }
void 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 display *display = widget->window->display;
struct theme *t = display->theme; struct theme *t = display->theme;
@ -2766,7 +2767,7 @@ frame_set_child_size(struct widget *widget, int child_width, int child_height)
} }
static void static void
frame_destroy(struct frame *frame) window_frame_destroy(struct frame *frame)
{ {
struct frame_button *button, *tmp; struct frame_button *button, *tmp;

@ -508,10 +508,11 @@ void
widget_schedule_redraw(struct widget *widget); widget_schedule_redraw(struct widget *widget);
struct widget * struct widget *
frame_create(struct window *window, void *data); window_frame_create(struct window *window, void *data);
void 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 void
input_set_pointer_image(struct input *input, int pointer); input_set_pointer_image(struct input *input, int pointer);

Loading…
Cancel
Save