diff options
author | Markus Braun <markus.braun@krawel.de> | 2002-08-07 10:35:26 +0000 |
---|---|---|
committer | Markus Braun <markus.braun@krawel.de> | 2002-08-07 10:35:26 +0000 |
commit | de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9 (patch) | |
tree | 5cc60884b43b291f3878527413c4d7f21f210624 /uisimulator | |
parent | 999e2127af292ffac2d36dcb54b78a2f1abce6bf (diff) | |
download | rockbox-de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9.tar.gz rockbox-de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9.zip |
Added status bar to file browser and wps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1582 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/win32/Makefile | 5 | ||||
-rw-r--r-- | uisimulator/win32/lcd-win32.c | 4 | ||||
-rw-r--r-- | uisimulator/x11/Makefile | 5 | ||||
-rw-r--r-- | uisimulator/x11/lcd-x11.c | 16 |
4 files changed, 18 insertions, 12 deletions
diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile index 3a84a2dd70..4cdcef345e 100644 --- a/uisimulator/win32/Makefile +++ b/uisimulator/win32/Makefile | |||
@@ -68,7 +68,7 @@ APPS = main.c tree.c menu.c credits.c main_menu.c\ | |||
68 | MENUS = games_menu.c screensavers_menu.c settings_menu.c sound_menu.c | 68 | MENUS = games_menu.c screensavers_menu.c settings_menu.c sound_menu.c |
69 | 69 | ||
70 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) | 70 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) |
71 | APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c | 71 | APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c widgets.c |
72 | endif | 72 | endif |
73 | 73 | ||
74 | SRCS = button.c dir-win32.c lcd-win32.c panic-win32.c thread-win32.c \ | 74 | SRCS = button.c dir-win32.c lcd-win32.c panic-win32.c thread-win32.c \ |
@@ -116,6 +116,9 @@ $(OBJDIR)/settings_menu.o: $(APPDIR)/settings_menu.c | |||
116 | $(OBJDIR)/icons.o: $(RECDIR)/icons.c | 116 | $(OBJDIR)/icons.o: $(RECDIR)/icons.c |
117 | $(CC) $(APPCFLAGS) -c $< -o $@ | 117 | $(CC) $(APPCFLAGS) -c $< -o $@ |
118 | 118 | ||
119 | $(OBJDIR)/widgets.o: $(RECDIR)/widgets.c | ||
120 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
121 | |||
119 | $(OBJDIR)/tetris.o: $(RECDIR)/tetris.c | 122 | $(OBJDIR)/tetris.o: $(RECDIR)/tetris.c |
120 | $(CC) $(APPCFLAGS) -c $< -o $@ | 123 | $(CC) $(APPCFLAGS) -c $< -o $@ |
121 | 124 | ||
diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c index 510117ed9d..102e262346 100644 --- a/uisimulator/win32/lcd-win32.c +++ b/uisimulator/win32/lcd-win32.c | |||
@@ -27,7 +27,7 @@ | |||
27 | // | 27 | // |
28 | 28 | ||
29 | // varaibles | 29 | // varaibles |
30 | unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; // the display | 30 | unsigned char lcd_framebuffer[LCD_WIDTH][LCD_HEIGHT/8]; // the display |
31 | char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display | 31 | char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display |
32 | 32 | ||
33 | BITMAPINFO2 bmi = | 33 | BITMAPINFO2 bmi = |
@@ -54,7 +54,7 @@ void lcd_update() | |||
54 | 54 | ||
55 | for (x = 0; x < LCD_WIDTH; x++) | 55 | for (x = 0; x < LCD_WIDTH; x++) |
56 | for (y = 0; y < LCD_HEIGHT; y++) | 56 | for (y = 0; y < LCD_HEIGHT; y++) |
57 | bitmap[y][x] = ((display[x][y/8] >> (y & 7)) & 1); | 57 | bitmap[y][x] = ((lcd_framebuffer[x][y/8] >> (y & 7)) & 1); |
58 | 58 | ||
59 | InvalidateRect (hGUIWnd, NULL, FALSE); | 59 | InvalidateRect (hGUIWnd, NULL, FALSE); |
60 | 60 | ||
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index 3d40303271..e327a1cdb9 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile | |||
@@ -81,7 +81,7 @@ APPS = main.c tree.c menu.c credits.c main_menu.c\ | |||
81 | MENUS = games_menu.c screensavers_menu.c settings_menu.c sound_menu.c | 81 | MENUS = games_menu.c screensavers_menu.c settings_menu.c sound_menu.c |
82 | 82 | ||
83 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) | 83 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) |
84 | APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c | 84 | APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c widgets.c |
85 | endif | 85 | endif |
86 | 86 | ||
87 | SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ | 87 | SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ |
@@ -167,6 +167,9 @@ $(OBJDIR)/settings_menu.o: $(APPDIR)/settings_menu.c | |||
167 | $(OBJDIR)/icons.o: $(RECDIR)/icons.c | 167 | $(OBJDIR)/icons.o: $(RECDIR)/icons.c |
168 | $(CC) $(APPCFLAGS) -c $< -o $@ | 168 | $(CC) $(APPCFLAGS) -c $< -o $@ |
169 | 169 | ||
170 | $(OBJDIR)/widgets.o: $(RECDIR)/widgets.c | ||
171 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
172 | |||
170 | $(OBJDIR)/tetris.o: $(RECDIR)/tetris.c | 173 | $(OBJDIR)/tetris.o: $(RECDIR)/tetris.c |
171 | $(CC) $(APPCFLAGS) -c $< -o $@ | 174 | $(CC) $(APPCFLAGS) -c $< -o $@ |
172 | 175 | ||
diff --git a/uisimulator/x11/lcd-x11.c b/uisimulator/x11/lcd-x11.c index 96ce800c8f..e1d1953d54 100644 --- a/uisimulator/x11/lcd-x11.c +++ b/uisimulator/x11/lcd-x11.c | |||
@@ -38,11 +38,11 @@ | |||
38 | 38 | ||
39 | #include "lcd-x11.h" | 39 | #include "lcd-x11.h" |
40 | 40 | ||
41 | extern unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; | 41 | extern unsigned char lcd_framebuffer[LCD_WIDTH][LCD_HEIGHT/8]; |
42 | extern void screen_resized(int width, int height); | 42 | extern void screen_resized(int width, int height); |
43 | extern Display *dpy; | 43 | extern Display *dpy; |
44 | 44 | ||
45 | unsigned char display_copy[LCD_WIDTH][LCD_HEIGHT/8]; | 45 | unsigned char lcd_framebuffer_copy[LCD_WIDTH][LCD_HEIGHT/8]; |
46 | 46 | ||
47 | /* this is in uibasic.c */ | 47 | /* this is in uibasic.c */ |
48 | extern void drawdots(int color, XPoint *points, int count); | 48 | extern void drawdots(int color, XPoint *points, int count); |
@@ -61,10 +61,10 @@ void lcd_update (void) | |||
61 | 61 | ||
62 | for(y=0; y<LCD_HEIGHT; y+=8) { | 62 | for(y=0; y<LCD_HEIGHT; y+=8) { |
63 | for(x=0; x<LCD_WIDTH; x++) { | 63 | for(x=0; x<LCD_WIDTH; x++) { |
64 | if(display[x][y/8]) { | 64 | if(lcd_framebuffer[x][y/8]) { |
65 | /* one or more bits/pixels are set */ | 65 | /* one or more bits/pixels are set */ |
66 | for(bit=0; bit<8; bit++) { | 66 | for(bit=0; bit<8; bit++) { |
67 | if(display[x][y/8]&(1<<bit)) { | 67 | if(lcd_framebuffer[x][y/8]&(1<<bit)) { |
68 | points[p].x = x + MARGIN_X; | 68 | points[p].x = x + MARGIN_X; |
69 | points[p].y = y+bit + MARGIN_Y; | 69 | points[p].y = y+bit + MARGIN_Y; |
70 | p++; /* increase the point counter */ | 70 | p++; /* increase the point counter */ |
@@ -76,13 +76,13 @@ void lcd_update (void) | |||
76 | #else | 76 | #else |
77 | for(y=0; y<LCD_HEIGHT; y+=8) { | 77 | for(y=0; y<LCD_HEIGHT; y+=8) { |
78 | for(x=0; x<LCD_WIDTH; x++) { | 78 | for(x=0; x<LCD_WIDTH; x++) { |
79 | if(display[x][y/8] || display_copy[x][y/8]) { | 79 | if(lcd_framebuffer[x][y/8] || lcd_framebuffer_copy[x][y/8]) { |
80 | /* one or more bits/pixels are changed */ | 80 | /* one or more bits/pixels are changed */ |
81 | unsigned char diff = | 81 | unsigned char diff = |
82 | display[x][y/8] ^ display_copy[x][y/8]; | 82 | lcd_framebuffer[x][y/8] ^ lcd_framebuffer_copy[x][y/8]; |
83 | 83 | ||
84 | for(bit=0; bit<8; bit++) { | 84 | for(bit=0; bit<8; bit++) { |
85 | if(display[x][y/8]&(1<<bit)) { | 85 | if(lcd_framebuffer[x][y/8]&(1<<bit)) { |
86 | /* set a dot */ | 86 | /* set a dot */ |
87 | points[p].x = x + MARGIN_X; | 87 | points[p].x = x + MARGIN_X; |
88 | points[p].y = y+bit + MARGIN_Y; | 88 | points[p].y = y+bit + MARGIN_Y; |
@@ -100,7 +100,7 @@ void lcd_update (void) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | /* copy a huge block */ | 102 | /* copy a huge block */ |
103 | memcpy(display_copy, display, sizeof(display)); | 103 | memcpy(lcd_framebuffer_copy, lcd_framebuffer, sizeof(lcd_framebuffer)); |
104 | 104 | ||
105 | #endif | 105 | #endif |
106 | 106 | ||