windowContext inlined the TermWriteable functions
This commit is contained in:
parent
8991a99585
commit
d0670325f2
@ -62,82 +62,82 @@ class WindowContext implements TermWriteable {
|
|||||||
public var onResize(default, null):Signal<Vec2<Int>>;
|
public var onResize(default, null):Signal<Vec2<Int>>;
|
||||||
|
|
||||||
@:allow(kernel.ui)
|
@:allow(kernel.ui)
|
||||||
private function setTarget(target:TermWriteable) {
|
private inline function setTarget(target:TermWriteable) {
|
||||||
writer.setTarget(target);
|
writer.setTarget(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@:allow(kernel.ui)
|
@:allow(kernel.ui)
|
||||||
private function enable() {
|
private inline function enable() {
|
||||||
writer.enable();
|
writer.enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@:allow(kernel.ui)
|
@:allow(kernel.ui)
|
||||||
private function disable() {
|
private inline function disable() {
|
||||||
writer.disable();
|
writer.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@:allow(kernel.ui)
|
@:allow(kernel.ui)
|
||||||
private function isEnabled() {
|
private inline function isEnabled() {
|
||||||
return writer.isEnabled();
|
return writer.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function write(text:String) {
|
public inline function write(text:String) {
|
||||||
writer.write(text);
|
writer.write(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scroll(y:Int) {
|
public inline function scroll(y:Int) {
|
||||||
writer.scroll(y);
|
writer.scroll(y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCursorPos():Pos {
|
public inline function getCursorPos():Pos {
|
||||||
return writer.getCursorPos();
|
return writer.getCursorPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCursorPos(x:Int, y:Int) {
|
public inline function setCursorPos(x:Int, y:Int) {
|
||||||
writer.setCursorPos(x, y);
|
writer.setCursorPos(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCursorBlink():Bool {
|
public inline function getCursorBlink():Bool {
|
||||||
return writer.getCursorBlink();
|
return writer.getCursorBlink();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCursorBlink(blink:Bool) {
|
public inline function setCursorBlink(blink:Bool) {
|
||||||
writer.setCursorBlink(blink);
|
writer.setCursorBlink(blink);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSize():Vec2<Int> {
|
public inline function getSize():Vec2<Int> {
|
||||||
return writer.getSize();
|
return writer.getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clear() {
|
public inline function clear() {
|
||||||
writer.clear();
|
writer.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearLine() {
|
public inline function clearLine() {
|
||||||
writer.clearLine();
|
writer.clearLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTextColor():Color {
|
public inline function getTextColor():Color {
|
||||||
return writer.getTextColor();
|
return writer.getTextColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTextColor(color:Color) {
|
public inline function setTextColor(color:Color) {
|
||||||
writer.setTextColor(color);
|
writer.setTextColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBackgroundColor():Color {
|
public inline function getBackgroundColor():Color {
|
||||||
return writer.getBackgroundColor();
|
return writer.getBackgroundColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setBackgroundColor(color:Color) {
|
public inline function setBackgroundColor(color:Color) {
|
||||||
writer.setBackgroundColor(color);
|
writer.setBackgroundColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isColor():Bool {
|
public inline function isColor():Bool {
|
||||||
return writer.isColor();
|
return writer.isColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function reset() {
|
public inline function reset() {
|
||||||
writer.reset();
|
writer.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ class WindowContext implements TermWriteable {
|
|||||||
Delegate events to an UIEventDelegate.
|
Delegate events to an UIEventDelegate.
|
||||||
Set to null to stop delegating events.
|
Set to null to stop delegating events.
|
||||||
**/
|
**/
|
||||||
public function delegateEvents(delegate: Null<UIEventDelegate>){
|
public inline function delegateEvents(delegate: Null<UIEventDelegate>){
|
||||||
this.eventDelegate = delegate;
|
this.eventDelegate = delegate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user