Package org.eclipse.swt.internal.win32

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


   * @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

   */
  public static RECT getAppBarPosition(int handle) {
    APPBARDATA appBarData = new APPBARDATA();
    appBarData.hWnd = handle;
    Extension.SHAppBarMessage(Win32.AMB_GETTASKBARPOS, appBarData);
    RECT rc = new RECT();
    rc.left = appBarData.rcLeft;
    rc.top = appBarData.rcTop;
    rc.right = appBarData.rcRight;
    rc.bottom = appBarData.rcBottom;
    return rc;
View Full Code Here

    if (itemMap.containsKey(item.getId()))
      return;
    int uFlags = Win32.MF_BYCOMMAND;
    if (style == Win32.MF_BYPOSITION)
      uFlags = Win32.MF_BYPOSITION;
    TCHAR lpNewItem = null;
    if ((item.getStyle() & SWT.SEPARATOR) != 0) {
      uFlags |= Win32.MF_SEPARATOR;
    } else {
      uFlags |= Win32.MF_STRING;
      lpNewItem = new TCHAR(0, item.getText(), true);
    }
    Extension2.InsertMenu(hMenu, position, uFlags, item.getId().intValue(),
        lpNewItem);
    if ((item.getStyle() & SWT.SEPARATOR) == 0) {
      item.setEnabled(item.isEnabled());
View Full Code Here

TOP

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

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.