mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-13 23:27:12 +00:00
devif.h, mnxdefs.h: Update MRegion to reflect that width/height are unsigned. Update ...EventMask fields in XWINDOW section of DspInterfaceRec to match parameter type used in XSelectInput() to which they are passed. Add padding to explicitly align colors field (short among longs) xbitmaps.h: Reorder fields in LISP_CURSOR struct to avoid requiring padding for alignment constraints, and adjust initialization to match. Declare cursors static const. Move Lisp_Icon from xbitmaps.h to xmkicon.c xinit.c, xinitdefs.h Replace bound() (xwinmandefs.h) with static inline unsigned ubound() in xinit.c Change signature of X_init() to use unsigned values for width, height, depth. Add casts where necessary to avoid implicit signedness conversions. Add extern declarations for all globals defined in xinit.c xwinman.c, xwinmandefs.h Remove bound() from xwinmandefs.h and use static inline unsigned ubound() in xwinman.c Change signature of lisp_Xconfigure() to use unsigned width and height parameters. Make GravSize unsigned to match its usage context. Add casts where necessary to avoid implicit signedness conversions. Add missing break to correct switch case fall-through warning. dspif.c Change LispDisplayRequestedWidth/Height to unsigned to reflect context of use. xlspwin.c Eliminate declaration for unused XEvent report. Move global variable gcv, used only locally, to local variable in the procedures where needed. Change various variables used in width/height calculation to unsigned to match usage context. Add casts where necessary to avoid implicit signedness conversions. xmkicon.c Move Lisp_Icon from xbitmaps.h to xmkicon.c. Move global XImage IconImage to local in function where it is required. Add cast where necessary to avoid implicit signedness conversions. xrdopt.c Remove incorrect casts for signedness causing implicit sign conversion warnings. Add extern declarations for all globals defined in xrdopt.c xscroll.c Replace bound() (xwinmandefs.h) with static inline signed sbound() in xscroll.c initdsp.c, initdspdefs.h Change signedness of various display variables from int to unsigned. Change signature of init_display2() to unsigned display_max. Add extern declarations for some globals defined in initdsp.c xbbt.c Add explicit casts for type warnings from MRegion width/height change. Add explicit casts for type warnings in arguments to XPutImage().
340 lines
5.5 KiB
C
340 lines
5.5 KiB
C
#ifndef XBITMAPS_H
|
|
#define XBITMAPS_H 1
|
|
/* $Id: xbitmaps.h,v 1.3 2001/12/24 01:08:58 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */
|
|
|
|
|
|
/************************************************************************/
|
|
/* */
|
|
/* (C) Copyright 1989, 1990, 1990, 1991, 1992, 1993, 1994, 1995 Venue. */
|
|
/* All Rights Reserved. */
|
|
/* Manufactured in the United States of America. */
|
|
/* */
|
|
/************************************************************************/
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
const uint8_t *cuimage; /* the image bitmap */
|
|
const uint8_t *cumask; /* the mask bitmap */
|
|
short cubitsperpixel; /* bits per pixel in the cursor, mostly 1 */
|
|
short cuhotspotx; /* hot-spot X coordinate */
|
|
short cuhotspoty; /* hot-spot Y coordinate */
|
|
short cudata; /* ?? */
|
|
} LISP_CURSOR;
|
|
|
|
static const uint8_t defaultcursor_bitmap[]=
|
|
{
|
|
0x80, 0, 0xc0, 0, 0xe0, 0, 0xf0, 0
|
|
, 0xf8, 0, 0xfc, 0, 0xfe, 0, 0xf0, 0
|
|
, 0xd8, 0, 0x98, 0, 0x0c, 0, 0x0c, 0
|
|
, 0x06, 0, 0x06, 0, 0x03, 0, 0x03, 0
|
|
};
|
|
|
|
static const LISP_CURSOR default_cursor =
|
|
{
|
|
defaultcursor_bitmap
|
|
, defaultcursor_bitmap
|
|
, 1
|
|
, 0
|
|
, 15
|
|
, 0
|
|
};
|
|
|
|
|
|
static const uint8_t waitcursor_bitmap[]=
|
|
{
|
|
0xFF, 0xFE, 0xC0, 0x06, 0x60, 0x1C, 0x3D, 0x78
|
|
, 0x1F, 0xF0, 0x0F, 0xE0, 0x06, 0xC0, 0x03, 0x80
|
|
, 0x02, 0x80, 0x03, 0xC0, 0x0D, 0x60, 0x19, 0x30
|
|
, 0x37, 0xD8, 0x67, 0xEC, 0xFF, 0xFE, 0xFF, 0xFE
|
|
};
|
|
|
|
static const LISP_CURSOR wait_cursor =
|
|
{
|
|
waitcursor_bitmap
|
|
, waitcursor_bitmap
|
|
, 1
|
|
, 7
|
|
, 8
|
|
, 0
|
|
};
|
|
|
|
static const uint8_t horizscrollcursor_bitmap[]={
|
|
0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x08, 0x20
|
|
, 0x18, 0x30
|
|
, 0x38, 0x38
|
|
, 0x78, 0x3C
|
|
, 0xFF, 0xFE
|
|
, 0xFF, 0xFE
|
|
, 0x78, 0x3C
|
|
, 0x38, 0x38
|
|
, 0x18, 0x30
|
|
, 0x08, 0x20
|
|
};
|
|
|
|
static const LISP_CURSOR horizscroll_cursor = {
|
|
horizscrollcursor_bitmap
|
|
, horizscrollcursor_bitmap
|
|
, 1
|
|
, 7
|
|
, 5
|
|
, 0
|
|
};
|
|
|
|
|
|
|
|
static const uint8_t horizthumbcursor_bitmap[]={
|
|
0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x02, 0x00
|
|
, 0x02, 0x00
|
|
, 0x0A, 0x80
|
|
, 0x0A, 0x80
|
|
, 0x0A, 0x80
|
|
, 0x2A, 0xA0
|
|
, 0x2A, 0xA0
|
|
, 0x2A, 0xA0
|
|
, 0xAA, 0xA8
|
|
, 0xAA, 0xA8
|
|
, 0xAA, 0xA8
|
|
, 0xAA, 0xA8
|
|
, 0xAA, 0xA8
|
|
};
|
|
|
|
static const LISP_CURSOR horizthumb_cursor = {
|
|
horizthumbcursor_bitmap
|
|
, horizthumbcursor_bitmap
|
|
, 1
|
|
, 6
|
|
, 8
|
|
, 0
|
|
};
|
|
|
|
|
|
|
|
static const uint8_t scrolldowncursor_bitmap[]={
|
|
0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x1F, 0xF0
|
|
, 0x1F, 0xF0
|
|
, 0x0F, 0xE0
|
|
, 0x0F, 0xE0
|
|
, 0x07, 0xC0
|
|
, 0x07, 0xC0
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x01, 0x00
|
|
};
|
|
|
|
static const LISP_CURSOR scrolldown_cursor = {
|
|
scrolldowncursor_bitmap
|
|
, scrolldowncursor_bitmap
|
|
, 1
|
|
, 7
|
|
, 15
|
|
, 0
|
|
};
|
|
|
|
|
|
|
|
static const uint8_t scrollleftcursor_bitmap[]={
|
|
0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x80
|
|
, 0x03, 0x80
|
|
, 0x0F, 0x80
|
|
, 0x3F, 0x80
|
|
, 0xFF, 0xFF
|
|
, 0xFF, 0xFF
|
|
, 0x3F, 0x80
|
|
, 0x0F, 0x80
|
|
, 0x03, 0x80
|
|
, 0x00, 0x80
|
|
};
|
|
|
|
static const LISP_CURSOR scrollleft_cursor = {
|
|
scrollleftcursor_bitmap
|
|
, scrollleftcursor_bitmap
|
|
, 1
|
|
, 8
|
|
, 5
|
|
, 0
|
|
};
|
|
|
|
|
|
|
|
static const uint8_t scrollrightcursor_bitmap[]={
|
|
0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x00, 0x00
|
|
, 0x01, 0x00
|
|
, 0x01, 0xC0
|
|
, 0x01, 0xF0
|
|
, 0x01, 0xFC
|
|
, 0xFF, 0xFF
|
|
, 0xFF, 0xFF
|
|
, 0x01, 0xFC
|
|
, 0x01, 0xF0
|
|
, 0x01, 0xC0
|
|
, 0x01, 0x00
|
|
};
|
|
|
|
static const LISP_CURSOR scrollright_cursor = {
|
|
scrollrightcursor_bitmap
|
|
, scrollrightcursor_bitmap
|
|
, 1
|
|
, 7
|
|
, 5
|
|
, 0
|
|
};
|
|
|
|
|
|
|
|
static const uint8_t scrollupcursor_bitmap[]={
|
|
0x01, 0x00
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x07, 0xC0
|
|
, 0x07, 0xC0
|
|
, 0x0F, 0xE0
|
|
, 0x0F, 0xE0
|
|
, 0x1F, 0xF0
|
|
, 0x1F, 0xF0
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
};
|
|
|
|
static const LISP_CURSOR scrollup_cursor = {
|
|
scrollupcursor_bitmap
|
|
, scrollupcursor_bitmap
|
|
, 1
|
|
, 7
|
|
, 15
|
|
, 0
|
|
};
|
|
|
|
|
|
|
|
static const uint8_t vertscrollcursor_bitmap[]={
|
|
0x01, 0x00
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x07, 0xC0
|
|
, 0x07, 0xC0
|
|
, 0x0F, 0xE0
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x0F, 0xE0
|
|
, 0x07, 0xC0
|
|
, 0x07, 0xC0
|
|
, 0x03, 0x80
|
|
, 0x03, 0x80
|
|
, 0x01, 0x00
|
|
};
|
|
|
|
static const LISP_CURSOR vertscroll_cursor = {
|
|
vertscrollcursor_bitmap
|
|
, vertscrollcursor_bitmap
|
|
, 1
|
|
, 7
|
|
, 15
|
|
, 0
|
|
};
|
|
|
|
|
|
|
|
static const uint8_t vertthumbcursor_bitmap[]={
|
|
0x00,0x00
|
|
,0x00,0x1f
|
|
,0x00,0x00
|
|
,0x00,0xff
|
|
,0x00,0x00
|
|
,0x07,0xff
|
|
,0x00,0x00
|
|
,0x1f,0xff
|
|
,0x00,0x00
|
|
,0x07,0xff
|
|
,0x00,0x00
|
|
,0x00,0xff
|
|
,0x00,0x00
|
|
,0x00,0x1f
|
|
,0x00,0x00
|
|
,0x00,0x00
|
|
};
|
|
|
|
static const LISP_CURSOR vertthumb_cursor = {
|
|
vertthumbcursor_bitmap
|
|
, vertthumbcursor_bitmap
|
|
, 1
|
|
, 8
|
|
, 8
|
|
, 0
|
|
};
|
|
|
|
static unsigned int check_width = 16;
|
|
static unsigned int check_height = 16;
|
|
|
|
static uint8_t check_bits[] = { 0x88, 0x88,
|
|
0x00, 0x00,
|
|
0x22, 0x22,
|
|
0x00, 0x00,
|
|
0x88, 0x88,
|
|
0x00, 0x00,
|
|
0x22, 0x22,
|
|
0x00, 0x00,
|
|
0x88, 0x88,
|
|
0x00, 0x00,
|
|
0x22, 0x22,
|
|
0x00, 0x00,
|
|
0x88, 0x88,
|
|
0x00, 0x00,
|
|
0x22, 0x22,
|
|
0x00, 0x00 };
|
|
static uint8_t plain_bits[] = { 0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00,
|
|
0x00, 0x00 };
|
|
|
|
#endif /* XBITMAPS_H */
|