mirror of
https://github.com/labwc/labwc.git
synced 2026-03-01 01:40:24 -05:00
output: remove ported wlr_output functions
We have several wlr_output_* functions which are just wrappers around corresponding wlr_output_state_* functions and don't actually touch the wlr_output itself. These probably made some sense historically, but IMHO they are just confusing now. So remove them and call wlr_output_state_* directly. Rename wlr_output_commit() (still useful) to output_state_commit().
This commit is contained in:
parent
45a9bd95e7
commit
7912665b0f
7 changed files with 50 additions and 117 deletions
|
|
@ -27,17 +27,10 @@ output_state_init(struct output *output)
|
|||
}
|
||||
|
||||
bool
|
||||
wlr_output_test(struct wlr_output *wlr_output)
|
||||
output_state_commit(struct output *output)
|
||||
{
|
||||
struct output *output = wlr_output->data;
|
||||
return wlr_output_test_state(wlr_output, &output->pending);
|
||||
}
|
||||
|
||||
bool
|
||||
wlr_output_commit(struct wlr_output *wlr_output)
|
||||
{
|
||||
struct output *output = wlr_output->data;
|
||||
bool committed = wlr_output_commit_state(wlr_output, &output->pending);
|
||||
bool committed =
|
||||
wlr_output_commit_state(output->wlr_output, &output->pending);
|
||||
if (committed) {
|
||||
wlr_output_state_finish(&output->pending);
|
||||
wlr_output_state_init(&output->pending);
|
||||
|
|
@ -46,47 +39,3 @@ wlr_output_commit(struct wlr_output *wlr_output)
|
|||
}
|
||||
return committed;
|
||||
}
|
||||
|
||||
void
|
||||
wlr_output_enable(struct wlr_output *wlr_output, bool enabled)
|
||||
{
|
||||
struct output *output = wlr_output->data;
|
||||
wlr_output_state_set_enabled(&output->pending, enabled);
|
||||
}
|
||||
|
||||
void
|
||||
wlr_output_set_mode(struct wlr_output *wlr_output, struct wlr_output_mode *mode)
|
||||
{
|
||||
struct output *output = wlr_output->data;
|
||||
wlr_output_state_set_mode(&output->pending, mode);
|
||||
}
|
||||
|
||||
void
|
||||
wlr_output_set_custom_mode(struct wlr_output *wlr_output,
|
||||
int32_t width, int32_t height, int32_t refresh)
|
||||
{
|
||||
struct output *output = wlr_output->data;
|
||||
wlr_output_state_set_custom_mode(&output->pending, width, height, refresh);
|
||||
}
|
||||
|
||||
void
|
||||
wlr_output_set_scale(struct wlr_output *wlr_output, float scale)
|
||||
{
|
||||
struct output *output = wlr_output->data;
|
||||
wlr_output_state_set_scale(&output->pending, scale);
|
||||
}
|
||||
|
||||
void
|
||||
wlr_output_set_transform(struct wlr_output *wlr_output,
|
||||
enum wl_output_transform transform)
|
||||
{
|
||||
struct output *output = wlr_output->data;
|
||||
wlr_output_state_set_transform(&output->pending, transform);
|
||||
}
|
||||
|
||||
void
|
||||
wlr_output_enable_adaptive_sync(struct wlr_output *wlr_output, bool enabled)
|
||||
{
|
||||
struct output *output = wlr_output->data;
|
||||
wlr_output_state_set_adaptive_sync_enabled(&output->pending, enabled);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue