Changeset 6902 for trunk/src/user32


Ignore:
Timestamp:
Oct 1, 2001, 12:24:42 AM (24 years ago)
Author:
sandervl
Message:

added visible region callback function

Location:
trunk/src/user32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/USER32.DEF

    r6501 r6902  
    1 ; $Id: USER32.DEF,v 1.66 2001-08-09 08:45:40 sandervl Exp $
     1; $Id: USER32.DEF,v 1.67 2001-09-30 22:24:40 sandervl Exp $
    22
    33LIBRARY USER32 INITINSTANCE TERMINSTANCE
     
    705705    _OSLibWinCreateObject@32                                     @2031 NONAME
    706706    _ConvertIconGroup@12                                         @2032 NONAME
     707
     708    _WinSetVisibleRgnNotifyProc@12                               @2033 NONAME
     709    _Win32ToOS2FrameHandle@4                                     @2034 NONAME
  • trunk/src/user32/dcrgn.cpp

    r5935 r6902  
    1 /* $Id: dcrgn.cpp,v 1.6 2001-06-09 14:50:17 sandervl Exp $ */
     1/* $Id: dcrgn.cpp,v 1.7 2001-09-30 22:24:41 sandervl Exp $ */
    22
    33/*
     
    245245}
    246246//******************************************************************************
    247 //******************************************************************************
     247// WinSetVisibleRgnNotifyProc
     248//   To set a notification procedure for visible region changes of a specific window.
     249//   The procedure will be called when a WM_VRNENABLED message is posted
     250//   with ffVisRgnChanged set to TRUE
     251//
     252// Parameters:
     253//   HWND hwnd                          window handle
     254//   VISRGN_NOTIFY_PROC lpNotifyProc    notification proc or NULL to clear proc
     255//   DWORD dwUserData                   value used as 3rd parameter during
     256//                                      visible region callback
     257//
     258// NOTE: Internal API
     259//******************************************************************************
     260BOOL WIN32API WinSetVisibleRgnNotifyProc(HWND hwnd, VISRGN_NOTIFY_PROC lpNotifyProc,
     261                                         DWORD dwUserData)
     262{
     263  Win32BaseWindow *window;
     264
     265    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     266    if(!window) {
     267        dprintf(("WinSetVisibleRgnNotifyProc, window %x not found", hwnd));
     268        return FALSE;
     269    }
     270    BOOL ret = window->setVisibleRgnNotifyProc(lpNotifyProc, dwUserData);
     271    RELEASE_WNDOBJ(window);
     272    return ret;
     273}
     274//******************************************************************************
     275//******************************************************************************
  • trunk/src/user32/pmwindow.cpp

    r6783 r6902  
    1 /* $Id: pmwindow.cpp,v 1.148 2001-09-22 18:20:59 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.149 2001-09-30 22:24:41 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    374374            break;
    375375        }
     376        if(mp1) {//visible region has been altered
     377            win32wnd->callVisibleRgnNotifyProc(TRUE);
     378        }
    376379        goto RunDefWndProc;
    377380
    378381    case WM_VRNDISABLED:
    379382        dprintf(("OS2: WM_VRNDISABLED %x %x %x", win32wnd->getWindowHandle(), mp1, mp2));
     383        //visible region is about to change or WinLockWindowUpdate called
     384        //suspend window drawing
     385        win32wnd->callVisibleRgnNotifyProc(FALSE);
    380386        goto RunDefWndProc;
    381387
  • trunk/src/user32/win32wbase.cpp

    r6791 r6902  
    1 /* $Id: win32wbase.cpp,v 1.285 2001-09-23 08:14:56 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.286 2001-09-30 22:24:41 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    192192  windowpos.ptMaxPosition.x = -1;
    193193  windowpos.ptMaxPosition.y = -1;
     194
     195  lpVisRgnNotifyProc  = NULL;
     196  dwVisRgnNotifyParam = NULL;
    194197}
    195198//******************************************************************************
     
    32883291
    32893292    dprintf(("SetActiveWindow %x", getWindowHandle()));
    3290     if(getStyle() & (WS_DISABLED | WS_CHILD)) {
     3293    if(getStyle() & WS_CHILD) {
     3294//    if(getStyle() & (WS_DISABLED | WS_CHILD)) {
    32913295        dprintf(("WARNING: Window is a child or disabled"));
    32923296        return 0;
     
    38983902    if(window) {
    38993903            hwndOS2 = window->getOS2WindowHandle();
     3904            RELEASE_WNDOBJ(window);
     3905            return hwndOS2;
     3906    }
     3907//    dprintf2(("Win32BaseWindow::Win32ToOS2Handle: not a win32 window %x", hwnd));
     3908    return hwnd;
     3909}
     3910//******************************************************************************
     3911//******************************************************************************
     3912HWND WIN32API Win32ToOS2FrameHandle(HWND hwnd)
     3913{
     3914    HWND hwndOS2;
     3915
     3916    Win32BaseWindow *window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     3917
     3918    if(window) {
     3919            hwndOS2 = window->getOS2FrameWindowHandle();
    39003920            RELEASE_WNDOBJ(window);
    39013921            return hwndOS2;
  • trunk/src/user32/win32wbase.h

    r6783 r6902  
    1 /* $Id: win32wbase.h,v 1.126 2001-09-22 18:21:00 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.127 2001-09-30 22:24:42 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    2020#include <gen_object.h>
    2121#include <win32wndchild.h>
     22#include <winuser32.h>
    2223#include <winres.h>
    2324#include <scroll.h>
     
    280281         void   SetVisibleRegionChanged(BOOL changed) { fVisibleRegionChanged = changed; };
    281282         BOOL   IsVisibleRegionChanged()              { return fVisibleRegionChanged; };
    282 
     283         BOOL   setVisibleRgnNotifyProc(VISRGN_NOTIFY_PROC lpNotifyProc, DWORD dwUserData)
     284         {
     285             lpVisRgnNotifyProc  = lpNotifyProc;
     286             dwVisRgnNotifyParam = dwUserData;
     287             return TRUE;
     288         }
     289         void   callVisibleRgnNotifyProc(BOOL fDrawingAllowed)
     290         {
     291             if(lpVisRgnNotifyProc) {
     292                 lpVisRgnNotifyProc(getWindowHandle(), fDrawingAllowed, dwVisRgnNotifyParam);
     293             }
     294         }
    283295         int    GetWindowTextLength(BOOL fUnicode);
    284296         int    GetWindowTextLengthA() { return GetWindowTextLength(FALSE); };
     
    430442
    431443    PROPERTY   *propertyList;
     444
     445VISRGN_NOTIFY_PROC lpVisRgnNotifyProc;
     446        DWORD   dwVisRgnNotifyParam;
    432447       
    433448        HANDLE  hTaskList; //PM specific (switchentry handle)
Note: See TracChangeset for help on using the changeset viewer.