00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00032 #ifndef __PAGEBAR_DISPLAYUPDATE_H__
00033 #define __PAGEBAR_DISPLAYUPDATE_H__
00034
00035
00036 #include <fcntl.h>
00037 #include <sys/ioctl.h>
00038 #include <config.h>
00039 #include <stdio.h>
00040 #include <unistd.h>
00041
00042 typedef unsigned short u16;
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
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 #define WAVEFORM_SIZE (128*1024)
00088
00089
00090 #define FBIO_IOCTL_BASE 'v'
00091 #define FBIO_DISPLAY _IOW(FBIO_IOCTL_BASE, 1, struct display_update_info)
00092 #define FBIO_ERASE_WHITE _IOW(FBIO_IOCTL_BASE, 2, struct display_update_info)
00093 #define FBIO_DRAWPIXELS _IOW(FBIO_IOCTL_BASE, 3, struct transfer_buffer)
00094 #define FBIO_DRAW_BRUSH _IOW(FBIO_IOCTL_BASE, 4, struct brush_draw_info_obsolete)
00095 #define FBIO_REDRAW _IOW(FBIO_IOCTL_BASE, 5, struct display_update_info)
00096 #define FBIO_UPLOAD_WAVEFORM _IOC(_IOC_WRITE, FBIO_IOCTL_BASE, 6, WAVEFORM_SIZE)
00097 #define FBIO_UPLOAD_BRUSH _IO(FBIO_IOCTL_BASE, 7)
00098 #define FBIO_DRAW_BUBBLE _IOW(FBIO_IOCTL_BASE, 8, struct brush_draw_info_obsolete)
00099 #define FBIO_DRAW_BRUSH_GENERIC _IOW(FBIO_IOCTL_BASE, 9, struct brush_draw_info)
00100
00101
00102 #define WAVEFORM_2BPP_IMAGE 0
00103 #define WAVEFORM_4BPP_IMAGE 1
00104 #define WAVEFORM_DRAW 4
00105 #define WAVEFORM_FAST_BLACK_WHITE 6
00106 #define WAVEFORM_TYPING 9
00107
00108 #define HARDWARE_V3 1 // Thom:required to select between hardware - must be autoselect before production.
00109
00110
00111
00112 #define ESTIMATED_BOOT_TIME (39)
00113 #define ESTIMATED_BOOT_JIFFIES (ESTIMATED_BOOT_TIME * 100)
00114 #define BOOT_PROGRESS_STEPS (18)
00115 #define BOOT_PROGRESS_START_STEP (0)
00116 #define PROGRESS_STEP_JIFFIES (ESTIMATED_BOOT_JIFFIES / (BOOT_PROGRESS_STEPS - BOOT_PROGRESS_START_STEP))
00117
00118
00119 #define BLACK_CURSOR_X 0
00120 #define BLACK_CURSOR_Y 24
00121 #define BLACK_CURSOR_SIZE_X 114
00122 #define BLACK_CURSOR_SIZE_Y 24
00123
00124 #define WHITE_CURSOR_X 0
00125 #define WHITE_CURSOR_Y 0
00126 #define WHITE_CURSOR_SIZE_X 114
00127 #define WHITE_CURSOR_SIZE_Y 24
00128
00129 #define BLACK_BUBBLE_X 102
00130 #define BLACK_BUBBLE_Y 49
00131 #define BLACK_BUBBLE_SIZE_X 7
00132 #define BLACK_BUBBLE_SIZE_Y 7
00133
00134 #define WHITE_BUBBLE_X 21
00135 #define WHITE_BUBBLE_Y 49
00136 #define WHITE_BUBBLE_SIZE_X 7
00137 #define WHITE_BUBBLE_SIZE_Y 7
00138
00139 #define PROGRESS_BLOCK_BWHITE_X 118
00140 #define PROGRESS_BLOCK_BWHITE_Y 22
00141 #define PROGRESS_BLOCK_BWHITE_SIZE_X 19
00142 #define PROGRESS_BLOCK_BWHITE_SIZE_Y 36
00143
00144 #define PROGRESS_BLOCK_WHITE_X 138
00145 #define PROGRESS_BLOCK_WHITE_Y 22
00146 #define PROGRESS_BLOCK_WHITE_SIZE_X 19
00147 #define PROGRESS_BLOCK_WHITE_SIZE_Y 36
00148
00149 #define PROGRESS_BLOCK_BLACK_X 159
00150 #define PROGRESS_BLOCK_BLACK_Y 22
00151 #define PROGRESS_BLOCK_BLACK_SIZE_X 19
00152 #define PROGRESS_BLOCK_BLACK_SIZE_Y 36
00153
00154
00155 #define WHITE_BRUSH_X 1
00156 #define LGRAY_BRUSH_X 28
00157 #define DGRAY_BRUSH_X 55
00158 #define BLACK_BRUSH_X 82
00159 #define BRUSH_Y 49
00160
00161 #define MAX_BRUSH_SIZE 6
00162
00163
00164 #define WHITE 0
00165 #define LIGHT_GRAY 1
00166 #define DARK_GRAY 2
00167 #define BLACK 3
00168
00169 #define PIXELBUFSIZE 25
00170
00171 struct coordinates
00172 {
00173 u16 x1;
00174 u16 y1;
00175 u16 x2;
00176 u16 y2;
00177 };
00178
00179 struct point_info
00180 {
00181 unsigned short x;
00182 unsigned short y;
00183 unsigned char size;
00184 unsigned char color;
00185 unsigned char pen_down;
00186 };
00187
00188 struct transfer_buffer
00189 {
00190 unsigned int count;
00191 struct point_info point_list [PIXELBUFSIZE];
00192 };
00193
00194 struct display_update_info
00195 {
00196 int waveform;
00197 int sequence;
00198 };
00199
00200
00201 struct brush_draw_info_obsolete
00202 {
00203 unsigned short x;
00204 unsigned short y;
00205 unsigned int size;
00206 unsigned short color;
00207 };
00208
00209
00210 struct brush_draw_info
00211 {
00212 unsigned short sourcex;
00213 unsigned short sourcey;
00214 unsigned short sizex;
00215 unsigned short sizey;
00216 unsigned short destx;
00217 unsigned short desty;
00218 unsigned short brushlsb;
00219 };
00220
00221
00222
00223
00224 #define LOWEST_LEVEL 0
00225 #define MAIN_WINDOW_EXPOSE_LEVEL 1
00226 #define MOZEMBED_UPDATE_LEVEL 2
00227
00228 #define DM_QUALITY_FULL 0
00229 #define DM_QUALITY_TYPING 2
00230
00239 gboolean display_update_request_screen_refresh(int level, gpointer data);
00240
00249 void display_update_increase_level(int level);
00250
00251 #endif //__PAGEBAR_DISPLAYUPDATE_H__
00252
00253
00254
00255