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
|
|
|
|
2021-09-29 14:09:21 +02:00
|
|
|
#if 0
|
|
|
|
#pragma makedep unix
|
|
|
|
#endif
|
|
|
|
|
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>
|
2021-10-04 16:03:14 +02:00
|
|
|
#include <pthread.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"
|
2021-10-06 16:20:19 +02:00
|
|
|
#include "wine/unixlib.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-10-01 01:58:03 +02:00
|
|
|
static GDI_SHARED_MEMORY *gdi_shared;
|
2021-06-30 17:37:51 +02:00
|
|
|
static GDI_HANDLE_ENTRY *next_free;
|
2021-10-01 01:58:03 +02:00
|
|
|
static GDI_HANDLE_ENTRY *next_unused;
|
2012-10-17 12:25:28 +02:00
|
|
|
static LONG debug_count;
|
2021-09-17 13:44:50 +02:00
|
|
|
SYSTEM_BASIC_INFORMATION system_info;
|
2011-11-03 14:11:35 +01:00
|
|
|
|
2021-09-29 14:09:21 +02:00
|
|
|
const struct user_callbacks *user_callbacks = NULL;
|
|
|
|
|
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-10-01 01:58:03 +02:00
|
|
|
unsigned int idx = entry - gdi_shared->Handles;
|
2021-10-27 14:47:07 +02:00
|
|
|
return ULongToHandle( 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-10-01 01:58:03 +02:00
|
|
|
if (idx < GDI_MAX_HANDLE_COUNT && gdi_shared->Handles[idx].Type)
|
2012-10-16 16:58:28 +02:00
|
|
|
{
|
2021-10-01 01:58:03 +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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
static pthread_mutex_t gdi_lock;
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN };
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'} };
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','a','n','s',' ','S','e','r','i','f'} };
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, RUSSIAN_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GREEK_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, TURKISH_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HEBREW_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ARABIC_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, BALTIC_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, THAI_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GB2312_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'S','y','s','t','e','m'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
{ /* System Fixed */
|
|
|
|
16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, JOHAB_CHARSET,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
|
|
|
|
{'C','o','u','r','i','e','r'}
|
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,
|
2021-09-29 14:07:14 +02:00
|
|
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS,
|
|
|
|
{'M','S',' ','S','h','e','l','l',' ','D','l','g'}
|
2002-03-20 01:51:26 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2021-12-07 15:29:06 +01:00
|
|
|
void 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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
2021-06-30 17:36:30 +02:00
|
|
|
if ((entry = handle_entry( handle ))) entry_obj( entry )->system = !!set;
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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;
|
|
|
|
|
2021-09-29 14:07:19 +02:00
|
|
|
uACP = get_acp();
|
2002-03-20 01:51:26 +01:00
|
|
|
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;
|
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
2021-06-30 17:36:30 +02:00
|
|
|
if ((entry = handle_entry( handle ))) ret = entry_obj( entry )->selcount;
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
2012-10-17 13:17:56 +02:00
|
|
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
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;
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
2012-10-17 13:17:56 +02:00
|
|
|
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;
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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
|
|
|
}
|
|
|
|
}
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
2012-10-17 13:17:56 +02:00
|
|
|
return entry != NULL;
|
2001-08-20 21:17:28 +02:00
|
|
|
}
|
|
|
|
|
2017-04-27 12:02:35 +02:00
|
|
|
|
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-10-01 01:58:03 +02:00
|
|
|
static void init_gdi_shared(void)
|
2021-06-30 17:38:00 +02:00
|
|
|
{
|
2021-10-01 01:58:03 +02:00
|
|
|
SIZE_T size = sizeof(*gdi_shared);
|
|
|
|
|
|
|
|
if (NtAllocateVirtualMemory( GetCurrentProcess(), (void **)&gdi_shared, 0, &size,
|
|
|
|
MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE ))
|
|
|
|
return;
|
|
|
|
next_unused = gdi_shared->Handles + FIRST_GDI_HANDLE;
|
|
|
|
|
2021-06-30 17:38:00 +02:00
|
|
|
#ifndef _WIN64
|
|
|
|
if (NtCurrentTeb()->GdiBatchCount)
|
|
|
|
{
|
|
|
|
TEB64 *teb64 = (TEB64 *)(UINT_PTR)NtCurrentTeb()->GdiBatchCount;
|
|
|
|
PEB64 *peb64 = (PEB64 *)(UINT_PTR)teb64->Peb;
|
2021-10-01 01:58:03 +02:00
|
|
|
peb64->GdiSharedHandleTable = (UINT_PTR)gdi_shared;
|
2021-06-30 17:38:00 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
/* NOTE: Windows uses 32-bit for 32-bit kernel */
|
2021-10-01 01:58:03 +02:00
|
|
|
NtCurrentTeb()->Peb->GdiSharedHandleTable = gdi_shared;
|
2021-06-30 17:38:00 +02:00
|
|
|
}
|
|
|
|
|
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++)
|
|
|
|
{
|
2021-10-01 01:58:03 +02:00
|
|
|
GDI_HANDLE_ENTRY *entry = &gdi_shared->Handles[FIRST_GDI_HANDLE + i];
|
2021-09-03 14:59:50 +02:00
|
|
|
entry_obj( entry )->system = TRUE;
|
|
|
|
entry->StockFlag = 1;
|
|
|
|
}
|
2021-08-06 16:59:07 +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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
2021-10-01 01:58:03 +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
|
|
|
}
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
2010-02-24 10:11:32 +01:00
|
|
|
}
|
|
|
|
|
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 */
|
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
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;
|
2021-10-01 01:58:03 +02:00
|
|
|
else if (next_unused < gdi_shared->Handles + GDI_MAX_HANDLE_COUNT)
|
2012-10-16 16:58:28 +02:00
|
|
|
entry = next_unused++;
|
|
|
|
else
|
|
|
|
{
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
2012-10-16 16:58:28 +02:00
|
|
|
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 );
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
2012-10-17 12:25:28 +02:00
|
|
|
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
|
|
|
}
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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
|
|
|
|
2021-09-29 14:09:21 +02:00
|
|
|
void set_gdi_client_ptr( HGDIOBJ obj, void *ptr )
|
|
|
|
{
|
|
|
|
GDI_HANDLE_ENTRY *entry = handle_entry( obj );
|
|
|
|
if (entry) entry->UserPointer = (UINT_PTR)ptr;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
if (!ptr) pthread_mutex_unlock( &gdi_lock );
|
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 )
|
|
|
|
{
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
2012-10-17 12:43:23 +02:00
|
|
|
if (!(entry = handle_entry( obj )))
|
|
|
|
{
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
2012-10-17 12:43:23 +02:00
|
|
|
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);
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
2012-10-17 13:08:11 +02:00
|
|
|
|
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;
|
|
|
|
|
2021-10-01 01:57:05 +02:00
|
|
|
if (!(obj = malloc( sizeof(*obj) )))
|
2021-07-09 15:28:39 +02:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
handle = alloc_gdi_handle( obj, type, NULL );
|
2021-10-01 01:57:05 +02:00
|
|
|
if (!handle) free( obj );
|
2021-07-09 15:28:39 +02:00
|
|
|
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;
|
2021-10-01 01:57:05 +02:00
|
|
|
free( obj );
|
2021-07-22 11:23:54 +02:00
|
|
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
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 */
|
|
|
|
}
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_lock( &gdi_lock );
|
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 */
|
|
|
|
}
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutex_unlock( &gdi_lock );
|
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
|
|
|
}
|
2021-09-29 14:09:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
static struct unix_funcs unix_funcs =
|
|
|
|
{
|
|
|
|
NtGdiAbortDoc,
|
|
|
|
NtGdiAbortPath,
|
|
|
|
NtGdiAlphaBlend,
|
|
|
|
NtGdiAngleArc,
|
|
|
|
NtGdiArcInternal,
|
|
|
|
NtGdiBeginPath,
|
|
|
|
NtGdiBitBlt,
|
|
|
|
NtGdiCloseFigure,
|
|
|
|
NtGdiComputeXformCoefficients,
|
|
|
|
NtGdiCreateCompatibleBitmap,
|
|
|
|
NtGdiCreateCompatibleDC,
|
|
|
|
NtGdiCreateDIBitmapInternal,
|
|
|
|
NtGdiCreateMetafileDC,
|
|
|
|
NtGdiDdDDICheckVidPnExclusiveOwnership,
|
|
|
|
NtGdiDdDDICreateDCFromMemory,
|
|
|
|
NtGdiDdDDIDestroyDCFromMemory,
|
|
|
|
NtGdiDdDDIDestroyDevice,
|
|
|
|
NtGdiDdDDIEscape,
|
|
|
|
NtGdiDdDDISetVidPnSourceOwner,
|
|
|
|
NtGdiDeleteObjectApp,
|
|
|
|
NtGdiDoPalette,
|
|
|
|
NtGdiEllipse,
|
|
|
|
NtGdiEndDoc,
|
|
|
|
NtGdiEndPath,
|
|
|
|
NtGdiEndPage,
|
|
|
|
NtGdiEnumFonts,
|
|
|
|
NtGdiExcludeClipRect,
|
|
|
|
NtGdiExtEscape,
|
|
|
|
NtGdiExtFloodFill,
|
|
|
|
NtGdiExtTextOutW,
|
|
|
|
NtGdiExtSelectClipRgn,
|
|
|
|
NtGdiFillPath,
|
|
|
|
NtGdiFillRgn,
|
|
|
|
NtGdiFontIsLinked,
|
|
|
|
NtGdiFrameRgn,
|
|
|
|
NtGdiGetAndSetDCDword,
|
|
|
|
NtGdiGetAppClipBox,
|
|
|
|
NtGdiGetBoundsRect,
|
|
|
|
NtGdiGetCharABCWidthsW,
|
|
|
|
NtGdiGetCharWidthW,
|
|
|
|
NtGdiGetCharWidthInfo,
|
|
|
|
NtGdiGetDIBitsInternal,
|
|
|
|
NtGdiGetDeviceCaps,
|
|
|
|
NtGdiGetDeviceGammaRamp,
|
|
|
|
NtGdiGetFontData,
|
|
|
|
NtGdiGetFontUnicodeRanges,
|
|
|
|
NtGdiGetGlyphIndicesW,
|
|
|
|
NtGdiGetGlyphOutline,
|
|
|
|
NtGdiGetKerningPairs,
|
|
|
|
NtGdiGetNearestColor,
|
|
|
|
NtGdiGetOutlineTextMetricsInternalW,
|
|
|
|
NtGdiGetPixel,
|
|
|
|
NtGdiGetRandomRgn,
|
|
|
|
NtGdiGetRasterizerCaps,
|
|
|
|
NtGdiGetRealizationInfo,
|
|
|
|
NtGdiGetTextCharsetInfo,
|
|
|
|
NtGdiGetTextExtentExW,
|
|
|
|
NtGdiGetTextFaceW,
|
|
|
|
NtGdiGetTextMetricsW,
|
|
|
|
NtGdiGradientFill,
|
|
|
|
NtGdiIntersectClipRect,
|
|
|
|
NtGdiInvertRgn,
|
|
|
|
NtGdiLineTo,
|
|
|
|
NtGdiMaskBlt,
|
|
|
|
NtGdiModifyWorldTransform,
|
|
|
|
NtGdiMoveTo,
|
|
|
|
NtGdiOffsetClipRgn,
|
|
|
|
NtGdiOpenDCW,
|
|
|
|
NtGdiPatBlt,
|
|
|
|
NtGdiPlgBlt,
|
|
|
|
NtGdiPolyDraw,
|
|
|
|
NtGdiPolyPolyDraw,
|
|
|
|
NtGdiPtVisible,
|
|
|
|
NtGdiRectVisible,
|
|
|
|
NtGdiRectangle,
|
|
|
|
NtGdiResetDC,
|
|
|
|
NtGdiResizePalette,
|
|
|
|
NtGdiRestoreDC,
|
|
|
|
NtGdiRoundRect,
|
|
|
|
NtGdiScaleViewportExtEx,
|
|
|
|
NtGdiScaleWindowExtEx,
|
|
|
|
NtGdiSelectBitmap,
|
|
|
|
NtGdiSelectBrush,
|
|
|
|
NtGdiSelectClipPath,
|
|
|
|
NtGdiSelectFont,
|
|
|
|
NtGdiSelectPen,
|
|
|
|
NtGdiSetBoundsRect,
|
|
|
|
NtGdiSetDIBitsToDeviceInternal,
|
|
|
|
NtGdiSetDeviceGammaRamp,
|
|
|
|
NtGdiSetLayout,
|
|
|
|
NtGdiSetPixel,
|
|
|
|
NtGdiSetSystemPaletteUse,
|
|
|
|
NtGdiStartDoc,
|
|
|
|
NtGdiStartPage,
|
|
|
|
NtGdiStretchBlt,
|
|
|
|
NtGdiStretchDIBitsInternal,
|
|
|
|
NtGdiStrokeAndFillPath,
|
|
|
|
NtGdiStrokePath,
|
|
|
|
NtGdiTransparentBlt,
|
|
|
|
NtGdiUnrealizeObject,
|
|
|
|
NtGdiUpdateColors,
|
|
|
|
NtGdiWidenPath,
|
2021-11-17 12:47:04 +01:00
|
|
|
NtUserActivateKeyboardLayout,
|
2022-02-25 16:25:30 +01:00
|
|
|
NtUserCallHwnd,
|
2022-02-25 16:03:05 +01:00
|
|
|
NtUserCallHwndParam,
|
2022-02-25 16:02:27 +01:00
|
|
|
NtUserCallNextHookEx,
|
2022-02-15 13:10:51 +01:00
|
|
|
NtUserCallNoParam,
|
2021-12-03 12:56:30 +01:00
|
|
|
NtUserCallOneParam,
|
2021-12-02 01:13:39 +01:00
|
|
|
NtUserCallTwoParam,
|
2021-12-02 01:14:35 +01:00
|
|
|
NtUserChangeDisplaySettings,
|
2022-02-14 14:07:25 +01:00
|
|
|
NtUserClipCursor,
|
2021-11-11 14:13:45 +01:00
|
|
|
NtUserCountClipboardFormats,
|
2022-02-22 13:53:11 +01:00
|
|
|
NtUserDestroyCursor,
|
2022-02-23 13:41:38 +01:00
|
|
|
NtUserDrawIconEx,
|
2021-11-30 13:26:48 +01:00
|
|
|
NtUserEnumDisplayDevices,
|
2021-12-02 01:13:55 +01:00
|
|
|
NtUserEnumDisplayMonitors,
|
2021-12-01 16:02:43 +01:00
|
|
|
NtUserEnumDisplaySettings,
|
2022-03-09 15:19:47 +01:00
|
|
|
NtUserFlashWindowEx,
|
2022-02-15 13:15:56 +01:00
|
|
|
NtUserGetAsyncKeyState,
|
2022-03-07 14:42:32 +01:00
|
|
|
NtUserGetClassInfoEx,
|
2022-02-24 01:28:18 +01:00
|
|
|
NtUserGetCursorInfo,
|
2021-11-30 13:24:18 +01:00
|
|
|
NtUserGetDisplayConfigBufferSizes,
|
2022-02-23 13:40:33 +01:00
|
|
|
NtUserGetIconInfo,
|
2021-11-16 12:35:59 +01:00
|
|
|
NtUserGetKeyNameText,
|
2021-11-17 12:47:38 +01:00
|
|
|
NtUserGetKeyboardLayoutList,
|
2021-11-12 12:55:06 +01:00
|
|
|
NtUserGetPriorityClipboardFormat,
|
2022-02-15 13:10:38 +01:00
|
|
|
NtUserGetQueueStatus,
|
2021-11-12 12:54:10 +01:00
|
|
|
NtUserGetUpdatedClipboardFormats,
|
2021-11-12 12:53:40 +01:00
|
|
|
NtUserIsClipboardFormatAvailable,
|
2021-11-16 12:34:17 +01:00
|
|
|
NtUserMapVirtualKeyEx,
|
2022-03-10 14:32:16 +01:00
|
|
|
NtUserMoveWindow,
|
2022-03-07 14:42:32 +01:00
|
|
|
NtUserRegisterClassExWOW,
|
2022-02-24 01:27:57 +01:00
|
|
|
NtUserRegisterHotKey,
|
2021-11-17 12:49:37 +01:00
|
|
|
NtUserScrollDC,
|
2021-12-03 12:56:43 +01:00
|
|
|
NtUserSelectPalette,
|
2022-03-11 14:21:31 +01:00
|
|
|
NtUserSetActiveWindow,
|
2022-03-11 14:22:19 +01:00
|
|
|
NtUserSetCapture,
|
2022-03-07 14:42:47 +01:00
|
|
|
NtUserSetClassLong,
|
|
|
|
NtUserSetClassLongPtr,
|
|
|
|
NtUserSetClassWord,
|
2022-02-23 13:39:35 +01:00
|
|
|
NtUserSetCursor,
|
2022-02-22 13:53:11 +01:00
|
|
|
NtUserSetCursorIconData,
|
2022-02-14 14:07:53 +01:00
|
|
|
NtUserSetCursorPos,
|
2022-03-11 14:21:45 +01:00
|
|
|
NtUserSetFocus,
|
2022-03-10 14:33:11 +01:00
|
|
|
NtUserSetLayeredWindowAttributes,
|
2021-12-06 03:15:59 +01:00
|
|
|
NtUserSetSysColors,
|
2022-03-10 14:31:41 +01:00
|
|
|
NtUserSetWindowPos,
|
|
|
|
NtUserSetWindowRgn,
|
2021-12-03 12:55:30 +01:00
|
|
|
NtUserShowCursor,
|
2021-12-06 03:15:59 +01:00
|
|
|
NtUserSystemParametersInfo,
|
|
|
|
NtUserSystemParametersInfoForDpi,
|
2021-11-17 12:46:39 +01:00
|
|
|
NtUserToUnicodeEx,
|
2022-03-07 14:42:32 +01:00
|
|
|
NtUserUnregisterClass,
|
2021-11-17 12:48:13 +01:00
|
|
|
NtUserUnregisterHotKey,
|
2022-03-10 14:33:27 +01:00
|
|
|
NtUserUpdateLayeredWindow,
|
2021-11-16 12:33:53 +01:00
|
|
|
NtUserVkKeyScanEx,
|
2022-03-10 14:31:55 +01:00
|
|
|
NtUserWindowFromPoint,
|
2021-09-29 14:09:21 +02:00
|
|
|
|
|
|
|
GetDCHook,
|
|
|
|
SetDCHook,
|
|
|
|
SetDIBits,
|
|
|
|
SetHookFlags,
|
2021-10-06 16:20:26 +02:00
|
|
|
__wine_get_brush_bitmap_info,
|
|
|
|
__wine_get_file_outline_text_metric,
|
|
|
|
__wine_get_icm_profile,
|
2021-09-29 14:09:21 +02:00
|
|
|
__wine_get_vulkan_driver,
|
|
|
|
__wine_get_wgl_driver,
|
2021-11-11 14:13:29 +01:00
|
|
|
__wine_set_display_driver,
|
2021-09-29 14:09:21 +02:00
|
|
|
__wine_set_visible_region,
|
|
|
|
};
|
|
|
|
|
2021-10-06 16:20:35 +02:00
|
|
|
NTSTATUS gdi_init(void)
|
2021-09-29 14:09:21 +02:00
|
|
|
{
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutexattr_t attr;
|
2021-09-29 14:09:21 +02:00
|
|
|
unsigned int dpi;
|
|
|
|
|
2021-10-04 16:03:14 +02:00
|
|
|
pthread_mutexattr_init( &attr );
|
|
|
|
pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE );
|
|
|
|
pthread_mutex_init( &gdi_lock, &attr );
|
|
|
|
pthread_mutexattr_destroy( &attr );
|
|
|
|
|
2021-09-29 14:09:21 +02:00
|
|
|
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
|
2021-10-01 01:58:03 +02:00
|
|
|
init_gdi_shared();
|
|
|
|
if (!gdi_shared) return STATUS_NO_MEMORY;
|
|
|
|
|
2021-09-29 14:09:21 +02:00
|
|
|
dpi = font_init();
|
|
|
|
init_stock_objects( dpi );
|
|
|
|
return 0;
|
|
|
|
}
|
2021-10-06 16:20:19 +02:00
|
|
|
|
2021-10-06 16:20:35 +02:00
|
|
|
NTSTATUS callbacks_init( void *args )
|
2021-10-06 16:20:19 +02:00
|
|
|
{
|
2021-10-06 16:20:35 +02:00
|
|
|
user_callbacks = *(const struct user_callbacks **)args;
|
|
|
|
*(const struct unix_funcs **)args = &unix_funcs;
|
|
|
|
return 0;
|
|
|
|
}
|