Ejemplo n.º 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;
}
Ejemplo n.º 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;
}
Ejemplo n.º 3
0
void fireTimerIfNeeded()
{
    ENTER_CRITICAL_SECTION;
	if (m_count>0) {
		m_count--;
		sharedTimerFiredFunction();
	}
	LEAVE_CRITICAL_SECTION;
}
Ejemplo n.º 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;
}
Ejemplo n.º 5
0
void catcher( int sig ) 
{
    if( sharedTimerFiredFunction ) {
#if !PLATFORM(GTK)
        incrementTimerCount();
#else
        sharedTimerFiredFunction();
#endif
    }
    else {
        DS_WAR("no sharedTimerFiredFunction\n");
    }

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