Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Member Functions | Private Member Functions | Private Attributes
nsAttentionTimerMonitor Class Reference
Collaboration diagram for nsAttentionTimerMonitor:
Collaboration graph
[legend]

List of all members.

Classes

struct  TimerInfo

Public Member Functions

 nsAttentionTimerMonitor ()
 ~nsAttentionTimerMonitor ()
void AddTimer (HWND timerWindow, HWND flashWindow, PRInt32 maxFlashCount, UINT timerID)
HWND GetFlashWindowFor (HWND timerWindow)
PRInt32 GetMaxFlashCount (HWND timerWindow)
PRInt32 GetFlashCount (HWND timerWindow)
void IncrementFlashCount (HWND timerWindow)
void KillTimer (HWND timerWindow)
void SetFlashed (HWND timerWindow)

Private Member Functions

TimerInfoFindInfo (HWND timerWindow)
void AppendTimer (TimerInfo *info)
void RemoveTimer (TimerInfo *info)

Private Attributes

TimerInfomHeadTimer

Detailed Description

Definition at line 761 of file nsWindow.cpp.


Class Documentation

struct nsAttentionTimerMonitor::TimerInfo

Definition at line 827 of file nsWindow.cpp.

Collaboration diagram for nsAttentionTimerMonitor::TimerInfo:
Class Members
PRInt32 flashCount
HWND flashWindow
PRBool hasFlashed
PRInt32 maxFlashCount
TimerInfo * next
UINT timerID
HWND timerWindow

Constructor & Destructor Documentation

Definition at line 763 of file nsWindow.cpp.

: mHeadTimer(0) { }

Definition at line 764 of file nsWindow.cpp.

                             {
    TimerInfo *current, *next;
    for (current = mHeadTimer; current; current = next) {
      next = current->next;
      delete current;
    }
  }

Member Function Documentation

void nsAttentionTimerMonitor::AddTimer ( HWND  timerWindow,
HWND  flashWindow,
PRInt32  maxFlashCount,
UINT  timerID 
) [inline]

Definition at line 771 of file nsWindow.cpp.

                                                                                         {
    TimerInfo *info;
    PRBool    newInfo = PR_FALSE;
    info = FindInfo(timerWindow);
    if (!info) {
      info = new TimerInfo;
      newInfo = PR_TRUE;
    }
    if (info) {
      info->timerWindow = timerWindow;
      info->flashWindow = flashWindow;
      info->maxFlashCount = maxFlashCount;
      info->flashCount = 0;
      info->timerID = timerID;
      info->hasFlashed = PR_FALSE;
      info->next = 0;
      if (newInfo)
        AppendTimer(info);
    }
  }

Here is the call graph for this function:

void nsAttentionTimerMonitor::AppendTimer ( TimerInfo info) [inline, private]

Definition at line 843 of file nsWindow.cpp.

                                    {
    if (!mHeadTimer)
      mHeadTimer = info;
    else {
      TimerInfo *scan, *last;
      for (scan = mHeadTimer; scan; scan = scan->next)
        last = scan;
      last->next = info;
    }
  }

Here is the caller graph for this function:

TimerInfo* nsAttentionTimerMonitor::FindInfo ( HWND  timerWindow) [inline, private]

Definition at line 836 of file nsWindow.cpp.

                                        {
    TimerInfo *scan;
    for (scan = mHeadTimer; scan; scan = scan->next)
      if (scan->timerWindow == timerWindow)
        break;
    return scan;
  }

Here is the caller graph for this function:

Definition at line 799 of file nsWindow.cpp.

                                          {
    TimerInfo *info = FindInfo(timerWindow);
    return info ? info->flashCount : -1;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 791 of file nsWindow.cpp.

                                           {
    TimerInfo *info = FindInfo(timerWindow);
    return info ? info->flashWindow : 0;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 795 of file nsWindow.cpp.

                                             {
    TimerInfo *info = FindInfo(timerWindow);
    return info ? info->maxFlashCount : -1;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 803 of file nsWindow.cpp.

                                             {
    TimerInfo *info = FindInfo(timerWindow);
    ++(info->flashCount);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nsAttentionTimerMonitor::KillTimer ( HWND  timerWindow) [inline]

Definition at line 807 of file nsWindow.cpp.

                                   {
    TimerInfo *info = FindInfo(timerWindow);
    if (info) {
      // make sure it's unflashed and kill the timer

      if (info->hasFlashed)
        ::FlashWindow(info->flashWindow, FALSE);

      ::KillTimer(info->timerWindow, info->timerID);
      RemoveTimer(info);
      delete info;
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nsAttentionTimerMonitor::RemoveTimer ( TimerInfo info) [inline, private]

Definition at line 853 of file nsWindow.cpp.

                                    {
    TimerInfo *scan, *last = 0;
    for (scan = mHeadTimer; scan && scan != info; scan = scan->next)
      last = scan;
    if (scan) {
      if (last)
        last->next = scan->next;
      else
        mHeadTimer = scan->next;
    }
  }

Here is the caller graph for this function:

void nsAttentionTimerMonitor::SetFlashed ( HWND  timerWindow) [inline]

Definition at line 820 of file nsWindow.cpp.

                                    {
    TimerInfo *info = FindInfo(timerWindow);
    if (info)
      info->hasFlashed = PR_TRUE;
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 865 of file nsWindow.cpp.


The documentation for this class was generated from the following file: