Index: .travis.yml ================================================================== --- .travis.yml +++ .travis.yml @@ -179,57 +179,35 @@ os: osx osx_image: xcode12 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib CC=clang++ --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include CPPFLAGS=-D__private_extern__=extern" - - name: "macOS/Xcode 12/Shared" - os: osx - osx_image: xcode12 - env: - - BUILD_DIR=unix - - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: &mactest - - make all tktest - name: "macOS/Xcode 12/Static" os: osx osx_image: xcode12 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua --disable-shared CFLAGS=-I/usr/local/opt/tcl-tk/include" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest - name: "macOS/Xcode 12/Debug" os: osx osx_image: xcode12 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua --enable-symbols CFLAGS=-I/usr/local/opt/tcl-tk/include" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest - - name: "macOS/Xcode 12/Shared/XQuartz" - os: osx - osx_image: xcode12 - env: - - BUILD_DIR=unix - - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CFLAGS=-I/usr/local/opt/tcl-tk/include" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest +# - name: "macOS/Xcode 12/Shared/XQuartz" +# os: osx +# osx_image: xcode12 +# env: +# - BUILD_DIR=unix +# - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CFLAGS=-I/usr/local/opt/tcl-tk/include" # Older MacOS versions - name: "macOS/Xcode 11/Shared" os: osx osx_image: xcode11.7 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include CPPFLAGS=-mmacosx-version-min=10.14" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest - name: "macOS/Xcode 10/Shared" os: osx osx_image: xcode10.3 addons: homebrew: @@ -237,13 +215,10 @@ - tcl-tk update: true env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include CPPFLAGS=-mmacosx-version-min=10.14" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest - name: "macOS/Xcode 9/Shared" os: osx osx_image: xcode9.4 addons: homebrew: @@ -251,13 +226,10 @@ - tcl-tk update: true env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include CPPFLAGS=-mmacosx-version-min=10.13" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest # Test on Windows with MSVC native # - name: "Windows/MSVC/Shared" # os: windows # compiler: cl # env: &vcenv Index: doc/keysyms.n ================================================================== --- doc/keysyms.n +++ doc/keysyms.n @@ -10,11 +10,11 @@ keysyms \- keysyms recognized by Tk .BE .SH DESCRIPTION .PP Tk recognizes many keysyms when specifying key bindings (e.g., -.QW "\fBbind\fR \fB. \fR" ). +.QW "\fBbind\fR \fB. <\fR\fIkeysym\fR\fB>\fR" ). The following list enumerates the keysyms that will be recognized by Tk. Note that not all keysyms will be valid on all platforms, and some keysyms are also available on platforms that have a different native name for that key. For example, on Unix systems, the presence @@ -22,25 +22,25 @@ keyboard modifier map. This list shows keysyms along with their decimal and hexadecimal values. .PP .CS space 32 0x20 -exclam 33 0x21 +! (exclam) 33 0x21 quotedbl 34 0x22 numbersign 35 0x23 dollar 36 0x24 -percent 37 0x25 -ampersand 38 0x26 -apostrophe 39 0x27 -parenleft 40 0x28 -parenright 41 0x29 -asterisk 42 0x2A -plus 43 0x2B -comma 44 0x2C +% (percent) 37 0x25 +& (ampersand) 38 0x26 +' (apostrophe) 39 0x27 +( (parenleft) 40 0x28 +) (parenright) 41 0x29 +* (asterisk) 42 0x2A ++ (plus) 43 0x2B +, (comma) 44 0x2C minus 45 0x2D -period 46 0x2E -slash 47 0x2F +. (period) 46 0x2E +/ (slash) 47 0x2F 0 48 0x30 1 49 0x31 2 50 0x32 3 51 0x33 4 52 0x34 @@ -47,17 +47,17 @@ 5 53 0x35 6 54 0x36 7 55 0x37 8 56 0x38 9 57 0x39 -colon 58 0x3A +: (colon) 58 0x3A semicolon 59 0x3B less 60 0x3C -equal 61 0x3D += (equal) 61 0x3D greater 62 0x3E -question 63 0x3F -at 64 0x40 +? (question) 63 0x3F +@ (at) 64 0x40 A 65 0x41 B 66 0x42 C 67 0x43 D 68 0x44 E 69 0x45 @@ -83,13 +83,13 @@ Y 89 0x59 Z 90 0x5A bracketleft 91 0x5B backslash 92 0x5C bracketright 93 0x5D -asciicircum 94 0x5E -underscore 95 0x5F -grave 96 0x60 +^ (asciicircum) 94 0x5E +_ (underscore) 95 0x5F +` (grave) 96 0x60 a 97 0x61 b 98 0x62 c 99 0x63 d 100 0x64 e 101 0x65 @@ -113,109 +113,109 @@ w 119 0x77 x 120 0x78 y 121 0x79 z 122 0x7A braceleft 123 0x7B -bar 124 0x7C +| (bar) 124 0x7C braceright 125 0x7D -asciitilde 126 0x7E +~ (asciitilde) 126 0x7E nobreakspace 160 0xA0 -exclamdown 161 0xA1 -cent 162 0xA2 -sterling 163 0xA3 -currency 164 0xA4 -yen 165 0xA5 -brokenbar 166 0xA6 -section 167 0xA7 -diaeresis 168 0xA8 -copyright 169 0xA9 -ordfeminine 170 0xAA -guillemotleft 171 0xAB -notsign 172 0xAC +\[r!] (exclamdown) 161 0xA1 +\[ct] (cent) 162 0xA2 +\[Po] (sterling) 163 0xA3 +\[Cs] (currency) 164 0xA4 +\[Ye] (yen) 165 0xA5 +\[bb] (brokenbar) 166 0xA6 +\[sc] (section) 167 0xA7 +\[ad] (diaeresis) 168 0xA8 +\[co] (copyright) 169 0xA9 +\[Of] (ordfeminine) 170 0xAA +\[Fo] (guillemotleft) 171 0xAB +\[no] (notsign) 172 0xAC hyphen 173 0xAD -registered 174 0xAE -macron 175 0xAF -degree 176 0xB0 -plusminus 177 0xB1 -twosuperior 178 0xB2 -threesuperior 179 0xB3 -acute 180 0xB4 -mu 181 0xB5 -paragraph 182 0xB6 -periodcentered 183 0xB7 -cedilla 184 0xB8 -onesuperior 185 0xB9 -masculine 186 0xBA -guillemotright 187 0xBB -onequarter 188 0xBC -onehalf 189 0xBD -threequarters 190 0xBE -questiondown 191 0xBF -Agrave 192 0xC0 -Aacute 193 0xC1 -Acircumflex 194 0xC2 -Atilde 195 0xC3 -Adiaeresis 196 0xC4 -Aring 197 0xC5 -AE 198 0xC6 -Ccedilla 199 0xC7 -Egrave 200 0xC8 -Eacute 201 0xC9 -Ecircumflex 202 0xCA -Ediaeresis 203 0xCB -Igrave 204 0xCC -Iacute 205 0xCD -Icircumflex 206 0xCE -Idiaeresis 207 0xCF -ETH 208 0xD0 -Ntilde 209 0xD1 -Ograve 210 0xD2 -Oacute 211 0xD3 -Ocircumflex 212 0xD4 -Otilde 213 0xD5 -Odiaeresis 214 0xD6 -multiply 215 0xD7 -Oslash 216 0xD8 -Ugrave 217 0xD9 -Uacute 218 0xDA -Ucircumflex 219 0xDB -Udiaeresis 220 0xDC -Yacute 221 0xDD -THORN 222 0xDE -ssharp 223 0xDF -agrave 224 0xE0 -aacute 225 0xE1 -acircumflex 226 0xE2 -atilde 227 0xE3 -adiaeresis 228 0xE4 -aring 229 0xE5 -ae 230 0xE6 -ccedilla 231 0xE7 -egrave 232 0xE8 -eacute 233 0xE9 -ecircumflex 234 0xEA -ediaeresis 235 0xEB -igrave 236 0xEC -iacute 237 0xED -icircumflex 238 0xEE -idiaeresis 239 0xEF -eth 240 0xF0 -ntilde 241 0xF1 -ograve 242 0xF2 -oacute 243 0xF3 -ocircumflex 244 0xF4 -otilde 245 0xF5 -odiaeresis 246 0xF6 -division 247 0xF7 -oslash 248 0xF8 -ugrave 249 0xF9 -uacute 250 0xFA -ucircumflex 251 0xFB -udiaeresis 252 0xFC -yacute 253 0xFD -thorn 254 0xFE -ydiaeresis 255 0xFF +\[rg] (registered) 174 0xAE +\[a-] (macron) 175 0xAF +\[de] (degree) 176 0xB0 +\[+-] (plusminus) 177 0xB1 +[S2] (twosuperior) 178 0xB2 +\[S3] (threesuperior) 179 0xB3 +\[aa] (acute) 180 0xB4 +\[mc] (mu) 181 0xB5 +\[ps] (paragraph) 182 0xB6 +\[pc] (periodcentered) 183 0xB7 +\[ac] (cedilla) 184 0xB8 +\[S1] (onesuperior) 185 0xB9 +\[Om] (masculine) 186 0xBA +\[Fc] (guillemotright) 187 0xBB +\[14] (onequarter) 188 0xBC +\[12] (onehalf) 189 0xBD +\[34] (threequarters) 190 0xBE +\[r?] (questiondown) 191 0xBF +\[`A] (Agrave) 192 0xC0 +\['A] (Aacute) 193 0xC1 +\[^A] (Acircumflex) 194 0xC2 +\[~A] (Atilde) 195 0xC3 +\[:A] (Adiaeresis) 196 0xC4 +\[oA] (Aring) 197 0xC5 +\[AE] (AE) 198 0xC6 +\[,C] (Ccedilla) 199 0xC7 +\[`E] (Egrave) 200 0xC8 +\['E] (Eacute) 201 0xC9 +\[^E] (Ecircumflex) 202 0xCA +\[:E] (Ediaeresis) 203 0xCB +\[`I] (Igrave) 204 0xCC +\['I] (Iacute) 205 0xCD +\[^I] (Icircumflex) 206 0xCE +\[:I] (Idiaeresis) 207 0xCF +\[-D] (ETH) 208 0xD0 +\[~N] (Ntilde) 209 0xD1 +\[`O] (Ograve) 210 0xD2 +\['O] (Oacute) 211 0xD3 +\[^O] (Ocircumflex) 212 0xD4 +\[~O] (Otilde) 213 0xD5 +\[:O] (Odiaeresis) 214 0xD6 +\[mu] (multiply) 215 0xD7 +\[/O] (Oslash) 216 0xD8 +\[`U] (Ugrave) 217 0xD9 +\['U] (Uacute) 218 0xDA +\[^U] (Ucircumflex) 219 0xDB +\[:U] (Udiaeresis) 220 0xDC +\['Y] (Yacute) 221 0xDD +\[TP] (THORN) 222 0xDE +\[ss] (ssharp) 223 0xDF +\[`a] (agrave) 224 0xE0 +\['a] (aacute) 225 0xE1 +\[^a] (acircumflex) 226 0xE2 +\[~a] (atilde) 227 0xE3 +\[:a] (adiaeresis) 228 0xE4 +\[oa] (aring) 229 0xE5 +\[ae] (ae) 230 0xE6 +\[,c] (ccedilla) 231 0xE7 +\[`e] (egrave) 232 0xE8 +\['e] (eacute) 233 0xE9 +\[^e] (ecircumflex) 234 0xEA +\[:e] (ediaeresis) 235 0xEB +\[`i] (igrave) 236 0xEC +\['i] (iacute) 237 0xED +\[^i] (icircumflex) 238 0xEE +\[:i] (idiaeresis) 239 0xEF +\[Sd] (eth) 240 0xF0 +\[~n] (ntilde) 241 0xF1 +\[`o] (ograve) 242 0xF2 +\['o] (oacute) 243 0xF3 +\[^o] (ocircumflex) 244 0xF4 +\[~o] (otilde) 245 0xF5 +\[:o] (odiaeresis) 246 0xF6 +\[di] (division) 247 0xF7 +\[/o] (oslash) 248 0xF8 +\[`u] (ugrave) 249 0xF9 +\['u] (uacute) 250 0xFA +\[^u] (ucircumflex) 251 0xFB +\[:u] (udiaeresis) 252 0xFC +\['y] (yacute) 253 0xFD +\[Tp] (thorn) 254 0xFE +\[:y] (ydiaeresis) 255 0xFF Aogonek 417 0x1A1 breve 418 0x1A2 Lstroke 419 0x1A3 Lcaron 421 0x1A5 Sacute 422 0x1A6 @@ -992,11 +992,11 @@ Hangul_J_YeorinHieuh 3834 0xEFA Korean_Won 3839 0xEFF OE 5052 0x13BC oe 5053 0x13BD Ydiaeresis 5054 0x13BE -EuroSign 8364 0x20AC +€ (EuroSign) 8364 0x20AC 3270_Duplicate 64769 0xFD01 3270_FieldMark 64770 0xFD02 3270_Right2 64771 0xFD03 3270_Left2 64772 0xFD04 3270_BackTab 64773 0xFD05 @@ -1326,719 +1326,10 @@ braille_dot_7 65527 0xFFF7 braille_dot_8 65528 0xFFF8 braille_dot_9 65529 0xFFF9 braille_dot_10 65530 0xFFFA Delete 65535 0xFFFF -Ibreve 16777516 0x100012C -ibreve 16777517 0x100012D -Wcircumflex 16777588 0x1000174 -wcircumflex 16777589 0x1000175 -Ycircumflex 16777590 0x1000176 -ycircumflex 16777591 0x1000177 -SCHWA 16777615 0x100018F -Obarred 16777631 0x100019F -Ohorn 16777632 0x10001A0 -ohorn 16777633 0x10001A1 -Uhorn 16777647 0x10001AF -uhorn 16777648 0x10001B0 -Zstroke 16777653 0x10001B5 -zstroke 16777654 0x10001B6 -EZH 16777655 0x10001B7 -Ocaron 16777681 0x10001D1 -ocaron 16777682 0x10001D2 -Gcaron 16777702 0x10001E6 -gcaron 16777703 0x10001E7 -schwa 16777817 0x1000259 -obarred 16777845 0x1000275 -ezh 16777874 0x1000292 -Cyrillic_GHE_bar 16778386 0x1000492 -Cyrillic_ghe_bar 16778387 0x1000493 -Cyrillic_ZHE_descender 16778390 0x1000496 -Cyrillic_zhe_descender 16778391 0x1000497 -Cyrillic_KA_descender 16778394 0x100049A -Cyrillic_ka_descender 16778395 0x100049B -Cyrillic_KA_vertstroke 16778396 0x100049C -Cyrillic_ka_vertstroke 16778397 0x100049D -Cyrillic_EN_descender 16778402 0x10004A2 -Cyrillic_en_descender 16778403 0x10004A3 -Cyrillic_U_straight 16778414 0x10004AE -Cyrillic_u_straight 16778415 0x10004AF -Cyrillic_U_straight_bar 16778416 0x10004B0 -Cyrillic_u_straight_bar 16778417 0x10004B1 -Cyrillic_HA_descender 16778418 0x10004B2 -Cyrillic_ha_descender 16778419 0x10004B3 -Cyrillic_CHE_descender 16778422 0x10004B6 -Cyrillic_che_descender 16778423 0x10004B7 -Cyrillic_CHE_vertstroke 16778424 0x10004B8 -Cyrillic_che_vertstroke 16778425 0x10004B9 -Cyrillic_SHHA 16778426 0x10004BA -Cyrillic_shha 16778427 0x10004BB -Cyrillic_SCHWA 16778456 0x10004D8 -Cyrillic_schwa 16778457 0x10004D9 -Cyrillic_I_macron 16778466 0x10004E2 -Cyrillic_i_macron 16778467 0x10004E3 -Cyrillic_O_bar 16778472 0x10004E8 -Cyrillic_o_bar 16778473 0x10004E9 -Cyrillic_U_macron 16778478 0x10004EE -Cyrillic_u_macron 16778479 0x10004EF -Armenian_AYB 16778545 0x1000531 -Armenian_BEN 16778546 0x1000532 -Armenian_GIM 16778547 0x1000533 -Armenian_DA 16778548 0x1000534 -Armenian_YECH 16778549 0x1000535 -Armenian_ZA 16778550 0x1000536 -Armenian_E 16778551 0x1000537 -Armenian_AT 16778552 0x1000538 -Armenian_TO 16778553 0x1000539 -Armenian_ZHE 16778554 0x100053A -Armenian_INI 16778555 0x100053B -Armenian_LYUN 16778556 0x100053C -Armenian_KHE 16778557 0x100053D -Armenian_TSA 16778558 0x100053E -Armenian_KEN 16778559 0x100053F -Armenian_HO 16778560 0x1000540 -Armenian_DZA 16778561 0x1000541 -Armenian_GHAT 16778562 0x1000542 -Armenian_TCHE 16778563 0x1000543 -Armenian_MEN 16778564 0x1000544 -Armenian_HI 16778565 0x1000545 -Armenian_NU 16778566 0x1000546 -Armenian_SHA 16778567 0x1000547 -Armenian_VO 16778568 0x1000548 -Armenian_CHA 16778569 0x1000549 -Armenian_PE 16778570 0x100054A -Armenian_JE 16778571 0x100054B -Armenian_RA 16778572 0x100054C -Armenian_SE 16778573 0x100054D -Armenian_VEV 16778574 0x100054E -Armenian_TYUN 16778575 0x100054F -Armenian_RE 16778576 0x1000550 -Armenian_TSO 16778577 0x1000551 -Armenian_VYUN 16778578 0x1000552 -Armenian_PYUR 16778579 0x1000553 -Armenian_KE 16778580 0x1000554 -Armenian_O 16778581 0x1000555 -Armenian_FE 16778582 0x1000556 -Armenian_apostrophe 16778586 0x100055A -Armenian_accent 16778587 0x100055B -Armenian_exclam 16778588 0x100055C -Armenian_separation_mark 16778589 0x100055D -Armenian_question 16778590 0x100055E -Armenian_ayb 16778593 0x1000561 -Armenian_ben 16778594 0x1000562 -Armenian_gim 16778595 0x1000563 -Armenian_da 16778596 0x1000564 -Armenian_yech 16778597 0x1000565 -Armenian_za 16778598 0x1000566 -Armenian_e 16778599 0x1000567 -Armenian_at 16778600 0x1000568 -Armenian_to 16778601 0x1000569 -Armenian_zhe 16778602 0x100056A -Armenian_ini 16778603 0x100056B -Armenian_lyun 16778604 0x100056C -Armenian_khe 16778605 0x100056D -Armenian_tsa 16778606 0x100056E -Armenian_ken 16778607 0x100056F -Armenian_ho 16778608 0x1000570 -Armenian_dza 16778609 0x1000571 -Armenian_ghat 16778610 0x1000572 -Armenian_tche 16778611 0x1000573 -Armenian_men 16778612 0x1000574 -Armenian_hi 16778613 0x1000575 -Armenian_nu 16778614 0x1000576 -Armenian_sha 16778615 0x1000577 -Armenian_vo 16778616 0x1000578 -Armenian_cha 16778617 0x1000579 -Armenian_pe 16778618 0x100057A -Armenian_je 16778619 0x100057B -Armenian_ra 16778620 0x100057C -Armenian_se 16778621 0x100057D -Armenian_vev 16778622 0x100057E -Armenian_tyun 16778623 0x100057F -Armenian_re 16778624 0x1000580 -Armenian_tso 16778625 0x1000581 -Armenian_vyun 16778626 0x1000582 -Armenian_pyur 16778627 0x1000583 -Armenian_ke 16778628 0x1000584 -Armenian_o 16778629 0x1000585 -Armenian_fe 16778630 0x1000586 -Armenian_ligature_ew 16778631 0x1000587 -Armenian_full_stop 16778633 0x1000589 -Armenian_hyphen 16778634 0x100058A -Arabic_madda_above 16778835 0x1000653 -Arabic_hamza_above 16778836 0x1000654 -Arabic_hamza_below 16778837 0x1000655 -Arabic_0 16778848 0x1000660 -Arabic_1 16778849 0x1000661 -Arabic_2 16778850 0x1000662 -Arabic_3 16778851 0x1000663 -Arabic_4 16778852 0x1000664 -Arabic_5 16778853 0x1000665 -Arabic_6 16778854 0x1000666 -Arabic_7 16778855 0x1000667 -Arabic_8 16778856 0x1000668 -Arabic_9 16778857 0x1000669 -Arabic_percent 16778858 0x100066A -Arabic_superscript_alef 16778864 0x1000670 -Arabic_tteh 16778873 0x1000679 -Arabic_peh 16778878 0x100067E -Arabic_tcheh 16778886 0x1000686 -Arabic_ddal 16778888 0x1000688 -Arabic_rreh 16778897 0x1000691 -Arabic_jeh 16778904 0x1000698 -Arabic_veh 16778916 0x10006A4 -Arabic_keheh 16778921 0x10006A9 -Arabic_gaf 16778927 0x10006AF -Arabic_noon_ghunna 16778938 0x10006BA -Arabic_heh_doachashmee 16778942 0x10006BE -Arabic_heh_goal 16778945 0x10006C1 -Farsi_yeh 16778956 0x10006CC -Arabic_yeh_baree 16778962 0x10006D2 -Arabic_fullstop 16778964 0x10006D4 -Farsi_0 16778992 0x10006F0 -Farsi_1 16778993 0x10006F1 -Farsi_2 16778994 0x10006F2 -Farsi_3 16778995 0x10006F3 -Farsi_4 16778996 0x10006F4 -Farsi_5 16778997 0x10006F5 -Farsi_6 16778998 0x10006F6 -Farsi_7 16778999 0x10006F7 -Farsi_8 16779000 0x10006F8 -Farsi_9 16779001 0x10006F9 -Sinh_ng 16780674 0x1000D82 -Sinh_h2 16780675 0x1000D83 -Sinh_a 16780677 0x1000D85 -Sinh_aa 16780678 0x1000D86 -Sinh_ae 16780679 0x1000D87 -Sinh_aee 16780680 0x1000D88 -Sinh_i 16780681 0x1000D89 -Sinh_ii 16780682 0x1000D8A -Sinh_u 16780683 0x1000D8B -Sinh_uu 16780684 0x1000D8C -Sinh_ri 16780685 0x1000D8D -Sinh_rii 16780686 0x1000D8E -Sinh_lu 16780687 0x1000D8F -Sinh_luu 16780688 0x1000D90 -Sinh_e 16780689 0x1000D91 -Sinh_ee 16780690 0x1000D92 -Sinh_ai 16780691 0x1000D93 -Sinh_o 16780692 0x1000D94 -Sinh_oo 16780693 0x1000D95 -Sinh_au 16780694 0x1000D96 -Sinh_ka 16780698 0x1000D9A -Sinh_kha 16780699 0x1000D9B -Sinh_ga 16780700 0x1000D9C -Sinh_gha 16780701 0x1000D9D -Sinh_ng2 16780702 0x1000D9E -Sinh_nga 16780703 0x1000D9F -Sinh_ca 16780704 0x1000DA0 -Sinh_cha 16780705 0x1000DA1 -Sinh_ja 16780706 0x1000DA2 -Sinh_jha 16780707 0x1000DA3 -Sinh_nya 16780708 0x1000DA4 -Sinh_jnya 16780709 0x1000DA5 -Sinh_nja 16780710 0x1000DA6 -Sinh_tta 16780711 0x1000DA7 -Sinh_ttha 16780712 0x1000DA8 -Sinh_dda 16780713 0x1000DA9 -Sinh_ddha 16780714 0x1000DAA -Sinh_nna 16780715 0x1000DAB -Sinh_ndda 16780716 0x1000DAC -Sinh_tha 16780717 0x1000DAD -Sinh_thha 16780718 0x1000DAE -Sinh_dha 16780719 0x1000DAF -Sinh_dhha 16780720 0x1000DB0 -Sinh_na 16780721 0x1000DB1 -Sinh_ndha 16780723 0x1000DB3 -Sinh_pa 16780724 0x1000DB4 -Sinh_pha 16780725 0x1000DB5 -Sinh_ba 16780726 0x1000DB6 -Sinh_bha 16780727 0x1000DB7 -Sinh_ma 16780728 0x1000DB8 -Sinh_mba 16780729 0x1000DB9 -Sinh_ya 16780730 0x1000DBA -Sinh_ra 16780731 0x1000DBB -Sinh_la 16780733 0x1000DBD -Sinh_va 16780736 0x1000DC0 -Sinh_sha 16780737 0x1000DC1 -Sinh_ssha 16780738 0x1000DC2 -Sinh_sa 16780739 0x1000DC3 -Sinh_ha 16780740 0x1000DC4 -Sinh_lla 16780741 0x1000DC5 -Sinh_fa 16780742 0x1000DC6 -Sinh_al 16780746 0x1000DCA -Sinh_aa2 16780751 0x1000DCF -Sinh_ae2 16780752 0x1000DD0 -Sinh_aee2 16780753 0x1000DD1 -Sinh_i2 16780754 0x1000DD2 -Sinh_ii2 16780755 0x1000DD3 -Sinh_u2 16780756 0x1000DD4 -Sinh_uu2 16780758 0x1000DD6 -Sinh_ru2 16780760 0x1000DD8 -Sinh_e2 16780761 0x1000DD9 -Sinh_ee2 16780762 0x1000DDA -Sinh_ai2 16780763 0x1000DDB -Sinh_o2 16780764 0x1000DDC -Sinh_oo2 16780765 0x1000DDD -Sinh_au2 16780766 0x1000DDE -Sinh_lu2 16780767 0x1000DDF -Sinh_ruu2 16780786 0x1000DF2 -Sinh_luu2 16780787 0x1000DF3 -Sinh_kunddaliya 16780788 0x1000DF4 -Georgian_an 16781520 0x10010D0 -Georgian_ban 16781521 0x10010D1 -Georgian_gan 16781522 0x10010D2 -Georgian_don 16781523 0x10010D3 -Georgian_en 16781524 0x10010D4 -Georgian_vin 16781525 0x10010D5 -Georgian_zen 16781526 0x10010D6 -Georgian_tan 16781527 0x10010D7 -Georgian_in 16781528 0x10010D8 -Georgian_kan 16781529 0x10010D9 -Georgian_las 16781530 0x10010DA -Georgian_man 16781531 0x10010DB -Georgian_nar 16781532 0x10010DC -Georgian_on 16781533 0x10010DD -Georgian_par 16781534 0x10010DE -Georgian_zhar 16781535 0x10010DF -Georgian_rae 16781536 0x10010E0 -Georgian_san 16781537 0x10010E1 -Georgian_tar 16781538 0x10010E2 -Georgian_un 16781539 0x10010E3 -Georgian_phar 16781540 0x10010E4 -Georgian_khar 16781541 0x10010E5 -Georgian_ghan 16781542 0x10010E6 -Georgian_qar 16781543 0x10010E7 -Georgian_shin 16781544 0x10010E8 -Georgian_chin 16781545 0x10010E9 -Georgian_can 16781546 0x10010EA -Georgian_jil 16781547 0x10010EB -Georgian_cil 16781548 0x10010EC -Georgian_char 16781549 0x10010ED -Georgian_xan 16781550 0x10010EE -Georgian_jhan 16781551 0x10010EF -Georgian_hae 16781552 0x10010F0 -Georgian_he 16781553 0x10010F1 -Georgian_hie 16781554 0x10010F2 -Georgian_we 16781555 0x10010F3 -Georgian_har 16781556 0x10010F4 -Georgian_hoe 16781557 0x10010F5 -Georgian_fi 16781558 0x10010F6 -Babovedot 16784898 0x1001E02 -babovedot 16784899 0x1001E03 -Dabovedot 16784906 0x1001E0A -dabovedot 16784907 0x1001E0B -Fabovedot 16784926 0x1001E1E -fabovedot 16784927 0x1001E1F -Lbelowdot 16784950 0x1001E36 -lbelowdot 16784951 0x1001E37 -Mabovedot 16784960 0x1001E40 -mabovedot 16784961 0x1001E41 -Pabovedot 16784982 0x1001E56 -pabovedot 16784983 0x1001E57 -Sabovedot 16784992 0x1001E60 -sabovedot 16784993 0x1001E61 -Tabovedot 16785002 0x1001E6A -tabovedot 16785003 0x1001E6B -Wgrave 16785024 0x1001E80 -wgrave 16785025 0x1001E81 -Wacute 16785026 0x1001E82 -wacute 16785027 0x1001E83 -Wdiaeresis 16785028 0x1001E84 -wdiaeresis 16785029 0x1001E85 -Xabovedot 16785034 0x1001E8A -xabovedot 16785035 0x1001E8B -Abelowdot 16785056 0x1001EA0 -abelowdot 16785057 0x1001EA1 -Ahook 16785058 0x1001EA2 -ahook 16785059 0x1001EA3 -Acircumflexacute 16785060 0x1001EA4 -acircumflexacute 16785061 0x1001EA5 -Acircumflexgrave 16785062 0x1001EA6 -acircumflexgrave 16785063 0x1001EA7 -Acircumflexhook 16785064 0x1001EA8 -acircumflexhook 16785065 0x1001EA9 -Acircumflextilde 16785066 0x1001EAA -acircumflextilde 16785067 0x1001EAB -Acircumflexbelowdot 16785068 0x1001EAC -acircumflexbelowdot 16785069 0x1001EAD -Abreveacute 16785070 0x1001EAE -abreveacute 16785071 0x1001EAF -Abrevegrave 16785072 0x1001EB0 -abrevegrave 16785073 0x1001EB1 -Abrevehook 16785074 0x1001EB2 -abrevehook 16785075 0x1001EB3 -Abrevetilde 16785076 0x1001EB4 -abrevetilde 16785077 0x1001EB5 -Abrevebelowdot 16785078 0x1001EB6 -abrevebelowdot 16785079 0x1001EB7 -Ebelowdot 16785080 0x1001EB8 -ebelowdot 16785081 0x1001EB9 -Ehook 16785082 0x1001EBA -ehook 16785083 0x1001EBB -Etilde 16785084 0x1001EBC -etilde 16785085 0x1001EBD -Ecircumflexacute 16785086 0x1001EBE -ecircumflexacute 16785087 0x1001EBF -Ecircumflexgrave 16785088 0x1001EC0 -ecircumflexgrave 16785089 0x1001EC1 -Ecircumflexhook 16785090 0x1001EC2 -ecircumflexhook 16785091 0x1001EC3 -Ecircumflextilde 16785092 0x1001EC4 -ecircumflextilde 16785093 0x1001EC5 -Ecircumflexbelowdot 16785094 0x1001EC6 -ecircumflexbelowdot 16785095 0x1001EC7 -Ihook 16785096 0x1001EC8 -ihook 16785097 0x1001EC9 -Ibelowdot 16785098 0x1001ECA -ibelowdot 16785099 0x1001ECB -Obelowdot 16785100 0x1001ECC -obelowdot 16785101 0x1001ECD -Ohook 16785102 0x1001ECE -ohook 16785103 0x1001ECF -Ocircumflexacute 16785104 0x1001ED0 -ocircumflexacute 16785105 0x1001ED1 -Ocircumflexgrave 16785106 0x1001ED2 -ocircumflexgrave 16785107 0x1001ED3 -Ocircumflexhook 16785108 0x1001ED4 -ocircumflexhook 16785109 0x1001ED5 -Ocircumflextilde 16785110 0x1001ED6 -ocircumflextilde 16785111 0x1001ED7 -Ocircumflexbelowdot 16785112 0x1001ED8 -ocircumflexbelowdot 16785113 0x1001ED9 -Ohornacute 16785114 0x1001EDA -ohornacute 16785115 0x1001EDB -Ohorngrave 16785116 0x1001EDC -ohorngrave 16785117 0x1001EDD -Ohornhook 16785118 0x1001EDE -ohornhook 16785119 0x1001EDF -Ohorntilde 16785120 0x1001EE0 -ohorntilde 16785121 0x1001EE1 -Ohornbelowdot 16785122 0x1001EE2 -ohornbelowdot 16785123 0x1001EE3 -Ubelowdot 16785124 0x1001EE4 -ubelowdot 16785125 0x1001EE5 -Uhook 16785126 0x1001EE6 -uhook 16785127 0x1001EE7 -Uhornacute 16785128 0x1001EE8 -uhornacute 16785129 0x1001EE9 -Uhorngrave 16785130 0x1001EEA -uhorngrave 16785131 0x1001EEB -Uhornhook 16785132 0x1001EEC -uhornhook 16785133 0x1001EED -Uhorntilde 16785134 0x1001EEE -uhorntilde 16785135 0x1001EEF -Uhornbelowdot 16785136 0x1001EF0 -uhornbelowdot 16785137 0x1001EF1 -Ygrave 16785138 0x1001EF2 -ygrave 16785139 0x1001EF3 -Ybelowdot 16785140 0x1001EF4 -ybelowdot 16785141 0x1001EF5 -Yhook 16785142 0x1001EF6 -yhook 16785143 0x1001EF7 -Ytilde 16785144 0x1001EF8 -ytilde 16785145 0x1001EF9 -zerosuperior 16785520 0x1002070 -foursuperior 16785524 0x1002074 -fivesuperior 16785525 0x1002075 -sixsuperior 16785526 0x1002076 -sevensuperior 16785527 0x1002077 -eightsuperior 16785528 0x1002078 -ninesuperior 16785529 0x1002079 -zerosubscript 16785536 0x1002080 -onesubscript 16785537 0x1002081 -twosubscript 16785538 0x1002082 -threesubscript 16785539 0x1002083 -foursubscript 16785540 0x1002084 -fivesubscript 16785541 0x1002085 -sixsubscript 16785542 0x1002086 -sevensubscript 16785543 0x1002087 -eightsubscript 16785544 0x1002088 -ninesubscript 16785545 0x1002089 -EcuSign 16785568 0x10020A0 -ColonSign 16785569 0x10020A1 -CruzeiroSign 16785570 0x10020A2 -FFrancSign 16785571 0x10020A3 -LiraSign 16785572 0x10020A4 -MillSign 16785573 0x10020A5 -NairaSign 16785574 0x10020A6 -PesetaSign 16785575 0x10020A7 -RupeeSign 16785576 0x10020A8 -WonSign 16785577 0x10020A9 -NewSheqelSign 16785578 0x10020AA -DongSign 16785579 0x10020AB -partdifferential 16785922 0x1002202 -emptyset 16785925 0x1002205 -elementof 16785928 0x1002208 -notelementof 16785929 0x1002209 -containsas 16785931 0x100220B -squareroot 16785946 0x100221A -cuberoot 16785947 0x100221B -fourthroot 16785948 0x100221C -dintegral 16785964 0x100222C -tintegral 16785965 0x100222D -because 16785973 0x1002235 -notapproxeq 16785991 0x1002247 -approxeq 16785992 0x1002248 -notidentical 16786018 0x1002262 -stricteq 16786019 0x1002263 -braille_blank 16787456 0x1002800 -braille_dots_1 16787457 0x1002801 -braille_dots_2 16787458 0x1002802 -braille_dots_12 16787459 0x1002803 -braille_dots_3 16787460 0x1002804 -braille_dots_13 16787461 0x1002805 -braille_dots_23 16787462 0x1002806 -braille_dots_123 16787463 0x1002807 -braille_dots_4 16787464 0x1002808 -braille_dots_14 16787465 0x1002809 -braille_dots_24 16787466 0x100280A -braille_dots_124 16787467 0x100280B -braille_dots_34 16787468 0x100280C -braille_dots_134 16787469 0x100280D -braille_dots_234 16787470 0x100280E -braille_dots_1234 16787471 0x100280F -braille_dots_5 16787472 0x1002810 -braille_dots_15 16787473 0x1002811 -braille_dots_25 16787474 0x1002812 -braille_dots_125 16787475 0x1002813 -braille_dots_35 16787476 0x1002814 -braille_dots_135 16787477 0x1002815 -braille_dots_235 16787478 0x1002816 -braille_dots_1235 16787479 0x1002817 -braille_dots_45 16787480 0x1002818 -braille_dots_145 16787481 0x1002819 -braille_dots_245 16787482 0x100281A -braille_dots_1245 16787483 0x100281B -braille_dots_345 16787484 0x100281C -braille_dots_1345 16787485 0x100281D -braille_dots_2345 16787486 0x100281E -braille_dots_12345 16787487 0x100281F -braille_dots_6 16787488 0x1002820 -braille_dots_16 16787489 0x1002821 -braille_dots_26 16787490 0x1002822 -braille_dots_126 16787491 0x1002823 -braille_dots_36 16787492 0x1002824 -braille_dots_136 16787493 0x1002825 -braille_dots_236 16787494 0x1002826 -braille_dots_1236 16787495 0x1002827 -braille_dots_46 16787496 0x1002828 -braille_dots_146 16787497 0x1002829 -braille_dots_246 16787498 0x100282A -braille_dots_1246 16787499 0x100282B -braille_dots_346 16787500 0x100282C -braille_dots_1346 16787501 0x100282D -braille_dots_2346 16787502 0x100282E -braille_dots_12346 16787503 0x100282F -braille_dots_56 16787504 0x1002830 -braille_dots_156 16787505 0x1002831 -braille_dots_256 16787506 0x1002832 -braille_dots_1256 16787507 0x1002833 -braille_dots_356 16787508 0x1002834 -braille_dots_1356 16787509 0x1002835 -braille_dots_2356 16787510 0x1002836 -braille_dots_12356 16787511 0x1002837 -braille_dots_456 16787512 0x1002838 -braille_dots_1456 16787513 0x1002839 -braille_dots_2456 16787514 0x100283A -braille_dots_12456 16787515 0x100283B -braille_dots_3456 16787516 0x100283C -braille_dots_13456 16787517 0x100283D -braille_dots_23456 16787518 0x100283E -braille_dots_123456 16787519 0x100283F -braille_dots_7 16787520 0x1002840 -braille_dots_17 16787521 0x1002841 -braille_dots_27 16787522 0x1002842 -braille_dots_127 16787523 0x1002843 -braille_dots_37 16787524 0x1002844 -braille_dots_137 16787525 0x1002845 -braille_dots_237 16787526 0x1002846 -braille_dots_1237 16787527 0x1002847 -braille_dots_47 16787528 0x1002848 -braille_dots_147 16787529 0x1002849 -braille_dots_247 16787530 0x100284A -braille_dots_1247 16787531 0x100284B -braille_dots_347 16787532 0x100284C -braille_dots_1347 16787533 0x100284D -braille_dots_2347 16787534 0x100284E -braille_dots_12347 16787535 0x100284F -braille_dots_57 16787536 0x1002850 -braille_dots_157 16787537 0x1002851 -braille_dots_257 16787538 0x1002852 -braille_dots_1257 16787539 0x1002853 -braille_dots_357 16787540 0x1002854 -braille_dots_1357 16787541 0x1002855 -braille_dots_2357 16787542 0x1002856 -braille_dots_12357 16787543 0x1002857 -braille_dots_457 16787544 0x1002858 -braille_dots_1457 16787545 0x1002859 -braille_dots_2457 16787546 0x100285A -braille_dots_12457 16787547 0x100285B -braille_dots_3457 16787548 0x100285C -braille_dots_13457 16787549 0x100285D -braille_dots_23457 16787550 0x100285E -braille_dots_123457 16787551 0x100285F -braille_dots_67 16787552 0x1002860 -braille_dots_167 16787553 0x1002861 -braille_dots_267 16787554 0x1002862 -braille_dots_1267 16787555 0x1002863 -braille_dots_367 16787556 0x1002864 -braille_dots_1367 16787557 0x1002865 -braille_dots_2367 16787558 0x1002866 -braille_dots_12367 16787559 0x1002867 -braille_dots_467 16787560 0x1002868 -braille_dots_1467 16787561 0x1002869 -braille_dots_2467 16787562 0x100286A -braille_dots_12467 16787563 0x100286B -braille_dots_3467 16787564 0x100286C -braille_dots_13467 16787565 0x100286D -braille_dots_23467 16787566 0x100286E -braille_dots_123467 16787567 0x100286F -braille_dots_567 16787568 0x1002870 -braille_dots_1567 16787569 0x1002871 -braille_dots_2567 16787570 0x1002872 -braille_dots_12567 16787571 0x1002873 -braille_dots_3567 16787572 0x1002874 -braille_dots_13567 16787573 0x1002875 -braille_dots_23567 16787574 0x1002876 -braille_dots_123567 16787575 0x1002877 -braille_dots_4567 16787576 0x1002878 -braille_dots_14567 16787577 0x1002879 -braille_dots_24567 16787578 0x100287A -braille_dots_124567 16787579 0x100287B -braille_dots_34567 16787580 0x100287C -braille_dots_134567 16787581 0x100287D -braille_dots_234567 16787582 0x100287E -braille_dots_1234567 16787583 0x100287F -braille_dots_8 16787584 0x1002880 -braille_dots_18 16787585 0x1002881 -braille_dots_28 16787586 0x1002882 -braille_dots_128 16787587 0x1002883 -braille_dots_38 16787588 0x1002884 -braille_dots_138 16787589 0x1002885 -braille_dots_238 16787590 0x1002886 -braille_dots_1238 16787591 0x1002887 -braille_dots_48 16787592 0x1002888 -braille_dots_148 16787593 0x1002889 -braille_dots_248 16787594 0x100288A -braille_dots_1248 16787595 0x100288B -braille_dots_348 16787596 0x100288C -braille_dots_1348 16787597 0x100288D -braille_dots_2348 16787598 0x100288E -braille_dots_12348 16787599 0x100288F -braille_dots_58 16787600 0x1002890 -braille_dots_158 16787601 0x1002891 -braille_dots_258 16787602 0x1002892 -braille_dots_1258 16787603 0x1002893 -braille_dots_358 16787604 0x1002894 -braille_dots_1358 16787605 0x1002895 -braille_dots_2358 16787606 0x1002896 -braille_dots_12358 16787607 0x1002897 -braille_dots_458 16787608 0x1002898 -braille_dots_1458 16787609 0x1002899 -braille_dots_2458 16787610 0x100289A -braille_dots_12458 16787611 0x100289B -braille_dots_3458 16787612 0x100289C -braille_dots_13458 16787613 0x100289D -braille_dots_23458 16787614 0x100289E -braille_dots_123458 16787615 0x100289F -braille_dots_68 16787616 0x10028A0 -braille_dots_168 16787617 0x10028A1 -braille_dots_268 16787618 0x10028A2 -braille_dots_1268 16787619 0x10028A3 -braille_dots_368 16787620 0x10028A4 -braille_dots_1368 16787621 0x10028A5 -braille_dots_2368 16787622 0x10028A6 -braille_dots_12368 16787623 0x10028A7 -braille_dots_468 16787624 0x10028A8 -braille_dots_1468 16787625 0x10028A9 -braille_dots_2468 16787626 0x10028AA -braille_dots_12468 16787627 0x10028AB -braille_dots_3468 16787628 0x10028AC -braille_dots_13468 16787629 0x10028AD -braille_dots_23468 16787630 0x10028AE -braille_dots_123468 16787631 0x10028AF -braille_dots_568 16787632 0x10028B0 -braille_dots_1568 16787633 0x10028B1 -braille_dots_2568 16787634 0x10028B2 -braille_dots_12568 16787635 0x10028B3 -braille_dots_3568 16787636 0x10028B4 -braille_dots_13568 16787637 0x10028B5 -braille_dots_23568 16787638 0x10028B6 -braille_dots_123568 16787639 0x10028B7 -braille_dots_4568 16787640 0x10028B8 -braille_dots_14568 16787641 0x10028B9 -braille_dots_24568 16787642 0x10028BA -braille_dots_124568 16787643 0x10028BB -braille_dots_34568 16787644 0x10028BC -braille_dots_134568 16787645 0x10028BD -braille_dots_234568 16787646 0x10028BE -braille_dots_1234568 16787647 0x10028BF -braille_dots_78 16787648 0x10028C0 -braille_dots_178 16787649 0x10028C1 -braille_dots_278 16787650 0x10028C2 -braille_dots_1278 16787651 0x10028C3 -braille_dots_378 16787652 0x10028C4 -braille_dots_1378 16787653 0x10028C5 -braille_dots_2378 16787654 0x10028C6 -braille_dots_12378 16787655 0x10028C7 -braille_dots_478 16787656 0x10028C8 -braille_dots_1478 16787657 0x10028C9 -braille_dots_2478 16787658 0x10028CA -braille_dots_12478 16787659 0x10028CB -braille_dots_3478 16787660 0x10028CC -braille_dots_13478 16787661 0x10028CD -braille_dots_23478 16787662 0x10028CE -braille_dots_123478 16787663 0x10028CF -braille_dots_578 16787664 0x10028D0 -braille_dots_1578 16787665 0x10028D1 -braille_dots_2578 16787666 0x10028D2 -braille_dots_12578 16787667 0x10028D3 -braille_dots_3578 16787668 0x10028D4 -braille_dots_13578 16787669 0x10028D5 -braille_dots_23578 16787670 0x10028D6 -braille_dots_123578 16787671 0x10028D7 -braille_dots_4578 16787672 0x10028D8 -braille_dots_14578 16787673 0x10028D9 -braille_dots_24578 16787674 0x10028DA -braille_dots_124578 16787675 0x10028DB -braille_dots_34578 16787676 0x10028DC -braille_dots_134578 16787677 0x10028DD -braille_dots_234578 16787678 0x10028DE -braille_dots_1234578 16787679 0x10028DF -braille_dots_678 16787680 0x10028E0 -braille_dots_1678 16787681 0x10028E1 -braille_dots_2678 16787682 0x10028E2 -braille_dots_12678 16787683 0x10028E3 -braille_dots_3678 16787684 0x10028E4 -braille_dots_13678 16787685 0x10028E5 -braille_dots_23678 16787686 0x10028E6 -braille_dots_123678 16787687 0x10028E7 -braille_dots_4678 16787688 0x10028E8 -braille_dots_14678 16787689 0x10028E9 -braille_dots_24678 16787690 0x10028EA -braille_dots_124678 16787691 0x10028EB -braille_dots_34678 16787692 0x10028EC -braille_dots_134678 16787693 0x10028ED -braille_dots_234678 16787694 0x10028EE -braille_dots_1234678 16787695 0x10028EF -braille_dots_5678 16787696 0x10028F0 -braille_dots_15678 16787697 0x10028F1 -braille_dots_25678 16787698 0x10028F2 -braille_dots_125678 16787699 0x10028F3 -braille_dots_35678 16787700 0x10028F4 -braille_dots_135678 16787701 0x10028F5 -braille_dots_235678 16787702 0x10028F6 -braille_dots_1235678 16787703 0x10028F7 -braille_dots_45678 16787704 0x10028F8 -braille_dots_145678 16787705 0x10028F9 -braille_dots_245678 16787706 0x10028FA -braille_dots_1245678 16787707 0x10028FB -braille_dots_345678 16787708 0x10028FC -braille_dots_1345678 16787709 0x10028FD -braille_dots_2345678 16787710 0x10028FE -braille_dots_12345678 16787711 0x10028FF SunFA_Grave 268828416 0x1005FF00 SunFA_Circum 268828417 0x1005FF01 SunFA_Tilde 268828418 0x1005FF02 SunFA_Acute 268828419 0x1005FF03 SunFA_Diaeresis 268828420 0x1005FF04 Index: doc/listbox.n ================================================================== --- doc/listbox.n +++ doc/listbox.n @@ -561,11 +561,11 @@ .IP [16] In \fBextended\fR mode, the Escape key cancels the most recent selection and restores all the elements in the selected range to their previous selection state. .IP [17] -Control-slash selects everything in the widget, except in +Control-/ selects everything in the widget, except in \fBsingle\fR and \fBbrowse\fR modes, in which case it selects the active element and deselects everything else. .IP [18] Control-backslash deselects everything in the widget, except in \fBbrowse\fR mode where it has no effect. Index: generic/ks_names.h ================================================================== --- generic/ks_names.h +++ generic/ks_names.h @@ -358,24 +358,29 @@ { "3270_ExSelect", 0xFD1B }, { "3270_CursorSelect", 0xFD1C }, { "3270_PrintScreen", 0xFD1D }, { "3270_Enter", 0xFD1E }, { "space", 0x20 }, +#ifndef TK_NO_DEPRECATED { "exclam", 0x21 }, +#endif { "quotedbl", 0x22 }, { "numbersign", 0x23 }, { "dollar", 0x24 }, +#ifndef TK_NO_DEPRECATED { "percent", 0x25 }, { "ampersand", 0x26 }, { "apostrophe", 0x27 }, { "quoteright", 0x27 }, { "parenleft", 0x28 }, { "parenright", 0x29 }, { "asterisk", 0x2A }, { "plus", 0x2B }, { "comma", 0x2C }, +#endif { "minus", 0x2D }, +#ifndef TK_NO_DEPRECATED { "period", 0x2E }, { "slash", 0x2F }, { "0", 0x30 }, { "1", 0x31 }, { "2", 0x32 }, @@ -385,14 +390,18 @@ { "6", 0x36 }, { "7", 0x37 }, { "8", 0x38 }, { "9", 0x39 }, { "colon", 0x3A }, +#endif { "semicolon", 0x3B }, { "less", 0x3C }, +#ifndef TK_NO_DEPRECATED { "equal", 0x3D }, +#endif { "greater", 0x3E }, +#ifndef TK_NO_DEPRECATED { "question", 0x3F }, { "at", 0x40 }, { "A", 0x41 }, { "B", 0x42 }, { "C", 0x43 }, @@ -417,13 +426,15 @@ { "V", 0x56 }, { "W", 0x57 }, { "X", 0x58 }, { "Y", 0x59 }, { "Z", 0x5A }, +#endif { "bracketleft", 0x5B }, { "backslash", 0x5C }, { "bracketright", 0x5D }, +#ifndef TK_NO_DEPRECATED { "asciicircum", 0x5E }, { "underscore", 0x5F }, { "grave", 0x60 }, { "quoteleft", 0x60 }, { "a", 0x61 }, @@ -450,15 +461,21 @@ { "v", 0x76 }, { "w", 0x77 }, { "x", 0x78 }, { "y", 0x79 }, { "z", 0x7A }, +#endif { "braceleft", 0x7B }, +#ifndef TK_NO_DEPRECATED { "bar", 0x7C }, +#endif { "braceright", 0x7D }, +#ifndef TK_NO_DEPRECATED { "asciitilde", 0x7E }, +#endif { "nobreakspace", 0xA0 }, +#ifndef TK_NO_DEPRECATED { "exclamdown", 0xA1 }, { "cent", 0xA2 }, { "sterling", 0xA3 }, { "currency", 0xA4 }, { "yen", 0xA5 }, @@ -558,10 +575,11 @@ { "ucircumflex", 0xFB }, { "udiaeresis", 0xFC }, { "yacute", 0xFD }, { "thorn", 0xFE }, { "ydiaeresis", 0xFF }, +#endif /* TK_NO_DEPRECATED */ { "Aogonek", 0x1A1 }, { "breve", 0x1A2 }, { "Lstroke", 0x1A3 }, { "Lcaron", 0x1A5 }, { "Sacute", 0x1A6 }, @@ -678,36 +696,10 @@ { "omacron", 0x3F2 }, { "kcedilla", 0x3F3 }, { "uogonek", 0x3F9 }, { "utilde", 0x3FD }, { "umacron", 0x3FE }, -{ "Wcircumflex", 0x1000174 }, -{ "wcircumflex", 0x1000175 }, -{ "Ycircumflex", 0x1000176 }, -{ "ycircumflex", 0x1000177 }, -{ "Babovedot", 0x1001E02 }, -{ "babovedot", 0x1001E03 }, -{ "Dabovedot", 0x1001E0A }, -{ "dabovedot", 0x1001E0B }, -{ "Fabovedot", 0x1001E1E }, -{ "fabovedot", 0x1001E1F }, -{ "Mabovedot", 0x1001E40 }, -{ "mabovedot", 0x1001E41 }, -{ "Pabovedot", 0x1001E56 }, -{ "pabovedot", 0x1001E57 }, -{ "Sabovedot", 0x1001E60 }, -{ "sabovedot", 0x1001E61 }, -{ "Tabovedot", 0x1001E6A }, -{ "tabovedot", 0x1001E6B }, -{ "Wgrave", 0x1001E80 }, -{ "wgrave", 0x1001E81 }, -{ "Wacute", 0x1001E82 }, -{ "wacute", 0x1001E83 }, -{ "Wdiaeresis", 0x1001E84 }, -{ "wdiaeresis", 0x1001E85 }, -{ "Ygrave", 0x1001EF2 }, -{ "ygrave", 0x1001EF3 }, { "OE", 0x13BC }, { "oe", 0x13BD }, { "Ydiaeresis", 0x13BE }, { "overline", 0x47E }, { "kana_fullstop", 0x4A1 }, @@ -787,39 +779,10 @@ { "kana_WA", 0x4DC }, { "kana_N", 0x4DD }, { "voicedsound", 0x4DE }, { "semivoicedsound", 0x4DF }, { "kana_switch", 0xFF7E }, -{ "Farsi_0", 0x10006F0 }, -{ "Farsi_1", 0x10006F1 }, -{ "Farsi_2", 0x10006F2 }, -{ "Farsi_3", 0x10006F3 }, -{ "Farsi_4", 0x10006F4 }, -{ "Farsi_5", 0x10006F5 }, -{ "Farsi_6", 0x10006F6 }, -{ "Farsi_7", 0x10006F7 }, -{ "Farsi_8", 0x10006F8 }, -{ "Farsi_9", 0x10006F9 }, -{ "Arabic_percent", 0x100066A }, -{ "Arabic_superscript_alef", 0x1000670 }, -{ "Arabic_tteh", 0x1000679 }, -{ "Arabic_peh", 0x100067E }, -{ "Arabic_tcheh", 0x1000686 }, -{ "Arabic_ddal", 0x1000688 }, -{ "Arabic_rreh", 0x1000691 }, -{ "Arabic_comma", 0x5AC }, -{ "Arabic_fullstop", 0x10006D4 }, -{ "Arabic_0", 0x1000660 }, -{ "Arabic_1", 0x1000661 }, -{ "Arabic_2", 0x1000662 }, -{ "Arabic_3", 0x1000663 }, -{ "Arabic_4", 0x1000664 }, -{ "Arabic_5", 0x1000665 }, -{ "Arabic_6", 0x1000666 }, -{ "Arabic_7", 0x1000667 }, -{ "Arabic_8", 0x1000668 }, -{ "Arabic_9", 0x1000669 }, { "Arabic_semicolon", 0x5BB }, { "Arabic_question_mark", 0x5BF }, { "Arabic_hamza", 0x5C1 }, { "Arabic_maddaonalef", 0x5C2 }, { "Arabic_hamzaonalef", 0x5C3 }, @@ -866,54 +829,10 @@ { "Arabic_fatha", 0x5EE }, { "Arabic_damma", 0x5EF }, { "Arabic_kasra", 0x5F0 }, { "Arabic_shadda", 0x5F1 }, { "Arabic_sukun", 0x5F2 }, -{ "Arabic_madda_above", 0x1000653 }, -{ "Arabic_hamza_above", 0x1000654 }, -{ "Arabic_hamza_below", 0x1000655 }, -{ "Arabic_jeh", 0x1000698 }, -{ "Arabic_veh", 0x10006A4 }, -{ "Arabic_keheh", 0x10006A9 }, -{ "Arabic_gaf", 0x10006AF }, -{ "Arabic_noon_ghunna", 0x10006BA }, -{ "Arabic_heh_doachashmee", 0x10006BE }, -{ "Farsi_yeh", 0x10006CC }, -{ "Arabic_farsi_yeh", 0x10006CC }, -{ "Arabic_yeh_baree", 0x10006D2 }, -{ "Arabic_heh_goal", 0x10006C1 }, -{ "Arabic_switch", 0xFF7E }, -{ "Cyrillic_GHE_bar", 0x1000492 }, -{ "Cyrillic_ghe_bar", 0x1000493 }, -{ "Cyrillic_ZHE_descender", 0x1000496 }, -{ "Cyrillic_zhe_descender", 0x1000497 }, -{ "Cyrillic_KA_descender", 0x100049A }, -{ "Cyrillic_ka_descender", 0x100049B }, -{ "Cyrillic_KA_vertstroke", 0x100049C }, -{ "Cyrillic_ka_vertstroke", 0x100049D }, -{ "Cyrillic_EN_descender", 0x10004A2 }, -{ "Cyrillic_en_descender", 0x10004A3 }, -{ "Cyrillic_U_straight", 0x10004AE }, -{ "Cyrillic_u_straight", 0x10004AF }, -{ "Cyrillic_U_straight_bar", 0x10004B0 }, -{ "Cyrillic_u_straight_bar", 0x10004B1 }, -{ "Cyrillic_HA_descender", 0x10004B2 }, -{ "Cyrillic_ha_descender", 0x10004B3 }, -{ "Cyrillic_CHE_descender", 0x10004B6 }, -{ "Cyrillic_che_descender", 0x10004B7 }, -{ "Cyrillic_CHE_vertstroke", 0x10004B8 }, -{ "Cyrillic_che_vertstroke", 0x10004B9 }, -{ "Cyrillic_SHHA", 0x10004BA }, -{ "Cyrillic_shha", 0x10004BB }, -{ "Cyrillic_SCHWA", 0x10004D8 }, -{ "Cyrillic_schwa", 0x10004D9 }, -{ "Cyrillic_I_macron", 0x10004E2 }, -{ "Cyrillic_i_macron", 0x10004E3 }, -{ "Cyrillic_O_bar", 0x10004E8 }, -{ "Cyrillic_o_bar", 0x10004E9 }, -{ "Cyrillic_U_macron", 0x10004EE }, -{ "Cyrillic_u_macron", 0x10004EF }, { "Serbian_dje", 0x6A1 }, { "Macedonia_gje", 0x6A2 }, { "Cyrillic_io", 0x6A3 }, { "Ukrainian_ie", 0x6A4 }, #ifndef TK_NO_DEPRECATED @@ -1553,294 +1472,10 @@ { "Hangul_AraeAE", 0xEF7 }, { "Hangul_J_PanSios", 0xEF8 }, { "Hangul_J_KkogjiDalrinIeung", 0xEF9 }, { "Hangul_J_YeorinHieuh", 0xEFA }, { "Korean_Won", 0xEFF }, -{ "Armenian_ligature_ew", 0x1000587 }, -{ "Armenian_full_stop", 0x1000589 }, -{ "Armenian_verjaket", 0x1000589 }, -{ "Armenian_separation_mark", 0x100055D }, -{ "Armenian_but", 0x100055D }, -{ "Armenian_hyphen", 0x100058A }, -{ "Armenian_yentamna", 0x100058A }, -{ "Armenian_exclam", 0x100055C }, -{ "Armenian_amanak", 0x100055C }, -{ "Armenian_accent", 0x100055B }, -{ "Armenian_shesht", 0x100055B }, -{ "Armenian_question", 0x100055E }, -{ "Armenian_paruyk", 0x100055E }, -{ "Armenian_AYB", 0x1000531 }, -{ "Armenian_ayb", 0x1000561 }, -{ "Armenian_BEN", 0x1000532 }, -{ "Armenian_ben", 0x1000562 }, -{ "Armenian_GIM", 0x1000533 }, -{ "Armenian_gim", 0x1000563 }, -{ "Armenian_DA", 0x1000534 }, -{ "Armenian_da", 0x1000564 }, -{ "Armenian_YECH", 0x1000535 }, -{ "Armenian_yech", 0x1000565 }, -{ "Armenian_ZA", 0x1000536 }, -{ "Armenian_za", 0x1000566 }, -{ "Armenian_E", 0x1000537 }, -{ "Armenian_e", 0x1000567 }, -{ "Armenian_AT", 0x1000538 }, -{ "Armenian_at", 0x1000568 }, -{ "Armenian_TO", 0x1000539 }, -{ "Armenian_to", 0x1000569 }, -{ "Armenian_ZHE", 0x100053A }, -{ "Armenian_zhe", 0x100056A }, -{ "Armenian_INI", 0x100053B }, -{ "Armenian_ini", 0x100056B }, -{ "Armenian_LYUN", 0x100053C }, -{ "Armenian_lyun", 0x100056C }, -{ "Armenian_KHE", 0x100053D }, -{ "Armenian_khe", 0x100056D }, -{ "Armenian_TSA", 0x100053E }, -{ "Armenian_tsa", 0x100056E }, -{ "Armenian_KEN", 0x100053F }, -{ "Armenian_ken", 0x100056F }, -{ "Armenian_HO", 0x1000540 }, -{ "Armenian_ho", 0x1000570 }, -{ "Armenian_DZA", 0x1000541 }, -{ "Armenian_dza", 0x1000571 }, -{ "Armenian_GHAT", 0x1000542 }, -{ "Armenian_ghat", 0x1000572 }, -{ "Armenian_TCHE", 0x1000543 }, -{ "Armenian_tche", 0x1000573 }, -{ "Armenian_MEN", 0x1000544 }, -{ "Armenian_men", 0x1000574 }, -{ "Armenian_HI", 0x1000545 }, -{ "Armenian_hi", 0x1000575 }, -{ "Armenian_NU", 0x1000546 }, -{ "Armenian_nu", 0x1000576 }, -{ "Armenian_SHA", 0x1000547 }, -{ "Armenian_sha", 0x1000577 }, -{ "Armenian_VO", 0x1000548 }, -{ "Armenian_vo", 0x1000578 }, -{ "Armenian_CHA", 0x1000549 }, -{ "Armenian_cha", 0x1000579 }, -{ "Armenian_PE", 0x100054A }, -{ "Armenian_pe", 0x100057A }, -{ "Armenian_JE", 0x100054B }, -{ "Armenian_je", 0x100057B }, -{ "Armenian_RA", 0x100054C }, -{ "Armenian_ra", 0x100057C }, -{ "Armenian_SE", 0x100054D }, -{ "Armenian_se", 0x100057D }, -{ "Armenian_VEV", 0x100054E }, -{ "Armenian_vev", 0x100057E }, -{ "Armenian_TYUN", 0x100054F }, -{ "Armenian_tyun", 0x100057F }, -{ "Armenian_RE", 0x1000550 }, -{ "Armenian_re", 0x1000580 }, -{ "Armenian_TSO", 0x1000551 }, -{ "Armenian_tso", 0x1000581 }, -{ "Armenian_VYUN", 0x1000552 }, -{ "Armenian_vyun", 0x1000582 }, -{ "Armenian_PYUR", 0x1000553 }, -{ "Armenian_pyur", 0x1000583 }, -{ "Armenian_KE", 0x1000554 }, -{ "Armenian_ke", 0x1000584 }, -{ "Armenian_O", 0x1000555 }, -{ "Armenian_o", 0x1000585 }, -{ "Armenian_FE", 0x1000556 }, -{ "Armenian_fe", 0x1000586 }, -{ "Armenian_apostrophe", 0x100055A }, -{ "Georgian_an", 0x10010D0 }, -{ "Georgian_ban", 0x10010D1 }, -{ "Georgian_gan", 0x10010D2 }, -{ "Georgian_don", 0x10010D3 }, -{ "Georgian_en", 0x10010D4 }, -{ "Georgian_vin", 0x10010D5 }, -{ "Georgian_zen", 0x10010D6 }, -{ "Georgian_tan", 0x10010D7 }, -{ "Georgian_in", 0x10010D8 }, -{ "Georgian_kan", 0x10010D9 }, -{ "Georgian_las", 0x10010DA }, -{ "Georgian_man", 0x10010DB }, -{ "Georgian_nar", 0x10010DC }, -{ "Georgian_on", 0x10010DD }, -{ "Georgian_par", 0x10010DE }, -{ "Georgian_zhar", 0x10010DF }, -{ "Georgian_rae", 0x10010E0 }, -{ "Georgian_san", 0x10010E1 }, -{ "Georgian_tar", 0x10010E2 }, -{ "Georgian_un", 0x10010E3 }, -{ "Georgian_phar", 0x10010E4 }, -{ "Georgian_khar", 0x10010E5 }, -{ "Georgian_ghan", 0x10010E6 }, -{ "Georgian_qar", 0x10010E7 }, -{ "Georgian_shin", 0x10010E8 }, -{ "Georgian_chin", 0x10010E9 }, -{ "Georgian_can", 0x10010EA }, -{ "Georgian_jil", 0x10010EB }, -{ "Georgian_cil", 0x10010EC }, -{ "Georgian_char", 0x10010ED }, -{ "Georgian_xan", 0x10010EE }, -{ "Georgian_jhan", 0x10010EF }, -{ "Georgian_hae", 0x10010F0 }, -{ "Georgian_he", 0x10010F1 }, -{ "Georgian_hie", 0x10010F2 }, -{ "Georgian_we", 0x10010F3 }, -{ "Georgian_har", 0x10010F4 }, -{ "Georgian_hoe", 0x10010F5 }, -{ "Georgian_fi", 0x10010F6 }, -{ "Xabovedot", 0x1001E8A }, -{ "Ibreve", 0x100012C }, -{ "Zstroke", 0x10001B5 }, -{ "Gcaron", 0x10001E6 }, -{ "Ocaron", 0x10001D1 }, -{ "Obarred", 0x100019F }, -{ "xabovedot", 0x1001E8B }, -{ "ibreve", 0x100012D }, -{ "zstroke", 0x10001B6 }, -{ "gcaron", 0x10001E7 }, -{ "ocaron", 0x10001D2 }, -{ "obarred", 0x1000275 }, -{ "SCHWA", 0x100018F }, -{ "schwa", 0x1000259 }, -{ "EZH", 0x10001B7 }, -{ "ezh", 0x1000292 }, -{ "Lbelowdot", 0x1001E36 }, -{ "lbelowdot", 0x1001E37 }, -{ "Abelowdot", 0x1001EA0 }, -{ "abelowdot", 0x1001EA1 }, -{ "Ahook", 0x1001EA2 }, -{ "ahook", 0x1001EA3 }, -{ "Acircumflexacute", 0x1001EA4 }, -{ "acircumflexacute", 0x1001EA5 }, -{ "Acircumflexgrave", 0x1001EA6 }, -{ "acircumflexgrave", 0x1001EA7 }, -{ "Acircumflexhook", 0x1001EA8 }, -{ "acircumflexhook", 0x1001EA9 }, -{ "Acircumflextilde", 0x1001EAA }, -{ "acircumflextilde", 0x1001EAB }, -{ "Acircumflexbelowdot", 0x1001EAC }, -{ "acircumflexbelowdot", 0x1001EAD }, -{ "Abreveacute", 0x1001EAE }, -{ "abreveacute", 0x1001EAF }, -{ "Abrevegrave", 0x1001EB0 }, -{ "abrevegrave", 0x1001EB1 }, -{ "Abrevehook", 0x1001EB2 }, -{ "abrevehook", 0x1001EB3 }, -{ "Abrevetilde", 0x1001EB4 }, -{ "abrevetilde", 0x1001EB5 }, -{ "Abrevebelowdot", 0x1001EB6 }, -{ "abrevebelowdot", 0x1001EB7 }, -{ "Ebelowdot", 0x1001EB8 }, -{ "ebelowdot", 0x1001EB9 }, -{ "Ehook", 0x1001EBA }, -{ "ehook", 0x1001EBB }, -{ "Etilde", 0x1001EBC }, -{ "etilde", 0x1001EBD }, -{ "Ecircumflexacute", 0x1001EBE }, -{ "ecircumflexacute", 0x1001EBF }, -{ "Ecircumflexgrave", 0x1001EC0 }, -{ "ecircumflexgrave", 0x1001EC1 }, -{ "Ecircumflexhook", 0x1001EC2 }, -{ "ecircumflexhook", 0x1001EC3 }, -{ "Ecircumflextilde", 0x1001EC4 }, -{ "ecircumflextilde", 0x1001EC5 }, -{ "Ecircumflexbelowdot", 0x1001EC6 }, -{ "ecircumflexbelowdot", 0x1001EC7 }, -{ "Ihook", 0x1001EC8 }, -{ "ihook", 0x1001EC9 }, -{ "Ibelowdot", 0x1001ECA }, -{ "ibelowdot", 0x1001ECB }, -{ "Obelowdot", 0x1001ECC }, -{ "obelowdot", 0x1001ECD }, -{ "Ohook", 0x1001ECE }, -{ "ohook", 0x1001ECF }, -{ "Ocircumflexacute", 0x1001ED0 }, -{ "ocircumflexacute", 0x1001ED1 }, -{ "Ocircumflexgrave", 0x1001ED2 }, -{ "ocircumflexgrave", 0x1001ED3 }, -{ "Ocircumflexhook", 0x1001ED4 }, -{ "ocircumflexhook", 0x1001ED5 }, -{ "Ocircumflextilde", 0x1001ED6 }, -{ "ocircumflextilde", 0x1001ED7 }, -{ "Ocircumflexbelowdot", 0x1001ED8 }, -{ "ocircumflexbelowdot", 0x1001ED9 }, -{ "Ohornacute", 0x1001EDA }, -{ "ohornacute", 0x1001EDB }, -{ "Ohorngrave", 0x1001EDC }, -{ "ohorngrave", 0x1001EDD }, -{ "Ohornhook", 0x1001EDE }, -{ "ohornhook", 0x1001EDF }, -{ "Ohorntilde", 0x1001EE0 }, -{ "ohorntilde", 0x1001EE1 }, -{ "Ohornbelowdot", 0x1001EE2 }, -{ "ohornbelowdot", 0x1001EE3 }, -{ "Ubelowdot", 0x1001EE4 }, -{ "ubelowdot", 0x1001EE5 }, -{ "Uhook", 0x1001EE6 }, -{ "uhook", 0x1001EE7 }, -{ "Uhornacute", 0x1001EE8 }, -{ "uhornacute", 0x1001EE9 }, -{ "Uhorngrave", 0x1001EEA }, -{ "uhorngrave", 0x1001EEB }, -{ "Uhornhook", 0x1001EEC }, -{ "uhornhook", 0x1001EED }, -{ "Uhorntilde", 0x1001EEE }, -{ "uhorntilde", 0x1001EEF }, -{ "Uhornbelowdot", 0x1001EF0 }, -{ "uhornbelowdot", 0x1001EF1 }, -{ "Ybelowdot", 0x1001EF4 }, -{ "ybelowdot", 0x1001EF5 }, -{ "Yhook", 0x1001EF6 }, -{ "yhook", 0x1001EF7 }, -{ "Ytilde", 0x1001EF8 }, -{ "ytilde", 0x1001EF9 }, -{ "Ohorn", 0x10001A0 }, -{ "ohorn", 0x10001A1 }, -{ "Uhorn", 0x10001AF }, -{ "uhorn", 0x10001B0 }, -{ "EcuSign", 0x10020A0 }, -{ "ColonSign", 0x10020A1 }, -{ "CruzeiroSign", 0x10020A2 }, -{ "FFrancSign", 0x10020A3 }, -{ "LiraSign", 0x10020A4 }, -{ "MillSign", 0x10020A5 }, -{ "NairaSign", 0x10020A6 }, -{ "PesetaSign", 0x10020A7 }, -{ "RupeeSign", 0x10020A8 }, -{ "WonSign", 0x10020A9 }, -{ "NewSheqelSign", 0x10020AA }, -{ "DongSign", 0x10020AB }, -{ "EuroSign", 0x20AC }, -{ "zerosuperior", 0x1002070 }, -{ "foursuperior", 0x1002074 }, -{ "fivesuperior", 0x1002075 }, -{ "sixsuperior", 0x1002076 }, -{ "sevensuperior", 0x1002077 }, -{ "eightsuperior", 0x1002078 }, -{ "ninesuperior", 0x1002079 }, -{ "zerosubscript", 0x1002080 }, -{ "onesubscript", 0x1002081 }, -{ "twosubscript", 0x1002082 }, -{ "threesubscript", 0x1002083 }, -{ "foursubscript", 0x1002084 }, -{ "fivesubscript", 0x1002085 }, -{ "sixsubscript", 0x1002086 }, -{ "sevensubscript", 0x1002087 }, -{ "eightsubscript", 0x1002088 }, -{ "ninesubscript", 0x1002089 }, -{ "partdifferential", 0x1002202 }, -{ "emptyset", 0x1002205 }, -{ "elementof", 0x1002208 }, -{ "notelementof", 0x1002209 }, -{ "containsas", 0x100220B }, -{ "squareroot", 0x100221A }, -{ "cuberoot", 0x100221B }, -{ "fourthroot", 0x100221C }, -{ "dintegral", 0x100222C }, -{ "tintegral", 0x100222D }, -{ "because", 0x1002235 }, -{ "approxeq", 0x1002248 }, -{ "notapproxeq", 0x1002247 }, -{ "notidentical", 0x1002262 }, -{ "stricteq", 0x1002263 }, { "braille_dot_1", 0xFFF1 }, { "braille_dot_2", 0xFFF2 }, { "braille_dot_3", 0xFFF3 }, { "braille_dot_4", 0xFFF4 }, { "braille_dot_5", 0xFFF5 }, @@ -1847,346 +1482,10 @@ { "braille_dot_6", 0xFFF6 }, { "braille_dot_7", 0xFFF7 }, { "braille_dot_8", 0xFFF8 }, { "braille_dot_9", 0xFFF9 }, { "braille_dot_10", 0xFFFA }, -{ "braille_blank", 0x1002800 }, -{ "braille_dots_1", 0x1002801 }, -{ "braille_dots_2", 0x1002802 }, -{ "braille_dots_12", 0x1002803 }, -{ "braille_dots_3", 0x1002804 }, -{ "braille_dots_13", 0x1002805 }, -{ "braille_dots_23", 0x1002806 }, -{ "braille_dots_123", 0x1002807 }, -{ "braille_dots_4", 0x1002808 }, -{ "braille_dots_14", 0x1002809 }, -{ "braille_dots_24", 0x100280A }, -{ "braille_dots_124", 0x100280B }, -{ "braille_dots_34", 0x100280C }, -{ "braille_dots_134", 0x100280D }, -{ "braille_dots_234", 0x100280E }, -{ "braille_dots_1234", 0x100280F }, -{ "braille_dots_5", 0x1002810 }, -{ "braille_dots_15", 0x1002811 }, -{ "braille_dots_25", 0x1002812 }, -{ "braille_dots_125", 0x1002813 }, -{ "braille_dots_35", 0x1002814 }, -{ "braille_dots_135", 0x1002815 }, -{ "braille_dots_235", 0x1002816 }, -{ "braille_dots_1235", 0x1002817 }, -{ "braille_dots_45", 0x1002818 }, -{ "braille_dots_145", 0x1002819 }, -{ "braille_dots_245", 0x100281A }, -{ "braille_dots_1245", 0x100281B }, -{ "braille_dots_345", 0x100281C }, -{ "braille_dots_1345", 0x100281D }, -{ "braille_dots_2345", 0x100281E }, -{ "braille_dots_12345", 0x100281F }, -{ "braille_dots_6", 0x1002820 }, -{ "braille_dots_16", 0x1002821 }, -{ "braille_dots_26", 0x1002822 }, -{ "braille_dots_126", 0x1002823 }, -{ "braille_dots_36", 0x1002824 }, -{ "braille_dots_136", 0x1002825 }, -{ "braille_dots_236", 0x1002826 }, -{ "braille_dots_1236", 0x1002827 }, -{ "braille_dots_46", 0x1002828 }, -{ "braille_dots_146", 0x1002829 }, -{ "braille_dots_246", 0x100282A }, -{ "braille_dots_1246", 0x100282B }, -{ "braille_dots_346", 0x100282C }, -{ "braille_dots_1346", 0x100282D }, -{ "braille_dots_2346", 0x100282E }, -{ "braille_dots_12346", 0x100282F }, -{ "braille_dots_56", 0x1002830 }, -{ "braille_dots_156", 0x1002831 }, -{ "braille_dots_256", 0x1002832 }, -{ "braille_dots_1256", 0x1002833 }, -{ "braille_dots_356", 0x1002834 }, -{ "braille_dots_1356", 0x1002835 }, -{ "braille_dots_2356", 0x1002836 }, -{ "braille_dots_12356", 0x1002837 }, -{ "braille_dots_456", 0x1002838 }, -{ "braille_dots_1456", 0x1002839 }, -{ "braille_dots_2456", 0x100283A }, -{ "braille_dots_12456", 0x100283B }, -{ "braille_dots_3456", 0x100283C }, -{ "braille_dots_13456", 0x100283D }, -{ "braille_dots_23456", 0x100283E }, -{ "braille_dots_123456", 0x100283F }, -{ "braille_dots_7", 0x1002840 }, -{ "braille_dots_17", 0x1002841 }, -{ "braille_dots_27", 0x1002842 }, -{ "braille_dots_127", 0x1002843 }, -{ "braille_dots_37", 0x1002844 }, -{ "braille_dots_137", 0x1002845 }, -{ "braille_dots_237", 0x1002846 }, -{ "braille_dots_1237", 0x1002847 }, -{ "braille_dots_47", 0x1002848 }, -{ "braille_dots_147", 0x1002849 }, -{ "braille_dots_247", 0x100284A }, -{ "braille_dots_1247", 0x100284B }, -{ "braille_dots_347", 0x100284C }, -{ "braille_dots_1347", 0x100284D }, -{ "braille_dots_2347", 0x100284E }, -{ "braille_dots_12347", 0x100284F }, -{ "braille_dots_57", 0x1002850 }, -{ "braille_dots_157", 0x1002851 }, -{ "braille_dots_257", 0x1002852 }, -{ "braille_dots_1257", 0x1002853 }, -{ "braille_dots_357", 0x1002854 }, -{ "braille_dots_1357", 0x1002855 }, -{ "braille_dots_2357", 0x1002856 }, -{ "braille_dots_12357", 0x1002857 }, -{ "braille_dots_457", 0x1002858 }, -{ "braille_dots_1457", 0x1002859 }, -{ "braille_dots_2457", 0x100285A }, -{ "braille_dots_12457", 0x100285B }, -{ "braille_dots_3457", 0x100285C }, -{ "braille_dots_13457", 0x100285D }, -{ "braille_dots_23457", 0x100285E }, -{ "braille_dots_123457", 0x100285F }, -{ "braille_dots_67", 0x1002860 }, -{ "braille_dots_167", 0x1002861 }, -{ "braille_dots_267", 0x1002862 }, -{ "braille_dots_1267", 0x1002863 }, -{ "braille_dots_367", 0x1002864 }, -{ "braille_dots_1367", 0x1002865 }, -{ "braille_dots_2367", 0x1002866 }, -{ "braille_dots_12367", 0x1002867 }, -{ "braille_dots_467", 0x1002868 }, -{ "braille_dots_1467", 0x1002869 }, -{ "braille_dots_2467", 0x100286A }, -{ "braille_dots_12467", 0x100286B }, -{ "braille_dots_3467", 0x100286C }, -{ "braille_dots_13467", 0x100286D }, -{ "braille_dots_23467", 0x100286E }, -{ "braille_dots_123467", 0x100286F }, -{ "braille_dots_567", 0x1002870 }, -{ "braille_dots_1567", 0x1002871 }, -{ "braille_dots_2567", 0x1002872 }, -{ "braille_dots_12567", 0x1002873 }, -{ "braille_dots_3567", 0x1002874 }, -{ "braille_dots_13567", 0x1002875 }, -{ "braille_dots_23567", 0x1002876 }, -{ "braille_dots_123567", 0x1002877 }, -{ "braille_dots_4567", 0x1002878 }, -{ "braille_dots_14567", 0x1002879 }, -{ "braille_dots_24567", 0x100287A }, -{ "braille_dots_124567", 0x100287B }, -{ "braille_dots_34567", 0x100287C }, -{ "braille_dots_134567", 0x100287D }, -{ "braille_dots_234567", 0x100287E }, -{ "braille_dots_1234567", 0x100287F }, -{ "braille_dots_8", 0x1002880 }, -{ "braille_dots_18", 0x1002881 }, -{ "braille_dots_28", 0x1002882 }, -{ "braille_dots_128", 0x1002883 }, -{ "braille_dots_38", 0x1002884 }, -{ "braille_dots_138", 0x1002885 }, -{ "braille_dots_238", 0x1002886 }, -{ "braille_dots_1238", 0x1002887 }, -{ "braille_dots_48", 0x1002888 }, -{ "braille_dots_148", 0x1002889 }, -{ "braille_dots_248", 0x100288A }, -{ "braille_dots_1248", 0x100288B }, -{ "braille_dots_348", 0x100288C }, -{ "braille_dots_1348", 0x100288D }, -{ "braille_dots_2348", 0x100288E }, -{ "braille_dots_12348", 0x100288F }, -{ "braille_dots_58", 0x1002890 }, -{ "braille_dots_158", 0x1002891 }, -{ "braille_dots_258", 0x1002892 }, -{ "braille_dots_1258", 0x1002893 }, -{ "braille_dots_358", 0x1002894 }, -{ "braille_dots_1358", 0x1002895 }, -{ "braille_dots_2358", 0x1002896 }, -{ "braille_dots_12358", 0x1002897 }, -{ "braille_dots_458", 0x1002898 }, -{ "braille_dots_1458", 0x1002899 }, -{ "braille_dots_2458", 0x100289A }, -{ "braille_dots_12458", 0x100289B }, -{ "braille_dots_3458", 0x100289C }, -{ "braille_dots_13458", 0x100289D }, -{ "braille_dots_23458", 0x100289E }, -{ "braille_dots_123458", 0x100289F }, -{ "braille_dots_68", 0x10028A0 }, -{ "braille_dots_168", 0x10028A1 }, -{ "braille_dots_268", 0x10028A2 }, -{ "braille_dots_1268", 0x10028A3 }, -{ "braille_dots_368", 0x10028A4 }, -{ "braille_dots_1368", 0x10028A5 }, -{ "braille_dots_2368", 0x10028A6 }, -{ "braille_dots_12368", 0x10028A7 }, -{ "braille_dots_468", 0x10028A8 }, -{ "braille_dots_1468", 0x10028A9 }, -{ "braille_dots_2468", 0x10028AA }, -{ "braille_dots_12468", 0x10028AB }, -{ "braille_dots_3468", 0x10028AC }, -{ "braille_dots_13468", 0x10028AD }, -{ "braille_dots_23468", 0x10028AE }, -{ "braille_dots_123468", 0x10028AF }, -{ "braille_dots_568", 0x10028B0 }, -{ "braille_dots_1568", 0x10028B1 }, -{ "braille_dots_2568", 0x10028B2 }, -{ "braille_dots_12568", 0x10028B3 }, -{ "braille_dots_3568", 0x10028B4 }, -{ "braille_dots_13568", 0x10028B5 }, -{ "braille_dots_23568", 0x10028B6 }, -{ "braille_dots_123568", 0x10028B7 }, -{ "braille_dots_4568", 0x10028B8 }, -{ "braille_dots_14568", 0x10028B9 }, -{ "braille_dots_24568", 0x10028BA }, -{ "braille_dots_124568", 0x10028BB }, -{ "braille_dots_34568", 0x10028BC }, -{ "braille_dots_134568", 0x10028BD }, -{ "braille_dots_234568", 0x10028BE }, -{ "braille_dots_1234568", 0x10028BF }, -{ "braille_dots_78", 0x10028C0 }, -{ "braille_dots_178", 0x10028C1 }, -{ "braille_dots_278", 0x10028C2 }, -{ "braille_dots_1278", 0x10028C3 }, -{ "braille_dots_378", 0x10028C4 }, -{ "braille_dots_1378", 0x10028C5 }, -{ "braille_dots_2378", 0x10028C6 }, -{ "braille_dots_12378", 0x10028C7 }, -{ "braille_dots_478", 0x10028C8 }, -{ "braille_dots_1478", 0x10028C9 }, -{ "braille_dots_2478", 0x10028CA }, -{ "braille_dots_12478", 0x10028CB }, -{ "braille_dots_3478", 0x10028CC }, -{ "braille_dots_13478", 0x10028CD }, -{ "braille_dots_23478", 0x10028CE }, -{ "braille_dots_123478", 0x10028CF }, -{ "braille_dots_578", 0x10028D0 }, -{ "braille_dots_1578", 0x10028D1 }, -{ "braille_dots_2578", 0x10028D2 }, -{ "braille_dots_12578", 0x10028D3 }, -{ "braille_dots_3578", 0x10028D4 }, -{ "braille_dots_13578", 0x10028D5 }, -{ "braille_dots_23578", 0x10028D6 }, -{ "braille_dots_123578", 0x10028D7 }, -{ "braille_dots_4578", 0x10028D8 }, -{ "braille_dots_14578", 0x10028D9 }, -{ "braille_dots_24578", 0x10028DA }, -{ "braille_dots_124578", 0x10028DB }, -{ "braille_dots_34578", 0x10028DC }, -{ "braille_dots_134578", 0x10028DD }, -{ "braille_dots_234578", 0x10028DE }, -{ "braille_dots_1234578", 0x10028DF }, -{ "braille_dots_678", 0x10028E0 }, -{ "braille_dots_1678", 0x10028E1 }, -{ "braille_dots_2678", 0x10028E2 }, -{ "braille_dots_12678", 0x10028E3 }, -{ "braille_dots_3678", 0x10028E4 }, -{ "braille_dots_13678", 0x10028E5 }, -{ "braille_dots_23678", 0x10028E6 }, -{ "braille_dots_123678", 0x10028E7 }, -{ "braille_dots_4678", 0x10028E8 }, -{ "braille_dots_14678", 0x10028E9 }, -{ "braille_dots_24678", 0x10028EA }, -{ "braille_dots_124678", 0x10028EB }, -{ "braille_dots_34678", 0x10028EC }, -{ "braille_dots_134678", 0x10028ED }, -{ "braille_dots_234678", 0x10028EE }, -{ "braille_dots_1234678", 0x10028EF }, -{ "braille_dots_5678", 0x10028F0 }, -{ "braille_dots_15678", 0x10028F1 }, -{ "braille_dots_25678", 0x10028F2 }, -{ "braille_dots_125678", 0x10028F3 }, -{ "braille_dots_35678", 0x10028F4 }, -{ "braille_dots_135678", 0x10028F5 }, -{ "braille_dots_235678", 0x10028F6 }, -{ "braille_dots_1235678", 0x10028F7 }, -{ "braille_dots_45678", 0x10028F8 }, -{ "braille_dots_145678", 0x10028F9 }, -{ "braille_dots_245678", 0x10028FA }, -{ "braille_dots_1245678", 0x10028FB }, -{ "braille_dots_345678", 0x10028FC }, -{ "braille_dots_1345678", 0x10028FD }, -{ "braille_dots_2345678", 0x10028FE }, -{ "braille_dots_12345678", 0x10028FF }, -{ "Sinh_ng", 0x1000D82 }, -{ "Sinh_h2", 0x1000D83 }, -{ "Sinh_a", 0x1000D85 }, -{ "Sinh_aa", 0x1000D86 }, -{ "Sinh_ae", 0x1000D87 }, -{ "Sinh_aee", 0x1000D88 }, -{ "Sinh_i", 0x1000D89 }, -{ "Sinh_ii", 0x1000D8A }, -{ "Sinh_u", 0x1000D8B }, -{ "Sinh_uu", 0x1000D8C }, -{ "Sinh_ri", 0x1000D8D }, -{ "Sinh_rii", 0x1000D8E }, -{ "Sinh_lu", 0x1000D8F }, -{ "Sinh_luu", 0x1000D90 }, -{ "Sinh_e", 0x1000D91 }, -{ "Sinh_ee", 0x1000D92 }, -{ "Sinh_ai", 0x1000D93 }, -{ "Sinh_o", 0x1000D94 }, -{ "Sinh_oo", 0x1000D95 }, -{ "Sinh_au", 0x1000D96 }, -{ "Sinh_ka", 0x1000D9A }, -{ "Sinh_kha", 0x1000D9B }, -{ "Sinh_ga", 0x1000D9C }, -{ "Sinh_gha", 0x1000D9D }, -{ "Sinh_ng2", 0x1000D9E }, -{ "Sinh_nga", 0x1000D9F }, -{ "Sinh_ca", 0x1000DA0 }, -{ "Sinh_cha", 0x1000DA1 }, -{ "Sinh_ja", 0x1000DA2 }, -{ "Sinh_jha", 0x1000DA3 }, -{ "Sinh_nya", 0x1000DA4 }, -{ "Sinh_jnya", 0x1000DA5 }, -{ "Sinh_nja", 0x1000DA6 }, -{ "Sinh_tta", 0x1000DA7 }, -{ "Sinh_ttha", 0x1000DA8 }, -{ "Sinh_dda", 0x1000DA9 }, -{ "Sinh_ddha", 0x1000DAA }, -{ "Sinh_nna", 0x1000DAB }, -{ "Sinh_ndda", 0x1000DAC }, -{ "Sinh_tha", 0x1000DAD }, -{ "Sinh_thha", 0x1000DAE }, -{ "Sinh_dha", 0x1000DAF }, -{ "Sinh_dhha", 0x1000DB0 }, -{ "Sinh_na", 0x1000DB1 }, -{ "Sinh_ndha", 0x1000DB3 }, -{ "Sinh_pa", 0x1000DB4 }, -{ "Sinh_pha", 0x1000DB5 }, -{ "Sinh_ba", 0x1000DB6 }, -{ "Sinh_bha", 0x1000DB7 }, -{ "Sinh_ma", 0x1000DB8 }, -{ "Sinh_mba", 0x1000DB9 }, -{ "Sinh_ya", 0x1000DBA }, -{ "Sinh_ra", 0x1000DBB }, -{ "Sinh_la", 0x1000DBD }, -{ "Sinh_va", 0x1000DC0 }, -{ "Sinh_sha", 0x1000DC1 }, -{ "Sinh_ssha", 0x1000DC2 }, -{ "Sinh_sa", 0x1000DC3 }, -{ "Sinh_ha", 0x1000DC4 }, -{ "Sinh_lla", 0x1000DC5 }, -{ "Sinh_fa", 0x1000DC6 }, -{ "Sinh_al", 0x1000DCA }, -{ "Sinh_aa2", 0x1000DCF }, -{ "Sinh_ae2", 0x1000DD0 }, -{ "Sinh_aee2", 0x1000DD1 }, -{ "Sinh_i2", 0x1000DD2 }, -{ "Sinh_ii2", 0x1000DD3 }, -{ "Sinh_u2", 0x1000DD4 }, -{ "Sinh_uu2", 0x1000DD6 }, -{ "Sinh_ru2", 0x1000DD8 }, -{ "Sinh_e2", 0x1000DD9 }, -{ "Sinh_ee2", 0x1000DDA }, -{ "Sinh_ai2", 0x1000DDB }, -{ "Sinh_o2", 0x1000DDC }, -{ "Sinh_oo2", 0x1000DDD }, -{ "Sinh_au2", 0x1000DDE }, -{ "Sinh_lu2", 0x1000DDF }, -{ "Sinh_ruu2", 0x1000DF2 }, -{ "Sinh_luu2", 0x1000DF3 }, -{ "Sinh_kunddaliya", 0x1000DF4 }, { "XF86ModeLock", 0x1008FF01 }, { "XF86MonBrightnessUp", 0x1008FF02 }, { "XF86MonBrightnessDown", 0x1008FF03 }, { "XF86KbdLightOnOff", 0x1008FF04 }, { "XF86KbdBrightnessUp", 0x1008FF05 }, Index: generic/nanosvg.h ================================================================== --- generic/nanosvg.h +++ generic/nanosvg.h @@ -31,26 +31,27 @@ #ifdef __cplusplus extern "C" { #endif -// NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes. -// -// The library suits well for anything from rendering scalable icons in your editor application to prototyping a game. -// -// NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request! -// -// The shapes in the SVG images are transformed by the viewBox and converted to specified units. -// That is, you should get the same looking data as your designed in your favorite app. -// -// NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose -// to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters. -// -// The units passed to NanoSVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'. -// DPI (dots-per-inch) controls how the unit conversion is done. -// -// If you don't know or care about the units stuff, "px" and 96 should get you going. +/* NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes. + * + * The library suits well for anything from rendering scalable icons in your editor application to prototyping a game. + * + * NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request! + * + * The shapes in the SVG images are transformed by the viewBox and converted to specified units. + * That is, you should get the same looking data as your designed in your favorite app. + * + * NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose + * to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters. + * + * The units passed to NanoSVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'. + * DPI (dots-per-inch) controls how the unit conversion is done. + * + * If you don't know or care about the units stuff, "px" and 96 should get you going. + */ /* Example Usage: // Load SVG NSVGimage* image; @@ -83,11 +84,11 @@ #ifndef NANOSVG_free #define NANOSVG_free free #endif -// float emulation for MS VC6++ compiler +/* float emulation for MS VC6++ compiler */ #if defined(_MSC_VER) && (_MSC_VER == 1200) #define tanf(a) (float)tan(a) #define cosf(a) (float)cos(a) #define sinf(a) (float)sin(a) #define sqrtf(a) (float)sqrt(a) @@ -96,11 +97,11 @@ #define atan2f(a,b) (float)atan2(a,b) #define ceilf(a) (float)ceil(a) #define fmodf(a,b) (float)fmod(a,b) #define floorf(a) (float)floor(a) #endif -// float emulation for MS VC8++ compiler +/* float emulation for MS VC8++ compiler */ #if defined(_MSC_VER) && (_MSC_VER == 1400) #define fabsf(a) (float)fabs(a) #endif enum NSVGpaintType { @@ -158,68 +159,68 @@ }; } NSVGpaint; typedef struct NSVGpath { - float* pts; // Cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ... - int npts; // Total number of bezier points. - char closed; // Flag indicating if shapes should be treated as closed. - float bounds[4]; // Tight bounding box of the shape [minx,miny,maxx,maxy]. - struct NSVGpath* next; // Pointer to next path, or NULL if last element. + float* pts; /* Cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ... */ + int npts; /* Total number of bezier points. */ + char closed; /* Flag indicating if shapes should be treated as closed. */ + float bounds[4]; /* Tight bounding box of the shape [minx,miny,maxx,maxy]. */ + struct NSVGpath* next; /* Pointer to next path, or NULL if last element. */ } NSVGpath; typedef struct NSVGshape { - char id[64]; // Optional 'id' attr of the shape or its group - NSVGpaint fill; // Fill paint - NSVGpaint stroke; // Stroke paint - float opacity; // Opacity of the shape. - float strokeWidth; // Stroke width (scaled). - float strokeDashOffset; // Stroke dash offset (scaled). - float strokeDashArray[8]; // Stroke dash array (scaled). - char strokeDashCount; // Number of dash values in dash array. - char strokeLineJoin; // Stroke join type. - char strokeLineCap; // Stroke cap type. - float miterLimit; // Miter limit - char fillRule; // Fill rule, see NSVGfillRule. - unsigned char flags; // Logical or of NSVG_FLAGS_* flags - float bounds[4]; // Tight bounding box of the shape [minx,miny,maxx,maxy]. - NSVGpath* paths; // Linked list of paths in the image. - struct NSVGshape* next; // Pointer to next shape, or NULL if last element. + char id[64]; /* Optional 'id' attr of the shape or its group */ + NSVGpaint fill; /* Fill paint */ + NSVGpaint stroke; /* Stroke paint */ + float opacity; /* Opacity of the shape. */ + float strokeWidth; /* Stroke width (scaled). */ + float strokeDashOffset; /* Stroke dash offset (scaled). */ + float strokeDashArray[8]; /* Stroke dash array (scaled). */ + char strokeDashCount; /* Number of dash values in dash array. */ + char strokeLineJoin; /* Stroke join type. */ + char strokeLineCap; /* Stroke cap type. */ + float miterLimit; /* Miter limit */ + char fillRule; /* Fill rule, see NSVGfillRule. */ + unsigned char flags; /* Logical or of NSVG_FLAGS_* flags */ + float bounds[4]; /* Tight bounding box of the shape [minx,miny,maxx,maxy]. */ + NSVGpath* paths; /* Linked list of paths in the image. */ + struct NSVGshape* next; /* Pointer to next shape, or NULL if last element. */ } NSVGshape; typedef struct NSVGimage { - float width; // Width of the image. - float height; // Height of the image. - NSVGshape* shapes; // Linked list of shapes in the image. + float width; /* Width of the image. */ + float height; /* Height of the image. */ + NSVGshape* shapes; /* Linked list of shapes in the image. */ } NSVGimage; -// Parses SVG file from a file, returns SVG image as paths. +/* Parses SVG file from a file, returns SVG image as paths. */ NANOSVG_SCOPE NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi); -// Parses SVG file from a null terminated string, returns SVG image as paths. -// Important note: changes the string. +/* Parses SVG file from a null terminated string, returns SVG image as paths. */ +/* Important note: changes the string. */ NANOSVG_SCOPE NSVGimage* nsvgParse(char* input, const char* units, float dpi); -// Deletes list of paths. +/* Deletes list of paths. */ NANOSVG_SCOPE void nsvgDelete(NSVGimage* image); #ifdef __cplusplus } #endif -#endif // NANOSVG_H +#endif /* NANOSVG_H */ #ifdef NANOSVG_IMPLEMENTATION #include #include #include #define NSVG_PI (3.14159265358979323846264338327f) -#define NSVG_KAPPA90 (0.5522847493f) // Length proportional to radius of a cubic bezier handle for 90deg arcs. +#define NSVG_KAPPA90 (0.5522847493f) /* Length proportional to radius of a cubic bezier handle for 90deg arcs. */ #define NSVG_ALIGN_MIN 0 #define NSVG_ALIGN_MID 1 #define NSVG_ALIGN_MAX 2 #define NSVG_ALIGN_NONE 0 @@ -228,18 +229,18 @@ #define NSVG_NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); } while(0) #define NSVG_RGB(r, g, b) (((unsigned int)r) | ((unsigned int)g << 8) | ((unsigned int)b << 16)) #ifdef _MSC_VER - #pragma warning (disable: 4996) // Switch off security warnings - #pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings + #pragma warning (disable: 4996) /* Switch off security warnings */ + #pragma warning (disable: 4100) /* Switch off unreferenced formal parameter warnings */ #ifdef __cplusplus #define NSVG_INLINE inline #else #define NSVG_INLINE #endif - #if !defined(strtoll) // old MSVC versions do not have strtoll() + #if !defined(strtoll) /* old MSVC versions do not have strtoll() */ #define strtoll _strtoi64 #endif #else #define NSVG_INLINE inline #endif @@ -257,21 +258,21 @@ static NSVG_INLINE float nsvg__minf(float a, float b) { return a < b ? a : b; } static NSVG_INLINE float nsvg__maxf(float a, float b) { return a > b ? a : b; } -// Simple XML parser +/* Simple XML parser */ #define NSVG_XML_TAG 1 #define NSVG_XML_CONTENT 2 #define NSVG_XML_MAX_ATTRIBS 256 static void nsvg__parseContent(char* s, void (*contentCb)(void* ud, const char* s), void* ud) { - // Trim start white spaces + /* Trim start white spaces */ while (*s && nsvg__isspace(*s)) s++; if (!*s) return; if (contentCb) (*contentCb)(ud, s); @@ -287,68 +288,68 @@ char* cbname; int start = 0; int end = 0; char quote; - // Skip white space after the '<' + /* Skip white space after the '<' */ while (*s && nsvg__isspace(*s)) s++; - // Check if the tag is end tag + /* Check if the tag is end tag */ if (*s == '/') { s++; end = 1; } else { start = 1; } - // Skip comments, data and preprocessor stuff. + /* Skip comments, data and preprocessor stuff. */ if (!*s || *s == '?' || *s == '!') return; - // Get tag name + /* Get tag name */ cbname = s; while (*s && !nsvg__isspace(*s)) s++; if (*s) { *s++ = '\0'; } - // Get attribs + /* Get attribs */ while (!end && *s && nattr < NSVG_XML_MAX_ATTRIBS-3) { char* name = NULL; char* value = NULL; - // Skip white space before the attrib name + /* Skip white space before the attrib name */ while (*s && nsvg__isspace(*s)) s++; if (!*s) break; if (*s == '/') { end = 1; break; } name = s; - // Find end of the attrib name. + /* Find end of the attrib name. */ while (*s && !nsvg__isspace(*s) && *s != '=') s++; if (*s) { *s++ = '\0'; } - // Skip until the beginning of the value. + /* Skip until the beginning of the value. */ while (*s && *s != '\"' && *s != '\'') s++; if (!*s) break; quote = *s; s++; - // Store value and find the end of it. + /* Store value and find the end of it. */ value = s; while (*s && *s != quote) s++; if (*s) { *s++ = '\0'; } - // Store only well formed attributes + /* Store only well formed attributes */ if (name && value) { attr[nattr++] = name; attr[nattr++] = value; } } - // List terminator + /* List terminator */ attr[nattr++] = 0; attr[nattr++] = 0; - // Call callbacks. + /* Call callbacks. */ if (start && startelCb) (*startelCb)(ud, cbname, attr); if (end && endelCb) (*endelCb)(ud, cbname); } @@ -363,17 +364,17 @@ char* s = input; char* mark = s; int state = NSVG_XML_CONTENT; while (*s) { if (*s == '<' && state == NSVG_XML_CONTENT) { - // Start of a tag + /* Start of a tag */ *s++ = '\0'; nsvg__parseContent(mark, contentCb, ud); mark = s; state = NSVG_XML_TAG; } else if (*s == '>' && state == NSVG_XML_TAG) { - // Start of a content or new tag. + /* Start of a content or new tag. */ *s++ = '\0'; nsvg__parseContent(mark, contentCb, ud); nsvg__parseElement(mark, startelCb, endelCb, ud); mark = s; state = NSVG_XML_CONTENT; @@ -613,22 +614,22 @@ float* v0 = &curve[0]; float* v1 = &curve[2]; float* v2 = &curve[4]; float* v3 = &curve[6]; - // Start the bounding box by end points + /* Start the bounding box by end points */ bounds[0] = nsvg__minf(v0[0], v3[0]); bounds[1] = nsvg__minf(v0[1], v3[1]); bounds[2] = nsvg__maxf(v0[0], v3[0]); bounds[3] = nsvg__maxf(v0[1], v3[1]); - // Bezier curve fits inside the convex hull of it's control points. - // If control points are inside the bounds, we're done. + /* Bezier curve fits inside the convex hull of it's control points. */ + /* If control points are inside the bounds, we're done. */ if (nsvg__ptInBounds(v1, bounds) && nsvg__ptInBounds(v2, bounds)) return; - // Add bezier curve inflection points in X and Y. + /* Add bezier curve inflection points in X and Y. */ for (i = 0; i < 2; i++) { a = -3.0 * v0[i] + 9.0 * v1[i] - 9.0 * v2[i] + 3.0 * v3[i]; b = 6.0 * v0[i] - 12.0 * v1[i] + 6.0 * v2[i]; c = 3.0 * v1[i] - 3.0 * v0[i]; count = 0; @@ -666,11 +667,11 @@ p->image = (NSVGimage*)NANOSVG_malloc(sizeof(NSVGimage)); if (p->image == NULL) goto error; memset(p->image, 0, sizeof(NSVGimage)); - // Init style + /* Init style */ nsvg__xformIdentity(p->attr[0].xform); memset(p->attr[0].id, 0, sizeof p->attr[0].id); p->attr[0].fillColor = NSVG_RGB(0,0,0); p->attr[0].strokeColor = NSVG_RGB(0,0,0); p->attr[0].opacity = 1; @@ -852,11 +853,11 @@ case NSVG_UNITS_PC: return c.value / 6.0f * p->dpi; case NSVG_UNITS_MM: return c.value / 25.4f * p->dpi; case NSVG_UNITS_CM: return c.value / 2.54f * p->dpi; case NSVG_UNITS_IN: return c.value * p->dpi; case NSVG_UNITS_EM: return c.value * attr->fontSize; - case NSVG_UNITS_EX: return c.value * attr->fontSize * 0.52f; // x-height of Helvetica. + case NSVG_UNITS_EX: return c.value * attr->fontSize * 0.52f; /* x-height of Helvetica. */ case NSVG_UNITS_PERCENT: return orig + c.value / 100.0f * length; default: return c.value; } return c.value; } @@ -886,11 +887,11 @@ int refIter; data = nsvg__findGradientData(p, id); if (data == NULL) return NULL; - // TODO: use ref to fill in all unset values too. + /* TODO: use ref to fill in all unset values too. */ ref = data; refIter = 0; while (ref != NULL) { NSVGgradientData* nextRef = NULL; if (stops == NULL && ref->stops != NULL) { @@ -897,21 +898,21 @@ stops = ref->stops; nstops = ref->nstops; break; } nextRef = nsvg__findGradientData(p, ref->ref); - if (nextRef == ref) break; // prevent infite loops on malformed data + if (nextRef == ref) break; /* prevent infite loops on malformed data */ ref = nextRef; refIter++; - if (refIter > 32) break; // prevent infite loops on malformed data + if (refIter > 32) break; /* prevent infite loops on malformed data */ } if (stops == NULL) return NULL; grad = (NSVGgradient*)NANOSVG_malloc(sizeof(NSVGgradient) + sizeof(NSVGgradientStop)*(nstops-1)); if (grad == NULL) return NULL; - // The shape width and height. + /* The shape width and height. */ if (data->units == NSVG_OBJECT_SPACE) { ox = localBounds[0]; oy = localBounds[1]; sw = localBounds[2] - localBounds[0]; sh = localBounds[3] - localBounds[1]; @@ -927,11 +928,11 @@ float x1, y1, x2, y2, dx, dy; x1 = nsvg__convertToPixels(p, data->linear.x1, ox, sw); y1 = nsvg__convertToPixels(p, data->linear.y1, oy, sh); x2 = nsvg__convertToPixels(p, data->linear.x2, ox, sw); y2 = nsvg__convertToPixels(p, data->linear.y2, oy, sh); - // Calculate transform aligned to the line + /* Calculate transform aligned to the line */ dx = x2 - x1; dy = y2 - y1; grad->xform[0] = dy; grad->xform[1] = -dx; grad->xform[2] = dx; grad->xform[3] = dy; grad->xform[4] = x1; grad->xform[5] = y1; @@ -940,11 +941,11 @@ cx = nsvg__convertToPixels(p, data->radial.cx, ox, sw); cy = nsvg__convertToPixels(p, data->radial.cy, oy, sh); fx = nsvg__convertToPixels(p, data->radial.fx, ox, sw); fy = nsvg__convertToPixels(p, data->radial.fy, oy, sh); r = nsvg__convertToPixels(p, data->radial.r, 0, sl); - // Calculate transform aligned to the circle + /* Calculate transform aligned to the circle */ grad->xform[0] = r; grad->xform[1] = 0; grad->xform[2] = 0; grad->xform[3] = r; grad->xform[4] = cx; grad->xform[5] = cy; grad->fx = fx / r; grad->fy = fy / r; @@ -1028,11 +1029,11 @@ shape->opacity = attr->opacity; shape->paths = p->plist; p->plist = NULL; - // Calculate shape bounds + /* Calculate shape bounds */ shape->bounds[0] = shape->paths->bounds[0]; shape->bounds[1] = shape->paths->bounds[1]; shape->bounds[2] = shape->paths->bounds[2]; shape->bounds[3] = shape->paths->bounds[3]; for (path = shape->paths->next; path != NULL; path = path->next) { @@ -1040,11 +1041,11 @@ shape->bounds[1] = nsvg__minf(shape->bounds[1], path->bounds[1]); shape->bounds[2] = nsvg__maxf(shape->bounds[2], path->bounds[2]); shape->bounds[3] = nsvg__maxf(shape->bounds[3], path->bounds[3]); } - // Set fill + /* Set fill */ if (attr->hasFill == 0) { shape->fill.type = NSVG_PAINT_NONE; } else if (attr->hasFill == 1) { shape->fill.type = NSVG_PAINT_COLOR; shape->fill.color = attr->fillColor; @@ -1057,11 +1058,11 @@ if (shape->fill.gradient == NULL) { shape->fill.type = NSVG_PAINT_NONE; } } - // Set stroke + /* Set stroke */ if (attr->hasStroke == 0) { shape->stroke.type = NSVG_PAINT_NONE; } else if (attr->hasStroke == 1) { shape->stroke.type = NSVG_PAINT_COLOR; shape->stroke.color = attr->strokeColor; @@ -1073,14 +1074,14 @@ shape->stroke.gradient = nsvg__createGradient(p, attr->strokeGradient, localBounds, &shape->stroke.type); if (shape->stroke.gradient == NULL) shape->stroke.type = NSVG_PAINT_NONE; } - // Set flags + /* Set flags */ shape->flags = ((attr->visible & NSVG_VIS_DISPLAY) && (attr->visible & NSVG_VIS_VISIBLE) ? NSVG_FLAGS_VISIBLE : 0x00); - // Add to tail + /* Add to tail */ if (p->image->shapes == NULL) p->image->shapes = shape; else p->shapesTail->next = shape; p->shapesTail = shape; @@ -1103,11 +1104,11 @@ return; if (closed) nsvg__lineTo(p, p->pts[0], p->pts[1]); - // Expect 1 + N*3 points (N = number of cubic bezier segments). + /* Expect 1 + N*3 points (N = number of cubic bezier segments). */ if ((p->npts % 3) != 1) return; path = (NSVGpath*)NANOSVG_malloc(sizeof(NSVGpath)); if (path == NULL) goto error; @@ -1116,15 +1117,15 @@ path->pts = (float*)NANOSVG_malloc(p->npts*2*sizeof(float)); if (path->pts == NULL) goto error; path->closed = closed; path->npts = p->npts; - // Transform path. + /* Transform path. */ for (i = 0; i < p->npts; ++i) nsvg__xformPoint(&path->pts[i*2], &path->pts[i*2+1], p->pts[i*2], p->pts[i*2+1], attr->xform); - // Find bounds + /* Find bounds */ for (i = 0; i < path->npts-1; i += 3) { curve = &path->pts[i*2]; nsvg__curveBounds(bounds, curve); if (i == 0) { path->bounds[0] = bounds[0]; @@ -1149,11 +1150,11 @@ if (path->pts != NULL) NANOSVG_free(path->pts); NANOSVG_free(path); } } -// We roll our own string to float because the std library one uses locale and messes things up. +/* We roll our own string to float because the std library one uses locale and messes things up. */ static double nsvg__atof(const char* s) { char* cur = (char*)s; char* end = NULL; double res = 0.0, sign = 1.0; @@ -1162,21 +1163,21 @@ #else long long intPart = 0, fracPart = 0; #endif char hasIntPart = 0, hasFracPart = 0; - // Parse optional sign + /* Parse optional sign */ if (*cur == '+') { cur++; } else if (*cur == '-') { sign = -1; cur++; } - // Parse integer part + /* Parse integer part */ if (nsvg__isdigit(*cur)) { - // Parse digit sequence + /* Parse digit sequence */ #if defined(_MSC_VER) && (_MSC_VER == 1200) intPart = strtol(cur, &end, 10); #else intPart = strtoll(cur, &end, 10); #endif @@ -1185,15 +1186,15 @@ hasIntPart = 1; cur = end; } } - // Parse fractional part. + /* Parse fractional part. */ if (*cur == '.') { - cur++; // Skip '.' + cur++; /* Skip '.' */ if (nsvg__isdigit(*cur)) { - // Parse digit sequence + /* Parse digit sequence */ #if defined(_MSC_VER) && (_MSC_VER == 1200) fracPart = strtol(cur, &end, 10); #else fracPart = strtoll(cur, &end, 10); #endif @@ -1203,19 +1204,19 @@ cur = end; } } } - // A valid number should have integer or fractional part. + /* A valid number should have integer or fractional part. */ if (!hasIntPart && !hasFracPart) return 0.0; - // Parse optional exponent + /* Parse optional exponent */ if (*cur == 'e' || *cur == 'E') { int expPart = 0; - cur++; // skip 'E' - expPart = strtol(cur, &end, 10); // Parse digit sequence with sign + cur++; /* skip 'E' */ + expPart = strtol(cur, &end, 10); /* Parse digit sequence with sign */ if (cur != end) { res *= pow(10.0, (double)expPart); } } @@ -1226,31 +1227,31 @@ static const char* nsvg__parseNumber(const char* s, char* it, const int size) { const int last = size-1; int i = 0; - // sign + /* sign */ if (*s == '-' || *s == '+') { if (i < last) it[i++] = *s; s++; } - // integer part + /* integer part */ while (*s && nsvg__isdigit(*s)) { if (i < last) it[i++] = *s; s++; } if (*s == '.') { - // decimal point + /* decimal point */ if (i < last) it[i++] = *s; s++; - // fraction part + /* fraction part */ while (*s && nsvg__isdigit(*s)) { if (i < last) it[i++] = *s; s++; } } - // exponent + /* exponent */ if (*s == 'e' || *s == 'E') { if (i < last) it[i++] = *s; s++; if (*s == '-' || *s == '+') { if (i < last) it[i++] = *s; @@ -1267,17 +1268,17 @@ } static const char* nsvg__getNextPathItem(const char* s, char* it) { it[0] = '\0'; - // Skip white spaces and commas + /* Skip white spaces and commas */ while (*s && (nsvg__isspace(*s) || *s == ',')) s++; if (!*s) return s; if (*s == '-' || *s == '+' || *s == '.' || nsvg__isdigit(*s)) { s = nsvg__parseNumber(s, it, 64); } else { - // Parse command + /* Parse command */ it[0] = *s++; it[1] = '\0'; return s; } @@ -1286,12 +1287,12 @@ static unsigned int nsvg__parseColorHex(const char* str) { unsigned int c = 0, r = 0, g = 0, b = 0; int n = 0; - str++; // skip # - // Calculate number of characters. + str++; /* skip # */ + /* Calculate number of characters. */ while(str[n] && !nsvg__isspace(str[n])) n++; if (n == 6) { sscanf(str, "%x", &c); } else if (n == 3) { @@ -1541,14 +1542,14 @@ return NSVG_UNITS_USER; } static int nsvg__isCoordinate(const char* s) { - // optional sign + /* optional sign */ if (*s == '-' || *s == '+') s++; - // must have at least one digit + /* must have at least one digit */ return nsvg__isdigit(*s); } static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str) { @@ -1721,11 +1722,11 @@ } static void nsvg__parseUrl(char* id, const char* str) { int i = 0; - str += 4; // "url("; + str += 4; /* "url("; */ if (*str == '#') str++; while (i < 63 && *str != ')') { id[i] = *str++; i++; @@ -1739,11 +1740,11 @@ return NSVG_CAP_BUTT; else if (strcmp(str, "round") == 0) return NSVG_CAP_ROUND; else if (strcmp(str, "square") == 0) return NSVG_CAP_SQUARE; - // TODO: handle inherit. + /* TODO: handle inherit. */ return NSVG_CAP_BUTT; } static char nsvg__parseLineJoin(const char* str) { @@ -1751,31 +1752,31 @@ return NSVG_JOIN_MITER; else if (strcmp(str, "round") == 0) return NSVG_JOIN_ROUND; else if (strcmp(str, "bevel") == 0) return NSVG_JOIN_BEVEL; - // TODO: handle inherit. + /* TODO: handle inherit. */ return NSVG_JOIN_MITER; } static char nsvg__parseFillRule(const char* str) { if (strcmp(str, "nonzero") == 0) return NSVG_FILLRULE_NONZERO; else if (strcmp(str, "evenodd") == 0) return NSVG_FILLRULE_EVENODD; - // TODO: handle inherit. + /* TODO: handle inherit. */ return NSVG_FILLRULE_NONZERO; } static const char* nsvg__getNextDashItem(const char* s, char* it) { int n = 0; it[0] = '\0'; - // Skip white spaces and commas + /* Skip white spaces and commas */ while (*s && (nsvg__isspace(*s) || *s == ',')) s++; - // Advance until whitespace, comma or end. + /* Advance until whitespace, comma or end. */ while (*s && (!nsvg__isspace(*s) && *s != ',')) { if (n < 63) it[n++] = *s; s++; } @@ -1787,15 +1788,15 @@ { char item[64]; int count = 0, i; float sum = 0.0f; - // Handle "none" + /* Handle "none" */ if (str[0] == 'n') return 0; - // Parse dashes + /* Parse dashes */ while (*str) { str = nsvg__getNextDashItem(str, item); if (!*item) break; if (count < NSVG_MAX_DASHES) strokeDashArray[count++] = fabsf(nsvg__parseCoordinate(p, item, 0.0f, nsvg__actualLength(p))); @@ -1820,11 +1821,11 @@ if (strcmp(name, "style") == 0) { nsvg__parseStyle(p, value); } else if (strcmp(name, "display") == 0) { if (strcmp(value, "none") == 0) attr->visible &= ~NSVG_VIS_DISPLAY; - // Don't reset ->visible on display:inline, one display:none hides the whole subtree + /* Don't reset ->visible on display:inline, one display:none hides the whole subtree */ } else if (strcmp(name, "visibility") == 0) { if (strcmp(value, "hidden") == 0) { attr->visible &= ~NSVG_VIS_VISIBLE; } else if (strcmp(value, "visible") == 0) { @@ -1912,11 +1913,11 @@ str = start; while (str < end && *str != ':') ++str; val = str; - // Right Trim + /* Right Trim */ while (str > start && (*str == ':' || nsvg__isspace(*str))) --str; ++str; n = (int)(str - start); if (n > 511) n = 511; @@ -1937,17 +1938,17 @@ { const char* start; const char* end; while (*str) { - // Left Trim + /* Left Trim */ while(*str && nsvg__isspace(*str)) ++str; start = str; while(*str && *str != ';') ++str; end = str; - // Right Trim + /* Right Trim */ while (end > start && (*end == ';' || nsvg__isspace(*end))) --end; ++end; nsvg__parseNameValue(p, start, end); if (*str) ++str; @@ -2118,11 +2119,11 @@ cy = args[1]; x2 = args[2]; y2 = args[3]; } - // Convert to cubic bezier + /* Convert to cubic bezier */ cx1 = x1 + 2.0f/3.0f*(cx - x1); cy1 = y1 + 2.0f/3.0f*(cy - y1); cx2 = x2 + 2.0f/3.0f*(cx - x2); cy2 = y2 + 2.0f/3.0f*(cy - y2); @@ -2151,11 +2152,11 @@ } cx = 2*x1 - *cpx2; cy = 2*y1 - *cpy2; - // Convert to cubix bezier + /* Convert to cubix bezier */ cx1 = x1 + 2.0f/3.0f*(cx - x1); cy1 = y1 + 2.0f/3.0f*(cy - y1); cx2 = x2 + 2.0f/3.0f*(cx - x2); cy2 = y2 + 2.0f/3.0f*(cy - y2); @@ -2183,11 +2184,11 @@ return ((ux*vy < uy*vx) ? -1.0f : 1.0f) * acosf(r); } static void nsvg__pathArcTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel) { - // Ported from canvg (https://code.google.com/p/canvg/) + /* Ported from canvg (https://code.google.com/p/canvg/) */ float rx, ry, rotx; float x1, y1, x2, y2, cx, cy, dx, dy, d; float x1p, y1p, cxp, cyp, s, sa, sb; float ux, uy, vx, vy, a1, da; float x, y, tanx, tany, a, px = 0, py = 0, ptanx = 0, ptany = 0, t[6]; @@ -2194,18 +2195,18 @@ float sinrx, cosrx; int fa, fs; int i, ndivs; float hda, kappa; - rx = fabsf(args[0]); // y radius - ry = fabsf(args[1]); // x radius - rotx = args[2] / 180.0f * NSVG_PI; // x rotation angle - fa = fabsf(args[3]) > 1e-6 ? 1 : 0; // Large arc - fs = fabsf(args[4]) > 1e-6 ? 1 : 0; // Sweep direction - x1 = *cpx; // start point + rx = fabsf(args[0]); /* y radius */ + ry = fabsf(args[1]); /* x radius */ + rotx = args[2] / 180.0f * NSVG_PI; /* x rotation angle */ + fa = fabsf(args[3]) > 1e-6 ? 1 : 0; /* Large arc */ + fs = fabsf(args[4]) > 1e-6 ? 1 : 0; /* Sweep direction */ + x1 = *cpx; /* start point */ y1 = *cpy; - if (rel) { // end point + if (rel) { /* end point */ x2 = *cpx + args[5]; y2 = *cpy + args[6]; } else { x2 = args[5]; y2 = args[6]; @@ -2213,32 +2214,32 @@ dx = x1 - x2; dy = y1 - y2; d = sqrtf(dx*dx + dy*dy); if (d < 1e-6f || rx < 1e-6f || ry < 1e-6f) { - // The arc degenerates to a line + /* The arc degenerates to a line */ nsvg__lineTo(p, x2, y2); *cpx = x2; *cpy = y2; return; } sinrx = sinf(rotx); cosrx = cosf(rotx); - // Convert to center point parameterization. - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - // 1) Compute x1', y1' + /* Convert to center point parameterization. */ + /* http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes */ + /* 1) Compute x1', y1' */ x1p = cosrx * dx / 2.0f + sinrx * dy / 2.0f; y1p = -sinrx * dx / 2.0f + cosrx * dy / 2.0f; d = nsvg__sqr(x1p)/nsvg__sqr(rx) + nsvg__sqr(y1p)/nsvg__sqr(ry); if (d > 1) { d = sqrtf(d); rx *= d; ry *= d; } - // 2) Compute cx', cy' + /* 2) Compute cx', cy' */ s = 0.0f; sa = nsvg__sqr(rx)*nsvg__sqr(ry) - nsvg__sqr(rx)*nsvg__sqr(y1p) - nsvg__sqr(ry)*nsvg__sqr(x1p); sb = nsvg__sqr(rx)*nsvg__sqr(y1p) + nsvg__sqr(ry)*nsvg__sqr(x1p); if (sa < 0.0f) sa = 0.0f; if (sb > 0.0f) @@ -2246,37 +2247,37 @@ if (fa == fs) s = -s; cxp = s * rx * y1p / ry; cyp = s * -ry * x1p / rx; - // 3) Compute cx,cy from cx',cy' + /* 3) Compute cx,cy from cx',cy' */ cx = (x1 + x2)/2.0f + cosrx*cxp - sinrx*cyp; cy = (y1 + y2)/2.0f + sinrx*cxp + cosrx*cyp; - // 4) Calculate theta1, and delta theta. + /* 4) Calculate theta1, and delta theta. */ ux = (x1p - cxp) / rx; uy = (y1p - cyp) / ry; vx = (-x1p - cxp) / rx; vy = (-y1p - cyp) / ry; - a1 = nsvg__vecang(1.0f,0.0f, ux,uy); // Initial angle - da = nsvg__vecang(ux,uy, vx,vy); // Delta angle + a1 = nsvg__vecang(1.0f,0.0f, ux,uy); /* Initial angle */ + da = nsvg__vecang(ux,uy, vx,vy); /* Delta angle */ -// if (vecrat(ux,uy,vx,vy) <= -1.0f) da = NSVG_PI; -// if (vecrat(ux,uy,vx,vy) >= 1.0f) da = 0; +/* if (vecrat(ux,uy,vx,vy) <= -1.0f) da = NSVG_PI; */ +/* if (vecrat(ux,uy,vx,vy) >= 1.0f) da = 0; */ if (fs == 0 && da > 0) da -= 2 * NSVG_PI; else if (fs == 1 && da < 0) da += 2 * NSVG_PI; - // Approximate the arc using cubic spline segments. + /* Approximate the arc using cubic spline segments. */ t[0] = cosrx; t[1] = sinrx; t[2] = -sinrx; t[3] = cosrx; t[4] = cx; t[5] = cy; - // Split arc into max 90 degree segments. - // The loop assumes an iteration per end point (including start and end), this +1. + /* Split arc into max 90 degree segments. */ + /* The loop assumes an iteration per end point (including start and end), this +1. */ ndivs = (int)(fabsf(da) / (NSVG_PI*0.5f) + 1.0f); hda = (da / (float)ndivs) / 2.0f; kappa = fabsf(4.0f / 3.0f * (1.0f - cosf(hda)) / sinf(hda)); if (da < 0.0f) kappa = -kappa; @@ -2283,12 +2284,12 @@ for (i = 0; i <= ndivs; i++) { a = a1 + da * ((float)i/(float)ndivs); dx = cosf(a); dy = sinf(a); - nsvg__xformPoint(&x, &y, dx*rx, dy*ry, t); // position - nsvg__xformVec(&tanx, &tany, -dy*rx * kappa, dx*ry * kappa, t); // tangent + nsvg__xformPoint(&x, &y, dx*rx, dy*ry, t); /* position */ + nsvg__xformVec(&tanx, &tany, -dy*rx * kappa, dx*ry * kappa, t); /* tangent */ if (i > 0) nsvg__cubicBezTo(p, px+ptanx,py+ptany, x-tanx, y-tany, x, y); px = x; py = y; ptanx = tanx; @@ -2342,12 +2343,12 @@ if (nargs >= rargs) { switch (cmd) { case 'm': case 'M': nsvg__pathMoveTo(p, &cpx, &cpy, args, cmd == 'm' ? 1 : 0); - // Moveto can be followed by multiple coordinate pairs, - // which should be treated as linetos. + /* Moveto can be followed by multiple coordinate pairs, */ + /* which should be treated as linetos. */ cmd = (cmd == 'm') ? 'l' : 'L'; rargs = nsvg__getArgsPerElement(cmd); cpx2 = cpx; cpy2 = cpy; initPoint = 1; break; @@ -2398,46 +2399,46 @@ nargs = 0; } } else { cmd = item[0]; if (cmd == 'M' || cmd == 'm') { - // Commit path. + /* Commit path. */ if (p->npts > 0) nsvg__addPath(p, closedFlag); - // Start new subpath. + /* Start new subpath. */ nsvg__resetPath(p); closedFlag = 0; nargs = 0; } else if (initPoint == 0) { - // Do not allow other commands until initial point has been set (moveTo called once). + /* Do not allow other commands until initial point has been set (moveTo called once). */ cmd = '\0'; } if (cmd == 'Z' || cmd == 'z') { closedFlag = 1; - // Commit path. + /* Commit path. */ if (p->npts > 0) { - // Move current point to first point + /* Move current point to first point */ cpx = p->pts[0]; cpy = p->pts[1]; cpx2 = cpx; cpy2 = cpy; nsvg__addPath(p, closedFlag); } - // Start new subpath. + /* Start new subpath. */ nsvg__resetPath(p); nsvg__moveTo(p, cpx, cpy); closedFlag = 0; nargs = 0; } rargs = nsvg__getArgsPerElement(cmd); if (rargs == -1) { - // Command not recognized + /* Command not recognized */ cmd = '\0'; rargs = 0; } } } - // Commit path. + /* Commit path. */ if (p->npts) nsvg__addPath(p, closedFlag); } nsvg__addShape(p); @@ -2447,11 +2448,11 @@ { float x = 0.0f; float y = 0.0f; float w = 0.0f; float h = 0.0f; - float rx = -1.0f; // marks not set + float rx = -1.0f; /* marks not set */ float ry = -1.0f; int i; for (i = 0; attr[i]; i += 2) { if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { @@ -2478,11 +2479,11 @@ nsvg__moveTo(p, x, y); nsvg__lineTo(p, x+w, y); nsvg__lineTo(p, x+w, y+h); nsvg__lineTo(p, x, y+h); } else { - // Rounded rectangle + /* Rounded rectangle */ nsvg__moveTo(p, x+rx, y); nsvg__lineTo(p, x+w-rx, y); nsvg__cubicBezTo(p, x+w-rx*(1-NSVG_KAPPA90), y, x+w, y+ry*(1-NSVG_KAPPA90), x+w, y+ry); nsvg__lineTo(p, x+w, y+h-ry); nsvg__cubicBezTo(p, x+w, y+h-ry*(1-NSVG_KAPPA90), x+w-rx*(1-NSVG_KAPPA90), y+h, x+w-rx, y+h); @@ -2635,28 +2636,28 @@ p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f); } else if (strcmp(attr[i], "viewBox") == 0) { sscanf(attr[i + 1], "%f%*[%%, \t]%f%*[%%, \t]%f%*[%%, \t]%f", &p->viewMinx, &p->viewMiny, &p->viewWidth, &p->viewHeight); } else if (strcmp(attr[i], "preserveAspectRatio") == 0) { if (strstr(attr[i + 1], "none") != 0) { - // No uniform scaling + /* No uniform scaling */ p->alignType = NSVG_ALIGN_NONE; } else { - // Parse X align + /* Parse X align */ if (strstr(attr[i + 1], "xMin") != 0) p->alignX = NSVG_ALIGN_MIN; else if (strstr(attr[i + 1], "xMid") != 0) p->alignX = NSVG_ALIGN_MID; else if (strstr(attr[i + 1], "xMax") != 0) p->alignX = NSVG_ALIGN_MAX; - // Parse X align + /* Parse X align */ if (strstr(attr[i + 1], "yMin") != 0) p->alignY = NSVG_ALIGN_MIN; else if (strstr(attr[i + 1], "yMid") != 0) p->alignY = NSVG_ALIGN_MID; else if (strstr(attr[i + 1], "yMax") != 0) p->alignY = NSVG_ALIGN_MAX; - // Parse meet/slice + /* Parse meet/slice */ p->alignType = NSVG_ALIGN_MEET; if (strstr(attr[i + 1], "slice") != 0) p->alignType = NSVG_ALIGN_SLICE; } } @@ -2747,19 +2748,19 @@ for (i = 0; attr[i]; i += 2) { nsvg__parseAttr(p, attr[i], attr[i + 1]); } - // Add stop to the last gradient. + /* Add stop to the last gradient. */ grad = p->gradients; if (grad == NULL) return; grad->nstops++; grad->stops = (NSVGgradientStop*)NANOSVG_realloc(grad->stops, sizeof(NSVGgradientStop)*grad->nstops); if (grad->stops == NULL) return; - // Insert + /* Insert */ idx = grad->nstops-1; for (i = 0; i < grad->nstops-1; i++) { if (curAttr->stopOffset < grad->stops[i].offset) { idx = i; break; @@ -2779,11 +2780,11 @@ static void nsvg__startElement(void* ud, const char* el, const char** attr) { NSVGparser* p = (NSVGparser*)ud; if (p->defsFlag) { - // Skip everything but gradients in defs + /* Skip everything but gradients in defs */ if (strcmp(el, "linearGradient") == 0) { nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT); } else if (strcmp(el, "radialGradient") == 0) { nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT); } else if (strcmp(el, "stop") == 0) { @@ -2794,11 +2795,11 @@ if (strcmp(el, "g") == 0) { nsvg__pushAttr(p); nsvg__parseAttribs(p, attr); } else if (strcmp(el, "path") == 0) { - if (p->pathFlag) // Do not allow nested paths. + if (p->pathFlag) /* Do not allow nested paths. */ return; nsvg__pushAttr(p); nsvg__parsePath(p, attr); nsvg__popAttr(p); } else if (strcmp(el, "rect") == 0) { @@ -2947,11 +2948,11 @@ { if (type == NSVG_ALIGN_MIN) return 0; else if (type == NSVG_ALIGN_MAX) return container - content; - // mid + /* mid */ return (container - content) * 0.5f; } static void nsvg__scaleGradient(NSVGgradient* grad, float tx, float ty, float sx, float sy) { @@ -2969,11 +2970,11 @@ NSVGpath* path; float tx, ty, sx, sy, us, bounds[4], t[6], avgs; int i; float* pt; - // Guess image size if not set completely. + /* Guess image size if not set completely. */ nsvg__imageBounds(p, bounds); if (p->viewWidth == 0) { if (p->image->width > 0) { p->viewWidth = p->image->width; @@ -2997,27 +2998,27 @@ tx = -p->viewMinx; ty = -p->viewMiny; sx = p->viewWidth > 0 ? p->image->width / p->viewWidth : 0; sy = p->viewHeight > 0 ? p->image->height / p->viewHeight : 0; - // Unit scaling + /* Unit scaling */ us = 1.0f / nsvg__convertToPixels(p, nsvg__coord(1.0f, nsvg__parseUnits(units)), 0.0f, 1.0f); - // Fix aspect ratio + /* Fix aspect ratio */ if (p->alignType == NSVG_ALIGN_MEET) { - // fit whole image into viewbox + /* fit whole image into viewbox */ sx = sy = nsvg__minf(sx, sy); tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx; ty += nsvg__viewAlign(p->viewHeight*sy, p->image->height, p->alignY) / sy; } else if (p->alignType == NSVG_ALIGN_SLICE) { - // fill whole viewbox with image + /* fill whole viewbox with image */ sx = sy = nsvg__maxf(sx, sy); tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx; ty += nsvg__viewAlign(p->viewHeight*sy, p->image->height, p->alignY) / sy; } - // Transform + /* Transform */ sx *= us; sy *= us; avgs = (sx+sy) / 2.0f; for (shape = p->image->shapes; shape != NULL; shape = shape->next) { shape->bounds[0] = (shape->bounds[0] + tx) * sx; @@ -3066,11 +3067,11 @@ } p->dpi = dpi; nsvg__parseXML(input, nsvg__startElement, nsvg__endElement, nsvg__content, p); - // Scale to viewBox + /* Scale to viewBox */ nsvg__scaleToViewbox(p, units); ret = p->image; p->image = NULL; @@ -3093,11 +3094,11 @@ size = ftell(fp); fseek(fp, 0, SEEK_SET); data = (char*)NANOSVG_malloc(size+1); if (data == NULL) goto error; if (fread(data, 1, size, fp) != size) goto error; - data[size] = '\0'; // Must be null terminated. + data[size] = '\0'; /* Must be null terminated. */ fclose(fp); image = nsvgParse(data, units, dpi); NANOSVG_free(data); return image; Index: generic/nanosvgrast.h ================================================================== --- generic/nanosvgrast.h +++ generic/nanosvgrast.h @@ -57,35 +57,36 @@ unsigned char* img = malloc(w*h*4); // Rasterize nsvgRasterize(rast, image, 0,0,1, img, w, h, w*4); */ -// Allocated rasterizer context. +/* Allocated rasterizer context. */ NANOSVG_SCOPE NSVGrasterizer* nsvgCreateRasterizer(void); -// Rasterizes SVG image, returns RGBA image (non-premultiplied alpha) -// r - pointer to rasterizer context -// image - pointer to image to rasterize -// tx,ty - image offset (applied after scaling) -// scale - image scale -// dst - pointer to destination image data, 4 bytes per pixel (RGBA) -// w - width of the image to render -// h - height of the image to render -// stride - number of bytes per scaleline in the destination buffer +/* Rasterizes SVG image, returns RGBA image (non-premultiplied alpha) + * r - pointer to rasterizer context + * image - pointer to image to rasterize + * tx,ty - image offset (applied after scaling) + * scale - image scale + * dst - pointer to destination image data, 4 bytes per pixel (RGBA) + * w - width of the image to render + * h - height of the image to render + * stride - number of bytes per scaleline in the destination buffer NANOSVG_SCOPE void nsvgRasterize(NSVGrasterizer* r, NSVGimage* image, float tx, float ty, float scale, unsigned char* dst, int w, int h, int stride); + */ -// Deletes rasterizer context. +/* Deletes rasterizer context. */ NANOSVG_SCOPE void nsvgDeleteRasterizer(NSVGrasterizer*); #ifdef __cplusplus } #endif -#endif // NANOSVGRAST_H +#endif /* NANOSVGRAST_H */ #ifdef NANOSVGRAST_IMPLEMENTATION #include @@ -200,21 +201,21 @@ static NSVGmemPage* nsvg__nextPage(NSVGrasterizer* r, NSVGmemPage* cur) { NSVGmemPage *newp; - // If using existing chain, return the next page in chain + /* If using existing chain, return the next page in chain */ if (cur != NULL && cur->next != NULL) { return cur->next; } - // Alloc new page + /* Alloc new page */ newp = (NSVGmemPage*)NANOSVG_malloc(sizeof(NSVGmemPage)); if (newp == NULL) return NULL; memset(newp, 0, sizeof(NSVGmemPage)); - // Add to linked list + /* Add to linked list */ if (cur != NULL) cur->next = newp; else r->pages = newp; @@ -300,11 +301,11 @@ static void nsvg__addEdge(NSVGrasterizer* r, float x0, float y0, float x1, float y1) { NSVGedge* e; - // Skip horizontal edges + /* Skip horizontal edges */ if (y0 == y1) return; if (r->nedges+1 > r->cedges) { r->cedges = r->cedges > 0 ? r->cedges * 2 : 64; @@ -386,19 +387,19 @@ int i, j; NSVGpath* path; for (path = shape->paths; path != NULL; path = path->next) { r->npoints = 0; - // Flatten path + /* Flatten path */ nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0); for (i = 0; i < path->npts-1; i += 3) { float* p = &path->pts[i*2]; nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, 0); } - // Close path + /* Close path */ nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0); - // Build edges + /* Build edges */ for (i = 0, j = r->npoints-1; i < r->npoints; j = i++) nsvg__addEdge(r, r->points[j].x, r->points[j].y, r->points[i].x, r->points[i].y); } } @@ -617,24 +618,24 @@ return divs; } static void nsvg__expandStroke(NSVGrasterizer* r, NSVGpoint* points, int npoints, int closed, int lineJoin, int lineCap, float lineWidth) { - int ncap = nsvg__curveDivs(lineWidth*0.5f, NSVG_PI, r->tessTol); // Calculate divisions per half circle. + int ncap = nsvg__curveDivs(lineWidth*0.5f, NSVG_PI, r->tessTol); /* Calculate divisions per half circle. */ NSVGpoint left = {0,0,0,0,0,0,0,0}, right = {0,0,0,0,0,0,0,0}, firstLeft = {0,0,0,0,0,0,0,0}, firstRight = {0,0,0,0,0,0,0,0}; NSVGpoint* p0, *p1; int j, s, e; - // Build stroke edges + /* Build stroke edges */ if (closed) { - // Looping + /* Looping */ p0 = &points[npoints-1]; p1 = &points[0]; s = 0; e = npoints; } else { - // Add cap + /* Add cap */ p0 = &points[0]; p1 = &points[1]; s = 1; e = npoints-1; } @@ -642,11 +643,11 @@ if (closed) { nsvg__initClosed(&left, &right, p0, p1, lineWidth); firstLeft = left; firstRight = right; } else { - // Add cap + /* Add cap */ float dx = p1->x - p0->x; float dy = p1->y - p0->y; nsvg__normalize(&dx, &dy); if (lineCap == NSVG_CAP_BUTT) nsvg__buttCap(r, &left, &right, p0, dx, dy, lineWidth, 0); @@ -669,15 +670,15 @@ } p0 = p1++; } if (closed) { - // Loop it + /* Loop it */ nsvg__addEdge(r, firstLeft.x, firstLeft.y, left.x, left.y); nsvg__addEdge(r, right.x, right.y, firstRight.x, firstRight.y); } else { - // Add cap + /* Add cap */ float dx = p1->x - p0->x; float dy = p1->y - p0->y; nsvg__normalize(&dx, &dy); if (lineCap == NSVG_CAP_BUTT) nsvg__buttCap(r, &right, &left, p1, -dx, -dy, lineWidth, 1); @@ -694,28 +695,28 @@ NSVGpoint* p0, *p1; p0 = &r->points[r->npoints-1]; p1 = &r->points[0]; for (i = 0; i < r->npoints; i++) { - // Calculate segment direction and length + /* Calculate segment direction and length */ p0->dx = p1->x - p0->x; p0->dy = p1->y - p0->y; p0->len = nsvg__normalize(&p0->dx, &p0->dy); - // Advance + /* Advance */ p0 = p1++; } - // calculate joins + /* calculate joins */ p0 = &r->points[r->npoints-1]; p1 = &r->points[0]; for (j = 0; j < r->npoints; j++) { float dlx0, dly0, dlx1, dly1, dmr2, cross; dlx0 = p0->dy; dly0 = -p0->dx; dlx1 = p1->dy; dly1 = -p1->dx; - // Calculate extrusions + /* Calculate extrusions */ p1->dmx = (dlx0 + dlx1) * 0.5f; p1->dmy = (dly0 + dly1) * 0.5f; dmr2 = p1->dmx*p1->dmx + p1->dmy*p1->dmy; if (dmr2 > 0.000001f) { float s2 = 1.0f / dmr2; @@ -724,19 +725,19 @@ } p1->dmx *= s2; p1->dmy *= s2; } - // Clear flags, but keep the corner. + /* Clear flags, but keep the corner. */ p1->flags = (p1->flags & NSVG_PT_CORNER) ? NSVG_PT_CORNER : 0; - // Keep track of left turns. + /* Keep track of left turns. */ cross = p1->dx * p0->dy - p0->dx * p1->dy; if (cross > 0.0f) p1->flags |= NSVG_PT_LEFT; - // Check to see if the corner needs to be beveled. + /* Check to see if the corner needs to be beveled. */ if (p1->flags & NSVG_PT_CORNER) { if ((dmr2 * miterLimit*miterLimit) < 1.0f || lineJoin == NSVG_JOIN_BEVEL || lineJoin == NSVG_JOIN_ROUND) { p1->flags |= NSVG_PT_BEVEL; } } @@ -754,11 +755,11 @@ int lineJoin = shape->strokeLineJoin; int lineCap = shape->strokeLineCap; float lineWidth = shape->strokeWidth * scale; for (path = shape->paths; path != NULL; path = path->next) { - // Flatten path + /* Flatten path */ r->npoints = 0; nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, NSVG_PT_CORNER); for (i = 0; i < path->npts-1; i += 3) { float* p = &path->pts[i*2]; nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, NSVG_PT_CORNER); @@ -766,11 +767,11 @@ if (r->npoints < 2) continue; closed = path->closed; - // If the first and last points are the same, remove the last, mark as closed path. + /* If the first and last points are the same, remove the last, mark as closed path. */ p0 = &r->points[r->npoints-1]; p1 = &r->points[0]; if (nsvg__ptEquals(p0->x,p0->y, p1->x,p1->y, r->distTol)) { r->npoints--; p0 = &r->points[r->npoints-1]; @@ -783,24 +784,24 @@ NSVGpoint cur; if (closed) nsvg__appendPathPoint(r, r->points[0]); - // Duplicate points -> points2. + /* Duplicate points -> points2. */ nsvg__duplicatePoints(r); r->npoints = 0; cur = r->points2[0]; nsvg__appendPathPoint(r, cur); - // Figure out dash offset. + /* Figure out dash offset. */ allDashLen = 0; for (j = 0; j < shape->strokeDashCount; j++) allDashLen += shape->strokeDashArray[j]; if (shape->strokeDashCount & 1) allDashLen *= 2.0f; - // Find location inside pattern + /* Find location inside pattern */ dashOffset = fmodf(shape->strokeDashOffset, allDashLen); if (dashOffset < 0.0f) dashOffset += allDashLen; while (dashOffset > shape->strokeDashArray[idash]) { @@ -813,26 +814,26 @@ float dx = r->points2[j].x - cur.x; float dy = r->points2[j].y - cur.y; float dist = sqrtf(dx*dx + dy*dy); if ((totalDist + dist) > dashLen) { - // Calculate intermediate point + /* Calculate intermediate point */ float d = (dashLen - totalDist) / dist; float x = cur.x + dx * d; float y = cur.y + dy * d; nsvg__addPathPoint(r, x, y, NSVG_PT_CORNER); - // Stroke + /* Stroke */ if (r->npoints > 1 && dashState) { nsvg__prepareStroke(r, miterLimit, lineJoin); nsvg__expandStroke(r, r->points, r->npoints, 0, lineJoin, lineCap, lineWidth); } - // Advance dash pattern + /* Advance dash pattern */ dashState = !dashState; idash = (idash+1) % shape->strokeDashCount; dashLen = shape->strokeDashArray[idash] * scale; - // Restart + /* Restart */ cur.x = x; cur.y = y; cur.flags = NSVG_PT_CORNER; totalDist = 0.0f; r->npoints = 0; @@ -842,11 +843,11 @@ cur = r->points2[j]; nsvg__appendPathPoint(r, cur); j++; } } - // Stroke any leftover path + /* Stroke any leftover path */ if (r->npoints > 1 && dashState) nsvg__expandStroke(r, r->points, r->npoints, 0, lineJoin, lineCap, lineWidth); } else { nsvg__prepareStroke(r, miterLimit, lineJoin); nsvg__expandStroke(r, r->points, r->npoints, closed, lineJoin, lineCap, lineWidth); @@ -869,28 +870,28 @@ { NSVGactiveEdge* z; float dxdy; if (r->freelist != NULL) { - // Restore from freelist. + /* Restore from freelist. */ z = r->freelist; r->freelist = z->next; } else { - // Alloc new edge. + /* Alloc new edge. */ z = (NSVGactiveEdge*)nsvg__alloc(r, sizeof(NSVGactiveEdge)); if (z == NULL) return NULL; } dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); -// STBTT_assert(e->y0 <= start_point); - // round dx down to avoid going too far +/* STBTT_assert(e->y0 <= start_point); */ + /* round dx down to avoid going too far */ if (dxdy < 0) z->dx = (int)(-floorf(NSVG__FIX * -dxdy)); else z->dx = (int)floorf(NSVG__FIX * dxdy); z->x = (int)floorf(NSVG__FIX * (e->x0 + dxdy * (startPoint - e->y0))); -// z->x -= off_x * FIX; +/* z->x -= off_x * FIX; */ z->ey = e->y1; z->next = 0; z->dir = e->dir; return z; @@ -908,56 +909,57 @@ int j = x1 >> NSVG__FIXSHIFT; if (i < *xmin) *xmin = i; if (j > *xmax) *xmax = j; if (i < len && j >= 0) { if (i == j) { - // x0,x1 are the same pixel, so compute combined coverage + /* x0,x1 are the same pixel, so compute combined coverage */ scanline[i] = (unsigned char)(scanline[i] + ((x1 - x0) * maxWeight >> NSVG__FIXSHIFT)); } else { - if (i >= 0) // add antialiasing for x0 + if (i >= 0) /* add antialiasing for x0 */ scanline[i] = (unsigned char)(scanline[i] + (((NSVG__FIX - (x0 & NSVG__FIXMASK)) * maxWeight) >> NSVG__FIXSHIFT)); else - i = -1; // clip + i = -1; /* clip */ - if (j < len) // add antialiasing for x1 + if (j < len) /* add antialiasing for x1 */ scanline[j] = (unsigned char)(scanline[j] + (((x1 & NSVG__FIXMASK) * maxWeight) >> NSVG__FIXSHIFT)); else - j = len; // clip + j = len; /* clip */ - for (++i; i < j; ++i) // fill pixels between x0 and x1 + for (++i; i < j; ++i) /* fill pixels between x0 and x1 */ scanline[i] = (unsigned char)(scanline[i] + maxWeight); } } } -// note: this routine clips fills that extend off the edges... ideally this -// wouldn't happen, but it could happen if the truetype glyph bounding boxes -// are wrong, or if the user supplies a too-small bitmap +/* note: this routine clips fills that extend off the edges... ideally this + * wouldn't happen, but it could happen if the truetype glyph bounding boxes + * are wrong, or if the user supplies a too-small bitmap + */ static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, char fillRule) { - // non-zero winding fill + /* non-zero winding fill */ int x0 = 0, w = 0; if (fillRule == NSVG_FILLRULE_NONZERO) { - // Non-zero + /* Non-zero */ while (e != NULL) { if (w == 0) { - // if we're currently at zero, we need to record the edge start point + /* if we're currently at zero, we need to record the edge start point */ x0 = e->x; w += e->dir; } else { int x1 = e->x; w += e->dir; - // if we went to zero, we need to draw + /* if we went to zero, we need to draw */ if (w == 0) nsvg__fillScanline(scanline, len, x0, x1, maxWeight, xmin, xmax); } e = e->next; } } else if (fillRule == NSVG_FILLRULE_EVENODD) { - // Even-odd + /* Even-odd */ while (e != NULL) { if (w == 0) { - // if we're currently at zero, we need to record the edge start point + /* if we're currently at zero, we need to record the edge start point */ x0 = e->x; w = 1; } else { int x1 = e->x; w = 0; nsvg__fillScanline(scanline, len, x0, x1, maxWeight, xmin, xmax); } @@ -1011,16 +1013,16 @@ for (i = 0; i < count; i++) { int r,g,b; int a = nsvg__div255((int)cover[0] * ca); int ia = 255 - a; - // Premultiply + /* Premultiply */ r = nsvg__div255(cr * a); g = nsvg__div255(cg * a); b = nsvg__div255(cb * a); - // Blend over + /* Blend over */ r += nsvg__div255(ia * (int)dst[0]); g += nsvg__div255(ia * (int)dst[1]); b += nsvg__div255(ia * (int)dst[2]); a += nsvg__div255(ia * (int)dst[3]); @@ -1031,12 +1033,12 @@ cover++; dst += 4; } } else if (cache->type == NSVG_PAINT_LINEAR_GRADIENT) { - // TODO: spread modes. - // TODO: plenty of opportunities to optimize. + /* TODO: spread modes. */ + /* TODO: plenty of opportunities to optimize. */ float fx, fy, dx, gy; float* t = cache->xform; int i, cr, cg, cb, ca; unsigned int c; @@ -1054,16 +1056,16 @@ ca = (c >> 24) & 0xff; a = nsvg__div255((int)cover[0] * ca); ia = 255 - a; - // Premultiply + /* Premultiply */ r = nsvg__div255(cr * a); g = nsvg__div255(cg * a); b = nsvg__div255(cb * a); - // Blend over + /* Blend over */ r += nsvg__div255(ia * (int)dst[0]); g += nsvg__div255(ia * (int)dst[1]); b += nsvg__div255(ia * (int)dst[2]); a += nsvg__div255(ia * (int)dst[3]); @@ -1075,13 +1077,13 @@ cover++; dst += 4; fx += dx; } } else if (cache->type == NSVG_PAINT_RADIAL_GRADIENT) { - // TODO: spread modes. - // TODO: plenty of opportunities to optimize. - // TODO: focus (fx,fy) + /* TODO: spread modes. */ + /* TODO: plenty of opportunities to optimize. */ + /* TODO: focus (fx,fy) */ float fx, fy, dx, gx, gy, gd; float* t = cache->xform; int i, cr, cg, cb, ca; unsigned int c; @@ -1101,16 +1103,16 @@ ca = (c >> 24) & 0xff; a = nsvg__div255((int)cover[0] * ca); ia = 255 - a; - // Premultiply + /* Premultiply */ r = nsvg__div255(cr * a); g = nsvg__div255(cg * a); b = nsvg__div255(cb * a); - // Blend over + /* Blend over */ r += nsvg__div255(ia * (int)dst[0]); g += nsvg__div255(ia * (int)dst[1]); b += nsvg__div255(ia * (int)dst[2]); a += nsvg__div255(ia * (int)dst[3]); @@ -1129,37 +1131,37 @@ static void nsvg__rasterizeSortedEdges(NSVGrasterizer *r, float tx, float ty, float scale, NSVGcachedPaint* cache, char fillRule) { NSVGactiveEdge *active = NULL; int y, s; int e = 0; - int maxWeight = (255 / NSVG__SUBSAMPLES); // weight per vertical scanline + int maxWeight = (255 / NSVG__SUBSAMPLES); /* weight per vertical scanline */ int xmin, xmax; for (y = 0; y < r->height; y++) { memset(r->scanline, 0, r->width); xmin = r->width; xmax = 0; for (s = 0; s < NSVG__SUBSAMPLES; ++s) { - // find center of pixel for this scanline + /* find center of pixel for this scanline */ float scany = (float)(y*NSVG__SUBSAMPLES + s) + 0.5f; NSVGactiveEdge **step = &active; - // update all active edges; - // remove all active edges that terminate before the center of this scanline + /* update all active edges; */ + /* remove all active edges that terminate before the center of this scanline */ while (*step) { NSVGactiveEdge *z = *step; if (z->ey <= scany) { - *step = z->next; // delete from list -// NSVG__assert(z->valid); + *step = z->next; /* delete from list */ +/* NSVG__assert(z->valid); */ nsvg__freeActive(r, z); } else { - z->x += z->dx; // advance to position for current scanline - step = &((*step)->next); // advance through list + z->x += z->dx; /* advance to position for current scanline */ + step = &((*step)->next); /* advance through list */ } } - // resort the list if needed + /* resort the list if needed */ for (;;) { int changed = 0; step = &active; while (*step && (*step)->next) { if ((*step)->x > (*step)->next->x) { @@ -1173,40 +1175,40 @@ step = &(*step)->next; } if (!changed) break; } - // insert all edges that start before the center of this scanline -- omit ones that also end on this scanline + /* insert all edges that start before the center of this scanline -- omit ones that also end on this scanline */ while (e < r->nedges && r->edges[e].y0 <= scany) { if (r->edges[e].y1 > scany) { NSVGactiveEdge* z = nsvg__addActive(r, &r->edges[e], scany); if (z == NULL) break; - // find insertion point + /* find insertion point */ if (active == NULL) { active = z; } else if (z->x < active->x) { - // insert at front + /* insert at front */ z->next = active; active = z; } else { - // find thing to insert AFTER + /* find thing to insert AFTER */ NSVGactiveEdge* p = active; while (p->next && p->next->x < z->x) p = p->next; - // at this point, p->next->x is NOT < z->x + /* at this point, p->next->x is NOT < z->x */ z->next = p->next; p->next = z; } } e++; } - // now process all active edges in non-zero fashion + /* now process all active edges in non-zero fashion */ if (active != NULL) nsvg__fillActiveEdges(r->scanline, r->width, active, maxWeight, &xmin, &xmax, fillRule); } - // Blit + /* Blit */ if (xmin < 0) xmin = 0; if (xmax > r->width-1) xmax = r->width-1; if (xmin <= xmax) { nsvg__scanlineSolid(&r->bitmap[y * r->stride] + xmin*4, xmax-xmin+1, &r->scanline[xmin], xmin, y, tx,ty, scale, cache); } @@ -1216,11 +1218,11 @@ static void nsvg__unpremultiplyAlpha(unsigned char* image, int w, int h, int stride) { int x,y; - // Unpremultiply + /* Unpremultiply */ for (y = 0; y < h; y++) { unsigned char *row = &image[y*stride]; for (x = 0; x < w; x++) { int r = row[0], g = row[1], b = row[2], a = row[3]; if (a != 0) { @@ -1230,11 +1232,11 @@ } row += 4; } } - // Defringe + /* Defringe */ for (y = 0; y < h; y++) { unsigned char *row = &image[y*stride]; for (x = 0; x < w; x++) { int r = 0, g = 0, b = 0, a = row[3], n = 0; if (a == 0) { @@ -1409,23 +1411,23 @@ r->freelist = NULL; r->nedges = 0; nsvg__flattenShape(r, shape, scale); - // Scale and translate edges + /* Scale and translate edges */ for (i = 0; i < r->nedges; i++) { e = &r->edges[i]; e->x0 = tx + e->x0; e->y0 = (ty + e->y0) * NSVG__SUBSAMPLES; e->x1 = tx + e->x1; e->y1 = (ty + e->y1) * NSVG__SUBSAMPLES; } - // Rasterize edges + /* Rasterize edges */ qsort(r->edges, r->nedges, sizeof(NSVGedge), nsvg__cmpEdge); - // now, traverse the scanlines and find the intersections on each scanline, use non-zero rule + /* now, traverse the scanlines and find the intersections on each scanline, use non-zero rule */ nsvg__initPaint(&cache, &shape->fill, shape->opacity); nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, shape->fillRule); } if (shape->stroke.type != NSVG_PAINT_NONE && (shape->strokeWidth * scale) > 0.01f) { @@ -1433,25 +1435,25 @@ r->freelist = NULL; r->nedges = 0; nsvg__flattenShapeStroke(r, shape, scale); -// dumpEdges(r, "edge.svg"); +/* dumpEdges(r, "edge.svg"); */ - // Scale and translate edges + /* Scale and translate edges */ for (i = 0; i < r->nedges; i++) { e = &r->edges[i]; e->x0 = tx + e->x0; e->y0 = (ty + e->y0) * NSVG__SUBSAMPLES; e->x1 = tx + e->x1; e->y1 = (ty + e->y1) * NSVG__SUBSAMPLES; } - // Rasterize edges + /* Rasterize edges */ qsort(r->edges, r->nedges, sizeof(NSVGedge), nsvg__cmpEdge); - // now, traverse the scanlines and find the intersections on each scanline, use non-zero rule + /* now, traverse the scanlines and find the intersections on each scanline, use non-zero rule */ nsvg__initPaint(&cache, &shape->stroke, shape->opacity); nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, NSVG_FILLRULE_NONZERO); } } Index: generic/tkBind.c ================================================================== --- generic/tkBind.c +++ generic/tkBind.c @@ -430,11 +430,13 @@ static const ModInfo modArray[] = { {"Control", ControlMask, 0}, {"Shift", ShiftMask, 0}, {"Lock", LockMask, 0}, {"Meta", META_MASK, 0}, +#ifndef TK_NO_DEPRECATED {"M", META_MASK, 0}, +#endif {"Alt", ALT_MASK, 0}, {"Extended", EXTENDED_MASK, 0}, {"B1", Button1Mask, 0}, {"Button1", Button1Mask, 0}, {"B2", Button2Mask, 0}, @@ -453,14 +455,24 @@ {"Button8", Button8Mask, 0}, {"B9", Button9Mask, 0}, {"Button9", Button9Mask, 0}, {"Mod1", Mod1Mask, 0}, {"M1", Mod1Mask, 0}, +#ifdef MAC_OSX_TK {"Command", Mod1Mask, 0}, +#elif defined (_WIN32) + {"Command", ControlMask, 0}, +#else + {"Command", META_MASK, 0}, +#endif {"Mod2", Mod2Mask, 0}, {"M2", Mod2Mask, 0}, +#ifdef MAC_OSX_TK {"Option", Mod2Mask, 0}, +#else + {"Option", ALT_MASK, 0}, +#endif {"Mod3", Mod3Mask, 0}, {"M3", Mod3Mask, 0}, {"Mod4", Mod4Mask, 0}, {"M4", Mod4Mask, 0}, {"Mod5", Mod5Mask, 0}, @@ -492,14 +504,18 @@ * unless you've asked about button events. */ static const EventInfo eventArray[] = { {"Key", KeyPress, KeyPressMask}, +#ifndef TK_NO_DEPRECATED {"KeyPress", KeyPress, KeyPressMask}, +#endif {"KeyRelease", KeyRelease, KeyPressMask|KeyReleaseMask}, {"Button", ButtonPress, ButtonPressMask}, +#ifndef TK_NO_DEPRECATED {"ButtonPress", ButtonPress, ButtonPressMask}, +#endif {"ButtonRelease", ButtonRelease, ButtonPressMask|ButtonReleaseMask}, {"Motion", MotionNotify, ButtonPressMask|PointerMotionMask}, {"Enter", EnterNotify, EnterWindowMask}, {"Leave", LeaveNotify, LeaveWindowMask}, {"FocusIn", FocusIn, FocusChangeMask}, @@ -5238,18 +5254,52 @@ KeySym TkStringToKeysym( const char *name) /* Name of a keysym. */ { #ifdef REDO_KEYSYM_LOOKUP - Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&keySymTable, name); + Tcl_HashEntry *hPtr; +#endif /* REDO_KEYSYM_LOOKUP */ + int keysym; + size_t len = TkUtfToUniChar(name, &keysym); + if (name[len] == '\0') { + if (!Tcl_UniCharIsPrint(keysym)) { + /* This form not supported */ + } else if ((unsigned)(keysym - 0x21) <= 0x5D) { + return keysym; + } else if ((unsigned)(keysym - 0xA1) <= 0x5E) { + return keysym; + } else if (keysym == 0x20AC) { + return 0x20AC; + } else { + return keysym + 0x1000000; + } + } +#ifdef REDO_KEYSYM_LOOKUP + if ((name[0] == 'U') && ((unsigned)(name[1] - '0') <= 9)) { + char *p = (char *)name + 1; + keysym = strtol(p, &p, 16); + if ((p >= name + 5) && (p <= name + 9) && !*p && (keysym >= 0x20) + && ((unsigned)(keysym - 0x7F) > 0x20)) { + if ((unsigned)(keysym - 0x21) <= 0x5D) { + return keysym; + } else if ((unsigned)(keysym - 0xA1) <= 0x5E) { + return keysym; + } else if (keysym == 0x20AC) { + return keysym; + } + return keysym + 0x1000000; + } + } +#endif +#ifdef REDO_KEYSYM_LOOKUP + hPtr = Tcl_FindHashEntry(&keySymTable, name); if (hPtr) { return (KeySym) Tcl_GetHashValue(hPtr); } - assert(name); - if (strlen(name) == 1u) { - KeySym keysym = (KeySym) (unsigned char) name[0]; + if (((unsigned)(name[0]-1) < 0x7F) && !name[1]) { + keysym = (unsigned char) name[0]; if (TkKeysymToString(keysym)) { return keysym; } } @@ -5278,20 +5328,41 @@ const char * TkKeysymToString( KeySym keysym) { #ifdef REDO_KEYSYM_LOOKUP - Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&nameTable, (char *)keysym); + Tcl_HashEntry *hPtr; +#endif + + if ((unsigned)(keysym - 0x21) <= 0x5D) { + keysym += 0x1000000; + } else if ((unsigned)(keysym - 0xA1) <= 0x5E) { + keysym += 0x1000000; + } else if (keysym == 0x20AC) { + keysym += 0x1000000; + } + if ((keysym >= 0x1000020) && (keysym <= 0x110FFFF) + && ((unsigned)(keysym - 0x100007F) > 0x20)) { + char buf[10]; + if (Tcl_UniCharIsPrint(keysym-0x1000000)) { + buf[TkUniCharToUtf(keysym - 0x1000000, buf)] = '\0'; + } else if (keysym >= 0x1010000) { + sprintf(buf, "U%08X", (int)(keysym - 0x1000000)); + } else { + sprintf(buf, "U%04X", (int)(keysym - 0x1000000)); + } + return Tk_GetUid(buf); + } + +#ifdef REDO_KEYSYM_LOOKUP + hPtr = Tcl_FindHashEntry(&nameTable, INT2PTR(keysym)); if (hPtr) { return (const char *)Tcl_GetHashValue(hPtr); } #endif /* REDO_KEYSYM_LOOKUP */ - if (keysym > (KeySym)0x1008FFFF) { - return NULL; - } return XKeysymToString(keysym); } /* *---------------------------------------------------------------------- Index: generic/tkCanvUtil.c ================================================================== --- generic/tkCanvUtil.c +++ generic/tkCanvUtil.c @@ -772,11 +772,11 @@ if (methods == NULL) { methods = InitSmoothMethods(interp); } /* - * Backward compatability hack. + * Backward compatibility hack. */ if (strncmp(value, "bezier", length) == 0) { smooth = &tkBezierSmoothMethod; } Index: generic/tkDecls.h ================================================================== --- generic/tkDecls.h +++ generic/tkDecls.h @@ -1793,7 +1793,9 @@ #undef Tk_CreateOldPhotoImageFormat #endif /* TK_NO_DEPRECATED */ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT + +#undef TkUnusedStubEntry #endif /* _TKDECLS */ Index: generic/tkImgPhoto.c ================================================================== --- generic/tkImgPhoto.c +++ generic/tkImgPhoto.c @@ -4080,11 +4080,11 @@ /* *---------------------------------------------------------------------- * * Tk_PhotoPutBlock_NoComposite, Tk_PhotoPutZoomedBlock_NoComposite -- * - * These backward-compatability functions just exist to fill slots in stubs + * These backward-compatibility functions just exist to fill slots in stubs * table. For the behaviour of *_NoComposite, refer to the corresponding * function without the extra suffix, except that the compositing rule is * always "overlay" and the function always panics on memory-allocation * failure. * @@ -4121,11 +4121,11 @@ *---------------------------------------------------------------------- * * Tk_PhotoExpand_Panic, Tk_PhotoPutBlock_Panic, * Tk_PhotoPutZoomedBlock_Panic, Tk_PhotoSetSize_Panic * - * Backward compatability functions for preserving the old behaviour (i.e. + * Backward compatibility functions for preserving the old behaviour (i.e. * panic on memory allocation failure) so that extensions do not need to be * significantly updated to take account of TIP #116. These call the new * interface (i.e. the interface without the extra suffix), but panic if an * error condition is returned. * Index: library/button.tcl ================================================================== --- library/button.tcl +++ library/button.tcl @@ -39,14 +39,14 @@ bind Checkbutton { tk::ButtonLeave %W } } if {"win32" eq [tk windowingsystem]} { - bind Checkbutton { + bind Checkbutton <=> { tk::CheckRadioInvoke %W select } - bind Checkbutton { + bind Checkbutton <+> { tk::CheckRadioInvoke %W select } bind Checkbutton { tk::CheckRadioInvoke %W deselect } Index: library/console.tcl ================================================================== --- library/console.tcl +++ library/console.tcl @@ -452,27 +452,20 @@ <> <> <> <> <> - <> + <> <> + <> + <> } { event add $ev $key bind Console $key {} } - if {[tk windowingsystem] eq "aqua"} { - foreach {ev key} { - <> - <> - } { - event add $ev $key - bind Console $key {} - } - if {$::tk::console::useFontchooser} { - bind Console [list ::tk::console::FontchooserToggle] - } + if {$::tk::console::useFontchooser} { + bind Console [list ::tk::console::FontchooserToggle] } bind Console <> { if {[%W compare insert > promptEnd]} { ::tk::console::Expand %W } @@ -592,14 +585,12 @@ } bind Console { eval destroy [winfo child .] source -encoding utf-8 [file join $tk_library console.tcl] } - if {[tk windowingsystem] eq "aqua"} { - bind Console { - exit - } + bind Console { + exit } bind Console <> { ::tk::console::Cut %W } bind Console <> { ::tk::console::Copy %W } bind Console <> { ::tk::console::Paste %W } Index: library/demos/menu.tcl ================================================================== --- library/demos/menu.tcl +++ library/demos/menu.tcl @@ -61,11 +61,11 @@ } else { set modifier Meta } foreach i {A B C D E F} { $m add command -label "Print letter \"$i\"" -underline 14 \ - -accelerator Meta+$i -command "puts $i" -accelerator $modifier+$i + -accelerator $modifier+$i -command "puts $i" bind $w <$modifier-[string tolower $i]> "puts $i" } set m $w.menu.cascade $w.menu add cascade -label "Cascades" -menu $m -underline 0 Index: library/entry.tcl ================================================================== --- library/entry.tcl +++ library/entry.tcl @@ -207,13 +207,11 @@ bind Entry {# nothing} bind Entry {# nothing} bind Entry {# nothing} bind Entry {# nothing} bind Entry {# nothing} -if {[tk windowingsystem] eq "aqua"} { - bind Entry {# nothing} -} +bind Entry {# nothing} # Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] bind Entry <> {# nothing} bind Entry <> {# nothing} # On Windows, paste is done using Shift-Insert. Shift-Insert already Index: library/spinbox.tcl ================================================================== --- library/spinbox.tcl +++ library/spinbox.tcl @@ -216,13 +216,11 @@ bind Spinbox {# nothing} bind Spinbox {# nothing} bind Spinbox {# nothing} bind Spinbox {# nothing} bind Spinbox {# nothing} -if {[tk windowingsystem] eq "aqua"} { - bind Spinbox {# nothing} -} +bind Spinbox {# nothing} # On Windows, paste is done using Shift-Insert. Shift-Insert already # generates the <> event, so we don't need to do anything here. if {[tk windowingsystem] ne "win32"} { bind Spinbox { Index: library/text.tcl ================================================================== --- library/text.tcl +++ library/text.tcl @@ -304,13 +304,11 @@ bind Text {# nothing } bind Text {# nothing} bind Text {# nothing} bind Text {# nothing} bind Text {# nothing} -if {[tk windowingsystem] eq "aqua"} { - bind Text {# nothing} -} +bind Text {# nothing} # Additional emacs-like bindings: bind Text { if {!$tk_strictMotif && [%W compare end != insert+1c]} { Index: library/tk.tcl ================================================================== --- library/tk.tcl +++ library/tk.tcl @@ -377,11 +377,11 @@ event add <> event add <> # On Darwin/Aqua, buttons from left to right are 1,3,2. On Darwin/X11 with recent # XQuartz as the X server, they are 1,2,3; other X servers may differ. - event add <> + event add <> event add <> event add <> event add <> event add <> event add <> @@ -424,11 +424,11 @@ event add <> event add <> event add <> event add <> - event add <> + event add <> event add <> event add <> event add <> event add <> event add <> Index: library/ttk/button.tcl ================================================================== --- library/ttk/button.tcl +++ library/ttk/button.tcl @@ -40,11 +40,11 @@ # ...plus a few more: bind TRadiobutton { ttk::button::RadioTraverse %W -1 } bind TRadiobutton { ttk::button::RadioTraverse %W +1 } -# bind TCheckbutton { %W select } +# bind TCheckbutton <+> { %W select } # bind TCheckbutton { %W deselect } # activate -- # Simulate a button press: temporarily set the state to 'pressed', # then invoke the button. Index: library/ttk/entry.tcl ================================================================== --- library/ttk/entry.tcl +++ library/ttk/entry.tcl @@ -128,16 +128,12 @@ bind TEntry {# nothing} bind TEntry {# nothing} bind TEntry {# nothing} bind TEntry {# nothing} bind TEntry {# nothing} +bind TEntry {# nothing} -# Argh. Apparently on Windows, the NumLock modifier is interpreted -# as a Command modifier. -if {[tk windowingsystem] eq "aqua"} { - bind TEntry {# nothing} -} # Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] bind TEntry <> {# nothing} bind TEntry <> {# nothing} ## Additional emacs-like bindings: Index: library/ttk/notebook.tcl ================================================================== --- library/ttk/notebook.tcl +++ library/ttk/notebook.tcl @@ -110,17 +110,12 @@ bind $top {+ttk::notebook::TLCycleTab %W 1} bind $top {+ttk::notebook::TLCycleTab %W -1} catch { bind $top {+ttk::notebook::TLCycleTab %W -1} } - if {[tk windowingsystem] eq "aqua"} { - bind $top \ - +[list ttk::notebook::MnemonicActivation $top %K] - } else { - bind $top \ - +[list ttk::notebook::MnemonicActivation $top %K] - } + bind $top \ + +[list ttk::notebook::MnemonicActivation $top %K] bind $top {+ttk::notebook::TLCleanup %W} } lappend TLNotebooks($top) $nb } Index: library/ttk/utils.tcl ================================================================== --- library/ttk/utils.tcl +++ library/ttk/utils.tcl @@ -283,12 +283,12 @@ # $command will be passed one additional argument # specifying the mousewheel direction (-1: up, +1: down). # proc ttk::bindMouseWheel {bindtag callback} { - bind $bindtag [append callback { %D -120.0}] - bind $bindtag [append callback { %D -12.0}] + bind $bindtag "$callback %D -120.0" + bind $bindtag "$callback %D -12.0" } ## Mousewheel bindings for standard scrollable widgets. # # Usage: [ttk::copyBindings TtkScrollable $bindtag] Index: macosx/tkMacOSXDialog.c ================================================================== --- macosx/tkMacOSXDialog.c +++ macosx/tkMacOSXDialog.c @@ -21,11 +21,11 @@ #define modalCancel NSCancelButton #else #define modalOK NSModalResponseOK #define modalCancel NSModalResponseCancel #endif // MAC_OS_X_VERSION_MIN_REQUIRED < 1090 -#define modalOther -1 // indicates that the -command option was used. +#define modalOther -1 // indicates that the -command option was used. #define modalError -2 /* * Vars for filtering in "open file" and "save file" dialogs. */ @@ -373,11 +373,11 @@ } else { modalReturnCode = [NSApp runModalForWindow:panel]; } } else { - /* + /* * For the standalone file dialog, completion handlers do not work * at all on macOS 10.14 and earlier. */ if ([NSApp macOSVersion] > 101400) { Index: macosx/tkMacOSXWm.c ================================================================== --- macosx/tkMacOSXWm.c +++ macosx/tkMacOSXWm.c @@ -1801,11 +1801,11 @@ } wmPtr->cmapList = cmapList; wmPtr->cmapCount = windowObjc; /* - * On the Macintosh all of this is just an excercise in compatability as + * On the Macintosh all of this is just an excercise in compatibility as * we don't support colormaps. If we did they would be installed here. */ return TCL_OK; } @@ -5182,11 +5182,11 @@ topPtr->wmInfoPtr->cmapList = newPtr; topPtr->wmInfoPtr->cmapCount = count+1; /* - * On the Macintosh all of this is just an excercise in compatability as + * On the Macintosh all of this is just an excercise in compatibility as * we don't support colormaps. If we did they would be installed here. */ } /* Index: tests/bind.test ================================================================== --- tests/bind.test +++ tests/bind.test @@ -12,10 +12,11 @@ eval tcltest::configure $argv tcltest::loadTestedCommands tk useinputmethods 0 testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] +testConstraint needsTcl87 [package vsatisfies [package provide Tcl] 8.7] toplevel .t -width 100 -height 50 wm geom .t +0+0 update idletasks @@ -385,17 +386,17 @@ destroy .t.c } -result {Test} test bind-11.1 {Tk_GetAllBindings procedure} -body { frame .t.f - foreach i "! a \\\{ ~ <> " { + foreach i "! a \\\{ ~ <> <Â>" { bind .t.f $i Test } lsort [bind .t.f] } -cleanup { destroy .t.f -} -result {! <> a \{ ~} +} -result "! <> a \\\{ ~" test bind-11.2 {Tk_GetAllBindings procedure} -body { frame .t.f foreach i " " { bind .t.f $i Test } @@ -437,21 +438,21 @@ bind all {lappend x "%W %K all Key"} bind Test : {lappend x "%W %K Test :"} bind all _ {lappend x "%W %K all _"} bind .t.f : {lappend x "%W %K .t.f :"} - event generate .t.f - event generate .t.f - event generate .t.f + event generate .t.f <:> + event generate .t.f <+> + event generate .t.f <_> return $x } -cleanup { destroy .t.f bind all {} bind Test {} bind all _ {} bind Test : {} -} -result {{.t.f colon .t.f :} {.t.f colon Test :} {.t.f colon all Key} {.t.f plus Test Key} {.t.f plus all Key} {.t.f underscore Test Key} {.t.f underscore all _}} +} -result {{.t.f : .t.f :} {.t.f : Test :} {.t.f : all Key} {.t.f + Test Key} {.t.f + all Key} {.t.f _ Test Key} {.t.f _ all _}} test bind-13.2 {Tk_BindEvent procedure} -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f focus -force .t.f @@ -460,17 +461,17 @@ } -body { bind Test {lappend x "%W %K Test press any"; break} bind all {continue; lappend x "%W %K all press any"} bind .t.f : {lappend x "%W %K .t.f pressed colon"} - event generate .t.f + event generate .t.f <:> return $x } -cleanup { destroy .t.f bind all {} bind Test {} -} -result {{.t.f colon .t.f pressed colon} {.t.f colon Test press any}} +} -result {{.t.f : .t.f pressed colon} {.t.f : Test press any}} test bind-13.3 {Tk_BindEvent procedure} -setup { proc bgerror args {} frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -478,25 +479,25 @@ update set x {} } -body { bind Test {lappend x "%W %K Test press any"; error Test} bind .t.f : {lappend x "%W %K .t.f pressed colon"} - event generate .t.f + event generate .t.f <:> update list $x $errorInfo } -cleanup { destroy .t.f bind Test {} rename bgerror {} -} -result {{{.t.f colon .t.f pressed colon} {.t.f colon Test press any}} {Test +} -result {{{.t.f : .t.f pressed colon} {.t.f : Test press any}} {Test while executing "error Test" (command bound to event)}} test bind-13.4 {Tk_BindEvent procedure} -setup { proc foo {} { set x 44 - event generate .t.f + event generate .t.f <:> } frame .t.f -class Test -width 150 -height 100 pack .t.f focus -force .t.f update @@ -507,11 +508,11 @@ foo return $x } -cleanup { destroy .t.f bind Test : {} -} -result {{.t.f colon .t.f} {.t.f colon Test}} +} -result {{.t.f : .t.f} {.t.f : Test}} test bind-13.5 {Tk_BindEvent procedure} -body { bind all {lappend x "%W destroyed"} set x {} frame .t.g -gorp foo @@ -535,11 +536,11 @@ set x {} } -body { bind .t.f : {lappend x "%W (.t.f binding)"} bind Test : {lappend x "%W (Test binding)"} bind all : {bind .t.f : {}; lappend x "%W (all binding)"} - event generate .t.f + event generate .t.f <:> return $x } -cleanup { bind Test : {} bind all : {} destroy .t.f @@ -552,11 +553,11 @@ set x {} } -body { bind .t.f : {lappend x "%W (.t.f binding)"} bind Test : {lappend x "%W (Test binding)"} bind all : {destroy .t.f; lappend x "%W (all binding)"} - event generate .t.f + event generate .t.f <:> return $x } -cleanup { bind Test : {} bind all : {} destroy .t.f @@ -634,16 +635,16 @@ update set x {} } -body { bind .t.f "lappend x Key%K" bind .t.f "lappend x Release%K" - event generate .t.f -keysym colon - event generate .t.f -keysym colon + event generate .t.f -keysym : + event generate .t.f -keysym : return $x } -cleanup { destroy .t.f -} -result {Keycolon Releasecolon} +} -result {Key: Release:} test bind-13.14 {Tk_BindEvent procedure: invalid key detail} -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f focus -force .t.f update @@ -2049,11 +2050,11 @@ event generate .t.f event generate .t.f set x } -cleanup { destroy .t.f -} -result {a A { } {\r} {{}} {{}} { } {\$} \\\{ {{}} {{}} \xE9} +} -result {a A { } {\r} {{}} {{}} { } {\$} \\\{ {{}} {{}} é} test bind-16.36 {ExpandPercents procedure} -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f focus -force .t.f update @@ -2221,10 +2222,23 @@ destroy .t.e bind Entry $savedBind(Entry) bind all $savedBind(All) unset savedBind } -result {0 1 2} +test bind-16.47 {ExpandPercents procedure} -constraints aquaOrWin32 -setup { + frame .t.f -class Test -width 150 -height 100 + pack .t.f + focus -force .t.f + update +} -body { + bind .t.f {set x "%K"} + set x none + event generate .t.f -keysym € + set x +} -cleanup { + destroy .t.f +} -result € test bind-17.1 {event command} -body { event } -returnCodes error -result {wrong # args: should be "event option ?arg?"} test bind-17.2 {event command} -body { @@ -2237,11 +2251,11 @@ event delete <> event add <> event info <> } -cleanup { event delete <> -} -result {} +} -result test bind-17.5 {event command: add 2} -body { event delete <> event add <> lsort [event info <>] } -cleanup { @@ -2350,19 +2364,19 @@ event delete <> event add <> event info <> } -cleanup { event delete <> -} -result {} +} -result test bind-18.4 {CreateVirtualEvent procedure: duplicate physical} -body { event delete <> event add <> event add <> event info <> } -cleanup { event delete <> -} -result {} +} -result test bind-18.5 {CreateVirtualEvent procedure: existing physical} -body { foreach p [event info] {event delete $p} event add <> event add <> list [lsort [event info]] [event info <>] [event info <>] @@ -2407,11 +2421,11 @@ event delete <> } -body { event add <> event delete <> event info <> -} -result {} +} -result test bind-19.5 {DeleteVirtualEvent procedure: delete 1, badly formed} -body { event add <> event delete <> } -cleanup { event delete <> @@ -2689,11 +2703,11 @@ } -body { event add <> event info <> } -cleanup { event delete <> -} -result {} +} -result test bind-20.4 {GetVirtualEvent procedure: owns many} -setup { event delete <> } -body { event add <> spack event info <> @@ -2710,11 +2724,11 @@ foreach p [event info] {event delete $p} event add <> event info } -cleanup { event delete <> -} -result {<>} +} -result <> test bind-21.3 {GetAllVirtualEvents procedure: many events} -body { foreach p [event info] {event delete $p} event add <> event add <> event add <> @@ -5087,11 +5101,11 @@ } -result test test bind-25.2 {ParseEventDescription procedure: misinterpreted modifier} -setup { button .b } -body { bind .b a - bind .b b + bind .b b lsort [bind .b] } -cleanup { destroy .b } -result { } test bind-25.3 {ParseEventDescription procedure} -setup { @@ -5107,11 +5121,11 @@ } -body { bind .t.f <> {puts hi} bind .t.f } -cleanup { destroy .t.f -} -result {<>} +} -result <> # Assorted error cases in event sequence parsing test bind-25.5 {ParseEventDescription procedure error cases} -body { bind .t \x7 {puts hi} } -returnCodes error -result {bad ASCII character 0x7} @@ -5191,11 +5205,11 @@ } -result test bind-25.22 {modifier names} -setup { frame .t.f -class Test -width 150 -height 100 } -body { - bind .t.f foo + bind .t.f foo bind .t.f } -cleanup { destroy .t.f } -result @@ -5536,24 +5550,10 @@ list $x [bind .t.f] } -cleanup { destroy .t.f } -result {{event Button}