00001 //------------------------------------------------------------------------------ 00002 // Lamp : Open source game middleware 00003 // Copyright (C) 2004 Junpei Ohtani ( Email : junpee@users.sourceforge.jp ) 00004 // 00005 // This library is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 // 00010 // This library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with this library; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 //------------------------------------------------------------------------------ 00019 00020 /** @file 00021 * ウィンドウクリエータヘッダ 00022 * @author Junpee 00023 */ 00024 00025 #ifndef WINDOW_CREATOR_H_ 00026 #define WINDOW_CREATOR_H_ 00027 00028 namespace Lamp{ 00029 00030 //------------------------------------------------------------------------------ 00031 /** 00032 * ウィンドウクリエータ 00033 */ 00034 class WindowCreator{ 00035 public: 00036 /** 00037 * ウィンドウ作成パラメータ 00038 */ 00039 class CreateParameter{ 00040 public: 00041 /** 00042 * コンストラクタ 00043 */ 00044 CreateParameter(); 00045 00046 /// ウィンドウ名 00047 String windowName_; 00048 /// インスタンスハンドル 00049 HINSTANCE instanceHandle_; 00050 /// ウィンドウプロシージャ 00051 WNDPROC windowProcedure_; 00052 /// ウィンドウスタイル 00053 u_int windowStyle_; 00054 /// 作成するウィンドウの幅 00055 int createWidth_; 00056 /// 作成ウィンドウの高さ 00057 int createHeight_; 00058 /// アイコンハンドル 00059 HICON iconHandle_; 00060 /// 小さいアイコンハンドル 00061 HICON smallIconHandle_; 00062 /// カーソルハンドル 00063 HCURSOR cursorHandle_; 00064 }; 00065 00066 /** 00067 * ウィンドウの作成 00068 * @param parameter ウィンドウ作成パラメータ 00069 * @return ウィンドウハンドル 00070 */ 00071 static HWND create(const CreateParameter& parameter); 00072 00073 /** 00074 * ウィンドウの破棄 00075 * @param windowHandle 破棄するウィンドウのハンドル 00076 */ 00077 static void destroy(HWND windowHandle); 00078 00079 private: 00080 // コンストラクタの隠蔽 00081 WindowCreator(); 00082 00083 }; 00084 00085 //------------------------------------------------------------------------------ 00086 } // End of namespace Lamp 00087 #endif // End of WINDOW_CREATOR_H_ 00088 //------------------------------------------------------------------------------ 00089