mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-11 00:15:37 +03:00
refactor: ♻️ rename TilingEngine to EngineImpl
This commit is contained in:
parent
2def8d896e
commit
b18e2e3973
@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
import { Engine, TilingEngine } from "../engine";
|
import { Engine, EngineImpl } from "../engine";
|
||||||
import { EngineWindow } from "../engine/window";
|
import { EngineWindow } from "../engine/window";
|
||||||
import { WindowState } from "../engine/window";
|
import { WindowState } from "../engine/window";
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ export class ControllerImpl implements Controller {
|
|||||||
private config: Config,
|
private config: Config,
|
||||||
private log: Log
|
private log: Log
|
||||||
) {
|
) {
|
||||||
this.engine = new TilingEngine(this, config, log);
|
this.engine = new EngineImpl(this, config, log);
|
||||||
this.driver = new KWinDriver(qmlObjects, kwinApi, this, config, log);
|
this.driver = new KWinDriver(qmlObjects, kwinApi, this, config, log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import { createMock } from "ts-auto-mock";
|
import { createMock } from "ts-auto-mock";
|
||||||
|
|
||||||
import { TilingEngine } from ".";
|
import { EngineImpl } from ".";
|
||||||
import Config from "../config";
|
import Config from "../config";
|
||||||
import { Controller } from "../controller";
|
import { Controller } from "../controller";
|
||||||
import { DriverSurface } from "../driver/surface";
|
import { DriverSurface } from "../driver/surface";
|
||||||
@ -27,7 +27,7 @@ describe("arrange", () => {
|
|||||||
const controllerMock = createMock<Controller>({ screens: fakeScreens });
|
const controllerMock = createMock<Controller>({ screens: fakeScreens });
|
||||||
const logMock = createMock<Log>();
|
const logMock = createMock<Log>();
|
||||||
const configMock = createMock<Config>();
|
const configMock = createMock<Config>();
|
||||||
const engine = new TilingEngine(controllerMock, configMock, logMock);
|
const engine = new EngineImpl(controllerMock, configMock, logMock);
|
||||||
|
|
||||||
jest.spyOn(engine, "arrangeScreen").mockReturnValue();
|
jest.spyOn(engine, "arrangeScreen").mockReturnValue();
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ describe("arrangeScreen", () => {
|
|||||||
const controllerMock = createMock<Controller>();
|
const controllerMock = createMock<Controller>();
|
||||||
const logMock = createMock<Log>();
|
const logMock = createMock<Log>();
|
||||||
const configMock = createMock<Config>();
|
const configMock = createMock<Config>();
|
||||||
const engine = new TilingEngine(controllerMock, configMock, logMock);
|
const engine = new EngineImpl(controllerMock, configMock, logMock);
|
||||||
|
|
||||||
const window1 = createMock<EngineWindow>({
|
const window1 = createMock<EngineWindow>({
|
||||||
shouldFloat: false,
|
shouldFloat: false,
|
||||||
@ -66,7 +66,7 @@ describe("arrangeScreen", () => {
|
|||||||
getCurrentLayout: () => createMock<TileLayout>(),
|
getCurrentLayout: () => createMock<TileLayout>(),
|
||||||
});
|
});
|
||||||
jest
|
jest
|
||||||
.spyOn(TilingEngine.prototype as any, "getTilingArea")
|
.spyOn(EngineImpl.prototype as any, "getTilingArea")
|
||||||
.mockReturnValue(createMock<Rect>());
|
.mockReturnValue(createMock<Rect>());
|
||||||
|
|
||||||
const mockSurface = createMock<DriverSurface>();
|
const mockSurface = createMock<DriverSurface>();
|
||||||
|
@ -70,7 +70,7 @@ export interface Engine {
|
|||||||
/**
|
/**
|
||||||
* Maintains tiling context and performs various tiling actions.
|
* Maintains tiling context and performs various tiling actions.
|
||||||
*/
|
*/
|
||||||
export class TilingEngine implements Engine {
|
export class EngineImpl implements Engine {
|
||||||
public layouts: LayoutStore;
|
public layouts: LayoutStore;
|
||||||
public windows: WindowStore;
|
public windows: WindowStore;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user