I've got a project that I am working with, that I did not create. I am trying 
to understand it and I would like to remove the Carbon framework dependencies 
in it. I don't know anything about Carbon. Is there a good resource to read up 
on it? Are there replacement methods in other frameworks to replace some of the 
Carbon apis? I'm not really sure where to start.

For example, here's a function I will need to replace, where could I find any 
of the same calls or another function to replace OSStatus?

pascal OSStatus AppEventHandler( EventHandlerCallRef inCallRef, EventRef 
inEvent, void* controller ) 
{
  OSStatusstatus = eventNotHandledErr;
  
  if(GetEventClass(inEvent) == kEventClassApplication) 
  {
    UInt32 mode = 0;
    (void) GetEventParameter(inEvent,
                             kEventParamSystemUIMode,
                             typeUInt32,
                             NULL,
                             sizeof(UInt32),
                             NULL,
                             &mode);
    [controller modeDidChange:mode];
    status = noErr;
  }
  return status;
}
------
and later
------
InstallApplicationEventHandler( NewEventHandlerUPP( AppEventHandler),
                                 GetEventTypeCount( sAppEvents ),
                                 sAppEvents, self, NULL );
-------
Thanks for any help.
Chris
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to