Package org.sf.feeling.swt.win32.extension.widgets

Examples of org.sf.feeling.swt.win32.extension.widgets.CButton


   * @return the device id of the specific CD Drive. If the operation is
   *         successful, the id doesn't equals 0.
   */
  public static int getDeviceID(String path)
  {
    MCI_OPEN_PARMS parms = null;
    TCHAR strDeviceType = new TCHAR(0, MCI_DEVTYPE_CD_AUDIO, true);
    TCHAR strElementName = new TCHAR(0, path, true);
    int hHeap = Extension.GetProcessHeap();
    int byteCount = strDeviceType.length() * TCHAR.sizeof;
    int lpstrDeviceType = Extension
View Full Code Here


      ((MCI_OPEN_PARMSW) parms).lpstrDeviceType = lpstrDeviceType;
      ((MCI_OPEN_PARMSW) parms).lpstrElementName = lpstrElementName;
    }
    else
    {
      parms = new MCI_OPEN_PARMSA();
      parms.dwCallback = 0;
      ((MCI_OPEN_PARMSA) parms).lpstrDeviceType = lpstrDeviceType;
      ((MCI_OPEN_PARMSA) parms).lpstrElementName = lpstrElementName;
    }
    int res = Extension.MciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_ELEMENT,
View Full Code Here

        byteCount);
    Extension.MoveMemory(lpstrElementName, strElementName, byteCount);

    if (Extension.IsUnicode)
    {
      parms = new MCI_OPEN_PARMSW();
      parms.dwCallback = 0;
      ((MCI_OPEN_PARMSW) parms).lpstrDeviceType = lpstrDeviceType;
      ((MCI_OPEN_PARMSW) parms).lpstrElementName = lpstrElementName;
    }
    else
View Full Code Here

   * @return if the specific CD Drive is opened.
   */
  public static boolean isDoorOpened(int deviceID)
  {
    if (deviceID == 0) return false;
    MCI_STATUS_PARMS status = new MCI_STATUS_PARMS();
    status.dwItem = MCI_STATUS_MODE;
    int res = Extension.MciSendCommand(deviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT,
        status);
    if (res != 0) return false;
    return status.dwReturn == MCI_MODE_OPEN;
View Full Code Here

   * @return if the specific CD Drive is ready.
   */
  public static boolean isDiscReady(int deviceID)
  {
    if (deviceID == 0) return false;
    MCI_STATUS_PARMS status = new MCI_STATUS_PARMS();
    status.dwItem = MCI_STATUS_READY;
    int res = Extension.MciSendCommand(deviceID, MCI_STATUS, MCI_STATUS_ITEM, status);
    if (res != 0) return false;
    return status.dwReturn != 0;
  }
View Full Code Here

  /**
   * Get MEMORYSTATUS information and refresh MemoryStatus internal data.
   */
  public void refreshStatus()
  {
    MEMORYSTATUS status = Extension.GlobalMemoryStatus();
    memoryStatus.totalPhys = status.dwTotalPhys;
    memoryStatus.totalVirtual = status.dwTotalVirtual;
    memoryStatus.totalVirtual = status.dwTotalPageFile;
    memoryStatus.availPhys = status.dwAvailPhys;
    memoryStatus.availPageFile = status.dwAvailPageFile;
View Full Code Here

    return result;
  }

  public static MixerCaps getMixerCaps(int deviceId)
  {
    MIXERCAPS mixerCaps = null;
    if (Extension.IsUnicode) mixerCaps = new MIXERCAPSW();
    else
      mixerCaps = new MIXERCAPSA();
    if (mixerGetDevCaps(deviceId, mixerCaps)) return new MixerCaps(mixerCaps);
    return null;
View Full Code Here

  public String getSzPname()
  {
    char[] chars;
    if (mixerCaps instanceof MIXERCAPSA)
    {
      MIXERCAPSA mixerCapsA = (MIXERCAPSA) mixerCaps;
      chars = new char[Extension.MAX_PATH];
      byte[] bytes = mixerCapsA.szPname;
      OS.MultiByteToWideChar(Extension.CP_ACP, Extension.MB_PRECOMPOSED, bytes,
          bytes.length, chars, chars.length);
    }
View Full Code Here

  public static MixerCaps getMixerCaps(int deviceId)
  {
    MIXERCAPS mixerCaps = null;
    if (Extension.IsUnicode) mixerCaps = new MIXERCAPSW();
    else
      mixerCaps = new MIXERCAPSA();
    if (mixerGetDevCaps(deviceId, mixerCaps)) return new MixerCaps(mixerCaps);
    return null;
  }
View Full Code Here

      OS.MultiByteToWideChar(Extension.CP_ACP, Extension.MB_PRECOMPOSED, bytes,
          bytes.length, chars, chars.length);
    }
    else
    {
      MIXERCAPSW mixerCapsW = (MIXERCAPSW) mixerCaps;
      chars = mixerCapsW.szPname;
    }
    int index = 0;
    while (index < chars.length)
    {
View Full Code Here

TOP

Related Classes of org.sf.feeling.swt.win32.extension.widgets.CButton

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.