aboutsummaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/rfb/Screen.java
blob: c9ab98aea8327edc40820b53eb8ae428c92553e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* Copyright 2009 Pierre Ossman for Cendio AB
 * Copyright (C) 2011 Brian P. Hinz
 *
 * This 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 software 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 software; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 * USA.
 */

// Represents a single RFB virtual screen, which includes
// coordinates, an id and flags.

package com.tigervnc.rfb;

public class Screen {

    public Screen() { id=0; flags=0; dimensions = new Rect(); }

    public Screen(int id_, int x_, int y_, int w_, int h_, int flags_) {
      id = id_;
      dimensions = new Rect(x_, y_, x_+w_, y_+h_);
      flags = flags_;
    }

    public final boolean operator(Screen r) {
      if (id != r.id)
        return false;
      if (!dimensions.equals(r.dimensions))
        return false;
      if (flags != r.flags)
        return false;
      return true;
    }

    public int id;
    public Rect dimensions;
    public int flags;

}