~ubuntu-branches/debian/lenny/italc/lenny

« back to all changes in this revision

Viewing changes to ica/win32/src/vncRegion.h

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Winnertz
  • Date: 2008-06-17 13:46:54 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 gutsy)
  • Revision ID: james.westby@ubuntu.com-20080617134654-cl0gi4u524cv1ici
Tags: 1:1.0.9~rc3-1
* Package new upstream version
  - upstream ported the code to qt4.4 (Closes: #481974)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
 
2
//
 
3
//  This file is part of the VNC system.
 
4
//
 
5
//  The VNC system is free software; you can redistribute it and/or modify
 
6
//  it under the terms of the GNU General Public License as published by
 
7
//  the Free Software Foundation; either version 2 of the License, or
 
8
//  (at your option) any later version.
 
9
//
 
10
//  This program is distributed in the hope that it will be useful,
 
11
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
//  GNU General Public License for more details.
 
14
//
 
15
//  You should have received a copy of the GNU General Public License
 
16
//  along with this program; if not, write to the Free Software
 
17
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 
18
//  USA.
 
19
//
 
20
// TightVNC distribution homepage on the Web: http://www.tightvnc.com/
 
21
//
 
22
// If the source code for the VNC system is not available from the place 
 
23
// whence you received this file, check http://www.uk.research.att.com/vnc or contact
 
24
// the authors on vnc@uk.research.att.com for information on obtaining it.
 
25
 
 
26
 
 
27
// vncRegion object
 
28
 
 
29
// The vncRegion object turns a number of rectangular regions
 
30
// into a list of distinct, non-overlapping regions.
 
31
 
 
32
class vncRegion;
 
33
 
 
34
#if !defined(VNCREGION_DEFINED)
 
35
#define VNCREGION_DEFINED
 
36
#pragma once
 
37
 
 
38
#include "stdhdrs.h"
 
39
#include <list>
 
40
#include "RectList.h"
 
41
 
 
42
// Class definition
 
43
class vncRegion
 
44
{
 
45
 
 
46
// Fields
 
47
public:
 
48
 
 
49
// Methods
 
50
public:
 
51
        // Create/Destroy methods
 
52
        vncRegion();
 
53
        ~vncRegion();
 
54
 
 
55
        void AddRect(const RECT &rect);                 // Add another rectangle to the regions
 
56
        void AddRect(RECT rect, int xoffset, int yoffset);      // ... with offset
 
57
        void SubtractRect(RECT &rect);                  // Subtract a rectangle from the regions
 
58
        void Clear();                                                   // Clear the current set of rectangles
 
59
        inline BOOL IsEmpty() {                                 // Is the region empty?
 
60
                return region == NULL;
 
61
        }
 
62
        void Combine(vncRegion &rgn);                   // Combine with another region
 
63
        void Intersect(vncRegion &rgn);                 // Intersect with another region
 
64
        void Subtract(vncRegion &rgn);                  // Subtract another region from this one
 
65
 
 
66
        // Rectangle retrieval routines - return FALSE if no rects returned!
 
67
        // Note that these routines ADD rectangles to existing lists...
 
68
        BOOL Rectangles(rectlist &rects);                                       // Just return the rects
 
69
        BOOL Rectangles(rectlist &rects, RECT &cliprect);       // Return all rects within the clip region      
 
70
 
 
71
// Implementation
 
72
protected:
 
73
        HRGN region;                                                    // Region used internally
 
74
};
 
75
 
 
76
#endif // VNCREGION_DEFINED