grdev-internal.h revision 650c5444273993f969b9cd7df9add6ab2df0414e
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright (C) 2014 David Herrmann <dh.herrmann@gmail.com>
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.
systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <systemd/sd-event.h>
#include "grdev.h"
#include "hashmap.h"
#include "list.h"
#include "util.h"
typedef struct grdev_tile grdev_tile;
typedef struct grdev_display_cache grdev_display_cache;
typedef struct grdev_pipe_vtable grdev_pipe_vtable;
typedef struct grdev_pipe grdev_pipe;
typedef struct grdev_card_vtable grdev_card_vtable;
typedef struct grdev_card grdev_card;
/*
* Displays
*/
enum {
};
struct grdev_tile {
uint32_t x;
uint32_t y;
unsigned int rotate;
unsigned int flip;
unsigned int type;
union {
struct {
} leaf;
struct {
} node;
};
};
struct grdev_display {
char *name;
struct grdev_display_cache {
bool incomplete : 1;
} *pipes;
bool enabled : 1;
bool public : 1;
bool modified : 1;
bool framed : 1;
};
/*
* Pipes
*/
struct grdev_pipe_vtable {
};
struct grdev_pipe {
const grdev_pipe_vtable *vtable;
char *name;
bool enabled : 1;
bool running : 1;
bool flip : 1;
bool flipping : 1;
};
})
/*
* Cards
*/
struct grdev_card_vtable {
};
struct grdev_card {
const grdev_card_vtable *vtable;
char *name;
bool enabled : 1;
bool modified : 1;
};
})
/*
* Sessions
*/
struct grdev_session {
char *name;
char *path;
void *userdata;
unsigned long n_pins;
bool custom : 1;
bool managed : 1;
bool enabled : 1;
bool modified : 1;
};
/*
* Contexts
*/
struct grdev_context {
unsigned long ref;
};