genode/repos/gems/src/app/window_layouter/target.h
Norman Feske a973d9902b gems: flexible window layouter
This commit replaces the former floating_window_layouter with a new
window_layouter component that supports the subdivision of screen space
into columns and rows, the concept of layers, and the principle ability
to store window layout information across reboots. The latter is
accomplished by reflecting the component's internal state as a 'rules'
report to the outside.

Fixes #3031
2018-11-16 14:53:20 +01:00

53 lines
1005 B
C++

/*
* \brief Layout target
* \author Norman Feske
* \date 2018-09-27
*/
/*
* Copyright (C) 2018 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _TARGET_H_
#define _TARGET_H_
/* local includes */
#include <types.h>
namespace Window_layouter { class Target; }
class Window_layouter::Target : Noncopyable
{
public:
typedef String<64> Name;
private:
Name const _name;
unsigned const _layer;
Rect const _geometry;
public:
Target(Xml_node target, Rect geometry)
:
_name (target.attribute_value("name", Name())),
_layer(target.attribute_value("layer", 9999UL)),
_geometry(geometry)
{ }
/* needed to use class as 'Registered<Target>' */
virtual ~Target() { }
Name name() const { return _name; }
unsigned layer() const { return _layer; }
Rect geometry() const { return _geometry; }
};
#endif /* _TARGET_H_ */