Select Git revision
tile.js 9.02 KiB
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2012 Mathias Gottschlag <mgottschlag@gmail.com>
Copyright (C) 2013 Fabian Homborg <fhomborg@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
/**
* Class which manages the windows in one tile and handles resize/move and
* property change events.
* @class
*/
function Tile(firstClient, tileIndex) {
try {
/**
* Signal which is triggered whenever the user starts to move the tile.
*/
this.movingStarted = new Signal();
/**
* Signal which is triggered whenever the user stops moving the tile.
*/
this.movingEnded = new Signal();
/**
* Signal which is triggered whenever the geometry changes between
* movingStarted and movingEnded.
*/
this.movingStep = new Signal();
/**
* Signal which is triggered whenever the user starts to resize the tile.
*/
this.resizingStarted = new Signal();
/**
* Signal which is triggered whenever the user stops resizing the tile.
*/
this.resizingEnded = new Signal();
/**
* Signal which is triggered whenever the geometry changes between
* resizingStarted and resizingEnded.
*/
this.resizingStep = new Signal();
/**
* Signal which is triggered whenever the tile is moved to a different
* screen. Two parameters are passed to the handlers, the old and the new
* screen.
*/
this.screenChanged = new Signal();
/**
* Signal which is triggered whenever the tile is moved to a different
* desktop. Two parameters are passed to the handlers, the old and the new
* desktop.
*/
this.desktopChanged = new Signal();
/**
* List of the clients in this tile.
*/
this.clients = [firstClient];