160786Sps/* -*-C++-*-	$NetBSD: window.h,v 1.3 2005/12/11 12:17:28 christos Exp $	*/
260786Sps
360786Sps/*-
460786Sps * Copyright (c) 2001 The NetBSD Foundation, Inc.
560786Sps * All rights reserved.
660786Sps *
760786Sps * This code is derived from software contributed to The NetBSD Foundation
860786Sps * by UCHIYAMA Yasushi.
960786Sps *
1060786Sps * Redistribution and use in source and binary forms, with or without
1160786Sps * modification, are permitted provided that the following conditions
1260786Sps * are met:
1360786Sps * 1. Redistributions of source code must retain the above copyright
1460786Sps *    notice, this list of conditions and the following disclaimer.
1560786Sps * 2. Redistributions in binary form must reproduce the above copyright
1660786Sps *    notice, this list of conditions and the following disclaimer in the
1760786Sps *    documentation and/or other materials provided with the distribution.
1860786Sps *
1960786Sps * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2060786Sps * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2160786Sps * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2260786Sps * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2360786Sps * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2460786Sps * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2560786Sps * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2660786Sps * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2760786Sps * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2860786Sps * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2960786Sps * POSSIBILITY OF SUCH DAMAGE.
3060786Sps */
3160786Sps
3260786Sps#ifndef _HPCBOOT_WINDOW_H_
3360786Sps#define	_HPCBOOT_WINDOW_H_
3460786Sps
3560786Spsclass Window {
3660786Spspublic:
3760786Sps	HWND _window;
3860786Sps	HWND _parent_window;
3960786Sps	HpcBootApp &_app;
4060786Sps	RECT _rect;
4160786Sps
4260786Spspublic:
4360786Sps	explicit Window(HpcBootApp &app)
4460786Sps		: _app(app), _parent_window(0) { /* NO-OP */ }
4560786Sps	explicit Window(HpcBootApp &app, HWND parent)
4660786Sps		: _app(app), _parent_window(parent) { /* NO-OP */ }
4760786Sps	virtual ~Window(void) { /* NO-OP */ }
4860786Sps
4960786Sps	// Window Procedure callback
5060786Sps	static LRESULT CALLBACK _wnd_proc(HWND, UINT, WPARAM, LPARAM);
5160786Sps	// Dialog Procedure callback
5260786Sps	static BOOL CALLBACK _dlg_proc(HWND, UINT, WPARAM, LPARAM);
5360786Sps	// Window dependent Window Procedure
5460786Sps	virtual BOOL proc(HWND w, UINT msg, WPARAM wparam, LPARAM lparam);
5560786Sps};
5660786Sps
5760786Sps#endif //_HPCBOOT_WINDOW_H_
5860786Sps