问题标签 [nativewindow]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
732 浏览

apache-flex - 我可以在 NativeWindow 中使用哪种 Flex 组件?

我正在开发 Adob​​e Air 应用程序。为了显示额外的窗口,我创建了 NativeWindow 对象。在对象中,“stage.addChild( Sprite Obj )”确实有效,但几乎所有其他 flex 组件都不起作用。其实我想添加'spark.components.BorderContainer'、'spark.components.Group'、'mx.controls.Image'等,但不能。

我发现的一种解决方案是使用“flash.html.HTMLLoader”并将丰富的内容(包括图像和样式文本)显示到窗口中。

有没有更好的方式来展示丰富的内容?

0 投票
2 回答
1576 浏览

actionscript-3 - 无法调整内容大小以适应 AIR 中的新 NativeWindow

我正在尝试制作一个弹出窗口类,它将获取一个内容 DisaplyObject,并弹出并显示它本身,但我正在通过将内容的大小与窗口匹配或反之亦然来破解我的头......我认为那也许窗口没有显示所有的舞台或什么?!

内容太大了..超出了界限。

这是代码:

谢谢,米克

0 投票
1 回答
190 浏览

python - wxPython 改变原生窗口样式

我喜欢谷歌浏览器的一件事是标签放置在顶部栏中,从而节省了宝贵的查看空间。我想知道 wxPython 是否有助于将小部件放置在本机操作系统的顶部栏中。类似于 Chrome 在本机操作系统的顶部栏中放置标签的方式。

我目前正在编写的程序是为上网本和笔记本电脑设计的,所以空间非常宝贵。

Windows 7 中的 Chrome:

在此处输入图像描述

0 投票
1 回答
1327 浏览

actionscript-3 - 如何检查 Flex AIR 应用程序是否最小化到系统托盘?

我有一个正在监视服务器的 AIR 应用程序。默认情况下,它将最小化到系统托盘。每当服务器发送警报时,系统中最小化的应用程序应显示类似于 Outlook 的消息(警报类似于,当有新消息出现时)。

我的问题是,如何检查 AIR 应用程序是否最小化到系统托盘。我尝试了以下条件

但是这段代码不起作用。条件总是错误的。当我调试并尝试查看显示状态的值时,它始终处于最大化状态。

我不确定,我在哪里做错了。

谁能帮我找出检查应用程序是否最小化到系统托盘的条件。

0 投票
1 回答
624 浏览

apache-flex - Flex4 AIR NativeWindow doesn't stay invisible at launch

In Flex 3 I had my AIR application setup to always have the native window being invisible at startup so that the app can recall stored window position and size from a local shared object. After that it sets the last used window pos and size and THEN it makes the native window visible by calling nativeWindow.activate().

Very clean, always worked flawless! Now enter Flex 4 ...

In Flex 4 the visible property in the AIR descriptor file seems to be ignored for some reason. The documentation states that it should work but in my simple test AIR always makes the window visible instantly after launch, regardless if I have set visible to false.

Does anyone know how to get this working like it was in Flex 3?

EDIT: Ok so the docs state that the Flex mx:WindowedApplication (and s:WindowedApplication?!?) component automatically displays and activates the window immediately before the applicationComplete event is dispatched, unless the visible attribute is set to false in the MXML definition.

This explains why it goes visible all by itself even if it somehow defies the purpose of setting visible to false in the first place. However if setting WindowedApplication.visible to false the app window shortly goes visible as intended but then instantly goes invisible again after a fraction of a second. It seems that nativeWindow.activate() is called too soon because if I wait for one frame and then call it, it works as it should and stays visible. However I doubt this is best practice to use callLater or an enterFrame handler to wait for the next frame to be triggered.

0 投票
2 回答
10426 浏览

android - 如何在 Android NDK 中创建新的 NativeWindow?

我尝试了 test-libstdc++ 演示,并且喜欢我可以从控制台启动它,并且无需运行成熟的 android 应用程序。

我想创建一个 opengl 上下文,这样我就可以从控制台中执行我的 opengl es 2.0 应用程序而无需太多麻烦。

知道如何从不使用本机活动或任何东西的 NDK 应用程序中初始化 EGL,即它甚至没有打包在 .APKK 文件中,只是将 main 方法打包为可执行的 linux 文件。

非常感谢!

更新

ANativeWindow_acquire它是否与*android/native_window.h`有任何关系?

谢谢!

0 投票
3 回答
1012 浏览

air - AIR:如何将 NativeWindow 类型设置为 Utility

nativeWindow 支持 systemChrome (standard,none) 和 transparent (false,true);这些选项位于 Adob​​e AIR 应用程序描述符文件 (xml)

但我找不到设置窗口类型(实用程序、正常、轻量级)的选项,如 TourDeFlex 上的 Air Applications -> AIR APIs and Techniques -> Native Windows 下所示。

从应用程序中可以仅作为只读属性进行访问。

设置此属性的正确位置在哪里?

一个很好的使用示例可能是:minitask.org

谢谢!

编辑:窗口应该在 UTILITY 模式下启动

0 投票
1 回答
1587 浏览

c# - 在 NativeWindow 中处理 WM_GETOBJECT 返回一个 IOleCommandTarget

我正在尝试从面板控制句柄中检索 IOleCommandTarget 引用,以便可以在其上调用 IOleCommandTarget.Exec() 。

在我的 NativeMethods.cs 中:

为了能够返回 IOleCommandTarget 引用,我创建了一个实现 NativeWindow 和 IOleCommandTarget 的 CommandTargetWindow 类,并且我重写了 WndProc 以拦截 AccessibleObjectFromWindow() 发送的 WM_GETOBJECT 消息:

问题是,正如上面的评论,我如何通过消息传回 IOleCommandTarget ?

我们通过实现接口 IRawElementProviderSimple(而不是 IOleCommandTarget)并使用定义的静态方法 AutomationInteropProvider.ReturnRawElementProvider(),在其他地方为自动化目的做类似的事情:

有任何想法吗?

0 投票
1 回答
4998 浏览

flash - AS3 AIR - NativeWindow 弹出框

在我的 AIR 应用程序中,当用户创建一个新项目时,我希望出现一个弹出框,他们可以在其中输入他们的项目名称。我知道通过制作我自己的弹出框类型是如何做到的,但是那里一种使用 NativeWindows 的方法?也就是说,我可以使用系统镶边制作一个包含文本字段和按钮的窗口吗?

我在 FlashDevelop 中使用 Flex 4 和 AIR 2.7。

0 投票
1 回答
405 浏览

apache-flex - Swiz 框架与 AIR - 在子窗口上使用 ViewAdded/ViewRemoved?

我正在尝试在使用 Swiz 进行依赖注入的 AIR 2.7 应用程序中实现弹出窗口 (NativeWindowType.UTILITY)。

我遵循了我能够找到的 Swiz 指南,并在创建窗口的类上实现了 ISwizAware,并且我在打开窗口之前调用了 _swiz.registerWindow(),并且依赖注入在之后的窗口本身上工作正常这。

但是,我遇到的问题是我在该窗口中有一个子视图,并且我有一个使用 [ViewAdded] 和 [ViewRemoved] 标记的中介。添加的视图和删除的视图功能都不会触发。我认为问题是:

  1. 子视图未正确注册到 Swiz。
  2. swiz 实例不知道 bean(但是我尝试手动添加 bean,但没有任何效果)。
  3. ViewAdded 和 ViewRemoved 元数据标记根本不起作用,因为每个 NativeWindow 对象都有自己的舞台实例。

有人知道更多吗?