00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00028
00029
00030
00031
00032
00033
00034
00035 typedef unsigned short u16;
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 #define WAVEFORM_SIZE (128*1024)
00078
00079
00080 #define FBIO_IOCTL_BASE 'v'
00081 #define FBIO_DISPLAY _IOW(FBIO_IOCTL_BASE, 1, struct display_update_info)
00082 #define FBIO_ERASE_WHITE _IOW(FBIO_IOCTL_BASE, 2, struct display_update_info)
00083 #define FBIO_DRAWPIXELS _IOW(FBIO_IOCTL_BASE, 3, struct transfer_buffer)
00084 #define FBIO_DRAW_BRUSH _IOW(FBIO_IOCTL_BASE, 4, struct brush_draw_info_obsolete)
00085 #define FBIO_REDRAW _IOW(FBIO_IOCTL_BASE, 5, struct display_update_info)
00086 #define FBIO_UPLOAD_WAVEFORM _IOC(_IOC_WRITE, FBIO_IOCTL_BASE, 6, WAVEFORM_SIZE)
00087 #define FBIO_UPLOAD_BRUSH _IO(FBIO_IOCTL_BASE, 7)
00088 #define FBIO_DRAW_BUBBLE _IOW(FBIO_IOCTL_BASE, 8, struct brush_draw_info_obsolete)
00089 #define FBIO_DRAW_BRUSH_GENERIC _IOW(FBIO_IOCTL_BASE, 9, struct brush_draw_info)
00090 #define FBIO_START_PROGRESS_BAR _IO(FBIO_IOCTL_BASE, 10)
00091
00092
00093
00094 #define WAVEFORM_2BPP_IMAGE 0
00095 #define WAVEFORM_4BPP_IMAGE 1
00096 #define WAVEFORM_DRAW 4
00097 #define WAVEFORM_FAST_BLACK_WHITE 6
00098 #define WAVEFORM_TYPING 9
00099
00100 #define HARDWARE_V3 1 // Thom:required to select between hardware - must be autoselect before production.
00101
00102
00103
00104 #define ESTIMATED_BOOT_TIME (39)
00105 #define ESTIMATED_BOOT_JIFFIES (ESTIMATED_BOOT_TIME * 100)
00106 #define BOOT_PROGRESS_STEPS (18)
00107 #define BOOT_PROGRESS_START_STEP (0)
00108 #define PROGRESS_STEP_JIFFIES (ESTIMATED_BOOT_JIFFIES / (BOOT_PROGRESS_STEPS - BOOT_PROGRESS_START_STEP))
00109
00110
00111 #define BLACK_CURSOR_X 0
00112 #define BLACK_CURSOR_Y 24
00113 #define BLACK_CURSOR_SIZE_X 114
00114 #define BLACK_CURSOR_SIZE_Y 24
00115
00116 #define WHITE_CURSOR_X 0
00117 #define WHITE_CURSOR_Y 0
00118 #define WHITE_CURSOR_SIZE_X 114
00119 #define WHITE_CURSOR_SIZE_Y 24
00120
00121 #define BLACK_BUBBLE_X 102
00122 #define BLACK_BUBBLE_Y 49
00123 #define BLACK_BUBBLE_SIZE_X 7
00124 #define BLACK_BUBBLE_SIZE_Y 7
00125
00126 #define WHITE_BUBBLE_X 21
00127 #define WHITE_BUBBLE_Y 49
00128 #define WHITE_BUBBLE_SIZE_X 7
00129 #define WHITE_BUBBLE_SIZE_Y 7
00130
00131 #define PROGRESS_BLOCK_BWHITE_X 118
00132 #define PROGRESS_BLOCK_BWHITE_Y 22
00133 #define PROGRESS_BLOCK_BWHITE_SIZE_X 19
00134 #define PROGRESS_BLOCK_BWHITE_SIZE_Y 36
00135
00136 #define PROGRESS_BLOCK_WHITE_X 138
00137 #define PROGRESS_BLOCK_WHITE_Y 22
00138 #define PROGRESS_BLOCK_WHITE_SIZE_X 19
00139 #define PROGRESS_BLOCK_WHITE_SIZE_Y 36
00140
00141 #define PROGRESS_BLOCK_BLACK_X 159
00142 #define PROGRESS_BLOCK_BLACK_Y 22
00143 #define PROGRESS_BLOCK_BLACK_SIZE_X 19
00144 #define PROGRESS_BLOCK_BLACK_SIZE_Y 36
00145
00146
00147 #define WHITE_BRUSH_X 1
00148 #define LGRAY_BRUSH_X 28
00149 #define DGRAY_BRUSH_X 55
00150 #define BLACK_BRUSH_X 82
00151 #define BRUSH_Y 49
00152
00153 #define MAX_BRUSH_SIZE 6
00154
00155
00156 #define WHITE 0
00157 #define LIGHT_GRAY 1
00158 #define DARK_GRAY 2
00159 #define BLACK 3
00160
00161 #define PIXELBUFSIZE 25
00162
00163
00164 typedef enum
00165 {
00166 e_cursor_hide = 0,
00167 e_cursor_show,
00168 e_cursor_blink,
00169 e_cursor_undefined
00170 } cursor_state_t;
00171
00172
00173 struct coordinates
00174 {
00175 u16 x1;
00176 u16 y1;
00177 u16 x2;
00178 u16 y2;
00179 };
00180
00181 struct point_info
00182 {
00183 unsigned short x;
00184 unsigned short y;
00185 unsigned char size;
00186 unsigned char color;
00187 unsigned char pen_down;
00188 };
00189
00190 struct transfer_buffer
00191 {
00192 unsigned int count;
00193 struct point_info point_list [PIXELBUFSIZE];
00194 };
00195
00196 struct display_update_info
00197 {
00198 int waveform;
00199 int sequence;
00200 };
00201
00202
00203 struct brush_draw_info_obsolete
00204 {
00205 unsigned short x;
00206 unsigned short y;
00207 unsigned int size;
00208 unsigned short color;
00209 };
00210
00211
00212 struct brush_draw_info
00213 {
00214 unsigned short sourcex;
00215 unsigned short sourcey;
00216 unsigned short sizex;
00217 unsigned short sizey;
00218 unsigned short destx;
00219 unsigned short desty;
00220 unsigned short brushlsb;
00221 };
00222
00223
00224 #ifndef __CL_CURSOR__H__
00225 #define __CL_CURSOR__H__
00226
00227 #ifdef __cplusplus
00228 extern "C"
00229 {
00230 #endif
00231
00237 int cursor_init(ContentLister* theContentLister);
00238
00247 int cursor_set_state(const int pos, const cursor_state_t state);
00248
00256 void cursor_hide_all(void);
00257
00265 void cursor_redraw(void);
00266
00274 void cursor_destroy();
00275
00283 void start_progress_indicator(void);
00284
00285
00286 #ifdef __cplusplus
00287 }
00288 #endif
00289
00290 #endif //__CL_CURSOR__H__