Looking for some more help with callbacks. A few questions if I might. This
is from Apple Docs.
Defines a CGFunction evaluator callback type.
typedef void (*CGFunctionEvaluateCallback) (
void *info,
const float *inData,
float *outData
);
If you name your function MyCGFunctionEvaluate, you would declare it like
this:
void MyCGFunctionEvaluate (
void *info,
const float *inData,
float *outData
);
1) I want to confirm that my Rb Routine parameters are correct? I have this,
RedBlackRedRampEvaluate(ByRef info As MemoryBlock, inValue As MemoryBlock,
ByRef outValue As MemoryBlock)
I've also tried defining these parameters as Ptr with ByRef and without.
However, when I pass the AddressOf RedBlackRedRampEvaluate to a declare I am
using, the items in this routine are not doing anything to, in this case,
change colors properly. At least I think this is where it is failing.
2) What is the sequence of calls and events when you pass an AddressOf call?
It looks like the routine and its associated code is executed, right?
3) Since we don't pass the parameters required for this evaluator function
via our call to AddressOf, how does it find these properties? i.e. info,
inData, outData.
4) Unrelated to callbacks, but ... In this line of code,
const float *inData
The constant keyword indicates that once it is set it can not be changed.
The * indicates Dereference(indirect value). How can I duplicate these
"rules" or do I need to care?
Thank you for commenting on this.
--
Thomas C.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
From Sun 29 Apr 2007 00:52:56 +0200
Return-Path: <realbasic-nug-bounces at lists dot realsoftware dot com>
X-Original-To: listarchive at realsoftware dot com
Delivered-To: listarchive at realsoftware dot com
Received: by xmail.realsoftware.com (Postfix, from userid 1037)
id 8BBE0229DF08; Sat, 28 Apr 2007 15:53:10 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on
www.realsoftware.com
X-Spam-Level:
X-Spam-Status: No, score=-2.5 required=4.5 tests=AWL,BAYES_00 autolearn=ham
version=3.1.1
Received: from lists.realsoftware.com (m.realsoftware.com [66.116.103.65])
by xmail.realsoftware.com (Postfix) with ESMTP id A1393229DEFD;
Sat, 28 Apr 2007 15:53:09 -0700 (PDT)
Received: from real-software-mini.local (localhost [127.0.0.1])
by lists.realsoftware.com (Postfix) with ESMTP id 3866026B760;
Sat, 28 Apr 2007 17:53:04 -0500 (CDT)
X-Original-To: realbasic-nug at lists dot realsoftware dot com
Delivered-To: realbasic-nug at lists dot realsoftware dot com
Received: from smtprelay07.ispgateway.de (smtprelay07.ispgateway.de
[80.67.29.7])
by lists.realsoftware.com (Postfix) with ESMTP id CB63026B755
for <realbasic-nug at lists dot realsoftware dot com>;
Sat, 28 Apr 2007 17:52:59 -0500 (CDT)
Received: (qmail 5888 invoked from network); 28 Apr 2007 22:52:56 -0000
Received: from unknown (HELO [192.168.1.80]) (363246 at [84 dot 175 dot 117 dot
190])
(envelope-sender <support at monkeybreadsoftware dot de>)
by smtprelay07.ispgateway.de (qmail-ldap-1.03) with SMTP
for <realbasic-nug at lists dot realsoftware dot com>; 28 Apr 2007
22:52:56 -0000
To: realbasic-nug at lists dot realsoftware dot com (REALbasic NUG)
In-Reply-To: <C258E4C6 dot 8DC0%mauitom at maui dot net>
Subject: Re: Callback Info
From: support at monkeybreadsoftware dot de (Christian Schmitz)
Date: Sun, 29 Apr 2007 00:52:56 +0200
Message-ID: <1hxb3qn dot 11dq4001j9bv5nM%support at monkeybreadsoftware dot de>
MIME-Version: 1.0
Organization: Monkeybread Software Germany
X-Face: nrf3>{WQ6c&r+7 at e)"]0G60`-6ND^)I2mI%>)QGYa=9"=7jhd-g2|b3!>Al0+
Ccb%xGQshhi|g at QU2$
User-Agent: MacSOUP/D-2.8 (Mac OS X version 10.4.9 (PPC))
X-BeenThere: realbasic-nug at lists dot realsoftware dot com
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: realbasic-nug-bounces at lists dot realsoftware dot com
Errors-To: realbasic-nug-bounces at lists dot realsoftware dot com
Thomas Cunningham <mauitom at maui dot net> wrote:
> Looking for some more help with callbacks. A few questions if I might. Th=
is
> is from Apple Docs.
> =
> Defines a CGFunction evaluator callback type.
> =
> typedef void (*CGFunctionEvaluateCallback) (
You can see that working in my plugin example project called "Quartz
Gradients.rb".
I've a CGFunctionMBS class in my plugins.
Gru=DF
Christian
-- =
See you at REALworld 2007 in Austin, Texas.
Around twelve thousand functions in one REALbasic plug-in. =
The Monkeybread Software Realbasic Plugin v7.1. Now universal!
<http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|