summaryrefslogtreecommitdiff
path: root/utils/wpseditor/libwps/src/lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/wpseditor/libwps/src/lcd.c')
-rw-r--r--utils/wpseditor/libwps/src/lcd.c179
1 files changed, 0 insertions, 179 deletions
diff --git a/utils/wpseditor/libwps/src/lcd.c b/utils/wpseditor/libwps/src/lcd.c
deleted file mode 100644
index d78024d374..0000000000
--- a/utils/wpseditor/libwps/src/lcd.c
+++ /dev/null
@@ -1,179 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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#include "font.h"
23#include "screen_access.h"
24//#include <windef.h>
25#include "api.h"
26#include "defs.h"
27#include "proxy.h"
28#include "dummies.h"
29
30static struct viewport default_vp =
31{
32 .x = 0,
33 .y = 0,
34 .width = LCD_WIDTH,
35 .height = LCD_HEIGHT,
36#ifdef HAVE_LCD_BITMAP
37 .font = FONT_SYSFIXED,
38 .drawmode = DRMODE_SOLID,
39#endif
40#if LCD_DEPTH > 1
41 .fg_pattern = LCD_DEFAULT_FG,
42 .bg_pattern = LCD_DEFAULT_BG,
43#ifdef HAVE_LCD_COLOR
44 .lss_pattern = LCD_DEFAULT_BG,
45 .lse_pattern = LCD_DEFAULT_BG,
46 .lst_pattern = LCD_DEFAULT_BG,
47#endif
48#endif
49};
50
51struct viewport* current_vp = &default_vp;
52
53void get_current_vp(struct viewport_api *avp){
54 avp->x = current_vp->x;
55 avp->y = current_vp->y;
56 avp->width = current_vp->width;
57 avp->height = current_vp->height;
58
59 //TODO: font_get(current_vp->font)->height;
60 avp->fontheight = sysfont.height;
61}
62
63void lcd_set_viewport(struct viewport* vp)
64{
65 if (vp == NULL){
66 current_vp = &default_vp;
67 DEBUGF3("lcd_set_viewport(struct viewport* vp= DEFAULT)\n");
68 }
69 else{
70 current_vp = vp;
71 DEBUGF3("lcd_set_viewport(struct viewport* vp=%x,vpx=%d,vpy=%d,vpw=%d,vph=%d)\n",vp,vp->x,vp->y,vp->width,vp->height);
72 }
73}
74
75void lcd_update_viewport(void)
76{
77 //lcd_update_rect(current_vp->x, current_vp->y,current_vp->width, current_vp->height);
78}
79
80void lcd_update_viewport_rect(int x, int y, int width, int height)
81{
82 //lcd_update_rect(current_vp->x + x, current_vp->y + y, width, height);
83}
84/*** parameter handling ***/
85
86void lcd_set_drawmode(int mode)
87{
88 current_vp->drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID);
89}
90
91int lcd_get_drawmode(void)
92{
93 return current_vp->drawmode;
94}
95#if LCD_DEPTH > 1
96void lcd_set_foreground(unsigned color)
97{
98 current_vp->fg_pattern = color;
99}
100
101unsigned lcd_get_foreground(void)
102{
103 return current_vp->fg_pattern;
104}
105
106void lcd_set_background(unsigned color)
107{
108 current_vp->bg_pattern = color;
109}
110
111unsigned lcd_get_background(void)
112{
113 return current_vp->bg_pattern;
114}
115
116#ifdef HAVE_LCD_COLOR
117void lcd_set_selector_start(unsigned color)
118{
119 current_vp->lss_pattern = color;
120}
121
122void lcd_set_selector_end(unsigned color)
123{
124 current_vp->lse_pattern = color;
125}
126
127void lcd_set_selector_text(unsigned color)
128{
129 current_vp->lst_pattern = color;
130}
131
132void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color)
133{
134 //lcd_set_drawmode(mode);
135 current_vp->fg_pattern = fg_color;
136 current_vp->bg_pattern = bg_color;
137}
138#endif
139#endif
140int lcd_getwidth(void)
141{
142 return current_vp->width;
143}
144
145int lcd_getheight(void)
146{
147 return current_vp->height;
148}
149
150void lcd_setfont(int newfont)
151{
152 current_vp->font = newfont;
153}
154
155int lcd_getfont(void)
156{
157 return current_vp->font;
158}
159
160/* Clear the whole display */
161void lcd_clear_display(void)
162{
163 struct viewport* old_vp = current_vp;
164
165 current_vp = &default_vp;
166
167 lcd_clear_viewport();
168
169 current_vp = old_vp;
170}
171
172void lcd_clear_viewport(){
173 DEBUGF2("lcd_clear_viewport()\n");
174 xapi->clear_viewport(current_vp->x,current_vp->y,current_vp->width,current_vp->height,current_vp->bg_pattern);
175
176}
177void lcd_scroll_stop(struct viewport* vp){
178 DEBUGF3("lcd_scroll_stop(struct viewport* vp=%x)\n",vp);
179}