Rename view_resize to view_set_size
This commit is contained in:
parent
0d6965192c
commit
a2b4bd58ae
4 changed files with 18 additions and 18 deletions
|
@ -53,8 +53,8 @@ struct kiwmi_view_impl {
|
|||
struct kiwmi_view *view,
|
||||
wlr_surface_iterator_func_t iterator,
|
||||
void *user_data);
|
||||
void (*resize)(struct kiwmi_view *view, uint32_t width, uint32_t height);
|
||||
void (*set_activated)(struct kiwmi_view *view, bool activated);
|
||||
void (*set_size)(struct kiwmi_view *view, uint32_t width, uint32_t height);
|
||||
void (*set_tiled)(struct kiwmi_view *view, bool tiled);
|
||||
struct wlr_surface *(*surface_at)(
|
||||
struct kiwmi_view *view,
|
||||
|
@ -69,8 +69,8 @@ void view_for_each_surface(
|
|||
struct kiwmi_view *view,
|
||||
wlr_surface_iterator_func_t iterator,
|
||||
void *user_data);
|
||||
void view_resize(struct kiwmi_view *view, uint32_t width, uint32_t height);
|
||||
void view_set_activated(struct kiwmi_view *view, bool activated);
|
||||
void view_set_size(struct kiwmi_view *view, uint32_t width, uint32_t height);
|
||||
void view_set_tiled(struct kiwmi_view *view, bool tiled);
|
||||
struct wlr_surface *view_surface_at(
|
||||
struct kiwmi_view *view,
|
||||
|
|
|
@ -31,14 +31,6 @@ view_for_each_surface(
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_resize(struct kiwmi_view *view, uint32_t width, uint32_t height)
|
||||
{
|
||||
if (view->impl->resize) {
|
||||
view->impl->resize(view, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_set_activated(struct kiwmi_view *view, bool activated)
|
||||
{
|
||||
|
@ -47,6 +39,14 @@ view_set_activated(struct kiwmi_view *view, bool activated)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_set_size(struct kiwmi_view *view, uint32_t width, uint32_t height)
|
||||
{
|
||||
if (view->impl->set_size) {
|
||||
view->impl->set_size(view, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_set_tiled(struct kiwmi_view *view, bool tiled)
|
||||
{
|
||||
|
|
|
@ -70,18 +70,18 @@ xdg_shell_view_for_each_surface(
|
|||
wlr_xdg_surface_for_each_surface(view->xdg_surface, iterator, user_data);
|
||||
}
|
||||
|
||||
static void
|
||||
xdg_shell_view_resize(struct kiwmi_view *view, uint32_t width, uint32_t height)
|
||||
{
|
||||
wlr_xdg_toplevel_set_size(view->xdg_surface, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
xdg_shell_view_set_activated(struct kiwmi_view *view, bool activated)
|
||||
{
|
||||
wlr_xdg_toplevel_set_activated(view->xdg_surface, activated);
|
||||
}
|
||||
|
||||
static void
|
||||
xdg_shell_view_set_size(struct kiwmi_view *view, uint32_t width, uint32_t height)
|
||||
{
|
||||
wlr_xdg_toplevel_set_size(view->xdg_surface, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
xdg_shell_view_set_tiled(struct kiwmi_view *view, bool tiled)
|
||||
{
|
||||
|
@ -110,8 +110,8 @@ xdg_shell_view_surface_at(
|
|||
static const struct kiwmi_view_impl xdg_shell_view_impl = {
|
||||
.close = xdg_shell_view_close,
|
||||
.for_each_surface = xdg_shell_view_for_each_surface,
|
||||
.resize = xdg_shell_view_resize,
|
||||
.set_activated = xdg_shell_view_set_activated,
|
||||
.set_size = xdg_shell_view_set_size,
|
||||
.set_tiled = xdg_shell_view_set_tiled,
|
||||
.surface_at = xdg_shell_view_surface_at,
|
||||
};
|
||||
|
|
|
@ -96,7 +96,7 @@ l_kiwmi_view_resize(lua_State *L)
|
|||
double w = lua_tonumber(L, 2);
|
||||
double h = lua_tonumber(L, 3);
|
||||
|
||||
view_resize(view, w, h);
|
||||
view_set_size(view, w, h);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue