aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2005-11-16 05:49:18 +0000
committerChong Yidong2005-11-16 05:49:18 +0000
commit786a43d6cf102c185b05a31c10fba6b62b21511a (patch)
treee86798e3e8e287214932fe2bd4171c2f79867a01 /src
parent496f36c064a146b0d43a6ffc6ff1c7425cb5254b (diff)
downloademacs-786a43d6cf102c185b05a31c10fba6b62b21511a.tar.gz
emacs-786a43d6cf102c185b05a31c10fba6b62b21511a.zip
* gnu.h (gnu_bits): Xpm version of the new Emacs icon.
* xterm.c (x_bitmap_icon): Use the xpm if available. * image.c (x_create_bitmap_from_xpm_data): New function.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/gnu.h121
-rw-r--r--src/image.c34
-rw-r--r--src/xterm.c5
4 files changed, 166 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9bbd31ecc9f..87262721177 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12005-11-16 Chong Yidong <cyd@stupidchicken.com>
2
3 * gnu.h (gnu_bits): Xpm version of the new Emacs icon.
4
5 * xterm.c (x_bitmap_icon): Use the xpm if available.
6
7 * image.c (x_create_bitmap_from_xpm_data): New function.
8
12005-11-15 Luc Teirlinck <teirllm@auburn.edu> 92005-11-15 Luc Teirlinck <teirllm@auburn.edu>
2 10
3 * Makefile.in (lisp, shortlisp): Add rfn-eshadow. 11 * Makefile.in (lisp, shortlisp): Add rfn-eshadow.
diff --git a/src/gnu.h b/src/gnu.h
index 1d623431af8..9b2428c441d 100644
--- a/src/gnu.h
+++ b/src/gnu.h
@@ -1,3 +1,118 @@
1#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
2static char * gnu_bits[] = {
3"16 16 95 2",
4" c None",
5". c #686482",
6"+ c #615C79",
7"@ c #5F5B76",
8"# c #68647D",
9"$ c #757186",
10"% c #787589",
11"& c #726E84",
12"* c #68647E",
13"= c #676280",
14"- c #C3C1CC",
15"; c #B7B4C6",
16"> c #9893B1",
17", c #A5A1BA",
18"' c #E5E4EB",
19") c #FFFFFF",
20"! c #F2F1F5",
21"~ c #BEBBCE",
22"{ c #8E8AA6",
23"] c #6D6882",
24"^ c #5F5B77",
25"/ c #B7B4C5",
26"( c #938FAB",
27"_ c #A7A4BB",
28": c #F9F8F9",
29"< c #D0CEDA",
30"[ c #9995B0",
31"} c #8984A0",
32"| c #5D5974",
33"1 c #8E8AA5",
34"2 c #D5D3DD",
35"3 c #BFBDCD",
36"4 c #5C5873",
37"5 c #8985A0",
38"6 c #9F9CB1",
39"7 c #F8F7F9",
40"8 c #AEABBD",
41"9 c #5B5772",
42"0 c #85819A",
43"a c #9491A6",
44"b c #E1E0E5",
45"c c #F7F7F9",
46"d c #B3B1C0",
47"e c #8D89A1",
48"f c #5A5670",
49"g c #817D95",
50"h c #89859B",
51"i c #D8D7DE",
52"j c #EFEFF1",
53"k c #C8C6D1",
54"l c #58546D",
55"m c #7C798E",
56"n c #E6E5E9",
57"o c #F7F6F8",
58"p c #B5B3BF",
59"q c #56526B",
60"r c #DFDEE3",
61"s c #AAA8B5",
62"t c #545068",
63"u c #504D64",
64"v c #A7A6B1",
65"w c #F4F4F5",
66"x c #7C7A8B",
67"y c #514E65",
68"z c #4A475D",
69"A c #555267",
70"B c #BBBAC2",
71"C c #D2D1D6",
72"D c #777586",
73"E c #4E4B62",
74"F c #444156",
75"G c #5B586B",
76"H c #D0CFD5",
77"I c #5B596B",
78"J c #4B485E",
79"K c #423F53",
80"L c #3F3C4F",
81"M c #DBDADE",
82"N c #F3F3F4",
83"O c #636170",
84"P c #464357",
85"Q c #48455A",
86"R c #3F3C4E",
87"S c #3A3748",
88"T c #53505F",
89"U c #9D9BA4",
90"V c #F3F2F4",
91"W c #908F9A",
92"X c #423F52",
93"Y c #454256",
94"Z c #524F62",
95"` c #6B6879",
96" . c #7D7B8B",
97".. c #9D9AA8",
98"+. c #9694A2",
99" . + @ @ @ # $ % % % & * . ",
100" = - ; > , ' ) ) ) ! ~ > { ] = ",
101" ^ / ( _ : ) ) ) < [ ( ( ( } ^ ",
102" | 1 1 2 ) ) ) 3 1 1 1 1 1 1 | ",
103" 4 5 5 6 7 ) ) 8 5 5 5 5 5 5 4 ",
104" 9 0 0 0 a b ) c d e 0 0 0 0 9 ",
105" f g g h i ) ) ) j k g g g g f ",
106" l m m n ) ) o p m m m m m m l ",
107" q q q r ) ) s q q q q q q q q ",
108" t u u u v w w x u u u u u u t ",
109" y z z z z A B ) C D z z z z y ",
110" E F F F F F F G H ) H I F F E ",
111" J K L L L L L L L M ) N O K J ",
112" P Q R S S S S T U V ) ) W Q P ",
113" X Y Y Y Y Z ` ...+.` Y X ",
114" "};
115#else
1#define gnu_width 50 116#define gnu_width 50
2#define gnu_height 50 117#define gnu_height 50
3static unsigned char gnu_bits[] = { 118static unsigned char gnu_bits[] = {
@@ -13,8 +128,8 @@ static unsigned char gnu_bits[] = {
13 0xc7, 0xe3, 0x1f, 0x00, 0x10, 0xf1, 0xd8, 0x01, 0x05, 0x3c, 0x00, 0x10, 128 0xc7, 0xe3, 0x1f, 0x00, 0x10, 0xf1, 0xd8, 0x01, 0x05, 0x3c, 0x00, 0x10,
14 0x83, 0x6c, 0x00, 0x1a, 0x40, 0x00, 0x10, 0x66, 0x36, 0x54, 0xd5, 0xff, 129 0x83, 0x6c, 0x00, 0x1a, 0x40, 0x00, 0x10, 0x66, 0x36, 0x54, 0xd5, 0xff,
15 0x00, 0x30, 0x3c, 0xdb, 0xab, 0x3a, 0x2a, 0x00, 0x60, 0x80, 0xe9, 0x54, 130 0x00, 0x30, 0x3c, 0xdb, 0xab, 0x3a, 0x2a, 0x00, 0x60, 0x80, 0xe9, 0x54,
16 0x35, 0x00, 0x00, 0xe0, 0xe0, 0x6c, 0xb9, 0x6a, 0x00, 0x00, 0x80, 0x37, 131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
17 0xb6, 0x66, 0x75, 0x00, 0x00, 0x00, 0x0f, 0xb6, 0xb4, 0x6a, 0x00, 0x00, 132 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
18 0x00, 0x06, 0xb3, 0x77, 0x75, 0x00, 0x00, 0x00, 0xe1, 0x19, 0xa7, 0x6a, 133 0x00, 0x06, 0xb3, 0x77, 0x75, 0x00, 0x00, 0x00, 0xe1, 0x19, 0xa7, 0x6a,
19 0x00, 0x00, 0xc0, 0xff, 0x19, 0x48, 0xf5, 0x00, 0x00, 0x40, 0x75, 0x15, 134 0x00, 0x00, 0xc0, 0xff, 0x19, 0x48, 0xf5, 0x00, 0x00, 0x40, 0x75, 0x15,
20 0xaf, 0xea, 0x00, 0x00, 0x00, 0x70, 0x35, 0x66, 0xd5, 0x00, 0x00, 0x00, 135 0xaf, 0xea, 0x00, 0x00, 0x00, 0x70, 0x35, 0x66, 0xd5, 0x00, 0x00, 0x00,
@@ -32,5 +147,7 @@ static unsigned char gnu_bits[] = {
32 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 147 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33 0x00, 0x00}; 148 0x00, 0x00};
34 149
150#endif
151
35/* arch-tag: b57020c7-c937-4d77-8ca6-3875178d9828 152/* arch-tag: b57020c7-c937-4d77-8ca6-3875178d9828
36 (do not change this comment) */ 153 (do not change this comment) */
diff --git a/src/image.c b/src/image.c
index 08d2a9f9813..aec66eb3cb8 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3716,6 +3716,40 @@ xpm_image_p (object)
3716 3716
3717#endif /* HAVE_XPM || MAC_OS */ 3717#endif /* HAVE_XPM || MAC_OS */
3718 3718
3719#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
3720int
3721x_create_bitmap_from_xpm_data (f, bits)
3722 struct frame *f;
3723 char **bits;
3724{
3725 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
3726 int id, rc;
3727 XpmAttributes attrs;
3728 Pixmap bitmap, mask;
3729
3730 bzero (&attrs, sizeof attrs);
3731
3732 rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
3733 bits, &bitmap, &mask, &attrs);
3734 if (rc != XpmSuccess)
3735 return -1;
3736
3737 id = x_allocate_bitmap_record (f);
3738
3739 dpyinfo->bitmaps[id - 1].pixmap = bitmap;
3740 dpyinfo->bitmaps[id - 1].have_mask = 1;
3741 dpyinfo->bitmaps[id - 1].mask = mask;
3742 dpyinfo->bitmaps[id - 1].file = NULL;
3743 dpyinfo->bitmaps[id - 1].height = attrs.height;
3744 dpyinfo->bitmaps[id - 1].width = attrs.width;
3745 dpyinfo->bitmaps[id - 1].depth = attrs.depth;
3746 dpyinfo->bitmaps[id - 1].refcount = 1;
3747
3748 XpmFreeAttributes (&attrs);
3749 return id;
3750}
3751#endif /* HAVE_X_WINDOWS */
3752
3719/* Load image IMG which will be displayed on frame F. Value is 3753/* Load image IMG which will be displayed on frame F. Value is
3720 non-zero if successful. */ 3754 non-zero if successful. */
3721 3755
diff --git a/src/xterm.c b/src/xterm.c
index 74fdd375364..8359cec0112 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7362,9 +7362,14 @@ x_bitmap_icon (f, file)
7362 /* Create the GNU bitmap and mask if necessary. */ 7362 /* Create the GNU bitmap and mask if necessary. */
7363 if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0) 7363 if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0)
7364 { 7364 {
7365#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
7366 FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id
7367 = x_create_bitmap_from_xpm_data (f, gnu_bits);
7368#else
7365 FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id 7369 FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id
7366 = x_create_bitmap_from_data (f, gnu_bits, 7370 = x_create_bitmap_from_data (f, gnu_bits,
7367 gnu_width, gnu_height); 7371 gnu_width, gnu_height);
7372#endif /* (HAVE_XPM) && defined (HAVE_X_WINDOWS) */
7368 x_create_bitmap_mask (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id); 7373 x_create_bitmap_mask (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
7369 } 7374 }
7370 7375