Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 : *
5 : * The contents of this file are subject to the Mozilla Public License Version
6 : * 1.1 (the "License"); you may not use this file except in compliance with
7 : * the License or as specified alternatively below. You may obtain a copy of
8 : * the License at http://www.mozilla.org/MPL/
9 : *
10 : * Software distributed under the License is distributed on an "AS IS" basis,
11 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : * for the specific language governing rights and limitations under the
13 : * License.
14 : *
15 : * The Initial Developer of the Original Code is
16 : * Michael Meeks <michael.meeks@novell.com>
17 : * Portions created by the Initial Developer are Copyright (C) 2010 the
18 : * Initial Developer. All Rights Reserved.
19 : *
20 : * Major Contributor(s):
21 : *
22 : * For minor contributions see the git repository.
23 : *
24 : * Alternatively, the contents of this file may be used under the terms of
25 : * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
26 : * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
27 : * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
28 : * instead of those above.
29 : */
30 : #ifndef SAL_TYPE_H
31 : #define SAL_TYPE_H
32 :
33 : // an X11 screen index - this unpleasant construct is to allow
34 : // us to cleanly separate the 'DisplayScreen' concept - as used
35 : // in the public facing API, from X's idea of screen indicees.
36 : // Both of these are plain unsigned integers called 'screen'
37 : class SalX11Screen {
38 : unsigned int mnXScreen;
39 : public:
40 0 : explicit SalX11Screen(unsigned int nXScreen) : mnXScreen( nXScreen ) {}
41 0 : unsigned int getXScreen() const { return mnXScreen; }
42 0 : bool operator==(const SalX11Screen &rOther) { return rOther.mnXScreen == mnXScreen; }
43 0 : bool operator!=(const SalX11Screen &rOther) { return rOther.mnXScreen != mnXScreen; }
44 : };
45 :
46 : #endif // SAL_TYPE_H
47 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|