Skip to content

Commit dd68420

Browse files
authored
ofAppBaseWindow format (#7353)
#changelog #app
1 parent 1d6e2c1 commit dd68420

1 file changed

Lines changed: 41 additions & 44 deletions

File tree

libs/openFrameworks/app/ofAppBaseWindow.h

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -19,87 +19,84 @@ typedef struct _XDisplay Display;
1919
#endif
2020

2121
class ofAppBaseWindow{
22-
2322
public:
2423

25-
ofAppBaseWindow(){};
26-
virtual ~ofAppBaseWindow(){};
24+
ofAppBaseWindow(){}
25+
virtual ~ofAppBaseWindow(){}
2726

2827
virtual void setup(const ofWindowSettings & settings)=0;
2928
virtual void update()=0;
3029
virtual void draw()=0;
3130
virtual bool getWindowShouldClose(){
3231
return false;
3332
}
34-
virtual void setWindowShouldClose(){
35-
}
36-
virtual void close(){
37-
}
33+
virtual void setWindowShouldClose(){}
34+
virtual void close(){}
3835
virtual ofCoreEvents & events() = 0;
3936
virtual std::shared_ptr<ofBaseRenderer> & renderer() = 0;
4037

41-
virtual void hideCursor() {}
42-
virtual void showCursor() {}
38+
virtual void hideCursor(){}
39+
virtual void showCursor(){}
4340

44-
virtual void setWindowPosition(int x, int y) {}
45-
virtual void setWindowShape(int w, int h) {}
41+
virtual void setWindowPosition(int x, int y){}
42+
virtual void setWindowShape(int w, int h){}
4643

47-
virtual glm::vec2 getWindowPosition() {return glm::vec2(); }
48-
virtual glm::vec2 getWindowSize(){return glm::vec2(); }
49-
virtual glm::vec2 getScreenSize(){return glm::vec2(); }
44+
virtual glm::vec2 getWindowPosition(){ return glm::vec2(); }
45+
virtual glm::vec2 getWindowSize(){ return glm::vec2(); }
46+
virtual glm::vec2 getScreenSize(){ return glm::vec2(); }
5047

51-
virtual void setOrientation(ofOrientation orientation){ }
52-
virtual ofOrientation getOrientation(){ return OF_ORIENTATION_DEFAULT; }
53-
virtual bool doesHWOrientation(){return false;}
48+
virtual void setOrientation(ofOrientation orientation){ }
49+
virtual ofOrientation getOrientation(){ return OF_ORIENTATION_DEFAULT; }
50+
virtual bool doesHWOrientation(){ return false; }
5451

5552
//this is used by ofGetWidth and now determines the window width based on orientation
56-
virtual int getWidth(){ return 0; }
57-
virtual int getHeight(){ return 0; }
53+
virtual int getWidth(){ return 0; }
54+
virtual int getHeight(){ return 0; }
55+
56+
virtual void setWindowTitle(std::string title){}
5857

59-
virtual void setWindowTitle(std::string title){}
58+
virtual ofWindowMode getWindowMode(){ return OF_WINDOW; }
6059

61-
virtual ofWindowMode getWindowMode() {return OF_WINDOW ;}
60+
virtual void setFullscreen(bool fullscreen){}
61+
virtual void toggleFullscreen(){}
6262

63-
virtual void setFullscreen(bool fullscreen){}
64-
virtual void toggleFullscreen(){}
63+
virtual void enableSetupScreen(){}
64+
virtual void disableSetupScreen(){}
6565

66-
virtual void enableSetupScreen(){}
67-
virtual void disableSetupScreen(){}
68-
69-
virtual void setVerticalSync(bool enabled){};
70-
virtual void setClipboardString(const std::string& text) {}
71-
virtual std::string getClipboardString() { return ""; }
66+
virtual void setVerticalSync(bool enabled){}
67+
virtual void setClipboardString(const std::string& text){}
68+
virtual std::string getClipboardString(){ return ""; }
7269

73-
virtual void makeCurrent(){};
74-
virtual void swapBuffers() {}
75-
virtual void startRender() {}
76-
virtual void finishRender() {}
70+
virtual void makeCurrent(){}
71+
virtual void swapBuffers(){}
72+
virtual void startRender(){}
73+
virtual void finishRender(){}
7774

78-
virtual void * getWindowContext(){return nullptr;};
75+
virtual void * getWindowContext(){ return nullptr; }
7976

8077
#if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY)
81-
virtual Display* getX11Display(){return nullptr;}
82-
virtual Window getX11Window() {return 0;}
78+
virtual Display* getX11Display(){ return nullptr; }
79+
virtual Window getX11Window(){ return 0; }
8380
#endif
8481

8582
#if defined(TARGET_LINUX) && !defined(TARGET_OPENGLES)
86-
virtual GLXContext getGLXContext(){return 0;}
83+
virtual GLXContext getGLXContext(){ return 0; }
8784
#endif
8885

8986
#if defined(TARGET_LINUX) && defined(TARGET_OPENGLES)
90-
virtual EGLDisplay getEGLDisplay(){return 0;}
91-
virtual EGLContext getEGLContext(){return 0;}
92-
virtual EGLSurface getEGLSurface(){return 0;}
87+
virtual EGLDisplay getEGLDisplay(){ return 0; }
88+
virtual EGLContext getEGLContext(){ return 0; }
89+
virtual EGLSurface getEGLSurface(){ return 0; }
9390
#endif
9491

9592
#if defined(TARGET_OSX)
96-
virtual void * getNSGLContext(){return nullptr;}
97-
virtual void * getCocoaWindow(){return nullptr;}
93+
virtual void * getNSGLContext(){ return nullptr; }
94+
virtual void * getCocoaWindow(){ return nullptr; }
9895
#endif
9996

10097
#if defined(TARGET_WIN32)
101-
virtual HGLRC getWGLContext(){return 0;}
102-
virtual HWND getWin32Window(){return 0;}
98+
virtual HGLRC getWGLContext(){ return 0; }
99+
virtual HWND getWin32Window(){ return 0; }
103100
#endif
104101
};
105102

0 commit comments

Comments
 (0)