9 static int driver_init(
char *title,
int w,
int h,
int depth,
int refresh_rate,
int flags);
36 static void (*
update_mask)(
unsigned char *src,
unsigned char *mask,
int w,
int h);
40 static void update_mask_8(
unsigned char *pixel,
unsigned char *mask,
int w,
int h)
43 unsigned char *
p = pixel;
47 for (x = 0; x < w; x++) {
50 if ((x & 0x7) == 0x7) {
62 static void update_mask_16(
unsigned char *pixel,
unsigned char *mask,
int w,
int h)
65 unsigned short *
p = (
unsigned short *)pixel;
69 for (x = 0; x < w; x++) {
72 if ((x & 0x7) == 0x7) {
84 static void update_mask_32(
unsigned char *pixel,
unsigned char *mask,
int w,
int h)
87 unsigned int *
p = (
unsigned int *)pixel;
91 for (x = 0; x < w; x++) {
94 if ((x & 0x7) == 0x7) {
109 int x = 0, y = 0, h, is_rgb =
FALSE;
135 values.foreground = 1;
136 values.background = 0;
147 display_name = XDisplayName(
NULL);
148 if (((!display_name[0]) || (display_name[0] ==
':') || (!strncmp(display_name,
"unix:", 5))) &&
164 shm_info.shmid = shmget(IPC_PRIVATE,
image->bytes_per_line *
image->height, IPC_CREAT | 0777);
169 shmctl(
shm_info.shmid, IPC_RMID, 0);
170 XDestroyImage(
image);
183 XDestroyImage(
image);
199 }
while ((e.type != UnmapNotify) || (e.xmap.event != w));
222 shmctl(
shm_info.shmid, IPC_RMID, 0);
224 XDestroyImage(
image);
239 for (i = 0; i <
fb_x11.
h; i++) {
250 XShmPutImage(
fb_x11.
display,
fb_x11.
window,
fb_x11.
gc,
image, 0, y, 0, y +
fb_x11.
display_offset,
fb_x11.
w, h, False);
260 static int driver_init(
char *title,
int w,
int h,
int depth_arg,
int refresh_rate,
int flags)
262 int depth =
MAX(8, depth_arg);
269 return fb_hX11Init(title, w, h, depth, refresh_rate, flags);