summaryrefslogtreecommitdiff
path: root/tools/checkwps
diff options
context:
space:
mode:
Diffstat (limited to 'tools/checkwps')
-rw-r--r--tools/checkwps/checkwps.c49
-rw-r--r--tools/checkwps/checkwps.h42
2 files changed, 77 insertions, 14 deletions
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c
index 409a62c566..2a6327df7c 100644
--- a/tools/checkwps/checkwps.c
+++ b/tools/checkwps/checkwps.c
@@ -1,8 +1,30 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2008 by Dave Chapman
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
1#include <stdio.h> 22#include <stdio.h>
2#include <stdlib.h> 23#include <stdlib.h>
3#include <fcntl.h> 24#include <fcntl.h>
4#include "config.h" 25#include "config.h"
5#include "gwps.h" 26#include "gwps.h"
27#include "checkwps.h"
6 28
7#define MIN(x,y) ((x) > (y) ? (y) : (x)) 29#define MIN(x,y) ((x) > (y) ? (y) : (x))
8 30
@@ -89,11 +111,6 @@ bool load_remote_wps_backdrop(const char* filename)
89 111
90static char pluginbuf[PLUGIN_BUFFER_SIZE]; 112static char pluginbuf[PLUGIN_BUFFER_SIZE];
91 113
92static int dummy_func1(void)
93{
94 return 0;
95}
96
97static unsigned dummy_func2(void) 114static unsigned dummy_func2(void)
98{ 115{
99 return 0; 116 return 0;
@@ -104,21 +121,27 @@ void* plugin_get_buffer(size_t *buffer_size)
104 *buffer_size = PLUGIN_BUFFER_SIZE; 121 *buffer_size = PLUGIN_BUFFER_SIZE;
105 return pluginbuf; 122 return pluginbuf;
106} 123}
107 124struct user_settings global_settings = {
125 .statusbar = true,
126#ifdef HAVE_LCD_COLOR
127 .bg_color = LCD_DEFAULT_BG,
128 .fg_color = LCD_DEFAULT_FG,
129#endif
130};
131
132
108struct screen screens[NB_SCREENS] = 133struct screen screens[NB_SCREENS] =
109{ 134{
110 { 135 {
111 .screen_type=SCREEN_MAIN, 136 .screen_type=SCREEN_MAIN,
112 .width=LCD_WIDTH, 137 .lcdwidth=LCD_WIDTH,
113 .height=LCD_HEIGHT, 138 .lcdheight=LCD_HEIGHT,
114 .depth=LCD_DEPTH, 139 .depth=LCD_DEPTH,
115#ifdef HAVE_LCD_COLOR 140#ifdef HAVE_LCD_COLOR
116 .is_color=true, 141 .is_color=true,
117#else 142#else
118 .is_color=false, 143 .is_color=false,
119#endif 144#endif
120 .getxmargin=dummy_func1,
121 .getymargin=dummy_func1,
122#if LCD_DEPTH > 1 145#if LCD_DEPTH > 1
123 .get_foreground=dummy_func2, 146 .get_foreground=dummy_func2,
124 .get_background=dummy_func2, 147 .get_background=dummy_func2,
@@ -127,12 +150,10 @@ struct screen screens[NB_SCREENS] =
127#ifdef HAVE_REMOTE_LCD 150#ifdef HAVE_REMOTE_LCD
128 { 151 {
129 .screen_type=SCREEN_REMOTE, 152 .screen_type=SCREEN_REMOTE,
130 .width=LCD_REMOTE_WIDTH, 153 .lcdwidth=LCD_REMOTE_WIDTH,
131 .height=LCD_REMOTE_HEIGHT, 154 .lcdheight=LCD_REMOTE_HEIGHT,
132 .depth=LCD_REMOTE_DEPTH, 155 .depth=LCD_REMOTE_DEPTH,
133 .is_color=false,/* No color remotes yet */ 156 .is_color=false,/* No color remotes yet */
134 .getxmargin=dummy_func1,
135 .getymargin=dummy_func1,
136#if LCD_REMOTE_DEPTH > 1 157#if LCD_REMOTE_DEPTH > 1
137 .get_foreground=dummy_func2, 158 .get_foreground=dummy_func2,
138 .get_background=dummy_func2, 159 .get_background=dummy_func2,
diff --git a/tools/checkwps/checkwps.h b/tools/checkwps/checkwps.h
new file mode 100644
index 0000000000..fa3b425500
--- /dev/null
+++ b/tools/checkwps/checkwps.h
@@ -0,0 +1,42 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2008 by Jonathan Gordon
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef _CHECKWPS_H_
23#define _CHECKWPS_H_
24#include <stdio.h>
25#include <stdlib.h>
26#include <fcntl.h>
27
28/* subset of global_settings needed to build checkwps. */
29struct user_settings {
30 bool statusbar;
31#ifdef HAVE_LCD_COLOR
32 int bg_color; /* background color native format */
33 int fg_color; /* foreground color native format */
34#endif
35};
36
37extern struct user_settings global_settings;
38
39
40
41
42#endif