// -*- C++ -*-
//
//  This file is part of Siena, a wide-area event notification system.
//  See http://www.cs.colorado.edu/serl/siena/
//
//  Author: Antonio Carzaniga <carzanig@cs.colorado.edu>
//  See the file AUTHORS for full details. 
//
//  Copyright (C) 1998-2002  University of Colorado
//
//  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, write to the Free Software
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
//  USA, or send email to serl@cs.colorado.edu.
//
//
// $Id: geometry.h,v 1.1 2002/06/12 17:10:27 carzanig Exp $
//
#ifndef _geometry_h
#define _geometry_h

#include <gtk/gtk.h>

class Point : public GdkPoint {
public:
			Point();
			Point(gint16 a, gint16 b);
			Point(const Point & p);

    bool		operator == (const Point & p) const;
    bool		operator != (const Point & p) const;
    Point &		operator = (const Point & p);
    Point &		operator -= (const Point & p);
    Point &		operator += (const Point & p);
    Point &		operator *= (int);
    Point &		operator /= (int);

    Point &		move_to(gint16 a, gint16 b);
};

typedef Point Vector;

Point operator - (const Point & a, const Point & b);
Point operator + (const Point & a, const Point & b);
Point operator * (const Point & a, int);
Point operator / (const Point & a, int);

class Rectangle : public GdkRectangle {
			Rectangle(const Point &, const Point &);
			Rectangle(const Point &, guint16 w, guint16 h);

    Rectangle &		operator += (const Rectangle &); // union
    bool 		operator == (const Rectangle &); 

    Point		top_left();
};

#ifndef NO_INLINE
#include <geometry.icc>
#endif

#endif
