• 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: adding NSView from other application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding NSView from other application


  • Subject: Re: adding NSView from other application
  • From: Christopher Atlan <email@hidden>
  • Date: Sun, 15 May 2005 18:20:25 +0200

What we are passing is not a Windows object reference, but a Windows handle that the OS should recognize independent of process boundary. It is also not our intention to punch a hole in another process; instead, what we want is simply reparent one window from one process to another window in another process, which should be doable.

Here how this is do on Linux and Windows:
on linux:
            int javaXId = atoi(mMsgString);
            NS_ASSERTION(javaXId, "Invalid X window handle\n");
            pBrowser = g_new0(GtkBrowser, 1);
            pBrowser->topLevelWindow = gtk_plug_new(javaXId);

on win:
        HWND hWnd = (HWND) atoi(mMsgString);
        pBrowserWnd = new BrowserWindow();
        if (!pBrowserWnd)
            break;

SetRect(&rect, 0, 0, 0, 0);
HWND hWndClient = pBrowserWnd->Create(hWnd,rect,
_T("about:blank"),
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
WS_EX_CLIENTEDGE);


In mMsgString  is the window id. Is there a way do to that on Mac OS X?


Christopher Atan _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: adding NSView from other application
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Application Hang (Cocoa-Java)
  • Next by Date: Re: AXIsProcessTrusted / AXMakeProcessTrusted
  • Previous by thread: Problem with adding localized help directory to Xcode 2.0
  • Next by thread: Re: adding NSView from other application
  • Index(es):
    • Date
    • Thread