[futurebasic] Re: [FB] CFUserNotification

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2006 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Sat, 30 Dec 2006 10:12:22 +1300
Bernie wrote:

> I have CFUserNotification working well in an Xcode app but FB don't  
> like it (think I've come unstuck in the glue code). Can 'someone'  
> show me what I've got wrong here?

The timeout parameter for CFUserNotificationCreate is CFTimeInterval  
i.e. double, and must be passed in register f1. It is 'shadowed' by  
r4 and r5 (total 8 bytes) so the remaining arguments go to r6 and up.

local fn CFUserNotificationCreate( allocator as CFAllocatorRef, ¬
timeout as CFTimeInterval, flags as CFOptionFlags, ¬
@err as ^SInt32, dictionary as CFDictionaryRef )
   lwz r12,^gCFUserNotificationCreate
   mtspr ctr,r12
   mr r3,^allocator
   lfd f1,^timeout
   mr r6,^flags
   mr r7,^err
   mr r8,^dictionary
   mr r31,r2
   mr r2,r31
end fn // returns CFUserNotificationRef

Robert P.