From 2028a87a942f2c3694acab3b43088ade04610940 Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Sat, 6 Aug 2005 03:32:41 +0000 Subject: [PATCH] Added some new bitmaps --- src/guielements.h | 106 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/src/guielements.h b/src/guielements.h index 0efee73..31d07f3 100644 --- a/src/guielements.h +++ b/src/guielements.h @@ -13,8 +13,23 @@ extern "C" { #endif +// Okay, this is ugly but works and I can't think of any better way to handle this. So what +// we do when we pass the GIMP bitmaps into a function is pass them as a (void *) and then +// cast them as type (Bitmap *) in order to use them. Yes, it's ugly. Come up with something +// better! + +struct Bitmap { + unsigned int width; + unsigned int height; + unsigned int bytesPerPixel; // 3:RGB, 4:RGBA + unsigned char pixelData[]; +}; + //NOTE: 32-bit pixels are in the format of ABGR... // This may not be endian safe... Mac users? +//Using the GIMP C style bitmap is portable in that it's specified in bytes +//but we can cast it in uint32s and thus it will display correctly regardless of +//the underlying endianess. At least, in theory. ;-) uint32 mousePic[] = { 6, 8, @@ -74,6 +89,51 @@ uint32 downArrowBox[] = { 0xFFBD8400,0xFFBD8400,0xFFBD8400,0xFFBD8400,0xFFBD8400,0xFFBD8400,0xFFBD8400,0xFFBD8400 // ........ }; +/* GIMP RGBA C-Source image dump (unlit button (16x16).png.c) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned char pixel_data[16 * 16 * 4 + 1]; +} pbUp = { + 16, 16, 4, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\26\26\26\40`__\203\205rr\305\216mm\344\205" + "cc\345kWW\306@??\202\16\16\16\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\2\2\2\4nll\205\277\217\217\372\251LL\377\23588\377\23155\377\227" + "22\377\22600\377\22477\377\204UU\371>;;\203\1\1\1\3\0\0\0\0\0\0\0\0\0\0\0" + "\0\2\2\2\4\225\215\215\260\271hh\377\234==\377\22499\377\22366\377\22233" + "\377\22111\377\221//\377\220--\377\221,,\377\213==\377SJJ\254\1\1\1\4\0\0" + "\0\0\0\0\0\0omm\205\271hh\377\231==\377\224::\377\22377\377\22344\377\223" + "22\377\22100\377\220..\377\220--\377\220,,\377\220++\377\213<<\377=;;\204" + "\0\0\0\0\27\27\27\"\301\220\220\372\234==\377\224::\377\22388\377\22555\377" + "\22533\377\22411\377\223//\377\222--\377\220,,\377\220++\377\221**\377\222" + "**\377\204RR\372\16\16\16\37baa\205\252MM\377\224::\377\22377\377\22655\377" + "\22433\377\22111\377\216//\377\214..\377\214,,\377\217++\377\221++\377\221" + "**\377\224**\377\22422\377=<<\203\207tt\307\23599\377\22366\377\22355\377" + "\22533\377\22111\377\215//\377\213..\377\213--\377\212,,\377\212++\377\221" + "**\377\222**\377\226**\377\227**\377dNN\306\222oo\344\23155\377\22244\377" + "\22322\377\22411\377\216//\377\213..\377\213--\377\212,,\377\212++\377\212" + "**\377\220**\377\223**\377\230))\377\231**\377xTT\345\210ff\345\23033\377" + "\22111\377\22100\377\223//\377\215..\377\213--\377\212,,\377\212++\377\212" + "**\377\212**\377\221**\377\224))\377\232))\377\233))\377yTT\344lYY\304\230" + "11\377\221//\377\220..\377\222--\377\215,,\377\212,,\377\212++\377\212**" + "\377\212**\377\211**\377\224))\377\226))\377\235))\377\235**\377dNN\305?" + ">>\177\230;;\377\220..\377\220--\377\220,,\377\217++\377\212++\377\212**" + "\377\212**\377\212**\377\222))\377\225))\377\234))\377\237))\377\23455\377" + ";;;\200\15\15\15\34\207YY\367\222--\377\220,,\377\220++\377\221++\377\222" + "**\377\220**\377\221**\377\224))\377\224))\377\232))\377\237))\377\237**" + "\377\211UU\367\14\14\14\34\0\0\0\0:88{\221CC\377\220++\377\221++\377\221" + "**\377\222**\377\223**\377\224))\377\226))\377\234))\377\237))\377\237))" + "\377\232AA\377988{\0\0\0\0\0\0\0\0\1\1\1\2NGG\243\221CC\377\223++\377\224" + "**\377\226**\377\227))\377\232))\377\235))\377\236))\377\237**\377\232BB" + "\377OGG\244\1\1\1\2\0\0\0\0\0\0\0\0\0\0\0\0\1\1\1\2""766w\204WW\365\2279" + "9\377\231,,\377\231**\377\233**\377\236++\377\23388\377\207VV\365766w\1\1" + "\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\12\12\30""777w]M" + "M\272rSS\330sSS\330]MM\270777w\12\12\12\30\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0", +}; + uint32 pushButtonUp[] = { 8, 8, @@ -98,6 +158,52 @@ uint8 pbuAlpha[] = { 0xFF, 0xF2, 0xC0, 0xAD, 0xAD, 0xC0, 0xF2, 0xFF }; +/* GIMP RGBA C-Source image dump (Lit Button (16x16).png.c) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned char pixel_data[16 * 16 * 4 + 1]; +} pbDown = { + 16, 16, 4, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\261\261\261\36\276\276\276\200\272\272\272" + "\302\255\255\255\343\236\236\236\343\214\214\214\302~~~\177uuu\35\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\223\223\223\3\332\332\332\200\353" + "\353\353\371\347\323\323\377\321\224\224\377\303rr\377\274jj\377\263uu\377" + "\237\212\212\377\205\205\205\370xxx\177ccc\3\0\0\0\0\0\0\0\0\0\0\0\0\236" + "\236\236\3\345\345\345\252\371\362\362\377\326\203\203\377\325BB\377\353" + "DD\377\365DD\377\365CC\377\351>>\377\31777\377\251TT\377\210\200\200\377" + "yyy\250```\3\0\0\0\0\0\0\0\0\333\333\333\200\371\362\362\377\320cc\377\356" + "GG\377\371HH\377\366FF\377\363CC\377\363BB\377\365AA\377\367@@\377\351<<" + "\377\257@@\377\203{{\377www\177\0\0\0\0\261\261\261\36\354\354\354\370\326" + "\204\204\377\356GG\377\370HH\377\362EE\377\351BB\377\340>>\377\337==\377" + "\347>>\377\357??\377\366??\377\352;;\377\242LL\377{{{\370sss\35\300\300\300" + "\200\350\324\324\377\326BB\377\371HH\377\362EE\377\341@@\377\324<<\377\326" + "<<\377\325;;\377\32199\377\335;;\377\360>>\377\370??\377\32033\377\205pp" + "\377xxx\177\274\274\274\302\322\225\225\377\353DD\377\366FF\377\351BB\377" + "\324<<\377\331==\377\335>>\377\335==\377\330;;\377\32088\377\347<<\377\365" + ">>\377\353::\377\225UU\377xxx\303\260\260\260\343\305tt\377\366EE\377\363" + "DD\377\340>>\377\326<<\377\335>>\377\342??\377\342>>\377\334<<\377\32388" + "\377\33599\377\363>>\377\371==\377\237II\377yyy\343\237\237\237\343\275l" + "l\377\365CC\377\363BB\377\337==\377\325;;\377\335==\377\342>>\377\342>>\377" + "\334<<\377\32388\377\33699\377\364>>\377\372==\377\240II\377yyy\343\216\216" + "\216\303\264vv\377\352??\377\365AA\377\347>>\377\32199\377\330;;\377\334" + "<<\377\334<<\377\327::\377\31777\377\350;;\377\371>>\377\357;;\377\227UU" + "\377xxx\302~~~\200\240\214\214\377\32188\377\367@@\377\357??\377\335;;\377" + "\32088\377\32388\377\32388\377\31777\377\33799\377\362==\377\376>>\377\326" + "55\377\204nn\377www\177vvv\34\205\205\205\370\253UU\377\353==\377\366??\377" + "\360>>\377\347<<\377\33599\377\33699\377\350;;\377\362==\377\375>>\377\362" + ";;\377\246HH\377zzz\370rrr\36\0\0\0\0xxx\177\210\200\200\377\261AA\377\353" + "==\377\370??\377\365>>\377\363>>\377\364>>\377\370>>\377\376>>\377\362<<" + "\377\266<<\377~uu\377www\177\0\0\0\0\0\0\0\0ddd\3yyy\250\203{{\377\243MM" + "\377\32155\377\354<<\377\371>>\377\372>>\377\357;;\377\32755\377\246HH\377" + "~uu\377xxx\250___\3\0\0\0\0\0\0\0\0\0\0\0\0hhh\3www\177{{{\370\205pp\377" + "\225UU\377\237JJ\377\240JJ\377\227UU\377\204nn\377zzz\370www\177```\3\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ttt\35www\200xxx\303yyy\343y" + "yy\343xxx\303xxx\177sss\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", +}; + uint32 pushButtonDown[] = { 8, 8, -- 2.37.2