jaroslav@1239: /** jaroslav@1239: * Back 2 Browser Bytecode Translator jaroslav@1239: * Copyright (C) 2012 Jaroslav Tulach jaroslav@1239: * jaroslav@1239: * This program is free software: you can redistribute it and/or modify jaroslav@1239: * it under the terms of the GNU General Public License as published by jaroslav@1239: * the Free Software Foundation, version 2 of the License. jaroslav@1239: * jaroslav@1239: * This program is distributed in the hope that it will be useful, jaroslav@1239: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@1239: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@1239: * GNU General Public License for more details. jaroslav@1239: * jaroslav@1239: * You should have received a copy of the GNU General Public License jaroslav@1239: * along with this program. Look for COPYING file in the top folder. jaroslav@1239: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@1239: */ jaroslav@1239: package org.apidesign.vm4brwsr; jaroslav@1239: jaroslav@1239: import net.java.html.js.JavaScriptBody; jaroslav@1239: import net.java.html.js.JavaScriptResource; jaroslav@1239: jaroslav@1239: /** jaroslav@1239: * jaroslav@1239: * @author Jaroslav Tulach jaroslav@1239: */ jaroslav@1239: @JavaScriptResource("htmlannotations.js") jaroslav@1239: public class HtmlAnnotations { jaroslav@1239: @JavaScriptBody(args = {}, body = "return 42;") jaroslav@1239: public static int fourtyTwo() { jaroslav@1239: return -1; jaroslav@1239: } jaroslav@1239: jaroslav@1239: @JavaScriptBody(args = { "x", "y" }, body = "return mul(x, y);") jaroslav@1239: public static native int useExternalMul(int x, int y); jaroslav@1239: jaroslav@1239: }