示例#1
0
LRESULT CALLBACK TimerWindowWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
#if PLATFORM(WIN)
    // Windows Media Player has a modal message loop that will deliver messages
    // to us at inappropriate times and we will crash if we handle them when
    // they are delivered. We repost all messages so that we will get to handle
    // them once the modal loop exits.
    if (PluginView::isCallingPlugin()) {
        PostMessage(hWnd, message, wParam, lParam);
        return 0;
    }
#endif

    if (message == WM_TIMER) {
        if (wParam == sharedTimerID) {
            KillTimer(timerWindowHandle, sharedTimerID);
            sharedTimerFiredFunction();
        }
#if !OS(WINCE)
        else if (wParam == endHighResTimerID) {
            KillTimer(timerWindowHandle, endHighResTimerID);
            highResTimerActive = false;
            timeEndPeriod(timerResolution);
        }
    } else if (message == timerFiredMessage) {
        InterlockedExchange(&pendingTimers, 0);
        processingCustomTimerMessage = true;
        sharedTimerFiredFunction();
        processingCustomTimerMessage = false;
#endif
    } else
        return DefWindowProc(hWnd, message, wParam, lParam);

    return 0;
}
示例#2
0
LRESULT CALLBACK TimerWindowWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    if (message == WM_TIMER) {
        if (timerID != TimerIdNone)
            sharedTimerFiredFunction();
    } else if (message == WM_USER) {
        if (timerID = TimerIdManual) {
            sharedTimerFiredFunction();
            PostMessage(hWnd, WM_USER, 0, 0);
        }
    } else
        return DefWindowProc(hWnd, message, wParam, lParam);

    return 0;
}
void fireTimerIfNeeded()
{
    ENTER_CRITICAL_SECTION;
	if (m_count>0) {
		m_count--;
		sharedTimerFiredFunction();
	}
	LEAVE_CRITICAL_SECTION;
}
示例#4
0
static LRESULT CALLBACK TimerWindowWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    if (message == timerFiredMessage) {
        processingCustomTimerMessage = true;
        sharedTimerFiredFunction();
        processingCustomTimerMessage = false;
    } else
        return DefWindowProc(hWnd, message, wParam, lParam);
    return 0;
}
示例#5
0
void catcher( int sig ) 
{
    if( sharedTimerFiredFunction ) {
#if !PLATFORM(GTK)
        incrementTimerCount();
#else
        sharedTimerFiredFunction();
#endif
    }
    else {
        DS_WAR("no sharedTimerFiredFunction\n");
    }

}
示例#6
0
static gboolean sharedTimerTimeoutCallback(gpointer)
{
    if (sharedTimerFiredFunction)
        sharedTimerFiredFunction();
    return FALSE;
}
示例#7
0
static gboolean timeout_cb(gpointer)
{
    if (sharedTimerFiredFunction)
        sharedTimerFiredFunction();
    return FALSE;
}
示例#8
0
static void timerFired(CFRunLoopTimerRef, void*)
{
    sharedTimerFiredFunction();
}
示例#9
0
static void CALLBACK timerFired(HWND, UINT, UINT_PTR, DWORD)
{
    sharedTimerFiredFunction();
}
void fireTimerIfNeeded()
{
   if (AtomicTestDecrease(&m_count) > 0)
      sharedTimerFiredFunction();
}
void WebKitTimer::Notify()
{
    sharedTimerFiredFunction();
}
示例#12
0
static void invokeCallback(void*)
{
    sharedTimerFiredFunction();
}
void fireTimerIfNeeded()
{
    ASSERT(sharedTimerFiredFunction);
    sharedTimerFiredFunction();
}