-
Notifications
You must be signed in to change notification settings - Fork 4
/
screentest_colors.h
75 lines (68 loc) · 2.37 KB
/
screentest_colors.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Screentest - CRT/LCD monitor testing utility.
* https://tobix.github.io/screentest/
* Copyright (C) 2001 Jan "Yenya" Kasprzak <[email protected]>
* Copyright (C) 2006-2017 Tobias Gruetzmacher <[email protected]>
* Copyright (C) 2021 Apr Thorsten Kattanek <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifndef SCREENTEST_COLORS_H
#define SCREENTEST_COLORS_H
#include <gdk/gdk.h>
/**
* An array representing a predefined set of colors for screentest
*/
enum ScreentestColors {
SCREENTEST_COLORS_WHITE,
SCREENTEST_COLORS_RED,
SCREENTEST_COLORS_GREEN,
SCREENTEST_COLORS_BLUE,
SCREENTEST_COLORS_CYAN,
SCREENTEST_COLORS_MAGENTA,
SCREENTEST_COLORS_YELLOW,
SCREENTEST_COLORS_BLACK,
SCREENTEST_COLORS_MAX
};
/**
* One above the highest index of the `grays` array
*/
#define SCREENTEST_GRAYS_MAX SCREENTEST_COLORS_MAX
/**
* @brief A pointer to the storage location of the background color (on stack)
*/
extern GdkRGBA *const bg_color;
/**
* @brief An array holding all predefined `ScreentestColors`
*/
extern const GdkRGBA fgcolors[SCREENTEST_COLORS_MAX];
/**
* @brief A pointer to the storage location of the foreground color (on stack)
*/
extern GdkRGBA *const fg_color;
/**
* @brief An array holding all predefined gray value "colors"
*/
extern const GdkRGBA grays[SCREENTEST_GRAYS_MAX];
/**
* @brief Set the source pattern of the given Cairo context to an opaque color
* @param[in,out] cr The Cairo context which is used to draw the background
*/
void screentest_set_color_bg(cairo_t *cr);
/**
* @brief Set the source pattern of the given Cairo context to an opaque color
* @param[in,out] cr The Cairo context which is used to draw the foreground
*/
void screentest_set_color_fg(cairo_t *cr);
#endif // SCREENTEST_COLORS_H