├── rust-toolchain
├── frontend
└── ui
│ ├── homescreen
│ ├── locales
│ │ └── en-US.ftl
│ ├── index.html
│ └── css
│ │ └── index.css
│ ├── system
│ ├── locales
│ │ └── en-US.ftl
│ ├── assets
│ │ ├── servo.png
│ │ └── wallpapers
│ │ │ ├── lock.jpg
│ │ │ ├── background.jpg
│ │ │ └── trianglify.png
│ ├── css
│ │ ├── theme.css
│ │ ├── virtual_keyboard.css
│ │ ├── index.css
│ │ ├── statusbar.css
│ │ ├── search_panel.css
│ │ ├── navbar.css
│ │ ├── window_manager.css
│ │ └── lockscreen.css
│ ├── gaia_keyboard
│ │ ├── app.html
│ │ └── settings.js
│ ├── js
│ │ ├── scripts
│ │ │ └── 00.keyboard_api.js
│ │ └── virtual_keyboard.js
│ └── index.html
│ ├── test
│ ├── background.jpg
│ ├── content.html
│ ├── index.css
│ └── index.html
│ ├── keyboard
│ ├── resources
│ │ └── sounds
│ │ │ ├── key.wav
│ │ │ └── special.wav
│ ├── style
│ │ ├── images
│ │ │ ├── divider.png
│ │ │ ├── download.png
│ │ │ ├── icon_close.png
│ │ │ ├── icon_dismiss.png
│ │ │ ├── icon_extend.png
│ │ │ ├── icon_remove.png
│ │ │ ├── icon_search.png
│ │ │ ├── range_thumb.png
│ │ │ ├── stop_download.png
│ │ │ ├── icon_hide_keyboard.png
│ │ │ ├── icon_alternate_keyboard.png
│ │ │ └── emoji
│ │ │ │ ├── keyboard_ic_ppl_off.png
│ │ │ │ ├── keyboard_ic_ppl_on.png
│ │ │ │ ├── keyboard_ic_nature_off.png
│ │ │ │ ├── keyboard_ic_nature_on.png
│ │ │ │ ├── keyboard_ic_object_off.png
│ │ │ │ ├── keyboard_ic_object_on.png
│ │ │ │ ├── keyboard_ic_place_off.png
│ │ │ │ ├── keyboard_ic_place_on.png
│ │ │ │ ├── keyboard_ic_recent_off.png
│ │ │ │ ├── keyboard_ic_recent_on.png
│ │ │ │ ├── keyboard_ic_symbol_off.png
│ │ │ │ ├── keyboard_ic_symbol_on.png
│ │ │ │ ├── keyboard_ic_ppl_pressed.png
│ │ │ │ ├── keyboard_ic_ime_emoji_off.png
│ │ │ │ ├── keyboard_ic_nature_pressed.png
│ │ │ │ ├── keyboard_ic_object_pressed.png
│ │ │ │ ├── keyboard_ic_place_pressed.png
│ │ │ │ ├── keyboard_ic_recent_pressed.png
│ │ │ │ ├── keyboard_ic_symbol_pressed.png
│ │ │ │ └── keyboard_ic_ime_emoji_pressed.png
│ │ └── icons
│ │ │ ├── keyboard_84.png
│ │ │ ├── keyboard_126.png
│ │ │ ├── keyboard_142.png
│ │ │ ├── keyboard_189.png
│ │ │ └── keyboard_284.png
│ ├── js
│ │ ├── imes
│ │ │ ├── latin
│ │ │ │ └── dictionaries
│ │ │ │ │ ├── de.dict
│ │ │ │ │ ├── es.dict
│ │ │ │ │ ├── fr.dict
│ │ │ │ │ ├── pl.dict
│ │ │ │ │ ├── en_us.dict
│ │ │ │ │ └── pt_br.dict
│ │ │ ├── jspinyin
│ │ │ │ ├── empinyin_files.data
│ │ │ │ └── tests
│ │ │ │ │ ├── style.css
│ │ │ │ │ └── index.html
│ │ │ ├── india
│ │ │ │ └── india.js
│ │ │ └── emoji
│ │ │ │ └── emoji.js
│ │ ├── shims
│ │ │ └── bootstrap.js
│ │ ├── settings
│ │ │ ├── bootstrap.js
│ │ │ ├── handwriting_settings_view.js
│ │ │ ├── general_settings_view.js
│ │ │ ├── layout_dictionary_list.js
│ │ │ ├── keyboard_settings_app.js
│ │ │ └── base_view.js
│ │ ├── views
│ │ │ ├── emoji_key_view.js
│ │ │ ├── base_view.js
│ │ │ ├── view_utils.js
│ │ │ └── swipeable_page_view.js
│ │ ├── layouts
│ │ │ ├── he.js
│ │ │ ├── vi-Telex.js
│ │ │ ├── mk.js
│ │ │ ├── ru.js
│ │ │ ├── bg-BDS.js
│ │ │ ├── bs.js
│ │ │ ├── ig.js
│ │ │ ├── bg-Pho-Ban.js
│ │ │ ├── sr-Cyrl.js
│ │ │ ├── ko.js
│ │ │ ├── bg-Pho-Trad.js
│ │ │ ├── nl.js
│ │ │ ├── de.js
│ │ │ ├── hr.js
│ │ │ ├── cs.js
│ │ │ ├── sk.js
│ │ │ ├── tr-Q.js
│ │ │ ├── fr.js
│ │ │ ├── fy.js
│ │ │ ├── fr-CH.js
│ │ │ ├── cs-qwerty.js
│ │ │ ├── fr-Dvorak-bepo.js
│ │ │ ├── en-Dvorak.js
│ │ │ ├── da.js
│ │ │ ├── en-Colemak.js
│ │ │ ├── wo.js
│ │ │ ├── tr-F.js
│ │ │ ├── nb.js
│ │ │ ├── cy.js
│ │ │ ├── ff.js
│ │ │ ├── sv.js
│ │ │ ├── vi-Qwerty.js
│ │ │ ├── eo.js
│ │ │ ├── vi-Typewriter.js
│ │ │ ├── ta.js
│ │ │ ├── ar.js
│ │ │ ├── th.js
│ │ │ ├── sr-Latn.js
│ │ │ ├── ro.js
│ │ │ ├── lt.js
│ │ │ ├── uk.js
│ │ │ └── pl.js
│ │ └── keyboard
│ │ │ ├── visual_highlight_manager.js
│ │ │ ├── upper_case_state_manager.js
│ │ │ └── console.js
│ └── shared
│ │ └── style
│ │ └── keyboard_symbols.css
│ └── shared
│ └── fontawesome
│ ├── webfonts
│ ├── fa-solid-900.eot
│ ├── fa-solid-900.ttf
│ ├── fa-brands-400.eot
│ ├── fa-brands-400.ttf
│ ├── fa-brands-400.woff
│ ├── fa-regular-400.eot
│ ├── fa-regular-400.ttf
│ ├── fa-solid-900.woff
│ ├── fa-solid-900.woff2
│ ├── fa-brands-400.woff2
│ ├── fa-regular-400.woff
│ └── fa-regular-400.woff2
│ ├── README.md
│ ├── css
│ ├── fa-brands.min.css
│ ├── fa-solid.min.css
│ ├── fa-regular.min.css
│ ├── fa-brands.css
│ ├── fa-solid.css
│ └── fa-regular.css
│ └── LICENSE.txt
├── platform
├── glutin
│ ├── fake-ld.cmd
│ ├── support
│ │ └── scripts
│ │ │ ├── clean.sh
│ │ │ ├── build.sh
│ │ │ ├── run-servonk
│ │ │ ├── package.sh
│ │ │ └── run.sh
│ ├── fake-ld-arm.sh
│ ├── fake-ld-arm64.sh
│ ├── fake-ld-armv7.sh
│ ├── .cargo
│ │ └── config
│ ├── platform
│ │ ├── macos
│ │ │ ├── mod.rs
│ │ │ └── Info.plist
│ │ └── windows
│ │ │ └── servo.exe.manifest
│ ├── glutin_app
│ │ └── mod.rs
│ ├── fake-ld.sh
│ └── Cargo.toml
├── gonk
│ ├── mtdev
│ │ ├── mtdev-1.1.5
│ │ │ ├── stamp-h1
│ │ │ ├── mtdev.pc.in
│ │ │ ├── Makefile.am
│ │ │ ├── test
│ │ │ │ └── Makefile.am
│ │ │ ├── README
│ │ │ ├── INSTALL
│ │ │ ├── configure.ac
│ │ │ ├── src
│ │ │ │ ├── Makefile.am
│ │ │ │ ├── iobuf.h
│ │ │ │ ├── match.h
│ │ │ │ └── evbuf.h
│ │ │ ├── COPYING
│ │ │ ├── config.h.in
│ │ │ └── config.h
│ │ ├── src
│ │ │ ├── generated
│ │ │ │ └── mod.rs
│ │ │ └── lib.rs
│ │ ├── Cargo.toml
│ │ ├── Cargo.lock
│ │ ├── bindgen.sh
│ │ ├── build.sh
│ │ └── build.rs
│ ├── support
│ │ ├── scripts
│ │ │ ├── kill.sh
│ │ │ ├── run.sh
│ │ │ ├── clean.sh
│ │ │ ├── servo.sh
│ │ │ ├── network-setup.sh
│ │ │ ├── update-frontend.sh
│ │ │ └── flash.sh
│ │ ├── android
│ │ │ ├── toolchain.cmake
│ │ │ └── openssl.makefile
│ │ ├── gdb
│ │ │ └── load-config.sh
│ │ └── linker
│ │ │ ├── fake-ld-arm.sh
│ │ │ ├── fake-ld-arm64.sh
│ │ │ ├── fake-ld-armv7.sh
│ │ │ └── fake-ld.sh
│ ├── .cargo
│ │ └── config
│ ├── makefile.cargo
│ ├── Cargo.toml
│ └── src
│ │ └── events_loop.rs
└── shared
│ └── resources
│ ├── ahem.css
│ ├── Servo.ico
│ ├── itried.jpg
│ ├── rippy.png
│ ├── servo.icns
│ ├── servo.png
│ ├── badcert.jpg
│ ├── servo64.png
│ ├── tumbeast.png
│ ├── ahem
│ ├── Ahem.sit
│ ├── COPIED-FROM
│ ├── AHEM____.TTF
│ ├── README
│ └── COPYING
│ ├── package-prefs.json
│ ├── badcert.html
│ ├── failure.html
│ ├── neterror.html
│ ├── not-found.html
│ ├── user-agent-js
│ └── 00.example.js
│ ├── Credits.rtf.mako
│ ├── android_params
│ ├── iso-8859-8.css
│ ├── cert-google-only
│ ├── quirks-mode.css
│ ├── self_signed_certificate_for_testing.crt
│ ├── privatekey_for_testing.key
│ └── gatt_blocklist.txt
├── api-server
├── .cargo
│ └── config
└── Cargo.toml
├── update-servo.sh
├── .gitignore
├── bootstrap.sh
├── servonk
└── readme.md
/rust-toolchain:
--------------------------------------------------------------------------------
1 | nightly-2018-07-17
2 |
--------------------------------------------------------------------------------
/frontend/ui/homescreen/locales/en-US.ftl:
--------------------------------------------------------------------------------
1 | title = Servonk Home
--------------------------------------------------------------------------------
/platform/glutin/fake-ld.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | gcc -mwindows %*
3 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/stamp-h1:
--------------------------------------------------------------------------------
1 | timestamp for config.h
2 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/src/generated/mod.rs:
--------------------------------------------------------------------------------
1 | #[macro_use] pub mod ffi;
2 |
--------------------------------------------------------------------------------
/frontend/ui/system/locales/en-US.ftl:
--------------------------------------------------------------------------------
1 | search-input =
2 | .placeholder = I'm searching for…
3 |
--------------------------------------------------------------------------------
/platform/gonk/support/scripts/kill.sh:
--------------------------------------------------------------------------------
1 | adb shell kill -9 `adb shell ps|grep servo|cut -c 10-15`
2 |
--------------------------------------------------------------------------------
/platform/glutin/support/scripts/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | cd ../..
6 | cargo clean
7 |
--------------------------------------------------------------------------------
/platform/glutin/support/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | cd ../..
6 | cargo build $@
7 |
--------------------------------------------------------------------------------
/frontend/ui/test/background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/test/background.jpg
--------------------------------------------------------------------------------
/platform/gonk/support/scripts/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | adb shell servo.sh http://localhost:8000/system/index.html $@
4 |
--------------------------------------------------------------------------------
/platform/shared/resources/ahem.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: Ahem;
3 | src: url(ahem/AHEM____.TTF);
4 | }
5 |
--------------------------------------------------------------------------------
/frontend/ui/system/assets/servo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/system/assets/servo.png
--------------------------------------------------------------------------------
/platform/shared/resources/Servo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/Servo.ico
--------------------------------------------------------------------------------
/platform/shared/resources/itried.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/itried.jpg
--------------------------------------------------------------------------------
/platform/shared/resources/rippy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/rippy.png
--------------------------------------------------------------------------------
/platform/shared/resources/servo.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/servo.icns
--------------------------------------------------------------------------------
/platform/shared/resources/servo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/servo.png
--------------------------------------------------------------------------------
/api-server/.cargo/config:
--------------------------------------------------------------------------------
1 | [target.armv7-linux-androideabi]
2 | linker = "./fake-ld-armv7.sh"
3 | ar = "arm-linux-androideabi-ar"
4 |
--------------------------------------------------------------------------------
/platform/shared/resources/badcert.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/badcert.jpg
--------------------------------------------------------------------------------
/platform/shared/resources/servo64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/servo64.png
--------------------------------------------------------------------------------
/platform/shared/resources/tumbeast.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/tumbeast.png
--------------------------------------------------------------------------------
/platform/shared/resources/ahem/Ahem.sit:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/ahem/Ahem.sit
--------------------------------------------------------------------------------
/platform/shared/resources/ahem/COPIED-FROM:
--------------------------------------------------------------------------------
1 | The files in this directory are copied from http://www.w3.org/Style/CSS/Test/Fonts/Ahem/
2 |
--------------------------------------------------------------------------------
/platform/shared/resources/ahem/AHEM____.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/platform/shared/resources/ahem/AHEM____.TTF
--------------------------------------------------------------------------------
/frontend/ui/keyboard/resources/sounds/key.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/resources/sounds/key.wav
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/divider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/divider.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/download.png
--------------------------------------------------------------------------------
/frontend/ui/system/assets/wallpapers/lock.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/system/assets/wallpapers/lock.jpg
--------------------------------------------------------------------------------
/platform/gonk/support/scripts/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | cd ../..
6 | cargo clean
7 | make -C mtdev/mtdev-1.1.5 clean
8 |
9 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/icons/keyboard_84.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/icons/keyboard_84.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/icon_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/icon_close.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/resources/sounds/special.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/resources/sounds/special.wav
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/icons/keyboard_126.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/icons/keyboard_126.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/icons/keyboard_142.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/icons/keyboard_142.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/icons/keyboard_189.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/icons/keyboard_189.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/icons/keyboard_284.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/icons/keyboard_284.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/icon_dismiss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/icon_dismiss.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/icon_extend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/icon_extend.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/icon_remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/icon_remove.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/icon_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/icon_search.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/range_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/range_thumb.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/stop_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/stop_download.png
--------------------------------------------------------------------------------
/frontend/ui/system/assets/wallpapers/background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/system/assets/wallpapers/background.jpg
--------------------------------------------------------------------------------
/frontend/ui/system/assets/wallpapers/trianglify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/system/assets/wallpapers/trianglify.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/latin/dictionaries/de.dict:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/js/imes/latin/dictionaries/de.dict
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/latin/dictionaries/es.dict:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/js/imes/latin/dictionaries/es.dict
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/latin/dictionaries/fr.dict:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/js/imes/latin/dictionaries/fr.dict
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/latin/dictionaries/pl.dict:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/js/imes/latin/dictionaries/pl.dict
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/icon_hide_keyboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/icon_hide_keyboard.png
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/platform/shared/resources/package-prefs.json:
--------------------------------------------------------------------------------
1 | {
2 | "_comment": "this file is used to add some specific preferences to the Servo package (nightly builds)"
3 | }
4 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/jspinyin/empinyin_files.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/js/imes/jspinyin/empinyin_files.data
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/latin/dictionaries/en_us.dict:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/js/imes/latin/dictionaries/en_us.dict
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/latin/dictionaries/pt_br.dict:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/js/imes/latin/dictionaries/pt_br.dict
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-brands-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-brands-400.eot
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-brands-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-brands-400.woff
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-regular-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-regular-400.eot
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/platform/shared/resources/badcert.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Certificate error
4 |
5 |
6 | ${reason}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/platform/shared/resources/failure.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | about:failure
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/icon_alternate_keyboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/icon_alternate_keyboard.png
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/webfonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/shared/fontawesome/webfonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ppl_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ppl_off.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ppl_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ppl_on.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_nature_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_nature_off.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_nature_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_nature_on.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_object_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_object_off.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_object_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_object_on.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_place_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_place_off.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_place_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_place_on.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_recent_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_recent_off.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_recent_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_recent_on.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_symbol_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_symbol_off.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_symbol_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_symbol_on.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/shared/style/keyboard_symbols.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Keyboard Symbols';
3 | font-weight: 600;
4 | src: url(keyboard_symbols/Keyboard-Symbols.ttf);
5 | }
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ppl_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ppl_pressed.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ime_emoji_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ime_emoji_off.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_nature_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_nature_pressed.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_object_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_object_pressed.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_place_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_place_pressed.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_recent_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_recent_pressed.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_symbol_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_symbol_pressed.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ime_emoji_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabricedesre/servonk/HEAD/frontend/ui/keyboard/style/images/emoji/keyboard_ic_ime_emoji_pressed.png
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/shims/bootstrap.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | (function (exports) {
4 |
5 | var starter = exports.__starter = new KeyboardAppStarter();
6 | starter.start();
7 |
8 | }(window));
--------------------------------------------------------------------------------
/frontend/ui/test/content.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Iframe Content
5 |
6 |
7 | Hello World!
8 |
9 |
--------------------------------------------------------------------------------
/platform/shared/resources/neterror.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Error loading page
4 |
5 |
6 | Could not load the requested page: ${reason}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "mtdev"
3 | version = "0.1.0"
4 | authors = ["Fabrice Desré "]
5 |
6 | [dependencies]
7 | libc = "0.2"
8 |
9 | [build-dependencies]
10 | cc = "1.0"
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/README.md:
--------------------------------------------------------------------------------
1 | # Font Awesome 5.0.8
2 |
3 | Thanks for downloading Font Awesome! We're so excited you're here.
4 |
5 | Our documentation is available online. Just head here:
6 |
7 | https://fontawesome.com
8 |
--------------------------------------------------------------------------------
/frontend/ui/system/css/theme.css:
--------------------------------------------------------------------------------
1 | /*
2 | * CSS variables for the system UI.
3 | */
4 |
5 | :root {
6 | /* Status bar */
7 | --statusbar-height: 50px;
8 |
9 | /* Navigation bar */
10 | --navbar-height: 90px;
11 | }
--------------------------------------------------------------------------------
/platform/gonk/support/android/toolchain.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_SYSTEM_NAME Android)
2 | set(CMAKE_ANDROID_NDK $ENV{ANDROID_NDK})
3 | set(CMAKE_ANDROID_API $ENV{NDK_ANDROID_VERSION})
4 | set(CMAKE_ANDROID_ARCH_ABI $ENV{CMAKE_ANDROID_ARCH_ABI})
5 |
--------------------------------------------------------------------------------
/platform/gonk/support/scripts/servo.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | # Move to the Servo directory so that it can find
4 | # resources/* files properly.
5 | cd /data/local/servo
6 |
7 | export RUST_BACKTRACE=1
8 |
9 | ./servo $@
10 |
--------------------------------------------------------------------------------
/platform/shared/resources/not-found.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | about:not-found
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/mtdev.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@prefix@
2 | exec_prefix=@exec_prefix@
3 | libdir=@libdir@
4 | includedir=@includedir@
5 |
6 | Name: mtdev
7 | Description: Multitouch Protocol Translation Library
8 | Version: @PACKAGE_VERSION@
9 | Libs: -L${libdir} -lmtdev
10 | Cflags: -I${includedir}
11 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = src test
2 |
3 | pkgconfigdir = $(libdir)/pkgconfig
4 | pkgconfig_DATA = mtdev.pc
5 |
6 | AM_CPPFLAGS = $(top_srcdir)/include/
7 |
8 | .PHONY: ChangeLog INSTALL
9 | INSTALL:
10 | $(INSTALL_CMD)
11 | ChangeLog:
12 | git log > ChangeLog
13 |
14 | dist-hook: ChangeLog INSTALL
15 |
--------------------------------------------------------------------------------
/platform/shared/resources/user-agent-js/00.example.js:
--------------------------------------------------------------------------------
1 | // Keep files in this directory which you would like executed before
2 | // any other script when servo is run with `--userscripts`
3 | // Files are sorted alphabetically. When committing polyfills
4 | // order them with numbers, e.g. `01.innerhtml.js` will be executed before
5 | // `05.jquery.js`
6 |
--------------------------------------------------------------------------------
/frontend/ui/system/css/virtual_keyboard.css:
--------------------------------------------------------------------------------
1 | #keyboard-frame {
2 | width: 100%;
3 | height: 100%;
4 | position: absolute;
5 | top: 0;
6 | left: 0;
7 |
8 | transition: transform 0.5s;
9 |
10 | pointer-events: none;
11 | border: none;
12 | }
13 |
14 | #keyboard-frame.offscreen {
15 | transform: translateY(100%);
16 | transition: transform 0.5s;
17 | }
--------------------------------------------------------------------------------
/platform/shared/resources/Credits.rtf.mako:
--------------------------------------------------------------------------------
1 | {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf460
2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3 | {\colortbl;\red255\green255\blue255;}
4 | \vieww12000\viewh15840\viewkind0
5 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\qc\partightenfactor0
6 |
7 | \f0\fs24 \cf0 ${version}}
8 |
--------------------------------------------------------------------------------
/update-servo.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cp -R $1/resources platform/shared
4 |
5 | cp $1/Cargo.lock platform/gonk
6 | cp $1/Cargo.lock platform/glutin
7 |
8 | cp $1/rust-toolchain .
9 |
10 | ./bootstrap.sh
11 |
12 | # Make sure we pick up our patched crates.
13 | cd platform/gonk
14 |
15 | cargo update \
16 | -p mozjs_sys \
17 | -p rust-webvr \
18 | -p rust-webvr-api
19 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/jspinyin/tests/style.css:
--------------------------------------------------------------------------------
1 | input[type="text"] {
2 | font-size: 1.5rem;
3 | width: 18rem;
4 | }
5 |
6 | button, input[type="button"] {
7 | width: 9rem;
8 | height: 2.5rem;
9 | font-size: 1.5rem;
10 | }
11 |
12 | #log, #status {
13 | margin-top: 1rem;
14 | }
15 |
16 | #output {
17 | margin-top: 1rem;
18 | }
19 |
20 | p {
21 | margin: 0.3rem;
22 | }
23 |
--------------------------------------------------------------------------------
/platform/gonk/.cargo/config:
--------------------------------------------------------------------------------
1 | [target.arm-linux-androideabi]
2 | linker = "./support/linker/fake-ld-arm.sh"
3 | ar = "arm-linux-androideabi-ar"
4 |
5 | [target.armv7-linux-androideabi]
6 | linker = "./support/linker/fake-ld-armv7.sh"
7 | ar = "arm-linux-androideabi-ar"
8 |
9 | [target.aarch64-linux-android]
10 | linker = "./support/linker/fake-ld-arm64.sh"
11 | ar = "aarch64-linux-android-ar"
12 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/india/india.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global InputMethods */
4 |
5 | InputMethods.india = {
6 | _glue: null,
7 |
8 | init: function(glue) {
9 | this._glue = glue;
10 | },
11 |
12 | click: function(keyCode) {
13 | this._glue.setUpperCase(false);
14 | return this._glue.sendKey(keyCode);
15 | },
16 |
17 | displaysCandidates: function() {
18 | return false;
19 | }
20 | };
21 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/settings/bootstrap.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global KeyboardSettingsApp */
4 |
5 | // This file should be considered frozen and nothing should be added here,
6 | // ever. It's also intentionally not covered in the unit test suite.
7 | (function(exports) {
8 |
9 | var app = new KeyboardSettingsApp();
10 | app.start();
11 |
12 | // Expose the instance to JS Console.
13 | exports.app = app;
14 |
15 | })(window);
16 |
--------------------------------------------------------------------------------
/platform/glutin/support/scripts/run-servonk:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | HERE=`dirname "$(readlink -f "$0")"`
6 |
7 | export UI_ROOT=${UI_ROOT:-${HERE}/ui}
8 | export SERVO_RESOURCES=${HERE}/resources
9 |
10 | ${HERE}/servo \
11 | --resources-path ${SERVO_RESOURCES} \
12 | --resolution 720x1280 \
13 | --user-agent "Mozilla/5.0 (Mobile; rv:60.0) Servo/1.0 Firefox/60.0" \
14 | -M \
15 | http://localhost:8000/system/index.html
--------------------------------------------------------------------------------
/platform/gonk/support/scripts/network-setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # Set up networking on the z3c
6 |
7 | # Start wpa_supplicant
8 | adb shell start wpa_supplicant
9 |
10 | echo "Waiting for wpa_supplicant to connect..."
11 |
12 | sleep 30
13 |
14 | # Get an ip
15 | adb shell dhcpcd wlan0
16 |
17 | # Use OpenDNS servers
18 | adb shell ndc resolver setnetdns \"\" 208.67.222.222 208.67.220.220
19 |
20 | # Display status
21 | adb shell ifconfig wlan0
22 |
--------------------------------------------------------------------------------
/platform/glutin/fake-ld-arm.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | set -o errexit
8 | set -o nounset
9 | set -o pipefail
10 |
11 | source ./ports/servo/fake-ld.sh
12 |
13 | export _GCC_PARAMS="${@}"
14 | call_gcc "arch-arm" "arm-linux-androideabi" "android-18" "armeabi"
15 |
--------------------------------------------------------------------------------
/platform/glutin/fake-ld-arm64.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | set -o errexit
8 | set -o nounset
9 | set -o pipefail
10 |
11 | source ./ports/servo/fake-ld.sh
12 |
13 | export _GCC_PARAMS="${@}"
14 | call_gcc "arch-arm64" "aarch64-linux-android" "android-21" "arm64-v8a"
15 |
--------------------------------------------------------------------------------
/platform/glutin/fake-ld-armv7.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | set -o errexit
8 | set -o nounset
9 | set -o pipefail
10 |
11 | source ./ports/servo/fake-ld.sh
12 |
13 | export _GCC_PARAMS="${@}"
14 | call_gcc "arch-arm" "arm-linux-androideabi" "android-18" "armeabi-v7a"
15 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/Cargo.lock:
--------------------------------------------------------------------------------
1 | [[package]]
2 | name = "cc"
3 | version = "1.0.4"
4 | source = "registry+https://github.com/rust-lang/crates.io-index"
5 |
6 | [[package]]
7 | name = "mtdev"
8 | version = "0.1.0"
9 | dependencies = [
10 | "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
11 | ]
12 |
13 | [metadata]
14 | "checksum cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "deaf9ec656256bb25b404c51ef50097207b9cbb29c933d31f92cae5a8a0ffee0"
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/target/
2 | **/*.rs.bk
3 | **/.cargo/*
4 | !**/.cargo/config
5 | **/*.o
6 | **/*.lo
7 | **/*.la
8 | **/.deps/*
9 | **/.libs/*
10 | **/mtdev/src/generated
11 | **/mtdev/mtdev-1.1.5/Makefile
12 | **/mtdev/mtdev-1.1.5/config.log
13 | **/mtdev/mtdev-1.1.5/config.status
14 | **/mtdev/mtdev-1.1.5/mtdev.pc
15 | **/mtdev/mtdev-1.1.5/src/Makefile
16 | **/mtdev/mtdev-1.1.5/test/*
17 | **/mtdev/mtdev-1.1.5/config.h
18 | **/mtdev/mtdev-1.1.5/stamp-h1
19 | **/mtdev/mtdev-1.1.5/libtool
20 |
--------------------------------------------------------------------------------
/bootstrap.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | export RUST_TARGET=armv7-linux-androideabi
6 |
7 | # Update the Rust toolchain if needed.
8 | # TODO: checkt the current version and only call rustup if needed.
9 | RUST_VERSION=`cat rust-toolchain`
10 |
11 | rustup install $RUST_VERSION
12 | rustup target add $RUST_TARGET
13 | rustup override set $RUST_VERSION
14 |
15 | # Install bindgen if needed.
16 | command -v bindgen >/dev/null 2>&1 || {
17 | cargo install -f bindgen
18 | }
19 |
--------------------------------------------------------------------------------
/platform/gonk/support/gdb/load-config.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | . "$GONK_DIR/.config"
4 | if [ $? -ne 0 ]; then
5 | echo Could not load .config. Did you run config.sh?
6 | exit -1
7 | fi
8 |
9 | if [ -f "$GONK_DIR/.userconfig" ]; then
10 | . "$GONK_DIR/.userconfig"
11 | fi
12 |
13 | VARIANT=${VARIANT:-eng}
14 | PRODUCT_NAME=${PRODUCT_NAME:-full_${DEVICE}}
15 | DEVICE=${DEVICE:-${PRODUCT_NAME}}
16 | LUNCH=${LUNCH:-${PRODUCT_NAME}-${VARIANT}}
17 | DEVICE_DIR=${DEVICE_DIR:-device/*/$DEVICE}
18 |
--------------------------------------------------------------------------------
/platform/gonk/support/linker/fake-ld-arm.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | set -o errexit
8 | set -o nounset
9 | set -o pipefail
10 |
11 | source ./support/linker/fake-ld.sh
12 |
13 | export _GCC_PARAMS="${@}"
14 | call_gcc "arch-arm" "arm-linux-androideabi" "android-18" "armeabi"
15 |
--------------------------------------------------------------------------------
/platform/gonk/support/linker/fake-ld-arm64.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | set -o errexit
8 | set -o nounset
9 | set -o pipefail
10 |
11 | source ./support/linker/fake-ld.sh
12 |
13 | export _GCC_PARAMS="${@}"
14 | call_gcc "arch-arm64" "aarch64-linux-android" "android-21" "arm64-v8a"
15 |
--------------------------------------------------------------------------------
/platform/gonk/support/linker/fake-ld-armv7.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | set -o errexit
8 | set -o nounset
9 | set -o pipefail
10 |
11 | source ./support/linker/fake-ld.sh
12 |
13 | export _GCC_PARAMS="${@}"
14 | call_gcc "arch-arm" "arm-linux-androideabi" "android-18" "armeabi-v7a"
15 |
--------------------------------------------------------------------------------
/platform/shared/resources/android_params:
--------------------------------------------------------------------------------
1 | # The first line here should be the "servo" argument (without quotes) and the
2 | # last should be the URL to load.
3 | # Blank lines and those beginning with a '#' are ignored.
4 | # Each line should be a separate parameter as would be parsed by the shell.
5 | # For example, "servo -p 10 http://en.wikipedia.org/wiki/Rust" would take 4
6 | # lines (the "-p" and "10" are separate even though they are related).
7 |
8 | servo
9 | http://en.wikipedia.org/wiki/Rust
10 |
--------------------------------------------------------------------------------
/platform/gonk/support/scripts/update-frontend.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | BLUE='\033[1;34m'
6 | NC='\033[0m'
7 |
8 | echo -e "${BLUE}Updating frontend on device...${NC}"
9 |
10 | adb root && adb remount
11 |
12 | # Create the local directory and clean it up if needed.
13 | adb shell mkdir /data/local/servo
14 | adb shell rm -r /data/local/servo/ui
15 |
16 | # Push the frontend.
17 | adb push ../../../../frontend/ui /data/local/servo/ui
18 |
19 | echo -e "${BLUE}Frontent update done!${NC}"
20 |
--------------------------------------------------------------------------------
/frontend/ui/system/css/index.css:
--------------------------------------------------------------------------------
1 |
2 | html, body {
3 | font-family: "fira sans", sans-serif;
4 | color: lightgray;
5 | height: 100%;
6 | margin: 0;
7 | padding: 0;
8 | overflow: hidden;
9 | background-color: black;
10 | }
11 |
12 | iframe {
13 | border: none;
14 | }
15 |
16 | #screen {
17 | background-image: url(../assets/wallpapers/trianglify.png);
18 | background-size: cover;
19 | width: 100%;
20 | height: 100%;
21 | }
22 |
23 | .filler {
24 | flex: 1;
25 | }
26 |
--------------------------------------------------------------------------------
/api-server/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "api_server"
3 | version = "0.1.0"
4 | authors = ["Fabrice Desré "]
5 |
6 | [dependencies]
7 | actix = "0.7"
8 | libservo = { git = "https://github.com/fabricedesre/servo", branch = "gonk" }
9 | # libservo = { path = "/home/fabrice/dev/servo/components/servo" }
10 | log = "0.4"
11 | rand = "0.4"
12 | serde = "1.0"
13 | serde_derive = "1.0"
14 | serde_json = "1.0"
15 |
16 | [dependencies.actix-web]
17 | version = "0.7"
18 | default-features = false
19 | features = ["tls", "alpn", "session", "brotli"]
20 |
--------------------------------------------------------------------------------
/platform/gonk/support/android/openssl.makefile:
--------------------------------------------------------------------------------
1 | .PHONY: all
2 | all: openssl
3 | @: # No-op to silence the "make: Nothing to be done for 'all'." message.
4 |
5 | # From http://wiki.openssl.org/index.php/Android
6 | .PHONY: openssl
7 | openssl: openssl-${OPENSSL_VERSION}/libssl.so
8 |
9 | openssl-${OPENSSL_VERSION}/libssl.so: openssl-${OPENSSL_VERSION}/Configure
10 | ./openssl.sh ${ANDROID_NDK} ${OPENSSL_VERSION}
11 |
12 | openssl-${OPENSSL_VERSION}/Configure:
13 | URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz; \
14 | curl $$URL | tar xzf -
15 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/test/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_PROGRAMS = mtdev-mapgen mtdev-matching mtdev-kernel
2 | bin_PROGRAMS = mtdev-test
3 |
4 | AM_CPPFLAGS=-I$(top_srcdir) -I$(top_srcdir)/include/
5 |
6 | mtdev_mapgen_SOURCES = mtdev-mapgen.c
7 |
8 | mtdev_matching_SOURCES = mtdev-matching.c
9 | mtdev_matching_LDFLAGS = -L$(top_builddir)/src/.libs/ -lmtdev
10 |
11 | mtdev_test_SOURCES = mtdev-test.c
12 | mtdev_test_LDFLAGS = -lmtdev -L$(top_builddir)/src/.libs/
13 |
14 | mtdev_kernel_SOURCES = mtdev-kernel.c
15 | mtdev_kernel_LDFLAGS = -L$(top_builddir)/src/.libs/ -lmtdev
16 |
--------------------------------------------------------------------------------
/platform/gonk/makefile.cargo:
--------------------------------------------------------------------------------
1 | ifeq (armv7-linux-androideabi,$(findstring armv7-linux-androideabi,$(TARGET)))
2 |
3 | CXX := arm-linux-androideabi-g++
4 | AR := arm-linux-androideabi-ar
5 | CFLAGS := -fPIC -O2
6 |
7 | else
8 |
9 | CXX ?= g++
10 | AR ?= ar
11 |
12 | endif
13 |
14 | CSRC := src/native_window_glue.cpp
15 |
16 | OBJS := $(CSRC:%.cpp=$(OUT_DIR)/%.o)
17 |
18 | .PHONY: all
19 | all: $(OUT_DIR)/libnative_window_glue.a
20 |
21 | $(OUT_DIR)/%.o: %.cpp
22 | mkdir -p `dirname $@` && $(CXX) $< -o $@ -c $(CXXFLAGS) $(CPPFLAGS)
23 |
24 | $(OUT_DIR)/libnative_window_glue.a: $(OBJS)
25 | $(AR) rcs $@ $<
--------------------------------------------------------------------------------
/platform/gonk/mtdev/bindgen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | mkdir -p src/generated
6 |
7 | bindgen --whitelist-function "mtdev_new_open" \
8 | --whitelist-function "mtdev_close_delete" \
9 | --whitelist-function "mtdev_get" \
10 | --whitelist-function "mtdev_get_abs_minimum" \
11 | --whitelist-function "mtdev_has_mt_event" \
12 | --output src/generated/ffi.rs \
13 | --no-layout-tests \
14 | --with-derive-default \
15 | mtdev-1.1.5/include/mtdev.h \
16 | -- -I $GONK_DIR/prebuilts/ndk/9/platforms/android-19/arch-arm/usr/include
17 |
18 |
--------------------------------------------------------------------------------
/platform/glutin/support/scripts/package.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | HERE=`pwd`
6 |
7 | export UI_ROOT=${HERE}/../../../../frontend/ui
8 | export SERVO_RESOURCES=${HERE}/../../../shared/resources
9 |
10 | DEST=/tmp/servonk
11 |
12 | mkdir -p ${DEST}
13 | rm -rf ${DEST}/*
14 |
15 | cp -R ${UI_ROOT}/ ${DEST}
16 | cp -R ${SERVO_RESOURCES}/ ${DEST}
17 | cp ../../target/release/servo ${DEST}
18 | strip ${DEST}/servo
19 | cp ./run-servonk ${DEST}/servonk
20 | chmod +x ${DEST}/servonk
21 |
22 | tar -cjf ${HERE}/servonk-`date "+%d%m%y-%H%M%S"`-`uname -s`.tar.bz2 -C /tmp servonk/
23 |
24 | rm -rf ${DEST}/*
25 |
--------------------------------------------------------------------------------
/platform/glutin/support/scripts/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | HERE=`pwd`
6 |
7 | export UI_ROOT=${HERE}/../../../../frontend/ui
8 | export SERVO_RESOURCES=${HERE}/../../../shared/resources
9 |
10 | SERVO_UA=${SERVO_UA:-"Mozilla/5.0 (Mobile; rv:60.0) Servo/1.0 Firefox/60.0"}
11 |
12 | echo "Using UA: $SERVO_UA"
13 |
14 | mkdir -p $HOME/.local/servonk
15 |
16 | ../../target/release/servo \
17 | --resources-path ${SERVO_RESOURCES} \
18 | --resolution 720x1280 \
19 | --user-agent "$SERVO_UA" \
20 | --config-dir $HOME/.local/servonk \
21 | -M \
22 | http://localhost:8000/system/index.html
23 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/README:
--------------------------------------------------------------------------------
1 | mtdev - Multitouch Protocol Translation Library (MIT license)
2 |
3 | The mtdev library transforms all variants of kernel MT events to the
4 | slotted type B protocol. The events put into mtdev may be from any MT
5 | device, specifically type A without contact tracking, type A with
6 | contact tracking, or type B with contact tracking. See the kernel
7 | documentation for further details.
8 |
9 | http://bitmath.org/code/mtdev/
10 | Please send patches to: patches@bitmath.org
11 |
12 | ---
13 | Copyright (C) 2010 Henrik Rydberg
14 | Copyright (C) 2010 Canonical Ltd.
15 |
--------------------------------------------------------------------------------
/platform/glutin/.cargo/config:
--------------------------------------------------------------------------------
1 | [target.arm-linux-androideabi]
2 | linker = "./fake-ld-arm.sh"
3 | ar = "arm-linux-androideabi-ar"
4 |
5 | [target.armv7-linux-androideabi]
6 | linker = "./fake-ld-armv7.sh"
7 | ar = "arm-linux-androideabi-ar"
8 |
9 | [target.aarch64-linux-android]
10 | linker = "./fake-ld-arm64.sh"
11 | ar = "aarch64-linux-android-ar"
12 |
13 | [target.arm-unknown-linux-gnueabihf]
14 | linker = "arm-linux-gnueabihf-gcc"
15 | ar = "arm-linux-gnueabihf-ar"
16 |
17 | [target.aarch64-unknown-linux-gnu]
18 | linker = "aarch64-linux-gnu-gcc"
19 | ar = "aarch64-linux-gnu-ar"
20 |
21 | [target.'cfg(target_os=windows)']
22 | linker = "./fake-ld.cmd"
--------------------------------------------------------------------------------
/platform/glutin/platform/macos/mod.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | use std::ptr;
6 |
7 | pub fn deinit() {
8 | // An unfortunate hack to make sure the linker's dead code stripping doesn't strip our
9 | // `Info.plist`.
10 | unsafe {
11 | ptr::read_volatile(&INFO_PLIST[0]);
12 | }
13 | }
14 |
15 | #[cfg(target_os = "macos")]
16 | #[link_section = "__TEXT,__info_plist"]
17 | #[no_mangle]
18 | pub static INFO_PLIST: [u8; 619] = *include_bytes!("Info.plist");
19 |
20 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/INSTALL:
--------------------------------------------------------------------------------
1 | mtdev - Multitouch Protocol Translation Library (MIT license)
2 |
3 | To build, you need to have the autoconf and libtool packages
4 | installed. Then, do
5 |
6 | ./autogen.sh
7 | ./configure
8 | make
9 |
10 | To test an MT device at /dev/input/eventX, do
11 |
12 | sudo ./test/mtdev-test /dev/input/eventX
13 |
14 | You should be able to see MT events in the terminal. After five
15 | seconds of inactivity, the program exits.
16 |
17 | To install mtdev, do
18 |
19 | sudo make install
20 |
21 | By default, mtdev installs to /usr/local. To change, use the --prefix
22 | configure option.
23 |
24 | Enjoy,
25 | Henrik
26 |
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/css/fa-brands.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:Font Awesome\ 5 Brands;font-style:normal;font-weight:400;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:Font Awesome\ 5 Brands}
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/css/fa-solid.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:Font Awesome\ 5 Free;font-weight:900}
--------------------------------------------------------------------------------
/frontend/ui/system/gaia_keyboard/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/css/fa-regular.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:Font Awesome\ 5 Free;font-weight:400}
--------------------------------------------------------------------------------
/platform/glutin/platform/macos/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSSupportsAutomaticGraphicsSwitching
6 |
7 | CFBundleDisplayName
8 | Servo
9 | CFBundlePackageType
10 | APPL
11 | CFBundleName
12 | Servo
13 | NSHumanReadableCopyright
14 | Copyright © 2016 The Servo Authors
15 | CFBundleVersion
16 | 0.0.1
17 | CFBundleIdentifier
18 | org.servo.servo
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/configure.ac:
--------------------------------------------------------------------------------
1 | # Initialize Autoconf
2 | AC_PREREQ([2.60])
3 | AC_INIT([Multitouch Protocol Translation Library],
4 | [1.1.5],
5 | [],
6 | [mtdev])
7 | AC_CONFIG_SRCDIR([Makefile.am])
8 | AC_CONFIG_HEADERS([config.h])
9 | AC_CONFIG_AUX_DIR([config-aux])
10 |
11 | # Initialize Automake
12 | AM_INIT_AUTOMAKE([foreign dist-bzip2])
13 | AM_SILENT_RULES([yes])
14 |
15 | LIB_VERSION=1:0:0
16 | AC_SUBST([LIB_VERSION])
17 |
18 | # Initialize libtool
19 | AC_PROG_LIBTOOL
20 |
21 | # Checks for programs.
22 | AC_PROG_CC
23 | AC_PROG_INSTALL
24 |
25 | AC_CONFIG_FILES([Makefile
26 | src/Makefile
27 | test/Makefile
28 | mtdev.pc])
29 | AC_OUTPUT
30 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/src/Makefile.am:
--------------------------------------------------------------------------------
1 | lib_LTLIBRARIES = libmtdev.la
2 |
3 | libmtdev_la_LDFLAGS = -version-info @LIB_VERSION@
4 |
5 | libmtdev_la_SOURCES = \
6 | $(top_srcdir)/include/mtdev-mapping.h \
7 | $(top_srcdir)/include/mtdev-plumbing.h \
8 | common.h \
9 | evbuf.h \
10 | iobuf.h \
11 | match.h \
12 | state.h \
13 | caps.c \
14 | core.c \
15 | iobuf.c \
16 | match.c \
17 | match_four.c
18 |
19 | AM_CFLAGS = $(CWARNFLAGS) #-DMTDEV_NO_LEGACY_ABI
20 |
21 | AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(srcdir)
22 |
23 | libmtdevincludedir = $(includedir)
24 | libmtdevinclude_HEADERS = \
25 | $(top_srcdir)/include/mtdev-mapping.h \
26 | $(top_srcdir)/include/mtdev-plumbing.h \
27 | $(top_srcdir)/include/mtdev.h
28 |
--------------------------------------------------------------------------------
/platform/glutin/glutin_app/mod.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | //! A simple application that uses glutin to open a window for Servo to display in.
6 |
7 | pub mod keyutils;
8 | pub mod window;
9 |
10 | use servo::servo_config::opts;
11 | use std::rc::Rc;
12 |
13 | pub fn create_window() -> Rc {
14 | // Read command-line options.
15 | let opts = opts::get();
16 | let foreground = opts.output_file.is_none() && !opts.headless;
17 |
18 | // Open a window.
19 | window::Window::new(foreground, opts.initial_window_size)
20 | }
21 |
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/css/fa-brands.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Brands';
7 | font-style: normal;
8 | font-weight: normal;
9 | src: url("../webfonts/fa-brands-400.eot");
10 | src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); }
11 |
12 | .fab {
13 | font-family: 'Font Awesome 5 Brands'; }
14 |
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/css/fa-solid.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Free';
7 | font-style: normal;
8 | font-weight: 900;
9 | src: url("../webfonts/fa-solid-900.eot");
10 | src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); }
11 |
12 | .fa,
13 | .fas {
14 | font-family: 'Font Awesome 5 Free';
15 | font-weight: 900; }
16 |
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/css/fa-regular.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Free';
7 | font-style: normal;
8 | font-weight: 400;
9 | src: url("../webfonts/fa-regular-400.eot");
10 | src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); }
11 |
12 | .far {
13 | font-family: 'Font Awesome 5 Free';
14 | font-weight: 400; }
15 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/jspinyin/tests/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Emscripten Pinyin Engine Test
7 |
8 |
9 |
10 | Emscripten Pinyin Engine Test
11 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/frontend/ui/system/css/statusbar.css:
--------------------------------------------------------------------------------
1 | status-bar {
2 | position: absolute;
3 | height: var(--statusbar-height);
4 | top: 0px;
5 | font-size: 28px;
6 |
7 | display: flex;
8 | background-color: rgba(0, 0, 0, 0.4);
9 | width: 100%;
10 | align-items: center;
11 | }
12 |
13 | status-bar div.favicon {
14 | margin-top: 5px;
15 | }
16 |
17 | status-bar div.favicon img {
18 | width: calc(var(--statusbar-height) - 10px);
19 | height: calc(var(--statusbar-height) - 10px);
20 | }
21 |
22 | status-bar div {
23 | margin-left: 0.5em;
24 | }
25 |
26 | status-bar div.title {
27 | border-right: 3px solid rgba(255, 255, 255, 0.3);
28 | padding-right: 5px;
29 | flex: 1;
30 | text-overflow: ellipsis;
31 | white-space: nowrap;
32 | overflow: hidden;
33 | }
34 |
--------------------------------------------------------------------------------
/platform/shared/resources/iso-8859-8.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | https://html.spec.whatwg.org/multipage/#bidi-rendering
4 |
5 | > When the document's character encoding is ISO-8859-8,
6 | > the following rules are additionally expected to apply, following [user-agent.css]
7 |
8 | */
9 |
10 | @namespace url(http://www.w3.org/1999/xhtml);
11 |
12 |
13 | address, blockquote, center, div, figure, figcaption, footer, form, header, hr,
14 | legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2,
15 | h3, h4, h5, h6, hgroup, nav, section, table, caption, colgroup, col, thead,
16 | tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, [dir=ltr i],
17 | [dir=rtl i], [dir=auto i], *|* {
18 | unicode-bidi: bidi-override;
19 | }
20 | input:not([type=submit i]):not([type=reset i]):not([type=button i]),
21 | textarea, keygen {
22 | unicode-bidi: normal;
23 | }
24 |
--------------------------------------------------------------------------------
/servonk:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | function usage {
6 | echo "Usage: $0 {build|clean|flash|package|run} {gonk|glutin} "
7 | exit 1
8 | }
9 |
10 | function script {
11 | cd platform/$platform/support/scripts
12 | script="./$1.sh"
13 | shift
14 | $script $@
15 | }
16 |
17 | if [ $# -lt 2 ]
18 | then
19 | usage
20 | fi
21 |
22 | cmd=$1
23 | shift
24 | platform=$1
25 | shift
26 |
27 | case "$cmd" in
28 | build)
29 | ./bootstrap.sh
30 | script build $@
31 | ;;
32 | clean)
33 | script clean $@
34 | ;;
35 | flash)
36 | script flash $@
37 | ;;
38 | frontend)
39 | script update-frontend $@
40 | ;;
41 | package)
42 | script package $@
43 | ;;
44 | run)
45 | script run $@
46 | ;;
47 | *)
48 | usage
49 | esac
50 |
--------------------------------------------------------------------------------
/frontend/ui/system/css/search_panel.css:
--------------------------------------------------------------------------------
1 | search-panel {
2 | position: absolute;
3 | bottom: 0px;
4 | left: 0%;
5 | right: 0%;
6 | transform: translateY(100%);
7 |
8 | background-color: rgba(0, 0, 0, 0.5);
9 | font-size: 36px;
10 | }
11 |
12 | search-panel.open {
13 | transform: translateY(0);
14 | bottom: var(--navbar-height);
15 | }
16 |
17 | search-panel ul {
18 | margin: 0px;
19 | font-size: smaller;
20 | }
21 |
22 | search-panel ul li {
23 | list-style-type: none;
24 | padding: 0.25em;
25 | overflow: hidden;
26 | text-overflow: ellipsis;
27 | white-space: nowrap;
28 | }
29 |
30 | search-panel ul li:hover {
31 | background-color: gray;
32 | }
33 |
34 | search-panel input {
35 | margin: 1em;
36 | width: calc(100% - 2em);
37 | background-color: rgba(0, 0, 0, 0.7);
38 | border: 1px solid gray;
39 | color: white;
40 | }
--------------------------------------------------------------------------------
/platform/gonk/support/scripts/flash.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | BLUE='\033[1;34m'
6 | NC='\033[0m'
7 |
8 | KIND=${1:-release}
9 |
10 | echo -e "${BLUE}Pushing $KIND version to device...${NC}"
11 |
12 | adb root && adb remount
13 |
14 | # Create the local directory and clean it up if needed.
15 | adb shell mkdir /data/local/servo
16 | adb shell rm -r /data/local/servo/*
17 |
18 | # Push the wrapper script and the executable.
19 | adb push servo.sh /system/bin/servo.sh
20 | adb push ../../target/armv7-linux-androideabi/$KIND/servo /data/local/servo/servo
21 |
22 | # Push common resources and the android fonts definitions.
23 | adb push ../../../shared/resources /data/local/servo/resources
24 | adb push ../../resources/fonts.xml /system/etc/system_fonts.xml
25 |
26 | # Push the frontend.
27 | adb push ../../../../frontend/ui /data/local/servo/ui
28 |
29 | echo -e "${BLUE}Flashing done!${NC}"
30 |
--------------------------------------------------------------------------------
/frontend/ui/test/index.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-family: "fira-sans";
3 | color: lightgray;
4 | height: 100%;
5 | margin: 0;
6 | padding: 0;
7 | }
8 |
9 | #screen {
10 | /* background-image: url(background.jpg); */
11 | background-color: teal;
12 | width: 100%;
13 | height: 100%;
14 | }
15 |
16 | #header {
17 | position: absolute;
18 | height: 80px;
19 | top: 0px;
20 |
21 | background-color: rgba(0, 0, 0, 0.4);
22 | width: 100%;
23 | }
24 |
25 | #footer {
26 | position: absolute;
27 | height: 80px;
28 | bottom: 0px;
29 |
30 | background-color: rgba(0, 0, 0, 0.4);
31 | width: 100%;
32 | }
33 |
34 | #content {
35 | position: absolute;
36 | top: 80px;
37 | bottom: 80px;
38 | width: 100%;
39 | }
40 |
41 | #content iframe {
42 | width: 100%;
43 | height: 100%;
44 | border: none;
45 | background-color: white;
46 | }
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/views/emoji_key_view.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global BaseView */
4 |
5 | (function(exports) {
6 |
7 | function EmojiKeyView() {
8 | BaseView.apply(this, arguments);
9 | }
10 |
11 | EmojiKeyView.prototype = Object.create(BaseView.prototype);
12 |
13 | EmojiKeyView.prototype.render = function() {
14 | var contentNode = document.createElement('button');
15 | if (this.options.classNames) {
16 | contentNode.classList.add.apply(contentNode.classList,
17 | this.options.classNames);
18 | }
19 |
20 | contentNode.classList.add('emoji');
21 |
22 | contentNode.innerHTML = this.options.outputChar ||
23 | this.target.value ||
24 | this.target.compositeKey;
25 |
26 | this.element = contentNode;
27 | this.viewManager.registerView(this.target, this);
28 | };
29 |
30 | exports.EmojiKeyView = EmojiKeyView;
31 |
32 | })(window);
33 |
--------------------------------------------------------------------------------
/frontend/ui/system/js/scripts/00.keyboard_api.js:
--------------------------------------------------------------------------------
1 |
2 | // Basic keyboard API.
3 |
4 | (function keyboard_api(window) {
5 | return;
6 |
7 | console.log(`Keyboard API loaded in ${window.location.href}`);
8 | if (window.location.href === "about:blank") {
9 | return;
10 | }
11 |
12 | function is_input(node) {
13 | return (["input"].indexOf(node.localName.toLowerCase()) != -1);
14 | }
15 |
16 | window.addEventListener("focus", (event) => {
17 | console.log(`Got focus event on ${event.target.localName}`);
18 | if (is_input(event.target)) {
19 | window.parent.postMessage({ action: "focus" }, "*");
20 | }
21 | }, true);
22 |
23 | window.addEventListener("blur", (event) => {
24 | console.log(`Got blur event on ${event.target.localName}`);
25 | if (is_input(event.target)) {
26 | window.parent.postMessage({ action: "blur" }, "*");
27 | }
28 | }, true);
29 |
30 | })(window);
31 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/views/base_view.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | (function(exports) {
3 |
4 | /**
5 | * BaseView is the base of all simple views in the keyboard app.
6 | * It provides the common interface like, highlight() and hide().
7 | */
8 | function BaseView(target, options, viewManager) {
9 | this.target = target;
10 | this.options = options;
11 | this.viewManager = viewManager;
12 | }
13 |
14 | // element property is the DOM element created by this View instance.
15 | BaseView.prototype.element = null;
16 |
17 | BaseView.prototype.highlight = function() {
18 | this.element.classList.add('highlighted');
19 | };
20 |
21 | BaseView.prototype.unHighlight = function() {
22 | this.element.classList.remove('highlighted');
23 | };
24 |
25 | BaseView.prototype.show = function() {
26 | this.element.classList.remove('hide');
27 | };
28 |
29 | BaseView.prototype.hide = function() {
30 | this.element.classList.add('hide');
31 | };
32 |
33 | exports.BaseView = BaseView;
34 |
35 | })(window);
36 |
--------------------------------------------------------------------------------
/frontend/ui/homescreen/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/frontend/ui/system/js/virtual_keyboard.js:
--------------------------------------------------------------------------------
1 | class VirtualKeyboard extends HTMLElement {
2 | constructor() {
3 | super();
4 | }
5 |
6 | connectedCallback() {
7 | console.log('Adding keyboard');
8 | this.render = hyperHTML.bind(this);
9 | this.update();
10 | this.hide();
11 | }
12 |
13 | show() {
14 | console.log("VirtualKeyboard::show");
15 | // this.style.display = this.display_style;
16 | document.getElementById("keyboard-frame").classList.remove("offscreen");
17 | }
18 |
19 | hide() {
20 | // this.display_style = this.style.display;
21 | console.log(`VirtualKeyboard::hide ${this.display_style}`);
22 | // this.style.display = "none";
23 | document.getElementById("keyboard-frame").classList.add("offscreen");
24 | }
25 |
26 | update() {
27 | this.render`
28 |
29 | `;
30 | }
31 | }
32 |
33 | customElements.define("virtual-keyboard", VirtualKeyboard);
--------------------------------------------------------------------------------
/platform/gonk/support/linker/fake-ld.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | set -o errexit
8 | set -o nounset
9 | set -o pipefail
10 |
11 | call_gcc()
12 | {
13 | # TARGET_DIR="${OUT_DIR}/../../.."
14 |
15 | export _ANDROID_ARCH=$1
16 | export _ANDROID_EABI=$2
17 | export _ANDROID_PLATFORM=$3
18 | export ANDROID_SYSROOT="$GONK_DIR/out/target/product/$GONK_PRODUCT_NAME/obj"
19 |
20 | ANDROID_CPU_ARCH_DIR=$4
21 |
22 | if echo ${_GCC_PARAMS} | grep -qv " -shared"
23 | then
24 | PIE_FLAG="-pie"
25 | fi
26 |
27 | "${_ANDROID_EABI}-gcc" \
28 | $PIE_FLAG -lGLESv2 -L$GONK_DIR/out/target/product/$GONK_PRODUCT_NAME/system/lib/ \
29 | --sysroot="${ANDROID_SYSROOT}" ${_GCC_PARAMS} -lc++\
30 | -o "${TARGET_DIR}/servo"
31 |
32 | cp "${TARGET_DIR}/servo" "${TARGET_DIR}/servo.unstripped"
33 | "${_ANDROID_EABI}-strip" "${TARGET_DIR}/servo"
34 | }
35 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/settings/handwriting_settings_view.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global SettingsView, HandwritingPadSettings, BaseView */
4 |
5 | (function(exports) {
6 |
7 | var HandwritingSettingsGroupView = function(app) {
8 | BaseView.apply(this);
9 |
10 | this.app = app;
11 | };
12 |
13 | HandwritingSettingsGroupView.prototype = Object.create(BaseView.prototype);
14 |
15 | HandwritingSettingsGroupView.prototype.CONTAINER_ID = 'handwriting-settings';
16 |
17 | HandwritingSettingsGroupView.prototype.start = function() {
18 | BaseView.prototype.start.call(this);
19 |
20 | this.childViews.handwritingSettings =
21 | new SettingsView(this.app, this.container, HandwritingPadSettings);
22 | this.childViews.handwritingSettings.start();
23 | };
24 |
25 | HandwritingSettingsGroupView.prototype.stop = function() {
26 | BaseView.prototype.stop.call(this);
27 |
28 | this.childViews.handwritingSettings.stop();
29 | delete this.childViews.handwritingSettings;
30 | };
31 |
32 | exports.HandwritingSettingsGroupView = HandwritingSettingsGroupView;
33 |
34 | })(window);
35 |
--------------------------------------------------------------------------------
/frontend/ui/system/css/navbar.css:
--------------------------------------------------------------------------------
1 |
2 | .nav-left {
3 | flex: 1;
4 | }
5 |
6 | .nav-right {
7 | flex: 1;
8 | text-align: end;
9 | }
10 |
11 | .nav-center {
12 | flex: 1;
13 | text-align: center;
14 | }
15 |
16 | .menu, .notifs {
17 | font-size: 36px;
18 | /* Center these 36px icons */
19 | padding: calc((var(--navbar-height) - 36px) / 2);
20 | /* border: 1px solid yellow; */
21 | }
22 |
23 | .back, .forward, .refresh {
24 | font-size: 48px;
25 | /* Center these 48px icons */
26 | padding-top: calc((var(--navbar-height) - 48px) / 2);
27 | padding-bottom: calc((var(--navbar-height) - 48px) / 2);
28 | /* border: 1px solid yellow; */
29 | }
30 |
31 | nav-bar {
32 | position: absolute;
33 | height: var(--navbar-height);
34 | bottom: 0px;
35 |
36 | font-size: 36px;
37 |
38 | display: flex;
39 | background-color: rgba(0, 0, 0, 0.4);
40 | width: 100%;
41 | align-items: stretch;
42 | justify-content: center;
43 | }
44 |
45 | i.disabled {
46 | opacity: 0.2;
47 | transition: opacity 0.3s ease;
48 | }
--------------------------------------------------------------------------------
/platform/gonk/mtdev/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | if [ -z "${C_LIBRARY_DIR}" ] || [ -z "${C_BUILD_DIR}" ];
3 | then
4 | echo "This script is supposed to be run by \`build.rs\`!" >&2
5 | exit 1
6 | fi
7 |
8 | cmd() {
9 | echo " • Running: $* …" >&2
10 | "$@"
11 | }
12 |
13 | set -e
14 |
15 | if [ "${TARGET}" = "armv7-linux-androideabi" ];
16 | then
17 | if [ -z "${GONK_DIR}" ];
18 | then
19 | echo "Please set GONK_DIR to the root of your Gonk directory first.";
20 | exit 1;
21 | else
22 | # Get the product name from .config
23 | source $GONK_DIR/.config
24 | fi
25 | export CC=arm-linux-androideabi-gcc
26 | SYSROOT="$GONK_DIR/out/target/product/$PRODUCT_NAME/obj/"
27 | CFLAGS="-I$GONK_DIR/prebuilts/ndk/9/platforms/android-21/arch-arm/usr/include"
28 | EXTRA="--host=arm-linux-androideabi"
29 | else
30 | CC=cc
31 | fi
32 |
33 | cd "${C_LIBRARY_DIR}"
34 |
35 | # Switch to Cargo-provided build directory
36 | mkdir -p "${C_BUILD_DIR}"
37 |
38 | echo "Current dir: `pwd`"
39 | ./configure --prefix="${C_BUILD_DIR}" --with-sysroot="${SYSROOT}" ${EXTRA}
40 | make
41 | make install
42 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/he.js:
--------------------------------------------------------------------------------
1 | Keyboards.he = {
2 | label: 'Hebrew',
3 | shortLabel: 'He',
4 | types: ['text', 'url', 'email'],
5 | menuLabel: 'עִבְרִית',
6 | basicLayoutKey: 'אבג',
7 | lang: 'he',
8 | alt: {
9 | // incomplete
10 | },
11 | keys: [
12 | [
13 | { value: 'ק' }, { value: 'ר' }, { value: 'א' }, { value: 'ט' },
14 | { value: 'ו' }, { value: 'ן' }, { value: 'ם' }, { value: 'פ' },
15 | { value: '⌫', ratio: 2, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
16 | ], [
17 | { value: 'ש' }, { value: 'ד' }, { value: 'ג' }, { value: 'כ' },
18 | { value: 'ע' }, { value: 'י' }, { value: 'ח' }, { value: 'ל' },
19 | { value: 'ך' }, { value: 'ף' }
20 | ], [
21 | { value: 'ז' }, { value: 'ס' }, { value: 'ב' }, { value: 'ה' },
22 | { value: 'נ' }, { value: 'מ' }, { value: 'צ' }, { value: 'ת' },
23 | { value: 'ץ' }, { value: '?' }
24 | ], [
25 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
26 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
27 | ]
28 | ]
29 | };
30 |
--------------------------------------------------------------------------------
/frontend/ui/homescreen/css/index.css:
--------------------------------------------------------------------------------
1 | html {
2 | font-family: "fira sans", sans-serif;
3 | color: lightgray;
4 | height: 100%;
5 | margin: 0;
6 | padding: 0;
7 | overflow: hidden;
8 | }
9 |
10 | icon-grid {
11 | display: block;
12 | position: absolute;
13 | bottom: 0;
14 | width: calc(100% - 100px);
15 | margin: 50px; /* at least as much as the drag-panel width in window_manager.css */
16 | }
17 |
18 | icon-grid .grid {
19 | display: flex;
20 | flex-direction: row;
21 | flex-wrap: wrap;
22 | justify-content: space-between;
23 | }
24 |
25 | icon-grid .grid .icon {
26 | text-align: center;
27 | flex: 0;
28 | min-width: 128px;
29 | max-width: 128px;
30 | margin-bottom: 1em;
31 | margin-left: 0.1em;
32 | margin-right: 0.1em;
33 | }
34 |
35 | icon-grid .grid .icon img {
36 | width: 64px;
37 | height: 64px;
38 | }
39 |
40 | icon-grid .grid .icon .name {
41 | color: white;
42 | font-size: 1.5em;
43 | line-height: 1.5em;
44 | max-height: 3em;
45 | overflow: hidden;
46 | text-overflow: ellipsis;
47 | }
48 |
--------------------------------------------------------------------------------
/platform/glutin/platform/windows/servo.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | true
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/vi-Telex.js:
--------------------------------------------------------------------------------
1 | Keyboards['vi-Telex'] = {
2 | label: 'Vietnamese (Telex)',
3 | shortLabel: 'Vi',
4 | menuLabel: 'Tiếng Việt (Telex)',
5 | imEngine: 'jstelex',
6 | types: ['text', 'url', 'email'],
7 | lang: 'vi',
8 | keys: [
9 | [
10 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
11 | { value: 't' } , { value: 'y' }, { value: 'u' } , { value: 'i' },
12 | { value: 'o' }, { value: 'p' }
13 | ], [
14 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
15 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
16 | { value: 'l' }
17 | ], [
18 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
19 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
20 | { value: 'b' }, { value: 'n' }, { value: 'm' },
21 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
22 | ], [
23 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
24 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
25 | ]
26 | ]
27 | };
28 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/mk.js:
--------------------------------------------------------------------------------
1 | Keyboards.mk = {
2 | label: 'Macedonian',
3 | shortLabel: 'Mk',
4 | menuLabel: 'Македонски',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | basicLayoutKey: 'АБВ',
8 | lang: 'mk',
9 | alt: {
10 | 'е': 'ѐ',
11 | 'и': 'ѝ'
12 | },
13 | width: 11,
14 | keys: [
15 | [
16 | { value: 'љ' }, { value: 'њ' }, { value: 'е' }, { value: 'р' },
17 | { value: 'т' }, { value: 'ѕ' }, { value: 'у' }, { value: 'и' },
18 | { value: 'о' }, { value: 'п' }, { value: 'ш' }
19 | ], [
20 | { value: 'а' }, { value: 'с' }, { value: 'д' }, { value: 'ф' },
21 | { value: 'г' }, { value: 'х' }, { value: 'ј' }, { value: 'к' },
22 | { value: 'л' }, { value: 'ч' }, { value: 'ќ' }
23 | ], [
24 | { value: '⇪', keyCode: KeyEvent.DOM_VK_CAPS_LOCK }, { value: 'з' },
25 | { value: 'џ' }, { value: 'ц' }, { value: 'в' }, { value: 'б' },
26 | { value: 'н' }, { value: 'м' }, { value: 'ѓ' }, { value: 'ж' },
27 | { value: '⌫', keyCode: KeyEvent.DOM_VK_BACK_SPACE }
28 | ], [
29 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
30 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
31 | ]
32 | ]
33 | };
34 |
--------------------------------------------------------------------------------
/platform/shared/resources/cert-google-only:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
3 | UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
4 | dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
5 | MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
6 | dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
7 | AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
8 | BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
9 | cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
10 | AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
11 | MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
12 | aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
13 | ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
14 | IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
15 | MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
16 | A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
17 | 7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
18 | 1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
19 | -----END CERTIFICATE-----
20 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/ru.js:
--------------------------------------------------------------------------------
1 | Keyboards.ru = {
2 | label: 'Russian',
3 | shortLabel: 'Ru',
4 | menuLabel: 'Pусский',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'ru',
8 | basicLayoutKey: 'АБВ',
9 | lang: 'ru',
10 | alt: {
11 | е: 'ё',
12 | ь: 'ъ'
13 | },
14 | width: 11,
15 | keys: [
16 | [
17 | { value: 'й' }, { value: 'ц' }, { value: 'у' }, { value: 'к' },
18 | { value: 'е' }, { value: 'н' }, { value: 'г' }, { value: 'ш' },
19 | { value: 'щ' }, { value: 'з' }, { value: 'х' }
20 | ], [
21 | { value: 'ф' }, { value: 'ы' }, { value: 'в' }, { value: 'а' },
22 | { value: 'п' }, { value: 'р' }, { value: 'о' }, { value: 'л' },
23 | { value: 'д' }, { value: 'ж' }, { value: 'э' }
24 | ], [
25 | { value: '⇪', keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
26 | { value: 'я' }, { value: 'ч' }, { value: 'с' }, { value: 'м' },
27 | { value: 'и' }, { value: 'т' }, { value: 'ь' }, { value: 'б' },
28 | { value: 'ю' }, { value: '⌫', keyCode: KeyEvent.DOM_VK_BACK_SPACE }
29 | ], [
30 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
31 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
32 | ]
33 | ]
34 | };
35 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/bg-BDS.js:
--------------------------------------------------------------------------------
1 | Keyboards['bg-BDS'] = {
2 | label: 'Bulgarian (BDS)',
3 | shortLabel: 'Bg',
4 | menuLabel: 'Български (БДС)',
5 | types: ['text', 'url', 'email'],
6 | imEngine: 'latin',
7 | autoCorrectLanguage: 'bg',
8 | basicLayoutKey: 'AБB',
9 | width: 11,
10 | lang: 'bg',
11 | alt: {
12 | 'и': 'ѝ'
13 | },
14 | keys: [
15 | [
16 | { value: 'у' }, { value: 'е' }, { value: 'и' }, { value: 'ш' },
17 | { value: 'щ' }, { value: 'к' }, { value: 'с' }, { value: 'д' },
18 | { value: 'з' }, { value: 'ц' }, { value: 'б' }
19 | ], [
20 | { value: 'ь' }, { value: 'я' }, { value: 'а' }, { value: 'о' },
21 | { value: 'ж' }, { value: 'г' }, { value: 'т' }, { value: 'н' },
22 | { value: 'в' }, { value: 'м' }, { value: 'ч' }
23 | ], [
24 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
25 | { value: 'ю' }, { value: 'й' }, { value: 'ъ' }, { value: 'ф' },
26 | { value: 'х' }, { value: 'п' }, { value: 'р' }, { value: 'л' },
27 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
28 | ], [
29 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
30 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
31 | ]
32 | ]
33 | };
34 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/bs.js:
--------------------------------------------------------------------------------
1 | Keyboards.bs = {
2 | label: 'Bosnian',
3 | shortLabel: 'Bs',
4 | imEngine: 'latin',
5 | types: ['text', 'url', 'email'],
6 | autoCorrectLanguage: 'bs',
7 | menuLabel: 'Bosanski',
8 | lang: 'bs',
9 | alt: {
10 | c: 'čć',
11 | d: 'đ',
12 | e: 'ë€',
13 | i: 'íîïì',
14 | o: 'ó',
15 | u: 'ú',
16 | s: 'šş',
17 | z: 'ž',
18 | '.': ',?!;:'
19 | },
20 | keys: [
21 | [
22 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
23 | { value: 't' } , { value: 'z' }, { value: 'u' } , { value: 'i' },
24 | { value: 'o' }, { value: 'p' }
25 | ], [
26 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
27 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
28 | { value: 'l' }
29 | ], [
30 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
31 | { value: 'y' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
32 | { value: 'b' }, { value: 'n' }, { value: 'm' },
33 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
34 | ], [
35 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
36 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
37 | ]
38 | ],
39 | };
40 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/ig.js:
--------------------------------------------------------------------------------
1 | Keyboards.ig = {
2 | label: 'Igbo',
3 | shortLabel: 'Ig',
4 | menuLabel: 'Asụsụ Igbo',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | lang: 'ig',
8 | pages: [ { // default page
9 | alt: {
10 | i: 'ị',
11 | n: 'ṅ',
12 | o: 'ọ',
13 | u: 'ụ',
14 | '.': ',?!;:…'
15 | },
16 | keys: [
17 | [
18 | { value: 'q' }, { value: 'w' }, { value: 'e' }, { value: 'r' },
19 | { value: 't' }, { value: 'y' }, { value: 'u' }, { value: 'i' },
20 | { value: 'o' }, { value: 'p' }
21 | ], [
22 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
23 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
24 | { value: 'l' }
25 | ], [
26 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
27 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
28 | { value: 'b' }, { value: 'n' }, { value: 'm' },
29 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
30 | ], [
31 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
32 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
33 | ]
34 | ]
35 | } ]
36 | };
37 |
--------------------------------------------------------------------------------
/platform/shared/resources/quirks-mode.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | https://html.spec.whatwg.org/multipage/#flow-content-3
4 |
5 | > In quirks mode, the following rules are also expected to apply:
6 |
7 | */
8 |
9 | @namespace url(http://www.w3.org/1999/xhtml);
10 |
11 |
12 | form { margin-bottom: 1em; }
13 |
14 |
15 | table {
16 | font-weight: initial;
17 | font-style: initial;
18 | font-variant: initial;
19 | font-size: initial;
20 | line-height: initial;
21 | white-space: initial;
22 | /* text-align: initial; -- see FIXME below */
23 | }
24 |
25 | /*
26 | * FIXME(pcwalton): Actually saying `text-align: initial` above breaks `` inside ``
27 | * in quirks mode. This is because we (following Gecko, WebKit, and Blink) implement the HTML5
28 | * align-descendants rules with a special `text-align: -servo-center`. `text-align: initial`, if
29 | * placed on the `` element per the spec, would break this behavior. So we place it on
30 | * `` instead.
31 | */
32 | tbody {
33 | text-align: initial;
34 | }
35 |
36 |
37 | /* FIXME: https://html.spec.whatwg.org/multipage/#margin-collapsing-quirks */
38 |
39 |
40 | input:not([type=image]), textarea { box-sizing: border-box; }
41 |
42 |
43 | img[align=left i] { margin-right: 3px; }
44 | img[align=right i] { margin-left: 3px; }
45 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/bg-Pho-Ban.js:
--------------------------------------------------------------------------------
1 | Keyboards['bg-Pho-Ban'] = {
2 | label: 'Bulgarian (New)',
3 | shortLabel: 'Bg',
4 | menuLabel: 'Български (БАН)',
5 | types: ['text', 'url', 'email', 'password'],
6 | imEngine: 'latin',
7 | autoCorrectLanguage: 'bg',
8 | basicLayoutKey: 'AБB',
9 | width: 11,
10 | lang: 'bg',
11 | alt: {
12 | 'и': 'ѝ'
13 | },
14 | keys: [
15 | [
16 | { value: 'ч' }, { value: 'ш' }, { value: 'е' }, { value: 'р' },
17 | { value: 'т' }, { value: 'ъ' }, { value: 'у' }, { value: 'и' },
18 | { value: 'о' }, { value: 'п' }, { value: 'я' }
19 | ], [
20 | { value: 'а' }, { value: 'с' }, { value: 'д' }, { value: 'ф' },
21 | { value: 'г' }, { value: 'х' }, { value: 'й' }, { value: 'к' },
22 | { value: 'л' }, { value: 'щ' }, { value: 'ь' }
23 | ], [
24 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
25 | { value: 'з' }, { value: 'ж' }, { value: 'ц' }, { value: 'в' },
26 | { value: 'б' }, { value: 'н' }, { value: 'м' }, { value: 'ю' },
27 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
28 | ], [
29 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
30 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
31 | ]
32 | ]
33 | };
34 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/sr-Cyrl.js:
--------------------------------------------------------------------------------
1 | Keyboards['sr-Cyrl'] = {
2 | label: 'Serbian (Cyrillic)',
3 | shortLabel: 'Sr',
4 | menuLabel: 'Српски',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'sr-Cyrl',
8 | basicLayoutKey: 'АБВ',
9 | lang: 'sr-Cyrl',
10 | alt: {
11 | // incomplete
12 | },
13 | width: 11,
14 | keys: [
15 | [
16 | { value: 'љ' }, { value: 'њ' }, { value: 'е' }, { value: 'р' },
17 | { value: 'т' }, { value: 'з' }, { value: 'у' }, { value: 'и' },
18 | { value: 'о' }, { value: 'п' }, { value: 'ш' }
19 | ], [
20 | { value: 'а' }, { value: 'с' }, { value: 'д' }, { value: 'ф' },
21 | { value: 'г' }, { value: 'х' }, { value: 'ј' }, { value: 'к' },
22 | { value: 'л' }, { value: 'ч' }, { value: 'ћ' }
23 | ], [
24 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
25 | { value: 'џ' }, { value: 'ц' }, { value: 'в' }, { value: 'б' },
26 | { value: 'н' }, { value: 'м' }, { value: 'ђ' }, { value: 'ж' },
27 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
28 | ], [
29 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
30 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
31 | ]
32 | ]
33 | };
34 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/ko.js:
--------------------------------------------------------------------------------
1 | Keyboards.ko = {
2 | label: 'Korean',
3 | shortLabel: 'Ko',
4 | secondLayout: true,
5 | basicLayoutKey: 'ㄱㄴㄷ',
6 | imEngine: 'jshangul',
7 | types: ['text', 'url', 'email'],
8 | menuLabel: '한국어',
9 | lang: 'ko',
10 | upperCase: {
11 | 'ㅂ': 'ㅃ',
12 | 'ㅈ': 'ㅉ',
13 | 'ㄷ': 'ㄸ',
14 | 'ㄱ': 'ㄲ',
15 | 'ㅅ': 'ㅆ',
16 | 'ㅐ': 'ㅒ',
17 | 'ㅔ': 'ㅖ'
18 | },
19 | keys: [
20 | [
21 | { value: 'ㅂ' } , { value: 'ㅈ' } , { value: 'ㄷ' } , { value: 'ㄱ' } ,
22 | { value: 'ㅅ' } , { value: 'ㅛ' } , { value: 'ㅕ' } , { value: 'ㅑ' } ,
23 | { value: 'ㅐ' } , { value: 'ㅔ' }
24 | ], [
25 | { value: 'ㅁ' } , { value: 'ㄴ' } , { value: 'ㅇ' } , { value: 'ㄹ' } ,
26 | { value: 'ㅎ' } , { value: 'ㅗ' } , { value: 'ㅓ' } , { value: 'ㅏ' } ,
27 | { value: 'ㅣ' }
28 | ], [
29 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
30 | { value: 'ㅋ' } , { value: 'ㅌ' } , { value: 'ㅊ' } , { value: 'ㅍ' } ,
31 | { value: 'ㅠ' } , { value: 'ㅜ' } , { value: 'ㅡ' } ,
32 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
33 | ], [
34 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
35 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
36 | ]
37 | ]
38 | };
39 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/bg-Pho-Trad.js:
--------------------------------------------------------------------------------
1 | Keyboards['bg-Pho-Trad'] = {
2 | label: 'Bulgarian (Phonetic)',
3 | shortLabel: 'Bg',
4 | menuLabel: 'Български (Фонетична)',
5 | types: ['text', 'url', 'email', 'password'],
6 | imEngine: 'latin',
7 | autoCorrectLanguage: 'bg',
8 | basicLayoutKey: 'AБB',
9 | width: 11,
10 | lang: 'bg',
11 | alt: {
12 | 'и': 'ѝ'
13 | },
14 | keys: [
15 | [
16 | { value: 'я' }, { value: 'в' }, { value: 'е' }, { value: 'р' },
17 | { value: 'т' }, { value: 'ъ' }, { value: 'у' }, { value: 'и' },
18 | { value: 'о' }, { value: 'п' }, { value: 'ч' }
19 | ], [
20 | { value: 'а' }, { value: 'с' }, { value: 'д' }, { value: 'ф' },
21 | { value: 'г' }, { value: 'х' }, { value: 'й' }, { value: 'к' },
22 | { value: 'л' }, { value: 'ш' }, { value: 'щ' }
23 | ], [
24 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
25 | { value: 'з' }, { value: 'ь' }, { value: 'ц' }, { value: 'ж' },
26 | { value: 'б' }, { value: 'н' }, { value: 'м' }, { value: 'ю' },
27 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
28 | ], [
29 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
30 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
31 | ]
32 | ]
33 | };
34 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/COPYING:
--------------------------------------------------------------------------------
1 | mtdev - Multitouch Protocol Translation Library (MIT license)
2 |
3 | Copyright (C) 2010 Henrik Rydberg
4 | Copyright (C) 2010 Canonical Ltd.
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a
7 | copy of this software and associated documentation files (the "Software"),
8 | to deal in the Software without restriction, including without limitation
9 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | and/or sell copies of the Software, and to permit persons to whom the
11 | Software is furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice (including the next
14 | paragraph) shall be included in all copies or substantial portions of the
15 | 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
20 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 | DEALINGS IN THE SOFTWARE.
24 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/nl.js:
--------------------------------------------------------------------------------
1 | Keyboards.nl = {
2 | label: 'Dutch',
3 | shortLabel: 'Nl',
4 | menuLabel: 'Nederlands',
5 | imEngine: 'latin',
6 | autoCorrectLanguage: 'nl',
7 | types: ['text', 'url', 'email', 'password'],
8 | lang: 'nl',
9 | alt: {
10 | a: 'áäâàæãåā',
11 | e: 'éëêèęėē€',
12 | i: 'íïìîįīij',
13 | o: 'óôöòõœøō',
14 | u: 'úûüùū',
15 | s: '$',
16 | n: 'ñń',
17 | l: '£',
18 | y: 'ýij¥',
19 | '.': ',?!;:'
20 | },
21 | keys: [
22 | [
23 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
24 | { value: 't' } , { value: 'y' }, { value: 'u' } , { value: 'i' },
25 | { value: 'o' }, { value: 'p' }
26 | ], [
27 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
28 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
29 | { value: 'l' }
30 | ], [
31 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
32 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
33 | { value: 'b' }, { value: 'n' }, { value: 'm' },
34 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
35 | ], [
36 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
37 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
38 | ]
39 | ]
40 | };
41 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/de.js:
--------------------------------------------------------------------------------
1 | Keyboards.de = {
2 | label: 'German',
3 | shortLabel: 'De',
4 | menuLabel: 'Deutsch',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'de',
8 | lang: 'de',
9 | alt: {
10 | a: 'äàáâãåāæ',
11 | c: 'çćč',
12 | e: 'èéêëē€',
13 | i: 'ìíîïī',
14 | o: 'öòóôõōœø',
15 | u: 'üùúûū',
16 | s: 'ßśšş',
17 | S: 'ŚŠŞ',
18 | n: 'ńñň',
19 | '.': ',?!;:'
20 | },
21 | keys: [
22 | [
23 | { value: 'q' }, { value: 'w' }, { value: 'e' }, { value: 'r' },
24 | { value: 't' }, { value: 'z' }, { value: 'u' }, { value: 'i' },
25 | { value: 'o' }, { value: 'p' }
26 | ], [
27 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
28 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
29 | { value: 'l' }
30 | ], [
31 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
32 | { value: 'y' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
33 | { value: 'b' }, { value: 'n' }, { value: 'm' },
34 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
35 | ], [
36 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
37 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
38 | ]
39 | ]
40 | };
41 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/hr.js:
--------------------------------------------------------------------------------
1 | Keyboards.hr = {
2 | label: 'Croatian',
3 | shortLabel: 'Hr',
4 | menuLabel: 'Hrvatski',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'hr',
8 | lang: 'hr',
9 | alt: {
10 | c: 'čćç',
11 | d: 'đ',
12 | s: 'šśß$',
13 | S: 'ŠŚ$',
14 | n: 'ñń',
15 | l: '£',
16 | y: '¥',
17 | z: 'žźż',
18 | '.': ',?!;:'
19 | },
20 | keys: [ // qwertz
21 | [
22 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
23 | { value: 't' } , { value: 'z' }, { value: 'u' } , { value: 'i' },
24 | { value: 'o' }, { value: 'p' }
25 | ], [
26 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
27 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
28 | { value: 'l' }, { value: "'", keyCode: 39 }
29 | ], [
30 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
31 | { value: 'y' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
32 | { value: 'b' }, { value: 'n' }, { value: 'm' },
33 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
34 | ], [
35 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
36 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
37 | ]
38 | ]
39 | };
40 |
--------------------------------------------------------------------------------
/platform/gonk/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "servonk"
3 | version = "0.1.0"
4 | authors = ["Fabrice Desré "]
5 |
6 | [dependencies]
7 | api_server = { path = "../../api-server" }
8 | android_logger = "0.5"
9 | egl = "0.2"
10 | errno = "0.2"
11 | gleam = "0.6"
12 | gonk-gfx = { git = "https://github.com/fabricedesre/gonk-gfx-rs" }
13 | lazy_static = "1"
14 | libc = "0.2"
15 | # The gonk branch of Servo adds a feature to turn off the unimplemented web-bluetooth
16 | # and provides gonk support for the config.
17 | libservo = { git = "https://github.com/fabricedesre/servo", branch = "gonk", features = ["gonk"] }
18 | # libservo = { path = "/home/fabrice/dev/servo/components/servo", features = ["gonk"] }
19 | log = "0.4"
20 | mio = "0.6"
21 | mtdev = { path = "mtdev" }
22 |
23 | [patch.crates-io]
24 | # Fork of rust-webvr to make sure we don't pull in the android glue and jni.
25 | rust-webvr = { git = "https://github.com/fabricedesre/rust-webvr.git", branch = "gonk" }
26 | rust-webvr-api = { git = "https://github.com/fabricedesre/rust-webvr.git", branch = "gonk" }
27 | # Fork of mozjs_sys to bypass the Android NDK detection
28 | mozjs_sys = { git = "https://github.com/fabricedesre/mozjs.git" }
29 |
30 | [profile.release]
31 | opt-level = 3
32 | debug = false
33 | rpath = false
34 | lto = true
35 | debug-assertions = false
36 | codegen-units = 1
37 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/cs.js:
--------------------------------------------------------------------------------
1 | Keyboards.cs = {
2 | label: 'Czech',
3 | shortLabel: 'Cs',
4 | menuLabel: 'Česká',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'cs',
8 | lang: 'cs',
9 | alt: {
10 | a: 'á',
11 | c: 'č',
12 | d: 'ď',
13 | e: 'éě',
14 | i: 'í',
15 | n: 'ň',
16 | o: 'ó',
17 | r: 'ř',
18 | s: 'š',
19 | t: 'ť',
20 | u: 'úů',
21 | y: 'ý',
22 | z: 'ž',
23 | '.': ',?!;:…'
24 | },
25 | keys: [
26 | [
27 | { value: 'q' }, { value: 'w' }, { value: 'e' }, { value: 'r' },
28 | { value: 't' }, { value: 'z' }, { value: 'u' } , { value: 'i' },
29 | { value: 'o' }, { value: 'p' }
30 | ], [
31 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
32 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
33 | { value: 'l' }
34 | ], [
35 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
36 | { value: 'y' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
37 | { value: 'b' }, { value: 'n' }, { value: 'm' },
38 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
39 | ], [
40 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
41 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
42 | ]
43 | ]
44 | };
45 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/keyboard/visual_highlight_manager.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | (function(exports) {
4 |
5 | /**
6 | * VisualHighlightManager show and hide visual highlight of keys.
7 | */
8 | var VisualHighlightManager = function(app) {
9 | this.app = app;
10 |
11 | this.highlightDelayTimers = new Map();
12 | };
13 |
14 | VisualHighlightManager.prototype.HIGHTLIGHT_DELAY_MS = 85;
15 |
16 | VisualHighlightManager.prototype.start = function() {
17 | };
18 |
19 | VisualHighlightManager.prototype.stop = function() {
20 | };
21 |
22 | VisualHighlightManager.prototype.show = function(target) {
23 | this.highlightDelayTimers.forEach(function(timer, target) {
24 | clearTimeout(timer);
25 | this.highlightDelayTimers.delete(target);
26 | this.app.viewManager.unHighlightKey(target);
27 | }, this);
28 |
29 | this.app.viewManager.highlightKey(target);
30 | };
31 |
32 | VisualHighlightManager.prototype.hide = function(target) {
33 | if (this.highlightDelayTimers.has(target)) {
34 | clearTimeout(this.highlightDelayTimers.get(target));
35 | }
36 |
37 | var timer = setTimeout(function() {
38 | this.highlightDelayTimers.delete(target);
39 | this.app.viewManager.unHighlightKey(target);
40 | }.bind(this), this.HIGHTLIGHT_DELAY_MS);
41 |
42 | this.highlightDelayTimers.set(target, timer);
43 | };
44 |
45 | exports.VisualHighlightManager = VisualHighlightManager;
46 |
47 | })(window);
48 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/sk.js:
--------------------------------------------------------------------------------
1 | Keyboards.sk = {
2 | label: 'Slovak',
3 | shortLabel: 'Sk',
4 | imEngine: 'latin',
5 | types: ['text', 'url', 'email', 'password'],
6 | autoCorrectLanguage: 'sk',
7 | menuLabel: 'Slovenčina',
8 | lang: 'sk',
9 | alt: {
10 | a: 'áä',
11 | c: 'č',
12 | d: 'ď',
13 | e: 'é',
14 | i: 'í',
15 | l: 'ľĺ',
16 | n: 'ň',
17 | o: 'óô',
18 | r: 'ŕ',
19 | s: 'š',
20 | t: 'ť',
21 | u: 'ú',
22 | y: 'ý',
23 | z: 'ž'
24 | },
25 | keys: [
26 | [
27 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
28 | { value: 't' } , { value: 'y' }, { value: 'u' } , { value: 'i' },
29 | { value: 'o' }, { value: 'p' }
30 | ], [
31 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
32 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
33 | { value: 'l' }, { value: "'", keyCode: 39 }
34 | ], [
35 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
36 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
37 | { value: 'b' }, { value: 'n' }, { value: 'm' },
38 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
39 | ], [
40 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
41 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
42 | ]
43 | ]
44 | };
45 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/tr-Q.js:
--------------------------------------------------------------------------------
1 | Keyboards['tr-Q'] = {
2 | label: 'Turkish Q',
3 | shortLabel: 'Tr',
4 | imEngine: 'latin',
5 | types: ['text', 'url', 'email', 'password'],
6 | autoCorrectLanguage: 'tr',
7 | menuLabel: 'Türkçe Q',
8 | lang: 'tr',
9 | upperCase: {
10 | 'i': 'İ'
11 | },
12 | alt: {
13 | a: 'â',
14 | c: 'çćč',
15 | g: 'ğ',
16 | i: 'īįıìíîï',
17 | 'İ': 'ĪĮIÌÍÎÏ',
18 | s: 'śšşß',
19 | S: 'ŚŠŞ',
20 | o: 'òóôõöōœø',
21 | u: 'ùúûüū'
22 | },
23 | keys: [
24 | [
25 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
26 | { value: 't' } , { value: 'y' }, { value: 'u' } , { value: 'i' },
27 | { value: 'o' }, { value: 'p' }
28 | ], [
29 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
30 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
31 | { value: 'l' }, { value: "'", keyCode: 39 }
32 | ], [
33 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
34 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
35 | { value: 'b' }, { value: 'n' }, { value: 'm' },
36 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
37 | ], [
38 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
39 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
40 | ]
41 | ]
42 | };
43 |
--------------------------------------------------------------------------------
/platform/shared/resources/ahem/README:
--------------------------------------------------------------------------------
1 | The Ahem font was developed by Todd Fahrner to help test writers
2 | develop predictable tests. The font's em square is exactly square.
3 | Its ascent and descent is exactly the size of the em square. This
4 | means that the font's extent is exactly the same as its line-height,
5 | meaning that it can be exactly aligned with padding, borders, margins,
6 | and so forth.
7 |
8 | The font's alphabetic baseline is 0.2em above its bottom, and 0.8em
9 | below its top. The font has an x-height of 0.8em.
10 |
11 | The font has four glyphs:
12 |
13 | 'X' U+0058 A square exactly 1em in height and width.
14 |
15 | 'p' U+0070 A rectangle exactly 0.2em high, 1em wide, and aligned so
16 | that its top is flush with the baseline.
17 |
18 | 'É' U+00C9 A rectangle exactly 0.8em high, 1em wide, and aligned so
19 | that its bottom is flush with the baseline.
20 |
21 | ' ' U+0020 A transparent space exactly 1em high and wide.
22 |
23 | Most other US-ASCII characters in the font have the same glyph as X.
24 |
25 | The Ahem font belongs to the public domain as described in COPYING.
26 |
27 | Acknowledgements: The font was originally created by Todd Fahrner in
28 | the late 90s, and was updated by Paul Nelson in the mid 2000s. The
29 | changes were the introduction of x-height information to the OS/2
30 | table and the addition of the space and non-breaking space glyphs.
31 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/fr.js:
--------------------------------------------------------------------------------
1 | Keyboards.fr = {
2 | label: 'French',
3 | shortLabel: 'Fr',
4 | menuLabel: 'Français',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'fr',
8 | autoCorrectPunctuation: false,
9 | lang: 'fr',
10 | alt: {
11 | a: 'àâæáãäåā',
12 | c: 'çćč',
13 | e: 'éèêë€ē',
14 | i: 'îïìíī',
15 | o: 'ôœòóõöōø',
16 | u: 'ùûüúū',
17 | s: 'śšşß',
18 | S: 'ŚŠŞ',
19 | n: 'ńñň',
20 | '.': ',?!-;:…'
21 | },
22 | keys: [
23 | [
24 | { value: 'a' }, { value: 'z' }, { value: 'e' }, { value: 'r' },
25 | { value: 't' } , { value: 'y' }, { value: 'u' }, { value: 'i' },
26 | { value: 'o' }, { value: 'p' }
27 | ], [
28 | { value: 'q' }, { value: 's' }, { value: 'd' }, { value: 'f' },
29 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
30 | { value: 'l' }, { value: 'm' }
31 | ], [
32 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
33 | { value: 'w' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
34 | { value: 'b' }, { value: 'n' }, { value: "'", keyCode: 39 },
35 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
36 | ], [
37 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
38 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
39 | ]
40 | ]
41 | };
42 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/fy.js:
--------------------------------------------------------------------------------
1 | Keyboards.fy = {
2 | label: 'Frisian',
3 | shortLabel: 'Fy',
4 | menuLabel: 'Frysk',
5 | imEngine: 'latin',
6 | autoCorrectLanguage: 'fy',
7 | types: ['text', 'url', 'email', 'password'],
8 | lang: 'fy',
9 | pages: [ { // default page
10 | alt: {
11 | a: 'âäáàæãåā',
12 | e: 'êéëèęėē€',
13 | i: 'íïìîįīij',
14 | o: 'ôóöòõœøō',
15 | u: 'ûúüùū',
16 | s: '$',
17 | n: 'ñń',
18 | l: '£',
19 | y: 'ýij¥',
20 | '.': ',?!;:…'
21 | },
22 | keys: [
23 | [
24 | { value: 'q' }, { value: 'w' }, { value: 'e' }, { value: 'r' },
25 | { value: 't' }, { value: 'y' }, { value: 'u' }, { value: 'i' },
26 | { value: 'o' }, { value: 'p' }
27 | ], [
28 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
29 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
30 | { value: 'l' }
31 | ], [
32 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
33 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
34 | { value: 'b' }, { value: 'n' }, { value: 'm' },
35 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
36 | ], [
37 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
38 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
39 | ]
40 | ]
41 | }]
42 | };
43 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/fr-CH.js:
--------------------------------------------------------------------------------
1 | Keyboards['fr-CH'] = {
2 | label: 'French (Switzerland)',
3 | shortLabel: 'Fr',
4 | menuLabel: 'Français (Suisse)',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'fr',
8 | autoCorrectPunctuation: false,
9 | lang: 'fr',
10 | alt: {
11 | a: 'àâæáãäåā',
12 | c: 'çćč',
13 | e: 'éèêë€ē',
14 | i: 'îïìíī',
15 | o: 'ôœöòóõōø',
16 | u: 'ùûüúū',
17 | s: 'ßśšş',
18 | S: 'ŚŠŞ',
19 | n: 'ñńň'
20 | },
21 | keys: [
22 | [
23 | { value: 'q' }, { value: 'w' }, { value: 'e' }, { value: 'r' },
24 | { value: 't' } , { value: 'z' }, { value: 'u' } , { value: 'i' },
25 | { value: 'o' }, { value: 'p' }
26 | ], [
27 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
28 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
29 | { value: 'l' }, { value: "'", keyCode: 39 }
30 | ], [
31 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
32 | { value: 'y' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
33 | { value: 'b' }, { value: 'n' }, { value: 'm' },
34 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
35 | ], [
36 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
37 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
38 | ]
39 | ]
40 | };
41 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/cs-qwerty.js:
--------------------------------------------------------------------------------
1 | Keyboards['cs-qwerty'] = {
2 | label: 'Czech (QWERTY)',
3 | shortLabel: 'Cs',
4 | menuLabel: 'Česká (QWERTY)',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'cs',
8 | lang: 'cs',
9 | alt: {
10 | a: 'á',
11 | c: 'č',
12 | d: 'ď',
13 | e: 'éě',
14 | i: 'í',
15 | n: 'ň',
16 | o: 'ó',
17 | r: 'ř',
18 | s: 'š',
19 | t: 'ť',
20 | u: 'úů',
21 | y: 'ý',
22 | z: 'ž',
23 | '.': ',?!;:…'
24 | },
25 | keys: [
26 | [
27 | { value: 'q' }, { value: 'w' }, { value: 'e' }, { value: 'r' },
28 | { value: 't' }, { value: 'y' }, { value: 'u' } , { value: 'i' },
29 | { value: 'o' }, { value: 'p' }
30 | ], [
31 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
32 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
33 | { value: 'l' }
34 | ], [
35 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
36 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
37 | { value: 'b' }, { value: 'n' }, { value: 'm' },
38 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
39 | ], [
40 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
41 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
42 | ]
43 | ]
44 | };
45 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/fr-Dvorak-bepo.js:
--------------------------------------------------------------------------------
1 | Keyboards['fr-Dvorak-bepo'] = {
2 | label: 'French - Bépo',
3 | shortLabel: 'Fr',
4 | menuLabel: 'Bépo',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'fr',
8 | autoCorrectPunctuation: false,
9 | lang: 'fr',
10 | alt: {
11 | a: 'àâæáãäåā',
12 | c: 'çćč',
13 | e: 'éèêë€ē',
14 | i: 'îïìíī',
15 | o: 'ôœòóõöōø',
16 | u: 'ùûüúū',
17 | s: 'śšşß',
18 | S: 'ŚŠŞ',
19 | n: 'ńñň',
20 | '.': ',?!-;:…'
21 | },
22 | keys: [
23 | [
24 | { value: 'b' }, { value: 'é' }, { value: 'p' }, { value: 'o' },
25 | { value: 'v' }, { value: 'd' }, { value: 'l' }, { value: 'j' },
26 | { value: 'z' }, { value: 'w' }
27 | ], [
28 | { value: 'a' }, { value: 'u' }, { value: 'i' }, { value: 'e' },
29 | { value: 'c' }, { value: 't' }, { value: 's' }, { value: 'r' },
30 | { value: 'n' }, { value: 'm' }
31 | ], [
32 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
33 | { value: 'y' }, { value: 'x' }, { value: 'k' }, { value: 'q' },
34 | { value: 'g' }, { value: 'h' }, { value: 'f' },
35 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
36 | ], [
37 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
38 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
39 | ]
40 | ]
41 | };
42 |
--------------------------------------------------------------------------------
/platform/glutin/fake-ld.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | set -o errexit
8 | set -o nounset
9 | set -o pipefail
10 |
11 | call_gcc()
12 | {
13 | TARGET_DIR="${OUT_DIR}/../../.."
14 |
15 | export _ANDROID_ARCH=$1
16 | export _ANDROID_EABI=$2
17 | export _ANDROID_PLATFORM=$3
18 | export ANDROID_SYSROOT="${ANDROID_NDK}/platforms/${_ANDROID_PLATFORM}/${_ANDROID_ARCH}"
19 | ANDROID_TOOLCHAIN=""
20 | for host in "linux-x86_64" "linux-x86" "darwin-x86_64" "darwin-x86"; do
21 | if [[ -d "${ANDROID_NDK}/toolchains/${_ANDROID_EABI}-4.9/prebuilt/${host}/bin" ]]; then
22 | ANDROID_TOOLCHAIN="${ANDROID_NDK}/toolchains/${_ANDROID_EABI}-4.9/prebuilt/${host}/bin"
23 | break
24 | fi
25 | done
26 |
27 | ANDROID_CPU_ARCH_DIR=$4
28 | ANDROID_CXX_LIBS="${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_CPU_ARCH_DIR}"
29 |
30 | echo "toolchain: ${ANDROID_TOOLCHAIN}"
31 | echo "libs dir: ${ANDROID_CXX_LIBS}"
32 | echo "sysroot: ${ANDROID_SYSROOT}"
33 | echo "targetdir: ${ANDROID_CXX_LIBS}"
34 |
35 | "${ANDROID_TOOLCHAIN}/${_ANDROID_EABI}-gcc" \
36 | --sysroot="${ANDROID_SYSROOT}" -L "${ANDROID_CXX_LIBS}" ${_GCC_PARAMS} -lc++ \
37 | -o "${TARGET_DIR}/libservo.so" -shared && touch "${TARGET_DIR}/servo"
38 | }
39 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/en-Dvorak.js:
--------------------------------------------------------------------------------
1 | Keyboards['en-Dvorak'] = {
2 | label: 'English - Dvorak',
3 | shortLabel: 'En',
4 | menuLabel: 'Dvorak',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'en_us',
8 | lang: 'en-US',
9 | alt: {
10 | a: 'àáâãäåāæ',
11 | c: 'çćč',
12 | e: 'èéêëē€',
13 | i: 'ìíîïī',
14 | o: 'òóôõöōœø',
15 | u: 'ùúûüū',
16 | s: 'śšşß',
17 | S: 'ŚŠŞ',
18 | n: 'ńñň'
19 | },
20 | textLayoutOverwrite: {
21 | ',': "'",
22 | '.': false
23 | },
24 | keys: [
25 | [
26 | { value: ',' }, { value: '.' } , { value: 'p' }, { value: 'y' },
27 | { value: 'f' }, { value: 'g' } , { value: 'c' }, { value: 'r' },
28 | { value: 'l' }, { value: '⌫', keyCode: KeyEvent.DOM_VK_BACK_SPACE }
29 | ], [
30 | { value: 'a' }, { value: 'o' }, { value: 'e' }, { value: 'u' },
31 | { value: 'i' } , { value: 'd' }, { value: 'h' }, { value: 't' },
32 | { value: 'n' }, { value: 's' }
33 | ], [
34 | { value: '⇪', ratio: 1, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
35 | { value: 'q' }, { value: 'j' }, { value: 'k' }, { value: 'x' },
36 | { value: 'b' }, { value: 'm' }, { value: 'w' }, { value: 'v' },
37 | { value: 'z' }
38 | ], [
39 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
40 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
41 | ]
42 | ]
43 | };
44 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/da.js:
--------------------------------------------------------------------------------
1 | Keyboards.da = {
2 | label: 'Danish',
3 | shortLabel: 'Da',
4 | menuLabel: 'Dansk',
5 | imEngine: 'latin',
6 | autoCorrectLanguage: 'da',
7 | types: ['text', 'url', 'email', 'password'],
8 | lang: 'da',
9 | alt: {
10 | a: 'äáàâąã',
11 | e: 'éèêëę€',
12 | i: 'íìîï',
13 | o: 'öóòôõ',
14 | u: 'üúùûū',
15 | s: 'śšşß',
16 | S: 'ŚŠŞ',
17 | n: 'ńñň',
18 | c: 'çćč',
19 | d: 'ðď',
20 | r: 'ř',
21 | t: 'ťþ',
22 | z: 'źžż',
23 | l: 'ł',
24 | v: 'w'
25 | },
26 | width: 11,
27 | keys: [
28 | [
29 | { value: 'q' },{ value: 'w' },{ value: 'e' },{ value: 'r' },
30 | { value: 't' },{ value: 'y' },{ value: 'u' },{ value: 'i' },
31 | { value: 'o' },{ value: 'p' },{ value: 'å' }
32 | ], [
33 | { value: 'a' },{ value: 's' },{ value: 'd' },{ value: 'f' },
34 | { value: 'g' },{ value: 'h' },{ value: 'j' },{ value: 'k' },
35 | { value: 'l' },{ value: 'æ' },{ value: 'ø' }
36 | ], [
37 | { value: '⇪', ratio: 2, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
38 | { value: 'z' },{ value: 'x' },{ value: 'c' },{ value: 'v' },
39 | { value: 'b' },{ value: 'n' },{ value: 'm' },
40 | { value: '⌫', ratio: 2, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
41 | ], [
42 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
43 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
44 | ]
45 | ]
46 | };
47 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/en-Colemak.js:
--------------------------------------------------------------------------------
1 | Keyboards['en-Colemak'] = {
2 | label: 'English - Colemak',
3 | shortLabel: 'En',
4 | menuLabel: 'Colemak',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'en_us',
8 | lang: 'en-US',
9 | alt: {
10 | a: 'áàâäåãāæ',
11 | c: 'çćč',
12 | e: 'éèêëēę€ɛ',
13 | i: 'ïíìîīį',
14 | o: 'öóòôōőœøɵ',
15 | u: 'üúùûűū',
16 | s: 'ßśš$',
17 | S: 'ŚŠ$',
18 | n: 'ñń',
19 | l: 'ł£',
20 | y: 'ÿ¥',
21 | z: 'žźż',
22 | '.': ',?!:)(…'
23 | },
24 | keys: [
25 | [
26 | { value: 'q' }, { value: 'w' }, { value: 'f' } , { value: 'p' },
27 | { value: 'g' } , { value: 'j' }, { value: 'l' } , { value: 'u' },
28 | { value: 'y' }, { value: ';' }
29 | ], [
30 | { value: 'a' }, { value: 'r' }, { value: 's' }, { value: 't' },
31 | { value: 'd' } , { value: 'h' }, { value: 'n' }, { value: 'e' },
32 | { value: 'i' },
33 | { value: 'o',}
34 | ], [
35 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
36 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
37 | { value: 'b' }, { value: 'k' }, { value: 'm' },
38 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
39 | ], [
40 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
41 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
42 | ]
43 | ]
44 | };
45 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/wo.js:
--------------------------------------------------------------------------------
1 | Keyboards.wo = {
2 | label: 'Wolof',
3 | shortLabel: 'Wo',
4 | menuLabel: 'Wolof',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | lang: 'wo',
8 | pages: [ {
9 | alt: {
10 | a: 'àâæáãäåā',
11 | c: 'çćč',
12 | e: 'éèêë€ē',
13 | i: 'îïìíī',
14 | o: 'óôœòõöōø',
15 | u: 'ùûüúū',
16 | s: 'śšşß',
17 | S: 'ŚŠŞ',
18 | n: 'ñńň',
19 | é: 'z',
20 | ë: 'h',
21 | ŋ: 'v',
22 | '.': ',?!-;:',
23 | },
24 | keys: [
25 | [
26 | { value: 'a' }, { value: 'é' }, { value: 'e' }, { value: 'r' },
27 | { value: 't' }, { value: 'y' }, { value: 'u' }, { value: 'i' },
28 | { value: 'o' }, { value: 'p' }
29 | ], [
30 | { value: 'q' }, { value: 's' }, { value: 'd' }, { value: 'f' },
31 | { value: 'g' }, { value: 'ë' }, { value: 'j' }, { value: 'k' },
32 | { value: 'l' }, { value: 'm' }
33 | ], [
34 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
35 | { value: 'w' }, { value: 'x' }, { value: 'c' }, { value: 'ŋ' },
36 | { value: 'b' }, { value: 'n' }, { value: '\''},
37 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
38 | ], [
39 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
40 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
41 | ]
42 | ]
43 | } ]
44 | };
45 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/tr-F.js:
--------------------------------------------------------------------------------
1 | Keyboards['tr-F'] = {
2 | label: 'Turkish F',
3 | shortLabel: 'Tr',
4 | imEngine: 'latin',
5 | types: ['text', 'url', 'email', 'password'],
6 | autoCorrectLanguage: 'tr',
7 | menuLabel: 'Türkçe F',
8 | lang: 'tr',
9 | upperCase: {
10 | 'i': 'İ'
11 | },
12 | alt: {
13 | d: '¥',
14 | i: 'ß',
15 | f: '@',
16 | j: '«',
17 | ö: '»',
18 | p: '£',
19 | s: 'μ',
20 | v: '¢',
21 | u: 'æ',
22 | '.': ',?!;:'
23 | },
24 | width: 12,
25 | keys: [
26 | [
27 | { value: 'f' }, { value: 'g' }, { value: 'ğ' }, { value: 'ı' },
28 | { value: 'o' }, { value: 'd' }, { value: 'r' }, { value: 'n' },
29 | { value: 'h' }, { value: 'p' }, { value: 'q' }, { value: 'w' }
30 | ], [
31 | { value: 'u' }, { value: 'i' }, { value: 'e' }, { value: 'a' },
32 | { value: 'ü' }, { value: 't' }, { value: 'k' }, { value: 'm' },
33 | { value: 'l' }, { value: 'y' }, { value: 'ş' }, { value: 'x' }
34 | ], [
35 | { value: '⇪', ratio: 2, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
36 | { value: 'j' }, { value: 'ö' }, { value: 'v' }, { value: 'c' },
37 | { value: 'ç' }, { value: 'z' }, { value: 's' }, { value: 'b'},
38 | { value: '⌫', ratio: 2, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
39 | ], [
40 | { value: ' ', ratio: 10.0, keyCode: KeyboardEvent.DOM_VK_SPACE },
41 | { value: '↵', ratio: 2.0, keyCode: KeyEvent.DOM_VK_RETURN }
42 | ]
43 | ]
44 | };
45 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/nb.js:
--------------------------------------------------------------------------------
1 | Keyboards.nb = {
2 | label: 'Norwegian Bokmal',
3 | shortLabel: 'Nb',
4 | menuLabel: 'Norsk',
5 | imEngine: 'latin',
6 | autoCorrectLanguage: 'nb',
7 | types: ['text', 'url', 'email', 'password'],
8 | lang: 'nb',
9 | alt: {
10 | a: 'äáàâąã',
11 | e: 'éèêëę€',
12 | i: 'íìîï',
13 | o: 'öóòôõ',
14 | u: 'üúùûū',
15 | s: 'śšşß',
16 | S: 'ŚŠŞ',
17 | n: 'ńñň',
18 | c: 'çćč',
19 | d: 'ðď',
20 | r: 'ř',
21 | t: 'ťþ',
22 | z: 'źžż',
23 | l: 'ł',
24 | v: 'w',
25 | 'æ': 'œ'
26 | },
27 | width: 11,
28 | keys: [
29 | [
30 | { value: 'q' },{ value: 'w' },{ value: 'e' },{ value: 'r' },
31 | { value: 't' },{ value: 'y' },{ value: 'u' },{ value: 'i' },
32 | { value: 'o' },{ value: 'p' },{ value: 'å' }
33 | ], [
34 | { value: 'a' },{ value: 's' },{ value: 'd' },{ value: 'f' },
35 | { value: 'g' },{ value: 'h' },{ value: 'j' },{ value: 'k' },
36 | { value: 'l' },{ value: 'ø' },{ value: 'æ' }
37 | ], [
38 | { value: '⇪', ratio: 2, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
39 | { value: 'z' },{ value: 'x' },{ value: 'c' },{ value: 'v' },
40 | { value: 'b' },{ value: 'n' },{ value: 'm' },
41 | { value: '⌫', ratio: 2, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
42 | ], [
43 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
44 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
45 | ]
46 | ]
47 | };
48 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/cy.js:
--------------------------------------------------------------------------------
1 | Keyboards.cy = {
2 | label: 'Welsh',
3 | shortLabel: 'Cy',
4 | menuLabel: 'Cymraeg',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'cy',
8 | //autoCorrectPunctuation: false,
9 | lang: 'fr',
10 | alt: {
11 | a: 'âäáàåãāæ',
12 | c: 'çćč',
13 | e: 'êëéèēę€ɛ',
14 | i: 'îïíìīį',
15 | o: 'ôöóòõōœøɵ',
16 | u: 'ûüúùū',
17 | s: 'ßśš$',
18 | S: 'ŚŠ$',
19 | n: 'ñń',
20 | l: 'ł£',
21 | w: 'ŵẅẃẁ',
22 | y: 'ŷÿýỳ¥',
23 | z: 'žźż',
24 | '.': ',?!-;:'
25 | },
26 | keys: [
27 | [
28 | { value: 'q' }, { value: 'w' }, { value: 'e' }, { value: 'r' },
29 | { value: 't' }, { value: 'y' }, { value: 'u' }, { value: 'i' },
30 | { value: 'o' }, { value: 'p' }
31 | ], [
32 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
33 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
34 | { value: 'l' }, { value: "'", keyCode: 39 }
35 | ], [
36 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
37 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
38 | { value: 'b' }, { value: 'n' }, { value: 'm' },
39 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
40 | ], [
41 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
42 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
43 | ]
44 | ]
45 | };
46 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/ff.js:
--------------------------------------------------------------------------------
1 | Keyboards.ff = {
2 | label: 'Fulah',
3 | shortLabel: 'Ff',
4 | menuLabel: 'Pulaar-Fulfulde',
5 | imEngine: 'latin',
6 | autoCorrectLanguage: 'ff',
7 | types: ['text', 'url', 'email', 'password'],
8 | lang: 'ff',
9 | alt: {
10 | a: 'àâæáãäåā',
11 | c: 'çćč',
12 | e: 'éèêë€ē',
13 | i: 'îïìíī',
14 | o: 'ôœòóõöōø',
15 | u: 'ùûüúū',
16 | s: 'śšşß',
17 | S: 'ŚŠŞ',
18 | n: 'ñńň',
19 | ɗ: 'z',
20 | ƴ: 'x',
21 | ŋ: 'q',
22 | ɓ: 'v',
23 | '.': ',?!-;:'
24 | },
25 | keys: [
26 | [
27 | { value: 'a' }, { value: 'ɗ' }, { value: 'e' }, { value: 'r' },
28 | { value: 't' } , { value: 'y' }, { value: 'u' }, { value: 'i' },
29 | { value: 'o' }, { value: 'p' }
30 | ], [
31 | { value: 'ŋ' }, { value: 's' }, { value: 'd' }, { value: 'f' },
32 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
33 | { value: 'l' }, { value: 'm' }
34 | ], [
35 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
36 | { value: 'w' }, { value: 'ƴ' }, { value: 'c' }, { value: 'ɓ' },
37 | { value: 'b' }, { value: 'n' }, { value: "'", keyCode: 39 },
38 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
39 | ], [
40 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
41 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
42 | ]
43 | ]
44 | };
45 |
--------------------------------------------------------------------------------
/platform/shared/resources/self_signed_certificate_for_testing.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDxjCCAq6gAwIBAgIJAIPzh6mmZhGkMA0GCSqGSIb3DQEBCwUAMHgxCzAJBgNV
3 | BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
4 | Q29tcGFueSBMdGQxEjAQBgNVBAMMCWxvY2FsaG9zdDEgMB4GCSqGSIb3DQEJARYR
5 | dGVzdGluZ0BzZXJ2by5vcmcwHhcNMTcxMjI0MTQxMjA0WhcNMjcxMjIyMTQxMjA0
6 | WjB4MQswCQYDVQQGEwJYWDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQK
7 | DBNEZWZhdWx0IENvbXBhbnkgTHRkMRIwEAYDVQQDDAlsb2NhbGhvc3QxIDAeBgkq
8 | hkiG9w0BCQEWEXRlc3RpbmdAc2Vydm8ub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOC
9 | AQ8AMIIBCgKCAQEA8CYQ9pOb0TsChmRWzlUoZ8dJ7m8lKz103tsJ1HFOj699qoLi
10 | Dphw/k7bUhVZlOU1XtFJTFJG8kYxjC84Ln/xKNBaFCh9hm1KUtO4RssXKlEHfg8x
11 | VmGOIaC61oXfiAj3q+2PTgv6olDoL7z+4Y2gSP/zg1szdAGWwfksgX0atIWy8lCB
12 | bX8VeNlBAvKkM0CLavXhjUmmpbzPGj/Pl2bv+HdXZZd7t6sHQ6AuzPaBDAnph2Pj
13 | unZ2iVLt/PrONZ8mrUkiqg5GURQ7x/EwhO/j0EQEZDd6rOexHsnmCoUsF2KYMzgu
14 | D9/A6Q+ruo3BE6UGb2Sb9seGfrJa1uPMzttb3QIDAQABo1MwUTAdBgNVHQ4EFgQU
15 | rzyrtcToBhyprrcbQ698ysb4mqIwHwYDVR0jBBgwFoAUrzyrtcToBhyprrcbQ698
16 | ysb4mqIwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAffZmMwi5
17 | ljhc0pM2DUWjfari4pvXzRpPUErTtMxuXQVijPhwOOWFI91xoEZUojxhOr+0Ran9
18 | 7OulbgaTN0xMNwSs5cdS/KLY/nuIz0J8zYeW/VfIm+9fAKxt0cqORQppd6nTnfhl
19 | Sfr7MBE9su3fMq142voUgEwb4zxKq/tnlCzkWMAju+EPdTHW+HRhz8nEy/DVThiY
20 | 2gTQG5tajQV7XZyWBozLiCjx0I2sidC7uxoy9o9yQRXvikeNxLdiOZlBP25IHTM+
21 | 57uYE15RiCOOQB5vYH4L8ISRxDmNRYBSi5HFc68URqOuakpmGDJ8HNMJRb0m8PbR
22 | zDwuZIy1uC+UBg==
23 | -----END CERTIFICATE-----
24 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/sv.js:
--------------------------------------------------------------------------------
1 | Keyboards.sv = {
2 | label: 'Swedish',
3 | shortLabel: 'Sv',
4 | menuLabel: 'Svenska',
5 | imEngine: 'latin',
6 | autoCorrectLanguage: 'sv',
7 | types: ['text', 'url', 'email', 'password'],
8 | lang: 'sv',
9 | alt: {
10 | a: 'äáàâąã',
11 | e: 'éèêëę€',
12 | i: 'íìîï',
13 | o: 'öóòôõ',
14 | u: 'üúùûū',
15 | s: 'śšşß',
16 | S: 'ŚŠŞ',
17 | n: 'ńñň',
18 | c: 'çćč',
19 | d: 'ðď',
20 | r: 'ř',
21 | t: 'ťþ',
22 | z: 'źžż',
23 | l: 'ł',
24 | v: 'w',
25 | 'ä': 'œæ',
26 | 'ö': 'ø'
27 | },
28 | width: 11,
29 | keys: [
30 | [
31 | { value: 'q' },{ value: 'w' },{ value: 'e' },{ value: 'r' },
32 | { value: 't' },{ value: 'y' },{ value: 'u' },{ value: 'i' },
33 | { value: 'o' },{ value: 'p' },{ value: 'å' }
34 | ], [
35 | { value: 'a' },{ value: 's' },{ value: 'd' },{ value: 'f' },
36 | { value: 'g' },{ value: 'h' },{ value: 'j' },{ value: 'k' },
37 | { value: 'l' },{ value: 'ö' },{ value: 'ä' }
38 | ], [
39 | { value: '⇪', ratio: 2, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
40 | { value: 'z' },{ value: 'x' },{ value: 'c' },{ value: 'v' },
41 | { value: 'b' },{ value: 'n' },{ value: 'm' },
42 | { value: '⌫', ratio: 2, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
43 | ], [
44 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
45 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
46 | ]
47 | ]
48 | };
49 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/vi-Qwerty.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | Keyboards['vi-Qwerty'] = {
6 | label: 'Vietnamese',
7 | shortLabel: 'Vi',
8 | menuLabel: 'Tiếng Việt (QWERTY)',
9 | imEngine: 'vietnamese',
10 | needsCandidatePanel: true,
11 | width: 10,
12 | types: ['text', 'url', 'email'],
13 | lang: 'vi',
14 | alt: {
15 | 'a': 'ăâ',
16 | 'd': 'đ',
17 | 'e': 'ê',
18 | 'o': 'ôơ',
19 | 'u': 'ư',
20 | '.': ',?!-;:'
21 | },
22 | keys: [
23 | [
24 | { value: 'q' }, { value: 'w' }, { value: 'e' }, { value: 'r' },
25 | { value: 't' } , { value: 'y' }, { value: 'u' }, { value: 'i' },
26 | { value: 'o' }, { value: 'p' }
27 | ], [
28 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
29 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
30 | { value: 'l' }
31 | ], [
32 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
33 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
34 | { value: 'b' }, { value: 'n' }, { value: 'm' },
35 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
36 | ], [
37 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
38 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
39 | ]
40 | ]
41 | };
42 |
--------------------------------------------------------------------------------
/platform/gonk/src/events_loop.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | /// The event loop that orchestrates waking up Servo and dispatching
6 | /// input events from the device.
7 |
8 | use servo::compositing::windowing::WindowEvent;
9 | use std::sync::mpsc::*;
10 |
11 | #[derive(Debug)]
12 | pub enum Event {
13 | WindowEvent(WindowEvent),
14 | WakeUpEvent,
15 | ShutdownEvent,
16 | }
17 |
18 | pub enum ControlFlow {
19 | Continue,
20 | Break,
21 | }
22 |
23 | pub struct EventLoop {
24 | receiver: Receiver,
25 | sender: Sender,
26 | }
27 |
28 | impl EventLoop {
29 | pub fn new() -> EventLoop {
30 | let (sender, receiver) = channel();
31 | EventLoop { receiver, sender }
32 | }
33 |
34 | pub fn get_sender(&self) -> Sender {
35 | self.sender.clone()
36 | }
37 |
38 | pub fn run(&self, mut callback: F)
39 | where
40 | F: FnMut(Event) -> ControlFlow,
41 | {
42 | loop {
43 | let event = self.receiver.recv().unwrap();
44 | debug!("Got event {:?}", event);
45 | let res = callback(event);
46 | match res {
47 | ControlFlow::Break => {
48 | info!("Aborting event loop");
49 | break;
50 | }
51 | ControlFlow::Continue => {}
52 | }
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/eo.js:
--------------------------------------------------------------------------------
1 | Keyboards.eo = {
2 | label: 'Esperanto',
3 | menuLabel: 'Esperanto',
4 | shortLabel: 'Eo',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | lang: 'eo',
8 | alt: {
9 | a: 'àáâãäåæāăą',
10 | c: 'çćċč',
11 | d: 'ðďđ',
12 | e: 'èéêëēėęě',
13 | g: 'ğġģ',
14 | h: 'ĥħ',
15 | i: 'ìíîïĩīįıij',
16 | k: 'ķĸ',
17 | l: 'ĺļľŀł',
18 | n: 'ñńņňʼnŋ',
19 | o: 'òóôõöøōőœ',
20 | 'ŝ': 'q',
21 | r: 'ŕŗř',
22 | s: 'śşšșß',
23 | S: 'ŚŞŠȘ',
24 | t: 'þţťŧț',
25 | u: 'ùúûüũūůűų',
26 | 'ĝ': 'wŵ',
27 | 'ĉ': 'x',
28 | 'ŭ': 'yýÿŷ',
29 | z: 'źżž',
30 | '.': ',?!;:…'
31 | },
32 | keys: [
33 | [
34 | { value: 'ŝ' }, { value: 'ĝ' }, { value: 'e' } , { value: 'r' },
35 | { value: 't' }, { value: 'ŭ' }, { value: 'u' } , { value: 'i' },
36 | { value: 'o' }, { value: 'p' }
37 | ], [
38 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
39 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
40 | { value: 'l' }, { value: 'ĵ' }
41 | ], [
42 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
43 | { value: 'z' }, { value: 'ĉ' }, { value: 'c' }, { value: 'v' },
44 | { value: 'b' }, { value: 'n' }, { value: 'm' },
45 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
46 | ], [
47 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
48 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
49 | ]
50 | ]
51 | };
52 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/vi-Typewriter.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | // This is a traditional Vietnamese typewriter layout.
6 | Keyboards['vi-Typewriter'] = {
7 | label: 'Vietnamese',
8 | shortLabel: 'Vi',
9 | menuLabel: 'Tiếng Việt',
10 | imEngine: 'vietnamese',
11 | needsCandidatePanel: true,
12 | width: 10,
13 | types: ['text', 'url', 'email'],
14 | lang: 'vi',
15 | alt: {
16 | 'đ': 'z',
17 | 'ư': 'f',
18 | 'ơ': 'j',
19 | 'ă': 'w',
20 | '.': ',?!-;:'
21 | },
22 | keys: [
23 | [
24 | { value: 'a' }, { value: 'đ' }, { value: 'e' }, { value: 'r' },
25 | { value: 't' } , { value: 'y' }, { value: 'u' }, { value: 'i' },
26 | { value: 'o' }, { value: 'p' }
27 | ], [
28 | { value: 'q' }, { value: 's' }, { value: 'd' }, { value: 'ư' },
29 | { value: 'g' } , { value: 'h' }, { value: 'ơ' }, { value: 'k' },
30 | { value: 'l' }, { value: 'm' }
31 | ], [
32 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
33 | { value: 'ă' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
34 | { value: 'b' }, { value: 'n' }, { value: '^', keyCode: 94 },
35 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
36 | ], [
37 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
38 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
39 | ]
40 | ]
41 | };
42 |
--------------------------------------------------------------------------------
/frontend/ui/shared/fontawesome/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Font Awesome Free License
2 | -------------------------
3 |
4 | Font Awesome Free is free, open source, and GPL friendly. You can use it for
5 | commercial projects, open source projects, or really almost whatever you want.
6 | Full Font Awesome Free license: https://fontawesome.com/license.
7 |
8 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
9 | In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
10 | packaged as SVG and JS file types.
11 |
12 | # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
13 | In the Font Awesome Free download, the SIL OLF license applies to all icons
14 | packaged as web and desktop font files.
15 |
16 | # Code: MIT License (https://opensource.org/licenses/MIT)
17 | In the Font Awesome Free download, the MIT license applies to all non-font and
18 | non-icon files.
19 |
20 | # Attribution
21 | Attribution is required by MIT, SIL OLF, and CC BY licenses. Downloaded Font
22 | Awesome Free files already contain embedded comments with sufficient
23 | attribution, so you shouldn't need to do anything additional when using these
24 | files normally.
25 |
26 | We've kept attribution comments terse, so we ask that you do not actively work
27 | to remove them from files, especially code. They're a great way for folks to
28 | learn about Font Awesome.
29 |
30 | # Brand Icons
31 | All brand icons are trademarks of their respective owners. The use of these
32 | trademarks does not indicate endorsement of the trademark holder by Font
33 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except
34 | to represent the company, product, or service to which they refer.**
35 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/settings/general_settings_view.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global SettingsView, BaseView,
4 | SoundFeedbackSettings, VibrationFeedbackSettings, IMEngineSettings */
5 |
6 | (function(exports) {
7 |
8 | var GeneralSettingsGroupView = function GeneralSettingsGroupView(app) {
9 | BaseView.apply(this);
10 |
11 | this.app = app;
12 | };
13 |
14 | GeneralSettingsGroupView.prototype = Object.create(BaseView.prototype);
15 |
16 | GeneralSettingsGroupView.prototype.CONTAINER_ID = 'general-settings';
17 |
18 | GeneralSettingsGroupView.prototype.start = function() {
19 | BaseView.prototype.start.call(this);
20 |
21 | this.childViews.soundFeedbackSettings =
22 | new SettingsView(this.app, this.container, SoundFeedbackSettings);
23 | this.childViews.soundFeedbackSettings.start();
24 |
25 | this.childViews.vibrationFeedbackSettings =
26 | new SettingsView(this.app, this.container, VibrationFeedbackSettings);
27 | this.childViews.vibrationFeedbackSettings.start();
28 |
29 | this.childViews.imEngineSettings =
30 | new SettingsView(this.app, this.container, IMEngineSettings);
31 | this.childViews.imEngineSettings.start();
32 | };
33 |
34 | GeneralSettingsGroupView.prototype.stop = function() {
35 | BaseView.prototype.stop.call(this);
36 |
37 | this.childViews.soundFeedbackSettings.stop();
38 | delete this.childViews.soundFeedbackSettings;
39 |
40 | this.childViews.vibrationFeedbackSettings.stop();
41 | delete this.childViews.vibrationFeedbackSettings;
42 |
43 | this.childViews.imEngineSettings.stop();
44 | delete this.childViews.imEngineSettings;
45 | };
46 |
47 | exports.GeneralSettingsGroupView = GeneralSettingsGroupView;
48 |
49 | })(window);
50 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/ta.js:
--------------------------------------------------------------------------------
1 | Keyboards.ta = {
2 | label: 'Tamil',
3 | shortLabel: 'Ta',
4 | imEngine: 'india',
5 | menuLabel: 'தமிழ்',
6 | secondLayout: true,
7 | specificCssRule: true,
8 | basicLayoutKey: 'அஆஇ',
9 | types: ['text', 'url', 'email'],
10 | lang: 'ta',
11 | upperCase: {
12 | 'ஒ':'ொ',
13 | 'ஔ':'ௌ',
14 | 'ஐ':'ை',
15 | 'ஶ':'ா',
16 | 'ஆ':'ீ',
17 | 'ஈ':'ூ',
18 | 'ப':'ஊ',
19 | 'ஹ':'ங',
20 | 'ஜ':'ஂ',
21 | 'ஞ':'ௗ',
22 |
23 | 'ஓ':'ோ',
24 | 'ஏ':'ே',
25 | 'அ':'்',
26 | 'இ':'ி',
27 | 'உ':'ு',
28 | 'ர':'ற',
29 | 'க':'&',
30 | 'த':'ஃ',
31 | 'ச':'?',
32 | 'ட':'!',
33 |
34 | 'எ':'ெ',
35 | 'ம':'ண',
36 | 'ந':'ன',
37 | 'வ':'ழ',
38 | 'ல':'ள',
39 | 'ஸ':'ஷ',
40 | 'ய':'₹'
41 | },
42 | alt: {
43 | '₹': '$ € £ ¥ ৳'
44 | },
45 | keys: [
46 | [
47 | { value: 'ஒ' }, { value: 'ஔ' }, { value: 'ஐ' }, { value: 'ஶ' },
48 | { value: 'ஆ' }, { value: 'ஈ' }, { value: 'ப' }, { value: 'ஹ' },
49 | { value: 'ஜ' }, { value: 'ஞ' }
50 | ], [
51 | { value: 'ஓ' }, { value: 'ஏ' }, { value: 'அ' }, { value: 'இ' },
52 | { value: 'உ' }, { value: 'ர' }, { value: 'க' }, { value: 'த' },
53 | { value: 'ச' }, { value: 'ட' }
54 | ], [
55 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
56 | { value: 'எ' }, { value: 'ம' }, { value: 'ந' }, { value: 'வ' },
57 | { value: 'ல' }, { value: 'ஸ' }, { value: 'ய' },
58 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
59 | ], [
60 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
61 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
62 | ]
63 | ]
64 | };
65 |
--------------------------------------------------------------------------------
/frontend/ui/system/css/window_manager.css:
--------------------------------------------------------------------------------
1 | window-manager {
2 | position: absolute;
3 | top: var(--statusbar-height);
4 | bottom: var(--navbar-height);
5 | left: 0px;
6 | width: 100%;
7 | /* transition: transform 0.25s; */
8 | }
9 |
10 | window-manager.dragging {
11 | /* transition: none; */
12 | }
13 |
14 | window-manager web-view,
15 | window-manager frame-overlay {
16 | position: absolute;
17 | top: 0px;
18 | left: 0px;
19 | bottom: 0px;
20 | width: 100%;
21 | /* transition: transform 0.25s; */
22 | }
23 |
24 | window-manager web-view.exposed {
25 | box-shadow: rgba(128,128,128,1) 0px 20px 30px, inset rgba(128,128,128,1) 0px -10px 20px;
26 | }
27 |
28 | window-manager web-view iframe {
29 | width: 100%;
30 | height: 100%;
31 | }
32 |
33 | .frame-overlay {
34 | position: absolute;
35 | top: 0px;
36 | left: 0px;
37 | bottom: 0px;
38 | width: 100%;
39 | display: flex;
40 | flex-direction: column;
41 | /* transition: transform 0.25s; */
42 | }
43 |
44 | .overlay-title {
45 | background-color: rgb(64, 64, 64);
46 | color: white;
47 | padding: 0.25em;
48 | display: flex;
49 | flex-direction: row;
50 | align-items: center;
51 | }
52 |
53 | .overlay-title div {
54 | text-overflow: ellipsis;
55 | white-space: nowrap;
56 | overflow: hidden;
57 | }
58 |
59 | drag-panel {
60 | position: absolute;
61 | top: var(--statusbar-height);
62 | bottom: var(--navbar-height);
63 | width: 50px;
64 | /* background-color: rgba(0, 255, 255, 0.5); */
65 | z-index: 10;
66 | }
67 |
68 | drag-panel.wide {
69 | width: 100%;
70 | }
71 |
72 | drag-panel.left {
73 | left: 0px;
74 | }
75 |
76 | drag-panel.right {
77 | right: 0px;
78 | }
--------------------------------------------------------------------------------
/frontend/ui/system/gaia_keyboard/settings.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | (function(exports) {
4 |
5 | var SettingsHandler = function(app) {
6 | this.app = app;
7 |
8 | this.settings = new Map();
9 | this.settings.set('keyboard.wordsuggestion', true);
10 | this.settings.set('keyboard.autocorrect', true);
11 | this.settings.set('keyboard.vibration', true);
12 | this.settings.set('audio.volume.notification', 10);
13 | this.settings.set('keyboard.handwriting.strokeWidth', 10);
14 | this.settings.set('keyboard.handwriting.responseTime', 500);
15 | };
16 |
17 | SettingsHandler.prototype.start = function() {
18 | };
19 |
20 | SettingsHandler.prototype.stop = function() {
21 | };
22 |
23 | SettingsHandler.prototype.handleMessage = function(data) {
24 | switch (data.method) {
25 | case 'get':
26 | var result = {};
27 | result[data.args[0]] = this.settings.get(data.args[0]);
28 | this.app.postMessage({
29 | api: data.api,
30 | lockId: data.lockId,
31 | id: data.id,
32 | result: result
33 | });
34 |
35 | break;
36 |
37 | case 'set':
38 | var key;
39 | for (key in data.args[0]) {
40 | this.settings.set(key, data.args[0][key]);
41 | }
42 | this.app.postMessage({
43 | api: data.api,
44 | lockId: data.lockId,
45 | id: data.id,
46 | result: data.args[0]
47 | });
48 |
49 | break;
50 |
51 | case 'clear':
52 | this.settings.delete(data.args[0]);
53 | this.app.postMessage({
54 | api: data.api,
55 | lockId: data.lockId,
56 | id: data.id,
57 | result: data.args[0]
58 | });
59 |
60 | break;
61 | }
62 | };
63 |
64 | exports.SettingsHandler = SettingsHandler;
65 |
66 | }(window));
67 |
--------------------------------------------------------------------------------
/platform/shared/resources/privatekey_for_testing.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDwJhD2k5vROwKG
3 | ZFbOVShnx0nubyUrPXTe2wnUcU6Pr32qguIOmHD+TttSFVmU5TVe0UlMUkbyRjGM
4 | Lzguf/Eo0FoUKH2GbUpS07hGyxcqUQd+DzFWYY4hoLrWhd+ICPer7Y9OC/qiUOgv
5 | vP7hjaBI//ODWzN0AZbB+SyBfRq0hbLyUIFtfxV42UEC8qQzQItq9eGNSaalvM8a
6 | P8+XZu/4d1dll3u3qwdDoC7M9oEMCemHY+O6dnaJUu38+s41nyatSSKqDkZRFDvH
7 | 8TCE7+PQRARkN3qs57EeyeYKhSwXYpgzOC4P38DpD6u6jcETpQZvZJv2x4Z+slrW
8 | 48zO21vdAgMBAAECggEBAL8nLb14BUFoXTwoRkh61Gy23wxhgA6JHqv9Yjet8UDC
9 | CZ9eCx5fDSIAFuehgurX/8F3iYasvzg901aoh2nMAWPhZLJDAJeuCskfKcGACvJu
10 | CS64XSdLA92UmOQFL8aSjMJXmAgh1OC60fad06wqFXnF8kmOoMgoM542/swbjtQ9
11 | RUoXUKa2x9ve2b0og4iuEj/iZR+d2/HYPNtpNIFt7+rA1qCd2RIfMSAB6j3ohFNA
12 | AqVZdASgNznj5Sa8jz6zU40zdyLPIDYfCdi3Gmq42LaB4HWHiSpjx49aCQD6UV4+
13 | NxFsYi9WRA79DxdoeWsYm017G5NrHsELCdqwxg46fEECgYEA+/AJsiIjoBJ0SGoe
14 | Oqm86EbOtYtOEsMLF0Pk7OQejAN3VPqP6xN0u6unldo5RLJMsTlTHxIZuZNbXhw8
15 | aKWz0ULoXWi5J8Af2NHI0zaY0naGv3yew+6mq9xpZLHsY9wBWtT2tXEziH7gjPvk
16 | LmJ8+GCKSq9XLHoSyyjjqdr1aOUCgYEA9AVdhIFZ9EDb6zgnCjMvWlNFU/G2+WbU
17 | jCc9GRTFbzsahbawjuJ+47Ajz5aTBWOA1HE4wcMMMEjRebP/15CiCQs34+BIQckW
18 | 2zvMipAh6dlbyx2O9t0gdIjAUNiYYMfuHYBQ3Nwmi6Nop3kHQuFHRh6uneGTxcEq
19 | wq3IEhN9T5kCgYAnip8a9Dy/LOZPT0h7UJSzqBldaQXR8AbXmfJeM9ePhiO+lKzt
20 | 6lnR8rkUzfFbFNjwn9yp7b9X3wbiGHBqxEcauvOZZYxZ7s+QyixI6jLGJZA0kayh
21 | d910790izsIZUjhsNyyZgbDi5Xb86bQAi7itiwlpe2elNWupszs4N4N4+QKBgQDQ
22 | Le+dhtkeV2MHZm1v90Dzt0zTE8j9Nuwn8aXfSugxP+QdpUE1dSe5yeCTTit5km0r
23 | ULiSHXu9ibIkORsQZdTHEGoLH6Gldg/o0zhqEhLMtWHpg/sewoHYyX4AuvgswQR0
24 | 6K6T7cF4qd0z2z4FobmzqaNhEDyInoaDdczVFwl2KQKBgQCHjZLwMZLg0be9i1IS
25 | jzaG2d5CF3WJ+A1zYQLXqzpX5qfbgsEIbpTtdCOhgf94YJsiJ9XdIG8OgGVxhrkT
26 | C41PGdIoq7wVxOwfW9qXQTOarO6ymFZxOnmHukpjfbcp54xDpcF73Xe6XkvmiESd
27 | gcNMfunAcg8sNgIGJzsKJ50+hw==
28 | -----END PRIVATE KEY-----
29 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/src/iobuf.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | *
3 | * mtdev - Multitouch Protocol Translation Library (MIT license)
4 | *
5 | * Copyright (C) 2010 Henrik Rydberg
6 | * Copyright (C) 2010 Canonical Ltd.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a
9 | * copy of this software and associated documentation files (the "Software"),
10 | * to deal in the Software without restriction, including without limitation
11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 | * and/or sell copies of the Software, and to permit persons to whom the
13 | * Software is furnished to do so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice (including the next
16 | * paragraph) shall be included in all copies or substantial portions of the
17 | * Software.
18 | *
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 | * DEALINGS IN THE SOFTWARE.
26 | *
27 | ****************************************************************************/
28 |
29 | #ifndef MTDEV_IOBUF_H
30 | #define MTDEV_IOBUF_H
31 |
32 | #include "common.h"
33 |
34 | #define EVENT_SIZE sizeof(struct input_event)
35 | #define DIM_BUFFER (DIM_EVENTS * EVENT_SIZE)
36 |
37 | struct mtdev_iobuf {
38 | int head, tail;
39 | char data[DIM_BUFFER];
40 | };
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/frontend/ui/test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Test Test
6 |
7 |
8 |
9 |
57 |
58 |
59 |
60 |
61 |
64 |
65 |
66 |
67 |
68 |
69 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/config.h.in:
--------------------------------------------------------------------------------
1 | /* config.h.in. Generated from configure.ac by autoheader. */
2 |
3 | /* Define to 1 if you have the header file. */
4 | #undef HAVE_DLFCN_H
5 |
6 | /* Define to 1 if you have the header file. */
7 | #undef HAVE_INTTYPES_H
8 |
9 | /* Define to 1 if you have the header file. */
10 | #undef HAVE_MEMORY_H
11 |
12 | /* Define to 1 if you have the header file. */
13 | #undef HAVE_STDINT_H
14 |
15 | /* Define to 1 if you have the header file. */
16 | #undef HAVE_STDLIB_H
17 |
18 | /* Define to 1 if you have the header file. */
19 | #undef HAVE_STRINGS_H
20 |
21 | /* Define to 1 if you have the header file. */
22 | #undef HAVE_STRING_H
23 |
24 | /* Define to 1 if you have the header file. */
25 | #undef HAVE_SYS_STAT_H
26 |
27 | /* Define to 1 if you have the header file. */
28 | #undef HAVE_SYS_TYPES_H
29 |
30 | /* Define to 1 if you have the header file. */
31 | #undef HAVE_UNISTD_H
32 |
33 | /* Define to the sub-directory in which libtool stores uninstalled libraries.
34 | */
35 | #undef LT_OBJDIR
36 |
37 | /* Name of package */
38 | #undef PACKAGE
39 |
40 | /* Define to the address where bug reports for this package should be sent. */
41 | #undef PACKAGE_BUGREPORT
42 |
43 | /* Define to the full name of this package. */
44 | #undef PACKAGE_NAME
45 |
46 | /* Define to the full name and version of this package. */
47 | #undef PACKAGE_STRING
48 |
49 | /* Define to the one symbol short name of this package. */
50 | #undef PACKAGE_TARNAME
51 |
52 | /* Define to the home page for this package. */
53 | #undef PACKAGE_URL
54 |
55 | /* Define to the version of this package. */
56 | #undef PACKAGE_VERSION
57 |
58 | /* Define to 1 if you have the ANSI C header files. */
59 | #undef STDC_HEADERS
60 |
61 | /* Version number of package */
62 | #undef VERSION
63 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/ar.js:
--------------------------------------------------------------------------------
1 | Keyboards.ar = {
2 | label: 'Arabic',
3 | shortLabel: 'Ar',
4 | menuLabel: 'العربية',
5 | secondLayout: true,
6 | specificCssRule: true,
7 | types: ['text', 'url', 'email'],
8 | alternateLayoutKey: '123',
9 | basicLayoutKey: 'أ ب ج',
10 | width: 11,
11 | lang: 'ar',
12 | alt : {
13 | 'غ': 'إ آ',
14 | 'ا': 'أ ء',
15 | 'ى': 'ئ',
16 | 'و': 'ؤ',
17 | 'ط': 'ظ'
18 | },
19 | keys: [
20 | [
21 | { value: 'ض' }, { value: 'ص' }, { value: 'ث' }, { value: 'ق' },
22 | { value: 'ف' }, { value: 'غ' } , { value: 'ع' }, { value: 'ه' },
23 | { value: 'خ' }, { value: 'ح' }, { value: 'ج' }
24 | ], [
25 | { value: 'ش' }, { value: 'س' }, { value: 'ي' }, { value: 'ب' },
26 | { value: 'ل' } , { value: 'ا' }, { value: 'ت' }, { value: 'ن' },
27 | { value: 'م' }, { value: 'ك' }
28 | ], [
29 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
30 | { value: 'ذ' }, { value: 'د' }, { value: 'ر' }, { value: 'ى' },
31 | { value: 'ة' }, { value: 'و' }, { value: 'ز' }, { value: 'ط' },
32 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
33 | ], [
34 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
35 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
36 | ]
37 | ],
38 | upperCase: {
39 | ض: 'َ',
40 | ص: 'ً',
41 | ث: 'ُ',
42 | ق: 'ٌ',
43 | ف: 'ْ',
44 | غ: 'ّ',
45 | ع: 'ِ',
46 | ه: 'ٍ',
47 | خ: '’',
48 | ح: ',',
49 | ج: '؛',
50 | ش: '\\',
51 | س: ']',
52 | ي: '[',
53 | ب: 'ـ',
54 | ل: 'إ',
55 | ا: 'أ',
56 | ت: 'آ',
57 | ن: '،',
58 | م: '/',
59 | ك: ':',
60 | ة: '\"',
61 | ء: 'ئ',
62 | ظ: 'ؤ',
63 | ط: '؟',
64 | ذ: '=',
65 | د: '-',
66 | ز: '×',
67 | ر: '÷',
68 | و: '+'
69 | },
70 | textLayoutOverwrite: {
71 | ',': '،'
72 | }
73 | };
74 |
--------------------------------------------------------------------------------
/frontend/ui/system/css/lockscreen.css:
--------------------------------------------------------------------------------
1 | lock-screen {
2 | width: 100%;
3 | height: 100%;
4 | position: absolute;
5 | top: 0;
6 | background-image: url(../assets/wallpapers/lock.jpg);
7 | /* background-color: rgb(48, 48, 48); */
8 |
9 | color: beige;
10 | text-shadow: 1px 1px 2px black;
11 |
12 | display: flex;
13 | flex-direction: column;
14 | align-items: center;
15 | justify-content: center;
16 |
17 | z-index: 100000;
18 |
19 | /* transition: transform 0.5s; */
20 |
21 | font-family: "fira mono", monospace;
22 | }
23 |
24 | lock-screen div.filler {
25 | flex: 1;
26 | height: 250px;
27 | }
28 |
29 | lock-screen div.lock-keyboard {
30 | flex: 1;
31 | display: flex;
32 | flex-direction: column;
33 | align-items: center;
34 | justify-content: center;
35 | font-size: 96px;
36 | background-color: rgba(0, 0, 0, 0.20);
37 | padding: 0.5em;
38 | }
39 |
40 | .lock-row {
41 | border-top: 5px solid lightgray;
42 | }
43 |
44 | .lock-row span {
45 | padding: 0.1em;
46 | transition: background-color 0.1s;
47 | }
48 |
49 | .lock-row span:not(:last-child) {
50 | border-right: 5px solid lightgray;
51 | }
52 |
53 | .lock-row span.active {
54 | background-color: rgba(255, 255, 255, 0.5);
55 | }
56 |
57 | lock-screen div.lock-keyboard div.lock-row {
58 | flex: 1;
59 | display: flex;
60 | }
61 |
62 | lock-screen div.lock-keyboard div.lock-row span {
63 | flex: 1;
64 | text-align: center;
65 | }
66 |
67 | lock-screen div.lock-keyboard div.lock-row span.flex2 {
68 | flex: 2;
69 | border-right: none;
70 | }
71 |
72 | lock-screen div.lock-keyboard div.lock-row span.keyboard {
73 | font-family: "keyboard symbols";
74 | }
75 |
76 | lock-screen.offscreen {
77 | transform: translateX(100%);
78 | /* transition: transform 0.5s; */
79 | }
80 |
81 | lock-screen.error div.lock-keyboard div.lock-row span.flex2 {
82 | background-color: rgba(255, 0, 0, 0.5);
83 | transition: background-color 0.5s;
84 | }
85 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/keyboard/upper_case_state_manager.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | (function(exports) {
4 |
5 | var UpperCaseStateManager = function() {
6 | this.isUpperCase = undefined;
7 | this.isUpperCaseLocked = undefined;
8 | };
9 |
10 | UpperCaseStateManager.prototype.onstatechange = null;
11 |
12 | UpperCaseStateManager.prototype.start =
13 | UpperCaseStateManager.prototype.reset = function() {
14 | this.isUpperCase = false;
15 | this.isUpperCaseLocked = false;
16 | };
17 |
18 | UpperCaseStateManager.prototype.stop = function() {
19 | this.isUpperCase = undefined;
20 | this.isUpperCaseLocked = undefined;
21 | };
22 |
23 | UpperCaseStateManager.prototype.switchUpperCaseState = function(state) {
24 | if (!state) {
25 | return;
26 | }
27 |
28 | // User can switch the two states independently, and the one unspecified
29 | // will be kept with the original state.
30 | var newIsUpperCase = (typeof state.isUpperCase === 'boolean') ?
31 | state.isUpperCase : this.isUpperCase;
32 | var newIsUpperCaseLocked = (typeof state.isUpperCaseLocked === 'boolean') ?
33 | state.isUpperCaseLocked : this.isUpperCaseLocked;
34 |
35 | // It doesn't really make any sense to set isUpperCase to false but
36 | // change/keep isUpperCaseLocked to true.
37 | // This also means isUpperCaseLocked can overwrite isUpperCase changes,
38 | // and literally keep the caps "lock".
39 | if (newIsUpperCaseLocked) {
40 | newIsUpperCase = true;
41 | }
42 |
43 | var statechanged = (this.isUpperCase !== newIsUpperCase) ||
44 | (this.isUpperCaseLocked !== newIsUpperCaseLocked);
45 |
46 | // Don't do anything if the state is unchanged.
47 | if (!statechanged) {
48 | return;
49 | }
50 |
51 | // Set the new states.
52 | this.isUpperCase = newIsUpperCase;
53 | this.isUpperCaseLocked = newIsUpperCaseLocked;
54 |
55 | // Call onstatechange callback.
56 | if (typeof this.onstatechange === 'function') {
57 | this.onstatechange();
58 | }
59 | };
60 |
61 | exports.UpperCaseStateManager = UpperCaseStateManager;
62 |
63 | })(window);
64 |
--------------------------------------------------------------------------------
/platform/shared/resources/ahem/COPYING:
--------------------------------------------------------------------------------
1 | The Ahem font in this directory belongs to the public domain. In
2 | jurisdictions that do not recognize public domain ownership of these
3 | files, the following Creative Commons Zero declaration applies:
4 |
5 |
6 |
7 | which is quoted below:
8 |
9 | The person who has associated a work with this document (the "Work")
10 | affirms that he or she (the "Affirmer") is the/an author or owner of
11 | the Work. The Work may be any work of authorship, including a
12 | database.
13 |
14 | The Affirmer hereby fully, permanently and irrevocably waives and
15 | relinquishes all of her or his copyright and related or neighboring
16 | legal rights in the Work available under any federal or state law,
17 | treaty or contract, including but not limited to moral rights,
18 | publicity and privacy rights, rights protecting against unfair
19 | competition and any rights protecting the extraction, dissemination
20 | and reuse of data, whether such rights are present or future, vested
21 | or contingent (the "Waiver"). The Affirmer makes the Waiver for the
22 | benefit of the public at large and to the detriment of the Affirmer's
23 | heirs or successors.
24 |
25 | The Affirmer understands and intends that the Waiver has the effect
26 | of eliminating and entirely removing from the Affirmer's control all
27 | the copyright and related or neighboring legal rights previously held
28 | by the Affirmer in the Work, to that extent making the Work freely
29 | available to the public for any and all uses and purposes without
30 | restriction of any kind, including commercial use and uses in media
31 | and formats or by methods that have not yet been invented or
32 | conceived. Should the Waiver for any reason be judged legally
33 | ineffective in any jurisdiction, the Affirmer hereby grants a free,
34 | full, permanent, irrevocable, nonexclusive and worldwide license for
35 | all her or his copyright and related or neighboring legal rights in
36 | the Work.
37 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/src/match.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | *
3 | * mtdev - Multitouch Protocol Translation Library (MIT license)
4 | *
5 | * Copyright (C) 2010 Henrik Rydberg
6 | * Copyright (C) 2010 Canonical Ltd.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a
9 | * copy of this software and associated documentation files (the "Software"),
10 | * to deal in the Software without restriction, including without limitation
11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 | * and/or sell copies of the Software, and to permit persons to whom the
13 | * Software is furnished to do so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice (including the next
16 | * paragraph) shall be included in all copies or substantial portions of the
17 | * Software.
18 | *
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 | * DEALINGS IN THE SOFTWARE.
26 | *
27 | ****************************************************************************/
28 |
29 | #ifndef MATCHER_H
30 | #define MATCHER_H
31 |
32 | /**
33 | * Special implementation of the hungarian algorithm.
34 | * The maximum number of fingers matches a uint32.
35 | * Bitmasks are used extensively.
36 | */
37 |
38 | #include "common.h"
39 |
40 | void mtdev_match(int index[DIM_FINGER], int A[DIM2_FINGER],
41 | int nrow, int ncol);
42 |
43 | struct trk_coord {
44 | int x;
45 | int y;
46 | };
47 |
48 | const unsigned char *mtdev_match_four(const struct trk_coord *old, int nslot,
49 | const struct trk_coord *pos, int npos);
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/config.h:
--------------------------------------------------------------------------------
1 | /* config.h. Generated from config.h.in by configure. */
2 | /* config.h.in. Generated from configure.ac by autoheader. */
3 |
4 | /* Define to 1 if you have the header file. */
5 | #define HAVE_DLFCN_H 1
6 |
7 | /* Define to 1 if you have the header file. */
8 | #define HAVE_INTTYPES_H 1
9 |
10 | /* Define to 1 if you have the header file. */
11 | #define HAVE_MEMORY_H 1
12 |
13 | /* Define to 1 if you have the header file. */
14 | #define HAVE_STDINT_H 1
15 |
16 | /* Define to 1 if you have the header file. */
17 | #define HAVE_STDLIB_H 1
18 |
19 | /* Define to 1 if you have the header file. */
20 | #define HAVE_STRINGS_H 1
21 |
22 | /* Define to 1 if you have the header file. */
23 | #define HAVE_STRING_H 1
24 |
25 | /* Define to 1 if you have the header file. */
26 | #define HAVE_SYS_STAT_H 1
27 |
28 | /* Define to 1 if you have the header file. */
29 | #define HAVE_SYS_TYPES_H 1
30 |
31 | /* Define to 1 if you have the header file. */
32 | #define HAVE_UNISTD_H 1
33 |
34 | /* Define to the sub-directory in which libtool stores uninstalled libraries.
35 | */
36 | #define LT_OBJDIR ".libs/"
37 |
38 | /* Name of package */
39 | #define PACKAGE "mtdev"
40 |
41 | /* Define to the address where bug reports for this package should be sent. */
42 | #define PACKAGE_BUGREPORT ""
43 |
44 | /* Define to the full name of this package. */
45 | #define PACKAGE_NAME "Multitouch Protocol Translation Library"
46 |
47 | /* Define to the full name and version of this package. */
48 | #define PACKAGE_STRING "Multitouch Protocol Translation Library 1.1.5"
49 |
50 | /* Define to the one symbol short name of this package. */
51 | #define PACKAGE_TARNAME "mtdev"
52 |
53 | /* Define to the home page for this package. */
54 | #define PACKAGE_URL ""
55 |
56 | /* Define to the version of this package. */
57 | #define PACKAGE_VERSION "1.1.5"
58 |
59 | /* Define to 1 if you have the ANSI C header files. */
60 | #define STDC_HEADERS 1
61 |
62 | /* Version number of package */
63 | #define VERSION "1.1.5"
64 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/keyboard/console.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global console, performance */
4 |
5 | /**
6 | * KeyboardConsole is an incomplete implementation of console so we could
7 | * turn it on and off on build time.
8 | */
9 |
10 | (function (exports) {
11 | var KeyboardConsole = function KeyboardConsole() {
12 | this._timers = null;
13 | };
14 |
15 | KeyboardConsole.prototype.start = function () {
16 | var timers = this._timers = new Map();
17 | timers.set('domLoading', performance.timing.domLoading);
18 |
19 | this._startTime = Date.now();
20 | };
21 |
22 | /**
23 | *
24 | * Log level decides whether or not to print log.
25 | *
26 | * 0 - warn() and error()
27 | * 1 - info()
28 | * 2 - log() and time() and timeEnd()
29 | * 3 - trace()
30 | *
31 | * Note that we want console.warn() and console.error() show up in
32 | * production too so warn() and error() is not implemented here.
33 | *
34 | */
35 | KeyboardConsole.prototype.LOG_LEVEL = 2;
36 |
37 | KeyboardConsole.prototype.trace = function () {
38 | if (this.LOG_LEVEL < 3) {
39 | return;
40 | }
41 |
42 | console.trace.apply(console, arguments);
43 | };
44 |
45 | KeyboardConsole.prototype.time = function (timerName) {
46 | if (this.LOG_LEVEL < 2) {
47 | return;
48 | }
49 |
50 | console.time(timerName);
51 | };
52 |
53 | KeyboardConsole.prototype.timeEnd = function (timerName) {
54 | if (this.LOG_LEVEL < 2) {
55 | return;
56 | }
57 |
58 | if (this._timers.has(timerName)) {
59 | console.log(timerName + ': ' +
60 | (Date.now() - this._timers.get(timerName)) + 'ms');
61 |
62 | return;
63 | }
64 |
65 | console.timeEnd(timerName);
66 | };
67 |
68 | KeyboardConsole.prototype.log = function () {
69 | if (this.LOG_LEVEL < 2) {
70 | return;
71 | }
72 |
73 | console.log.apply(console, arguments);
74 | };
75 |
76 | KeyboardConsole.prototype.info = function () {
77 | if (this.LOG_LEVEL < 1) {
78 | return;
79 | }
80 |
81 | console.info.apply(console, arguments);
82 | };
83 |
84 | exports.KeyboardConsole = KeyboardConsole;
85 |
86 | })(window);
87 |
--------------------------------------------------------------------------------
/platform/glutin/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 |
3 | name = "servo"
4 | version = "0.0.1"
5 | authors = ["The Servo Project Developers"]
6 | license = "MPL-2.0"
7 | build = "build.rs"
8 | publish = false
9 |
10 | [[bin]]
11 | name = "servo"
12 | path = "main.rs"
13 | test = false
14 | bench = false
15 |
16 | [target.'cfg(windows)'.build-dependencies]
17 | winres = "0.1"
18 |
19 | [package.metadata.winres]
20 | FileDescription = "Servo"
21 | LegalCopyright = "© The Servo Project Developers"
22 | OriginalFilename = "servo.exe"
23 | ProductName = "Servo"
24 |
25 | [features]
26 | default = ["unstable", "default-except-unstable"]
27 | default-except-unstable = ["webdriver", "max_log_level"]
28 | max_log_level = ["log/release_max_level_info"]
29 | webdriver = ["libservo/webdriver"]
30 | energy-profiling = ["libservo/energy-profiling"]
31 | debugmozjs = ["libservo/debugmozjs"]
32 | googlevr = ["libservo/googlevr"]
33 | oculusvr = ["libservo/oculusvr"]
34 | unstable = ["libservo/unstable"]
35 |
36 | [dependencies]
37 | actix = "0.7"
38 | api_server = { path = "../../api-server" }
39 | backtrace = "0.3"
40 | bitflags = "1.0"
41 | euclid = "0.18"
42 | gleam = "0.6"
43 | glutin = "0.17"
44 | lazy_static = "1"
45 | libservo = { git = "https://github.com/fabricedesre/servo", branch = "gonk" }
46 | # libservo = { path = "/home/fabrice/dev/servo/components/servo" }
47 | log = "0.4"
48 | tinyfiledialogs = "3.0"
49 | winit = {version = "0.16", features = ["icon_loading"]}
50 |
51 | [target.'cfg(not(target_os = "android"))'.dependencies]
52 | sig = "0.1"
53 |
54 | [target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
55 | osmesa-sys = "0.1.2"
56 |
57 | [target.'cfg(target_os = "linux")'.dependencies]
58 | x11 = "2.0.0"
59 |
60 | [target.'cfg(target_os = "android")'.dependencies]
61 | android_injected_glue = "0.2"
62 | servo-egl = "0.2"
63 |
64 | [target.'cfg(target_os = "windows")'.dependencies]
65 | winapi = "0.2"
66 | user32-sys = "0.2"
67 | gdi32-sys = "0.2"
68 |
69 | [target.'cfg(target_os = "macos")'.dependencies]
70 | osmesa-src = {git = "https://github.com/servo/osmesa-src"}
71 |
72 | [target.x86_64-unknown-linux-gnu.dependencies]
73 | osmesa-src = {git = "https://github.com/servo/osmesa-src"}
74 |
75 | # Configuration for final builds/
76 | [profile.release]
77 | # lto = true
78 | codegen-units = 1
79 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/mtdev-1.1.5/src/evbuf.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | *
3 | * mtdev - Multitouch Protocol Translation Library (MIT license)
4 | *
5 | * Copyright (C) 2010 Henrik Rydberg
6 | * Copyright (C) 2010 Canonical Ltd.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a
9 | * copy of this software and associated documentation files (the "Software"),
10 | * to deal in the Software without restriction, including without limitation
11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 | * and/or sell copies of the Software, and to permit persons to whom the
13 | * Software is furnished to do so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice (including the next
16 | * paragraph) shall be included in all copies or substantial portions of the
17 | * Software.
18 | *
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 | * DEALINGS IN THE SOFTWARE.
26 | *
27 | ****************************************************************************/
28 |
29 | #ifndef MTDEV_EVBUF_H
30 | #define MTDEV_EVBUF_H
31 |
32 | #include "common.h"
33 |
34 | struct mtdev_evbuf {
35 | int head;
36 | int tail;
37 | struct input_event buffer[DIM_EVENTS];
38 | };
39 |
40 | static inline int evbuf_empty(const struct mtdev_evbuf *evbuf)
41 | {
42 | return evbuf->head == evbuf->tail;
43 | }
44 |
45 | static inline void evbuf_put(struct mtdev_evbuf *evbuf,
46 | const struct input_event *ev)
47 | {
48 | evbuf->buffer[evbuf->head++] = *ev;
49 | evbuf->head &= DIM_EVENTS - 1;
50 | }
51 |
52 | static inline void evbuf_get(struct mtdev_evbuf *evbuf,
53 | struct input_event *ev)
54 | {
55 | *ev = evbuf->buffer[evbuf->tail++];
56 | evbuf->tail &= DIM_EVENTS - 1;
57 | }
58 |
59 | #endif
60 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/th.js:
--------------------------------------------------------------------------------
1 | Keyboards.th = {
2 | label: 'Thai',
3 | shortLabel: 'Th',
4 | menuLabel: 'ไทย', /*ไทย*/
5 | basicLayoutKey: 'กขค', /*กขค*/
6 | types: ['text', 'url', 'email'],
7 | lang: 'th',
8 | pages: [ { // default page
9 | width: 11,
10 | secondLayout: true,
11 | alt: {
12 | 'ช': ['๏', '๚', '๛']
13 | },
14 | keys: [
15 | [
16 | { value: 'ๅ' }, { value: 'ฃ' }, { value: 'ภ' }, { value: 'ถ' },
17 | { value: 'ุ' }, { value: 'ึ' }, { value: 'ค' }, { value: 'ต' },
18 | { value: 'จ' }, { value: 'ข' },
19 | { value: 'ช', className: 'alternate-indicator' }
20 | ], [
21 | { value: 'ไ' }, { value: 'ำ' }, { value: 'พ' }, { value: 'ะ' },
22 | { value: 'ั' }, { value: 'ี' }, { value: 'ร' }, { value: 'น' },
23 | { value: 'ย' }, { value: 'บ' }, { value: 'ล' }
24 | ], [
25 | { value: 'ฟ' }, { value: 'ห' }, { value: 'ก' }, { value: 'ด' },
26 | { value: 'เ' }, { value: '้' }, { value: '่' }, { value: 'า' },
27 | { value: 'ส' }, { value: 'ว' }, { value: 'ง' }
28 | ], [
29 | { value: '⇪', keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
30 | { value: 'ป' }, { value: 'แ' }, { value: 'อ' }, { value: 'ิ' },
31 | { value: 'ื' }, { value: 'ท' }, { value: 'ม' },
32 | { value: 'ใ' }, { value: 'ฝ' },
33 | { value: '⌫', keyCode: KeyEvent.DOM_VK_BACK_SPACE }
34 | ], [
35 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
36 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
37 | ]
38 | ],
39 | upperCase: {
40 | 'ๅ': '๑',
41 | 'ฃ': '๒',
42 | 'ภ': '๓',
43 | 'ถ': '๔',
44 | 'ุ': '๕',
45 | 'ึ': 'ู',
46 | 'ค': '๖',
47 | 'ต': '๗',
48 | 'จ': '๘',
49 | 'ข': '๙',
50 | 'ช': '๐',
51 | 'ไ': 'ๆ',
52 | 'ำ': 'ฎ',
53 | 'พ': 'ฑ',
54 | 'ะ': 'ธ',
55 | 'ั': 'ํ',
56 | 'ี': '๊',
57 | 'ร': 'ณ',
58 | 'น': 'ฯ',
59 | 'ย': 'ญ',
60 | 'บ': 'ฐ',
61 | 'ล': 'ฅ',
62 | 'ฟ': 'ฤ',
63 | 'ห': 'ฆ',
64 | 'ก': 'ฏ',
65 | 'ด': 'โ',
66 | 'เ': 'ฌ',
67 | '้': '็',
68 | '่': '๋',
69 | 'า': 'ษ',
70 | 'ส': 'ศ',
71 | 'ว': 'ซ',
72 | 'ง': ',',
73 | 'ป': '฿',
74 | 'แ': 'ผ',
75 | 'อ': 'ฉ',
76 | 'ิ': 'ฮ',
77 | 'ื': 'ฺ',
78 | 'ท': '์',
79 | 'ม': 'ฒ',
80 | 'ใ': 'ฬ',
81 | 'ฝ': 'ฦ'
82 | }
83 | }
84 | ]
85 | };
86 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/src/lib.rs:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | extern crate libc;
6 |
7 | #[allow(non_camel_case_types)]
8 | mod generated;
9 |
10 | use generated::ffi::*;
11 | use libc::{fcntl, F_GETFL, F_SETFL, O_NONBLOCK};
12 | use std::os::raw::c_int;
13 | use std::os::unix::io::RawFd;
14 | use std::ptr::null_mut;
15 |
16 | pub use generated::ffi::input_event;
17 |
18 | /// Safe wrapper around a mtdev
19 |
20 | const ABS_MT_POSITION_X: i32 = 0x35;
21 | const ABS_MT_POSITION_Y: i32 = 0x36;
22 |
23 | pub struct MtDev {
24 | mtdev: *mut mtdev,
25 | fd: RawFd,
26 | }
27 |
28 | impl MtDev {
29 | /// Creates a new mtdev manager if possible.
30 | pub fn new(fd: RawFd) -> Option {
31 | let dev = unsafe {
32 | // Set the fd to non blocking mode so that mtdev will not
33 | // block on the full event buffer.
34 | let flags = fcntl(fd, F_GETFL, 0);
35 | fcntl(fd, F_SETFL, flags | O_NONBLOCK);
36 |
37 | mtdev_new_open(fd)
38 | };
39 | if dev != null_mut() {
40 | return Some(MtDev { mtdev: dev, fd });
41 | }
42 | None
43 | }
44 |
45 | /// Returns events if they are available.
46 | pub fn get_events(&mut self) -> Result, ()> {
47 | let mut events: [input_event; 16] = unsafe { ::std::mem::zeroed() };
48 | let res = unsafe { mtdev_get(self.mtdev, self.fd, events.as_mut_ptr(), 16) };
49 | if res < 0 {
50 | Err(())
51 | } else {
52 | Ok(events[0..(res as usize)].to_vec())
53 | }
54 | }
55 |
56 | /// Returns the (xmin, ymin) abs_info if available.
57 | pub fn xmin_ymin(&self) -> Option<(c_int, c_int)> {
58 | unsafe {
59 | if mtdev_has_mt_event(self.mtdev, ABS_MT_POSITION_X) == 0
60 | || mtdev_has_mt_event(self.mtdev, ABS_MT_POSITION_Y) == 0
61 | {
62 | None
63 | } else {
64 | Some((
65 | mtdev_get_abs_minimum(self.mtdev, ABS_MT_POSITION_X),
66 | mtdev_get_abs_minimum(self.mtdev, ABS_MT_POSITION_Y),
67 | ))
68 | }
69 | }
70 | }
71 | }
72 |
73 | impl Drop for MtDev {
74 | fn drop(&mut self) {
75 | unsafe {
76 | mtdev_close_delete(self.mtdev);
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/settings/layout_dictionary_list.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global PromiseStorage, LayoutDictionary */
4 |
5 | (function(exports) {
6 |
7 | var LayoutDictionaryList = function LayoutDictionaryList(layoutList) {
8 | this.dbStore = null;
9 | this.dictionaries = null;
10 | };
11 |
12 | LayoutDictionaryList.prototype.DATABASE_NAME = 'imEngineData';
13 |
14 | LayoutDictionaryList.prototype.start = function() {
15 | this.dictionaries = new Map();
16 |
17 | this.dbStore = new PromiseStorage(this.DATABASE_NAME);
18 | this.dbStore.start();
19 | };
20 |
21 | LayoutDictionaryList.prototype.stop = function() {
22 | this.dictionaries.forEach(function(dict) {
23 | dict.stop();
24 | });
25 |
26 | this.dictionaries = null;
27 |
28 | this.dbStore.stop();
29 | this.dbStore = null;
30 | };
31 |
32 | LayoutDictionaryList.prototype.getDictionary =
33 | function (imEngineId, dictFilePath) {
34 | var databaseId = imEngineId + '/' + dictFilePath;
35 | return this.dictionaries.get(databaseId);
36 | };
37 |
38 | LayoutDictionaryList.prototype.createDictionariesFromLayouts =
39 | function createDictionariesFromLayouts(layouts) {
40 | var dictsMap = this._getDictsMapFromLayouts(layouts);
41 |
42 | dictsMap.forEach(function(dict, databaseId) {
43 | var layoutDict = new LayoutDictionary(this, dict);
44 | layoutDict.start();
45 | this.dictionaries.set(databaseId, layoutDict);
46 | }, this);
47 | };
48 |
49 | LayoutDictionaryList.prototype._getDictsMapFromLayouts = function(layouts) {
50 | var dictsMap = new Map();
51 |
52 | layouts.forEach(function(layout) {
53 | if (!layout.dictFilename) {
54 | return;
55 | }
56 |
57 | var dict;
58 | var databaseId = layout.imEngineId + '/' + layout.dictFilePath;
59 |
60 | if (dictsMap.has(databaseId)) {
61 | if (layout.installed) {
62 | dict = dictsMap.get(databaseId);
63 | dict.installedLayoutIds.add(layout.id);
64 | }
65 |
66 | return;
67 | }
68 |
69 | dict = {
70 | imEngineId: layout.imEngineId,
71 | filename: layout.dictFilename,
72 | filePath: layout.dictFilePath,
73 | fileSize: layout.dictFileSize,
74 | databaseId: databaseId,
75 | preloaded: layout.preloaded,
76 | installedLayoutIds: new Set()
77 | };
78 |
79 | if (layout.installed) {
80 | dict.installedLayoutIds.add(layout.id);
81 | }
82 |
83 | dictsMap.set(databaseId, dict);
84 | });
85 |
86 | return dictsMap;
87 | };
88 |
89 | exports.LayoutDictionaryList = LayoutDictionaryList;
90 |
91 | }(window));
92 |
--------------------------------------------------------------------------------
/platform/shared/resources/gatt_blocklist.txt:
--------------------------------------------------------------------------------
1 | # Source:
2 | # https://github.com/WebBluetoothCG/registries/blob/master/gatt_blocklist.txt
3 | # License:
4 | # https://github.com/WebBluetoothCG/registries/blob/master/LICENSE
5 |
6 | # This file holds a list of GATT UUIDs that websites using the Web
7 | # Bluetooth API are forbidden from accessing.
8 |
9 | ## Services
10 |
11 | # org.bluetooth.service.human_interface_device
12 | # Direct access to HID devices like keyboards would let web pages
13 | # become keyloggers.
14 | 00001812-0000-1000-8000-00805f9b34fb
15 |
16 | # Firmware update services that don't check the update's signature
17 | # present a risk of devices' software being modified by malicious web
18 | # pages. Users may connect to a device believing they are enabling
19 | # only simple interaction or that they're interacting with the
20 | # device's manufacturer, but the site might instead persistently
21 | # compromise the device.
22 | #
23 | # Nordic's Device Firmware Update service, http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/examples_ble_dfu.html:
24 | 00001530-1212-efde-1523-785feabcd123
25 | # TI's Over-the-Air Download service, http://www.ti.com/lit/ug/swru271g/swru271g.pdf:
26 | f000ffc0-0451-4000-b000-000000000000
27 |
28 |
29 | ## Characteristics
30 |
31 | # org.bluetooth.characteristic.gap.peripheral_privacy_flag
32 | # Don't let web pages turn off privacy mode.
33 | 00002a02-0000-1000-8000-00805f9b34fb exclude-writes
34 |
35 | # org.bluetooth.characteristic.gap.reconnection_address
36 | # Disallow messing with connection parameters
37 | 00002a03-0000-1000-8000-00805f9b34fb
38 |
39 | # org.bluetooth.characteristic.serial_number_string
40 | # Block access to standardized unique identifiers, for privacy reasons.
41 | 00002a25-0000-1000-8000-00805f9b34fb
42 |
43 | # Blocklisted characteristic used to test readValue function.
44 | bad1c9a2-9a5b-4015-8b60-1579bbbf2135 exclude-reads
45 |
46 |
47 | ## Descriptors
48 |
49 | # org.bluetooth.descriptor.gatt.client_characteristic_configuration
50 | # Writing to this would let a web page interfere with other pages'
51 | # notifications and indications.
52 | 00002902-0000-1000-8000-00805f9b34fb exclude-writes
53 |
54 | # org.bluetooth.descriptor.gatt.server_characteristic_configuration
55 | # Writing to this would let a web page interfere with the broadcasted services.
56 | 00002903-0000-1000-8000-00805f9b34fb exclude-writes
57 |
58 | # Blocklisted descriptor used to test.
59 | 07711111-6104-0970-7011-1107105110aa
60 |
61 | # Blocklisted descriptor used to test.
62 | aaaaaaaa-aaaa-1181-0510-810819516110 exclude-reads
63 |
--------------------------------------------------------------------------------
/platform/gonk/mtdev/build.rs:
--------------------------------------------------------------------------------
1 | extern crate cc;
2 |
3 | use std::fs::{self, DirBuilder, File};
4 | use std::io::Write;
5 | use std::path::Path;
6 | use std::env;
7 |
8 | // Location of the C library
9 | static C_LIBRARY_DIR: &'static str = "mtdev-1.1.5";
10 |
11 | // TODO: unwrap less.
12 | fn generate_mod(dir: &str) {
13 | // Look for all the *.rs file and subdirectories in this directory
14 | // and add them to the local mod.rs
15 | let path = Path::new(dir);
16 | if !path.is_dir() {
17 | return;
18 | }
19 | let mut items = vec![];
20 |
21 | for entry in fs::read_dir(dir).unwrap() {
22 | let entry = entry.unwrap();
23 | let path = entry.path();
24 | if path.is_dir() {
25 | if let Some(p) = path.file_name() {
26 | items.push(p.to_str().unwrap().to_owned());
27 | }
28 | }
29 |
30 | if let Some(ext) = path.extension() {
31 | if ext == "rs" && !path.ends_with("mod.rs") {
32 | if let Some(p) = path.file_stem() {
33 | items.push(p.to_str().unwrap().to_owned());
34 | }
35 | }
36 | }
37 | }
38 |
39 | let mut mod_file = File::create(path.join("mod.rs")).unwrap();
40 | for item in items {
41 | mod_file
42 | .write_fmt(format_args!("#[macro_use] pub mod {};\n", item))
43 | .unwrap();
44 | }
45 | }
46 |
47 | fn main() {
48 | let library_dir = format!(
49 | "{}/{}",
50 | env::var("CARGO_MANIFEST_DIR").unwrap(),
51 | C_LIBRARY_DIR
52 | );
53 | let build_dir = format!("{}", env::var("OUT_DIR").unwrap());
54 |
55 | // Run C library build script
56 | let status = std::process::Command::new("./build.sh")
57 | .env("C_LIBRARY_DIR", library_dir)
58 | .env("C_BUILD_DIR", build_dir.clone())
59 | .status()
60 | .unwrap();
61 | assert!(
62 | status.code().unwrap() == 0,
63 | "Build script \"./build.sh\" exited with non-zero exit status!"
64 | );
65 |
66 | // Expose built library to cargo
67 | println!("cargo:rustc-link-lib=static=mtdev");
68 | println!("cargo:rustc-link-search=native={}/lib", build_dir);
69 |
70 | // Generate the ffi
71 | let status = std::process::Command::new("./bindgen.sh").status().unwrap();
72 | assert!(
73 | status.code().unwrap() == 0,
74 | "Build script \"./bindgen.sh\" exited with non-zero exit status!"
75 | );
76 |
77 | let _ = DirBuilder::new().recursive(true).create("src/generated");
78 |
79 | generate_mod("src/generated");
80 |
81 | println!("cargo:rerun-if-changed=bindgen.sh");
82 | }
83 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Servonk
2 |
3 | This is an experimental project, aiming at providing a web based environment for phones and other devices. The main goals are to:
4 | - Build an alternative to current dominant mobile OSes and browsers.
5 | - Encourage contributions to [Servo](https://servo.org) outside of the mandate of its corporate backers.
6 | - Scratch an itch and have fun.
7 |
8 | It currently runs on Gonk based devices and on desktop platforms (tested on Linux only so far, let me know if you get it to run on Windows or Mac). Another potential target will be the [Librem 5 from Purism](https://puri.sm/shop/librem-5/). For more information on target devices and platforms see [this page](/docs/target-devices-and-platforms.md).
9 |
10 | It is in very early stages and not really usable yet. There is an incomplete [todo list](todo.md) if you want to help!
11 |
12 | You can check the [build tutorial](/docs/build-tutorial.md) for a detailed explanation of how to build and run B2G/Servonk.
13 |
14 | ## Dependencies
15 |
16 | Since we depend on Servo, first check that you have everything set up [as explained](https://github.com/servo/servo/blob/master/README.md#setting-up-your-environment).
17 |
18 | You need to do a [b2g](https://github.com/mozilla-b2g/B2G) build for your device (eng or userdebug to get root access), as this is not properly setup with the Android build system yet. It is only necessary to build gonk, not gecko or gaia. A simple way to remove these from the build after running ./config.sh is to edit b2g.mk in gonk-misc repository and comment out the gecko and gaia lines, as shown in this git diff: https://pastebin.com/sdQG3Tki
19 |
20 | Also:
21 | - sudo apt install llvm-dev libclang-dev and clang (Ubuntu 18.04).
22 |
23 | ## Building
24 |
25 | 1) First, install [rustup](https://rustup.rs/).
26 | 2) Git clone this repository.
27 | 3) cd to the 'servonk' directory.
28 | 4) Then run `./bootstrap.sh` to install the Rust toolchain.
29 | 5) For Gonk builds only: configure the build by setting the `GONK_DIR` environment variable to the path of your b2g repository, and the `GONK_PRODUCT_NAME` to the Android product name (eg. "aries" for a Sony Z3C).
30 | 6) You can then build for the platform of your choice by running:
31 | `./servonk build gonk --release` for a Gonk build, or `./servonk build glutin --release` for a desktop version.
32 |
33 | ## Running
34 |
35 | On desktop, just run `./servonk run glutin`. On Gonk, you first need to flash your device with B2G before running:
36 | 1. `./servonk flash gonk`
37 | 2. `./servonk run gonk`
38 |
39 | The lockscreen code is 4242.
40 |
41 | ## Supported devices
42 |
43 | - The L port of the Sony Z3C and Nexus 5 are currently the only tested and working devices.
44 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/sr-Latn.js:
--------------------------------------------------------------------------------
1 | Keyboards['sr-Latn'] = {
2 | label: 'Serbian (Latin)',
3 | shortLabel: 'Sr',
4 | menuLabel: 'Srpski',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'sr-Latn',
8 | lang: 'sr-Latn',
9 | alt: {
10 | c: 'čć',
11 | d: 'đ',
12 | s: 'š',
13 | z: 'ž',
14 | '.': ',?!;:…'
15 | },
16 | keys: [
17 | [
18 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
19 | { value: 't' }, { value: 'y' }, { value: 'u' } , { value: 'i' },
20 | { value: 'o' }, { value: 'p' }
21 | ], [
22 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
23 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
24 | { value: 'l' }, { value: '"' }
25 | ], [
26 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
27 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
28 | { value: 'b' }, { value: 'n' }, { value: 'm' },
29 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
30 | ], [
31 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
32 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
33 | ]
34 | ],
35 | pages: [undefined, {
36 | alt: {
37 | '0': ['º'],
38 | '$': [ '€', '£', '¢', '¥'],
39 | '"': ['“', '”'],
40 | '\'':['‘', '’'],
41 | '?': ['¿'],
42 | '!': ['¡'],
43 | '+': ['-', '×', '÷', '±']
44 | },
45 | // These are based on the en layout.
46 | keys: [
47 | [
48 | { value: '1' }, { value: '2' }, { value: '3' }, { value: '4' },
49 | { value: '5' }, { value: '6' }, { value: '7' }, { value: '8' },
50 | { value: '9' }, { value: '0' }
51 | ], [
52 | { value: '@' }, { value: '#' },
53 | { value: '$', className: 'alternate-indicator' }, { value: '&' },
54 | { value: '*' }, { value: '-' }, { value: '_' }, { value: '/' },
55 | { value: '(' }, { value: ')' }
56 | ], [
57 | { value: 'Alt', ratio: 1.5,
58 | keyCode: KeyboardEvent.DOM_VK_ALT,
59 | className: 'page-switch-key',
60 | targetPage: 2
61 | },
62 | { value: '+',
63 | supportsSwitching: {
64 | value: ','
65 | }
66 | }, { value: ':' }, { value: ';' }, { value: '"' },
67 | { value: '\'' }, { value: '!' }, { value: '?' },
68 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
69 | ], [
70 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
71 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
72 | ]
73 | ]
74 | } ]
75 | };
76 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/ro.js:
--------------------------------------------------------------------------------
1 | Keyboards.ro = {
2 | label: 'Romanian',
3 | shortLabel: 'Ro',
4 | menuLabel: 'Română',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'ro',
8 | lang: 'ro',
9 | alt: {
10 | a: 'ăâ',
11 | d: 'đ',
12 | e: '€',
13 | i: 'î',
14 | l: 'ł',
15 | s: 'ș',
16 | t: 'ț',
17 | '.': ',?!;:…'
18 | },
19 | keys: [
20 | [
21 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
22 | { value: 't' }, { value: 'y' }, { value: 'u' } , { value: 'i' },
23 | { value: 'o' }, { value: 'p' }
24 | ], [
25 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
26 | { value: 'g' }, { value: 'h' }, { value: 'j' }, { value: 'k' },
27 | { value: 'l' }
28 | ], [
29 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
30 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
31 | { value: 'b' }, { value: 'n' }, { value: 'm' },
32 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
33 | ], [
34 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
35 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
36 | ]
37 | ],
38 | pages: [undefined, {
39 | alt: {
40 | '0': 'º',
41 | '$': [ '€', '£', '¢', '¥'],
42 | '"': ['„', '“', '”'],
43 | '\'':['‘', '’'],
44 | '?': ['¿'],
45 | '!': ['¡'],
46 | '+': ['-', '×', '÷', '±']
47 | },
48 | // These are based on the en layout.
49 | keys: [
50 | [
51 | { value: '1' }, { value: '2' }, { value: '3' }, { value: '4' },
52 | { value: '5' }, { value: '6' }, { value: '7' }, { value: '8' },
53 | { value: '9' }, { value: '0' }
54 | ], [
55 | { value: '@' }, { value: '#' },
56 | { value: '$', className: 'alternate-indicator' }, { value: '&' },
57 | { value: '*' }, { value: '-' }, { value: '_' }, { value: '/' },
58 | { value: '(' }, { value: ')' }
59 | ], [
60 | { value: 'Alt', ratio: 1.5,
61 | keyCode: KeyboardEvent.DOM_VK_ALT,
62 | className: 'page-switch-key',
63 | targetPage: 2
64 | },
65 | { value: '+',
66 | supportsSwitching: {
67 | value: ','
68 | }
69 | }, { value: ':' }, { value: ';' }, { value: '"' },
70 | { value: '\'' }, { value: '!' }, { value: '?' },
71 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
72 | ], [
73 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
74 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
75 | ]
76 | ]
77 | } ]
78 | };
79 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/settings/keyboard_settings_app.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global SettingsPromiseManager, CloseLockManager, DialogController,
4 | MozActivity, PanelController, PromiseStorage */
5 |
6 | (function(exports) {
7 |
8 | var KeyboardSettingsApp = function KeyboardSettingsApp() {
9 | this.closeLockManager = null;
10 |
11 | this.settingsPromiseManager = null;
12 | this.preferencesStore = null;
13 |
14 | this.panelController = null;
15 | this.dialogController = null;
16 |
17 | this._closeLock = null;
18 | };
19 |
20 | KeyboardSettingsApp.prototype.PREFERENCES_STORE_NAME = 'preferences';
21 |
22 | KeyboardSettingsApp.prototype.start = function() {
23 | this.closeLockManager = new CloseLockManager();
24 | this.closeLockManager.onclose = this.close.bind(this);
25 | this.closeLockManager.start();
26 |
27 | // SettingsPromiseManager wraps Settings DB methods into promises.
28 | // This must be available to *GroupView.
29 | this.settingsPromiseManager = new SettingsPromiseManager();
30 |
31 | // This is where we store keyboard specific preferences
32 | this.preferencesStore = new PromiseStorage(this.PREFERENCES_STORE_NAME);
33 | this.preferencesStore.start();
34 |
35 | this.panelController = new PanelController(this);
36 | this.panelController.start();
37 |
38 | this.dialogController = new DialogController();
39 | this.dialogController.start();
40 |
41 | document.addEventListener('visibilitychange', this);
42 | };
43 |
44 | KeyboardSettingsApp.prototype.stop = function() {
45 | this.closeLockManager.stop();
46 | this.closeLockManager = null;
47 |
48 | this.settingsPromiseManager = null;
49 |
50 | this.preferencesStore.stop();
51 | this.preferencesStore = null;
52 |
53 | this.panelController.stop();
54 | this.panelController = null;
55 |
56 | this.dialogController.stop();
57 | this.dialogController = null;
58 |
59 | document.removeEventListener('visibilitychange', this);
60 | };
61 |
62 | KeyboardSettingsApp.prototype.close = function() {
63 | this.stop();
64 | window.close();
65 | };
66 |
67 | KeyboardSettingsApp.prototype.requestClose = function() {
68 | // Until Haida lands this is how users could go back to Settings app
69 | Promise.resolve(new MozActivity({
70 | name: 'moz_configure_window',
71 | data: { target: 'device' }
72 | })).catch(function(e) {
73 | console.error(e);
74 | });
75 | };
76 |
77 | KeyboardSettingsApp.prototype.handleEvent = function(evt) {
78 | if (document.hidden) {
79 | this._closeLock =
80 | this.closeLockManager.requestLock('requestClose');
81 | } else if (this._closeLock) {
82 | this._closeLock.unlock();
83 | this._closeLock = null;
84 | }
85 | };
86 |
87 | exports.KeyboardSettingsApp = KeyboardSettingsApp;
88 |
89 | })(window);
90 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/views/view_utils.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | (function(exports) {
4 |
5 | var ViewUtils = {
6 | };
7 |
8 | var scaleContext;
9 |
10 | ViewUtils.getScale = function(text, textWidth) {
11 | if (!scaleContext) {
12 | scaleContext = document.createElement('canvas')
13 | .getContext('2d', { willReadFrequently: true });
14 | scaleContext.font = '2rem sans-serif';
15 | }
16 |
17 | var elementWidth = scaleContext.measureText(text).width;
18 |
19 | var s = textWidth / elementWidth;
20 | if (s >= 1) {
21 | return 1; // 10pt font "Body Large"
22 | }
23 |
24 | if (s >= 0.8) {
25 | return 0.8; // 8pt font "Body"
26 | }
27 |
28 | if (s >= 0.7) {
29 | return 0.7; // 7pt font "Body Medium"
30 | }
31 |
32 | if (s >= 0.65) {
33 | return 0.65; // 6.5pt font "Body Small"
34 | }
35 |
36 | if (s >= 0.6) {
37 | return 0.6; // 6pt font "Body Mini"
38 | }
39 |
40 | return s; // Something smaller than 6pt.
41 | };
42 |
43 | // Put the text in a span and make it fit in the container
44 | ViewUtils.fitText = function(container, text, length, totalWidth) {
45 | container.textContent = '';
46 | if (!text) {
47 | return null;
48 | }
49 |
50 | var span = document.createElement('span');
51 | span.textContent = text;
52 | container.appendChild(span);
53 |
54 | var limit = 0.6; // Dont use a scale smaller than this
55 |
56 | // container width is window width - 36 (for the dismiss button) and then
57 | // depending on the number of suggestions there are.
58 | var textWidth = (totalWidth - 36) / length | 0;
59 | textWidth -= 6; // 6 pixels margin on both sides
60 | var scale = ViewUtils.getScale(text, textWidth);
61 |
62 | // If the text does not fit within the scaling limit,
63 | // reduce the length of the text by replacing characters in
64 | // the middle with ...
65 | if (scale < limit) {
66 | var charactersReplaced = text.length % 2;
67 | while (scale < limit && charactersReplaced < text.length - 2) {
68 | charactersReplaced += 2;
69 | var halflen = (text.length - charactersReplaced) / 2;
70 | span.textContent = text.substring(0, halflen) +
71 | '…' +
72 | text.substring(text.length - halflen);
73 | scale = ViewUtils.getScale(text, textWidth);
74 | }
75 | }
76 |
77 | // The scaling and centering we do only works if the span
78 | // is display:block or inline-block
79 | span.style.display = 'inline-block';
80 | if (scale < 1) {
81 | span.style.width = (100 / scale) + '%';
82 | span.style.transformOrigin = 'left';
83 | span.style.transform = 'scale(' + scale + ')';
84 | } else {
85 | span.style.width = '100%';
86 | }
87 |
88 | return span;
89 | };
90 |
91 | exports.ViewUtils = ViewUtils;
92 |
93 | }(window));
94 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/lt.js:
--------------------------------------------------------------------------------
1 | Keyboards.lt = {
2 | label: 'Lithuanian',
3 | shortLabel: 'Lt',
4 | menuLabel: 'Lietuvių',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'lt',
8 | lang: 'lt',
9 | alt: {
10 | a: 'ą',
11 | c: 'č',
12 | e: 'ęė€',
13 | i: 'į',
14 | u: 'ųū',
15 | s: 'š$',
16 | l: '£',
17 | y: '¥',
18 | z: 'ž',
19 | '.': ',–?!;:„“…'
20 | },
21 | keys: [
22 | [
23 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
24 | { value: 't' } , { value: 'y' }, { value: 'u' } , { value: 'i' },
25 | { value: 'o' }, { value: 'p' }
26 | ], [
27 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
28 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
29 | { value: 'l' }
30 | ], [
31 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
32 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
33 | { value: 'b' }, { value: 'n' }, { value: 'm' },
34 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
35 | ], [
36 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
37 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
38 | ]
39 | ],
40 | pages: [undefined, {
41 | alt: {
42 | '-': '–',
43 | '$': [ '€', '£', '¢', '¥'],
44 | '"': ['„', '“', '”'],
45 | '\'':['‘', '’'],
46 | '?': ['¿'],
47 | '!': ['¡'],
48 | '+': ['-', '×', '÷', '±']
49 | },
50 | // These are based on the en layout.
51 | keys: [
52 | [
53 | { value: '1' }, { value: '2' }, { value: '3' }, { value: '4' },
54 | { value: '5' }, { value: '6' }, { value: '7' }, { value: '8' },
55 | { value: '9' }, { value: '0' }
56 | ], [
57 | { value: '@' }, { value: '#' },
58 | { value: '$', className: 'alternate-indicator' }, { value: '&' },
59 | { value: '*' }, { value: '-' }, { value: '_' }, { value: '/' },
60 | { value: '(' }, { value: ')' }
61 | ], [
62 | { value: 'Alt', ratio: 1.5,
63 | keyCode: KeyboardEvent.DOM_VK_ALT,
64 | className: 'page-switch-key',
65 | targetPage: 2
66 | },
67 | { value: '+',
68 | supportsSwitching: {
69 | value: ','
70 | }
71 | }, { value: ':' }, { value: ';' }, { value: '"' },
72 | { value: '\'' }, { value: '!' }, { value: '?' },
73 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
74 | ], [
75 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
76 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
77 | ]
78 | ]
79 | } ]
80 | };
81 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/uk.js:
--------------------------------------------------------------------------------
1 | Keyboards.uk = {
2 | label: 'Ukrainian',
3 | shortLabel: 'Uk',
4 | menuLabel: 'Українська',
5 | imEngine: 'latin',
6 | types: ['text', 'url', 'email', 'password'],
7 | autoCorrectLanguage: 'uk',
8 | basicLayoutKey: 'АБВ',
9 | lang: 'uk',
10 | pages: [ { //default page
11 | alt: {
12 | а: '@',
13 | г: 'ґ',
14 | і: 'ї',
15 | '.': ',?!;:…’'
16 | },
17 | width: 11,
18 | keys: [
19 | [
20 | { value: 'й' }, { value: 'ц' }, { value: 'у' }, { value: 'к' },
21 | { value: 'е' }, { value: 'н' }, { value: 'г' }, { value: 'ш' },
22 | { value: 'щ' }, { value: 'з' }, { value: 'х' }
23 | ], [
24 | { value: 'ф' }, { value: 'і' }, { value: 'в' }, { value: 'а' },
25 | { value: 'п' }, { value: 'р' }, { value: 'о' }, { value: 'л' },
26 | { value: 'д' }, { value: 'ж' }, { value: 'є' }
27 | ], [
28 | { value: '⇪', keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
29 | { value: 'я' }, { value: 'ч' }, { value: 'с' }, { value: 'м' },
30 | { value: 'и' }, { value: 'т' }, { value: 'ь' }, { value: 'б' },
31 | { value: 'ю' }, { value: '⌫', keyCode: KeyEvent.DOM_VK_BACK_SPACE }
32 | ], [
33 | { value: ' ', ratio: 9, keyCode: KeyboardEvent.DOM_VK_SPACE },
34 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
35 | ]
36 | ],
37 | }, { // symbol page 1
38 | alt: {
39 | '0': ['º'],
40 | '₴': ['$', '€', '£', '¢', '¥'],
41 | '"': ['“', '”'],
42 | '\'':['‘', '’']
43 | },
44 | // These are based on the en layout
45 | keys: [
46 | [
47 | { value: '1' }, { value: '2' }, { value: '3' }, { value: '4' },
48 | { value: '5' }, { value: '6' }, { value: '7' }, { value: '8' },
49 | { value: '9' }, { value: '0' }
50 | ], [
51 | { value: '@' }, { value: '#' },
52 | { value: '₴', className: 'alternate-indicator' }, { value: '&' },
53 | { value: '*' }, { value: '-' }, { value: '_' }, { value: '/' },
54 | { value: '(' }, { value: ')' }
55 | ], [
56 | { value: 'Alt', ratio: 1.5,
57 | keyCode: KeyboardEvent.DOM_VK_ALT,
58 | className: 'page-switch-key',
59 | targetPage: 2
60 | },
61 | { value: '+',
62 | supportsSwitching: {
63 | value: ','
64 | }
65 | }, { value: ':' }, { value: ';' }, { value: '"' },
66 | { value: '\'' }, { value: '!' }, { value: '?' },
67 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
68 | ], [
69 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
70 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
71 | ]
72 | ]
73 | }
74 | ]
75 | };
76 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/imes/emoji/emoji.js:
--------------------------------------------------------------------------------
1 | /* global InputMethods, PromiseStorage*/
2 |
3 |
4 | 'use strict';
5 |
6 | (function() {
7 | function RecentKeys() {
8 | this._items = [];
9 | }
10 |
11 | RecentKeys.prototype.RECENT_KEY_COUNT = 18;
12 |
13 | RecentKeys.prototype.getItems = function() {
14 | return this._items || [];
15 | };
16 |
17 | RecentKeys.prototype.setItems = function(val) {
18 | if (Array.isArray(val) && val.length) {
19 | this._items = val.slice(0, this.RECENT_KEY_COUNT);
20 | }
21 | };
22 |
23 | RecentKeys.prototype.getPanelKeys = function() {
24 | if (!this._items) {
25 | throw new Error('Emoji:Unable to get recently used keys');
26 | }
27 |
28 | return this.getItems().map(function(val) {
29 | return { compositeKey: val, type: 'emoji' };
30 | });
31 | };
32 |
33 | RecentKeys.prototype.add = function(key) {
34 | var duplicateKeyIndex = this._items.indexOf(key);
35 |
36 | // splice an element from array can always reduce length by 1.
37 | // this ensure that we remove the last element or existent key,
38 | // before unshifting clicked key into array.
39 | if (this._items.length >= this.RECENT_KEY_COUNT ||
40 | duplicateKeyIndex !== -1) {
41 | this._items.splice(duplicateKeyIndex, 1);
42 | }
43 |
44 | this._items.unshift(key);
45 | };
46 |
47 | function EmojiInputMethod() {
48 | this._glue = null;
49 | this._dbStore = null;
50 | this._recentKeys = new RecentKeys();
51 | }
52 |
53 | EmojiInputMethod.prototype.EMOJI_DB_NAME = 'Emoji';
54 | EmojiInputMethod.prototype.EMOJI_RECENT_STORE_KEY = 'emojiRecentUsedKeys';
55 |
56 | EmojiInputMethod.prototype.init = function(glue) {
57 | this._glue = glue;
58 | this._dbStore = new PromiseStorage(this.EMOJI_DB_NAME);
59 |
60 | var p = this._dbStore.start()
61 | .then(function() {
62 | return this._dbStore.getItem(this.EMOJI_RECENT_STORE_KEY);
63 | }.bind(this))
64 | .then(function(keys) {
65 | this._recentKeys.setItems(keys);
66 | }.bind(this));
67 |
68 | return p;
69 | };
70 |
71 | EmojiInputMethod.prototype.deactivate = function() {
72 | return this._dbStore.setItem(
73 | this.EMOJI_RECENT_STORE_KEY, this._recentKeys.getItems());
74 | };
75 |
76 | EmojiInputMethod.prototype.click = function(key, repeat) {
77 | return this._glue.sendKey(key, repeat);
78 | };
79 |
80 | EmojiInputMethod.prototype.handleKey = function(key, repeat) {
81 | this._recentKeys.add(key.key);
82 |
83 | return this._glue.sendKey(key, repeat);
84 | };
85 |
86 | EmojiInputMethod.prototype.updatePageKeys = function(page) {
87 | page.panelKeys = this._recentKeys.getPanelKeys();
88 | return page;
89 | };
90 |
91 |
92 | InputMethods.emoji = new EmojiInputMethod();
93 | }());
94 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/views/swipeable_page_view.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* global LayoutPageView, KeyView, SwipeablePanelView */
4 |
5 | (function(exports) {
6 | /**
7 | * SwipeablePageView is used to render a swipeable page,
8 | * like the pages in emoji layout.
9 | */
10 |
11 | function SwipeablePageView() {
12 | LayoutPageView.apply(this, arguments);
13 | }
14 |
15 | SwipeablePageView.prototype = Object.create(LayoutPageView.prototype);
16 |
17 | SwipeablePageView.prototype.render = function() {
18 | var layout = this.layout;
19 |
20 | var container = document.createElement('div');
21 | if (this.options.classNames) {
22 | container.classList.add.apply(container.classList, this.options.classNames);
23 | }
24 |
25 | if (layout.specificCssRule) {
26 | container.classList.add(layout.layoutName);
27 | }
28 |
29 | var swipeablePanel = new SwipeablePanelView(this.layout,
30 | { totalWidth: this.options.totalWidth },
31 | this.viewManager);
32 | swipeablePanel.render();
33 |
34 | this.swipeablePanel = swipeablePanel;
35 |
36 | container.appendChild(swipeablePanel.element);
37 |
38 | // Render the bottom row for switching different type of emojis
39 | layout.keys.forEach(function buildKeyboardRow(row) {
40 | var kbRow = document.createElement('div');
41 | kbRow.classList.add('keyboard-row', 'swipe-switching-buttons');
42 |
43 | row.forEach(function buildKeyboardColumns(key, keyIndex) {
44 | var ratio = key.ratio || 1;
45 |
46 | // One key in layout may be used to create multiple keyViews in
47 | // different pages, so create a unique instance here.
48 | var target = Object.freeze(Object.create(key));
49 |
50 | var options = {
51 | classNames: [],
52 | outputChar: key.uppercaseValue,
53 | outerRatio: ratio,
54 | innerRatio: ratio
55 | };
56 |
57 | if (layout.keyClassName) {
58 | options.classNames = options.classNames.concat(
59 | layout.keyClassName.split(' '));
60 | }
61 |
62 | var keyView = new KeyView(target, options, this.viewManager);
63 | keyView.render();
64 | kbRow.appendChild(keyView.element);
65 | }, this);
66 |
67 | container.appendChild(kbRow);
68 | }, this);
69 |
70 | // XXX: need this so that the switching keys would be visible.
71 | if (!layout.secondLayout) {
72 | container.classList.add('uppercase-only');
73 | }
74 |
75 | this.element = container;
76 | };
77 |
78 | SwipeablePageView.prototype.resize = function resize(totalWidth) {
79 | this.options.totalWidth = totalWidth;
80 | this.swipeablePanel.resize(totalWidth);
81 | };
82 |
83 | SwipeablePageView.prototype.getHeight = function() {
84 | return this.element.clientHeight;
85 | };
86 |
87 | exports.SwipeablePageView = SwipeablePageView;
88 |
89 | })(window);
90 |
--------------------------------------------------------------------------------
/frontend/ui/system/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Servonk
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/layouts/pl.js:
--------------------------------------------------------------------------------
1 | Keyboards.pl = {
2 | label: 'Polish',
3 | shortLabel: 'Pl',
4 | imEngine: 'latin',
5 | types: ['text', 'url' , 'email', 'password'],
6 | autoCorrectLanguage: 'pl',
7 | menuLabel: 'Polski',
8 | lang: 'pl',
9 | alt: {
10 | a: 'ąáàâäåãāæ',
11 | c: 'ćčç',
12 | e: 'ę€éèêëē',
13 | i: 'ïíìîīį',
14 | o: 'óöòôōœø',
15 | u: 'üúùûū',
16 | s: 'śš$ß',
17 | S: 'ŚŠŞ',
18 | n: 'ńñ',
19 | l: 'ł£',
20 | y: '¥',
21 | z: 'żźž',
22 | '.': ',?!;:…',
23 | ',': '„”'
24 | },
25 | keys: [
26 | [
27 | { value: 'q' }, { value: 'w' }, { value: 'e' } , { value: 'r' },
28 | { value: 't' } , { value: 'y' }, { value: 'u' } , { value: 'i' },
29 | { value: 'o' }, { value: 'p' }
30 | ], [
31 | { value: 'a' }, { value: 's' }, { value: 'd' }, { value: 'f' },
32 | { value: 'g' } , { value: 'h' }, { value: 'j' }, { value: 'k' },
33 | { value: 'l' }
34 | ], [
35 | { value: '⇪', ratio: 1.5, keyCode: KeyEvent.DOM_VK_CAPS_LOCK },
36 | { value: 'z' }, { value: 'x' }, { value: 'c' }, { value: 'v' },
37 | { value: 'b' }, { value: 'n' }, { value: 'm' },
38 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
39 | ], [
40 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
41 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
42 | ]
43 | ],
44 | pages: [undefined, {
45 | alt: {
46 | '$': [ '€', '£', '¢', '¥'],
47 | '"': ['“', '”'],
48 | '\'':['‘', '’'],
49 | '?': ['¿'],
50 | '!': ['¡'],
51 | '+': ['-', '×', '÷', '±']
52 | },
53 | // These are based on the en layout.
54 | keys: [
55 | [
56 | { value: '1' }, { value: '2' }, { value: '3' }, { value: '4' },
57 | { value: '5' }, { value: '6' }, { value: '7' }, { value: '8' },
58 | { value: '9' }, { value: '0' }
59 | ], [
60 | { value: '@' }, { value: '#' },
61 | { value: '$', className: 'alternate-indicator' }, { value: '&' },
62 | { value: '*' }, { value: '-' }, { value: '_' }, { value: '/' },
63 | { value: '(' }, { value: ')' }
64 | ], [
65 | { value: 'Alt', ratio: 1.5,
66 | keyCode: KeyboardEvent.DOM_VK_ALT,
67 | className: 'page-switch-key',
68 | targetPage: 2
69 | },
70 | { value: '+',
71 | supportsSwitching: {
72 | value: ','
73 | }
74 | }, { value: ':' }, { value: ';' }, { value: '"' },
75 | { value: '\'' }, { value: '!' }, { value: '?' },
76 | { value: '⌫', ratio: 1.5, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
77 | ], [
78 | { value: ' ', ratio: 8, keyCode: KeyboardEvent.DOM_VK_SPACE },
79 | { value: '↵', ratio: 2, keyCode: KeyEvent.DOM_VK_RETURN }
80 | ]
81 | ]
82 | } ]
83 | };
84 |
--------------------------------------------------------------------------------
/frontend/ui/keyboard/js/settings/base_view.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /*
4 | * The base class of everything that user can "view". The derived classes
5 | * include Panels, Dialogs, and Views (a View is defined as a visual group
6 | * of UI elements of related functionalities).
7 | *
8 | * A view may contain sub-Views in itself.
9 | *
10 | * A view exposes the following functions:
11 | *
12 | * start() and stop() is the beginning and termination of the object's
13 | * lifecycle.
14 | *
15 | * beforeShow() is called by parent[*] when this is to be shown.
16 | *
17 | * show() is called by parent when this view has fully transitioned in.
18 | * Usually, do event binding here.
19 | *
20 | * beforeHide() is called by parent when this is to be hidden.
21 | * Usually, do event unbinding here.
22 | *
23 | * hide() is called by parent when this view has has fully transitioned out.
24 | *
25 | * [*] parent = Containing view, or PanelController/DialogController.
26 | *
27 | * The beforeShow/show/beforeHide/hide hooks may optionally be asynchronous
28 | * by returning a Promise, which must be honored by its parent. These functions
29 | * are currently not used by Views (i.e. Panels and Dialogs' calls to child
30 | * Views' event hooks essentially do nothing).
31 | *
32 | * By default, a BaseView-derived object propogates beforeShow/show/beforeHide/
33 | * hide event hooks to its child views and makes sure the asynchronousness is
34 | * preserved.
35 | *
36 | * Additionally, we accept |options| parameter at beforeShow for initialization
37 | * of a view.
38 | */
39 |
40 | (function(exports) {
41 |
42 | var BaseView = function() {
43 | this.childViews = {};
44 | };
45 |
46 | // A map from view names to Views.
47 | BaseView.prototype.childViews = null;
48 |
49 | BaseView.prototype.CONTAINER_ID = null;
50 |
51 | BaseView.prototype.container = null;
52 |
53 | BaseView.prototype.start = function() {
54 | if (this.CONTAINER_ID) {
55 | this.container = document.getElementById(this.CONTAINER_ID);
56 | }
57 | };
58 |
59 | BaseView.prototype.stop = function() {
60 | this.container = null;
61 | };
62 |
63 | BaseView.prototype.beforeShow = function(options) {
64 | return Promise.all(Object.keys(this.childViews).map(
65 | name => this.childViews[name].beforeShow(options)));
66 | };
67 |
68 | BaseView.prototype.show = function() {
69 | return Promise.all(Object.keys(this.childViews).map(
70 | name => this.childViews[name].show()));
71 | };
72 |
73 | BaseView.prototype.beforeHide = function() {
74 | return Promise.all(Object.keys(this.childViews).map(
75 | name => this.childViews[name].beforeHide()));
76 | };
77 |
78 | BaseView.prototype.hide = function() {
79 | return Promise.all(Object.keys(this.childViews).map(
80 | name => this.childViews[name].hide()));
81 | };
82 |
83 | exports.BaseView = BaseView;
84 |
85 | })(window);
86 |
--------------------------------------------------------------------------------