Changeset 1818 for trunk/src


Ignore:
Timestamp:
Nov 23, 1999, 8:34:19 PM (26 years ago)
Author:
sandervl
Message:

display api fixes

Location:
trunk/src/user32
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r1671 r1818  
    1 # $Id: Makefile,v 1.43 1999-11-09 19:23:16 sandervl Exp $
     1# $Id: Makefile,v 1.44 1999-11-23 19:34:19 sandervl Exp $
    22
    33#
     
    3333        icon.obj hook.obj hooks.obj winmenu.obj winkeyboard.obj \
    3434        defwndproc.obj syscolor.obj char.obj initterm.obj \
    35         uitools.obj unknown.obj spy.obj wndmsg.obj \
     35        uitools.obj unknown.obj spy.obj wndmsg.obj display.obj \
    3636        pmwindow.obj pmframe.obj win32class.obj win32wnd.obj win32dlg.obj \
    3737        msgbox.obj window.obj windowmsg.obj windowclass.obj win32wbase.obj \
     
    156156winmouse.obj:   winmouse.cpp winmouse.h oslibmsg.h pmwindow.h win32wbase.h
    157157winkeyboard.obj: winkeyboard.cpp $(PDWIN32_INCLUDE)\winkeyboard.h
     158display.obj: display.cpp pmwindow.h
    158159
    159160clean:
  • trunk/src/user32/USER32.DEF

    r1688 r1818  
    1 ; $Id: USER32.DEF,v 1.20 1999-11-10 14:16:44 sandervl Exp $
     1; $Id: USER32.DEF,v 1.21 1999-11-23 19:34:18 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    610610    wvsprintfW                 = _wvsprintfW@12              @580
    611611
     612    ChangeDisplaySettingsExA   = _ChangeDisplaySettingsExA@20 @604
     613    ChangeDisplaySettingsExW   = _ChangeDisplaySettingsExW@20 @605
     614
    612615;------------
    613616; Windows 98
  • trunk/src/user32/pmwindow.cpp

    r1762 r1818  
    1 /* $Id: pmwindow.cpp,v 1.54 1999-11-17 17:04:53 cbratschi Exp $ */
     1/* $Id: pmwindow.cpp,v 1.55 1999-11-23 19:34:19 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    1212#define INCL_WIN
    1313#define INCL_GPI
     14#define INCL_DEV                /* Device Function definitions  */
     15#define INCL_GPICONTROL         /* GPI control Functions        */
    1416
    1517#include <os2wrap.h>
     
    3941ULONG ScreenWidth  = 0;
    4042ULONG ScreenHeight = 0;
     43ULONG ScreenBitsPerPel = 0;
    4144
    4245//Used for key translation while processing WM_CHAR message
     
    175178   ScreenWidth  = desktopRectl.xRight;
    176179   ScreenHeight = desktopRectl.yTop;
     180   
     181   
     182   HDC   hdc;              /* Device-context handle                */
     183   /* context data structure */
     184   DEVOPENSTRUC dop = {NULL, "DISPLAY", NULL, NULL, NULL, NULL,
     185                       NULL, NULL, NULL};
     186 
     187   /* create memory device context */
     188   hdc = DevOpenDC(hab, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&dop, NULLHANDLE);
     189   DevQueryCaps(hdc, CAPS_COLOR_BITCOUNT, 1, (PLONG)&ScreenBitsPerPel);
     190   DevCloseDC(hdc);
    177191
    178192   dprintf(("InitPM: Desktop (%d,%d)", ScreenWidth, ScreenHeight));
  • trunk/src/user32/pmwindow.h

    r1629 r1818  
    1 /* $Id: pmwindow.h,v 1.4 1999-11-08 13:44:14 sandervl Exp $ */
     1/* $Id: pmwindow.h,v 1.5 1999-11-23 19:34:19 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    2121extern ULONG ScreenWidth;
    2222extern ULONG ScreenHeight;
     23extern ULONG ScreenBitsPerPel;
    2324
    2425#endif
  • trunk/src/user32/user32.cpp

    r1739 r1818  
    1 /* $Id: user32.cpp,v 1.54 1999-11-14 16:35:55 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.55 1999-11-23 19:34:19 sandervl Exp $ */
    22
    33/*
     
    19241924/* Device Context Functions */
    19251925
    1926 BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
    1927 {
    1928 #ifdef DEBUG
    1929   WriteLog("USER32:  GetMonitorInfoA not supported!!\n");
    1930 #endif
    1931   return(FALSE);
    1932 }
    1933 //******************************************************************************
    1934 //******************************************************************************
    1935 BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
    1936 {
    1937 #ifdef DEBUG
    1938   WriteLog("USER32:  GetMonitorInfoW not supported!!\n");
    1939 #endif
    1940   return(FALSE);
    1941 }
    1942 //******************************************************************************
    1943 //******************************************************************************
    1944 HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
    1945 {
    1946 #ifdef DEBUG
    1947   WriteLog("USER32:  MonitorFromWindow not correctly supported??\n");
    1948 #endif
    1949   //Attention: Win32 hwnd!
    1950 
    1951   return(0);
    1952 }
    1953 //******************************************************************************
    1954 //******************************************************************************
    1955 HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
    1956 {
    1957 #ifdef DEBUG
    1958   WriteLog("USER32:  MonitorFromRect not correctly supported??\n");
    1959 #endif
    1960   return(0);
    1961 }
    1962 //******************************************************************************
    1963 //******************************************************************************
    1964 HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
    1965 {
    1966 #ifdef DEBUG
    1967   WriteLog("USER32:  MonitorFromPoint not correctly supported??\n");
    1968 #endif
    1969   return(0);
    1970 }
    1971 //******************************************************************************
    1972 //******************************************************************************
    1973 BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
    1974 {
    1975 #ifdef DEBUG
    1976   WriteLog("USER32:  EnumDisplayMonitors not supported??\n");
    1977 #endif
    1978   return(FALSE);
    1979 }
    1980 //******************************************************************************
    1981 //******************************************************************************
    1982 BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
    1983                       LPDEVMODEA lpDevMode)
    1984 {
    1985 #ifdef DEBUG
    1986     WriteLog("USER32:  EnumDisplaySettingsA FAKED\n");
    1987 #endif
    1988     switch(iModeNum) {
    1989     case 0:
    1990         lpDevMode->dmBitsPerPel       = 16;
    1991         lpDevMode->dmPelsWidth        = 768;
    1992         lpDevMode->dmPelsHeight       = 1024;
    1993         lpDevMode->dmDisplayFlags     = 0;
    1994         lpDevMode->dmDisplayFrequency = 70;
    1995         break;
    1996     case 1:
    1997         lpDevMode->dmBitsPerPel       = 16;
    1998         lpDevMode->dmPelsWidth        = 640;
    1999         lpDevMode->dmPelsHeight       = 480;
    2000         lpDevMode->dmDisplayFlags     = 0;
    2001         lpDevMode->dmDisplayFrequency = 70;
    2002         break;
    2003     default:
    2004         return(FALSE);
    2005     }
    2006     return(TRUE);
    2007 }
    2008 /*****************************************************************************
    2009  * Name      : BOOL WIN32API EnumDisplaySettingsW
    2010  * Purpose   : The EnumDisplaySettings function obtains information about one
    2011  *             of a display device's graphics modes. You can obtain information
    2012  *             for all of a display device's graphics modes by making a series
    2013  *             of calls to this function.
    2014  * Parameters: LPCTSTR   lpszDeviceName specifies the display device
    2015  *             DWORD     iModeNum       specifies the graphics mode
    2016  *             LPDEVMODE lpDevMode      points to structure to receive settings
    2017  * Variables :
    2018  * Result    : If the function succeeds, the return value is TRUE.
    2019  *             If the function fails, the return value is FALSE.
    2020  * Remark    :
    2021  * Status    : UNTESTED STUB
    2022  *
    2023  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
    2024  *****************************************************************************/
    2025 BOOL WIN32API EnumDisplaySettingsW(LPCSTR     lpszDeviceName,
    2026                                       DWORD      iModeNum,
    2027                                       LPDEVMODEW lpDevMode)
    2028 {
    2029   dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
    2030          lpszDeviceName,
    2031          iModeNum,
    2032          lpDevMode));
    2033 
    2034   return (EnumDisplaySettingsA(lpszDeviceName,
    2035                                iModeNum,
    2036                                (LPDEVMODEA)lpDevMode));
    2037 }
    2038 //******************************************************************************
    2039 //******************************************************************************
    2040 LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA  lpDevMode, DWORD dwFlags)
    2041 {
    2042 #ifdef DEBUG
    2043     if(lpDevMode) {
    2044         WriteLog("USER32:  ChangeDisplaySettingsA FAKED %X\n", dwFlags);
    2045         WriteLog("USER32:  ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
    2046         WriteLog("USER32:  ChangeDisplaySettingsA lpDevMode->dmPelsWidth  %d\n", lpDevMode->dmPelsWidth);
    2047         WriteLog("USER32:  ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
    2048     }
    2049 #endif
    2050     return(DISP_CHANGE_SUCCESSFUL);
    2051 }
    2052 /*****************************************************************************
    2053  * Name      : LONG WIN32API ChangeDisplaySettingsW
    2054  * Purpose   : The ChangeDisplaySettings function changes the display settings
    2055  *             to the specified graphics mode.
    2056  * Parameters: LPDEVMODEW lpDevModeW
    2057  *             DWORD      dwFlags
    2058  * Variables :
    2059  * Result    : DISP_CHANGE_SUCCESSFUL The settings change was successful.
    2060  *             DISP_CHANGE_RESTART    The computer must be restarted in order for the graphics mode to work.
    2061  *             DISP_CHANGE_BADFLAGS   An invalid set of flags was passed in.
    2062  *             DISP_CHANGE_FAILED     The display driver failed the specified graphics mode.
    2063  *             DISP_CHANGE_BADMODE    The graphics mode is not supported.
    2064  *             DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
    2065  * Remark    :
    2066  * Status    : UNTESTED STUB
    2067  *
    2068  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
    2069  *****************************************************************************/
    2070 LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
    2071                                         DWORD      dwFlags)
    2072 {
    2073   dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
    2074          lpDevMode,
    2075          dwFlags));
    2076 
    2077   return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
    2078                                   dwFlags));
    2079 }
    20801926
    20811927/* Window Station and Desktop Functions */
  • trunk/src/user32/user32exp.def

    r1693 r1818  
    565565    _wvsprintfA@12                            @579
    566566    _wvsprintfW@12                            @580
     567    _ChangeDisplaySettingsExA@20              @604
     568    _ChangeDisplaySettingsExW@20              @605
    567569    _GetMenuInfo@8                            @800
    568570    _SetMenuInfo@8                            @801
Note: See TracChangeset for help on using the changeset viewer.