From 9f700acd0b9e2628e62910fe463c08365febe8f7 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 17 Jan 2005 00:25:23 +0000 Subject: Win32 simulator extensions, based on patch #1041560 by Eric Lassauge: Background pictures, LCD colours and dimensions depending on unit; build uses language selected in configure. Fixed vertical window size. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5568 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/win32/Makefile | 11 +++--- uisimulator/win32/UI-fmrecorder.bmp | Bin 0 -> 236864 bytes uisimulator/win32/UI-h100.bmp | Bin 0 -> 265464 bytes uisimulator/win32/UI-ondiofm.bmp | Bin 0 -> 104264 bytes uisimulator/win32/UI-ondiosp.bmp | Bin 0 -> 104264 bytes uisimulator/win32/UI-player.bmp | Bin 0 -> 238616 bytes uisimulator/win32/UI-recorder.bmp | Bin 0 -> 219296 bytes uisimulator/win32/UI-v2.bmp | Bin 0 -> 236864 bytes uisimulator/win32/UI256.bmp | Bin 87480 -> 0 bytes uisimulator/win32/uisw32.c | 4 +-- uisimulator/win32/uisw32.h | 67 +++++++++++++++++++++++++++++++----- 11 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 uisimulator/win32/UI-fmrecorder.bmp create mode 100644 uisimulator/win32/UI-h100.bmp create mode 100644 uisimulator/win32/UI-ondiofm.bmp create mode 100644 uisimulator/win32/UI-ondiosp.bmp create mode 100644 uisimulator/win32/UI-player.bmp create mode 100644 uisimulator/win32/UI-recorder.bmp create mode 100644 uisimulator/win32/UI-v2.bmp delete mode 100644 uisimulator/win32/UI256.bmp (limited to 'uisimulator') diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile index d04bf050ef..8509948457 100644 --- a/uisimulator/win32/Makefile +++ b/uisimulator/win32/Makefile @@ -55,8 +55,6 @@ no_configure: @echo "http://rockbox.haxx.se/docs/how_to_compile.html" endif -LANGUAGE = english - DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ $(TARGET) -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) @@ -146,14 +144,19 @@ clean: $(OBJDIR)/lang.[cho] $(OBJDIR)/build.lang $(OBJDIR)/*.o \ $(OBJDIR)/*.rock $(OBJDIR)/*.def $(OBJDIR)/sysfont.c \ $(OBJDIR)/credits.raw $(OBJDIR)/libplugin.a + $(RM) -f $(OBJDIR)/UI256.bmp $(RM) -r $(DEPS) ################## Specific dependencies ################## $(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS perl $(APPDIR)/credits.pl < $< > $@ -$(OBJDIR)/uisw32-res.o: uisw32.rc - $(WINDRES) -i $< -o $@ +$(OBJDIR)/UI256.bmp: UI-$(ARCHOS).bmp + @echo UI + @cp $< $@ + +$(OBJDIR)/uisw32-res.o: uisw32.rc $(OBJDIR)/UI256.bmp + $(WINDRES) -I$(OBJDIR) -i $< -o $@ $(OBJDIR)/credits.o: $(APPDIR)/credits.c $(APPDIR)/credits.h $(OBJDIR)/credits.raw diff --git a/uisimulator/win32/UI-fmrecorder.bmp b/uisimulator/win32/UI-fmrecorder.bmp new file mode 100644 index 0000000000..53f705b9ef Binary files /dev/null and b/uisimulator/win32/UI-fmrecorder.bmp differ diff --git a/uisimulator/win32/UI-h100.bmp b/uisimulator/win32/UI-h100.bmp new file mode 100644 index 0000000000..5c0898ab22 Binary files /dev/null and b/uisimulator/win32/UI-h100.bmp differ diff --git a/uisimulator/win32/UI-ondiofm.bmp b/uisimulator/win32/UI-ondiofm.bmp new file mode 100644 index 0000000000..e258720d28 Binary files /dev/null and b/uisimulator/win32/UI-ondiofm.bmp differ diff --git a/uisimulator/win32/UI-ondiosp.bmp b/uisimulator/win32/UI-ondiosp.bmp new file mode 100644 index 0000000000..c62c2334a3 Binary files /dev/null and b/uisimulator/win32/UI-ondiosp.bmp differ diff --git a/uisimulator/win32/UI-player.bmp b/uisimulator/win32/UI-player.bmp new file mode 100644 index 0000000000..db4003b120 Binary files /dev/null and b/uisimulator/win32/UI-player.bmp differ diff --git a/uisimulator/win32/UI-recorder.bmp b/uisimulator/win32/UI-recorder.bmp new file mode 100644 index 0000000000..98937fea2d Binary files /dev/null and b/uisimulator/win32/UI-recorder.bmp differ diff --git a/uisimulator/win32/UI-v2.bmp b/uisimulator/win32/UI-v2.bmp new file mode 100644 index 0000000000..53f705b9ef Binary files /dev/null and b/uisimulator/win32/UI-v2.bmp differ diff --git a/uisimulator/win32/UI256.bmp b/uisimulator/win32/UI256.bmp deleted file mode 100644 index cb3689a566..0000000000 Binary files a/uisimulator/win32/UI256.bmp and /dev/null differ diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c index d2274bdc16..c0e1076b3d 100644 --- a/uisimulator/win32/uisw32.c +++ b/uisimulator/win32/uisw32.c @@ -251,12 +251,12 @@ BOOL GUIStartup () // create window hGUIWnd = CreateWindowEx ( WS_EX_OVERLAPPEDWINDOW, - "RockBoxUISimulator", "ARCHOS JukeBox", + "RockBoxUISimulator", UI_TITLE, WS_VISIBLE | WS_SYSMENU | WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, UI_WIDTH + GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4, UI_HEIGHT + GetSystemMetrics (SM_CYSIZEFRAME) * 2 + - GetSystemMetrics (SM_CYSMCAPTION) +4, + GetSystemMetrics (SM_CYCAPTION) +4, NULL, NULL, GetModuleHandle (NULL), NULL); if (hGUIWnd == NULL) diff --git a/uisimulator/win32/uisw32.h b/uisimulator/win32/uisw32.h index 2efa699dad..b04ab6a027 100644 --- a/uisimulator/win32/uisw32.h +++ b/uisimulator/win32/uisw32.h @@ -27,16 +27,67 @@ typedef unsigned short wchar_t; #include #include "lcd-win32.h" -#define UI_WIDTH 240 // width of GUI window -#define UI_HEIGHT 360 // height of GUI window -#define UI_LCD_BGCOLOR 46, 67, 49 // bkgnd color of LCD (no backlight) -//#define UI_LCD_BGCOLORLIGHT 56, 77, 59 // bkgnd color of LCD (backlight) -#define UI_LCD_BGCOLORLIGHT 109, 212, 68 // bkgnd color of LCD (backlight) +#if defined(ARCHOS_RECORDER) +#define UI_TITLE "Jukebox Recorder" +#define UI_WIDTH 270 // width of GUI window +#define UI_HEIGHT 406 // height of GUI window +#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight) +#define UI_LCD_BGCOLORLIGHT 126, 229, 126 // bkgnd color of LCD (backlight) #define UI_LCD_BLACK 0, 0, 0 // black -#define UI_LCD_POSX 59 // x position of lcd -#define UI_LCD_POSY 95 // y position of lcd +#define UI_LCD_POSX 80 // x position of lcd +#define UI_LCD_POSY 104 // y position of lcd (96 for real aspect) #define UI_LCD_WIDTH 112 -#define UI_LCD_HEIGHT 64 +#define UI_LCD_HEIGHT 64 // (80 for real aspect) + +#elif defined(ARCHOS_PLAYER) +#define UI_TITLE "Jukebox Player" +#define UI_WIDTH 284 // width of GUI window +#define UI_HEIGHT 420 // height of GUI window +#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight) +#define UI_LCD_BGCOLORLIGHT 126, 229, 126 // bkgnd color of LCD (backlight) +#define UI_LCD_BLACK 0, 0, 0 // black +#define UI_LCD_POSX 75 // x position of lcd +#define UI_LCD_POSY 111 // y position of lcd +#define UI_LCD_WIDTH 132 +#define UI_LCD_HEIGHT 75 + +#elif defined(ARCHOS_FMRECORDER) || defined(ARCHOS_RECORDERV2) +#define UI_TITLE "Jukebox FM Recorder" +#define UI_WIDTH 285 // width of GUI window +#define UI_HEIGHT 414 // height of GUI window +#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight) +#define UI_LCD_BGCOLORLIGHT 126, 229, 126 // bkgnd color of LCD (backlight) +#define UI_LCD_BLACK 0, 0, 0 // black +#define UI_LCD_POSX 87 // x position of lcd +#define UI_LCD_POSY 77 // y position of lcd (69 for real aspect) +#define UI_LCD_WIDTH 112 +#define UI_LCD_HEIGHT 64 // (80 for real aspect) + +#elif defined(ARCHOS_ONDIOSP) || defined(ARCHOS_ONDIOFM) +#define UI_TITLE "Ondio" +#define UI_WIDTH 155 // width of GUI window +#define UI_HEIGHT 334 // height of GUI window +#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight) +#define UI_LCD_BGCOLORLIGHT 90, 145, 90 // bkgnd color of LCD (backlight) +#define UI_LCD_BLACK 0, 0, 0 // black +#define UI_LCD_POSX 21 // x position of lcd +#define UI_LCD_POSY 82 // y position of lcd (74 for real aspect) +#define UI_LCD_WIDTH 112 +#define UI_LCD_HEIGHT 64 // (80 for real aspect) + +#elif defined(IRIVER_H100) +#define UI_TITLE "iRiver H100" +#define UI_WIDTH 352 // width of GUI window +#define UI_HEIGHT 377 // height of GUI window +#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight) +#define UI_LCD_BGCOLORLIGHT 230, 216, 173 // bkgnd color of LCD (backlight) +#define UI_LCD_BLACK 0, 0, 0 // black +#define UI_LCD_POSX 96 // x position of lcd +#define UI_LCD_POSY 28 // y position of lcd +#define UI_LCD_WIDTH 160 +#define UI_LCD_HEIGHT 128 + +#endif #define TM_YIELD WM_USER + 101 // thread message for yield #define TIMER_EVENT 0x34928340 -- cgit v1.2.3