00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef ARCHON_DISPLAY_SCREEN_H
00021 #define ARCHON_DISPLAY_SCREEN_H
00022
00023 #include <stdexcept>
00024 #include <string>
00025
00026 #include <archon/util/exception.H>
00027 #include <archon/util/ref.H>
00028 #include <archon/display/connection.H>
00029 #include <archon/display/visual.H>
00030
00031 namespace Archon
00032 {
00033 namespace Display
00034 {
00035 using namespace std;
00036 using namespace Utilities;
00037
00038
00039
00040
00041
00042 struct Connection;
00043 struct Visual;
00044
00052 struct NoSuchVisualException: virtual Exception
00053 {
00054 NoSuchVisualException(string l): Exception(l) {}
00055 };
00056
00057
00071 struct Screen: virtual RefObjectBase
00072 {
00079 virtual Ref<Connection> getConnection() = 0;
00080
00088 virtual Ref<Visual> getDefaultVisual() = 0;
00089
00143 virtual Ref<Visual> chooseVisual(bool doubleBuffer = true,
00144 bool stereo = false,
00145 int red = 8, int green = 8,
00146 int blue = 8, int alpha = 8,
00147 int depth = 16, int stencil = 0,
00148 int accumRed = 0, int accumGreen = 0,
00149 int accumBlue = 0, int accumAlpha = 0)
00150 throw(NoSuchVisualException) = 0;
00151
00159 virtual int getNumberOfVisuals() = 0;
00160
00170 virtual Ref<Visual> getVisual(int index) throw(out_of_range) = 0;
00171
00177 virtual int getWidth() = 0;
00178
00184 virtual int getHeight() = 0;
00185
00191 virtual double getHorizontalDotPitch() = 0;
00192
00198 virtual double getVerticalDotPitch() = 0;
00199 };
00200 }
00201 }
00202
00203 #endif // ARCHON_DISPLAY_SCREEN_H