From 59480bbb2b41ba36ae52fbd2ec409ad8399552b1 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 7 Sep 2013 18:48:34 +0200 Subject: [PATCH] Make XBoard xpm-free The icons in the Engine-Output window were the only pixmaps still in use. They are now replaced by bitmaps, like the checkmark already was. --- nengineoutput.c | 8 +++--- pixmaps/ANALYZING_14.xpm | 23 ------------------- pixmaps/BLACK_14.xpm | 23 ------------------- pixmaps/CLEAR_14.xpm | 23 ------------------- pixmaps/PONDER_14.xpm | 23 ------------------- pixmaps/THINKING_14.xpm | 23 ------------------- pixmaps/UNKNOWN_14.xpm | 23 ------------------- pixmaps/WHITE_14.xpm | 23 ------------------- xaw/xengineoutput.c | 54 ++++++++++++++++++++++++++++++--------------- 9 files changed, 40 insertions(+), 183 deletions(-) delete mode 100644 pixmaps/ANALYZING_14.xpm delete mode 100644 pixmaps/BLACK_14.xpm delete mode 100644 pixmaps/CLEAR_14.xpm delete mode 100644 pixmaps/PONDER_14.xpm delete mode 100644 pixmaps/THINKING_14.xpm delete mode 100644 pixmaps/UNKNOWN_14.xpm delete mode 100644 pixmaps/WHITE_14.xpm diff --git a/nengineoutput.c b/nengineoutput.c index 76f8eb1..73eebd1 100644 --- a/nengineoutput.c +++ b/nengineoutput.c @@ -74,15 +74,15 @@ int highTextStart[2], highTextEnd[2]; int MemoProc P((Option *opt, int n, int x, int y, char *text, int index)); Option engoutOptions[] = { -{ 0, LL|T2T, 17, NULL, NULL, NULL, NULL, Icon, " " }, -{ 0, L2L|T2T|SAME_ROW, 163, NULL, NULL, NULL, NULL, Label, N_("engine name") }, +{ 0, LL|T2T, 18, NULL, NULL, NULL, NULL, Icon, " " }, +{ 0, L2L|T2T|SAME_ROW, 162, NULL, NULL, NULL, NULL, Label, N_("engine name") }, { 0, T2T|SAME_ROW, 30, NULL, NULL, NULL, NULL, Icon, " " }, { 0, R2R|T2T|SAME_ROW, 188, NULL, NULL, NULL, NULL, Label, N_("move") }, { 0, RR|T2T|SAME_ROW, 80, NULL, NULL, NULL, NULL, Label, N_("NPS") }, {200, T_VSCRL | T_TOP, 500, NULL, (void*) &mem1, "", (char**) MemoProc, TextBox, "" }, { 0, 0, 0, NULL, NULL, "", NULL, Break , "" }, -{ 0, LL|T2T, 17, NULL, NULL, NULL, NULL, Icon, " " }, -{ 0, L2L|T2T|SAME_ROW, 163, NULL, NULL, NULL, NULL, Label, N_("engine name") }, +{ 0, LL|T2T, 18, NULL, NULL, NULL, NULL, Icon, " " }, +{ 0, L2L|T2T|SAME_ROW, 162, NULL, NULL, NULL, NULL, Label, N_("engine name") }, { 0, T2T|SAME_ROW, 30, NULL, NULL, NULL, NULL, Icon, " " }, { 0, R2R|T2T|SAME_ROW, 188, NULL, NULL, NULL, NULL, Label, N_("move") }, { 0, RR|T2T|SAME_ROW, 80, NULL, NULL, NULL, NULL, Label, N_("NPS") }, diff --git a/pixmaps/ANALYZING_14.xpm b/pixmaps/ANALYZING_14.xpm deleted file mode 100644 index b43e871..0000000 --- a/pixmaps/ANALYZING_14.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char *ANALYZE_14[] = { -/* columns rows colors chars-per-pixel */ -"14 14 3 1", -" c white", -"* c black", -". c None", -/* pixels */ -"....... ....", -"..... ... ..", -".... ....... .", -".... .. .... .", -"... .. ..... ", -"... ......... ", -"... ......... ", -".... ....... .", -".... ....... .", -"... . ... ..", -".. . .. ....", -". . ..........", -" ...........", -".............." -}; diff --git a/pixmaps/BLACK_14.xpm b/pixmaps/BLACK_14.xpm deleted file mode 100644 index cab2a1e..0000000 --- a/pixmaps/BLACK_14.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char *BLACK_14[] = { -/* columns rows colors chars-per-pixel */ -"14 14 3 1", -" c white", -"* c black", -". c None", -/* pixels */ -".....****.....", -"...** **...", -"..* *..", -".* *.", -".* *.", -"* *", -"* *", -"* *", -"* *", -".* *.", -".* *.", -"..* *..", -"...** **...", -".....****....." -}; diff --git a/pixmaps/CLEAR_14.xpm b/pixmaps/CLEAR_14.xpm deleted file mode 100644 index 68a0efd..0000000 --- a/pixmaps/CLEAR_14.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char *CLEAR_14[] = { -/* columns rows colors chars-per-pixel */ -"14 14 3 1", -" c white", -"* c black", -". c None", -/* pixels */ -"..............", -"..............", -"..............", -"..............", -"..............", -"..............", -"..............", -"..............", -"..............", -"..............", -"..............", -"..............", -"..............", -".............." -}; diff --git a/pixmaps/PONDER_14.xpm b/pixmaps/PONDER_14.xpm deleted file mode 100644 index 2f732ab..0000000 --- a/pixmaps/PONDER_14.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char *PONDER_14[] = { -/* columns rows colors chars-per-pixel */ -"14 14 3 1", -" c white", -"* c black", -". c None", -/* pixels */ -".... .. ....", -".. ... .. ..", -". .......... .", -" .......... ..", -" ........... .", -". .......... ", -".. .......... ", -". .......... .", -".. ....... ..", -"... .. .. ...", -".. . .. ....", -". ..........", -" .............", -".............." -}; diff --git a/pixmaps/THINKING_14.xpm b/pixmaps/THINKING_14.xpm deleted file mode 100644 index 4b28f19..0000000 --- a/pixmaps/THINKING_14.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char *THINK_14[] = { -/* columns rows colors chars-per-pixel */ -"14 14 3 1", -" c white", -"* c black", -". c None", -/* pixels */ -"..... ......", -"... ... ....", -".. ... ... ...", -". .... .... ..", -". .... .... ..", -" ..... ..... .", -" .... .. .", -" ..... ..... .", -". ......... ..", -". ......... ..", -".. ....... ...", -"... ... ....", -"..... ......", -".............." -}; diff --git a/pixmaps/UNKNOWN_14.xpm b/pixmaps/UNKNOWN_14.xpm deleted file mode 100644 index 9f4c241..0000000 --- a/pixmaps/UNKNOWN_14.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char *UNKNOWN_14[] = { -/* columns rows colors chars-per-pixel */ -"14 14 3 1", -" c white", -"* c black", -". c None", -/* pixels */ -".....****.....", -"...** **...", -"..* . . *..", -".* . . . . *.", -".* . . . . *.", -"* . . . . . *", -"* . . . . . *", -"* . . . . . *", -"* . . . . . *", -".* . . . . *.", -".* . . . . *.", -"..* . . *..", -"...** **...", -".....****....." -}; diff --git a/pixmaps/WHITE_14.xpm b/pixmaps/WHITE_14.xpm deleted file mode 100644 index 3f13936..0000000 --- a/pixmaps/WHITE_14.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char *WHITE_14[] = { -/* columns rows colors chars-per-pixel */ -"14 14 3 1", -" c white", -"* c black", -". c None", -/* pixels */ -".....****.....", -"...** **...", -"..* .... *..", -".* ........ *.", -".* ........ *.", -"* .......... *", -"* .......... *", -"* .......... *", -"* .......... *", -".* ........ *.", -".* ........ *.", -"..* .... *..", -"...** **...", -".....****....." -}; diff --git a/xaw/xengineoutput.c b/xaw/xengineoutput.c index fb2b565..0ea90a2 100644 --- a/xaw/xengineoutput.c +++ b/xaw/xengineoutput.c @@ -86,14 +86,40 @@ extern char *getenv(); #include -// [HGM] pixmaps of some ICONS used in the engine-outut window -#include "pixmaps/WHITE_14.xpm" -#include "pixmaps/BLACK_14.xpm" -#include "pixmaps/CLEAR_14.xpm" -#include "pixmaps/UNKNOWN_14.xpm" -#include "pixmaps/THINKING_14.xpm" -#include "pixmaps/PONDER_14.xpm" -#include "pixmaps/ANALYZING_14.xpm" +// [HGM] bitmaps of some ICONS used in the engine-outut window + +static unsigned char CLEAR_14[28]; + +static unsigned char WHITE_14[] = { +0xe0, 0x01, 0x18, 0x06, 0x04, 0x08, 0x02, 0x10, 0x02, 0x10, 0x01, 0x20, 0x01, 0x20, +0x01, 0x20, 0x01, 0x20, 0x02, 0x10, 0x02, 0x10, 0x04, 0x08, 0x18, 0x06, 0xe0, 0x01 +}; + +static unsigned char BLACK_14[] = { +0xe0, 0x01, 0xf8, 0x07, 0xfc, 0x0f, 0xfe, 0x1f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f, +0xff, 0x3f, 0xff, 0x3f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfc, 0x0f, 0xf8, 0x07, 0xe0, 0x01 +}; + +static unsigned char ANALYZE_14[] = { +0x80, 0x03, 0x60, 0x0c, 0x10, 0x10, 0x90, 0x10, 0xc8, 0x20, 0x08, 0x20, 0x08, 0x20, +0x10, 0x10, 0x10, 0x10, 0x68, 0x0c, 0x94, 0x03, 0x0a, 0x00, 0x07, 0x00, 0x00, 0x00 +}; + +static unsigned char THINK_14[] = { +0xe0, 0x00, 0x18, 0x03, 0x44, 0x04, 0x42, 0x08, 0x42, 0x08, 0x41, 0x10, 0xe1, 0x13, +0x41, 0x10, 0x02, 0x08, 0x02, 0x08, 0x04, 0x04, 0x18, 0x03, 0xe0, 0x00, 0x00, 0x00 +}; + +static unsigned char PONDER_14[] = { +0x30, 0x03, 0x8c, 0x0c, 0x02, 0x10, 0x01, 0x08, 0x01, 0x10, 0x06, 0x20, 0x04, 0x20, +0x02, 0x10, 0x04, 0x0c, 0xc8, 0x04, 0x34, 0x03, 0x0e, 0x00, 0x01, 0x00, 0x00, 0x00 +}; + +static unsigned char UNKNOWN_14[] = { +0xe0, 0x01, 0x58, 0x07, 0xac, 0x0a, 0x56, 0x15, 0xaa, 0x1a, 0x55, 0x35, 0xab, 0x2a, +0x55, 0x35, 0xab, 0x2a, 0x56, 0x15, 0xaa, 0x1a, 0x54, 0x0d, 0xb8, 0x06, 0xe0, 0x01 +}; + /* Module variables */ @@ -103,17 +129,9 @@ static Widget memoWidget; static void -ReadIcon (char *pixData[], int iconNr, Widget w) +ReadIcon (unsigned char pixData[], int iconNr, Widget w) { - int r; - - if ((r=XpmCreatePixmapFromData(xDisplay, XtWindow(w), - pixData, - &(icons[iconNr]), - NULL, NULL /*&attr*/)) != 0) { - fprintf(stderr, _("Error %d loading icon image\n"), r); - exit(1); - } + icons[iconNr] = XCreateBitmapFromData(xDisplay, XtWindow(w), (char*) pixData, 14, 14); } void -- 1.7.0.4