more robust window handling

This commit is contained in:
cxgeorge 2001-07-18 06:20:49 +00:00
parent 0eb668b1ee
commit ec93057fcb
5 changed files with 1526 additions and 1462 deletions

View File

@ -29,6 +29,8 @@ ConfigureFn(config_wdxdisplay) {
init_libwdxdisplay();
}
extern void AtExitFn(void);
////////////////////////////////////////////////////////////////////
// Function: init_libwdxdisplay
// Description: Initializes the library. This must be called at
@ -45,6 +47,8 @@ init_libwdxdisplay() {
}
initialized = true;
atexit(AtExitFn);
wdxGraphicsPipe::init_type();
GraphicsPipe::get_factory().register_factory(
wdxGraphicsPipe::get_class_type(),

View File

@ -31,8 +31,8 @@ TypeHandle wdxGraphicsPipe::_type_handle;
wdxGraphicsPipe::wdxGraphicsPipe(const PipeSpecifier& spec)
: InteractiveGraphicsPipe(spec) {
_width = GetSystemMetrics(SM_CXSCREEN);
_height = GetSystemMetrics(SM_CYSCREEN);
// _width = GetSystemMetrics(SM_CXSCREEN);
// _height = GetSystemMetrics(SM_CYSCREEN);
_shift = false;
// global_pipe = this;
}

View File

@ -67,8 +67,8 @@ private:
static TypeHandle _type_handle;
int _width;
int _height;
// int _width;
// int _height;
bool _shift;
protected:

File diff suppressed because it is too large Load Diff

View File

@ -60,8 +60,6 @@ public:
virtual TypeHandle get_gsg_type() const;
static GraphicsWindow* make_wdxGraphicsWindow(const FactoryParams &params);
static LONG WINAPI static_window_proc(HWND hwnd, UINT msg, WPARAM wparam,
LPARAM lparam);
LONG window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
void process_events(void);
@ -92,14 +90,14 @@ protected:
public:
HWND _mwindow;
HWND _hParentWindow;
HWND _hOldForegroundWindow;
private:
HDC _hdc;
HPALETTE _colormap;
typedef enum { NotAdjusting,MovingOrResizing,Resizing } WindowAdjustType;
WindowAdjustType _WindowAdjustingType;
HCURSOR _hMouseCrossIcon;
HCURSOR _hMouseCursor;
bool _bSizeIsMaximized;
bool _mouse_input_enabled;
bool _mouse_motion_enabled;
@ -107,6 +105,8 @@ private:
bool _mouse_entry_enabled;
int _entry_state;
bool _ignore_key_repeat;
bool _exiting_window;
bool _window_inactive;
public:
static TypeHandle get_class_type(void);
@ -114,6 +114,9 @@ public:
virtual TypeHandle get_type(void) const;
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
void DestroyMe(bool bAtExitFnCalled);
virtual void close_window(int exit_status);
private:
static TypeHandle _type_handle;
};