• R/O
  • SSH

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得windowscocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Haxe bindings for koreader


Commit MetaInfo

修訂ed6745a432bae3b8b7c153be28a8ca6dc6165136 (tree)
時間2022-03-06 00:12:20
作者Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fast...>
CommiterJaime Marquínez Ferrándiz

Log Message

Add Size class

Change Summary

差異

diff -r 98f22bb2eadb -r ed6745a432ba demo/haxeplug/HaxePlugin.hx
--- a/demo/haxeplug/HaxePlugin.hx Sat Mar 05 14:55:14 2022 +0100
+++ b/demo/haxeplug/HaxePlugin.hx Sat Mar 05 16:12:20 2022 +0100
@@ -5,6 +5,7 @@
55 import koreader.hxutils.Plugin;
66 import koreader.ffi.Blitbuffer;
77 import koreader.ui.UIManager;
8+import koreader.ui.Size;
89 import koreader.ui.widget.Button;
910 import koreader.ui.widget.ButtonDialog;
1011 import koreader.ui.widget.ButtonDialogTitle;
@@ -38,6 +39,9 @@
3839 FrameContainer.create({
3940 widgets: [widget,],
4041 background: Blitbuffer.COLOR_LIGHT_GRAY,
42+ bordersize: Size.border.window,
43+ radius: Size.radius.window,
44+ padding: Size.padding.button,
4145 }),
4246 ],
4347 }),
diff -r 98f22bb2eadb -r ed6745a432ba src/koreader/ui/Size.lua.hx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/koreader/ui/Size.lua.hx Sat Mar 05 16:12:20 2022 +0100
@@ -0,0 +1,72 @@
1+package koreader.ui;
2+
3+@:luaRequire("ui/size")
4+extern class Size {
5+ static var border : Border;
6+ static var margin : Margin;
7+ static var padding : Padding;
8+ static var radius : Radius;
9+ static var line : Line;
10+ static var item : Item;
11+ static var span : Span;
12+}
13+
14+
15+extern class Border {
16+ @:native("default")
17+ var default_ : Int;
18+ var thin : Int;
19+ var button : Int;
20+ var window : Int;
21+ var thick : Int;
22+ var inputtext : Int;
23+}
24+
25+extern class Margin {
26+ @:native("default")
27+ var default_ : Int;
28+ var tiny : Int;
29+ var small : Int;
30+ var title : Int;
31+ var fine_tune : Int;
32+ var fullscreen_popout : Int;
33+ var button : Int;
34+}
35+
36+extern class Padding {
37+ @:native("default")
38+ var default_ : Int;
39+ var tiny : Int;
40+ var small : Int;
41+ var large : Int;
42+ var button : Int;
43+ var buttontable : Int;
44+ var fullscreen : Int;
45+}
46+
47+extern class Radius {
48+ @:native("default")
49+ var default_ : Int;
50+ var window : Int;
51+ var button : Int;
52+}
53+
54+extern class Line {
55+ var thin : Int;
56+ var medium : Int;
57+ var thick : Int;
58+ var progress : Int;
59+}
60+
61+extern class Item {
62+ var height_default : Int;
63+ var height_big : Int;
64+ var height_large : Int;
65+}
66+
67+extern class Span {
68+ var horizontal_default : Int;
69+ var horizontal_small : Int;
70+ var vertical_default : Int;
71+ var vertical_large : Int;
72+}
\ No newline at end of file
diff -r 98f22bb2eadb -r ed6745a432ba src/koreader/ui/widget/container/FrameContainer.lua.hx
--- a/src/koreader/ui/widget/container/FrameContainer.lua.hx Sat Mar 05 14:55:14 2022 +0100
+++ b/src/koreader/ui/widget/container/FrameContainer.lua.hx Sat Mar 05 16:12:20 2022 +0100
@@ -20,4 +20,8 @@
2020 typedef FrameContainerParams = {
2121 > WidgetContainerParams,
2222 ?background : Color8,
23+ ?margin : Int,
24+ ?radius : Int,
25+ ?bordersize : Int,
26+ ?padding : Int,
2327 }
\ No newline at end of file