view: remove cg_ prefix

This commit is contained in:
Jente Hidskes 2019-01-30 16:10:48 +01:00
parent f25460f365
commit 24517922cc
5 changed files with 8 additions and 7 deletions

2
seat.c
View file

@ -692,7 +692,7 @@ struct cg_view *
seat_get_focus(struct cg_seat *seat)
{
struct wlr_surface *prev_surface = seat->seat->keyboard_state.focused_surface;
return cg_view_from_wlr_surface(seat->server, prev_surface);
return view_from_wlr_surface(seat->server, prev_surface);
}
void

4
view.c
View file

@ -160,7 +160,7 @@ view_destroy(struct cg_view *view)
}
struct cg_view *
cg_view_create(struct cg_server *server)
view_create(struct cg_server *server)
{
struct cg_view *view = calloc(1, sizeof(struct cg_view));
@ -169,7 +169,7 @@ cg_view_create(struct cg_server *server)
}
struct cg_view *
cg_view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface)
view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface)
{
struct cg_view *view;
wl_list_for_each(view, &server->views, link) {

5
view.h
View file

@ -64,7 +64,8 @@ void view_position(struct cg_view *view);
void view_unmap(struct cg_view *view);
void view_map(struct cg_view *view, struct wlr_surface *surface);
void view_destroy(struct cg_view *view);
struct cg_view *cg_view_create(struct cg_server *server);
struct cg_view *cg_view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface);
struct cg_view *view_create(struct cg_server *server);
struct cg_view *view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface);
#endif

View file

@ -110,7 +110,7 @@ handle_xdg_shell_surface_new(struct wl_listener *listener, void *data)
return;
}
struct cg_view *view = cg_view_create(server);
struct cg_view *view = view_create(server);
view->type = CAGE_XDG_SHELL_VIEW;
view->xdg_surface = xdg_surface;

View file

@ -102,7 +102,7 @@ handle_xwayland_surface_new(struct wl_listener *listener, void *data)
struct cg_server *server = wl_container_of(listener, server, new_xwayland_surface);
struct wlr_xwayland_surface *xwayland_surface = data;
struct cg_view *view = cg_view_create(server);
struct cg_view *view = view_create(server);
view->type = CAGE_XWAYLAND_VIEW;
view->xwayland_surface = xwayland_surface;