Package org.eclipse.swt.internal

Examples of org.eclipse.swt.internal.Callback


  printerList = new PrinterData [0];
  if (OS.GTK_VERSION < OS.VERSION (2, 10, 0) || disablePrinting) {
    return printerList;
  }
  gtk_init();
  Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_List", 2); //$NON-NLS-1$
  long /*int*/ GtkPrinterFunc_List = printerCallback.getAddress();
  if (GtkPrinterFunc_List == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
  OS.gtk_enumerate_printers(GtkPrinterFunc_List, 0, 0, true);
  /*
  * This call to gdk_threads_leave() is a temporary work around
  * to avoid deadlocks when gdk_threads_init() is called by native
  * code outside of SWT (i.e AWT, etc). It ensures that the current
  * thread leaves the GTK lock acquired by the function above.
  */
  OS.gdk_threads_leave();
  printerCallback.dispose ();
  return printerList;
}
View Full Code Here


  findData = null;
  if (OS.GTK_VERSION < OS.VERSION (2, 10, 0) || disablePrinting) {
    return null;
  }
  gtk_init();
  Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_Default", 2); //$NON-NLS-1$
  long /*int*/ GtkPrinterFunc_Default = printerCallback.getAddress();
  if (GtkPrinterFunc_Default == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
  OS.gtk_enumerate_printers(GtkPrinterFunc_Default, 0, 0, true);
  /*
  * This call to gdk_threads_leave() is a temporary work around
  * to avoid deadlocks when gdk_threads_init() is called by native
  * code outside of SWT (i.e AWT, etc). It ensures that the current
  * thread leaves the GTK lock acquired by the function above.
  */
  OS.gdk_threads_leave();
  printerCallback.dispose ();
  return findData;
}
View Full Code Here

  return 0;
}

static long /*int*/ gtkPrinterFromPrinterData(PrinterData data) {
  gtk_init();
  Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_FindNamedPrinter", 2); //$NON-NLS-1$
  long /*int*/ GtkPrinterFunc_FindNamedPrinter = printerCallback.getAddress();
  if (GtkPrinterFunc_FindNamedPrinter == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
  findPrinter = 0;
  findData = data;
  OS.gtk_enumerate_printers(GtkPrinterFunc_FindNamedPrinter, 0, 0, true);
  /*
  * This call to gdk_threads_leave() is a temporary work around
  * to avoid deadlocks when gdk_threads_init() is called by native
  * code outside of SWT (i.e AWT, etc). It ensures that the current
  * thread leaves the GTK lock acquired by the function above.
  */
  OS.gdk_threads_leave();
  printerCallback.dispose ();
  return findPrinter;
}
View Full Code Here

  return proxy;

ClipboardProxy(Display display) { 
  this.display = display;
  getFunc = new Callback( this, "getFunc", 4); //$NON-NLS-1$
  if (getFunc.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
  clearFunc = new Callback( this, "clearFunc", 2); //$NON-NLS-1$
  if (clearFunc.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
}
View Full Code Here

  return proxy;

ClipboardProxy(Display display) { 
  this.display = display;
  getFunc = new Callback( this, "getFunc", 4); //$NON-NLS-1$
  if (getFunc.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
  clearFunc = new Callback( this, "clearFunc", 2); //$NON-NLS-1$
  if (clearFunc.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
}
View Full Code Here

  printerList = new PrinterData [0];
  if (OS.GTK_VERSION < OS.VERSION (2, 10, 0) || disablePrinting) {
    return printerList;
  }
  gtk_init();
  Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_List", 2); //$NON-NLS-1$
  int /*long*/ GtkPrinterFunc_List = printerCallback.getAddress();
  if (GtkPrinterFunc_List == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
  OS.gtk_enumerate_printers(GtkPrinterFunc_List, 0, 0, true);
  /*
  * This call to gdk_threads_leave() is a temporary work around
  * to avoid deadlocks when gdk_threads_init() is called by native
  * code outside of SWT (i.e AWT, etc). It ensures that the current
  * thread leaves the GTK lock acquired by the function above.
  */
  OS.gdk_threads_leave();
  printerCallback.dispose ();
  return printerList;
}
View Full Code Here

  findData = null;
  if (OS.GTK_VERSION < OS.VERSION (2, 10, 0) || disablePrinting) {
    return null;
  }
  gtk_init();
  Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_Default", 2); //$NON-NLS-1$
  int /*long*/ GtkPrinterFunc_Default = printerCallback.getAddress();
  if (GtkPrinterFunc_Default == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
  OS.gtk_enumerate_printers(GtkPrinterFunc_Default, 0, 0, true);
  /*
  * This call to gdk_threads_leave() is a temporary work around
  * to avoid deadlocks when gdk_threads_init() is called by native
  * code outside of SWT (i.e AWT, etc). It ensures that the current
  * thread leaves the GTK lock acquired by the function above.
  */
  OS.gdk_threads_leave();
  printerCallback.dispose ();
  return findData;
}
View Full Code Here

  return 0;
}

static int /*long*/ gtkPrinterFromPrinterData(PrinterData data) {
  gtk_init();
  Callback printerCallback = new Callback(Printer.class, "GtkPrinterFunc_FindNamedPrinter", 2); //$NON-NLS-1$
  int /*long*/ GtkPrinterFunc_FindNamedPrinter = printerCallback.getAddress();
  if (GtkPrinterFunc_FindNamedPrinter == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
  findPrinter = 0;
  findData = data;
  OS.gtk_enumerate_printers(GtkPrinterFunc_FindNamedPrinter, 0, 0, true);
  /*
  * This call to gdk_threads_leave() is a temporary work around
  * to avoid deadlocks when gdk_threads_init() is called by native
  * code outside of SWT (i.e AWT, etc). It ensures that the current
  * thread leaves the GTK lock acquired by the function above.
  */
  OS.gdk_threads_leave();
  printerCallback.dispose ();
  return findPrinter;
}
View Full Code Here

            sel_aboutMenuItemSelected_ = registerName( osCls, "aboutMenuItemSelected:" ); //$NON-NLS-1$
        }

        // Create an SWT Callback object that will invoke the actionProc method of our internal
        // callbackObject.
        proc3Args = new Callback( callbackObject, "actionProc", 3 ); //$NON-NLS-1$
        Method getAddress = Callback.class.getMethod( "getAddress", new Class[0] );
        Object object = getAddress.invoke( proc3Args, (Object[]) null );
        long proc3 = convertToLong( object );
        if ( proc3 == 0 ) {
            SWT.error( SWT.ERROR_NO_MORE_CALLBACKS );
View Full Code Here

}

void addWindowSubclass () {
  int /*long*/ hwndChild = OS.GetWindow (browser.handle, OS.GW_CHILD);
  if (SubclassProc == null) {
    SubclassProc = new Callback (MozillaDelegate.class, "windowProc", 4); //$NON-NLS-1$
    MozillaProc = OS.GetWindowLongPtr (hwndChild, OS.GWL_WNDPROC);
  }
  OS.SetWindowLongPtr (hwndChild, OS.GWL_WNDPROC, SubclassProc.getAddress ());
}
View Full Code Here

TOP

Related Classes of org.eclipse.swt.internal.Callback

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.