Ejemplo n.º 1
0
void XFunctions::StoreConfigurationValues() 
{
   wxString path;
   path.Printf(wxT("/Aurora/XFunctions/FftSize"));
   m_pAuroraCfg->Write(path, GetFFTLength());
   path.Printf(wxT("/Aurora/XFunctions/WindowType"));
   m_pAuroraCfg->Write(path, AFSampleCount(GetWindowType()));
   
   path.Printf(wxT("/Aurora/XFunctions/XFunctionType"));
   m_pAuroraCfg->Write(path, AFSampleCount(GetXFunctionType()));

   path.Printf(wxT("/Aurora/XFunctions/ProbeFreeField"));
   m_pAuroraCfg->Write(path, IsProbeFreeField());
   path.Printf(wxT("/Aurora/XFunctions/ProbeRigidTerminated"));
   m_pAuroraCfg->Write(path, IsProbeRigidTerminated());
   path.Printf(wxT("/Aurora/XFunctions/SoundSpeed"));
   m_pAuroraCfg->Write(path, GetSoundSpeed());
   path.Printf(wxT("/Aurora/XFunctions/ProbeMicDistance"));
   m_pAuroraCfg->Write(path, GetProbeDistance());
   path.Printf(wxT("/Aurora/XFunctions/ProbeMaxFreq"));
   m_pAuroraCfg->Write(path, GetProbeMaxFreq());
   
   path.Printf(wxT("/Aurora/XFunctions/FollowingFilter"));
   m_pAuroraCfg->Write(path, IsFollowingFilterEnabled());
   path.Printf(wxT("/Aurora/XFunctions/FollowingBandwidth"));
   m_pAuroraCfg->Write(path, GetFollowingBandwidth());
   
   path.Printf(wxT("/Aurora/XFunctions/Normalize"));
   m_pAuroraCfg->Write(path, IsNormalizeSet());
   path.Printf(wxT("/Aurora/XFunctions/ShiftToHalfWindow"));
   m_pAuroraCfg->Write(path, IsShiftToHalfWindowSet());
   path.Printf(wxT("/Aurora/XFunctions/CoherenceWeighting"));
   m_pAuroraCfg->Write(path, IsCoherenceWeightingSet());
   path.Printf(wxT("/Aurora/XFunctions/HilbertTransform"));
   m_pAuroraCfg->Write(path, IsHilbertTransformSet());
   path.Printf(wxT("/Aurora/XFunctions/TimeReversal"));
   m_pAuroraCfg->Write(path, IsTimeReversalSet());
   path.Printf(wxT("/Aurora/XFunctions/SaveMultispectrum"));
   m_pAuroraCfg->Write(path, IsSaveMultispectrumSet());
   path.Printf(wxT("/Aurora/XFunctions/DiracPulse"));
   m_pAuroraCfg->Write(path, IsDiracPulseSet());
   
   path.Printf(wxT("/Aurora/XFunctions/TriggerLevel"));
   m_pAuroraCfg->Write(path, GetTriggerLevel());
   
   // Writes immediately changes
   m_pAuroraCfg->Flush();
}
Ejemplo n.º 2
0
DLLIMPORT void GetWord (TCurrentMode *P)
{
	TCHAR wClassName[64];
	TKnownWndClass WndClass;
	char *p;

	if (GetClassName(P->WND, wClassName, sizeof(wClassName) / sizeof(TCHAR))==0)
		wClassName[0] = '\0';
	WndClass = GetWindowType(P->WND, wClassName);
	p = TryGetWordFromAnyWindow(WndClass, P->WND, P->Pt, &(P->BeginPos));
	if (p) {
	    P->WordLen = strlen(p);
		strcpy(P->MatchedWord, p);
		free(p);
	} else {
		P->WordLen = 0;
	}
}
Ejemplo n.º 3
0
DLLIMPORT void GetWord (TCurrentMode *P)
{
	TCHAR wClassName[64];
	TKnownWndClass WndClass;
	char *p;

	if (GetClassName(P->WND, wClassName, sizeof(wClassName) / sizeof(wClassName[0]))==0)
		wClassName[0] = TEXT('\0');
	WndClass = GetWindowType(P->WND, wClassName);
	p = TryGetWordFromAnyWindow(WndClass, P->WND, P->Pt, &(P->BeginPos));
	if (p) {
		assert(strlen(p) < MAX_SCAN_TEXT_SIZE);
		strcpy(P->MatchedWord, p);
		free(p);
	} else {
		P->MatchedWord[0] = '\0';
		P->BeginPos = 0;
	}
}
// return true if the window described by this WindowInfo has a type
// equal to the given type
bool nsWindowInfo::TypeEquals(const nsAString &aType)
{
    nsAutoString rtnString;
    GetWindowType(mWindow, rtnString);
    return rtnString == aType;
}
Ejemplo n.º 5
0
        FOR_EACH_ARRAY(Size, GroupSize)
        {
            if (Size->cx == cx && Size->cy == cy)
                return GroupWindow;
        }

        FOR_EACH_ARRAY(Size, DiscussSize)
        {
            if (Size->cx == cx && Size->cy == cy)
                return DiscussWindow;
        }

        return UnknownWindow;
    };

    ULONG WindowType = GetWindowType(hWnd, cx, cy);

    static HWND LastChatFrame;

    if (WindowType == UnknownWindow)
    {
        if (Flags == 0x15 &&
            cx == -1 &&
            cy == -1 &&
            X != -1 &&
            Y != -1 &&
            hWndInsertAfter == HWND_TOP
           )
        {
            LastChatFrame = hWnd;
        }
Ejemplo n.º 6
0
NS_IMETHODIMP
sbWindowWatcher::GetWindow(const nsAString& aWindowType,
                           nsIDOMWindow**   _retval)
{
  // Validate arguments.
  NS_ENSURE_ARG_POINTER(_retval);

  // Function variables.
  nsCOMPtr<nsIDOMWindow> retWindow;
  bool                 success;
  nsresult               rv;

  // This method may only be called on the main thread.
  NS_ENSURE_TRUE(SB_IsMainThread(mThreadManager), NS_ERROR_UNEXPECTED);

  // Operate within the monitor.
  mozilla::ReentrantMonitorAutoEnter autoMonitor(mMonitor);

  // Get an enumerator of all windows of the specified type, sorted from oldest
  // to youngest.
  nsCOMPtr<nsISimpleEnumerator> enumerator;
  rv = mWindowMediator->GetEnumerator(aWindowType.BeginReading(),
                                      getter_AddRefs(enumerator));
  NS_ENSURE_SUCCESS(rv, rv);

  // Search for the most recently focused ready window of the specified type.
  // The enumerator enumerates from oldest to youngest (least recently focused
  // to most recently), so the last matching window is the most recently focused
  // one.
  bool hasMoreElements;
  rv = enumerator->HasMoreElements(&hasMoreElements);
  NS_ENSURE_SUCCESS(rv, rv);
  while (hasMoreElements) {
    // Get the window.  Skip if not ready.
    nsCOMPtr<nsISupports> _window;
    nsCOMPtr<nsIDOMWindow> window;
    rv = enumerator->GetNext(getter_AddRefs(_window));
    NS_ENSURE_SUCCESS(rv, rv);
    window = do_QueryInterface(_window, &rv);
    NS_ENSURE_SUCCESS(rv, rv);
    rv = enumerator->HasMoreElements(&hasMoreElements);
    NS_ENSURE_SUCCESS(rv, rv);

    // Skip window if not ready.
    WindowInfo* windowInfo;
    success = mWindowInfoTable.Get(window, &windowInfo);
    if (!success || !(windowInfo->isReady))
      continue;

    // Get the window type.
    nsAutoString windowType;
    rv = GetWindowType(window, windowType);
    if (NS_FAILED(rv))
      continue;

    // Check for a match.
    if (aWindowType.Equals(windowType)) {
      retWindow = window;
    }
  }

  // Return results.
  NS_IF_ADDREF(*_retval = retWindow);

  return NS_OK;
}
Ejemplo n.º 7
0
int CALLBACK GetMemoData( LPVOID lp, int nGetType, LPVOID lpData, int nDataSize)
{
	switch( nGetType)
	{
	case _GET_MEMO:
		return GetMemo( lp, lpData, nDataSize);
	case _GET_TITLE:
		return GetTitle( lp, lpData, nDataSize);
	case _GET_FONT:
		return GetFont( lp, lpData, nDataSize);
	case _GET_FORECOLOR:
		return GetForeColor( lp, lpData, nDataSize);
	case _GET_BACKCOLOR:
		return GetBackColor( lp, lpData, nDataSize);
	case _GET_ICON:
		return GetIconIndex( lp);
	case _GET_ZORDER:
		return GetZOrder( lp);
	case _GET_WINDOWTYPE:
		return GetWindowType( lp);
	case _GET_RECT_NORMAL:
		return GetNormalRect( lp, lpData, nDataSize);
	case _GET_POINT_TITLE:
		return GetTitlePoint( lp, lpData, nDataSize);
	case _GET_POINT_ICON:
		return GetIconPoint( lp, lpData, nDataSize);
	case _GET_RECT_TITLE:
		return GetTitleRect( lp, lpData, nDataSize);
	case _GET_RECT_ICON:
		return GetIconRect( lp, lpData, nDataSize);

	case _GET_TIMERENABLE:
		return IsTimerEnable( lp);
	case _GET_TIMER_TYPE:
		return GetTimerType( lp);
	case _GET_TIMER_MONTH:
		return GetTimerMonth( lp);
	case _GET_TIMER_DAY:
		return GetTimerDay( lp);
	case _GET_TIMER_HOUR:
		return GetTimerHour( lp);
	case _GET_TIMER_MIN:
		return GetTimerMin( lp);
	case _GET_TIMER_WEEK:
		return GetTimerWeek( lp);
	case _GET_TIMER_SOUND:
		return GetTimerSound( lp, lpData, nDataSize);

	case _GET_LINKENABLE:
		return IsLink( lp);
	case _GET_LINK_FILE:
		return GetLinkFile( lp, lpData, nDataSize);
	case _GET_LINK_PARAM:
		return GetLinkParam( lp, lpData, nDataSize);

	case _GET_CREATE_YEAR:
		return GetCreateYear( lp);
	case _GET_CREATE_MONTH:
		return GetCreateMonth( lp);
	case _GET_CREATE_DAY:
		return GetCreateDay( lp);

	case _GET_DEF_FONT:
		return GetDefFont( lpData, nDataSize);
	case _GET_DEF_FORECLR:
		return GetDefForeColor( lpData, nDataSize);
	case _GET_DEF_BACKCLR:
		return GetDefBackColor( lpData, nDataSize);

	case _GET_VERSION:
		return VERSION_CODE;
	}
	return 0;
}