Initial Commit

master
Ambrose Chua 2014-08-08 16:38:51 +08:00
parent d70189879e
commit 722ca3dab4
1394 changed files with 72639 additions and 0 deletions

9
.classpath Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

33
.project Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MyActivity</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6

35
AndroidManifest.xml Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.euricainc.ambc.xkcd"
android:versionCode="3"
android:versionName="0.0.3-RC1">
<!-- This defines the minimum Android version that can run this program -->
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="19" />
<!-- We need to ask for permission to use the INTERNETZ -->
<uses-permission android:name="android.permission.INTERNET" /><!--
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:hardwareAccelerated="true" >
<!-- Remember to define all the Activities in the AndroidManifest! -->
<activity
android:name="com.euricainc.ambc.xkcd.MyActivity"
android:label="@string/app_name" android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen">
<!-- This basically tells the Android System that the Activity "MyActivity" is to be started when the launcher icon is pressed. -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

BIN
assets/html/Lato400.woff Normal file

Binary file not shown.

BIN
assets/html/Lato700.woff Normal file

Binary file not shown.

10
assets/html/app.appcache Normal file
View File

@ -0,0 +1,10 @@
CACHE MANIFEST
# v1.2
# Explicitly cached 'master entries'.
CACHE:
http://imgs.xkcd.com/
# Resources that require the user to be online.
NETWORK:
*

107
assets/html/idangerous.swiper.css Executable file
View File

@ -0,0 +1,107 @@
/* ===============================================================
Basic Swiper Styles
================================================================*/
.swiper-container {
margin:0 auto;
position:relative;
overflow:hidden;
-webkit-backface-visibility:hidden;
-moz-backface-visibility:hidden;
-ms-backface-visibility:hidden;
-o-backface-visibility:hidden;
backface-visibility:hidden;
/* Fix of Webkit flickering */
z-index:1;
}
.swiper-wrapper {
position:relative;
width:100%;
-webkit-transition-property:-webkit-transform, left, top;
-webkit-transition-duration:0s;
-webkit-transform:translate3d(0px,0,0);
-webkit-transition-timing-function:ease;
-moz-transition-property:-moz-transform, left, top;
-moz-transition-duration:0s;
-moz-transform:translate3d(0px,0,0);
-moz-transition-timing-function:ease;
-o-transition-property:-o-transform, left, top;
-o-transition-duration:0s;
-o-transform:translate3d(0px,0,0);
-o-transition-timing-function:ease;
-o-transform:translate(0px,0px);
-ms-transition-property:-ms-transform, left, top;
-ms-transition-duration:0s;
-ms-transform:translate3d(0px,0,0);
-ms-transition-timing-function:ease;
transition-property:transform, left, top;
transition-duration:0s;
transform:translate3d(0px,0,0);
transition-timing-function:ease;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.swiper-free-mode > .swiper-wrapper {
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
margin: 0 auto;
}
.swiper-slide {
float: left;
}
/* IE10 Windows Phone 8 Fixes */
.swiper-wp8-horizontal {
-ms-touch-action: pan-y;
}
.swiper-wp8-vertical {
-ms-touch-action: pan-x;
}
/* ===============================================================
Your custom styles, here you need to specify container's and slide's
sizes, pagination, etc.
================================================================*/
.swiper-container {
/* Specify Swiper's Size: */
/*width:200px;
height: 100px;*/
}
.swiper-slide {
/* Specify Slides's Size: */
/*width: 100%;
height: 100%;*/
}
.swiper-slide-active {
/* Specific active slide styling: */
}
.swiper-slide-visible {
/* Specific visible slide styling: */
}
/* ===============================================================
Pagination Styles
================================================================*/
.swiper-pagination-switch {
/* Stylize pagination button: */
}
.swiper-active-switch {
/* Specific active button style: */
}
.swiper-visible-switch {
/* Specific visible button style: */
}

2705
assets/html/idangerous.swiper.js Executable file

File diff suppressed because it is too large Load Diff

57
assets/html/index.html Normal file
View File

@ -0,0 +1,57 @@
<!doctype html>
<html lang="en"><!-- manifest="app.appcache" -->
<head>
<meta charset="UTF-8" />
<title>XKCD Unofficial</title>
<link rel="stylesheet" href="styles.css" />
<meta name="viewport" content="width=device-width, user-scalable=0">
<!-- <link rel="stylesheet" href="idangerous.swiper.css" /> -->
</head>
<body>
<main>
<!-- <div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="http://imgs.xkcd.com/comics/second.png" />
</div>
<div class="swiper-slide">
<img src="http://imgs.xkcd.com/comics/first_date.png" />
</div>
<div class="swiper-slide">
<img src="http://imgs.xkcd.com/comics/slippery_slope.png" />
</div>
</div>
</div> -->
<div id="wrapper">
<div id="scroller">
<ul>
<li>
<div class="iwrapper" data-id="1334">
<div class="image" data-src="http://imgs.xkcd.com/comics/second.png"></div>
</div>
</li>
<li>
<div class="iwrapper" data-id="1333">
<div class="image" data-src="http://imgs.xkcd.com/comics/first_date.png"></div>
</div>
</li>
<li>
<div class="iwrapper" data-id="1332">
<div class="image" data-src="http://imgs.xkcd.com/comics/slippery_slope.png"></div>
</div>
</li>
</ul>
</div>
</div>
</main>
<div id="loading">
<span>Loading</span><br /><div class="loadingdots"></div>
</div>
<script src="jquery-2.1.0.min.js"></script>
<!-- <script src="idangerous.swiper.js"></script> -->
<script type="text/javascript" src="iscroll-zoom.js"></script>
<script src="main.js"></script>
</body>
</html>

2172
assets/html/iscroll-zoom.js Normal file

File diff suppressed because it is too large Load Diff

1988
assets/html/iscroll.js Normal file

File diff suppressed because it is too large Load Diff

4
assets/html/jquery-2.1.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

123
assets/html/main.js Normal file
View File

@ -0,0 +1,123 @@
var urls = {
latest: "http://www.corsproxy.com/xkcd.com/info.0.json",
specific: "http://www.corsproxy.com/xkcd.com/%id/info.0.json"
};
var loadn = 10;
var loaded = [];
var total = 0;
$("#scroller ul").empty();
function noconn() {
$("#loading").html("<span>Error! No connection. </span><br /><a onclick='window.location.reload();'>Reload</a>");
}
function setdata(liele, data) {
var datasrc = data.img;
var imageele = liele.find(".image");
// console.log(imageele);
imageele.css("background-image", "url(" + datasrc + ")");
imageele.attr("data-src", datasrc);
}
setTimeout(function () {
$.getJSON(urls.latest, function (data) {
// clearTimeout(ajaxautoout);
console.log(data);
total = data.num;
var i = data.num;
var iloop = function () {
for (j = 0; j < 50; j++) {
$("#wrapper ul").append('<li class="post" data-id="' + i + '"><div class="iwrapper"><div class="image" data-src=""></div></div></li>');
i--;
if (i < 0) {
start();
loadcurrentsector(2);
$("#loading").fadeOut();
break;
}
}
if (i >= 0) {
setTimeout(iloop);
}
}
setTimeout(iloop);
}).fail(noconn);
// var ajaxautoout = setTimeout(noconn, 10000);
}, 100);
var mainscroller;
function start() {
// $(function(){
// var mySwiper = $('.swiper-container').swiper({
// mode:'horizontal',
// loop: false
// });
// });
var viewportwidth = window.innerWidth;
var viewportheight = window.innerHeight;
// sets wrapper to resemble parent
$("#wrapper").css("width", viewportwidth + "px").css("height", viewportheight + "px");
// gives image fixed size
$("#wrapper .iwrapper").css("height", viewportheight + "px");
$("#wrapper .iwrapper .image").css("height", (viewportheight - 60) + "px");
// // sets background based on data-src
// $(".image").each(function () {
// var datasrc = $(this).attr("data-src");
// if (datasrc != '') {
// $(this).css("background-image", "url(" + + ")");
// }
// });
// sets scroller fixed width
var noofli = 0;
$("#wrapper li").each(function () {
noofli++;
});
$("#wrapper ul, #scroller").css("width", noofli * viewportwidth + "px");
// sets every page width
$("#wrapper li").css("width", viewportwidth + "px");
// starts scroller
mainscroller = new IScroll('#wrapper', {
scrollX: true,
scrollY: true,
scrollbars: false,
snap: true,
zoom: true,
deceleration: 0.005
});
mainscroller.on('scrollEnd', loadcurrentsector);
}
function loadcurrentsector(sectorcount) {
var sectorcount = sectorcount || 1;
var currentpage = total - (mainscroller.currentPage.pageX + 2);
var currentsector = Math.floor(currentpage / loadn);
currentsector -= (sectorcount - 1);
if (loaded.indexOf(currentpage) < 0) {
for (var i = currentsector * loadn + loadn * sectorcount; i > currentsector * loadn; i--) {
if (loaded.indexOf(i) < 0 && currentpage <= total) {
var liele = $("[data-id=" + i + "]");
(function (liele) {
$.getJSON(urls.specific.replace("%id", liele.attr("data-id")), function (datas) {
setdata(liele, datas);
loaded.push(liele.attr("data-id") * 1);
});
})(liele);
}
}
}
}

214
assets/html/styles.css Normal file
View File

@ -0,0 +1,214 @@
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
src: local('Lato Regular'), local('Lato-Regular'), url(Lato400.woff) format('woff');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 700;
src: local('Lato Bold'), local('Lato-Bold'), url(Lato700.woff) format('woff');
}
*, *:before, *:after {
box-sizing: border-box;
}
*:focus {
outline: none;
}
body {
-webkit-user-select: none;
line-height: 1.35em;
font-size: 20px;
font-family: "Lato", "Roboto", sans-serif;
background-color: #fff;
color: #444;
-webkit-font-smoothing: subpixel-antialiased;
overflow: hidden;
-webkit-transform: translateZ(0);
}
#loading {
text-align: center;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
padding: 200px 0;
line-height: 3em;
}
.loadingdots {
width: 54px;
height: 36px;
display: inline-block;
}
.loadingdots:after {
content: '';
display: inline-block;
margin: 0 5px 0 -46px;
width: 8px;
height: 8px;
background-color: transparent;
border-radius: 10px;
box-shadow: 10px 0 0 rgba(68, 68, 68, 1), 25px 0 0 rgba(68, 68, 68, 1), 40px 0 0 rgba(68, 68, 68, 1);
-webkit-animation: 0.75s loadingdots infinite;
}
@-webkit-keyframes loadingdots {
0% {
box-shadow: 10px 0 0 1px rgba(68, 68, 68, 1), 25px 0 0 rgba(68, 68, 68, 0.2), 40px 0 0 rgba(68, 68, 68, 0.2);
}
33.33% {
box-shadow: 10px 0 0 rgba(68, 68, 68, 0.2), 25px 0 0 1px rgba(68, 68, 68, 1), 40px 0 0 rgba(68, 68, 68, 0.2);
}
66.66% {
box-shadow: 10px 0 0 rgba(68, 68, 68, 0.2), 25px 0 0 rgba(68, 68, 68, 0.2), 40px 0 0 1px rgba(68, 68, 68, 1);
}
100% {
box-shadow: 10px 0 0 1px rgba(68, 68, 68, 1), 25px 0 0 rgba(68, 68, 68, 0.2), 40px 0 0 rgba(68, 68, 68, 0.2);
}
}
a {
color: #44e;
text-decoration: inherit;/*
-webkit-transition: 0.5s color;*/
}/*
a:hover, a:focus {
color: #449;
}*/
a:active {
color: #449;
}
h1, h2, h3, h4, h5, h6 {
font-weight: 900;
font-size: 30px;
line-height: 1.4em;
padding: 0.222em 0 0.222em 0;
}
h1 {
font-size: 30px;
}
h2 {
font-size: 26px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 28px;
}
h5 {
font-size: 26px;
}
h6 {
font-size: 24px;
}
p {
padding: 8px 0;
}
/*
ol, ul {
list-style: decimal;
padding: 10px 30px;
}
ul {
list-style: disc;
}
*/
hr {
height: 2px;
margin: 40px auto;
max-width: 180px;
border: none;
background-color: #444;
}
pre, code {
font-family: "Monaco";
}
pre {
padding: 20px;
word-wrap: break-word;
}
strong {
font-weight: 700;
}
em {
font-style: italic;
}
blockquote {
padding: 30px;
font-style: italic;
}
/*
img {
width: 100%;
border-radius: 4px;
}
*/
/* Derp code */
/*
.swiper-slide {
width: 360px;
height: 360px;
}
*/
#wrapper {
position: relative;
width: 300px;
height: 300px;
overflow: hidden;
/* Prevent the callout on tap-hold and text selection */
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
/* Prevent text resize on orientation change, useful for web-apps */
-webkit-text-size-adjust: none;
text-size-adjust: none;
}
#scroller {
position: absolute;
/* Prevent elements to be highlighted on tap */
-webkit-tap-highlight-color: rgba(0,0,0,0);
/* Put the scroller into the HW Compositing layer right from the start */
-webkit-transform: translateZ(0);
transform: translateZ(0);
}
#scroller {
/*height: 100%;*/
}
#wrapper ul {
list-style: none;
font-size: 0;
/*height: 100%;*/
}
#wrapper li {
/*display: inline-block;*/
float: left;
width: 100%;
font-size: 20px;
height: 100%;
}
#wrapper li .iwrapper {
height: 440px;
padding: 30px;
}
#wrapper li .iwrapper .image {
width: 100%;
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}

BIN
assets/webviewchromium.pak Executable file

Binary file not shown.

35
bin/AndroidManifest.xml Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.euricainc.ambc.xkcd"
android:versionCode="3"
android:versionName="0.0.3-RC1">
<!-- This defines the minimum Android version that can run this program -->
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="19" />
<!-- We need to ask for permission to use the INTERNETZ -->
<uses-permission android:name="android.permission.INTERNET" /><!--
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:hardwareAccelerated="true" >
<!-- Remember to define all the Activities in the AndroidManifest! -->
<activity
android:name="com.euricainc.ambc.xkcd.MyActivity"
android:label="@string/app_name" android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen">
<!-- This basically tells the Android System that the Activity "MyActivity" is to be started when the launcher icon is pressed. -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

154
bin/R.txt Normal file
View File

@ -0,0 +1,154 @@
int attr select_dialog_multichoice 0x7f010000
int attr select_dialog_singlechoice 0x7f010001
int color autofill_dark_divider_color 0x7f070003
int color autofill_divider_color 0x7f070002
int color color_picker_background_color 0x7f070001
int color color_picker_border_color 0x7f070000
int dimen activity_horizontal_margin 0x7f080005
int dimen activity_vertical_margin 0x7f080006
int dimen autofill_text_divider_height 0x7f080004
int dimen autofill_text_height 0x7f080003
int dimen color_button_height 0x7f080002
int dimen color_picker_gradient_margin 0x7f080001
int dimen link_preview_overlay_radius 0x7f080000
int drawable autofill_popup_background 0x7f020000
int drawable autofill_popup_background_down 0x7f020001
int drawable autofill_popup_background_up 0x7f020002
int drawable bubble 0x7f020003
int drawable bubble_arrow_up 0x7f020004
int drawable color_button_background 0x7f020005
int drawable color_picker_advanced_select_handle 0x7f020006
int drawable color_picker_border 0x7f020007
int drawable ic_launcher 0x7f020008
int drawable ic_media_video_poster 0x7f020009
int drawable ic_menu_search_holo_light 0x7f02000a
int drawable ic_menu_share_holo_light 0x7f02000b
int drawable ondemand_overlay 0x7f02000c
int drawable pageinfo_warning_major 0x7f02000d
int id ampm 0x7f0a001d
int id arrow_image 0x7f0a0024
int id autofill_label 0x7f0a0002
int id autofill_menu_text 0x7f0a0001
int id autofill_popup_window 0x7f0a0000
int id autofill_sublabel 0x7f0a0003
int id color_button_swatch 0x7f0a0027
int id color_picker_advanced 0x7f0a0008
int id color_picker_simple 0x7f0a0009
int id date_picker 0x7f0a000f
int id date_time_suggestion 0x7f0a0011
int id date_time_suggestion_label 0x7f0a0013
int id date_time_suggestion_value 0x7f0a0012
int id gradient 0x7f0a0006
int id gradient_border 0x7f0a0005
int id hour 0x7f0a0017
int id icon_view 0x7f0a0022
int id main_text 0x7f0a0025
int id message 0x7f0a0014
int id milli 0x7f0a001c
int id minute 0x7f0a0018
int id more_colors_button 0x7f0a000b
int id more_colors_button_border 0x7f0a000a
int id pickers 0x7f0a001e
int id position_in_year 0x7f0a001f
int id second 0x7f0a001a
int id second_colon 0x7f0a0019
int id second_dot 0x7f0a001b
int id seek_bar 0x7f0a0007
int id select_action_menu_copy 0x7f0a002a
int id select_action_menu_cut 0x7f0a0029
int id select_action_menu_paste 0x7f0a002b
int id select_action_menu_select_all 0x7f0a0028
int id select_action_menu_share 0x7f0a002c
int id select_action_menu_web_search 0x7f0a002d
int id selected_color_view 0x7f0a000e
int id selected_color_view_border 0x7f0a000d
int id sub_text 0x7f0a0026
int id text 0x7f0a0004
int id text_wrapper 0x7f0a0023
int id time_picker 0x7f0a0010
int id title 0x7f0a000c
int id top_view 0x7f0a0021
int id value 0x7f0a0015
int id webView 0x7f0a0016
int id year 0x7f0a0020
int layout autofill_text 0x7f040000
int layout color_picker_advanced_component 0x7f040001
int layout color_picker_dialog_content 0x7f040002
int layout color_picker_dialog_title 0x7f040003
int layout date_time_picker_dialog 0x7f040004
int layout date_time_suggestion 0x7f040005
int layout js_prompt 0x7f040006
int layout main 0x7f040007
int layout multi_field_time_picker_dialog 0x7f040008
int layout two_field_date_picker 0x7f040009
int layout validation_message_bubble 0x7f04000a
int menu select_action_menu 0x7f0b0000
int mipmap app_icon 0x7f030000
int raw blank_html 0x7f050000
int string accessibility_content_view 0x7f060002
int string accessibility_date_picker_month 0x7f060012
int string accessibility_date_picker_week 0x7f060013
int string accessibility_date_picker_year 0x7f060014
int string accessibility_datetime_picker_date 0x7f060010
int string accessibility_datetime_picker_time 0x7f060011
int string accessibility_time_picker_ampm 0x7f060019
int string accessibility_time_picker_hour 0x7f060015
int string accessibility_time_picker_milli 0x7f060018
int string accessibility_time_picker_minute 0x7f060016
int string accessibility_time_picker_second 0x7f060017
int string actionbar_share 0x7f060000
int string actionbar_web_search 0x7f060001
int string app_name 0x7f060035
int string cancel 0x7f06003e
int string color_picker_button_black 0x7f060032
int string color_picker_button_blue 0x7f06002e
int string color_picker_button_cancel 0x7f06002a
int string color_picker_button_cyan 0x7f06002d
int string color_picker_button_green 0x7f06002f
int string color_picker_button_magenta 0x7f060030
int string color_picker_button_more 0x7f060025
int string color_picker_button_red 0x7f06002c
int string color_picker_button_set 0x7f060029
int string color_picker_button_white 0x7f060033
int string color_picker_button_yellow 0x7f060031
int string color_picker_dialog_title 0x7f06002b
int string color_picker_hue 0x7f060026
int string color_picker_saturation 0x7f060027
int string color_picker_value 0x7f060028
int string copy_to_clipboard_failure_message 0x7f060034
int string date_picker_dialog_clear 0x7f060005
int string date_picker_dialog_other_button_label 0x7f060006
int string date_picker_dialog_set 0x7f060004
int string date_picker_dialog_title 0x7f060003
int string date_time_picker_dialog_title 0x7f060007
int string default_encoding 0x7f060036
int string js_dialog_before_unload 0x7f06003c
int string js_dialog_before_unload_negative_button 0x7f06003b
int string js_dialog_before_unload_positive_button 0x7f06003a
int string js_dialog_before_unload_title 0x7f060039
int string js_dialog_title 0x7f060037
int string js_dialog_title_default 0x7f060038
int string low_memory_error 0x7f060023
int string media_player_error_button 0x7f06001d
int string media_player_error_text_invalid_progressive_playback 0x7f06001b
int string media_player_error_text_unknown 0x7f06001c
int string media_player_error_title 0x7f06001a
int string media_player_loading_video 0x7f06001e
int string month_picker_dialog_title 0x7f06000e
int string ok 0x7f06003d
int string opening_file_error 0x7f060024
int string profiler_error_toast 0x7f060022
int string profiler_no_storage_toast 0x7f060021
int string profiler_started_toast 0x7f06001f
int string profiler_stopped_toast 0x7f060020
int string time_picker_dialog_am 0x7f060009
int string time_picker_dialog_hour_minute_separator 0x7f06000b
int string time_picker_dialog_minute_second_separator 0x7f06000c
int string time_picker_dialog_pm 0x7f06000a
int string time_picker_dialog_second_subsecond_separator 0x7f06000d
int string time_picker_dialog_title 0x7f060008
int string week_picker_dialog_title 0x7f06000f
int style AppBaseTheme 0x7f090000
int style AppTheme 0x7f090001
int style AutofillPopupWindow 0x7f090003
int style SelectPopupDialog 0x7f090002

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

3
bin/jarlist.cache Normal file
View File

@ -0,0 +1,3 @@
# cache for current jar dependency. DO NOT EDIT.
# format is <lastModified> <length> <SHA-1> <path>
# Encoding is UTF-8

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

33
chromium_webview/.project Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>java</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -0,0 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogoweb.chrome"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
</application>
</manifest>

Binary file not shown.

View File

@ -0,0 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogoweb.chrome"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
</application>
</manifest>

150
chromium_webview/bin/R.txt Normal file
View File

@ -0,0 +1,150 @@
int attr select_dialog_multichoice 0x7f010000
int attr select_dialog_singlechoice 0x7f010001
int color autofill_dark_divider_color 0x7f070003
int color autofill_divider_color 0x7f070002
int color color_picker_background_color 0x7f070001
int color color_picker_border_color 0x7f070000
int dimen autofill_text_divider_height 0x7f080004
int dimen autofill_text_height 0x7f080003
int dimen color_button_height 0x7f080002
int dimen color_picker_gradient_margin 0x7f080001
int dimen link_preview_overlay_radius 0x7f080000
int drawable autofill_popup_background 0x7f020000
int drawable autofill_popup_background_down 0x7f020001
int drawable autofill_popup_background_up 0x7f020002
int drawable bubble 0x7f020003
int drawable bubble_arrow_up 0x7f020004
int drawable color_button_background 0x7f020005
int drawable color_picker_advanced_select_handle 0x7f020006
int drawable color_picker_border 0x7f020007
int drawable ic_launcher 0x7f020008
int drawable ic_media_video_poster 0x7f020009
int drawable ic_menu_search_holo_light 0x7f02000a
int drawable ic_menu_share_holo_light 0x7f02000b
int drawable ondemand_overlay 0x7f02000c
int drawable pageinfo_warning_major 0x7f02000d
int id ampm 0x7f0a001c
int id arrow_image 0x7f0a0023
int id autofill_label 0x7f0a0002
int id autofill_menu_text 0x7f0a0001
int id autofill_popup_window 0x7f0a0000
int id autofill_sublabel 0x7f0a0003
int id color_button_swatch 0x7f0a0026
int id color_picker_advanced 0x7f0a0008
int id color_picker_simple 0x7f0a0009
int id date_picker 0x7f0a000f
int id date_time_suggestion 0x7f0a0011
int id date_time_suggestion_label 0x7f0a0013
int id date_time_suggestion_value 0x7f0a0012
int id gradient 0x7f0a0006
int id gradient_border 0x7f0a0005
int id hour 0x7f0a0016
int id icon_view 0x7f0a0021
int id main_text 0x7f0a0024
int id message 0x7f0a0014
int id milli 0x7f0a001b
int id minute 0x7f0a0017
int id more_colors_button 0x7f0a000b
int id more_colors_button_border 0x7f0a000a
int id pickers 0x7f0a001d
int id position_in_year 0x7f0a001e
int id second 0x7f0a0019
int id second_colon 0x7f0a0018
int id second_dot 0x7f0a001a
int id seek_bar 0x7f0a0007
int id select_action_menu_copy 0x7f0a0029
int id select_action_menu_cut 0x7f0a0028
int id select_action_menu_paste 0x7f0a002a
int id select_action_menu_select_all 0x7f0a0027
int id select_action_menu_share 0x7f0a002b
int id select_action_menu_web_search 0x7f0a002c
int id selected_color_view 0x7f0a000e
int id selected_color_view_border 0x7f0a000d
int id sub_text 0x7f0a0025
int id text 0x7f0a0004
int id text_wrapper 0x7f0a0022
int id time_picker 0x7f0a0010
int id title 0x7f0a000c
int id top_view 0x7f0a0020
int id value 0x7f0a0015
int id year 0x7f0a001f
int layout autofill_text 0x7f040000
int layout color_picker_advanced_component 0x7f040001
int layout color_picker_dialog_content 0x7f040002
int layout color_picker_dialog_title 0x7f040003
int layout date_time_picker_dialog 0x7f040004
int layout date_time_suggestion 0x7f040005
int layout js_prompt 0x7f040006
int layout multi_field_time_picker_dialog 0x7f040007
int layout two_field_date_picker 0x7f040008
int layout validation_message_bubble 0x7f040009
int menu select_action_menu 0x7f0b0000
int mipmap app_icon 0x7f030000
int raw blank_html 0x7f050000
int string accessibility_content_view 0x7f060002
int string accessibility_date_picker_month 0x7f060012
int string accessibility_date_picker_week 0x7f060013
int string accessibility_date_picker_year 0x7f060014
int string accessibility_datetime_picker_date 0x7f060010
int string accessibility_datetime_picker_time 0x7f060011
int string accessibility_time_picker_ampm 0x7f060019
int string accessibility_time_picker_hour 0x7f060015
int string accessibility_time_picker_milli 0x7f060018
int string accessibility_time_picker_minute 0x7f060016
int string accessibility_time_picker_second 0x7f060017
int string actionbar_share 0x7f060000
int string actionbar_web_search 0x7f060001
int string app_name 0x7f060035
int string cancel 0x7f06003e
int string color_picker_button_black 0x7f060032
int string color_picker_button_blue 0x7f06002e
int string color_picker_button_cancel 0x7f06002a
int string color_picker_button_cyan 0x7f06002d
int string color_picker_button_green 0x7f06002f
int string color_picker_button_magenta 0x7f060030
int string color_picker_button_more 0x7f060025
int string color_picker_button_red 0x7f06002c
int string color_picker_button_set 0x7f060029
int string color_picker_button_white 0x7f060033
int string color_picker_button_yellow 0x7f060031
int string color_picker_dialog_title 0x7f06002b
int string color_picker_hue 0x7f060026
int string color_picker_saturation 0x7f060027
int string color_picker_value 0x7f060028
int string copy_to_clipboard_failure_message 0x7f060034
int string date_picker_dialog_clear 0x7f060005
int string date_picker_dialog_other_button_label 0x7f060006
int string date_picker_dialog_set 0x7f060004
int string date_picker_dialog_title 0x7f060003
int string date_time_picker_dialog_title 0x7f060007
int string default_encoding 0x7f060036
int string js_dialog_before_unload 0x7f06003c
int string js_dialog_before_unload_negative_button 0x7f06003b
int string js_dialog_before_unload_positive_button 0x7f06003a
int string js_dialog_before_unload_title 0x7f060039
int string js_dialog_title 0x7f060037
int string js_dialog_title_default 0x7f060038
int string low_memory_error 0x7f060023
int string media_player_error_button 0x7f06001d
int string media_player_error_text_invalid_progressive_playback 0x7f06001b
int string media_player_error_text_unknown 0x7f06001c
int string media_player_error_title 0x7f06001a
int string media_player_loading_video 0x7f06001e
int string month_picker_dialog_title 0x7f06000e
int string ok 0x7f06003d
int string opening_file_error 0x7f060024
int string profiler_error_toast 0x7f060022
int string profiler_no_storage_toast 0x7f060021
int string profiler_started_toast 0x7f06001f
int string profiler_stopped_toast 0x7f060020
int string time_picker_dialog_am 0x7f060009
int string time_picker_dialog_hour_minute_separator 0x7f06000b
int string time_picker_dialog_minute_second_separator 0x7f06000c
int string time_picker_dialog_pm 0x7f06000a
int string time_picker_dialog_second_subsecond_separator 0x7f06000d
int string time_picker_dialog_title 0x7f060008
int string week_picker_dialog_title 0x7f06000f
int style AppBaseTheme 0x7f090000
int style AppTheme 0x7f090001
int style AutofillPopupWindow 0x7f090003
int style SelectPopupDialog 0x7f090002

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.display;
parcelable BrailleDisplayProperties;

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.display;
parcelable BrailleInputEvent;

View File

@ -0,0 +1,43 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.display;
import com.googlecode.eyesfree.braille.display.IBrailleServiceCallback;
/**
* Interface for clients to talk to the braille display service.
*/
interface IBrailleService {
/**
* Register a callback for the {@code callingApp} which will receive
* certain braille display related events.
*/
boolean registerCallback(in IBrailleServiceCallback callback);
/**
* Unregister a previously registered callback for the {@code callingApp}.
*/
oneway void unregisterCallback(in IBrailleServiceCallback callback);
/**
* Updates the main cells of the connected braille display
* with a given dot {@code pattern}.
*
* @return {@code true} on success and {@code false} otherwise.
*/
void displayDots(in byte[] patterns);
}

View File

@ -0,0 +1,30 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.display;
import com.googlecode.eyesfree.braille.display.BrailleDisplayProperties;
import com.googlecode.eyesfree.braille.display.BrailleInputEvent;
/**
* Callback interface that a braille display client can expose to
* get information about various braille display events.
*/
interface IBrailleServiceCallback {
void onDisplayConnected(in BrailleDisplayProperties displayProperties);
void onDisplayDisconnected();
void onInput(in BrailleInputEvent inputEvent);
}

View File

@ -0,0 +1,28 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.selfbraille;
import com.googlecode.eyesfree.braille.selfbraille.WriteData;
/**
* Interface for a client to control braille output for a part of the
* accessibility node tree.
*/
interface ISelfBrailleService {
void write(IBinder clientToken, in WriteData writeData);
oneway void disconnect(IBinder clientToken);
}

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.selfbraille;
parcelable WriteData;

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.translate;
import com.googlecode.eyesfree.braille.translate.ITranslatorServiceCallback;
interface ITranslatorService {
/**
* Sets a callback to be called when the service is ready to translate.
* Using any of the other methods in this interface before the
* callback is called with a successful status will return
* failure.
*/
void setCallback(ITranslatorServiceCallback callback);
/**
* Makes sure that the given table string is valid and that the
* table compiles.
*/
boolean checkTable(String tableName);
/**
* Translates text into braille according to the give tableName.
* Returns null on fatal translation errors.
*/
byte[] translate(String text, String tableName);
/**
* Translates braille cells into text according to the given table
* name. Returns null on fatal translation errors.
*/
String backTranslate(in byte[] cells, String tableName);
}

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.translate;
oneway interface ITranslatorServiceCallback {
void onInit(int status);
}

View File

@ -0,0 +1,16 @@
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.content.common;
import android.view.Surface;
interface IChildProcessCallback {
// Conduit to pass a Surface from the sandboxed renderer to the plugin.
void establishSurfacePeer(
int pid, in Surface surface, int primaryID, int secondaryID);
Surface getViewSurface(int surfaceId);
}

View File

@ -0,0 +1,15 @@
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.content.common;
import org.chromium.content.common.IChildProcessCallback;
import android.view.Surface;
import android.os.Bundle;
interface IChildProcessService {
// Sets up the initial IPC channel and returns the pid of the child process.
int setupConnection(in Bundle args, IChildProcessCallback callback);
}

View File

@ -0,0 +1,33 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.net;
import org.chromium.net.IRemoteAndroidKeyStoreCallbacks;
/**
* Interface for communication with an Android KeyStore in another process.
*/
interface IRemoteAndroidKeyStore {
// Remote calls for SSlClientCertificateRequest - these allow retrieving
// the alias of the certificate to be used, its encoded chain and a handle
// for identifying a private key in the remote process.
String getClientCertificateAlias();
byte[] getEncodedCertificateChain(in String alias);
int getPrivateKeyHandle(in String alias);
// Registers callbacks for service->client communication.
void setClientCallbacks(IRemoteAndroidKeyStoreCallbacks callbacks);
// Remote calls for AndroidKeyStore - these functions are performing operations
// with a PrivateKey in the remote process using the handle provided by
// |getPrivateKeyHandle|.
byte[] getRSAKeyModulus(in int handle);
byte[] getPrivateKeyEncodedBytes(in int handle);
byte[] getDSAKeyParamQ(in int handle);
byte[] getECKeyOrder(in int handle);
byte[] rawSignDigestWithPrivateKey(in int handle, in byte[] message);
int getPrivateKeyType(in int handle);
void releaseKey(in int handle);
}

View File

@ -0,0 +1,23 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.net;
/**
* Interface for communication from the remote authentication service back to the client.
*/
interface IRemoteAndroidKeyStoreCallbacks {
/**
* A critical failure has occurred and the service won't be able to recover.
* The client should unbind and optionally rebind at a later time.
*/
void onDisabled();
/**
* The service has started up and is fully initialized. This allows for the
* service to take some time to initialize. Remote calls shouldn't be invoked
* until this call has fired.
*/
void onInitComplete();
}

View File

@ -0,0 +1,14 @@
# Changes in this folder are guaranteed to affect the downstream
# android_webview build. Adding one of the folks from the below list to the
# review gives us time to prepare a matching change ahead of time so that our
# downstream build can continue running smoothly.
set noparent
benm@chromium.org
boliu@chomium.org
michaelbai@chromium.org
mkosiba@chromium.org
mnaganov@chromium.org
primiano@chromium.org
sgurun@chromium.org
torne@chromium.org

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.display;
parcelable BrailleDisplayProperties;

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.display;
parcelable BrailleInputEvent;

View File

@ -0,0 +1,43 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.display;
import com.googlecode.eyesfree.braille.display.IBrailleServiceCallback;
/**
* Interface for clients to talk to the braille display service.
*/
interface IBrailleService {
/**
* Register a callback for the {@code callingApp} which will receive
* certain braille display related events.
*/
boolean registerCallback(in IBrailleServiceCallback callback);
/**
* Unregister a previously registered callback for the {@code callingApp}.
*/
oneway void unregisterCallback(in IBrailleServiceCallback callback);
/**
* Updates the main cells of the connected braille display
* with a given dot {@code pattern}.
*
* @return {@code true} on success and {@code false} otherwise.
*/
void displayDots(in byte[] patterns);
}

View File

@ -0,0 +1,30 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.display;
import com.googlecode.eyesfree.braille.display.BrailleDisplayProperties;
import com.googlecode.eyesfree.braille.display.BrailleInputEvent;
/**
* Callback interface that a braille display client can expose to
* get information about various braille display events.
*/
interface IBrailleServiceCallback {
void onDisplayConnected(in BrailleDisplayProperties displayProperties);
void onDisplayDisconnected();
void onInput(in BrailleInputEvent inputEvent);
}

View File

@ -0,0 +1,28 @@
/*
* Copyright (C) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.googlecode.eyesfree.braille.selfbraille;
import com.googlecode.eyesfree.braille.selfbraille.WriteData;
/**
* Interface for a client to control braille output for a part of the
* accessibility node tree.
*/
interface ISelfBrailleService {
void write(IBinder clientToken, in WriteData writeData);
oneway void disconnect(IBinder clientToken);
}

Some files were not shown because too many files have changed in this diff Show More