Package org.sf.feeling.swt.win32.internal.extension.util

Examples of org.sf.feeling.swt.win32.internal.extension.util.LONG


      float[] point = new float[2];
      float[] bounds = new float[4];
      path.getBounds(bounds);
      point[0] = (bounds[0] + bounds[0] + bounds[2]) / 2f;
      point[1] = (bounds[1] + bounds[1] + bounds[3]) / 2f;
      GCExtension extension = new GCExtension(gc);
      extension.fillGradientPath(path, point, glowColor, 255, new Color[] { glowColor },
          new int[] { 0 });
      path.dispose();
      gc.setClipping((Region) null);

      gc.setAdvanced(false);
      return;
    }

    if (!(selected)) pattern = new Pattern(null, 0, glossy.y, 0, glossy.y + glossy.height,
        themeRender.getTool_item_bg_glossy_track1(), themeRender
        .getTool_item_bg_glossy_track1_alpha(), themeRender
        .getTool_item_bg_glossy_track2(), themeRender
        .getTool_item_bg_glossy_track2_alpha());
    else
      pattern = new Pattern(null, 0, glossy.y, 0, glossy.y + glossy.height, themeRender
          .getTool_item_bg_glossy_selected1(), themeRender
          .getTool_item_bg_glossy_selected1_alpha(), themeRender
          .getTool_item_bg_glossy_selected2(), themeRender
          .getTool_item_bg_glossy_selected2_alpha());
    path = GraphicsUtil.createTopRoundRectangle(glossy, 2);
    gc.setBackgroundPattern(pattern);
    gc.fillPath(path);
    path.dispose();

    Color innerBorderColor = (selected)
    || ((getStyle() & SWT.TOGGLE) != 0 && getSelection()) ? themeRender
        .getTool_item_inner_border_selected() : themeRender
        .getTool_item_inner_border_track();

        path = GraphicsUtil.createRoundRectangle(innerBorder, 2);
        gc.setForeground(innerBorderColor);
        gc.drawPath(path);
        path.dispose();

        if (!((menuTracked || (getMenu() != null && !canSelected())) && selected)) {
          path = GraphicsUtil.createRoundRectangle(glow, 2);
          gc.setClipping(path);
          path.dispose();

          Color glowColor = themeRender.getTool_item_bg_glow_track();

          if ((getStyle() & SWT.TOGGLE) != 0 && getSelection()) {
            glowColor = themeRender.getTool_item_bg_checked_glow_track();
          }

          path = createBottomRadialPath(glow);
          float[] point = new float[2];
          float[] bounds = new float[4];
          path.getBounds(bounds);
          point[0] = (bounds[0] + bounds[0] + bounds[2]) / 2f;
          point[1] = (bounds[1] + bounds[1] + bounds[3]) / 2f;
          GCExtension extension = new GCExtension(gc);
          extension.fillGradientPath(path, point, glowColor, 255, new Color[] { glowColor },
              new int[] { 0 });
          path.dispose();
          gc.setClipping((Region) null);
        }
        gc.setAdvanced(false);
View Full Code Here


   * keystroke is repeated as a result of the user's holding down the key.
   *
   * @return the repeat count.
   */
  public int getRepeatCount() {
    FlagSet flagSet = new FlagSet(getLParam());
    return flagSet.getBits(0, 15);
  }
View Full Code Here

   * Specifies the scan code. The value depends on the OEM.
   *
   * @return scan code.
   */
  public int getScanCode() {
    FlagSet flagSet = new FlagSet(getLParam());
    return flagSet.getBits(16, 23);
  }
View Full Code Here

   * key on the numeric keypad.
   *
   * @return true, if the key is an extended key; otherwise, it is false.
   */
  public boolean isExtendedKey() {
    FlagSet flagSet = new FlagSet(getLParam());
    return flagSet.getBit(24);
  }
View Full Code Here

   * Specifies the context code.
   *
   * @return true, if the ALT key is down; otherwise, it is false.
   */
  public boolean isAltPressed() {
    FlagSet flagSet = new FlagSet(getLParam());
    return flagSet.getBit(29);
  }
View Full Code Here

   *
   * @return true, if the key is down before the message is sent; false if the
   *         key is up.
   */
  public boolean getPreviousState() {
    FlagSet flagSet = new FlagSet(getLParam());
    return flagSet.getBit(30);
  }
View Full Code Here

   * Specifies the transition state.
   *
   * @return true, if the key is being pressed; false if it is being released.
   */
  public boolean getTransitionState() {
    FlagSet flagSet = new FlagSet(getLParam());
    return !flagSet.getBit(31);
  }
View Full Code Here

      if (oleMsgProcAddress == 0)
        SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
      int threadId = Extension.GetCurrentThreadId();
      procHandle = Extension.SetWindowsHookEx(Extension.WH_GETMESSAGE,
          oleMsgProcAddress, 0, threadId);
      Display.getDefault().setData(HHOOK, new LONG(procHandle));
      Display.getDefault().setData(HHOOKMSG, new MSG());
    }
  }
View Full Code Here

    }
  }

  int OleMsgProc(int /* long */code, int /* long */wParam,
      int /* long */lParam) {
    LONG hHook = (LONG) Display.getDefault().getData(HHOOK);
    if (hHook == null)
      return 0;
    if (code < 0) {
      return OS.CallNextHookEx(hHook.value, (int) /* 64 */code, wParam,
          lParam);
View Full Code Here

    return Extension.DestroyWindow(handle);
  }

  private static int enumChildrenProc(int hwnd, int lParam)
  {
    childList.add(new LONG(hwnd));
    return 1;
  }
View Full Code Here

TOP

Related Classes of org.sf.feeling.swt.win32.internal.extension.util.LONG

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.