Package com.google.gdt.eclipse.designer.moz.jsni

Examples of com.google.gdt.eclipse.designer.moz.jsni.JsValueMoz32


    // add body.onLoad execution watcher
    // do it async because we can't manipulating with JS here.
    Display.getCurrent().asyncExec(new Runnable() {
      public void run() {
        try {
          JsValueMoz32/*64*/externalJSObject = new JsValueMoz32/*64*/();
          externalJSObject.setWrappedJavaObject(new GwtOnLoadDispatchObject32/*64*/());
          createAndInvoke(
            "__defineExternal",
            new String[]{"__arg0"},
            "window.__wbp_geckoExternal = __arg0;",
            new int /*long*/[]{externalJSObject.getJsRootedValue()});
        } catch (Throwable e) {
          throw new HostedModeException(HostedModeException.LINUX_HOSTED_MODE_INIT_ERROR, e);
        }
      }
    });
View Full Code Here


    });
  }
  protected final JsValue createAndInvoke(String name, String[] jsargs, String body, Object args) {
    String newScript = ModuleSpace.createNativeMethodInjector(name, jsargs, body);
    LowLevelMoz32/*64*/.executeScriptWithInfo(m_windowPrivate, newScript, "", 0);
    JsValueMoz32/*64*/jsthis = new JsValueMoz32/*64*/();
    jsthis.setNull();
    JsValueMoz32/*64*/returnVal = new JsValueMoz32/*64*/();
    LowLevelMoz32/*64*/.invoke(
      m_windowPrivate,
      name,
      jsthis.getJsRootedValue(),
      (int /*long*/[]) args,
      returnVal.getJsRootedValue());
    return returnVal;
  }
View Full Code Here

    public Object getTarget() {
      return null;
    }
    public void getField(String name, int /*long*/jsRootedValue) {
      if (name.indexOf("toString") != -1) {
        JsValueMoz32/*64*/jsValue = new JsValueMoz32/*64*/(jsRootedValue);
        jsValue.setWrappedFunction(name, EMPTY_DISP_METHOD);
      } else if (name.indexOf("gwtOnLoad") != -1) {
        JsValueMoz32/*64*/jsValue = new JsValueMoz32/*64*/(jsRootedValue);
        jsValue.setWrappedFunction(name, new DispatchMethod32/*64*/() {
          public void invoke(int /*long*/jsthis, int /*long*/[] jsargs, int /*long*/returnValue) {
            try {
              System.out.println("Browser ready.");
              m_window = m_windowPrivate;
            } catch (Throwable e) {
View Full Code Here

    // add body.onLoad execution watcher
    // do it async because we can't manipulating with JS here.
    Display.getCurrent().asyncExec(new Runnable() {
      public void run() {
        try {
          JsValueMoz32/*64*/externalJSObject = new JsValueMoz32/*64*/();
          externalJSObject.setWrappedJavaObject(new GwtOnLoadDispatchObject32/*64*/());
          createAndInvoke(
            "__defineExternal",
            new String[]{"__arg0"},
            "window.__wbp_geckoExternal = __arg0;",
            new int /*long*/[]{externalJSObject.getJsRootedValue()});
        } catch (Throwable e) {
          throw new HostedModeException(HostedModeException.LINUX_HOSTED_MODE_INIT_ERROR, e);
        }
      }
    });
View Full Code Here

    });
  }
  protected final JsValue createAndInvoke(String name, String[] jsargs, String body, Object args) {
    String newScript = ModuleSpace.createNativeMethodInjector(name, jsargs, body);
    LowLevelMoz32/*64*/.executeScriptWithInfo(m_windowPrivate, newScript, "", 0);
    JsValueMoz32/*64*/jsthis = new JsValueMoz32/*64*/();
    jsthis.setNull();
    JsValueMoz32/*64*/returnVal = new JsValueMoz32/*64*/();
    LowLevelMoz32/*64*/.invoke(
      m_windowPrivate,
      name,
      jsthis.getJsRootedValue(),
      (int /*long*/[]) args,
      returnVal.getJsRootedValue());
    return returnVal;
  }
View Full Code Here

    public Object getTarget() {
      return null;
    }
    public void getField(String name, int /*long*/jsRootedValue) {
      if (name.indexOf("toString") != -1) {
        JsValueMoz32/*64*/jsValue = new JsValueMoz32/*64*/(jsRootedValue);
        jsValue.setWrappedFunction(name, EMPTY_DISP_METHOD);
      } else if (name.indexOf("gwtOnLoad") != -1) {
        JsValueMoz32/*64*/jsValue = new JsValueMoz32/*64*/(jsRootedValue);
        jsValue.setWrappedFunction(name, new DispatchMethod32/*64*/() {
          public void invoke(int /*long*/jsthis, int /*long*/[] jsargs, int /*long*/returnValue) {
            try {
              System.out.println("Browser ready.");
              // Attach a new ModuleSpace to make it programmable.
              ModuleSpaceHost msh = getHost().createModuleSpaceHost(m_moduleName);
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.moz.jsni.JsValueMoz32

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.