• 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: fetching the window pointer of other applications (processes)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fetching the window pointer of other applications (processes)


  • Subject: Re: fetching the window pointer of other applications (processes)
  • From: Scott Thompson <email@hidden>
  • Date: Thu, 14 Feb 2008 11:25:32 -0600

I am in a situation where I have to access the window pointer of a different application (which is running in a totally different process) and play with it.

It would be much better to let the "totally different process" "play" with it's own window and have the browser plug in tell the process to "do xxx with your window".


I have written browser plug-in for safari, which gets loaded inside safari process. Inside this browser plug-in I want to access the top level window pointer (window ref) of the other stand alone application which is running in a different process.

What is the "top level window pointer" of the other application? Do you mean you want to get the NSWindow* or Carbon WindowRef of a document window in the other application?


If I transfer the window pointer of the stand alone application to browser plug-in by some means (through apple events or some other way). Will I be able to use that window pointer from browser plug-in (which is part of the browser process)?

No. If you transfer a pointer to another address space, that pointer no longer means the same thing.


Does Mac let the application to fetch the window pointers of other applications like the Windows operating system allows?

No. This could be a security risk, and has proven to be so on MS Windows in the past.


Is there is security issues enforced by the process, so that any process cannot access the other process data structures?

Yes. Protected memory. Each process lives in it's own address space and with few exceptions (e.g. shared memory mapping) the processes are not allowed access to one another's memory.


I tried this without any luck, has anybody come across this kind of situation. Could you please share your experience?

You've told us a lot about how you are trying to do something, but you have not mentioned what you are trying to accomplish. Why is the browser plugin trying to control the window of another process? What is the other process that the browser wants to control.


There may be ways to accomplish the same effect, but not in the way you are trying to do it. AppleScript control of a window is one example, the accessibility APIs may also be an option.

What effect are you trying to accomplish?

Scott

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >fetching the window pointer of other applications (processes) (From: "Rangaswamy C T" <email@hidden>)

  • Prev by Date: Re: animating a non-interpolated view property and totally confused
  • Next by Date: Newbie Issue: isDescendantOf: error
  • Previous by thread: Re: fetching the window pointer of other applications (processes)
  • Next by thread: Mail-like grouping in NSTableView?
  • Index(es):
    • Date
    • Thread