Mercurial > emacs
annotate admin/charsets/big5.awk @ 107887:948294352a25
Don't redraw lucid menus more than needed. Use double buffer to reduce flicker.
* xlwmenu.c: Include Shell.h, remove duplicate declaration of
XlwMenuRedisplay.
(display_menu_item): Replace ws->window with ws->pixmap, remove
call to XftDrawRect.
(display_menu): Remove this and that argument. Remove
just_compute_this_one_p. Fill pixmap at start and copy it to window
at end.
(expose_cb): New function.
(make_windows_if_needed): Replace XCreateWindow with XtCreatePopup.
Add eventhandler for expose to expose_cb. Remove creation of
xft_draw.
(create_pixmap_for_menu): New function.
(remap_menubar): Pop down menus that aren't the same as in old_stack.
Set width, heigh, x, y on widget with XtVaSetValues. Call
create_pixmap_for_menu.
Replace XUnmapWindow with XtPopdown.
Remowe two last parameters to display_menu.
(map_event_to_widget_value, XlwMenuRedisplay, Key, Select)
(pop_up_menu): Remowe two last parameters to display_menu.
(XlwMenuRealize): Call create_pixmap_for_menu, set w and pixmap.
Remove call to XftDrawCreate.
(XlwMenuDestroy): Free pixmap. Call XtDestroyWidget instead of
XDestroyWindow.
(handle_motion_event): Only call handle_single_motion_event once.
* xlwmenuP.h (window_state): Add pixmap and w.
author | Jan D <jan.h.d@swipnet.se> |
---|---|
date | Sat, 17 Apr 2010 19:49:18 +0200 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
rev | line source |
---|---|
106815 | 1 # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
91411
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
2 # National Institute of Advanced Industrial Science and Technology (AIST) |
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
3 # Registration Number H13PRO009 |
94832
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91411
diff
changeset
|
4 |
91411
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
5 # This file is part of GNU Emacs. |
94832
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91411
diff
changeset
|
6 |
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91411
diff
changeset
|
7 # GNU Emacs is free software: you can redistribute it and/or modify |
91411
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
8 # it under the terms of the GNU General Public License as published by |
94832
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91411
diff
changeset
|
9 # the Free Software Foundation, either version 3 of the License, or |
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91411
diff
changeset
|
10 # (at your option) any later version. |
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91411
diff
changeset
|
11 |
91411
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
12 # GNU Emacs is distributed in the hope that it will be useful, |
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
15 # GNU General Public License for more details. |
94832
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91411
diff
changeset
|
16 |
91411
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
17 # You should have received a copy of the GNU General Public License |
94832
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91411
diff
changeset
|
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
91411
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
19 |
88123 | 20 BEGIN { |
21 tohex["A"] = 10; | |
22 tohex["B"] = 11; | |
23 tohex["C"] = 12; | |
24 tohex["D"] = 13; | |
25 tohex["E"] = 14; | |
26 tohex["F"] = 15; | |
27 tohex["a"] = 10; | |
28 tohex["b"] = 11; | |
29 tohex["c"] = 12; | |
30 tohex["d"] = 13; | |
31 tohex["e"] = 14; | |
32 tohex["f"] = 15; | |
33 } | |
34 | |
35 function decode_hex(str) { | |
36 n = 0; | |
37 len = length(str); | |
38 for (i = 1; i <= len; i++) | |
39 { | |
40 c = substr (str, i, 1); | |
41 if (c >= "0" && c <= "9") | |
42 n = n * 16 + (c - "0"); | |
43 else | |
44 n = n * 16 + tohex[c]; | |
45 } | |
46 return n; | |
47 } | |
48 | |
49 function decode_big5(big5) { | |
50 b0 = int(big5 / 256); | |
51 b1 = big5 % 256; | |
52 # (0xFF - 0xA1 + 0x7F - 0x40) = 157 | |
53 # (0xA1 - (0x7F - 0x40)) = 98 | |
54 # (0xC9 - 0xA1) * (0xFF - 0xA1 + 0x7F - 0x40) = 6280 | |
55 if (b1 < 127) | |
56 idx = (b0 - 161) * 157 + (b1 - 64); | |
57 else | |
58 idx = (b0 - 161) * 157 + (b1 - 98); | |
59 if (b0 >= 201) | |
60 idx -= 6280; | |
61 b0 = int(idx / 94) + 33; | |
62 b1 = (idx % 94) + 33; | |
63 return (b0 * 256 + b1) | |
64 } | |
65 | |
66 { | |
67 big5 = decode_hex($1); | |
68 code = decode_big5(big5); | |
69 printf "0x%04X %s\n", code, $2; | |
70 } | |
71 | |
91411
ebb1b38229bc
Add copyright and license notice.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
72 |
89916
e0e4e6a0599f
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
88123
diff
changeset
|
73 # arch-tag: 36f08d21-0d24-4b67-852d-a9a51299586d |