summaryrefslogtreecommitdiff
path: root/cocoa/apple_image.m
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2014-09-12 23:22:26 +0200
committerOle Loots <ole@monochrom.net>2014-09-12 23:22:26 +0200
commita9ac9c00fc2c73705db242a459160f14d279cdcd (patch)
tree5f9aa630340bad67934e6fdbfda7f239f0fade57 /cocoa/apple_image.m
parent181bc41a9aa200cfac5bf4b84175003639fce488 (diff)
parent9e6b0fb8b07cd3147b0a2727d3644860cf7c8c7e (diff)
downloadnetsurf-a9ac9c00fc2c73705db242a459160f14d279cdcd.tar.gz
netsurf-a9ac9c00fc2c73705db242a459160f14d279cdcd.tar.bz2
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
Conflicts: atari/gui.h
Diffstat (limited to 'cocoa/apple_image.m')
-rw-r--r--cocoa/apple_image.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/cocoa/apple_image.m b/cocoa/apple_image.m
index ab17f8ab4..c6f9df324 100644
--- a/cocoa/apple_image.m
+++ b/cocoa/apple_image.m
@@ -25,7 +25,8 @@
#include "image/bitmap.h"
#include "desktop/plotters.h"
#include "utils/utils.h"
-#include "utils/schedule.h"
+
+#include "cocoa/schedule.h"
typedef struct apple_image_content {
struct content base;
@@ -147,7 +148,7 @@ static void animate_image_cb( void *ptr )
data.redraw.object = &ai->base;
content_broadcast( &ai->base, CONTENT_MSG_REDRAW, data );
- schedule( ai->frameTimes[ai->currentFrame], animate_image_cb, ai );
+ cocoa_schedule(ai->frameTimes[ai->currentFrame], animate_image_cb, ai );
}
/**
@@ -190,10 +191,10 @@ bool apple_image_convert(struct content *c)
ai->frameTimes = calloc( ai->frames , sizeof(int));
for (NSUInteger i = 0; i < frames; i++) {
[image setProperty: NSImageCurrentFrame withValue: [NSNumber numberWithUnsignedInteger: i]];
- ai->frameTimes[i] = 100 * [[image valueForProperty: NSImageCurrentFrameDuration] floatValue];
+ ai->frameTimes[i] = 1000 * [[image valueForProperty: NSImageCurrentFrameDuration] floatValue];
}
[image setProperty: NSImageCurrentFrame withValue: [NSNumber numberWithUnsignedInteger: 0]];
- schedule( ai->frameTimes[0], animate_image_cb, ai );
+ cocoa_schedule( ai->frameTimes[0], animate_image_cb, ai );
}
return true;
@@ -206,7 +207,7 @@ void apple_image_destroy(struct content *c)
[(id)ai_c->bitmap release];
ai_c->bitmap = NULL;
- schedule_remove( animate_image_cb, c );
+ cocoa_schedule(-1, animate_image_cb, c );
}