# generated from XKB map sl include common map 0x424 exclam 0x02 shift asciitilde 0x02 altgr dead_tilde 0x02 shift altgr quotedbl 0x03 shift dead_caron 0x03 altgr caron 0x03 shift altgr numbersign 0x04 shift asciicircum 0x04 altgr dead_circumflex 0x04 shift altgr dollar 0x05 shift dead_breve 0x05 altgr breve 0x05 shift altgr percent 0x06 shift degree 0x06 altgr dead_abovering 0x06 shift altgr ampersand 0x07 shift dead_ogonek 0x07 altgr ogonek 0x07 shift altgr slash 0x08 shift grave 0x08 altgr dead_grave 0x08 shift altgr parenleft 0x09 shift dead_abovedot 0x09 altgr abovedot 0x09 shift altgr parenright 0x0a shift dead_acute 0x0a altgr equal 0x0b shift dead_doubleacute 0x0b altgr doubleacute 0x0b shift altgr apostrophe 0x0c question 0x0c shift dead_diaeresis 0x0c altgr diaeresis 0x0c shift altgr plus 0x0d asterisk 0x0d shift dead_cedilla 0x0d altgr cedilla 0x0d shift altgr backslash 0x10 altgr Greek_OMEGA 0x10 shift altgr bar 0x11 altgr Lstroke 0x11 shift altgr EuroSign 0x12 altgr paragraph 0x13 altgr registered 0x13 shift altgr tslash 0x14 altgr Tslash 0x14 shift altgr z 0x15 addupper leftarrow 0x15 altgr yen 0x15 shift altgr downarrow 0x16 altgr uparrow 0x16 shift altgr rightarrow 0x17 altgr idotless 0x17 shift altgr oslash 0x18 altgr Ooblique 0x18 shift altgr thorn 0x19 altgr THORN 0x19 shift altgr scaron 0x1a Scaron 0x1a shift division 0x1a altgr dstroke 0x1b Dstroke 0x1b shift multiply 0x1b altgr dead_macron 0x1b shift altgr ae 0x1e altgr AE 0x1e shift altgr ssharp 0x1f altgr section 0x1f shift altgr eth 0x20 altgr ETH 0x20 shift altgr bracketleft 0x21 altgr ordfeminine 0x21 shift altgr bracketright 0x22 altgr ENG 0x22 shift altgr hstroke 0x23 altgr Hstroke 0x23 shift altgr lstroke 0x25 altgr Lstroke 0x26 altgr ccaron 0x27 Ccaron 0x27 shift cacute 0x28 Cacute 0x28 shift ssharp 0x28 altgr dead_cedilla 0x29 notsign 0x29 altgr zcaron 0x2b Zcaron 0x2b shift currency 0x2b altgr y 0x2c addupper guillemotleft 0x2c altgr guillemotright 0x2d altgr cent 0x2e altgr copyright 0x2e shift altgr at 0x2f altgr braceleft 0x30 altgr braceright 0x31 altgr section 0x32 altgr masculine 0x32 shift altgr comma 0x33 semicolon 0x33 shift horizconnector 0x33 altgr period 0x34 colon 0x34 shift periodcentered 0x34 altgr minus 0x35 underscore 0x35 shift dead_belowdot 0x35 altgr option>
path: root/demos/modules/gwin/imagebox/main.c
blob: 4b864f004942b38ea0e688c657dffacb64016f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
 * Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *    * Redistributions of source code must retain the above copyright
 *      notice, this list of conditions and the following disclaimer.
 *    * Redistributions in binary form must reproduce the above copyright
 *      notice, this list of conditions and the following disclaimer in the
 *      documentation and/or other materials provided with the distribution.
 *    * Neither the name of the <organization> nor the
 *      names of its contributors may be used to endorse or promote products
 *      derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "gfx.h"
 
#include "romfs_files.h"
 
GHandle ghImage1;
 
static void createWidgets(void) {
	GWidgetInit	wi;

	// Apply some default values for GWIN
	gwinWidgetClearInit(&wi);
	wi.g.show = TRUE;
 
	// create the first image widget
	wi.g.x = 10; wi.g.y = 10; wi.g.width = 200; wi.g.height = 100;
	ghImage1 = gwinImageCreate(0, &wi.g);
	gwinImageOpenFile(ghImage1, "ugfx_logo_banner.bmp");
 }
 
int main(void) {
	// Initialize µGFX and the underlying system
	gfxInit();
 
	// Set the widget defaults
	gwinSetDefaultFont(gdispOpenFont("UI2"));
	gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
	gdispClear(White);
 
	// create the widget
	createWidgets();
 
	while(1) {
		gfxSleepMilliseconds(100);
	}
 
	return 0;
}