简体   繁体   English

在Haxe中创建透明Windows(Neko或Windows目标)

[英]Create Transparent Windows in Haxe (Neko or Windows targets)

Im trying to make a simple OSX-like dock application using Haxe 3.1.3. 我试图使用Haxe 3.1.3制作一个类似OSX的简单停靠应用程序。 I cant seem to work out how to make the main application window transparent (no titlebars, borders etc), as well as ignoring mouse events except on the icons themselves. 我似乎无法弄清楚如何使主应用程序窗口透明(没有标题栏,边框等),以及忽略鼠标事件,除了图标本身。 Ideally no taskbar item either, just a system tray item. 理想情况下,没有任务栏项,只是一个系统托盘项。

I believe Haxe Windows target uses SDL, and am pretty sure that SDL can support this kind of behaviour? 我相信Haxe Windows目标使用SDL,我很确定SDL可以支持这种行为吗? Im not sure how Neko target is compiled, or handles this... Is there some flags I can set in the Haxe application.xml or something like that? 我不确定Neko目标是如何编译的,或处理这个...是否有一些我可以在Haxe application.xml中设置的标志或类似的东西? Or is this just not possible with the Haxe Windows or Neko targets? 或者这对于Haxe Windows或Neko目标是不可能的?

EDIT 编辑

I Discovered that the Waxe haxelib, which can be compiled with Neko, has a bunch of flags in the Window.hx file - https://github.com/nmehost/waxe/blob/cd9739e007ed10918166588faf2339d623b22fc4/wx/Window.hx 我发现可以使用Neko编译的Waxe haxelib在Window.hx文件中有一堆标志 - https://github.com/nmehost/waxe/blob/cd9739e007ed10918166588faf2339d623b22fc4/wx/Window.hx

These include such options as FRAME_NO_TASKBAR and BORDER_DOUBLE, which both work when passed as arguments to the wx.Frame.create() function in the Simple.hx Waxe sample project. 这些选项包括FRAME_NO_TASKBAR和BORDER_DOUBLE等选项,它们在作为参数传递给Simple.hx Waxe示例项目中的wx.Frame.create()函数时都有效。

It also includes the flag TRANSPARENT_WINDOW, but this appears to do nothing. 它还包括TRANSPARENT_WINDOW标志,但这似乎什么都不做。 No idea why the other flags are working, but the TRANSPARENT_WINDOW flag doesnt. 不知道为什么其他标志正在工作,但TRANSPARENT_WINDOW标志不起作用。

In Openfl (it's openfl which uses sdl and a xml project), you can remove the window border with this in your application.xml: 在Openfl(使用sdl和xml项目的openfl)中,您可以在application.xml中删除窗口边框:

<window borderless="true"/>

But I don't know a way to move the window without borders. 但我不知道如何在没有边界的情况下移动窗户。

relevant discussion: http://www.openfl.org/forums/#!/general:moving-borderless-windows 相关讨论: http//www.openfl.org/forums/#!/ general: moving-borderless-windows

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM