From bca945603bc04f5a1079117924f00432eef8b726 Mon Sep 17 00:00:00 2001 From: xianjimli Date: Mon, 25 Jun 2018 17:27:17 +0800 Subject: [PATCH] theme support custom widget --- demos/res/inc/images/earth.data | 2 +- demos/res/inc/images/green_btn_n.data | 2 +- demos/res/inc/images/rgb.data | 2 +- demos/res/inc/theme/calibration.data | 16 +- demos/res/inc/theme/default.data | 260 +++++++++++++++----------- demos/res/inc/theme/dialog1.data | 33 ++-- demos/res/inc/theme/keyboard.data | 39 ++-- demos/res/inc/ui/kb_hex.data | 2 +- demos/res/inc/ui/memtest.data | 2 +- demos/res/raw/theme/calibration.bin | Bin 114 -> 162 bytes demos/res/raw/theme/default.bin | Bin 2270 -> 3086 bytes demos/res/raw/theme/dialog1.bin | Bin 294 -> 390 bytes demos/res/raw/theme/keyboard.bin | Bin 324 -> 468 bytes src/base/button.c | 2 +- src/base/candidates.c | 2 +- src/base/check_button.c | 13 +- src/base/dialog.c | 69 ++++--- src/base/edit.c | 2 +- src/base/group_box.c | 2 +- src/base/image.c | 2 +- src/base/keyboard.c | 2 +- src/base/label.c | 2 +- src/base/pages.c | 2 +- src/base/progress_bar.c | 2 +- src/base/slide_view.c | 2 +- src/base/slider.c | 2 +- src/base/theme.c | 37 ++-- src/base/theme.h | 17 +- src/base/view.c | 6 +- src/base/widget.c | 9 +- src/base/window.c | 5 +- src/base/window_manager.c | 5 +- tests/theme_gen_test.cc | 16 +- tests/theme_test.cc | 9 +- tools/theme_gen/theme_gen.cc | 38 ++-- tools/theme_gen/theme_gen.h | 4 +- tools/theme_gen/xml_theme_gen.cc | 9 +- 37 files changed, 353 insertions(+), 264 deletions(-) diff --git a/demos/res/inc/images/earth.data b/demos/res/inc/images/earth.data index 7f4137aa5..0f31970cb 100644 --- a/demos/res/inc/images/earth.data +++ b/demos/res/inc/images/earth.data @@ -116,4 +116,4 @@ const unsigned char image_earth[] = { 0x00,0x00,0x00,0xb4,0x00,0x00,0x00,0xdf,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xdf, 0x00,0x00,0x00,0xb4,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*2348*/ +0x00,0x00,0x00,0x00,0x88,0x9a,0x30,0x76,};/*2348*/ diff --git a/demos/res/inc/images/green_btn_n.data b/demos/res/inc/images/green_btn_n.data index 1c1fa3075..03ef965cb 100644 --- a/demos/res/inc/images/green_btn_n.data +++ b/demos/res/inc/images/green_btn_n.data @@ -181,4 +181,4 @@ const unsigned char image_green_btn_n[] = { 0x26,0x83,0x5a,0xff,0x26,0x83,0x5a,0xff,0x26,0x83,0x5a,0xff,0x26,0x83,0x5a,0xff,0x26,0x83,0x5a,0xff, 0x26,0x83,0x5a,0xff,0x3a,0x8d,0x68,0xff,0x62,0xa2,0x85,0xd7,0x85,0xb7,0xa0,0x97,0xd4,0xe5,0xdd,0x37, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,};/*3644*/ +0x78,0x7c,0x32,0x76,};/*3644*/ diff --git a/demos/res/inc/images/rgb.data b/demos/res/inc/images/rgb.data index 3de0a4adb..8949a9d36 100644 --- a/demos/res/inc/images/rgb.data +++ b/demos/res/inc/images/rgb.data @@ -91,4 +91,4 @@ const unsigned char image_rgb[] = { 0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xe0,0x07,0xe0,0x07, 0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0x1f,0x00,0x1f,0x00, 0x1f,0x00,0x1f,0x00,0x1f,0x00,0x1f,0x00,0x1f,0x00,0x1f,0x00,0x1f,0x00,0x1f,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,};/*1844*/ +0x9f,0xf2,0x69,0x85,};/*1844*/ diff --git a/demos/res/inc/theme/calibration.data b/demos/res/inc/theme/calibration.data index 2ebd6a200..7c3b4e2e9 100644 --- a/demos/res/inc/theme/calibration.data +++ b/demos/res/inc/theme/calibration.data @@ -1,9 +1,11 @@ const unsigned char theme_calibration[] = { -0x03,0x00,0x00,0x01,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x61,0x6c,0x69,0x62,0x72,0x61,0x74, +0x03,0x00,0x00,0x01,0xa2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x61,0x6c,0x69,0x62,0x72,0x61,0x74, 0x69,0x6f,0x6e,0x00,0x64,0x61,0x74,0x00,0xfd,0xfc,0xfb,0xfa,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, -0x01,0x01,0x0a,0x00,0x24,0x00,0x00,0x00,0x02,0x01,0x0a,0x00,0x3e,0x00,0x00,0x00,0x03,0x01,0x0a,0x00, -0x58,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x01,0x00,0x00,0x00, -0x0d,0x00,0x00,0x00,0x63,0x72,0x6f,0x73,0x73,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xc0,0xc0, -0xc0,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x63,0x72,0x6f,0x73,0x73,0x00,0x01,0x00,0x00,0x00, -0x01,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x63,0x72,0x6f,0x73, -0x73,0x00,0x00,0xc0,0x02,0x00,};/*146*/ +0x54,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x6e,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x03,0x00,0x01,0x00,0x62,0x75,0x74,0x74, +0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, +0xf0,0xf0,0xf0,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x63,0x72,0x6f,0x73,0x73,0x00,0x01,0x00, +0x00,0x00,0x01,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x63,0x72, +0x6f,0x73,0x73,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xff,0x01,0x00,0x00,0x00, +0x0d,0x00,0x00,0x00,0x63,0x72,0x6f,0x73,0x73,0x00,0x00,0x80,0x02,0x00,};/*194*/ diff --git a/demos/res/inc/theme/default.data b/demos/res/inc/theme/default.data index f3a03db64..aa1ca27e8 100644 --- a/demos/res/inc/theme/default.data +++ b/demos/res/inc/theme/default.data @@ -1,117 +1,157 @@ const unsigned char theme_default[] = { -0x03,0x00,0x00,0x01,0xde,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x00, +0x03,0x00,0x00,0x01,0x0e,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x00, 0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0xfd,0xfc,0xfb,0xfa,0x00,0x00,0x00,0x00,0x33,0x00,0x00,0x00, -0x01,0x00,0x02,0x00,0xa4,0x01,0x00,0x00,0x01,0x01,0x02,0x00,0xb4,0x01,0x00,0x00,0x01,0x02,0x02,0x00, -0xcf,0x01,0x00,0x00,0x01,0x00,0x0a,0x00,0xe5,0x01,0x00,0x00,0x02,0x00,0x0a,0x00,0x05,0x02,0x00,0x00, -0x03,0x00,0x0a,0x00,0x25,0x02,0x00,0x00,0x04,0x00,0x0a,0x00,0x45,0x02,0x00,0x00,0x02,0x0a,0x0a,0x00, -0x65,0x02,0x00,0x00,0x01,0x00,0x0c,0x00,0x85,0x02,0x00,0x00,0x05,0x00,0x0c,0x00,0xb5,0x02,0x00,0x00, -0x04,0x00,0x0c,0x00,0xe5,0x02,0x00,0x00,0x09,0x00,0x0c,0x00,0x15,0x03,0x00,0x00,0x08,0x00,0x0c,0x00, -0x45,0x03,0x00,0x00,0x01,0x00,0x09,0x00,0x75,0x03,0x00,0x00,0x01,0x01,0x09,0x00,0x85,0x03,0x00,0x00, -0x01,0x02,0x09,0x00,0x95,0x03,0x00,0x00,0x01,0x03,0x09,0x00,0xbd,0x03,0x00,0x00,0x01,0x04,0x09,0x00, -0xdd,0x03,0x00,0x00,0x01,0x05,0x09,0x00,0x05,0x04,0x00,0x00,0x01,0x00,0x0d,0x00,0x34,0x04,0x00,0x00, -0x01,0x01,0x0d,0x00,0x5c,0x04,0x00,0x00,0x01,0x02,0x0d,0x00,0x90,0x04,0x00,0x00,0x01,0x00,0x13,0x00, -0xd8,0x04,0x00,0x00,0x02,0x00,0x13,0x00,0xf8,0x04,0x00,0x00,0x03,0x00,0x13,0x00,0x18,0x05,0x00,0x00, -0x01,0x01,0x13,0x00,0x38,0x05,0x00,0x00,0x02,0x01,0x13,0x00,0x6c,0x05,0x00,0x00,0x03,0x01,0x13,0x00, -0xa2,0x05,0x00,0x00,0x01,0x02,0x13,0x00,0xd8,0x05,0x00,0x00,0x02,0x02,0x13,0x00,0x20,0x06,0x00,0x00, -0x03,0x02,0x13,0x00,0x6a,0x06,0x00,0x00,0x01,0x00,0x0e,0x00,0xb4,0x06,0x00,0x00,0x01,0x01,0x0e,0x00, -0xbc,0x06,0x00,0x00,0x06,0x00,0x0f,0x00,0xd4,0x06,0x00,0x00,0x07,0x00,0x0f,0x00,0xf8,0x06,0x00,0x00, -0x06,0x01,0x0f,0x00,0x1e,0x07,0x00,0x00,0x07,0x01,0x0f,0x00,0x42,0x07,0x00,0x00,0x06,0x00,0x10,0x00, -0x64,0x07,0x00,0x00,0x07,0x00,0x10,0x00,0x8e,0x07,0x00,0x00,0x06,0x02,0x10,0x00,0xba,0x07,0x00,0x00, -0x07,0x02,0x10,0x00,0xce,0x07,0x00,0x00,0x06,0x03,0x10,0x00,0xe3,0x07,0x00,0x00,0x07,0x03,0x10,0x00, -0xf9,0x07,0x00,0x00,0x06,0x04,0x10,0x00,0x10,0x08,0x00,0x00,0x07,0x04,0x10,0x00,0x25,0x08,0x00,0x00, -0x01,0x01,0x0b,0x00,0x3b,0x08,0x00,0x00,0x01,0x00,0x04,0x00,0x53,0x08,0x00,0x00,0x01,0x00,0x11,0x00, -0x63,0x08,0x00,0x00,0x01,0x01,0x11,0x00,0x84,0x08,0x00,0x00,0x01,0x00,0x12,0x00,0xb6,0x08,0x00,0x00, -0x01,0x01,0x12,0x00,0xc6,0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff, -0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00, -0x0b,0x00,0x00,0x00,0x62,0x72,0x69,0x63,0x6b,0x73,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0b, -0x00,0x00,0x00,0x62,0x67,0x38,0x30,0x30,0x78,0x34,0x38,0x30,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00, -0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0, -0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00, -0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00, -0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00, -0x00,0xe0,0xe0,0xe0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0, -0xff,0x06,0x00,0x00,0x00,0xd0,0xd0,0xd0,0xff,0x01,0x00,0x00,0x00,0xbe,0xbe,0xbe,0xff,0x00,0x00,0x00, +0xd4,0x04,0x00,0x00,0x01,0x00,0x00,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0xe4,0x04,0x00,0x00,0x01,0x00,0x01,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x04,0x00,0x00,0x01,0x00,0x02,0x00,0x77,0x69,0x6e,0x64, +0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x05,0x00,0x00,0x01,0x00,0x00,0x00, +0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x05,0x00,0x00, +0x02,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x55,0x05,0x00,0x00,0x03,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x75,0x05,0x00,0x00,0x04,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x05,0x00,0x00,0x02,0x00,0x0a,0x00,0x62,0x75,0x74,0x74, +0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x05,0x00,0x00,0x01,0x00,0x00,0x00, +0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe5,0x05,0x00,0x00, +0x05,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x15,0x06,0x00,0x00,0x04,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x45,0x06,0x00,0x00,0x09,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x75,0x06,0x00,0x00,0x08,0x00,0x00,0x00,0x65,0x64,0x69,0x74, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa5,0x06,0x00,0x00,0x01,0x00,0x00,0x00, +0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x06,0x00,0x00, +0x01,0x00,0x01,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0xc5,0x06,0x00,0x00,0x01,0x00,0x02,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0xed,0x06,0x00,0x00,0x01,0x00,0x03,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x07,0x00,0x00,0x01,0x00,0x04,0x00,0x6c,0x61,0x62,0x65, +0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x07,0x00,0x00,0x01,0x00,0x05,0x00, +0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x07,0x00,0x00, +0x01,0x00,0x00,0x00,0x70,0x72,0x6f,0x67,0x72,0x65,0x73,0x73,0x5f,0x62,0x61,0x72,0x00,0x00,0x00,0x00, +0x8c,0x07,0x00,0x00,0x01,0x00,0x01,0x00,0x70,0x72,0x6f,0x67,0x72,0x65,0x73,0x73,0x5f,0x62,0x61,0x72, +0x00,0x00,0x00,0x00,0xc0,0x07,0x00,0x00,0x01,0x00,0x02,0x00,0x70,0x72,0x6f,0x67,0x72,0x65,0x73,0x73, +0x5f,0x62,0x61,0x72,0x00,0x00,0x00,0x00,0x08,0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, +0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x00,0x00,0x02,0x00,0x00,0x00, +0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x00,0x00, +0x03,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x68,0x08,0x00,0x00,0x01,0x00,0x01,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x9c,0x08,0x00,0x00,0x02,0x00,0x01,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd2,0x08,0x00,0x00,0x03,0x00,0x01,0x00,0x73,0x6c,0x69,0x64, +0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x09,0x00,0x00,0x01,0x00,0x02,0x00, +0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x09,0x00,0x00, +0x02,0x00,0x02,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x9a,0x09,0x00,0x00,0x03,0x00,0x02,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0xe4,0x09,0x00,0x00,0x01,0x00,0x00,0x00,0x67,0x72,0x6f,0x75,0x70,0x5f,0x62,0x6f, +0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xec,0x09,0x00,0x00,0x01,0x00,0x01,0x00,0x67,0x72,0x6f,0x75, +0x70,0x5f,0x62,0x6f,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x0a,0x00,0x00,0x06,0x00,0x00,0x00, +0x63,0x68,0x65,0x63,0x6b,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x28,0x0a,0x00,0x00, +0x07,0x00,0x00,0x00,0x63,0x68,0x65,0x63,0x6b,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00, +0x4e,0x0a,0x00,0x00,0x06,0x00,0x01,0x00,0x63,0x68,0x65,0x63,0x6b,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e, +0x00,0x00,0x00,0x00,0x72,0x0a,0x00,0x00,0x07,0x00,0x01,0x00,0x63,0x68,0x65,0x63,0x6b,0x5f,0x62,0x75, +0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x94,0x0a,0x00,0x00,0x06,0x00,0x00,0x00,0x72,0x61,0x64,0x69, +0x6f,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0xbe,0x0a,0x00,0x00,0x07,0x00,0x00,0x00, +0x72,0x61,0x64,0x69,0x6f,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0xea,0x0a,0x00,0x00, +0x06,0x00,0x02,0x00,0x72,0x61,0x64,0x69,0x6f,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00, +0xfe,0x0a,0x00,0x00,0x07,0x00,0x02,0x00,0x72,0x61,0x64,0x69,0x6f,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e, +0x00,0x00,0x00,0x00,0x13,0x0b,0x00,0x00,0x06,0x00,0x03,0x00,0x72,0x61,0x64,0x69,0x6f,0x5f,0x62,0x75, +0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x29,0x0b,0x00,0x00,0x07,0x00,0x03,0x00,0x72,0x61,0x64,0x69, +0x6f,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x40,0x0b,0x00,0x00,0x06,0x00,0x04,0x00, +0x72,0x61,0x64,0x69,0x6f,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x55,0x0b,0x00,0x00, +0x07,0x00,0x04,0x00,0x72,0x61,0x64,0x69,0x6f,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00, +0x6b,0x0b,0x00,0x00,0x01,0x00,0x01,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x83,0x0b,0x00,0x00,0x01,0x00,0x00,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x93,0x0b,0x00,0x00,0x01,0x00,0x00,0x00,0x64,0x69,0x61,0x6c, +0x6f,0x67,0x5f,0x74,0x69,0x74,0x6c,0x65,0x00,0x00,0x00,0x00,0xb4,0x0b,0x00,0x00,0x01,0x00,0x01,0x00, +0x64,0x69,0x61,0x6c,0x6f,0x67,0x5f,0x74,0x69,0x74,0x6c,0x65,0x00,0x00,0x00,0x00,0xe6,0x0b,0x00,0x00, +0x01,0x00,0x00,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x5f,0x63,0x6c,0x69,0x65,0x6e,0x74,0x00,0x00,0x00, +0xf6,0x0b,0x00,0x00,0x01,0x00,0x01,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x5f,0x63,0x6c,0x69,0x65,0x6e, +0x74,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0x00,0x00, +0x01,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00, +0x62,0x72,0x69,0x63,0x6b,0x73,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x62, +0x67,0x38,0x30,0x30,0x78,0x34,0x38,0x30,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0, +0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0x00, 0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00, -0xff,0x01,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a,0x00,0x00, -0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00, -0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0x00, -0x00,0x05,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00, -0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00, -0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0, -0xff,0x06,0x00,0x00,0x00,0xd0,0xd0,0xd0,0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x10,0x00,0x00, -0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xbe,0xbe,0xbe,0xff,0x00,0x00,0x00,0x00,0x05,0x00,0x00, -0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x08,0x00,0x00, +0xff,0x01,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00, +0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xe0,0xe0,0xe0, +0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00, +0x00,0xd0,0xd0,0xd0,0xff,0x01,0x00,0x00,0x00,0xbe,0xbe,0xbe,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00, +0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00, +0x00,0xc0,0xc0,0xc0,0xff,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0, +0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x10,0x00,0x00, +0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0x00,0x00,0x05,0x00,0x00, +0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x08,0x00,0x00, 0x00,0x02,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0, 0xff,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00, -0x00,0xa0,0xa0,0xa0,0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00, -0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00, -0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x80,0x00, -0xff,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x08,0x00,0x00, -0x00,0x02,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x10,0x00,0x00,0x00,0x04,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x80,0x00,0xff,0x08,0x00,0x00, -0x00,0x01,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x00,0x00,0x00,0x00,0x04,0x00,0x00, -0x00,0x06,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00, -0x00,0xa0,0xa0,0xa0,0xff,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00, -0x00,0x06,0x00,0x00,0x00,0x00,0x80,0x00,0xff,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0a,0x00,0x00, -0x00,0xa0,0xa0,0xa0,0xff,0x04,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00, -0x00,0x61,0x70,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00,0x00,0x00, -0xff,0xd7,0x00,0xff,0x02,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, -0x65,0x72,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x66,0x67,0x00, -0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x00,0x02,0x00,0x00,0x00, -0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x03,0x00,0x00,0x00, -0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00, -0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, -0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff, -0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0a,0x00,0x00,0x00,0xff,0xd7,0x00,0xff,0x00,0x00,0x00,0x00, -0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff, -0x0a,0x00,0x00,0x00,0xff,0xa7,0x00,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, -0xa0,0xa0,0xa0,0xff,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0a,0x00,0x00,0x00,0xff,0xe7,0x00,0xff, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, -0x65,0x72,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x66,0x67,0x00, -0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x00,0x00,0x00,0x00,0x00, -0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x62,0x67,0x00,0x0e,0x00, -0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, -0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x5f,0x70,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00, -0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, -0x65,0x72,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61, -0x67,0x5f,0x6f,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x0f,0x00,0x00,0x00, -0x0a,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76, -0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x66,0x67,0x00, -0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x00,0x02,0x00,0x00,0x00, -0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x03,0x00,0x00,0x00, -0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00, -0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, -0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x5f,0x70,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00, -0x00,0x00,0x0f,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c, -0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72, -0x5f,0x76,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61, -0x67,0x5f,0x6f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, -0xf0,0xf0,0xf0,0xff,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, -0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00, -0x0d,0x00,0x00,0x00,0x63,0x68,0x65,0x63,0x6b,0x65,0x64,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, +0x00,0xd0,0xd0,0xd0,0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00, +0x00,0x01,0x00,0x00,0x00,0xbe,0xbe,0xbe,0xff,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a,0x00,0x00, +0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00, +0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0x00, +0x00,0x05,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0xa0,0xa0,0xa0, +0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00, +0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00, +0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x80,0x00,0xff,0x00,0x00,0x00, +0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x08,0x00,0x00,0x00,0x02,0x00,0x00, +0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x80,0x00,0xff,0x08,0x00,0x00,0x00,0x01,0x00,0x00, +0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00, +0x00,0x00,0x00,0xff,0xff,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0, +0xff,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00, +0x00,0x00,0x80,0x00,0xff,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0, +0xff,0x04,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x61,0x70,0x00, +0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00,0x00,0x00,0xff,0xd7,0x00,0xff, +0x02,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x62, +0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00, +0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00, +0x0a,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00, +0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, +0x65,0x72,0x5f,0x76,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64, +0x72,0x61,0x67,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x02,0x00,0x00,0x00, +0x00,0x00,0xff,0xff,0x0a,0x00,0x00,0x00,0xff,0xd7,0x00,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, +0x01,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0a,0x00,0x00,0x00, +0xff,0xa7,0x00,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff, +0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0a,0x00,0x00,0x00,0xff,0xe7,0x00,0xff,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x62, +0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00, +0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, +0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c, +0x69,0x64,0x65,0x72,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64, +0x72,0x61,0x67,0x5f,0x70,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c, +0x69,0x64,0x65,0x72,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x66, +0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x5f,0x6f,0x00, +0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x0a,0x00,0x00,0x00, +0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x62,0x67,0x00, +0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00, +0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00, +0x0a,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00, +0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64, +0x65,0x72,0x5f,0x76,0x5f,0x66,0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64, +0x72,0x61,0x67,0x5f,0x70,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x0f,0x00, +0x00,0x00,0x0a,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72, +0x5f,0x76,0x5f,0x62,0x67,0x00,0x0e,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x76,0x5f,0x66, +0x67,0x00,0x0d,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x5f,0x64,0x72,0x61,0x67,0x5f,0x6f,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff, +0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0xf0,0xf0,0xf0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00, -0x75,0x6e,0x63,0x68,0x65,0x63,0x6b,0x65,0x64,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0, -0xf0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x75,0x6e, -0x6d,0x75,0x74,0x65,0x64,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00, -0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6d,0x75,0x74,0x65,0x64,0x00, -0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff, -0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x72,0x61,0x64,0x69,0x6f,0x5f,0x63,0x68,0x65,0x63,0x6b,0x65, +0x63,0x68,0x65,0x63,0x6b,0x65,0x64,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff, +0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x75,0x6e,0x63,0x68, +0x65,0x63,0x6b,0x65,0x64,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00, +0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x75,0x6e,0x6d,0x75,0x74,0x65, 0x64,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00,0x00,0x00,0x00,0x00, -0x00,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x72,0x61,0x64,0x69,0x6f,0x5f,0x75,0x6e,0x63,0x68, -0x65,0x63,0x6b,0x65,0x64,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6c,0x65, -0x66,0x74,0x5f,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6c,0x65, -0x66,0x74,0x5f,0x6f,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6d, -0x69,0x64,0x64,0x6c,0x65,0x5f,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00, -0x00,0x6d,0x69,0x64,0x64,0x6c,0x65,0x5f,0x6f,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, -0x0d,0x00,0x00,0x00,0x72,0x69,0x67,0x68,0x74,0x5f,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, -0x00,0x0d,0x00,0x00,0x00,0x72,0x69,0x67,0x68,0x74,0x5f,0x6f,0x66,0x66,0x00,0x02,0x00,0x00,0x00,0x0a, -0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xff,0x00,0x00,0x00,0x00,0x01, -0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x60,0x60,0x60,0xff,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x06, -0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xa9,0xa9,0xa0,0xff,0x01,0x00,0x00,0x00,0x0d, -0x00,0x00,0x00,0x69,0x6e,0x66,0x6f,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff, -0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x69,0x6e,0x66,0x6f, -0x00,0x0b,0x00,0x00,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x5f,0x74,0x69,0x74,0x6c,0x65,0x00,0x01,0x00, -0x00,0x00,0x01,0x00,0x00,0x00,0xed,0xed,0xed,0xff,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00, -0x00,0x00,0xed,0xed,0xed,0xff,0x0a,0x00,0x00,0x00,0xbe,0xbe,0xbe,0xff,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,};/*2302*/ +0x00,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6d,0x75,0x74,0x65,0x64,0x00,0x02,0x00,0x00,0x00, +0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00, +0x0d,0x00,0x00,0x00,0x72,0x61,0x64,0x69,0x6f,0x5f,0x63,0x68,0x65,0x63,0x6b,0x65,0x64,0x00,0x02,0x00, +0x00,0x00,0x01,0x00,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00, +0x00,0x00,0x0d,0x00,0x00,0x00,0x72,0x61,0x64,0x69,0x6f,0x5f,0x75,0x6e,0x63,0x68,0x65,0x63,0x6b,0x65, +0x64,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6c,0x65,0x66,0x74,0x5f,0x6f, +0x6e,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6c,0x65,0x66,0x74,0x5f,0x6f, +0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6d,0x69,0x64,0x64,0x6c, +0x65,0x5f,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x6d,0x69,0x64, +0x64,0x6c,0x65,0x5f,0x6f,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00, +0x72,0x69,0x67,0x68,0x74,0x5f,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0d,0x00,0x00, +0x00,0x72,0x69,0x67,0x68,0x74,0x5f,0x6f,0x66,0x66,0x00,0x02,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00, +0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0a, +0x00,0x00,0x00,0x60,0x60,0x60,0xff,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00, +0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xa9,0xa9,0xa0,0xff,0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x69, +0x6e,0x66,0x6f,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x0c,0x00,0x00,0x00, +0x09,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x69,0x6e,0x66,0x6f,0x00,0x0b,0x00,0x00, +0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x5f,0x74,0x69,0x74,0x6c,0x65,0x00,0x01,0x00,0x00,0x00,0x01,0x00, +0x00,0x00,0xed,0xed,0xed,0xff,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xed,0xed, +0xed,0xff,0x0a,0x00,0x00,0x00,0xbe,0xbe,0xbe,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*3118*/ diff --git a/demos/res/inc/theme/dialog1.data b/demos/res/inc/theme/dialog1.data index f39e2d3af..526f33c96 100644 --- a/demos/res/inc/theme/dialog1.data +++ b/demos/res/inc/theme/dialog1.data @@ -1,18 +1,23 @@ const unsigned char theme_dialog1[] = { -0x03,0x00,0x00,0x01,0x26,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x31,0x00, +0x03,0x00,0x00,0x01,0x86,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x31,0x00, 0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0xfd,0xfc,0xfb,0xfa,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00, -0x01,0x01,0x0a,0x00,0x3c,0x00,0x00,0x00,0x02,0x01,0x0a,0x00,0x64,0x00,0x00,0x00,0x03,0x01,0x0a,0x00, -0x8c,0x00,0x00,0x00,0x01,0x02,0x0a,0x00,0xb4,0x00,0x00,0x00,0x02,0x02,0x0a,0x00,0xda,0x00,0x00,0x00, -0x03,0x02,0x0a,0x00,0x00,0x01,0x00,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00, -0x06,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x67,0x72,0x65,0x65, -0x6e,0x5f,0x62,0x74,0x6e,0x5f,0x6e,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00, -0x06,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x67,0x72,0x65,0x65, -0x6e,0x5f,0x62,0x74,0x6e,0x5f,0x70,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00, -0x06,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x67,0x72,0x65,0x65, -0x6e,0x5f,0x62,0x74,0x6e,0x5f,0x6f,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00, -0x06,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x72,0x65,0x64,0x5f, -0x62,0x74,0x6e,0x5f,0x6e,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x06,0x00, -0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x72,0x65,0x64,0x5f,0x62,0x74, +0x9c,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0xc4,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xec,0x00,0x00,0x00,0x03,0x00,0x01,0x00,0x62,0x75,0x74,0x74, +0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x01,0x00,0x00,0x01,0x00,0x02,0x00, +0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x01,0x00,0x00, +0x02,0x00,0x02,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x60,0x01,0x00,0x00,0x03,0x00,0x02,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x06,0x00,0x00,0x00, +0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x67,0x72,0x65,0x65,0x6e,0x5f,0x62,0x74, +0x6e,0x5f,0x6e,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x06,0x00,0x00,0x00, +0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x67,0x72,0x65,0x65,0x6e,0x5f,0x62,0x74, 0x6e,0x5f,0x70,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x06,0x00,0x00,0x00, +0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x67,0x72,0x65,0x65,0x6e,0x5f,0x62,0x74, +0x6e,0x5f,0x6f,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x06,0x00,0x00,0x00, 0x00,0x00,0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x72,0x65,0x64,0x5f,0x62,0x74,0x6e,0x5f, -0x6f,0x00,0x20,0x20,0x20,0x20,};/*326*/ +0x6e,0x00,0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00, +0xff,0xff,0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x72,0x65,0x64,0x5f,0x62,0x74,0x6e,0x5f,0x70,0x00, +0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0xff,0xff, +0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x72,0x65,0x64,0x5f,0x62,0x74,0x6e,0x5f,0x6f,0x00,0x00,0x00, +0x00,0x00,};/*422*/ diff --git a/demos/res/inc/theme/keyboard.data b/demos/res/inc/theme/keyboard.data index 57d362d97..10559aae4 100644 --- a/demos/res/inc/theme/keyboard.data +++ b/demos/res/inc/theme/keyboard.data @@ -1,19 +1,26 @@ const unsigned char theme_keyboard[] = { -0x03,0x00,0x00,0x01,0x44,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x6b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64, +0x03,0x00,0x00,0x01,0xd4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x6b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64, 0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0xfd,0xfc,0xfb,0xfa,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00, -0x01,0x01,0x0a,0x00,0x54,0x00,0x00,0x00,0x02,0x01,0x0a,0x00,0x74,0x00,0x00,0x00,0x03,0x01,0x0a,0x00, -0x94,0x00,0x00,0x00,0x04,0x01,0x0a,0x00,0xb4,0x00,0x00,0x00,0x01,0x02,0x0a,0x00,0xd4,0x00,0x00,0x00, -0x02,0x02,0x0a,0x00,0xe4,0x00,0x00,0x00,0x03,0x02,0x0a,0x00,0x04,0x01,0x00,0x00,0x01,0x00,0x17,0x00, -0x24,0x01,0x00,0x00,0x01,0x00,0x07,0x00,0x34,0x01,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00, -0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xa8,0xb0,0xb0,0xff, -0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00, -0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, +0xe4,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x04,0x01,0x00,0x00,0x02,0x00,0x01,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x01,0x00,0x00,0x03,0x00,0x01,0x00,0x62,0x75,0x74,0x74, +0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x01,0x00,0x00,0x04,0x00,0x01,0x00, +0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x01,0x00,0x00, +0x01,0x00,0x02,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x74,0x01,0x00,0x00,0x02,0x00,0x02,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x94,0x01,0x00,0x00,0x03,0x00,0x02,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x63,0x61,0x6e,0x64, +0x69,0x64,0x61,0x74,0x65,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0x01,0x00,0x00,0x01,0x00,0x00,0x00, +0x6b,0x65,0x79,0x62,0x6f,0x61,0x72,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, 0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00, -0xe0,0xe0,0xe0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff, -0x06,0x00,0x00,0x00,0xd0,0xd0,0xd0,0xff,0x01,0x00,0x00,0x00,0xbe,0xbe,0xbe,0xff,0x00,0x00,0x00,0x00, -0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, -0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x0a,0x00,0x00,0x00, -0xa0,0xa0,0xa0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff, -0x01,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xff,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x00,0x00,0x00,0x00, -0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xfa,0xfa,0xfa,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, -0x01,0x00,0x00,0x00,0xcf,0xd4,0xda,0xff,0x00,0x00,0x00,0x00,0x0a,0x00,0x02,0x03,};/*356*/ +0xa8,0xb0,0xb0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff, +0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff,0x00,0x00,0x00,0x00, +0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff, +0x01,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0a,0x00,0x00,0x00, +0xa0,0xa0,0xa0,0xff,0x06,0x00,0x00,0x00,0xd0,0xd0,0xd0,0xff,0x01,0x00,0x00,0x00,0xbe,0xbe,0xbe,0xff, +0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00, +0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xff, +0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00, +0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xff,0x0a,0x00,0x00,0x00,0xa0,0xa0,0xa0,0xff, +0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xfa,0xfa,0xfa,0xff,0x00,0x00,0x00,0x00, +0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xcf,0xd4,0xda,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*500*/ diff --git a/demos/res/inc/ui/kb_hex.data b/demos/res/inc/ui/kb_hex.data index cf8b0c6d1..33fde7a43 100644 --- a/demos/res/inc/ui/kb_hex.data +++ b/demos/res/inc/ui/kb_hex.data @@ -65,4 +65,4 @@ const unsigned char ui_kb_hex[] = { 0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x01,0x01,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69, 0x6d,0x61,0x67,0x65,0x00,0x62,0x61,0x63,0x6b,0x73,0x70,0x61,0x63,0x65,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,};/*1325*/ +0x00,0x1f,0x60,0x22,0xed,};/*1325*/ diff --git a/demos/res/inc/ui/memtest.data b/demos/res/inc/ui/memtest.data index 30406209b..3a7625b1b 100644 --- a/demos/res/inc/ui/memtest.data +++ b/demos/res/inc/ui/memtest.data @@ -20,4 +20,4 @@ const unsigned char ui_memtest[] = { 0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x00,0x00, 0x00,0x00,0x5a,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61, 0x6d,0x65,0x00,0x6d,0x65,0x6d,0x63,0x70,0x79,0x00,0x74,0x65,0x78,0x74,0x00,0x6e,0x2f,0x61,0x00,0x00, -0x00,0x00,0x00,0x00,0x38,0x07,};/*426*/ +0x00,0x00,0x00,0x00,0x38,0x87,};/*426*/ diff --git a/demos/res/raw/theme/calibration.bin b/demos/res/raw/theme/calibration.bin index b1a3f81e59f47de5e3dfdf02d036b73f7af4a777..137b6e2b749c9cd0d63d6370f8e7b506e9ee612f 100644 GIT binary patch literal 162 zcmezS=l3rLAYcaK5Flm*!lcrYlKec7C( delta 40 mcmZ3)Sfu#(&+lIhK)?*djEr0iDnObENZWzLfON#fz(4@Q8wWf9 diff --git a/demos/res/raw/theme/default.bin b/demos/res/raw/theme/default.bin index 5dcd070d037595c7d4cf17f7e09ff68cd56a8363..b911bf46c80ee011a01b1d83dd8596bccb5e8d73 100644 GIT binary patch literal 3086 zcmb`Jzi-n(6vxj=N=u=Dg!(^}trAq~$b!U#SUS5-?6_9lIC7k}BN8hcu%HfE5b93X zC<}XqkXSnukPwkNG4RX0?>k@Y++CG|>ejXIbKm>Ed-u+EfB*XVL(p-T&JPVC9J=mB z9Y5IvmB%S_$KW~hn!%Unq))S-Wl2Z52(d=IMopb>5U*Q!pE!ju^e@?G(cnkKG5^4i zGP+ETPsHih;LBH}zpj5k{HjIYC%$0euZbgW>@|a!uIe~q?il}peXCIR;^RKM037!98y~%H1!~E-p{toeZ z3%}3$hN0hJy~($UJMpwX;vGyMyAG7~(IJEYw_{txN=<(^9p{*{&Ejsbitj<^I2~YC5 zh+gH7`PuYpzRF+eDG94y6-3u#oXub9k&CJW-EwZ+ej<3ikT2TRxN3dWdSD#tqQ)T} ze3g!FdEI23oaa-mW7S8+6BJ+fK_507yfNPEPL+eF`BCI370Ou+Pl$(Lf68~9+YH5x zvegd7QrYrTFXWOV9DHsTSA?y2>}oE%uEhsqFlCeibEC!Nx#cuhw9f5+Go$~D>{lL@ zdCko2KgPIS4EonqbdyV4N37i?)PwT4ET@E51b^U&8so95?z<|N+h4x!u-EvT7x+_S zbxpr>G1X2#o8dHDA-{PSi6@oi+$b5&9$CdfJ9CSFO|c>+Yqz1B2zMgij{{w*s3uOM zaLceQAW5;zSav%2ZLhutm;m_Z<|aRC&{dcC@NmF-Ofu@U^1tgh0P}dJY-WJ SQG~!b9*-v>R2!kyi~KL^3_DT) delta 431 zcmW;IJxT*n6vgp#@0-bdm`P?b2&u$oR-lETm5>$K+Nq7$T2EuzVB-eF9T+V{TT2D8 zu+c`chxi4aGXul#{_lI$n~guJ_V4%S8~ir-8yr_g%`unmc$UbqpiW~40&QqSC)D#C zN7T^Al*aU?JMUvbGxll#QaYi=&8f7k#Z-f5xR4>kgN!n~%Q!Lmz+Bn@_q2y0UTH#?Y8zrLVbfjO zLy1E*ovFRVoti$WLy1o{{ZdCI%9KqTYPN!H+3*qfG@!ykcTnN1>k)3d9^o;)eu;LH Ef32t|>;M1& diff --git a/demos/res/raw/theme/dialog1.bin b/demos/res/raw/theme/dialog1.bin index 1396d15e9404adcc7614de49c034be5d836b3d52..2719f4ee623dabe1ac6dc9569a3af4553013bcbc 100644 GIT binary patch literal 390 zcmezS=l3rLAYcRHIY7(^gh{0(CHZ+EQ3yB!q?oXXzX6IfV-Xi&1ewExVU870oC%9~ z0#KY8i#QX|d>$a?1Y(f;7#RNl2P$RY2IBOh)YQEAq>{Y&JfKcu)D;k^E+4PDqSO>3 OY=x=9ZzoJuJ_7(4dORZl delta 74 zcmZo;UdCko_s{QN3_!pJ#Egtw3^qWT2}q{^X=WhZ0}^NAV%P!_2hz7d;y{{#kzsN? NqwK^7ToVr+0RZb$4G#bS diff --git a/demos/res/raw/theme/keyboard.bin b/demos/res/raw/theme/keyboard.bin index d67561916e9263fbce2181e63936a69282959cbb..3af2ba16448fb0aa375adf0339bfec9b6b663dce 100644 GIT binary patch literal 468 zcmezS=l3rLAm9YzCqT>ygh{0(CHZ+EQ3zmRWME*zBCY}yXT~D#0u*P#BAx;iX9Svr zZhi^ad`$5vVDmA>w}8!IU`S5POUX=0EJ-bfxbp~9JUg{ADL=6&1?GNcAcG5t7c5xt zpA91TAE=aJ#fA<4L0nw&2M!#-EC1lZ1FZ5FE?fYczi;0@usp~vn7uIjV0@4q$R3#c bu*rk$L6!&U0pVZ2e!z%)C93FE{^p8&dF4D$d0 diff --git a/src/base/button.c b/src/base/button.c index 09bca24f2..4cb97fc11 100644 --- a/src/base/button.c +++ b/src/base/button.c @@ -63,9 +63,9 @@ widget_t* button_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(button != NULL, NULL); widget = WIDGET(button); + widget->vt = &s_button_vtable; widget_init(widget, parent, WIDGET_BUTTON); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_button_vtable; widget_set_state(widget, WIDGET_STATE_NORMAL); diff --git a/src/base/candidates.c b/src/base/candidates.c index 3b2e63ee3..620d7ce44 100644 --- a/src/base/candidates.c +++ b/src/base/candidates.c @@ -163,9 +163,9 @@ widget_t* candidates_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(candidates != NULL, NULL); widget = WIDGET(candidates); + widget->vt = &s_candidates_vtable; widget_init(widget, parent, WIDGET_CANDIDATES); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_candidates_vtable; candidates->event_id = input_method_on(input_method(), EVT_IM_SHOW_CANDIDATES, candidates_on_im_candidates_event, candidates); diff --git a/src/base/check_button.c b/src/base/check_button.c index fe1539940..736b76eae 100644 --- a/src/base/check_button.c +++ b/src/base/check_button.c @@ -136,23 +136,26 @@ widget_t* check_button_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) return_value_if_fail(check_button != NULL, NULL); widget = WIDGET(check_button); + widget->vt = &s_check_button_vtable; widget_init(widget, parent, WIDGET_CHECK_BUTTON); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_check_button_vtable; check_button_set_value_only(widget, FALSE); return widget; } widget_t* check_button_create_radio(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { - widget_t* widget = check_button_create(parent, x, y, w, h); - check_button_t* check_button = CHECK_BUTTON(widget); - return_value_if_fail(widget != NULL, NULL); + check_button_t* check_button = TKMEM_ZALLOC(check_button_t); + widget_t* widget = WIDGET(check_button); + return_value_if_fail(check_button != NULL, NULL); + + widget->vt = &s_radio_button_vtable; + widget_init(widget, parent, WIDGET_CHECK_BUTTON); + widget_move_resize(widget, x, y, w, h); check_button->radio = TRUE; widget->type = WIDGET_RADIO_BUTTON; widget->state = WIDGET_STATE_NORMAL; - widget->vt = &s_radio_button_vtable; check_button_set_value_only(widget, FALSE); return widget; diff --git a/src/base/dialog.c b/src/base/dialog.c index 9f27845c0..707cc0beb 100644 --- a/src/base/dialog.c +++ b/src/base/dialog.c @@ -31,6 +31,53 @@ #include "base/image_manager.h" #include "base/window_manager.h" +typedef struct _dialog_title_t { + widget_t widget; +} dialog_title_t; + +typedef struct _dialog_client_t { + widget_t widget; +} dialog_client_t; + +static const widget_vtable_t s_dialog_client_vtable = {.type_name = WIDGET_TYPE_DIALOG_CLIENT}; + +widget_t* dialog_client_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { + widget_t* widget = NULL; + dialog_client_t* dialog_client = TKMEM_ZALLOC(dialog_client_t); + return_value_if_fail(dialog_client != NULL, NULL); + + widget = WIDGET(dialog_client); + widget->vt = &s_dialog_client_vtable; + widget_init(widget, parent, WIDGET_DIALOG_CLIENT); + widget_move_resize(widget, x, y, w, h); + + widget_set_name(widget, "client"); + widget_set_state(widget, WIDGET_STATE_NORMAL); + + return widget; +} + +static ret_t dialog_title_on_paint_self(widget_t* widget, canvas_t* c) { + return widget_paint_helper(widget, c, NULL, NULL); +} + +static const widget_vtable_t s_dialog_title_vtable = {.type_name = WIDGET_TYPE_DIALOG_TITLE, + .on_paint_self = dialog_title_on_paint_self}; + +widget_t* dialog_title_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { + widget_t* widget = NULL; + dialog_title_t* dialog_title = TKMEM_ZALLOC(dialog_title_t); + return_value_if_fail(dialog_title != NULL, NULL); + + widget = WIDGET(dialog_title); + widget->vt = &s_dialog_title_vtable; + widget_init(widget, parent, WIDGET_DIALOG_TITLE); + widget_move_resize(widget, x, y, w, h); + widget_set_name(widget, "title"); + + return widget; +} + enum { TITLE_H = 30 }; static ret_t dialog_on_relayout_children(widget_t* widget); @@ -111,34 +158,14 @@ static const widget_vtable_t s_dialog_vtable = {.type_name = WIDGET_TYPE_DIALOG, .destroy = dialog_destroy, .on_paint_self = dialog_on_paint_self}; -widget_t* dialog_title_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { - widget_t* widget = label_create(parent, x, y, w, h); - return_value_if_fail(widget != NULL, NULL); - widget->type = WIDGET_DIALOG_TITLE; - widget_update_style(widget); - widget_set_name(widget, "title"); - - return widget; -} - -widget_t* dialog_client_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { - widget_t* widget = group_box_create(parent, x, y, w, h); - return_value_if_fail(widget != NULL, NULL); - widget->type = WIDGET_DIALOG_CLIENT; - widget_update_style(widget); - widget_set_name(widget, "client"); - - return widget; -} - widget_t* dialog_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { widget_t* widget = NULL; dialog_t* dialog = TKMEM_ZALLOC(dialog_t); return_value_if_fail(dialog != NULL, NULL); widget = WIDGET(dialog); - widget_init(widget, NULL, WIDGET_DIALOG); widget->vt = &s_dialog_vtable; + widget_init(widget, NULL, WIDGET_DIALOG); if (parent == NULL) { parent = window_manager(); diff --git a/src/base/edit.c b/src/base/edit.c index 754188cf3..47bbc831a 100644 --- a/src/base/edit.c +++ b/src/base/edit.c @@ -531,9 +531,9 @@ widget_t* edit_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(edit != NULL, NULL); widget = WIDGET(edit); + widget->vt = &s_edit_vtable; widget_init(widget, parent, WIDGET_EDIT); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_edit_vtable; edit_set_text_limit(widget, 0, 1204); return widget; diff --git a/src/base/group_box.c b/src/base/group_box.c index 8da37e222..84c423bbb 100644 --- a/src/base/group_box.c +++ b/src/base/group_box.c @@ -35,9 +35,9 @@ widget_t* group_box_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(group_box != NULL, NULL); widget = WIDGET(group_box); + widget->vt = &s_group_box_vtable; widget_init(widget, parent, WIDGET_GROUP_BOX); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_group_box_vtable; widget_set_state(widget, WIDGET_STATE_NORMAL); diff --git a/src/base/image.c b/src/base/image.c index 41501979f..cc9a98c10 100644 --- a/src/base/image.c +++ b/src/base/image.c @@ -113,9 +113,9 @@ widget_t* image_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(image != NULL, NULL); widget = WIDGET(image); + widget->vt = &s_image_vtable; widget_init(widget, parent, WIDGET_IMAGE); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_image_vtable; image->draw_type = IMAGE_DRAW_CENTER; return widget; diff --git a/src/base/keyboard.c b/src/base/keyboard.c index 860116b8e..93cbdbaef 100644 --- a/src/base/keyboard.c +++ b/src/base/keyboard.c @@ -89,8 +89,8 @@ widget_t* keyboard_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(keyboard != NULL, NULL); widget = WIDGET(keyboard); - widget_init(widget, NULL, WIDGET_KEYBOARD); widget->vt = &s_keyboard_vtable; + widget_init(widget, NULL, WIDGET_KEYBOARD); array_init(&(keyboard->action_buttons), 0); if (parent == NULL) { diff --git a/src/base/label.c b/src/base/label.c index 93f699973..91d2a97a0 100644 --- a/src/base/label.c +++ b/src/base/label.c @@ -35,9 +35,9 @@ widget_t* label_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(label != NULL, NULL); widget = WIDGET(label); + widget->vt = &s_label_vtable; widget_init(widget, parent, WIDGET_LABEL); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_label_vtable; return widget; } diff --git a/src/base/pages.c b/src/base/pages.c index b4a67aeba..d9999e325 100644 --- a/src/base/pages.c +++ b/src/base/pages.c @@ -112,9 +112,9 @@ widget_t* pages_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(pages != NULL, NULL); widget = WIDGET(pages); + widget->vt = &s_pages_vtable; widget_init(widget, parent, WIDGET_PAGES); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_pages_vtable; return widget; } diff --git a/src/base/progress_bar.c b/src/base/progress_bar.c index 30be7ce48..2e8ee1456 100644 --- a/src/base/progress_bar.c +++ b/src/base/progress_bar.c @@ -209,9 +209,9 @@ widget_t* progress_bar_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) return_value_if_fail(progress_bar != NULL, NULL); widget = WIDGET(progress_bar); + widget->vt = &s_progress_bar_vtable; widget_init(widget, parent, WIDGET_PROGRESS_BAR); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_progress_bar_vtable; return widget; } diff --git a/src/base/slide_view.c b/src/base/slide_view.c index 0dc0f6523..8c6b03234 100644 --- a/src/base/slide_view.c +++ b/src/base/slide_view.c @@ -634,9 +634,9 @@ widget_t* slide_view_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(slide_view != NULL, NULL); widget = WIDGET(slide_view); + widget->vt = &s_slide_view_vtable; widget_init(widget, parent, WIDGET_SLIDE_VIEW); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_slide_view_vtable; widget_set_state(widget, WIDGET_STATE_NORMAL); diff --git a/src/base/slider.c b/src/base/slider.c index 81cf55c1f..1da480b33 100644 --- a/src/base/slider.c +++ b/src/base/slider.c @@ -344,9 +344,9 @@ widget_t* slider_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(slider != NULL, NULL); widget = WIDGET(slider); + widget->vt = &s_slider_vtable; widget_init(widget, parent, WIDGET_SLIDER); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_slider_vtable; slider->min = 0; slider->max = 100; slider->step = 1; diff --git a/src/base/theme.c b/src/base/theme.c index 0384560e9..d61e6cf09 100644 --- a/src/base/theme.c +++ b/src/base/theme.c @@ -19,6 +19,7 @@ * */ +#include "base/utils.h" #include "base/theme.h" #include "base/buffer.h" @@ -83,36 +84,20 @@ const char* style_get_str(style_t* s, uint32_t name, const char* defval) { return defval; } -const uint8_t* theme_find_style(theme_t* t, uint16_t widget_type, uint8_t style_type, - uint8_t state) { +const uint8_t* theme_find_style(theme_t* t, const char* widget_type, uint16_t style_type, + uint16_t state) { uint32_t i = 0; - uint32_t nr = 0; - uint32_t iter = 0; - uint32_t magic = 0; - uint32_t version = 0; - uint32_t offset = 0; - const uint8_t* p = NULL; - uint32_t name = (widget_type << 16) | (style_type << 8) | state; - + const theme_item_t* iter = NULL; + const theme_header_t* header = (const theme_header_t*)(t->data); return_value_if_fail(t != NULL && t->data != NULL, NULL); - p = t->data; - load_uint32(p, magic); - return_value_if_fail(magic == THEME_MAGIC, NULL); - - load_uint32(p, version); - load_uint32(p, nr); - return_value_if_fail(version == 0, NULL); - - for (i = 0; i < nr; i++) { - load_uint32(p, iter); - if (iter == name) { - load_uint32(p, offset); - - return t->data + offset; - } else { - p += 4; + iter = (const theme_item_t*)(t->data + sizeof(theme_header_t)); + for (i = 0; i < header->nr; i++) { + if (iter->state == state && iter->style_type == style_type && + tk_str_eq(widget_type, iter->widget_type)) { + return t->data + iter->offset; } + iter++; } return NULL; diff --git a/src/base/theme.h b/src/base/theme.h index 4c5c92dd9..07f40861b 100644 --- a/src/base/theme.h +++ b/src/base/theme.h @@ -49,8 +49,21 @@ typedef struct _theme_t { theme_t* theme(void); theme_t* theme_init(const uint8_t* data); -const uint8_t* theme_find_style(theme_t* t, uint16_t widget_type, uint8_t style_type, - uint8_t state); +typedef struct _theme_header_t { + uint32_t magic; + uint32_t version; + uint32_t nr; +} theme_header_t; + +typedef struct _theme_item_t { + uint32_t offset; + uint16_t state; + uint16_t style_type; + char widget_type[NAME_LEN + 1]; +} theme_item_t; + +const uint8_t* theme_find_style(theme_t* t, const char* widget_type, uint16_t style_type, + uint16_t state); /** * @enum style_type_t diff --git a/src/base/view.c b/src/base/view.c index a3462773a..2f7d608f8 100644 --- a/src/base/view.c +++ b/src/base/view.c @@ -22,9 +22,7 @@ #include "base/mem.h" #include "base/view.h" -static const widget_vtable_t s_view_vtable = { - .type_name = WIDGET_TYPE_VIEW -}; +static const widget_vtable_t s_view_vtable = {.type_name = WIDGET_TYPE_VIEW}; widget_t* view_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { widget_t* widget = NULL; @@ -32,9 +30,9 @@ widget_t* view_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(view != NULL, NULL); widget = WIDGET(view); + widget->vt = &s_view_vtable; widget_init(widget, parent, WIDGET_VIEW); widget_move_resize(widget, x, y, w, h); - widget->vt = &s_view_vtable; widget_set_state(widget, WIDGET_STATE_NORMAL); diff --git a/src/base/widget.c b/src/base/widget.c index 319e262e4..eb178bb64 100644 --- a/src/base/widget.c +++ b/src/base/widget.c @@ -1115,14 +1115,17 @@ const void* widget_get_window_theme(widget_t* widget) { static const void* widget_get_style_data(widget_t* widget, uint8_t state) { theme_t t; const void* data = NULL; - t.data = (const uint8_t*)widget_get_window_theme(widget); + const char* type_name = widget->vt ? widget->vt->type_name : NULL; + return_value_if_fail(type_name != NULL, NULL); + + t.data = (const uint8_t*)widget_get_window_theme(widget); if (t.data != NULL) { - data = theme_find_style(&t, widget->type, widget->style_type, state); + data = theme_find_style(&t, type_name, widget->style_type, state); } if (data == NULL) { - data = theme_find_style(theme(), widget->type, widget->style_type, state); + data = theme_find_style(theme(), type_name, widget->style_type, state); } return data; diff --git a/src/base/window.c b/src/base/window.c index eacde911d..20d97e9fe 100644 --- a/src/base/window.c +++ b/src/base/window.c @@ -61,7 +61,8 @@ static ret_t window_destroy(widget_t* widget) { return RET_OK; } -static const widget_vtable_t s_window_vtable = {.on_paint_self = window_on_paint_self, +static const widget_vtable_t s_window_vtable = {.type_name = WIDGET_TYPE_NORMAL_WINDOW, + .on_paint_self = window_on_paint_self, .set_prop = window_set_prop, .get_prop = window_get_prop, .destroy = window_destroy}; @@ -72,8 +73,8 @@ widget_t* window_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { return_value_if_fail(win != NULL, NULL); widget = WIDGET(win); - widget_init(widget, NULL, WIDGET_NORMAL_WINDOW); widget->vt = &s_window_vtable; + widget_init(widget, NULL, WIDGET_NORMAL_WINDOW); if (parent == NULL) { parent = window_manager(); diff --git a/src/base/window_manager.c b/src/base/window_manager.c index 3f1c65081..8f5aba773 100644 --- a/src/base/window_manager.c +++ b/src/base/window_manager.c @@ -421,7 +421,8 @@ ret_t window_manager_on_paint_children(widget_t* widget, canvas_t* c) { return RET_OK; } -static const widget_vtable_t s_wm_vtable = {.invalidate = window_manager_invalidate, +static const widget_vtable_t s_wm_vtable = {.type_name = WIDGET_TYPE_WINDOW_MANAGER, + .invalidate = window_manager_invalidate, .on_paint_children = window_manager_on_paint_children, .grab = window_manager_grab, .find_target = window_manager_find_target, @@ -452,9 +453,9 @@ widget_t* window_manager_init(window_manager_t* wm) { widget_t* w = &(wm->widget); return_value_if_fail(wm != NULL, NULL); + w->vt = &s_wm_vtable; widget_init(w, NULL, WIDGET_WINDOW_MANAGER); array_init(&(wm->graps), 5); - w->vt = &s_wm_vtable; #ifdef WITH_DYNAMIC_TR locale_on(locale(), EVT_LOCALE_CHANGED, wm_on_locale_changed, wm); diff --git a/tests/theme_gen_test.cc b/tests/theme_gen_test.cc index 5a7098778..5e85e598a 100644 --- a/tests/theme_gen_test.cc +++ b/tests/theme_gen_test.cc @@ -20,14 +20,14 @@ TEST(ThemeGen, basic) { xml_gen_buff(str, buff, sizeof(buff)); theme.data = buff; - style.data = theme_find_style(&theme, WIDGET_NONE, 0, WIDGET_STATE_NORMAL); + style.data = theme_find_style(&theme, WIDGET_TYPE_NONE, 0, WIDGET_STATE_NORMAL); ASSERT_EQ(style.data != NULL, true); ASSERT_EQ(style_get_int(&style, STYLE_ID_FONT_SIZE, 0), 12); ASSERT_EQ(style_get_int(&style, STYLE_ID_BG_COLOR, 0), 0xff00ffff); ASSERT_EQ(style_get_int(&style, STYLE_ID_FG_COLOR, 0), 0xfffcfbfa); ASSERT_EQ(style_get_str(&style, STYLE_ID_FONT_NAME, ""), string("sans")); - style.data = theme_find_style(&theme, WIDGET_PROGRESS_BAR, 0, WIDGET_STATE_NORMAL); + style.data = theme_find_style(&theme, WIDGET_TYPE_PROGRESS_BAR, 0, WIDGET_STATE_NORMAL); ASSERT_EQ(style.data != NULL, true); ASSERT_EQ(style_get_int(&style, STYLE_ID_BG_COLOR, 0), 0xff00ffff); ASSERT_EQ(style_get_int(&style, STYLE_ID_FG_COLOR, 0), 0x7f00ffff); @@ -44,14 +44,14 @@ TEST(ThemeGen, state) { xml_gen_buff(str, buff, sizeof(buff)); theme.data = buff; - style.data = theme_find_style(&theme, WIDGET_BUTTON, 0, WIDGET_STATE_OVER); + style.data = theme_find_style(&theme, WIDGET_TYPE_BUTTON, 0, WIDGET_STATE_OVER); ASSERT_EQ(style.data != NULL, true); ASSERT_EQ(style_get_int(&style, STYLE_ID_FONT_SIZE, 0), 12); ASSERT_EQ(style_get_int(&style, STYLE_ID_BG_COLOR, 0), 0xff00ffff); ASSERT_EQ(style_get_int(&style, STYLE_ID_FG_COLOR, 0), 0xfffcfbfa); ASSERT_EQ(style_get_str(&style, STYLE_ID_FONT_NAME, ""), string("sans")); - style.data = theme_find_style(&theme, WIDGET_BUTTON, 0, WIDGET_STATE_PRESSED); + style.data = theme_find_style(&theme, WIDGET_TYPE_BUTTON, 0, WIDGET_STATE_PRESSED); ASSERT_EQ(style.data != NULL, true); ASSERT_EQ(style_get_int(&style, STYLE_ID_BG_COLOR, 0), 0xff00ffff); ASSERT_EQ(style_get_int(&style, STYLE_ID_FG_COLOR, 0), 0x7f00ffff); @@ -68,10 +68,10 @@ TEST(ThemeGen, style_type) { xml_gen_buff(str, buff, sizeof(buff)); theme.data = buff; - style.data = theme_find_style(&theme, WIDGET_BUTTON, 1, WIDGET_STATE_OVER); + style.data = theme_find_style(&theme, WIDGET_TYPE_BUTTON, 1, WIDGET_STATE_OVER); ASSERT_EQ(style.data != NULL, true); - style.data = theme_find_style(&theme, WIDGET_BUTTON, 1, WIDGET_STATE_PRESSED); + style.data = theme_find_style(&theme, WIDGET_TYPE_BUTTON, 1, WIDGET_STATE_PRESSED); ASSERT_EQ(style.data != NULL, true); } @@ -86,12 +86,12 @@ TEST(ThemeGen, inher) { xml_gen_buff(str, buff, sizeof(buff)); theme.data = buff; - style.data = theme_find_style(&theme, WIDGET_BUTTON, 1, WIDGET_STATE_OVER); + style.data = theme_find_style(&theme, WIDGET_TYPE_BUTTON, 1, WIDGET_STATE_OVER); ASSERT_EQ(style.data != NULL, true); ASSERT_EQ(style_get_int(&style, STYLE_ID_FONT_SIZE, 0), 12); ASSERT_EQ(style_get_str(&style, STYLE_ID_FONT_NAME, ""), string("sans")); - style.data = theme_find_style(&theme, WIDGET_BUTTON, 1, WIDGET_STATE_PRESSED); + style.data = theme_find_style(&theme, WIDGET_TYPE_BUTTON, 1, WIDGET_STATE_PRESSED); ASSERT_EQ(style.data != NULL, true); ASSERT_EQ(style_get_int(&style, STYLE_ID_FONT_SIZE, 0), 14); ASSERT_EQ(style_get_str(&style, STYLE_ID_FONT_NAME, ""), string("serif")); diff --git a/tests/theme_test.cc b/tests/theme_test.cc index cfd96bd60..d00488931 100644 --- a/tests/theme_test.cc +++ b/tests/theme_test.cc @@ -1,5 +1,6 @@ #include "base/array.h" +#include "base/enums.h" #include "base/theme.h" #include "base/widget.h" #include "base/buffer.h" @@ -15,7 +16,9 @@ void GenThemeData(uint8_t* buff, uint32_t size, uint32_t type_nr, uint32_t state ThemeGen g; for (uint32_t type = 0; type < type_nr; type++) { for (uint32_t state = 0; state < state_nr; state++) { - Style s(type, 0, state); + const key_type_value_t* kv = widget_type_find_by_value(type); + + Style s(kv->name, 0, state); for (uint32_t name = 0; name < name_nr; name++) { char str[32]; snprintf(str, sizeof(str), "%d", name); @@ -64,7 +67,9 @@ TEST(Theme, basic) { for (uint32_t type = WIDGET_NONE + 1; type < WIDGET_NR; type++) { for (uint32_t state = 0; state < state_nr; state++) { - s.data = theme_find_style(&t, type, 0, state); + const key_type_value_t* kv = widget_type_find_by_value(type); + + s.data = theme_find_style(&t, kv->name, 0, state); ASSERT_EQ(s.data != NULL, true); for (uint32_t name = 0; name < name_nr; name++) { uint32_t v = style_get_int(&s, name, 0); diff --git a/tools/theme_gen/theme_gen.cc b/tools/theme_gen/theme_gen.cc index 086a09100..536efbe23 100644 --- a/tools/theme_gen/theme_gen.cc +++ b/tools/theme_gen/theme_gen.cc @@ -20,6 +20,7 @@ */ #include "theme_gen.h" +#include "base/utils.h" #include "base/enums.h" #include "base/theme.h" #include "base/buffer.h" @@ -28,7 +29,7 @@ Style::Style() { } -Style::Style(uint16_t widget_type, uint8_t style_type, uint8_t state) { +Style::Style(const string& widget_type, uint8_t style_type, uint8_t state) { this->widget_type = widget_type; this->style_type = style_type; this->state = state; @@ -90,13 +91,12 @@ uint8_t* Style::Output(uint8_t* buff, uint32_t max_size) { uint32_t size = 0; uint8_t* p = buff; uint8_t* end = buff + max_size; - const key_type_value_t* witem = widget_type_find_by_value(this->widget_type); return_value_if_fail(buff != NULL && max_size > 32, NULL); size = this->int_values.size(); save_uint32(p, size); - printf(" size=%d widget_type=%s style_type=%d state=%d\n", size, witem->name, this->style_type, - this->state); + printf(" size=%d widget_type=%s style_type=%d state=%d\n", size, this->widget_type.c_str(), + this->style_type, this->state); for (vector::iterator i = this->int_values.begin(); i != this->int_values.end(); i++) { uint32_t name = i->name; @@ -144,27 +144,29 @@ bool ThemeGen::AddStyle(const Style& style) { } uint8_t* ThemeGen::Output(uint8_t* buff, uint32_t max_size) { - uint8_t* p = buff; - uint32_t version = 0x0; - uint32_t size = this->styles.size(); + uint32_t nr = this->styles.size(); uint8_t* end = buff + max_size; + theme_header_t* header = (theme_header_t*)buff; + uint32_t data_start = sizeof(theme_header_t) + nr * sizeof(theme_item_t); + theme_item_t* item = (theme_item_t*)(buff + sizeof(theme_header_t)); + uint8_t* p = buff + data_start; - return_value_if_fail(p != NULL && max_size > 128, NULL); + return_value_if_fail(p != NULL && max_size > data_start + 128, NULL); - save_uint32(p, THEME_MAGIC); - save_uint32(p, version); - save_uint32(p, size); + memset(buff, 0x00, max_size); + + header->magic = THEME_MAGIC; + header->version = 0; + header->nr = nr; - uint8_t* index = p; - p += size * 8; - printf("size=%d\n", size); for (vector