winwakeup.c revision 05b261ec
105b261ecSmrg/* 205b261ecSmrg *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. 305b261ecSmrg * 405b261ecSmrg *Permission is hereby granted, free of charge, to any person obtaining 505b261ecSmrg * a copy of this software and associated documentation files (the 605b261ecSmrg *"Software"), to deal in the Software without restriction, including 705b261ecSmrg *without limitation the rights to use, copy, modify, merge, publish, 805b261ecSmrg *distribute, sublicense, and/or sell copies of the Software, and to 905b261ecSmrg *permit persons to whom the Software is furnished to do so, subject to 1005b261ecSmrg *the following conditions: 1105b261ecSmrg * 1205b261ecSmrg *The above copyright notice and this permission notice shall be 1305b261ecSmrg *included in all copies or substantial portions of the Software. 1405b261ecSmrg * 1505b261ecSmrg *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1605b261ecSmrg *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1705b261ecSmrg *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1805b261ecSmrg *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR 1905b261ecSmrg *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 2005b261ecSmrg *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 2105b261ecSmrg *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2205b261ecSmrg * 2305b261ecSmrg *Except as contained in this notice, the name of the XFree86 Project 2405b261ecSmrg *shall not be used in advertising or otherwise to promote the sale, use 2505b261ecSmrg *or other dealings in this Software without prior written authorization 2605b261ecSmrg *from the XFree86 Project. 2705b261ecSmrg * 2805b261ecSmrg * Authors: Dakshinamurthy Karra 2905b261ecSmrg * Suhaib M Siddiqi 3005b261ecSmrg * Peter Busch 3105b261ecSmrg * Harold L Hunt II 3205b261ecSmrg */ 3305b261ecSmrg 3405b261ecSmrg#ifdef HAVE_XWIN_CONFIG_H 3505b261ecSmrg#include <xwin-config.h> 3605b261ecSmrg#endif 3705b261ecSmrg#include "win.h" 3805b261ecSmrg 3905b261ecSmrg 4005b261ecSmrg/* 4105b261ecSmrg * References to external symbols 4205b261ecSmrg */ 4305b261ecSmrg 4405b261ecSmrgextern HWND g_hDlgDepthChange; 4505b261ecSmrgextern HWND g_hDlgExit; 4605b261ecSmrgextern HWND g_hDlgAbout; 4705b261ecSmrg 4805b261ecSmrg 4905b261ecSmrg/* See Porting Layer Definition - p. 7 */ 5005b261ecSmrgvoid 5105b261ecSmrgwinWakeupHandler (int nScreen, 5205b261ecSmrg pointer pWakeupData, 5305b261ecSmrg unsigned long ulResult, 5405b261ecSmrg pointer pReadmask) 5505b261ecSmrg{ 5605b261ecSmrg MSG msg; 5705b261ecSmrg 5805b261ecSmrg /* Process all messages on our queue */ 5905b261ecSmrg while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) 6005b261ecSmrg { 6105b261ecSmrg if ((g_hDlgDepthChange == 0 6205b261ecSmrg || !IsDialogMessage (g_hDlgDepthChange, &msg)) 6305b261ecSmrg && (g_hDlgExit == 0 6405b261ecSmrg || !IsDialogMessage (g_hDlgExit, &msg)) 6505b261ecSmrg && (g_hDlgAbout == 0 6605b261ecSmrg || !IsDialogMessage (g_hDlgAbout, &msg))) 6705b261ecSmrg { 6805b261ecSmrg DispatchMessage (&msg); 6905b261ecSmrg } 7005b261ecSmrg } 7105b261ecSmrg} 72