Changeset 9598 for trunk/src


Ignore:
Timestamp:
Jan 3, 2003, 5:35:58 PM (23 years ago)
Author:
sandervl
Message:

Merged Rewind menu control

Location:
trunk/src/user32
Files:
1 added
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/HOOK.CPP

    r8474 r9598  
    1 /* $Id: HOOK.CPP,v 1.38 2002-05-23 07:13:00 sandervl Exp $ */
     1/* $Id: HOOK.CPP,v 1.39 2003-01-03 16:35:50 sandervl Exp $ */
    22
    33/*
     
    731731BOOL WIN32API CallMsgFilterA(LPMSG msg, INT code )
    732732{
    733 #if 0 //CB: not a Win32 API and unimplemented
    734     if (GetSysModalWindow()) return FALSE;      /* ??? */
    735 #endif
    736733    if (HOOK_CallHooksA( WH_SYSMSGFILTER, code, 0, (LPARAM)msg ))
    737734      return TRUE;
     
    745742BOOL WIN32API CallMsgFilterW(LPMSG msg, INT code )
    746743{
    747 #if 0 //CB: not a Win32 API and unimplemented
    748     if (GetSysModalWindow()) return FALSE;      /* ??? */
    749 #endif
    750744    if (HOOK_CallHooksW( WH_SYSMSGFILTER, code, 0, (LPARAM)msg ))
    751745      return TRUE;
     
    783777        remove &&
    784778        (msg->hwnd != GetDesktopWindow()) &&
    785         !IsMenuActive())
     779        !MENU_IsMenuActive())
    786780    {   
    787781        HELPINFO hi;
  • trunk/src/user32/controls.cpp

    r9523 r9598  
    1 /* $Id: controls.cpp,v 1.11 2002-12-18 12:28:02 sandervl Exp $ */
     1/* $Id: controls.cpp,v 1.12 2003-01-03 16:35:51 sandervl Exp $ */
    22/* File: controls.cpp -- Win32 common controls
    33 *
     
    4848
    4949  dprintf(("Register SCROLLBAR class"));
    50   controlAtoms[SCROLLBAR_CONTROL] = SCROLLBAR_Register();
     50  controlAtoms[SCROLLBAR_CONTROL] =
     51#if 0
     52          InternalRegisterClass((LPSTR)SCROLL_builtin_class.name,
     53                                SCROLL_builtin_class.style,
     54                                SCROLL_builtin_class.procA,
     55                                SCROLL_builtin_class.procW,
     56                                SCROLL_builtin_class.extra,
     57                                SCROLL_builtin_class.cursor,
     58                                SCROLL_builtin_class.brush);
     59#else
     60SCROLLBAR_Register();
     61#endif
    5162  if (!controlAtoms[SCROLLBAR_CONTROL]) dprintf(("failed!!!"));
    5263
     
    122133
    123134  dprintf(("Register POPUPMENU class"));
    124   controlAtoms[POPUPMENU_CONTROL] = POPUPMENU_Register();
     135  controlAtoms[POPUPMENU_CONTROL] =
     136          InternalRegisterClass((LPSTR)MENU_builtin_class.name,
     137                                MENU_builtin_class.style,
     138                                MENU_builtin_class.procA,
     139                                MENU_builtin_class.procW,
     140                                MENU_builtin_class.extra,
     141                                MENU_builtin_class.cursor,
     142                                MENU_builtin_class.brush);
    125143  if (!controlAtoms[POPUPMENU_CONTROL]) dprintf(("failed!!!"));
     144  MENU_Init();
    126145}
    127146
     
    135154
    136155  dprintf(("Unregister SCROLLBAR class"));
     156#if 0
     157  if (!UnregisterClassA((LPSTR)SCROLL_builtin_class.name, NULL)) dprintf(("failed!!!"));
     158#else
    137159  if (!SCROLLBAR_Unregister()) dprintf(("failed!!!"));
     160#endif
    138161
    139162  dprintf(("Unregister LISTBOX class"));
     
    165188
    166189  dprintf(("Unregister POPUPMENU class"));
    167   if (!POPUPMENU_Unregister()) dprintf(("failed!!!"));
    168 
     190  if (!UnregisterClassA((LPSTR)MENU_builtin_class.name, NULL)) dprintf(("failed!!!"));
    169191}
    170192
  • trunk/src/user32/ctrlconf.h

    r9523 r9598  
    1 /* $Id: ctrlconf.h,v 1.1 2002-12-18 12:28:02 sandervl Exp $ */
     1/* $Id: ctrlconf.h,v 1.2 2003-01-03 16:35:51 sandervl Exp $ */
    22/*
    33 * Win32 common controls
     
    99
    1010#include "wndmsg.h"
     11#include "win32wmisc.h"
    1112
    1213#define SPY_GetMsgName(msg, hwnd)       GetMsgText(msg)
     
    2021#define  WIN_SuspendWndsLock()          0
    2122#define  WIN_RestoreWndsLock(ipreviousLock)
     23
     24//WIN31 look only -> we don't use it
     25#define NC_DrawSysButton(hwnd, hdc, state)
     26
    2227
    2328#define LOCAL_Alloc(ds, flags, size)            0
     
    6166extern const struct builtin_class_descr EDIT_builtin_class;
    6267extern const struct builtin_class_descr MDICLIENT_builtin_class;
     68extern const struct builtin_class_descr SCROLL_builtin_class;
     69extern const struct builtin_class_descr MENU_builtin_class;
    6370
    6471#ifdef __cplusplus
  • trunk/src/user32/menu.h

    r6762 r9598  
    2222BOOL POPUPMENU_Register();
    2323BOOL POPUPMENU_Unregister();
    24 BOOL IsMenuActive(void);
     24BOOL MENU_IsMenuActive(void);
    2525
    2626#ifdef __cplusplus
  • trunk/src/user32/oslibmsg.cpp

    r9356 r9598  
    1 /* $Id: oslibmsg.cpp,v 1.63 2002-10-28 12:22:31 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.64 2003-01-03 16:35:54 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    1414 *
    1515 * TODO: Filter translation isn't correct! (for posted messages or messages that don't have
    16  *       a PM version.
     16 *       a PM version)
     17 *
     18 * TODO: Flaw in our message handling; we don't handle posted/sent (by the app)
     19 *       system messages properly if removed from the queue with PeekMessage.
     20 *       e.g.
     21 *       PostMessage(WM_KEYDOWN)
     22 *       PeekMessage(any, PM_NOREMOVE)
     23 *       ...
     24 *       PeekMessage(WM_KEYDOWN, WM_KEYDOWN, PM_REMOVE)
     25 *
     26 *       So what we really need is a complete win to os2 message translation
     27 *       in Post/SendMessage. Quite a lot of work though...
    1728 *
    1829 */
  • trunk/src/user32/oslibmsg.h

    r9008 r9598  
    1 /* $Id: oslibmsg.h,v 1.18 2002-08-15 15:45:45 sandervl Exp $ */
     1/* $Id: oslibmsg.h,v 1.19 2003-01-03 16:35:54 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    1212#ifndef __OSLIBMSG_H__
    1313#define __OSLIBMSG_H__
     14
     15
     16#ifdef __cplusplus
    1417
    1518ULONG TranslateWinMsg(ULONG msg);
     
    3942BOOL  OSLibWinReplyMessage(ULONG result);
    4043ULONG OSLibWinQueryQueueStatus();
    41 
    42 void  SetMenuDoubleClick(BOOL fSet);
    4344
    4445BOOL  OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode);
     
    376377#define OSSC_SYSMENU                 0x8007
    377378
     379#endif
     380
     381#ifdef __cplusplus
     382extern "C" {
     383#endif
     384
     385void  OSLibSetMenuDoubleClick(BOOL fSet);
     386
     387#ifdef __cplusplus
     388}
     389#endif
     390
    378391#endif //__OSLIBMSG_H__
  • trunk/src/user32/oslibmsgtranslate.cpp

    r9584 r9598  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.96 2003-01-02 12:35:36 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.97 2003-01-03 16:35:54 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    9393//******************************************************************************
    9494//******************************************************************************
    95 void SetMenuDoubleClick(BOOL fSet)
     95void OSLibSetMenuDoubleClick(BOOL fSet)
    9696{
    9797  fGenerateDoubleClick = fSet;
     
    376376                 }
    377377                 else winMsg->message += (WINWM_LBUTTONDBLCLK - WINWM_NCLBUTTONDOWN);
    378                  doubleClickMsg.message = 0;
     378                 if(fMsgRemoved) doubleClickMsg.message = 0;
    379379            }
    380380            else {
    381381                 dprintf(("save for double click"));
    382                  doubleClickMsg = *winMsg;
    383                  if(doubleClickMsg.message >= WINWM_NCLBUTTONDOWN && doubleClickMsg.message <= WINWM_NCMBUTTONDOWN) {
    384                       doubleClickMsg.message += (WINWM_LBUTTONDOWN - WINWM_NCLBUTTONDOWN);
     382                 if(fMsgRemoved) {
     383                     doubleClickMsg = *winMsg;
     384                     if(doubleClickMsg.message >= WINWM_NCLBUTTONDOWN && doubleClickMsg.message <= WINWM_NCMBUTTONDOWN) {
     385                          doubleClickMsg.message += (WINWM_LBUTTONDOWN - WINWM_NCLBUTTONDOWN);
     386                     }
    385387                 }
    386388            }
  • trunk/src/user32/oslibwin.cpp

    r9590 r9598  
    1 /* $Id: oslibwin.cpp,v 1.136 2003-01-02 17:02:04 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.137 2003-01-03 16:35:55 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    11691169BOOL OSLibWinRemoveFromTasklist(HANDLE hTaskList)
    11701170{
     1171    dprintf(("OSLibWinRemoveFromTasklist %x", hTaskList));
    11711172    return (WinRemoveSwitchEntry(hTaskList)) ? FALSE : TRUE;
    11721173}
     
    11941195        swctrl.uchVisibility    = SWL_INVISIBLE;
    11951196    }
    1196     return WinAddSwitchEntry(&swctrl);
     1197    HANDLE hTaskList = WinAddSwitchEntry(&swctrl);
     1198    dprintf(("OSLibWinAddToTaskList %s %x", swctrl.szSwtitle, hTaskList));
     1199    return hTaskList;
    11971200}
    11981201//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r9575 r9598  
    1 /* $Id: oslibwin.h,v 1.70 2003-01-01 14:29:43 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.71 2003-01-03 16:35:56 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    1313#ifndef __OSLIBWIN_H__
    1414#define __OSLIBWIN_H__
     15
     16#ifdef __cplusplus
    1517#include <oslibgdi.h>
    1618
     
    362364
    363365BOOL   OSLibWinShowPointer(BOOL fShow);
    364 HWND OSLibWinCreateInvisibleScroller(HWND parentHWND, int direction);
     366HWND   OSLibWinCreateInvisibleScroller(HWND parentHWND, int direction);
     367
     368ULONG  OSLibWinQuerySysColor(int index);
     369
     370#endif
    365371
    366372   #define PMSYSCLR_SHADOWHILITEBGND         (-50L)
     
    413419                                (((colorRef) & 0x000000FF)<<16)   )
    414420
    415 ULONG  OSLibWinQuerySysColor(int index);
    416 
    417421#endif //__OSLIBWIN_H__
  • trunk/src/user32/win32wbase.h

    r9463 r9598  
    1 /* $Id: win32wbase.h,v 1.147 2002-12-04 15:23:41 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.148 2003-01-03 16:35:56 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    476476        LONG  HandleNCHitTest(POINT pt);
    477477        BOOL  GetSysPopupPos(RECT* rect);
     478        BOOL  DrawSysButton(HDC hdc,RECT *rect);
    478479private:
    479         BOOL  DrawSysButton(HDC hdc,RECT *rect);
    480480        BOOL  DrawGrayButton(HDC hdc,int x,int y);
    481481        VOID  DrawCloseButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
  • trunk/src/user32/win32wbasenonclient.cpp

    r9575 r9598  
    1 /* $Id: win32wbasenonclient.cpp,v 1.46 2003-01-01 14:29:45 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.47 2003-01-03 16:35:57 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    15541554  return DrawCaptionTemp(hwnd,hdc,rect,hFont,hIcon,(LPWSTR)str,uFlags,TRUE);
    15551555}
    1556 #if 0
    1557 //Control helpers
    1558 /***********************************************************************
    1559  *           NC_GetSysPopupPos
    1560  */
    1561 void NC_GetSysPopupPos( HWND hwnd, RECT* rect )
    1562 {
    1563     if (IsIconic(hwnd)) GetWindowRect( hwnd, rect );
    1564     else
    1565     {
    1566 #ifdef __WIN32OS2__
    1567         Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    1568         if (!win32wnd) return;
    1569 
    1570         win32wnd->GetSysPopupPos(rect);
    1571 
    1572         RELEASE_WNDOBJ(win32wnd);
    1573 #else
    1574         WND *wndPtr = WIN_FindWndPtr( hwnd );
    1575         if (!wndPtr) return;
    1576 
    1577         NC_GetInsideRect( hwnd, rect );
    1578         OffsetRect( rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top);
    1579         if (wndPtr->dwStyle & WS_CHILD)
    1580             ClientToScreen( GetParent(hwnd), (POINT *)rect );
    1581         if (TWEAK_WineLook == WIN31_LOOK) {
    1582             rect->right = rect->left + GetSystemMetrics(SM_CXSIZE);
    1583             rect->bottom = rect->top + GetSystemMetrics(SM_CYSIZE);
    1584         }
    1585         else {
    1586             rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1;
    1587             rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1;
    1588         }
    1589         WIN_ReleaseWndPtr( wndPtr );
    1590 #endif
    1591     }
    1592 }
    1593 //*****************************************************************************
    1594 //*****************************************************************************
    1595 BOOL NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down)
    1596 {
    1597     BOOL ret;
    1598 
    1599     Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    1600     if (!win32wnd) return FALSE;
    1601 
    1602     ret = win32wnd->DrawSysButton(hwnd, hdc);
    1603 
    1604     RELEASE_WNDOBJ(win32wnd);
    1605 
    1606     return ret;
    1607 }
    1608 #endif
     1556
  • trunk/src/user32/win32wmisc.cpp

    r6762 r9598  
    1 /* $Id: win32wmisc.cpp,v 1.1 2001-09-19 15:39:51 sandervl Exp $ */
     1/* $Id: win32wmisc.cpp,v 1.2 2003-01-03 16:35:57 sandervl Exp $ */
    22/*
    33 * Misc. functions for window management
     
    3232#include "win32wndhandle.h"
    3333#include "win32wmisc.h"
     34#include "ctrlconf.h"
    3435
    3536//******************************************************************************
     
    141142void NC_GetSysPopupPos( HWND hwnd, RECT* rect )
    142143{
    143    Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    144 
    145    if (!win32wnd) return;
    146 
    147    win32wnd->GetSysPopupPos(rect);
    148    RELEASE_WNDOBJ(win32wnd);
    149 }
    150 //******************************************************************************
    151 //******************************************************************************
     144    if (IsIconic(hwnd)) GetWindowRect( hwnd, rect );
     145    else
     146    {
     147#ifdef __WIN32OS2__
     148        Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     149        if (!win32wnd) return;
     150
     151        win32wnd->GetSysPopupPos(rect);
     152
     153        RELEASE_WNDOBJ(win32wnd);
     154#else
     155        WND *wndPtr = WIN_FindWndPtr( hwnd );
     156        if (!wndPtr) return;
     157
     158        NC_GetInsideRect( hwnd, rect );
     159        OffsetRect( rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top);
     160        if (wndPtr->dwStyle & WS_CHILD)
     161            ClientToScreen( GetParent(hwnd), (POINT *)rect );
     162        if (TWEAK_WineLook == WIN31_LOOK) {
     163            rect->right = rect->left + GetSystemMetrics(SM_CXSIZE);
     164            rect->bottom = rect->top + GetSystemMetrics(SM_CYSIZE);
     165        }
     166        else {
     167            rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1;
     168            rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1;
     169        }
     170        WIN_ReleaseWndPtr( wndPtr );
     171#endif
     172    }
     173}
     174//*****************************************************************************
     175//*****************************************************************************
     176BOOL NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down)
     177{
     178    BOOL ret;
     179
     180    Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     181    if (!win32wnd) return FALSE;
     182
     183    ret = win32wnd->DrawSysButton(hdc, NULL);
     184
     185    RELEASE_WNDOBJ(win32wnd);
     186
     187    return ret;
     188}
     189//*****************************************************************************
     190//*****************************************************************************
     191INT NC_HandleNCHitTest( HWND hwnd, POINT pt)
     192{
     193    INT ht;
     194
     195    Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     196    if(win32wnd==NULL) {
     197        //SvL: This happens in Moraff's YourJongg 2.0, return here
     198        //TODO: Check if this is supposed to happen at all...
     199        return HTERROR;
     200    }
     201
     202    ht = win32wnd->HandleNCHitTest(pt);
     203    RELEASE_WNDOBJ(win32wnd);
     204
     205    return ht;
     206}
     207//*****************************************************************************
     208//*****************************************************************************
  • trunk/src/user32/win32wmisc.h

    r6762 r9598  
    1 /* $Id: win32wmisc.h,v 1.1 2001-09-19 15:39:51 sandervl Exp $ */
     1/* $Id: win32wmisc.h,v 1.2 2003-01-03 16:35:58 sandervl Exp $ */
    22/*
    33 * Misc. functions for window management
     
    2020#endif
    2121
     22#define get_win_sys_menu( hwnd ) getSysMenu(hwnd)
     23
    2224MDICLIENTINFO *get_client_info( HWND client );
    2325HMENU WIN32API getSysMenu(HWND hwnd);
    2426VOID setSysMenu(HWND hwnd,HMENU hMenu);
    2527void GetWindowRectParent(HWND hwnd, RECT *pRect);
     28HWND *WIN_ListChildren( HWND hwnd );
     29
    2630void NC_GetSysPopupPos( HWND hwnd, RECT* rect );
    27 HWND *WIN_ListChildren( HWND hwnd );
     31BOOL NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down);
     32INT  NC_HandleNCHitTest( HWND hwnd, POINT pt);
     33
     34HWND WINAPI GetAncestor( HWND hwnd, UINT type );
    2835
    2936#ifdef __cplusplus
  • trunk/src/user32/windowclass.cpp

    r9523 r9598  
    1 /* $Id: windowclass.cpp,v 1.26 2002-12-18 12:28:08 sandervl Exp $ */
     1/* $Id: windowclass.cpp,v 1.27 2003-01-03 16:35:58 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Code for OS/2
     
    139139    }
    140140
    141     dprintf(("InternalRegisterClass %s %x %x %x %d %x %x", lpszClassName, dwStyle, pfnClassA, pfnClassW, cbExtraWindowWords, lpszCursor, hBrush));
     141    if(HIWORD(lpszClassName)) {
     142         dprintf(("InternalRegisterClass %s %x %x %x %d %x %x", lpszClassName, dwStyle, pfnClassA, pfnClassW, cbExtraWindowWords, lpszCursor, hBrush));
     143    }
     144    else dprintf(("InternalRegisterClass %x %x %x %x %d %x %x", lpszClassName, dwStyle, pfnClassA, pfnClassW, cbExtraWindowWords, lpszCursor, hBrush));
     145
    142146    wc.cbSize        = sizeof(wc);
    143147    wc.style         = dwStyle;
Note: See TracChangeset for help on using the changeset viewer.