├── .github └── workflows │ ├── build-docker-image.yaml │ └── release.yaml ├── .gitignore ├── .gitmodules ├── argon └── index.js ├── build-all.sh ├── container └── android │ ├── .gitignore │ ├── Dockerfile │ ├── bin │ ├── ar │ ├── arg-fix │ ├── arg-hook │ ├── cc │ ├── cxx │ ├── ld │ ├── libs │ │ └── __init__.py │ ├── node-gyp-hook │ ├── node-hook │ ├── patch-gyps │ ├── patch-hook │ └── pkg-config │ ├── hostbin │ ├── g++ │ └── gcc │ ├── lib │ ├── .gitignore │ ├── node-preload.c │ └── node-preload.js │ ├── patch │ ├── X11 │ │ ├── DECkeysym.h │ │ ├── HPkeysym.h │ │ ├── ImUtil.h │ │ ├── Sunkeysym.h │ │ ├── X.h │ │ ├── X11.tar.gz │ │ ├── XF86keysym.h │ │ ├── XKBlib.h │ │ ├── XWDFile.h │ │ ├── Xalloca.h │ │ ├── Xarch.h │ │ ├── Xatom.h │ │ ├── Xcms.h │ │ ├── Xdefs.h │ │ ├── Xfuncproto.h │ │ ├── Xfuncs.h │ │ ├── Xlib.h │ │ ├── XlibConf.h │ │ ├── Xlibint.h │ │ ├── Xlocale.h │ │ ├── Xmd.h │ │ ├── Xos.h │ │ ├── Xos_r.h │ │ ├── Xosdefs.h │ │ ├── Xpoll.h │ │ ├── Xproto.h │ │ ├── Xprotostr.h │ │ ├── Xregion.h │ │ ├── Xresource.h │ │ ├── Xthreads.h │ │ ├── Xutil.h │ │ ├── Xw32defs.h │ │ ├── Xwindows.h │ │ ├── Xwinsock.h │ │ ├── ap_keysym.h │ │ ├── cursorfont.h │ │ ├── download.sh │ │ ├── extensions │ │ │ ├── MITMisc.h │ │ │ ├── XEVI.h │ │ │ ├── XEVIstr.h │ │ │ ├── XI.h │ │ │ ├── XInput.h │ │ │ ├── XIproto.h │ │ │ ├── XKB.h │ │ │ ├── XKBgeom.h │ │ │ ├── XKBproto.h │ │ │ ├── XKBsrv.h │ │ │ ├── XKBstr.h │ │ │ ├── XLbx.h │ │ │ ├── XShm.h │ │ │ ├── XTest.h │ │ │ ├── Xag.h │ │ │ ├── Xagsrv.h │ │ │ ├── Xagstr.h │ │ │ ├── Xcup.h │ │ │ ├── Xcupstr.h │ │ │ ├── Xdbe.h │ │ │ ├── Xdbeproto.h │ │ │ ├── Xext.h │ │ │ ├── dpms.h │ │ │ ├── dpmsstr.h │ │ │ ├── extutil.h │ │ │ ├── lbxbuf.h │ │ │ ├── lbxbufstr.h │ │ │ ├── lbxdeltastr.h │ │ │ ├── lbximage.h │ │ │ ├── lbxopts.h │ │ │ ├── lbxstr.h │ │ │ ├── lbxzlib.h │ │ │ ├── mitmiscstr.h │ │ │ ├── multibuf.h │ │ │ ├── multibufst.h │ │ │ ├── security.h │ │ │ ├── securstr.h │ │ │ ├── shape.h │ │ │ ├── shapestr.h │ │ │ ├── shmstr.h │ │ │ ├── sync.h │ │ │ ├── syncstr.h │ │ │ ├── xtestext1.h │ │ │ └── xteststr.h │ │ ├── keysym.h │ │ └── keysymdef.h │ ├── bthread-pthread_cancel.h │ └── keytar_posix.cc │ └── ssh │ └── config ├── dev.md ├── dev.sh ├── node-preload.so ├── patches ├── code-server │ ├── open-files.diff │ └── series └── node-src │ ├── android_configure.py.diff │ ├── deps_npm_lib_cli_entry.js.diff │ ├── deps_npm_lib_commands_install.js.diff │ ├── deps_uv_src_unix_core.c.diff │ ├── deps_uv_src_unix_fs.c.diff │ ├── deps_uv_src_unix_process.c.diff │ ├── deps_uv_src_unix_sysinfo_memory.c.diff │ ├── deps_uv_uv.gyp.diff │ ├── deps_v8_src_flags_flag_definitions.h.diff │ ├── deps_v8_src_logging_log.cc.diff │ ├── deps_v8_src_trap_handler_trap_handler.h.diff │ ├── deps_v8_third_party_zlib_cpu_features.diff │ ├── lib_child_process.js.diff │ ├── lib_os.js.diff │ ├── node.gyp.diff │ ├── series │ ├── src_node_internals.h.diff │ ├── tools_gyp_pylib_gyp_generator_ninja.py.diff │ └── tools_v8_gypfiles_v8.gyp.diff ├── readme.md ├── scripts ├── download-rg.sh ├── extract-latest-version.py └── include.sh └── update-patches.php /.github/workflows/build-docker-image.yaml: -------------------------------------------------------------------------------- 1 | name: Build and push Docker image 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | # paths: 8 | # - .github/workflows/bootstrap_archives.yml 9 | # schedule: 10 | # - cron: "0 0 * * 0" 11 | workflow_dispatch: 12 | 13 | env: 14 | IMAGE_NAME: vanhoavn/vheditor-codeserver-builder 15 | 16 | jobs: 17 | build: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: Git clone 21 | uses: actions/checkout@v3 22 | with: 23 | fetch-depth: 0 24 | submodules: recursive 25 | - name: Free additional disk space 26 | run: | 27 | sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(cabal-|dotnet-|ghc-|libmono|php|aspnetcore)') \ 28 | firefox google-chrome-stable microsoft-edge-stable mono-devel mono-runtime-common monodoc-manual ruby || true 29 | sudo apt autoremove -yq 30 | sudo apt clean 31 | sudo rm -fr /opt/ghc /opt/hostedtoolcache /usr/lib/node_modules /usr/local /usr/share/dotnet /usr/share/swift 32 | - name: Log in to the Container registry 33 | uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 34 | with: 35 | username: vanhoavn 36 | password: ${{ secrets.DOCKERHUB_PAT }} 37 | - name: Extract metadata (tags, labels) for Docker 38 | id: meta 39 | uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 40 | with: 41 | images: ${{ env.IMAGE_NAME }} 42 | - name: Build and push Docker image 43 | id: push 44 | uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 45 | with: 46 | context: ./container/android 47 | push: true 48 | tags: ${{ steps.meta.outputs.tags }} 49 | labels: ${{ steps.meta.outputs.labels }} 50 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Generate code-server archives 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | # paths: 8 | # - .github/workflows/bootstrap_archives.yml 9 | # schedule: 10 | # - cron: "0 0 * * 0" 11 | workflow_dispatch: 12 | 13 | env: 14 | IMAGE_NAME: vanhoavn/vheditor-codeserver-builder 15 | 16 | jobs: 17 | build: 18 | runs-on: ubuntu-latest 19 | strategy: 20 | matrix: 21 | arch: 22 | - aarch64 23 | - arm 24 | - x86 25 | - x86_64 26 | steps: 27 | - name: Git clone 28 | uses: actions/checkout@v3 29 | with: 30 | fetch-depth: 0 31 | submodules: recursive 32 | - name: Free additional disk space 33 | run: | 34 | sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(cabal-|dotnet-|ghc-|libmono|php|aspnetcore)') \ 35 | firefox google-chrome-stable microsoft-edge-stable mono-devel mono-runtime-common monodoc-manual ruby 36 | sudo apt autoremove -yq 37 | sudo apt clean 38 | sudo rm -fr /opt/ghc /opt/hostedtoolcache /usr/lib/node_modules /usr/local /usr/share/dotnet /usr/share/swift 39 | - name: Log in to the Container registry 40 | uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 41 | with: 42 | username: vanhoavn 43 | password: ${{ secrets.DOCKERHUB_PAT }} 44 | - name: Pull Docker image 45 | run: | 46 | docker pull $IMAGE_NAME:master 47 | docker tag $IMAGE_NAME:master vsandroidenv:latest 48 | - name: Create archive 49 | run: ./dev.sh docker-run bash -c './dev.sh apply-patch && BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=${{ matrix.arch }} ./dev.sh release' 50 | - name: Store artifacts 51 | uses: actions/upload-artifact@v4 52 | with: 53 | name: cs-archives-${{ github.sha }}-${{ matrix.arch }} 54 | path: "*.tgz" 55 | publish: 56 | needs: build 57 | runs-on: ubuntu-latest 58 | steps: 59 | - name: Git clone 60 | uses: actions/checkout@v4 61 | with: 62 | fetch-depth: 0 63 | - name: Fetch archives 64 | uses: actions/download-artifact@v4 65 | with: 66 | pattern: cs-archives-${{ github.sha }}-* 67 | path: ./ 68 | merge-multiple: true 69 | - name: Get checksums 70 | id: get_checksums 71 | run: | 72 | checksums=$(printf 'SHA-256:\n```\n%s\n```\n' "$(sha256sum *.tgz)") 73 | # checksums="${checksums//'%'/'%25'}" 74 | # checksums="${checksums//$'\n'/'%0A'}" 75 | # checksums="${checksums//$'\r'/'%0D'}" 76 | echo "checksums<>$GITHUB_OUTPUT 77 | echo "$checksums" >>$GITHUB_OUTPUT 78 | echo "CSCONTENT" >>$GITHUB_OUTPUT 79 | - name: Create new tag 80 | id: get_tag 81 | run: | 82 | new_tag="cs-$(date "+%Y.%m.%d")" 83 | existing_tag_revision=$(git tag | grep "$new_tag" | sort -r | head -n 1 | cut -d- -f3 | cut -dr -f2) 84 | if [ -n "$existing_tag_revision" ]; then 85 | tag_rev=$((existing_tag_revision + 1)) 86 | else 87 | tag_rev=1 88 | fi 89 | new_tag="${new_tag}-r${tag_rev}" 90 | git tag "$new_tag" 91 | git push --tags 92 | echo "tag_name=$new_tag" >>$GITHUB_OUTPUT 93 | - name: Publish GitHub release 94 | uses: termux/upload-release-action@v3.0.3 95 | with: 96 | repo_token: ${{ secrets.GITHUB_TOKEN }} 97 | file: "*.tgz" 98 | file_glob: true 99 | release_name: "CS archives for VHEditor application" 100 | tag: ${{ steps.get_tag.outputs.tag_name }} 101 | body: ${{ steps.get_checksums.outputs.checksums }} 102 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | libc++_shared.so 2 | *.tgz 3 | node 4 | *.pyc 5 | .history 6 | .vscode 7 | rg 8 | current_building 9 | *.output 10 | .pc 11 | *.patch 12 | *.bk 13 | tmp 14 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "code-server"] 2 | path = code-server 3 | url = git@github.com:vhqtvn/code-server.git 4 | ignore = dirty 5 | [submodule "node-src"] 6 | path = node-src 7 | url = https://github.com/nodejs/node 8 | ignore = dirty 9 | -------------------------------------------------------------------------------- /argon/index.js: -------------------------------------------------------------------------------- 1 | const { Algorithm, Version, hash, verify } = require('./argon2.node') 2 | 3 | module.exports.Algorithm = Algorithm 4 | module.exports.Version = Version 5 | module.exports.hash = hash 6 | module.exports.verify = verify 7 | -------------------------------------------------------------------------------- /build-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=aarch64 ./dev.sh release 2>&1 | tee build-aarch64.output 5 | BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=arm ./dev.sh release 2>&1 | tee build-arm.output 6 | BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=x86_64 ./dev.sh release 2>&1 | tee build-x86_64.output 7 | BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=x86 ./dev.sh release 2>&1 | tee build-x86.output 8 | -------------------------------------------------------------------------------- /container/android/.gitignore: -------------------------------------------------------------------------------- 1 | bin-alias -------------------------------------------------------------------------------- /container/android/bin/ar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | $NDK_BIN_ROOT/llvm-ar $@ 4 | -------------------------------------------------------------------------------- /container/android/bin/arg-fix: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import sys 4 | sys.path.append('.') 5 | from libs import argfix 6 | 7 | def shellquote(s): 8 | return s #"'" + s.replace("'", "'\\''") + "'" 9 | 10 | args = argfix(sys.argv[1:]) 11 | 12 | args = map(shellquote, args) 13 | 14 | print(' '.join(args)) -------------------------------------------------------------------------------- /container/android/bin/arg-hook: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import sys, os 4 | 5 | cwd = os.getcwd() 6 | 7 | print("-I/vscode-build/patch") -------------------------------------------------------------------------------- /container/android/bin/cc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | case $ANDROID_ARCH in 4 | arm|armeabi-v7a) 5 | TOOLARCH="armv7a-linux-androideabi" 6 | ;; 7 | x86) 8 | TOOLARCH="i686-linux-android" 9 | ;; 10 | x86_64) 11 | TOOLARCH="x86_64-linux-android" 12 | ;; 13 | arm64|aarch64) 14 | TOOLARCH="aarch64-linux-android" 15 | ;; 16 | *) 17 | echo "Unsupported arch $ANDROID_ARCH" 18 | exit 1 19 | ;; 20 | esac 21 | 22 | # echo '$>' $NDK_BIN_ROOT/$TOOLARCH$ANDROID_BUILD_API_VERSION-clang -fPIC $(arg-hook $@) $(arg-fix $@) 23 | patch-hook -fPIC $@ 24 | $NDK_BIN_ROOT/$TOOLARCH$ANDROID_BUILD_API_VERSION-clang -fPIC $(arg-hook $@) $(arg-fix $@) 25 | -------------------------------------------------------------------------------- /container/android/bin/cxx: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | case $ANDROID_ARCH in 4 | arm|armeabi-v7a) 5 | TOOLARCH="armv7a-linux-androideabi" 6 | ;; 7 | x86) 8 | TOOLARCH="i686-linux-android" 9 | ;; 10 | x86_64) 11 | TOOLARCH="x86_64-linux-android" 12 | ;; 13 | arm64|aarch64) 14 | TOOLARCH="aarch64-linux-android" 15 | ;; 16 | *) 17 | echo "Unsupported arch $ANDROID_ARCH" 18 | exit 1 19 | ;; 20 | esac 21 | 22 | 23 | echo $NDK_BIN_ROOT/$TOOLARCH$ANDROID_BUILD_API_VERSION-clang++ -fPIC $(arg-hook $@) $(arg-fix $@) 24 | patch-hook -fPIC $@ 25 | $NDK_BIN_ROOT/$TOOLARCH$ANDROID_BUILD_API_VERSION-clang++ -fPIC $(arg-hook $@) $(arg-fix $@) 26 | -------------------------------------------------------------------------------- /container/android/bin/ld: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import sys, os 4 | from subprocess import Popen, PIPE, STDOUT 5 | sys.path.append('.') 6 | from libs import argfix 7 | 8 | cmd = ([ 9 | os.getenv('NDK_BIN_ROOT')+'/'+{ 10 | 'arm': 'armv7a-linux-androideabi', 11 | 'armeabi-v7a': 'armv7a-linux-androideabi', 12 | 'x86': 'i686-linux-android', 13 | 'x86_64': 'x86_64-linux-android', 14 | 'x86_64': 'x86_64-linux-android', 15 | 'arm64': 'aarch64-linux-android', 16 | 'aarch64': 'aarch64-linux-android', 17 | }.get(os.getenv('ANDROID_ARCH'),os.getenv('ANDROID_ARCH') + '-linux-android')+''+os.getenv('ANDROID_BUILD_API_VERSION')+'-clang++'] 18 | + argfix([x for x in sys.argv[1:] if x not in ['-lutil']]) 19 | ) 20 | if ('-shared' in cmd) and ('-fPIC' not in cmd): 21 | idx = cmd.index('-shared') 22 | cmd = cmd[:idx+1] + ['-fPIC'] + cmd[idx+1:] 23 | # print(cmd) 24 | p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) 25 | output = p.stdout.read() 26 | print(output) 27 | -------------------------------------------------------------------------------- /container/android/bin/libs/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def argfix(args): 4 | is_32bit = os.getenv('ANDROID_ARCH') in ['arm','armeabi-v7a','x86'] 5 | to_add = '-m32' if is_32bit else '-m64' 6 | to_remove = ['-m64' if is_32bit else '-m32'] 7 | args = [to_add] + args 8 | for x in to_remove: 9 | try: 10 | while True: 11 | idx = args.index(x) 12 | args.pop(idx) 13 | except: 14 | pass 15 | return args 16 | -------------------------------------------------------------------------------- /container/android/bin/node-gyp-hook: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import sys, os, re 4 | 5 | cwd = os.getcwd() 6 | 7 | if cwd.endswith('/@parcel/watcher'): 8 | with open("binding.gyp", "r") as f: 9 | content = f.read() 10 | if 'OS=="linux"' in content: 11 | content = content.replace('OS=="linux"','OS==OS') 12 | content = content.replace('WATCHMAN','DISABLEDWATCHMAN') 13 | with open("binding.gyp", "w") as f: 14 | f.write(content) 15 | elif cwd.endswith('/@parcel/watcher'): 16 | with open("binding.gyp", "r") as f: 17 | content = f.read() 18 | if 'OS=="linux"' in content: 19 | content = content.replace('OS=="linux"','OS==OS') 20 | with open("binding.gyp", "w") as f: 21 | f.write(content) 22 | -------------------------------------------------------------------------------- /container/android/bin/node-hook: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$1" =~ /node-pre-gyp$ ]]; then 4 | /vscode-build/bin/patch-gyps 5 | fi 6 | 7 | NODE_BIN="$1" 8 | shift 9 | INJECT_ARGS=() 10 | APPEND_ARGS=() 11 | 12 | HAS_P=false 13 | 14 | for a in "$@"; do 15 | if [[ "$a" == "-p" ]]; then 16 | HAS_P=true 17 | fi 18 | done 19 | 20 | if ! $HAS_P; then 21 | INJECT_ARGS+=( --require /vscode-build/lib/node-preload.js ) 22 | fi 23 | 24 | if [[ "$1" == "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" ]]; then 25 | INJECT_ARGS+=( "$1" --nodedir /vscode/node-src/ ) 26 | shift 27 | elif [[ "$1" =~ /node-pre-gyp$ ]]; then 28 | case "$(basename "$(pwd)")" in 29 | argon2) 30 | APPEND_ARGS+=( --build-from-source ) 31 | # disable sse 32 | sed -i'' "s/target_arch == 'ia32' or target_arch == 'x64'/OS == 'abcdefzzzz'/g" binding.gyp 33 | ;; 34 | *) 35 | ;; 36 | esac 37 | else 38 | : 39 | fi 40 | 41 | # echo "> Node run: (cwd: $(pwd)) " $NODE_BIN "${INJECT_ARGS[@]}" "${@}" >> /tmp/log 42 | 43 | LD_PRELOAD=/vscode-build/lib/node-preload.so "$NODE_BIN" "${INJECT_ARGS[@]}" "$@" "${APPEND_ARGS[@]}" 44 | -------------------------------------------------------------------------------- /container/android/bin/patch-gyps: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | find /vscode/code-server -type d -name node-pre-gyp | while read d; do 4 | if [[ ! -d "$d.orig" ]]; then 5 | cp -r "$d" "$d.orig" 6 | fi 7 | sed -i'' "s/options.target_platform/'"android-$ANDROID_ARCH"'/g" "$d/lib/util/versioning.js" 8 | sed -i'' "s/process.platform/'"android-$ANDROID_ARCH"'/g" "$d/lib/util/versioning.js" 9 | done -------------------------------------------------------------------------------- /container/android/bin/patch-hook: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import sys, os, re 4 | 5 | cwd = os.getcwd() 6 | 7 | for a in sys.argv: 8 | if ("InotifyEventLoop.cpp" in a) and os.path.isfile(a): 9 | print("[vh] Patch InotifyEventLoop") 10 | with open(a,"r") as f: 11 | content = f.read() 12 | if "vscode-build/patch" not in content: 13 | content = "#include \""+("../"*20)+"/vscode-build/patch/bthread-pthread_cancel.h\"\n"+content 14 | with open(a,"w") as f: 15 | f.write(content) 16 | elif ("keytar_posix.cc" in a) and os.path.isfile(a): 17 | print("[vh] Patch keytar_posix.cc") 18 | with open("/vscode-build/patch/keytar_posix.cc","r") as f: 19 | content = f.read() 20 | with open(a,"w") as f: 21 | f.write(content) 22 | elif ("WatchmanBackend.cc" in a) and os.path.isfile(a): 23 | print("[vh] Patch WatchmanBackend.cc") 24 | with open(a,"r") as f: 25 | content = f.read() 26 | if "vscode-build/patch" not in content: 27 | content = "// vscode-build/patch\n" + content.replace('bool WatchmanBackend::checkAvailable() {','bool WatchmanBackend::checkAvailable() {return false;') 28 | with open(a,"w") as f: 29 | f.write(content) 30 | elif ('native-keymap' in cwd) and ('keysym_to_unicode.cc' in a) and os.path.isfile(a): 31 | print("[vh] Patch native-keymap x11") 32 | with open(a,"r") as f: 33 | content = f.read() 34 | for sym in [ 35 | 'XK_dead_doublegrave', 36 | 'XK_dead_belowring', 37 | 'XK_dead_belowmacron', 38 | 'XK_dead_belowcircumflex', 39 | 'XK_dead_belowtilde', 40 | 'XK_dead_belowbreve', 41 | 'XK_dead_belowdiaeresis', 42 | 'XK_dead_invertedbreve', 43 | 'XK_dead_belowcomma', 44 | 'XK_dead_currency', 45 | ]: 46 | content = re.sub('[^\n\r]+'+sym+'[^\n\r]+','',content) 47 | with open(a,"w") as f: 48 | f.write(content) 49 | elif ('native-keymap' in cwd) and ('keyboard_x.cc' in a) and os.path.isfile(a): 50 | print("[vh] Patch native-keymap keyboard") 51 | with open(a,"r") as f: 52 | content = f.read() 53 | for sym in [ 54 | 'X11/extensions/XKBrules', 55 | ]: 56 | content = re.sub('[^\n\r]+'+sym+'[^\n\r]+','',content) 57 | #content = re.sub('XkbRF_VarDefsRec.*XCloseDisplay\(display\);','',content, flags=re.S) 58 | content = re.sub(r'pthread_cancel(.*?)\)',r'pthread_kill\1,0)',content) 59 | new_content = "" 60 | remove_flag = False 61 | for l in content.splitlines(): 62 | if "XkbRF_VarDefsRec" in l: remove_flag = True 63 | if l == "}": remove_flag = False 64 | if not remove_flag: new_content += l + "\n" 65 | if "XCloseDisplay" in l: remove_flag = False 66 | with open(a,"w") as f: 67 | f.write(new_content) 68 | 69 | -------------------------------------------------------------------------------- /container/android/bin/pkg-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | -------------------------------------------------------------------------------- /container/android/hostbin/g++: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ADDITIONAL_ARGS= 4 | case $ANDROID_ARCH in 5 | arm|armeabi-v7a) 6 | ADDITIONAL_ARGS="$ADDITIONAL_ARGS -m32" 7 | ;; 8 | x86) 9 | ADDITIONAL_ARGS="$ADDITIONAL_ARGS -m32" 10 | ;; 11 | x86_64) 12 | ;; 13 | arm64|aarch64) 14 | ;; 15 | *) 16 | echo "Unsupported arch $ANDROID_ARCH" 17 | exit 1 18 | ;; 19 | esac 20 | 21 | /usr/bin/g++-10 $ADDITIONAL_ARGS "$@" -------------------------------------------------------------------------------- /container/android/hostbin/gcc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ADDITIONAL_ARGS= 4 | case $ANDROID_ARCH in 5 | arm|armeabi-v7a) 6 | ADDITIONAL_ARGS="$ADDITIONAL_ARGS -m32" 7 | ;; 8 | x86) 9 | ADDITIONAL_ARGS="$ADDITIONAL_ARGS -m32" 10 | ;; 11 | x86_64) 12 | ;; 13 | arm64|aarch64) 14 | ;; 15 | *) 16 | echo "Unsupported arch $ANDROID_ARCH" 17 | exit 1 18 | ;; 19 | esac 20 | 21 | /usr/bin/gcc-10 $ADDITIONAL_ARGS "$@" -------------------------------------------------------------------------------- /container/android/lib/.gitignore: -------------------------------------------------------------------------------- 1 | *.so -------------------------------------------------------------------------------- /container/android/lib/node-preload.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | typedef ssize_t (*readlink_t)(const char *restrict pathname, char *restrict buf, 10 | size_t bufsiz); 11 | 12 | ssize_t readlink(const char *restrict path, char *restrict buffer, size_t size) { 13 | static readlink_t orig = NULL; 14 | int r; 15 | if(!orig) orig = dlsym(RTLD_NEXT, "readlink"); 16 | r = (orig)(path, buffer, size); 17 | if(r>=10 && r { 27 | //https://github.com/xxorax/node-shell-escape/blob/master/shell-escape.js 28 | const shellescape = function (a) { 29 | var ret = []; 30 | 31 | a.forEach(function(s) { 32 | if (/[^A-Za-z0-9_\/:=-]/.test(s)) { 33 | s = "'"+s.replace(/'/g,"'\\''")+"'"; 34 | s = s.replace(/^(?:'')+/g, '') // unduplicate single-quote at the beginning 35 | .replace(/\\'''/g, "\\'" ); // remove non-escaped single-quote if there are enclosed between 2 escaped 36 | } 37 | ret.push(s); 38 | }); 39 | 40 | return ret.join(' '); 41 | } 42 | fs.copyFileSync = function(...args) { 43 | if(args.length===2 && typeof args[0]==='string' && typeof args[1]==='string') { 44 | cp.execSync(shellescape(["cp", "-f", args[0], args[1]])); 45 | } else { 46 | return origFn.call(this, ...args); 47 | } 48 | } 49 | } 50 | )(fs.copyFileSync); -------------------------------------------------------------------------------- /container/android/patch/X11/DECkeysym.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: DECkeysym.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ 2 | 3 | /*********************************************************** 4 | 5 | Copyright 1988, 1998 The Open Group 6 | 7 | Permission to use, copy, modify, distribute, and sell this software and its 8 | documentation for any purpose is hereby granted without fee, provided that 9 | the above copyright notice appear in all copies and that both that 10 | copyright notice and this permission notice appear in supporting 11 | documentation. 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall not be 24 | used in advertising or otherwise to promote the sale, use or other dealings 25 | in this Software without prior written authorization from The Open Group. 26 | 27 | 28 | Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts. 29 | 30 | All Rights Reserved 31 | 32 | Permission to use, copy, modify, and distribute this software and its 33 | documentation for any purpose and without fee is hereby granted, 34 | provided that the above copyright notice appear in all copies and that 35 | both that copyright notice and this permission notice appear in 36 | supporting documentation, and that the name of Digital not be 37 | used in advertising or publicity pertaining to distribution of the 38 | software without specific, written prior permission. 39 | 40 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 41 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 42 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 43 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 44 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 45 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 46 | SOFTWARE. 47 | 48 | ******************************************************************/ 49 | 50 | /* 51 | * DEC private keysyms 52 | * (29th bit set) 53 | */ 54 | 55 | /* two-key compose sequence initiators, chosen to map to Latin1 characters */ 56 | 57 | #define DXK_ring_accent 0x1000FEB0 58 | #define DXK_circumflex_accent 0x1000FE5E 59 | #define DXK_cedilla_accent 0x1000FE2C 60 | #define DXK_acute_accent 0x1000FE27 61 | #define DXK_grave_accent 0x1000FE60 62 | #define DXK_tilde 0x1000FE7E 63 | #define DXK_diaeresis 0x1000FE22 64 | 65 | /* special keysym for LK2** "Remove" key on editing keypad */ 66 | 67 | #define DXK_Remove 0x1000FF00 /* Remove */ 68 | -------------------------------------------------------------------------------- /container/android/patch/X11/ImUtil.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/lib/X11/ImUtil.h,v 1.2 2003/04/15 22:10:07 herrb Exp $ */ 2 | 3 | #ifndef _IMUTIL_H_ 4 | #define _IMUTIL_H_ 5 | 6 | extern int 7 | _XGetScanlinePad( 8 | Display *dpy, 9 | int depth); 10 | 11 | extern int 12 | _XGetBitsPerPixel( 13 | Display *dpy, 14 | int depth); 15 | 16 | extern int 17 | _XSetImage( 18 | XImage *srcimg, 19 | register XImage *dstimg, 20 | register int x, 21 | register int y); 22 | 23 | extern int 24 | _XReverse_Bytes( 25 | register unsigned char *bpt, 26 | register int nb); 27 | extern void 28 | _XInitImageFuncPtrs( 29 | register XImage *image); 30 | 31 | #endif /* _IMUTIL_H_ */ 32 | -------------------------------------------------------------------------------- /container/android/patch/X11/Sunkeysym.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Sunkeysym.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ 2 | 3 | /************************************************************ 4 | 5 | Copyright 1991, 1998 The Open Group 6 | 7 | Permission to use, copy, modify, distribute, and sell this software and its 8 | documentation for any purpose is hereby granted without fee, provided that 9 | the above copyright notice appear in all copies and that both that 10 | copyright notice and this permission notice appear in supporting 11 | documentation. 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall not be 24 | used in advertising or otherwise to promote the sale, use or other dealings 25 | in this Software without prior written authorization from The Open Group. 26 | 27 | 28 | Copyright 1991 by Sun Microsystems, Inc. Mountain View, CA. 29 | 30 | All Rights Reserved 31 | 32 | Permission to use, copy, modify, and distribute this 33 | software and its documentation for any purpose and without 34 | fee is hereby granted, provided that the above copyright no- 35 | tice appear in all copies and that both that copyright no- 36 | tice and this permission notice appear in supporting docu- 37 | mentation, and that the name of Sun not be used in 38 | advertising or publicity pertaining to distribution of the 39 | software without specific prior written permission. Sun 40 | makes no representations about the suitability of this 41 | software for any purpose. It is provided "as is" without any 42 | express or implied warranty. 43 | 44 | SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 45 | INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- 46 | NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- 47 | ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 48 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 49 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 50 | OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 51 | THE USE OR PERFORMANCE OF THIS SOFTWARE. 52 | 53 | ***********************************************************/ 54 | 55 | /* 56 | * Floating Accent 57 | */ 58 | 59 | #define SunXK_FA_Grave 0x1005FF00 60 | #define SunXK_FA_Circum 0x1005FF01 61 | #define SunXK_FA_Tilde 0x1005FF02 62 | #define SunXK_FA_Acute 0x1005FF03 63 | #define SunXK_FA_Diaeresis 0x1005FF04 64 | #define SunXK_FA_Cedilla 0x1005FF05 65 | 66 | /* 67 | * Miscellaneous Functions 68 | */ 69 | 70 | #define SunXK_F36 0x1005FF10 /* Labeled F11 */ 71 | #define SunXK_F37 0x1005FF11 /* Labeled F12 */ 72 | 73 | #define SunXK_Sys_Req 0x1005FF60 74 | #define SunXK_Print_Screen 0x0000FF61 /* Same as XK_Print */ 75 | 76 | /* 77 | * International & Multi-Key Character Composition 78 | */ 79 | 80 | #define SunXK_Compose 0x0000FF20 /* Same as XK_Multi_key */ 81 | #define SunXK_AltGraph 0x0000FF7E /* Same as XK_Mode_switch */ 82 | 83 | /* 84 | * Cursor Control 85 | */ 86 | 87 | #define SunXK_PageUp 0x0000FF55 /* Same as XK_Prior */ 88 | #define SunXK_PageDown 0x0000FF56 /* Same as XK_Next */ 89 | 90 | /* 91 | * Open Look Functions 92 | */ 93 | 94 | #define SunXK_Undo 0x0000FF65 /* Same as XK_Undo */ 95 | #define SunXK_Again 0x0000FF66 /* Same as XK_Redo */ 96 | #define SunXK_Find 0x0000FF68 /* Same as XK_Find */ 97 | #define SunXK_Stop 0x0000FF69 /* Same as XK_Cancel */ 98 | #define SunXK_Props 0x1005FF70 99 | #define SunXK_Front 0x1005FF71 100 | #define SunXK_Copy 0x1005FF72 101 | #define SunXK_Open 0x1005FF73 102 | #define SunXK_Paste 0x1005FF74 103 | #define SunXK_Cut 0x1005FF75 104 | 105 | #define SunXK_PowerSwitch 0x1005FF76 106 | #define SunXK_AudioLowerVolume 0x1005FF77 107 | #define SunXK_AudioMute 0x1005FF78 108 | #define SunXK_AudioRaiseVolume 0x1005FF79 109 | #define SunXK_VideoDegauss 0x1005FF7A 110 | #define SunXK_VideoLowerBrightness 0x1005FF7B 111 | #define SunXK_VideoRaiseBrightness 0x1005FF7C 112 | #define SunXK_PowerSwitchShift 0x1005FF7D 113 | -------------------------------------------------------------------------------- /container/android/patch/X11/X11.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vhqtvn/vscode-android-server/70de5e034b19438eec124f39b905d5f96d5716d9/container/android/patch/X11/X11.tar.gz -------------------------------------------------------------------------------- /container/android/patch/X11/XWDFile.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: XWDFile.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ 2 | /* 3 | 4 | Copyright 1985, 1986, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | 26 | */ 27 | 28 | /* 29 | * XWDFile.h MIT Project Athena, X Window system window raster 30 | * image dumper, dump file format header file. 31 | * 32 | * Author: Tony Della Fera, DEC 33 | * 27-Jun-85 34 | * 35 | * Modifier: William F. Wyatt, SAO 36 | * 18-Nov-86 - version 6 for saving/restoring color maps 37 | */ 38 | 39 | #ifndef XWDFILE_H 40 | #define XWDFILE_H 41 | 42 | #include 43 | 44 | #define XWD_FILE_VERSION 7 45 | #define sz_XWDheader 100 46 | #define sz_XWDColor 12 47 | 48 | typedef CARD32 xwdval; /* for old broken programs */ 49 | 50 | /* Values in the file are most significant byte first. */ 51 | 52 | typedef struct _xwd_file_header { 53 | /* header_size = SIZEOF(XWDheader) + length of null-terminated 54 | * window name. */ 55 | CARD32 header_size B32; 56 | 57 | CARD32 file_version B32; /* = XWD_FILE_VERSION above */ 58 | CARD32 pixmap_format B32; /* ZPixmap or XYPixmap */ 59 | CARD32 pixmap_depth B32; /* Pixmap depth */ 60 | CARD32 pixmap_width B32; /* Pixmap width */ 61 | CARD32 pixmap_height B32; /* Pixmap height */ 62 | CARD32 xoffset B32; /* Bitmap x offset, normally 0 */ 63 | CARD32 byte_order B32; /* of image data: MSBFirst, LSBFirst */ 64 | 65 | /* bitmap_unit applies to bitmaps (depth 1 format XY) only. 66 | * It is the number of bits that each scanline is padded to. */ 67 | CARD32 bitmap_unit B32; 68 | 69 | CARD32 bitmap_bit_order B32; /* bitmaps only: MSBFirst, LSBFirst */ 70 | 71 | /* bitmap_pad applies to pixmaps (non-bitmaps) only. 72 | * It is the number of bits that each scanline is padded to. */ 73 | CARD32 bitmap_pad B32; 74 | 75 | CARD32 bits_per_pixel B32; /* Bits per pixel */ 76 | 77 | /* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps) 78 | * or bitmap_pad (pixmaps). It is the delta (in bytes) to get 79 | * to the same x position on an adjacent row. */ 80 | CARD32 bytes_per_line B32; 81 | CARD32 visual_class B32; /* Class of colormap */ 82 | CARD32 red_mask B32; /* Z red mask */ 83 | CARD32 green_mask B32; /* Z green mask */ 84 | CARD32 blue_mask B32; /* Z blue mask */ 85 | CARD32 bits_per_rgb B32; /* Log2 of distinct color values */ 86 | CARD32 colormap_entries B32; /* Number of entries in colormap; not used? */ 87 | CARD32 ncolors B32; /* Number of XWDColor structures */ 88 | CARD32 window_width B32; /* Window width */ 89 | CARD32 window_height B32; /* Window height */ 90 | CARD32 window_x B32; /* Window upper left X coordinate */ 91 | CARD32 window_y B32; /* Window upper left Y coordinate */ 92 | CARD32 window_bdrwidth B32; /* Window border width */ 93 | } XWDFileHeader; 94 | 95 | /* Null-terminated window name follows the above structure. */ 96 | 97 | /* Next comes XWDColor structures, at offset XWDFileHeader.header_size in 98 | * the file. XWDFileHeader.ncolors tells how many XWDColor structures 99 | * there are. 100 | */ 101 | 102 | typedef struct { 103 | CARD32 pixel B32; 104 | CARD16 red B16; 105 | CARD16 green B16; 106 | CARD16 blue B16; 107 | CARD8 flags; 108 | CARD8 pad; 109 | } XWDColor; 110 | 111 | /* Last comes the image data in the format described by XWDFileHeader. */ 112 | 113 | #endif /* XWDFILE_H */ 114 | 115 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xalloca.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Xalloca.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ 2 | 3 | /* 4 | 5 | Copyright 1995, 1998 The Open Group 6 | 7 | Permission to use, copy, modify, distribute, and sell this software and its 8 | documentation for any purpose is hereby granted without fee, provided that 9 | the above copyright notice appear in all copies and that both that 10 | copyright notice and this permission notice appear in supporting 11 | documentation. 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | Except as contained in this notice, the name of The Open Group shall 25 | not be used in advertising or otherwise to promote the sale, use or 26 | other dealings in this Software without prior written authorization 27 | from The Open Group. 28 | 29 | */ 30 | /* $XFree86: xc/include/Xalloca.h,v 3.10 2001/12/14 19:53:25 dawes Exp $ */ 31 | 32 | /* 33 | * The purpose of this header is to define the macros ALLOCATE_LOCAL and 34 | * DEALLOCATE_LOCAL appropriately for the platform being compiled on. 35 | * These macros are used to make fast, function-local memory allocations. 36 | * Their characteristics are as follows: 37 | * 38 | * void *ALLOCATE_LOCAL(int size) 39 | * Returns a pointer to size bytes of memory, or NULL if the allocation 40 | * failed. The memory must be freed with DEALLOCATE_LOCAL before the 41 | * function that made the allocation returns. You should not ask for 42 | * large blocks of memory with this function, since on many platforms 43 | * the memory comes from the stack, which may have limited size. 44 | * 45 | * void DEALLOCATE_LOCAL(void *) 46 | * Frees the memory allocated by ALLOCATE_LOCAL. Omission of this 47 | * step may be harmless on some platforms, but will result in 48 | * memory leaks or worse on others. 49 | * 50 | * Before including this file, you should define two macros, 51 | * ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the 52 | * same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The 53 | * header uses the fallbacks if it doesn't know a "better" way to define 54 | * ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be: 55 | * 56 | * #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size) 57 | * #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr) 58 | * #include "Xalloca.h" 59 | */ 60 | 61 | #ifndef XALLOCA_H 62 | #define XALLOCA_H 1 63 | 64 | #ifndef INCLUDE_ALLOCA_H 65 | # if defined(__SUNPRO_C) /* Need to add more here to match Imake *.cf's */ 66 | # define INCLUDE_ALLOCA_H 67 | # endif 68 | #endif 69 | 70 | #ifdef INCLUDE_ALLOCA_H 71 | # include 72 | #endif 73 | 74 | #ifndef NO_ALLOCA 75 | /* 76 | * os-dependent definition of local allocation and deallocation 77 | * If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK 78 | * for ALLOCATE/DEALLOCATE_LOCAL then you add that in here. 79 | */ 80 | # if defined(__HIGHC__) 81 | # ifndef NCR 82 | extern char *alloca(); 83 | # if HCVERSION < 21003 84 | # define ALLOCATE_LOCAL(size) alloca((int)(size)) 85 | pragma on(alloca); 86 | # else /* HCVERSION >= 21003 */ 87 | # define ALLOCATE_LOCAL(size) _Alloca((int)(size)) 88 | # endif /* HCVERSION < 21003 */ 89 | # else /* NCR */ 90 | # define ALLOCATE_LOCAL(size) alloca(size) 91 | # endif 92 | # endif /* defined(__HIGHC__) */ 93 | 94 | 95 | # ifdef __GNUC__ 96 | # ifndef alloca 97 | # define alloca __builtin_alloca 98 | # endif /* !alloca */ 99 | # define ALLOCATE_LOCAL(size) alloca((int)(size)) 100 | # else /* ! __GNUC__ */ 101 | 102 | /* 103 | * warning: old mips alloca (pre 2.10) is unusable, new one is built in 104 | * Test is easy, the new one is named __builtin_alloca and comes 105 | * from alloca.h which #defines alloca. 106 | */ 107 | # ifndef NCR 108 | # if defined(vax) || defined(sun) || defined(apollo) || defined(stellar) || defined(alloca) 109 | /* 110 | * Some System V boxes extract alloca.o from /lib/libPW.a; if you 111 | * decide that you don't want to use alloca, you might want to fix it here. 112 | */ 113 | /* alloca might be a macro taking one arg (hi, Sun!), so give it one. */ 114 | # ifndef __sgi /* IRIX 5/6 has definition */ 115 | # ifndef __QNX__ 116 | # define __Xnullarg /* as nothing */ 117 | # ifndef X_NOT_STDC_ENV 118 | extern void *alloca(__Xnullarg); 119 | # else 120 | extern char *alloca(__Xnullarg); 121 | # endif 122 | # endif /* __QNX__ */ 123 | # endif /* __sgi */ 124 | # define ALLOCATE_LOCAL(size) alloca((int)(size)) 125 | # endif /* who does alloca */ 126 | # endif /* NCR */ 127 | # endif /* __GNUC__ */ 128 | 129 | #endif /* NO_ALLOCA */ 130 | 131 | #if !defined(ALLOCATE_LOCAL) 132 | # if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK) 133 | # define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size) 134 | # define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr) 135 | # else /* no fallbacks supplied; error */ 136 | # define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined! 137 | # define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined! 138 | # endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */ 139 | #else 140 | # if !defined(DEALLOCATE_LOCAL) 141 | # define DEALLOCATE_LOCAL(_ptr) do {} while(0) 142 | # endif 143 | #endif /* defined(ALLOCATE_LOCAL) */ 144 | 145 | #endif /* XALLOCA_H */ 146 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xarch.h: -------------------------------------------------------------------------------- 1 | #ifndef _XARCH_H_ 2 | #define _XARCH_H_ 3 | 4 | /* 5 | * Copyright 1997 Metro Link Incorporated 6 | * 7 | * All Rights Reserved 8 | * 9 | * Permission to use, copy, modify, distribute, and sell this software and its 10 | * documentation for any purpose is hereby granted without fee, provided that 11 | * the above copyright notice appear in all copies and that both that 12 | * copyright notice and this permission notice appear in supporting 13 | * documentation, and that the names of the above listed copyright holder(s) 14 | * not be used in advertising or publicity pertaining to distribution of 15 | * the software without specific, written prior permission. The above listed 16 | * copyright holder(s) make(s) no representations about the suitability of 17 | * this software for any purpose. It is provided "as is" without express or 18 | * implied warranty. 19 | * 20 | * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD 21 | * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 22 | * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE 23 | * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 24 | * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 25 | * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 26 | * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 27 | */ 28 | /* $XFree86: xc/include/Xarch.h,v 1.10tsi Exp $ */ 29 | 30 | 31 | /* 32 | * Determine the machine's byte order. 33 | */ 34 | 35 | /* See if it is set in the imake config first */ 36 | #ifdef X_BYTE_ORDER 37 | 38 | #define X_BIG_ENDIAN 4321 39 | #define X_LITTLE_ENDIAN 1234 40 | 41 | #else 42 | 43 | #ifdef SVR4 44 | #if defined(NCR) || defined(Mips) || defined(__sgi) 45 | #include 46 | #else 47 | #if !defined(sun) 48 | #include 49 | #endif 50 | #endif 51 | #elif defined(CSRG_BASED) 52 | #if defined(__NetBSD__) || defined(__OpenBSD__) 53 | #include 54 | #endif 55 | #include 56 | #elif defined(linux) 57 | #if defined __STRICT_ANSI__ 58 | #undef __STRICT_ANSI__ 59 | #include 60 | #define __STRICT_ANSI__ 61 | #else 62 | #include 63 | #endif 64 | /* 'endian.h' might have been included before 'Xarch.h' */ 65 | #if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN) 66 | #define LITTLE_ENDIAN __LITTLE_ENDIAN 67 | #endif 68 | #if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN) 69 | #define BIG_ENDIAN __BIG_ENDIAN 70 | #endif 71 | #if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN) 72 | #define PDP_ENDIAN __PDP_ENDIAN 73 | #endif 74 | #if !defined(BYTE_ORDER) && defined(__BYTE_ORDER) 75 | #define BYTE_ORDER __BYTE_ORDER 76 | #endif 77 | #elif defined(Lynx) 78 | #if 0 79 | /* LynxOS 2.4.0 has wrong defines in bsd/ip.h */ 80 | #include 81 | #include 82 | #include 83 | #endif 84 | #endif 85 | 86 | #ifndef BYTE_ORDER 87 | #define LITTLE_ENDIAN 1234 88 | #define BIG_ENDIAN 4321 89 | 90 | #if defined(__QNX__) && !defined(__QNXNTO__) 91 | #define BYTE_ORDER LITTLE_ENDIAN 92 | #endif 93 | 94 | #if defined(__QNXNTO__) 95 | #if defined(i386) || defined(__i386__) || defined(__x86__) 96 | #define BYTE_ORDER LITTLE_ENDIAN 97 | #else 98 | #define BYTE_ORDER BIG_ENDIAN 99 | #endif 100 | #endif 101 | 102 | #ifdef Lynx 103 | #if defined(i386) || defined(__i386__) || defined(__x86__) 104 | #define BYTE_ORDER LITTLE_ENDIAN 105 | #else 106 | #define BYTE_ORDER BIG_ENDIAN 107 | #endif 108 | #endif 109 | #if (defined(sun) && defined(SVR4)) && !defined(Lynx) 110 | #include 111 | #ifdef _LITTLE_ENDIAN 112 | #define BYTE_ORDER LITTLE_ENDIAN 113 | #endif 114 | #ifdef _BIG_ENDIAN 115 | #define BYTE_ORDER BIG_ENDIAN 116 | #endif 117 | #endif /* sun */ 118 | #endif /* BYTE_ORDER */ 119 | 120 | #define X_BYTE_ORDER BYTE_ORDER 121 | #define X_BIG_ENDIAN BIG_ENDIAN 122 | #define X_LITTLE_ENDIAN LITTLE_ENDIAN 123 | 124 | #endif /* not in imake config */ 125 | 126 | #endif /* _XARCH_H_ */ 127 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xatom.h: -------------------------------------------------------------------------------- 1 | #ifndef XATOM_H 2 | #define XATOM_H 1 3 | 4 | /* THIS IS A GENERATED FILE 5 | * 6 | * Do not change! Changing this file implies a protocol change! 7 | */ 8 | 9 | #define XA_PRIMARY ((Atom) 1) 10 | #define XA_SECONDARY ((Atom) 2) 11 | #define XA_ARC ((Atom) 3) 12 | #define XA_ATOM ((Atom) 4) 13 | #define XA_BITMAP ((Atom) 5) 14 | #define XA_CARDINAL ((Atom) 6) 15 | #define XA_COLORMAP ((Atom) 7) 16 | #define XA_CURSOR ((Atom) 8) 17 | #define XA_CUT_BUFFER0 ((Atom) 9) 18 | #define XA_CUT_BUFFER1 ((Atom) 10) 19 | #define XA_CUT_BUFFER2 ((Atom) 11) 20 | #define XA_CUT_BUFFER3 ((Atom) 12) 21 | #define XA_CUT_BUFFER4 ((Atom) 13) 22 | #define XA_CUT_BUFFER5 ((Atom) 14) 23 | #define XA_CUT_BUFFER6 ((Atom) 15) 24 | #define XA_CUT_BUFFER7 ((Atom) 16) 25 | #define XA_DRAWABLE ((Atom) 17) 26 | #define XA_FONT ((Atom) 18) 27 | #define XA_INTEGER ((Atom) 19) 28 | #define XA_PIXMAP ((Atom) 20) 29 | #define XA_POINT ((Atom) 21) 30 | #define XA_RECTANGLE ((Atom) 22) 31 | #define XA_RESOURCE_MANAGER ((Atom) 23) 32 | #define XA_RGB_COLOR_MAP ((Atom) 24) 33 | #define XA_RGB_BEST_MAP ((Atom) 25) 34 | #define XA_RGB_BLUE_MAP ((Atom) 26) 35 | #define XA_RGB_DEFAULT_MAP ((Atom) 27) 36 | #define XA_RGB_GRAY_MAP ((Atom) 28) 37 | #define XA_RGB_GREEN_MAP ((Atom) 29) 38 | #define XA_RGB_RED_MAP ((Atom) 30) 39 | #define XA_STRING ((Atom) 31) 40 | #define XA_VISUALID ((Atom) 32) 41 | #define XA_WINDOW ((Atom) 33) 42 | #define XA_WM_COMMAND ((Atom) 34) 43 | #define XA_WM_HINTS ((Atom) 35) 44 | #define XA_WM_CLIENT_MACHINE ((Atom) 36) 45 | #define XA_WM_ICON_NAME ((Atom) 37) 46 | #define XA_WM_ICON_SIZE ((Atom) 38) 47 | #define XA_WM_NAME ((Atom) 39) 48 | #define XA_WM_NORMAL_HINTS ((Atom) 40) 49 | #define XA_WM_SIZE_HINTS ((Atom) 41) 50 | #define XA_WM_ZOOM_HINTS ((Atom) 42) 51 | #define XA_MIN_SPACE ((Atom) 43) 52 | #define XA_NORM_SPACE ((Atom) 44) 53 | #define XA_MAX_SPACE ((Atom) 45) 54 | #define XA_END_SPACE ((Atom) 46) 55 | #define XA_SUPERSCRIPT_X ((Atom) 47) 56 | #define XA_SUPERSCRIPT_Y ((Atom) 48) 57 | #define XA_SUBSCRIPT_X ((Atom) 49) 58 | #define XA_SUBSCRIPT_Y ((Atom) 50) 59 | #define XA_UNDERLINE_POSITION ((Atom) 51) 60 | #define XA_UNDERLINE_THICKNESS ((Atom) 52) 61 | #define XA_STRIKEOUT_ASCENT ((Atom) 53) 62 | #define XA_STRIKEOUT_DESCENT ((Atom) 54) 63 | #define XA_ITALIC_ANGLE ((Atom) 55) 64 | #define XA_X_HEIGHT ((Atom) 56) 65 | #define XA_QUAD_WIDTH ((Atom) 57) 66 | #define XA_WEIGHT ((Atom) 58) 67 | #define XA_POINT_SIZE ((Atom) 59) 68 | #define XA_RESOLUTION ((Atom) 60) 69 | #define XA_COPYRIGHT ((Atom) 61) 70 | #define XA_NOTICE ((Atom) 62) 71 | #define XA_FONT_NAME ((Atom) 63) 72 | #define XA_FAMILY_NAME ((Atom) 64) 73 | #define XA_FULL_NAME ((Atom) 65) 74 | #define XA_CAP_HEIGHT ((Atom) 66) 75 | #define XA_WM_CLASS ((Atom) 67) 76 | #define XA_WM_TRANSIENT_FOR ((Atom) 68) 77 | 78 | #define XA_LAST_PREDEFINED ((Atom) 68) 79 | #endif /* XATOM_H */ 80 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xdefs.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/include/Xdefs.h,v 1.2 1999/08/22 06:21:20 dawes Exp $ */ 2 | 3 | /*********************************************************** 4 | 5 | Copyright (c) 1999 The XFree86 Project Inc. 6 | 7 | All Rights Reserved. 8 | 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 16 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | Except as contained in this notice, the name of The XFree86 Project 20 | Inc. shall not be used in advertising or otherwise to promote the 21 | sale, use or other dealings in this Software without prior written 22 | authorization from The XFree86 Project Inc.. 23 | 24 | */ 25 | 26 | /** 27 | ** Types definitions shared between server and clients 28 | **/ 29 | 30 | #ifndef _XDEFS_H 31 | #define _XDEFS_H 32 | 33 | #ifdef _XSERVER64 34 | #include 35 | #endif 36 | 37 | #ifndef _XTYPEDEF_ATOM 38 | # define _XTYPEDEF_ATOM 39 | # ifndef _XSERVER64 40 | typedef unsigned long Atom; 41 | # else 42 | typedef CARD32 Atom; 43 | # endif 44 | #endif 45 | 46 | #ifndef Bool 47 | # ifndef _XTYPEDEF_BOOL 48 | # define _XTYPEDEF_BOOL 49 | typedef int Bool; 50 | # endif 51 | #endif 52 | 53 | #ifndef _XTYPEDEF_POINTER 54 | # define _XTYPEDEF_POINTER 55 | typedef void *pointer; 56 | #endif 57 | 58 | #ifndef _XTYPEDEF_CLIENTPTR 59 | typedef struct _Client *ClientPtr; 60 | # define _XTYPEDEF_CLIENTPTR 61 | #endif 62 | 63 | #ifndef _XTYPEDEF_XID 64 | # define _XTYPEDEF_XID 65 | # ifndef _XSERVER64 66 | typedef unsigned long XID; 67 | # else 68 | typedef CARD32 XID; 69 | # endif 70 | #endif 71 | 72 | #ifndef _XTYPEDEF_MASK 73 | # define _XTYPEDEF_MASK 74 | # ifndef _XSERVER64 75 | typedef unsigned long Mask; 76 | # else 77 | typedef CARD32 Mask; 78 | # endif 79 | #endif 80 | 81 | #ifndef _XTYPEDEF_FONTPTR 82 | # define _XTYPEDEF_FONTPTR 83 | typedef struct _Font *FontPtr; /* also in fonts/include/font.h */ 84 | #endif 85 | 86 | #ifndef _XTYPEDEF_FONT 87 | # define _XTYPEDEF_FONT 88 | typedef XID Font; 89 | #endif 90 | 91 | #ifndef _XTYPEDEF_FSID 92 | # ifndef _XSERVER64 93 | typedef unsigned long FSID; 94 | # else 95 | typedef CARD32 FSID; 96 | # endif 97 | #endif 98 | 99 | typedef FSID AccContext; 100 | 101 | /* OS independent time value 102 | XXX Should probably go in Xos.h */ 103 | typedef struct timeval **OSTimePtr; 104 | 105 | 106 | typedef void (* BlockHandlerProcPtr)(pointer /* blockData */, 107 | OSTimePtr /* pTimeout */, 108 | pointer /* pReadmask */); 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xfuncproto.h: -------------------------------------------------------------------------------- 1 | /* Xfuncproto.h. Generated from Xfuncproto.h.in by configure. */ 2 | /* $Xorg: Xfuncproto.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ 3 | /* 4 | * 5 | Copyright 1989, 1991, 1998 The Open Group 6 | 7 | Permission to use, copy, modify, distribute, and sell this software and its 8 | documentation for any purpose is hereby granted without fee, provided that 9 | the above copyright notice appear in all copies and that both that 10 | copyright notice and this permission notice appear in supporting 11 | documentation. 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall not be 24 | used in advertising or otherwise to promote the sale, use or other dealings 25 | in this Software without prior written authorization from The Open Group. 26 | * 27 | */ 28 | /* $XFree86: xc/include/Xfuncproto.h,v 3.4 2001/12/14 19:53:25 dawes Exp $ */ 29 | 30 | /* Definitions to make function prototypes manageable */ 31 | 32 | #ifndef _XFUNCPROTO_H_ 33 | #define _XFUNCPROTO_H_ 34 | 35 | #ifndef NeedFunctionPrototypes 36 | #define NeedFunctionPrototypes 1 37 | #endif /* NeedFunctionPrototypes */ 38 | 39 | #ifndef NeedVarargsPrototypes 40 | #define NeedVarargsPrototypes 1 41 | #endif /* NeedVarargsPrototypes */ 42 | 43 | #if NeedFunctionPrototypes 44 | 45 | #ifndef NeedNestedPrototypes 46 | #define NeedNestedPrototypes 1 47 | #endif /* NeedNestedPrototypes */ 48 | 49 | #ifndef _Xconst 50 | #define _Xconst const 51 | #endif /* _Xconst */ 52 | 53 | /* Function prototype configuration (see configure for more info) */ 54 | #ifndef NARROWPROTO 55 | #define NARROWPROTO 56 | #endif 57 | #ifndef FUNCPROTO 58 | #define FUNCPROTO 15 59 | #endif 60 | 61 | #ifndef NeedWidePrototypes 62 | #ifdef NARROWPROTO 63 | #define NeedWidePrototypes 0 64 | #else 65 | #define NeedWidePrototypes 1 /* default to make interropt. easier */ 66 | #endif 67 | #endif /* NeedWidePrototypes */ 68 | 69 | #endif /* NeedFunctionPrototypes */ 70 | 71 | #ifndef _XFUNCPROTOBEGIN 72 | #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ 73 | #define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ 74 | #define _XFUNCPROTOEND } 75 | #else 76 | #define _XFUNCPROTOBEGIN 77 | #define _XFUNCPROTOEND 78 | #endif 79 | #endif /* _XFUNCPROTOBEGIN */ 80 | 81 | #if defined(__GNUC__) && (__GNUC__ >= 4) 82 | # define _X_SENTINEL(x) __attribute__ ((__sentinel__(x))) 83 | # define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) 84 | #else 85 | # define _X_SENTINEL(x) 86 | # define _X_ATTRIBUTE_PRINTF(x,y) 87 | #endif /* GNUC >= 4 */ 88 | 89 | #if defined(__GNUC__) && (__GNUC__ >= 4) 90 | # define _X_EXPORT __attribute__((visibility("default"))) 91 | # define _X_HIDDEN __attribute__((visibility("hidden"))) 92 | # define _X_INTERNAL __attribute__((visibility("internal"))) 93 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) 94 | # define _X_EXPORT __global 95 | # define _X_HIDDEN __hidden 96 | # define _X_INTERNAL __hidden 97 | #else /* not gcc >= 4 and not Sun Studio >= 8 */ 98 | # define _X_EXPORT 99 | # define _X_HIDDEN 100 | # define _X_INTERNAL 101 | #endif /* GNUC >= 4 */ 102 | 103 | #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) 104 | # define _X_LIKELY(x) __builtin_expect(!!(x), 1) 105 | # define _X_UNLIKELY(x) __builtin_expect(!!(x), 0) 106 | # define _X_INLINE inline 107 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) 108 | # define _X_LIKELY(x) (x) 109 | # define _X_UNLIKELY(x) (x) 110 | # define _X_INLINE inline 111 | #else /* not gcc >= 3.3 and not Sun Studio >= 8 */ 112 | # define _X_LIKELY(x) (x) 113 | # define _X_UNLIKELY(x) (x) 114 | # define _X_INLINE 115 | #endif 116 | 117 | #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301) 118 | # define _X_DEPRECATED __attribute__((deprecated)) 119 | #else /* not gcc >= 3.1 */ 120 | # define _X_DEPRECATED 121 | #endif 122 | 123 | #endif /* _XFUNCPROTO_H_ */ 124 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xfuncs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $XdotOrg: xc/include/Xfuncs.h,v 1.2 2004/04/23 18:43:05 eich Exp $ 3 | * $Xorg: Xfuncs.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ 4 | * 5 | * 6 | Copyright 1990, 1998 The Open Group 7 | 8 | Permission to use, copy, modify, distribute, and sell this software and its 9 | documentation for any purpose is hereby granted without fee, provided that 10 | the above copyright notice appear in all copies and that both that 11 | copyright notice and this permission notice appear in supporting 12 | documentation. 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | Except as contained in this notice, the name of The Open Group shall not be 25 | used in advertising or otherwise to promote the sale, use or other dealings 26 | in this Software without prior written authorization from The Open Group. 27 | * 28 | */ 29 | /* $XFree86: xc/include/Xfuncs.h,v 3.10 2002/05/31 18:45:38 dawes Exp $ */ 30 | 31 | #ifndef _XFUNCS_H_ 32 | #define _XFUNCS_H_ 33 | 34 | #include 35 | 36 | /* the old Xfuncs.h, for pre-R6 */ 37 | #if !(defined(XFree86LOADER) && defined(IN_MODULE)) 38 | 39 | #ifdef X_USEBFUNCS 40 | void bcopy(); 41 | void bzero(); 42 | int bcmp(); 43 | #else 44 | #if defined(SYSV) && !defined(__SCO__) && !defined(sun) && !defined(__UNIXWARE__) 45 | #include 46 | void bcopy(); 47 | #define bzero(b,len) memset(b, 0, len) 48 | #define bcmp(b1,b2,len) memcmp(b1, b2, len) 49 | #else 50 | #include 51 | #if defined(__SCO__) || defined(sun) || defined(__UNIXWARE__) 52 | #include 53 | #endif 54 | #define _XFUNCS_H_INCLUDED_STRING_H 55 | #if defined(sun) 56 | #define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len)) 57 | #define bzero(b,len) memset(b, 0, (size_t)(len)) 58 | #define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len)) 59 | #endif 60 | #endif 61 | #endif /* X_USEBFUNCS */ 62 | 63 | /* the new Xfuncs.h */ 64 | 65 | #if !defined(X_NOT_STDC_ENV) && (!defined(sun) || defined(SVR4)) 66 | /* the ANSI C way */ 67 | #ifndef _XFUNCS_H_INCLUDED_STRING_H 68 | #include 69 | #endif 70 | #undef bzero 71 | #define bzero(b,len) memset(b,0,len) 72 | #else /* else X_NOT_STDC_ENV or SunOS 4 */ 73 | #if defined(SYSV) || defined(luna) || defined(sun) || defined(__sxg__) 74 | #include 75 | #define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len)) 76 | #if defined(SYSV) && defined(_XBCOPYFUNC) 77 | #undef memmove 78 | #define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len)) 79 | #define _XNEEDBCOPYFUNC 80 | #endif 81 | #else /* else vanilla BSD */ 82 | #define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len)) 83 | #define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len)) 84 | #define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len)) 85 | #endif /* SYSV else */ 86 | #endif /* ! X_NOT_STDC_ENV else */ 87 | 88 | #if defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4)) 89 | #define atexit(f) on_exit(f, 0) 90 | #endif 91 | 92 | #if defined WIN32 && defined __MINGW32__ 93 | #define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len)) 94 | #endif 95 | 96 | #endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */ 97 | 98 | #endif /* _XFUNCS_H_ */ 99 | -------------------------------------------------------------------------------- /container/android/patch/X11/XlibConf.h: -------------------------------------------------------------------------------- 1 | /* include/X11/XlibConf.h. Generated from XlibConf.h.in by configure. */ 2 | /* 3 | * $Id: $ 4 | * 5 | * Copyright © 2005 Keith Packard 6 | * 7 | * Permission to use, copy, modify, distribute, and sell this software and its 8 | * documentation for any purpose is hereby granted without fee, provided that 9 | * the above copyright notice appear in all copies and that both that 10 | * copyright notice and this permission notice appear in supporting 11 | * documentation, and that the name of Keith Packard not be used in 12 | * advertising or publicity pertaining to distribution of the software without 13 | * specific, written prior permission. Keith Packard makes no 14 | * representations about the suitability of this software for any purpose. It 15 | * is provided "as is" without express or implied warranty. 16 | * 17 | * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 18 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 19 | * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 20 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 21 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 22 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 23 | * PERFORMANCE OF THIS SOFTWARE. 24 | */ 25 | 26 | #ifndef _XLIBCONF_H_ 27 | #define _XLIBCONF_H_ 28 | /* 29 | * This header file exports defines necessary to correctly 30 | * use Xlibint.h both inside Xlib and by external libraries 31 | * such as extensions. 32 | */ 33 | 34 | /* Threading support? */ 35 | #define XTHREADS 36 | 37 | /* Use multi-threaded libc functions? */ 38 | #define XUSE_MTSAFE_API 39 | 40 | #endif /* _XLIBCONF_H_ */ 41 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xlocale.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Xlocale.h,v 1.4 2001/02/09 02:03:38 xorgcvs Exp $ */ 2 | /* 3 | 4 | Copyright 1991, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 | OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall 24 | not be used in advertising or otherwise to promote the sale, use or 25 | other dealings in this Software without prior written authorization 26 | from The Open Group. 27 | 28 | */ 29 | /* $XFree86: xc/lib/X11/Xlocale.h,v 1.4 2001/12/14 19:54:09 dawes Exp $ */ 30 | 31 | #ifndef _XLOCALE_H_ 32 | #define _XLOCALE_H_ 33 | 34 | #include 35 | #include 36 | 37 | #ifndef X_LOCALE 38 | #include 39 | #else 40 | 41 | #define LC_ALL 0 42 | #define LC_COLLATE 1 43 | #define LC_CTYPE 2 44 | #define LC_MONETARY 3 45 | #define LC_NUMERIC 4 46 | #define LC_TIME 5 47 | 48 | _XFUNCPROTOBEGIN 49 | extern char *_Xsetlocale( 50 | int /* category */, 51 | _Xconst char* /* name */ 52 | ); 53 | _XFUNCPROTOEND 54 | 55 | #define setlocale _Xsetlocale 56 | 57 | #include 58 | 59 | #endif /* X_LOCALE */ 60 | 61 | #endif /* _XLOCALE_H_ */ 62 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xosdefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * O/S-dependent (mis)feature macro definitions 3 | * 4 | * $XdotOrg: xc/include/Xosdefs.h,v 1.3 2005/04/28 22:04:12 alanc Exp $ 5 | * $Xorg: Xosdefs.h,v 1.5 2001/02/09 02:03:23 xorgcvs Exp $ 6 | * 7 | Copyright 1991, 1998 The Open Group 8 | 9 | Permission to use, copy, modify, distribute, and sell this software and its 10 | documentation for any purpose is hereby granted without fee, provided that 11 | the above copyright notice appear in all copies and that both that 12 | copyright notice and this permission notice appear in supporting 13 | documentation. 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 22 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | Except as contained in this notice, the name of The Open Group shall not be 26 | used in advertising or otherwise to promote the sale, use or other dealings 27 | in this Software without prior written authorization from The Open Group. 28 | */ 29 | /* $XFree86: xc/include/Xosdefs.h,v 3.20 2002/05/31 18:45:39 dawes Exp $ */ 30 | 31 | #ifndef _XOSDEFS_H_ 32 | #define _XOSDEFS_H_ 33 | 34 | /* 35 | * X_NOT_STDC_ENV means does not have ANSI C header files. Lack of this 36 | * symbol does NOT mean that the system has stdarg.h. 37 | * 38 | * X_NOT_POSIX means does not have POSIX header files. Lack of this 39 | * symbol does NOT mean that the POSIX environment is the default. 40 | * You may still have to define _POSIX_SOURCE to get it. 41 | */ 42 | 43 | #ifdef NOSTDHDRS 44 | #define X_NOT_POSIX 45 | #define X_NOT_STDC_ENV 46 | #endif 47 | 48 | #ifdef sony 49 | #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) 50 | #define X_NOT_POSIX 51 | #endif 52 | #endif 53 | 54 | #ifdef UTEK 55 | #define X_NOT_POSIX 56 | #define X_NOT_STDC_ENV 57 | #endif 58 | 59 | #ifdef vax 60 | #ifndef ultrix /* assume vanilla BSD */ 61 | #define X_NOT_POSIX 62 | #define X_NOT_STDC_ENV 63 | #endif 64 | #endif 65 | 66 | #ifdef luna 67 | #define X_NOT_POSIX 68 | #define X_NOT_STDC_ENV 69 | #endif 70 | 71 | #ifdef Mips 72 | #define X_NOT_POSIX 73 | #define X_NOT_STDC_ENV 74 | #endif 75 | 76 | #ifdef USL 77 | #ifdef SYSV /* (release 3.2) */ 78 | #define X_NOT_POSIX 79 | #define X_NOT_STDC_ENV 80 | #endif 81 | #endif 82 | 83 | #ifdef _SCO_DS 84 | #ifndef __SCO__ 85 | #define __SCO__ 86 | #endif 87 | #endif 88 | 89 | #ifdef i386 90 | #ifdef SYSV 91 | #if !defined(ISC) && !defined(__SCO__) && !defined(_SEQUENT_) && \ 92 | !defined(__UNIXWARE__) && !defined(sun) 93 | #if !defined(_POSIX_SOURCE) 94 | #define X_NOT_POSIX 95 | #endif 96 | #define X_NOT_STDC_ENV 97 | #endif 98 | #endif 99 | #endif 100 | 101 | #ifdef MOTOROLA 102 | #ifdef SYSV 103 | #define X_NOT_STDC_ENV 104 | #endif 105 | #endif 106 | 107 | #ifdef sun 108 | /* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4 109 | * This check allows non-Imake configured programs to build correctly. 110 | */ 111 | #if defined(__SVR4) && !defined(SVR4) 112 | #define SVR4 1 113 | #endif 114 | #ifdef SVR4 115 | /* define this to whatever it needs to be */ 116 | #define X_POSIX_C_SOURCE 199300L 117 | #endif 118 | #endif 119 | 120 | #ifdef WIN32 121 | #ifndef _POSIX_ 122 | #define X_NOT_POSIX 123 | #endif 124 | #endif 125 | 126 | #if defined(nec_ews_svr2) || defined(SX) || defined(PC_UX) 127 | #define X_NOT_POSIX 128 | #define X_NOT_STDC_ENV 129 | #endif 130 | 131 | #ifdef __UNIXOS2__ 132 | #define USGISH 133 | #define NULL_NOT_ZERO 134 | #endif 135 | 136 | #ifdef __DARWIN__ 137 | #define NULL_NOT_ZERO 138 | #endif 139 | 140 | #ifdef __GNU__ 141 | #ifndef PATH_MAX 142 | #define PATH_MAX 4096 143 | #endif 144 | #ifndef MAXPATHLEN 145 | #define MAXPATHLEN 4096 146 | #endif 147 | #endif 148 | 149 | #if defined(__SCO__) || defined(__UNIXWARE__) 150 | # ifndef PATH_MAX 151 | # define PATH_MAX 1024 152 | # endif 153 | # ifndef MAXPATHLEN 154 | # define MAXPATHLEN 1024 155 | # endif 156 | #endif 157 | 158 | #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \ 159 | || defined(__Darwin__) || defined(__DragonFly__) 160 | # ifndef CSRG_BASED 161 | # define CSRG_BASED 162 | # endif 163 | #endif 164 | 165 | #endif /* _XOSDEFS_H_ */ 166 | 167 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xprotostr.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Xprotostr.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ 2 | #ifndef XPROTOSTRUCTS_H 3 | #define XPROTOSTRUCTS_H 4 | 5 | /*********************************************************** 6 | 7 | Copyright 1987, 1998 The Open Group 8 | 9 | Permission to use, copy, modify, distribute, and sell this software and its 10 | documentation for any purpose is hereby granted without fee, provided that 11 | the above copyright notice appear in all copies and that both that 12 | copyright notice and this permission notice appear in supporting 13 | documentation. 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 22 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | Except as contained in this notice, the name of The Open Group shall not be 26 | used in advertising or otherwise to promote the sale, use or other dealings 27 | in this Software without prior written authorization from The Open Group. 28 | 29 | 30 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 31 | 32 | All Rights Reserved 33 | 34 | Permission to use, copy, modify, and distribute this software and its 35 | documentation for any purpose and without fee is hereby granted, 36 | provided that the above copyright notice appear in all copies and that 37 | both that copyright notice and this permission notice appear in 38 | supporting documentation, and that the name of Digital not be 39 | used in advertising or publicity pertaining to distribution of the 40 | software without specific, written prior permission. 41 | 42 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 43 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 44 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 45 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 46 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 47 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 48 | SOFTWARE. 49 | 50 | ******************************************************************/ 51 | #include 52 | 53 | /* Used by PolySegment */ 54 | 55 | typedef struct _xSegment { 56 | INT16 x1 B16, y1 B16, x2 B16, y2 B16; 57 | } xSegment; 58 | 59 | /* POINT */ 60 | 61 | typedef struct _xPoint { 62 | INT16 x B16, y B16; 63 | } xPoint; 64 | 65 | typedef struct _xRectangle { 66 | INT16 x B16, y B16; 67 | CARD16 width B16, height B16; 68 | } xRectangle; 69 | 70 | /* ARC */ 71 | 72 | typedef struct _xArc { 73 | INT16 x B16, y B16; 74 | CARD16 width B16, height B16; 75 | INT16 angle1 B16, angle2 B16; 76 | } xArc; 77 | 78 | #endif /* XPROTOSTRUCTS_H */ 79 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xregion.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: region.h,v 1.4 2001/02/09 02:03:40 xorgcvs Exp $ */ 2 | /************************************************************************ 3 | 4 | Copyright 1987, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | 26 | 27 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 28 | 29 | All Rights Reserved 30 | 31 | Permission to use, copy, modify, and distribute this software and its 32 | documentation for any purpose and without fee is hereby granted, 33 | provided that the above copyright notice appear in all copies and that 34 | both that copyright notice and this permission notice appear in 35 | supporting documentation, and that the name of Digital not be 36 | used in advertising or publicity pertaining to distribution of the 37 | software without specific, written prior permission. 38 | 39 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 40 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 41 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 42 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 43 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 44 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 45 | SOFTWARE. 46 | 47 | ************************************************************************/ 48 | 49 | #ifndef _XREGION_H 50 | #define _XREGION_H 51 | 52 | typedef struct { 53 | short x1, x2, y1, y2; 54 | } Box, BOX, BoxRec, *BoxPtr; 55 | 56 | typedef struct { 57 | short x, y, width, height; 58 | }RECTANGLE, RectangleRec, *RectanglePtr; 59 | 60 | #define TRUE 1 61 | #define FALSE 0 62 | #define MAXSHORT 32767 63 | #define MINSHORT -MAXSHORT 64 | #ifndef MAX 65 | #define MAX(a,b) (((a) > (b)) ? (a) : (b)) 66 | #endif 67 | #ifndef MIN 68 | #define MIN(a,b) (((a) < (b)) ? (a) : (b)) 69 | #endif 70 | 71 | 72 | /* 73 | * clip region 74 | */ 75 | 76 | typedef struct _XRegion { 77 | long size; 78 | long numRects; 79 | BOX *rects; 80 | BOX extents; 81 | } REGION; 82 | 83 | /* Xutil.h contains the declaration: 84 | * typedef struct _XRegion *Region; 85 | */ 86 | 87 | /* 1 if two BOXs overlap. 88 | * 0 if two BOXs do not overlap. 89 | * Remember, x2 and y2 are not in the region 90 | */ 91 | #define EXTENTCHECK(r1, r2) \ 92 | ((r1)->x2 > (r2)->x1 && \ 93 | (r1)->x1 < (r2)->x2 && \ 94 | (r1)->y2 > (r2)->y1 && \ 95 | (r1)->y1 < (r2)->y2) 96 | 97 | /* 98 | * update region extents 99 | */ 100 | #define EXTENTS(r,idRect){\ 101 | if((r)->x1 < (idRect)->extents.x1)\ 102 | (idRect)->extents.x1 = (r)->x1;\ 103 | if((r)->y1 < (idRect)->extents.y1)\ 104 | (idRect)->extents.y1 = (r)->y1;\ 105 | if((r)->x2 > (idRect)->extents.x2)\ 106 | (idRect)->extents.x2 = (r)->x2;\ 107 | if((r)->y2 > (idRect)->extents.y2)\ 108 | (idRect)->extents.y2 = (r)->y2;\ 109 | } 110 | 111 | /* 112 | * Check to see if there is enough memory in the present region. 113 | */ 114 | #define MEMCHECK(reg, rect, firstrect){\ 115 | if ((reg)->numRects >= ((reg)->size - 1)){\ 116 | (firstrect) = (BOX *) Xrealloc \ 117 | ((char *)(firstrect), (unsigned) (2 * (sizeof(BOX)) * ((reg)->size)));\ 118 | if ((firstrect) == 0)\ 119 | return(0);\ 120 | (reg)->size *= 2;\ 121 | (rect) = &(firstrect)[(reg)->numRects];\ 122 | }\ 123 | } 124 | 125 | /* this routine checks to see if the previous rectangle is the same 126 | * or subsumes the new rectangle to add. 127 | */ 128 | 129 | #define CHECK_PREVIOUS(Reg, R, Rx1, Ry1, Rx2, Ry2)\ 130 | (!(((Reg)->numRects > 0)&&\ 131 | ((R-1)->y1 == (Ry1)) &&\ 132 | ((R-1)->y2 == (Ry2)) &&\ 133 | ((R-1)->x1 <= (Rx1)) &&\ 134 | ((R-1)->x2 >= (Rx2)))) 135 | 136 | /* add a rectangle to the given Region */ 137 | #define ADDRECT(reg, r, rx1, ry1, rx2, ry2){\ 138 | if (((rx1) < (rx2)) && ((ry1) < (ry2)) &&\ 139 | CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\ 140 | (r)->x1 = (rx1);\ 141 | (r)->y1 = (ry1);\ 142 | (r)->x2 = (rx2);\ 143 | (r)->y2 = (ry2);\ 144 | EXTENTS((r), (reg));\ 145 | (reg)->numRects++;\ 146 | (r)++;\ 147 | }\ 148 | } 149 | 150 | 151 | 152 | /* add a rectangle to the given Region */ 153 | #define ADDRECTNOX(reg, r, rx1, ry1, rx2, ry2){\ 154 | if ((rx1 < rx2) && (ry1 < ry2) &&\ 155 | CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\ 156 | (r)->x1 = (rx1);\ 157 | (r)->y1 = (ry1);\ 158 | (r)->x2 = (rx2);\ 159 | (r)->y2 = (ry2);\ 160 | (reg)->numRects++;\ 161 | (r)++;\ 162 | }\ 163 | } 164 | 165 | #define EMPTY_REGION(pReg) pReg->numRects = 0 166 | 167 | #define REGION_NOT_EMPTY(pReg) pReg->numRects 168 | 169 | #define INBOX(r, x, y) \ 170 | ( ( ((r).x2 > x)) && \ 171 | ( ((r).x1 <= x)) && \ 172 | ( ((r).y2 > y)) && \ 173 | ( ((r).y1 <= y)) ) 174 | 175 | /* 176 | * number of points to buffer before sending them off 177 | * to scanlines() : Must be an even number 178 | */ 179 | #define NUMPTSTOBUFFER 200 180 | 181 | /* 182 | * used to allocate buffers for points and link 183 | * the buffers together 184 | */ 185 | typedef struct _POINTBLOCK { 186 | XPoint pts[NUMPTSTOBUFFER]; 187 | struct _POINTBLOCK *next; 188 | } POINTBLOCK; 189 | 190 | #endif 191 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xw32defs.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Xw32defs.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ 2 | 3 | #ifndef _XW32DEFS_H 4 | #define _XW32DEFS_H 5 | 6 | #ifdef __GNUC__ /* mingw is more close to unix than msvc */ 7 | #if !defined(__daddr_t_defined) 8 | typedef char *caddr_t; 9 | #endif 10 | #define lstat stat 11 | 12 | #else 13 | typedef char *caddr_t; 14 | 15 | #define access _access 16 | #define alloca _alloca 17 | #define chdir _chdir 18 | #define chmod _chmod 19 | #define close _close 20 | #define creat _creat 21 | #define dup _dup 22 | #define dup2 _dup2 23 | #define environ _environ 24 | #define execl _execl 25 | #define execle _execle 26 | #define execlp _execlp 27 | #define execlpe _execlpe 28 | #define execv _execv 29 | #define execve _execve 30 | #define execvp _execvp 31 | #define execvpe _execvpe 32 | #define fdopen _fdopen 33 | #define fileno _fileno 34 | #define fstat _fstat 35 | #define getcwd _getcwd 36 | #define getpid _getpid 37 | #define hypot _hypot 38 | #define isascii __isascii 39 | #define isatty _isatty 40 | #define lseek _lseek 41 | #define mkdir _mkdir 42 | #define mktemp _mktemp 43 | #define open _open 44 | #define putenv _putenv 45 | #define read _read 46 | #define rmdir _rmdir 47 | #define sleep(x) _sleep((x) * 1000) 48 | #define stat _stat 49 | #define sys_errlist _sys_errlist 50 | #define sys_nerr _sys_nerr 51 | #define umask _umask 52 | #define unlink _unlink 53 | #define write _write 54 | #define random rand 55 | #define srandom srand 56 | 57 | #define O_RDONLY _O_RDONLY 58 | #define O_WRONLY _O_WRONLY 59 | #define O_RDWR _O_RDWR 60 | #define O_APPEND _O_APPEND 61 | #define O_CREAT _O_CREAT 62 | #define O_TRUNC _O_TRUNC 63 | #define O_EXCL _O_EXCL 64 | #define O_TEXT _O_TEXT 65 | #define O_BINARY _O_BINARY 66 | #define O_RAW _O_BINARY 67 | 68 | #define S_IFMT _S_IFMT 69 | #define S_IFDIR _S_IFDIR 70 | #define S_IFCHR _S_IFCHR 71 | #define S_IFREG _S_IFREG 72 | #define S_IREAD _S_IREAD 73 | #define S_IWRITE _S_IWRITE 74 | #define S_IEXEC _S_IEXEC 75 | 76 | #define F_OK 0 77 | #define X_OK 1 78 | #define W_OK 2 79 | #define R_OK 4 80 | #endif /* __GNUC__ */ 81 | #endif 82 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xwindows.h: -------------------------------------------------------------------------------- 1 | /* $Xorg$ */ 2 | /* 3 | 4 | Copyright 1996, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- 17 | ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 18 | SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL- 19 | ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall 24 | not be used in advertising or otherwise to promote the sale, use or 25 | other dealings in this Software without prior written authorization from 26 | The Open Group. 27 | 28 | */ 29 | 30 | /* 31 | * This header file has for sole purpose to allow to include windows.h 32 | * without getting any name conflicts with our code. 33 | * Conflicts come from the fact that including windows.h actually pulls 34 | * in the whole Windows API... 35 | */ 36 | 37 | #undef _XFree86Server 38 | #ifdef XFree86Server 39 | #define _XFree86Server 40 | #undef XFree86Server 41 | #endif 42 | 43 | #define BOOL wBOOL 44 | #define INT32 wINT32 45 | #undef Status 46 | #define Status wStatus 47 | #define ATOM wATOM 48 | #define BYTE wBYTE 49 | #define FreeResource wFreeResource 50 | #include 51 | #undef Status 52 | #define Status int 53 | #undef BYTE 54 | #undef BOOL 55 | #undef INT32 56 | #undef ATOM 57 | #undef FreeResource 58 | #undef CreateWindowA 59 | #undef min 60 | #undef max 61 | 62 | #ifdef RESOURCE_H 63 | #undef RT_FONT 64 | #undef RT_CURSOR 65 | #define RT_FONT ((RESTYPE)4) 66 | #define RT_CURSOR ((RESTYPE)5) 67 | #endif 68 | 69 | #define sleep(x) Sleep(1000*x) 70 | 71 | #if defined(WIN32) && (!defined(PATH_MAX) || PATH_MAX < 1024) 72 | #undef PATH_MAX 73 | #define PATH_MAX 1024 74 | #endif 75 | 76 | #ifdef _XFree86Server 77 | #define XFree86Server 78 | #undef _XFree86Server 79 | #endif 80 | 81 | -------------------------------------------------------------------------------- /container/android/patch/X11/Xwinsock.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Xwinsock.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ 2 | /* 3 | 4 | Copyright 1996, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- 17 | ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 18 | SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL- 19 | ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall 24 | not be used in advertising or otherwise to promote the sale, use or 25 | other dealings in this Software without prior written authorization from 26 | The Open Group. 27 | 28 | */ 29 | 30 | /* 31 | * This header file has for sole purpose to allow to include winsock.h 32 | * without getting any name conflicts with our code. 33 | * Conflicts come from the fact that including winsock.h actually pulls 34 | * in the whole Windows API... 35 | */ 36 | 37 | #undef _XFree86Server 38 | #ifdef XFree86Server 39 | #define _XFree86Server 40 | #undef XFree86Server 41 | #endif 42 | 43 | #define BOOL wBOOL 44 | #define INT32 wINT32 45 | #undef Status 46 | #define Status wStatus 47 | #define ATOM wATOM 48 | #define BYTE wBYTE 49 | #define FreeResource wFreeResource 50 | #include 51 | #undef Status 52 | #define Status int 53 | #undef BYTE 54 | #undef BOOL 55 | #undef INT32 56 | #undef ATOM 57 | #undef FreeResource 58 | #undef CreateWindowA 59 | #undef RT_FONT 60 | #undef RT_CURSOR 61 | 62 | #ifdef _XFree86Server 63 | #define XFree86Server 64 | #undef _XFree86Server 65 | #endif 66 | 67 | -------------------------------------------------------------------------------- /container/android/patch/X11/ap_keysym.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts. 3 | Copyright 1989 by Hewlett-Packard Company. 4 | 5 | All Rights Reserved 6 | 7 | Permission to use, duplicate, change, and distribute this software and 8 | its documentation for any purpose and without fee is granted, provided 9 | that the above copyright notice appear in such copy and that this 10 | copyright notice appear in all supporting documentation, and that the 11 | names of Apollo Computer Inc., the Hewlett-Packard Company, or the X 12 | Consortium not be used in advertising or publicity pertaining to 13 | distribution of the software without written prior permission. 14 | 15 | HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD 16 | TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 | PURPOSE. Hewlett-Packard shall not be liable for errors 19 | contained herein or direct, indirect, special, incidental or 20 | consequential damages in connection with the furnishing, 21 | performance, or use of this material. 22 | 23 | This software is not subject to any license of the American 24 | Telephone and Telegraph Company or of the Regents of the 25 | University of California. 26 | ******************************************************************/ 27 | 28 | #define apXK_LineDel 0x1000FF00 29 | #define apXK_CharDel 0x1000FF01 30 | #define apXK_Copy 0x1000FF02 31 | #define apXK_Cut 0x1000FF03 32 | #define apXK_Paste 0x1000FF04 33 | #define apXK_Move 0x1000FF05 34 | #define apXK_Grow 0x1000FF06 35 | #define apXK_Cmd 0x1000FF07 36 | #define apXK_Shell 0x1000FF08 37 | #define apXK_LeftBar 0x1000FF09 38 | #define apXK_RightBar 0x1000FF0A 39 | #define apXK_LeftBox 0x1000FF0B 40 | #define apXK_RightBox 0x1000FF0C 41 | #define apXK_UpBox 0x1000FF0D 42 | #define apXK_DownBox 0x1000FF0E 43 | #define apXK_Pop 0x1000FF0F 44 | #define apXK_Read 0x1000FF10 45 | #define apXK_Edit 0x1000FF11 46 | #define apXK_Save 0x1000FF12 47 | #define apXK_Exit 0x1000FF13 48 | #define apXK_Repeat 0x1000FF14 49 | 50 | #define apXK_KP_parenleft 0x1000FFA8 51 | #define apXK_KP_parenright 0x1000FFA9 52 | -------------------------------------------------------------------------------- /container/android/patch/X11/cursorfont.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: cursorfont.h,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */ 2 | /* 3 | 4 | Copyright 1987, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 | OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall 24 | not be used in advertising or otherwise to promote the sale, use or 25 | other dealings in this Software without prior written authorization 26 | from The Open Group. 27 | 28 | */ 29 | 30 | #define XC_num_glyphs 154 31 | #define XC_X_cursor 0 32 | #define XC_arrow 2 33 | #define XC_based_arrow_down 4 34 | #define XC_based_arrow_up 6 35 | #define XC_boat 8 36 | #define XC_bogosity 10 37 | #define XC_bottom_left_corner 12 38 | #define XC_bottom_right_corner 14 39 | #define XC_bottom_side 16 40 | #define XC_bottom_tee 18 41 | #define XC_box_spiral 20 42 | #define XC_center_ptr 22 43 | #define XC_circle 24 44 | #define XC_clock 26 45 | #define XC_coffee_mug 28 46 | #define XC_cross 30 47 | #define XC_cross_reverse 32 48 | #define XC_crosshair 34 49 | #define XC_diamond_cross 36 50 | #define XC_dot 38 51 | #define XC_dotbox 40 52 | #define XC_double_arrow 42 53 | #define XC_draft_large 44 54 | #define XC_draft_small 46 55 | #define XC_draped_box 48 56 | #define XC_exchange 50 57 | #define XC_fleur 52 58 | #define XC_gobbler 54 59 | #define XC_gumby 56 60 | #define XC_hand1 58 61 | #define XC_hand2 60 62 | #define XC_heart 62 63 | #define XC_icon 64 64 | #define XC_iron_cross 66 65 | #define XC_left_ptr 68 66 | #define XC_left_side 70 67 | #define XC_left_tee 72 68 | #define XC_leftbutton 74 69 | #define XC_ll_angle 76 70 | #define XC_lr_angle 78 71 | #define XC_man 80 72 | #define XC_middlebutton 82 73 | #define XC_mouse 84 74 | #define XC_pencil 86 75 | #define XC_pirate 88 76 | #define XC_plus 90 77 | #define XC_question_arrow 92 78 | #define XC_right_ptr 94 79 | #define XC_right_side 96 80 | #define XC_right_tee 98 81 | #define XC_rightbutton 100 82 | #define XC_rtl_logo 102 83 | #define XC_sailboat 104 84 | #define XC_sb_down_arrow 106 85 | #define XC_sb_h_double_arrow 108 86 | #define XC_sb_left_arrow 110 87 | #define XC_sb_right_arrow 112 88 | #define XC_sb_up_arrow 114 89 | #define XC_sb_v_double_arrow 116 90 | #define XC_shuttle 118 91 | #define XC_sizing 120 92 | #define XC_spider 122 93 | #define XC_spraycan 124 94 | #define XC_star 126 95 | #define XC_target 128 96 | #define XC_tcross 130 97 | #define XC_top_left_arrow 132 98 | #define XC_top_left_corner 134 99 | #define XC_top_right_corner 136 100 | #define XC_top_side 138 101 | #define XC_top_tee 140 102 | #define XC_trek 142 103 | #define XC_ul_angle 144 104 | #define XC_umbrella 146 105 | #define XC_ur_angle 148 106 | #define XC_watch 150 107 | #define XC_xterm 152 108 | -------------------------------------------------------------------------------- /container/android/patch/X11/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | wget https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/+archive/refs/heads/jb-dev/sysroot/usr/include/X11.tar.gz 3 | tar xf X11.tar.gz -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/MITMisc.h: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | 3 | Copyright 1989, 1998 The Open Group 4 | 5 | Permission to use, copy, modify, distribute, and sell this software and its 6 | documentation for any purpose is hereby granted without fee, provided that 7 | the above copyright notice appear in all copies and that both that 8 | copyright notice and this permission notice appear in supporting 9 | documentation. 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | 21 | Except as contained in this notice, the name of The Open Group shall not be 22 | used in advertising or otherwise to promote the sale, use or other dealings 23 | in this Software without prior written authorization from The Open Group. 24 | 25 | ********************************************************/ 26 | 27 | /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ 28 | 29 | /* $Xorg: MITMisc.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ 30 | 31 | #ifndef _XMITMISC_H_ 32 | #define _XMITMISC_H_ 33 | 34 | #include 35 | 36 | #define X_MITSetBugMode 0 37 | #define X_MITGetBugMode 1 38 | 39 | #define MITMiscNumberEvents 0 40 | 41 | #define MITMiscNumberErrors 0 42 | 43 | #ifndef _MITMISC_SERVER_ 44 | 45 | _XFUNCPROTOBEGIN 46 | 47 | Bool XMITMiscQueryExtension( 48 | Display* /* dpy */, 49 | int* /* event_basep */, 50 | int* /* error_basep */ 51 | ); 52 | 53 | Status XMITMiscSetBugMode( 54 | Display* /* dpy */, 55 | Bool /* onOff */ 56 | ); 57 | 58 | Bool XMITMiscGetBugMode( 59 | Display* /* dpy */ 60 | ); 61 | 62 | _XFUNCPROTOEND 63 | 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/XEVI.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: XEVI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ 2 | /************************************************************ 3 | Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. 4 | Permission to use, copy, modify, and distribute this 5 | software and its documentation for any purpose and without 6 | fee is hereby granted, provided that the above copyright 7 | notice appear in all copies and that both that copyright 8 | notice and this permission notice appear in supporting 9 | documentation, and that the name of Silicon Graphics not be 10 | used in advertising or publicity pertaining to distribution 11 | of the software without specific prior written permission. 12 | Silicon Graphics makes no representation about the suitability 13 | of this software for any purpose. It is provided "as is" 14 | without any express or implied warranty. 15 | SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 16 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 17 | AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 18 | GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 19 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 20 | DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 21 | OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 22 | THE USE OR PERFORMANCE OF THIS SOFTWARE. 23 | ********************************************************/ 24 | /* $XFree86$ */ 25 | 26 | #ifndef _XEVI_H_ 27 | #define _XEVI_H_ 28 | #include 29 | #define X_EVIQueryVersion 0 30 | #define X_EVIGetVisualInfo 1 31 | #define XEVI_TRANSPARENCY_NONE 0 32 | #define XEVI_TRANSPARENCY_PIXEL 1 33 | #define XEVI_TRANSPARENCY_MASK 2 34 | #ifndef _XEVI_SERVER_ 35 | typedef struct { 36 | VisualID core_visual_id; 37 | int screen; 38 | int level; 39 | unsigned int transparency_type; 40 | unsigned int transparency_value; 41 | unsigned int min_hw_colormaps; 42 | unsigned int max_hw_colormaps; 43 | unsigned int num_colormap_conflicts; 44 | VisualID* colormap_conflicts; 45 | } ExtendedVisualInfo; 46 | _XFUNCPROTOBEGIN 47 | Bool XeviQueryExtension( 48 | Display* /* dpy */ 49 | ); 50 | Status XeviQueryVersion( 51 | Display* /* dpy */, 52 | int* /* majorVersion */, 53 | int* /* minorVersion */ 54 | ); 55 | Status XeviGetVisualInfo( 56 | Display* /* dpy */, 57 | VisualID* /* visual_query */, 58 | int /* nVisual_query */, 59 | ExtendedVisualInfo** /* extendedVisualInfo_return */, 60 | int* /* nInfo_return */ 61 | ); 62 | _XFUNCPROTOEND 63 | #endif 64 | #endif 65 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/XEVIstr.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: XEVIstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ 2 | /************************************************************ 3 | Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. 4 | Permission to use, copy, modify, and distribute this 5 | software and its documentation for any purpose and without 6 | fee is hereby granted, provided that the above copyright 7 | notice appear in all copies and that both that copyright 8 | notice and this permission notice appear in supporting 9 | documentation, and that the name of Silicon Graphics not be 10 | used in advertising or publicity pertaining to distribution 11 | of the software without specific prior written permission. 12 | Silicon Graphics makes no representation about the suitability 13 | of this software for any purpose. It is provided "as is" 14 | without any express or implied warranty. 15 | SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 16 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 17 | AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 18 | GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 19 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 20 | DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 21 | OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 22 | THE USE OR PERFORMANCE OF THIS SOFTWARE. 23 | ********************************************************/ 24 | /* $XFree86$ */ 25 | 26 | #ifndef _EVISTR_H_ 27 | #define _EVISTR_H_ 28 | 29 | #include 30 | 31 | #define VisualID CARD32 32 | #define EVINAME "Extended-Visual-Information" 33 | #define XEVI_MAJOR_VERSION 1 /* current version numbers */ 34 | #define XEVI_MINOR_VERSION 0 35 | 36 | typedef CARD32 VisualID32; 37 | #define sz_VisualID32 4 38 | 39 | typedef struct _xExtendedVisualInfo { 40 | VisualID core_visual_id B32; 41 | INT8 screen; 42 | INT8 level; 43 | CARD8 transparency_type; 44 | CARD8 pad0; 45 | CARD32 transparency_value B32; 46 | CARD8 min_hw_colormaps; 47 | CARD8 max_hw_colormaps; 48 | CARD16 num_colormap_conflicts B16; 49 | } xExtendedVisualInfo; 50 | #define sz_xExtendedVisualInfo 16 51 | 52 | typedef struct _XEVIQueryVersion { 53 | CARD8 reqType; /* always XEVIReqCode */ 54 | CARD8 xeviReqType; /* always X_EVIQueryVersion */ 55 | CARD16 length B16; 56 | } xEVIQueryVersionReq; 57 | #define sz_xEVIQueryVersionReq 4 58 | 59 | typedef struct { 60 | BYTE type; /* X_Reply */ 61 | CARD8 unused; 62 | CARD16 sequenceNumber B16; 63 | CARD32 length B32; 64 | CARD16 majorVersion B16; /* major version of EVI protocol */ 65 | CARD16 minorVersion B16; /* minor version of EVI protocol */ 66 | CARD32 pad0 B32; 67 | CARD32 pad1 B32; 68 | CARD32 pad2 B32; 69 | CARD32 pad3 B32; 70 | CARD32 pad4 B32; 71 | } xEVIQueryVersionReply; 72 | #define sz_xEVIQueryVersionReply 32 73 | 74 | typedef struct _XEVIGetVisualInfoReq { 75 | CARD8 reqType; /* always XEVIReqCode */ 76 | CARD8 xeviReqType; /* always X_EVIGetVisualInfo */ 77 | CARD16 length B16; 78 | CARD32 n_visual B32; 79 | } xEVIGetVisualInfoReq; 80 | #define sz_xEVIGetVisualInfoReq 8 81 | 82 | typedef struct _XEVIGetVisualInfoReply { 83 | BYTE type; /* X_Reply */ 84 | CARD8 unused; 85 | CARD16 sequenceNumber B16; 86 | CARD32 length B32; 87 | CARD32 n_info B32; 88 | CARD32 n_conflicts B32; 89 | CARD32 pad0 B32; 90 | CARD32 pad1 B32; 91 | CARD32 pad2 B32; 92 | CARD32 pad3 B32; 93 | } xEVIGetVisualInfoReply; 94 | #define sz_xEVIGetVisualInfoReply 32 95 | 96 | #undef VisualID 97 | 98 | #endif /* _EVISTR_H_ */ 99 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/XLbx.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: XLbx.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /* 3 | * Copyright 1992 Network Computing Devices 4 | * 5 | * Permission to use, copy, modify, distribute, and sell this software and its 6 | * documentation for any purpose is hereby granted without fee, provided that 7 | * the above copyright notice appear in all copies and that both that 8 | * copyright notice and this permission notice appear in supporting 9 | * documentation, and that the name of NCD. not be used in advertising or 10 | * publicity pertaining to distribution of the software without specific, 11 | * written prior permission. NCD. makes no representations about the 12 | * suitability of this software for any purpose. It is provided "as is" 13 | * without express or implied warranty. 14 | * 15 | * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. 17 | * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 18 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 19 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 20 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 | * 22 | */ 23 | /* $XFree86: xc/include/extensions/XLbx.h,v 1.3 2002/10/16 01:59:55 dawes Exp $ */ 24 | 25 | #ifndef _XLBX_H_ 26 | #define _XLBX_H_ 27 | 28 | #include 29 | 30 | /* 31 | * NOTE: any changes or additions to the opcodes needs to be reflected 32 | * in the lbxCacheable array in Xserver/lbx/lbxmain.c 33 | */ 34 | 35 | #define X_LbxQueryVersion 0 36 | #define X_LbxStartProxy 1 37 | #define X_LbxStopProxy 2 38 | #define X_LbxSwitch 3 39 | #define X_LbxNewClient 4 40 | #define X_LbxCloseClient 5 41 | #define X_LbxModifySequence 6 42 | #define X_LbxAllowMotion 7 43 | #define X_LbxIncrementPixel 8 44 | #define X_LbxDelta 9 45 | #define X_LbxGetModifierMapping 10 46 | #define X_LbxInvalidateTag 12 47 | #define X_LbxPolyPoint 13 48 | #define X_LbxPolyLine 14 49 | #define X_LbxPolySegment 15 50 | #define X_LbxPolyRectangle 16 51 | #define X_LbxPolyArc 17 52 | #define X_LbxFillPoly 18 53 | #define X_LbxPolyFillRectangle 19 54 | #define X_LbxPolyFillArc 20 55 | #define X_LbxGetKeyboardMapping 21 56 | #define X_LbxQueryFont 22 57 | #define X_LbxChangeProperty 23 58 | #define X_LbxGetProperty 24 59 | #define X_LbxTagData 25 60 | 61 | #define X_LbxCopyArea 26 62 | #define X_LbxCopyPlane 27 63 | #define X_LbxPolyText8 28 64 | #define X_LbxPolyText16 29 65 | #define X_LbxImageText8 30 66 | #define X_LbxImageText16 31 67 | 68 | #define X_LbxQueryExtension 32 69 | #define X_LbxPutImage 33 70 | #define X_LbxGetImage 34 71 | 72 | #define X_LbxBeginLargeRequest 35 73 | #define X_LbxLargeRequestData 36 74 | #define X_LbxEndLargeRequest 37 75 | 76 | #define X_LbxInternAtoms 38 77 | #define X_LbxGetWinAttrAndGeom 39 78 | 79 | #define X_LbxGrabCmap 40 80 | #define X_LbxReleaseCmap 41 81 | #define X_LbxAllocColor 42 82 | 83 | #define X_LbxSync 43 84 | 85 | #define LbxNumberReqs 44 86 | 87 | 88 | #define LbxEvent 0 89 | #define LbxQuickMotionDeltaEvent 1 90 | #define LbxNumberEvents 2 91 | 92 | /* This is always the master client */ 93 | #define LbxMasterClientIndex 0 94 | 95 | /* LbxEvent lbxType sub-fields */ 96 | #define LbxSwitchEvent 0 97 | #define LbxCloseEvent 1 98 | #define LbxDeltaEvent 2 99 | #define LbxInvalidateTagEvent 3 100 | #define LbxSendTagDataEvent 4 101 | #define LbxListenToOne 5 102 | #define LbxListenToAll 6 103 | #define LbxMotionDeltaEvent 7 104 | #define LbxReleaseCmapEvent 8 105 | #define LbxFreeCellsEvent 9 106 | 107 | /* 108 | * Lbx image compression methods 109 | * 110 | * No compression is always assigned the value of 0. 111 | * 112 | * The rest of the compression method opcodes are assigned dynamically 113 | * at option negotiation time. 114 | */ 115 | 116 | #define LbxImageCompressNone 0 117 | 118 | 119 | #define BadLbxClient 0 120 | #define LbxNumberErrors (BadLbxClient + 1) 121 | 122 | /* tagged data types */ 123 | #define LbxTagTypeModmap 1 124 | #define LbxTagTypeKeymap 2 125 | #define LbxTagTypeProperty 3 126 | #define LbxTagTypeFont 4 127 | #define LbxTagTypeConnInfo 5 128 | 129 | #ifndef _XLBX_SERVER_ 130 | 131 | #include 132 | #include 133 | 134 | _XFUNCPROTOBEGIN 135 | 136 | Bool XLbxQueryExtension( 137 | Display* /* dpy */, 138 | int* /* requestp */, 139 | int* /* event_basep */, 140 | int* /* error_basep */ 141 | ); 142 | 143 | Bool XLbxQueryVersion( 144 | Display* /* dpy */, 145 | int* /* majorVersion */, 146 | int* /* minorVersion */ 147 | ); 148 | 149 | int XLbxGetEventBase(Display *dpy); 150 | 151 | _XFUNCPROTOEND 152 | 153 | #endif 154 | 155 | #endif 156 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/XShm.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/include/extensions/XShm.h,v 1.11 2003/04/03 15:11:07 dawes Exp $ */ 2 | /************************************************************ 3 | 4 | Copyright 1989, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | 26 | ********************************************************/ 27 | 28 | /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ 29 | 30 | /* $Xorg: XShm.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 31 | 32 | #ifndef _XSHM_H_ 33 | #define _XSHM_H_ 34 | 35 | #include 36 | 37 | #define X_ShmQueryVersion 0 38 | #define X_ShmAttach 1 39 | #define X_ShmDetach 2 40 | #define X_ShmPutImage 3 41 | #define X_ShmGetImage 4 42 | #define X_ShmCreatePixmap 5 43 | 44 | #define ShmCompletion 0 45 | #define ShmNumberEvents (ShmCompletion + 1) 46 | 47 | #define BadShmSeg 0 48 | #define ShmNumberErrors (BadShmSeg + 1) 49 | 50 | typedef unsigned long ShmSeg; 51 | 52 | #ifndef _XSHM_SERVER_ 53 | typedef struct { 54 | int type; /* of event */ 55 | unsigned long serial; /* # of last request processed by server */ 56 | Bool send_event; /* true if this came frome a SendEvent request */ 57 | Display *display; /* Display the event was read from */ 58 | Drawable drawable; /* drawable of request */ 59 | int major_code; /* ShmReqCode */ 60 | int minor_code; /* X_ShmPutImage */ 61 | ShmSeg shmseg; /* the ShmSeg used in the request */ 62 | unsigned long offset; /* the offset into ShmSeg used in the request */ 63 | } XShmCompletionEvent; 64 | 65 | typedef struct { 66 | ShmSeg shmseg; /* resource id */ 67 | int shmid; /* kernel id */ 68 | char *shmaddr; /* address in client */ 69 | Bool readOnly; /* how the server should attach it */ 70 | } XShmSegmentInfo; 71 | 72 | _XFUNCPROTOBEGIN 73 | 74 | Bool XShmQueryExtension( 75 | Display* /* dpy */ 76 | ); 77 | 78 | int XShmGetEventBase( 79 | Display* /* dpy */ 80 | ); 81 | 82 | Bool XShmQueryVersion( 83 | Display* /* dpy */, 84 | int* /* majorVersion */, 85 | int* /* minorVersion */, 86 | Bool* /* sharedPixmaps */ 87 | ); 88 | 89 | int XShmPixmapFormat( 90 | Display* /* dpy */ 91 | ); 92 | 93 | Status XShmAttach( 94 | Display* /* dpy */, 95 | XShmSegmentInfo* /* shminfo */ 96 | ); 97 | 98 | Status XShmDetach( 99 | Display* /* dpy */, 100 | XShmSegmentInfo* /* shminfo */ 101 | ); 102 | 103 | Status XShmPutImage( 104 | Display* /* dpy */, 105 | Drawable /* d */, 106 | GC /* gc */, 107 | XImage* /* image */, 108 | int /* src_x */, 109 | int /* src_y */, 110 | int /* dst_x */, 111 | int /* dst_y */, 112 | unsigned int /* src_width */, 113 | unsigned int /* src_height */, 114 | Bool /* send_event */ 115 | ); 116 | 117 | Status XShmGetImage( 118 | Display* /* dpy */, 119 | Drawable /* d */, 120 | XImage* /* image */, 121 | int /* x */, 122 | int /* y */, 123 | unsigned long /* plane_mask */ 124 | ); 125 | 126 | XImage *XShmCreateImage( 127 | Display* /* dpy */, 128 | Visual* /* visual */, 129 | unsigned int /* depth */, 130 | int /* format */, 131 | char* /* data */, 132 | XShmSegmentInfo* /* shminfo */, 133 | unsigned int /* width */, 134 | unsigned int /* height */ 135 | ); 136 | 137 | Pixmap XShmCreatePixmap( 138 | Display* /* dpy */, 139 | Drawable /* d */, 140 | char* /* data */, 141 | XShmSegmentInfo* /* shminfo */, 142 | unsigned int /* width */, 143 | unsigned int /* height */, 144 | unsigned int /* depth */ 145 | ); 146 | 147 | _XFUNCPROTOEND 148 | 149 | #else /* _XSHM_SERVER_ */ 150 | 151 | #include "screenint.h" 152 | #include "pixmap.h" 153 | #include "gc.h" 154 | 155 | extern void ShmRegisterFbFuncs( 156 | ScreenPtr /* pScreen */ 157 | ); 158 | 159 | #endif 160 | 161 | #endif 162 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/XTest.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: XTest.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ 2 | /* 3 | 4 | Copyright 1992, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | 26 | */ 27 | /* $XFree86: xc/include/extensions/XTest.h,v 3.3 2001/12/14 19:53:28 dawes Exp $ */ 28 | 29 | #ifndef _XTEST_H_ 30 | #define _XTEST_H_ 31 | 32 | #include 33 | 34 | #define X_XTestGetVersion 0 35 | #define X_XTestCompareCursor 1 36 | #define X_XTestFakeInput 2 37 | #define X_XTestGrabControl 3 38 | 39 | #define XTestNumberEvents 0 40 | 41 | #define XTestNumberErrors 0 42 | 43 | #define XTestMajorVersion 2 44 | #define XTestMinorVersion 2 45 | 46 | #define XTestExtensionName "XTEST" 47 | 48 | #ifndef _XTEST_SERVER_ 49 | 50 | #include 51 | 52 | _XFUNCPROTOBEGIN 53 | 54 | Bool XTestQueryExtension( 55 | Display* /* dpy */, 56 | int* /* event_basep */, 57 | int* /* error_basep */, 58 | int* /* majorp */, 59 | int* /* minorp */ 60 | ); 61 | 62 | Bool XTestCompareCursorWithWindow( 63 | Display* /* dpy */, 64 | Window /* window */, 65 | Cursor /* cursor */ 66 | ); 67 | 68 | Bool XTestCompareCurrentCursorWithWindow( 69 | Display* /* dpy */, 70 | Window /* window */ 71 | ); 72 | 73 | extern int XTestFakeKeyEvent( 74 | Display* /* dpy */, 75 | unsigned int /* keycode */, 76 | Bool /* is_press */, 77 | unsigned long /* delay */ 78 | ); 79 | 80 | extern int XTestFakeButtonEvent( 81 | Display* /* dpy */, 82 | unsigned int /* button */, 83 | Bool /* is_press */, 84 | unsigned long /* delay */ 85 | ); 86 | 87 | extern int XTestFakeMotionEvent( 88 | Display* /* dpy */, 89 | int /* screen */, 90 | int /* x */, 91 | int /* y */, 92 | unsigned long /* delay */ 93 | ); 94 | 95 | extern int XTestFakeRelativeMotionEvent( 96 | Display* /* dpy */, 97 | int /* x */, 98 | int /* y */, 99 | unsigned long /* delay */ 100 | ); 101 | 102 | extern int XTestFakeDeviceKeyEvent( 103 | Display* /* dpy */, 104 | XDevice* /* dev */, 105 | unsigned int /* keycode */, 106 | Bool /* is_press */, 107 | int* /* axes */, 108 | int /* n_axes */, 109 | unsigned long /* delay */ 110 | ); 111 | 112 | extern int XTestFakeDeviceButtonEvent( 113 | Display* /* dpy */, 114 | XDevice* /* dev */, 115 | unsigned int /* button */, 116 | Bool /* is_press */, 117 | int* /* axes */, 118 | int /* n_axes */, 119 | unsigned long /* delay */ 120 | ); 121 | 122 | extern int XTestFakeProximityEvent( 123 | Display* /* dpy */, 124 | XDevice* /* dev */, 125 | Bool /* in_prox */, 126 | int* /* axes */, 127 | int /* n_axes */, 128 | unsigned long /* delay */ 129 | ); 130 | 131 | extern int XTestFakeDeviceMotionEvent( 132 | Display* /* dpy */, 133 | XDevice* /* dev */, 134 | Bool /* is_relative */, 135 | int /* first_axis */, 136 | int* /* axes */, 137 | int /* n_axes */, 138 | unsigned long /* delay */ 139 | ); 140 | 141 | extern int XTestGrabControl( 142 | Display* /* dpy */, 143 | Bool /* impervious */ 144 | ); 145 | 146 | void XTestSetGContextOfGC( 147 | GC /* gc */, 148 | GContext /* gid */ 149 | ); 150 | 151 | void XTestSetVisualIDOfVisual( 152 | Visual* /* visual */, 153 | VisualID /* visualid */ 154 | ); 155 | 156 | Status XTestDiscard( 157 | Display* /* dpy */ 158 | ); 159 | 160 | _XFUNCPROTOEND 161 | 162 | #endif /* _XTEST_SERVER_ */ 163 | 164 | #endif 165 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/Xag.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/include/extensions/Xag.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */ 2 | /* 3 | Copyright 1996, 1998 The Open Group 4 | 5 | Permission to use, copy, modify, distribute, and sell this software and its 6 | documentation for any purpose is hereby granted without fee, provided that 7 | the above copyright notice appear in all copies and that both that 8 | copyright notice and this permission notice appear in supporting 9 | documentation. 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 | OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall 23 | not be used in advertising or otherwise to promote the sale, use or 24 | other dealings in this Software without prior written authorization 25 | from The Open Group. 26 | */ 27 | /* $Xorg: Xag.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ 28 | 29 | #ifndef _XAG_H_ 30 | #define _XAG_H_ 31 | 32 | #include 33 | 34 | #define X_XagQueryVersion 0 35 | #define X_XagCreate 1 36 | #define X_XagDestroy 2 37 | #define X_XagGetAttr 3 38 | #define X_XagQuery 4 39 | #define X_XagCreateAssoc 5 40 | #define X_XagDestroyAssoc 6 41 | 42 | #define XagBadAppGroup 0 43 | #define XagNumberErrors (XagBadAppGroup + 1) 44 | 45 | #define XagNsingleScreen 7 46 | #define XagNdefaultRoot 1 47 | #define XagNrootVisual 2 48 | #define XagNdefaultColormap 3 49 | #define XagNblackPixel 4 50 | #define XagNwhitePixel 5 51 | #define XagNappGroupLeader 6 52 | 53 | #ifndef _XAG_SERVER_ 54 | 55 | #include 56 | 57 | _XFUNCPROTOBEGIN 58 | 59 | typedef XID XAppGroup; 60 | 61 | Bool XagQueryVersion( 62 | Display* /* dpy */, 63 | int* /* major_version */, 64 | int* /* minor_version */ 65 | ); 66 | 67 | Status XagCreateEmbeddedApplicationGroup( 68 | Display* /* dpy */, 69 | VisualID /* root_visual */, 70 | Colormap /* default_colormap */, 71 | unsigned long /* black_pixel */, 72 | unsigned long /* white_pixel */, 73 | XAppGroup* /* app_group_return */ 74 | ); 75 | 76 | Status XagCreateNonembeddedApplicationGroup( 77 | Display* /* dpy */, 78 | XAppGroup* /* app_group_return */ 79 | ); 80 | 81 | Status XagDestroyApplicationGroup( 82 | Display* /* dpy */, 83 | XAppGroup /* app_group */ 84 | ); 85 | 86 | Status XagGetApplicationGroupAttributes( 87 | Display* /* dpy */, 88 | XAppGroup /* app_group */, 89 | ... 90 | ); 91 | 92 | Status XagQueryApplicationGroup( 93 | Display* /* dpy */, 94 | XID /* resource_base */, 95 | XAppGroup* /* app_group_ret */ 96 | ); 97 | 98 | Status XagCreateAssociation( 99 | Display* /* dpy */, 100 | Window* /* window_ret */, 101 | void* /* system_window */ 102 | ); 103 | 104 | Status XagDestroyAssociation( 105 | Display* /* dpy */, 106 | Window /* window */ 107 | ); 108 | 109 | _XFUNCPROTOEND 110 | 111 | #endif /* _XAG_SERVER_ */ 112 | 113 | #endif /* _XAG_H_ */ 114 | 115 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/Xagsrv.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/include/extensions/Xagsrv.h,v 1.5 2003/07/16 01:38:24 dawes Exp $ */ 2 | /* 3 | Copyright 1996, 1998 The Open Group 4 | 5 | Permission to use, copy, modify, distribute, and sell this software and its 6 | documentation for any purpose is hereby granted without fee, provided that 7 | the above copyright notice appear in all copies and that both that 8 | copyright notice and this permission notice appear in supporting 9 | documentation. 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 | OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall 23 | not be used in advertising or otherwise to promote the sale, use or 24 | other dealings in this Software without prior written authorization 25 | from The Open Group. 26 | */ 27 | /* $Xorg: Xagsrv.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 28 | 29 | #ifndef _XAGSRV_H_ 30 | #define _XAGSRV_H_ 31 | 32 | #include 33 | 34 | _XFUNCPROTOBEGIN 35 | 36 | extern void XagConnectionInfo( 37 | ClientPtr /* client */, 38 | xConnSetupPrefix** /* conn_prefix */, 39 | char** /* conn_info */, 40 | int* /* num_screens */ 41 | ); 42 | 43 | extern VisualID XagRootVisual( 44 | ClientPtr /* client */ 45 | ); 46 | 47 | extern Colormap XagDefaultColormap( 48 | ClientPtr /* client */ 49 | ); 50 | 51 | extern ClientPtr XagLeader( 52 | ClientPtr /* client */ 53 | ); 54 | 55 | extern void XagCallClientStateChange( 56 | ClientPtr /* client */ 57 | ); 58 | 59 | extern Bool XagIsControlledRoot ( 60 | ClientPtr /* client */, 61 | WindowPtr /* pParent */ 62 | ); 63 | 64 | extern XID XagId ( 65 | ClientPtr /* client */ 66 | ); 67 | 68 | extern void XagGetDeltaInfo ( 69 | ClientPtr /* client */, 70 | CARD32* /* buf */ 71 | ); 72 | 73 | _XFUNCPROTOEND 74 | 75 | #endif /* _XAGSRV_H_ */ 76 | 77 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/Xagstr.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/include/extensions/Xagstr.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */ 2 | /* 3 | Copyright 1996, 1998, 2001 The Open Group 4 | 5 | Permission to use, copy, modify, distribute, and sell this software and its 6 | documentation for any purpose is hereby granted without fee, provided that 7 | the above copyright notice appear in all copies and that both that 8 | copyright notice and this permission notice appear in supporting 9 | documentation. 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 | OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall 23 | not be used in advertising or otherwise to promote the sale, use or 24 | other dealings in this Software without prior written authorization 25 | from The Open Group. 26 | */ 27 | /* $Xorg: Xagstr.h,v 1.6 2001/02/09 02:03:24 xorgcvs Exp $ */ 28 | 29 | #ifndef _XAGSTR_H_ /* { */ 30 | #define _XAGSTR_H_ 31 | 32 | #include 33 | 34 | #define XAppGroup CARD32 35 | 36 | #define XAGNAME "XC-APPGROUP" 37 | 38 | #define XAG_MAJOR_VERSION 1 /* current version numbers */ 39 | #define XAG_MINOR_VERSION 0 40 | 41 | #define XagWindowTypeX11 0 42 | #define XagWindowTypeMacintosh 1 43 | #define XagWindowTypeWin32 2 44 | #define XagWindowTypeWin16 3 45 | 46 | /* 47 | * Redefine some basic types used by structures defined herein. This allows 48 | * both the library and server to view communicated data as 32-bit entities, 49 | * thus preventing problems on 64-bit architectures where libXext sees this 50 | * data as 64 bits and the server sees it as 32 bits. 51 | */ 52 | 53 | #define Colormap CARD32 54 | #define VisualID CARD32 55 | #define Window CARD32 56 | 57 | typedef struct _XagQueryVersion { 58 | CARD8 reqType; /* always XagReqCode */ 59 | CARD8 xagReqType; /* always X_XagQueryVersion */ 60 | CARD16 length B16; 61 | CARD16 client_major_version B16; 62 | CARD16 client_minor_version B16; 63 | } xXagQueryVersionReq; 64 | #define sz_xXagQueryVersionReq 8 65 | 66 | typedef struct { 67 | BYTE type; /* X_Reply */ 68 | BOOL pad1; 69 | CARD16 sequence_number B16; 70 | CARD32 length B32; 71 | CARD16 server_major_version B16; 72 | CARD16 server_minor_version B16; 73 | CARD32 pad2 B32; 74 | CARD32 pad3 B32; 75 | CARD32 pad4 B32; 76 | CARD32 pad5 B32; 77 | CARD32 pad6 B32; 78 | } xXagQueryVersionReply; 79 | #define sz_xXagQueryVersionReply 32 80 | 81 | /* Set AppGroup Attributes masks */ 82 | #define XagSingleScreenMask 1 << 0 83 | #define XagDefaultRootMask 1 << XagNdefaultRoot 84 | #define XagRootVisualMask 1 << XagNrootVisual 85 | #define XagDefaultColormapMask 1 << XagNdefaultColormap 86 | #define XagBlackPixelMask 1 << XagNblackPixel 87 | #define XagWhitePixelMask 1 << XagNwhitePixel 88 | #define XagAppGroupLeaderMask 1 << XagNappGroupLeader 89 | 90 | typedef struct _XagCreate { 91 | CARD8 reqType; /* always XagReqCode */ 92 | CARD8 xagReqType; /* always X_XagCreate */ 93 | CARD16 length B16; 94 | XAppGroup app_group B32; 95 | CARD32 attrib_mask B32; /* LISTofVALUE follows */ 96 | } xXagCreateReq; 97 | #define sz_xXagCreateReq 12 98 | 99 | typedef struct _XagDestroy { 100 | CARD8 reqType; /* always XagReqCode */ 101 | CARD8 xagReqType; /* always X_XagDestroy */ 102 | CARD16 length B16; 103 | XAppGroup app_group B32; 104 | } xXagDestroyReq; 105 | #define sz_xXagDestroyReq 8 106 | 107 | typedef struct _XagGetAttr { 108 | CARD8 reqType; /* always XagReqCode */ 109 | CARD8 xagReqType; /* always X_XagGetAttr */ 110 | CARD16 length B16; 111 | XAppGroup app_group B32; 112 | } xXagGetAttrReq; 113 | #define sz_xXagGetAttrReq 8 114 | 115 | typedef struct { 116 | BYTE type; /* X_Reply */ 117 | BOOL pad1; 118 | CARD16 sequence_number B16; 119 | CARD32 length B32; 120 | Window default_root B32; 121 | VisualID root_visual B32; 122 | Colormap default_colormap B32; 123 | CARD32 black_pixel B32; 124 | CARD32 white_pixel B32; 125 | BOOL single_screen; 126 | BOOL app_group_leader; 127 | CARD16 pad2 B16; 128 | } xXagGetAttrReply; 129 | #define sz_xXagGetAttrReply 32 130 | 131 | typedef struct _XagQuery { 132 | CARD8 reqType; /* always XagReqCode */ 133 | CARD8 xagReqType; /* always X_XagQuery */ 134 | CARD16 length B16; 135 | CARD32 resource B32; 136 | } xXagQueryReq; 137 | #define sz_xXagQueryReq 8 138 | 139 | typedef struct { 140 | BYTE type; /* X_Reply */ 141 | BOOL pad1; 142 | CARD16 sequence_number B16; 143 | CARD32 length B32; 144 | XAppGroup app_group B32; 145 | CARD32 pad2 B32; 146 | CARD32 pad3 B32; 147 | CARD32 pad4 B32; 148 | CARD32 pad5 B32; 149 | CARD32 pad6 B32; 150 | } xXagQueryReply; 151 | #define sz_xXagQueryReply 32 152 | 153 | typedef struct _XagCreateAssoc { 154 | CARD8 reqType; /* always XagReqCode */ 155 | CARD8 xagReqType; /* always X_XagCreateAssoc */ 156 | CARD16 length B16; 157 | Window window B32; 158 | CARD16 window_type B16; 159 | CARD16 system_window_len B16; /* LISTofCARD8 follows */ 160 | } xXagCreateAssocReq; 161 | #define sz_xXagCreateAssocReq 12 162 | 163 | typedef struct _XagDestroyAssoc { 164 | CARD8 reqType; /* always XagReqCode */ 165 | CARD8 xagReqType; /* always X_XagDestroyAssoc */ 166 | CARD16 length B16; 167 | Window window B32; 168 | } xXagDestroyAssocReq; 169 | #define sz_xXagDestroyAssocReq 8 170 | 171 | #undef XAppGroup 172 | /* 173 | * Cancel the previous redefinition of the basic types, thus restoring their 174 | * X.h definitions. 175 | */ 176 | 177 | #undef Window 178 | #undef Colormap 179 | #undef VisualID 180 | 181 | #endif /* } _XAGSTR_H_ */ 182 | 183 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/Xcup.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Xcup.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 2 | /* 3 | 4 | Copyright 1987, 1988, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | 26 | */ 27 | /* $XFree86$ */ 28 | 29 | #ifndef _XCUP_H_ 30 | #define _XCUP_H_ 31 | 32 | #include 33 | 34 | #define X_XcupQueryVersion 0 35 | #define X_XcupGetReservedColormapEntries 1 36 | #define X_XcupStoreColors 2 37 | 38 | #define XcupNumberErrors 0 39 | 40 | #ifndef _XCUP_SERVER_ 41 | 42 | _XFUNCPROTOBEGIN 43 | 44 | Bool XcupQueryVersion( 45 | Display* /* dpy */, 46 | int* /* major_version */, 47 | int* /* minor_version */ 48 | ); 49 | 50 | Status XcupGetReservedColormapEntries( 51 | Display* /* dpy */, 52 | int /* screen */, 53 | XColor** /* colors_out */, 54 | int* /* ncolors */ 55 | ); 56 | 57 | Status XcupStoreColors( 58 | Display* /* dpy */, 59 | Colormap /* colormap */, 60 | XColor* /* colors */, 61 | int /* ncolors */ 62 | ); 63 | 64 | _XFUNCPROTOEND 65 | 66 | #endif /* _XCUP_SERVER_ */ 67 | 68 | #endif /* _XCUP_H_ */ 69 | 70 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/Xcupstr.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Xcupstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 2 | 3 | /* 4 | 5 | Copyright 1987, 1988, 1998 The Open Group 6 | 7 | Permission to use, copy, modify, distribute, and sell this software and its 8 | documentation for any purpose is hereby granted without fee, provided that 9 | the above copyright notice appear in all copies and that both that 10 | copyright notice and this permission notice appear in supporting 11 | documentation. 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall not be 24 | used in advertising or otherwise to promote the sale, use or other dealings 25 | in this Software without prior written authorization from The Open Group. 26 | 27 | */ 28 | /* $XFree86: xc/include/extensions/Xcupstr.h,v 3.5 2001/08/01 00:44:35 tsi Exp $ */ 29 | 30 | #ifndef _XCUPSTR_H_ /* { */ 31 | #define _XCUPSTR_H_ 32 | 33 | #include 34 | 35 | #define XCUPNAME "TOG-CUP" 36 | 37 | #define XCUP_MAJOR_VERSION 1 /* current version numbers */ 38 | #define XCUP_MINOR_VERSION 0 39 | 40 | typedef struct _XcupQueryVersion { 41 | CARD8 reqType; /* always XcupReqCode */ 42 | CARD8 xcupReqType; /* always X_XcupQueryVersion */ 43 | CARD16 length B16; 44 | CARD16 client_major_version B16; 45 | CARD16 client_minor_version B16; 46 | } xXcupQueryVersionReq; 47 | #define sz_xXcupQueryVersionReq 8 48 | 49 | typedef struct { 50 | BYTE type; /* X_Reply */ 51 | BOOL pad1; 52 | CARD16 sequence_number B16; 53 | CARD32 length B32; 54 | CARD16 server_major_version B16; 55 | CARD16 server_minor_version B16; 56 | CARD32 pad2 B32; 57 | CARD32 pad3 B32; 58 | CARD32 pad4 B32; 59 | CARD32 pad5 B32; 60 | CARD32 pad6 B32; 61 | } xXcupQueryVersionReply; 62 | #define sz_xXcupQueryVersionReply 32 63 | 64 | typedef struct _XcupGetReservedColormapEntries { 65 | CARD8 reqType; /* always XcupReqCode */ 66 | CARD8 xcupReqType; /* always X_XcupGetReservedColormapEntries */ 67 | CARD16 length B16; 68 | CARD32 screen B32; 69 | } xXcupGetReservedColormapEntriesReq; 70 | #define sz_xXcupGetReservedColormapEntriesReq 8 71 | 72 | typedef struct { 73 | BYTE type; /* X_Reply */ 74 | BOOL pad1; 75 | CARD16 sequence_number B16; 76 | CARD32 length B32; 77 | CARD32 pad2 B32; 78 | CARD32 pad3 B32; 79 | CARD32 pad4 B32; 80 | CARD32 pad5 B32; 81 | CARD32 pad6 B32; 82 | CARD32 pad7 B32; 83 | } xXcupGetReservedColormapEntriesReply; 84 | #define sz_xXcupGetReservedColormapEntriesReply 32 85 | 86 | typedef struct _XcupStoreColors { 87 | CARD8 reqType; /* always XcupReqCode */ 88 | CARD8 xcupReqType; /* always X_XcupStoreColors */ 89 | CARD16 length B16; 90 | CARD32 cmap B32; 91 | } xXcupStoreColorsReq; 92 | #define sz_xXcupStoreColorsReq 8 93 | 94 | typedef struct { 95 | BYTE type; /* X_Reply */ 96 | BOOL pad1; 97 | CARD16 sequence_number B16; 98 | CARD32 length B32; 99 | CARD32 pad2 B32; 100 | CARD32 pad3 B32; 101 | CARD32 pad4 B32; 102 | CARD32 pad5 B32; 103 | CARD32 pad6 B32; 104 | CARD32 pad7 B32; 105 | } xXcupStoreColorsReply; 106 | #define sz_xXcupStoreColorsReply 32 107 | 108 | #endif /* } _XCUPSTR_H_ */ 109 | 110 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/Xdbe.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: Xdbe.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /****************************************************************************** 3 | * 4 | * Copyright (c) 1994, 1995 Hewlett-Packard Company 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * "Software"), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included 15 | * in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, 21 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 22 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 23 | * THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Except as contained in this notice, the name of the Hewlett-Packard 26 | * Company shall not be used in advertising or otherwise to promote the 27 | * sale, use or other dealings in this Software without prior written 28 | * authorization from the Hewlett-Packard Company. 29 | * 30 | * Header file for Xlib-related DBE 31 | * 32 | *****************************************************************************/ 33 | /* $XFree86: xc/include/extensions/Xdbe.h,v 3.2 2001/08/01 00:44:35 tsi Exp $ */ 34 | 35 | #ifndef XDBE_H 36 | #define XDBE_H 37 | 38 | 39 | /* INCLUDES */ 40 | 41 | #include 42 | #include 43 | 44 | 45 | /* DEFINES */ 46 | 47 | /* Errors */ 48 | #define XdbeBadBuffer 0 49 | 50 | 51 | /* TYPEDEFS */ 52 | 53 | typedef Drawable XdbeBackBuffer; 54 | 55 | typedef unsigned char XdbeSwapAction; 56 | 57 | typedef struct 58 | { 59 | Window swap_window; /* window for which to swap buffers */ 60 | XdbeSwapAction swap_action; /* swap action to use for swap_window */ 61 | } 62 | XdbeSwapInfo; 63 | 64 | typedef struct 65 | { 66 | Window window; /* window that buffer belongs to */ 67 | } 68 | XdbeBackBufferAttributes; 69 | 70 | typedef struct 71 | { 72 | int type; 73 | Display *display; /* display the event was read from */ 74 | XdbeBackBuffer buffer; /* resource id */ 75 | unsigned long serial; /* serial number of failed request */ 76 | unsigned char error_code; /* error base + XdbeBadBuffer */ 77 | unsigned char request_code; /* major opcode of failed request */ 78 | unsigned char minor_code; /* minor opcode of failed request */ 79 | } 80 | XdbeBufferError; 81 | 82 | /* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops 83 | * (for non-C++ builds) in X11/Xfuncproto.h. 84 | */ 85 | _XFUNCPROTOBEGIN 86 | 87 | extern Status XdbeQueryExtension( 88 | Display* /* dpy */, 89 | int* /* major_version_return */, 90 | int* /* minor_version_return */ 91 | ); 92 | 93 | extern XdbeBackBuffer XdbeAllocateBackBufferName( 94 | Display* /* dpy */, 95 | Window /* window */, 96 | XdbeSwapAction /* swap_action */ 97 | ); 98 | 99 | extern Status XdbeDeallocateBackBufferName( 100 | Display* /* dpy */, 101 | XdbeBackBuffer /* buffer */ 102 | ); 103 | 104 | extern Status XdbeSwapBuffers( 105 | Display* /* dpy */, 106 | XdbeSwapInfo* /* swap_info */, 107 | int /* num_windows */ 108 | ); 109 | 110 | extern Status XdbeBeginIdiom( 111 | Display* /* dpy */ 112 | ); 113 | 114 | extern Status XdbeEndIdiom( 115 | Display* /* dpy */ 116 | ); 117 | 118 | extern XdbeScreenVisualInfo *XdbeGetVisualInfo( 119 | Display* /* dpy */, 120 | Drawable* /* screen_specifiers */, 121 | int* /* num_screens */ 122 | ); 123 | 124 | extern void XdbeFreeVisualInfo( 125 | XdbeScreenVisualInfo* /* visual_info */ 126 | ); 127 | 128 | extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( 129 | Display* /* dpy */, 130 | XdbeBackBuffer /* buffer */ 131 | ); 132 | 133 | _XFUNCPROTOEND 134 | 135 | #endif /* XDBE_H */ 136 | 137 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/Xext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Xorg: Xext.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ 3 | * 4 | Copyright 1989, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | */ 26 | /* $XFree86: xc/include/extensions/Xext.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */ 27 | 28 | #ifndef _XEXT_H_ 29 | #define _XEXT_H_ 30 | 31 | #include 32 | 33 | _XFUNCPROTOBEGIN 34 | 35 | extern int (*XSetExtensionErrorHandler( 36 | int (*handler)( 37 | Display *, 38 | char *, 39 | char * 40 | ) 41 | ))( 42 | Display *, 43 | char *, 44 | char * 45 | ); 46 | 47 | extern int XMissingExtension( 48 | Display* /* dpy */, 49 | _Xconst char* /* ext_name */ 50 | ); 51 | 52 | _XFUNCPROTOEND 53 | 54 | #define X_EXTENSION_UNKNOWN "unknown" 55 | #define X_EXTENSION_MISSING "missing" 56 | 57 | #endif /* _XEXT_H_ */ 58 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/dpms.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: dpms.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /***************************************************************** 3 | 4 | Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, 19 | BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 21 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of Digital Equipment Corporation 24 | shall not be used in advertising or otherwise to promote the sale, use or other 25 | dealings in this Software without prior written authorization from Digital 26 | Equipment Corporation. 27 | 28 | ******************************************************************/ 29 | /* $XFree86: xc/include/extensions/dpms.h,v 3.4 2000/03/15 16:51:51 tsi Exp $ */ 30 | 31 | #ifndef _X11_EXTENSIONS_DPMS_H 32 | #define _X11_EXTENSIONS_DPMS_H 1 33 | 34 | /* 35 | * HISTORY 36 | */ 37 | /* 38 | * @(#)RCSfile: dpms.h,v Revision: 1.1.4.2 (DEC) Date: 1995/11/21 19:34:17 39 | */ 40 | 41 | 42 | #define DPMSModeOn 0 43 | #define DPMSModeStandby 1 44 | #define DPMSModeSuspend 2 45 | #define DPMSModeOff 3 46 | 47 | #ifndef DPMS_SERVER 48 | 49 | #include 50 | #include 51 | 52 | _XFUNCPROTOBEGIN 53 | 54 | extern Bool DPMSQueryExtension(Display *, int *, int *); 55 | extern Status DPMSGetVersion(Display *, int *, int *); 56 | extern Bool DPMSCapable(Display *); 57 | extern Status DPMSSetTimeouts(Display *, CARD16, CARD16, CARD16); 58 | extern Bool DPMSGetTimeouts(Display *, CARD16 *, CARD16 *, CARD16 *); 59 | extern Status DPMSEnable(Display *); 60 | extern Status DPMSDisable(Display *); 61 | extern Status DPMSForceLevel(Display *, CARD16); 62 | extern Status DPMSInfo(Display *, CARD16 *, BOOL *); 63 | 64 | _XFUNCPROTOEND 65 | #endif /* !DPMS_SERVER */ 66 | #endif /* !_X11_EXTENSIONS_DPMS_H */ 67 | 68 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/dpmsstr.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: dpmsstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /***************************************************************** 3 | 4 | Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, 19 | BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 21 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of Digital Equipment Corporation 24 | shall not be used in advertising or otherwise to promote the sale, use or other 25 | dealings in this Software without prior written authorization from Digital 26 | Equipment Corporation. 27 | 28 | ******************************************************************/ 29 | /* $XFree86$ */ 30 | 31 | /* 32 | * HISTORY 33 | */ 34 | /* 35 | * @(#)RCSfile: dpmsstr.h,v Revision: 1.1.4.2 (DEC) Date: 1995/11/21 19:34:19 36 | */ 37 | 38 | #ifndef _DPMSSTR_H_ 39 | #define _DPMSSTR_H_ 40 | 41 | #define X_DPMSGetVersion 0 42 | #define X_DPMSCapable 1 43 | #define X_DPMSGetTimeouts 2 44 | #define X_DPMSSetTimeouts 3 45 | #define X_DPMSEnable 4 46 | #define X_DPMSDisable 5 47 | #define X_DPMSForceLevel 6 48 | #define X_DPMSInfo 7 49 | 50 | #define DPMSNumberEvents 0 51 | 52 | #define DPMSNumberErrors 0 53 | 54 | #define DPMSMajorVersion 1 55 | #define DPMSMinorVersion 1 56 | 57 | #define DPMSExtensionName "DPMS" 58 | 59 | typedef struct { 60 | CARD8 reqType; /* always DPMSCode */ 61 | CARD8 dpmsReqType; /* always X_DPMSGetVersion */ 62 | CARD16 length B16; 63 | CARD16 majorVersion B16; 64 | CARD16 minorVersion B16; 65 | } xDPMSGetVersionReq; 66 | #define sz_xDPMSGetVersionReq 8 67 | 68 | typedef struct { 69 | BYTE type; /* X_Reply */ 70 | CARD8 pad0; 71 | CARD16 sequenceNumber B16; 72 | CARD32 length B32; 73 | CARD16 majorVersion B16; 74 | CARD16 minorVersion B16; 75 | CARD32 pad1 B32; 76 | CARD32 pad2 B32; 77 | CARD32 pad3 B32; 78 | CARD32 pad4 B32; 79 | CARD32 pad5 B32; 80 | } xDPMSGetVersionReply; 81 | #define sz_xDPMSGetVersionReply 32 82 | 83 | typedef struct { 84 | CARD8 reqType; /* always DPMSCode */ 85 | CARD8 dpmsReqType; /* always X_DPMSCapable */ 86 | CARD16 length B16; 87 | } xDPMSCapableReq; 88 | #define sz_xDPMSCapableReq 4 89 | 90 | typedef struct { 91 | BYTE type; /* X_Reply */ 92 | CARD8 pad0; 93 | CARD16 sequenceNumber B16; 94 | CARD32 length B32; 95 | BOOL capable; 96 | CARD8 pad1; 97 | CARD16 pad2 B16; 98 | CARD32 pad3 B32; 99 | CARD32 pad4 B32; 100 | CARD32 pad5 B32; 101 | CARD32 pad6 B32; 102 | CARD32 pad7 B32; 103 | } xDPMSCapableReply; 104 | #define sz_xDPMSCapableReply 32 105 | 106 | typedef struct { 107 | CARD8 reqType; /* always DPMSCode */ 108 | CARD8 dpmsReqType; /* always X_DPMSGetTimeouts */ 109 | CARD16 length B16; 110 | } xDPMSGetTimeoutsReq; 111 | #define sz_xDPMSGetTimeoutsReq 4 112 | 113 | typedef struct { 114 | BYTE type; /* X_Reply */ 115 | CARD8 pad0; 116 | CARD16 sequenceNumber B16; 117 | CARD32 length B32; 118 | CARD16 standby B16; 119 | CARD16 suspend B16; 120 | CARD16 off B16; 121 | CARD16 pad1 B16; 122 | CARD32 pad2 B32; 123 | CARD32 pad3 B32; 124 | CARD32 pad4 B32; 125 | CARD32 pad5 B32; 126 | } xDPMSGetTimeoutsReply; 127 | #define sz_xDPMSGetTimeoutsReply 32 128 | 129 | typedef struct { 130 | CARD8 reqType; /* always DPMSCode */ 131 | CARD8 dpmsReqType; /* always X_DPMSSetTimeouts */ 132 | CARD16 length B16; 133 | CARD16 standby B16; 134 | CARD16 suspend B16; 135 | CARD16 off B16; 136 | CARD16 pad0 B16; 137 | } xDPMSSetTimeoutsReq; 138 | #define sz_xDPMSSetTimeoutsReq 12 139 | 140 | typedef struct { 141 | CARD8 reqType; /* always DPMSCode */ 142 | CARD8 dpmsReqType; /* always X_DPMSEnable */ 143 | CARD16 length B16; 144 | } xDPMSEnableReq; 145 | #define sz_xDPMSEnableReq 4 146 | 147 | typedef struct { 148 | CARD8 reqType; /* always DPMSCode */ 149 | CARD8 dpmsReqType; /* always X_DPMSDisable */ 150 | CARD16 length B16; 151 | } xDPMSDisableReq; 152 | #define sz_xDPMSDisableReq 4 153 | 154 | typedef struct { 155 | CARD8 reqType; /* always DPMSCode */ 156 | CARD8 dpmsReqType; /* always X_DPMSForceLevel */ 157 | CARD16 length B16; 158 | CARD16 level B16; /* power level requested */ 159 | CARD16 pad0 B16; 160 | } xDPMSForceLevelReq; 161 | #define sz_xDPMSForceLevelReq 8 162 | 163 | typedef struct { 164 | CARD8 reqType; /* always DPMSCode */ 165 | CARD8 dpmsReqType; /* always X_DPMSInfo */ 166 | CARD16 length B16; 167 | } xDPMSInfoReq; 168 | #define sz_xDPMSInfoReq 4 169 | 170 | typedef struct { 171 | BYTE type; /* X_Reply */ 172 | CARD8 pad0; 173 | CARD16 sequenceNumber B16; 174 | CARD32 length B32; 175 | CARD16 power_level B16; 176 | BOOL state; 177 | CARD8 pad1; 178 | CARD32 pad2 B32; 179 | CARD32 pad3 B32; 180 | CARD32 pad4 B32; 181 | CARD32 pad5 B32; 182 | CARD32 pad6 B32; 183 | } xDPMSInfoReply; 184 | #define sz_xDPMSInfoReply 32 185 | 186 | #endif /* _DPMSSTR_H_ */ 187 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/lbxbuf.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: lbxbuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /* 3 | * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute, and sell this software and 6 | * its documentation for any purpose is hereby granted without fee, provided 7 | * that the above copyright notice appear in all copies and that both that 8 | * copyright notice and this permission notice appear in supporting 9 | * documentation, and that the name Network Computing Devices, Inc. not be 10 | * used in advertising or publicity pertaining to distribution of this 11 | * software without specific, written prior permission. 12 | * 13 | * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., 14 | * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT 15 | * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK 17 | * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING 18 | * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, 19 | * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND 20 | * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, 21 | * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 22 | * SOFTWARE. 23 | * 24 | */ 25 | 26 | #ifndef _BUFFER_H_ 27 | #define _BUFFER_H_ 28 | 29 | #define INBUFFER_SIZE (1 << 13) /* 8K */ 30 | #define OUTBUFFER_SIZE (1 << 12) /* 4K */ 31 | 32 | #ifndef TRUE 33 | #define TRUE 1 34 | #endif 35 | #ifndef FALSE 36 | #define FALSE 0 37 | #endif 38 | 39 | typedef struct _zlibbuffer *ZlibBufferPtr; 40 | 41 | #include 42 | 43 | _XFUNCPROTOBEGIN 44 | 45 | extern int InitZlibBuffer(ZlibBufferPtr b, int size); 46 | extern void FreeZlibBuffer(ZlibBufferPtr b); 47 | extern char *ReserveOutBuf(ZlibBufferPtr outbuf, int outlen); 48 | 49 | _XFUNCPROTOEND 50 | 51 | #endif /* _BUFFER_H_ */ 52 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/lbxbufstr.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /* 3 | * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute, and sell this software and 6 | * its documentation for any purpose is hereby granted without fee, provided 7 | * that the above copyright notice appear in all copies and that both that 8 | * copyright notice and this permission notice appear in supporting 9 | * documentation, and that the name Network Computing Devices, Inc. not be 10 | * used in advertising or publicity pertaining to distribution of this 11 | * software without specific, written prior permission. 12 | * 13 | * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., 14 | * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT 15 | * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK 17 | * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING 18 | * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, 19 | * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND 20 | * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, 21 | * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 22 | * SOFTWARE. 23 | * 24 | */ 25 | /* $XFree86$ */ 26 | 27 | #ifndef _BUFFERSTR_H_ 28 | #define _BUFFERSTR_H_ 29 | 30 | #include 31 | 32 | /* 33 | * ZLIB Input/Output buffer 34 | */ 35 | typedef struct _zlibbuffer { 36 | char *bufbase; 37 | char *bufend; 38 | char *bufptr; 39 | int bufcnt; 40 | } ZlibBuffer; 41 | 42 | #define BYTES_AVAIL(inbuf, len) \ 43 | (((inbuf)->bufcnt >= (len)) ? (inbuf)->bufptr : NULL) 44 | 45 | #endif /* _BUFFERSTR_H_ */ 46 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/lbxdeltastr.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: lbxdeltastr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /* 3 | * Copyright 1993 Network Computing Devices 4 | * 5 | * Permission to use, copy, modify, distribute, and sell this software and its 6 | * documentation for any purpose is hereby granted without fee, provided that 7 | * the above copyright notice appear in all copies and that both that 8 | * copyright notice and this permission notice appear in supporting 9 | * documentation, and that the name of NCD. not be used in advertising or 10 | * publicity pertaining to distribution of the software without specific, 11 | * written prior permission. NCD. makes no representations about the 12 | * suitability of this software for any purpose. It is provided "as is" 13 | * without express or implied warranty. 14 | * 15 | * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. 17 | * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 18 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 19 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 20 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 | * 22 | */ 23 | 24 | #ifndef LBX_DELTA_STRUCT_H 25 | #define LBX_DELTA_STRUCT_H 26 | 27 | #define MIN_CACHEABLE_LEN 8 28 | 29 | #define DELTA_CACHEABLE(pcache, len) \ 30 | ((len) > MIN_CACHEABLE_LEN && (len) <= (pcache)->maxDeltasize) 31 | 32 | /* 33 | * An entry in the delta compactor cache 34 | */ 35 | typedef struct _LBXDeltaElem { 36 | int length; 37 | unsigned char *buf; 38 | } LBXDeltaElemRec, *LBXDeltaElemPtr; 39 | 40 | 41 | /* 42 | * Delta compactor cache 43 | */ 44 | typedef struct _LBXDeltas { 45 | unsigned short nDeltas; 46 | unsigned short maxDeltasize; 47 | LBXDeltaElemPtr deltas; 48 | unsigned short nextDelta; 49 | unsigned short activeDeltas; /* only needed for outgoing */ 50 | } LBXDeltasRec, *LBXDeltasPtr; 51 | 52 | 53 | /* 54 | * Motion delta cache 55 | */ 56 | 57 | typedef struct { 58 | BYTE swapped; 59 | BYTE detail; 60 | CARD16 sequenceNumber B16; 61 | Time time B32; 62 | Window root B32, event B32, child B32; 63 | INT16 rootX B16, rootY B16, eventX B16, eventY B16; 64 | KeyButMask state B16; 65 | BOOL sameScreen; 66 | } lbxMotionCache; 67 | 68 | 69 | /* 70 | * Motion delta events 71 | */ 72 | 73 | typedef struct { 74 | BYTE type; /* always eventBase + LbxQuickMotionDeltaEvent */ 75 | CARD8 deltaTime; 76 | INT8 deltaX; 77 | INT8 deltaY; 78 | } lbxQuickMotionDeltaEvent; 79 | #define sz_lbxQuickMotionDeltaEvent 4 80 | 81 | typedef struct { 82 | BYTE type; /* always eventBase + LbxEvent */ 83 | BYTE lbxType; /* LbxMotionDeltaEvent */ 84 | INT8 deltaX; 85 | INT8 deltaY; 86 | CARD16 deltaTime B16; 87 | CARD16 deltaSequence B16; 88 | } lbxMotionDeltaEvent; 89 | #define sz_lbxMotionDeltaEvent 8 90 | 91 | extern int LBXInitDeltaCache ( LBXDeltasPtr pcache, int nDeltas, 92 | int maxDeltasize ); 93 | extern void LBXFreeDeltaCache ( LBXDeltasPtr pcache ); 94 | extern int LBXDeltaMinDiffs ( LBXDeltasPtr pcache, unsigned char *inmsg, 95 | int inmsglen, int maxdiff, int *pindex ); 96 | extern void LBXEncodeDelta ( LBXDeltasPtr pcache, unsigned char *inmsg, 97 | int ndiff, int index, unsigned char *buf ); 98 | extern int LBXDecodeDelta ( LBXDeltasPtr pcache, xLbxDiffItem *deltas, 99 | int ndiff, int index, unsigned char **buf ); 100 | extern void LBXAddDeltaOut ( LBXDeltasPtr pcache, unsigned char *inmsg, 101 | int inmsglen ); 102 | extern void LBXAddDeltaIn ( LBXDeltasPtr pcache, unsigned char *inmsg, 103 | int inmsglen ); 104 | 105 | #endif /* LBX_DELTA_STRUCT_H */ 106 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/lbximage.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 2 | 3 | /****************************************************************************** 4 | 5 | Copyright 1994, 1998 The Open Group 6 | 7 | Permission to use, copy, modify, distribute, and sell this software and its 8 | documentation for any purpose is hereby granted without fee, provided that 9 | the above copyright notice appear in all copies and that both that 10 | copyright notice and this permission notice appear in supporting 11 | documentation. 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall not be 24 | used in advertising or otherwise to promote the sale, use or other dealings 25 | in this Software without prior written authorization from The Open Group. 26 | 27 | ******************************************************************************/ 28 | /* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */ 29 | 30 | #ifndef _LBX_IMAGE_H_ 31 | #define _LBX_IMAGE_H_ 32 | 33 | #include 34 | 35 | _XFUNCPROTOBEGIN 36 | 37 | typedef struct _LbxBitmapCompMethod { 38 | 39 | char *methodName; 40 | int inited; 41 | int methodOpCode; /* to be filled on reply from server */ 42 | 43 | int (*compInit)( 44 | void 45 | ); 46 | 47 | int (*compFunc)( 48 | unsigned char * /* inbuf */, 49 | unsigned char * /* outbuf */, 50 | int /* outbufSize */, 51 | int /* image_bytes */, 52 | int /* pixels_per_line */, 53 | int /* padded_bytes_per_scanline */, 54 | int /* reverse_bits */, 55 | int * /* bytesCompressed */ 56 | ); 57 | 58 | int (*decompFunc)( 59 | unsigned char * /* inbuf */, 60 | unsigned char * /* outbuf */, 61 | int /* image_bytes */, 62 | int /* pixels_per_line */, 63 | int /* padded_bytes_per_scanline */, 64 | int /* reverse_bits */ 65 | ); 66 | 67 | } LbxBitmapCompMethod; 68 | 69 | 70 | #define LBX_MAX_DEPTHS 5 71 | 72 | typedef struct _LbxPixmapCompMethod { 73 | 74 | char *methodName; 75 | unsigned formatMask; 76 | int depthCount; 77 | int depths[LBX_MAX_DEPTHS]; 78 | int inited; 79 | int methodOpCode; /* to be filled on reply from server */ 80 | 81 | int (*compInit)( 82 | void 83 | ); 84 | 85 | int (*compFunc)( 86 | char * /* inbuf */, 87 | char * /* outbuf */, 88 | int /* outbufSize */, 89 | int /* format */, 90 | int /* depth */, 91 | int /* num_scan_lines */, 92 | int /* scan_line_size */, 93 | int * /* bytesCompressed */ 94 | ); 95 | 96 | int (*decompFunc)( 97 | char * /* inbuf */, 98 | char * /* outbuf */, 99 | int /* num_scan_lines */, 100 | int /* scan_line_size */ 101 | ); 102 | 103 | } LbxPixmapCompMethod; 104 | 105 | 106 | extern int LbxImageEncodePackBits ( 107 | char * /* inbuf */, 108 | char * /* outbuf */, 109 | int /* outbufSize */, 110 | int /* format */, 111 | int /* depth */, 112 | int /* num_scan_lines */, 113 | int /* scan_line_size */, 114 | int * /* bytesCompressed */ 115 | ); 116 | 117 | extern int LbxImageEncodeFaxG42D ( 118 | unsigned char * /* inbuf */, 119 | unsigned char * /* outbuf */, 120 | int /* outbufSize */, 121 | int /* image_bytes */, 122 | int /* pixels_per_line */, 123 | int /* padded_bytes_per_scanline */, 124 | int /* reverse_bits */, 125 | int * /* bytesCompressed */ 126 | ); 127 | 128 | extern int LbxImageDecodePackBits ( 129 | char * /* inbuf */, 130 | char * /* outbuf */, 131 | int /* num_scan_lines */, 132 | int /* scan_line_size */ 133 | ); 134 | 135 | extern int LbxImageDecodeFaxG42D ( 136 | unsigned char * /* inbuf */, 137 | unsigned char * /* outbuf */, 138 | int /* image_bytes */, 139 | int /* pixels_per_line */, 140 | int /* padded_bytes_per_scanline */, 141 | int /* reverse_bits */ 142 | ); 143 | 144 | _XFUNCPROTOEND 145 | 146 | #define LBX_IMAGE_COMPRESS_SUCCESS 0 147 | #define LBX_IMAGE_COMPRESS_NO_SUPPORT 1 148 | #define LBX_IMAGE_COMPRESS_BAD_MALLOC 2 149 | #define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3 150 | 151 | #endif /* _LBX_IMAGE_H_ */ 152 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/lbxopts.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: lbxopts.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /* 3 | * Copyright 1994 Network Computing Devices, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute, and sell this software and 6 | * its documentation for any purpose is hereby granted without fee, provided 7 | * that the above copyright notice appear in all copies and that both that 8 | * copyright notice and this permission notice appear in supporting 9 | * documentation, and that the name Network Computing Devices, Inc. not be 10 | * used in advertising or publicity pertaining to distribution of this 11 | * software without specific, written prior permission. 12 | * 13 | * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., 14 | * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT 15 | * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK 17 | * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING 18 | * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA, 19 | * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF 20 | * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN 21 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 22 | * 23 | */ 24 | /* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */ 25 | 26 | #ifndef _LBX_OPTS_H_ 27 | #define _LBX_OPTS_H_ 28 | 29 | /* 30 | * Negotiable configuration options 31 | */ 32 | #define LBX_OPT_DELTA_PROXY 0 33 | #define LBX_OPT_DELTA_SERVER 1 34 | #define LBX_OPT_STREAM_COMP 2 35 | #define LBX_OPT_BITMAP_COMP 3 36 | #define LBX_OPT_PIXMAP_COMP 4 37 | #define LBX_OPT_MSG_COMP 5 /* aka "squishing" */ 38 | #define LBX_OPT_USE_TAGS 6 39 | #define LBX_OPT_CMAP_ALL 7 40 | #define LBX_OPT_EXTENSION 255 41 | 42 | /* 43 | * Length fields are encoded in 1 or 3 bytes 44 | */ 45 | #define LBX_OPT_SMALLLEN_SIZE 1 46 | #define LBX_OPT_BIGLEN_SIZE 3 47 | #define LBX_OPT_BIGLEN_MIN 256 48 | 49 | #define LBX_OPT_DECODE_LEN(p, len, size) \ 50 | if ((p)[0]) { \ 51 | (len) = (p)[0]; \ 52 | (size) = LBX_OPT_SMALLLEN_SIZE; \ 53 | } \ 54 | else { \ 55 | (len) = ((LBX_OPT_BIGLEN_MIN + (p)[1]) << 8) | (p)[2]; \ 56 | (size) = LBX_OPT_BIGLEN_SIZE; \ 57 | } 58 | 59 | /* 60 | * Option header lengths 61 | */ 62 | #define LBX_OPT_SMALLHDR_LEN (1 + LBX_OPT_SMALLLEN_SIZE) 63 | #define LBX_OPT_BIGHDR_LEN (1 + LBX_OPT_BIGLEN_SIZE) 64 | 65 | /* 66 | * Delta compression parameters 67 | */ 68 | #define LBX_OPT_DELTA_REQLEN 6 69 | #define LBX_OPT_DELTA_REPLYLEN 2 70 | #define LBX_OPT_DELTA_NCACHE_DFLT 16 71 | #define LBX_OPT_DELTA_MSGLEN_MIN 32 72 | #define LBX_OPT_DELTA_MSGLEN_DFLT 64 73 | 74 | 75 | /* 76 | * Stream compression opts 77 | */ 78 | 79 | #include 80 | 81 | #if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) 82 | 83 | struct iovec { 84 | caddr_t iov_base; 85 | int iov_len; 86 | }; 87 | 88 | #else 89 | #ifndef Lynx 90 | #include 91 | #else 92 | #include 93 | #endif 94 | #endif 95 | 96 | typedef void *LbxStreamCompHandle; 97 | 98 | typedef struct _LbxStreamOpts { 99 | LbxStreamCompHandle (*streamCompInit)(int fd, pointer arg); 100 | pointer streamCompArg; 101 | int (*streamCompStuffInput)( 102 | int fd, 103 | unsigned char *buf, 104 | int buflen 105 | ); 106 | int (*streamCompInputAvail)( 107 | int fd 108 | ); 109 | int (*streamCompFlush)( 110 | int fd 111 | ); 112 | int (*streamCompRead)( 113 | int fd, 114 | unsigned char *buf, 115 | int buflen 116 | ); 117 | int (*streamCompWriteV)( 118 | int fd, 119 | struct iovec *iov, 120 | int iovcnt 121 | ); 122 | void (*streamCompOn)( 123 | int fd 124 | ); 125 | void (*streamCompOff)( 126 | int fd 127 | ); 128 | void (*streamCompFreeHandle)( 129 | LbxStreamCompHandle handle 130 | ); 131 | } LbxStreamOpts; 132 | 133 | #endif /* _LBX_OPTS_H_ */ 134 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/lbxzlib.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: lbxzlib.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ 2 | /* 3 | * Copyright 1993 Network Computing Devices 4 | * 5 | * Permission to use, copy, modify, distribute, and sell this software and its 6 | * documentation for any purpose is hereby granted without fee, provided that 7 | * the above copyright notice appear in all copies and that both that 8 | * copyright notice and this permission notice appear in supporting 9 | * documentation, and that the name of NCD. not be used in advertising or 10 | * publicity pertaining to distribution of the software without specific, 11 | * written prior permission. NCD. makes no representations about the 12 | * suitability of this software for any purpose. It is provided "as is" 13 | * without express or implied warranty. 14 | * 15 | * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. 17 | * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 18 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 19 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 20 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 | * 22 | * Author: Dale Tonogai, Network Computing Devices 23 | */ 24 | 25 | #ifndef _ZLIB_H_ 26 | #define _ZLIB_H_ 27 | 28 | #define ZLIB_STRCOMP_OPT "XC-ZLIB" 29 | #define ZLIB_STRCOMP_OPT_LEN 7 30 | 31 | #define ZLIB_PACKET_HDRLEN 2 32 | #define ZLIB_MAX_DATALEN 0xfff 33 | #define ZLIB_MAX_PLAIN 270 34 | #define ZLIB_MAX_OUTLEN (ZLIB_MAX_PLAIN << 1) 35 | 36 | #define ZLIB_COMPRESS_FLAG 0x80 37 | #define ZLIB_DATALEN_MASK 0x0f 38 | 39 | #define ZLIB_PUT_PKTHDR(p, len, compflag) \ 40 | { \ 41 | (p)[0] = ((unsigned)(len)) >> 8 | ((compflag) ? ZLIB_COMPRESS_FLAG : 0);\ 42 | (p)[1] = (len) & 0xff; \ 43 | } 44 | 45 | #define ZLIB_GET_DATALEN(p) \ 46 | ((((unsigned)((p)[0] & ZLIB_DATALEN_MASK)) << 8) | (unsigned)(p)[1]) 47 | 48 | #define ZLIB_COMPRESSED(p) ((p)[0] & ZLIB_COMPRESS_FLAG) 49 | 50 | struct ZlibInfo; 51 | 52 | extern void * ZlibInit ( int fd, int level ); 53 | extern void ZlibFree ( struct ZlibInfo *comp ); 54 | extern int ZlibFlush ( int fd ); 55 | extern int ZlibStuffInput ( int fd, unsigned char *buffer, int buflen ); 56 | extern void ZlibCompressOn ( int fd ); 57 | extern void ZlibCompressOff ( int fd ); 58 | extern int ZlibWrite ( int fd, unsigned char *buffer, int buflen ); 59 | extern int ZlibWriteV ( int fd, struct iovec *iov, int iovcnt ); 60 | extern int ZlibRead ( int fd, unsigned char *buffer, int buflen ); 61 | extern int ZlibInputAvail ( int fd ); 62 | 63 | 64 | #endif /* _ZLIB_H_ */ 65 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/mitmiscstr.h: -------------------------------------------------------------------------------- 1 | /* $XFree86$ */ 2 | /************************************************************ 3 | 4 | Copyright 1989, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | 26 | ********************************************************/ 27 | 28 | /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ 29 | 30 | /* $Xorg: mitmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 31 | 32 | #ifndef _MITMISCSTR_H_ 33 | #define _MITMISCSTR_H_ 34 | 35 | #include "MITMisc.h" 36 | 37 | #define MITMISCNAME "MIT-SUNDRY-NONSTANDARD" 38 | 39 | typedef struct _SetBugMode { 40 | CARD8 reqType; /* always MITReqCode */ 41 | CARD8 mitReqType; /* always X_MITSetBugMode */ 42 | CARD16 length B16; 43 | BOOL onOff; 44 | BYTE pad0; 45 | CARD16 pad1; 46 | } xMITSetBugModeReq; 47 | #define sz_xMITSetBugModeReq 8 48 | 49 | typedef struct _GetBugMode { 50 | CARD8 reqType; /* always MITReqCode */ 51 | CARD8 mitReqType; /* always X_MITGetBugMode */ 52 | CARD16 length B16; 53 | } xMITGetBugModeReq; 54 | #define sz_xMITGetBugModeReq 4 55 | 56 | typedef struct { 57 | BYTE type; /* X_Reply */ 58 | BOOL onOff; 59 | CARD16 sequenceNumber B16; 60 | CARD32 length B32; 61 | CARD32 pad0 B32; 62 | CARD32 pad1 B32; 63 | CARD32 pad2 B32; 64 | CARD32 pad3 B32; 65 | CARD32 pad4 B32; 66 | CARD32 pad5 B32; 67 | } xMITGetBugModeReply; 68 | #define sz_xMITGetBugModeReply 32 69 | 70 | #endif /* _MITMISCSTR_H_ */ 71 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/securstr.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: securstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 2 | /* 3 | Copyright 1996, 1998 The Open Group 4 | 5 | Permission to use, copy, modify, distribute, and sell this software and its 6 | documentation for any purpose is hereby granted without fee, provided that 7 | the above copyright notice appear in all copies and that both that 8 | copyright notice and this permission notice appear in supporting 9 | documentation. 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 | OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall 23 | not be used in advertising or otherwise to promote the sale, use or 24 | other dealings in this Software without prior written authorization 25 | from The Open Group. 26 | */ 27 | /* $XFree86: xc/include/extensions/securstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ 28 | 29 | #ifndef _SECURSTR_H 30 | #define _SECURSTR_H 31 | 32 | #include 33 | 34 | #define SECURITY_EXTENSION_NAME "SECURITY" 35 | #define SECURITY_MAJOR_VERSION 1 36 | #define SECURITY_MINOR_VERSION 0 37 | 38 | #define X_SecurityQueryVersion 0 39 | #define X_SecurityGenerateAuthorization 1 40 | #define X_SecurityRevokeAuthorization 2 41 | 42 | typedef struct { 43 | CARD8 reqType; 44 | CARD8 securityReqType; 45 | CARD16 length B16; 46 | CARD16 majorVersion B16; 47 | CARD16 minorVersion B16; 48 | } xSecurityQueryVersionReq; 49 | #define sz_xSecurityQueryVersionReq 8 50 | 51 | typedef struct { 52 | CARD8 type; 53 | CARD8 pad0; 54 | CARD16 sequenceNumber B16; 55 | CARD32 length B32; 56 | CARD16 majorVersion B16; 57 | CARD16 minorVersion B16; 58 | CARD32 pad1 B32; 59 | CARD32 pad2 B32; 60 | CARD32 pad3 B32; 61 | CARD32 pad4 B32; 62 | CARD32 pad5 B32; 63 | } xSecurityQueryVersionReply; 64 | #define sz_xSecurityQueryVersionReply 32 65 | 66 | typedef struct { 67 | CARD8 reqType; 68 | CARD8 securityReqType; 69 | CARD16 length B16; 70 | CARD16 nbytesAuthProto B16; 71 | CARD16 nbytesAuthData B16; 72 | CARD32 valueMask B32; 73 | /* auth protocol name padded to 4 bytes */ 74 | /* auth protocol data padded to 4 bytes */ 75 | /* list of CARD32 values, if any */ 76 | } xSecurityGenerateAuthorizationReq; 77 | #define sz_xSecurityGenerateAuthorizationReq 12 78 | 79 | typedef struct { 80 | CARD8 type; 81 | CARD8 pad0; 82 | CARD16 sequenceNumber B16; 83 | CARD32 length B32; 84 | CARD32 authId B32; 85 | CARD16 dataLength B16; 86 | CARD16 pad1 B16; 87 | CARD32 pad2 B32; 88 | CARD32 pad3 B32; 89 | CARD32 pad4 B32; 90 | CARD32 pad5 B32; 91 | } xSecurityGenerateAuthorizationReply; 92 | #define sz_xSecurityGenerateAuthorizationReply 32 93 | 94 | typedef struct { 95 | CARD8 reqType; 96 | CARD8 securityReqType; 97 | CARD16 length B16; 98 | CARD32 authId B32; 99 | } xSecurityRevokeAuthorizationReq; 100 | #define sz_xSecurityRevokeAuthorizationReq 8 101 | 102 | typedef struct _xSecurityAuthorizationRevokedEvent { 103 | BYTE type; 104 | BYTE detail; 105 | CARD16 sequenceNumber B16; 106 | CARD32 authId B32; 107 | CARD32 pad0 B32; 108 | CARD32 pad1 B32; 109 | CARD32 pad2 B32; 110 | CARD32 pad3 B32; 111 | CARD32 pad4 B32; 112 | CARD32 pad5 B32; 113 | } xSecurityAuthorizationRevokedEvent; 114 | #define sz_xSecurityAuthorizationRevokedEvent 32 115 | 116 | #endif /* _SECURSTR_H */ 117 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/shape.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/include/extensions/shape.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ 2 | /************************************************************ 3 | 4 | Copyright 1989, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | 26 | ********************************************************/ 27 | 28 | /* $Xorg: shape.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 29 | 30 | #ifndef _SHAPE_H_ 31 | #define _SHAPE_H_ 32 | 33 | #include 34 | 35 | #define X_ShapeQueryVersion 0 36 | #define X_ShapeRectangles 1 37 | #define X_ShapeMask 2 38 | #define X_ShapeCombine 3 39 | #define X_ShapeOffset 4 40 | #define X_ShapeQueryExtents 5 41 | #define X_ShapeSelectInput 6 42 | #define X_ShapeInputSelected 7 43 | #define X_ShapeGetRectangles 8 44 | 45 | #define ShapeSet 0 46 | #define ShapeUnion 1 47 | #define ShapeIntersect 2 48 | #define ShapeSubtract 3 49 | #define ShapeInvert 4 50 | 51 | #define ShapeBounding 0 52 | #define ShapeClip 1 53 | #define ShapeInput 2 54 | 55 | #define ShapeNotifyMask (1L << 0) 56 | #define ShapeNotify 0 57 | 58 | #define ShapeNumberEvents (ShapeNotify + 1) 59 | 60 | #ifndef _SHAPE_SERVER_ 61 | 62 | #include 63 | 64 | typedef struct { 65 | int type; /* of event */ 66 | unsigned long serial; /* # of last request processed by server */ 67 | Bool send_event; /* true if this came frome a SendEvent request */ 68 | Display *display; /* Display the event was read from */ 69 | Window window; /* window of event */ 70 | int kind; /* ShapeBounding or ShapeClip */ 71 | int x, y; /* extents of new region */ 72 | unsigned width, height; 73 | Time time; /* server timestamp when region changed */ 74 | Bool shaped; /* true if the region exists */ 75 | } XShapeEvent; 76 | 77 | _XFUNCPROTOBEGIN 78 | 79 | extern Bool XShapeQueryExtension ( 80 | Display* /* display */, 81 | int* /* event_base */, 82 | int* /* error_base */ 83 | ); 84 | 85 | extern Status XShapeQueryVersion ( 86 | Display* /* display */, 87 | int* /* major_version */, 88 | int* /* minor_version */ 89 | ); 90 | 91 | extern void XShapeCombineRegion ( 92 | Display* /* display */, 93 | Window /* dest */, 94 | int /* dest_kind */, 95 | int /* x_off */, 96 | int /* y_off */, 97 | Region /* region */, 98 | int /* op */ 99 | ); 100 | 101 | extern void XShapeCombineRectangles ( 102 | Display* /* display */, 103 | Window /* dest */, 104 | int /* dest_kind */, 105 | int /* x_off */, 106 | int /* y_off */, 107 | XRectangle* /* rectangles */, 108 | int /* n_rects */, 109 | int /* op */, 110 | int /* ordering */ 111 | ); 112 | 113 | extern void XShapeCombineMask ( 114 | Display* /* display */, 115 | Window /* dest */, 116 | int /* dest_kind */, 117 | int /* x_off */, 118 | int /* y_off */, 119 | Pixmap /* src */, 120 | int /* op */ 121 | ); 122 | 123 | extern void XShapeCombineShape ( 124 | Display* /* display */, 125 | Window /* dest */, 126 | int /* dest_kind */, 127 | int /* x_off */, 128 | int /* y_off */, 129 | Window /* src */, 130 | int /* src_kind */, 131 | int /* op */ 132 | ); 133 | 134 | extern void XShapeOffsetShape ( 135 | Display* /* display */, 136 | Window /* dest */, 137 | int /* dest_kind */, 138 | int /* x_off */, 139 | int /* y_off */ 140 | ); 141 | 142 | extern Status XShapeQueryExtents ( 143 | Display* /* display */, 144 | Window /* window */, 145 | Bool* /* bounding_shaped */, 146 | int* /* x_bounding */, 147 | int* /* y_bounding */, 148 | unsigned int* /* w_bounding */, 149 | unsigned int* /* h_bounding */, 150 | Bool* /* clip_shaped */, 151 | int* /* x_clip */, 152 | int* /* y_clip */, 153 | unsigned int* /* w_clip */, 154 | unsigned int* /* h_clip */ 155 | ); 156 | 157 | extern void XShapeSelectInput ( 158 | Display* /* display */, 159 | Window /* window */, 160 | unsigned long /* mask */ 161 | ); 162 | 163 | extern unsigned long XShapeInputSelected ( 164 | Display* /* display */, 165 | Window /* window */ 166 | ); 167 | 168 | extern XRectangle *XShapeGetRectangles ( 169 | Display* /* display */, 170 | Window /* window */, 171 | int /* kind */, 172 | int* /* count */, 173 | int* /* ordering */ 174 | ); 175 | 176 | _XFUNCPROTOEND 177 | 178 | #endif /* _SHAPE_SERVER_ */ 179 | 180 | #endif /* _SHAPE_H_ */ 181 | -------------------------------------------------------------------------------- /container/android/patch/X11/extensions/xteststr.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: xteststr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 2 | /* 3 | 4 | Copyright 1992, 1998 The Open Group 5 | 6 | Permission to use, copy, modify, distribute, and sell this software and its 7 | documentation for any purpose is hereby granted without fee, provided that 8 | the above copyright notice appear in all copies and that both that 9 | copyright notice and this permission notice appear in supporting 10 | documentation. 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the name of The Open Group shall not be 23 | used in advertising or otherwise to promote the sale, use or other dealings 24 | in this Software without prior written authorization from The Open Group. 25 | 26 | */ 27 | 28 | #ifndef _XTESTSTR_H_ 29 | #define _XTESTSTR_H_ 30 | 31 | #define Window CARD32 32 | #define Time CARD32 33 | #define Cursor CARD32 34 | 35 | #define XTestCurrentCursor ((Cursor)1) 36 | 37 | typedef struct { 38 | CARD8 reqType; /* always XTestReqCode */ 39 | CARD8 xtReqType; /* always X_XTestGetVersion */ 40 | CARD16 length B16; 41 | CARD8 majorVersion; 42 | CARD8 pad; 43 | CARD16 minorVersion B16; 44 | } xXTestGetVersionReq; 45 | #define sz_xXTestGetVersionReq 8 46 | 47 | typedef struct { 48 | BYTE type; /* X_Reply */ 49 | CARD8 majorVersion; 50 | CARD16 sequenceNumber B16; 51 | CARD32 length B32; 52 | CARD16 minorVersion B16; 53 | CARD16 pad0 B16; 54 | CARD32 pad1 B32; 55 | CARD32 pad2 B32; 56 | CARD32 pad3 B32; 57 | CARD32 pad4 B32; 58 | CARD32 pad5 B32; 59 | } xXTestGetVersionReply; 60 | #define sz_xXTestGetVersionReply 32 61 | 62 | typedef struct { 63 | CARD8 reqType; /* always XTestReqCode */ 64 | CARD8 xtReqType; /* always X_XTestCompareCursor */ 65 | CARD16 length B16; 66 | Window window B32; 67 | Cursor cursor B32; 68 | } xXTestCompareCursorReq; 69 | #define sz_xXTestCompareCursorReq 12 70 | 71 | typedef struct { 72 | BYTE type; /* X_Reply */ 73 | BOOL same; 74 | CARD16 sequenceNumber B16; 75 | CARD32 length B32; 76 | CARD32 pad0 B32; 77 | CARD32 pad1 B32; 78 | CARD32 pad2 B32; 79 | CARD32 pad3 B32; 80 | CARD32 pad4 B32; 81 | CARD32 pad5 B32; 82 | } xXTestCompareCursorReply; 83 | #define sz_xXTestCompareCursorReply 32 84 | 85 | /* used only on the client side */ 86 | typedef struct { 87 | CARD8 reqType; /* always XTestReqCode */ 88 | CARD8 xtReqType; /* always X_XTestFakeInput */ 89 | CARD16 length B16; 90 | BYTE type; 91 | BYTE detail; 92 | CARD16 pad0 B16; 93 | Time time B32; 94 | Window root B32; 95 | CARD32 pad1 B32; 96 | CARD32 pad2 B32; 97 | INT16 rootX B16, rootY B16; 98 | CARD32 pad3 B32; 99 | CARD16 pad4 B16; 100 | CARD8 pad5; 101 | CARD8 deviceid; 102 | } xXTestFakeInputReq; 103 | #define sz_xXTestFakeInputReq 36 104 | 105 | typedef struct { 106 | CARD8 reqType; /* always XTestReqCode */ 107 | CARD8 xtReqType; /* always X_XTestGrabControl */ 108 | CARD16 length B16; 109 | BOOL impervious; 110 | CARD8 pad0; 111 | CARD8 pad1; 112 | CARD8 pad2; 113 | } xXTestGrabControlReq; 114 | #define sz_xXTestGrabControlReq 8 115 | 116 | #undef Window 117 | #undef Time 118 | #undef Cursor 119 | 120 | #endif /* _XTESTSTR_H_ */ 121 | -------------------------------------------------------------------------------- /container/android/patch/X11/keysym.h: -------------------------------------------------------------------------------- 1 | /* $Xorg: keysym.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ 2 | 3 | /*********************************************************** 4 | 5 | Copyright 1987, 1998 The Open Group 6 | 7 | Permission to use, copy, modify, distribute, and sell this software and its 8 | documentation for any purpose is hereby granted without fee, provided that 9 | the above copyright notice appear in all copies and that both that 10 | copyright notice and this permission notice appear in supporting 11 | documentation. 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | Except as contained in this notice, the name of The Open Group shall not be 24 | used in advertising or otherwise to promote the sale, use or other dealings 25 | in this Software without prior written authorization from The Open Group. 26 | 27 | 28 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 29 | 30 | All Rights Reserved 31 | 32 | Permission to use, copy, modify, and distribute this software and its 33 | documentation for any purpose and without fee is hereby granted, 34 | provided that the above copyright notice appear in all copies and that 35 | both that copyright notice and this permission notice appear in 36 | supporting documentation, and that the name of Digital not be 37 | used in advertising or publicity pertaining to distribution of the 38 | software without specific, written prior permission. 39 | 40 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 41 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 42 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 43 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 44 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 45 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 46 | SOFTWARE. 47 | 48 | ******************************************************************/ 49 | /* $XFree86: xc/include/keysym.h,v 1.3 2001/01/17 17:53:12 dawes Exp $ */ 50 | 51 | /* default keysyms */ 52 | #define XK_MISCELLANY 53 | #define XK_XKB_KEYS 54 | #define XK_LATIN1 55 | #define XK_LATIN2 56 | #define XK_LATIN3 57 | #define XK_LATIN4 58 | #define XK_LATIN8 59 | #define XK_LATIN9 60 | #define XK_CAUCASUS 61 | #define XK_GREEK 62 | #define XK_KATAKANA 63 | #define XK_ARABIC 64 | #define XK_CYRILLIC 65 | #define XK_HEBREW 66 | #define XK_THAI 67 | #define XK_KOREAN 68 | #define XK_ARMENIAN 69 | #define XK_GEORGIAN 70 | #define XK_VIETNAMESE 71 | #define XK_CURRENCY 72 | #define XK_MATHEMATICAL 73 | #define XK_BRAILLE 74 | 75 | #include 76 | 77 | -------------------------------------------------------------------------------- /container/android/patch/bthread-pthread_cancel.h: -------------------------------------------------------------------------------- 1 | #ifndef _PTHREAD_INTERNAL_H_ 2 | #define _PTHREAD_INTERNAL_H_ 3 | 4 | #include 5 | 6 | struct pthread_internal_t { 7 | struct pthread_internal_t* next; 8 | struct pthread_internal_t* prev; 9 | 10 | pid_t tid; 11 | 12 | void** tls; 13 | 14 | volatile pthread_attr_t attr; 15 | 16 | __pthread_cleanup_t* cleanup_stack; 17 | 18 | void* (*start_routine)(void*); 19 | void* start_routine_arg; 20 | void* return_value; 21 | 22 | void* alternate_signal_stack; 23 | 24 | /* 25 | * The dynamic linker implements dlerror(3), which makes it hard for us to implement this 26 | * per-thread buffer by simply using malloc(3) and free(3). 27 | */ 28 | #define __BIONIC_DLERROR_BUFFER_SIZE 508 29 | char dlerror_buffer[__BIONIC_DLERROR_BUFFER_SIZE]; 30 | 31 | // ugly hack: use last 4 bytes of dlerror_buffer as cancel_lock 32 | pthread_mutex_t cancel_lock; 33 | }; 34 | 35 | /* Has the thread a cancellation request? */ 36 | #define PTHREAD_ATTR_FLAG_CANCEL_PENDING 0x00000008 37 | 38 | /* Has the thread enabled cancellation? */ 39 | #define PTHREAD_ATTR_FLAG_CANCEL_ENABLE 0x00000010 40 | 41 | /* Has the thread asyncronous cancellation? */ 42 | #define PTHREAD_ATTR_FLAG_CANCEL_ASYNCRONOUS 0x00000020 43 | 44 | /* Has the thread a cancellation handler? */ 45 | #define PTHREAD_ATTR_FLAG_CANCEL_HANDLER 0x00000040 46 | 47 | struct pthread_internal_t *__pthread_getid ( pthread_t ); 48 | 49 | static int __pthread_do_cancel (struct pthread_internal_t *); 50 | 51 | void pthread_init(void); 52 | 53 | static void 54 | call_exit (void) 55 | { 56 | pthread_exit (0); 57 | } 58 | 59 | static int 60 | __pthread_do_cancel (struct pthread_internal_t *p) 61 | { 62 | 63 | if(p == (struct pthread_internal_t *)pthread_self()) 64 | call_exit (); 65 | else if(p->attr.flags & PTHREAD_ATTR_FLAG_CANCEL_HANDLER) 66 | pthread_kill((pthread_t)p, SIGRTMIN); 67 | else 68 | pthread_kill((pthread_t)p, SIGTERM); 69 | 70 | return 0; 71 | } 72 | 73 | static int 74 | pthread_cancel (pthread_t t) 75 | { 76 | int err = 0; 77 | struct pthread_internal_t *p = (struct pthread_internal_t*) t; 78 | 79 | pthread_init(); 80 | 81 | pthread_mutex_lock (&p->cancel_lock); 82 | if (p->attr.flags & PTHREAD_ATTR_FLAG_CANCEL_PENDING) 83 | { 84 | pthread_mutex_unlock (&p->cancel_lock); 85 | return 0; 86 | } 87 | 88 | p->attr.flags |= PTHREAD_ATTR_FLAG_CANCEL_PENDING; 89 | 90 | if (!(p->attr.flags & PTHREAD_ATTR_FLAG_CANCEL_ENABLE)) 91 | { 92 | pthread_mutex_unlock (&p->cancel_lock); 93 | return 0; 94 | } 95 | 96 | if (p->attr.flags & PTHREAD_ATTR_FLAG_CANCEL_ASYNCRONOUS) { 97 | pthread_mutex_unlock (&p->cancel_lock); 98 | err = __pthread_do_cancel (p); 99 | } else { 100 | // DEFERRED CANCEL NOT IMPLEMENTED YET 101 | pthread_mutex_unlock (&p->cancel_lock); 102 | } 103 | 104 | return err; 105 | } 106 | 107 | #endif /* _PTHREAD_INTERNAL_H_ */ 108 | -------------------------------------------------------------------------------- /container/android/ssh/config: -------------------------------------------------------------------------------- 1 | Host * 2 | StrictHostKeyChecking no -------------------------------------------------------------------------------- /dev.md: -------------------------------------------------------------------------------- 1 | # Create vscode.orig 2 | ``` 3 | git submodule init 4 | git submodule update --recursive 5 | cd code-server && yarn vscode:patch 6 | cp -r code-server/lib/vscode code-server/lib/vscode.orig 7 | ``` 8 | # Apply patches 9 | ``` 10 | cd code-server && yarn vscode:patch #apply code-server patches 11 | cd .. && ./dev.sh apply-patch #apply android patches 12 | ``` 13 | # Build node 14 | Comment out gcc version check 15 | ``` 16 | # if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || [ $major -eq 6 -a $minor -lt 3 ]; then 17 | # echo "host gcc $host_gcc_version is too old, need gcc 6.3.0" 18 | # exit 1 19 | # fi 20 | ``` 21 | 22 | ``` 23 | - TOOLCHAIN_NAME="armv7-linux-androideabi" 24 | + TOOLCHAIN_NAME="armv7a-linux-androideabi" 25 | ``` 26 | 27 | change `v8_target_arch=$ARCH` to `v8_target_arch=$DEST_CPU` 28 | 29 | 30 | ./configure.py: 31 | ```py 32 | o['variables']['want_separate_host_toolset'] = int( 33 | - cross_compiling and want_snapshots) 34 | + cross_compiling) 35 | ``` 36 | 37 | Run configure: 38 | ``` 39 | PATH=/vscode-build/hostbin:$PATH ./android-configure /opt/android-ndk/ $ANDROID_ARCH $ANDROID_BUILD_API_VERSION 40 | JOBS=10 make -j 10 # lol... just for sure 41 | ``` 42 | 43 | # Build lib/vscode 44 | 45 | ``` 46 | CC_target=cc AR_target=ar CXX_target=cxx LINK_target=ld PATH=/vscode-build/bin:$PATH yarn 47 | ``` 48 | 49 | ``` 50 | yarn release && yarn release:static 51 | ``` 52 | 53 | # Rebuild all 54 | 55 | ``` 56 | BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=aarch64 ./dev.sh release 57 | BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=arm ./dev.sh release 58 | BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=x86_64 ./dev.sh release 59 | BUILD_NODE=1 BUILD_RELEASE=1 ANDROID_ARCH=x86 ./dev.sh release 60 | ``` 61 | -------------------------------------------------------------------------------- /node-preload.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vhqtvn/vscode-android-server/70de5e034b19438eec124f39b905d5f96d5716d9/node-preload.so -------------------------------------------------------------------------------- /patches/code-server/open-files.diff: -------------------------------------------------------------------------------- 1 | Support openning multiple files 2 | 3 | Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts 4 | =================================================================== 5 | --- old/code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts 6 | +++ new/code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts 7 | @@ -388,6 +388,7 @@ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvi 8 | @memoize 9 | get filesToOpenOrCreate(): IPath[] | undefined { 10 | if (this.payload) { 11 | + const result: IPath[] = [] 12 | const fileToOpen = this.payload.get('openFile'); 13 | if (fileToOpen) { 14 | const fileUri = URI.parse(fileToOpen); 15 | @@ -396,16 +397,37 @@ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvi 16 | if (this.payload.has('gotoLineMode')) { 17 | const pathColumnAware = parseLineAndColumnAware(fileUri.path); 18 | 19 | - return [{ 20 | + result.push({ 21 | fileUri: fileUri.with({ path: pathColumnAware.path }), 22 | options: { 23 | selection: !isUndefined(pathColumnAware.line) ? { startLineNumber: pathColumnAware.line, startColumn: pathColumnAware.column || 1 } : undefined 24 | } 25 | - }]; 26 | + }); 27 | + } else { 28 | + result.push({ fileUri }); 29 | + } 30 | + } 31 | + const filesToOpen = this.payload.get('openFiles') as any as string[]; 32 | + if (filesToOpen) { 33 | + for (const fileToOpen of filesToOpen) { 34 | + const fileUri = URI.parse(fileToOpen); 35 | + 36 | + // Support: --goto parameter to open on line/col 37 | + if (this.payload.has('gotoLineMode')) { 38 | + const pathColumnAware = parseLineAndColumnAware(fileUri.path); 39 | + 40 | + result.push({ 41 | + fileUri: fileUri.with({ path: pathColumnAware.path }), 42 | + options: { 43 | + selection: !isUndefined(pathColumnAware.line) ? { startLineNumber: pathColumnAware.line, startColumn: pathColumnAware.column || 1 } : undefined 44 | + } 45 | + }); 46 | + } else { 47 | + result.push({ fileUri }); 48 | + } 49 | } 50 | - 51 | - return [{ fileUri }]; 52 | } 53 | + return result; 54 | } 55 | 56 | return undefined; 57 | -------------------------------------------------------------------------------- /patches/code-server/series: -------------------------------------------------------------------------------- 1 | open-files.diff 2 | open-files-environmentService.diff 3 | -------------------------------------------------------------------------------- /patches/node-src/android_configure.py.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/android_configure.py 2 | =================================================================== 3 | --- vscode.orig/node-src/android_configure.py 4 | +++ vscode/node-src/android_configure.py 5 | @@ -67,7 +67,7 @@ os.environ['CC'] = toolchain_path + "/bi 6 | os.environ['CXX'] = toolchain_path + "/bin/" + TOOLCHAIN_PREFIX + android_sdk_version + "-" + "clang++" 7 | 8 | GYP_DEFINES = "target_arch=" + arch 9 | -GYP_DEFINES += " v8_target_arch=" + arch 10 | +GYP_DEFINES += " v8_target_arch=" + DEST_CPU 11 | GYP_DEFINES += " android_target_arch=" + arch 12 | GYP_DEFINES += " host_os=" + host_os + " OS=android" 13 | GYP_DEFINES += " android_ndk_path=" + android_ndk_path 14 | -------------------------------------------------------------------------------- /patches/node-src/deps_npm_lib_cli_entry.js.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/npm/lib/cli/entry.js 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/npm/lib/cli/entry.js 4 | +++ vscode/node-src/deps/npm/lib/cli/entry.js 5 | @@ -67,9 +67,9 @@ module.exports = async (process, validat 6 | // this is async but we dont await it, since its ok if it doesnt 7 | // finish before the command finishes running. it uses command and argv 8 | // so it must be initiated here, after the command name is set 9 | - const updateNotifier = require('./update-notifier.js') 10 | + // const updateNotifier = require('./update-notifier.js') 11 | // eslint-disable-next-line promise/catch-or-return 12 | - updateNotifier(npm).then((msg) => (npm.updateNotification = msg)) 13 | + // updateNotifier(npm).then((msg) => (npm.updateNotification = msg)) 14 | 15 | await execPromise 16 | return exitHandler() 17 | -------------------------------------------------------------------------------- /patches/node-src/deps_npm_lib_commands_install.js.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/npm/lib/commands/install.js 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/npm/lib/commands/install.js 4 | +++ vscode/node-src/deps/npm/lib/commands/install.js 5 | @@ -122,6 +122,18 @@ class Install extends ArboristWorkspaceC 6 | throw e 7 | } 8 | } 9 | + try { 10 | + if (forced) { 11 | + log.warn( 12 | + 'install', 13 | + `Force installing npm version unpatched version of ${npmManifest.version}. This is very likely to break installation of global packages using npm. See https://github.com/termux/termux-packages/issues/13293` 14 | + ) 15 | + } else { 16 | + throw new Error("Can't install npm globally as it will very likely break installation of global packages using npm. See https://github.com/termux/termux-packages/issues/13293") 17 | + } 18 | + } catch(e) { 19 | + throw e 20 | + } 21 | } 22 | 23 | // don't try to install the prefix into itself 24 | -------------------------------------------------------------------------------- /patches/node-src/deps_uv_src_unix_core.c.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/uv/src/unix/core.c 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/uv/src/unix/core.c 4 | +++ vscode/node-src/deps/uv/src/unix/core.c 5 | @@ -1173,7 +1173,7 @@ int uv_os_tmpdir(char* buffer, size_t* s 6 | 7 | /* No temp environment variables defined */ 8 | #if defined(__ANDROID__) 9 | - buf = "/data/local/tmp"; 10 | + buf = "/data/data/vn.vhn.vsc/files/tmp"; 11 | #else 12 | buf = "/tmp"; 13 | #endif 14 | -------------------------------------------------------------------------------- /patches/node-src/deps_uv_src_unix_fs.c.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/uv/src/unix/fs.c 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/uv/src/unix/fs.c 4 | +++ vscode/node-src/deps/uv/src/unix/fs.c 5 | @@ -1322,7 +1322,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* 6 | #endif /* !__linux__ */ 7 | } 8 | 9 | -#ifdef FICLONE 10 | +#ifdef FICLONE_DISABLEDZZZ 11 | if (req->flags & UV_FS_COPYFILE_FICLONE || 12 | req->flags & UV_FS_COPYFILE_FICLONE_FORCE) { 13 | if (ioctl(dstfd, FICLONE, srcfd) == 0) { 14 | -------------------------------------------------------------------------------- /patches/node-src/deps_uv_src_unix_process.c.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/uv/src/unix/process.c 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/uv/src/unix/process.c 4 | +++ vscode/node-src/deps/uv/src/unix/process.c 5 | @@ -372,6 +372,7 @@ static void uv__process_child_init(const 6 | if (options->cwd != NULL && chdir(options->cwd)) 7 | uv__write_errno(error_fd); 8 | 9 | +#if ZZZDISABLE 10 | if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) { 11 | /* When dropping privileges from root, the `setgroups` call will 12 | * remove any extraneous groups. If we don't call this, then 13 | @@ -388,6 +389,7 @@ static void uv__process_child_init(const 14 | 15 | if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid)) 16 | uv__write_errno(error_fd); 17 | +#endif 18 | 19 | if (options->env != NULL) 20 | environ = options->env; 21 | -------------------------------------------------------------------------------- /patches/node-src/deps_uv_src_unix_sysinfo_memory.c.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/uv/src/unix/sysinfo-memory.c 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/uv/src/unix/sysinfo-memory.c 4 | +++ vscode/node-src/deps/uv/src/unix/sysinfo-memory.c 5 | @@ -26,10 +26,10 @@ 6 | #include 7 | 8 | uint64_t uv_get_free_memory(void) { 9 | - struct sysinfo info; 10 | +// struct sysinfo info; 11 | 12 | - if (sysinfo(&info) == 0) 13 | - return (uint64_t) info.freeram * info.mem_unit; 14 | +// if (sysinfo(&info) == 0) 15 | +// return (uint64_t) info.freeram * info.mem_unit; 16 | return 0; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /patches/node-src/deps_uv_uv.gyp.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/uv/uv.gyp 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/uv/uv.gyp 4 | +++ vscode/node-src/deps/uv/uv.gyp 5 | @@ -155,7 +155,7 @@ 6 | 'target_name': 'libuv', 7 | 'toolsets': ['host', 'target'], 8 | 'type': '<(uv_library)', 9 | - 'include_dirs': [ 10 | + 'include_dirs+': [ 11 | 'include', 12 | 'src/', 13 | ], 14 | @@ -170,7 +170,7 @@ 15 | '<@(shared_unix_defines)', 16 | '<@(shared_zos_defines)', 17 | ], 18 | - 'include_dirs': [ 'include' ], 19 | + 'include_dirs+': [ 'include' ], 20 | 'conditions': [ 21 | ['OS == "linux"', { 22 | 'defines': [ '_POSIX_C_SOURCE=200112' ], 23 | -------------------------------------------------------------------------------- /patches/node-src/deps_v8_src_flags_flag_definitions.h.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/v8/src/flags/flag-definitions.h 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/v8/src/flags/flag-definitions.h 4 | +++ vscode/node-src/deps/v8/src/flags/flag-definitions.h 5 | @@ -2364,7 +2364,7 @@ DEFINE_BOOL_READONLY( 6 | #undef DEFINE_PERF_PROF_BOOL 7 | #undef DEFINE_PERF_PROF_IMPLICATION 8 | 9 | -DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__", 10 | +DEFINE_STRING(gc_fake_mmap, "/data/data/vn.vhn.vsc/files/tmp/__v8_gc__", 11 | "Specify the name of the file for fake gc mmap used in ll_prof") 12 | DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.") 13 | DEFINE_IMPLICATION(log_internal_timer_events, prof) 14 | -------------------------------------------------------------------------------- /patches/node-src/deps_v8_src_logging_log.cc.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/v8/src/logging/log.cc 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/v8/src/logging/log.cc 4 | +++ vscode/node-src/deps/v8/src/logging/log.cc 5 | @@ -367,7 +367,7 @@ class LinuxPerfBasicLogger : public Code 6 | static uint64_t reference_count_; 7 | }; 8 | 9 | -const char LinuxPerfBasicLogger::kFilenameFormatString[] = "/tmp/perf-%d.map"; 10 | +const char LinuxPerfBasicLogger::kFilenameFormatString[] = "/data/data/vn.vhn.vsc/files/tmp/perf-%d.map"; 11 | // Extra space for the PID in the filename 12 | const int LinuxPerfBasicLogger::kFilenameBufferPadding = 16; 13 | 14 | -------------------------------------------------------------------------------- /patches/node-src/deps_v8_src_trap_handler_trap_handler.h.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/v8/src/trap-handler/trap-handler.h 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/v8/src/trap-handler/trap-handler.h 4 | +++ vscode/node-src/deps/v8/src/trap-handler/trap-handler.h 5 | @@ -17,29 +17,7 @@ namespace v8 { 6 | namespace internal { 7 | namespace trap_handler { 8 | 9 | -// X64 on Linux, Windows, MacOS, FreeBSD. 10 | -#if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \ 11 | - ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \ 12 | - V8_OS_FREEBSD) 13 | -#define V8_TRAP_HANDLER_SUPPORTED true 14 | -// Arm64 (non-simulator) on Mac. 15 | -#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && V8_OS_DARWIN 16 | -#define V8_TRAP_HANDLER_SUPPORTED true 17 | -// Arm64 simulator on x64 on Linux, Mac, or Windows. 18 | -// 19 | -// The simulator case uses some inline assembly code, which cannot be 20 | -// compiled with MSVC, so don't enable the trap handler in that case. 21 | -// (MSVC #defines _MSC_VER, but so does Clang when targeting Windows, hence 22 | -// the check for __clang__.) 23 | -#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && \ 24 | - (V8_OS_LINUX || V8_OS_DARWIN || V8_OS_WIN) && \ 25 | - (!defined(_MSC_VER) || defined(__clang__)) 26 | -#define V8_TRAP_HANDLER_VIA_SIMULATOR 27 | -#define V8_TRAP_HANDLER_SUPPORTED true 28 | -// Everything else is unsupported. 29 | -#else 30 | #define V8_TRAP_HANDLER_SUPPORTED false 31 | -#endif 32 | 33 | #if V8_OS_ANDROID && V8_TRAP_HANDLER_SUPPORTED 34 | // It would require some careful security review before the trap handler 35 | -------------------------------------------------------------------------------- /patches/node-src/deps_v8_third_party_zlib_cpu_features.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/deps/v8/third_party/zlib/cpu_features.c 2 | =================================================================== 3 | --- vscode.orig/node-src/deps/v8/third_party/zlib/cpu_features.c 4 | +++ vscode/node-src/deps/v8/third_party/zlib/cpu_features.c 5 | @@ -40,6 +40,7 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 6 | 7 | #if defined(ARMV8_OS_ANDROID) 8 | #include 9 | +#include 10 | #elif defined(ARMV8_OS_LINUX) 11 | #include 12 | #include 13 | @@ -100,13 +101,19 @@ void ZLIB_INTERNAL cpu_check_features(vo 14 | static void _cpu_check_features(void) 15 | { 16 | #if defined(ARMV8_OS_ANDROID) && defined(__aarch64__) 17 | - uint64_t features = android_getCpuFeatures(); 18 | - arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM64_FEATURE_CRC32); 19 | - arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM64_FEATURE_PMULL); 20 | +// uint64_t features = android_getCpuFeatures(); 21 | +// arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM64_FEATURE_CRC32); 22 | +// arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM64_FEATURE_PMULL); 23 | + uint32_t hwcaps = getauxval(AT_HWCAP); 24 | + arm_cpu_enable_crc32 = !!(hwcaps & HWCAP_CRC32); 25 | + arm_cpu_enable_pmull = !!(hwcaps & HWCAP_PMULL); 26 | #elif defined(ARMV8_OS_ANDROID) /* aarch32 */ 27 | - uint64_t features = android_getCpuFeatures(); 28 | - arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM_FEATURE_CRC32); 29 | - arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM_FEATURE_PMULL); 30 | +// uint64_t features = android_getCpuFeatures(); 31 | +// arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM_FEATURE_CRC32); 32 | +// arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM_FEATURE_PMULL); 33 | + uint32_t hwcaps2 = getauxval(AT_HWCAP2); 34 | + arm_cpu_enable_crc32 = !!(hwcaps2 & HWCAP2_CRC32); 35 | + arm_cpu_enable_pmull = !!(hwcaps2 & HWCAP2_PMULL); 36 | #elif defined(ARMV8_OS_LINUX) && defined(__aarch64__) 37 | unsigned long features = getauxval(AT_HWCAP); 38 | arm_cpu_enable_crc32 = !!(features & HWCAP_CRC32); 39 | Index: vscode/node-src/deps/zlib/cpu_features.c 40 | =================================================================== 41 | --- vscode.orig/node-src/deps/zlib/cpu_features.c 42 | +++ vscode/node-src/deps/zlib/cpu_features.c 43 | @@ -45,6 +45,7 @@ int ZLIB_INTERNAL riscv_cpu_enable_vclmu 44 | 45 | #if defined(ARMV8_OS_ANDROID) 46 | #include 47 | +#include 48 | #elif defined(ARMV8_OS_LINUX) 49 | #include 50 | #include 51 | @@ -106,13 +107,19 @@ void ZLIB_INTERNAL cpu_check_features(vo 52 | static void _cpu_check_features(void) 53 | { 54 | #if defined(ARMV8_OS_ANDROID) && defined(__aarch64__) 55 | - uint64_t features = android_getCpuFeatures(); 56 | - arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM64_FEATURE_CRC32); 57 | - arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM64_FEATURE_PMULL); 58 | +// uint64_t features = android_getCpuFeatures(); 59 | +// arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM64_FEATURE_CRC32); 60 | +// arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM64_FEATURE_PMULL); 61 | + uint32_t hwcaps = getauxval(AT_HWCAP); 62 | + arm_cpu_enable_crc32 = !!(hwcaps & HWCAP_CRC32); 63 | + arm_cpu_enable_pmull = !!(hwcaps & HWCAP_PMULL); 64 | #elif defined(ARMV8_OS_ANDROID) /* aarch32 */ 65 | - uint64_t features = android_getCpuFeatures(); 66 | - arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM_FEATURE_CRC32); 67 | - arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM_FEATURE_PMULL); 68 | +// uint64_t features = android_getCpuFeatures(); 69 | +// arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM_FEATURE_CRC32); 70 | +// arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM_FEATURE_PMULL); 71 | + uint32_t hwcaps2 = getauxval(AT_HWCAP2); 72 | + arm_cpu_enable_crc32 = !!(hwcaps2 & HWCAP2_CRC32); 73 | + arm_cpu_enable_pmull = !!(hwcaps2 & HWCAP2_PMULL); 74 | #elif defined(ARMV8_OS_LINUX) && defined(__aarch64__) 75 | unsigned long features = getauxval(AT_HWCAP); 76 | arm_cpu_enable_crc32 = !!(features & HWCAP_CRC32); 77 | -------------------------------------------------------------------------------- /patches/node-src/lib_child_process.js.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/lib/child_process.js 2 | =================================================================== 3 | --- vscode.orig/node-src/lib/child_process.js 4 | +++ vscode/node-src/lib/child_process.js 5 | @@ -636,10 +636,8 @@ function normalizeSpawnArguments(file, a 6 | } else { 7 | if (typeof options.shell === 'string') 8 | file = options.shell; 9 | - else if (process.platform === 'android') 10 | - file = '/system/bin/sh'; 11 | else 12 | - file = '/bin/sh'; 13 | + file = '/data/data/vn.vhn.vsc/files/usr/bin/sh'; 14 | args = ['-c', command]; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /patches/node-src/lib_os.js.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/lib/os.js 2 | =================================================================== 3 | --- vscode.orig/node-src/lib/os.js 4 | +++ vscode/node-src/lib/os.js 5 | @@ -191,7 +191,7 @@ function tmpdir() { 6 | path = safeGetenv('TMPDIR') || 7 | safeGetenv('TMP') || 8 | safeGetenv('TEMP') || 9 | - '/tmp'; 10 | + '/data/data/vn.vhn.vsc/files/tmp'; 11 | if (path.length > 1 && StringPrototypeEndsWith(path, '/')) 12 | path = StringPrototypeSlice(path, 0, -1); 13 | } 14 | -------------------------------------------------------------------------------- /patches/node-src/series: -------------------------------------------------------------------------------- 1 | android_configure.py.diff 2 | deps_uv_src_unix_core.c.diff 3 | deps_uv_src_unix_fs.c.diff 4 | deps_uv_src_unix_process.c.diff 5 | deps_uv_src_unix_sysinfo_memory.c.diff 6 | deps_uv_uv.gyp.diff 7 | deps_npm_lib_cli_entry.js.diff 8 | deps_npm_lib_commands_install.js.diff 9 | deps_v8_src_flags_flag_definitions.h.diff 10 | deps_v8_src_logging_log.cc.diff 11 | deps_v8_src_trap_handler_trap_handler.h.diff 12 | lib_child_process.js.diff 13 | lib_os.js.diff 14 | node.gyp.diff 15 | src_node_internals.h.diff 16 | tools_gyp_pylib_gyp_generator_ninja.py.diff 17 | tools_v8_gypfiles_v8.gyp.diff 18 | deps_v8_third_party_zlib_cpu_features.diff 19 | -------------------------------------------------------------------------------- /patches/node-src/src_node_internals.h.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/src/node_internals.h 2 | =================================================================== 3 | --- vscode.orig/node-src/src/node_internals.h 4 | +++ vscode/node-src/src/node_internals.h 5 | @@ -305,7 +305,7 @@ class ThreadPoolWork { 6 | 7 | // Functions defined in node.cc that are exposed via the bootstrapper object 8 | 9 | -#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__) 10 | +#if defined(__POSIX__) && !defined(__CloudABI__) 11 | #define NODE_IMPLEMENTS_POSIX_CREDENTIALS 1 12 | #endif // defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__) 13 | 14 | -------------------------------------------------------------------------------- /patches/node-src/tools_gyp_pylib_gyp_generator_ninja.py.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/tools/gyp/pylib/gyp/generator/ninja.py 2 | =================================================================== 3 | --- vscode.orig/node-src/tools/gyp/pylib/gyp/generator/ninja.py 4 | +++ vscode/node-src/tools/gyp/pylib/gyp/generator/ninja.py 5 | @@ -42,7 +42,7 @@ generator_default_variables = { 6 | # the start of a string, while $| is used for variables that can appear 7 | # anywhere in a string. 8 | "INTERMEDIATE_DIR": "$!INTERMEDIATE_DIR", 9 | - "SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/gen", 10 | + "SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/$|OBJ/gen", 11 | "PRODUCT_DIR": "$!PRODUCT_DIR", 12 | "CONFIGURATION_NAME": "$|CONFIGURATION_NAME", 13 | # Special variables that may be used by gyp 'rule' targets. 14 | @@ -284,6 +284,10 @@ class NinjaWriter: 15 | 16 | CONFIGURATION_NAME = "$|CONFIGURATION_NAME" 17 | path = path.replace(CONFIGURATION_NAME, self.config_name) 18 | + obj = "obj" 19 | + if self.toolset != "target": 20 | + obj += "." + self.toolset 21 | + path = path.replace("$|OBJ", obj) 22 | 23 | return path 24 | 25 | -------------------------------------------------------------------------------- /patches/node-src/tools_v8_gypfiles_v8.gyp.diff: -------------------------------------------------------------------------------- 1 | Index: vscode/node-src/tools/v8_gypfiles/v8.gyp 2 | =================================================================== 3 | --- vscode.orig/node-src/tools/v8_gypfiles/v8.gyp 4 | +++ vscode/node-src/tools/v8_gypfiles/v8.gyp 5 | @@ -1239,6 +1239,7 @@ 6 | '<(V8_ROOT)/src/base/platform/platform-posix.h', 7 | '<(V8_ROOT)/src/base/platform/platform-posix-time.cc', 8 | '<(V8_ROOT)/src/base/platform/platform-posix-time.h', 9 | + '<(V8_ROOT)/src/base/platform/platform-linux.h', 10 | ], 11 | 'link_settings': { 12 | 'target_conditions': [ 13 | @@ -1748,7 +1749,12 @@ 14 | }], 15 | ['clang or OS!="win"', { 16 | 'conditions': [ 17 | - ['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', { 18 | + ['_toolset == "host" and host_arch == "x64" and (target_arch == "arm" or target_arch == "ia32")', { 19 | + 'sources': [ 20 | + '<(V8_ROOT)/src/heap/base/asm/ia32/push_registers_asm.cc', 21 | + ], 22 | + }], 23 | + ['_toolset == "host" and host_arch == "x64" and (target_arch == "x64" or target_arch == "arm64") or (_toolset == "target" and target_arch == "x64")', { 24 | 'sources': [ 25 | '<(V8_ROOT)/src/heap/base/asm/x64/push_registers_asm.cc', 26 | ], 27 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Android VSCode Server 2 | 3 | Build VSCode Server for Android. -------------------------------------------------------------------------------- /scripts/download-rg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" 4 | 5 | source $SCRIPT_DIR/include.sh 6 | 7 | echo "Download RG for ANDROID_ARCH=$ANDROID_ARCH TERMUX_ARCH=$TERMUX_ARCH" 8 | mkdir -p rg 9 | rm -rf rg/$ANDROID_ARCH || true 10 | mkdir -p rg/$ANDROID_ARCH 11 | deb_uri=$(latest_version_deb_of_package ripgrep) 12 | if [ -z "$deb_uri" ]; then 13 | echo "Cant find rg from termux" 14 | exit -1 15 | fi 16 | pushd rg/$ANDROID_ARCH 17 | wget --no-check-certificate https://vsc.vhn.vn/termux-packages-24/$deb_uri -O rg.deb 18 | ar x rg.deb data.tar.xz 19 | tar xf data.tar.xz 20 | mv data/data/vn.vhn.vsc/files/usr/bin/rg rg 21 | rm -rf data 22 | popd 23 | -------------------------------------------------------------------------------- /scripts/extract-latest-version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Description: Extract the latest version deb of a package from the list of debs 3 | # Usage: python3 extract-latest-version.py 4 | # Debs are read from stdin and the latest version deb is printed to stdout 5 | # 6 | # Example: python3 extract-latest-version.py krb5 7 | # Input: 8 | # debs/16bb2083331c057477d327bd6ccf874968de4a55/arm/krb5_1.20.1_arm.deb 9 | # debs/364cca5a6921c86062174aa698ac4bb7f8893230/arm/krb5_1.21.2_arm.deb 10 | # debs/4f71da0a7c89509dc05c894571dfdfe4cf97628d/arm/krb5_1.21.3_arm.deb 11 | # debs/7ea42b8e284a903cdd2f7f8f2835a99563815b33/arm/krb5_1.21_arm.deb 12 | # debs/8d225aac8a0dd85cba602ab528bf1922d78e01de/arm/krb5_1.20-2_arm.deb 13 | # debs/913fa9c4e78aefac8797071644cff347ff6cee66/arm/krb5_1.20_arm.deb 14 | # debs/91d05a1565faa7deafbe73dc3c79e35d4c0dc9b5/arm/krb5_1.19.3_arm.deb 15 | # debs/a5b0812e862e122108ac0b411ac17466e0fb4230/all/krb5_1.19.2-2_arm.deb 16 | # debs/b7ab6cf582d7e5dae326cc3a026342f74a97b0a6/all/krb5_1.19.1_arm.deb 17 | # debs/d029a26eb77b4d5c4220ec3ddc906997518151cf/arm/krb5_1.20-1_arm.deb 18 | # debs/e19bb680d00dcbdc4afe9f62972cad0de3e669f5/all/krb5_1.19.1-2_arm.deb 19 | # 20 | # Output: 21 | # debs/4f71da0a7c89509dc05c894571dfdfe4cf97628d/arm/krb5_1.21.3_arm.deb 22 | 23 | import sys 24 | import re 25 | 26 | def semver_split_1(version): 27 | if "-" in version: 28 | return version.split("-", 1) 29 | return version, "" 30 | 31 | def semver_compare_main_part(version1, version2): 32 | version1_parts = version1.split(".") 33 | version2_parts = version2.split(".") 34 | 35 | for i in range(0, min(len(version1_parts), len(version2_parts))): 36 | if version1_parts[i] < version2_parts[i]: 37 | return -1 38 | elif version1_parts[i] > version2_parts[i]: 39 | return 1 40 | 41 | if len(version1_parts) < len(version2_parts): 42 | return -1 43 | elif len(version1_parts) > len(version2_parts): 44 | return 1 45 | return 0 46 | 47 | def semver_compare_ext(ext1, ext2): 48 | if ext1 == ext2: 49 | return 0 50 | elif ext1 < ext2: 51 | return -1 52 | return 1 53 | 54 | def semver_compare(version1, version2): 55 | version1_main, version1_ext = semver_split_1(version1) 56 | version2_main, version2_ext = semver_split_1(version2) 57 | 58 | match semver_compare_main_part(version1_main, version2_main): 59 | case -1: 60 | return -1 61 | case 1: 62 | return 1 63 | case 0: 64 | return semver_compare_ext(version1_ext, version2_ext) 65 | 66 | def extract_version(deb_path, package_prefix): 67 | """ 68 | Extracts the version number from a deb file path. 69 | 70 | Args: 71 | deb_path: The path to the deb file. 72 | package_prefix: The prefix of the package name. 73 | 74 | Returns: 75 | A tuple containing the version number as a string and the deb path. 76 | """ 77 | pattern = rf"{package_prefix}_([^_]+)_(arm|x86_64|aarch64|i686)\.deb" 78 | match = re.search(pattern, deb_path) 79 | if match: 80 | version = match.group(1) 81 | return (version, deb_path) 82 | return None 83 | 84 | 85 | def main(): 86 | """ 87 | Reads deb file paths from stdin, extracts the latest version, and prints it to stdout. 88 | """ 89 | package_prefix = sys.argv[1] 90 | debs = [] 91 | for line in sys.stdin: 92 | deb_path = line.strip() 93 | version = extract_version(deb_path, package_prefix) 94 | if version: 95 | debs.append(version) 96 | 97 | if debs: 98 | latest_deb = max(debs) 99 | print(latest_deb[1]) 100 | 101 | 102 | if __name__ == "__main__": 103 | main() 104 | -------------------------------------------------------------------------------- /scripts/include.sh: -------------------------------------------------------------------------------- 1 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 2 | 3 | latest_version_deb_of_package() { 4 | echo "Find latest version of $1 for $TERMUX_ARCH" >&2 5 | curl -k "https://vsc.vhn.vn/termux-packages-24/dists/stable/main/binary-$TERMUX_ARCH/Packages" | 6 | grep Filename | 7 | grep "/${1}_" | 8 | awk '{print $2}' | 9 | python3 $SCRIPT_DIR/extract-latest-version.py "$1" 10 | } 11 | -------------------------------------------------------------------------------- /update-patches.php: -------------------------------------------------------------------------------- 1 |