Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
CursorSpinner Class Reference

#include <nsWindow.h>

List of all members.

Public Member Functions

 CursorSpinner ()
 ~CursorSpinner ()
void StartSpinCursor ()
void StopSpinCursor ()

Private Member Functions

short GetNextCursorFrame ()

Static Private Member Functions

static pascal void SpinCursor (EventLoopTimerRef inTimer, void *inUserData)

Private Attributes

short mSpinCursorFrame
EventLoopTimerUPP mTimerUPP
EventLoopTimerRef mTimerRef

Detailed Description

Definition at line 65 of file nsWindow.h.


Constructor & Destructor Documentation

Definition at line 794 of file nsWindow.cpp.

                             :
    mSpinCursorFrame(0), mTimerUPP(nsnull), mTimerRef(nsnull)
{
   mTimerUPP = NewEventLoopTimerUPP(SpinCursor);
}

Here is the call graph for this function:

Definition at line 800 of file nsWindow.cpp.

{
    if (mTimerRef) ::RemoveEventLoopTimer(mTimerRef);
    if (mTimerUPP) ::DisposeEventLoopTimerUPP(mTimerUPP);
}

Member Function Documentation

short CursorSpinner::GetNextCursorFrame ( ) [private]

Definition at line 806 of file nsWindow.cpp.

{
    int result = kSpinCursorFirstFrame + mSpinCursorFrame;
    mSpinCursorFrame = (mSpinCursorFrame + 1) % 4;
    return (short) result;
}

Here is the caller graph for this function:

pascal void CursorSpinner::SpinCursor ( EventLoopTimerRef  inTimer,
void inUserData 
) [static, private]

Definition at line 837 of file nsWindow.cpp.

{
    CursorSpinner* cs = reinterpret_cast<CursorSpinner*>(inUserData);
    nsWindow::SetCursorResource(cs->GetNextCursorFrame());
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 813 of file nsWindow.cpp.

{
    OSStatus result = noErr;
    if (mTimerRef == nsnull)
    {
        result = ::InstallEventLoopTimer(::GetMainEventLoop(), 0, 0.25 * kEventDurationSecond,
                                         mTimerUPP, this, &mTimerRef);
        if (result != noErr)
        {
            mTimerRef = nsnull;
            nsWindow::SetCursorResource(kSpinCursorFirstFrame);
        }
    }
}

Here is the call graph for this function:

Definition at line 828 of file nsWindow.cpp.

{
    if (mTimerRef)
    {
        ::RemoveEventLoopTimer(mTimerRef);
        mTimerRef = nsnull;
    }
}

Member Data Documentation

Definition at line 73 of file nsWindow.h.

EventLoopTimerRef CursorSpinner::mTimerRef [private]

Definition at line 75 of file nsWindow.h.

EventLoopTimerUPP CursorSpinner::mTimerUPP [private]

Definition at line 74 of file nsWindow.h.


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