Commit 55996084 authored by alp@webkit.org's avatar alp@webkit.org

2008-05-01 Alp Toker <alp@nuanti.com>

        Rubber-stamped by Anders.

        GTK+ build fix for changes in r32752. Use int32, not int32_t types in
        npapi.h.

        Additional fix to use same signedness in npapi.h and Mac for the
        interval parameter.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 02f02977
2008-05-01 Alp Toker <alp@nuanti.com>
Rubber-stamped by Anders.
GTK+ build fix for changes in r32752. Use int32, not int32_t types in
npapi.h.
Additional fix to use same signedness in npapi.h and Mac for the
interval parameter.
* bridge/npapi.h:
2008-04-30 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
......@@ -795,8 +795,8 @@ void NPN_ForceRedraw(NPP instance);
void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
void NPN_PopPopupsEnabledState(NPP instance);
void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData);
uint32_t NPN_ScheduleTimer(NPP instance, int32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
void NPN_UnscheduleTimer(NPP instance, uint32_t timerID);
uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID));
void NPN_UnscheduleTimer(NPP instance, uint32 timerID);
#ifdef __cplusplus
} /* end extern "C" */
......
2008-05-01 Alp Toker <alp@nuanti.com>
Rubber-stamped by Anders.
GTK+ build fix for changes in r32752. Use int32, not int32_t types in
npapi.h.
Additional fix to use same signedness in npapi.h and Mac for the
interval parameter.
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:
(PluginTimer::PluginTimer):
(-[WebBaseNetscapePluginView stopTimers]):
(-[WebBaseNetscapePluginView restartTimers]):
(-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
(-[WebBaseNetscapePluginView unscheduleTimer:]):
* Plugins/WebBaseNetscapePluginViewPrivate.h:
* Plugins/npapi.m:
(NPN_ScheduleTimer):
(NPN_UnscheduleTimer):
* Plugins/npfunctions.h:
2008-04-30 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
......
......@@ -100,8 +100,8 @@ typedef union PluginPort {
BOOL shouldStopSoon;
BOOL shouldFireTimers;
uint32_t currentTimerID;
HashMap<uint32_t, PluginTimer*>* timers;
uint32 currentTimerID;
HashMap<uint32, PluginTimer*>* timers;
unsigned pluginFunctionCallDepth;
......
......@@ -120,9 +120,9 @@ static const double ThrottledTimerInterval = 0.25;
class PluginTimer : public TimerBase {
public:
typedef void (*TimerFunc)(NPP npp, uint32_t timerID);
typedef void (*TimerFunc)(NPP npp, uint32 timerID);
PluginTimer(NPP npp, uint32_t timerID, uint32_t interval, NPBool repeat, TimerFunc timerFunc)
PluginTimer(NPP npp, uint32 timerID, uint32 interval, NPBool repeat, TimerFunc timerFunc)
: m_npp(npp)
, m_timerID(timerID)
, m_interval(interval)
......@@ -151,8 +151,8 @@ private:
}
NPP m_npp;
uint32_t m_timerID;
uint32_t m_interval;
uint32 m_timerID;
uint32 m_interval;
NPBool m_repeat;
TimerFunc m_timerFunc;
};
......@@ -766,8 +766,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!timers)
return;
HashMap<uint32_t, PluginTimer*>::const_iterator end = timers->end();
for (HashMap<uint32_t, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
HashMap<uint32, PluginTimer*>::const_iterator end = timers->end();
for (HashMap<uint32, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
PluginTimer* timer = it->second;
timer->stop();
}
......@@ -792,8 +792,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!timers)
return;
HashMap<uint32_t, PluginTimer*>::const_iterator end = timers->end();
for (HashMap<uint32_t, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
HashMap<uint32, PluginTimer*>::const_iterator end = timers->end();
for (HashMap<uint32, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
PluginTimer* timer = it->second;
ASSERT(!timer->isActive());
timer->start(isCompletelyObscured);
......@@ -2450,15 +2450,15 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
}
- (uint32_t)scheduleTimerWithInterval:(uint32_t)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32_t timerID))timerFunc
- (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc
{
if (!timerFunc)
return 0;
if (!timers)
timers = new HashMap<uint32_t, PluginTimer*>;
timers = new HashMap<uint32, PluginTimer*>;
uint32_t timerID = ++currentTimerID;
uint32 timerID = ++currentTimerID;
PluginTimer* timer = new PluginTimer(plugin, timerID, interval, repeat, timerFunc);
timers->set(timerID, timer);
......@@ -2469,7 +2469,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return 0;
}
- (void)unscheduleTimer:(uint32_t)timerID
- (void)unscheduleTimer:(uint32)timerID
{
if (!timers)
return;
......
......@@ -48,8 +48,8 @@
- (void)forceRedraw;
- (NPError)getVariable:(NPNVariable)variable value:(void *)value;
- (NPError)setVariable:(NPPVariable)variable value:(void *)value;
- (uint32_t)scheduleTimerWithInterval:(uint32_t)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32_t timerID))timerFunc;
- (void)unscheduleTimer:(uint32_t)timerID;
- (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc;
- (void)unscheduleTimer:(uint32)timerID;
@end
#endif
......@@ -170,12 +170,12 @@ NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
{
}
uint32_t NPN_ScheduleTimer(NPP instance, int32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID))
uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID))
{
return [pluginViewForInstance(instance) scheduleTimerWithInterval:interval repeat:repeat timerFunc:timerFunc];
}
void NPN_UnscheduleTimer(NPP instance, uint32_t timerID)
void NPN_UnscheduleTimer(NPP instance, uint32 timerID)
{
[pluginViewForInstance(instance) unscheduleTimer:timerID];
}
......
......@@ -36,7 +36,7 @@ typedef void* (*NPN_GetJavaPeerProcPtr)(NPP instance);
typedef void (*NPN_PushPopupsEnabledStateProcPtr)(NPP instance, NPBool enabled);
typedef void (*NPN_PopPopupsEnabledStateProcPtr)(NPP instance);
typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP npp, void (*func)(void *), void *userData);
typedef uint32_t (*NPN_ScheduleTimerProcPtr)(NPP npp, int32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
typedef uint32_t (*NPN_ScheduleTimerProcPtr)(NPP npp, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
typedef void (*NPN_UnscheduleTimerProcPtr)(NPP npp, uint32_t timerID);
typedef void (*NPN_ReleaseVariantValueProcPtr) (NPVariant *variant);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment