122 |
#define SET_FUNCTION(rop2) { if (rop2 != ROP2_COPY) XSetFunction(display, gc, rop2_map[rop2]); } |
#define SET_FUNCTION(rop2) { if (rop2 != ROP2_COPY) XSetFunction(display, gc, rop2_map[rop2]); } |
123 |
#define RESET_FUNCTION(rop2) { if (rop2 != ROP2_COPY) XSetFunction(display, gc, GXcopy); } |
#define RESET_FUNCTION(rop2) { if (rop2 != ROP2_COPY) XSetFunction(display, gc, GXcopy); } |
124 |
|
|
125 |
void |
static void |
126 |
mwm_hide_decorations(void) |
mwm_hide_decorations(void) |
127 |
{ |
{ |
128 |
PropMotifWmHints motif_hints; |
PropMotifWmHints motif_hints; |
144 |
(unsigned char *) &motif_hints, PROP_MOTIF_WM_HINTS_ELEMENTS); |
(unsigned char *) &motif_hints, PROP_MOTIF_WM_HINTS_ELEMENTS); |
145 |
} |
} |
146 |
|
|
147 |
PixelColour |
static PixelColour |
148 |
split_colour15(uint32 colour) |
split_colour15(uint32 colour) |
149 |
{ |
{ |
150 |
PixelColour rv; |
PixelColour rv; |
157 |
return rv; |
return rv; |
158 |
} |
} |
159 |
|
|
160 |
PixelColour |
static PixelColour |
161 |
split_colour16(uint32 colour) |
split_colour16(uint32 colour) |
162 |
{ |
{ |
163 |
PixelColour rv; |
PixelColour rv; |
170 |
return rv; |
return rv; |
171 |
} |
} |
172 |
|
|
173 |
PixelColour |
static PixelColour |
174 |
split_colour24(uint32 colour) |
split_colour24(uint32 colour) |
175 |
{ |
{ |
176 |
PixelColour rv; |
PixelColour rv; |
180 |
return rv; |
return rv; |
181 |
} |
} |
182 |
|
|
183 |
uint32 make_colour16(PixelColour pc) |
static uint32 |
184 |
|
make_colour16(PixelColour pc) |
185 |
{ |
{ |
186 |
pc.red = (pc.red * 0x1f) / 0xff; |
pc.red = (pc.red * 0x1f) / 0xff; |
187 |
pc.green = (pc.green * 0x3f) / 0xff; |
pc.green = (pc.green * 0x3f) / 0xff; |
189 |
return (pc.red << 11) | (pc.green << 5) | pc.blue; |
return (pc.red << 11) | (pc.green << 5) | pc.blue; |
190 |
} |
} |
191 |
|
|
192 |
uint32 make_colour24(PixelColour pc) |
static uint32 |
193 |
|
make_colour24(PixelColour pc) |
194 |
{ |
{ |
195 |
return (pc.red << 16) | (pc.green << 8) | pc.blue; |
return (pc.red << 16) | (pc.green << 8) | pc.blue; |
196 |
} |
} |
197 |
|
|
198 |
uint32 make_colour32(PixelColour pc) |
static uint32 |
199 |
|
make_colour32(PixelColour pc) |
200 |
{ |
{ |
201 |
return (pc.red << 16) | (pc.green << 8) | pc.blue; |
return (pc.red << 16) | (pc.green << 8) | pc.blue; |
202 |
} |
} |
429 |
switch (bpp) |
switch (bpp) |
430 |
{ |
{ |
431 |
case 32: |
case 32: |
432 |
translate16to32((uint16 *) data, (uint32 *) out, (uint32 *) end); |
translate16to32((uint16 *) data, (uint32 *) out, |
433 |
|
(uint32 *) end); |
434 |
break; |
break; |
435 |
case 24: |
case 24: |
436 |
translate16to24((uint16 *) data, out, end); |
translate16to24((uint16 *) data, out, end); |
437 |
break; |
break; |
438 |
case 16: |
case 16: |
439 |
translate16to16((uint16 *) data, (uint16 *) out, (uint16 *) end); |
translate16to16((uint16 *) data, (uint16 *) out, |
440 |
|
(uint16 *) end); |
441 |
break; |
break; |
442 |
} |
} |
443 |
break; |
break; |
445 |
switch (bpp) |
switch (bpp) |
446 |
{ |
{ |
447 |
case 32: |
case 32: |
448 |
translate15to32((uint16 *) data, (uint32 *) out, (uint32 *) end); |
translate15to32((uint16 *) data, (uint32 *) out, |
449 |
|
(uint32 *) end); |
450 |
break; |
break; |
451 |
case 24: |
case 24: |
452 |
translate15to24((uint16 *) data, out, end); |
translate15to24((uint16 *) data, out, end); |
453 |
break; |
break; |
454 |
case 16: |
case 16: |
455 |
translate15to16((uint16 *) data, (uint16 *) out, (uint16 *) end); |
translate15to16((uint16 *) data, (uint16 *) out, |
456 |
|
(uint16 *) end); |
457 |
break; |
break; |
458 |
} |
} |
459 |
break; |
break; |