Package org.sf.feeling.swt.win32.extension.hook.data.struct

Examples of org.sf.feeling.swt.win32.extension.hook.data.struct.Msg


  private static int hKeyboardHook = 0;
  private static boolean isInstall = false;

  static int Keyboard_LLHookProc(int nCode, int wParam, int lParam) {
    if (interceptor != null) {
      InterceptorFlag flag = interceptor.intercept(nCode, wParam, lParam);
      if (InterceptorFlag.FALSE.equals(flag))
        return -1;
      else if (flag.isCustom())
        return flag.getValue();
    }
    return Extension.CallNextHookEx(hKeyboardHook, nCode, wParam, lParam);
  }
View Full Code Here


  private static int hJournalPlaybackHook = 0;
  private static boolean isInstall = false;

  static int JournalPlaybackHookProc(int nCode, int wParam, int lParam) {
    if (interceptor != null) {
      InterceptorFlag flag = interceptor.intercept(nCode, wParam, lParam);
      if (InterceptorFlag.FALSE.equals(flag))
        return -1;
      else if (flag.isCustom())
        return flag.getValue();
    }
    return Extension.CallNextHookEx(hJournalPlaybackHook, nCode, wParam,
        lParam);
  }
View Full Code Here

    /**
     * Notifies listeners about a hook event.
     */
    private void notifyListeners(HookData data) {
      for (int i = 0; i < listeners.size() && messageThreadAlive; i++) {
        HookEventListener listener = (HookEventListener) listeners
            .get(i);
        listener.acceptHookData(data);
      }
    }
View Full Code Here

  {
    if (listeners != null)
    {
      for (int i = 0; i < listeners.size(); i++)
      {
        final CDDriveChangeListener listener = (CDDriveChangeListener) listeners
            .get(i);
        Display.getDefault().asyncExec(new Runnable()
        {
          public void run()
          {
            if (event.type == CDDrive.DEVICE_LOADED) listener.driveLoaded(event);
            else if (event.type == CDDrive.DEVICE_EJECTED) listener
                .driveEjected(event);
          }
        });
      }
    }
View Full Code Here

      oleControlSite = new OleControlSite(oleFrame, SWT.NONE,
          "ShockwaveFlash.ShockwaveFlash");
      OleAutomation oleAutomation = new OleAutomation(oleControlSite);
      flashObject = new OleObject(oleAutomation);
      created = true;
      final OleMsgHook hook = new OleMsgHook(this);
      oleControlSite.addDisposeListener(new DisposeListener() {

        public void widgetDisposed(DisposeEvent e) {
          hook.unInstallHook();
        }

      });
      hook.installHook();
      activate();
    } catch (SWTException ex) {
      if (oleFrame != null && !oleFrame.isDisposed())
        oleFrame.dispose();
      errorLabel = new CLabel(this, SWT.CENTER);
View Full Code Here

    try {
      // Create an Automation object for access to extended capabilities
      oleControlSite = new OleControlSite(oleFrame, SWT.NONE,
          "ShockwaveFlash.ShockwaveFlash");
      OleAutomation oleAutomation = new OleAutomation(oleControlSite);
      flashObject = new OleObject(oleAutomation);
      created = true;
      final OleMsgHook hook = new OleMsgHook(this);
      oleControlSite.addDisposeListener(new DisposeListener() {

        public void widgetDisposed(DisposeEvent e) {
View Full Code Here

  public OleHookInterceptor getHookInterceptor() {
    return interceptor;
  }

  public static boolean canCreate() {
    RegistryKey key = new RegistryKey(RootKey.HKEY_CLASSES_ROOT,
        "ShockwaveFlash.ShockwaveFlash");
    if (!key.exists())
      return false;
    if (key.hasSubkey("CurVer"))
      return true;
    else
      return false;
  }
View Full Code Here

    Windows.hideTitleBar(shell.handle);
    Windows.setBorderThick(shell.handle, false);
    Windows.setWindowAsDialogModel(shell.handle, false);
    if (resizeHook == null) resizeHook = new WindowResizeHook(this);
    resizeHook.installHook();
    if (menuManager == null) menuManager = new SystemMenuManager(shell);
  }
View Full Code Here

      getBorder(IContainer.BORDER_SW).addListener(SWT.MouseMove, mouseResizeListener);
      getBorder(IContainer.BORDER_SW).addListener(SWT.MouseExit, mouseResizeListener);
    }

    {
      final WindowMoveListener mouseMoveListener = new WindowMoveListener(shell, true);
      titleArea.addListener(SWT.MouseDown, mouseMoveListener);
      titleArea.addListener(SWT.MouseMove, mouseMoveListener);
      titleArea.addListener(SWT.MouseUp, mouseMoveListener);

      Composite windowTitle = (Composite) titleArea.getData("title");
View Full Code Here

  private static MixerMsgHook hook;

  public static boolean openControl(Shell shell)
  {
    boolean result = Mixer.mixerOpen(shell.handle, deviceId);
    hook = new MixerMsgHook(shell);
    hook.installHook();
    shell.addDisposeListener(new DisposeListener()
    {
      public void widgetDisposed(DisposeEvent e)
      {
View Full Code Here

TOP

Related Classes of org.sf.feeling.swt.win32.extension.hook.data.struct.Msg

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.