mirror of
https://github.com/labwc/labwc.git
synced 2025-11-30 06:59:52 -05:00
osd: rename *_scene_item to *_item
This commit is contained in:
parent
2c0552004a
commit
747163fa3e
2 changed files with 8 additions and 8 deletions
|
|
@ -18,7 +18,7 @@
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
#include "workspaces.h"
|
#include "workspaces.h"
|
||||||
|
|
||||||
struct osd_classic_scene_item {
|
struct osd_classic_item {
|
||||||
struct view *view;
|
struct view *view;
|
||||||
struct wlr_scene_tree *normal_tree, *active_tree;
|
struct wlr_scene_tree *normal_tree, *active_tree;
|
||||||
};
|
};
|
||||||
|
|
@ -155,7 +155,7 @@ osd_classic_create(struct output *output, struct wl_array *views)
|
||||||
/* Draw text for each node */
|
/* Draw text for each node */
|
||||||
struct view **view;
|
struct view **view;
|
||||||
wl_array_for_each(view, views) {
|
wl_array_for_each(view, views) {
|
||||||
struct osd_classic_scene_item *item =
|
struct osd_classic_item *item =
|
||||||
wl_array_add(&output->osd_scene.items, sizeof(*item));
|
wl_array_add(&output->osd_scene.items, sizeof(*item));
|
||||||
item->view = *view;
|
item->view = *view;
|
||||||
/*
|
/*
|
||||||
|
|
@ -218,7 +218,7 @@ error:;
|
||||||
static void
|
static void
|
||||||
osd_classic_update(struct output *output)
|
osd_classic_update(struct output *output)
|
||||||
{
|
{
|
||||||
struct osd_classic_scene_item *item;
|
struct osd_classic_item *item;
|
||||||
wl_array_for_each(item, &output->osd_scene.items) {
|
wl_array_for_each(item, &output->osd_scene.items) {
|
||||||
bool active = item->view == output->server->osd_state.cycle_view;
|
bool active = item->view == output->server->osd_state.cycle_view;
|
||||||
wlr_scene_node_set_enabled(&item->normal_tree->node, !active);
|
wlr_scene_node_set_enabled(&item->normal_tree->node, !active);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
struct osd_thumbnail_scene_item {
|
struct osd_thumbnail_item {
|
||||||
struct view *view;
|
struct view *view;
|
||||||
struct wlr_scene_tree *tree;
|
struct wlr_scene_tree *tree;
|
||||||
struct scaled_font_buffer *normal_title;
|
struct scaled_font_buffer *normal_title;
|
||||||
|
|
@ -103,7 +103,7 @@ create_title(struct wlr_scene_tree *parent,
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct osd_thumbnail_scene_item *
|
static struct osd_thumbnail_item *
|
||||||
create_item_scene(struct wlr_scene_tree *parent, struct view *view,
|
create_item_scene(struct wlr_scene_tree *parent, struct view *view,
|
||||||
struct output *output)
|
struct output *output)
|
||||||
{
|
{
|
||||||
|
|
@ -124,7 +124,7 @@ create_item_scene(struct wlr_scene_tree *parent, struct view *view,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct osd_thumbnail_scene_item *item =
|
struct osd_thumbnail_item *item =
|
||||||
wl_array_add(&output->osd_scene.items, sizeof(*item));
|
wl_array_add(&output->osd_scene.items, sizeof(*item));
|
||||||
item->tree = wlr_scene_tree_create(parent);
|
item->tree = wlr_scene_tree_create(parent);
|
||||||
item->view = view;
|
item->view = view;
|
||||||
|
|
@ -229,7 +229,7 @@ osd_thumbnail_create(struct output *output, struct wl_array *views)
|
||||||
struct view **view;
|
struct view **view;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
wl_array_for_each(view, views) {
|
wl_array_for_each(view, views) {
|
||||||
struct osd_thumbnail_scene_item *item = create_item_scene(
|
struct osd_thumbnail_item *item = create_item_scene(
|
||||||
output->osd_scene.tree, *view, output);
|
output->osd_scene.tree, *view, output);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
break;
|
break;
|
||||||
|
|
@ -265,7 +265,7 @@ osd_thumbnail_create(struct output *output, struct wl_array *views)
|
||||||
static void
|
static void
|
||||||
osd_thumbnail_update(struct output *output)
|
osd_thumbnail_update(struct output *output)
|
||||||
{
|
{
|
||||||
struct osd_thumbnail_scene_item *item;
|
struct osd_thumbnail_item *item;
|
||||||
wl_array_for_each(item, &output->osd_scene.items) {
|
wl_array_for_each(item, &output->osd_scene.items) {
|
||||||
bool active = (item->view == output->server->osd_state.cycle_view);
|
bool active = (item->view == output->server->osd_state.cycle_view);
|
||||||
wlr_scene_node_set_enabled(&item->active_bg->tree->node, active);
|
wlr_scene_node_set_enabled(&item->active_bg->tree->node, active);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue