apologies if ive been misunderstood, but no, i havent taken a pointer from
the java app and passed it to  the c app, i know that wont work.
what i was asking if there something similar to the MS Windows HWND, or a
window id, i could pass between processes, not a pointer

ive just had a look at 'son of a grab' source and it seems there is the
concept of a CGWindowID, maybe this is what i need ?

below is an excerpt from the NSWindow Class Reference:

These constants and data type represent the access levels other processes
can have to a window's content.

typedef enum {
   NSWindowSharingNone
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSWindowSharingNone>
= 0,

   NSWindowSharingReadOnly
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSWindowSharingReadOnly>
= 1,
   NSWindowSharingReadWrite
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSWindowSharingReadWrite>
= 2

};
typedef NSUInteger NSWindowSharingType;

NSWindowSharingReadWrite

The window's contents can be read and modified by another process.

Available in Mac OS X v10.5 and later.

Declared in NSWindow.h


If a process is not allowed to draw in another process's window on OS X,
have i misunderstood the concept of NSWindowSharingType ?

thanks again
Jonathan- Show quoted text -


On Fri, May 23, 2008 at 3:48 PM, Kyle Sluder <
[EMAIL PROTECTED] <[EMAIL PROTECTED]>> wrote:

> On Fri, May 23, 2008 at 9:59 AM, Jonathan Cochrane
> <[EMAIL PROTECTED]> wrote:
> > Now, on OSX the java app gets a NSView/cocoaviewref. Is there some member
> of
> > NSView similar to the HWND on windows that I can pass to my C process?
> The C
> > process can then create a hardware accelerated opengl rendering context
> from
> > this 'handle' and render to the java apps NSView.
>
> So you have taken a pointer that points to your Cocoa app's virtual
> memory and passed it to a different process?  Do you really expect
> this to work?
>
> A process is not allowed to draw in another process's window on OS X.
> You cannot do what you want to do the same way you have on Windows.
> You must refactor your application to compensate for the enhanced
> separation between processes on OS X.
>
> --Kyle Sluder
>
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to