Haxe wrapper for the libYUI library
修訂 | 2e41a53692b5bac411b4b0a97c78fe0f8f618335 (tree) |
---|---|
時間 | 2022-03-08 06:54:27 |
作者 | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fast...> |
Commiter | Jaime Marquínez Ferrándiz |
Initial commit
@@ -0,0 +1,1 @@ | ||
1 | +bin | |
\ No newline at end of file |
@@ -0,0 +1,6 @@ | ||
1 | +<!--SPDX-License-Identifier: Unlicense--> | |
2 | +<xml> | |
3 | + <target id='haxe'> | |
4 | + <lib name='-lyui' /> | |
5 | + </target> | |
6 | +</xml> | |
\ No newline at end of file |
@@ -0,0 +1,14 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +import yui.YUI; | |
4 | + | |
5 | +class Demo { | |
6 | + public static function main() { | |
7 | + var dialog = YUI.widgetFactory().createPopupDialog(); | |
8 | + var vbox = YUI.widgetFactory().createVBox(dialog); | |
9 | + YUI.widgetFactory().createLabel(vbox, "Hello, world"); | |
10 | + YUI.widgetFactory().createPushButton(vbox, "&OK"); | |
11 | + dialog.waitForEvent(); | |
12 | + dialog.destroy(); | |
13 | + } | |
14 | +} | |
\ No newline at end of file |
@@ -0,0 +1,10 @@ | ||
1 | +This is free and unencumbered software released into the public domain. | |
2 | + | |
3 | +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. | |
4 | + | |
5 | +In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and | |
6 | +successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. | |
7 | + | |
8 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
9 | + | |
10 | +For more information, please refer to <http://unlicense.org/> |
@@ -0,0 +1,6 @@ | ||
1 | +haxe-yui | |
2 | +======== | |
3 | + | |
4 | +Haxe wrapper for the [libYUI library](https://doc.opensuse.org/projects/libyui/HEAD/). | |
5 | + | |
6 | +The wrapper is release under the [Unlicense license](LICENSES/Unlicense.txt). | |
\ No newline at end of file |
@@ -0,0 +1,5 @@ | ||
1 | +# SPDX-License-Identifier: Unlicense | |
2 | +--class-path src | |
3 | +--main Demo | |
4 | + | |
5 | +--cpp bin | |
\ No newline at end of file |
@@ -0,0 +1,10 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YDialog.h") | |
6 | +@:native("YDialog*") | |
7 | +extern class YDialog extends YSingleChildContainerWidget { | |
8 | + public function waitForEvent() : YEvent; | |
9 | + public function destroy(doThrow : Bool = true) : Bool; | |
10 | +} | |
\ No newline at end of file |
@@ -0,0 +1,9 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YEvent.h") | |
6 | +@:native("YEvent*") | |
7 | +extern class YEvent { | |
8 | + | |
9 | +} | |
\ No newline at end of file |
@@ -0,0 +1,9 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YLabel.h") | |
6 | +@:native("YLabel*") | |
7 | +extern class YLabel extends YWidget { | |
8 | + | |
9 | +} | |
\ No newline at end of file |
@@ -0,0 +1,9 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YLayoutBox.h") | |
6 | +@:native("YLayoutBox*") | |
7 | +extern class YLayoutBox extends YWidget { | |
8 | + | |
9 | +} | |
\ No newline at end of file |
@@ -0,0 +1,9 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YPushButton.h") | |
6 | +@:native("YPushButton*") | |
7 | +extern class YPushButton { | |
8 | + | |
9 | +} | |
\ No newline at end of file |
@@ -0,0 +1,9 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YSingleChildContainerWidget.h") | |
6 | +@:native("YSingleChildContainerWidget*") | |
7 | +extern class YSingleChildContainerWidget extends YWidget { | |
8 | + | |
9 | +} | |
\ No newline at end of file |
@@ -0,0 +1,10 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YUI.h") | |
6 | +@:native("YUI") | |
7 | +@:buildXml("<include name='../Build.xml' />") | |
8 | +extern class YUI { | |
9 | + public static function widgetFactory() : YWidgetFactory; | |
10 | +} | |
\ No newline at end of file |
@@ -0,0 +1,9 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YWidget.h") | |
6 | +@:native("YWidget*") | |
7 | +extern class YWidget { | |
8 | + | |
9 | +} | |
\ No newline at end of file |
@@ -0,0 +1,13 @@ | ||
1 | +// SPDX-License-Identifier: Unlicense | |
2 | + | |
3 | +package yui; | |
4 | + | |
5 | +@:include("yui/YWidgetFactory.h") | |
6 | +@:native("YWidgetFactory*") | |
7 | +extern class YWidgetFactory { | |
8 | + public function createPopupDialog() : YDialog; | |
9 | + public function createVBox(parent : YWidget) : YLayoutBox; | |
10 | + | |
11 | + public function createLabel (parent : YWidget, text : cpp.ConstCharStar, isHeading : Bool = false, isOutputField : Bool = false) : YLabel; | |
12 | + public function createPushButton (parent : YWidget, label : cpp.ConstCharStar) : YPushButton; | |
13 | +} | |
\ No newline at end of file |