1993-09-04 12:09:32 +02:00
|
|
|
/*
|
|
|
|
* GDI functions
|
|
|
|
*
|
|
|
|
* Copyright 1993 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
Release 950606
Tue Jun 6 12:11:41 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [controls/menu.c]
Fixed bug with drawing multi-column menus with vertical separator.
* [debugger/debug.l]
Fixed NULL-pointer reference after readline().
* [if1632/winprocs.spec] [miscemu/int21.c] [miscemu/interrupts.c]
Added interrupt vector emulation. Allows to retrieve an interrupt
vector and jump to it without crashing.
* [loader/ldt.c]
Moved ldt.c to memory directory.
* [loader/task.c]
Implemented LockCurrentTask() and GetInstanceData().
* [objects/bitblt.c]
Fixed a bug that caused StretchBlt() to use wrong colors when
stretching a monochrome bitmap to a color display.
* [objects/bitmap.c]
Fixed a segmented pointer bug in CreateBitmapIndirect().
* [tools/build.c]
Added possibility to have arguments for register functions; used
by interrupt vectors to remove the flags from the stack.
Generate a new function CallTo32_LargeStack(), that allows calling
a 32-bit function using the original 32-bit stack, for functions
that need more that 64k of stack.
Tue May 30 10:29:56 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [if1632/shell.spec] [misc/shell.c]
DoEnvironmentSubst: fixed prototype
* [if1632/gdi.spec] [objects/palette.c]
SetSystemPaletteUse: new function
* [if1632/kernel.spec] [loader/resource.c]
DirectResAlloc: new function
* [if1632/user.spec] [windows/keyboard.c]
SetKeyboardState: new function
Mon May 29 12:58:28 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [tools/build.c]
Prevent interrupts from destroying the args for a 32 bit function
by loading the correct value into %esp directly after %ss.
* [loader/ne_image.c] [loader/module.c]
The new instance must be created earlier in LoadModule(), so that
fixups referencing it will be handled correctly.
Initialize the local heap for a DGROUP in NE_LoadSegment().
* [objects/dib.c]
Like RLE8 bitmaps, RLE4 bitmaps don't always end with a proper code.
This used to crash Wine. Fixed.
* [objects/text.c]
Fix possible null pointer dereference in debugging output.
* [misc/commdlg.c]
Handle user input in the edit control better. Some bugs fixed.
* [memory/local.c]
Started implementing moveable blocks. This is unfinished (!), but
at least it does not seem to break things.
Wed May 24 13:26:36 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [loader/module.c]
LoadModule(): DLLs occasionally have a data segment, and they work
much better if it is loaded :-)
LoadLibrary(): pass HMODULE instead of HINSTANCE to NE_InitializeDLLs.
FindModule(): also strip off the last backslash of the pathnames
(Winhelp tried to load C:\WINDOWS\SYSTEM\COMMDLG.DLL).
GetModuleHandle(): just call MODULE_FindModule, it does the same job,
only better.
* [loader/ne_image.c]
LocalInit() the heap of a DLL in NE_InitDLL. (This is probably
not really correct, it seems that all programs and DLLs try to do
this themselves. But they pass weird parameters.)
NE_InitializeDLLs should also call NE_InitDLL for the passed hModule.
* [loader/task.c] [misc/user.c]
Finish global initializations in InitTask instead of InitApp, or
all the DLLs will be initialized in InitTask without any available
window classes!
1995-06-06 18:40:35 +02:00
|
|
|
*/
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2000-08-19 23:38:55 +02:00
|
|
|
#include <assert.h>
|
Release 940405
Tue Apr 5 14:36:59 1994 Bob Amstadt (bob@pooh)
* [include/mdi.h] [windows/mdi.c]
Use WM_PARENTNOTIFY messages to activate children.
Generate WM_CHILDACTIVATE messages.
Beginnings handler for maxmized child window.
Clean up when children are destroyed.
* [windows/message.c] [windows/nonclient.c] [windows/winpos.c]
Removed code add 94/03/26.
Apr 4, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [control/menu.c]
Make mouse menu navigation working again. :-))
(be carefull, clicking outside menus (ie.: clientrect)
not resolved yet)
* [windows/nonclient.c] [controls/scroll.c]
Bugs fix in NCTrackScrollBars().
* [misc/dos_fs.c]
Bug fix in 'ToDos()' in conversion for '/',
(example: '/window/' was translated to 'WINDOWs').
* [miscemu/int21.c]
Function ChangeDir() extract possible drive before DOS_ChangeDir().
* [loader/library.c] [loader/wine.c]
Playing around moving function GetProcAddress() and put some code in.
Mon Apr 4 21:39:07 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [misc/main.c]
Better explanation of command-line options.
* [objects/dib.c]
Implemented SetDIBitsToDevice().
* [windows/dc.c]
Bug fix in SetDCState().
* [windows/event.c]
Removed WS_DISABLED handling (now done in message.c).
* [windows/message.c]
Added sending a WM_PARENTNOTIFY message in MSG_TranslateMouseMsg().
Use WindowFromPoint() to find the window for mouse events, taking
into account disabled windows.
* [windows/painting.c]
Bug fix in BeginPaint() to allow calling it at other times than
on WM_PAINT (Solitaire needs it...)
* [windows/win.c]
Implemented FindWindow().
Rewritten EnableWindow() to behave more like Windows.
* [windows/winpos.c]
Rewritten WindowFromPoint() to also search child windows.
Mon Apr 4 17:36:32 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [include/int21.h] -> [msdos.h]
renamed.
* [miscemu/int10.h] [miscemu/int25.h] [miscemu/int26.h]
new, added for int 10, 25 and 26.
* [miscemu/ioports.c]
new, added to allow win apps to use ioports.
* [loader/signal.c]
Added support for in, inb, out, outb instructions.
Sun Mar 27 13:40:25 1994 Bob Amstadt (bob@pooh)
* controls/menu.c (InsertMenu): Changed to use FindMenuItem().
Sat Mar 26 21:23:55 1994 Bob Amstadt (bob@pooh)
* [windows/mdi.c]
Window list properly updated.
* [windows/message.c]
Call WINPOS_ChildActivate() when mouse pressed.
* [windows/nonclient.c]
Use WINPOS_IsAnActiveWindow() instead of GetActiveWindow() in
NC_HandleNCPaint().
* [windows/winpos.c]
Created functions WINPOS_IsAnActiveWindow() and WINPOS_ActivateChild()
Thu Mar 24 14:49:17 1994 Bob Amstadt (bob@pooh)
* controls/menu.c (DeleteMenu): Changed to use FindMenuItem
(DeleteMenu): Many bug fixes.
* [controls/menu.c]
Created function FindMenuItem().
Thu Mar 24 14:17:24 1994 Bob Amstadt (bob@pooh)
* [windows/win.c]
Removed incorrect MDI handling code from CreateWindowEx().
* [controls/menu.c]
MF_STRING items needed to allocate a private copy of string.
* [controls/menu.c]
Fixed buggy calls to GlobalFree().
* [memory/global.c]
Eliminated some redundant code with function call.
Wed Mar 23 1994 Pentti Moilanen (pentti.moilanen@ntc.nokia.com)
* [windows/timer.c]
timer list pointers looped in InsertTimer
Tue Mar 29 13:32:08 MET DST 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [misc/cursor.c]
A few changes for desktop window support.
* [misc/main.c]
Added -depth option.
* [misc/rect.c]
Yet another bug fix in SubtractRect().
* [objects/bitmap.c]
Changes to use only one depth (specified with -depth)
for color bitmaps.
* [objects/brush.c]
Added support for dithered solid brushes.
* [objects/color.c]
Use the same 20 system colors as in Windows.
System palette initialisation now done in COLOR_InitPalette().
Added support for a color mapping table to map logical color
indexes to X colormap entries.
Implemented GetNearestColor() and RealizeDefaultPalette().
* [objects/dib.c]
Added support for color mapping table.
* [objects/dither.c] (New file)
Implemented solid color dithering.
* [objects/palette.c]
Implemented GetSystemPaletteEntries() and SelectPalette().
* [windows/class.c]
Make a copy of the menu name in RegisterClass().
* [windows/dc.c]
Fixed device caps when using a desktop window.
Added support for the color mapping table in DCs.
* [windows/event.c]
Added ConfigureNotify handler on desktop window.
* [windows/message.c]
Removed call to XTranslateCoordinates() on every mouse motion
New function MSG_Synchronize() to synchronize with the X server.
* [windows/syscolor.c]
Rewritten SYSCOLOR_Init() to read the system colors from WIN.INI.
* [windows/winpos.c]
Added synchronization on window mapping. Solves the double redraw
problem when starting Solitaire.
Mar 27, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [control/menu.c] * [windows/defwnd.c]
Make keyboard navigation working with menubar,
but temporarely inserted a bug in menubar mouse handling ... :-((
(it will be fix next week !)
* [windows/defwnd.c]
Connect VK_MENU to menubar navigation.
* [loader/library.c]
GetModuleHandle() return 'fictive 0xF000+ handles' for built-in DLLs.
Sun Mar 20 22:32:13 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/main.c]
Added Copy(). Added a check for `-h' to show usage.
* [misc/dos_fs.c]
Fixed bug in FindFile(), to load directories as dlls.
* [misc/dos_fs.c]
Fixed ToUnix() and ToDos() again, as my previous patch
didn't make it.
* [misc/dos_fs.c] [miscemu/int21.c]
Bug fixes, should be able to handle all winfile and progman int21
requests now except for a few small things.
Tue Mar 29 06:25:54 1994 crw@harris.mlb.semi.harris.com (Carl Williams)
* [memory/heap.c]
Implemented GetFreeSystemResources().
Mon Mar 21 17:32:25 1994 Bob Amstadt (bob@pooh)
* controls/menu.c (GetSubMenu): Function did not return correct value
* [windows/mdi.c]
Beginnings of menu handling.
Thu Mar 10 11:32:06 1994 Stefan (SAM) Muenzel (muenzel@tat.physik.uni-tuebingen.de)
* [objects/font.c]
if font.width equals zero use asterix instead.
Mon Mar 21 17:23:37 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [objects/bitmap.c]
Rewritten bitmap code to use exclusively X pixmaps; *much* faster.
* [objects/brush.c]
Some changes with pattern brushes because of the new bitmap code.
* [objects/color.c]
Added function COLOR_ToPhysical for better color mapping.
* [objects/dib.c]
Heavily optimized SetDIBits().
* [windows/dc.c]
Opimized SetDCState() and DC_SetupGC*() functions.
Added stub for CreateIC().
Mar 20, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Call SetFocus() after closing box to give back focus to previous owner.
* [misc/files.c]
Small bug fix in GetTempFilename() : replace a '\' to '\\'.
* [control/scroll.c]
Calls to BitBlt() replace by StretchBlt().
* [control/menu.c]
Call SetFocus() to previous owner after closing Popups.
Fill stub DeleteMenu().
* [control/listbox.c]
* [control/combo.c]
Use SetFocus() in WM_LBUTTONDOWN.
Close ComboBox List upon WM_KILLFOCUS.
Early development of WM_MEASUREITEM mecanism.
* [windows/defwnd.c]
Early development of WM_MEASUREITEM mecanism.
Tue Mar 22 10:44:57 1994 Miguel de Icaza (miguel@xochitl)
* [misc/atom.c]
Fixed sintaxis problem when building the library.
Tue Mar 15 13:11:56 1994 Bob Amstadt (bob@pooh)
* [include/windows.h]
Added message types and structures for MDI
* [include/mdi.h]
Created internal structures for handling MDI
* [windows/mdi.c]
Began creating MDI support
Thu Mar 10 16:51:46 1994 Bob Amstadt (bob@pooh)
* [loader/wine.c] [include/wine.h]
Added new field to "struct w_files" to hold the "name table"
resource for Windows 3.0 programs
* [loader/resource.c]
Added code to handle programs with a "name table" resource.
LoadResourceByName() modified to check for the existence of
this resource.
Mon Mar 14 22:31:42 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [objects/color.c]
Added installing the private colormap on the desktop window.
* [windows/event.c]
Cleaned up focus event handling (see focus.c).
Use GetFocus() to direct key events to the correct window.
* [windows/focus.c]
Rewritten SetFocus() to:
- only set X focus on top-level windows
- send WM_SETFOCUS and WM_KILLFOCUS messages (was done in event.c)
- prevent setting focus to disabled windows
- install private colormap so -privatemap option works again
* [windows/message.c] [windows/timer.c]
Changed timer management to no longer use PostMessage(), but
to generate timer messages on the fly. Also fixed a related bug
in GetMessage() which could cause busy-waiting.
* [windows/win.c]
Only select focus events on top-level windows.
* [windows/winpos.c]
Added some sanity checks for desktop window.
Fri Mar 4 20:42:01 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/dos_fs.c]
bug fixes in ToUnix(), WinIniFileName(), GetUnixFileName().
Support for tilde symbol added for rootdirectories in [drives]
section of wine's configfile.
* [misc/file.c]
hread(), hwrite() added.
* [misc/main.c]
hmemcpy() added.
* [if1632/stress.spec] [include/stress.h] [misc/stress.c]
Added STRESS.DLL, an useless dll used to stress a windows system.
* [*/*]
Added missing #includes, fixed prototypes for prototype checking.
* [include/prototypes.h]
Added prototypes for loader/*c, if1632/*c.
Tue Mar 8 09:54:34 1994 Bob Amstadt (bob@pooh)
* [Configure]
Added reminder to set WINEPATH, if it is not set.
* [Imakefile]
Removed #elif's
* [controls/button.c]
Added BN_CLICKED notification for owner-draw buttons.
* [if1632/kernel.spec] [memory/heap.c]
Changed Local* functions to WIN16_Local* to prevent unconcious use
of these functions.
* [if1632/relay.c]
Push old Stack16Frame on stack before setting.
* [include/atom.h] [misc/atom.c] [include/heap.h] [memory/local.c]
Added multiple local heap handling in Atom* functions.
* [include/regfunc.h] [miscemu/int21.c]
Rewrote DOS3Call() use context frame that is already on the stack.
* [misc/profile.c]
Fixed to allow leading ";" to mark comments.
* [misc/spy.c]
Fixed bugs and added support for "include" and "exclude" filters.
* [misc/user.c]
Rearranged calls in InitApp().
* [misc/font.c]
Fixed font handling to create system fonts, if they are used.
* [windows/dc.c]
If text drawn on window with no font specified, then default the
font to the system font.
Mon Mar 7 20:32:09 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [controls/desktop.c]
Added handling of WM_NCCREATE and WM_ERASEBKGND functions.
Implemented SetDeskPattern().
* [misc/main.c]
Added -desktop option to get a large desktop window with
everything inside it.
Added -name option.
* [misc/rect.c]
Bug fix in SubtractRect().
* [objects/*.c]
Replaced the DefaultRootWindow() macro by the rootWindow variable.
* [windows/event.c] [windows/message.c]
[windows/nonclient.c] [windows/win.c]
A few changes to accomodate the new desktop window.
Tue Mar 8 11:13:03 1994 Miguel de Icaza (miguel@xochitl.nuclecu.unam.mx)
* [toolkit/arch.c] --New file--
Routines for converting little endian data structures to
big-endian data structures, currently only BITMAP structures are
converted.
* [misc/atom.c]
When used as part of the WineLib, the code is much simpler.
Doesn't depend on alignement.
* [loader/wine.c]
Ifdefed Emulator dependent code if compiling WineLib.
* [loader/resource.c]
Moved misc/resource.c to loader/resource.c.
* [loader/dump.c,ldt.c,ldtlib.c,library,c,selector.c,signal.c]
Ifdefed whole code if compiling WINELIB.
* [include/winsock.h]
Added compilation define to allow compilation on SunOS.
* [include/wine.h]
Removed load_typeinfo and load_nameinfo prototypes, they belong
to neexe.h
* [include/neexe.h]
Added load_typeinfo and load_nameinfo prototypes.
* [include/arch.h]
Fixed some bugs in the conversion routines.
Added macros for Bitmap loading.
Tue Mar 8 12:52:05 1994 crw@maniac.mlb.semi.harris.com (Carl Williams)
* [if1632/kernel.spec] [memory/global.c]
Implemented GetFreeSpace()
* [if1632/user.spec] [loader/resource.c]
Implemented CreateIcon()
1994-04-05 23:42:43 +02:00
|
|
|
#include <stdlib.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2000-02-10 20:03:02 +01:00
|
|
|
#include <stdio.h>
|
1999-04-01 10:16:08 +02:00
|
|
|
|
2000-08-19 23:38:55 +02:00
|
|
|
#include "windef.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winbase.h"
|
2000-08-19 23:38:55 +02:00
|
|
|
#include "wingdi.h"
|
2001-05-22 21:18:06 +02:00
|
|
|
#include "winreg.h"
|
2009-12-05 11:45:31 +01:00
|
|
|
#include "winnls.h"
|
2000-08-19 23:38:55 +02:00
|
|
|
#include "winerror.h"
|
2005-05-18 11:50:43 +02:00
|
|
|
#include "winternl.h"
|
2000-08-19 23:38:55 +02:00
|
|
|
|
2021-07-09 15:28:26 +02:00
|
|
|
#include "ntgdi_private.h"
|
2002-12-03 20:18:41 +01:00
|
|
|
#include "wine/debug.h"
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(gdi);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2016-04-07 22:36:03 +02:00
|
|
|
#define FIRST_GDI_HANDLE 32
|
1999-04-01 10:16:08 +02:00
|
|
|
|
2021-06-30 17:37:51 +02:00
|
|
|
static GDI_SHARED_MEMORY gdi_shared;
|
|
|
|
static GDI_HANDLE_ENTRY *next_free;
|
|
|
|
static GDI_HANDLE_ENTRY *next_unused = gdi_shared.Handles + FIRST_GDI_HANDLE;
|
2012-10-17 12:25:28 +02:00
|
|
|
static LONG debug_count;
|
2011-11-03 14:11:35 +01:00
|
|
|
HMODULE gdi32_module = 0;
|
2021-09-17 13:44:50 +02:00
|
|
|
SYSTEM_BASIC_INFORMATION system_info;
|
2011-11-03 14:11:35 +01:00
|
|
|
|
2021-06-30 17:37:51 +02:00
|
|
|
static inline HGDIOBJ entry_to_handle( GDI_HANDLE_ENTRY *entry )
|
2012-10-17 12:25:28 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
unsigned int idx = entry - gdi_shared.Handles;
|
2021-09-03 14:59:47 +02:00
|
|
|
return LongToHandle( idx | (entry->Unique << NTGDI_HANDLE_TYPE_SHIFT) );
|
2012-10-17 12:25:28 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 17:37:51 +02:00
|
|
|
static inline GDI_HANDLE_ENTRY *handle_entry( HGDIOBJ handle )
|
2012-10-17 12:25:28 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
unsigned int idx = LOWORD(handle);
|
2012-10-17 12:25:28 +02:00
|
|
|
|
2021-06-30 17:37:51 +02:00
|
|
|
if (idx < GDI_MAX_HANDLE_COUNT && gdi_shared.Handles[idx].Type)
|
2012-10-16 16:58:28 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
if (!HIWORD( handle ) || HIWORD( handle ) == gdi_shared.Handles[idx].Unique)
|
|
|
|
return &gdi_shared.Handles[idx];
|
2012-10-16 16:58:28 +02:00
|
|
|
}
|
|
|
|
if (handle) WARN( "invalid handle %p\n", handle );
|
2012-10-17 12:25:28 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2021-06-30 17:37:51 +02:00
|
|
|
static inline struct gdi_obj_header *entry_obj( GDI_HANDLE_ENTRY *entry )
|
2021-06-30 17:36:19 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
return (struct gdi_obj_header *)(ULONG_PTR)entry->Object;
|
2021-06-30 17:36:19 +02:00
|
|
|
}
|
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
/***********************************************************************
|
2002-06-01 01:06:46 +02:00
|
|
|
* GDI stock objects
|
1993-09-04 12:09:32 +02:00
|
|
|
*/
|
|
|
|
|
2001-08-17 02:07:13 +02:00
|
|
|
static const LOGBRUSH WhiteBrush = { BS_SOLID, RGB(255,255,255), 0 };
|
|
|
|
static const LOGBRUSH BlackBrush = { BS_SOLID, RGB(0,0,0), 0 };
|
|
|
|
static const LOGBRUSH NullBrush = { BS_NULL, 0, 0 };
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2001-08-17 02:07:13 +02:00
|
|
|
static const LOGBRUSH LtGrayBrush = { BS_SOLID, RGB(192,192,192), 0 };
|
|
|
|
static const LOGBRUSH GrayBrush = { BS_SOLID, RGB(128,128,128), 0 };
|
2005-04-20 14:52:46 +02:00
|
|
|
static const LOGBRUSH DkGrayBrush = { BS_SOLID, RGB(64,64,64), 0 };
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2003-11-05 02:43:57 +01:00
|
|
|
static const LOGBRUSH DCBrush = { BS_SOLID, RGB(255,255,255), 0 };
|
2002-03-20 01:51:26 +01:00
|
|
|
|
2009-12-24 17:42:13 +01:00
|
|
|
static CRITICAL_SECTION gdi_section;
|
2003-08-13 01:50:54 +02:00
|
|
|
static CRITICAL_SECTION_DEBUG critsect_debug =
|
|
|
|
{
|
2009-12-24 17:42:13 +01:00
|
|
|
0, 0, &gdi_section,
|
2003-08-13 01:50:54 +02:00
|
|
|
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
|
2009-12-24 17:42:13 +01:00
|
|
|
0, 0, { (DWORD_PTR)(__FILE__ ": gdi_section") }
|
2003-08-13 01:50:54 +02:00
|
|
|
};
|
2009-12-24 17:42:13 +01:00
|
|
|
static CRITICAL_SECTION gdi_section = { &critsect_debug, -1, 0, 0, 0, 0 };
|
2003-08-13 01:50:54 +02:00
|
|
|
|
2002-03-20 01:51:26 +01:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* language-independent stock fonts
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2001-08-17 02:07:13 +02:00
|
|
|
static const LOGFONTW OEMFixedFont =
|
|
|
|
{ 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"" };
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2001-08-17 02:07:13 +02:00
|
|
|
static const LOGFONTW AnsiFixedFont =
|
|
|
|
{ 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier" };
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2001-08-17 02:07:13 +02:00
|
|
|
static const LOGFONTW AnsiVarFont =
|
|
|
|
{ 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" };
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2002-03-20 01:51:26 +01:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* language-dependent stock fonts
|
|
|
|
*
|
|
|
|
* 'ANSI' charset and 'DEFAULT' charset is not same.
|
|
|
|
* The chars in CP_ACP should be drawn with 'DEFAULT' charset.
|
|
|
|
* 'ANSI' charset seems to be identical with ISO-8859-1.
|
|
|
|
* 'DEFAULT' charset is a language-dependent charset.
|
|
|
|
*
|
|
|
|
* 'System' font seems to be an alias for language-dependent font.
|
|
|
|
*/
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2002-03-20 01:51:26 +01:00
|
|
|
/*
|
2005-01-05 18:12:07 +01:00
|
|
|
* language-dependent stock fonts for all known charsets
|
|
|
|
* please see TranslateCharsetInfo (dlls/gdi/font.c) and
|
|
|
|
* CharsetBindingInfo (dlls/x11drv/xfont.c),
|
2002-03-20 01:51:26 +01:00
|
|
|
* and modify entries for your language if needed.
|
|
|
|
*/
|
|
|
|
struct DefaultFontInfo
|
|
|
|
{
|
|
|
|
UINT charset;
|
|
|
|
LOGFONTW SystemFont;
|
|
|
|
LOGFONTW DeviceDefaultFont;
|
|
|
|
LOGFONTW SystemFixedFont;
|
2012-06-16 16:15:55 +02:00
|
|
|
LOGFONTW DefaultGuiFont;
|
2002-03-20 01:51:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct DefaultFontInfo default_fonts[] =
|
|
|
|
{
|
|
|
|
{ ANSI_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ EASTEUROPE_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ RUSSIAN_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, RUSSIAN_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, RUSSIAN_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, RUSSIAN_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, RUSSIAN_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ GREEK_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, GREEK_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, GREEK_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GREEK_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GREEK_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ TURKISH_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, TURKISH_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, TURKISH_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, TURKISH_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, TURKISH_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ HEBREW_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, HEBREW_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, HEBREW_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HEBREW_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HEBREW_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ ARABIC_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ARABIC_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ARABIC_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ARABIC_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ARABIC_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ BALTIC_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, BALTIC_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, BALTIC_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, BALTIC_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, BALTIC_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ THAI_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, THAI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, THAI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, THAI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-04 05:05:25 +02:00
|
|
|
-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, THAI_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ SHIFTJIS_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-16 16:15:53 +02:00
|
|
|
18, 8, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-16 16:15:53 +02:00
|
|
|
18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-16 16:15:53 +02:00
|
|
|
-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ GB2312_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, GB2312_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, GB2312_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GB2312_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-16 16:15:53 +02:00
|
|
|
-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GB2312_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ HANGEUL_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-16 16:15:53 +02:00
|
|
|
16, 8, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-16 16:15:53 +02:00
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-16 16:15:53 +02:00
|
|
|
-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ CHINESEBIG5_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-16 16:15:53 +02:00
|
|
|
-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ JOHAB_CHARSET,
|
|
|
|
{ /* System */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, JOHAB_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* Device Default */
|
2012-06-04 05:05:25 +02:00
|
|
|
16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, JOHAB_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, JOHAB_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* DefaultGuiFont */
|
2012-06-16 16:15:53 +02:00
|
|
|
-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, JOHAB_CHARSET,
|
2020-11-06 12:08:16 +01:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Shell Dlg"
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
1993-09-04 12:09:32 +02:00
|
|
|
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
|
2005-05-25 11:55:55 +02:00
|
|
|
/*************************************************************************
|
2021-08-30 13:57:05 +02:00
|
|
|
* __wine_make_gdi_object_system (win32u.@)
|
2005-05-25 11:55:55 +02:00
|
|
|
*
|
|
|
|
* USER has to tell GDI that its system brushes and pens are non-deletable.
|
|
|
|
* For a description of the GDI object magics and their flags,
|
|
|
|
* see "Undocumented Windows" (wrong about the OBJECT_NOSYSTEM flag, though).
|
|
|
|
*/
|
2008-12-16 15:38:49 +01:00
|
|
|
void CDECL __wine_make_gdi_object_system( HGDIOBJ handle, BOOL set)
|
2005-05-25 11:55:55 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2012-10-17 13:20:46 +02:00
|
|
|
|
|
|
|
EnterCriticalSection( &gdi_section );
|
2021-06-30 17:36:30 +02:00
|
|
|
if ((entry = handle_entry( handle ))) entry_obj( entry )->system = !!set;
|
2012-10-17 13:20:46 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
2005-05-25 11:55:55 +02:00
|
|
|
}
|
|
|
|
|
2002-03-20 01:51:26 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* get_default_fonts
|
|
|
|
*/
|
|
|
|
static const struct DefaultFontInfo* get_default_fonts(UINT charset)
|
|
|
|
{
|
2004-09-08 03:23:57 +02:00
|
|
|
unsigned int n;
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2018-10-05 21:35:35 +02:00
|
|
|
for(n = 0; n < ARRAY_SIZE( default_fonts ); n++)
|
2002-03-20 01:51:26 +01:00
|
|
|
{
|
|
|
|
if ( default_fonts[n].charset == charset )
|
|
|
|
return &default_fonts[n];
|
|
|
|
}
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2002-03-20 01:51:26 +01:00
|
|
|
FIXME( "unhandled charset 0x%08x - use ANSI_CHARSET for default stock objects\n", charset );
|
|
|
|
return &default_fonts[0];
|
|
|
|
}
|
2000-01-09 21:52:53 +01:00
|
|
|
|
2000-08-19 23:38:55 +02:00
|
|
|
|
2002-03-20 01:51:26 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* get_default_charset (internal)
|
|
|
|
*
|
|
|
|
* get the language-dependent charset that can handle CP_ACP correctly.
|
|
|
|
*/
|
|
|
|
static UINT get_default_charset( void )
|
2001-05-22 21:18:06 +02:00
|
|
|
{
|
2002-03-20 01:51:26 +01:00
|
|
|
CHARSETINFO csi;
|
|
|
|
UINT uACP;
|
|
|
|
|
|
|
|
uACP = GetACP();
|
|
|
|
csi.ciCharset = ANSI_CHARSET;
|
2021-09-01 14:09:04 +02:00
|
|
|
if ( !translate_charset_info( ULongToPtr(uACP), &csi, TCI_SRCCODEPAGE ) )
|
2002-03-20 01:51:26 +01:00
|
|
|
{
|
|
|
|
FIXME( "unhandled codepage %u - use ANSI_CHARSET for default stock objects\n", uACP );
|
|
|
|
return ANSI_CHARSET;
|
|
|
|
}
|
|
|
|
|
|
|
|
return csi.ciCharset;
|
2001-05-22 21:18:06 +02:00
|
|
|
}
|
2000-08-19 23:38:55 +02:00
|
|
|
|
1999-10-31 18:32:26 +01:00
|
|
|
|
2012-10-17 13:17:56 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GDI_get_ref_count
|
|
|
|
*
|
|
|
|
* Retrieve the reference count of a GDI object.
|
|
|
|
* Note: the object must be locked otherwise the count is meaningless.
|
|
|
|
*/
|
|
|
|
UINT GDI_get_ref_count( HGDIOBJ handle )
|
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2012-10-17 13:17:56 +02:00
|
|
|
UINT ret = 0;
|
|
|
|
|
|
|
|
EnterCriticalSection( &gdi_section );
|
2021-06-30 17:36:30 +02:00
|
|
|
if ((entry = handle_entry( handle ))) ret = entry_obj( entry )->selcount;
|
2012-10-17 13:17:56 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-08-20 21:17:28 +02:00
|
|
|
/***********************************************************************
|
2007-09-27 20:57:02 +02:00
|
|
|
* GDI_inc_ref_count
|
2001-08-20 21:17:28 +02:00
|
|
|
*
|
|
|
|
* Increment the reference count of a GDI object.
|
|
|
|
*/
|
2009-01-29 16:25:58 +01:00
|
|
|
HGDIOBJ GDI_inc_ref_count( HGDIOBJ handle )
|
2001-08-20 21:17:28 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2007-09-27 20:57:02 +02:00
|
|
|
|
2012-10-17 13:17:56 +02:00
|
|
|
EnterCriticalSection( &gdi_section );
|
2021-06-30 17:36:30 +02:00
|
|
|
if ((entry = handle_entry( handle ))) entry_obj( entry )->selcount++;
|
2009-01-29 16:25:58 +01:00
|
|
|
else handle = 0;
|
2012-10-17 13:17:56 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
2009-01-29 16:25:58 +01:00
|
|
|
return handle;
|
2001-08-20 21:17:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2007-09-27 20:57:02 +02:00
|
|
|
* GDI_dec_ref_count
|
2001-08-20 21:17:28 +02:00
|
|
|
*
|
|
|
|
* Decrement the reference count of a GDI object.
|
|
|
|
*/
|
2007-09-27 20:57:02 +02:00
|
|
|
BOOL GDI_dec_ref_count( HGDIOBJ handle )
|
2001-08-20 21:17:28 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2001-08-20 21:17:28 +02:00
|
|
|
|
2012-10-17 13:17:56 +02:00
|
|
|
EnterCriticalSection( &gdi_section );
|
|
|
|
if ((entry = handle_entry( handle )))
|
2001-08-20 21:17:28 +02:00
|
|
|
{
|
2021-06-30 17:36:30 +02:00
|
|
|
assert( entry_obj( entry )->selcount );
|
|
|
|
if (!--entry_obj( entry )->selcount && entry_obj( entry )->deleted)
|
2001-08-20 21:17:28 +02:00
|
|
|
{
|
|
|
|
/* handle delayed DeleteObject*/
|
2021-06-30 17:36:30 +02:00
|
|
|
entry_obj( entry )->deleted = 0;
|
2012-10-17 13:17:56 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
2002-11-22 23:16:53 +01:00
|
|
|
TRACE( "executing delayed DeleteObject for %p\n", handle );
|
2021-09-03 14:59:52 +02:00
|
|
|
NtGdiDeleteObjectApp( handle );
|
2012-10-17 13:17:56 +02:00
|
|
|
return TRUE;
|
2001-08-20 21:17:28 +02:00
|
|
|
}
|
|
|
|
}
|
2012-10-17 13:17:56 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
|
|
|
return entry != NULL;
|
2001-08-20 21:17:28 +02:00
|
|
|
}
|
|
|
|
|
2017-04-27 12:02:35 +02:00
|
|
|
|
2018-04-12 13:25:16 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* get_system_dpi
|
|
|
|
*
|
|
|
|
* Get the system DPI, based on the DPI awareness mode.
|
|
|
|
*/
|
|
|
|
DWORD get_system_dpi(void)
|
|
|
|
{
|
|
|
|
static UINT (WINAPI *pGetDpiForSystem)(void);
|
|
|
|
|
|
|
|
if (!pGetDpiForSystem)
|
|
|
|
{
|
2020-11-06 12:08:16 +01:00
|
|
|
HMODULE user = GetModuleHandleW( L"user32.dll" );
|
2018-04-12 13:25:16 +02:00
|
|
|
if (user) pGetDpiForSystem = (void *)GetProcAddress( user, "GetDpiForSystem" );
|
|
|
|
}
|
|
|
|
return pGetDpiForSystem ? pGetDpiForSystem() : 96;
|
|
|
|
}
|
|
|
|
|
2021-09-03 14:59:49 +02:00
|
|
|
static HFONT create_font( const LOGFONTW *deffont )
|
|
|
|
{
|
|
|
|
ENUMLOGFONTEXDVW lf;
|
|
|
|
|
|
|
|
memset( &lf, 0, sizeof(lf) );
|
|
|
|
lf.elfEnumLogfontEx.elfLogFont = *deffont;
|
|
|
|
return NtGdiHfontCreate( &lf, sizeof(lf), 0, 0, NULL );
|
|
|
|
}
|
|
|
|
|
2021-09-27 13:05:38 +02:00
|
|
|
static HFONT create_scaled_font( const LOGFONTW *deffont, unsigned int dpi )
|
2013-06-17 12:02:25 +02:00
|
|
|
{
|
|
|
|
LOGFONTW lf;
|
|
|
|
|
|
|
|
lf = *deffont;
|
2021-09-24 12:56:00 +02:00
|
|
|
lf.lfHeight = muldiv( lf.lfHeight, dpi, 96 );
|
2021-09-03 14:59:49 +02:00
|
|
|
return create_font( &lf );
|
2013-06-17 12:02:25 +02:00
|
|
|
}
|
2001-08-20 21:17:28 +02:00
|
|
|
|
2021-06-30 17:38:00 +02:00
|
|
|
static void set_gdi_shared(void)
|
|
|
|
{
|
|
|
|
#ifndef _WIN64
|
|
|
|
if (NtCurrentTeb()->GdiBatchCount)
|
|
|
|
{
|
|
|
|
TEB64 *teb64 = (TEB64 *)(UINT_PTR)NtCurrentTeb()->GdiBatchCount;
|
|
|
|
PEB64 *peb64 = (PEB64 *)(UINT_PTR)teb64->Peb;
|
|
|
|
peb64->GdiSharedHandleTable = (UINT_PTR)&gdi_shared;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
/* NOTE: Windows uses 32-bit for 32-bit kernel */
|
|
|
|
NtCurrentTeb()->Peb->GdiSharedHandleTable = &gdi_shared;
|
|
|
|
}
|
|
|
|
|
2021-09-03 14:59:51 +02:00
|
|
|
HGDIOBJ get_stock_object( INT obj )
|
|
|
|
{
|
|
|
|
assert( obj >= 0 && obj <= STOCK_LAST + 1 && obj != 9 );
|
|
|
|
|
|
|
|
switch (obj)
|
|
|
|
{
|
|
|
|
case OEM_FIXED_FONT:
|
|
|
|
if (get_system_dpi() != 96) obj = 9;
|
|
|
|
break;
|
|
|
|
case SYSTEM_FONT:
|
|
|
|
if (get_system_dpi() != 96) obj = STOCK_LAST + 2;
|
|
|
|
break;
|
|
|
|
case SYSTEM_FIXED_FONT:
|
|
|
|
if (get_system_dpi() != 96) obj = STOCK_LAST + 3;
|
|
|
|
break;
|
|
|
|
case DEFAULT_GUI_FONT:
|
|
|
|
if (get_system_dpi() != 96) obj = STOCK_LAST + 4;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return entry_to_handle( handle_entry( ULongToHandle( obj + FIRST_GDI_HANDLE )));
|
|
|
|
}
|
|
|
|
|
2021-09-27 13:05:38 +02:00
|
|
|
static void init_stock_objects( unsigned int dpi )
|
2021-08-06 16:59:07 +02:00
|
|
|
{
|
2021-09-03 14:59:50 +02:00
|
|
|
const struct DefaultFontInfo *deffonts;
|
|
|
|
unsigned int i;
|
|
|
|
HGDIOBJ obj;
|
|
|
|
|
|
|
|
/* Create stock objects in order matching stock object macros,
|
|
|
|
* so that they use predictable handle slots. Our GetStockObject
|
|
|
|
* depends on it. */
|
|
|
|
create_brush( &WhiteBrush );
|
|
|
|
create_brush( &LtGrayBrush );
|
|
|
|
create_brush( &GrayBrush );
|
|
|
|
create_brush( &DkGrayBrush );
|
|
|
|
create_brush( &BlackBrush );
|
|
|
|
create_brush( &NullBrush );
|
|
|
|
|
|
|
|
create_pen( PS_SOLID, 0, RGB(255,255,255) );
|
|
|
|
create_pen( PS_SOLID, 0, RGB(0,0,0) );
|
|
|
|
create_pen( PS_NULL, 0, RGB(0,0,0) );
|
|
|
|
|
|
|
|
/* slot 9 is not used for non-scaled stock objects */
|
2021-09-27 13:05:38 +02:00
|
|
|
create_scaled_font( &OEMFixedFont, dpi );
|
2021-09-03 14:59:50 +02:00
|
|
|
|
|
|
|
/* language-independent stock fonts */
|
|
|
|
create_font( &OEMFixedFont );
|
|
|
|
create_font( &AnsiFixedFont );
|
|
|
|
create_font( &AnsiVarFont );
|
|
|
|
|
|
|
|
/* language-dependent stock fonts */
|
|
|
|
deffonts = get_default_fonts(get_default_charset());
|
|
|
|
create_font( &deffonts->SystemFont );
|
|
|
|
create_font( &deffonts->DeviceDefaultFont );
|
2021-08-06 16:59:07 +02:00
|
|
|
|
2021-09-03 14:59:50 +02:00
|
|
|
PALETTE_Init();
|
|
|
|
|
|
|
|
create_font( &deffonts->SystemFixedFont );
|
|
|
|
create_font( &deffonts->DefaultGuiFont );
|
|
|
|
|
|
|
|
create_brush( &DCBrush );
|
|
|
|
NtGdiCreatePen( PS_SOLID, 0, RGB(0,0,0), NULL );
|
|
|
|
|
|
|
|
obj = NtGdiCreateBitmap( 1, 1, 1, 1, NULL );
|
|
|
|
|
|
|
|
assert( (HandleToULong( obj ) & 0xffff) == FIRST_GDI_HANDLE + DEFAULT_BITMAP );
|
|
|
|
|
2021-09-27 13:05:38 +02:00
|
|
|
create_scaled_font( &deffonts->SystemFont, dpi );
|
|
|
|
create_scaled_font( &deffonts->SystemFixedFont, dpi );
|
|
|
|
create_scaled_font( &deffonts->DefaultGuiFont, dpi );
|
2021-09-03 14:59:50 +02:00
|
|
|
|
|
|
|
/* clear the NOSYSTEM bit on all stock objects*/
|
|
|
|
for (i = 0; i < STOCK_LAST + 5; i++)
|
|
|
|
{
|
|
|
|
GDI_HANDLE_ENTRY *entry = &gdi_shared.Handles[FIRST_GDI_HANDLE + i];
|
|
|
|
entry_obj( entry )->system = TRUE;
|
|
|
|
entry->StockFlag = 1;
|
|
|
|
}
|
2021-08-06 16:59:07 +02:00
|
|
|
}
|
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
/***********************************************************************
|
2009-12-28 16:27:26 +01:00
|
|
|
* DllMain
|
1993-09-04 12:09:32 +02:00
|
|
|
*
|
Release 960606
Wed Jun 5 20:13:54 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/button.c] [controls/listbox.c]
Fixed wParam of WM_DRAWITEM message.
* [if1632/Makefile.in] [loader/builtin.c]
Remove WPROCS32 DLL, as the relay code can call Wine routines
directly.
* [loader/module.c] [loader/ne_image.c]
Fixed initial stack layout for self-loading modules.
* [tools/build.c]
Fixed data segment building for Win16 modules.
* [windows/defdlg.c]
Implemented Win32 versions of DefDlgProc().
* [windows/dialog.c]
Merged Win16 and Win32 dialog code.
Added support for control extra data in dialog item template.
* [windows/win.c]
Unified Win16 and Win32 versions of CreateWindow().
Implemented Win32 version of GetWindowLong().
* [windows/winproc.c]
Changed the implementation of window procedures, so that 16-bit
winprocs are valid segmented pointers.
Sun Jun 2 16:39:46 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [misc/registry.c]
Fixed another bug in the w95 loader. Quietened some debug output.
Sun Jun 2 10:00:22 1996 Ulrich Schmid <uschmid@mail.hh.provi.de>
* [windows/winproc.c]
Bug fix: WM_PARENTNOTIFY: don't fall through to WM_SETTEXT.
Sat Jun 1 12:37:22 1996 Tristan Tarrant <tst@sthinc.demon.co.uk>
* [resources/TODO] [resources/sysres_It.rc]
Updated font dialog box.
Thu May 30 21:05:19 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/commdlg.h] [misc/commdlg.c]
ChooseFont() and ChooseColor():
Bugfixes and added more support for some CF_* and CC_* flags:
dialog templates and font size control.
Bugfix in structure definition of CHOOSECOLOR definition.
* [ipc/dde_proc.c] [windows/event.c]
Replaced SendMessage with SendMessage16 and added inclusion of
dde_proc.h for error-free compilation of ipc module.
Thu May 30 19:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [windows/scroll.c]
Made ScrollDC to save/restore current clipping region.
* [misc/clipboard.c] [windows/event.c]
Implemented most of the previously missing features (not tested),
improved text pasting from/to X.
* [if1632/user.spec] [if1632/gdi.spec] [objects/dc.c]
[objects/gdiobj.c] [objects/clipping.c] [windows/dce.c]
[windows/winpos.c] [windows/painting.c]
Updated DCE code, implemented dynamic invalidation of owned DCs.
This fixes a lot of problems with scrolling in WinWord. Not
sure about the effect on -desktop.
Wed May 29 23:35:44 1996 Jukka Iivonen <iivonen@cc.helsinki.fi>
* [win32/time.c] [if1632/kernel32.spec]
Added SetSystemTime and SetTimeZoneInformation.
* [if1632/kernel32.spec]
Added lstrcat, lstrcatA, lstrcmp, lstrcmpA, lstrcpy, lstrlen.
* [include/windows.h]
Added SYSTEM_POWER_STATUS structure and prototypes for
GetSystemPowerStatus, SetSystemPowerState, SetSystemTime.
* [include/kernel32.h]
Added a prototype for SetTimeZoneInformation.
* [win32/environment.c] [if1632/kernel32.spec]
Added GetSystemPowerStatus and SetSystemPowerState stubs.
1996-06-06 20:38:27 +02:00
|
|
|
* GDI initialization.
|
1993-09-04 12:09:32 +02:00
|
|
|
*/
|
2009-12-28 16:27:26 +01:00
|
|
|
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
2021-09-27 13:05:38 +02:00
|
|
|
unsigned int dpi;
|
|
|
|
|
2009-12-28 16:27:26 +01:00
|
|
|
if (reason != DLL_PROCESS_ATTACH) return TRUE;
|
|
|
|
|
2011-11-03 14:11:35 +01:00
|
|
|
gdi32_module = inst;
|
2009-12-28 16:27:26 +01:00
|
|
|
DisableThreadLibraryCalls( inst );
|
2021-09-17 13:44:50 +02:00
|
|
|
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
|
2021-06-30 17:38:00 +02:00
|
|
|
set_gdi_shared();
|
2021-09-27 13:05:38 +02:00
|
|
|
dpi = font_init();
|
|
|
|
init_stock_objects( dpi );
|
Release 980628
Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c]
Moved page-fault handling to INSTR_EmulateInstruction.
* [scheduler/thread.c]
Added locking and check for own thread in Suspend/ResumeThread.
Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c]
[graphics/x11drv/bitblt.c] [include/bitmap.h]
Improved DIB section handling using page fault handlers.
(Note: This patch includes code contributed by Matthew J. Francis.)
* [memory/virtual.c] [if1632/signal.c] [include/global.h]
Page Fault handler support added.
* [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c]
[misc/winsock_dns.c] [include/sig_context.h] [include/thread.h]
16-bit %fs handling improved: Always preserve 16-bit %fs value,
always restore 32-bit %fs value for signal handlers.
* [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c]
[loader/ne/resource.c] [include/callback.h] [include/module.h]
[if1632/kernel.spec] [if1632/wprocs.spec]
Resource Handler function pointer stored as 16-bit SEGPTR.
* [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec]
[if1632/kernel.spec] [loader/ne/module.c]
Some minor incompatibilities fixed (Win32s relies on those):
GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize
should cope with having the WINDOWPOS structure trashed;
the OFSTRUCT in the NE module image should be placed *last*.
* [include/windows.h]
Missing prototype for FlushViewOfFile.
* [loader/task.c]
Bugfix: Command line should *not* start with a blank.
* [loader/ne/segment.c]
Bugfix: Fixups to offset 0 were never applied.
* [misc/lstr.c]
Use debugstr_a in OutputDebugString16.
* [msdos/dpmi.c]
Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added.
* [msdos/int21.c]
Stub for int 21 AX=440d CL=6f (get drive map information) added.
Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net>
* [windows/winpos.c]
Fix small buglet that mixed up maximized and minimized windows.
* [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c]
[graphics/x11drv/graphics.c]
Fix some bugs with lines joining styles. Draws rectangles
with thick pens now correctly.
Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu>
* [misc/shell.c]
Fixed bug I introduced last release in InternalExtractIcon.
* [win32/file.c]
Added documentation for CreateFile32A.
* [documentation/wine.man]
Updated manpage.
* [ChangeLog]
Added my entry from last release.
Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h]
[include/print.h] [objects/gdiobj.c]
First stages of an internal Postscript driver. See
graphics/psdrv/README . Should print text (badly) from win3.1 notepad,
write and winword6.
* [documentation/printing]
Some notes on printing.
* [controls/edit.c]
Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle.
EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS
and not as an action as the docs say. This actually makes more sense.
Scroll the caret back to zero after a WM_SETTEXT.
Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/snoop.c]
Added win16 inter-dll snooping.
* [win32/ordinals.c]
KERNEL_485 is GetProcessDword.
* [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c]
Added xcalloc so we 0 initialize XImages.
Fixes/Hides the 'junk around MOPYFish'.
* [misc/ntdll.c]
Some stubs added.
Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au>
* [scheduler/thread.c]
Implemented SuspendThread and ResumeThread.
Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca>
* [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c]
[relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in]
[documentation/status/directplay]
Added preliminary support for DirectPlay & DirectPlayLobby. Moved the
preliminary stubs put in the dsound files into two new files
dplay.h and dplay.c.
Added new debug channel (dplay) for this.
Created new document to keep track of implementation.
* [include/winioctl.h][win32/device.c]
Added some framework in DeviceIoControl to, in the future, support
the "builtin" windows dwIoControlCodes. Added new header file
winioctl.h .
* [multimedia/mmsystem.c]
Added slightly improved debugging information for PlaySound.
Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [files/profile.c][graphics/x11drv/xfont.c][loader/module.c]
Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp,
lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp
because it's not necessary to support locale on such places.
It causes a huge overhead and even fails sometimes
* [include/oleauto.h][include/winerror.h]
Added some ole-related constants.
* [misc/shell.c]
SHELL32_DllGetClassObject, SHGetSpecialFolderLocation,
SHGetPathFromIDList improved the stubs
* [ole/folders.c]
IShellFolder* functions rewrote the stubs so don't crash and give
something sensible back, started implementation of.
* [ole/typelib.c][relay32/oleaut32.spec]
LoadTypeLib32, RegisterTypeLib stub.
* [ole/ole2nls.c]
Fixed a buffer overrun in CompareString32A.
Test for a bad pointer in LCMapString32A (happens
in winhlp32 while building a index for searching).
* [relay32/oleaut32.spec] [ole/typelib.c]
Added stub for LoadTypeLib (ole32) to make excel95 happy.
Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [relay32/kernel32.spec]
Added WritePrivateProfileStructA, GetPrivateProfileStructA,
GetPrivateProfileSectionNames16.
Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [ole/ole2nls.c]
GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases.
LCMapString32A: Map final '\0' for '\0'-terminated strings.
* [misc/shellord.c] [files/profile.c] [graphics/driver.c]
[loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c]
Changed lstrcmpi32A -> strcasecmp. Should be OK in these places.
Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk>
* [tools/wrc/]
Wrc version 1.0.2 (20-Jun-1998). Please revert to
the file tools/wrc/CHANGES for details.
Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch>
* [ole/ole2nls.c] [ole/nls/*]
Added the first 57 nls files, most are not yet complete.
Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au>
* [relay32/relay386.c] [if1632/relay.c]
Move debug_relay_(include|exclude)_list handling into
seperate function RELAY_ShowDebugmsgsRelay(). Include
checking of this for 16 bit calls (originally only
32-bit calls).
* [relay32/snoop.c] [misc/main.c]
Add debug_snoop_(include|exclude)_list as per the relay stuff.
Fix typo and add information on -debugmsg +/-relay=... in
help on -debugmsg. Refer to availability of snoop too.
Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/header.c][include/header.h][include/commctrl.h]
Added owner draw support.
* [windows/nonclient.c][windows/sysmetics.c]
Fixed menu bar height for Win95 look.
Split NC_AdjustRect95() into NC_AdjustRectOuter95() and
NC_AdjustRectInner95 to fix a menu bar bug.
Improved Win95 look.
* [controls/progress.c]
Improved drawing code. Borders will be drawn by non-client code.
* [controls/updown.c]
Changed memory allocation and fixed some bugs.
* [controls/toolbar.c]
Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs.
Several improvements.
* [misc/shell.c]
Added stub for BrowseForFoldersA().
* [misc/shellord.c]
Added stub for SHELL32_147().
* [controls/comctl32undoc.c]
Minor changes.
* [documentation/common_controls]
New File: Documentation about development status, undocumented
features and functions of the common controls.
1998-06-28 20:40:26 +02:00
|
|
|
return TRUE;
|
1993-09-04 12:09:32 +02:00
|
|
|
}
|
|
|
|
|
2020-11-06 18:05:42 +01:00
|
|
|
|
2010-02-24 10:11:32 +01:00
|
|
|
static const char *gdi_obj_type( unsigned type )
|
|
|
|
{
|
|
|
|
switch ( type )
|
|
|
|
{
|
2021-07-08 17:11:45 +02:00
|
|
|
case NTGDI_OBJ_PEN: return "NTGDI_OBJ_PEN";
|
|
|
|
case NTGDI_OBJ_BRUSH: return "NTGDI_OBJ_BRUSH";
|
|
|
|
case NTGDI_OBJ_DC: return "NTGDI_OBJ_DC";
|
|
|
|
case NTGDI_OBJ_METADC: return "NTGDI_OBJ_METADC";
|
|
|
|
case NTGDI_OBJ_PAL: return "NTGDI_OBJ_PAL";
|
|
|
|
case NTGDI_OBJ_FONT: return "NTGDI_OBJ_FONT";
|
|
|
|
case NTGDI_OBJ_BITMAP: return "NTGDI_OBJ_BITMAP";
|
|
|
|
case NTGDI_OBJ_REGION: return "NTGDI_OBJ_REGION";
|
|
|
|
case NTGDI_OBJ_METAFILE: return "NTGDI_OBJ_METAFILE";
|
|
|
|
case NTGDI_OBJ_MEMDC: return "NTGDI_OBJ_MEMDC";
|
|
|
|
case NTGDI_OBJ_EXTPEN: return "NTGDI_OBJ_EXTPEN";
|
|
|
|
case NTGDI_OBJ_ENHMETADC: return "NTGDI_OBJ_ENHMETADC";
|
|
|
|
case NTGDI_OBJ_ENHMETAFILE: return "NTGDI_OBJ_ENHMETAFILE";
|
2010-02-24 10:11:32 +01:00
|
|
|
default: return "UNKNOWN";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dump_gdi_objects( void )
|
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2010-02-24 10:11:32 +01:00
|
|
|
|
2021-06-30 17:37:51 +02:00
|
|
|
TRACE( "%u objects:\n", GDI_MAX_HANDLE_COUNT );
|
2010-02-24 10:11:32 +01:00
|
|
|
|
|
|
|
EnterCriticalSection( &gdi_section );
|
2021-06-30 17:37:51 +02:00
|
|
|
for (entry = gdi_shared.Handles; entry < next_unused; entry++)
|
2010-02-24 10:11:32 +01:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
if (!entry->Type)
|
2012-10-17 12:25:28 +02:00
|
|
|
TRACE( "handle %p FREE\n", entry_to_handle( entry ));
|
2012-10-16 16:58:28 +02:00
|
|
|
else
|
2021-06-30 17:37:51 +02:00
|
|
|
TRACE( "handle %p obj %s type %s selcount %u deleted %u\n",
|
|
|
|
entry_to_handle( entry ), wine_dbgstr_longlong( entry->Object ),
|
2021-09-03 14:59:47 +02:00
|
|
|
gdi_obj_type( entry->ExtType << NTGDI_HANDLE_TYPE_SHIFT ),
|
|
|
|
entry_obj( entry )->selcount, entry_obj( entry )->deleted );
|
2010-02-24 10:11:32 +01:00
|
|
|
}
|
|
|
|
LeaveCriticalSection( &gdi_section );
|
|
|
|
}
|
|
|
|
|
2000-11-05 03:05:07 +01:00
|
|
|
/***********************************************************************
|
2009-01-28 18:43:06 +01:00
|
|
|
* alloc_gdi_handle
|
2000-11-05 03:05:07 +01:00
|
|
|
*
|
2009-01-28 18:43:06 +01:00
|
|
|
* Allocate a GDI handle for an object, which must have been allocated on the process heap.
|
2000-11-05 03:05:07 +01:00
|
|
|
*/
|
2021-09-03 14:59:47 +02:00
|
|
|
HGDIOBJ alloc_gdi_handle( struct gdi_obj_header *obj, DWORD type, const struct gdi_obj_funcs *funcs )
|
2000-11-05 03:05:07 +01:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2012-10-17 12:25:28 +02:00
|
|
|
HGDIOBJ ret;
|
2000-11-05 03:05:07 +01:00
|
|
|
|
2012-10-17 12:25:28 +02:00
|
|
|
assert( type ); /* type 0 is reserved to mark free entries */
|
|
|
|
|
2009-12-24 17:42:13 +01:00
|
|
|
EnterCriticalSection( &gdi_section );
|
2000-11-05 03:05:07 +01:00
|
|
|
|
2012-10-16 16:58:28 +02:00
|
|
|
entry = next_free;
|
|
|
|
if (entry)
|
2021-06-30 17:37:51 +02:00
|
|
|
next_free = (GDI_HANDLE_ENTRY *)(UINT_PTR)entry->Object;
|
|
|
|
else if (next_unused < gdi_shared.Handles + GDI_MAX_HANDLE_COUNT)
|
2012-10-16 16:58:28 +02:00
|
|
|
entry = next_unused++;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
LeaveCriticalSection( &gdi_section );
|
|
|
|
ERR( "out of GDI object handles, expect a crash\n" );
|
|
|
|
if (TRACE_ON(gdi)) dump_gdi_objects();
|
|
|
|
return 0;
|
|
|
|
}
|
2021-06-30 17:36:19 +02:00
|
|
|
obj->funcs = funcs;
|
2021-06-30 17:36:30 +02:00
|
|
|
obj->selcount = 0;
|
|
|
|
obj->system = 0;
|
|
|
|
obj->deleted = 0;
|
2021-07-08 17:11:45 +02:00
|
|
|
entry->Object = (UINT_PTR)obj;
|
2021-09-03 14:59:47 +02:00
|
|
|
entry->ExtType = type >> NTGDI_HANDLE_TYPE_SHIFT;
|
|
|
|
entry->Type = entry->ExtType & 0x1f;
|
2021-07-08 17:11:45 +02:00
|
|
|
if (++entry->Generation == 0xff) entry->Generation = 1;
|
2012-10-17 12:25:28 +02:00
|
|
|
ret = entry_to_handle( entry );
|
2009-12-24 17:42:13 +01:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
2012-10-17 12:25:28 +02:00
|
|
|
TRACE( "allocated %s %p %u/%u\n", gdi_obj_type(type), ret,
|
2021-06-30 17:37:51 +02:00
|
|
|
InterlockedIncrement( &debug_count ), GDI_MAX_HANDLE_COUNT );
|
2012-10-17 12:25:28 +02:00
|
|
|
return ret;
|
1993-09-04 12:09:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-08-19 23:38:55 +02:00
|
|
|
/***********************************************************************
|
2009-01-28 18:45:21 +01:00
|
|
|
* free_gdi_handle
|
|
|
|
*
|
|
|
|
* Free a GDI handle and return a pointer to the object.
|
2000-08-19 23:38:55 +02:00
|
|
|
*/
|
2009-01-28 18:45:21 +01:00
|
|
|
void *free_gdi_handle( HGDIOBJ handle )
|
2000-08-19 23:38:55 +02:00
|
|
|
{
|
2012-10-17 13:48:45 +02:00
|
|
|
void *object = NULL;
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2000-08-19 23:38:55 +02:00
|
|
|
|
2012-10-17 12:25:28 +02:00
|
|
|
EnterCriticalSection( &gdi_section );
|
|
|
|
if ((entry = handle_entry( handle )))
|
2001-08-17 02:07:13 +02:00
|
|
|
{
|
2021-09-03 14:59:47 +02:00
|
|
|
TRACE( "freed %s %p %u/%u\n", gdi_obj_type( entry->ExtType << NTGDI_HANDLE_TYPE_SHIFT ),
|
|
|
|
handle, InterlockedDecrement( &debug_count ) + 1, GDI_MAX_HANDLE_COUNT );
|
2021-06-30 17:37:51 +02:00
|
|
|
object = entry_obj( entry );
|
|
|
|
entry->Type = 0;
|
|
|
|
entry->Object = (UINT_PTR)next_free;
|
2012-10-16 16:58:28 +02:00
|
|
|
next_free = entry;
|
2000-08-19 23:38:55 +02:00
|
|
|
}
|
2012-10-17 12:25:28 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
2009-01-28 18:45:21 +01:00
|
|
|
return object;
|
1993-09-04 12:09:32 +02:00
|
|
|
}
|
|
|
|
|
2021-09-14 21:51:51 +02:00
|
|
|
DWORD get_gdi_object_type( HGDIOBJ obj )
|
|
|
|
{
|
|
|
|
GDI_HANDLE_ENTRY *entry = handle_entry( obj );
|
|
|
|
return entry ? entry->ExtType << NTGDI_HANDLE_TYPE_SHIFT : 0;
|
|
|
|
}
|
2000-08-19 23:38:55 +02:00
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
/***********************************************************************
|
2016-07-08 13:57:14 +02:00
|
|
|
* get_any_obj_ptr
|
1993-09-04 12:09:32 +02:00
|
|
|
*
|
2016-07-08 13:57:14 +02:00
|
|
|
* Return a pointer to, and the type of, the GDI object
|
|
|
|
* associated with the handle.
|
2000-08-19 23:38:55 +02:00
|
|
|
* The object must be released with GDI_ReleaseObj.
|
1993-09-04 12:09:32 +02:00
|
|
|
*/
|
2021-09-03 14:59:47 +02:00
|
|
|
void *get_any_obj_ptr( HGDIOBJ handle, DWORD *type )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
2012-10-17 13:48:45 +02:00
|
|
|
void *ptr = NULL;
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2000-08-19 23:38:55 +02:00
|
|
|
|
2009-12-24 17:42:13 +01:00
|
|
|
EnterCriticalSection( &gdi_section );
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2012-10-17 12:25:28 +02:00
|
|
|
if ((entry = handle_entry( handle )))
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
ptr = entry_obj( entry );
|
2021-09-03 14:59:47 +02:00
|
|
|
*type = entry->ExtType << NTGDI_HANDLE_TYPE_SHIFT;
|
2000-11-05 03:05:07 +01:00
|
|
|
}
|
2000-08-19 23:38:55 +02:00
|
|
|
|
2012-10-16 16:58:28 +02:00
|
|
|
if (!ptr) LeaveCriticalSection( &gdi_section );
|
1993-09-04 12:09:32 +02:00
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
2016-07-08 13:57:14 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GDI_GetObjPtr
|
|
|
|
*
|
|
|
|
* Return a pointer to the GDI object associated with the handle.
|
|
|
|
* Return NULL if the object has the wrong type.
|
|
|
|
* The object must be released with GDI_ReleaseObj.
|
|
|
|
*/
|
2021-09-03 14:59:47 +02:00
|
|
|
void *GDI_GetObjPtr( HGDIOBJ handle, DWORD type )
|
2016-07-08 13:57:14 +02:00
|
|
|
{
|
2021-09-03 14:59:47 +02:00
|
|
|
DWORD ret_type;
|
2016-07-08 13:57:14 +02:00
|
|
|
void *ptr = get_any_obj_ptr( handle, &ret_type );
|
|
|
|
if (ptr && ret_type != type)
|
|
|
|
{
|
|
|
|
GDI_ReleaseObj( handle );
|
|
|
|
ptr = NULL;
|
|
|
|
}
|
|
|
|
return ptr;
|
|
|
|
}
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2000-08-19 23:38:55 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GDI_ReleaseObj
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void GDI_ReleaseObj( HGDIOBJ handle )
|
|
|
|
{
|
2009-12-24 17:42:13 +01:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
2000-08-19 23:38:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-08-16 01:33:20 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GDI_CheckNotLock
|
|
|
|
*/
|
|
|
|
void GDI_CheckNotLock(void)
|
|
|
|
{
|
2015-10-10 05:40:07 +02:00
|
|
|
if (RtlIsCriticalSectionLockedByThread(&gdi_section))
|
2009-12-24 17:42:13 +01:00
|
|
|
{
|
|
|
|
ERR( "BUG: holding GDI lock\n" );
|
2021-09-24 12:56:11 +02:00
|
|
|
assert( 0 );
|
2009-12-24 17:42:13 +01:00
|
|
|
}
|
2001-08-16 01:33:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1996-11-02 15:24:07 +01:00
|
|
|
/***********************************************************************
|
2021-07-07 15:02:17 +02:00
|
|
|
* NtGdiDeleteObjectApp (win32u.@)
|
2004-11-23 13:19:24 +01:00
|
|
|
*
|
|
|
|
* Delete a Gdi object.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* obj [I] Gdi object to delete
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE. If obj was not returned from GetStockObject(), any resources
|
|
|
|
* it consumed are released.
|
|
|
|
* Failure: FALSE, if obj is not a valid Gdi object, or is currently selected
|
|
|
|
* into a DC.
|
1996-11-02 15:24:07 +01:00
|
|
|
*/
|
2021-07-07 15:02:17 +02:00
|
|
|
BOOL WINAPI NtGdiDeleteObjectApp( HGDIOBJ obj )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2012-10-17 13:08:11 +02:00
|
|
|
const struct gdi_obj_funcs *funcs = NULL;
|
2021-06-30 17:36:30 +02:00
|
|
|
struct gdi_obj_header *header;
|
2001-08-17 02:07:13 +02:00
|
|
|
|
2012-10-17 12:43:23 +02:00
|
|
|
EnterCriticalSection( &gdi_section );
|
|
|
|
if (!(entry = handle_entry( obj )))
|
|
|
|
{
|
|
|
|
LeaveCriticalSection( &gdi_section );
|
|
|
|
return FALSE;
|
|
|
|
}
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2021-06-30 17:36:30 +02:00
|
|
|
header = entry_obj( entry );
|
|
|
|
if (header->system)
|
2000-09-16 22:53:51 +02:00
|
|
|
{
|
2002-11-22 23:16:53 +01:00
|
|
|
TRACE("Preserving system object %p\n", obj);
|
2012-10-17 12:43:23 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
2000-09-16 22:53:51 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
2001-08-20 21:17:28 +02:00
|
|
|
|
2012-10-16 16:58:28 +02:00
|
|
|
obj = entry_to_handle( entry ); /* make it a full handle */
|
|
|
|
|
2021-06-30 17:36:30 +02:00
|
|
|
if (header->selcount)
|
2012-10-17 13:08:11 +02:00
|
|
|
{
|
2021-06-30 17:36:30 +02:00
|
|
|
TRACE("delayed for %p because object in use, count %u\n", obj, header->selcount );
|
|
|
|
header->deleted = 1; /* mark for delete */
|
2012-10-17 13:08:11 +02:00
|
|
|
}
|
2021-06-30 17:36:30 +02:00
|
|
|
else funcs = header->funcs;
|
2012-10-17 13:08:11 +02:00
|
|
|
|
|
|
|
LeaveCriticalSection( &gdi_section );
|
|
|
|
|
2012-10-17 12:43:23 +02:00
|
|
|
TRACE("%p\n", obj );
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2012-10-17 12:43:23 +02:00
|
|
|
if (funcs && funcs->pDeleteObject) return funcs->pDeleteObject( obj );
|
2012-10-17 13:08:11 +02:00
|
|
|
return TRUE;
|
1993-09-04 12:09:32 +02:00
|
|
|
}
|
|
|
|
|
2021-07-09 15:28:39 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* NtGdiCreateClientObj (win32u.@)
|
|
|
|
*/
|
|
|
|
HANDLE WINAPI NtGdiCreateClientObj( ULONG type )
|
|
|
|
{
|
|
|
|
struct gdi_obj_header *obj;
|
|
|
|
HGDIOBJ handle;
|
|
|
|
|
|
|
|
if (!(obj = HeapAlloc( GetProcessHeap(), 0, sizeof(*obj) )))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
handle = alloc_gdi_handle( obj, type, NULL );
|
|
|
|
if (!handle) HeapFree( GetProcessHeap(), 0, obj );
|
|
|
|
return handle;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* NtGdiDeleteClientObj (win32u.@)
|
|
|
|
*/
|
2021-07-22 11:23:54 +02:00
|
|
|
BOOL WINAPI NtGdiDeleteClientObj( HGDIOBJ handle )
|
2021-07-09 15:28:39 +02:00
|
|
|
{
|
2021-07-22 11:23:54 +02:00
|
|
|
void *obj;
|
|
|
|
if (!(obj = free_gdi_handle( handle ))) return FALSE;
|
|
|
|
HeapFree( GetProcessHeap(), 0, obj );
|
|
|
|
return TRUE;
|
2021-07-09 15:28:39 +02:00
|
|
|
}
|
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
|
1998-10-23 15:27:36 +02:00
|
|
|
/***********************************************************************
|
2021-07-05 13:39:05 +02:00
|
|
|
* NtGdiExtGetObjectW (win32u.@)
|
1998-10-23 15:27:36 +02:00
|
|
|
*/
|
2021-07-05 13:39:05 +02:00
|
|
|
INT WINAPI NtGdiExtGetObjectW( HGDIOBJ handle, INT count, void *buffer )
|
1998-10-23 15:27:36 +02:00
|
|
|
{
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
2012-10-17 12:43:23 +02:00
|
|
|
const struct gdi_obj_funcs *funcs = NULL;
|
1999-02-26 12:11:13 +01:00
|
|
|
INT result = 0;
|
2012-10-17 12:43:23 +02:00
|
|
|
|
2002-11-22 23:16:53 +01:00
|
|
|
TRACE("%p %d %p\n", handle, count, buffer );
|
1998-10-23 15:27:36 +02:00
|
|
|
|
2012-10-17 12:43:23 +02:00
|
|
|
EnterCriticalSection( &gdi_section );
|
2012-10-16 16:58:28 +02:00
|
|
|
if ((entry = handle_entry( handle )))
|
|
|
|
{
|
2021-06-30 17:36:19 +02:00
|
|
|
funcs = entry_obj( entry )->funcs;
|
2012-10-16 16:58:28 +02:00
|
|
|
handle = entry_to_handle( entry ); /* make it a full handle */
|
|
|
|
}
|
2012-10-17 12:43:23 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
2000-02-13 17:00:17 +01:00
|
|
|
|
2021-07-05 13:39:05 +02:00
|
|
|
if (funcs && funcs->pGetObjectW)
|
2010-08-19 15:30:49 +02:00
|
|
|
{
|
2021-07-05 13:39:05 +02:00
|
|
|
if (buffer && ((ULONG_PTR)buffer >> 16) == 0) /* catch apps getting argument order wrong */
|
2010-08-19 15:30:49 +02:00
|
|
|
SetLastError( ERROR_NOACCESS );
|
|
|
|
else
|
|
|
|
result = funcs->pGetObjectW( handle, count, buffer );
|
|
|
|
}
|
1998-10-23 15:27:36 +02:00
|
|
|
return result;
|
|
|
|
}
|
Release 960611
Tue Jun 11 15:20:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/break.c] [loader/signal.c]
Fixed breakpoints in 32-bit code.
* [include/windows.h]
Added many more Win32 versions of standard structures.
* [include/winreg.h] [misc/registry.c]
Moved private types into registry.c.
* [memory/string.c] (New file)
Moved most string functions from misc/lstr.c; added Win32 version
of all functions.
* [misc/wsprintf.c]
Implemented Win32 wsprintf functions.
* [objects/bitmap.c]
Implemented Win32 bitmap functions.
* [windows/dialog.c]
Don't set dialog procedure before the controls are created. This
avoids a crash in Winhelp.
Tue Jun 11 14:10:06 1996 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [controls/menu.c] [if1632/user.spec] [windows/message.c]
Replace PeekMessage with PeekMessage16.
* [if1632/kernel32.spec][misc/main.c]
GetVersion32,GetVersionEx32A,GetVersionEx32W: new functions.
MAIN_ParseVersion: new function, new command line option -winver.
GetVersion: modified to take command line argument into account.
* [if1632/kernel32.spec] [win32/process.c]
FreeLibrary32: new function.
TlsAlloc: initialize Tls to zero.
InterlockedIncrement,InterlockedDecrement,InterlockedExchange: new
functions.
* [if1632/kernel32.spec]
SetErrorMode,GetActiveWindow: new relays to existing functions.
* [if1632/kernel32.spec][win32/user32.c]
PeekMessage32A,PeekMessage32W: new functions.
* [include/struct32.h][include/windows.h]
Moved MSG32 to windows.h.
Renamed MSG to MSG16.
Modified prototypes to use MSG16
* [include/winbase.h]
OSVERSIONINFO32A,OSVERSIONINFO32W: new structures.
Sun Jun 9 20:53:30 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/Makefile.in] [loader/builtin.c]
version.dll,lz32.dll added.
* [include/lzexpand.h] [if1632/lz32.spec] [if1632/lzexpand.spec]
[misc/lzexpand.c]
lz32.dll added.
Modified to new function naming standard.
* [include/ver.h] [if1632/ver.spec] [if1632/version.spec] [misc/ver.c]
version.dll added (win32 version of ver.dll).
Modified to new function naming standard.
Use registry to look up a LOCALE langids too.
(VerInstallFile,VerFindFile still stubs)
Fri Jun 7 20:40:20 1996 Albrecht Kleine <kleine@ak.sax.de>
* [files/file.c]
Added a warning if GetTempFileName() gets a bad drive parameter.
* [misc/commdlg.c]
Changed file listbox color to gray in SaveFile dialog
(just like Windows does this).
1996-06-11 18:02:08 +02:00
|
|
|
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
/***********************************************************************
|
2021-09-03 14:59:48 +02:00
|
|
|
* NtGdiGetDCObject (win32u.@)
|
2004-11-23 13:19:24 +01:00
|
|
|
*
|
|
|
|
* Get the currently selected object of a given type in a device context.
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
*/
|
2021-09-03 14:59:48 +02:00
|
|
|
HANDLE WINAPI NtGdiGetDCObject( HDC hdc, UINT type )
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
{
|
2004-07-08 22:17:59 +02:00
|
|
|
HGDIOBJ ret = 0;
|
2021-09-03 14:59:48 +02:00
|
|
|
DC *dc;
|
|
|
|
|
|
|
|
if (!(dc = get_dc_ptr( hdc ))) return 0;
|
|
|
|
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case NTGDI_OBJ_EXTPEN: /* fall through */
|
|
|
|
case NTGDI_OBJ_PEN: ret = dc->hPen; break;
|
|
|
|
case NTGDI_OBJ_BRUSH: ret = dc->hBrush; break;
|
|
|
|
case NTGDI_OBJ_PAL: ret = dc->hPalette; break;
|
|
|
|
case NTGDI_OBJ_FONT: ret = dc->hFont; break;
|
|
|
|
case NTGDI_OBJ_SURF: ret = dc->hBitmap; break;
|
|
|
|
default:
|
|
|
|
FIXME( "(%p, %d): unknown type.\n", hdc, type );
|
|
|
|
break;
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
}
|
2008-02-05 21:17:28 +01:00
|
|
|
release_dc_ptr( dc );
|
2000-08-19 23:38:55 +02:00
|
|
|
return ret;
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
}
|
2002-05-07 04:08:46 +02:00
|
|
|
|
|
|
|
|
1996-11-02 15:24:07 +01:00
|
|
|
/***********************************************************************
|
2021-08-30 13:57:05 +02:00
|
|
|
* NtGdiUnrealizeObject (win32u.@)
|
1993-09-04 12:09:32 +02:00
|
|
|
*/
|
2021-08-30 13:57:05 +02:00
|
|
|
BOOL WINAPI NtGdiUnrealizeObject( HGDIOBJ obj )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
2012-10-17 12:43:23 +02:00
|
|
|
const struct gdi_obj_funcs *funcs = NULL;
|
2021-06-30 17:37:51 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry;
|
1996-07-17 22:02:21 +02:00
|
|
|
|
2012-10-17 12:43:23 +02:00
|
|
|
EnterCriticalSection( &gdi_section );
|
2012-10-16 16:58:28 +02:00
|
|
|
if ((entry = handle_entry( obj )))
|
|
|
|
{
|
2021-06-30 17:36:19 +02:00
|
|
|
funcs = entry_obj( entry )->funcs;
|
2012-10-16 16:58:28 +02:00
|
|
|
obj = entry_to_handle( entry ); /* make it a full handle */
|
|
|
|
}
|
2012-10-17 12:43:23 +02:00
|
|
|
LeaveCriticalSection( &gdi_section );
|
1996-07-17 22:02:21 +02:00
|
|
|
|
2012-10-17 12:43:23 +02:00
|
|
|
if (funcs && funcs->pUnrealizeObject) return funcs->pUnrealizeObject( obj );
|
|
|
|
return funcs != NULL;
|
1993-09-04 12:09:32 +02:00
|
|
|
}
|
1994-05-25 18:25:21 +02:00
|
|
|
|
|
|
|
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
/***********************************************************************
|
2021-08-30 13:57:05 +02:00
|
|
|
* NtGdiFlush (win32u.@)
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
*/
|
2021-08-30 13:57:05 +02:00
|
|
|
BOOL WINAPI NtGdiFlush(void)
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
{
|
|
|
|
return TRUE; /* FIXME */
|
|
|
|
}
|
|
|
|
|
1997-10-12 18:30:17 +02:00
|
|
|
|
1998-12-15 16:38:36 +01:00
|
|
|
/*******************************************************************
|
2021-08-30 13:57:05 +02:00
|
|
|
* NtGdiGetColorAdjustment (win32u.@)
|
1998-12-15 16:38:36 +01:00
|
|
|
*/
|
2021-08-30 13:57:05 +02:00
|
|
|
BOOL WINAPI NtGdiGetColorAdjustment( HDC hdc, COLORADJUSTMENT *ca )
|
1998-12-15 16:38:36 +01:00
|
|
|
{
|
2021-08-30 13:57:05 +02:00
|
|
|
FIXME( "stub\n" );
|
2014-01-28 00:04:18 +01:00
|
|
|
return FALSE;
|
1998-12-15 16:38:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************
|
2021-08-30 13:57:05 +02:00
|
|
|
* NtGdiSetColorAdjustment (win32u.@)
|
1998-12-15 16:38:36 +01:00
|
|
|
*/
|
2021-08-30 13:57:05 +02:00
|
|
|
BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
|
1998-12-15 16:38:36 +01:00
|
|
|
{
|
2021-08-30 13:57:05 +02:00
|
|
|
FIXME( "stub\n" );
|
2014-01-28 00:04:18 +01:00
|
|
|
return FALSE;
|
1998-12-15 16:38:36 +01:00
|
|
|
}
|