Mac 插件不再支持 GetWindowFromPort?
我维护着一个古老的 Firefox 插件。它使用 GetWindowFromPort 来获取 NP_Port 对象(即平台)中的 WindowPtr 对象 WidowPtr 对象中的特定窗口数据。现在它总是返回NULL。
NP_Port 对象非空,该对象的端口字段 (CGraphPtr) 也是非空 目的。但是,如果没有 GetWindowFromPort,我不再知道如何 从 CGraphPtr 获取 WindowPtr...
I'm mantaining an ancient Firefox plugin. It uses GetWindowFromPort to get
a WindowPtr object out of the NP_Port object which is the platform
specific window data in the WidowPtr object. Now it always returns NULL.
NP_Port object is non-null as is the port field (CGraphPtr) of that
object. However, without GetWindowFromPort, I no longer know how to
get a WindowPtr from a CGraphPtr...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来它比那还要大。 QuickDraw(其中 GetWindowFromPort 是一个函数)在任何 64b 系统中不再受支持...
It appears it's bigger than that. QuickDraw (of which GetWindowFromPort is a function) us na longer supported in any 64b system...
这可能是因为 Firefox 现在正在创建一个单独的屏幕外 GWorld 供插件绘制,它与窗口无关。考虑到将来插件将移出进程,依赖它返回有意义的值并不是一个好主意。你用这个值做什么?
This is probably because Firefox is now creating a separate offscreen GWorld for plug-ins to draw to, which is not associated with a window. Considering that in the future plug-ins are going to move out-of-process, depending on it returning a meaningful value is not going to be a good idea. What are you using this value for?