diff options
-rw-r--r-- | compiler/types.nim | 28 | ||||
-rw-r--r-- | doc/intern.txt | 7 | ||||
-rw-r--r-- | doc/manual.txt | 16 | ||||
-rw-r--r-- | lib/posix/posix.nim | 47 | ||||
-rw-r--r-- | lib/pure/asyncio.nim | 29 | ||||
-rw-r--r-- | lib/pure/base64.nim | 242 | ||||
-rw-r--r-- | lib/pure/collections/LockFreeHash.nim | 581 | ||||
-rw-r--r-- | lib/pure/collections/baseutils.nim | 41 | ||||
-rw-r--r-- | lib/pure/collections/sequtils.nim | 69 | ||||
-rw-r--r-- | lib/pure/httpserver.nim | 9 | ||||
-rw-r--r-- | lib/pure/mersenne.nim | 39 | ||||
-rw-r--r-- | lib/pure/osproc.nim | 94 | ||||
-rw-r--r-- | lib/pure/scgi.nim | 10 | ||||
-rw-r--r-- | lib/pure/sockets.nim | 94 | ||||
-rw-r--r-- | lib/system.nim | 4 | ||||
-rw-r--r-- | lib/system/atomics.nim | 239 | ||||
-rw-r--r-- | lib/windows/winlean.nim | 57 | ||||
-rw-r--r-- | lib/wrappers/opengl/glx.nim | 34 | ||||
-rw-r--r-- | lib/wrappers/openssl.nim | 4 | ||||
-rw-r--r-- | lib/wrappers/x11/keysym.nim | 3407 | ||||
-rw-r--r-- | lib/wrappers/x11/xlib.nim | 317 | ||||
-rw-r--r-- | lib/wrappers/x11/xutil.nim | 84 | ||||
-rw-r--r-- | lib/wrappers/zip/zlib.nim | 1 | ||||
-rw-r--r-- | tests/run/temit.nim | 4 | ||||
-rw-r--r-- | tools/niminst/buildsh.tmpl | 2 |
25 files changed, 3237 insertions, 2222 deletions
diff --git a/compiler/types.nim b/compiler/types.nim index f9c40e201..4dec9ea2f 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -621,7 +621,7 @@ type proc initSameTypeClosure: TSameTypeClosure = # we do the initialization lazily for performance (avoids memory allocations) nil - + proc containsOrIncl(c: var TSameTypeClosure, a, b: PType): bool = result = not IsNil(c.s) and c.s.contains((a.id, b.id)) if not result: @@ -750,9 +750,9 @@ template IfFastObjectTypeCheckFailed(a, b: PType, body: stmt) {.immediate.} = proc sameObjectTypes*(a, b: PType): bool = # specialized for efficiency (sigmatch uses it) - IfFastObjectTypeCheckFailed(a, b): + IfFastObjectTypeCheckFailed(a, b): var c = initSameTypeClosure() - result = sameTypeAux(a, b, c) + result = sameTypeAux(a, b, c) proc sameDistinctTypes*(a, b: PType): bool {.inline.} = result = sameObjectTypes(a, b) @@ -808,11 +808,11 @@ proc SameTypeAux(x, y: PType, c: var TSameTypeClosure): bool = if containsOrIncl(c, a, b): return true proc sameFlags(a, b: PType): bool {.inline.} = - result = eqTypeFlags*a.flags == eqTypeFlags*b.flags - + result = eqTypeFlags*a.flags == eqTypeFlags*b.flags + if x == y: return true var a = skipTypes(x, {tyGenericInst}) - var b = skipTypes(y, {tyGenericInst}) + var b = skipTypes(y, {tyGenericInst}) assert(a != nil) assert(b != nil) if a.kind != b.kind: @@ -824,7 +824,7 @@ proc SameTypeAux(x, y: PType, c: var TSameTypeClosure): bool = if a.kind != b.kind: return false of dcEqOrDistinctOf: while a.kind == tyDistinct: a = a.sons[0] - if a.kind != b.kind: return false + if a.kind != b.kind: return false case a.Kind of tyEmpty, tyChar, tyBool, tyNil, tyPointer, tyString, tyCString, tyInt..tyBigNum, tyStmt: @@ -837,15 +837,19 @@ proc SameTypeAux(x, y: PType, c: var TSameTypeClosure): bool = result = sameObjectStructures(a, b, c) and sameFlags(a, b) of tyDistinct: CycleCheck() - if c.cmp == dcEq: result = sameDistinctTypes(a, b) and sameFlags(a, b) - else: result = sameTypeAux(a.sons[0], b.sons[0], c) and sameFlags(a, b) + if c.cmp == dcEq: + if sameFlags(a, b): + IfFastObjectTypeCheckFailed(a, b): + result = sameTypeAux(a.sons[0], b.sons[0], c) + else: + result = sameTypeAux(a.sons[0], b.sons[0], c) and sameFlags(a, b) of tyEnum, tyForward, tyProxy: # XXX generic enums do not make much sense, but require structural checking result = a.id == b.id and sameFlags(a, b) of tyTuple: CycleCheck() result = sameTuple(a, b, c) and sameFlags(a, b) - of tyGenericInst: + of tyGenericInst: result = sameTypeAux(lastSon(a), lastSon(b), c) of tyTypeDesc: if c.cmp == dcEqIgnoreDistinct: result = false @@ -858,7 +862,7 @@ proc SameTypeAux(x, y: PType, c: var TSameTypeClosure): bool = tyOpenArray, tySet, tyRef, tyPtr, tyVar, tyArrayConstr, tyArray, tyProc, tyConst, tyMutable, tyVarargs, tyIter, tyOrdinal, tyTypeClass: - CycleCheck() + CycleCheck() result = sameChildrenAux(a, b, c) and sameFlags(a, b) if result and (a.kind == tyProc): result = a.callConv == b.callConv @@ -867,7 +871,7 @@ proc SameTypeAux(x, y: PType, c: var TSameTypeClosure): bool = result = SameTypeOrNilAux(a.sons[0], b.sons[0], c) and SameValue(a.n.sons[0], b.n.sons[0]) and SameValue(a.n.sons[1], b.n.sons[1]) - of tyNone: result = false + of tyNone: result = false proc sameType*(x, y: PType): bool = var c = initSameTypeClosure() diff --git a/doc/intern.txt b/doc/intern.txt index c84797251..9d9eb66cc 100644 --- a/doc/intern.txt +++ b/doc/intern.txt @@ -52,6 +52,11 @@ For a release version use:: nimrod c koch.nim ./koch boot -d:release +And for a debug version compatible with GDB:: + + nimrod c koch.nim + ./koch boot --debuginfo --linedir:on + The ``koch`` program is Nimrod's maintenance script. It is a replacement for make and shell scripting with the advantage that it is much more portable. @@ -64,7 +69,7 @@ Coding Guidelines * Max line length is 80 characters. * Provide spaces around binary operators if that enhances readability. * Use a space after a colon, but not before it. -* Start types with a capital ``T``, unless they are pointers which start +* Start types with a capital ``T``, unless they are pointers/references which start with ``P``. diff --git a/doc/manual.txt b/doc/manual.txt index 29b51321e..c63df0304 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -893,11 +893,12 @@ integers from 0 to ``len(A)-1``. An array expression may be constructed by the array constructor ``[]``. `Sequences`:idx: are similar to arrays but of dynamic length which may change -during runtime (like strings). A sequence ``S`` is always indexed by integers -from 0 to ``len(S)-1`` and its bounds are checked. Sequences can be -constructed by the array constructor ``[]`` in conjunction with the array to -sequence operator ``@``. Another way to allocate space for a sequence is to -call the built-in ``newSeq`` procedure. +during runtime (like strings). Sequences are implemented as growable arrays, +allocating pieces of memory as items are added. A sequence ``S`` is always +indexed by integers from 0 to ``len(S)-1`` and its bounds are checked. +Sequences can be constructed by the array constructor ``[]`` in conjunction +with the array to sequence operator ``@``. Another way to allocate space for a +sequence is to call the built-in ``newSeq`` procedure. A sequence may be passed to a parameter that is of type *open array*. @@ -4673,9 +4674,10 @@ A proc can be marked with the `noStackFrame`:idx: pragma to tell the compiler it should not generate a stack frame for the proc. There are also no exit statements like ``return result;`` generated and the generated C function is declared as ``__declspec(naked)`` or ``__attribute__((naked))`` (depending on -the used C compiler). This is useful for procs that only consist of an -assembler statement. +the used C compiler). +**Note**: This pragma should only be used by procs which consist solely of assembler +statements. error pragma ------------ diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index cf260e9b7..806c255ee 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -81,6 +81,8 @@ else: ## A type representing a directory stream. type + TSocketHandle* = distinct cint # The type used to represent socket descriptors + Tdirent* {.importc: "struct dirent", header: "<dirent.h>", final, pure.} = object ## dirent_t struct d_ino*: TIno ## File serial number. @@ -1791,7 +1793,7 @@ proc dlopen*(a1: cstring, a2: cint): pointer {.importc, header: "<dlfcn.h>".} proc dlsym*(a1: pointer, a2: cstring): pointer {.importc, header: "<dlfcn.h>".} proc creat*(a1: cstring, a2: Tmode): cint {.importc, header: "<fcntl.h>".} -proc fcntl*(a1: cint, a2: cint): cint {.varargs, importc, header: "<fcntl.h>".} +proc fcntl*(a1: cint | TSocketHandle, a2: cint): cint {.varargs, importc, header: "<fcntl.h>".} proc open*(a1: cstring, a2: cint): cint {.varargs, importc, header: "<fcntl.h>".} proc posix_fadvise*(a1: cint, a2, a3: Toff, a4: cint): cint {. importc, header: "<fcntl.h>".} @@ -2068,7 +2070,7 @@ proc access*(a1: cstring, a2: cint): cint {.importc, header: "<unistd.h>".} proc alarm*(a1: cint): cint {.importc, header: "<unistd.h>".} proc chdir*(a1: cstring): cint {.importc, header: "<unistd.h>".} proc chown*(a1: cstring, a2: Tuid, a3: Tgid): cint {.importc, header: "<unistd.h>".} -proc close*(a1: cint): cint {.importc, header: "<unistd.h>".} +proc close*(a1: cint | TSocketHandle): cint {.importc, header: "<unistd.h>".} proc confstr*(a1: cint, a2: cstring, a3: int): int {.importc, header: "<unistd.h>".} proc crypt*(a1, a2: cstring): cstring {.importc, header: "<unistd.h>".} proc ctermid*(a1: cstring): cstring {.importc, header: "<unistd.h>".} @@ -2346,9 +2348,9 @@ proc strerror*(errnum: cint): cstring {.importc, header: "<string.h>".} proc hstrerror*(herrnum: cint): cstring {.importc, header: "<netdb.h>".} proc FD_CLR*(a1: cint, a2: var Tfd_set) {.importc, header: "<sys/select.h>".} -proc FD_ISSET*(a1: cint, a2: var Tfd_set): cint {. +proc FD_ISSET*(a1: cint | TSocketHandle, a2: var Tfd_set): cint {. importc, header: "<sys/select.h>".} -proc FD_SET*(a1: cint, a2: var Tfd_set) {.importc, header: "<sys/select.h>".} +proc FD_SET*(a1: cint | TSocketHandle, a2: var Tfd_set) {.importc, header: "<sys/select.h>".} proc FD_ZERO*(a1: var Tfd_set) {.importc, header: "<sys/select.h>".} proc pselect*(a1: cint, a2, a3, a4: ptr Tfd_set, a5: ptr ttimespec, @@ -2428,44 +2430,49 @@ proc CMSG_NXTHDR*(mhdr: ptr TMsgHdr, cmsg: ptr TCMsgHdr): ptr TCmsgHdr {. proc CMSG_FIRSTHDR*(mhdr: ptr TMsgHdr): ptr TCMsgHdr {. importc, header: "<sys/socket.h>".} -proc accept*(a1: cint, a2: ptr Tsockaddr, a3: ptr Tsocklen): cint {. +const + INVALID_SOCKET* = TSocketHandle(-1) + +proc `==`*(x, y: TSocketHandle): bool {.borrow.} + +proc accept*(a1: TSocketHandle, a2: ptr Tsockaddr, a3: ptr Tsocklen): TSocketHandle {. importc, header: "<sys/socket.h>".} -proc bindSocket*(a1: cint, a2: ptr Tsockaddr, a3: Tsocklen): cint {. +proc bindSocket*(a1: TSocketHandle, a2: ptr Tsockaddr, a3: Tsocklen): cint {. importc: "bind", header: "<sys/socket.h>".} ## is Posix's ``bind``, because ``bind`` is a reserved word -proc connect*(a1: cint, a2: ptr Tsockaddr, a3: Tsocklen): cint {. +proc connect*(a1: TSocketHandle, a2: ptr Tsockaddr, a3: Tsocklen): cint {. importc, header: "<sys/socket.h>".} -proc getpeername*(a1: cint, a2: ptr Tsockaddr, a3: ptr Tsocklen): cint {. +proc getpeername*(a1: TSocketHandle, a2: ptr Tsockaddr, a3: ptr Tsocklen): cint {. importc, header: "<sys/socket.h>".} -proc getsockname*(a1: cint, a2: ptr Tsockaddr, a3: ptr Tsocklen): cint {. +proc getsockname*(a1: TSocketHandle, a2: ptr Tsockaddr, a3: ptr Tsocklen): cint {. importc, header: "<sys/socket.h>".} -proc getsockopt*(a1, a2, a3: cint, a4: pointer, a5: ptr Tsocklen): cint {. +proc getsockopt*(a1: TSocketHandle, a2, a3: cint, a4: pointer, a5: ptr Tsocklen): cint {. importc, header: "<sys/socket.h>".} -proc listen*(a1, a2: cint): cint {. +proc listen*(a1: TSocketHandle, a2: cint): cint {. importc, header: "<sys/socket.h>".} -proc recv*(a1: cint, a2: pointer, a3: int, a4: cint): int {. +proc recv*(a1: TSocketHandle, a2: pointer, a3: int, a4: cint): int {. importc, header: "<sys/socket.h>".} -proc recvfrom*(a1: cint, a2: pointer, a3: int, a4: cint, +proc recvfrom*(a1: TSocketHandle, a2: pointer, a3: int, a4: cint, a5: ptr Tsockaddr, a6: ptr Tsocklen): int {. importc, header: "<sys/socket.h>".} -proc recvmsg*(a1: cint, a2: ptr Tmsghdr, a3: cint): int {. +proc recvmsg*(a1: TSocketHandle, a2: ptr Tmsghdr, a3: cint): int {. importc, header: "<sys/socket.h>".} -proc send*(a1: cint, a2: pointer, a3: int, a4: cint): int {. +proc send*(a1: TSocketHandle, a2: pointer, a3: int, a4: cint): int {. importc, header: "<sys/socket.h>".} -proc sendmsg*(a1: cint, a2: ptr Tmsghdr, a3: cint): int {. +proc sendmsg*(a1: TSocketHandle, a2: ptr Tmsghdr, a3: cint): int {. importc, header: "<sys/socket.h>".} -proc sendto*(a1: cint, a2: pointer, a3: int, a4: cint, a5: ptr Tsockaddr, +proc sendto*(a1: TSocketHandle, a2: pointer, a3: int, a4: cint, a5: ptr Tsockaddr, a6: Tsocklen): int {. importc, header: "<sys/socket.h>".} -proc setsockopt*(a1, a2, a3: cint, a4: pointer, a5: Tsocklen): cint {. +proc setsockopt*(a1: TSocketHandle, a2, a3: cint, a4: pointer, a5: Tsocklen): cint {. importc, header: "<sys/socket.h>".} -proc shutdown*(a1, a2: cint): cint {. +proc shutdown*(a1: TSocketHandle, a2: cint): cint {. importc, header: "<sys/socket.h>".} -proc socket*(a1, a2, a3: cint): cint {. +proc socket*(a1, a2, a3: cint): TSocketHandle {. importc, header: "<sys/socket.h>".} proc sockatmark*(a1: cint): cint {. importc, header: "<sys/socket.h>".} diff --git a/lib/pure/asyncio.nim b/lib/pure/asyncio.nim index 4ff6e0ced..c4a07d751 100644 --- a/lib/pure/asyncio.nim +++ b/lib/pure/asyncio.nim @@ -89,13 +89,13 @@ import sockets, os ## getSocket(s).accept(client) when defined(windows): - from winlean import TTimeVal, TFdSet, FD_ZERO, FD_SET, FD_ISSET, select + from winlean import TTimeVal, TSocketHandle, TFdSet, FD_ZERO, FD_SET, FD_ISSET, select else: - from posix import TTimeVal, TFdSet, FD_ZERO, FD_SET, FD_ISSET, select + from posix import TTimeVal, TSocketHandle, TFdSet, FD_ZERO, FD_SET, FD_ISSET, select type TDelegate* = object - fd*: cint + fd*: TSocketHandle deleVal*: PObject handleRead*: proc (h: PObject) {.nimcall.} @@ -213,6 +213,7 @@ proc asyncSockHandleRead(h: PObject) = else: PAsyncSocket(h).handleAccept(PAsyncSocket(h)) +proc close*(sock: PAsyncSocket) proc asyncSockHandleWrite(h: PObject) = when defined(ssl): if PAsyncSocket(h).socket.isSSL and not @@ -230,15 +231,19 @@ proc asyncSockHandleWrite(h: PObject) = else: if PAsyncSocket(h).sendBuffer != "": let sock = PAsyncSocket(h) - let bytesSent = sock.socket.sendAsync(sock.sendBuffer) - assert bytesSent > 0 - if bytesSent != sock.sendBuffer.len: - sock.sendBuffer = sock.sendBuffer[bytesSent .. -1] - elif bytesSent == sock.sendBuffer.len: - sock.sendBuffer = "" - - if PAsyncSocket(h).handleWrite != nil: - PAsyncSocket(h).handleWrite(PAsyncSocket(h)) + try: + let bytesSent = sock.socket.sendAsync(sock.sendBuffer) + assert bytesSent > 0 + if bytesSent != sock.sendBuffer.len: + sock.sendBuffer = sock.sendBuffer[bytesSent .. -1] + elif bytesSent == sock.sendBuffer.len: + sock.sendBuffer = "" + + if PAsyncSocket(h).handleWrite != nil: + PAsyncSocket(h).handleWrite(PAsyncSocket(h)) + except EOS: + # Most likely the socket closed before the full buffer could be sent to it. + sock.close() # TODO: Provide a handleError for users? else: if PAsyncSocket(h).handleWrite != nil: PAsyncSocket(h).handleWrite(PAsyncSocket(h)) diff --git a/lib/pure/base64.nim b/lib/pure/base64.nim index 685313551..4e59a6ca6 100644 --- a/lib/pure/base64.nim +++ b/lib/pure/base64.nim @@ -1,117 +1,127 @@ -# -# -# Nimrod's Runtime Library -# (c) Copyright 2010 Andreas Rumpf -# -# See the file "copying.txt", included in this -# distribution, for details about the copyright. -# - -## This module implements a base64 encoder and decoder. - -const - cb64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" - -proc encode*(s: string, lineLen = 75, newLine="\13\10"): string = - ## encodes `s` into base64 representation. After `lineLen` characters, a - ## `newline` is added. - var total = ((len(s) + 2) div 3) * 4 - var numLines = (total + lineLen - 1) div lineLen +# +# +# Nimrod's Runtime Library +# (c) Copyright 2010 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +## This module implements a base64 encoder and decoder. + +const + cb64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + +template encodeInternal(s: expr, lineLen: int, newLine: string): stmt {.immediate.} = + ## encodes `s` into base64 representation. After `lineLen` characters, a + ## `newline` is added. + var total = ((len(s) + 2) div 3) * 4 + var numLines = (total + lineLen - 1) div lineLen if numLines > 0: inc(total, (numLines-1) * newLine.len) - - result = newString(total) - var i = 0 - var r = 0 - var currLine = 0 - while i < s.len - 2: - var a = ord(s[i]) - var b = ord(s[i+1]) - var c = ord(s[i+2]) - result[r] = cb64[a shr 2] - result[r+1] = cb64[((a and 3) shl 4) or ((b and 0xF0) shr 4)] - result[r+2] = cb64[((b and 0x0F) shl 2) or ((c and 0xC0) shr 6)] - result[r+3] = cb64[c and 0x3F] - inc(r, 4) - inc(i, 3) - inc(currLine, 4) - if currLine >= lineLen and i != s.len-2: - for x in items(newLine): - result[r] = x - inc(r) - currLine = 0 - - if i < s.len-1: - var a = ord(s[i]) - var b = ord(s[i+1]) - result[r] = cb64[a shr 2] - result[r+1] = cb64[((a and 3) shl 4) or ((b and 0xF0) shr 4)] - result[r+2] = cb64[((b and 0x0F) shl 2)] - result[r+3] = '=' - if r+4 != result.len: - setLen(result, r+4) - elif i < s.len: - var a = ord(s[i]) - result[r] = cb64[a shr 2] - result[r+1] = cb64[(a and 3) shl 4] - result[r+2] = '=' - result[r+3] = '=' - if r+4 != result.len: - setLen(result, r+4) - else: - assert(r == result.len) - -proc decodeByte(b: char): int {.inline.} = - case b - of '+': result = ord('>') - of '0'..'9': result = ord(b) + 4 - of 'A'..'Z': result = ord(b) - ord('A') - of 'a'..'z': result = ord(b) - 71 - else: result = 63 - -proc decode*(s: string): string = - ## decodes a string in base64 representation back into its original form. - ## Whitespace is skipped. - const Whitespace = {' ', '\t', '\v', '\r', '\l', '\f'} - var total = ((len(s) + 3) div 4) * 3 - # total is an upper bound, as we will skip arbitrary whitespace: - result = newString(total) - - var i = 0 - var r = 0 - while true: - while s[i] in Whitespace: inc(i) - if i < s.len-3: - var a = s[i].decodeByte - var b = s[i+1].decodeByte - var c = s[i+2].decodeByte - var d = s[i+3].decodeByte - - result[r] = chr((a shl 2) and 0xff or ((b shr 4) and 0x03)) - result[r+1] = chr((b shl 4) and 0xff or ((c shr 2) and 0x0F)) - result[r+2] = chr((c shl 6) and 0xff or (d and 0x3F)) - inc(r, 3) - inc(i, 4) - else: break - assert i == s.len - # adjust the length: - if i > 0 and s[i-1] == '=': - dec(r) - if i > 1 and s[i-2] == '=': dec(r) - setLen(result, r) - -when isMainModule: - assert encode("leasure.") == "bGVhc3VyZS4=" - assert encode("easure.") == "ZWFzdXJlLg==" - assert encode("asure.") == "YXN1cmUu" - assert encode("sure.") == "c3VyZS4=" - - const longText = """Man is distinguished, not only by his reason, but by this - singular passion from other animals, which is a lust of the mind, - that by a perseverance of delight in the continued and indefatigable - generation of knowledge, exceeds the short vehemence of any carnal - pleasure.""" - const tests = ["", "abc", "xyz", "man", "leasure.", "sure.", "easure.", - "asure.", longText] - for t in items(tests): - assert decode(encode(t)) == t - + + result = newString(total) + var i = 0 + var r = 0 + var currLine = 0 + while i < s.len - 2: + var a = ord(s[i]) + var b = ord(s[i+1]) + var c = ord(s[i+2]) + result[r] = cb64[a shr 2] + result[r+1] = cb64[((a and 3) shl 4) or ((b and 0xF0) shr 4)] + result[r+2] = cb64[((b and 0x0F) shl 2) or ((c and 0xC0) shr 6)] + result[r+3] = cb64[c and 0x3F] + inc(r, 4) + inc(i, 3) + inc(currLine, 4) + if currLine >= lineLen and i != s.len-2: + for x in items(newLine): + result[r] = x + inc(r) + currLine = 0 + + if i < s.len-1: + var a = ord(s[i]) + var b = ord(s[i+1]) + result[r] = cb64[a shr 2] + result[r+1] = cb64[((a and 3) shl 4) or ((b and 0xF0) shr 4)] + result[r+2] = cb64[((b and 0x0F) shl 2)] + result[r+3] = '=' + if r+4 != result.len: + setLen(result, r+4) + elif i < s.len: + var a = ord(s[i]) + result[r] = cb64[a shr 2] + result[r+1] = cb64[(a and 3) shl 4] + result[r+2] = '=' + result[r+3] = '=' + if r+4 != result.len: + setLen(result, r+4) + else: + assert(r == result.len) + +proc encode*[T:TInteger|char](s: openarray[T], lineLen = 75, newLine="\13\10"): string = + ## encodes `s` into base64 representation. After `lineLen` characters, a + ## `newline` is added. + encodeInternal(s, lineLen, newLine) + +proc encode*(s: string, lineLen = 75, newLine="\13\10"): string = + ## encodes `s` into base64 representation. After `lineLen` characters, a + ## `newline` is added. + encodeInternal(s, lineLen, newLine) + +proc decodeByte(b: char): int {.inline.} = + case b + of '+': result = ord('>') + of '0'..'9': result = ord(b) + 4 + of 'A'..'Z': result = ord(b) - ord('A') + of 'a'..'z': result = ord(b) - 71 + else: result = 63 + +proc decode*(s: string): string = + ## decodes a string in base64 representation back into its original form. + ## Whitespace is skipped. + const Whitespace = {' ', '\t', '\v', '\r', '\l', '\f'} + var total = ((len(s) + 3) div 4) * 3 + # total is an upper bound, as we will skip arbitrary whitespace: + result = newString(total) + + var i = 0 + var r = 0 + while true: + while s[i] in Whitespace: inc(i) + if i < s.len-3: + var a = s[i].decodeByte + var b = s[i+1].decodeByte + var c = s[i+2].decodeByte + var d = s[i+3].decodeByte + + result[r] = chr((a shl 2) and 0xff or ((b shr 4) and 0x03)) + result[r+1] = chr((b shl 4) and 0xff or ((c shr 2) and 0x0F)) + result[r+2] = chr((c shl 6) and 0xff or (d and 0x3F)) + inc(r, 3) + inc(i, 4) + else: break + assert i == s.len + # adjust the length: + if i > 0 and s[i-1] == '=': + dec(r) + if i > 1 and s[i-2] == '=': dec(r) + setLen(result, r) + +when isMainModule: + assert encode("leasure.") == "bGVhc3VyZS4=" + assert encode("easure.") == "ZWFzdXJlLg==" + assert encode("asure.") == "YXN1cmUu" + assert encode("sure.") == "c3VyZS4=" + + const longText = """Man is distinguished, not only by his reason, but by this + singular passion from other animals, which is a lust of the mind, + that by a perseverance of delight in the continued and indefatigable + generation of knowledge, exceeds the short vehemence of any carnal + pleasure.""" + const tests = ["", "abc", "xyz", "man", "leasure.", "sure.", "easure.", + "asure.", longText] + for t in items(tests): + assert decode(encode(t)) == t + diff --git a/lib/pure/collections/LockFreeHash.nim b/lib/pure/collections/LockFreeHash.nim new file mode 100644 index 000000000..d3a91763a --- /dev/null +++ b/lib/pure/collections/LockFreeHash.nim @@ -0,0 +1,581 @@ +#nimrod c -t:-march=i686 --cpu:amd64 --threads:on -d:release lockfreehash.nim + +import baseutils, unsigned, math, hashes + + + +const + minTableSize = 8 + reProbeLimit = 12 + minCopyWork = 4096 + intSize = sizeof(int) + + + +when sizeof(int) == 4: # 32bit + type + TRaw = range[0..1073741823] + ## The range of uint values that can be stored directly in a value slot + ## when on a 32 bit platform + +elif sizeof(int) == 8: # 64bit + type + TRaw = range[0..4611686018427387903] + ## The range of uint values that can be stored directly in a value slot + ## when on a 64 bit platform +else: echo("unsupported platform") + +type + TEntry = tuple + key: int + value: int + + TEntryArr = ptr array[0..10_000_000, TEntry] + + PConcTable[K,V] = ptr object {.pure.} + len: int + used: int + active: int + copyIdx: int + copyDone: int + next: PConcTable[K,V] + data: TEntryArr + + +proc setVal[K,V](table: var PConcTable[K,V], key: int, val: int, + expVal: int, match: bool): int + +#------------------------------------------------------------------------------ + +# Create a new table +proc newLFTable*[K,V](size: int = minTableSize): PConcTable[K,V] = + let + dataLen = max(nextPowerOfTwo(size), minTableSize) + dataSize = dataLen*sizeof(TEntry) + dataMem = allocShared0(dataSize) + tableSize = 7 * intSize + tableMem = allocShared0(tableSize) + table = cast[PConcTable[K,V]](tableMem) + table.len = dataLen + table.used = 0 + table.active = 0 + table.copyIdx = 0 + table.copyDone = 0 + table.next = nil + table.data = cast[TEntryArr](dataMem) + result = table + +#------------------------------------------------------------------------------ + +# Delete a table +proc deleteConcTable[K,V](tbl: PConcTable[K,V]) = + deallocShared(tbl.data) + deallocShared(tbl) + +#------------------------------------------------------------------------------ + +proc `[]`[K,V](table: var PConcTable[K,V], i: int): var TEntry {.inline.} = + table.data[i] + +#------------------------------------------------------------------------------ +# State flags stored in ptr + + +proc pack[T](x: T): int {.inline.} = + result = (cast[int](x) shl 2) + #echo("packKey ",cast[int](x) , " -> ", result) + +# Pop the flags off returning a 4 byte aligned ptr to our Key or Val +proc pop(x: int): int {.inline.} = + result = x and 0xFFFFFFFC'i32 + +# Pop the raw value off of our Key or Val +proc popRaw(x: int): int {.inline.} = + result = x shr 2 + +# Pop the flags off returning a 4 byte aligned ptr to our Key or Val +proc popPtr[V](x: int): ptr V {.inline.} = + result = cast[ptr V](pop(x)) + #echo("popPtr " & $x & " -> " & $cast[int](result)) + +# Ghost (sentinel) +# K or V is no longer valid use new table +const Ghost = 0xFFFFFFFC +proc isGhost(x: int): bool {.inline.} = + result = x == 0xFFFFFFFC + +# Tombstone +# applied to V = K is dead +proc isTomb(x: int): bool {.inline.} = + result = (x and 0x00000002) != 0 + +proc setTomb(x: int): int {.inline.} = + result = x or 0x00000002 + +# Prime +# K or V is in new table copied from old +proc isPrime(x: int): bool {.inline.} = + result = (x and 0x00000001) != 0 + +proc setPrime(x: int): int {.inline.} = + result = x or 0x00000001 + +#------------------------------------------------------------------------------ + +##This is for i32 only need to override for i64 +proc hashInt(x: int):int {.inline.} = + var h = uint32(x) #shr 2'u32 + h = h xor (h shr 16'u32) + h *= 0x85ebca6b'u32 + h = h xor (h shr 13'u32) + h *= 0xc2b2ae35'u32 + h = h xor (h shr 16'u32) + result = int(h) + +#------------------------------------------------------------------------------ + +proc resize[K,V](self: PConcTable[K,V]): PConcTable[K,V] = + var next = atomic_load_n(self.next.addr, ATOMIC_RELAXED) + #echo("next = " & $cast[int](next)) + if next != nil: + #echo("A new table already exists, copy in progress") + return next + var + oldLen = atomic_load_n(self.len.addr, ATOMIC_RELAXED) + newTable = newLFTable[K,V](oldLen*2) + success = atomic_compare_exchange_n(self.next.addr, next.addr, newTable, + false, ATOMIC_RELAXED, ATOMIC_RELAXED) + if not success: + echo("someone beat us to it! delete table we just created and return his " & $cast[int](next)) + deleteConcTable(newTable) + return next + else: + echo("Created New Table! " & $cast[int](newTable) & " Size = " & $newTable.len) + return newTable + + +#------------------------------------------------------------------------------ +#proc keyEQ[K](key1: ptr K, key2: ptr K): bool {.inline.} = +proc keyEQ[K](key1: int, key2: int): bool {.inline.} = + result = false + when K is TRaw: + if key1 == key2: + result = true + else: + var + p1 = popPtr[K](key1) + p2 = popPtr[K](key2) + if p1 != nil and p2 != nil: + if cast[int](p1) == cast[int](p2): + return true + if p1[] == p2[]: + return true + +#------------------------------------------------------------------------------ + +#proc tableFull(self: var PConcTable[K,V]) : bool {.inline.} = + + +#------------------------------------------------------------------------------ + +proc copySlot[K,V](idx: int, oldTbl: var PConcTable[K,V], newTbl: var PConcTable[K,V]): bool = + #echo("Copy idx " & $idx) + var + oldVal = 0 + oldkey = 0 + ok = false + result = false + #Block the key so no other threads waste time here + while not ok: + ok = atomic_compare_exchange_n(oldTbl[idx].key.addr, oldKey.addr, + setTomb(oldKey), false, ATOMIC_RELAXED, ATOMIC_RELAXED) + #echo("oldKey was = " & $oldKey & " set it to tomb " & $setTomb(oldKey)) + #Prevent new values from appearing in the old table by priming + oldVal = atomic_load_n(oldTbl[idx].value.addr, ATOMIC_RELAXED) + while not isPrime(oldVal): + var box = if oldVal == NULL or isTomb(oldVal) : oldVal.setTomb.setPrime + else: oldVal.setPrime + if atomic_compare_exchange_n(oldTbl[idx].value.addr, oldVal.addr, + box, false, ATOMIC_RELAXED, ATOMIC_RELAXED): + if isPrime(box) and isTomb(box): + return true + oldVal = box + break + #echo("oldVal was = ", oldVal, " set it to prime ", box) + if isPrime(oldVal) and isTomb(oldVal): + #when not (K is TRaw): + # deallocShared(popPtr[K](oldKey)) + return false + if isTomb(oldVal): + echo("oldVal is Tomb!!!, should not happen") + if pop(oldVal) != NULL: + result = setVal(newTbl, pop(oldKey), pop(oldVal), NULL, true) == NULL + if result: + #echo("Copied a Slot! idx= " & $idx & " key= " & $oldKey & " val= " & $oldVal) + else: + #echo("copy slot failed") + # Our copy is done so we disable the old slot + while not ok: + ok = atomic_compare_exchange_n(oldTbl[idx].value.addr, oldVal.addr, + oldVal.setTomb.setPrime , false, ATOMIC_RELAXED, ATOMIC_RELAXED) + #echo("disabled old slot") + #echo"---------------------" + +#------------------------------------------------------------------------------ + +proc promote[K,V](table: var PConcTable[K,V]) = + var + newData = atomic_load_n(table.next.data.addr, ATOMIC_RELAXED) + newLen = atomic_load_n(table.next.len.addr, ATOMIC_RELAXED) + newUsed = atomic_load_n(table.next.used.addr, ATOMIC_RELAXED) + + deallocShared(table.data) + atomic_store_n(table.data.addr, newData, ATOMIC_RELAXED) + atomic_store_n(table.len.addr, newLen, ATOMIC_RELAXED) + atomic_store_n(table.used.addr, newUsed, ATOMIC_RELAXED) + atomic_store_n(table.copyIdx.addr, 0, ATOMIC_RELAXED) + atomic_store_n(table.copyDone.addr, 0, ATOMIC_RELAXED) + deallocShared(table.next) + atomic_store_n(table.next.addr, nil, ATOMIC_RELAXED) + echo("new table swapped!") + +#------------------------------------------------------------------------------ + +proc checkAndPromote[K,V](table: var PConcTable[K,V], workDone: int): bool = + var + oldLen = atomic_load_n(table.len.addr, ATOMIC_RELAXED) + copyDone = atomic_load_n(table.copyDone.addr, ATOMIC_RELAXED) + ok: bool + result = false + if workDone > 0: + #echo("len to copy =" & $oldLen) + #echo("copyDone + workDone = " & $copyDone & " + " & $workDone) + while not ok: + ok = atomic_compare_exchange_n(table.copyDone.addr, copyDone.addr, + copyDone + workDone, false, ATOMIC_RELAXED, ATOMIC_RELAXED) + #if ok: echo("set copyDone") + # If the copy is done we can promote this table + if copyDone + workDone >= oldLen: + # Swap new data + #echo("work is done!") + table.promote + result = true + +#------------------------------------------------------------------------------ + +proc copySlotAndCheck[K,V](table: var PConcTable[K,V], idx: int): + PConcTable[K,V] = + var + newTable = cast[PConcTable[K,V]](atomic_load_n(table.next.addr, ATOMIC_RELAXED)) + result = newTable + if newTable != nil and copySlot(idx, table, newTable): + #echo("copied a single slot, idx = " & $idx) + if checkAndPromote(table, 1): return table + + +#------------------------------------------------------------------------------ + +proc helpCopy[K,V](table: var PConcTable[K,V]): PConcTable[K,V] = + var + newTable = cast[PConcTable[K,V]](atomic_load_n(table.next.addr, ATOMIC_RELAXED)) + result = newTable + if newTable != nil: + var + oldLen = atomic_load_n(table.len.addr, ATOMIC_RELAXED) + copyDone = atomic_load_n(table.copyDone.addr, ATOMIC_RELAXED) + copyIdx = 0 + work = min(oldLen, minCopyWork) + #panicStart = -1 + workDone = 0 + if copyDone < oldLen: + var ok: bool + while not ok: + ok = atomic_compare_exchange_n(table.copyIdx.addr, copyIdx.addr, + copyIdx + work, false, ATOMIC_RELAXED, ATOMIC_RELAXED) + #echo("copy idx = ", copyIdx) + for i in 0..work-1: + var idx = (copyIdx + i) and (oldLen - 1) + if copySlot(idx, table, newTable): + workDone += 1 + if workDone > 0: + #echo("did work ", workDone, " on thread ", cast[int](myThreadID[pointer]())) + if checkAndPromote(table, workDone): return table + # In case a thread finished all the work then got stalled before promotion + if checkAndPromote(table, 0): return table + + + +#------------------------------------------------------------------------------ + +proc setVal[K,V](table: var PConcTable[K,V], key: int, val: int, + expVal: int, match: bool): int = + #echo("-try set- in table ", " key = ", (popPtr[K](key)[]), " val = ", val) + when K is TRaw: + var idx = hashInt(key) + else: + var idx = popPtr[K](key)[].hash + var + nextTable: PConcTable[K,V] + probes = 1 + # spin until we find a key slot or build and jump to next table + while true: + idx = idx and (table.len - 1) + #echo("try set idx = " & $idx & "for" & $key) + var + probedKey = NULL + openKey = atomic_compare_exchange_n(table[idx].key.addr, probedKey.addr, + key, false, ATOMIC_RELAXED, ATOMIC_RELAXED) + if openKey: + if val.isTomb: + #echo("val was tomb, bail, no reason to set an open slot to tomb") + return val + #increment used slots + #echo("found an open slot, total used = " & + #$atomic_add_fetch(table.used.addr, 1, ATOMIC_RELAXED)) + discard atomic_add_fetch(table.used.addr, 1, ATOMIC_RELAXED) + break # We found an open slot + #echo("set idx ", idx, " key = ", key, " probed = ", probedKey) + if keyEQ[K](probedKey, key): + #echo("we found the matching slot") + break # We found a matching slot + if (not(expVal != NULL and match)) and (probes >= reProbeLimit or key.isTomb): + if key.isTomb: echo("Key is Tombstone") + #if probes >= reProbeLimit: echo("Too much probing " & $probes) + #echo("try to resize") + #create next bigger table + nextTable = resize(table) + #help do some copying + #echo("help copy old table to new") + nextTable = helpCopy(table) + #now setVal in the new table instead + #echo("jumping to next table to set val") + return setVal(nextTable, key, val, expVal, match) + else: + idx += 1 + probes += 1 + # Done spinning for a new slot + var oldVal = atomic_load_n(table[idx].value.addr, ATOMIC_RELAXED) + if val == oldVal: + #echo("this val is alredy in the slot") + return oldVal + nextTable = atomic_load_n(table.next.addr, ATOMIC_SEQ_CST) + if nextTable == nil and + ((oldVal == NULL and + (probes >= reProbeLimit or table.used / table.len > 0.8)) or + (isPrime(oldVal))): + if table.used / table.len > 0.8: echo("resize because usage ratio = " & + $(table.used / table.len)) + if isPrime(oldVal): echo("old val isPrime, should be a rare mem ordering event") + nextTable = resize(table) + if nextTable != nil: + #echo("tomb old slot then set in new table") + nextTable = copySlotAndCheck(table,idx) + return setVal(nextTable, key, val, expVal, match) + # Finaly ready to add new val to table + while true: + if match and oldVal != expVal: + #echo("set failed, no match oldVal= " & $oldVal & " expVal= " & $expVal) + return oldVal + if atomic_compare_exchange_n(table[idx].value.addr, oldVal.addr, + val, false, ATOMIC_RELEASE, ATOMIC_RELAXED): + #echo("val set at table " & $cast[int](table)) + if expVal != NULL: + if (oldVal == NULL or isTomb(oldVal)) and not isTomb(val): + discard atomic_add_fetch(table.active.addr, 1, ATOMIC_RELAXED) + elif not (oldVal == NULL or isTomb(oldVal)) and isTomb(val): + discard atomic_add_fetch(table.active.addr, -1, ATOMIC_RELAXED) + if oldVal == NULL and expVal != NULL: + return setTomb(oldVal) + else: return oldVal + if isPrime(oldVal): + nextTable = copySlotAndCheck(table, idx) + return setVal(nextTable, key, val, expVal, match) + +#------------------------------------------------------------------------------ + +proc getVal[K,V](table: var PConcTable[K,V], key: int): int = + #echo("-try get- key = " & $key) + when K is TRaw: + var idx = hashInt(key) + else: + var idx = popPtr[K](key)[].hash + #echo("get idx ", idx) + var + probes = 0 + val: int + while true: + idx = idx and (table.len - 1) + var + newTable: PConcTable[K,V] # = atomic_load_n(table.next.addr, ATOMIC_ACQUIRE) + probedKey = atomic_load_n(table[idx].key.addr, ATOMIC_SEQ_CST) + if keyEQ[K](probedKey, key): + #echo("found key after ", probes+1) + val = atomic_load_n(table[idx].value.addr, ATOMIC_ACQUIRE) + if not isPrime(val): + if isTomb(val): + #echo("val was tomb but not prime") + return NULL + else: + #echo("-GotIt- idx = ", idx, " key = ", key, " val ", val ) + return val + else: + newTable = copySlotAndCheck(table, idx) + return getVal(newTable, key) + else: + #echo("probe ", probes, " idx = ", idx, " key = ", key, " found ", probedKey ) + if probes >= reProbeLimit*4 or key.isTomb: + if newTable == nil: + #echo("too many probes and no new table ", key, " ", idx ) + return NULL + else: + newTable = helpCopy(table) + return getVal(newTable, key) + idx += 1 + probes += 1 + +#------------------------------------------------------------------------------ + +#proc set*(table: var PConcTable[TRaw,TRaw], key: TRaw, val: TRaw) = +# discard setVal(table, pack(key), pack(key), NULL, false) + +#proc set*[V](table: var PConcTable[TRaw,V], key: TRaw, val: ptr V) = +# discard setVal(table, pack(key), cast[int](val), NULL, false) + +proc set*[K,V](table: var PConcTable[K,V], key: var K, val: var V) = + when not (K is TRaw): + var newKey = cast[int](copyShared(key)) + else: + var newKey = pack(key) + when not (V is TRaw): + var newVal = cast[int](copyShared(val)) + else: + var newVal = pack(val) + var oldPtr = pop(setVal(table, newKey, newVal, NULL, false)) + #echo("oldPtr = ", cast[int](oldPtr), " newPtr = ", cast[int](newPtr)) + when not (V is TRaw): + if newVal != oldPtr and oldPtr != NULL: + deallocShared(cast[ptr V](oldPtr)) + + + +proc get*[K,V](table: var PConcTable[K,V], key: var K): V = + when not (V is TRaw): + when not (K is TRaw): + return popPtr[V](getVal(table, cast[int](key.addr)))[] + else: + return popPtr[V](getVal(table, pack(key)))[] + else: + when not (K is TRaw): + return popRaw(getVal(table, cast[int](key.addr))) + else: + return popRaw(getVal(table, pack(key))) + + + + + + + + + + + +#proc `[]`[K,V](table: var PConcTable[K,V], key: K): PEntry[K,V] {.inline.} = +# getVal(table, key) + +#proc `[]=`[K,V](table: var PConcTable[K,V], key: K, val: V): PEntry[K,V] {.inline.} = +# setVal(table, key, val) + + + + + + +#Tests ---------------------------- +when isMainModule: + import locks, times, mersenne + + const + numTests = 100000 + numThreads = 10 + + + + type + TTestObj = tuple + thr: int + f0: int + f1: int + + TData = tuple[k: string,v: TTestObj] + PDataArr = array[0..numTests-1, TData] + Dict = PConcTable[string,TTestObj] + + var + thr: array[0..numThreads-1, TThread[Dict]] + + table = newLFTable[string,TTestObj](8) + rand = newMersenneTwister(2525) + + proc createSampleData(len: int): PDataArr = + #result = cast[PDataArr](allocShared0(sizeof(TData)*numTests)) + for i in 0..len-1: + result[i].k = "mark" & $(i+1) + #echo("mark" & $(i+1), " ", hash("mark" & $(i+1))) + result[i].v.thr = 0 + result[i].v.f0 = i+1 + result[i].v.f1 = 0 + #echo("key = " & $(i+1) & " Val ptr = " & $cast[int](result[i].v.addr)) + + + + proc threadProc(tp: Dict) {.thread.} = + var t = cpuTime(); + for i in 1..numTests: + var key = "mark" & $(i) + var got = table.get(key) + got.thr = cast[int](myThreadID[pointer]()) + got.f1 = got.f1 + 1 + table.set(key, got) + t = cpuTime() - t + echo t + + + var testData = createSampleData(numTests) + + for i in 0..numTests-1: + table.set(testData[i].k, testData[i].v) + + var i = 0 + while i < numThreads: + createThread(thr[i], threadProc, table) + i += 1 + + joinThreads(thr) + + + + + + var fails = 0 + + for i in 0..numTests-1: + var got = table.get(testData[i].k) + if got.f0 != i+1 or got.f1 != numThreads: + fails += 1 + echo(got) + + echo("Failed read or write = ", fails) + + + #for i in 1..numTests: + # echo(i, " = ", hashInt(i) and 8191) + + deleteConcTable(table) + + + + + + + diff --git a/lib/pure/collections/baseutils.nim b/lib/pure/collections/baseutils.nim new file mode 100644 index 000000000..565a89ccb --- /dev/null +++ b/lib/pure/collections/baseutils.nim @@ -0,0 +1,41 @@ + + + +#------------------------------------------------------------------------------ +## Useful Constants +const NULL* = 0 + + +#------------------------------------------------------------------------------ +## Memory Utility Functions + +proc newHeap*[T](): ptr T = + result = cast[ptr T](alloc0(sizeof(T))) + +proc copyNew*[T](x: var T): ptr T = + var + size = sizeof(T) + mem = alloc(size) + copyMem(mem, x.addr, size) + return cast[ptr T](mem) + +proc copyTo*[T](val: var T, dest: int) = + copyMem(pointer(dest), val.addr, sizeof(T)) + +proc allocType*[T](): pointer = alloc(sizeof(T)) + +proc newShared*[T](): ptr T = + result = cast[ptr T](allocShared0(sizeof(T))) + +proc copyShared*[T](x: var T): ptr T = + var + size = sizeof(T) + mem = allocShared(size) + copyMem(mem, x.addr, size) + return cast[ptr T](mem) + +#------------------------------------------------------------------------------ +## Pointer arithmetic + +proc `+`*(p: pointer, i: int): pointer {.inline.} = + cast[pointer](cast[int](p) + i) \ No newline at end of file diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim index 705a97469..3a009a8cb 100644 --- a/lib/pure/collections/sequtils.nim +++ b/lib/pure/collections/sequtils.nim @@ -117,6 +117,57 @@ proc filter*[T](seq1: seq[T], pred: proc(item: T): bool {.closure.}): seq[T] = ## assert f2 == @["yellow"] accumulateResult(filter(seq1, pred)) +proc delete*[T](s: var seq[T], first=0, last=0) = + ## Deletes in `s` the items at position `first` .. `last`. This modifies + ## `s` itself, it does not return a copy. + ## + ## Example: + ## + ##.. code-block:: nimrod + ## let outcome = @[1,1,1,1,1,1,1,1] + ## var dest = @[1,1,1,2,2,2,2,2,2,1,1,1,1,1] + ## dest.delete(3, 8) + ## assert outcome == dest + + var i = first + var j = last+1 + var newLen = len(s)-j+i + while i < newLen: + s[i].shallowCopy(s[j]) + inc(i) + inc(j) + setlen(s, newLen) + +proc insert*[T](dest: var seq[T], src: openArray[T], pos=0) = + ## Inserts items from `src` into `dest` at position `pos`. This modifies + ## `dest` itself, it does not return a copy. + ## + ## Example: + ## + ##.. code-block:: nimrod + ## var dest = @[1,1,1,1,1,1,1,1] + ## let + ## src = @[2,2,2,2,2,2] + ## outcome = @[1,1,1,2,2,2,2,2,2,1,1,1,1,1] + ## dest.insert(src, 3) + ## assert dest == outcome + + var j = len(dest) - 1 + var i = len(dest) + len(src) - 1 + dest.setLen(i + 1) + + # Move items after `pos` to the end of the sequence. + while j >= pos: + dest[i].shallowCopy(dest[j]) + dec(i) + dec(j) + # Insert items from `dest` into `dest` at `pos` + inc(j) + for item in src: + dest[j] = item + inc(j) + + template filterIt*(seq1, pred: expr): expr {.immediate.} = ## Returns a new sequence with all the items that fulfilled the predicate. ## @@ -312,4 +363,22 @@ when isMainModule: assert multiplication == 495, "Multiplication is (5*(9*(11)))" assert concatenation == "nimrodiscool" + block: # delete tests + let outcome = @[1,1,1,1,1,1,1,1] + var dest = @[1,1,1,2,2,2,2,2,2,1,1,1,1,1] + dest.delete(3, 8) + assert outcome == dest, """\ + Deleting range 3-9 from [1,1,1,2,2,2,2,2,2,1,1,1,1,1] + is [1,1,1,1,1,1,1,1]""" + + block: # insert tests + var dest = @[1,1,1,1,1,1,1,1] + let + src = @[2,2,2,2,2,2] + outcome = @[1,1,1,2,2,2,2,2,2,1,1,1,1,1] + dest.insert(src, 3) + assert dest == outcome, """\ + Inserting [2,2,2,2,2,2] into [1,1,1,1,1,1,1,1] + at 3 is [1,1,1,2,2,2,2,2,2,1,1,1,1,1]""" + echo "Finished doc tests" diff --git a/lib/pure/httpserver.nim b/lib/pure/httpserver.nim index e24709451..043e713a6 100644 --- a/lib/pure/httpserver.nim +++ b/lib/pure/httpserver.nim @@ -224,11 +224,13 @@ type TAsyncHTTPServer = object of TServer asyncSocket: PAsyncSocket -proc open*(s: var TServer, port = TPort(80)) = +proc open*(s: var TServer, port = TPort(80), reuseAddr = false) = ## creates a new server at port `port`. If ``port == 0`` a free port is ## acquired that can be accessed later by the ``port`` proc. s.socket = socket(AF_INET) if s.socket == InvalidSocket: OSError(OSLastError()) + if reuseAddr: + s.socket.setSockOpt(OptReuseAddr, True) bindAddr(s.socket, port) listen(s.socket) @@ -475,7 +477,8 @@ proc nextAsync(s: PAsyncHTTPServer) = proc asyncHTTPServer*(handleRequest: proc (server: PAsyncHTTPServer, client: TSocket, path, query: string): bool {.closure.}, - port = TPort(80), address = ""): PAsyncHTTPServer = + port = TPort(80), address = "", + reuseAddr = false): PAsyncHTTPServer = ## Creates an Asynchronous HTTP server at ``port``. var capturedRet: PAsyncHTTPServer new(capturedRet) @@ -486,6 +489,8 @@ proc asyncHTTPServer*(handleRequest: proc (server: PAsyncHTTPServer, client: TSo let quit = handleRequest(capturedRet, capturedRet.client, capturedRet.path, capturedRet.query) if quit: capturedRet.asyncSocket.close() + if reuseAddr: + capturedRet.asyncSocket.setSockOpt(OptReuseAddr, True) capturedRet.asyncSocket.bindAddr(port, address) capturedRet.asyncSocket.listen() diff --git a/lib/pure/mersenne.nim b/lib/pure/mersenne.nim new file mode 100644 index 000000000..2b12cce73 --- /dev/null +++ b/lib/pure/mersenne.nim @@ -0,0 +1,39 @@ +import unsigned + +type + TMersenneTwister* = object + mt: array[0..623, uint32] + index: int + +proc newMersenneTwister*(seed: int): TMersenneTwister = + result.index = 0 + result.mt[0]= uint32(seed) + for i in 1..623'u32: + result.mt[i]= (0x6c078965'u32 * (result.mt[i-1] xor (result.mt[i-1] shr 30'u32)) + i) + +proc generateNumbers(m: var TMersenneTwister) = + for i in 0..623: + var y = (m.mt[i] and 0x80000000'u32) + (m.mt[(i+1) mod 624] and 0x7fffffff'u32) + m.mt[i] = m.mt[(i+397) mod 624] xor uint32(y shr 1'u32) + if (y mod 2'u32) != 0: + m.mt[i] = m.mt[i] xor 0x9908b0df'u32 + +proc getNum*(m: var TMersenneTwister): int = + if m.index == 0: + generateNumbers(m) + var y = m.mt[m.index] + y = y xor (y shr 11'u32) + y = y xor ((7'u32 shl y) and 0x9d2c5680'u32) + y = y xor ((15'u32 shl y) and 0xefc60000'u32) + y = y xor (y shr 18'u32) + m.index = (m.index+1) mod 624 + return int(y) + + + +# Test +when isMainModule: + var mt = newMersenneTwister(2525) + + for i in 0..99: + echo mt.getNum \ No newline at end of file diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index b9bde73bc..754e34b85 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -24,10 +24,10 @@ type TProcess = object of TObject when defined(windows): FProcessHandle: Thandle - inputHandle, outputHandle, errorHandle: TFileHandle + inHandle, outHandle, errHandle: TFileHandle id: THandle else: - inputHandle, outputHandle, errorHandle: TFileHandle + inHandle, outHandle, errHandle: TFileHandle inStream, outStream, errStream: PStream id: TPid exitCode: cint @@ -113,23 +113,47 @@ proc peekExitCode*(p: PProcess): int {.tags: [].} ## return -1 if the process is still running. Otherwise the process' exit code proc inputStream*(p: PProcess): PStream {.rtl, extern: "nosp$1", tags: [].} - ## returns ``p``'s input stream for writing to + ## returns ``p``'s input stream for writing to. ## ## **Warning**: The returned `PStream` should not be closed manually as it ## is closed when closing the PProcess ``p``. proc outputStream*(p: PProcess): PStream {.rtl, extern: "nosp$1", tags: [].} - ## returns ``p``'s output stream for reading from + ## returns ``p``'s output stream for reading from. ## ## **Warning**: The returned `PStream` should not be closed manually as it ## is closed when closing the PProcess ``p``. proc errorStream*(p: PProcess): PStream {.rtl, extern: "nosp$1", tags: [].} - ## returns ``p``'s output stream for reading from + ## returns ``p``'s error stream for reading from. ## ## **Warning**: The returned `PStream` should not be closed manually as it ## is closed when closing the PProcess ``p``. +proc inputHandle*(p: PProcess): TFileHandle {.rtl, extern: "nosp$1", + tags: [].} = + ## returns ``p``'s input file handle for writing to. + ## + ## **Warning**: The returned `TFileHandle` should not be closed manually as + ## it is closed when closing the PProcess ``p``. + result = p.inHandle + +proc outputHandle*(p: PProcess): TFileHandle {.rtl, extern: "nosp$1", + tags: [].} = + ## returns ``p``'s output file handle for reading from. + ## + ## **Warning**: The returned `TFileHandle` should not be closed manually as + ## it is closed when closing the PProcess ``p``. + result = p.outHandle + +proc errorHandle*(p: PProcess): TFileHandle {.rtl, extern: "nosp$1", + tags: [].} = + ## returns ``p``'s error file handle for reading from. + ## + ## **Warning**: The returned `TFileHandle` should not be closed manually as + ## it is closed when closing the PProcess ``p``. + result = p.errHandle + when defined(macosx) or defined(bsd): const CTL_HW = 6 @@ -212,8 +236,8 @@ proc execProcesses*(cmds: openArray[string], inc(i) if i > high(cmds): break for j in 0..m-1: - if q[j] != nil: close(q[j]) result = max(waitForExit(q[j]), result) + if q[j] != nil: close(q[j]) else: for i in 0..high(cmds): var p = startCmd(cmds[i], options=options) @@ -339,16 +363,16 @@ when defined(Windows) and not defined(useNimRtl): HE = HO else: CreatePipeHandles(HE, Si.hStdError) - result.inputHandle = TFileHandle(hi) - result.outputHandle = TFileHandle(ho) - result.errorHandle = TFileHandle(he) + result.inHandle = TFileHandle(hi) + result.outHandle = TFileHandle(ho) + result.errHandle = TFileHandle(he) else: SI.hStdError = GetStdHandle(STD_ERROR_HANDLE) SI.hStdInput = GetStdHandle(STD_INPUT_HANDLE) SI.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE) - result.inputHandle = TFileHandle(si.hStdInput) - result.outputHandle = TFileHandle(si.hStdOutput) - result.errorHandle = TFileHandle(si.hStdError) + result.inHandle = TFileHandle(si.hStdInput) + result.outHandle = TFileHandle(si.hStdOutput) + result.errHandle = TFileHandle(si.hStdError) var cmdl: cstring when false: # poUseShell in options: @@ -389,9 +413,9 @@ when defined(Windows) and not defined(useNimRtl): proc close(p: PProcess) = when false: # somehow this does not work on Windows: - discard CloseHandle(p.inputHandle) - discard CloseHandle(p.outputHandle) - discard CloseHandle(p.errorHandle) + discard CloseHandle(p.inHandle) + discard CloseHandle(p.outHandle) + discard CloseHandle(p.errHandle) discard CloseHandle(p.FProcessHandle) proc suspend(p: PProcess) = @@ -425,13 +449,13 @@ when defined(Windows) and not defined(useNimRtl): return res proc inputStream(p: PProcess): PStream = - result = newFileHandleStream(p.inputHandle) + result = newFileHandleStream(p.inHandle) proc outputStream(p: PProcess): PStream = - result = newFileHandleStream(p.outputHandle) + result = newFileHandleStream(p.outHandle) proc errorStream(p: PProcess): PStream = - result = newFileHandleStream(p.errorHandle) + result = newFileHandleStream(p.errHandle) proc execCmd(command: string): int = var @@ -626,20 +650,20 @@ elif not defined(useNimRtl): if poParentStreams in options: # does not make much sense, but better than nothing: - result.inputHandle = 0 - result.outputHandle = 1 + result.inHandle = 0 + result.outHandle = 1 if poStdErrToStdOut in options: - result.errorHandle = result.outputHandle + result.errHandle = result.outHandle else: - result.errorHandle = 2 + result.errHandle = 2 else: - result.inputHandle = p_stdin[writeIdx] - result.outputHandle = p_stdout[readIdx] + result.inHandle = p_stdin[writeIdx] + result.outHandle = p_stdout[readIdx] if poStdErrToStdOut in options: - result.errorHandle = result.outputHandle + result.errHandle = result.outHandle discard close(p_stderr[readIdx]) else: - result.errorHandle = p_stderr[readIdx] + result.errHandle = p_stderr[readIdx] discard close(p_stderr[writeIdx]) discard close(p_stdin[readIdx]) discard close(p_stdout[writeIdx]) @@ -648,9 +672,9 @@ elif not defined(useNimRtl): if p.inStream != nil: close(p.inStream) if p.outStream != nil: close(p.outStream) if p.errStream != nil: close(p.errStream) - discard close(p.inputHandle) - discard close(p.outputHandle) - discard close(p.errorHandle) + discard close(p.inHandle) + discard close(p.outHandle) + discard close(p.errHandle) proc suspend(p: PProcess) = if kill(-p.id, SIGSTOP) != 0'i32: OSError(OSLastError()) @@ -696,17 +720,17 @@ elif not defined(useNimRtl): proc inputStream(p: PProcess): PStream = if p.inStream == nil: - createStream(p.inStream, p.inputHandle, fmWrite) + createStream(p.inStream, p.inHandle, fmWrite) return p.inStream proc outputStream(p: PProcess): PStream = if p.outStream == nil: - createStream(p.outStream, p.outputHandle, fmRead) + createStream(p.outStream, p.outHandle, fmRead) return p.outStream proc errorStream(p: PProcess): PStream = if p.errStream == nil: - createStream(p.errStream, p.errorHandle, fmRead) + createStream(p.errStream, p.errHandle, fmRead) return p.errStream proc csystem(cmd: cstring): cint {.nodecl, importc: "system".} @@ -717,14 +741,14 @@ elif not defined(useNimRtl): proc createFdSet(fd: var TFdSet, s: seq[PProcess], m: var int) = FD_ZERO(fd) for i in items(s): - m = max(m, int(i.outputHandle)) - FD_SET(cint(i.outputHandle), fd) + m = max(m, int(i.outHandle)) + FD_SET(cint(i.outHandle), fd) proc pruneProcessSet(s: var seq[PProcess], fd: var TFdSet) = var i = 0 var L = s.len while i < L: - if FD_ISSET(cint(s[i].outputHandle), fd) != 0'i32: + if FD_ISSET(cint(s[i].outHandle), fd) != 0'i32: s[i] = s[L-1] dec(L) else: diff --git a/lib/pure/scgi.nim b/lib/pure/scgi.nim index 8e45032c8..b18fe0094 100644 --- a/lib/pure/scgi.nim +++ b/lib/pure/scgi.nim @@ -95,7 +95,8 @@ proc recvBuffer(s: var TScgiState, L: int) = scgiError("could not read all data") setLen(s.input, L) -proc open*(s: var TScgiState, port = TPort(4000), address = "127.0.0.1") = +proc open*(s: var TScgiState, port = TPort(4000), address = "127.0.0.1", + reuseAddr = False) = ## opens a connection. s.bufLen = 4000 s.input = newString(s.buflen) # will be reused @@ -104,6 +105,8 @@ proc open*(s: var TScgiState, port = TPort(4000), address = "127.0.0.1") = new(s.client) # Initialise s.client for `next` if s.server == InvalidSocket: scgiError("could not open socket") #s.server.connect(connectionName, port) + if reuseAddr: + s.server.setSockOpt(OptReuseAddr, True) bindAddr(s.server, port, address) listen(s.server) @@ -243,7 +246,8 @@ proc handleAccept(sock: PAsyncSocket, s: PAsyncScgiState) = proc open*(handleRequest: proc (client: PAsyncSocket, input: string, headers: PStringTable) {.closure.}, - port = TPort(4000), address = "127.0.0.1"): PAsyncScgiState = + port = TPort(4000), address = "127.0.0.1", + reuseAddr = false): PAsyncScgiState = ## Creates an ``PAsyncScgiState`` object which serves as a SCGI server. ## ## After the execution of ``handleRequest`` the client socket will be closed @@ -252,6 +256,8 @@ proc open*(handleRequest: proc (client: PAsyncSocket, new(cres) cres.asyncServer = AsyncSocket() cres.asyncServer.handleAccept = proc (s: PAsyncSocket) = handleAccept(s, cres) + if reuseAddr: + cres.asyncServer.setSockOpt(OptReuseAddr, True) bindAddr(cres.asyncServer, port, address) listen(cres.asyncServer) cres.handleRequest = handleRequest diff --git a/lib/pure/sockets.nim b/lib/pure/sockets.nim index c8a4171ab..99117ea4e 100644 --- a/lib/pure/sockets.nim +++ b/lib/pure/sockets.nim @@ -31,6 +31,7 @@ when hostos == "solaris": import os, parseutils from times import epochTime +import unsigned when defined(ssl): import openssl @@ -62,7 +63,7 @@ const type TSocketImpl = object ## socket type - fd: cint + fd: TSocketHandle case isBuffered: bool # determines whether this socket is buffered. of true: buffer: array[0..BufferSize, char] @@ -82,7 +83,7 @@ type TSocket* = ref TSocketImpl - TPort* = distinct int16 ## port type + TPort* = distinct uint16 ## port type TDomain* = enum ## domain, which specifies the protocol family of the ## created socket. Other domains than those that are listed @@ -118,6 +119,10 @@ type length*: int addrList*: seq[string] + TSOBool* = enum ## Boolean socket options. + OptAcceptConn, OptBroadcast, OptDebug, OptDontRoute, OptKeepAlive, + OptOOBInline, OptReuseAddr + TRecvLineResult* = enum ## result for recvLineAsync RecvFullLine, RecvPartialLine, RecvDisconnected, RecvFail @@ -126,7 +131,19 @@ type ETimeout* = object of ESynch -proc newTSocket(fd: int32, isBuff: bool): TSocket = +let + InvalidSocket*: TSocket = nil ## invalid socket + +when defined(windows): + let + OSInvalidSocket = winlean.INVALID_SOCKET +else: + let + OSInvalidSocket = posix.INVALID_SOCKET + +proc newTSocket(fd: TSocketHandle, isBuff: bool): TSocket = + if fd == OSInvalidSocket: + return nil new(result) result.fd = fd result.isBuffered = isBuff @@ -134,9 +151,6 @@ proc newTSocket(fd: int32, isBuff: bool): TSocket = result.currPos = 0 result.nonblocking = false -let - InvalidSocket*: TSocket = nil ## invalid socket - proc `==`*(a, b: TPort): bool {.borrow.} ## ``==`` for ports. @@ -211,7 +225,9 @@ else: proc socket*(domain: TDomain = AF_INET, typ: TType = SOCK_STREAM, protocol: TProtocol = IPPROTO_TCP, buffered = true): TSocket = - ## Creates a new socket; returns `InvalidSocket` if an error occurs. + ## Creates a new socket; returns `InvalidSocket` if an error occurs. + + # TODO: Perhaps this should just raise EOS when an error occurs. when defined(Windows): result = newTSocket(winlean.socket(ord(domain), ord(typ), ord(protocol)), buffered) else: @@ -456,7 +472,7 @@ template acceptAddrPlain(noClientRet, successRet: expr, var sock = accept(server.fd, cast[ptr TSockAddr](addr(sockAddress)), addr(addrLen)) - if sock < 0: + if sock == OSInvalidSocket: let err = OSLastError() when defined(windows): if err.int32 == WSAEINPROGRESS: @@ -529,7 +545,7 @@ proc acceptAddr*(server: TSocket, client: var TSocket, address: var string) {. SSLError("Unknown error") proc setBlocking*(s: TSocket, blocking: bool) {.tags: [].} - ## sets blocking mode on socket + ## Sets blocking mode on socket when defined(ssl): proc acceptAddrSSL*(server: TSocket, client: var TSocket, @@ -623,24 +639,32 @@ proc close*(socket: TSocket) = discard SSLShutdown(socket.sslHandle) proc getServByName*(name, proto: string): TServent {.tags: [FReadIO].} = - ## well-known getservbyname proc. + ## Searches the database from the beginning and finds the first entry for + ## which the service name specified by ``name`` matches the s_name member + ## and the protocol name specified by ``proto`` matches the s_proto member. + ## + ## On posix this will search through the ``/etc/services`` file. when defined(Windows): var s = winlean.getservbyname(name, proto) else: var s = posix.getservbyname(name, proto) - if s == nil: OSError(OSLastError()) + if s == nil: raise newException(EOS, "Service not found.") result.name = $s.s_name result.aliases = cstringArrayToSeq(s.s_aliases) result.port = TPort(s.s_port) result.proto = $s.s_proto proc getServByPort*(port: TPort, proto: string): TServent {.tags: [FReadIO].} = - ## well-known getservbyport proc. + ## Searches the database from the beginning and finds the first entry for + ## which the port specified by ``port`` matches the s_port member and the + ## protocol name specified by ``proto`` matches the s_proto member. + ## + ## On posix this will search through the ``/etc/services`` file. when defined(Windows): var s = winlean.getservbyport(ze(int16(port)).cint, proto) else: var s = posix.getservbyport(ze(int16(port)).cint, proto) - if s == nil: OSError(OSLastError()) + if s == nil: raise newException(EOS, "Service not found.") result.name = $s.s_name result.aliases = cstringArrayToSeq(s.s_aliases) result.port = TPort(s.s_port) @@ -676,7 +700,7 @@ proc getHostByAddr*(ip: string): THostEnt {.tags: [FReadIO].} = result.length = int(s.h_length) proc getHostByName*(name: string): THostEnt {.tags: [FReadIO].} = - ## well-known gethostbyname proc. + ## This function will lookup the IP address of a hostname. when defined(Windows): var s = winlean.gethostbyname(name) else: @@ -714,6 +738,34 @@ proc setSockOptInt*(socket: TSocket, level, optname, optval: int) {. sizeof(value).TSockLen) < 0'i32: OSError(OSLastError()) +proc toCInt(opt: TSOBool): cint = + case opt + of OptAcceptConn: SO_ACCEPTCONN + of OptBroadcast: SO_BROADCAST + of OptDebug: SO_DEBUG + of OptDontRoute: SO_DONTROUTE + of OptKeepAlive: SO_KEEPALIVE + of OptOOBInline: SO_OOBINLINE + of OptReuseAddr: SO_REUSEADDR + +proc getSockOpt*(socket: TSocket, opt: TSOBool, level = SOL_SOCKET): bool {. + tags: [FReadIO].} = + ## Retrieves option ``opt`` as a boolean value. + var res: cint + var size = sizeof(res).TSockLen + if getsockopt(socket.fd, cint(level), toCInt(opt), + addr(res), addr(size)) < 0'i32: + OSError(OSLastError()) + result = res != 0 + +proc setSockOpt*(socket: TSocket, opt: TSOBool, value: bool, level = SOL_SOCKET) {. + tags: [FWriteIO].} = + ## Sets option ``opt`` to a boolean value specified by ``value``. + var valuei = cint(if value: 1 else: 0) + if setsockopt(socket.fd, cint(level), toCInt(opt), addr(valuei), + sizeof(valuei).TSockLen) < 0'i32: + OSError(OSLastError()) + proc connect*(socket: TSocket, address: string, port = TPort(0), af: TDomain = AF_INET) {.tags: [FReadIO].} = ## Connects socket to ``address``:``port``. ``Address`` can be an IP address or a @@ -866,11 +918,6 @@ proc timeValFromMilliseconds(timeout = 500): TTimeVal = var seconds = timeout div 1000 result.tv_sec = seconds.int32 result.tv_usec = ((timeout - seconds * 1000) * 1000).int32 -#proc recvfrom*(s: TWinSocket, buf: cstring, len, flags: cint, -# fromm: ptr TSockAddr, fromlen: ptr cint): cint - -#proc sendto*(s: TWinSocket, buf: cstring, len, flags: cint, -# to: ptr TSockAddr, tolen: cint): cint proc createFdSet(fd: var TFdSet, s: seq[TSocket], m: var int) = FD_ZERO(fd) @@ -1608,14 +1655,14 @@ when defined(Windows): FIONBIO = IOC_IN.int32 or ((sizeof(int32) and IOCPARM_MASK) shl 16) or (102 shl 8) or 126 - proc ioctlsocket(s: TWinSocket, cmd: clong, + proc ioctlsocket(s: TSocketHandle, cmd: clong, argptr: ptr clong): cint {. stdcall, importc:"ioctlsocket", dynlib: "ws2_32.dll".} proc setBlocking(s: TSocket, blocking: bool) = when defined(Windows): var mode = clong(ord(not blocking)) # 1 for non-blocking, 0 for blocking - if ioctlsocket(TWinSocket(s.fd), FIONBIO, addr(mode)) == -1: + if ioctlsocket(TSocketHandle(s.fd), FIONBIO, addr(mode)) == -1: OSError(OSLastError()) else: # BSD sockets var x: int = fcntl(s.fd, F_GETFL, 0) @@ -1656,9 +1703,12 @@ proc connect*(socket: TSocket, address: string, port = TPort(0), timeout: int, proc isSSL*(socket: TSocket): bool = return socket.isSSL ## Determines whether ``socket`` is a SSL socket. -proc getFD*(socket: TSocket): cint = return socket.fd +proc getFD*(socket: TSocket): TSocketHandle = return socket.fd ## Returns the socket's file descriptor +proc isBlocking*(socket: TSocket): bool = not socket.nonblocking + ## Determines whether ``socket`` is blocking. + when defined(Windows): var wsa: TWSADATA if WSAStartup(0x0101'i16, addr wsa) != 0: OSError(OSLastError()) diff --git a/lib/system.nim b/lib/system.nim index 174912519..b2d19a885 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -849,7 +849,7 @@ const ## a string that describes the application type. Possible values: ## "console", "gui", "lib". - seqShallowFlag = 1 shl (sizeof(int)*8-1) + seqShallowFlag = low(int) proc compileOption*(option: string): bool {. magic: "CompileOption", noSideEffect.} @@ -1791,7 +1791,7 @@ when defined(JS): elif hostOS != "standalone": {.push stack_trace:off, profiler:off.} - proc add*(x: var string, y: cstring) {.noStackFrame.} = + proc add*(x: var string, y: cstring) = var i = 0 while y[i] != '\0': add(x, y[i]) diff --git a/lib/system/atomics.nim b/lib/system/atomics.nim index 623f8d0d2..36185e0a8 100644 --- a/lib/system/atomics.nim +++ b/lib/system/atomics.nim @@ -9,68 +9,207 @@ # Atomic operations for Nimrod. -when (defined(gcc) or defined(llvm_gcc)) and hasThreadSupport and - not defined(windows): - proc sync_add_and_fetch(p: var int, val: int): int {. - importc: "__sync_add_and_fetch", nodecl.} - proc sync_sub_and_fetch(p: var int, val: int): int {. - importc: "__sync_sub_and_fetch", nodecl.} +when (defined(gcc) or defined(llvm_gcc)) and hasThreadSupport: + + type + AtomMemModel* = enum + ATOMIC_RELAXED, + ## No barriers or synchronization. + ATOMIC_CONSUME, + ## Data dependency only for both barrier and synchronization with another thread. + ATOMIC_ACQUIRE, + ## Barrier to hoisting of code and synchronizes with release (or stronger) + ## semantic stores from another thread. + ATOMIC_RELEASE, + ## Barrier to sinking of code and synchronizes with acquire (or stronger) + ## semantic loads from another thread. + ATOMIC_ACQ_REL, + ## Full barrier in both directions and synchronizes with acquire loads + ## and release stores in another thread. + ATOMIC_SEQ_CST + ## Full barrier in both directions and synchronizes with acquire loads + ## and release stores in all threads. + + TAtomType* = TNumber|pointer|ptr|char + ## Type Class representing valid types for use with atomic procs + + proc atomic_load_n*[T: TAtomType](p: ptr T, mem: AtomMemModel): T {. + importc: "__atomic_load_n", nodecl.} + ## This proc implements an atomic load operation. It returns the contents at p. + ## ATOMIC_RELAXED, ATOMIC_SEQ_CST, ATOMIC_ACQUIRE, ATOMIC_CONSUME. + + proc atomic_load*[T: TAtomType](p: ptr T, ret: ptr T, mem: AtomMemModel) {. + importc: "__atomic_load", nodecl.} + ## This is the generic version of an atomic load. It returns the contents at p in ret. + + proc atomic_store_n*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel) {. + importc: "__atomic_store_n", nodecl.} + ## This proc implements an atomic store operation. It writes val at p. + ## ATOMIC_RELAXED, ATOMIC_SEQ_CST, and ATOMIC_RELEASE. + + proc atomic_store*[T: TAtomType](p: ptr T, val: ptr T, mem: AtomMemModel) {. + importc: "__atomic_store", nodecl.} + ## This is the generic version of an atomic store. It stores the value of val at p + + proc atomic_exchange_n*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_exchange_n", nodecl.} + ## This proc implements an atomic exchange operation. It writes val at p, + ## and returns the previous contents at p. + ## ATOMIC_RELAXED, ATOMIC_SEQ_CST, ATOMIC_ACQUIRE, ATOMIC_RELEASE, ATOMIC_ACQ_REL + + proc atomic_exchange*[T: TAtomType](p: ptr T, val: ptr T, ret: ptr T, mem: AtomMemModel) {. + importc: "__atomic_exchange", nodecl.} + ## This is the generic version of an atomic exchange. It stores the contents at val at p. + ## The original value at p is copied into ret. + + proc atomic_compare_exchange_n*[T: TAtomType](p: ptr T, expected: ptr T, desired: T, + weak: bool, success_memmodel: AtomMemModel, failure_memmodel: AtomMemModel): bool {. + importc: "__atomic_compare_exchange_n ", nodecl.} + ## This proc implements an atomic compare and exchange operation. This compares the + ## contents at p with the contents at expected and if equal, writes desired at p. + ## If they are not equal, the current contents at p is written into expected. + ## Weak is true for weak compare_exchange, and false for the strong variation. + ## Many targets only offer the strong variation and ignore the parameter. + ## When in doubt, use the strong variation. + ## True is returned if desired is written at p and the execution is considered + ## to conform to the memory model specified by success_memmodel. There are no + ## restrictions on what memory model can be used here. False is returned otherwise, + ## and the execution is considered to conform to failure_memmodel. This memory model + ## cannot be __ATOMIC_RELEASE nor __ATOMIC_ACQ_REL. It also cannot be a stronger model + ## than that specified by success_memmodel. + + proc atomic_compare_exchange*[T: TAtomType](p: ptr T, expected: ptr T, desired: ptr T, + weak: bool, success_memmodel: AtomMemModel, failure_memmodel: AtomMemModel): bool {. + importc: "__atomic_compare_exchange_n ", nodecl.} + ## This proc implements the generic version of atomic_compare_exchange. + ## The proc is virtually identical to atomic_compare_exchange_n, except the desired + ## value is also a pointer. + + ## Perform the operation return the new value, all memory models are valid + proc atomic_add_fetch*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_add_fetch", nodecl.} + proc atomic_sub_fetch*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_sub_fetch", nodecl.} + proc atomic_or_fetch*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_or_fetch ", nodecl.} + proc atomic_and_fetch*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_and_fetch", nodecl.} + proc atomic_xor_fetch*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_xor_fetch", nodecl.} + proc atomic_nand_fetch*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_nand_fetch ", nodecl.} + + ## Perform the operation return the old value, all memory models are valid + proc atomic_fetch_add*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_fetch_add ", nodecl.} + proc atomic_fetch_sub*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_fetch_sub ", nodecl.} + proc atomic_fetch_or*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_fetch_or ", nodecl.} + proc atomic_fetch_and*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_fetch_and ", nodecl.} + proc atomic_fetch_xor*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_fetch_xor ", nodecl.} + proc atomic_fetch_nand*[T: TAtomType](p: ptr T, val: T, mem: AtomMemModel): T {. + importc: "__atomic_fetch_nand", nodecl.} + + proc atomic_test_and_set*(p: pointer, mem: AtomMemModel): bool {. + importc: "__atomic_test_and_set ", nodecl.} + ## This built-in function performs an atomic test-and-set operation on the byte at p. + ## The byte is set to some implementation defined nonzero “set” value and the return + ## value is true if and only if the previous contents were “set”. + ## All memory models are valid. + + proc atomic_clear*(p: pointer, mem: AtomMemModel) {. + importc: "__atomic_clear", nodecl.} + ## This built-in function performs an atomic clear operation at p. + ## After the operation, at p contains 0. + ## ATOMIC_RELAXED, ATOMIC_SEQ_CST, ATOMIC_RELEASE + + proc atomic_thread_fence*(mem: AtomMemModel) {. + importc: "__atomic_thread_fence ", nodecl.} + ## This built-in function acts as a synchronization fence between threads based + ## on the specified memory model. All memory orders are valid. + + proc atomic_signal_fence*(mem: AtomMemModel) {. + importc: "__atomic_signal_fence ", nodecl.} + ## This built-in function acts as a synchronization fence between a thread and + ## signal handlers based in the same thread. All memory orders are valid. + + proc atomic_always_lock_free*(size: int, p: pointer): bool {. + importc: "__atomic_always_lock_free ", nodecl.} + ## This built-in function returns true if objects of size bytes always generate + ## lock free atomic instructions for the target architecture. size must resolve + ## to a compile-time constant and the result also resolves to a compile-time constant. + ## ptr is an optional pointer to the object that may be used to determine alignment. + ## A value of 0 indicates typical alignment should be used. The compiler may also + ## ignore this parameter. + + proc atomic_is_lock_free*(size: int, p: pointer): bool {. + importc: "__atomic_is_lock_free ", nodecl.} + ## This built-in function returns true if objects of size bytes always generate + ## lock free atomic instructions for the target architecture. If it is not known + ## to be lock free a call is made to a runtime routine named __atomic_is_lock_free. + ## ptr is an optional pointer to the object that may be used to determine alignment. + ## A value of 0 indicates typical alignment should be used. The compiler may also + ## ignore this parameter. + + + elif defined(vcc) and hasThreadSupport: - proc sync_add_and_fetch(p: var int, val: int): int {. + proc add_and_fetch*(p: ptr int, val: int): int {. importc: "NimXadd", nodecl.} else: - proc sync_add_and_fetch(p: var int, val: int): int {.inline.} = - inc(p, val) - result = p + proc add_and_fetch*(p: ptr int, val: int): int {.inline.} = + inc(p[], val) + result = p[] + + + + +# atomic compare and swap (CAS) funcitons to implement lock-free algorithms + +#if defined(windows) and not defined(gcc) and hasThreadSupport: +# proc InterlockedCompareExchangePointer(mem: ptr pointer, +# newValue: pointer, comparand: pointer) : pointer {.nodecl, +# importc: "InterlockedCompareExchangePointer", header:"windows.h".} + +# proc compareAndSwap*[T](mem: ptr T, +# expected: T, newValue: T): bool {.inline.}= +# ## Returns true if successfully set value at mem to newValue when value +# ## at mem == expected +# return InterlockedCompareExchangePointer(addr(mem), +# addr(newValue), addr(expected))[] == expected + +#elif not hasThreadSupport: +# proc compareAndSwap*[T](mem: ptr T, +# expected: T, newValue: T): bool {.inline.} = +# ## Returns true if successfully set value at mem to newValue when value +# ## at mem == expected +# var oldval = mem[] +# if oldval == expected: +# mem[] = newValue +# return true +# return false + -proc atomicInc(memLoc: var int, x: int = 1): int = - when hasThreadSupport: - result = sync_add_and_fetch(memLoc, x) +# Some convenient functions +proc atomicInc*(memLoc: var int, x: int = 1): int = + when defined(gcc) and hasThreadSupport: + result = atomic_add_fetch(memLoc.addr, x, ATOMIC_RELAXED) else: inc(memLoc, x) result = memLoc -proc atomicDec(memLoc: var int, x: int = 1): int = - when hasThreadSupport: - when defined(sync_sub_and_fetch): - result = sync_sub_and_fetch(memLoc, x) +proc atomicDec*(memLoc: var int, x: int = 1): int = + when defined(gcc) and hasThreadSupport: + when defined(atomic_sub_fetch): + result = atomic_sub_fetch(memLoc.addr, x, ATOMIC_RELAXED) else: - result = sync_add_and_fetch(memLoc, -x) + result = atomic_add_fetch(memLoc.addr, -x, ATOMIC_RELAXED) else: dec(memLoc, x) result = memLoc -# atomic compare and swap (CAS) funcitons to implement lock-free algorithms - -when (defined(gcc) or defined(llvm_gcc)) and hasThreadSupport: - proc compareAndSwap*[T: ptr|ref|pointer](mem: var T, expected: T, newValue: T): bool {.nodecl, - importc: " __sync_bool_compare_and_swap".} - ## Returns true if successfully set value at mem to newValue when value - ## at mem == expected - -elif defined(windows) and hasThreadSupport: - proc InterlockedCompareExchangePointer(mem: ptr pointer, - newValue: pointer, comparand: pointer) : pointer {.nodecl, - importc: "InterlockedCompareExchangePointer", header:"windows.h".} - - - proc compareAndSwap*[T: ptr|ref|pointer](mem: var T, - expected: T, newValue: T): bool {.inline.}= - ## Returns true if successfully set value at mem to newValue when value - ## at mem == expected - return InterlockedCompareExchangePointer(addr(mem), - newValue, expected) == expected - -elif not hasThreadSupport: - proc compareAndSwap*[T: ptr|ref|pointer](mem: var T, - expected: T, newValue: T): bool {.inline.} = - ## Returns true if successfully set value at mem to newValue when value - ## at mem == expected - var oldval = mem - if oldval == expected: - mem = newValue - return true - return false - diff --git a/lib/windows/winlean.nim b/lib/windows/winlean.nim index d448d2b10..56d279db6 100644 --- a/lib/windows/winlean.nim +++ b/lib/windows/winlean.nim @@ -335,6 +335,9 @@ const proc WSAGetLastError*(): cint {.importc: "WSAGetLastError", dynlib: ws2dll.} type + TSocketHandle* = distinct int + +type TWSAData* {.pure, final, importc: "WSADATA", header: "Winsock2.h".} = object wVersion, wHighVersion: int16 szDescription: array[0..WSADESCRIPTION_LEN, char] @@ -389,12 +392,10 @@ type h_addrtype*: int16 h_length*: int16 h_addr_list*: cstringArray - - TWinSocket* = cint TFdSet* {.pure, final.} = object fd_count*: cint # unsigned - fd_array*: array[0..FD_SETSIZE-1, TWinSocket] + fd_array*: array[0..FD_SETSIZE-1, TSocketHandle] TTimeval* {.pure, final.} = object tv_sec*, tv_usec*: int32 @@ -413,6 +414,22 @@ type var SOMAXCONN* {.importc, header: "Winsock2.h".}: cint + INVALID_SOCKET* {.importc, header: "Winsock2.h".}: TSocketHandle + SOL_SOCKET* {.importc, header: "Winsock2.h".}: cint + SO_DEBUG* {.importc, header: "Winsock2.h".}: cint ## turn on debugging info recording + SO_ACCEPTCONN* {.importc, header: "Winsock2.h".}: cint # socket has had listen() + SO_REUSEADDR* {.importc, header: "Winsock2.h".}: cint # allow local address reuse + SO_KEEPALIVE* {.importc, header: "Winsock2.h".}: cint # keep connections alive + SO_DONTROUTE* {.importc, header: "Winsock2.h".}: cint # just use interface addresses + SO_BROADCAST* {.importc, header: "Winsock2.h".}: cint # permit sending of broadcast msgs + SO_USELOOPBACK* {.importc, header: "Winsock2.h".}: cint # bypass hardware when possible + SO_LINGER* {.importc, header: "Winsock2.h".}: cint # linger on close if data present + SO_OOBINLINE* {.importc, header: "Winsock2.h".}: cint # leave received OOB data in line + + SO_DONTLINGER* {.importc, header: "Winsock2.h".}: cint + SO_EXCLUSIVEADDRUSE* {.importc, header: "Winsock2.h".}: cint # disallow local address reuse + +proc `==`*(x, y: TSocketHandle): bool {.borrow.} proc getservbyname*(name, proto: cstring): ptr TServent {. stdcall, importc: "getservbyname", dynlib: ws2dll.} @@ -426,45 +443,45 @@ proc gethostbyaddr*(ip: ptr TInAddr, len: cuint, theType: cint): ptr THostEnt {. proc gethostbyname*(name: cstring): ptr THostEnt {. stdcall, importc: "gethostbyname", dynlib: ws2dll.} -proc socket*(af, typ, protocol: cint): TWinSocket {. +proc socket*(af, typ, protocol: cint): TSocketHandle {. stdcall, importc: "socket", dynlib: ws2dll.} -proc closesocket*(s: TWinSocket): cint {. +proc closesocket*(s: TSocketHandle): cint {. stdcall, importc: "closesocket", dynlib: ws2dll.} -proc accept*(s: TWinSocket, a: ptr TSockAddr, addrlen: ptr TSockLen): TWinSocket {. +proc accept*(s: TSocketHandle, a: ptr TSockAddr, addrlen: ptr TSockLen): TSocketHandle {. stdcall, importc: "accept", dynlib: ws2dll.} -proc bindSocket*(s: TWinSocket, name: ptr TSockAddr, namelen: TSockLen): cint {. +proc bindSocket*(s: TSocketHandle, name: ptr TSockAddr, namelen: TSockLen): cint {. stdcall, importc: "bind", dynlib: ws2dll.} -proc connect*(s: TWinSocket, name: ptr TSockAddr, namelen: TSockLen): cint {. +proc connect*(s: TSocketHandle, name: ptr TSockAddr, namelen: TSockLen): cint {. stdcall, importc: "connect", dynlib: ws2dll.} -proc getsockname*(s: TWinSocket, name: ptr TSockAddr, +proc getsockname*(s: TSocketHandle, name: ptr TSockAddr, namelen: ptr TSockLen): cint {. stdcall, importc: "getsockname", dynlib: ws2dll.} -proc getsockopt*(s: TWinSocket, level, optname: cint, optval: pointer, +proc getsockopt*(s: TSocketHandle, level, optname: cint, optval: pointer, optlen: ptr TSockLen): cint {. stdcall, importc: "getsockopt", dynlib: ws2dll.} -proc setsockopt*(s: TWinSocket, level, optname: cint, optval: pointer, +proc setsockopt*(s: TSocketHandle, level, optname: cint, optval: pointer, optlen: TSockLen): cint {. stdcall, importc: "setsockopt", dynlib: ws2dll.} -proc listen*(s: TWinSocket, backlog: cint): cint {. +proc listen*(s: TSocketHandle, backlog: cint): cint {. stdcall, importc: "listen", dynlib: ws2dll.} -proc recv*(s: TWinSocket, buf: pointer, len, flags: cint): cint {. +proc recv*(s: TSocketHandle, buf: pointer, len, flags: cint): cint {. stdcall, importc: "recv", dynlib: ws2dll.} -proc recvfrom*(s: TWinSocket, buf: cstring, len, flags: cint, +proc recvfrom*(s: TSocketHandle, buf: cstring, len, flags: cint, fromm: ptr TSockAddr, fromlen: ptr Tsocklen): cint {. stdcall, importc: "recvfrom", dynlib: ws2dll.} proc select*(nfds: cint, readfds, writefds, exceptfds: ptr TFdSet, timeout: ptr TTimeval): cint {. stdcall, importc: "select", dynlib: ws2dll.} -proc send*(s: TWinSocket, buf: pointer, len, flags: cint): cint {. +proc send*(s: TSocketHandle, buf: pointer, len, flags: cint): cint {. stdcall, importc: "send", dynlib: ws2dll.} -proc sendto*(s: TWinSocket, buf: pointer, len, flags: cint, +proc sendto*(s: TSocketHandle, buf: pointer, len, flags: cint, to: ptr TSockAddr, tolen: Tsocklen): cint {. stdcall, importc: "sendto", dynlib: ws2dll.} -proc shutdown*(s: TWinSocket, how: cint): cint {. +proc shutdown*(s: TSocketHandle, how: cint): cint {. stdcall, importc: "shutdown", dynlib: ws2dll.} proc getnameinfo*(a1: ptr Tsockaddr, a2: Tsocklen, @@ -475,13 +492,13 @@ proc getnameinfo*(a1: ptr Tsockaddr, a2: Tsocklen, proc inet_addr*(cp: cstring): int32 {. stdcall, importc: "inet_addr", dynlib: ws2dll.} -proc WSAFDIsSet(s: TWinSocket, FDSet: var TFDSet): bool {. +proc WSAFDIsSet(s: TSocketHandle, FDSet: var TFDSet): bool {. stdcall, importc: "__WSAFDIsSet", dynlib: ws2dll.} -proc FD_ISSET*(Socket: TWinSocket, FDSet: var TFDSet): cint = +proc FD_ISSET*(Socket: TSocketHandle, FDSet: var TFDSet): cint = result = if WSAFDIsSet(Socket, FDSet): 1'i32 else: 0'i32 -proc FD_SET*(Socket: TWinSocket, FDSet: var TFDSet) = +proc FD_SET*(Socket: TSocketHandle, FDSet: var TFDSet) = if FDSet.fd_count < FD_SETSIZE: FDSet.fd_array[int(FDSet.fd_count)] = Socket inc(FDSet.fd_count) diff --git a/lib/wrappers/opengl/glx.nim b/lib/wrappers/opengl/glx.nim index 76c052d70..ae5ca75b5 100644 --- a/lib/wrappers/opengl/glx.nim +++ b/lib/wrappers/opengl/glx.nim @@ -36,23 +36,23 @@ else: const dllname = "libGL.so" const - GLX_USE_GL* = 1 - GLX_BUFFER_SIZE* = 2 - GLX_LEVEL* = 3 - GLX_RGBA* = 4 - GLX_DOUBLEBUFFER* = 5 - GLX_STEREO* = 6 - GLX_AUX_BUFFERS* = 7 - GLX_RED_SIZE* = 8 - GLX_GREEN_SIZE* = 9 - GLX_BLUE_SIZE* = 10 - GLX_ALPHA_SIZE* = 11 - GLX_DEPTH_SIZE* = 12 - GLX_STENCIL_SIZE* = 13 - GLX_ACCUM_RED_SIZE* = 14 - GLX_ACCUM_GREEN_SIZE* = 15 - GLX_ACCUM_BLUE_SIZE* = 16 - GLX_ACCUM_ALPHA_SIZE* = 17 # GLX_EXT_visual_info extension + GLX_USE_GL* = 1'i32 + GLX_BUFFER_SIZE* = 2'i32 + GLX_LEVEL* = 3'i32 + GLX_RGBA* = 4'i32 + GLX_DOUBLEBUFFER* = 5'i32 + GLX_STEREO* = 6'i32 + GLX_AUX_BUFFERS* = 7'i32 + GLX_RED_SIZE* = 8'i32 + GLX_GREEN_SIZE* = 9'i32 + GLX_BLUE_SIZE* = 10'i32 + GLX_ALPHA_SIZE* = 11'i32 + GLX_DEPTH_SIZE* = 12'i32 + GLX_STENCIL_SIZE* = 13'i32 + GLX_ACCUM_RED_SIZE* = 14'i32 + GLX_ACCUM_GREEN_SIZE* = 15'i32 + GLX_ACCUM_BLUE_SIZE* = 16'i32 + GLX_ACCUM_ALPHA_SIZE* = 17'i32 # GLX_EXT_visual_info extension GLX_X_VISUAL_TYPE_EXT* = 0x00000022 GLX_TRANSPARENT_TYPE_EXT* = 0x00000023 GLX_TRANSPARENT_INDEX_VALUE_EXT* = 0x00000024 diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index f310c969b..af72d04eb 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -45,6 +45,7 @@ when defined(WINDOWS): const DLLSSLName = "(ssleay32|libssl32).dll" DLLUtilName = "libeay32.dll" + from winlean import TSocketHandle else: const versions = "(|.1.0.0|.0.9.9|.0.9.8|.0.9.7|.0.9.6|.0.9.5|.0.9.4)" @@ -56,6 +57,7 @@ else: const DLLSSLName = "libssl.so" & versions DLLUtilName = "libcrypto.so" & versions + from posix import TSocketHandle type SslStruct {.final, pure.} = object @@ -225,7 +227,7 @@ proc SSL_CTX_use_PrivateKey_file*(ctx: PSSL_CTX, proc SSL_CTX_check_private_key*(ctx: PSSL_CTX): cInt{.cdecl, dynlib: DLLSSLName, importc.} -proc SSL_set_fd*(ssl: PSSL, fd: cint): cint{.cdecl, dynlib: DLLSSLName, importc.} +proc SSL_set_fd*(ssl: PSSL, fd: TSocketHandle): cint{.cdecl, dynlib: DLLSSLName, importc.} proc SSL_shutdown*(ssl: PSSL): cInt{.cdecl, dynlib: DLLSSLName, importc.} proc SSL_connect*(ssl: PSSL): cint{.cdecl, dynlib: DLLSSLName, importc.} diff --git a/lib/wrappers/x11/keysym.nim b/lib/wrappers/x11/keysym.nim index b1fe13b80..c001ab622 100644 --- a/lib/wrappers/x11/keysym.nim +++ b/lib/wrappers/x11/keysym.nim @@ -11,9 +11,10 @@ # #* default keysyms * +import x const - XK_VoidSymbol* = 0x00FFFFFF # void symbol + XK_VoidSymbol*: TKeySym = 0x00FFFFFF # void symbol when defined(XK_MISCELLANY) or true: const @@ -22,186 +23,186 @@ when defined(XK_MISCELLANY) or true: # * programming, but could have been arbitrary (at the cost of lookup # * tables in client code. # * - XK_BackSpace* = 0x0000FF08 # back space, back char - XK_Tab* = 0x0000FF09 - XK_Linefeed* = 0x0000FF0A # Linefeed, LF - XK_Clear* = 0x0000FF0B - XK_Return* = 0x0000FF0D # Return, enter - XK_Pause* = 0x0000FF13 # Pause, hold - XK_Scroll_Lock* = 0x0000FF14 - XK_Sys_Req* = 0x0000FF15 - XK_Escape* = 0x0000FF1B - XK_Delete* = 0x0000FFFF # Delete, rubout + XK_BackSpace*: TKeySym = 0x0000FF08 # back space, back char + XK_Tab*: TKeySym = 0x0000FF09 + XK_Linefeed*: TKeySym = 0x0000FF0A # Linefeed, LF + XK_Clear*: TKeySym = 0x0000FF0B + XK_Return*: TKeySym = 0x0000FF0D # Return, enter + XK_Pause*: TKeySym = 0x0000FF13 # Pause, hold + XK_Scroll_Lock*: TKeySym = 0x0000FF14 + XK_Sys_Req*: TKeySym = 0x0000FF15 + XK_Escape*: TKeySym = 0x0000FF1B + XK_Delete*: TKeySym = 0x0000FFFF # Delete, rubout \ # International & multi-key character composition - XK_Multi_key* = 0x0000FF20 # Multi-key character compose - XK_Codeinput* = 0x0000FF37 - XK_SingleCandidate* = 0x0000FF3C - XK_MultipleCandidate* = 0x0000FF3D - XK_PreviousCandidate* = 0x0000FF3E # Japanese keyboard support - XK_Kanji* = 0x0000FF21 # Kanji, Kanji convert - XK_Muhenkan* = 0x0000FF22 # Cancel Conversion - XK_Henkan_Mode* = 0x0000FF23 # Start/Stop Conversion - XK_Henkan* = 0x0000FF23 # Alias for Henkan_Mode - XK_Romaji* = 0x0000FF24 # to Romaji - XK_Hiragana* = 0x0000FF25 # to Hiragana - XK_Katakana* = 0x0000FF26 # to Katakana - XK_Hiragana_Katakana* = 0x0000FF27 # Hiragana/Katakana toggle - XK_Zenkaku* = 0x0000FF28 # to Zenkaku - XK_Hankaku* = 0x0000FF29 # to Hankaku - XK_Zenkaku_Hankaku* = 0x0000FF2A # Zenkaku/Hankaku toggle - XK_Touroku* = 0x0000FF2B # Add to Dictionary - XK_Massyo* = 0x0000FF2C # Delete from Dictionary - XK_Kana_Lock* = 0x0000FF2D # Kana Lock - XK_Kana_Shift* = 0x0000FF2E # Kana Shift - XK_Eisu_Shift* = 0x0000FF2F # Alphanumeric Shift - XK_Eisu_toggle* = 0x0000FF30 # Alphanumeric toggle - XK_Kanji_Bangou* = 0x0000FF37 # Codeinput - XK_Zen_Koho* = 0x0000FF3D # Multiple/All Candidate(s) - XK_Mae_Koho* = 0x0000FF3E # Previous Candidate + XK_Multi_key*: TKeySym = 0x0000FF20 # Multi-key character compose + XK_Codeinput*: TKeySym = 0x0000FF37 + XK_SingleCandidate*: TKeySym = 0x0000FF3C + XK_MultipleCandidate*: TKeySym = 0x0000FF3D + XK_PreviousCandidate*: TKeySym = 0x0000FF3E # Japanese keyboard support + XK_Kanji*: TKeySym = 0x0000FF21 # Kanji, Kanji convert + XK_Muhenkan*: TKeySym = 0x0000FF22 # Cancel Conversion + XK_Henkan_Mode*: TKeySym = 0x0000FF23 # Start/Stop Conversion + XK_Henkan*: TKeySym = 0x0000FF23 # Alias for Henkan_Mode + XK_Romaji*: TKeySym = 0x0000FF24 # to Romaji + XK_Hiragana*: TKeySym = 0x0000FF25 # to Hiragana + XK_Katakana*: TKeySym = 0x0000FF26 # to Katakana + XK_Hiragana_Katakana*: TKeySym = 0x0000FF27 # Hiragana/Katakana toggle + XK_Zenkaku*: TKeySym = 0x0000FF28 # to Zenkaku + XK_Hankaku*: TKeySym = 0x0000FF29 # to Hankaku + XK_Zenkaku_Hankaku*: TKeySym = 0x0000FF2A # Zenkaku/Hankaku toggle + XK_Touroku*: TKeySym = 0x0000FF2B # Add to Dictionary + XK_Massyo*: TKeySym = 0x0000FF2C # Delete from Dictionary + XK_Kana_Lock*: TKeySym = 0x0000FF2D # Kana Lock + XK_Kana_Shift*: TKeySym = 0x0000FF2E # Kana Shift + XK_Eisu_Shift*: TKeySym = 0x0000FF2F # Alphanumeric Shift + XK_Eisu_toggle*: TKeySym = 0x0000FF30 # Alphanumeric toggle + XK_Kanji_Bangou*: TKeySym = 0x0000FF37 # Codeinput + XK_Zen_Koho*: TKeySym = 0x0000FF3D # Multiple/All Candidate(s) + XK_Mae_Koho*: TKeySym = 0x0000FF3E # Previous Candidate \ # = $FF31 thru = $FF3F are under XK_KOREAN # Cursor control & motion - XK_Home* = 0x0000FF50 - XK_Left* = 0x0000FF51 # Move left, left arrow - XK_Up* = 0x0000FF52 # Move up, up arrow - XK_Right* = 0x0000FF53 # Move right, right arrow - XK_Down* = 0x0000FF54 # Move down, down arrow - XK_Prior* = 0x0000FF55 # Prior, previous - XK_Page_Up* = 0x0000FF55 - XK_Next* = 0x0000FF56 # Next - XK_Page_Down* = 0x0000FF56 - XK_End* = 0x0000FF57 # EOL - XK_Begin* = 0x0000FF58 # BOL + XK_Home*: TKeySym = 0x0000FF50 + XK_Left*: TKeySym = 0x0000FF51 # Move left, left arrow + XK_Up*: TKeySym = 0x0000FF52 # Move up, up arrow + XK_Right*: TKeySym = 0x0000FF53 # Move right, right arrow + XK_Down*: TKeySym = 0x0000FF54 # Move down, down arrow + XK_Prior*: TKeySym = 0x0000FF55 # Prior, previous + XK_Page_Up*: TKeySym = 0x0000FF55 + XK_Next*: TKeySym = 0x0000FF56 # Next + XK_Page_Down*: TKeySym = 0x0000FF56 + XK_End*: TKeySym = 0x0000FF57 # EOL + XK_Begin*: TKeySym = 0x0000FF58 # BOL \ # Misc Functions - XK_Select* = 0x0000FF60 # Select, mark - XK_Print* = 0x0000FF61 - XK_Execute* = 0x0000FF62 # Execute, run, do - XK_Insert* = 0x0000FF63 # Insert, insert here - XK_Undo* = 0x0000FF65 # Undo, oops - XK_Redo* = 0x0000FF66 # redo, again - XK_Menu* = 0x0000FF67 - XK_Find* = 0x0000FF68 # Find, search - XK_Cancel* = 0x0000FF69 # Cancel, stop, abort, exit - XK_Help* = 0x0000FF6A # Help - XK_Break* = 0x0000FF6B - XK_Mode_switch* = 0x0000FF7E # Character set switch - XK_script_switch* = 0x0000FF7E # Alias for mode_switch - XK_Num_Lock* = 0x0000FF7F # Keypad Functions, keypad numbers cleverly chosen to map to ascii - XK_KP_Space* = 0x0000FF80 # space - XK_KP_Tab* = 0x0000FF89 - XK_KP_Enter* = 0x0000FF8D # enter - XK_KP_F1* = 0x0000FF91 # PF1, KP_A, ... - XK_KP_F2* = 0x0000FF92 - XK_KP_F3* = 0x0000FF93 - XK_KP_F4* = 0x0000FF94 - XK_KP_Home* = 0x0000FF95 - XK_KP_Left* = 0x0000FF96 - XK_KP_Up* = 0x0000FF97 - XK_KP_Right* = 0x0000FF98 - XK_KP_Down* = 0x0000FF99 - XK_KP_Prior* = 0x0000FF9A - XK_KP_Page_Up* = 0x0000FF9A - XK_KP_Next* = 0x0000FF9B - XK_KP_Page_Down* = 0x0000FF9B - XK_KP_End* = 0x0000FF9C - XK_KP_Begin* = 0x0000FF9D - XK_KP_Insert* = 0x0000FF9E - XK_KP_Delete* = 0x0000FF9F - XK_KP_Equal* = 0x0000FFBD # equals - XK_KP_Multiply* = 0x0000FFAA - XK_KP_Add* = 0x0000FFAB - XK_KP_Separator* = 0x0000FFAC # separator, often comma - XK_KP_Subtract* = 0x0000FFAD - XK_KP_Decimal* = 0x0000FFAE - XK_KP_Divide* = 0x0000FFAF - XK_KP_0* = 0x0000FFB0 - XK_KP_1* = 0x0000FFB1 - XK_KP_2* = 0x0000FFB2 - XK_KP_3* = 0x0000FFB3 - XK_KP_4* = 0x0000FFB4 - XK_KP_5* = 0x0000FFB5 - XK_KP_6* = 0x0000FFB6 - XK_KP_7* = 0x0000FFB7 - XK_KP_8* = 0x0000FFB8 - XK_KP_9* = 0x0000FFB9 #* + XK_Select*: TKeySym = 0x0000FF60 # Select, mark + XK_Print*: TKeySym = 0x0000FF61 + XK_Execute*: TKeySym = 0x0000FF62 # Execute, run, do + XK_Insert*: TKeySym = 0x0000FF63 # Insert, insert here + XK_Undo*: TKeySym = 0x0000FF65 # Undo, oops + XK_Redo*: TKeySym = 0x0000FF66 # redo, again + XK_Menu*: TKeySym = 0x0000FF67 + XK_Find*: TKeySym = 0x0000FF68 # Find, search + XK_Cancel*: TKeySym = 0x0000FF69 # Cancel, stop, abort, exit + XK_Help*: TKeySym = 0x0000FF6A # Help + XK_Break*: TKeySym = 0x0000FF6B + XK_Mode_switch*: TKeySym = 0x0000FF7E # Character set switch + XK_script_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch + XK_Num_Lock*: TKeySym = 0x0000FF7F # Keypad Functions, keypad numbers cleverly chosen to map to ascii + XK_KP_Space*: TKeySym = 0x0000FF80 # space + XK_KP_Tab*: TKeySym = 0x0000FF89 + XK_KP_Enter*: TKeySym = 0x0000FF8D # enter + XK_KP_F1*: TKeySym = 0x0000FF91 # PF1, KP_A, ... + XK_KP_F2*: TKeySym = 0x0000FF92 + XK_KP_F3*: TKeySym = 0x0000FF93 + XK_KP_F4*: TKeySym = 0x0000FF94 + XK_KP_Home*: TKeySym = 0x0000FF95 + XK_KP_Left*: TKeySym = 0x0000FF96 + XK_KP_Up*: TKeySym = 0x0000FF97 + XK_KP_Right*: TKeySym = 0x0000FF98 + XK_KP_Down*: TKeySym = 0x0000FF99 + XK_KP_Prior*: TKeySym = 0x0000FF9A + XK_KP_Page_Up*: TKeySym = 0x0000FF9A + XK_KP_Next*: TKeySym = 0x0000FF9B + XK_KP_Page_Down*: TKeySym = 0x0000FF9B + XK_KP_End*: TKeySym = 0x0000FF9C + XK_KP_Begin*: TKeySym = 0x0000FF9D + XK_KP_Insert*: TKeySym = 0x0000FF9E + XK_KP_Delete*: TKeySym = 0x0000FF9F + XK_KP_Equal*: TKeySym = 0x0000FFBD # equals + XK_KP_Multiply*: TKeySym = 0x0000FFAA + XK_KP_Add*: TKeySym = 0x0000FFAB + XK_KP_Separator*: TKeySym = 0x0000FFAC # separator, often comma + XK_KP_Subtract*: TKeySym = 0x0000FFAD + XK_KP_Decimal*: TKeySym = 0x0000FFAE + XK_KP_Divide*: TKeySym = 0x0000FFAF + XK_KP_0*: TKeySym = 0x0000FFB0 + XK_KP_1*: TKeySym = 0x0000FFB1 + XK_KP_2*: TKeySym = 0x0000FFB2 + XK_KP_3*: TKeySym = 0x0000FFB3 + XK_KP_4*: TKeySym = 0x0000FFB4 + XK_KP_5*: TKeySym = 0x0000FFB5 + XK_KP_6*: TKeySym = 0x0000FFB6 + XK_KP_7*: TKeySym = 0x0000FFB7 + XK_KP_8*: TKeySym = 0x0000FFB8 + XK_KP_9*: TKeySym = 0x0000FFB9 #*\ # * Auxilliary Functions; note the duplicate definitions for left and right # * function keys; Sun keyboards and a few other manufactures have such # * function key groups on the left and/or right sides of the keyboard. # * We've not found a keyboard with more than 35 function keys total. # * - XK_F1* = 0x0000FFBE - XK_F2* = 0x0000FFBF - XK_F3* = 0x0000FFC0 - XK_F4* = 0x0000FFC1 - XK_F5* = 0x0000FFC2 - XK_F6* = 0x0000FFC3 - XK_F7* = 0x0000FFC4 - XK_F8* = 0x0000FFC5 - XK_F9* = 0x0000FFC6 - XK_F10* = 0x0000FFC7 - XK_F11* = 0x0000FFC8 - XK_L1* = 0x0000FFC8 - XK_F12* = 0x0000FFC9 - XK_L2* = 0x0000FFC9 - XK_F13* = 0x0000FFCA - XK_L3* = 0x0000FFCA - XK_F14* = 0x0000FFCB - XK_L4* = 0x0000FFCB - XK_F15* = 0x0000FFCC - XK_L5* = 0x0000FFCC - XK_F16* = 0x0000FFCD - XK_L6* = 0x0000FFCD - XK_F17* = 0x0000FFCE - XK_L7* = 0x0000FFCE - XK_F18* = 0x0000FFCF - XK_L8* = 0x0000FFCF - XK_F19* = 0x0000FFD0 - XK_L9* = 0x0000FFD0 - XK_F20* = 0x0000FFD1 - XK_L10* = 0x0000FFD1 - XK_F21* = 0x0000FFD2 - XK_R1* = 0x0000FFD2 - XK_F22* = 0x0000FFD3 - XK_R2* = 0x0000FFD3 - XK_F23* = 0x0000FFD4 - XK_R3* = 0x0000FFD4 - XK_F24* = 0x0000FFD5 - XK_R4* = 0x0000FFD5 - XK_F25* = 0x0000FFD6 - XK_R5* = 0x0000FFD6 - XK_F26* = 0x0000FFD7 - XK_R6* = 0x0000FFD7 - XK_F27* = 0x0000FFD8 - XK_R7* = 0x0000FFD8 - XK_F28* = 0x0000FFD9 - XK_R8* = 0x0000FFD9 - XK_F29* = 0x0000FFDA - XK_R9* = 0x0000FFDA - XK_F30* = 0x0000FFDB - XK_R10* = 0x0000FFDB - XK_F31* = 0x0000FFDC - XK_R11* = 0x0000FFDC - XK_F32* = 0x0000FFDD - XK_R12* = 0x0000FFDD - XK_F33* = 0x0000FFDE - XK_R13* = 0x0000FFDE - XK_F34* = 0x0000FFDF - XK_R14* = 0x0000FFDF - XK_F35* = 0x0000FFE0 - XK_R15* = 0x0000FFE0 # Modifiers - XK_Shift_L* = 0x0000FFE1 # Left shift - XK_Shift_R* = 0x0000FFE2 # Right shift - XK_Control_L* = 0x0000FFE3 # Left control - XK_Control_R* = 0x0000FFE4 # Right control - XK_Caps_Lock* = 0x0000FFE5 # Caps lock - XK_Shift_Lock* = 0x0000FFE6 # Shift lock - XK_Meta_L* = 0x0000FFE7 # Left meta - XK_Meta_R* = 0x0000FFE8 # Right meta - XK_Alt_L* = 0x0000FFE9 # Left alt - XK_Alt_R* = 0x0000FFEA # Right alt - XK_Super_L* = 0x0000FFEB # Left super - XK_Super_R* = 0x0000FFEC # Right super - XK_Hyper_L* = 0x0000FFED # Left hyper - XK_Hyper_R* = 0x0000FFEE # Right hyper + XK_F1*: TKeySym = 0x0000FFBE + XK_F2*: TKeySym = 0x0000FFBF + XK_F3*: TKeySym = 0x0000FFC0 + XK_F4*: TKeySym = 0x0000FFC1 + XK_F5*: TKeySym = 0x0000FFC2 + XK_F6*: TKeySym = 0x0000FFC3 + XK_F7*: TKeySym = 0x0000FFC4 + XK_F8*: TKeySym = 0x0000FFC5 + XK_F9*: TKeySym = 0x0000FFC6 + XK_F10*: TKeySym = 0x0000FFC7 + XK_F11*: TKeySym = 0x0000FFC8 + XK_L1*: TKeySym = 0x0000FFC8 + XK_F12*: TKeySym = 0x0000FFC9 + XK_L2*: TKeySym = 0x0000FFC9 + XK_F13*: TKeySym = 0x0000FFCA + XK_L3*: TKeySym = 0x0000FFCA + XK_F14*: TKeySym = 0x0000FFCB + XK_L4*: TKeySym = 0x0000FFCB + XK_F15*: TKeySym = 0x0000FFCC + XK_L5*: TKeySym = 0x0000FFCC + XK_F16*: TKeySym = 0x0000FFCD + XK_L6*: TKeySym = 0x0000FFCD + XK_F17*: TKeySym = 0x0000FFCE + XK_L7*: TKeySym = 0x0000FFCE + XK_F18*: TKeySym = 0x0000FFCF + XK_L8*: TKeySym = 0x0000FFCF + XK_F19*: TKeySym = 0x0000FFD0 + XK_L9*: TKeySym = 0x0000FFD0 + XK_F20*: TKeySym = 0x0000FFD1 + XK_L10*: TKeySym = 0x0000FFD1 + XK_F21*: TKeySym = 0x0000FFD2 + XK_R1*: TKeySym = 0x0000FFD2 + XK_F22*: TKeySym = 0x0000FFD3 + XK_R2*: TKeySym = 0x0000FFD3 + XK_F23*: TKeySym = 0x0000FFD4 + XK_R3*: TKeySym = 0x0000FFD4 + XK_F24*: TKeySym = 0x0000FFD5 + XK_R4*: TKeySym = 0x0000FFD5 + XK_F25*: TKeySym = 0x0000FFD6 + XK_R5*: TKeySym = 0x0000FFD6 + XK_F26*: TKeySym = 0x0000FFD7 + XK_R6*: TKeySym = 0x0000FFD7 + XK_F27*: TKeySym = 0x0000FFD8 + XK_R7*: TKeySym = 0x0000FFD8 + XK_F28*: TKeySym = 0x0000FFD9 + XK_R8*: TKeySym = 0x0000FFD9 + XK_F29*: TKeySym = 0x0000FFDA + XK_R9*: TKeySym = 0x0000FFDA + XK_F30*: TKeySym = 0x0000FFDB + XK_R10*: TKeySym = 0x0000FFDB + XK_F31*: TKeySym = 0x0000FFDC + XK_R11*: TKeySym = 0x0000FFDC + XK_F32*: TKeySym = 0x0000FFDD + XK_R12*: TKeySym = 0x0000FFDD + XK_F33*: TKeySym = 0x0000FFDE + XK_R13*: TKeySym = 0x0000FFDE + XK_F34*: TKeySym = 0x0000FFDF + XK_R14*: TKeySym = 0x0000FFDF + XK_F35*: TKeySym = 0x0000FFE0 + XK_R15*: TKeySym = 0x0000FFE0 # Modifiers + XK_Shift_L*: TKeySym = 0x0000FFE1 # Left shift + XK_Shift_R*: TKeySym = 0x0000FFE2 # Right shift + XK_Control_L*: TKeySym = 0x0000FFE3 # Left control + XK_Control_R*: TKeySym = 0x0000FFE4 # Right control + XK_Caps_Lock*: TKeySym = 0x0000FFE5 # Caps lock + XK_Shift_Lock*: TKeySym = 0x0000FFE6 # Shift lock + XK_Meta_L*: TKeySym = 0x0000FFE7 # Left meta + XK_Meta_R*: TKeySym = 0x0000FFE8 # Right meta + XK_Alt_L*: TKeySym = 0x0000FFE9 # Left alt + XK_Alt_R*: TKeySym = 0x0000FFEA # Right alt + XK_Super_L*: TKeySym = 0x0000FFEB # Left super + XK_Super_R*: TKeySym = 0x0000FFEC # Right super + XK_Hyper_L*: TKeySym = 0x0000FFED # Left hyper + XK_Hyper_R*: TKeySym = 0x0000FFEE # Right hyper # XK_MISCELLANY #* # * ISO 9995 Function and Modifier Keys @@ -210,108 +211,108 @@ when defined(XK_MISCELLANY) or true: when defined(XK_XKB_KEYS) or true: const - XK_ISO_Lock* = 0x0000FE01 - XK_ISO_Level2_Latch* = 0x0000FE02 - XK_ISO_Level3_Shift* = 0x0000FE03 - XK_ISO_Level3_Latch* = 0x0000FE04 - XK_ISO_Level3_Lock* = 0x0000FE05 - XK_ISO_Group_Shift* = 0x0000FF7E # Alias for mode_switch - XK_ISO_Group_Latch* = 0x0000FE06 - XK_ISO_Group_Lock* = 0x0000FE07 - XK_ISO_Next_Group* = 0x0000FE08 - XK_ISO_Next_Group_Lock* = 0x0000FE09 - XK_ISO_Prev_Group* = 0x0000FE0A - XK_ISO_Prev_Group_Lock* = 0x0000FE0B - XK_ISO_First_Group* = 0x0000FE0C - XK_ISO_First_Group_Lock* = 0x0000FE0D - XK_ISO_Last_Group* = 0x0000FE0E - XK_ISO_Last_Group_Lock* = 0x0000FE0F - XK_ISO_Left_Tab* = 0x0000FE20 - XK_ISO_Move_Line_Up* = 0x0000FE21 - XK_ISO_Move_Line_Down* = 0x0000FE22 - XK_ISO_Partial_Line_Up* = 0x0000FE23 - XK_ISO_Partial_Line_Down* = 0x0000FE24 - XK_ISO_Partial_Space_Left* = 0x0000FE25 - XK_ISO_Partial_Space_Right* = 0x0000FE26 - XK_ISO_Set_Margin_Left* = 0x0000FE27 - XK_ISO_Set_Margin_Right* = 0x0000FE28 - XK_ISO_Release_Margin_Left* = 0x0000FE29 - XK_ISO_Release_Margin_Right* = 0x0000FE2A - XK_ISO_Release_Both_Margins* = 0x0000FE2B - XK_ISO_Fast_Cursor_Left* = 0x0000FE2C - XK_ISO_Fast_Cursor_Right* = 0x0000FE2D - XK_ISO_Fast_Cursor_Up* = 0x0000FE2E - XK_ISO_Fast_Cursor_Down* = 0x0000FE2F - XK_ISO_Continuous_Underline* = 0x0000FE30 - XK_ISO_Discontinuous_Underline* = 0x0000FE31 - XK_ISO_Emphasize* = 0x0000FE32 - XK_ISO_Center_Object* = 0x0000FE33 - XK_ISO_Enter* = 0x0000FE34 - XK_dead_grave* = 0x0000FE50 - XK_dead_acute* = 0x0000FE51 - XK_dead_circumflex* = 0x0000FE52 - XK_dead_tilde* = 0x0000FE53 - XK_dead_macron* = 0x0000FE54 - XK_dead_breve* = 0x0000FE55 - XK_dead_abovedot* = 0x0000FE56 - XK_dead_diaeresis* = 0x0000FE57 - XK_dead_abovering* = 0x0000FE58 - XK_dead_doubleacute* = 0x0000FE59 - XK_dead_caron* = 0x0000FE5A - XK_dead_cedilla* = 0x0000FE5B - XK_dead_ogonek* = 0x0000FE5C - XK_dead_iota* = 0x0000FE5D - XK_dead_voiced_sound* = 0x0000FE5E - XK_dead_semivoiced_sound* = 0x0000FE5F - XK_dead_belowdot* = 0x0000FE60 - XK_dead_hook* = 0x0000FE61 - XK_dead_horn* = 0x0000FE62 - XK_First_Virtual_Screen* = 0x0000FED0 - XK_Prev_Virtual_Screen* = 0x0000FED1 - XK_Next_Virtual_Screen* = 0x0000FED2 - XK_Last_Virtual_Screen* = 0x0000FED4 - XK_Terminate_Server* = 0x0000FED5 - XK_AccessX_Enable* = 0x0000FE70 - XK_AccessX_Feedback_Enable* = 0x0000FE71 - XK_RepeatKeys_Enable* = 0x0000FE72 - XK_SlowKeys_Enable* = 0x0000FE73 - XK_BounceKeys_Enable* = 0x0000FE74 - XK_StickyKeys_Enable* = 0x0000FE75 - XK_MouseKeys_Enable* = 0x0000FE76 - XK_MouseKeys_Accel_Enable* = 0x0000FE77 - XK_Overlay1_Enable* = 0x0000FE78 - XK_Overlay2_Enable* = 0x0000FE79 - XK_AudibleBell_Enable* = 0x0000FE7A - XK_Pointer_Left* = 0x0000FEE0 - XK_Pointer_Right* = 0x0000FEE1 - XK_Pointer_Up* = 0x0000FEE2 - XK_Pointer_Down* = 0x0000FEE3 - XK_Pointer_UpLeft* = 0x0000FEE4 - XK_Pointer_UpRight* = 0x0000FEE5 - XK_Pointer_DownLeft* = 0x0000FEE6 - XK_Pointer_DownRight* = 0x0000FEE7 - XK_Pointer_Button_Dflt* = 0x0000FEE8 - XK_Pointer_Button1* = 0x0000FEE9 - XK_Pointer_Button2* = 0x0000FEEA - XK_Pointer_Button3* = 0x0000FEEB - XK_Pointer_Button4* = 0x0000FEEC - XK_Pointer_Button5* = 0x0000FEED - XK_Pointer_DblClick_Dflt* = 0x0000FEEE - XK_Pointer_DblClick1* = 0x0000FEEF - XK_Pointer_DblClick2* = 0x0000FEF0 - XK_Pointer_DblClick3* = 0x0000FEF1 - XK_Pointer_DblClick4* = 0x0000FEF2 - XK_Pointer_DblClick5* = 0x0000FEF3 - XK_Pointer_Drag_Dflt* = 0x0000FEF4 - XK_Pointer_Drag1* = 0x0000FEF5 - XK_Pointer_Drag2* = 0x0000FEF6 - XK_Pointer_Drag3* = 0x0000FEF7 - XK_Pointer_Drag4* = 0x0000FEF8 - XK_Pointer_Drag5* = 0x0000FEFD - XK_Pointer_EnableKeys* = 0x0000FEF9 - XK_Pointer_Accelerate* = 0x0000FEFA - XK_Pointer_DfltBtnNext* = 0x0000FEFB - XK_Pointer_DfltBtnPrev* = 0x0000FEFC + XK_ISO_Lock*: TKeySym = 0x0000FE01 + XK_ISO_Level2_Latch*: TKeySym = 0x0000FE02 + XK_ISO_Level3_Shift*: TKeySym = 0x0000FE03 + XK_ISO_Level3_Latch*: TKeySym = 0x0000FE04 + XK_ISO_Level3_Lock*: TKeySym = 0x0000FE05 + XK_ISO_Group_Shift*: TKeySym = 0x0000FF7E # Alias for mode_switch + XK_ISO_Group_Latch*: TKeySym = 0x0000FE06 + XK_ISO_Group_Lock*: TKeySym = 0x0000FE07 + XK_ISO_Next_Group*: TKeySym = 0x0000FE08 + XK_ISO_Next_Group_Lock*: TKeySym = 0x0000FE09 + XK_ISO_Prev_Group*: TKeySym = 0x0000FE0A + XK_ISO_Prev_Group_Lock*: TKeySym = 0x0000FE0B + XK_ISO_First_Group*: TKeySym = 0x0000FE0C + XK_ISO_First_Group_Lock*: TKeySym = 0x0000FE0D + XK_ISO_Last_Group*: TKeySym = 0x0000FE0E + XK_ISO_Last_Group_Lock*: TKeySym = 0x0000FE0F + XK_ISO_Left_Tab*: TKeySym = 0x0000FE20 + XK_ISO_Move_Line_Up*: TKeySym = 0x0000FE21 + XK_ISO_Move_Line_Down*: TKeySym = 0x0000FE22 + XK_ISO_Partial_Line_Up*: TKeySym = 0x0000FE23 + XK_ISO_Partial_Line_Down*: TKeySym = 0x0000FE24 + XK_ISO_Partial_Space_Left*: TKeySym = 0x0000FE25 + XK_ISO_Partial_Space_Right*: TKeySym = 0x0000FE26 + XK_ISO_Set_Margin_Left*: TKeySym = 0x0000FE27 + XK_ISO_Set_Margin_Right*: TKeySym = 0x0000FE28 + XK_ISO_Release_Margin_Left*: TKeySym = 0x0000FE29 + XK_ISO_Release_Margin_Right*: TKeySym = 0x0000FE2A + XK_ISO_Release_Both_Margins*: TKeySym = 0x0000FE2B + XK_ISO_Fast_Cursor_Left*: TKeySym = 0x0000FE2C + XK_ISO_Fast_Cursor_Right*: TKeySym = 0x0000FE2D + XK_ISO_Fast_Cursor_Up*: TKeySym = 0x0000FE2E + XK_ISO_Fast_Cursor_Down*: TKeySym = 0x0000FE2F + XK_ISO_Continuous_Underline*: TKeySym = 0x0000FE30 + XK_ISO_Discontinuous_Underline*: TKeySym = 0x0000FE31 + XK_ISO_Emphasize*: TKeySym = 0x0000FE32 + XK_ISO_Center_Object*: TKeySym = 0x0000FE33 + XK_ISO_Enter*: TKeySym = 0x0000FE34 + XK_dead_grave*: TKeySym = 0x0000FE50 + XK_dead_acute*: TKeySym = 0x0000FE51 + XK_dead_circumflex*: TKeySym = 0x0000FE52 + XK_dead_tilde*: TKeySym = 0x0000FE53 + XK_dead_macron*: TKeySym = 0x0000FE54 + XK_dead_breve*: TKeySym = 0x0000FE55 + XK_dead_abovedot*: TKeySym = 0x0000FE56 + XK_dead_diaeresis*: TKeySym = 0x0000FE57 + XK_dead_abovering*: TKeySym = 0x0000FE58 + XK_dead_doubleacute*: TKeySym = 0x0000FE59 + XK_dead_caron*: TKeySym = 0x0000FE5A + XK_dead_cedilla*: TKeySym = 0x0000FE5B + XK_dead_ogonek*: TKeySym = 0x0000FE5C + XK_dead_iota*: TKeySym = 0x0000FE5D + XK_dead_voiced_sound*: TKeySym = 0x0000FE5E + XK_dead_semivoiced_sound*: TKeySym = 0x0000FE5F + XK_dead_belowdot*: TKeySym = 0x0000FE60 + XK_dead_hook*: TKeySym = 0x0000FE61 + XK_dead_horn*: TKeySym = 0x0000FE62 + XK_First_Virtual_Screen*: TKeySym = 0x0000FED0 + XK_Prev_Virtual_Screen*: TKeySym = 0x0000FED1 + XK_Next_Virtual_Screen*: TKeySym = 0x0000FED2 + XK_Last_Virtual_Screen*: TKeySym = 0x0000FED4 + XK_Terminate_Server*: TKeySym = 0x0000FED5 + XK_AccessX_Enable*: TKeySym = 0x0000FE70 + XK_AccessX_Feedback_Enable*: TKeySym = 0x0000FE71 + XK_RepeatKeys_Enable*: TKeySym = 0x0000FE72 + XK_SlowKeys_Enable*: TKeySym = 0x0000FE73 + XK_BounceKeys_Enable*: TKeySym = 0x0000FE74 + XK_StickyKeys_Enable*: TKeySym = 0x0000FE75 + XK_MouseKeys_Enable*: TKeySym = 0x0000FE76 + XK_MouseKeys_Accel_Enable*: TKeySym = 0x0000FE77 + XK_Overlay1_Enable*: TKeySym = 0x0000FE78 + XK_Overlay2_Enable*: TKeySym = 0x0000FE79 + XK_AudibleBell_Enable*: TKeySym = 0x0000FE7A + XK_Pointer_Left*: TKeySym = 0x0000FEE0 + XK_Pointer_Right*: TKeySym = 0x0000FEE1 + XK_Pointer_Up*: TKeySym = 0x0000FEE2 + XK_Pointer_Down*: TKeySym = 0x0000FEE3 + XK_Pointer_UpLeft*: TKeySym = 0x0000FEE4 + XK_Pointer_UpRight*: TKeySym = 0x0000FEE5 + XK_Pointer_DownLeft*: TKeySym = 0x0000FEE6 + XK_Pointer_DownRight*: TKeySym = 0x0000FEE7 + XK_Pointer_Button_Dflt*: TKeySym = 0x0000FEE8 + XK_Pointer_Button1*: TKeySym = 0x0000FEE9 + XK_Pointer_Button2*: TKeySym = 0x0000FEEA + XK_Pointer_Button3*: TKeySym = 0x0000FEEB + XK_Pointer_Button4*: TKeySym = 0x0000FEEC + XK_Pointer_Button5*: TKeySym = 0x0000FEED + XK_Pointer_DblClick_Dflt*: TKeySym = 0x0000FEEE + XK_Pointer_DblClick1*: TKeySym = 0x0000FEEF + XK_Pointer_DblClick2*: TKeySym = 0x0000FEF0 + XK_Pointer_DblClick3*: TKeySym = 0x0000FEF1 + XK_Pointer_DblClick4*: TKeySym = 0x0000FEF2 + XK_Pointer_DblClick5*: TKeySym = 0x0000FEF3 + XK_Pointer_Drag_Dflt*: TKeySym = 0x0000FEF4 + XK_Pointer_Drag1*: TKeySym = 0x0000FEF5 + XK_Pointer_Drag2*: TKeySym = 0x0000FEF6 + XK_Pointer_Drag3*: TKeySym = 0x0000FEF7 + XK_Pointer_Drag4*: TKeySym = 0x0000FEF8 + XK_Pointer_Drag5*: TKeySym = 0x0000FEFD + XK_Pointer_EnableKeys*: TKeySym = 0x0000FEF9 + XK_Pointer_Accelerate*: TKeySym = 0x0000FEFA + XK_Pointer_DfltBtnNext*: TKeySym = 0x0000FEFB + XK_Pointer_DfltBtnPrev*: TKeySym = 0x0000FEFC #* # * 3270 Terminal Keys # * Byte 3 = = $FD @@ -319,36 +320,36 @@ when defined(XK_XKB_KEYS) or true: when defined(XK_3270) or true: const - XK_3270_Duplicate* = 0x0000FD01 - XK_3270_FieldMark* = 0x0000FD02 - XK_3270_Right2* = 0x0000FD03 - XK_3270_Left2* = 0x0000FD04 - XK_3270_BackTab* = 0x0000FD05 - XK_3270_EraseEOF* = 0x0000FD06 - XK_3270_EraseInput* = 0x0000FD07 - XK_3270_Reset* = 0x0000FD08 - XK_3270_Quit* = 0x0000FD09 - XK_3270_PA1* = 0x0000FD0A - XK_3270_PA2* = 0x0000FD0B - XK_3270_PA3* = 0x0000FD0C - XK_3270_Test* = 0x0000FD0D - XK_3270_Attn* = 0x0000FD0E - XK_3270_CursorBlink* = 0x0000FD0F - XK_3270_AltCursor* = 0x0000FD10 - XK_3270_KeyClick* = 0x0000FD11 - XK_3270_Jump* = 0x0000FD12 - XK_3270_Ident* = 0x0000FD13 - XK_3270_Rule* = 0x0000FD14 - XK_3270_Copy* = 0x0000FD15 - XK_3270_Play* = 0x0000FD16 - XK_3270_Setup* = 0x0000FD17 - XK_3270_Record* = 0x0000FD18 - XK_3270_ChangeScreen* = 0x0000FD19 - XK_3270_DeleteWord* = 0x0000FD1A - XK_3270_ExSelect* = 0x0000FD1B - XK_3270_CursorSelect* = 0x0000FD1C - XK_3270_PrintScreen* = 0x0000FD1D - XK_3270_Enter* = 0x0000FD1E + XK_3270_Duplicate*: TKeySym = 0x0000FD01 + XK_3270_FieldMark*: TKeySym = 0x0000FD02 + XK_3270_Right2*: TKeySym = 0x0000FD03 + XK_3270_Left2*: TKeySym = 0x0000FD04 + XK_3270_BackTab*: TKeySym = 0x0000FD05 + XK_3270_EraseEOF*: TKeySym = 0x0000FD06 + XK_3270_EraseInput*: TKeySym = 0x0000FD07 + XK_3270_Reset*: TKeySym = 0x0000FD08 + XK_3270_Quit*: TKeySym = 0x0000FD09 + XK_3270_PA1*: TKeySym = 0x0000FD0A + XK_3270_PA2*: TKeySym = 0x0000FD0B + XK_3270_PA3*: TKeySym = 0x0000FD0C + XK_3270_Test*: TKeySym = 0x0000FD0D + XK_3270_Attn*: TKeySym = 0x0000FD0E + XK_3270_CursorBlink*: TKeySym = 0x0000FD0F + XK_3270_AltCursor*: TKeySym = 0x0000FD10 + XK_3270_KeyClick*: TKeySym = 0x0000FD11 + XK_3270_Jump*: TKeySym = 0x0000FD12 + XK_3270_Ident*: TKeySym = 0x0000FD13 + XK_3270_Rule*: TKeySym = 0x0000FD14 + XK_3270_Copy*: TKeySym = 0x0000FD15 + XK_3270_Play*: TKeySym = 0x0000FD16 + XK_3270_Setup*: TKeySym = 0x0000FD17 + XK_3270_Record*: TKeySym = 0x0000FD18 + XK_3270_ChangeScreen*: TKeySym = 0x0000FD19 + XK_3270_DeleteWord*: TKeySym = 0x0000FD1A + XK_3270_ExSelect*: TKeySym = 0x0000FD1B + XK_3270_CursorSelect*: TKeySym = 0x0000FD1C + XK_3270_PrintScreen*: TKeySym = 0x0000FD1D + XK_3270_Enter*: TKeySym = 0x0000FD1E #* # * Latin 1 # * Byte 3 = 0 @@ -356,201 +357,201 @@ when defined(XK_3270) or true: when defined(XK_LATIN1) or true: const - XK_space* = 0x00000020 - XK_exclam* = 0x00000021 - XK_quotedbl* = 0x00000022 - XK_numbersign* = 0x00000023 - XK_dollar* = 0x00000024 - XK_percent* = 0x00000025 - XK_ampersand* = 0x00000026 - XK_apostrophe* = 0x00000027 - XK_quoteright* = 0x00000027 # deprecated - XK_parenleft* = 0x00000028 - XK_parenright* = 0x00000029 - XK_asterisk* = 0x0000002A - XK_plus* = 0x0000002B - XK_comma* = 0x0000002C - XK_minus* = 0x0000002D - XK_period* = 0x0000002E - XK_slash* = 0x0000002F - XK_0* = 0x00000030 - XK_1* = 0x00000031 - XK_2* = 0x00000032 - XK_3* = 0x00000033 - XK_4* = 0x00000034 - XK_5* = 0x00000035 - XK_6* = 0x00000036 - XK_7* = 0x00000037 - XK_8* = 0x00000038 - XK_9* = 0x00000039 - XK_colon* = 0x0000003A - XK_semicolon* = 0x0000003B - XK_less* = 0x0000003C - XK_equal* = 0x0000003D - XK_greater* = 0x0000003E - XK_question* = 0x0000003F - XK_at* = 0x00000040 - XKc_A* = 0x00000041 - XKc_B* = 0x00000042 - XKc_C* = 0x00000043 - XKc_D* = 0x00000044 - XKc_E* = 0x00000045 - XKc_F* = 0x00000046 - XKc_G* = 0x00000047 - XKc_H* = 0x00000048 - XKc_I* = 0x00000049 - XKc_J* = 0x0000004A - XKc_K* = 0x0000004B - XKc_L* = 0x0000004C - XKc_M* = 0x0000004D - XKc_N* = 0x0000004E - XKc_O* = 0x0000004F - XKc_P* = 0x00000050 - XKc_Q* = 0x00000051 - XKc_R* = 0x00000052 - XKc_S* = 0x00000053 - XKc_T* = 0x00000054 - XKc_U* = 0x00000055 - XKc_V* = 0x00000056 - XKc_W* = 0x00000057 - XKc_X* = 0x00000058 - XKc_Y* = 0x00000059 - XKc_Z* = 0x0000005A - XK_bracketleft* = 0x0000005B - XK_backslash* = 0x0000005C - XK_bracketright* = 0x0000005D - XK_asciicircum* = 0x0000005E - XK_underscore* = 0x0000005F - XK_grave* = 0x00000060 - XK_quoteleft* = 0x00000060 # deprecated - XK_a* = 0x00000061 - XK_b* = 0x00000062 - XK_c* = 0x00000063 - XK_d* = 0x00000064 - XK_e* = 0x00000065 - XK_f* = 0x00000066 - XK_g* = 0x00000067 - XK_h* = 0x00000068 - XK_i* = 0x00000069 - XK_j* = 0x0000006A - XK_k* = 0x0000006B - XK_l* = 0x0000006C - XK_m* = 0x0000006D - XK_n* = 0x0000006E - XK_o* = 0x0000006F - XK_p* = 0x00000070 - XK_q* = 0x00000071 - XK_r* = 0x00000072 - XK_s* = 0x00000073 - XK_t* = 0x00000074 - XK_u* = 0x00000075 - XK_v* = 0x00000076 - XK_w* = 0x00000077 - XK_x* = 0x00000078 - XK_y* = 0x00000079 - XK_z* = 0x0000007A - XK_braceleft* = 0x0000007B - XK_bar* = 0x0000007C - XK_braceright* = 0x0000007D - XK_asciitilde* = 0x0000007E - XK_nobreakspace* = 0x000000A0 - XK_exclamdown* = 0x000000A1 - XK_cent* = 0x000000A2 - XK_sterling* = 0x000000A3 - XK_currency* = 0x000000A4 - XK_yen* = 0x000000A5 - XK_brokenbar* = 0x000000A6 - XK_section* = 0x000000A7 - XK_diaeresis* = 0x000000A8 - XK_copyright* = 0x000000A9 - XK_ordfeminine* = 0x000000AA - XK_guillemotleft* = 0x000000AB # left angle quotation mark - XK_notsign* = 0x000000AC - XK_hyphen* = 0x000000AD - XK_registered* = 0x000000AE - XK_macron* = 0x000000AF - XK_degree* = 0x000000B0 - XK_plusminus* = 0x000000B1 - XK_twosuperior* = 0x000000B2 - XK_threesuperior* = 0x000000B3 - XK_acute* = 0x000000B4 - XK_mu* = 0x000000B5 - XK_paragraph* = 0x000000B6 - XK_periodcentered* = 0x000000B7 - XK_cedilla* = 0x000000B8 - XK_onesuperior* = 0x000000B9 - XK_masculine* = 0x000000BA - XK_guillemotright* = 0x000000BB # right angle quotation mark - XK_onequarter* = 0x000000BC - XK_onehalf* = 0x000000BD - XK_threequarters* = 0x000000BE - XK_questiondown* = 0x000000BF - XKc_Agrave* = 0x000000C0 - XKc_Aacute* = 0x000000C1 - XKc_Acircumflex* = 0x000000C2 - XKc_Atilde* = 0x000000C3 - XKc_Adiaeresis* = 0x000000C4 - XKc_Aring* = 0x000000C5 - XKc_AE* = 0x000000C6 - XKc_Ccedilla* = 0x000000C7 - XKc_Egrave* = 0x000000C8 - XKc_Eacute* = 0x000000C9 - XKc_Ecircumflex* = 0x000000CA - XKc_Ediaeresis* = 0x000000CB - XKc_Igrave* = 0x000000CC - XKc_Iacute* = 0x000000CD - XKc_Icircumflex* = 0x000000CE - XKc_Idiaeresis* = 0x000000CF - XKc_ETH* = 0x000000D0 - XKc_Ntilde* = 0x000000D1 - XKc_Ograve* = 0x000000D2 - XKc_Oacute* = 0x000000D3 - XKc_Ocircumflex* = 0x000000D4 - XKc_Otilde* = 0x000000D5 - XKc_Odiaeresis* = 0x000000D6 - XK_multiply* = 0x000000D7 - XKc_Ooblique* = 0x000000D8 - XKc_Oslash* = XKc_Ooblique - XKc_Ugrave* = 0x000000D9 - XKc_Uacute* = 0x000000DA - XKc_Ucircumflex* = 0x000000DB - XKc_Udiaeresis* = 0x000000DC - XKc_Yacute* = 0x000000DD - XKc_THORN* = 0x000000DE - XK_ssharp* = 0x000000DF - XK_agrave* = 0x000000E0 - XK_aacute* = 0x000000E1 - XK_acircumflex* = 0x000000E2 - XK_atilde* = 0x000000E3 - XK_adiaeresis* = 0x000000E4 - XK_aring* = 0x000000E5 - XK_ae* = 0x000000E6 - XK_ccedilla* = 0x000000E7 - XK_egrave* = 0x000000E8 - XK_eacute* = 0x000000E9 - XK_ecircumflex* = 0x000000EA - XK_ediaeresis* = 0x000000EB - XK_igrave* = 0x000000EC - XK_iacute* = 0x000000ED - XK_icircumflex* = 0x000000EE - XK_idiaeresis* = 0x000000EF - XK_eth* = 0x000000F0 - XK_ntilde* = 0x000000F1 - XK_ograve* = 0x000000F2 - XK_oacute* = 0x000000F3 - XK_ocircumflex* = 0x000000F4 - XK_otilde* = 0x000000F5 - XK_odiaeresis* = 0x000000F6 - XK_division* = 0x000000F7 - XK_oslash* = 0x000000F8 - XK_ooblique* = XK_oslash - XK_ugrave* = 0x000000F9 - XK_uacute* = 0x000000FA - XK_ucircumflex* = 0x000000FB - XK_udiaeresis* = 0x000000FC - XK_yacute* = 0x000000FD - XK_thorn* = 0x000000FE - XK_ydiaeresis* = 0x000000FF + XK_space*: TKeySym = 0x00000020 + XK_exclam*: TKeySym = 0x00000021 + XK_quotedbl*: TKeySym = 0x00000022 + XK_numbersign*: TKeySym = 0x00000023 + XK_dollar*: TKeySym = 0x00000024 + XK_percent*: TKeySym = 0x00000025 + XK_ampersand*: TKeySym = 0x00000026 + XK_apostrophe*: TKeySym = 0x00000027 + XK_quoteright*: TKeySym = 0x00000027 # deprecated + XK_parenleft*: TKeySym = 0x00000028 + XK_parenright*: TKeySym = 0x00000029 + XK_asterisk*: TKeySym = 0x0000002A + XK_plus*: TKeySym = 0x0000002B + XK_comma*: TKeySym = 0x0000002C + XK_minus*: TKeySym = 0x0000002D + XK_period*: TKeySym = 0x0000002E + XK_slash*: TKeySym = 0x0000002F + XK_0*: TKeySym = 0x00000030 + XK_1*: TKeySym = 0x00000031 + XK_2*: TKeySym = 0x00000032 + XK_3*: TKeySym = 0x00000033 + XK_4*: TKeySym = 0x00000034 + XK_5*: TKeySym = 0x00000035 + XK_6*: TKeySym = 0x00000036 + XK_7*: TKeySym = 0x00000037 + XK_8*: TKeySym = 0x00000038 + XK_9*: TKeySym = 0x00000039 + XK_colon*: TKeySym = 0x0000003A + XK_semicolon*: TKeySym = 0x0000003B + XK_less*: TKeySym = 0x0000003C + XK_equal*: TKeySym = 0x0000003D + XK_greater*: TKeySym = 0x0000003E + XK_question*: TKeySym = 0x0000003F + XK_at*: TKeySym = 0x00000040 + XKc_A*: TKeySym = 0x00000041 + XKc_B*: TKeySym = 0x00000042 + XKc_C*: TKeySym = 0x00000043 + XKc_D*: TKeySym = 0x00000044 + XKc_E*: TKeySym = 0x00000045 + XKc_F*: TKeySym = 0x00000046 + XKc_G*: TKeySym = 0x00000047 + XKc_H*: TKeySym = 0x00000048 + XKc_I*: TKeySym = 0x00000049 + XKc_J*: TKeySym = 0x0000004A + XKc_K*: TKeySym = 0x0000004B + XKc_L*: TKeySym = 0x0000004C + XKc_M*: TKeySym = 0x0000004D + XKc_N*: TKeySym = 0x0000004E + XKc_O*: TKeySym = 0x0000004F + XKc_P*: TKeySym = 0x00000050 + XKc_Q*: TKeySym = 0x00000051 + XKc_R*: TKeySym = 0x00000052 + XKc_S*: TKeySym = 0x00000053 + XKc_T*: TKeySym = 0x00000054 + XKc_U*: TKeySym = 0x00000055 + XKc_V*: TKeySym = 0x00000056 + XKc_W*: TKeySym = 0x00000057 + XKc_X*: TKeySym = 0x00000058 + XKc_Y*: TKeySym = 0x00000059 + XKc_Z*: TKeySym = 0x0000005A + XK_bracketleft*: TKeySym = 0x0000005B + XK_backslash*: TKeySym = 0x0000005C + XK_bracketright*: TKeySym = 0x0000005D + XK_asciicircum*: TKeySym = 0x0000005E + XK_underscore*: TKeySym = 0x0000005F + XK_grave*: TKeySym = 0x00000060 + XK_quoteleft*: TKeySym = 0x00000060 # deprecated + XK_a*: TKeySym = 0x00000061 + XK_b*: TKeySym = 0x00000062 + XK_c*: TKeySym = 0x00000063 + XK_d*: TKeySym = 0x00000064 + XK_e*: TKeySym = 0x00000065 + XK_f*: TKeySym = 0x00000066 + XK_g*: TKeySym = 0x00000067 + XK_h*: TKeySym = 0x00000068 + XK_i*: TKeySym = 0x00000069 + XK_j*: TKeySym = 0x0000006A + XK_k*: TKeySym = 0x0000006B + XK_l*: TKeySym = 0x0000006C + XK_m*: TKeySym = 0x0000006D + XK_n*: TKeySym = 0x0000006E + XK_o*: TKeySym = 0x0000006F + XK_p*: TKeySym = 0x00000070 + XK_q*: TKeySym = 0x00000071 + XK_r*: TKeySym = 0x00000072 + XK_s*: TKeySym = 0x00000073 + XK_t*: TKeySym = 0x00000074 + XK_u*: TKeySym = 0x00000075 + XK_v*: TKeySym = 0x00000076 + XK_w*: TKeySym = 0x00000077 + XK_x*: TKeySym = 0x00000078 + XK_y*: TKeySym = 0x00000079 + XK_z*: TKeySym = 0x0000007A + XK_braceleft*: TKeySym = 0x0000007B + XK_bar*: TKeySym = 0x0000007C + XK_braceright*: TKeySym = 0x0000007D + XK_asciitilde*: TKeySym = 0x0000007E + XK_nobreakspace*: TKeySym = 0x000000A0 + XK_exclamdown*: TKeySym = 0x000000A1 + XK_cent*: TKeySym = 0x000000A2 + XK_sterling*: TKeySym = 0x000000A3 + XK_currency*: TKeySym = 0x000000A4 + XK_yen*: TKeySym = 0x000000A5 + XK_brokenbar*: TKeySym = 0x000000A6 + XK_section*: TKeySym = 0x000000A7 + XK_diaeresis*: TKeySym = 0x000000A8 + XK_copyright*: TKeySym = 0x000000A9 + XK_ordfeminine*: TKeySym = 0x000000AA + XK_guillemotleft*: TKeySym = 0x000000AB # left angle quotation mark + XK_notsign*: TKeySym = 0x000000AC + XK_hyphen*: TKeySym = 0x000000AD + XK_registered*: TKeySym = 0x000000AE + XK_macron*: TKeySym = 0x000000AF + XK_degree*: TKeySym = 0x000000B0 + XK_plusminus*: TKeySym = 0x000000B1 + XK_twosuperior*: TKeySym = 0x000000B2 + XK_threesuperior*: TKeySym = 0x000000B3 + XK_acute*: TKeySym = 0x000000B4 + XK_mu*: TKeySym = 0x000000B5 + XK_paragraph*: TKeySym = 0x000000B6 + XK_periodcentered*: TKeySym = 0x000000B7 + XK_cedilla*: TKeySym = 0x000000B8 + XK_onesuperior*: TKeySym = 0x000000B9 + XK_masculine*: TKeySym = 0x000000BA + XK_guillemotright*: TKeySym = 0x000000BB # right angle quotation mark + XK_onequarter*: TKeySym = 0x000000BC + XK_onehalf*: TKeySym = 0x000000BD + XK_threequarters*: TKeySym = 0x000000BE + XK_questiondown*: TKeySym = 0x000000BF + XKc_Agrave*: TKeySym = 0x000000C0 + XKc_Aacute*: TKeySym = 0x000000C1 + XKc_Acircumflex*: TKeySym = 0x000000C2 + XKc_Atilde*: TKeySym = 0x000000C3 + XKc_Adiaeresis*: TKeySym = 0x000000C4 + XKc_Aring*: TKeySym = 0x000000C5 + XKc_AE*: TKeySym = 0x000000C6 + XKc_Ccedilla*: TKeySym = 0x000000C7 + XKc_Egrave*: TKeySym = 0x000000C8 + XKc_Eacute*: TKeySym = 0x000000C9 + XKc_Ecircumflex*: TKeySym = 0x000000CA + XKc_Ediaeresis*: TKeySym = 0x000000CB + XKc_Igrave*: TKeySym = 0x000000CC + XKc_Iacute*: TKeySym = 0x000000CD + XKc_Icircumflex*: TKeySym = 0x000000CE + XKc_Idiaeresis*: TKeySym = 0x000000CF + XKc_ETH*: TKeySym = 0x000000D0 + XKc_Ntilde*: TKeySym = 0x000000D1 + XKc_Ograve*: TKeySym = 0x000000D2 + XKc_Oacute*: TKeySym = 0x000000D3 + XKc_Ocircumflex*: TKeySym = 0x000000D4 + XKc_Otilde*: TKeySym = 0x000000D5 + XKc_Odiaeresis*: TKeySym = 0x000000D6 + XK_multiply*: TKeySym = 0x000000D7 + XKc_Ooblique*: TKeySym = 0x000000D8 + XKc_Oslash*: TKeySym = XKc_Ooblique + XKc_Ugrave*: TKeySym = 0x000000D9 + XKc_Uacute*: TKeySym = 0x000000DA + XKc_Ucircumflex*: TKeySym = 0x000000DB + XKc_Udiaeresis*: TKeySym = 0x000000DC + XKc_Yacute*: TKeySym = 0x000000DD + XKc_THORN*: TKeySym = 0x000000DE + XK_ssharp*: TKeySym = 0x000000DF + XK_agrave*: TKeySym = 0x000000E0 + XK_aacute*: TKeySym = 0x000000E1 + XK_acircumflex*: TKeySym = 0x000000E2 + XK_atilde*: TKeySym = 0x000000E3 + XK_adiaeresis*: TKeySym = 0x000000E4 + XK_aring*: TKeySym = 0x000000E5 + XK_ae*: TKeySym = 0x000000E6 + XK_ccedilla*: TKeySym = 0x000000E7 + XK_egrave*: TKeySym = 0x000000E8 + XK_eacute*: TKeySym = 0x000000E9 + XK_ecircumflex*: TKeySym = 0x000000EA + XK_ediaeresis*: TKeySym = 0x000000EB + XK_igrave*: TKeySym = 0x000000EC + XK_iacute*: TKeySym = 0x000000ED + XK_icircumflex*: TKeySym = 0x000000EE + XK_idiaeresis*: TKeySym = 0x000000EF + XK_eth*: TKeySym = 0x000000F0 + XK_ntilde*: TKeySym = 0x000000F1 + XK_ograve*: TKeySym = 0x000000F2 + XK_oacute*: TKeySym = 0x000000F3 + XK_ocircumflex*: TKeySym = 0x000000F4 + XK_otilde*: TKeySym = 0x000000F5 + XK_odiaeresis*: TKeySym = 0x000000F6 + XK_division*: TKeySym = 0x000000F7 + XK_oslash*: TKeySym = 0x000000F8 + XK_ooblique*: TKeySym = XK_oslash + XK_ugrave*: TKeySym = 0x000000F9 + XK_uacute*: TKeySym = 0x000000FA + XK_ucircumflex*: TKeySym = 0x000000FB + XK_udiaeresis*: TKeySym = 0x000000FC + XK_yacute*: TKeySym = 0x000000FD + XK_thorn*: TKeySym = 0x000000FE + XK_ydiaeresis*: TKeySym = 0x000000FF # XK_LATIN1 #* # * Latin 2 @@ -559,63 +560,63 @@ when defined(XK_LATIN1) or true: when defined(XK_LATIN2) or true: const - XKc_Aogonek* = 0x000001A1 - XK_breve* = 0x000001A2 - XKc_Lstroke* = 0x000001A3 - XKc_Lcaron* = 0x000001A5 - XKc_Sacute* = 0x000001A6 - XKc_Scaron* = 0x000001A9 - XKc_Scedilla* = 0x000001AA - XKc_Tcaron* = 0x000001AB - XKc_Zacute* = 0x000001AC - XKc_Zcaron* = 0x000001AE - XKc_Zabovedot* = 0x000001AF - XK_aogonek* = 0x000001B1 - XK_ogonek* = 0x000001B2 - XK_lstroke* = 0x000001B3 - XK_lcaron* = 0x000001B5 - XK_sacute* = 0x000001B6 - XK_caron* = 0x000001B7 - XK_scaron* = 0x000001B9 - XK_scedilla* = 0x000001BA - XK_tcaron* = 0x000001BB - XK_zacute* = 0x000001BC - XK_doubleacute* = 0x000001BD - XK_zcaron* = 0x000001BE - XK_zabovedot* = 0x000001BF - XKc_Racute* = 0x000001C0 - XKc_Abreve* = 0x000001C3 - XKc_Lacute* = 0x000001C5 - XKc_Cacute* = 0x000001C6 - XKc_Ccaron* = 0x000001C8 - XKc_Eogonek* = 0x000001CA - XKc_Ecaron* = 0x000001CC - XKc_Dcaron* = 0x000001CF - XKc_Dstroke* = 0x000001D0 - XKc_Nacute* = 0x000001D1 - XKc_Ncaron* = 0x000001D2 - XKc_Odoubleacute* = 0x000001D5 - XKc_Rcaron* = 0x000001D8 - XKc_Uring* = 0x000001D9 - XKc_Udoubleacute* = 0x000001DB - XKc_Tcedilla* = 0x000001DE - XK_racute* = 0x000001E0 - XK_abreve* = 0x000001E3 - XK_lacute* = 0x000001E5 - XK_cacute* = 0x000001E6 - XK_ccaron* = 0x000001E8 - XK_eogonek* = 0x000001EA - XK_ecaron* = 0x000001EC - XK_dcaron* = 0x000001EF - XK_dstroke* = 0x000001F0 - XK_nacute* = 0x000001F1 - XK_ncaron* = 0x000001F2 - XK_odoubleacute* = 0x000001F5 - XK_udoubleacute* = 0x000001FB - XK_rcaron* = 0x000001F8 - XK_uring* = 0x000001F9 - XK_tcedilla* = 0x000001FE - XK_abovedot* = 0x000001FF + XKc_Aogonek*: TKeySym = 0x000001A1 + XK_breve*: TKeySym = 0x000001A2 + XKc_Lstroke*: TKeySym = 0x000001A3 + XKc_Lcaron*: TKeySym = 0x000001A5 + XKc_Sacute*: TKeySym = 0x000001A6 + XKc_Scaron*: TKeySym = 0x000001A9 + XKc_Scedilla*: TKeySym = 0x000001AA + XKc_Tcaron*: TKeySym = 0x000001AB + XKc_Zacute*: TKeySym = 0x000001AC + XKc_Zcaron*: TKeySym = 0x000001AE + XKc_Zabovedot*: TKeySym = 0x000001AF + XK_aogonek*: TKeySym = 0x000001B1 + XK_ogonek*: TKeySym = 0x000001B2 + XK_lstroke*: TKeySym = 0x000001B3 + XK_lcaron*: TKeySym = 0x000001B5 + XK_sacute*: TKeySym = 0x000001B6 + XK_caron*: TKeySym = 0x000001B7 + XK_scaron*: TKeySym = 0x000001B9 + XK_scedilla*: TKeySym = 0x000001BA + XK_tcaron*: TKeySym = 0x000001BB + XK_zacute*: TKeySym = 0x000001BC + XK_doubleacute*: TKeySym = 0x000001BD + XK_zcaron*: TKeySym = 0x000001BE + XK_zabovedot*: TKeySym = 0x000001BF + XKc_Racute*: TKeySym = 0x000001C0 + XKc_Abreve*: TKeySym = 0x000001C3 + XKc_Lacute*: TKeySym = 0x000001C5 + XKc_Cacute*: TKeySym = 0x000001C6 + XKc_Ccaron*: TKeySym = 0x000001C8 + XKc_Eogonek*: TKeySym = 0x000001CA + XKc_Ecaron*: TKeySym = 0x000001CC + XKc_Dcaron*: TKeySym = 0x000001CF + XKc_Dstroke*: TKeySym = 0x000001D0 + XKc_Nacute*: TKeySym = 0x000001D1 + XKc_Ncaron*: TKeySym = 0x000001D2 + XKc_Odoubleacute*: TKeySym = 0x000001D5 + XKc_Rcaron*: TKeySym = 0x000001D8 + XKc_Uring*: TKeySym = 0x000001D9 + XKc_Udoubleacute*: TKeySym = 0x000001DB + XKc_Tcedilla*: TKeySym = 0x000001DE + XK_racute*: TKeySym = 0x000001E0 + XK_abreve*: TKeySym = 0x000001E3 + XK_lacute*: TKeySym = 0x000001E5 + XK_cacute*: TKeySym = 0x000001E6 + XK_ccaron*: TKeySym = 0x000001E8 + XK_eogonek*: TKeySym = 0x000001EA + XK_ecaron*: TKeySym = 0x000001EC + XK_dcaron*: TKeySym = 0x000001EF + XK_dstroke*: TKeySym = 0x000001F0 + XK_nacute*: TKeySym = 0x000001F1 + XK_ncaron*: TKeySym = 0x000001F2 + XK_odoubleacute*: TKeySym = 0x000001F5 + XK_udoubleacute*: TKeySym = 0x000001FB + XK_rcaron*: TKeySym = 0x000001F8 + XK_uring*: TKeySym = 0x000001F9 + XK_tcedilla*: TKeySym = 0x000001FE + XK_abovedot*: TKeySym = 0x000001FF # XK_LATIN2 #* # * Latin 3 @@ -624,28 +625,28 @@ when defined(XK_LATIN2) or true: when defined(XK_LATIN3) or true: const - XKc_Hstroke* = 0x000002A1 - XKc_Hcircumflex* = 0x000002A6 - XKc_Iabovedot* = 0x000002A9 - XKc_Gbreve* = 0x000002AB - XKc_Jcircumflex* = 0x000002AC - XK_hstroke* = 0x000002B1 - XK_hcircumflex* = 0x000002B6 - XK_idotless* = 0x000002B9 - XK_gbreve* = 0x000002BB - XK_jcircumflex* = 0x000002BC - XKc_Cabovedot* = 0x000002C5 - XKc_Ccircumflex* = 0x000002C6 - XKc_Gabovedot* = 0x000002D5 - XKc_Gcircumflex* = 0x000002D8 - XKc_Ubreve* = 0x000002DD - XKc_Scircumflex* = 0x000002DE - XK_cabovedot* = 0x000002E5 - XK_ccircumflex* = 0x000002E6 - XK_gabovedot* = 0x000002F5 - XK_gcircumflex* = 0x000002F8 - XK_ubreve* = 0x000002FD - XK_scircumflex* = 0x000002FE + XKc_Hstroke*: TKeySym = 0x000002A1 + XKc_Hcircumflex*: TKeySym = 0x000002A6 + XKc_Iabovedot*: TKeySym = 0x000002A9 + XKc_Gbreve*: TKeySym = 0x000002AB + XKc_Jcircumflex*: TKeySym = 0x000002AC + XK_hstroke*: TKeySym = 0x000002B1 + XK_hcircumflex*: TKeySym = 0x000002B6 + XK_idotless*: TKeySym = 0x000002B9 + XK_gbreve*: TKeySym = 0x000002BB + XK_jcircumflex*: TKeySym = 0x000002BC + XKc_Cabovedot*: TKeySym = 0x000002C5 + XKc_Ccircumflex*: TKeySym = 0x000002C6 + XKc_Gabovedot*: TKeySym = 0x000002D5 + XKc_Gcircumflex*: TKeySym = 0x000002D8 + XKc_Ubreve*: TKeySym = 0x000002DD + XKc_Scircumflex*: TKeySym = 0x000002DE + XK_cabovedot*: TKeySym = 0x000002E5 + XK_ccircumflex*: TKeySym = 0x000002E6 + XK_gabovedot*: TKeySym = 0x000002F5 + XK_gcircumflex*: TKeySym = 0x000002F8 + XK_ubreve*: TKeySym = 0x000002FD + XK_scircumflex*: TKeySym = 0x000002FE # XK_LATIN3 #* # * Latin 4 @@ -654,42 +655,42 @@ when defined(XK_LATIN3) or true: when defined(XK_LATIN4) or true: const - XK_kra* = 0x000003A2 - XK_kappa* = 0x000003A2 # deprecated - XKc_Rcedilla* = 0x000003A3 - XKc_Itilde* = 0x000003A5 - XKc_Lcedilla* = 0x000003A6 - XKc_Emacron* = 0x000003AA - XKc_Gcedilla* = 0x000003AB - XKc_Tslash* = 0x000003AC - XK_rcedilla* = 0x000003B3 - XK_itilde* = 0x000003B5 - XK_lcedilla* = 0x000003B6 - XK_emacron* = 0x000003BA - XK_gcedilla* = 0x000003BB - XK_tslash* = 0x000003BC - XKc_ENG* = 0x000003BD - XK_eng* = 0x000003BF - XKc_Amacron* = 0x000003C0 - XKc_Iogonek* = 0x000003C7 - XKc_Eabovedot* = 0x000003CC - XKc_Imacron* = 0x000003CF - XKc_Ncedilla* = 0x000003D1 - XKc_Omacron* = 0x000003D2 - XKc_Kcedilla* = 0x000003D3 - XKc_Uogonek* = 0x000003D9 - XKc_Utilde* = 0x000003DD - XKc_Umacron* = 0x000003DE - XK_amacron* = 0x000003E0 - XK_iogonek* = 0x000003E7 - XK_eabovedot* = 0x000003EC - XK_imacron* = 0x000003EF - XK_ncedilla* = 0x000003F1 - XK_omacron* = 0x000003F2 - XK_kcedilla* = 0x000003F3 - XK_uogonek* = 0x000003F9 - XK_utilde* = 0x000003FD - XK_umacron* = 0x000003FE + XK_kra*: TKeySym = 0x000003A2 + XK_kappa*: TKeySym = 0x000003A2 # deprecated + XKc_Rcedilla*: TKeySym = 0x000003A3 + XKc_Itilde*: TKeySym = 0x000003A5 + XKc_Lcedilla*: TKeySym = 0x000003A6 + XKc_Emacron*: TKeySym = 0x000003AA + XKc_Gcedilla*: TKeySym = 0x000003AB + XKc_Tslash*: TKeySym = 0x000003AC + XK_rcedilla*: TKeySym = 0x000003B3 + XK_itilde*: TKeySym = 0x000003B5 + XK_lcedilla*: TKeySym = 0x000003B6 + XK_emacron*: TKeySym = 0x000003BA + XK_gcedilla*: TKeySym = 0x000003BB + XK_tslash*: TKeySym = 0x000003BC + XKc_ENG*: TKeySym = 0x000003BD + XK_eng*: TKeySym = 0x000003BF + XKc_Amacron*: TKeySym = 0x000003C0 + XKc_Iogonek*: TKeySym = 0x000003C7 + XKc_Eabovedot*: TKeySym = 0x000003CC + XKc_Imacron*: TKeySym = 0x000003CF + XKc_Ncedilla*: TKeySym = 0x000003D1 + XKc_Omacron*: TKeySym = 0x000003D2 + XKc_Kcedilla*: TKeySym = 0x000003D3 + XKc_Uogonek*: TKeySym = 0x000003D9 + XKc_Utilde*: TKeySym = 0x000003DD + XKc_Umacron*: TKeySym = 0x000003DE + XK_amacron*: TKeySym = 0x000003E0 + XK_iogonek*: TKeySym = 0x000003E7 + XK_eabovedot*: TKeySym = 0x000003EC + XK_imacron*: TKeySym = 0x000003EF + XK_ncedilla*: TKeySym = 0x000003F1 + XK_omacron*: TKeySym = 0x000003F2 + XK_kcedilla*: TKeySym = 0x000003F3 + XK_uogonek*: TKeySym = 0x000003F9 + XK_utilde*: TKeySym = 0x000003FD + XK_umacron*: TKeySym = 0x000003FE # XK_LATIN4 #* # * Latin-8 @@ -698,32 +699,32 @@ when defined(XK_LATIN4) or true: when defined(XK_LATIN8) or true: const - XKc_Babovedot* = 0x000012A1 - XK_babovedot* = 0x000012A2 - XKc_Dabovedot* = 0x000012A6 - XKc_Wgrave* = 0x000012A8 - XKc_Wacute* = 0x000012AA - XK_dabovedot* = 0x000012AB - XKc_Ygrave* = 0x000012AC - XKc_Fabovedot* = 0x000012B0 - XK_fabovedot* = 0x000012B1 - XKc_Mabovedot* = 0x000012B4 - XK_mabovedot* = 0x000012B5 - XKc_Pabovedot* = 0x000012B7 - XK_wgrave* = 0x000012B8 - XK_pabovedot* = 0x000012B9 - XK_wacute* = 0x000012BA - XKc_Sabovedot* = 0x000012BB - XK_ygrave* = 0x000012BC - XKc_Wdiaeresis* = 0x000012BD - XK_wdiaeresis* = 0x000012BE - XK_sabovedot* = 0x000012BF - XKc_Wcircumflex* = 0x000012D0 - XKc_Tabovedot* = 0x000012D7 - XKc_Ycircumflex* = 0x000012DE - XK_wcircumflex* = 0x000012F0 - XK_tabovedot* = 0x000012F7 - XK_ycircumflex* = 0x000012FE + XKc_Babovedot*: TKeySym = 0x000012A1 + XK_babovedot*: TKeySym = 0x000012A2 + XKc_Dabovedot*: TKeySym = 0x000012A6 + XKc_Wgrave*: TKeySym = 0x000012A8 + XKc_Wacute*: TKeySym = 0x000012AA + XK_dabovedot*: TKeySym = 0x000012AB + XKc_Ygrave*: TKeySym = 0x000012AC + XKc_Fabovedot*: TKeySym = 0x000012B0 + XK_fabovedot*: TKeySym = 0x000012B1 + XKc_Mabovedot*: TKeySym = 0x000012B4 + XK_mabovedot*: TKeySym = 0x000012B5 + XKc_Pabovedot*: TKeySym = 0x000012B7 + XK_wgrave*: TKeySym = 0x000012B8 + XK_pabovedot*: TKeySym = 0x000012B9 + XK_wacute*: TKeySym = 0x000012BA + XKc_Sabovedot*: TKeySym = 0x000012BB + XK_ygrave*: TKeySym = 0x000012BC + XKc_Wdiaeresis*: TKeySym = 0x000012BD + XK_wdiaeresis*: TKeySym = 0x000012BE + XK_sabovedot*: TKeySym = 0x000012BF + XKc_Wcircumflex*: TKeySym = 0x000012D0 + XKc_Tabovedot*: TKeySym = 0x000012D7 + XKc_Ycircumflex*: TKeySym = 0x000012DE + XK_wcircumflex*: TKeySym = 0x000012F0 + XK_tabovedot*: TKeySym = 0x000012F7 + XK_ycircumflex*: TKeySym = 0x000012FE # XK_LATIN8 #* # * Latin-9 (a.k.a. Latin-0) @@ -732,9 +733,9 @@ when defined(XK_LATIN8) or true: when defined(XK_LATIN9) or true: const - XKc_OE* = 0x000013BC - XK_oe* = 0x000013BD - XKc_Ydiaeresis* = 0x000013BE + XKc_OE*: TKeySym = 0x000013BC + XK_oe*: TKeySym = 0x000013BD + XKc_Ydiaeresis*: TKeySym = 0x000013BE # XK_LATIN9 #* # * Katakana @@ -743,76 +744,76 @@ when defined(XK_LATIN9) or true: when defined(XK_KATAKANA) or true: const - XK_overline* = 0x0000047E - XK_kana_fullstop* = 0x000004A1 - XK_kana_openingbracket* = 0x000004A2 - XK_kana_closingbracket* = 0x000004A3 - XK_kana_comma* = 0x000004A4 - XK_kana_conjunctive* = 0x000004A5 - XK_kana_middledot* = 0x000004A5 # deprecated - XKc_kana_WO* = 0x000004A6 - XK_kana_a* = 0x000004A7 - XK_kana_i* = 0x000004A8 - XK_kana_u* = 0x000004A9 - XK_kana_e* = 0x000004AA - XK_kana_o* = 0x000004AB - XK_kana_ya* = 0x000004AC - XK_kana_yu* = 0x000004AD - XK_kana_yo* = 0x000004AE - XK_kana_tsu* = 0x000004AF - XK_kana_tu* = 0x000004AF # deprecated - XK_prolongedsound* = 0x000004B0 - XKc_kana_A* = 0x000004B1 - XKc_kana_I* = 0x000004B2 - XKc_kana_U* = 0x000004B3 - XKc_kana_E* = 0x000004B4 - XKc_kana_O* = 0x000004B5 - XKc_kana_KA* = 0x000004B6 - XKc_kana_KI* = 0x000004B7 - XKc_kana_KU* = 0x000004B8 - XKc_kana_KE* = 0x000004B9 - XKc_kana_KO* = 0x000004BA - XKc_kana_SA* = 0x000004BB - XKc_kana_SHI* = 0x000004BC - XKc_kana_SU* = 0x000004BD - XKc_kana_SE* = 0x000004BE - XKc_kana_SO* = 0x000004BF - XKc_kana_TA* = 0x000004C0 - XKc_kana_CHI* = 0x000004C1 - XKc_kana_TI* = 0x000004C1 # deprecated - XKc_kana_TSU* = 0x000004C2 - XKc_kana_TU* = 0x000004C2 # deprecated - XKc_kana_TE* = 0x000004C3 - XKc_kana_TO* = 0x000004C4 - XKc_kana_NA* = 0x000004C5 - XKc_kana_NI* = 0x000004C6 - XKc_kana_NU* = 0x000004C7 - XKc_kana_NE* = 0x000004C8 - XKc_kana_NO* = 0x000004C9 - XKc_kana_HA* = 0x000004CA - XKc_kana_HI* = 0x000004CB - XKc_kana_FU* = 0x000004CC - XKc_kana_HU* = 0x000004CC # deprecated - XKc_kana_HE* = 0x000004CD - XKc_kana_HO* = 0x000004CE - XKc_kana_MA* = 0x000004CF - XKc_kana_MI* = 0x000004D0 - XKc_kana_MU* = 0x000004D1 - XKc_kana_ME* = 0x000004D2 - XKc_kana_MO* = 0x000004D3 - XKc_kana_YA* = 0x000004D4 - XKc_kana_YU* = 0x000004D5 - XKc_kana_YO* = 0x000004D6 - XKc_kana_RA* = 0x000004D7 - XKc_kana_RI* = 0x000004D8 - XKc_kana_RU* = 0x000004D9 - XKc_kana_RE* = 0x000004DA - XKc_kana_RO* = 0x000004DB - XKc_kana_WA* = 0x000004DC - XKc_kana_N* = 0x000004DD - XK_voicedsound* = 0x000004DE - XK_semivoicedsound* = 0x000004DF - XK_kana_switch* = 0x0000FF7E # Alias for mode_switch + XK_overline*: TKeySym = 0x0000047E + XK_kana_fullstop*: TKeySym = 0x000004A1 + XK_kana_openingbracket*: TKeySym = 0x000004A2 + XK_kana_closingbracket*: TKeySym = 0x000004A3 + XK_kana_comma*: TKeySym = 0x000004A4 + XK_kana_conjunctive*: TKeySym = 0x000004A5 + XK_kana_middledot*: TKeySym = 0x000004A5 # deprecated + XKc_kana_WO*: TKeySym = 0x000004A6 + XK_kana_a*: TKeySym = 0x000004A7 + XK_kana_i*: TKeySym = 0x000004A8 + XK_kana_u*: TKeySym = 0x000004A9 + XK_kana_e*: TKeySym = 0x000004AA + XK_kana_o*: TKeySym = 0x000004AB + XK_kana_ya*: TKeySym = 0x000004AC + XK_kana_yu*: TKeySym = 0x000004AD + XK_kana_yo*: TKeySym = 0x000004AE + XK_kana_tsu*: TKeySym = 0x000004AF + XK_kana_tu*: TKeySym = 0x000004AF # deprecated + XK_prolongedsound*: TKeySym = 0x000004B0 + XKc_kana_A*: TKeySym = 0x000004B1 + XKc_kana_I*: TKeySym = 0x000004B2 + XKc_kana_U*: TKeySym = 0x000004B3 + XKc_kana_E*: TKeySym = 0x000004B4 + XKc_kana_O*: TKeySym = 0x000004B5 + XKc_kana_KA*: TKeySym = 0x000004B6 + XKc_kana_KI*: TKeySym = 0x000004B7 + XKc_kana_KU*: TKeySym = 0x000004B8 + XKc_kana_KE*: TKeySym = 0x000004B9 + XKc_kana_KO*: TKeySym = 0x000004BA + XKc_kana_SA*: TKeySym = 0x000004BB + XKc_kana_SHI*: TKeySym = 0x000004BC + XKc_kana_SU*: TKeySym = 0x000004BD + XKc_kana_SE*: TKeySym = 0x000004BE + XKc_kana_SO*: TKeySym = 0x000004BF + XKc_kana_TA*: TKeySym = 0x000004C0 + XKc_kana_CHI*: TKeySym = 0x000004C1 + XKc_kana_TI*: TKeySym = 0x000004C1 # deprecated + XKc_kana_TSU*: TKeySym = 0x000004C2 + XKc_kana_TU*: TKeySym = 0x000004C2 # deprecated + XKc_kana_TE*: TKeySym = 0x000004C3 + XKc_kana_TO*: TKeySym = 0x000004C4 + XKc_kana_NA*: TKeySym = 0x000004C5 + XKc_kana_NI*: TKeySym = 0x000004C6 + XKc_kana_NU*: TKeySym = 0x000004C7 + XKc_kana_NE*: TKeySym = 0x000004C8 + XKc_kana_NO*: TKeySym = 0x000004C9 + XKc_kana_HA*: TKeySym = 0x000004CA + XKc_kana_HI*: TKeySym = 0x000004CB + XKc_kana_FU*: TKeySym = 0x000004CC + XKc_kana_HU*: TKeySym = 0x000004CC # deprecated + XKc_kana_HE*: TKeySym = 0x000004CD + XKc_kana_HO*: TKeySym = 0x000004CE + XKc_kana_MA*: TKeySym = 0x000004CF + XKc_kana_MI*: TKeySym = 0x000004D0 + XKc_kana_MU*: TKeySym = 0x000004D1 + XKc_kana_ME*: TKeySym = 0x000004D2 + XKc_kana_MO*: TKeySym = 0x000004D3 + XKc_kana_YA*: TKeySym = 0x000004D4 + XKc_kana_YU*: TKeySym = 0x000004D5 + XKc_kana_YO*: TKeySym = 0x000004D6 + XKc_kana_RA*: TKeySym = 0x000004D7 + XKc_kana_RI*: TKeySym = 0x000004D8 + XKc_kana_RU*: TKeySym = 0x000004D9 + XKc_kana_RE*: TKeySym = 0x000004DA + XKc_kana_RO*: TKeySym = 0x000004DB + XKc_kana_WA*: TKeySym = 0x000004DC + XKc_kana_N*: TKeySym = 0x000004DD + XK_voicedsound*: TKeySym = 0x000004DE + XK_semivoicedsound*: TKeySym = 0x000004DF + XK_kana_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch # XK_KATAKANA #* # * Arabic @@ -821,97 +822,97 @@ when defined(XK_KATAKANA) or true: when defined(XK_ARABIC) or true: const - XK_Farsi_0* = 0x00000590 - XK_Farsi_1* = 0x00000591 - XK_Farsi_2* = 0x00000592 - XK_Farsi_3* = 0x00000593 - XK_Farsi_4* = 0x00000594 - XK_Farsi_5* = 0x00000595 - XK_Farsi_6* = 0x00000596 - XK_Farsi_7* = 0x00000597 - XK_Farsi_8* = 0x00000598 - XK_Farsi_9* = 0x00000599 - XK_Arabic_percent* = 0x000005A5 - XK_Arabic_superscript_alef* = 0x000005A6 - XK_Arabic_tteh* = 0x000005A7 - XK_Arabic_peh* = 0x000005A8 - XK_Arabic_tcheh* = 0x000005A9 - XK_Arabic_ddal* = 0x000005AA - XK_Arabic_rreh* = 0x000005AB - XK_Arabic_comma* = 0x000005AC - XK_Arabic_fullstop* = 0x000005AE - XK_Arabic_0* = 0x000005B0 - XK_Arabic_1* = 0x000005B1 - XK_Arabic_2* = 0x000005B2 - XK_Arabic_3* = 0x000005B3 - XK_Arabic_4* = 0x000005B4 - XK_Arabic_5* = 0x000005B5 - XK_Arabic_6* = 0x000005B6 - XK_Arabic_7* = 0x000005B7 - XK_Arabic_8* = 0x000005B8 - XK_Arabic_9* = 0x000005B9 - XK_Arabic_semicolon* = 0x000005BB - XK_Arabic_question_mark* = 0x000005BF - XK_Arabic_hamza* = 0x000005C1 - XK_Arabic_maddaonalef* = 0x000005C2 - XK_Arabic_hamzaonalef* = 0x000005C3 - XK_Arabic_hamzaonwaw* = 0x000005C4 - XK_Arabic_hamzaunderalef* = 0x000005C5 - XK_Arabic_hamzaonyeh* = 0x000005C6 - XK_Arabic_alef* = 0x000005C7 - XK_Arabic_beh* = 0x000005C8 - XK_Arabic_tehmarbuta* = 0x000005C9 - XK_Arabic_teh* = 0x000005CA - XK_Arabic_theh* = 0x000005CB - XK_Arabic_jeem* = 0x000005CC - XK_Arabic_hah* = 0x000005CD - XK_Arabic_khah* = 0x000005CE - XK_Arabic_dal* = 0x000005CF - XK_Arabic_thal* = 0x000005D0 - XK_Arabic_ra* = 0x000005D1 - XK_Arabic_zain* = 0x000005D2 - XK_Arabic_seen* = 0x000005D3 - XK_Arabic_sheen* = 0x000005D4 - XK_Arabic_sad* = 0x000005D5 - XK_Arabic_dad* = 0x000005D6 - XK_Arabic_tah* = 0x000005D7 - XK_Arabic_zah* = 0x000005D8 - XK_Arabic_ain* = 0x000005D9 - XK_Arabic_ghain* = 0x000005DA - XK_Arabic_tatweel* = 0x000005E0 - XK_Arabic_feh* = 0x000005E1 - XK_Arabic_qaf* = 0x000005E2 - XK_Arabic_kaf* = 0x000005E3 - XK_Arabic_lam* = 0x000005E4 - XK_Arabic_meem* = 0x000005E5 - XK_Arabic_noon* = 0x000005E6 - XK_Arabic_ha* = 0x000005E7 - XK_Arabic_heh* = 0x000005E7 # deprecated - XK_Arabic_waw* = 0x000005E8 - XK_Arabic_alefmaksura* = 0x000005E9 - XK_Arabic_yeh* = 0x000005EA - XK_Arabic_fathatan* = 0x000005EB - XK_Arabic_dammatan* = 0x000005EC - XK_Arabic_kasratan* = 0x000005ED - XK_Arabic_fatha* = 0x000005EE - XK_Arabic_damma* = 0x000005EF - XK_Arabic_kasra* = 0x000005F0 - XK_Arabic_shadda* = 0x000005F1 - XK_Arabic_sukun* = 0x000005F2 - XK_Arabic_madda_above* = 0x000005F3 - XK_Arabic_hamza_above* = 0x000005F4 - XK_Arabic_hamza_below* = 0x000005F5 - XK_Arabic_jeh* = 0x000005F6 - XK_Arabic_veh* = 0x000005F7 - XK_Arabic_keheh* = 0x000005F8 - XK_Arabic_gaf* = 0x000005F9 - XK_Arabic_noon_ghunna* = 0x000005FA - XK_Arabic_heh_doachashmee* = 0x000005FB - XK_Farsi_yeh* = 0x000005FC - XK_Arabic_farsi_yeh* = XK_Farsi_yeh - XK_Arabic_yeh_baree* = 0x000005FD - XK_Arabic_heh_goal* = 0x000005FE - XK_Arabic_switch* = 0x0000FF7E # Alias for mode_switch + XK_Farsi_0*: TKeySym = 0x00000590 + XK_Farsi_1*: TKeySym = 0x00000591 + XK_Farsi_2*: TKeySym = 0x00000592 + XK_Farsi_3*: TKeySym = 0x00000593 + XK_Farsi_4*: TKeySym = 0x00000594 + XK_Farsi_5*: TKeySym = 0x00000595 + XK_Farsi_6*: TKeySym = 0x00000596 + XK_Farsi_7*: TKeySym = 0x00000597 + XK_Farsi_8*: TKeySym = 0x00000598 + XK_Farsi_9*: TKeySym = 0x00000599 + XK_Arabic_percent*: TKeySym = 0x000005A5 + XK_Arabic_superscript_alef*: TKeySym = 0x000005A6 + XK_Arabic_tteh*: TKeySym = 0x000005A7 + XK_Arabic_peh*: TKeySym = 0x000005A8 + XK_Arabic_tcheh*: TKeySym = 0x000005A9 + XK_Arabic_ddal*: TKeySym = 0x000005AA + XK_Arabic_rreh*: TKeySym = 0x000005AB + XK_Arabic_comma*: TKeySym = 0x000005AC + XK_Arabic_fullstop*: TKeySym = 0x000005AE + XK_Arabic_0*: TKeySym = 0x000005B0 + XK_Arabic_1*: TKeySym = 0x000005B1 + XK_Arabic_2*: TKeySym = 0x000005B2 + XK_Arabic_3*: TKeySym = 0x000005B3 + XK_Arabic_4*: TKeySym = 0x000005B4 + XK_Arabic_5*: TKeySym = 0x000005B5 + XK_Arabic_6*: TKeySym = 0x000005B6 + XK_Arabic_7*: TKeySym = 0x000005B7 + XK_Arabic_8*: TKeySym = 0x000005B8 + XK_Arabic_9*: TKeySym = 0x000005B9 + XK_Arabic_semicolon*: TKeySym = 0x000005BB + XK_Arabic_question_mark*: TKeySym = 0x000005BF + XK_Arabic_hamza*: TKeySym = 0x000005C1 + XK_Arabic_maddaonalef*: TKeySym = 0x000005C2 + XK_Arabic_hamzaonalef*: TKeySym = 0x000005C3 + XK_Arabic_hamzaonwaw*: TKeySym = 0x000005C4 + XK_Arabic_hamzaunderalef*: TKeySym = 0x000005C5 + XK_Arabic_hamzaonyeh*: TKeySym = 0x000005C6 + XK_Arabic_alef*: TKeySym = 0x000005C7 + XK_Arabic_beh*: TKeySym = 0x000005C8 + XK_Arabic_tehmarbuta*: TKeySym = 0x000005C9 + XK_Arabic_teh*: TKeySym = 0x000005CA + XK_Arabic_theh*: TKeySym = 0x000005CB + XK_Arabic_jeem*: TKeySym = 0x000005CC + XK_Arabic_hah*: TKeySym = 0x000005CD + XK_Arabic_khah*: TKeySym = 0x000005CE + XK_Arabic_dal*: TKeySym = 0x000005CF + XK_Arabic_thal*: TKeySym = 0x000005D0 + XK_Arabic_ra*: TKeySym = 0x000005D1 + XK_Arabic_zain*: TKeySym = 0x000005D2 + XK_Arabic_seen*: TKeySym = 0x000005D3 + XK_Arabic_sheen*: TKeySym = 0x000005D4 + XK_Arabic_sad*: TKeySym = 0x000005D5 + XK_Arabic_dad*: TKeySym = 0x000005D6 + XK_Arabic_tah*: TKeySym = 0x000005D7 + XK_Arabic_zah*: TKeySym = 0x000005D8 + XK_Arabic_ain*: TKeySym = 0x000005D9 + XK_Arabic_ghain*: TKeySym = 0x000005DA + XK_Arabic_tatweel*: TKeySym = 0x000005E0 + XK_Arabic_feh*: TKeySym = 0x000005E1 + XK_Arabic_qaf*: TKeySym = 0x000005E2 + XK_Arabic_kaf*: TKeySym = 0x000005E3 + XK_Arabic_lam*: TKeySym = 0x000005E4 + XK_Arabic_meem*: TKeySym = 0x000005E5 + XK_Arabic_noon*: TKeySym = 0x000005E6 + XK_Arabic_ha*: TKeySym = 0x000005E7 + XK_Arabic_heh*: TKeySym = 0x000005E7 # deprecated + XK_Arabic_waw*: TKeySym = 0x000005E8 + XK_Arabic_alefmaksura*: TKeySym = 0x000005E9 + XK_Arabic_yeh*: TKeySym = 0x000005EA + XK_Arabic_fathatan*: TKeySym = 0x000005EB + XK_Arabic_dammatan*: TKeySym = 0x000005EC + XK_Arabic_kasratan*: TKeySym = 0x000005ED + XK_Arabic_fatha*: TKeySym = 0x000005EE + XK_Arabic_damma*: TKeySym = 0x000005EF + XK_Arabic_kasra*: TKeySym = 0x000005F0 + XK_Arabic_shadda*: TKeySym = 0x000005F1 + XK_Arabic_sukun*: TKeySym = 0x000005F2 + XK_Arabic_madda_above*: TKeySym = 0x000005F3 + XK_Arabic_hamza_above*: TKeySym = 0x000005F4 + XK_Arabic_hamza_below*: TKeySym = 0x000005F5 + XK_Arabic_jeh*: TKeySym = 0x000005F6 + XK_Arabic_veh*: TKeySym = 0x000005F7 + XK_Arabic_keheh*: TKeySym = 0x000005F8 + XK_Arabic_gaf*: TKeySym = 0x000005F9 + XK_Arabic_noon_ghunna*: TKeySym = 0x000005FA + XK_Arabic_heh_doachashmee*: TKeySym = 0x000005FB + XK_Farsi_yeh*: TKeySym = 0x000005FC + XK_Arabic_farsi_yeh*: TKeySym = XK_Farsi_yeh + XK_Arabic_yeh_baree*: TKeySym = 0x000005FD + XK_Arabic_heh_goal*: TKeySym = 0x000005FE + XK_Arabic_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch # XK_ARABIC #* # * Cyrillic @@ -920,145 +921,145 @@ when defined(XK_ARABIC) or true: when defined(XK_CYRILLIC) or true: const - XKc_Cyrillic_GHE_bar* = 0x00000680 - XK_Cyrillic_ghe_bar* = 0x00000690 - XKc_Cyrillic_ZHE_descender* = 0x00000681 - XK_Cyrillic_zhe_descender* = 0x00000691 - XKc_Cyrillic_KA_descender* = 0x00000682 - XK_Cyrillic_ka_descender* = 0x00000692 - XKc_Cyrillic_KA_vertstroke* = 0x00000683 - XK_Cyrillic_ka_vertstroke* = 0x00000693 - XKc_Cyrillic_EN_descender* = 0x00000684 - XK_Cyrillic_en_descender* = 0x00000694 - XKc_Cyrillic_U_straight* = 0x00000685 - XK_Cyrillic_u_straight* = 0x00000695 - XKc_Cyrillic_U_straight_bar* = 0x00000686 - XK_Cyrillic_u_straight_bar* = 0x00000696 - XKc_Cyrillic_HA_descender* = 0x00000687 - XK_Cyrillic_ha_descender* = 0x00000697 - XKc_Cyrillic_CHE_descender* = 0x00000688 - XK_Cyrillic_che_descender* = 0x00000698 - XKc_Cyrillic_CHE_vertstroke* = 0x00000689 - XK_Cyrillic_che_vertstroke* = 0x00000699 - XKc_Cyrillic_SHHA* = 0x0000068A - XK_Cyrillic_shha* = 0x0000069A - XKc_Cyrillic_SCHWA* = 0x0000068C - XK_Cyrillic_schwa* = 0x0000069C - XKc_Cyrillic_I_macron* = 0x0000068D - XK_Cyrillic_i_macron* = 0x0000069D - XKc_Cyrillic_O_bar* = 0x0000068E - XK_Cyrillic_o_bar* = 0x0000069E - XKc_Cyrillic_U_macron* = 0x0000068F - XK_Cyrillic_u_macron* = 0x0000069F - XK_Serbian_dje* = 0x000006A1 - XK_Macedonia_gje* = 0x000006A2 - XK_Cyrillic_io* = 0x000006A3 - XK_Ukrainian_ie* = 0x000006A4 - XK_Ukranian_je* = 0x000006A4 # deprecated - XK_Macedonia_dse* = 0x000006A5 - XK_Ukrainian_i* = 0x000006A6 - XK_Ukranian_i* = 0x000006A6 # deprecated - XK_Ukrainian_yi* = 0x000006A7 - XK_Ukranian_yi* = 0x000006A7 # deprecated - XK_Cyrillic_je* = 0x000006A8 - XK_Serbian_je* = 0x000006A8 # deprecated - XK_Cyrillic_lje* = 0x000006A9 - XK_Serbian_lje* = 0x000006A9 # deprecated - XK_Cyrillic_nje* = 0x000006AA - XK_Serbian_nje* = 0x000006AA # deprecated - XK_Serbian_tshe* = 0x000006AB - XK_Macedonia_kje* = 0x000006AC - XK_Ukrainian_ghe_with_upturn* = 0x000006AD - XK_Byelorussian_shortu* = 0x000006AE - XK_Cyrillic_dzhe* = 0x000006AF - XK_Serbian_dze* = 0x000006AF # deprecated - XK_numerosign* = 0x000006B0 - XKc_Serbian_DJE* = 0x000006B1 - XKc_Macedonia_GJE* = 0x000006B2 - XKc_Cyrillic_IO* = 0x000006B3 - XKc_Ukrainian_IE* = 0x000006B4 - XKc_Ukranian_JE* = 0x000006B4 # deprecated - XKc_Macedonia_DSE* = 0x000006B5 - XKc_Ukrainian_I* = 0x000006B6 - XKc_Ukranian_I* = 0x000006B6 # deprecated - XKc_Ukrainian_YI* = 0x000006B7 - XKc_Ukranian_YI* = 0x000006B7 # deprecated - XKc_Cyrillic_JE* = 0x000006B8 - XKc_Serbian_JE* = 0x000006B8 # deprecated - XKc_Cyrillic_LJE* = 0x000006B9 - XKc_Serbian_LJE* = 0x000006B9 # deprecated - XKc_Cyrillic_NJE* = 0x000006BA - XKc_Serbian_NJE* = 0x000006BA # deprecated - XKc_Serbian_TSHE* = 0x000006BB - XKc_Macedonia_KJE* = 0x000006BC - XKc_Ukrainian_GHE_WITH_UPTURN* = 0x000006BD - XKc_Byelorussian_SHORTU* = 0x000006BE - XKc_Cyrillic_DZHE* = 0x000006BF - XKc_Serbian_DZE* = 0x000006BF # deprecated - XK_Cyrillic_yu* = 0x000006C0 - XK_Cyrillic_a* = 0x000006C1 - XK_Cyrillic_be* = 0x000006C2 - XK_Cyrillic_tse* = 0x000006C3 - XK_Cyrillic_de* = 0x000006C4 - XK_Cyrillic_ie* = 0x000006C5 - XK_Cyrillic_ef* = 0x000006C6 - XK_Cyrillic_ghe* = 0x000006C7 - XK_Cyrillic_ha* = 0x000006C8 - XK_Cyrillic_i* = 0x000006C9 - XK_Cyrillic_shorti* = 0x000006CA - XK_Cyrillic_ka* = 0x000006CB - XK_Cyrillic_el* = 0x000006CC - XK_Cyrillic_em* = 0x000006CD - XK_Cyrillic_en* = 0x000006CE - XK_Cyrillic_o* = 0x000006CF - XK_Cyrillic_pe* = 0x000006D0 - XK_Cyrillic_ya* = 0x000006D1 - XK_Cyrillic_er* = 0x000006D2 - XK_Cyrillic_es* = 0x000006D3 - XK_Cyrillic_te* = 0x000006D4 - XK_Cyrillic_u* = 0x000006D5 - XK_Cyrillic_zhe* = 0x000006D6 - XK_Cyrillic_ve* = 0x000006D7 - XK_Cyrillic_softsign* = 0x000006D8 - XK_Cyrillic_yeru* = 0x000006D9 - XK_Cyrillic_ze* = 0x000006DA - XK_Cyrillic_sha* = 0x000006DB - XK_Cyrillic_e* = 0x000006DC - XK_Cyrillic_shcha* = 0x000006DD - XK_Cyrillic_che* = 0x000006DE - XK_Cyrillic_hardsign* = 0x000006DF - XKc_Cyrillic_YU* = 0x000006E0 - XKc_Cyrillic_A* = 0x000006E1 - XKc_Cyrillic_BE* = 0x000006E2 - XKc_Cyrillic_TSE* = 0x000006E3 - XKc_Cyrillic_DE* = 0x000006E4 - XKc_Cyrillic_IE* = 0x000006E5 - XKc_Cyrillic_EF* = 0x000006E6 - XKc_Cyrillic_GHE* = 0x000006E7 - XKc_Cyrillic_HA* = 0x000006E8 - XKc_Cyrillic_I* = 0x000006E9 - XKc_Cyrillic_SHORTI* = 0x000006EA - XKc_Cyrillic_KA* = 0x000006EB - XKc_Cyrillic_EL* = 0x000006EC - XKc_Cyrillic_EM* = 0x000006ED - XKc_Cyrillic_EN* = 0x000006EE - XKc_Cyrillic_O* = 0x000006EF - XKc_Cyrillic_PE* = 0x000006F0 - XKc_Cyrillic_YA* = 0x000006F1 - XKc_Cyrillic_ER* = 0x000006F2 - XKc_Cyrillic_ES* = 0x000006F3 - XKc_Cyrillic_TE* = 0x000006F4 - XKc_Cyrillic_U* = 0x000006F5 - XKc_Cyrillic_ZHE* = 0x000006F6 - XKc_Cyrillic_VE* = 0x000006F7 - XKc_Cyrillic_SOFTSIGN* = 0x000006F8 - XKc_Cyrillic_YERU* = 0x000006F9 - XKc_Cyrillic_ZE* = 0x000006FA - XKc_Cyrillic_SHA* = 0x000006FB - XKc_Cyrillic_E* = 0x000006FC - XKc_Cyrillic_SHCHA* = 0x000006FD - XKc_Cyrillic_CHE* = 0x000006FE - XKc_Cyrillic_HARDSIGN* = 0x000006FF + XKc_Cyrillic_GHE_bar*: TKeySym = 0x00000680 + XK_Cyrillic_ghe_bar*: TKeySym = 0x00000690 + XKc_Cyrillic_ZHE_descender*: TKeySym = 0x00000681 + XK_Cyrillic_zhe_descender*: TKeySym = 0x00000691 + XKc_Cyrillic_KA_descender*: TKeySym = 0x00000682 + XK_Cyrillic_ka_descender*: TKeySym = 0x00000692 + XKc_Cyrillic_KA_vertstroke*: TKeySym = 0x00000683 + XK_Cyrillic_ka_vertstroke*: TKeySym = 0x00000693 + XKc_Cyrillic_EN_descender*: TKeySym = 0x00000684 + XK_Cyrillic_en_descender*: TKeySym = 0x00000694 + XKc_Cyrillic_U_straight*: TKeySym = 0x00000685 + XK_Cyrillic_u_straight*: TKeySym = 0x00000695 + XKc_Cyrillic_U_straight_bar*: TKeySym = 0x00000686 + XK_Cyrillic_u_straight_bar*: TKeySym = 0x00000696 + XKc_Cyrillic_HA_descender*: TKeySym = 0x00000687 + XK_Cyrillic_ha_descender*: TKeySym = 0x00000697 + XKc_Cyrillic_CHE_descender*: TKeySym = 0x00000688 + XK_Cyrillic_che_descender*: TKeySym = 0x00000698 + XKc_Cyrillic_CHE_vertstroke*: TKeySym = 0x00000689 + XK_Cyrillic_che_vertstroke*: TKeySym = 0x00000699 + XKc_Cyrillic_SHHA*: TKeySym = 0x0000068A + XK_Cyrillic_shha*: TKeySym = 0x0000069A + XKc_Cyrillic_SCHWA*: TKeySym = 0x0000068C + XK_Cyrillic_schwa*: TKeySym = 0x0000069C + XKc_Cyrillic_I_macron*: TKeySym = 0x0000068D + XK_Cyrillic_i_macron*: TKeySym = 0x0000069D + XKc_Cyrillic_O_bar*: TKeySym = 0x0000068E + XK_Cyrillic_o_bar*: TKeySym = 0x0000069E + XKc_Cyrillic_U_macron*: TKeySym = 0x0000068F + XK_Cyrillic_u_macron*: TKeySym = 0x0000069F + XK_Serbian_dje*: TKeySym = 0x000006A1 + XK_Macedonia_gje*: TKeySym = 0x000006A2 + XK_Cyrillic_io*: TKeySym = 0x000006A3 + XK_Ukrainian_ie*: TKeySym = 0x000006A4 + XK_Ukranian_je*: TKeySym = 0x000006A4 # deprecated + XK_Macedonia_dse*: TKeySym = 0x000006A5 + XK_Ukrainian_i*: TKeySym = 0x000006A6 + XK_Ukranian_i*: TKeySym = 0x000006A6 # deprecated + XK_Ukrainian_yi*: TKeySym = 0x000006A7 + XK_Ukranian_yi*: TKeySym = 0x000006A7 # deprecated + XK_Cyrillic_je*: TKeySym = 0x000006A8 + XK_Serbian_je*: TKeySym = 0x000006A8 # deprecated + XK_Cyrillic_lje*: TKeySym = 0x000006A9 + XK_Serbian_lje*: TKeySym = 0x000006A9 # deprecated + XK_Cyrillic_nje*: TKeySym = 0x000006AA + XK_Serbian_nje*: TKeySym = 0x000006AA # deprecated + XK_Serbian_tshe*: TKeySym = 0x000006AB + XK_Macedonia_kje*: TKeySym = 0x000006AC + XK_Ukrainian_ghe_with_upturn*: TKeySym = 0x000006AD + XK_Byelorussian_shortu*: TKeySym = 0x000006AE + XK_Cyrillic_dzhe*: TKeySym = 0x000006AF + XK_Serbian_dze*: TKeySym = 0x000006AF # deprecated + XK_numerosign*: TKeySym = 0x000006B0 + XKc_Serbian_DJE*: TKeySym = 0x000006B1 + XKc_Macedonia_GJE*: TKeySym = 0x000006B2 + XKc_Cyrillic_IO*: TKeySym = 0x000006B3 + XKc_Ukrainian_IE*: TKeySym = 0x000006B4 + XKc_Ukranian_JE*: TKeySym = 0x000006B4 # deprecated + XKc_Macedonia_DSE*: TKeySym = 0x000006B5 + XKc_Ukrainian_I*: TKeySym = 0x000006B6 + XKc_Ukranian_I*: TKeySym = 0x000006B6 # deprecated + XKc_Ukrainian_YI*: TKeySym = 0x000006B7 + XKc_Ukranian_YI*: TKeySym = 0x000006B7 # deprecated + XKc_Cyrillic_JE*: TKeySym = 0x000006B8 + XKc_Serbian_JE*: TKeySym = 0x000006B8 # deprecated + XKc_Cyrillic_LJE*: TKeySym = 0x000006B9 + XKc_Serbian_LJE*: TKeySym = 0x000006B9 # deprecated + XKc_Cyrillic_NJE*: TKeySym = 0x000006BA + XKc_Serbian_NJE*: TKeySym = 0x000006BA # deprecated + XKc_Serbian_TSHE*: TKeySym = 0x000006BB + XKc_Macedonia_KJE*: TKeySym = 0x000006BC + XKc_Ukrainian_GHE_WITH_UPTURN*: TKeySym = 0x000006BD + XKc_Byelorussian_SHORTU*: TKeySym = 0x000006BE + XKc_Cyrillic_DZHE*: TKeySym = 0x000006BF + XKc_Serbian_DZE*: TKeySym = 0x000006BF # deprecated + XK_Cyrillic_yu*: TKeySym = 0x000006C0 + XK_Cyrillic_a*: TKeySym = 0x000006C1 + XK_Cyrillic_be*: TKeySym = 0x000006C2 + XK_Cyrillic_tse*: TKeySym = 0x000006C3 + XK_Cyrillic_de*: TKeySym = 0x000006C4 + XK_Cyrillic_ie*: TKeySym = 0x000006C5 + XK_Cyrillic_ef*: TKeySym = 0x000006C6 + XK_Cyrillic_ghe*: TKeySym = 0x000006C7 + XK_Cyrillic_ha*: TKeySym = 0x000006C8 + XK_Cyrillic_i*: TKeySym = 0x000006C9 + XK_Cyrillic_shorti*: TKeySym = 0x000006CA + XK_Cyrillic_ka*: TKeySym = 0x000006CB + XK_Cyrillic_el*: TKeySym = 0x000006CC + XK_Cyrillic_em*: TKeySym = 0x000006CD + XK_Cyrillic_en*: TKeySym = 0x000006CE + XK_Cyrillic_o*: TKeySym = 0x000006CF + XK_Cyrillic_pe*: TKeySym = 0x000006D0 + XK_Cyrillic_ya*: TKeySym = 0x000006D1 + XK_Cyrillic_er*: TKeySym = 0x000006D2 + XK_Cyrillic_es*: TKeySym = 0x000006D3 + XK_Cyrillic_te*: TKeySym = 0x000006D4 + XK_Cyrillic_u*: TKeySym = 0x000006D5 + XK_Cyrillic_zhe*: TKeySym = 0x000006D6 + XK_Cyrillic_ve*: TKeySym = 0x000006D7 + XK_Cyrillic_softsign*: TKeySym = 0x000006D8 + XK_Cyrillic_yeru*: TKeySym = 0x000006D9 + XK_Cyrillic_ze*: TKeySym = 0x000006DA + XK_Cyrillic_sha*: TKeySym = 0x000006DB + XK_Cyrillic_e*: TKeySym = 0x000006DC + XK_Cyrillic_shcha*: TKeySym = 0x000006DD + XK_Cyrillic_che*: TKeySym = 0x000006DE + XK_Cyrillic_hardsign*: TKeySym = 0x000006DF + XKc_Cyrillic_YU*: TKeySym = 0x000006E0 + XKc_Cyrillic_A*: TKeySym = 0x000006E1 + XKc_Cyrillic_BE*: TKeySym = 0x000006E2 + XKc_Cyrillic_TSE*: TKeySym = 0x000006E3 + XKc_Cyrillic_DE*: TKeySym = 0x000006E4 + XKc_Cyrillic_IE*: TKeySym = 0x000006E5 + XKc_Cyrillic_EF*: TKeySym = 0x000006E6 + XKc_Cyrillic_GHE*: TKeySym = 0x000006E7 + XKc_Cyrillic_HA*: TKeySym = 0x000006E8 + XKc_Cyrillic_I*: TKeySym = 0x000006E9 + XKc_Cyrillic_SHORTI*: TKeySym = 0x000006EA + XKc_Cyrillic_KA*: TKeySym = 0x000006EB + XKc_Cyrillic_EL*: TKeySym = 0x000006EC + XKc_Cyrillic_EM*: TKeySym = 0x000006ED + XKc_Cyrillic_EN*: TKeySym = 0x000006EE + XKc_Cyrillic_O*: TKeySym = 0x000006EF + XKc_Cyrillic_PE*: TKeySym = 0x000006F0 + XKc_Cyrillic_YA*: TKeySym = 0x000006F1 + XKc_Cyrillic_ER*: TKeySym = 0x000006F2 + XKc_Cyrillic_ES*: TKeySym = 0x000006F3 + XKc_Cyrillic_TE*: TKeySym = 0x000006F4 + XKc_Cyrillic_U*: TKeySym = 0x000006F5 + XKc_Cyrillic_ZHE*: TKeySym = 0x000006F6 + XKc_Cyrillic_VE*: TKeySym = 0x000006F7 + XKc_Cyrillic_SOFTSIGN*: TKeySym = 0x000006F8 + XKc_Cyrillic_YERU*: TKeySym = 0x000006F9 + XKc_Cyrillic_ZE*: TKeySym = 0x000006FA + XKc_Cyrillic_SHA*: TKeySym = 0x000006FB + XKc_Cyrillic_E*: TKeySym = 0x000006FC + XKc_Cyrillic_SHCHA*: TKeySym = 0x000006FD + XKc_Cyrillic_CHE*: TKeySym = 0x000006FE + XKc_Cyrillic_HARDSIGN*: TKeySym = 0x000006FF # XK_CYRILLIC #* # * Greek @@ -1067,81 +1068,81 @@ when defined(XK_CYRILLIC) or true: when defined(XK_GREEK) or true: const - XKc_Greek_ALPHAaccent* = 0x000007A1 - XKc_Greek_EPSILONaccent* = 0x000007A2 - XKc_Greek_ETAaccent* = 0x000007A3 - XKc_Greek_IOTAaccent* = 0x000007A4 - XKc_Greek_IOTAdieresis* = 0x000007A5 - XKc_Greek_IOTAdiaeresis* = XKc_Greek_IOTAdieresis # old typo - XKc_Greek_OMICRONaccent* = 0x000007A7 - XKc_Greek_UPSILONaccent* = 0x000007A8 - XKc_Greek_UPSILONdieresis* = 0x000007A9 - XKc_Greek_OMEGAaccent* = 0x000007AB - XK_Greek_accentdieresis* = 0x000007AE - XK_Greek_horizbar* = 0x000007AF - XK_Greek_alphaaccent* = 0x000007B1 - XK_Greek_epsilonaccent* = 0x000007B2 - XK_Greek_etaaccent* = 0x000007B3 - XK_Greek_iotaaccent* = 0x000007B4 - XK_Greek_iotadieresis* = 0x000007B5 - XK_Greek_iotaaccentdieresis* = 0x000007B6 - XK_Greek_omicronaccent* = 0x000007B7 - XK_Greek_upsilonaccent* = 0x000007B8 - XK_Greek_upsilondieresis* = 0x000007B9 - XK_Greek_upsilonaccentdieresis* = 0x000007BA - XK_Greek_omegaaccent* = 0x000007BB - XKc_Greek_ALPHA* = 0x000007C1 - XKc_Greek_BETA* = 0x000007C2 - XKc_Greek_GAMMA* = 0x000007C3 - XKc_Greek_DELTA* = 0x000007C4 - XKc_Greek_EPSILON* = 0x000007C5 - XKc_Greek_ZETA* = 0x000007C6 - XKc_Greek_ETA* = 0x000007C7 - XKc_Greek_THETA* = 0x000007C8 - XKc_Greek_IOTA* = 0x000007C9 - XKc_Greek_KAPPA* = 0x000007CA - XKc_Greek_LAMDA* = 0x000007CB - XKc_Greek_LAMBDA* = 0x000007CB - XKc_Greek_MU* = 0x000007CC - XKc_Greek_NU* = 0x000007CD - XKc_Greek_XI* = 0x000007CE - XKc_Greek_OMICRON* = 0x000007CF - XKc_Greek_PI* = 0x000007D0 - XKc_Greek_RHO* = 0x000007D1 - XKc_Greek_SIGMA* = 0x000007D2 - XKc_Greek_TAU* = 0x000007D4 - XKc_Greek_UPSILON* = 0x000007D5 - XKc_Greek_PHI* = 0x000007D6 - XKc_Greek_CHI* = 0x000007D7 - XKc_Greek_PSI* = 0x000007D8 - XKc_Greek_OMEGA* = 0x000007D9 - XK_Greek_alpha* = 0x000007E1 - XK_Greek_beta* = 0x000007E2 - XK_Greek_gamma* = 0x000007E3 - XK_Greek_delta* = 0x000007E4 - XK_Greek_epsilon* = 0x000007E5 - XK_Greek_zeta* = 0x000007E6 - XK_Greek_eta* = 0x000007E7 - XK_Greek_theta* = 0x000007E8 - XK_Greek_iota* = 0x000007E9 - XK_Greek_kappa* = 0x000007EA - XK_Greek_lamda* = 0x000007EB - XK_Greek_lambda* = 0x000007EB - XK_Greek_mu* = 0x000007EC - XK_Greek_nu* = 0x000007ED - XK_Greek_xi* = 0x000007EE - XK_Greek_omicron* = 0x000007EF - XK_Greek_pi* = 0x000007F0 - XK_Greek_rho* = 0x000007F1 - XK_Greek_sigma* = 0x000007F2 - XK_Greek_finalsmallsigma* = 0x000007F3 - XK_Greek_tau* = 0x000007F4 - XK_Greek_upsilon* = 0x000007F5 - XK_Greek_phi* = 0x000007F6 - XK_Greek_chi* = 0x000007F7 - XK_Greek_psi* = 0x000007F8 - XK_Greek_omega* = 0x000007F9 - XK_Greek_switch* = 0x0000FF7E # Alias for mode_switch + XKc_Greek_ALPHAaccent*: TKeySym = 0x000007A1 + XKc_Greek_EPSILONaccent*: TKeySym = 0x000007A2 + XKc_Greek_ETAaccent*: TKeySym = 0x000007A3 + XKc_Greek_IOTAaccent*: TKeySym = 0x000007A4 + XKc_Greek_IOTAdieresis*: TKeySym = 0x000007A5 + XKc_Greek_IOTAdiaeresis*: TKeySym = XKc_Greek_IOTAdieresis # old typo + XKc_Greek_OMICRONaccent*: TKeySym = 0x000007A7 + XKc_Greek_UPSILONaccent*: TKeySym = 0x000007A8 + XKc_Greek_UPSILONdieresis*: TKeySym = 0x000007A9 + XKc_Greek_OMEGAaccent*: TKeySym = 0x000007AB + XK_Greek_accentdieresis*: TKeySym = 0x000007AE + XK_Greek_horizbar*: TKeySym = 0x000007AF + XK_Greek_alphaaccent*: TKeySym = 0x000007B1 + XK_Greek_epsilonaccent*: TKeySym = 0x000007B2 + XK_Greek_etaaccent*: TKeySym = 0x000007B3 + XK_Greek_iotaaccent*: TKeySym = 0x000007B4 + XK_Greek_iotadieresis*: TKeySym = 0x000007B5 + XK_Greek_iotaaccentdieresis*: TKeySym = 0x000007B6 + XK_Greek_omicronaccent*: TKeySym = 0x000007B7 + XK_Greek_upsilonaccent*: TKeySym = 0x000007B8 + XK_Greek_upsilondieresis*: TKeySym = 0x000007B9 + XK_Greek_upsilonaccentdieresis*: TKeySym = 0x000007BA + XK_Greek_omegaaccent*: TKeySym = 0x000007BB + XKc_Greek_ALPHA*: TKeySym = 0x000007C1 + XKc_Greek_BETA*: TKeySym = 0x000007C2 + XKc_Greek_GAMMA*: TKeySym = 0x000007C3 + XKc_Greek_DELTA*: TKeySym = 0x000007C4 + XKc_Greek_EPSILON*: TKeySym = 0x000007C5 + XKc_Greek_ZETA*: TKeySym = 0x000007C6 + XKc_Greek_ETA*: TKeySym = 0x000007C7 + XKc_Greek_THETA*: TKeySym = 0x000007C8 + XKc_Greek_IOTA*: TKeySym = 0x000007C9 + XKc_Greek_KAPPA*: TKeySym = 0x000007CA + XKc_Greek_LAMDA*: TKeySym = 0x000007CB + XKc_Greek_LAMBDA*: TKeySym = 0x000007CB + XKc_Greek_MU*: TKeySym = 0x000007CC + XKc_Greek_NU*: TKeySym = 0x000007CD + XKc_Greek_XI*: TKeySym = 0x000007CE + XKc_Greek_OMICRON*: TKeySym = 0x000007CF + XKc_Greek_PI*: TKeySym = 0x000007D0 + XKc_Greek_RHO*: TKeySym = 0x000007D1 + XKc_Greek_SIGMA*: TKeySym = 0x000007D2 + XKc_Greek_TAU*: TKeySym = 0x000007D4 + XKc_Greek_UPSILON*: TKeySym = 0x000007D5 + XKc_Greek_PHI*: TKeySym = 0x000007D6 + XKc_Greek_CHI*: TKeySym = 0x000007D7 + XKc_Greek_PSI*: TKeySym = 0x000007D8 + XKc_Greek_OMEGA*: TKeySym = 0x000007D9 + XK_Greek_alpha*: TKeySym = 0x000007E1 + XK_Greek_beta*: TKeySym = 0x000007E2 + XK_Greek_gamma*: TKeySym = 0x000007E3 + XK_Greek_delta*: TKeySym = 0x000007E4 + XK_Greek_epsilon*: TKeySym = 0x000007E5 + XK_Greek_zeta*: TKeySym = 0x000007E6 + XK_Greek_eta*: TKeySym = 0x000007E7 + XK_Greek_theta*: TKeySym = 0x000007E8 + XK_Greek_iota*: TKeySym = 0x000007E9 + XK_Greek_kappa*: TKeySym = 0x000007EA + XK_Greek_lamda*: TKeySym = 0x000007EB + XK_Greek_lambda*: TKeySym = 0x000007EB + XK_Greek_mu*: TKeySym = 0x000007EC + XK_Greek_nu*: TKeySym = 0x000007ED + XK_Greek_xi*: TKeySym = 0x000007EE + XK_Greek_omicron*: TKeySym = 0x000007EF + XK_Greek_pi*: TKeySym = 0x000007F0 + XK_Greek_rho*: TKeySym = 0x000007F1 + XK_Greek_sigma*: TKeySym = 0x000007F2 + XK_Greek_finalsmallsigma*: TKeySym = 0x000007F3 + XK_Greek_tau*: TKeySym = 0x000007F4 + XK_Greek_upsilon*: TKeySym = 0x000007F5 + XK_Greek_phi*: TKeySym = 0x000007F6 + XK_Greek_chi*: TKeySym = 0x000007F7 + XK_Greek_psi*: TKeySym = 0x000007F8 + XK_Greek_omega*: TKeySym = 0x000007F9 + XK_Greek_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch # XK_GREEK #* # * Technical @@ -1150,55 +1151,55 @@ when defined(XK_GREEK) or true: when defined(XK_TECHNICAL) or true: const - XK_leftradical* = 0x000008A1 - XK_topleftradical* = 0x000008A2 - XK_horizconnector* = 0x000008A3 - XK_topintegral* = 0x000008A4 - XK_botintegral* = 0x000008A5 - XK_vertconnector* = 0x000008A6 - XK_topleftsqbracket* = 0x000008A7 - XK_botleftsqbracket* = 0x000008A8 - XK_toprightsqbracket* = 0x000008A9 - XK_botrightsqbracket* = 0x000008AA - XK_topleftparens* = 0x000008AB - XK_botleftparens* = 0x000008AC - XK_toprightparens* = 0x000008AD - XK_botrightparens* = 0x000008AE - XK_leftmiddlecurlybrace* = 0x000008AF - XK_rightmiddlecurlybrace* = 0x000008B0 - XK_topleftsummation* = 0x000008B1 - XK_botleftsummation* = 0x000008B2 - XK_topvertsummationconnector* = 0x000008B3 - XK_botvertsummationconnector* = 0x000008B4 - XK_toprightsummation* = 0x000008B5 - XK_botrightsummation* = 0x000008B6 - XK_rightmiddlesummation* = 0x000008B7 - XK_lessthanequal* = 0x000008BC - XK_notequal* = 0x000008BD - XK_greaterthanequal* = 0x000008BE - XK_integral* = 0x000008BF - XK_therefore* = 0x000008C0 - XK_variation* = 0x000008C1 - XK_infinity* = 0x000008C2 - XK_nabla* = 0x000008C5 - XK_approximate* = 0x000008C8 - XK_similarequal* = 0x000008C9 - XK_ifonlyif* = 0x000008CD - XK_implies* = 0x000008CE - XK_identical* = 0x000008CF - XK_radical* = 0x000008D6 - XK_includedin* = 0x000008DA - XK_includes* = 0x000008DB - XK_intersection* = 0x000008DC - XK_union* = 0x000008DD - XK_logicaland* = 0x000008DE - XK_logicalor* = 0x000008DF - XK_partialderivative* = 0x000008EF - XK_function* = 0x000008F6 - XK_leftarrow* = 0x000008FB - XK_uparrow* = 0x000008FC - XK_rightarrow* = 0x000008FD - XK_downarrow* = 0x000008FE + XK_leftradical*: TKeySym = 0x000008A1 + XK_topleftradical*: TKeySym = 0x000008A2 + XK_horizconnector*: TKeySym = 0x000008A3 + XK_topintegral*: TKeySym = 0x000008A4 + XK_botintegral*: TKeySym = 0x000008A5 + XK_vertconnector*: TKeySym = 0x000008A6 + XK_topleftsqbracket*: TKeySym = 0x000008A7 + XK_botleftsqbracket*: TKeySym = 0x000008A8 + XK_toprightsqbracket*: TKeySym = 0x000008A9 + XK_botrightsqbracket*: TKeySym = 0x000008AA + XK_topleftparens*: TKeySym = 0x000008AB + XK_botleftparens*: TKeySym = 0x000008AC + XK_toprightparens*: TKeySym = 0x000008AD + XK_botrightparens*: TKeySym = 0x000008AE + XK_leftmiddlecurlybrace*: TKeySym = 0x000008AF + XK_rightmiddlecurlybrace*: TKeySym = 0x000008B0 + XK_topleftsummation*: TKeySym = 0x000008B1 + XK_botleftsummation*: TKeySym = 0x000008B2 + XK_topvertsummationconnector*: TKeySym = 0x000008B3 + XK_botvertsummationconnector*: TKeySym = 0x000008B4 + XK_toprightsummation*: TKeySym = 0x000008B5 + XK_botrightsummation*: TKeySym = 0x000008B6 + XK_rightmiddlesummation*: TKeySym = 0x000008B7 + XK_lessthanequal*: TKeySym = 0x000008BC + XK_notequal*: TKeySym = 0x000008BD + XK_greaterthanequal*: TKeySym = 0x000008BE + XK_integral*: TKeySym = 0x000008BF + XK_therefore*: TKeySym = 0x000008C0 + XK_variation*: TKeySym = 0x000008C1 + XK_infinity*: TKeySym = 0x000008C2 + XK_nabla*: TKeySym = 0x000008C5 + XK_approximate*: TKeySym = 0x000008C8 + XK_similarequal*: TKeySym = 0x000008C9 + XK_ifonlyif*: TKeySym = 0x000008CD + XK_implies*: TKeySym = 0x000008CE + XK_identical*: TKeySym = 0x000008CF + XK_radical*: TKeySym = 0x000008D6 + XK_includedin*: TKeySym = 0x000008DA + XK_includes*: TKeySym = 0x000008DB + XK_intersection*: TKeySym = 0x000008DC + XK_union*: TKeySym = 0x000008DD + XK_logicaland*: TKeySym = 0x000008DE + XK_logicalor*: TKeySym = 0x000008DF + XK_partialderivative*: TKeySym = 0x000008EF + XK_function*: TKeySym = 0x000008F6 + XK_leftarrow*: TKeySym = 0x000008FB + XK_uparrow*: TKeySym = 0x000008FC + XK_rightarrow*: TKeySym = 0x000008FD + XK_downarrow*: TKeySym = 0x000008FE # XK_TECHNICAL #* # * Special @@ -1207,30 +1208,30 @@ when defined(XK_TECHNICAL) or true: when defined(XK_SPECIAL): const - XK_blank* = 0x000009DF - XK_soliddiamond* = 0x000009E0 - XK_checkerboard* = 0x000009E1 - XK_ht* = 0x000009E2 - XK_ff* = 0x000009E3 - XK_cr* = 0x000009E4 - XK_lf* = 0x000009E5 - XK_nl* = 0x000009E8 - XK_vt* = 0x000009E9 - XK_lowrightcorner* = 0x000009EA - XK_uprightcorner* = 0x000009EB - XK_upleftcorner* = 0x000009EC - XK_lowleftcorner* = 0x000009ED - XK_crossinglines* = 0x000009EE - XK_horizlinescan1* = 0x000009EF - XK_horizlinescan3* = 0x000009F0 - XK_horizlinescan5* = 0x000009F1 - XK_horizlinescan7* = 0x000009F2 - XK_horizlinescan9* = 0x000009F3 - XK_leftt* = 0x000009F4 - XK_rightt* = 0x000009F5 - XK_bott* = 0x000009F6 - XK_topt* = 0x000009F7 - XK_vertbar* = 0x000009F8 + XK_blank*: TKeySym = 0x000009DF + XK_soliddiamond*: TKeySym = 0x000009E0 + XK_checkerboard*: TKeySym = 0x000009E1 + XK_ht*: TKeySym = 0x000009E2 + XK_ff*: TKeySym = 0x000009E3 + XK_cr*: TKeySym = 0x000009E4 + XK_lf*: TKeySym = 0x000009E5 + XK_nl*: TKeySym = 0x000009E8 + XK_vt*: TKeySym = 0x000009E9 + XK_lowrightcorner*: TKeySym = 0x000009EA + XK_uprightcorner*: TKeySym = 0x000009EB + XK_upleftcorner*: TKeySym = 0x000009EC + XK_lowleftcorner*: TKeySym = 0x000009ED + XK_crossinglines*: TKeySym = 0x000009EE + XK_horizlinescan1*: TKeySym = 0x000009EF + XK_horizlinescan3*: TKeySym = 0x000009F0 + XK_horizlinescan5*: TKeySym = 0x000009F1 + XK_horizlinescan7*: TKeySym = 0x000009F2 + XK_horizlinescan9*: TKeySym = 0x000009F3 + XK_leftt*: TKeySym = 0x000009F4 + XK_rightt*: TKeySym = 0x000009F5 + XK_bott*: TKeySym = 0x000009F6 + XK_topt*: TKeySym = 0x000009F7 + XK_vertbar*: TKeySym = 0x000009F8 # XK_SPECIAL #* # * Publishing @@ -1239,89 +1240,89 @@ when defined(XK_SPECIAL): when defined(XK_PUBLISHING) or true: const - XK_emspace* = 0x00000AA1 - XK_enspace* = 0x00000AA2 - XK_em3space* = 0x00000AA3 - XK_em4space* = 0x00000AA4 - XK_digitspace* = 0x00000AA5 - XK_punctspace* = 0x00000AA6 - XK_thinspace* = 0x00000AA7 - XK_hairspace* = 0x00000AA8 - XK_emdash* = 0x00000AA9 - XK_endash* = 0x00000AAA - XK_signifblank* = 0x00000AAC - XK_ellipsis* = 0x00000AAE - XK_doubbaselinedot* = 0x00000AAF - XK_onethird* = 0x00000AB0 - XK_twothirds* = 0x00000AB1 - XK_onefifth* = 0x00000AB2 - XK_twofifths* = 0x00000AB3 - XK_threefifths* = 0x00000AB4 - XK_fourfifths* = 0x00000AB5 - XK_onesixth* = 0x00000AB6 - XK_fivesixths* = 0x00000AB7 - XK_careof* = 0x00000AB8 - XK_figdash* = 0x00000ABB - XK_leftanglebracket* = 0x00000ABC - XK_decimalpoint* = 0x00000ABD - XK_rightanglebracket* = 0x00000ABE - XK_marker* = 0x00000ABF - XK_oneeighth* = 0x00000AC3 - XK_threeeighths* = 0x00000AC4 - XK_fiveeighths* = 0x00000AC5 - XK_seveneighths* = 0x00000AC6 - XK_trademark* = 0x00000AC9 - XK_signaturemark* = 0x00000ACA - XK_trademarkincircle* = 0x00000ACB - XK_leftopentriangle* = 0x00000ACC - XK_rightopentriangle* = 0x00000ACD - XK_emopencircle* = 0x00000ACE - XK_emopenrectangle* = 0x00000ACF - XK_leftsinglequotemark* = 0x00000AD0 - XK_rightsinglequotemark* = 0x00000AD1 - XK_leftdoublequotemark* = 0x00000AD2 - XK_rightdoublequotemark* = 0x00000AD3 - XK_prescription* = 0x00000AD4 - XK_minutes* = 0x00000AD6 - XK_seconds* = 0x00000AD7 - XK_latincross* = 0x00000AD9 - XK_hexagram* = 0x00000ADA - XK_filledrectbullet* = 0x00000ADB - XK_filledlefttribullet* = 0x00000ADC - XK_filledrighttribullet* = 0x00000ADD - XK_emfilledcircle* = 0x00000ADE - XK_emfilledrect* = 0x00000ADF - XK_enopencircbullet* = 0x00000AE0 - XK_enopensquarebullet* = 0x00000AE1 - XK_openrectbullet* = 0x00000AE2 - XK_opentribulletup* = 0x00000AE3 - XK_opentribulletdown* = 0x00000AE4 - XK_openstar* = 0x00000AE5 - XK_enfilledcircbullet* = 0x00000AE6 - XK_enfilledsqbullet* = 0x00000AE7 - XK_filledtribulletup* = 0x00000AE8 - XK_filledtribulletdown* = 0x00000AE9 - XK_leftpointer* = 0x00000AEA - XK_rightpointer* = 0x00000AEB - XK_club* = 0x00000AEC - XK_diamond* = 0x00000AED - XK_heart* = 0x00000AEE - XK_maltesecross* = 0x00000AF0 - XK_dagger* = 0x00000AF1 - XK_doubledagger* = 0x00000AF2 - XK_checkmark* = 0x00000AF3 - XK_ballotcross* = 0x00000AF4 - XK_musicalsharp* = 0x00000AF5 - XK_musicalflat* = 0x00000AF6 - XK_malesymbol* = 0x00000AF7 - XK_femalesymbol* = 0x00000AF8 - XK_telephone* = 0x00000AF9 - XK_telephonerecorder* = 0x00000AFA - XK_phonographcopyright* = 0x00000AFB - XK_caret* = 0x00000AFC - XK_singlelowquotemark* = 0x00000AFD - XK_doublelowquotemark* = 0x00000AFE - XK_cursor* = 0x00000AFF + XK_emspace*: TKeySym = 0x00000AA1 + XK_enspace*: TKeySym = 0x00000AA2 + XK_em3space*: TKeySym = 0x00000AA3 + XK_em4space*: TKeySym = 0x00000AA4 + XK_digitspace*: TKeySym = 0x00000AA5 + XK_punctspace*: TKeySym = 0x00000AA6 + XK_thinspace*: TKeySym = 0x00000AA7 + XK_hairspace*: TKeySym = 0x00000AA8 + XK_emdash*: TKeySym = 0x00000AA9 + XK_endash*: TKeySym = 0x00000AAA + XK_signifblank*: TKeySym = 0x00000AAC + XK_ellipsis*: TKeySym = 0x00000AAE + XK_doubbaselinedot*: TKeySym = 0x00000AAF + XK_onethird*: TKeySym = 0x00000AB0 + XK_twothirds*: TKeySym = 0x00000AB1 + XK_onefifth*: TKeySym = 0x00000AB2 + XK_twofifths*: TKeySym = 0x00000AB3 + XK_threefifths*: TKeySym = 0x00000AB4 + XK_fourfifths*: TKeySym = 0x00000AB5 + XK_onesixth*: TKeySym = 0x00000AB6 + XK_fivesixths*: TKeySym = 0x00000AB7 + XK_careof*: TKeySym = 0x00000AB8 + XK_figdash*: TKeySym = 0x00000ABB + XK_leftanglebracket*: TKeySym = 0x00000ABC + XK_decimalpoint*: TKeySym = 0x00000ABD + XK_rightanglebracket*: TKeySym = 0x00000ABE + XK_marker*: TKeySym = 0x00000ABF + XK_oneeighth*: TKeySym = 0x00000AC3 + XK_threeeighths*: TKeySym = 0x00000AC4 + XK_fiveeighths*: TKeySym = 0x00000AC5 + XK_seveneighths*: TKeySym = 0x00000AC6 + XK_trademark*: TKeySym = 0x00000AC9 + XK_signaturemark*: TKeySym = 0x00000ACA + XK_trademarkincircle*: TKeySym = 0x00000ACB + XK_leftopentriangle*: TKeySym = 0x00000ACC + XK_rightopentriangle*: TKeySym = 0x00000ACD + XK_emopencircle*: TKeySym = 0x00000ACE + XK_emopenrectangle*: TKeySym = 0x00000ACF + XK_leftsinglequotemark*: TKeySym = 0x00000AD0 + XK_rightsinglequotemark*: TKeySym = 0x00000AD1 + XK_leftdoublequotemark*: TKeySym = 0x00000AD2 + XK_rightdoublequotemark*: TKeySym = 0x00000AD3 + XK_prescription*: TKeySym = 0x00000AD4 + XK_minutes*: TKeySym = 0x00000AD6 + XK_seconds*: TKeySym = 0x00000AD7 + XK_latincross*: TKeySym = 0x00000AD9 + XK_hexagram*: TKeySym = 0x00000ADA + XK_filledrectbullet*: TKeySym = 0x00000ADB + XK_filledlefttribullet*: TKeySym = 0x00000ADC + XK_filledrighttribullet*: TKeySym = 0x00000ADD + XK_emfilledcircle*: TKeySym = 0x00000ADE + XK_emfilledrect*: TKeySym = 0x00000ADF + XK_enopencircbullet*: TKeySym = 0x00000AE0 + XK_enopensquarebullet*: TKeySym = 0x00000AE1 + XK_openrectbullet*: TKeySym = 0x00000AE2 + XK_opentribulletup*: TKeySym = 0x00000AE3 + XK_opentribulletdown*: TKeySym = 0x00000AE4 + XK_openstar*: TKeySym = 0x00000AE5 + XK_enfilledcircbullet*: TKeySym = 0x00000AE6 + XK_enfilledsqbullet*: TKeySym = 0x00000AE7 + XK_filledtribulletup*: TKeySym = 0x00000AE8 + XK_filledtribulletdown*: TKeySym = 0x00000AE9 + XK_leftpointer*: TKeySym = 0x00000AEA + XK_rightpointer*: TKeySym = 0x00000AEB + XK_club*: TKeySym = 0x00000AEC + XK_diamond*: TKeySym = 0x00000AED + XK_heart*: TKeySym = 0x00000AEE + XK_maltesecross*: TKeySym = 0x00000AF0 + XK_dagger*: TKeySym = 0x00000AF1 + XK_doubledagger*: TKeySym = 0x00000AF2 + XK_checkmark*: TKeySym = 0x00000AF3 + XK_ballotcross*: TKeySym = 0x00000AF4 + XK_musicalsharp*: TKeySym = 0x00000AF5 + XK_musicalflat*: TKeySym = 0x00000AF6 + XK_malesymbol*: TKeySym = 0x00000AF7 + XK_femalesymbol*: TKeySym = 0x00000AF8 + XK_telephone*: TKeySym = 0x00000AF9 + XK_telephonerecorder*: TKeySym = 0x00000AFA + XK_phonographcopyright*: TKeySym = 0x00000AFB + XK_caret*: TKeySym = 0x00000AFC + XK_singlelowquotemark*: TKeySym = 0x00000AFD + XK_doublelowquotemark*: TKeySym = 0x00000AFE + XK_cursor*: TKeySym = 0x00000AFF # XK_PUBLISHING #* # * APL @@ -1330,25 +1331,25 @@ when defined(XK_PUBLISHING) or true: when defined(XK_APL) or true: const - XK_leftcaret* = 0x00000BA3 - XK_rightcaret* = 0x00000BA6 - XK_downcaret* = 0x00000BA8 - XK_upcaret* = 0x00000BA9 - XK_overbar* = 0x00000BC0 - XK_downtack* = 0x00000BC2 - XK_upshoe* = 0x00000BC3 - XK_downstile* = 0x00000BC4 - XK_underbar* = 0x00000BC6 - XK_jot* = 0x00000BCA - XK_quad* = 0x00000BCC - XK_uptack* = 0x00000BCE - XK_circle* = 0x00000BCF - XK_upstile* = 0x00000BD3 - XK_downshoe* = 0x00000BD6 - XK_rightshoe* = 0x00000BD8 - XK_leftshoe* = 0x00000BDA - XK_lefttack* = 0x00000BDC - XK_righttack* = 0x00000BFC + XK_leftcaret*: TKeySym = 0x00000BA3 + XK_rightcaret*: TKeySym = 0x00000BA6 + XK_downcaret*: TKeySym = 0x00000BA8 + XK_upcaret*: TKeySym = 0x00000BA9 + XK_overbar*: TKeySym = 0x00000BC0 + XK_downtack*: TKeySym = 0x00000BC2 + XK_upshoe*: TKeySym = 0x00000BC3 + XK_downstile*: TKeySym = 0x00000BC4 + XK_underbar*: TKeySym = 0x00000BC6 + XK_jot*: TKeySym = 0x00000BCA + XK_quad*: TKeySym = 0x00000BCC + XK_uptack*: TKeySym = 0x00000BCE + XK_circle*: TKeySym = 0x00000BCF + XK_upstile*: TKeySym = 0x00000BD3 + XK_downshoe*: TKeySym = 0x00000BD6 + XK_rightshoe*: TKeySym = 0x00000BD8 + XK_leftshoe*: TKeySym = 0x00000BDA + XK_lefttack*: TKeySym = 0x00000BDC + XK_righttack*: TKeySym = 0x00000BFC # XK_APL #* # * Hebrew @@ -1357,46 +1358,46 @@ when defined(XK_APL) or true: when defined(XK_HEBREW) or true: const - XK_hebrew_doublelowline* = 0x00000CDF - XK_hebrew_aleph* = 0x00000CE0 - XK_hebrew_bet* = 0x00000CE1 - XK_hebrew_beth* = 0x00000CE1 # deprecated - XK_hebrew_gimel* = 0x00000CE2 - XK_hebrew_gimmel* = 0x00000CE2 # deprecated - XK_hebrew_dalet* = 0x00000CE3 - XK_hebrew_daleth* = 0x00000CE3 # deprecated - XK_hebrew_he* = 0x00000CE4 - XK_hebrew_waw* = 0x00000CE5 - XK_hebrew_zain* = 0x00000CE6 - XK_hebrew_zayin* = 0x00000CE6 # deprecated - XK_hebrew_chet* = 0x00000CE7 - XK_hebrew_het* = 0x00000CE7 # deprecated - XK_hebrew_tet* = 0x00000CE8 - XK_hebrew_teth* = 0x00000CE8 # deprecated - XK_hebrew_yod* = 0x00000CE9 - XK_hebrew_finalkaph* = 0x00000CEA - XK_hebrew_kaph* = 0x00000CEB - XK_hebrew_lamed* = 0x00000CEC - XK_hebrew_finalmem* = 0x00000CED - XK_hebrew_mem* = 0x00000CEE - XK_hebrew_finalnun* = 0x00000CEF - XK_hebrew_nun* = 0x00000CF0 - XK_hebrew_samech* = 0x00000CF1 - XK_hebrew_samekh* = 0x00000CF1 # deprecated - XK_hebrew_ayin* = 0x00000CF2 - XK_hebrew_finalpe* = 0x00000CF3 - XK_hebrew_pe* = 0x00000CF4 - XK_hebrew_finalzade* = 0x00000CF5 - XK_hebrew_finalzadi* = 0x00000CF5 # deprecated - XK_hebrew_zade* = 0x00000CF6 - XK_hebrew_zadi* = 0x00000CF6 # deprecated - XK_hebrew_qoph* = 0x00000CF7 - XK_hebrew_kuf* = 0x00000CF7 # deprecated - XK_hebrew_resh* = 0x00000CF8 - XK_hebrew_shin* = 0x00000CF9 - XK_hebrew_taw* = 0x00000CFA - XK_hebrew_taf* = 0x00000CFA # deprecated - XK_Hebrew_switch* = 0x0000FF7E # Alias for mode_switch + XK_hebrew_doublelowline*: TKeySym = 0x00000CDF + XK_hebrew_aleph*: TKeySym = 0x00000CE0 + XK_hebrew_bet*: TKeySym = 0x00000CE1 + XK_hebrew_beth*: TKeySym = 0x00000CE1 # deprecated + XK_hebrew_gimel*: TKeySym = 0x00000CE2 + XK_hebrew_gimmel*: TKeySym = 0x00000CE2 # deprecated + XK_hebrew_dalet*: TKeySym = 0x00000CE3 + XK_hebrew_daleth*: TKeySym = 0x00000CE3 # deprecated + XK_hebrew_he*: TKeySym = 0x00000CE4 + XK_hebrew_waw*: TKeySym = 0x00000CE5 + XK_hebrew_zain*: TKeySym = 0x00000CE6 + XK_hebrew_zayin*: TKeySym = 0x00000CE6 # deprecated + XK_hebrew_chet*: TKeySym = 0x00000CE7 + XK_hebrew_het*: TKeySym = 0x00000CE7 # deprecated + XK_hebrew_tet*: TKeySym = 0x00000CE8 + XK_hebrew_teth*: TKeySym = 0x00000CE8 # deprecated + XK_hebrew_yod*: TKeySym = 0x00000CE9 + XK_hebrew_finalkaph*: TKeySym = 0x00000CEA + XK_hebrew_kaph*: TKeySym = 0x00000CEB + XK_hebrew_lamed*: TKeySym = 0x00000CEC + XK_hebrew_finalmem*: TKeySym = 0x00000CED + XK_hebrew_mem*: TKeySym = 0x00000CEE + XK_hebrew_finalnun*: TKeySym = 0x00000CEF + XK_hebrew_nun*: TKeySym = 0x00000CF0 + XK_hebrew_samech*: TKeySym = 0x00000CF1 + XK_hebrew_samekh*: TKeySym = 0x00000CF1 # deprecated + XK_hebrew_ayin*: TKeySym = 0x00000CF2 + XK_hebrew_finalpe*: TKeySym = 0x00000CF3 + XK_hebrew_pe*: TKeySym = 0x00000CF4 + XK_hebrew_finalzade*: TKeySym = 0x00000CF5 + XK_hebrew_finalzadi*: TKeySym = 0x00000CF5 # deprecated + XK_hebrew_zade*: TKeySym = 0x00000CF6 + XK_hebrew_zadi*: TKeySym = 0x00000CF6 # deprecated + XK_hebrew_qoph*: TKeySym = 0x00000CF7 + XK_hebrew_kuf*: TKeySym = 0x00000CF7 # deprecated + XK_hebrew_resh*: TKeySym = 0x00000CF8 + XK_hebrew_shin*: TKeySym = 0x00000CF9 + XK_hebrew_taw*: TKeySym = 0x00000CFA + XK_hebrew_taf*: TKeySym = 0x00000CFA # deprecated + XK_Hebrew_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch # XK_HEBREW #* # * Thai @@ -1405,90 +1406,90 @@ when defined(XK_HEBREW) or true: when defined(XK_THAI) or true: const - XK_Thai_kokai* = 0x00000DA1 - XK_Thai_khokhai* = 0x00000DA2 - XK_Thai_khokhuat* = 0x00000DA3 - XK_Thai_khokhwai* = 0x00000DA4 - XK_Thai_khokhon* = 0x00000DA5 - XK_Thai_khorakhang* = 0x00000DA6 - XK_Thai_ngongu* = 0x00000DA7 - XK_Thai_chochan* = 0x00000DA8 - XK_Thai_choching* = 0x00000DA9 - XK_Thai_chochang* = 0x00000DAA - XK_Thai_soso* = 0x00000DAB - XK_Thai_chochoe* = 0x00000DAC - XK_Thai_yoying* = 0x00000DAD - XK_Thai_dochada* = 0x00000DAE - XK_Thai_topatak* = 0x00000DAF - XK_Thai_thothan* = 0x00000DB0 - XK_Thai_thonangmontho* = 0x00000DB1 - XK_Thai_thophuthao* = 0x00000DB2 - XK_Thai_nonen* = 0x00000DB3 - XK_Thai_dodek* = 0x00000DB4 - XK_Thai_totao* = 0x00000DB5 - XK_Thai_thothung* = 0x00000DB6 - XK_Thai_thothahan* = 0x00000DB7 - XK_Thai_thothong* = 0x00000DB8 - XK_Thai_nonu* = 0x00000DB9 - XK_Thai_bobaimai* = 0x00000DBA - XK_Thai_popla* = 0x00000DBB - XK_Thai_phophung* = 0x00000DBC - XK_Thai_fofa* = 0x00000DBD - XK_Thai_phophan* = 0x00000DBE - XK_Thai_fofan* = 0x00000DBF - XK_Thai_phosamphao* = 0x00000DC0 - XK_Thai_moma* = 0x00000DC1 - XK_Thai_yoyak* = 0x00000DC2 - XK_Thai_rorua* = 0x00000DC3 - XK_Thai_ru* = 0x00000DC4 - XK_Thai_loling* = 0x00000DC5 - XK_Thai_lu* = 0x00000DC6 - XK_Thai_wowaen* = 0x00000DC7 - XK_Thai_sosala* = 0x00000DC8 - XK_Thai_sorusi* = 0x00000DC9 - XK_Thai_sosua* = 0x00000DCA - XK_Thai_hohip* = 0x00000DCB - XK_Thai_lochula* = 0x00000DCC - XK_Thai_oang* = 0x00000DCD - XK_Thai_honokhuk* = 0x00000DCE - XK_Thai_paiyannoi* = 0x00000DCF - XK_Thai_saraa* = 0x00000DD0 - XK_Thai_maihanakat* = 0x00000DD1 - XK_Thai_saraaa* = 0x00000DD2 - XK_Thai_saraam* = 0x00000DD3 - XK_Thai_sarai* = 0x00000DD4 - XK_Thai_saraii* = 0x00000DD5 - XK_Thai_saraue* = 0x00000DD6 - XK_Thai_sarauee* = 0x00000DD7 - XK_Thai_sarau* = 0x00000DD8 - XK_Thai_sarauu* = 0x00000DD9 - XK_Thai_phinthu* = 0x00000DDA - XK_Thai_maihanakat_maitho* = 0x00000DDE - XK_Thai_baht* = 0x00000DDF - XK_Thai_sarae* = 0x00000DE0 - XK_Thai_saraae* = 0x00000DE1 - XK_Thai_sarao* = 0x00000DE2 - XK_Thai_saraaimaimuan* = 0x00000DE3 - XK_Thai_saraaimaimalai* = 0x00000DE4 - XK_Thai_lakkhangyao* = 0x00000DE5 - XK_Thai_maiyamok* = 0x00000DE6 - XK_Thai_maitaikhu* = 0x00000DE7 - XK_Thai_maiek* = 0x00000DE8 - XK_Thai_maitho* = 0x00000DE9 - XK_Thai_maitri* = 0x00000DEA - XK_Thai_maichattawa* = 0x00000DEB - XK_Thai_thanthakhat* = 0x00000DEC - XK_Thai_nikhahit* = 0x00000DED - XK_Thai_leksun* = 0x00000DF0 - XK_Thai_leknung* = 0x00000DF1 - XK_Thai_leksong* = 0x00000DF2 - XK_Thai_leksam* = 0x00000DF3 - XK_Thai_leksi* = 0x00000DF4 - XK_Thai_lekha* = 0x00000DF5 - XK_Thai_lekhok* = 0x00000DF6 - XK_Thai_lekchet* = 0x00000DF7 - XK_Thai_lekpaet* = 0x00000DF8 - XK_Thai_lekkao* = 0x00000DF9 + XK_Thai_kokai*: TKeySym = 0x00000DA1 + XK_Thai_khokhai*: TKeySym = 0x00000DA2 + XK_Thai_khokhuat*: TKeySym = 0x00000DA3 + XK_Thai_khokhwai*: TKeySym = 0x00000DA4 + XK_Thai_khokhon*: TKeySym = 0x00000DA5 + XK_Thai_khorakhang*: TKeySym = 0x00000DA6 + XK_Thai_ngongu*: TKeySym = 0x00000DA7 + XK_Thai_chochan*: TKeySym = 0x00000DA8 + XK_Thai_choching*: TKeySym = 0x00000DA9 + XK_Thai_chochang*: TKeySym = 0x00000DAA + XK_Thai_soso*: TKeySym = 0x00000DAB + XK_Thai_chochoe*: TKeySym = 0x00000DAC + XK_Thai_yoying*: TKeySym = 0x00000DAD + XK_Thai_dochada*: TKeySym = 0x00000DAE + XK_Thai_topatak*: TKeySym = 0x00000DAF + XK_Thai_thothan*: TKeySym = 0x00000DB0 + XK_Thai_thonangmontho*: TKeySym = 0x00000DB1 + XK_Thai_thophuthao*: TKeySym = 0x00000DB2 + XK_Thai_nonen*: TKeySym = 0x00000DB3 + XK_Thai_dodek*: TKeySym = 0x00000DB4 + XK_Thai_totao*: TKeySym = 0x00000DB5 + XK_Thai_thothung*: TKeySym = 0x00000DB6 + XK_Thai_thothahan*: TKeySym = 0x00000DB7 + XK_Thai_thothong*: TKeySym = 0x00000DB8 + XK_Thai_nonu*: TKeySym = 0x00000DB9 + XK_Thai_bobaimai*: TKeySym = 0x00000DBA + XK_Thai_popla*: TKeySym = 0x00000DBB + XK_Thai_phophung*: TKeySym = 0x00000DBC + XK_Thai_fofa*: TKeySym = 0x00000DBD + XK_Thai_phophan*: TKeySym = 0x00000DBE + XK_Thai_fofan*: TKeySym = 0x00000DBF + XK_Thai_phosamphao*: TKeySym = 0x00000DC0 + XK_Thai_moma*: TKeySym = 0x00000DC1 + XK_Thai_yoyak*: TKeySym = 0x00000DC2 + XK_Thai_rorua*: TKeySym = 0x00000DC3 + XK_Thai_ru*: TKeySym = 0x00000DC4 + XK_Thai_loling*: TKeySym = 0x00000DC5 + XK_Thai_lu*: TKeySym = 0x00000DC6 + XK_Thai_wowaen*: TKeySym = 0x00000DC7 + XK_Thai_sosala*: TKeySym = 0x00000DC8 + XK_Thai_sorusi*: TKeySym = 0x00000DC9 + XK_Thai_sosua*: TKeySym = 0x00000DCA + XK_Thai_hohip*: TKeySym = 0x00000DCB + XK_Thai_lochula*: TKeySym = 0x00000DCC + XK_Thai_oang*: TKeySym = 0x00000DCD + XK_Thai_honokhuk*: TKeySym = 0x00000DCE + XK_Thai_paiyannoi*: TKeySym = 0x00000DCF + XK_Thai_saraa*: TKeySym = 0x00000DD0 + XK_Thai_maihanakat*: TKeySym = 0x00000DD1 + XK_Thai_saraaa*: TKeySym = 0x00000DD2 + XK_Thai_saraam*: TKeySym = 0x00000DD3 + XK_Thai_sarai*: TKeySym = 0x00000DD4 + XK_Thai_saraii*: TKeySym = 0x00000DD5 + XK_Thai_saraue*: TKeySym = 0x00000DD6 + XK_Thai_sarauee*: TKeySym = 0x00000DD7 + XK_Thai_sarau*: TKeySym = 0x00000DD8 + XK_Thai_sarauu*: TKeySym = 0x00000DD9 + XK_Thai_phinthu*: TKeySym = 0x00000DDA + XK_Thai_maihanakat_maitho*: TKeySym = 0x00000DDE + XK_Thai_baht*: TKeySym = 0x00000DDF + XK_Thai_sarae*: TKeySym = 0x00000DE0 + XK_Thai_saraae*: TKeySym = 0x00000DE1 + XK_Thai_sarao*: TKeySym = 0x00000DE2 + XK_Thai_saraaimaimuan*: TKeySym = 0x00000DE3 + XK_Thai_saraaimaimalai*: TKeySym = 0x00000DE4 + XK_Thai_lakkhangyao*: TKeySym = 0x00000DE5 + XK_Thai_maiyamok*: TKeySym = 0x00000DE6 + XK_Thai_maitaikhu*: TKeySym = 0x00000DE7 + XK_Thai_maiek*: TKeySym = 0x00000DE8 + XK_Thai_maitho*: TKeySym = 0x00000DE9 + XK_Thai_maitri*: TKeySym = 0x00000DEA + XK_Thai_maichattawa*: TKeySym = 0x00000DEB + XK_Thai_thanthakhat*: TKeySym = 0x00000DEC + XK_Thai_nikhahit*: TKeySym = 0x00000DED + XK_Thai_leksun*: TKeySym = 0x00000DF0 + XK_Thai_leknung*: TKeySym = 0x00000DF1 + XK_Thai_leksong*: TKeySym = 0x00000DF2 + XK_Thai_leksam*: TKeySym = 0x00000DF3 + XK_Thai_leksi*: TKeySym = 0x00000DF4 + XK_Thai_lekha*: TKeySym = 0x00000DF5 + XK_Thai_lekhok*: TKeySym = 0x00000DF6 + XK_Thai_lekchet*: TKeySym = 0x00000DF7 + XK_Thai_lekpaet*: TKeySym = 0x00000DF8 + XK_Thai_lekkao*: TKeySym = 0x00000DF9 # XK_THAI #* # * Korean @@ -1497,114 +1498,114 @@ when defined(XK_THAI) or true: when defined(XK_KOREAN) or true: const - XK_Hangul* = 0x0000FF31 # Hangul start/stop(toggle) - XK_Hangul_Start* = 0x0000FF32 # Hangul start - XK_Hangul_End* = 0x0000FF33 # Hangul end, English start - XK_Hangul_Hanja* = 0x0000FF34 # Start Hangul->Hanja Conversion - XK_Hangul_Jamo* = 0x0000FF35 # Hangul Jamo mode - XK_Hangul_Romaja* = 0x0000FF36 # Hangul Romaja mode - XK_Hangul_Codeinput* = 0x0000FF37 # Hangul code input mode - XK_Hangul_Jeonja* = 0x0000FF38 # Jeonja mode - XK_Hangul_Banja* = 0x0000FF39 # Banja mode - XK_Hangul_PreHanja* = 0x0000FF3A # Pre Hanja conversion - XK_Hangul_PostHanja* = 0x0000FF3B # Post Hanja conversion - XK_Hangul_SingleCandidate* = 0x0000FF3C # Single candidate - XK_Hangul_MultipleCandidate* = 0x0000FF3D # Multiple candidate - XK_Hangul_PreviousCandidate* = 0x0000FF3E # Previous candidate - XK_Hangul_Special* = 0x0000FF3F # Special symbols - XK_Hangul_switch* = 0x0000FF7E # Alias for mode_switch + XK_Hangul*: TKeySym = 0x0000FF31 # Hangul start/stop(toggle) + XK_Hangul_Start*: TKeySym = 0x0000FF32 # Hangul start + XK_Hangul_End*: TKeySym = 0x0000FF33 # Hangul end, English start + XK_Hangul_Hanja*: TKeySym = 0x0000FF34 # Start Hangul->Hanja Conversion + XK_Hangul_Jamo*: TKeySym = 0x0000FF35 # Hangul Jamo mode + XK_Hangul_Romaja*: TKeySym = 0x0000FF36 # Hangul Romaja mode + XK_Hangul_Codeinput*: TKeySym = 0x0000FF37 # Hangul code input mode + XK_Hangul_Jeonja*: TKeySym = 0x0000FF38 # Jeonja mode + XK_Hangul_Banja*: TKeySym = 0x0000FF39 # Banja mode + XK_Hangul_PreHanja*: TKeySym = 0x0000FF3A # Pre Hanja conversion + XK_Hangul_PostHanja*: TKeySym = 0x0000FF3B # Post Hanja conversion + XK_Hangul_SingleCandidate*: TKeySym = 0x0000FF3C # Single candidate + XK_Hangul_MultipleCandidate*: TKeySym = 0x0000FF3D # Multiple candidate + XK_Hangul_PreviousCandidate*: TKeySym = 0x0000FF3E # Previous candidate + XK_Hangul_Special*: TKeySym = 0x0000FF3F # Special symbols + XK_Hangul_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch \ # Hangul Consonant Characters - XK_Hangul_Kiyeog* = 0x00000EA1 - XK_Hangul_SsangKiyeog* = 0x00000EA2 - XK_Hangul_KiyeogSios* = 0x00000EA3 - XK_Hangul_Nieun* = 0x00000EA4 - XK_Hangul_NieunJieuj* = 0x00000EA5 - XK_Hangul_NieunHieuh* = 0x00000EA6 - XK_Hangul_Dikeud* = 0x00000EA7 - XK_Hangul_SsangDikeud* = 0x00000EA8 - XK_Hangul_Rieul* = 0x00000EA9 - XK_Hangul_RieulKiyeog* = 0x00000EAA - XK_Hangul_RieulMieum* = 0x00000EAB - XK_Hangul_RieulPieub* = 0x00000EAC - XK_Hangul_RieulSios* = 0x00000EAD - XK_Hangul_RieulTieut* = 0x00000EAE - XK_Hangul_RieulPhieuf* = 0x00000EAF - XK_Hangul_RieulHieuh* = 0x00000EB0 - XK_Hangul_Mieum* = 0x00000EB1 - XK_Hangul_Pieub* = 0x00000EB2 - XK_Hangul_SsangPieub* = 0x00000EB3 - XK_Hangul_PieubSios* = 0x00000EB4 - XK_Hangul_Sios* = 0x00000EB5 - XK_Hangul_SsangSios* = 0x00000EB6 - XK_Hangul_Ieung* = 0x00000EB7 - XK_Hangul_Jieuj* = 0x00000EB8 - XK_Hangul_SsangJieuj* = 0x00000EB9 - XK_Hangul_Cieuc* = 0x00000EBA - XK_Hangul_Khieuq* = 0x00000EBB - XK_Hangul_Tieut* = 0x00000EBC - XK_Hangul_Phieuf* = 0x00000EBD - XK_Hangul_Hieuh* = 0x00000EBE # Hangul Vowel Characters - XK_Hangul_A* = 0x00000EBF - XK_Hangul_AE* = 0x00000EC0 - XK_Hangul_YA* = 0x00000EC1 - XK_Hangul_YAE* = 0x00000EC2 - XK_Hangul_EO* = 0x00000EC3 - XK_Hangul_E* = 0x00000EC4 - XK_Hangul_YEO* = 0x00000EC5 - XK_Hangul_YE* = 0x00000EC6 - XK_Hangul_O* = 0x00000EC7 - XK_Hangul_WA* = 0x00000EC8 - XK_Hangul_WAE* = 0x00000EC9 - XK_Hangul_OE* = 0x00000ECA - XK_Hangul_YO* = 0x00000ECB - XK_Hangul_U* = 0x00000ECC - XK_Hangul_WEO* = 0x00000ECD - XK_Hangul_WE* = 0x00000ECE - XK_Hangul_WI* = 0x00000ECF - XK_Hangul_YU* = 0x00000ED0 - XK_Hangul_EU* = 0x00000ED1 - XK_Hangul_YI* = 0x00000ED2 - XK_Hangul_I* = 0x00000ED3 # Hangul syllable-final (JongSeong) Characters - XK_Hangul_J_Kiyeog* = 0x00000ED4 - XK_Hangul_J_SsangKiyeog* = 0x00000ED5 - XK_Hangul_J_KiyeogSios* = 0x00000ED6 - XK_Hangul_J_Nieun* = 0x00000ED7 - XK_Hangul_J_NieunJieuj* = 0x00000ED8 - XK_Hangul_J_NieunHieuh* = 0x00000ED9 - XK_Hangul_J_Dikeud* = 0x00000EDA - XK_Hangul_J_Rieul* = 0x00000EDB - XK_Hangul_J_RieulKiyeog* = 0x00000EDC - XK_Hangul_J_RieulMieum* = 0x00000EDD - XK_Hangul_J_RieulPieub* = 0x00000EDE - XK_Hangul_J_RieulSios* = 0x00000EDF - XK_Hangul_J_RieulTieut* = 0x00000EE0 - XK_Hangul_J_RieulPhieuf* = 0x00000EE1 - XK_Hangul_J_RieulHieuh* = 0x00000EE2 - XK_Hangul_J_Mieum* = 0x00000EE3 - XK_Hangul_J_Pieub* = 0x00000EE4 - XK_Hangul_J_PieubSios* = 0x00000EE5 - XK_Hangul_J_Sios* = 0x00000EE6 - XK_Hangul_J_SsangSios* = 0x00000EE7 - XK_Hangul_J_Ieung* = 0x00000EE8 - XK_Hangul_J_Jieuj* = 0x00000EE9 - XK_Hangul_J_Cieuc* = 0x00000EEA - XK_Hangul_J_Khieuq* = 0x00000EEB - XK_Hangul_J_Tieut* = 0x00000EEC - XK_Hangul_J_Phieuf* = 0x00000EED - XK_Hangul_J_Hieuh* = 0x00000EEE # Ancient Hangul Consonant Characters - XK_Hangul_RieulYeorinHieuh* = 0x00000EEF - XK_Hangul_SunkyeongeumMieum* = 0x00000EF0 - XK_Hangul_SunkyeongeumPieub* = 0x00000EF1 - XK_Hangul_PanSios* = 0x00000EF2 - XK_Hangul_KkogjiDalrinIeung* = 0x00000EF3 - XK_Hangul_SunkyeongeumPhieuf* = 0x00000EF4 - XK_Hangul_YeorinHieuh* = 0x00000EF5 # Ancient Hangul Vowel Characters - XK_Hangul_AraeA* = 0x00000EF6 - XK_Hangul_AraeAE* = 0x00000EF7 # Ancient Hangul syllable-final (JongSeong) Characters - XK_Hangul_J_PanSios* = 0x00000EF8 - XK_Hangul_J_KkogjiDalrinIeung* = 0x00000EF9 - XK_Hangul_J_YeorinHieuh* = 0x00000EFA # Korean currency symbol - XK_Korean_Won* = 0x00000EFF + XK_Hangul_Kiyeog*: TKeySym = 0x00000EA1 + XK_Hangul_SsangKiyeog*: TKeySym = 0x00000EA2 + XK_Hangul_KiyeogSios*: TKeySym = 0x00000EA3 + XK_Hangul_Nieun*: TKeySym = 0x00000EA4 + XK_Hangul_NieunJieuj*: TKeySym = 0x00000EA5 + XK_Hangul_NieunHieuh*: TKeySym = 0x00000EA6 + XK_Hangul_Dikeud*: TKeySym = 0x00000EA7 + XK_Hangul_SsangDikeud*: TKeySym = 0x00000EA8 + XK_Hangul_Rieul*: TKeySym = 0x00000EA9 + XK_Hangul_RieulKiyeog*: TKeySym = 0x00000EAA + XK_Hangul_RieulMieum*: TKeySym = 0x00000EAB + XK_Hangul_RieulPieub*: TKeySym = 0x00000EAC + XK_Hangul_RieulSios*: TKeySym = 0x00000EAD + XK_Hangul_RieulTieut*: TKeySym = 0x00000EAE + XK_Hangul_RieulPhieuf*: TKeySym = 0x00000EAF + XK_Hangul_RieulHieuh*: TKeySym = 0x00000EB0 + XK_Hangul_Mieum*: TKeySym = 0x00000EB1 + XK_Hangul_Pieub*: TKeySym = 0x00000EB2 + XK_Hangul_SsangPieub*: TKeySym = 0x00000EB3 + XK_Hangul_PieubSios*: TKeySym = 0x00000EB4 + XK_Hangul_Sios*: TKeySym = 0x00000EB5 + XK_Hangul_SsangSios*: TKeySym = 0x00000EB6 + XK_Hangul_Ieung*: TKeySym = 0x00000EB7 + XK_Hangul_Jieuj*: TKeySym = 0x00000EB8 + XK_Hangul_SsangJieuj*: TKeySym = 0x00000EB9 + XK_Hangul_Cieuc*: TKeySym = 0x00000EBA + XK_Hangul_Khieuq*: TKeySym = 0x00000EBB + XK_Hangul_Tieut*: TKeySym = 0x00000EBC + XK_Hangul_Phieuf*: TKeySym = 0x00000EBD + XK_Hangul_Hieuh*: TKeySym = 0x00000EBE # Hangul Vowel Characters + XK_Hangul_A*: TKeySym = 0x00000EBF + XK_Hangul_AE*: TKeySym = 0x00000EC0 + XK_Hangul_YA*: TKeySym = 0x00000EC1 + XK_Hangul_YAE*: TKeySym = 0x00000EC2 + XK_Hangul_EO*: TKeySym = 0x00000EC3 + XK_Hangul_E*: TKeySym = 0x00000EC4 + XK_Hangul_YEO*: TKeySym = 0x00000EC5 + XK_Hangul_YE*: TKeySym = 0x00000EC6 + XK_Hangul_O*: TKeySym = 0x00000EC7 + XK_Hangul_WA*: TKeySym = 0x00000EC8 + XK_Hangul_WAE*: TKeySym = 0x00000EC9 + XK_Hangul_OE*: TKeySym = 0x00000ECA + XK_Hangul_YO*: TKeySym = 0x00000ECB + XK_Hangul_U*: TKeySym = 0x00000ECC + XK_Hangul_WEO*: TKeySym = 0x00000ECD + XK_Hangul_WE*: TKeySym = 0x00000ECE + XK_Hangul_WI*: TKeySym = 0x00000ECF + XK_Hangul_YU*: TKeySym = 0x00000ED0 + XK_Hangul_EU*: TKeySym = 0x00000ED1 + XK_Hangul_YI*: TKeySym = 0x00000ED2 + XK_Hangul_I*: TKeySym = 0x00000ED3 # Hangul syllable-final (JongSeong) Characters + XK_Hangul_J_Kiyeog*: TKeySym = 0x00000ED4 + XK_Hangul_J_SsangKiyeog*: TKeySym = 0x00000ED5 + XK_Hangul_J_KiyeogSios*: TKeySym = 0x00000ED6 + XK_Hangul_J_Nieun*: TKeySym = 0x00000ED7 + XK_Hangul_J_NieunJieuj*: TKeySym = 0x00000ED8 + XK_Hangul_J_NieunHieuh*: TKeySym = 0x00000ED9 + XK_Hangul_J_Dikeud*: TKeySym = 0x00000EDA + XK_Hangul_J_Rieul*: TKeySym = 0x00000EDB + XK_Hangul_J_RieulKiyeog*: TKeySym = 0x00000EDC + XK_Hangul_J_RieulMieum*: TKeySym = 0x00000EDD + XK_Hangul_J_RieulPieub*: TKeySym = 0x00000EDE + XK_Hangul_J_RieulSios*: TKeySym = 0x00000EDF + XK_Hangul_J_RieulTieut*: TKeySym = 0x00000EE0 + XK_Hangul_J_RieulPhieuf*: TKeySym = 0x00000EE1 + XK_Hangul_J_RieulHieuh*: TKeySym = 0x00000EE2 + XK_Hangul_J_Mieum*: TKeySym = 0x00000EE3 + XK_Hangul_J_Pieub*: TKeySym = 0x00000EE4 + XK_Hangul_J_PieubSios*: TKeySym = 0x00000EE5 + XK_Hangul_J_Sios*: TKeySym = 0x00000EE6 + XK_Hangul_J_SsangSios*: TKeySym = 0x00000EE7 + XK_Hangul_J_Ieung*: TKeySym = 0x00000EE8 + XK_Hangul_J_Jieuj*: TKeySym = 0x00000EE9 + XK_Hangul_J_Cieuc*: TKeySym = 0x00000EEA + XK_Hangul_J_Khieuq*: TKeySym = 0x00000EEB + XK_Hangul_J_Tieut*: TKeySym = 0x00000EEC + XK_Hangul_J_Phieuf*: TKeySym = 0x00000EED + XK_Hangul_J_Hieuh*: TKeySym = 0x00000EEE # Ancient Hangul Consonant Characters + XK_Hangul_RieulYeorinHieuh*: TKeySym = 0x00000EEF + XK_Hangul_SunkyeongeumMieum*: TKeySym = 0x00000EF0 + XK_Hangul_SunkyeongeumPieub*: TKeySym = 0x00000EF1 + XK_Hangul_PanSios*: TKeySym = 0x00000EF2 + XK_Hangul_KkogjiDalrinIeung*: TKeySym = 0x00000EF3 + XK_Hangul_SunkyeongeumPhieuf*: TKeySym = 0x00000EF4 + XK_Hangul_YeorinHieuh*: TKeySym = 0x00000EF5 # Ancient Hangul Vowel Characters + XK_Hangul_AraeA*: TKeySym = 0x00000EF6 + XK_Hangul_AraeAE*: TKeySym = 0x00000EF7 # Ancient Hangul syllable-final (JongSeong) Characters + XK_Hangul_J_PanSios*: TKeySym = 0x00000EF8 + XK_Hangul_J_KkogjiDalrinIeung*: TKeySym = 0x00000EF9 + XK_Hangul_J_YeorinHieuh*: TKeySym = 0x00000EFA # Korean currency symbol + XK_Korean_Won*: TKeySym = 0x00000EFF # XK_KOREAN #* # * Armenian @@ -1613,108 +1614,108 @@ when defined(XK_KOREAN) or true: when defined(XK_ARMENIAN) or true: const - XK_Armenian_eternity* = 0x000014A1 - XK_Armenian_ligature_ew* = 0x000014A2 - XK_Armenian_full_stop* = 0x000014A3 - XK_Armenian_verjaket* = 0x000014A3 - XK_Armenian_parenright* = 0x000014A4 - XK_Armenian_parenleft* = 0x000014A5 - XK_Armenian_guillemotright* = 0x000014A6 - XK_Armenian_guillemotleft* = 0x000014A7 - XK_Armenian_em_dash* = 0x000014A8 - XK_Armenian_dot* = 0x000014A9 - XK_Armenian_mijaket* = 0x000014A9 - XK_Armenian_separation_mark* = 0x000014AA - XK_Armenian_but* = 0x000014AA - XK_Armenian_comma* = 0x000014AB - XK_Armenian_en_dash* = 0x000014AC - XK_Armenian_hyphen* = 0x000014AD - XK_Armenian_yentamna* = 0x000014AD - XK_Armenian_ellipsis* = 0x000014AE - XK_Armenian_exclam* = 0x000014AF - XK_Armenian_amanak* = 0x000014AF - XK_Armenian_accent* = 0x000014B0 - XK_Armenian_shesht* = 0x000014B0 - XK_Armenian_question* = 0x000014B1 - XK_Armenian_paruyk* = 0x000014B1 - XKc_Armenian_AYB* = 0x000014B2 - XK_Armenian_ayb* = 0x000014B3 - XKc_Armenian_BEN* = 0x000014B4 - XK_Armenian_ben* = 0x000014B5 - XKc_Armenian_GIM* = 0x000014B6 - XK_Armenian_gim* = 0x000014B7 - XKc_Armenian_DA* = 0x000014B8 - XK_Armenian_da* = 0x000014B9 - XKc_Armenian_YECH* = 0x000014BA - XK_Armenian_yech* = 0x000014BB - XKc_Armenian_ZA* = 0x000014BC - XK_Armenian_za* = 0x000014BD - XKc_Armenian_E* = 0x000014BE - XK_Armenian_e* = 0x000014BF - XKc_Armenian_AT* = 0x000014C0 - XK_Armenian_at* = 0x000014C1 - XKc_Armenian_TO* = 0x000014C2 - XK_Armenian_to* = 0x000014C3 - XKc_Armenian_ZHE* = 0x000014C4 - XK_Armenian_zhe* = 0x000014C5 - XKc_Armenian_INI* = 0x000014C6 - XK_Armenian_ini* = 0x000014C7 - XKc_Armenian_LYUN* = 0x000014C8 - XK_Armenian_lyun* = 0x000014C9 - XKc_Armenian_KHE* = 0x000014CA - XK_Armenian_khe* = 0x000014CB - XKc_Armenian_TSA* = 0x000014CC - XK_Armenian_tsa* = 0x000014CD - XKc_Armenian_KEN* = 0x000014CE - XK_Armenian_ken* = 0x000014CF - XKc_Armenian_HO* = 0x000014D0 - XK_Armenian_ho* = 0x000014D1 - XKc_Armenian_DZA* = 0x000014D2 - XK_Armenian_dza* = 0x000014D3 - XKc_Armenian_GHAT* = 0x000014D4 - XK_Armenian_ghat* = 0x000014D5 - XKc_Armenian_TCHE* = 0x000014D6 - XK_Armenian_tche* = 0x000014D7 - XKc_Armenian_MEN* = 0x000014D8 - XK_Armenian_men* = 0x000014D9 - XKc_Armenian_HI* = 0x000014DA - XK_Armenian_hi* = 0x000014DB - XKc_Armenian_NU* = 0x000014DC - XK_Armenian_nu* = 0x000014DD - XKc_Armenian_SHA* = 0x000014DE - XK_Armenian_sha* = 0x000014DF - XKc_Armenian_VO* = 0x000014E0 - XK_Armenian_vo* = 0x000014E1 - XKc_Armenian_CHA* = 0x000014E2 - XK_Armenian_cha* = 0x000014E3 - XKc_Armenian_PE* = 0x000014E4 - XK_Armenian_pe* = 0x000014E5 - XKc_Armenian_JE* = 0x000014E6 - XK_Armenian_je* = 0x000014E7 - XKc_Armenian_RA* = 0x000014E8 - XK_Armenian_ra* = 0x000014E9 - XKc_Armenian_SE* = 0x000014EA - XK_Armenian_se* = 0x000014EB - XKc_Armenian_VEV* = 0x000014EC - XK_Armenian_vev* = 0x000014ED - XKc_Armenian_TYUN* = 0x000014EE - XK_Armenian_tyun* = 0x000014EF - XKc_Armenian_RE* = 0x000014F0 - XK_Armenian_re* = 0x000014F1 - XKc_Armenian_TSO* = 0x000014F2 - XK_Armenian_tso* = 0x000014F3 - XKc_Armenian_VYUN* = 0x000014F4 - XK_Armenian_vyun* = 0x000014F5 - XKc_Armenian_PYUR* = 0x000014F6 - XK_Armenian_pyur* = 0x000014F7 - XKc_Armenian_KE* = 0x000014F8 - XK_Armenian_ke* = 0x000014F9 - XKc_Armenian_O* = 0x000014FA - XK_Armenian_o* = 0x000014FB - XKc_Armenian_FE* = 0x000014FC - XK_Armenian_fe* = 0x000014FD - XK_Armenian_apostrophe* = 0x000014FE - XK_Armenian_section_sign* = 0x000014FF + XK_Armenian_eternity*: TKeySym = 0x000014A1 + XK_Armenian_ligature_ew*: TKeySym = 0x000014A2 + XK_Armenian_full_stop*: TKeySym = 0x000014A3 + XK_Armenian_verjaket*: TKeySym = 0x000014A3 + XK_Armenian_parenright*: TKeySym = 0x000014A4 + XK_Armenian_parenleft*: TKeySym = 0x000014A5 + XK_Armenian_guillemotright*: TKeySym = 0x000014A6 + XK_Armenian_guillemotleft*: TKeySym = 0x000014A7 + XK_Armenian_em_dash*: TKeySym = 0x000014A8 + XK_Armenian_dot*: TKeySym = 0x000014A9 + XK_Armenian_mijaket*: TKeySym = 0x000014A9 + XK_Armenian_separation_mark*: TKeySym = 0x000014AA + XK_Armenian_but*: TKeySym = 0x000014AA + XK_Armenian_comma*: TKeySym = 0x000014AB + XK_Armenian_en_dash*: TKeySym = 0x000014AC + XK_Armenian_hyphen*: TKeySym = 0x000014AD + XK_Armenian_yentamna*: TKeySym = 0x000014AD + XK_Armenian_ellipsis*: TKeySym = 0x000014AE + XK_Armenian_exclam*: TKeySym = 0x000014AF + XK_Armenian_amanak*: TKeySym = 0x000014AF + XK_Armenian_accent*: TKeySym = 0x000014B0 + XK_Armenian_shesht*: TKeySym = 0x000014B0 + XK_Armenian_question*: TKeySym = 0x000014B1 + XK_Armenian_paruyk*: TKeySym = 0x000014B1 + XKc_Armenian_AYB*: TKeySym = 0x000014B2 + XK_Armenian_ayb*: TKeySym = 0x000014B3 + XKc_Armenian_BEN*: TKeySym = 0x000014B4 + XK_Armenian_ben*: TKeySym = 0x000014B5 + XKc_Armenian_GIM*: TKeySym = 0x000014B6 + XK_Armenian_gim*: TKeySym = 0x000014B7 + XKc_Armenian_DA*: TKeySym = 0x000014B8 + XK_Armenian_da*: TKeySym = 0x000014B9 + XKc_Armenian_YECH*: TKeySym = 0x000014BA + XK_Armenian_yech*: TKeySym = 0x000014BB + XKc_Armenian_ZA*: TKeySym = 0x000014BC + XK_Armenian_za*: TKeySym = 0x000014BD + XKc_Armenian_E*: TKeySym = 0x000014BE + XK_Armenian_e*: TKeySym = 0x000014BF + XKc_Armenian_AT*: TKeySym = 0x000014C0 + XK_Armenian_at*: TKeySym = 0x000014C1 + XKc_Armenian_TO*: TKeySym = 0x000014C2 + XK_Armenian_to*: TKeySym = 0x000014C3 + XKc_Armenian_ZHE*: TKeySym = 0x000014C4 + XK_Armenian_zhe*: TKeySym = 0x000014C5 + XKc_Armenian_INI*: TKeySym = 0x000014C6 + XK_Armenian_ini*: TKeySym = 0x000014C7 + XKc_Armenian_LYUN*: TKeySym = 0x000014C8 + XK_Armenian_lyun*: TKeySym = 0x000014C9 + XKc_Armenian_KHE*: TKeySym = 0x000014CA + XK_Armenian_khe*: TKeySym = 0x000014CB + XKc_Armenian_TSA*: TKeySym = 0x000014CC + XK_Armenian_tsa*: TKeySym = 0x000014CD + XKc_Armenian_KEN*: TKeySym = 0x000014CE + XK_Armenian_ken*: TKeySym = 0x000014CF + XKc_Armenian_HO*: TKeySym = 0x000014D0 + XK_Armenian_ho*: TKeySym = 0x000014D1 + XKc_Armenian_DZA*: TKeySym = 0x000014D2 + XK_Armenian_dza*: TKeySym = 0x000014D3 + XKc_Armenian_GHAT*: TKeySym = 0x000014D4 + XK_Armenian_ghat*: TKeySym = 0x000014D5 + XKc_Armenian_TCHE*: TKeySym = 0x000014D6 + XK_Armenian_tche*: TKeySym = 0x000014D7 + XKc_Armenian_MEN*: TKeySym = 0x000014D8 + XK_Armenian_men*: TKeySym = 0x000014D9 + XKc_Armenian_HI*: TKeySym = 0x000014DA + XK_Armenian_hi*: TKeySym = 0x000014DB + XKc_Armenian_NU*: TKeySym = 0x000014DC + XK_Armenian_nu*: TKeySym = 0x000014DD + XKc_Armenian_SHA*: TKeySym = 0x000014DE + XK_Armenian_sha*: TKeySym = 0x000014DF + XKc_Armenian_VO*: TKeySym = 0x000014E0 + XK_Armenian_vo*: TKeySym = 0x000014E1 + XKc_Armenian_CHA*: TKeySym = 0x000014E2 + XK_Armenian_cha*: TKeySym = 0x000014E3 + XKc_Armenian_PE*: TKeySym = 0x000014E4 + XK_Armenian_pe*: TKeySym = 0x000014E5 + XKc_Armenian_JE*: TKeySym = 0x000014E6 + XK_Armenian_je*: TKeySym = 0x000014E7 + XKc_Armenian_RA*: TKeySym = 0x000014E8 + XK_Armenian_ra*: TKeySym = 0x000014E9 + XKc_Armenian_SE*: TKeySym = 0x000014EA + XK_Armenian_se*: TKeySym = 0x000014EB + XKc_Armenian_VEV*: TKeySym = 0x000014EC + XK_Armenian_vev*: TKeySym = 0x000014ED + XKc_Armenian_TYUN*: TKeySym = 0x000014EE + XK_Armenian_tyun*: TKeySym = 0x000014EF + XKc_Armenian_RE*: TKeySym = 0x000014F0 + XK_Armenian_re*: TKeySym = 0x000014F1 + XKc_Armenian_TSO*: TKeySym = 0x000014F2 + XK_Armenian_tso*: TKeySym = 0x000014F3 + XKc_Armenian_VYUN*: TKeySym = 0x000014F4 + XK_Armenian_vyun*: TKeySym = 0x000014F5 + XKc_Armenian_PYUR*: TKeySym = 0x000014F6 + XK_Armenian_pyur*: TKeySym = 0x000014F7 + XKc_Armenian_KE*: TKeySym = 0x000014F8 + XK_Armenian_ke*: TKeySym = 0x000014F9 + XKc_Armenian_O*: TKeySym = 0x000014FA + XK_Armenian_o*: TKeySym = 0x000014FB + XKc_Armenian_FE*: TKeySym = 0x000014FC + XK_Armenian_fe*: TKeySym = 0x000014FD + XK_Armenian_apostrophe*: TKeySym = 0x000014FE + XK_Armenian_section_sign*: TKeySym = 0x000014FF # XK_ARMENIAN #* # * Georgian @@ -1723,45 +1724,45 @@ when defined(XK_ARMENIAN) or true: when defined(XK_GEORGIAN) or true: const - XK_Georgian_an* = 0x000015D0 - XK_Georgian_ban* = 0x000015D1 - XK_Georgian_gan* = 0x000015D2 - XK_Georgian_don* = 0x000015D3 - XK_Georgian_en* = 0x000015D4 - XK_Georgian_vin* = 0x000015D5 - XK_Georgian_zen* = 0x000015D6 - XK_Georgian_tan* = 0x000015D7 - XK_Georgian_in* = 0x000015D8 - XK_Georgian_kan* = 0x000015D9 - XK_Georgian_las* = 0x000015DA - XK_Georgian_man* = 0x000015DB - XK_Georgian_nar* = 0x000015DC - XK_Georgian_on* = 0x000015DD - XK_Georgian_par* = 0x000015DE - XK_Georgian_zhar* = 0x000015DF - XK_Georgian_rae* = 0x000015E0 - XK_Georgian_san* = 0x000015E1 - XK_Georgian_tar* = 0x000015E2 - XK_Georgian_un* = 0x000015E3 - XK_Georgian_phar* = 0x000015E4 - XK_Georgian_khar* = 0x000015E5 - XK_Georgian_ghan* = 0x000015E6 - XK_Georgian_qar* = 0x000015E7 - XK_Georgian_shin* = 0x000015E8 - XK_Georgian_chin* = 0x000015E9 - XK_Georgian_can* = 0x000015EA - XK_Georgian_jil* = 0x000015EB - XK_Georgian_cil* = 0x000015EC - XK_Georgian_char* = 0x000015ED - XK_Georgian_xan* = 0x000015EE - XK_Georgian_jhan* = 0x000015EF - XK_Georgian_hae* = 0x000015F0 - XK_Georgian_he* = 0x000015F1 - XK_Georgian_hie* = 0x000015F2 - XK_Georgian_we* = 0x000015F3 - XK_Georgian_har* = 0x000015F4 - XK_Georgian_hoe* = 0x000015F5 - XK_Georgian_fi* = 0x000015F6 + XK_Georgian_an*: TKeySym = 0x000015D0 + XK_Georgian_ban*: TKeySym = 0x000015D1 + XK_Georgian_gan*: TKeySym = 0x000015D2 + XK_Georgian_don*: TKeySym = 0x000015D3 + XK_Georgian_en*: TKeySym = 0x000015D4 + XK_Georgian_vin*: TKeySym = 0x000015D5 + XK_Georgian_zen*: TKeySym = 0x000015D6 + XK_Georgian_tan*: TKeySym = 0x000015D7 + XK_Georgian_in*: TKeySym = 0x000015D8 + XK_Georgian_kan*: TKeySym = 0x000015D9 + XK_Georgian_las*: TKeySym = 0x000015DA + XK_Georgian_man*: TKeySym = 0x000015DB + XK_Georgian_nar*: TKeySym = 0x000015DC + XK_Georgian_on*: TKeySym = 0x000015DD + XK_Georgian_par*: TKeySym = 0x000015DE + XK_Georgian_zhar*: TKeySym = 0x000015DF + XK_Georgian_rae*: TKeySym = 0x000015E0 + XK_Georgian_san*: TKeySym = 0x000015E1 + XK_Georgian_tar*: TKeySym = 0x000015E2 + XK_Georgian_un*: TKeySym = 0x000015E3 + XK_Georgian_phar*: TKeySym = 0x000015E4 + XK_Georgian_khar*: TKeySym = 0x000015E5 + XK_Georgian_ghan*: TKeySym = 0x000015E6 + XK_Georgian_qar*: TKeySym = 0x000015E7 + XK_Georgian_shin*: TKeySym = 0x000015E8 + XK_Georgian_chin*: TKeySym = 0x000015E9 + XK_Georgian_can*: TKeySym = 0x000015EA + XK_Georgian_jil*: TKeySym = 0x000015EB + XK_Georgian_cil*: TKeySym = 0x000015EC + XK_Georgian_char*: TKeySym = 0x000015ED + XK_Georgian_xan*: TKeySym = 0x000015EE + XK_Georgian_jhan*: TKeySym = 0x000015EF + XK_Georgian_hae*: TKeySym = 0x000015F0 + XK_Georgian_he*: TKeySym = 0x000015F1 + XK_Georgian_hie*: TKeySym = 0x000015F2 + XK_Georgian_we*: TKeySym = 0x000015F3 + XK_Georgian_har*: TKeySym = 0x000015F4 + XK_Georgian_hoe*: TKeySym = 0x000015F5 + XK_Georgian_fi*: TKeySym = 0x000015F6 # XK_GEORGIAN #* # * Azeri (and other Turkic or Caucasian languages of ex-USSR) @@ -1771,35 +1772,35 @@ when defined(XK_GEORGIAN) or true: when defined(XK_CAUCASUS) or true: # latin const - XKc_Ccedillaabovedot* = 0x000016A2 - XKc_Xabovedot* = 0x000016A3 - XKc_Qabovedot* = 0x000016A5 - XKc_Ibreve* = 0x000016A6 - XKc_IE* = 0x000016A7 - XKc_UO* = 0x000016A8 - XKc_Zstroke* = 0x000016A9 - XKc_Gcaron* = 0x000016AA - XKc_Obarred* = 0x000016AF - XK_ccedillaabovedot* = 0x000016B2 - XK_xabovedot* = 0x000016B3 - XKc_Ocaron* = 0x000016B4 - XK_qabovedot* = 0x000016B5 - XK_ibreve* = 0x000016B6 - XK_ie* = 0x000016B7 - XK_uo* = 0x000016B8 - XK_zstroke* = 0x000016B9 - XK_gcaron* = 0x000016BA - XK_ocaron* = 0x000016BD - XK_obarred* = 0x000016BF - XKc_SCHWA* = 0x000016C6 - XK_schwa* = 0x000016F6 # those are not really Caucasus, but I put them here for now + XKc_Ccedillaabovedot*: TKeySym = 0x000016A2 + XKc_Xabovedot*: TKeySym = 0x000016A3 + XKc_Qabovedot*: TKeySym = 0x000016A5 + XKc_Ibreve*: TKeySym = 0x000016A6 + XKc_IE*: TKeySym = 0x000016A7 + XKc_UO*: TKeySym = 0x000016A8 + XKc_Zstroke*: TKeySym = 0x000016A9 + XKc_Gcaron*: TKeySym = 0x000016AA + XKc_Obarred*: TKeySym = 0x000016AF + XK_ccedillaabovedot*: TKeySym = 0x000016B2 + XK_xabovedot*: TKeySym = 0x000016B3 + XKc_Ocaron*: TKeySym = 0x000016B4 + XK_qabovedot*: TKeySym = 0x000016B5 + XK_ibreve*: TKeySym = 0x000016B6 + XK_ie*: TKeySym = 0x000016B7 + XK_uo*: TKeySym = 0x000016B8 + XK_zstroke*: TKeySym = 0x000016B9 + XK_gcaron*: TKeySym = 0x000016BA + XK_ocaron*: TKeySym = 0x000016BD + XK_obarred*: TKeySym = 0x000016BF + XKc_SCHWA*: TKeySym = 0x000016C6 + XK_schwa*: TKeySym = 0x000016F6 # those are not really Caucasus, but I put them here for now\ # For Inupiak - XKc_Lbelowdot* = 0x000016D1 - XKc_Lstrokebelowdot* = 0x000016D2 - XK_lbelowdot* = 0x000016E1 - XK_lstrokebelowdot* = 0x000016E2 # For Guarani - XKc_Gtilde* = 0x000016D3 - XK_gtilde* = 0x000016E3 + XKc_Lbelowdot*: TKeySym = 0x000016D1 + XKc_Lstrokebelowdot*: TKeySym = 0x000016D2 + XK_lbelowdot*: TKeySym = 0x000016E1 + XK_lstrokebelowdot*: TKeySym = 0x000016E2 # For Guarani + XKc_Gtilde*: TKeySym = 0x000016D3 + XK_gtilde*: TKeySym = 0x000016E3 # XK_CAUCASUS #* # * Vietnamese @@ -1808,118 +1809,118 @@ when defined(XK_CAUCASUS) or true: when defined(XK_VIETNAMESE) or true: const - XKc_Abelowdot* = 0x00001EA0 - XK_abelowdot* = 0x00001EA1 - XKc_Ahook* = 0x00001EA2 - XK_ahook* = 0x00001EA3 - XKc_Acircumflexacute* = 0x00001EA4 - XK_acircumflexacute* = 0x00001EA5 - XKc_Acircumflexgrave* = 0x00001EA6 - XK_acircumflexgrave* = 0x00001EA7 - XKc_Acircumflexhook* = 0x00001EA8 - XK_acircumflexhook* = 0x00001EA9 - XKc_Acircumflextilde* = 0x00001EAA - XK_acircumflextilde* = 0x00001EAB - XKc_Acircumflexbelowdot* = 0x00001EAC - XK_acircumflexbelowdot* = 0x00001EAD - XKc_Abreveacute* = 0x00001EAE - XK_abreveacute* = 0x00001EAF - XKc_Abrevegrave* = 0x00001EB0 - XK_abrevegrave* = 0x00001EB1 - XKc_Abrevehook* = 0x00001EB2 - XK_abrevehook* = 0x00001EB3 - XKc_Abrevetilde* = 0x00001EB4 - XK_abrevetilde* = 0x00001EB5 - XKc_Abrevebelowdot* = 0x00001EB6 - XK_abrevebelowdot* = 0x00001EB7 - XKc_Ebelowdot* = 0x00001EB8 - XK_ebelowdot* = 0x00001EB9 - XKc_Ehook* = 0x00001EBA - XK_ehook* = 0x00001EBB - XKc_Etilde* = 0x00001EBC - XK_etilde* = 0x00001EBD - XKc_Ecircumflexacute* = 0x00001EBE - XK_ecircumflexacute* = 0x00001EBF - XKc_Ecircumflexgrave* = 0x00001EC0 - XK_ecircumflexgrave* = 0x00001EC1 - XKc_Ecircumflexhook* = 0x00001EC2 - XK_ecircumflexhook* = 0x00001EC3 - XKc_Ecircumflextilde* = 0x00001EC4 - XK_ecircumflextilde* = 0x00001EC5 - XKc_Ecircumflexbelowdot* = 0x00001EC6 - XK_ecircumflexbelowdot* = 0x00001EC7 - XKc_Ihook* = 0x00001EC8 - XK_ihook* = 0x00001EC9 - XKc_Ibelowdot* = 0x00001ECA - XK_ibelowdot* = 0x00001ECB - XKc_Obelowdot* = 0x00001ECC - XK_obelowdot* = 0x00001ECD - XKc_Ohook* = 0x00001ECE - XK_ohook* = 0x00001ECF - XKc_Ocircumflexacute* = 0x00001ED0 - XK_ocircumflexacute* = 0x00001ED1 - XKc_Ocircumflexgrave* = 0x00001ED2 - XK_ocircumflexgrave* = 0x00001ED3 - XKc_Ocircumflexhook* = 0x00001ED4 - XK_ocircumflexhook* = 0x00001ED5 - XKc_Ocircumflextilde* = 0x00001ED6 - XK_ocircumflextilde* = 0x00001ED7 - XKc_Ocircumflexbelowdot* = 0x00001ED8 - XK_ocircumflexbelowdot* = 0x00001ED9 - XKc_Ohornacute* = 0x00001EDA - XK_ohornacute* = 0x00001EDB - XKc_Ohorngrave* = 0x00001EDC - XK_ohorngrave* = 0x00001EDD - XKc_Ohornhook* = 0x00001EDE - XK_ohornhook* = 0x00001EDF - XKc_Ohorntilde* = 0x00001EE0 - XK_ohorntilde* = 0x00001EE1 - XKc_Ohornbelowdot* = 0x00001EE2 - XK_ohornbelowdot* = 0x00001EE3 - XKc_Ubelowdot* = 0x00001EE4 - XK_ubelowdot* = 0x00001EE5 - XKc_Uhook* = 0x00001EE6 - XK_uhook* = 0x00001EE7 - XKc_Uhornacute* = 0x00001EE8 - XK_uhornacute* = 0x00001EE9 - XKc_Uhorngrave* = 0x00001EEA - XK_uhorngrave* = 0x00001EEB - XKc_Uhornhook* = 0x00001EEC - XK_uhornhook* = 0x00001EED - XKc_Uhorntilde* = 0x00001EEE - XK_uhorntilde* = 0x00001EEF - XKc_Uhornbelowdot* = 0x00001EF0 - XK_uhornbelowdot* = 0x00001EF1 - XKc_Ybelowdot* = 0x00001EF4 - XK_ybelowdot* = 0x00001EF5 - XKc_Yhook* = 0x00001EF6 - XK_yhook* = 0x00001EF7 - XKc_Ytilde* = 0x00001EF8 - XK_ytilde* = 0x00001EF9 - XKc_Ohorn* = 0x00001EFA # U+01a0 - XK_ohorn* = 0x00001EFB # U+01a1 - XKc_Uhorn* = 0x00001EFC # U+01af - XK_uhorn* = 0x00001EFD # U+01b0 - XK_combining_tilde* = 0x00001E9F # U+0303 - XK_combining_grave* = 0x00001EF2 # U+0300 - XK_combining_acute* = 0x00001EF3 # U+0301 - XK_combining_hook* = 0x00001EFE # U+0309 - XK_combining_belowdot* = 0x00001EFF # U+0323 + XKc_Abelowdot*: TKeySym = 0x00001EA0 + XK_abelowdot*: TKeySym = 0x00001EA1 + XKc_Ahook*: TKeySym = 0x00001EA2 + XK_ahook*: TKeySym = 0x00001EA3 + XKc_Acircumflexacute*: TKeySym = 0x00001EA4 + XK_acircumflexacute*: TKeySym = 0x00001EA5 + XKc_Acircumflexgrave*: TKeySym = 0x00001EA6 + XK_acircumflexgrave*: TKeySym = 0x00001EA7 + XKc_Acircumflexhook*: TKeySym = 0x00001EA8 + XK_acircumflexhook*: TKeySym = 0x00001EA9 + XKc_Acircumflextilde*: TKeySym = 0x00001EAA + XK_acircumflextilde*: TKeySym = 0x00001EAB + XKc_Acircumflexbelowdot*: TKeySym = 0x00001EAC + XK_acircumflexbelowdot*: TKeySym = 0x00001EAD + XKc_Abreveacute*: TKeySym = 0x00001EAE + XK_abreveacute*: TKeySym = 0x00001EAF + XKc_Abrevegrave*: TKeySym = 0x00001EB0 + XK_abrevegrave*: TKeySym = 0x00001EB1 + XKc_Abrevehook*: TKeySym = 0x00001EB2 + XK_abrevehook*: TKeySym = 0x00001EB3 + XKc_Abrevetilde*: TKeySym = 0x00001EB4 + XK_abrevetilde*: TKeySym = 0x00001EB5 + XKc_Abrevebelowdot*: TKeySym = 0x00001EB6 + XK_abrevebelowdot*: TKeySym = 0x00001EB7 + XKc_Ebelowdot*: TKeySym = 0x00001EB8 + XK_ebelowdot*: TKeySym = 0x00001EB9 + XKc_Ehook*: TKeySym = 0x00001EBA + XK_ehook*: TKeySym = 0x00001EBB + XKc_Etilde*: TKeySym = 0x00001EBC + XK_etilde*: TKeySym = 0x00001EBD + XKc_Ecircumflexacute*: TKeySym = 0x00001EBE + XK_ecircumflexacute*: TKeySym = 0x00001EBF + XKc_Ecircumflexgrave*: TKeySym = 0x00001EC0 + XK_ecircumflexgrave*: TKeySym = 0x00001EC1 + XKc_Ecircumflexhook*: TKeySym = 0x00001EC2 + XK_ecircumflexhook*: TKeySym = 0x00001EC3 + XKc_Ecircumflextilde*: TKeySym = 0x00001EC4 + XK_ecircumflextilde*: TKeySym = 0x00001EC5 + XKc_Ecircumflexbelowdot*: TKeySym = 0x00001EC6 + XK_ecircumflexbelowdot*: TKeySym = 0x00001EC7 + XKc_Ihook*: TKeySym = 0x00001EC8 + XK_ihook*: TKeySym = 0x00001EC9 + XKc_Ibelowdot*: TKeySym = 0x00001ECA + XK_ibelowdot*: TKeySym = 0x00001ECB + XKc_Obelowdot*: TKeySym = 0x00001ECC + XK_obelowdot*: TKeySym = 0x00001ECD + XKc_Ohook*: TKeySym = 0x00001ECE + XK_ohook*: TKeySym = 0x00001ECF + XKc_Ocircumflexacute*: TKeySym = 0x00001ED0 + XK_ocircumflexacute*: TKeySym = 0x00001ED1 + XKc_Ocircumflexgrave*: TKeySym = 0x00001ED2 + XK_ocircumflexgrave*: TKeySym = 0x00001ED3 + XKc_Ocircumflexhook*: TKeySym = 0x00001ED4 + XK_ocircumflexhook*: TKeySym = 0x00001ED5 + XKc_Ocircumflextilde*: TKeySym = 0x00001ED6 + XK_ocircumflextilde*: TKeySym = 0x00001ED7 + XKc_Ocircumflexbelowdot*: TKeySym = 0x00001ED8 + XK_ocircumflexbelowdot*: TKeySym = 0x00001ED9 + XKc_Ohornacute*: TKeySym = 0x00001EDA + XK_ohornacute*: TKeySym = 0x00001EDB + XKc_Ohorngrave*: TKeySym = 0x00001EDC + XK_ohorngrave*: TKeySym = 0x00001EDD + XKc_Ohornhook*: TKeySym = 0x00001EDE + XK_ohornhook*: TKeySym = 0x00001EDF + XKc_Ohorntilde*: TKeySym = 0x00001EE0 + XK_ohorntilde*: TKeySym = 0x00001EE1 + XKc_Ohornbelowdot*: TKeySym = 0x00001EE2 + XK_ohornbelowdot*: TKeySym = 0x00001EE3 + XKc_Ubelowdot*: TKeySym = 0x00001EE4 + XK_ubelowdot*: TKeySym = 0x00001EE5 + XKc_Uhook*: TKeySym = 0x00001EE6 + XK_uhook*: TKeySym = 0x00001EE7 + XKc_Uhornacute*: TKeySym = 0x00001EE8 + XK_uhornacute*: TKeySym = 0x00001EE9 + XKc_Uhorngrave*: TKeySym = 0x00001EEA + XK_uhorngrave*: TKeySym = 0x00001EEB + XKc_Uhornhook*: TKeySym = 0x00001EEC + XK_uhornhook*: TKeySym = 0x00001EED + XKc_Uhorntilde*: TKeySym = 0x00001EEE + XK_uhorntilde*: TKeySym = 0x00001EEF + XKc_Uhornbelowdot*: TKeySym = 0x00001EF0 + XK_uhornbelowdot*: TKeySym = 0x00001EF1 + XKc_Ybelowdot*: TKeySym = 0x00001EF4 + XK_ybelowdot*: TKeySym = 0x00001EF5 + XKc_Yhook*: TKeySym = 0x00001EF6 + XK_yhook*: TKeySym = 0x00001EF7 + XKc_Ytilde*: TKeySym = 0x00001EF8 + XK_ytilde*: TKeySym = 0x00001EF9 + XKc_Ohorn*: TKeySym = 0x00001EFA # U+01a0 + XK_ohorn*: TKeySym = 0x00001EFB # U+01a1 + XKc_Uhorn*: TKeySym = 0x00001EFC # U+01af + XK_uhorn*: TKeySym = 0x00001EFD # U+01b0 + XK_combining_tilde*: TKeySym = 0x00001E9F # U+0303 + XK_combining_grave*: TKeySym = 0x00001EF2 # U+0300 + XK_combining_acute*: TKeySym = 0x00001EF3 # U+0301 + XK_combining_hook*: TKeySym = 0x00001EFE # U+0309 + XK_combining_belowdot*: TKeySym = 0x00001EFF # U+0323 # XK_VIETNAMESE when defined(XK_CURRENCY) or true: const - XK_EcuSign* = 0x000020A0 - XK_ColonSign* = 0x000020A1 - XK_CruzeiroSign* = 0x000020A2 - XK_FFrancSign* = 0x000020A3 - XK_LiraSign* = 0x000020A4 - XK_MillSign* = 0x000020A5 - XK_NairaSign* = 0x000020A6 - XK_PesetaSign* = 0x000020A7 - XK_RupeeSign* = 0x000020A8 - XK_WonSign* = 0x000020A9 - XK_NewSheqelSign* = 0x000020AA - XK_DongSign* = 0x000020AB - XK_EuroSign* = 0x000020AC + XK_EcuSign*: TKeySym = 0x000020A0 + XK_ColonSign*: TKeySym = 0x000020A1 + XK_CruzeiroSign*: TKeySym = 0x000020A2 + XK_FFrancSign*: TKeySym = 0x000020A3 + XK_LiraSign*: TKeySym = 0x000020A4 + XK_MillSign*: TKeySym = 0x000020A5 + XK_NairaSign*: TKeySym = 0x000020A6 + XK_PesetaSign*: TKeySym = 0x000020A7 + XK_RupeeSign*: TKeySym = 0x000020A8 + XK_WonSign*: TKeySym = 0x000020A9 + XK_NewSheqelSign*: TKeySym = 0x000020AA + XK_DongSign*: TKeySym = 0x000020AB + XK_EuroSign*: TKeySym = 0x000020AC # implementation diff --git a/lib/wrappers/x11/xlib.nim b/lib/wrappers/x11/xlib.nim index e6010feb7..5ccacdd45 100644 --- a/lib/wrappers/x11/xlib.nim +++ b/lib/wrappers/x11/xlib.nim @@ -1811,210 +1811,217 @@ proc XSetAuthorization*(para1: cstring, para2: cint, para3: cstring, para4: cint # _Xmbtowc? # _Xwctomb? # -when defined(MACROS): - proc ConnectionNumber*(dpy: PDisplay): cint - proc RootWindow*(dpy: PDisplay, scr: cint): TWindow - proc DefaultScreen*(dpy: PDisplay): cint - proc DefaultRootWindow*(dpy: PDisplay): TWindow - proc DefaultVisual*(dpy: PDisplay, scr: cint): PVisual - proc DefaultGC*(dpy: PDisplay, scr: cint): TGC - proc BlackPixel*(dpy: PDisplay, scr: cint): culong - proc WhitePixel*(dpy: PDisplay, scr: cint): culong - proc QLength*(dpy: PDisplay): cint - proc DisplayWidth*(dpy: PDisplay, scr: cint): cint - proc DisplayHeight*(dpy: PDisplay, scr: cint): cint - proc DisplayWidthMM*(dpy: PDisplay, scr: cint): cint - proc DisplayHeightMM*(dpy: PDisplay, scr: cint): cint - proc DisplayPlanes*(dpy: PDisplay, scr: cint): cint - proc DisplayCells*(dpy: PDisplay, scr: cint): cint - proc ScreenCount*(dpy: PDisplay): cint - proc ServerVendor*(dpy: PDisplay): cstring - proc ProtocolVersion*(dpy: PDisplay): cint - proc ProtocolRevision*(dpy: PDisplay): cint - proc VendorRelease*(dpy: PDisplay): cint - proc DisplayString*(dpy: PDisplay): cstring - proc DefaultDepth*(dpy: PDisplay, scr: cint): cint - proc DefaultColormap*(dpy: PDisplay, scr: cint): TColormap - proc BitmapUnit*(dpy: PDisplay): cint - proc BitmapBitOrder*(dpy: PDisplay): cint - proc BitmapPad*(dpy: PDisplay): cint - proc ImageByteOrder*(dpy: PDisplay): cint - proc NextRequest*(dpy: PDisplay): culong - proc LastKnownRequestProcessed*(dpy: PDisplay): culong - proc ScreenOfDisplay*(dpy: PDisplay, scr: cint): PScreen - proc DefaultScreenOfDisplay*(dpy: PDisplay): PScreen - proc DisplayOfScreen*(s: PScreen): PDisplay - proc RootWindowOfScreen*(s: PScreen): TWindow - proc BlackPixelOfScreen*(s: PScreen): culong - proc WhitePixelOfScreen*(s: PScreen): culong - proc DefaultColormapOfScreen*(s: PScreen): TColormap - proc DefaultDepthOfScreen*(s: PScreen): cint - proc DefaultGCOfScreen*(s: PScreen): TGC - proc DefaultVisualOfScreen*(s: PScreen): PVisual - proc WidthOfScreen*(s: PScreen): cint - proc HeightOfScreen*(s: PScreen): cint - proc WidthMMOfScreen*(s: PScreen): cint - proc HeightMMOfScreen*(s: PScreen): cint - proc PlanesOfScreen*(s: PScreen): cint - proc CellsOfScreen*(s: PScreen): cint - proc MinCmapsOfScreen*(s: PScreen): cint - proc MaxCmapsOfScreen*(s: PScreen): cint - proc DoesSaveUnders*(s: PScreen): TBool - proc DoesBackingStore*(s: PScreen): cint - proc EventMaskOfScreen*(s: PScreen): clong - proc XAllocID*(dpy: PDisplay): TXID +#when defined(MACROS): +proc ConnectionNumber*(dpy: PDisplay): cint +proc RootWindow*(dpy: PDisplay, scr: cint): TWindow +proc DefaultScreen*(dpy: PDisplay): cint +proc DefaultRootWindow*(dpy: PDisplay): TWindow +proc DefaultVisual*(dpy: PDisplay, scr: cint): PVisual +proc DefaultGC*(dpy: PDisplay, scr: cint): TGC +proc BlackPixel*(dpy: PDisplay, scr: cint): culong +proc WhitePixel*(dpy: PDisplay, scr: cint): culong +proc QLength*(dpy: PDisplay): cint +proc DisplayWidth*(dpy: PDisplay, scr: cint): cint +proc DisplayHeight*(dpy: PDisplay, scr: cint): cint +proc DisplayWidthMM*(dpy: PDisplay, scr: cint): cint +proc DisplayHeightMM*(dpy: PDisplay, scr: cint): cint +proc DisplayPlanes*(dpy: PDisplay, scr: cint): cint +proc DisplayCells*(dpy: PDisplay, scr: cint): cint +proc ScreenCount*(dpy: PDisplay): cint +proc ServerVendor*(dpy: PDisplay): cstring +proc ProtocolVersion*(dpy: PDisplay): cint +proc ProtocolRevision*(dpy: PDisplay): cint +proc VendorRelease*(dpy: PDisplay): cint +proc DisplayString*(dpy: PDisplay): cstring +proc DefaultDepth*(dpy: PDisplay, scr: cint): cint +proc DefaultColormap*(dpy: PDisplay, scr: cint): TColormap +proc BitmapUnit*(dpy: PDisplay): cint +proc BitmapBitOrder*(dpy: PDisplay): cint +proc BitmapPad*(dpy: PDisplay): cint +proc ImageByteOrder*(dpy: PDisplay): cint +proc NextRequest*(dpy: PDisplay): culong +proc LastKnownRequestProcessed*(dpy: PDisplay): culong +proc ScreenOfDisplay*(dpy: PDisplay, scr: cint): PScreen +proc DefaultScreenOfDisplay*(dpy: PDisplay): PScreen +proc DisplayOfScreen*(s: PScreen): PDisplay +proc RootWindowOfScreen*(s: PScreen): TWindow +proc BlackPixelOfScreen*(s: PScreen): culong +proc WhitePixelOfScreen*(s: PScreen): culong +proc DefaultColormapOfScreen*(s: PScreen): TColormap +proc DefaultDepthOfScreen*(s: PScreen): cint +proc DefaultGCOfScreen*(s: PScreen): TGC +proc DefaultVisualOfScreen*(s: PScreen): PVisual +proc WidthOfScreen*(s: PScreen): cint +proc HeightOfScreen*(s: PScreen): cint +proc WidthMMOfScreen*(s: PScreen): cint +proc HeightMMOfScreen*(s: PScreen): cint +proc PlanesOfScreen*(s: PScreen): cint +proc CellsOfScreen*(s: PScreen): cint +proc MinCmapsOfScreen*(s: PScreen): cint +proc MaxCmapsOfScreen*(s: PScreen): cint +proc DoesSaveUnders*(s: PScreen): TBool +proc DoesBackingStore*(s: PScreen): cint +proc EventMaskOfScreen*(s: PScreen): clong +proc XAllocID*(dpy: PDisplay): TXID # implementation -when defined(MACROS): - proc ConnectionNumber(dpy: PDisplay): cint = - ConnectionNumber = (PXPrivDisplay(dpy))[] .fd +#when defined(MACROS): +template privDisp : expr = cast[PXPrivDisplay](dpy) + +proc ConnectionNumber(dpy: PDisplay): cint = + privDisp.fd - proc RootWindow(dpy: PDisplay, scr: cint): TWindow = - RootWindow = (ScreenOfDisplay(dpy, scr))[] .root +proc RootWindow(dpy: PDisplay, scr: cint): TWindow = + ScreenOfDisplay(dpy, scr).root - proc DefaultScreen(dpy: PDisplay): cint = - DefaultScreen = (PXPrivDisplay(dpy))[] .default_screen +proc DefaultScreen(dpy: PDisplay): cint = + privDisp.default_screen - proc DefaultRootWindow(dpy: PDisplay): TWindow = - DefaultRootWindow = (ScreenOfDisplay(dpy, DefaultScreen(dpy)))[] .root +proc DefaultRootWindow(dpy: PDisplay): TWindow = + ScreenOfDisplay(dpy, DefaultScreen(dpy)).root - proc DefaultVisual(dpy: PDisplay, scr: cint): PVisual = - DefaultVisual = (ScreenOfDisplay(dpy, scr))[] .root_visual +proc DefaultVisual(dpy: PDisplay, scr: cint): PVisual = + ScreenOfDisplay(dpy, scr).root_visual - proc DefaultGC(dpy: PDisplay, scr: cint): TGC = - DefaultGC = (ScreenOfDisplay(dpy, scr))[] .default_gc +proc DefaultGC(dpy: PDisplay, scr: cint): TGC = + ScreenOfDisplay(dpy, scr).default_gc - proc BlackPixel(dpy: PDisplay, scr: cint): culong = - BlackPixel = (ScreenOfDisplay(dpy, scr))[] .black_pixel +proc BlackPixel(dpy: PDisplay, scr: cint): culong = + ScreenOfDisplay(dpy, scr).black_pixel - proc WhitePixel(dpy: PDisplay, scr: cint): culong = - WhitePixel = (ScreenOfDisplay(dpy, scr))[] .white_pixel +proc WhitePixel(dpy: PDisplay, scr: cint): culong = + ScreenOfDisplay(dpy, scr).white_pixel - proc QLength(dpy: PDisplay): cint = - QLength = (PXPrivDisplay(dpy))[] .qlen +proc QLength(dpy: PDisplay): cint = + privDisp.qlen - proc DisplayWidth(dpy: PDisplay, scr: cint): cint = - DisplayWidth = (ScreenOfDisplay(dpy, scr))[] .width +proc DisplayWidth(dpy: PDisplay, scr: cint): cint = + ScreenOfDisplay(dpy, scr).width - proc DisplayHeight(dpy: PDisplay, scr: cint): cint = - DisplayHeight = (ScreenOfDisplay(dpy, scr))[] .height +proc DisplayHeight(dpy: PDisplay, scr: cint): cint = + ScreenOfDisplay(dpy, scr).height - proc DisplayWidthMM(dpy: PDisplay, scr: cint): cint = - DisplayWidthMM = (ScreenOfDisplay(dpy, scr))[] .mwidth +proc DisplayWidthMM(dpy: PDisplay, scr: cint): cint = + ScreenOfDisplay(dpy, scr).mwidth - proc DisplayHeightMM(dpy: PDisplay, scr: cint): cint = - DisplayHeightMM = (ScreenOfDisplay(dpy, scr))[] .mheight +proc DisplayHeightMM(dpy: PDisplay, scr: cint): cint = + ScreenOfDisplay(dpy, scr).mheight - proc DisplayPlanes(dpy: PDisplay, scr: cint): cint = - DisplayPlanes = (ScreenOfDisplay(dpy, scr))[] .root_depth +proc DisplayPlanes(dpy: PDisplay, scr: cint): cint = + ScreenOfDisplay(dpy, scr).root_depth - proc DisplayCells(dpy: PDisplay, scr: cint): cint = - DisplayCells = (DefaultVisual(dpy, scr))[] .map_entries +proc DisplayCells(dpy: PDisplay, scr: cint): cint = + DefaultVisual(dpy, scr).map_entries - proc ScreenCount(dpy: PDisplay): cint = - ScreenCount = (PXPrivDisplay(dpy))[] .nscreens +proc ScreenCount(dpy: PDisplay): cint = + privDisp.nscreens - proc ServerVendor(dpy: PDisplay): cstring = - ServerVendor = (PXPrivDisplay(dpy))[] .vendor +proc ServerVendor(dpy: PDisplay): cstring = + privDisp.vendor - proc ProtocolVersion(dpy: PDisplay): cint = - ProtocolVersion = (PXPrivDisplay(dpy))[] .proto_major_version +proc ProtocolVersion(dpy: PDisplay): cint = + privDisp.proto_major_version - proc ProtocolRevision(dpy: PDisplay): cint = - ProtocolRevision = (PXPrivDisplay(dpy))[] .proto_minor_version +proc ProtocolRevision(dpy: PDisplay): cint = + privDisp.proto_minor_version - proc VendorRelease(dpy: PDisplay): cint = - VendorRelease = (PXPrivDisplay(dpy))[] .release +proc VendorRelease(dpy: PDisplay): cint = + privDisp.release - proc DisplayString(dpy: PDisplay): cstring = - DisplayString = (PXPrivDisplay(dpy))[] .display_name +proc DisplayString(dpy: PDisplay): cstring = + privDisp.display_name - proc DefaultDepth(dpy: PDisplay, scr: cint): cint = - DefaultDepth = (ScreenOfDisplay(dpy, scr))[] .root_depth +proc DefaultDepth(dpy: PDisplay, scr: cint): cint = + ScreenOfDisplay(dpy, scr).root_depth - proc DefaultColormap(dpy: PDisplay, scr: cint): TColormap = - DefaultColormap = (ScreenOfDisplay(dpy, scr))[] .cmap +proc DefaultColormap(dpy: PDisplay, scr: cint): TColormap = + ScreenOfDisplay(dpy, scr).cmap - proc BitmapUnit(dpy: PDisplay): cint = - BitmapUnit = (PXPrivDisplay(dpy))[] .bitmap_unit +proc BitmapUnit(dpy: PDisplay): cint = + privDisp.bitmap_unit - proc BitmapBitOrder(dpy: PDisplay): cint = - BitmapBitOrder = (PXPrivDisplay(dpy))[] .bitmap_bit_order +proc BitmapBitOrder(dpy: PDisplay): cint = + privDisp.bitmap_bit_order - proc BitmapPad(dpy: PDisplay): cint = - BitmapPad = (PXPrivDisplay(dpy))[] .bitmap_pad +proc BitmapPad(dpy: PDisplay): cint = + privDisp.bitmap_pad - proc ImageByteOrder(dpy: PDisplay): cint = - ImageByteOrder = (PXPrivDisplay(dpy))[] .byte_order +proc ImageByteOrder(dpy: PDisplay): cint = + privDisp.byte_order - proc NextRequest(dpy: PDisplay): culong = - NextRequest = ((PXPrivDisplay(dpy))[] .request) + 1 +import unsigned +proc NextRequest(dpy: PDisplay): culong = + privDisp.request + 1.culong - proc LastKnownRequestProcessed(dpy: PDisplay): culong = - LastKnownRequestProcessed = (PXPrivDisplay(dpy))[] .last_request_read +proc LastKnownRequestProcessed(dpy: PDisplay): culong = + privDisp.last_request_read - proc ScreenOfDisplay(dpy: PDisplay, scr: cint): PScreen = - ScreenOfDisplay = addr((((PXPrivDisplay(dpy))[] .screens)[scr])) +# from fowltek/pointer_arithm, required for ScreenOfDisplay() +proc offset[A] (some: ptr A; b: int): ptr A = + cast[ptr A](cast[int](some) + (b * sizeof(A))) +proc ScreenOfDisplay(dpy: PDisplay, scr: cint): PScreen = + #addr(((privDisp.screens)[scr])) + privDisp.screens.offset(scr.int) - proc DefaultScreenOfDisplay(dpy: PDisplay): PScreen = - DefaultScreenOfDisplay = ScreenOfDisplay(dpy, DefaultScreen(dpy)) +proc DefaultScreenOfDisplay(dpy: PDisplay): PScreen = + ScreenOfDisplay(dpy, DefaultScreen(dpy)) - proc DisplayOfScreen(s: PScreen): PDisplay = - DisplayOfScreen = s[] .display +proc DisplayOfScreen(s: PScreen): PDisplay = + s.display - proc RootWindowOfScreen(s: PScreen): TWindow = - RootWindowOfScreen = s[] .root +proc RootWindowOfScreen(s: PScreen): TWindow = + s.root - proc BlackPixelOfScreen(s: PScreen): culong = - BlackPixelOfScreen = s[] .black_pixel +proc BlackPixelOfScreen(s: PScreen): culong = + s.black_pixel - proc WhitePixelOfScreen(s: PScreen): culong = - WhitePixelOfScreen = s[] .white_pixel +proc WhitePixelOfScreen(s: PScreen): culong = + s.white_pixel - proc DefaultColormapOfScreen(s: PScreen): TColormap = - DefaultColormapOfScreen = s[] .cmap +proc DefaultColormapOfScreen(s: PScreen): TColormap = + s.cmap - proc DefaultDepthOfScreen(s: PScreen): cint = - DefaultDepthOfScreen = s[] .root_depth +proc DefaultDepthOfScreen(s: PScreen): cint = + s.root_depth - proc DefaultGCOfScreen(s: PScreen): TGC = - DefaultGCOfScreen = s[] .default_gc +proc DefaultGCOfScreen(s: PScreen): TGC = + s.default_gc - proc DefaultVisualOfScreen(s: PScreen): PVisual = - DefaultVisualOfScreen = s[] .root_visual +proc DefaultVisualOfScreen(s: PScreen): PVisual = + s.root_visual - proc WidthOfScreen(s: PScreen): cint = - WidthOfScreen = s[] .width +proc WidthOfScreen(s: PScreen): cint = + s.width - proc HeightOfScreen(s: PScreen): cint = - HeightOfScreen = s[] .height +proc HeightOfScreen(s: PScreen): cint = + s.height - proc WidthMMOfScreen(s: PScreen): cint = - WidthMMOfScreen = s[] .mwidth +proc WidthMMOfScreen(s: PScreen): cint = + s.mwidth - proc HeightMMOfScreen(s: PScreen): cint = - HeightMMOfScreen = s[] .mheight +proc HeightMMOfScreen(s: PScreen): cint = + s.mheight - proc PlanesOfScreen(s: PScreen): cint = - PlanesOfScreen = s[] .root_depth +proc PlanesOfScreen(s: PScreen): cint = + s.root_depth - proc CellsOfScreen(s: PScreen): cint = - CellsOfScreen = (DefaultVisualOfScreen(s))[] .map_entries +proc CellsOfScreen(s: PScreen): cint = + DefaultVisualOfScreen(s).map_entries - proc MinCmapsOfScreen(s: PScreen): cint = - MinCmapsOfScreen = s[] .min_maps +proc MinCmapsOfScreen(s: PScreen): cint = + s.min_maps - proc MaxCmapsOfScreen(s: PScreen): cint = - MaxCmapsOfScreen = s[] .max_maps +proc MaxCmapsOfScreen(s: PScreen): cint = + s.max_maps - proc DoesSaveUnders(s: PScreen): TBool = - DoesSaveUnders = s[] .save_unders +proc DoesSaveUnders(s: PScreen): TBool = + s.save_unders - proc DoesBackingStore(s: PScreen): cint = - DoesBackingStore = s[] .backing_store +proc DoesBackingStore(s: PScreen): cint = + s.backing_store - proc EventMaskOfScreen(s: PScreen): clong = - EventMaskOfScreen = s[] .root_input_mask +proc EventMaskOfScreen(s: PScreen): clong = + s.root_input_mask - proc XAllocID(dpy: PDisplay): TXID = - XAllocID = (PXPrivDisplay(dpy))[] .resource_alloc(dpy) +proc XAllocID(dpy: PDisplay): TXID = + privDisp.resource_alloc(dpy) diff --git a/lib/wrappers/x11/xutil.nim b/lib/wrappers/x11/xutil.nim index b66955927..9a3435aa5 100644 --- a/lib/wrappers/x11/xutil.nim +++ b/lib/wrappers/x11/xutil.nim @@ -1,6 +1,6 @@ import - x, xlib, keysym + x, xlib, keysym, unsigned #const # libX11* = "libX11.so" @@ -356,57 +356,57 @@ proc XWMGeometry*(para1: PDisplay, para2: cint, para3: cstring, para4: cstring, dynlib: libX11, importc.} proc XXorRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{.cdecl, dynlib: libX11, importc.} -when defined(MACROS): - proc XDestroyImage*(ximage: PXImage): cint - proc XGetPixel*(ximage: PXImage, x, y: cint): culong - proc XPutPixel*(ximage: PXImage, x, y: cint, pixel: culong): cint - proc XSubImage*(ximage: PXImage, x, y: cint, width, height: cuint): PXImage - proc XAddPixel*(ximage: PXImage, value: clong): cint - proc IsKeypadKey*(keysym: TKeySym): bool - proc IsPrivateKeypadKey*(keysym: TKeySym): bool - proc IsCursorKey*(keysym: TKeySym): bool - proc IsPFKey*(keysym: TKeySym): bool - proc IsFunctionKey*(keysym: TKeySym): bool - proc IsMiscFunctionKey*(keysym: TKeySym): bool - proc IsModifierKey*(keysym: TKeySym): bool - #function XUniqueContext : TXContext; - #function XStringToContext(_string : Pchar) : TXContext; +#when defined(MACROS): +proc XDestroyImage*(ximage: PXImage): cint +proc XGetPixel*(ximage: PXImage, x, y: cint): culong +proc XPutPixel*(ximage: PXImage, x, y: cint, pixel: culong): cint +proc XSubImage*(ximage: PXImage, x, y: cint, width, height: cuint): PXImage +proc XAddPixel*(ximage: PXImage, value: clong): cint +proc IsKeypadKey*(keysym: TKeySym): bool +proc IsPrivateKeypadKey*(keysym: TKeySym): bool +proc IsCursorKey*(keysym: TKeySym): bool +proc IsPFKey*(keysym: TKeySym): bool +proc IsFunctionKey*(keysym: TKeySym): bool +proc IsMiscFunctionKey*(keysym: TKeySym): bool +proc IsModifierKey*(keysym: TKeySym): bool + #function XUniqueContext : TXContext; + #function XStringToContext(_string : Pchar) : TXContext; # implementation -when defined(MACROS): - proc XDestroyImage(ximage: PXImage): cint = - XDestroyImage = ximage[] .f.destroy_image(ximage) +#when defined(MACROS): +proc XDestroyImage(ximage: PXImage): cint = + ximage.f.destroy_image(ximage) - proc XGetPixel(ximage: PXImage, x, y: cint): culong = - XGetPixel = ximage[] .f.get_pixel(ximage, x, y) +proc XGetPixel(ximage: PXImage, x, y: cint): culong = + ximage.f.get_pixel(ximage, x, y) - proc XPutPixel(ximage: PXImage, x, y: cint, pixel: culong): cint = - XPutPixel = ximage[] .f.put_pixel(ximage, x, y, pixel) +proc XPutPixel(ximage: PXImage, x, y: cint, pixel: culong): cint = + ximage.f.put_pixel(ximage, x, y, pixel) - proc XSubImage(ximage: PXImage, x, y: cint, width, height: cuint): PXImage = - XSubImage = ximage[] .f.sub_image(ximage, x, y, width, height) +proc XSubImage(ximage: PXImage, x, y: cint, width, height: cuint): PXImage = + ximage.f.sub_image(ximage, x, y, width, height) - proc XAddPixel(ximage: PXImage, value: clong): cint = - XAddPixel = ximage[] .f.add_pixel(ximage, value) +proc XAddPixel(ximage: PXImage, value: clong): cint = + ximage.f.add_pixel(ximage, value) - proc IsKeypadKey(keysym: TKeySym): bool = - IsKeypadKey = (keysym >= XK_KP_Space) and (keysym <= XK_KP_Equal) +proc IsKeypadKey(keysym: TKeySym): bool = + (keysym >= XK_KP_Space) and (keysym <= XK_KP_Equal) - proc IsPrivateKeypadKey(keysym: TKeySym): bool = - IsPrivateKeypadKey = (keysym >= 0x11000000) and (keysym <= 0x1100FFFF) +proc IsPrivateKeypadKey(keysym: TKeySym): bool = + (keysym >= 0x11000000.TKeySym) and (keysym <= 0x1100FFFF.TKeySym) - proc IsCursorKey(keysym: TKeySym): bool = - IsCursorKey = (keysym >= XK_Home) and (keysym < XK_Select) +proc IsCursorKey(keysym: TKeySym): bool = + (keysym >= XK_Home) and (keysym < XK_Select) - proc IsPFKey(keysym: TKeySym): bool = - IsPFKey = (keysym >= XK_KP_F1) and (keysym <= XK_KP_F4) +proc IsPFKey(keysym: TKeySym): bool = + (keysym >= XK_KP_F1) and (keysym <= XK_KP_F4) - proc IsFunctionKey(keysym: TKeySym): bool = - IsFunctionKey = (keysym >= XK_F1) and (keysym <= XK_F35) +proc IsFunctionKey(keysym: TKeySym): bool = + (keysym >= XK_F1) and (keysym <= XK_F35) - proc IsMiscFunctionKey(keysym: TKeySym): bool = - IsMiscFunctionKey = (keysym >= XK_Select) and (keysym <= XK_Break) +proc IsMiscFunctionKey(keysym: TKeySym): bool = + (keysym >= XK_Select) and (keysym <= XK_Break) - proc IsModifierKey(keysym: TKeySym): bool = - IsModifierKey = ((keysym >= XK_Shift_L) And (keysym <= XK_Hyper_R)) Or - (keysym == XK_Mode_switch) Or (keysym == XK_Num_Lock) +proc IsModifierKey(keysym: TKeySym): bool = + ((keysym >= XK_Shift_L) And (keysym <= XK_Hyper_R)) Or + (keysym == XK_Mode_switch) Or (keysym == XK_Num_Lock) diff --git a/lib/wrappers/zip/zlib.nim b/lib/wrappers/zip/zlib.nim index de52a06e1..c4c6ac071 100644 --- a/lib/wrappers/zip/zlib.nim +++ b/lib/wrappers/zip/zlib.nim @@ -102,6 +102,7 @@ proc compress2*(dest: pbytef, destLen: puLongf, source: pbytef, proc uncompress*(dest: pbytef, destLen: puLongf, source: pbytef, sourceLen: uLong): cint{.cdecl, dynlib: libz, importc: "uncompress".} +proc compressBound*(sourceLen: uLong): uLong {.cdecl, dynlib: libz, importc.} proc gzopen*(path: cstring, mode: cstring): gzFile{.cdecl, dynlib: libz, importc: "gzopen".} proc gzdopen*(fd: int32, mode: cstring): gzFile{.cdecl, dynlib: libz, diff --git a/tests/run/temit.nim b/tests/run/temit.nim index 460bc3443..ff8df0585 100644 --- a/tests/run/temit.nim +++ b/tests/run/temit.nim @@ -9,9 +9,9 @@ static int cvariable = 420; """.} -proc embedsC() {.noStackFrame.} = +proc embedsC() = var nimrodVar = 89 - {.emit: """fprintf(stdout, "%d\n", cvariable + (int)`nimrodVar`);""".} + {.emit: """printf("%d\n", cvariable + (int)`nimrodVar`);""".} embedsC() diff --git a/tools/niminst/buildsh.tmpl b/tools/niminst/buildsh.tmpl index 621020e75..0fb4907cf 100644 --- a/tools/niminst/buildsh.tmpl +++ b/tools/niminst/buildsh.tmpl @@ -54,7 +54,7 @@ case $uos in myos="linux" LINK_FLAGS="$LINK_FLAGS -ldl -lm" ;; - *freebsd* ) + *freebsd* | *dragonfly* ) myos="freebsd" LINK_FLAGS="$LINK_FLAGS -lm" ;; |