From f6c1c9a37f830fdf87e86c014a025fa92f2106ea Mon Sep 17 00:00:00 2001 From: jokingmeow Date: Fri, 12 Feb 2016 14:06:27 +0800 Subject: [PATCH 1/2] Update ugui.c --- ugui.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/ugui.c b/ugui.c index 02b2a04..dd31a69 100644 --- a/ugui.c +++ b/ugui.c @@ -1,14 +1,14 @@ /* -------------------------------------------------------------------------------- */ -/* -- µGUI - Generic GUI module (C)Achim Döbler, 2015 -- */ +/* -- µGUI - Generic GUI module (C)Achim Döbler, 2015 -- */ /* -------------------------------------------------------------------------------- */ -// µGUI is a generic GUI module for embedded systems. +// µGUI is a generic GUI module for embedded systems. // This is a free software that is open for education, research and commercial // developments under license policy of following terms. // -// Copyright (C) 2015, Achim Döbler, all rights reserved. +// Copyright (C) 2015, Achim Döbler, all rights reserved. // URL: http://www.embeddedlightning.com/ // -// * The µGUI module is a free software and there is NO WARRANTY. +// * The µGUI module is a free software and there is NO WARRANTY. // * No restriction on use. You can use, modify and redistribute it for // personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY. // * Redistributions of source code must retain the above copyright notice. @@ -27,7 +27,7 @@ // for giving valuable suggestions regarding real-time os support. // // Samuel Kleiser -// for reporting bugs and giving examples how to improve µGUI. +// for reporting bugs and giving examples how to improve µGUI. /* -------------------------------------------------------------------------------- */ /* -- REVISION HISTORY -- */ /* -------------------------------------------------------------------------------- */ @@ -50,14 +50,14 @@ #include "ugui.h" /* Static functions */ - UG_RESULT _UG_WindowDrawTitle( UG_WINDOW* wnd ); - void _UG_WindowUpdate( UG_WINDOW* wnd ); - UG_RESULT _UG_WindowClear( UG_WINDOW* wnd ); - void _UG_TextboxUpdate(UG_WINDOW* wnd, UG_OBJECT* obj); - void _UG_ButtonUpdate(UG_WINDOW* wnd, UG_OBJECT* obj); - void _UG_CheckboxUpdate(UG_WINDOW* wnd, UG_OBJECT* obj); - void _UG_ImageUpdate(UG_WINDOW* wnd, UG_OBJECT* obj); - void _UG_PutChar( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc, UG_COLOR bc, const UG_FONT* font); +UG_RESULT _UG_WindowDrawTitle( UG_WINDOW* wnd ); +void _UG_WindowUpdate( UG_WINDOW* wnd ); +UG_RESULT _UG_WindowClear( UG_WINDOW* wnd ); +void _UG_TextboxUpdate(UG_WINDOW* wnd, UG_OBJECT* obj); +void _UG_ButtonUpdate(UG_WINDOW* wnd, UG_OBJECT* obj); +void _UG_CheckboxUpdate(UG_WINDOW* wnd, UG_OBJECT* obj); +void _UG_ImageUpdate(UG_WINDOW* wnd, UG_OBJECT* obj); +void _UG_PutChar( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc, UG_COLOR bc, const UG_FONT* font); /* Pointer to the gui */ static UG_GUI* gui; @@ -5265,14 +5265,14 @@ void _UG_PutChar( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc, UG_COLOR bc, const switch ( bt ) { - case 0xF6: bt = 0x94; break; // ö - case 0xD6: bt = 0x99; break; // Ö - case 0xFC: bt = 0x81; break; // ü - case 0xDC: bt = 0x9A; break; // Ü - case 0xE4: bt = 0x84; break; // ä - case 0xC4: bt = 0x8E; break; // Ä - case 0xB5: bt = 0xE6; break; // µ - case 0xB0: bt = 0xF8; break; // ° + case 0xF6: bt = 0x94; break; // ö + case 0xD6: bt = 0x99; break; // Ö + case 0xFC: bt = 0x81; break; // ü + case 0xDC: bt = 0x9A; break; // Ãœ + case 0xE4: bt = 0x84; break; // ä + case 0xC4: bt = 0x8E; break; // Ä + case 0xB5: bt = 0xE6; break; // µ + case 0xB0: bt = 0xF8; break; // ° } if (bt < font->start_char || bt > font->end_char) return; From 020f79c4e4bbcede3e0acf06f435fb973cbf03ce Mon Sep 17 00:00:00 2001 From: jokingmeow Date: Fri, 12 Feb 2016 14:10:16 +0800 Subject: [PATCH 2/2] Update ugui.h --- ugui.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ugui.h b/ugui.h index 628eaec..9e86a27 100644 --- a/ugui.h +++ b/ugui.h @@ -155,8 +155,8 @@ typedef UG_U16 UG_COLOR; /* -------------------------------------------------------------------------------- */ /* -- FUNCTION RESULTS -- */ /* -------------------------------------------------------------------------------- */ -#define UG_RESULT_FAIL -1 -#define UG_RESULT_OK 0 +#define UG_RESULT_FAIL (UG_U8)(-1) +#define UG_RESULT_OK (UG_U8)(0) /* -------------------------------------------------------------------------------- */ /* -- UNIVERSAL STRUCTURES -- */