Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1189)

Side by Side Diff: samples/android/src/org/dartlang/Dart.java

Issue 11362103: Rotating spheres sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More cleanup Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 package org.dartlang;
6
7 /**
8 * A static class that wraps access to the Dart VM shared library.
9 * For expedience we pass the following types as Java primitives
10 *
11 * Dart_Handle <-> int. (It's a pointer.)
12 * Dart_Isolate <-> int. (It's a pointer.)
13 *
14 */
15 public class Dart {
16 static {
17 System.loadLibrary("dart_so");
18 }
19 /** Start Dart runtime.
20 * @return main isolate, or 0 if there was an error.
21 */
22 public static native int dartStart(String[] args);
23 public static native int dartFinish(int main_isolate);
24
25 public static native boolean IsError(int handle);
26 public static native boolean IsApiError(int handle);
27 public static native boolean IsUnhandledExceptionError(int handle);
28 public static native boolean IsCompilationError(int handle);
29 public static native boolean IsFatalError(int handle);
30 public static native String GetError(int handle);
31 public static native boolean ErrorHasException(int handle);
32 public static native int ErrorGetException(int handle);
33 public static native int ErrorGetStacktrace(int handle);
34 public static native int NewApiError(String message);
35
36 public static native void EnterScope();
37 public static native void ExitScope();
38 public static native void ShutdownIsolate();
39
40 public static native int CurrentIsolate();
41 public static native void EnterIsolate(int isolate);
42 public static native void ExitIsolate();
43
44 public static native int RootLibrary();
45 public static native int LoadLibrary(int url, int source);
46 public static native int LoadSource(int library, int url, int source);
47
48 public static native int New(int clazz, int constructor_name, int[] arguments) ;
49 public static native int Invoke(int target, int name, int[] arguments);
50 public static native int GetField(int container, int name);
51 public static native int SetField(int container, int name, int value);
52
53 public static native int ToString(int object);
54 public static native String StringToJavaString(int str);
55
56 public static native boolean IdentityEquals(int obj1, int obj2);
57
58 public static native int RunLoop();
59
60 public static native int Null();
61 public static native boolean IsNull(int handle);
62
63 public static native int NewString(String string);
64 public static native int NewInteger(long value);
65 public static native int NewBoolean(boolean value);
66 public static native int NewDouble(double value);
67 public static native int NewList(int length);
68 public static native int ListLength(int list);
69 public static native int ListGetAt(int list, int index);
70 public static native int ListSetAt(int list, int index, int value);
71 }
OLDNEW
« no previous file with comments | « samples/android/res/values/strings.xml ('k') | samples/android/src/org/dartlang/example/dart/DartActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698