On 7/24/03 4:00 AM, "Marcel" <email@hidden> wrote:
> Hello!
>
> I am using WebKit from a Carbon application. After learning how to wrap
> Objective-C/Cocoa code into C/Carbon I have overall great success with
> it.
I am in the process of wrapping Objective-C/Cocoa code into a Mach-O
framework that I will call into from my Carbon app. Is this how you are
doing it? If not, is there a different or better way?
> 2) When I receive an event through a WebView delegate I do not exactly
> know what the best way is to inform my Carbon app. Today I create a
> command event with some parameters and send it to my app. Is this the
> nicest way to go? How can I do this more elegant.
What exactly do you mean by "command event"? I was thinking of using the
same mechanism I'm using in the host app to call my framework, although it's
not beautiful either, see below. Better suggestions appreciated.
static OSStatus Foo(void)
{
typedef OSStatus (*FooProcPtr)(void);
static FooProcPtr FooProc = NULL;
if (FooProc == NULL)
{
CFBundleRef appBundle = CFBundleGetMainBundle();
FooProc =
(FooProcPtr)
CFBundleGetFunctionPointerForName(appBundle, CFSTR("Foo"));
}
if (FooProc != NULL)
return FooProc();
else
return error;
}
-Kelsey
_______________________________________________
webkitsdk-dev mailing list | email@hidden
Help/Unsubscribe: http://www.lists.apple.com/mailman/listinfo/webkitsdk-dev
Do not post admin requests to the list. They will be ignored.