• R/O
  • SSH
  • HTTPS

qrobosdk: コミット


コミットメタ情報

リビジョン5 (tree)
日時2008-05-07 06:12:29
作者satofumi

ログメッセージ

add ScreenCtrl.cpp

変更サマリ

差分

--- trunk/libs/gui/ScreenCtrl.cpp (nonexistent)
+++ trunk/libs/gui/ScreenCtrl.cpp (revision 5)
@@ -0,0 +1,104 @@
1+/*!
2+ \file
3+ \brief 画面管理
4+
5+ \author Satofumi KAMIMURA
6+
7+ $Id$
8+*/
9+
10+#include <string>
11+#include "ScreenCtrl.h"
12+
13+using namespace qrk;
14+
15+
16+struct ScreenCtrl::pImpl
17+{
18+ std::string error_message_;
19+
20+ static pImpl* getObject(void)
21+ {
22+ static pImpl obj;
23+ return &obj;
24+ }
25+};
26+
27+
28+ScreenCtrl::ScreenCtrl(void) : pimpl(pImpl::getObject())
29+{
30+}
31+
32+
33+ScreenCtrl::~ScreenCtrl(void)
34+{
35+}
36+
37+
38+const char* ScreenCtrl::what(void)
39+{
40+ return pimpl->error_message_.c_str();
41+}
42+
43+
44+SDL_Surface* ScreenCtrl::show(Uint32 mode)
45+{
46+ return NULL;
47+}
48+
49+
50+void ScreenCtrl::hide(void)
51+{
52+ // !!!
53+}
54+
55+
56+void ScreenCtrl::setWindowSize(size_t width, size_t height)
57+{
58+ // !!!
59+}
60+
61+
62+size_t ScreenCtrl::width(void)
63+{
64+ // !!!
65+ return 0;
66+}
67+
68+
69+size_t ScreenCtrl::height(void)
70+{
71+ // !!!
72+ return 0;
73+}
74+
75+
76+void ScreenCtrl::setFullscreen(bool on)
77+{
78+ // !!!
79+}
80+
81+
82+bool ScreenCtrl::fullscreen(void)
83+{
84+ // !!!
85+ return false;
86+}
87+
88+
89+void ScreenCtrl::setCaption(const char* caption)
90+{
91+ // !!!
92+}
93+
94+
95+void ScreenCtrl::setIcon(SDL_Surface* icon, Uint8* mask)
96+{
97+ // !!!
98+}
99+
100+
101+void ScreenCtrl::setWindowBpp(size_t bpp)
102+{
103+ // !!!
104+}
--- trunk/libs/gui/ScreenCtrl.h (nonexistent)
+++ trunk/libs/gui/ScreenCtrl.h (revision 5)
@@ -0,0 +1,59 @@
1+#ifndef SCREEN_CTRL_H
2+#define SCREEN_CTRL_H
3+
4+/*!
5+ \file
6+ \brief 画面管理
7+
8+ \author Satofumi KAMIMURA
9+
10+ $Id$
11+*/
12+
13+#include <SDL.h>
14+
15+
16+namespace qrk {
17+ class ScreenCtrl
18+ {
19+ ScreenCtrl(const ScreenCtrl& rhs);
20+ ScreenCtrl& operator = (const ScreenCtrl& rhs);
21+
22+ struct pImpl;
23+ pImpl* pimpl;
24+
25+ public:
26+ ScreenCtrl(void);
27+ ~ScreenCtrl(void);
28+
29+ /*!
30+ \brief エラー状態を返す
31+
32+ \return エラー状態を示す文字列
33+ */
34+ const char* what(void);
35+
36+ /*!
37+ \brief 画面の生成
38+
39+ \param mode SDL_SetVideoMode に渡すモード引数
40+
41+ \return SDL の返すスクリーン資源
42+ */
43+ SDL_Surface* show(Uint32 mode = 0);
44+ void hide(void);
45+
46+ void setWindowSize(size_t width, size_t height);
47+ size_t width(void);
48+ size_t height(void);
49+
50+ void setFullscreen(bool on = true);
51+ bool fullscreen(void);
52+
53+ void setCaption(const char* caption);
54+ void setIcon(SDL_Surface* icon, Uint8* mask = NULL);
55+ void setWindowBpp(size_t bpp);
56+ };
57+};
58+
59+#endif /* !SCREEN_CTRL_H */
--- trunk/libs/gui/Makefile (nonexistent)
+++ trunk/libs/gui/Makefile (revision 5)
@@ -0,0 +1,26 @@
1+# Makefile for libs/gui
2+# Satofumi KAMIMURA
3+# $Id$
4+
5+# Compile options
6+CC = ${CXX}
7+CXXFLAGS = -g -O0 -Wall -Werror ${INCLUDES} `sdl-config --cflags`
8+INCLUDES = -I../
9+
10+# Target
11+GUI_LIB = gui.a
12+TARGET = ${GUI_LIB}
13+
14+all : ${TARGET}
15+
16+clean :
17+ ${RM} *.ot ${TARGET}
18+
19+depend :
20+ makedepend -Y -- ${INCLUDES} -- ${wildcard *.h *.cpp}
21+
22+.PHONY : all clean depend
23+######################################################################
24+${GUI_LIB} : \
25+ ${GUI_LIB}(ScreenCtrl.o) \
26+
--- trunk/libs/system/sdl/Delay.cpp (revision 4)
+++ trunk/libs/system/sdl/Delay.cpp (revision 5)
@@ -11,6 +11,7 @@
1111 #include "Delay.h"
1212
1313
14-void qrk::delay(int msec) {
14+void qrk::delay(int msec)
15+ {
1516 SDL_Delay(msec);
1617 }
--- trunk/libs/system/Delay.h (revision 4)
+++ trunk/libs/system/Delay.h (revision 5)
@@ -10,7 +10,8 @@
1010 $Id$
1111 */
1212
13-namespace qrk {
13+namespace qrk
14+{
1415 void delay(int msec);
1516 };
1617
--- trunk/libs/Makefile (revision 4)
+++ trunk/libs/Makefile (revision 5)
@@ -4,4 +4,4 @@
44
55 include ../handover.mk
66
7-TARGET_DIR = system/
7+TARGET_DIR = system/ gui/
--- trunk/Makefile (revision 4)
+++ trunk/Makefile (revision 5)
@@ -14,3 +14,6 @@
1414
1515 html :
1616 doxygen
17+
18+.PHONY : all clean html upload
19+######################################################################
旧リポジトリブラウザで表示