Package org.eclipse.swt.internal.win32

Examples of org.eclipse.swt.internal.win32.RECT


        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


      return 0;
    if (code < 0) {
      return OS.CallNextHookEx(hHook.value, (int) /* 64 */code, wParam,
          lParam);
    }
    MSG msg = (MSG) Display.getDefault().getData(HHOOKMSG);
    OS.MoveMemory(msg, lParam, MSG.sizeof);
    if (!container.isDisposed()) {
      if (container.getHookInterceptor() != null) {
        Msg message = new Msg(msg);
        if (container.getHookInterceptor().intercept(message, code,
View Full Code Here

   * @param point
   *            a memory MSG struct point
   * @return An MSG object.
   */
  public static Msg valueOf(int point) {
    MSG msg = new MSG();
    Extension.MoveMemory(msg, point, MSG.sizeof);
    return new Msg(msg);
  }
View Full Code Here

   *
   * @return a global OSVersionInfo instance.
   */
  public static OSVersionInfo getInstance() {
    if (versionInfo == null) {
      OSVERSIONINFO info = new OSVERSIONINFOW();
      info.dwOSVersionInfoSize = OSVERSIONINFOW.sizeof;
      if (!Extension.GetVersionExW((OSVERSIONINFOW) info)) {
        info = new OSVERSIONINFOA();
        info.dwOSVersionInfoSize = OSVERSIONINFOA.sizeof;
        Extension.GetVersionExA((OSVERSIONINFOA) info);
View Full Code Here

  public static OSVersionInfo getInstance() {
    if (versionInfo == null) {
      OSVERSIONINFO info = new OSVERSIONINFOW();
      info.dwOSVersionInfoSize = OSVERSIONINFOW.sizeof;
      if (!Extension.GetVersionExW((OSVERSIONINFOW) info)) {
        info = new OSVERSIONINFOA();
        info.dwOSVersionInfoSize = OSVERSIONINFOA.sizeof;
        Extension.GetVersionExA((OSVERSIONINFOA) info);
      }
      versionInfo = new OSVersionInfo();
      versionInfo.buildNumber = info.dwBuildNumber;
View Full Code Here

   *
   * @return a global OSVersionInfo instance.
   */
  public static OSVersionInfo getInstance() {
    if (versionInfo == null) {
      OSVERSIONINFO info = new OSVERSIONINFOW();
      info.dwOSVersionInfoSize = OSVERSIONINFOW.sizeof;
      if (!Extension.GetVersionExW((OSVERSIONINFOW) info)) {
        info = new OSVERSIONINFOA();
        info.dwOSVersionInfoSize = OSVERSIONINFOA.sizeof;
        Extension.GetVersionExA((OSVERSIONINFOA) info);
View Full Code Here

   *            contains the client coordinates to be converted.
   * @return converted point of the sreen coordinates.
   */
  public static Point clientToScreen(int handle, Point point)
  {
    POINT pt = new POINT();
    pt.x = point.x;
    pt.y = point.y;
    OS.ClientToScreen(handle, pt);
    return new Point(pt.x, pt.y);
  }
View Full Code Here

   *            specifies the y-coordinate of the point
   * @return a handle to the window that contains the specified point
   */
  public static int getWindowFromPoint(int x, int y)
  {
    POINT point = new POINT();
    point.x = x;
    point.y = y;
    return Extension.WindowFromPoint(point);
  }
View Full Code Here

   *            screen coordinates.
   * @return converted point of the client-area coordinates.
   */
  public static Point screenToClient(int handle, Point point)
  {
    POINT pt = new POINT();
    pt.x = point.x;
    pt.y = point.y;
    OS.ScreenToClient(handle, pt);
    return new Point(pt.x, pt.y);
  }
View Full Code Here

   * @return the rectangle information of the specified window.
   *
   */
  public static Rectangle getWindowRect(int hwnd)
  {
    RECT rect = new RECT();
    Extension.GetWindowRect(hwnd, rect);
    return new Rectangle(rect.left, rect.top, rect.right - rect.left, rect.bottom
        - rect.top);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.internal.win32.RECT

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.