• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Carbon views and Cocoa windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Carbon views and Cocoa windows


  • Subject: Re: Carbon views and Cocoa windows
  • From: Robert Grant <email@hidden>
  • Date: Wed, 23 Jun 2004 08:46:10 -0400

Hi Luke,

Thanks for the pointer - for us Cocoa people messing with Carbon window events is not fun! :-)

Here's what I came up with that seems to work:

static OSStatus WindowClickedHandler(EventHandlerCallRef myHandler, EventRef theEvent, void* userData)
{
AUEditController* me = (AUEditController*)userData;
NSWindow* wnd = [me window];
[wnd orderFront: nil];
CallNextEventHandler ( myHandler, theEvent);
return noErr;
}

- (BOOL)installWindowClickHandler
{
OSStatus err;
EventHandlerUPP handlerUPP;
EventTypeSpec eventList[] =
{{kEventClassWindow, kEventWindowClickContentRgn}, // click in the content area
{kEventClassWindow, kEventWindowClickDragRgn}}; // click in the title bar

handlerUPP = NewEventHandlerUPP(WindowClickedHandler);

err = InstallWindowEventHandler(_carbonWindow, handlerUPP, GetEventTypeCount(eventList), eventList, self, NULL);
if (err) return [self error: @"Install click window handler" status: err];
return YES;
}

Robert.

On Jun 22, 2004, at 5:05 PM, Luke Bellandi wrote:

You'll likely need to sign up for window activation events to see if you're getting those. If you are, you can then explicitly activate/deactivate the window manually. You may also need to do this for application activation events. Carbon-Cocoa integration as heavy as what you're attempting shows a few of the remaining disconnects between the 2 API sets. I would suggest filing bugs against the Carbon/Cocoa components as appropriate.

Best,
Luke

Thanks for any tips,

Robert.

(Still scratching his head over the sample rate issue...!)
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


References: 
 >Carbon views and Cocoa windows (From: Robert Grant <email@hidden>)
 >Re: Carbon views and Cocoa windows (From: Luke Bellandi <email@hidden>)

  • Prev by Date: Re: Process and Render
  • Next by Date: end playback coreaudio
  • Previous by thread: Re: Carbon views and Cocoa windows
  • Next by thread: Documentation?
  • Index(es):
    • Date
    • Thread