source: trunk/src/testing/include/displayContext.h @ 4

Revision 4, 3.4 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

Line 
1/******************************************************************************
2 * SAGE - Scalable Adaptive Graphics Environment
3 *
4 * Module: displayContext.h
5 * Author : Byungil Jeong
6 *
7 *   Description:   This is the header file for the video display module of SAGE.
8 *
9 *   Notes   :    Since the display window may receive its many pieces from many servers, we need to pass multiple buffers
10 *         to this class. Each of the buffers passed contains a frame which forms a part (or whole) of the image on
11 *         the display side.
12 *
13 * Copyright (C) 2007 Electronic Visualization Laboratory,
14 * University of Illinois at Chicago
15 *
16 * All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions are met:
20 *
21 *  * Redistributions of source code must retain the above copyright
22 *    notice, this list of conditions and the following disclaimer.
23 *  * Redistributions in binary form must reproduce the above
24 *    copyright notice, this list of conditions and the following disclaimer
25 *    in the documentation and/or other materials provided with the distribution.
26 *  * Neither the name of the University of Illinois at Chicago nor
27 *    the names of its contributors may be used to endorse or promote
28 *    products derived from this software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
34 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
35 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
36 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
37 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
38 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
39 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
40 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 *
42 * Direct questions, comments etc about SAGE to sage_users@listserv.uic.edu or
43 * http://www.evl.uic.edu/cavern/forum/
44 *         
45***************************************************************************************************************************/
46
47#ifndef DISPLAY_CONTEXT_H
48#define DISPLAY_CONTEXT_H
49
50#include "sage.h"
51
52/**
53 * sageDisplayConfig
54 */
55struct sageDisplayConfig{
56   int   width;
57   int   height;
58   int   dimX;
59   int   dimY;
60   sageRect   tileRect[MAX_TILES_PER_NODE];
61
62   int   mullionX;
63   int   mullionY;
64   int   xpos;
65   int   ypos;
66   int   red, green, blue;
67   int   displayID;
68   int   winX;
69   int   winY;
70   
71   bool  fullScreenFlag;
72};
73
74/**
75 * class displayContext
76 */
77class displayContext {
78protected:
79   sageDisplayConfig configStruct;
80   bool winCreatFlag;
81   int tileNum;
82   bool singleContext;
83   
84public:
85   displayContext() : winCreatFlag(false) {}
86   virtual int init(struct sageDisplayConfig &cfg) = 0;   
87   virtual void clearScreen() {}
88   virtual void setupViewport(int i, sageRect &tileRect) {}
89   virtual void refreshTile(int i) {}
90   virtual void refreshScreen() {}
91   virtual void changeBackground(int red, int green, int blue) {}
92   virtual void switchContext(int i) {}
93   virtual void checkEvent() {}
94};
95
96#endif
Note: See TracBrowser for help on using the repository browser.