mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
Also remove some unused function parameters from bitmap_get_graduality_level() Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
105 lines
2.4 KiB
C
105 lines
2.4 KiB
C
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
/*
|
|
Copyright (C) 2009-2015 Red Hat, Inc.
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#ifndef TREE_H_
|
|
# define TREE_H_
|
|
|
|
#include <stdint.h>
|
|
#include "common/region.h"
|
|
#include "common/ring.h"
|
|
#include "spice-bitmap-utils.h"
|
|
|
|
enum {
|
|
TREE_ITEM_TYPE_NONE,
|
|
TREE_ITEM_TYPE_DRAWABLE,
|
|
TREE_ITEM_TYPE_CONTAINER,
|
|
TREE_ITEM_TYPE_SHADOW,
|
|
|
|
TREE_ITEM_TYPE_LAST,
|
|
};
|
|
|
|
typedef struct TreeItem TreeItem;
|
|
typedef struct Shadow Shadow;
|
|
typedef struct Container Container;
|
|
typedef struct DrawItem DrawItem;
|
|
|
|
/* TODO consider GNode instead */
|
|
struct TreeItem {
|
|
RingItem siblings_link;
|
|
uint32_t type;
|
|
Container *container;
|
|
QRegion rgn;
|
|
};
|
|
|
|
struct Shadow {
|
|
TreeItem base;
|
|
QRegion on_hold;
|
|
DrawItem* owner;
|
|
};
|
|
|
|
struct Container {
|
|
TreeItem base;
|
|
Ring items;
|
|
};
|
|
|
|
struct DrawItem {
|
|
TreeItem base;
|
|
uint8_t effect;
|
|
uint8_t container_root;
|
|
Shadow *shadow;
|
|
};
|
|
|
|
#define IS_DRAW_ITEM(item) ((item)->type == TREE_ITEM_TYPE_DRAWABLE)
|
|
|
|
typedef struct DependItem {
|
|
Drawable *drawable;
|
|
RingItem ring_item;
|
|
} DependItem;
|
|
|
|
struct Drawable {
|
|
uint8_t refs;
|
|
RingItem surface_list_link;
|
|
RingItem list_link;
|
|
DrawItem tree_item;
|
|
Ring pipes;
|
|
PipeItem *pipe_item_rest;
|
|
uint32_t size_pipe_item_rest;
|
|
RedDrawable *red_drawable;
|
|
|
|
Ring glz_ring;
|
|
|
|
red_time_t creation_time;
|
|
int frames_count;
|
|
int gradual_frames_count;
|
|
int last_gradual_frame;
|
|
Stream *stream;
|
|
Stream *sized_stream;
|
|
int streamable;
|
|
BitmapGradualType copy_bitmap_graduality;
|
|
uint32_t group_id;
|
|
DependItem depend_items[3];
|
|
|
|
int surface_id;
|
|
int surfaces_dest[3];
|
|
|
|
uint32_t process_commands_generation;
|
|
};
|
|
|
|
void tree_item_dump (TreeItem *item);
|
|
|
|
#endif /* TREE_H_ */
|