Package org.eclipse.swt.internal

Examples of org.eclipse.swt.internal.Callback


}

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


}

void addWindowSubclass () {
  long /*int*/ 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

   * @return the hook installed state
   */
  public static boolean installHook() {
    if (isInstalled())
      throw new IllegalStateException("Hook is already installed.");
    callback = new Callback(Mouse_LLHook.class, "Mouse_LLHookProc", 3);
    address = callback.getAddress();
    hMouseHook = Extension.SetWindowsHookEx(Win32.WH_MOUSE_LL, address,
        Extension.GetModuleHandle(null), 0);
    isInstall = hMouseHook != 0;
    return isInstall;
View Full Code Here

    if (OSVersionInfo.getInstance().getMajor() >= 6)
      throw new UnsupportedOperationException(
          "Windows Vista doesn't support Journal Record Hook");
    if (isInstalled())
      throw new IllegalStateException("Hook is already instaled.");
    callback = new Callback(JournalRecordHook.class,
        "JournalRecordHookProc", 3);
    address = callback.getAddress();
    hJournalRecordHook = Extension.SetWindowsHookEx(Win32.WH_JOURNALRECORD,
        address, Extension.GetModuleHandle(null), 0);
    isInstall = hJournalRecordHook != 0;
View Full Code Here

   * @return the hook installed state
   */
  public static boolean installHook() {
    if (isInstalled())
      throw new IllegalStateException("Hook is already instaled.");
    callback = new Callback(Keyboard_LLHook.class, "Keyboard_LLHookProc", 3);
    address = callback.getAddress();
    hKeyboardHook = Extension.SetWindowsHookEx(Win32.WH_KEYBOARD_LL,
        address, Extension.GetModuleHandle(null), 0);
    isInstall = hKeyboardHook != 0;
    return isInstall;
View Full Code Here

  public void installHook()
  {
    if (callback == null)
    {
      windowMsgCallback = new Callback(this, "WindowMsgProc", 4);
      newAddress = windowMsgCallback.getAddress();
      oldAddress = Extension.SetWindowLong(manager.getShell().handle, Win32.GWL_WNDPROC,
          newAddress);
      callback = new WNDCallback(manager.getShell(), oldAddress, newAddress)
      {
View Full Code Here

    if (OSVersionInfo.getInstance().getMajor() >= 6)
      throw new UnsupportedOperationException(
          "Windows Vista doesn't support Journal Playback Hook");
    if (isInstalled())
      throw new IllegalStateException("Hook is already instaled.");
    callback = new Callback(JournalPlaybackHook.class,
        "JournalPlaybackHookProc", 3);
    address = callback.getAddress();
    hJournalPlaybackHook = Extension.SetWindowsHookEx(
        Win32.WH_JOURNALPLAYBACK, address, Extension
            .GetModuleHandle(null), 0);
View Full Code Here

  /**
   * Install the hook.
   */
  public void installHook() {
    if (oleMsgCallback == null) {
      oleMsgCallback = new Callback(this, "OleMsgProc", 3);
      oleMsgProcAddress = oleMsgCallback.getAddress();
      if (oleMsgProcAddress == 0)
        SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
      int threadId = Extension.GetCurrentThreadId();
      procHandle = Extension.SetWindowsHookEx(Extension.WH_GETMESSAGE,
View Full Code Here

  public void installHook()
  {
    if (callback == null)
    {
      windowResizeCallback = new Callback(this, "WindowResizeProc", 4);
      newAddress = windowResizeCallback.getAddress();
      oldAddress = Extension2.SetWindowLongPtr(window.getShell().handle,
          Win32.GWL_WNDPROC, newAddress);
      callback = new WNDCallback(window.getShell(), oldAddress, newAddress)
      {
View Full Code Here

      return this;
  }

  private void installMouseHook() {
    if (mouseCallback == null) {
      mouseCallback = new Callback(this, "MouseProc", 3);
      newAddress = mouseCallback.getAddress();
      if (newAddress == 0)
        SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
      int threadId = Extension.GetCurrentThreadId();
      oldAddress = Extension.SetWindowsHookEx(Win32.WH_MOUSE, newAddress,
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.