added windowContext to ProcessHandle
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package kernel.ui;
|
||||
|
||||
import kernel.ps.ProcessManager;
|
||||
import kernel.ps.ProcessManager.PID;
|
||||
import haxe.ds.ReadOnlyArray;
|
||||
import kernel.ui.TermWriteable;
|
||||
import kernel.peripherals.Peripherals.Peripheral;
|
||||
@@ -162,4 +164,13 @@ class WindowManager {
|
||||
context.setTarget(target);
|
||||
context.enable();
|
||||
}
|
||||
|
||||
public function getContextByPID(pid: PID): ReadOnlyArray<WindowContext> {
|
||||
var handle = ProcessManager.getProcess(pid);
|
||||
if (handle == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return handle.getWindowContexts();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user