home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / oct93 / graphics / graphtal.lha / Graphtal / X11_Window.h < prev    next >
C/C++ Source or Header  |  1992-11-17  |  1KB  |  56 lines

  1. /*
  2.  * X11_Window.h - class definition x11 window support.
  3.  *
  4.  * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
  5.  *                     University of Berne, Switzerland
  6.  * All rights reserved.
  7.  *
  8.  * This software may be freely copied, modified, and redistributed
  9.  * provided that this copyright notice is preserved on all copies.
  10.  *
  11.  * You may not distribute this software, in whole or in part, as part of
  12.  * any commercial product without the express consent of the authors.
  13.  *
  14.  * There is no warranty or other guarantee of fitness of this software
  15.  * for any purpose.  It is provided solely "as is".
  16.  *
  17.  */
  18.  
  19. #ifndef X11_Window_H
  20. # define X11_Window_H
  21.  
  22. #include <X11/Xlib.h>
  23. #include <X11/Xutil.h>
  24. #include <X11/Xatom.h>
  25.  
  26. #include "BaseWindow.h"
  27.  
  28. //___________________________________________________________ X11_Window
  29.  
  30. class X11_Window : public BaseWindow
  31. {
  32. public:
  33.   X11_Window();
  34.  
  35.   void open(int resX, int resY, const rcString& windowName);
  36.   void close();
  37.   void clear();
  38.   char waitForKey();
  39.   void writeText(const rcString&, int, int);
  40.  
  41. protected:
  42.   void drawLine(int, int, int, int);
  43.   void flush();
  44.  
  45. private:
  46.   Display* display;
  47.   Window win;
  48.   char* display_name;
  49.   GC gc;
  50.   XSegment* segments;
  51.   long RequestSize;
  52.   int segmentsInBuffer;
  53. };
  54.  
  55. #endif // X11_Window_H
  56.