Permalink
Browse files

renamed Screen to ofxScreen

  • Loading branch information...
1 parent 759f90c commit 5e8b9963b160eafc3101929b54831b2434eff894 Philip Whitfield committed Dec 12, 2011
Showing with 23 additions and 19 deletions.
  1. +4 −0 example/codeLite/linux.project
  2. +11 −11 src/ofxFensterCanvas.cpp
  3. +8 −8 src/ofxFensterCanvas.h
@@ -25,6 +25,8 @@
<File Name="../../src/ofxDisplayManager.cpp"/>
<File Name="../../src/ofxDisplayManager.h"/>
<File Name="../../src/ofxDisplay.cpp"/>
+ <File Name="../../src/ofxFensterCanvas.cpp"/>
+ <File Name="../../src/ofxFensterCanvas.h"/>
</VirtualDirectory>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
@@ -47,6 +49,7 @@
<General OutputFile="" IntermediateDirectory="./Debug" Command="./example" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(ProjectPath)../bin" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[
+
]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
@@ -79,6 +82,7 @@
<General OutputFile="" IntermediateDirectory="./Release" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[
+
]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
@@ -7,7 +7,7 @@ ofxFensterCanvas::ofxFensterCanvas(){
rect.height = 0;
}
-void ofxFensterCanvas::setScreenIndices(Screen * screen, int index){
+void ofxFensterCanvas::setScreenIndices(ofxScreen * screen, int index){
screen->index.x = index % columns;
screen->index.y = floor(index / columns);
}
@@ -42,18 +42,18 @@ void ofxFensterCanvas::autoSetupScreensOnDisplays(ofxFensterListener * listener,
ofxDisplayList::iterator dit;
for(dit = displays.begin(); dit < displays.end(); dit++){
- Screen * screen = setupScreenOnDisplay(listener, *dit, width, height);
+ ofxScreen * screen = setupScreenOnDisplay(listener, *dit, width, height);
}
}
void ofxFensterCanvas::setupScreensOnDisplay(ofxFensterListener * listener, ofxDisplay * display, int width, int height){
for(int i = 0; i < columns * rows; i++){
- Screen * screen = setupScreenOnDisplay(listener, display, width, height);
+ ofxScreen * screen = setupScreenOnDisplay(listener, display, width, height);
}
}
-Screen * ofxFensterCanvas::setupScreenOnDisplay(ofxFensterListener * listener, ofxDisplay * display, int width, int height){
- Screen * screen = new Screen();
+ofxScreen * ofxFensterCanvas::setupScreenOnDisplay(ofxFensterListener * listener, ofxDisplay * display, int width, int height){
+ ofxScreen * screen = new ofxScreen();
screen->display = display;
ofxFensterManager::get()->setActiveDisplay(screen->display);
@@ -69,7 +69,7 @@ Screen * ofxFensterCanvas::setupScreenOnDisplay(ofxFensterListener * listener, o
screen->window->addListener(listener);
// Insert the new screen into screens in the correct position
- list<Screen *>::iterator sit;
+ list<ofxScreen *>::iterator sit;
for(sit = screens.begin(); sit != screens.end(); sit++){
if((*sit)->display->x > screen->display->x) {
setScreenIndices(*sit, std::distance(screens.begin(), sit) + 1);
@@ -91,7 +91,7 @@ void ofxFensterCanvas::verifyAndLogScreenSetup(){
ofExit();
}
- list<Screen *>::iterator sit;
+ list<ofxScreen *>::iterator sit;
for(sit = screens.begin(); sit != screens.end(); sit++){
// it's tacky to iterate again just for logging, but this is the only
// way to ensure the log is accurate due to the sorting in the first
@@ -100,11 +100,11 @@ void ofxFensterCanvas::verifyAndLogScreenSetup(){
}
}
-Screen * ofxFensterCanvas::getActiveScreen(){
+ofxScreen * ofxFensterCanvas::getActiveScreen(){
ofxFenster * win = ofxFensterManager::get()->getActiveWindow();
- Screen * screen;
+ ofxScreen * screen;
- list<Screen *>::iterator sit;
+ list<ofxScreen *>::iterator sit;
for(sit = screens.begin(); sit != screens.end(); sit++){
if((*sit)->window == win){
screen = *sit;
@@ -116,7 +116,7 @@ Screen * ofxFensterCanvas::getActiveScreen(){
}
void ofxFensterCanvas::setupPerspectiveForActiveScreen(){
- Screen * screen = getActiveScreen();
+ ofxScreen * screen = getActiveScreen();
ofPoint size = screen->window->getWindowSize();
float halfFovTan = tanf(PI * 60 / 360.0);
@@ -6,13 +6,13 @@
typedef struct {
int x;
int y;
-} ScreenIndex;
+} ofxScreenIndex;
typedef struct {
ofxDisplay * display;
ofxFenster * window;
- ScreenIndex index;
-} Screen;
+ ofxScreenIndex index;
+} ofxScreen;
class ofxFensterCanvas {
public:
@@ -26,20 +26,20 @@ class ofxFensterCanvas {
void setup(ofxFensterListener * listener, int _columns, int _rows, int width, int height);
void setup(ofxFensterListener * listener, int _columns, int _rows, int width, int height, ofxDisplay * display);
- Screen * getActiveScreen();
+ ofxScreen * getActiveScreen();
void setupPerspectiveForActiveScreen();
- list<Screen *> screens;
+ list<ofxScreen *> screens;
int rows, columns;
private:
- void setScreenIndices(Screen * screen, int index);
+ void setScreenIndices(ofxScreen * screen, int index);
void autoSetupScreensOnDisplays(ofxFensterListener * listener, int width, int height);
void setupScreensOnDisplay(ofxFensterListener * listener, ofxDisplay * display, int width, int height);
- Screen * setupScreenOnDisplay(ofxFensterListener * listener, ofxDisplay * display, int width, int height);
+ ofxScreen * setupScreenOnDisplay(ofxFensterListener * listener, ofxDisplay * display, int width, int height);
void verifyAndLogScreenSetup();
void setWidth(int w);
void setHeight(int h);
ofRectangle rect;
-};
+};

0 comments on commit 5e8b996

Please sign in to comment.