• 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: New way for Cocoa AU hosts to wrap Carbon AU GUIs?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New way for Cocoa AU hosts to wrap Carbon AU GUIs?


  • Subject: Re: New way for Cocoa AU hosts to wrap Carbon AU GUIs?
  • From: Evan Olcott <email@hidden>
  • Date: Wed, 25 May 2005 10:04:56 -0500

On May 25, 2005, at 9:49 AM, Luke Bellandi wrote:

It's no trick really.  AU Lab installs event handlers on the Carbon Windows that contain the AU to manage the deactivation events.  Namely:

EventTypeSpec   applicationEventTypes[] = {
    {kEventClassApplication, kEventAppActivated },
    {kEventClassApplication, kEventAppDeactivated }
};

EventTypeSpec    windowEventTypes[] = {

    {kEventClassWindow, kEventWindowHandleDeactivate }
};

In the event handlers for window-deactivate, we trap and eat the event so that it doesn't propagate to Carbon's standard event handler (which would re-draw the view's controls with a disabled appearance.)

- Luke

===

Personally, I'd consider that a trick... a very very clever one. ;)

So this is technically trapping the redraw if I'm reading it right correct - so the Carbon window is actually *always* deactivated in this state, but just not *drawn* as such... or is it the case where the Carbon window never *knows* it's been deactivated in terms it's knowledge of itself, but it actually is? (Basically what I'm saying is does the Carbon window *know* it's not active?)

I'm assuming you've tested this with a number of AUs, and this doesn't cause any issues with 3rd-party controls thinking they're deactivated and not accessible but visually they're still active (just thinking ahead - trapping and "patching" side effects have hit me a lot in the past)..

I'd imagine the trapper itself is a very small code snippet - the installation of the trapper and the trap itself...
Coming from the Cocoa side, getting into the Carbon headspace takes a little bit - would you be willing to post the code snippet(s)?

Thanks for the trick! :)

Ev
Technical Knowledge Officer
Head Programmer/Designer
Audiofile Engineering

http://www.audiofile-engineering.com/

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: New way for Cocoa AU hosts to wrap Carbon AU GUIs?
      • From: William Stewart <email@hidden>
    • Re: New way for Cocoa AU hosts to wrap Carbon AU GUIs?
      • From: Laurent Cerveau <email@hidden>
  • Prev by Date: Re: New way for Cocoa AU hosts to wrap Carbon AU GUIs?
  • Next by Date: Re: New way for Cocoa AU hosts to wrap Carbon AU GUIs?
  • Previous by thread: Re: New way for Cocoa AU hosts to wrap Carbon AU GUIs?
  • Next by thread: Re: New way for Cocoa AU hosts to wrap Carbon AU GUIs?
  • Index(es):
    • Date
    • Thread