vfs: check userland buffers before reading them.
[haiku.git] / src / apps / showimage / ToolBarIcons.cpp
blob475f5bd0aad80b75f58126d7401827078555f248
1 /*
2 * Copyright 2011, The Haiku Project. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Artwork: Michele Frau (a.k.a. zuMi)
7 * Stephan Aßmus <superstippi@gmx.de>
8 */
11 #include "ToolBarIcons.h"
13 #include <new>
14 #include <stdio.h>
15 #include <string.h>
17 #include <Bitmap.h>
18 #include <IconUtils.h>
21 static const uint8 kDocumentOpen[] = {
22 0x6e, 0x63, 0x69, 0x66, 0x06, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
23 0x03, 0x00, 0x00, 0x80, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3a,
24 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x49,
25 0xc0, 0x00, 0x00, 0xff, 0xea, 0x80, 0xff, 0xff, 0xbb, 0x00, 0x02, 0x00,
26 0x06, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
27 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
28 0xff, 0xd9, 0xd9, 0xff, 0x03, 0xff, 0xc8, 0x00, 0x03, 0x0a, 0x06, 0x24,
29 0x46, 0x46, 0x46, 0x44, 0x24, 0x3c, 0x24, 0x3a, 0x28, 0x26, 0x28, 0x0a,
30 0x04, 0xb4, 0x97, 0x46, 0xb3, 0xcb, 0x36, 0x48, 0x36, 0x46, 0x46, 0x08,
31 0x04, 0x24, 0x34, 0x24, 0x2c, 0x46, 0x2c, 0x46, 0x34, 0x07, 0x0a, 0x00,
32 0x03, 0x00, 0x01, 0x02, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04,
33 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05,
34 0x01, 0x00, 0x00, 0x0a, 0x02, 0x01, 0x02, 0x10, 0x01, 0x17, 0x83, 0x22,
35 0x04, 0x0a, 0x04, 0x01, 0x02, 0x00, 0x0a, 0x01, 0x01, 0x01, 0x10, 0x01,
36 0x17, 0x83, 0x22, 0x04, 0x0a, 0x03, 0x01, 0x01, 0x00
40 static const uint8 kDocumentSaveAs[] = {
41 0x6e, 0x63, 0x69, 0x66, 0x09, 0x04, 0x00, 0x66, 0x05, 0x00, 0x02, 0x00,
42 0x16, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x40, 0x00, 0xc0, 0x00, 0x00, 0x00,
43 0x00, 0x00, 0x4c, 0x00, 0x00, 0x49, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xe6,
44 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
45 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0xab,
46 0xff, 0x40, 0x05, 0x80, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x39,
47 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x46,
48 0x00, 0x00, 0x00, 0xf7, 0xff, 0xcc, 0x03, 0xd9, 0x00, 0x00, 0x03, 0x00,
49 0x00, 0x80, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x40, 0x00,
50 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00,
51 0x00, 0xff, 0xff, 0xff, 0xff, 0xe5, 0xe5, 0xff, 0x0c, 0x0a, 0x05, 0x48,
52 0x48, 0x22, 0x48, 0x22, 0xb3, 0xcb, 0x44, 0xb3, 0xcb, 0x48, 0x26, 0x0a,
53 0x04, 0x28, 0x36, 0x42, 0x36, 0x42, 0x48, 0x28, 0x48, 0x0a, 0x04, 0x26,
54 0xb3, 0xcb, 0x2e, 0xb3, 0xcb, 0x2e, 0x30, 0x26, 0x30, 0x0a, 0x04, 0x2e,
55 0xb3, 0xcb, 0x42, 0xb3, 0xcb, 0x42, 0x2e, 0x2e, 0x2e, 0x0a, 0x04, 0x3a,
56 0x24, 0x3e, 0x24, 0x3e, 0x2c, 0x3a, 0x2c, 0x0a, 0x04, 0x2a, 0x44, 0x40,
57 0x44, 0x42, 0x48, 0x28, 0x48, 0x0a, 0x07, 0x22, 0x2c, 0x48, 0x2c, 0x48,
58 0x3e, 0x3c, 0x3e, 0x35, 0x43, 0x2e, 0x3e, 0x22, 0x3e, 0x06, 0x12, 0xfe,
59 0x44, 0xf4, 0x13, 0x01, 0x32, 0x3c, 0x34, 0x3c, 0x34, 0x3c, 0xbb, 0x2b,
60 0x3c, 0x35, 0x3a, 0x35, 0x3b, 0x35, 0x3b, 0x36, 0x3c, 0xbb, 0x91, 0x3c,
61 0x36, 0x3c, 0x38, 0x3a, 0x36, 0x30, 0x38, 0x2e, 0x36, 0x2e, 0x36, 0x2e,
62 0xbb, 0x91, 0x2e, 0x35, 0x30, 0x35, 0x2f, 0x35, 0x2f, 0x34, 0x2e, 0xbb,
63 0x2b, 0x2e, 0x34, 0x2e, 0x32, 0x30, 0x34, 0x3a, 0x32, 0x04, 0x04, 0xfe,
64 0x29, 0x3a, 0x29, 0x34, 0x29, 0x34, 0x29, 0x33, 0x27, 0x32, 0x28, 0x32,
65 0x26, 0x32, 0x25, 0x34, 0x25, 0x33, 0x25, 0x34, 0x04, 0x05, 0xfe, 0x00,
66 0x29, 0x38, 0x26, 0x39, 0x27, 0x39, 0xb4, 0xf4, 0x39, 0x25, 0x37, 0x25,
67 0x38, 0x25, 0x36, 0x27, 0x35, 0x26, 0x35, 0x27, 0x35, 0x29, 0x04, 0x05,
68 0xfe, 0x00, 0x2d, 0x38, 0x2f, 0x39, 0x2e, 0x39, 0x30, 0x39, 0x31, 0x37,
69 0x31, 0x38, 0x31, 0x36, 0x2f, 0x35, 0x30, 0x35, 0x2f, 0x35, 0x2d, 0x08,
70 0x02, 0x2d, 0x3a, 0x2d, 0x30, 0x0e, 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22,
71 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01,
72 0x17, 0x83, 0x22, 0x04, 0x0a, 0x03, 0x01, 0x00, 0x00, 0x0a, 0x01, 0x01,
73 0x01, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x01, 0x00,
74 0x0a, 0x04, 0x01, 0x02, 0x00, 0x0a, 0x01, 0x01, 0x03, 0x10, 0x01, 0x17,
75 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x03, 0x00, 0x0a, 0x01, 0x01, 0x04,
76 0x00, 0x0a, 0x06, 0x01, 0x05, 0x00, 0x0a, 0x07, 0x01, 0x06, 0x10, 0x01,
77 0x17, 0x84, 0x22, 0x04, 0x0a, 0x08, 0x01, 0x06, 0x00, 0x0a, 0x07, 0x01,
78 0x07, 0x00, 0x0a, 0x01, 0x04, 0x08, 0x09, 0x0b, 0x0a, 0x10, 0x01, 0x17,
79 0x82, 0x00, 0x04
83 static const uint8 kDocumentSave[] = {
84 0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x05, 0x00, 0x02, 0x00,
85 0x16, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x40, 0x00, 0xc0, 0x00, 0x00, 0x00,
86 0x00, 0x00, 0x4c, 0x00, 0x00, 0x49, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xe6,
87 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
88 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0xab,
89 0xff, 0x40, 0x05, 0x80, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x39,
90 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x46,
91 0x00, 0x00, 0x00, 0xf7, 0xff, 0xcc, 0x03, 0xd9, 0x00, 0x00, 0x06, 0x0a,
92 0x05, 0x48, 0x48, 0x22, 0x48, 0x22, 0xb3, 0xcb, 0x44, 0xb3, 0xcb, 0x48,
93 0x26, 0x0a, 0x04, 0x28, 0x36, 0x42, 0x36, 0x42, 0x48, 0x28, 0x48, 0x0a,
94 0x04, 0x26, 0xb3, 0xcb, 0x2e, 0xb3, 0xcb, 0x2e, 0x30, 0x26, 0x30, 0x0a,
95 0x04, 0x2e, 0xb3, 0xcb, 0x42, 0xb3, 0xcb, 0x42, 0x2e, 0x2e, 0x2e, 0x0a,
96 0x04, 0x3a, 0x24, 0x3e, 0x24, 0x3e, 0x2c, 0x3a, 0x2c, 0x0a, 0x04, 0x2a,
97 0x44, 0x40, 0x44, 0x42, 0x48, 0x28, 0x48, 0x0a, 0x0a, 0x00, 0x01, 0x00,
98 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00,
99 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x03, 0x01, 0x00, 0x00, 0x0a,
100 0x01, 0x01, 0x01, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01,
101 0x01, 0x00, 0x0a, 0x04, 0x01, 0x02, 0x00, 0x0a, 0x01, 0x01, 0x03, 0x10,
102 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x03, 0x00, 0x0a, 0x01,
103 0x01, 0x04, 0x00, 0x0a, 0x06, 0x01, 0x05, 0x00
107 static const uint8 kDrawRectangularSelection[] = {
108 0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x05, 0x54, 0x05, 0xff,
109 0x02, 0x08, 0x02, 0x25, 0x23, 0x23, 0x23, 0x08, 0x02, 0x23, 0x25, 0x23,
110 0x23, 0x24, 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x86,
111 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x86, 0x22, 0x04,
112 0x0a, 0x02, 0x01, 0x00, 0x10, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
113 0x01, 0x00, 0x30, 0x2e, 0x22, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
114 0x01, 0x00, 0x30, 0x2c, 0x20, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
115 0x01, 0x00, 0x30, 0x2c, 0x20, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
116 0x01, 0x00, 0x30, 0x3a, 0x22, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
117 0x01, 0x00, 0x30, 0x38, 0x20, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
118 0x01, 0x00, 0x30, 0x38, 0x20, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
119 0x01, 0x00, 0x30, 0x2c, 0x46, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
120 0x01, 0x00, 0x30, 0x2a, 0x44, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
121 0x01, 0x00, 0x30, 0x2a, 0x44, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
122 0x01, 0x00, 0x30, 0x38, 0x46, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
123 0x01, 0x00, 0x30, 0x36, 0x44, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
124 0x01, 0x00, 0x30, 0x36, 0x44, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
125 0x01, 0x00, 0x30, 0x44, 0x46, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
126 0x01, 0x00, 0x30, 0x42, 0x44, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
127 0x01, 0x00, 0x30, 0x42, 0x44, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
128 0x01, 0x01, 0x30, 0x22, 0x2c, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
129 0x01, 0x01, 0x30, 0x20, 0x2a, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
130 0x01, 0x01, 0x30, 0x20, 0x2a, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
131 0x01, 0x01, 0x30, 0x22, 0x38, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
132 0x01, 0x01, 0x30, 0x20, 0x36, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
133 0x01, 0x01, 0x30, 0x20, 0x36, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
134 0x01, 0x01, 0x30, 0x22, 0x44, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
135 0x01, 0x01, 0x30, 0x20, 0x42, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
136 0x01, 0x01, 0x30, 0x20, 0x42, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
137 0x01, 0x01, 0x30, 0x46, 0x22, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
138 0x01, 0x01, 0x30, 0x44, 0x20, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
139 0x01, 0x01, 0x30, 0x44, 0x20, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
140 0x01, 0x01, 0x30, 0x46, 0x2e, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
141 0x01, 0x01, 0x30, 0x44, 0x2c, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
142 0x01, 0x01, 0x30, 0x44, 0x2c, 0x01, 0x17, 0x82, 0x22, 0x04, 0x0a, 0x00,
143 0x01, 0x01, 0x30, 0x46, 0x3a, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x01,
144 0x01, 0x01, 0x30, 0x44, 0x38, 0x01, 0x17, 0x86, 0x22, 0x04, 0x0a, 0x02,
145 0x01, 0x01, 0x30, 0x44, 0x38, 0x01, 0x17, 0x82, 0x22, 0x04
149 static const uint8 kEditCopy[] = {
150 0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x03, 0xd9, 0x91, 0x00,
151 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3b, 0xc0, 0x00, 0xc0, 0x00,
152 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x49, 0x20, 0x00, 0x00, 0xff,
153 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x03, 0x00, 0x00, 0x80, 0x02, 0x00,
154 0x06, 0x02, 0x00, 0x00, 0x00, 0x3b, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00,
155 0x00, 0x00, 0x4c, 0x00, 0x00, 0x49, 0x20, 0x00, 0x00, 0xff, 0xff, 0xff,
156 0xff, 0xd9, 0xd9, 0xff, 0x03, 0x0a, 0x04, 0x30, 0x2a, 0x48, 0x2a, 0x48,
157 0x48, 0x30, 0x48, 0x0a, 0x04, 0x34, 0x2e, 0x44, 0x2e, 0x44, 0x30, 0x34,
158 0x30, 0x0a, 0x04, 0x34, 0x34, 0x42, 0x34, 0x42, 0x36, 0x34, 0x36, 0x0a,
159 0x0a, 0x00, 0x01, 0x00, 0x30, 0x14, 0x1a, 0x01, 0x17, 0x83, 0x22, 0x04,
160 0x0a, 0x01, 0x01, 0x00, 0x30, 0x12, 0x18, 0x01, 0x17, 0x83, 0x22, 0x04,
161 0x0a, 0x02, 0x01, 0x00, 0x20, 0x12, 0x18, 0x0a, 0x01, 0x02, 0x02, 0x01,
162 0x20, 0x12, 0x18, 0x0a, 0x01, 0x02, 0x02, 0x01, 0x20, 0x12, 0x24, 0x0a,
163 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a,
164 0x03, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x04, 0x01,
165 0x00, 0x00, 0x0a, 0x03, 0x02, 0x01, 0x02, 0x00, 0x0a, 0x03, 0x02, 0x02,
166 0x01, 0x20, 0x20, 0x2c
170 static const uint8 kEditCut[] = {
171 0x6e, 0x63, 0x69, 0x66, 0x06, 0x05, 0x54, 0x03, 0x80, 0x00, 0x00, 0x02,
172 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0xc0, 0x00, 0x00,
173 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x47, 0x7f, 0xff, 0x00, 0xe6, 0xea,
174 0xf2, 0xff, 0xce, 0xd2, 0xd9, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00,
175 0x3a, 0x40, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00,
176 0x4a, 0x30, 0x00, 0x00, 0xff, 0xab, 0xab, 0xff, 0xd9, 0x00, 0x00, 0x05,
177 0xff, 0x04, 0x00, 0x66, 0x04, 0x06, 0x05, 0x4b, 0x00, 0x32, 0x24, 0x32,
178 0x26, 0x32, 0xb3, 0xcb, 0x30, 0x1f, 0x2e, 0x38, 0x32, 0x02, 0x04, 0x28,
179 0x3c, 0xb7, 0x11, 0x3c, 0xb5, 0x4e, 0x3c, 0x24, 0x42, 0x24, 0xbf, 0x3a,
180 0x24, 0xc1, 0xdd, 0x28, 0x48, 0xb5, 0x4e, 0x48, 0xb7, 0x11, 0x48, 0x2c,
181 0x42, 0x2c, 0xc1, 0xdd, 0x2c, 0xbf, 0x3a, 0x02, 0x04, 0x32, 0x38, 0x32,
182 0x38, 0x32, 0x3c, 0x2e, 0x42, 0x2e, 0x3e, 0x2e, 0x42, 0x2a, 0x42, 0x2a,
183 0x42, 0x2a, 0x3e, 0x2e, 0x38, 0x2e, 0x3c, 0x2e, 0x38, 0x0a, 0x04, 0x30,
184 0x32, 0x2e, 0x34, 0x2e, 0x1f, 0x30, 0x1f, 0x15, 0x0a, 0x05, 0x01, 0x00,
185 0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
186 0x71, 0x47, 0x97, 0xb6, 0xba, 0xfe, 0xcc, 0x01, 0x17, 0x84, 0x02, 0x04,
187 0x0a, 0x05, 0x01, 0x01, 0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc,
188 0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x97, 0xb6, 0xba, 0xfe, 0xcc, 0x01,
189 0x17, 0x88, 0x00, 0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0x3f, 0xc9, 0x71,
190 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x97, 0xb6,
191 0xba, 0xfe, 0xcc, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x00, 0x01, 0x00,
192 0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
193 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01, 0x17, 0x84, 0x02, 0x04,
194 0x0a, 0x01, 0x01, 0x01, 0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc,
195 0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01,
196 0x17, 0x88, 0x00, 0x04, 0x0a, 0x01, 0x01, 0x02, 0x12, 0x3f, 0xc9, 0x71,
197 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6,
198 0xc2, 0x2f, 0xec, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x02, 0x01, 0x00,
199 0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
200 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x03, 0x01, 0x01, 0x12,
201 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71,
202 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a,
203 0x03, 0x01, 0x02, 0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93,
204 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x04,
205 0x01, 0x03, 0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91,
206 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x00, 0x00,
207 0x20, 0xb4, 0xe4, 0xb2, 0xf3, 0x0a, 0x05, 0x01, 0x00, 0x12, 0xbf, 0xc9,
208 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x64,
209 0x70, 0xba, 0xf9, 0xaa, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x05, 0x01,
210 0x01, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f,
211 0xc9, 0x95, 0x49, 0x64, 0x70, 0xba, 0xf9, 0xaa, 0x01, 0x17, 0x88, 0x00,
212 0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1,
213 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x64, 0x70, 0xba, 0xf9, 0xaa,
214 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x00, 0x01, 0x00, 0x12, 0xbf, 0xc9,
215 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24,
216 0x70, 0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x01, 0x01,
217 0x01, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f,
218 0xc9, 0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x88, 0x00,
219 0x04, 0x0a, 0x01, 0x01, 0x02, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1,
220 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a,
221 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x02, 0xbf, 0xc9,
222 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24,
223 0x70, 0xc2, 0x2f, 0x9a, 0x0a, 0x03, 0x01, 0x01, 0x12, 0xbf, 0xc9, 0x85,
224 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24, 0x70,
225 0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a, 0x03, 0x01, 0x02,
226 0x02, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9,
227 0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a, 0x0a, 0x04, 0x01, 0x03, 0x02,
228 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95,
229 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a
233 const unsigned char kEditDelete[] = {
234 0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x80, 0x00, 0x00,
235 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x20, 0x00, 0xc0, 0x00,
236 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xe0, 0x00, 0x00, 0xff,
237 0xab, 0xab, 0xff, 0xd9, 0x00, 0x00, 0x01, 0x0a, 0x0c, 0x48, 0x2a, 0x40,
238 0x22, 0x35, 0x2d, 0x2a, 0x22, 0x22, 0x2a, 0x2d, 0x35, 0x22, 0x40, 0x2a,
239 0x48, 0x35, 0x3d, 0x40, 0x48, 0x48, 0x40, 0x3d, 0x35, 0x03, 0x0a, 0x00,
240 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01,
241 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00,
242 0x00
246 static const uint8 kEditTrash[] = {
247 0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x05, 0x00, 0x03, 0x08,
248 0x59, 0x3e, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00,
249 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x44, 0x80, 0x00,
250 0x00, 0x80, 0xff, 0x28, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3b,
251 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x49,
252 0x20, 0x00, 0x00, 0x73, 0xe5, 0xbe, 0xff, 0x11, 0xb2, 0x7b, 0x02, 0x0a,
253 0x04, 0x42, 0x48, 0x46, 0x2a, 0x24, 0x2a, 0x28, 0x48, 0x0a, 0x04, 0x48,
254 0x2a, 0x48, 0x22, 0x22, 0x22, 0x22, 0x2a, 0x05, 0x0a, 0x00, 0x02, 0x00,
255 0x01, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01,
256 0x01, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x10,
257 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x03, 0x01, 0x01, 0x00, 0x0a, 0x04,
258 0x01, 0x00, 0x00
262 static const uint8 kGoDown[] = {
263 0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
264 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
265 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0xff,
266 0xff, 0x80, 0xff, 0xff, 0xd5, 0x00, 0x01, 0x0a, 0x07, 0x35, 0x48, 0x22,
267 0x34, 0x2c, 0x34, 0x2c, 0xb3, 0xcb, 0x3e, 0xb3, 0xcb, 0x3e, 0x34, 0x48,
268 0x34, 0x03, 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83,
269 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04,
270 0x0a, 0x02, 0x01, 0x00, 0x00
274 const unsigned char kGoNext[] = {
275 0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
276 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
277 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
278 0xff, 0x80, 0xff, 0x00, 0xb3, 0x00, 0x01, 0x0a, 0x07, 0x48, 0x35, 0x34,
279 0x48, 0x34, 0x3e, 0x22, 0x3e, 0x22, 0x2c, 0x34, 0x2c, 0x34, 0x22, 0x03,
280 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04,
281 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02,
282 0x01, 0x00, 0x00
286 const unsigned char kGoPrevious[] = {
287 0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
288 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
289 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
290 0xff, 0x80, 0xff, 0x00, 0xb3, 0x00, 0x01, 0x0a, 0x07, 0x22, 0x35, 0x36,
291 0x22, 0x36, 0x2c, 0x48, 0x2c, 0x48, 0x3e, 0x36, 0x3e, 0x36, 0x48, 0x03,
292 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04,
293 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02,
294 0x01, 0x00, 0x00
298 static const uint8 kGoUp[] = {
299 0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
300 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
301 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0xff,
302 0xff, 0x80, 0xff, 0xff, 0xd5, 0x00, 0x01, 0x0a, 0x07, 0x35, 0x22, 0x48,
303 0x36, 0x3e, 0x36, 0x3e, 0x48, 0x2c, 0x48, 0x2c, 0x36, 0x22, 0x36, 0x03,
304 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04,
305 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02,
306 0x01, 0x00, 0x00
310 const unsigned char kMediaMovieLibraryR4[] = {
311 0x6e, 0x63, 0x69, 0x66, 0x06, 0x05, 0x00, 0x02, 0x00, 0x16, 0x02, 0x00,
312 0x00, 0x00, 0x3a, 0x40, 0x08, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4b,
313 0xff, 0xf9, 0x49, 0xe0, 0x04, 0x00, 0x82, 0xff, 0x29, 0x02, 0x00, 0x16,
314 0x02, 0x00, 0x00, 0x00, 0x39, 0x80, 0x10, 0xc0, 0x00, 0x01, 0x00, 0x00,
315 0x00, 0x4b, 0xff, 0xfd, 0x49, 0xe0, 0x04, 0x00, 0x82, 0xff, 0x29, 0x05,
316 0x54, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x40, 0x00, 0xc0,
317 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0xff, 0xfb, 0x46, 0xc0, 0x00, 0x00,
318 0xff, 0xff, 0xe6, 0x04, 0x00, 0x66, 0x09, 0x0a, 0x04, 0x28, 0x36, 0x42,
319 0x36, 0x42, 0x48, 0x28, 0x48, 0x0a, 0x04, 0x22, 0x38, 0x22, 0x46, 0x28,
320 0x42, 0x28, 0x3c, 0x02, 0x04, 0x3f, 0x22, 0xc1, 0x54, 0x22, 0xbd, 0x5f,
321 0x22, 0x36, 0x2b, 0x36, 0xb5, 0x67, 0x36, 0xb9, 0x5c, 0x3f, 0x34, 0xbd,
322 0x5f, 0x34, 0xc1, 0x54, 0x34, 0x48, 0x2b, 0x48, 0xb9, 0x5c, 0x48, 0xb5,
323 0x67, 0x06, 0x04, 0xef, 0x46, 0x2b, 0x46, 0xb7, 0x04, 0x46, 0xb7, 0xbf,
324 0xc1, 0xef, 0xb8, 0x6a, 0xc2, 0x10, 0xb8, 0x18, 0xc1, 0xef, 0xb8, 0x6a,
325 0x41, 0x2b, 0xc1, 0xf0, 0xb6, 0x59, 0xc1, 0xf0, 0xb6, 0x59, 0xc2, 0x10,
326 0xb6, 0xab, 0x06, 0x03, 0x3b, 0xc1, 0x88, 0xb5, 0xa9, 0xc1, 0x19, 0xb5,
327 0x1d, 0xc1, 0x88, 0xb5, 0xa9, 0x40, 0xb6, 0xb1, 0x40, 0xb4, 0xa2, 0x40,
328 0xb4, 0xa2, 0xc0, 0x79, 0xb4, 0xbc, 0x06, 0x03, 0x37, 0x3e, 0xb4, 0xa2,
329 0xbe, 0x3a, 0xb4, 0xbc, 0x3e, 0xb4, 0xa2, 0xb6, 0xb1, 0xbd, 0x2b, 0xb5,
330 0xa9, 0xbd, 0x2b, 0xb5, 0xa9, 0xbd, 0x9a, 0xb5, 0x1d, 0x06, 0x04, 0xfb,
331 0xbc, 0xc4, 0xb6, 0x59, 0xbc, 0xa3, 0xb6, 0xab, 0xbc, 0xc4, 0xb6, 0x59,
332 0x3d, 0x2b, 0xbc, 0xc3, 0xb8, 0x6a, 0xbc, 0xc3, 0xb8, 0x6a, 0xbc, 0xa3,
333 0xb8, 0x18, 0x38, 0x2b, 0x38, 0xb7, 0xbf, 0x38, 0xb7, 0x04, 0x06, 0x03,
334 0x3b, 0xbd, 0x2b, 0xb9, 0x1a, 0xbd, 0x9a, 0xb9, 0xa6, 0xbd, 0x2b, 0xb9,
335 0x1a, 0x3e, 0xb8, 0x12, 0x3e, 0xba, 0x21, 0x3e, 0xba, 0x21, 0xbe, 0x3a,
336 0xba, 0x06, 0x06, 0x03, 0x37, 0x40, 0xba, 0x21, 0xc0, 0x79, 0xba, 0x06,
337 0x40, 0xba, 0x21, 0xb8, 0x12, 0xc1, 0x88, 0xb9, 0x1a, 0xc1, 0x88, 0xb9,
338 0x1a, 0xc1, 0x19, 0xb9, 0xa6, 0x09, 0x0a, 0x05, 0x03, 0x00, 0x01, 0x02,
339 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x02,
340 0x30, 0x0e, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x00, 0x02, 0x00,
341 0x01, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x00,
342 0x0a, 0x02, 0x01, 0x01, 0x00, 0x0a, 0x03, 0x07, 0x08, 0x07, 0x06, 0x05,
343 0x04, 0x03, 0x02, 0x10, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a, 0x04, 0x07,
344 0x02, 0x03, 0x07, 0x08, 0x05, 0x06, 0x04, 0x00, 0x0a, 0x03, 0x07, 0x08,
345 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x30, 0x0c, 0x20, 0x01, 0x17, 0x83,
346 0x00, 0x04, 0x0a, 0x04, 0x07, 0x02, 0x03, 0x07, 0x08, 0x05, 0x06, 0x04,
347 0x20, 0x0c, 0x20
351 const unsigned char kMediaPlaybackStartEnabled[] = {
352 0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
353 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
354 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
355 0xff, 0x80, 0xff, 0x00, 0xb2, 0x00, 0x01, 0x0a, 0x03, 0x46, 0x35, 0x24,
356 0xb3, 0xcb, 0x24, 0x48, 0x03, 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22,
357 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17,
358 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x00
362 static const uint8 kViewFullScreen[] = {
363 0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
364 0x03, 0xff, 0xd4, 0x00, 0x02, 0x02, 0x06, 0x02, 0x3b, 0x00, 0x00, 0x00,
365 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0xc0, 0x00, 0x48, 0xc0, 0x00, 0x48,
366 0xe0, 0x00, 0xab, 0xff, 0xff, 0xff, 0xff, 0xe6, 0xe1, 0xdc, 0x05, 0x54,
367 0x02, 0x02, 0x06, 0x02, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
368 0x00, 0xb9, 0x00, 0x00, 0x46, 0x00, 0x00, 0x46, 0x00, 0x00, 0xff, 0x80,
369 0xaa, 0xff, 0x00, 0x00, 0x47, 0xd9, 0x03, 0x00, 0x2a, 0x80, 0x03, 0x0a,
370 0x04, 0x2a, 0x2c, 0x2a, 0x28, 0x34, 0x28, 0x34, 0x2c, 0x0a, 0x04, 0x42,
371 0x42, 0x2a, 0x42, 0x2a, 0x2c, 0x42, 0x2c, 0x0a, 0x03, 0x22, 0x22, 0x2c,
372 0x22, 0x22, 0x2c, 0x0d, 0x0a, 0x00, 0x02, 0x00, 0x01, 0x30, 0x22, 0x22,
373 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x04, 0x01, 0x01, 0x10, 0x01, 0x17,
374 0x84, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22,
375 0x04, 0x0a, 0x02, 0x01, 0x00, 0x00, 0x0a, 0x03, 0x01, 0x01, 0x00, 0x0a,
376 0x06, 0x01, 0x02, 0x12, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
377 0x00, 0xc0, 0x00, 0x00, 0x4a, 0xc0, 0x00, 0x4a, 0xc0, 0x00, 0x01, 0x17,
378 0x84, 0x22, 0x04, 0x0a, 0x06, 0x01, 0x02, 0x12, 0x00, 0x00, 0x00, 0x40,
379 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0xc0, 0x00, 0x37,
380 0x6c, 0x80, 0x01, 0x17, 0x84, 0x22, 0x04, 0x0a, 0x06, 0x01, 0x02, 0x30,
381 0xb3, 0x05, 0xb3, 0x05, 0x01, 0x17, 0x84, 0x22, 0x04, 0x0a, 0x06, 0x01,
382 0x02, 0x12, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
383 0x00, 0x00, 0x37, 0x6c, 0x89, 0x4a, 0xbf, 0xff, 0x01, 0x17, 0x84, 0x22,
384 0x04, 0x0a, 0x05, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
385 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x61, 0xfd, 0x4a, 0xc0, 0x00,
386 0x0a, 0x05, 0x01, 0x02, 0x00, 0x0a, 0x05, 0x01, 0x02, 0x02, 0x00, 0x00,
387 0x00, 0x40, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0xc0,
388 0x00, 0x00, 0x00, 0x00, 0x0a, 0x05, 0x01, 0x02, 0x02, 0xc0, 0x00, 0x00,
389 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x4a, 0xc0, 0x00,
390 0x4a, 0xc0, 0x00
394 static const uint8 kViewWindowed[] = {
395 0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
396 0x03, 0xff, 0xd4, 0x00, 0x05, 0x54, 0x02, 0x02, 0x06, 0x02, 0x3b, 0x80,
397 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x48, 0x00,
398 0x00, 0x48, 0x40, 0x00, 0xb8, 0xff, 0xff, 0xff, 0xff, 0xe6, 0xe1, 0xdc,
399 0x03, 0x00, 0x40, 0x80, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x39,
400 0x80, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0xe0, 0x00, 0x47,
401 0x40, 0x00, 0x00, 0xab, 0xd5, 0xff, 0xff, 0x00, 0x6c, 0xd9, 0x03, 0x0a,
402 0x04, 0x22, 0x26, 0x22, 0x22, 0x2e, 0x22, 0x2e, 0x26, 0x0a, 0x04, 0x3e,
403 0x3c, 0x22, 0x3c, 0x22, 0x26, 0x3e, 0x26, 0x0a, 0x07, 0x46, 0x2e, 0x3c,
404 0x2e, 0x3c, 0x24, 0x3f, 0x27, 0x44, 0x22, 0x48, 0x26, 0x43, 0x2b, 0x0b,
405 0x0a, 0x00, 0x02, 0x00, 0x01, 0x30, 0x26, 0x26, 0x01, 0x17, 0x84, 0x22,
406 0x04, 0x0a, 0x03, 0x01, 0x01, 0x30, 0x24, 0x24, 0x01, 0x17, 0x84, 0x22,
407 0x04, 0x0a, 0x01, 0x01, 0x00, 0x30, 0x24, 0x24, 0x01, 0x17, 0x84, 0x22,
408 0x04, 0x0a, 0x02, 0x01, 0x00, 0x20, 0x24, 0x24, 0x0a, 0x04, 0x01, 0x01,
409 0x20, 0x24, 0x24, 0x0a, 0x00, 0x01, 0x02, 0x30, 0x22, 0x22, 0x01, 0x17,
410 0x84, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x02, 0x10, 0x01, 0x17, 0x84, 0x22,
411 0x04, 0x0a, 0x06, 0x01, 0x02, 0x00, 0x0a, 0x00, 0x01, 0x02, 0x12, 0xc0,
412 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x4a,
413 0xbe, 0xe8, 0x4a, 0xc1, 0x17, 0x01, 0x17, 0x84, 0x22, 0x04, 0x0a, 0x05,
414 0x01, 0x02, 0x12, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
415 0xc0, 0x00, 0x00, 0x4a, 0x9e, 0xe8, 0x4a, 0xa1, 0x17, 0x01, 0x17, 0x84,
416 0x22, 0x04, 0x0a, 0x06, 0x01, 0x02, 0x02, 0xc0, 0x00, 0x00, 0x00, 0x00,
417 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x4a, 0x9e, 0xe8, 0x4a, 0xa1,
418 0x17
422 static const uint8 kZoomFitBest[] = {
423 0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x05, 0x54, 0x02, 0x00,
424 0x16, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x00, 0xc0, 0x00, 0x00, 0x00,
425 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0x80, 0x00, 0x00, 0xff, 0xff, 0xe5,
426 0x03, 0x20, 0x59, 0xce, 0x02, 0x01, 0x06, 0x02, 0x3a, 0x80, 0x00, 0x00,
427 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x00, 0x47, 0xbf, 0xff, 0x47,
428 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xea, 0xfa, 0x04, 0x08,
429 0x02, 0x46, 0x46, 0x3f, 0x3f, 0x02, 0x04, 0x40, 0x32, 0x40, 0xbd, 0x40,
430 0x40, 0xb7, 0x17, 0x32, 0x24, 0xbd, 0x40, 0x24, 0xb7, 0x17, 0x24, 0x24,
431 0x32, 0x24, 0xb7, 0x17, 0x24, 0xbd, 0x40, 0x32, 0x40, 0xb7, 0x17, 0x40,
432 0xbd, 0x40, 0x40, 0x02, 0x04, 0x32, 0x28, 0xbc, 0x5f, 0x28, 0xb7, 0xf8,
433 0x28, 0x28, 0x32, 0x28, 0xb7, 0xf8, 0x28, 0xbc, 0x5f, 0x32, 0x3c, 0xb7,
434 0xf8, 0x3c, 0xbc, 0x5f, 0x3c, 0x3c, 0x32, 0x3c, 0xbc, 0x5f, 0x3c, 0xb7,
435 0xf8, 0x0a, 0x06, 0x2b, 0x2b, 0x31, 0x2c, 0x2e, 0x2d, 0x31, 0x31, 0x2d,
436 0x2e, 0x2c, 0x31, 0x09, 0x0a, 0x00, 0x02, 0x00, 0x01, 0x30, 0x22, 0x22,
437 0x01, 0x17, 0x88, 0x22, 0x04, 0x0a, 0x01, 0x02, 0x00, 0x01, 0x10, 0x01,
438 0x17, 0x88, 0x22, 0x04, 0x0a, 0x02, 0x02, 0x00, 0x01, 0x10, 0x01, 0x17,
439 0x84, 0x20, 0x04, 0x0a, 0x03, 0x01, 0x02, 0x10, 0x01, 0x17, 0x84, 0x00,
440 0x04, 0x0a, 0x04, 0x01, 0x02, 0x00, 0x0a, 0x03, 0x01, 0x03, 0x00, 0x0a,
441 0x03, 0x01, 0x03, 0x02, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
442 0x00, 0xc0, 0x00, 0x00, 0x4a, 0x40, 0x00, 0x4a, 0x40, 0x00, 0x0a, 0x03,
443 0x01, 0x03, 0x02, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x00, 0x00,
444 0x00, 0x00, 0x00, 0x08, 0x0e, 0xcc, 0x4a, 0x40, 0x00, 0x0a, 0x03, 0x01,
445 0x03, 0x02, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
446 0x00, 0x00, 0x4a, 0x40, 0x00, 0x08, 0x0e, 0xcc
450 static const uint8 kZoomFitViewBest[] = {
451 0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
452 0x03, 0xff, 0xd4, 0x00, 0x02, 0x02, 0x06, 0x02, 0x3c, 0x60, 0x00, 0x00,
453 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x80, 0x00, 0x48, 0xa0, 0x00, 0x49,
454 0x20, 0x00, 0xca, 0xff, 0xff, 0xff, 0xff, 0xe6, 0xe1, 0xdc, 0x05, 0x54,
455 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3b, 0x40, 0x00, 0xc0, 0x00,
456 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x49, 0x20, 0x00, 0x00, 0xab,
457 0xd5, 0xff, 0xff, 0x00, 0x6c, 0xd9, 0x03, 0x00, 0x40, 0x80, 0x04, 0x0a,
458 0x04, 0x22, 0x2a, 0x22, 0x22, 0x2e, 0x22, 0x2e, 0x2a, 0x0a, 0x04, 0x48,
459 0x48, 0x22, 0x48, 0x22, 0x2a, 0x48, 0x2a, 0x0a, 0x0a, 0x2a, 0x38, 0x40,
460 0x38, 0x40, 0x34, 0x46, 0x39, 0x40, 0x3e, 0x40, 0x3a, 0x2a, 0x3a, 0x2a,
461 0x3e, 0x24, 0x39, 0x2a, 0x34, 0x0a, 0x0a, 0x36, 0x32, 0x36, 0x40, 0x3a,
462 0x40, 0x35, 0x46, 0x30, 0x40, 0x34, 0x40, 0x34, 0x32, 0x30, 0x32, 0x35,
463 0x2c, 0x3a, 0x32, 0x07, 0x0a, 0x00, 0x02, 0x00, 0x01, 0x30, 0x22, 0x22,
464 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x04, 0x01, 0x01, 0x10, 0x01, 0x17,
465 0x84, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22,
466 0x04, 0x0a, 0x02, 0x01, 0x00, 0x00, 0x0a, 0x03, 0x01, 0x01, 0x00, 0x0a,
467 0x06, 0x02, 0x02, 0x03, 0x30, 0xb3, 0x05, 0xb3, 0x05, 0x01, 0x17, 0x84,
468 0x22, 0x04, 0x0a, 0x05, 0x02, 0x02, 0x03, 0x00
472 static const uint8 kZoomIn[] = {
473 0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x05, 0x54, 0x02, 0x00,
474 0x16, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00,
475 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0xff, 0xff, 0xe5,
476 0x03, 0x21, 0x5a, 0xce, 0x02, 0x01, 0x06, 0x02, 0x3a, 0x80, 0x00, 0x00,
477 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x00, 0x47, 0xc0, 0x00, 0x47,
478 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xea, 0xfa, 0x04, 0x08,
479 0x02, 0x46, 0x46, 0x41, 0x41, 0x02, 0x04, 0x32, 0x24, 0xbd, 0x40, 0x24,
480 0xb7, 0x17, 0x24, 0x24, 0x32, 0x24, 0xb7, 0x17, 0x24, 0xbd, 0x40, 0x32,
481 0x40, 0xb7, 0x17, 0x40, 0xbd, 0x40, 0x40, 0x40, 0x32, 0x40, 0xbd, 0x40,
482 0x40, 0xb7, 0x17, 0x02, 0x04, 0x32, 0x28, 0xbc, 0x5f, 0x28, 0xb7, 0xf8,
483 0x28, 0x28, 0x32, 0x28, 0xb7, 0xf8, 0x28, 0xbc, 0x5f, 0x32, 0x3c, 0xb7,
484 0xf8, 0x3c, 0xbc, 0x5f, 0x3c, 0x3c, 0x32, 0x3c, 0xbc, 0x5f, 0x3c, 0xb7,
485 0xf8, 0x0a, 0x0c, 0x30, 0x34, 0x2c, 0x34, 0x2c, 0x30, 0x30, 0x30, 0x30,
486 0x2c, 0x34, 0x2c, 0x34, 0x30, 0x38, 0x30, 0x38, 0x34, 0x34, 0x34, 0x34,
487 0x38, 0x30, 0x38, 0x06, 0x0a, 0x00, 0x02, 0x00, 0x01, 0x30, 0x22, 0x22,
488 0x01, 0x17, 0x88, 0x22, 0x04, 0x0a, 0x01, 0x02, 0x00, 0x01, 0x10, 0x01,
489 0x17, 0x88, 0x22, 0x04, 0x0a, 0x02, 0x02, 0x00, 0x01, 0x10, 0x01, 0x17,
490 0x84, 0x20, 0x04, 0x0a, 0x03, 0x01, 0x02, 0x10, 0x01, 0x17, 0x84, 0x00,
491 0x04, 0x0a, 0x04, 0x01, 0x02, 0x00, 0x0a, 0x03, 0x01, 0x03, 0x00
495 static const uint8 kZoomOriginal[] = {
496 0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x05, 0x54, 0x02, 0x00,
497 0x16, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00,
498 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0xff, 0xff, 0xe5,
499 0x03, 0x21, 0x5a, 0xce, 0x02, 0x01, 0x06, 0x02, 0x3a, 0x80, 0x00, 0x00,
500 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x00, 0x47, 0xc0, 0x00, 0x47,
501 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xea, 0xfa, 0x04, 0x08,
502 0x02, 0x46, 0x46, 0x41, 0x41, 0x02, 0x04, 0x32, 0x24, 0xbd, 0x40, 0x24,
503 0xb7, 0x17, 0x24, 0x24, 0x32, 0x24, 0xb7, 0x17, 0x24, 0xbd, 0x40, 0x32,
504 0x40, 0xb7, 0x17, 0x40, 0xbd, 0x40, 0x40, 0x40, 0x32, 0x40, 0xbd, 0x40,
505 0x40, 0xb7, 0x17, 0x02, 0x04, 0x32, 0x28, 0xbc, 0x5f, 0x28, 0xb7, 0xf8,
506 0x28, 0x28, 0x32, 0x28, 0xb7, 0xf8, 0x28, 0xbc, 0x5f, 0x32, 0x3c, 0xb7,
507 0xf8, 0x3c, 0xbc, 0x5f, 0x3c, 0x3c, 0x32, 0x3c, 0xbc, 0x5f, 0x3c, 0xb7,
508 0xf8, 0x06, 0x0c, 0xd2, 0x11, 0x11, 0x30, 0x32, 0x2e, 0x30, 0x30, 0x2c,
509 0x30, 0x30, 0x30, 0x2c, 0x2c, 0x34, 0x36, 0x36, 0x38, 0x2e, 0x36, 0x30,
510 0x06, 0x0a, 0x00, 0x02, 0x00, 0x01, 0x30, 0x22, 0x22, 0x01, 0x17, 0x88,
511 0x22, 0x04, 0x0a, 0x01, 0x02, 0x00, 0x01, 0x10, 0x01, 0x17, 0x88, 0x22,
512 0x04, 0x0a, 0x02, 0x02, 0x00, 0x01, 0x10, 0x01, 0x17, 0x84, 0x20, 0x04,
513 0x0a, 0x03, 0x01, 0x02, 0x10, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x04,
514 0x01, 0x02, 0x00, 0x0a, 0x03, 0x01, 0x03, 0x00
518 static const uint8 kZoomOut[] = {
519 0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x05, 0x54, 0x02, 0x00,
520 0x16, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00,
521 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0xff, 0xff, 0xe5,
522 0x03, 0x21, 0x5a, 0xce, 0x02, 0x01, 0x06, 0x02, 0x3a, 0x80, 0x00, 0x00,
523 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x00, 0x47, 0xc0, 0x00, 0x47,
524 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xea, 0xfa, 0x04, 0x08,
525 0x02, 0x46, 0x46, 0x41, 0x41, 0x02, 0x04, 0x32, 0x24, 0xbd, 0x40, 0x24,
526 0xb7, 0x17, 0x24, 0x24, 0x32, 0x24, 0xb7, 0x17, 0x24, 0xbd, 0x40, 0x32,
527 0x40, 0xb7, 0x17, 0x40, 0xbd, 0x40, 0x40, 0x40, 0x32, 0x40, 0xbd, 0x40,
528 0x40, 0xb7, 0x17, 0x02, 0x04, 0x32, 0x28, 0xbc, 0x5f, 0x28, 0xb7, 0xf8,
529 0x28, 0x28, 0x32, 0x28, 0xb7, 0xf8, 0x28, 0xbc, 0x5f, 0x32, 0x3c, 0xb7,
530 0xf8, 0x3c, 0xbc, 0x5f, 0x3c, 0x3c, 0x32, 0x3c, 0xbc, 0x5f, 0x3c, 0xb7,
531 0xf8, 0x0a, 0x04, 0x2c, 0x34, 0x2c, 0x30, 0x38, 0x30, 0x38, 0x34, 0x06,
532 0x0a, 0x00, 0x02, 0x00, 0x01, 0x30, 0x22, 0x22, 0x01, 0x17, 0x88, 0x22,
533 0x04, 0x0a, 0x01, 0x02, 0x00, 0x01, 0x10, 0x01, 0x17, 0x88, 0x22, 0x04,
534 0x0a, 0x02, 0x02, 0x00, 0x01, 0x10, 0x01, 0x17, 0x84, 0x20, 0x04, 0x0a,
535 0x03, 0x01, 0x02, 0x10, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x04, 0x01,
536 0x02, 0x00, 0x0a, 0x03, 0x01, 0x03, 0x00
540 static const uint8 kPagePrevious[] = {
541 0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x05, 0x01, 0x03, 0x00,
542 0x00, 0x80, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00,
543 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0x9f, 0xff,
544 0x00, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xd9, 0xff, 0x04, 0x00, 0x66, 0x03,
545 0x28, 0x1b, 0x01, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60,
546 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0,
547 0x00, 0x00, 0xff, 0xa8, 0x00, 0xff, 0x92, 0x61, 0x03, 0x03, 0x0a, 0x04,
548 0x2a, 0xb3, 0xcb, 0x48, 0xb3, 0xcb, 0x48, 0x48, 0x2a, 0x48, 0x0a, 0x07,
549 0x40, 0x2e, 0x2c, 0x2e, 0x2c, 0x28, 0x22, 0x32, 0x2c, 0x3c, 0x2c, 0x36,
550 0x40, 0x36, 0x0a, 0x07, 0x22, 0x35, 0x36, 0x22, 0x36, 0x2c, 0x48, 0x2c,
551 0x48, 0x3e, 0x36, 0x3e, 0x36, 0x48, 0x06, 0x0a, 0x00, 0x01, 0x00, 0x30,
552 0x1e, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x30,
553 0x1c, 0x20, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x03, 0x01, 0x00, 0x20,
554 0x1c, 0x20, 0x0a, 0x04, 0x01, 0x02, 0x12, 0x3d, 0xfe, 0x4e, 0x00, 0x00,
555 0x00, 0x00, 0x00, 0x00, 0x3e, 0x16, 0x93, 0x46, 0xc2, 0x38, 0x46, 0xc3,
556 0xc7, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0x3d,
557 0xfe, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x16, 0x93, 0x46,
558 0x82, 0x54, 0x46, 0x80, 0xf5, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x06,
559 0x01, 0x02, 0x02, 0x3d, 0xfe, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
560 0x3e, 0x16, 0x93, 0x46, 0x82, 0x54, 0x46, 0x80, 0xf5
564 static const uint8 kPageNext[] = {
565 0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x05, 0x01, 0x03, 0x00,
566 0x00, 0x80, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00,
567 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0x9f, 0xff,
568 0x00, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xd9, 0xff, 0x04, 0x00, 0x66, 0x03,
569 0x26, 0x19, 0x01, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60,
570 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0,
571 0x00, 0x00, 0xff, 0xaa, 0x06, 0xff, 0x8d, 0x5e, 0x03, 0x03, 0x0a, 0x04,
572 0x2a, 0xb3, 0xcb, 0x48, 0xb3, 0xcb, 0x48, 0x48, 0x2a, 0x48, 0x0a, 0x07,
573 0x22, 0x36, 0x36, 0x36, 0x36, 0x3c, 0x40, 0x32, 0x36, 0x28, 0x36, 0x2e,
574 0x22, 0x2e, 0x0a, 0x07, 0x48, 0x35, 0x34, 0x48, 0x34, 0x3e, 0x22, 0x3e,
575 0x22, 0x2c, 0x34, 0x2c, 0x34, 0x22, 0x06, 0x0a, 0x00, 0x01, 0x00, 0x30,
576 0x1e, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x30,
577 0x1c, 0x20, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x03, 0x01, 0x00, 0x20,
578 0x1c, 0x20, 0x0a, 0x04, 0x01, 0x02, 0x12, 0x3d, 0xfe, 0x4e, 0x00, 0x00,
579 0x00, 0x00, 0x00, 0x00, 0x3e, 0x16, 0x93, 0x46, 0xbf, 0xe4, 0x46, 0xc3,
580 0xc7, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0x3d,
581 0xfe, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x16, 0x93, 0x46,
582 0x80, 0x00, 0x46, 0x80, 0xf5, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x06,
583 0x01, 0x02, 0x02, 0x3d, 0xfe, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
584 0x3e, 0x16, 0x93, 0x46, 0x80, 0x00, 0x46, 0x80, 0xf5
588 struct IconData {
589 const uint8* data;
590 size_t size;
591 BBitmap* bitmap;
595 static IconData kIcons[] = {
596 { kDocumentOpen, sizeof(kDocumentOpen), NULL },
597 { kDocumentSaveAs, sizeof(kDocumentSaveAs), NULL },
598 { kDocumentSave, sizeof(kDocumentSave), NULL },
599 { kDrawRectangularSelection, sizeof(kDrawRectangularSelection), NULL },
600 { kEditCopy, sizeof(kEditCopy), NULL },
601 { kEditCut, sizeof(kEditCut), NULL },
602 { kEditDelete, sizeof(kEditDelete), NULL },
603 { kEditTrash, sizeof(kEditTrash), NULL },
604 { kMediaMovieLibraryR4, sizeof(kMediaMovieLibraryR4), NULL },
605 { kMediaPlaybackStartEnabled, sizeof(kMediaPlaybackStartEnabled), NULL },
606 { kGoDown, sizeof(kGoDown), NULL },
607 { kGoNext, sizeof(kGoNext), NULL },
608 { kGoPrevious, sizeof(kGoPrevious), NULL },
609 { kGoUp, sizeof(kGoUp), NULL },
610 { kViewFullScreen, sizeof(kViewFullScreen), NULL },
611 { kViewWindowed, sizeof(kViewWindowed), NULL },
612 { kZoomFitBest, sizeof(kZoomFitBest), NULL },
613 { kZoomFitViewBest, sizeof(kZoomFitViewBest), NULL },
614 { kZoomIn, sizeof(kZoomIn), NULL },
615 { kZoomOriginal, sizeof(kZoomOriginal), NULL },
616 { kZoomOut, sizeof(kZoomOut), NULL },
617 { kPagePrevious, sizeof(kPagePrevious), NULL },
618 { kPageNext, sizeof(kPageNext), NULL }
622 status_t
623 init_tool_bar_icons()
625 const int32 toolBarIconsSize = 22;
626 const int32 iconRenderSize = max_c(toolBarIconsSize, 32);
628 BBitmap bitmap(BRect(0, 0, iconRenderSize - 1, iconRenderSize - 1),
629 B_BITMAP_NO_SERVER_LINK, B_RGBA32);
631 for (uint32 i = 0; i < sizeof(kIcons) / sizeof(IconData); i++) {
632 status_t ret = BIconUtils::GetVectorIcon(kIcons[i].data,
633 kIcons[i].size, &bitmap);
634 if (ret != B_OK)
635 return ret;
636 kIcons[i].bitmap = new(std::nothrow) BBitmap(BRect(0, 0,
637 toolBarIconsSize - 1, toolBarIconsSize - 1), 0, B_RGBA32);
638 if (kIcons[i].bitmap == NULL)
639 return B_NO_MEMORY;
640 ret = kIcons[i].bitmap->InitCheck();
641 if (ret != B_OK)
642 return ret;
643 uint8* src = reinterpret_cast<uint8*>(bitmap.Bits());
644 uint32 srcBPR = bitmap.BytesPerRow();
645 uint8* dst = reinterpret_cast<uint8*>(kIcons[i].bitmap->Bits());
646 uint32 dstBPR = kIcons[i].bitmap->BytesPerRow();
647 for (int32 y = 0; y < toolBarIconsSize; y++) {
648 memcpy(dst, src, 4 * toolBarIconsSize);
649 src += srcBPR;
650 dst += dstBPR;
654 // Initializing 14 icons on startup takes about 10ms on a Core2Duo @ 2GHz.
656 return B_OK;
660 void
661 uninit_tool_bar_icons()
663 for (uint32 i = 0; i < sizeof(kIcons) / sizeof(IconData); i++) {
664 delete kIcons[i].bitmap;
665 kIcons[i].bitmap = NULL;
670 const BBitmap*
671 tool_bar_icon(uint32 which)
673 if (which >= sizeof(kIcons) / sizeof(IconData))
674 return NULL;
675 return kIcons[which].bitmap;